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
void writeAll(Iterable<GridCacheBatchSwapEntry> swapped) throws IgniteCheckedException { assert offheapEnabled || swapEnabled; checkIteratorQueue(); GridCacheQueryManager qryMgr = cctx.queries(); if (offheapEnabled) { for (GridCacheBatchSwapEntry swapEntry : swapped) {...
void writeAll(Iterable<GridCacheBatchSwapEntry> swapped) throws IgniteCheckedException { assert offheapEnabled swapEnabled; checkIteratorQueue(); GridCacheQueryManager qryMgr = cctx.queries(); if (offheapEnabled) { for (GridCacheBatchSwapEntry swapEntry : swapped) { offheap.put(spaceName, swapEntry.partition(), swapEnt...
/** * Performs batch write of swapped entries. * * @param swapped Collection of swapped entries. * @throws IgniteCheckedException If failed. */
Performs batch write of swapped entries
writeAll
{ "repo_name": "tkpanther/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSwapManager.java", "license": "apache-2.0", "size": 85120 }
[ "java.util.LinkedHashMap", "java.util.Map", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager", "org.apache.ignite.lang.IgniteUuid", "org.apache.ignite.spi.swapspace.SwapKey" ]
import java.util.LinkedHashMap; import java.util.Map; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.query.GridCacheQueryManager; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.spi.swapspace.SwapKey;
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.lang.*; import org.apache.ignite.spi.swapspace.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,974,371
public void writeTo(Writer writer) throws IOException { writeTo(writer, WriterConfig.MINIMAL); }
void function(Writer writer) throws IOException { writeTo(writer, WriterConfig.MINIMAL); }
/** * Writes the JSON representation of this value to the given writer in its minimal form, without * any additional whitespace. * <p> * Writing performance can be improved by using a {@link java.io.BufferedWriter BufferedWriter}. * </p> * * @param writer * the writer to write this valu...
Writes the JSON representation of this value to the given writer in its minimal form, without any additional whitespace. Writing performance can be improved by using a <code>java.io.BufferedWriter BufferedWriter</code>.
writeTo
{ "repo_name": "TheDudeFromCI/MovieTracker", "path": "MovieTracker/src/com/eclipsesource/json/JsonValue.java", "license": "mit", "size": 16919 }
[ "java.io.IOException", "java.io.Writer" ]
import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,442,269
public JSONObject update(String soupName, JSONObject soupElt, long soupEntryId, boolean handleTx) throws JSONException { synchronized(SmartStore.class) { String soupTableName = DBHelper.INSTANCE.getSoupTableName(db, soupName); if (soupTableName == null) throw new SmartStoreException("Soup: " ...
JSONObject function(String soupName, JSONObject soupElt, long soupEntryId, boolean handleTx) throws JSONException { synchronized(SmartStore.class) { String soupTableName = DBHelper.INSTANCE.getSoupTableName(db, soupName); if (soupTableName == null) throw new SmartStoreException(STR + soupName + STR); IndexSpec[] indexS...
/** * Update * Note: Passed soupElt is modified (last modified date and soup entry id fields) * @param soupName * @param soupElt * @param soupEntryId * @return * @throws JSONException */
Update Note: Passed soupElt is modified (last modified date and soup entry id fields)
update
{ "repo_name": "marcus-bessa/MobileCampaign", "path": "forcedroid/hybrid/SmartStore/src/com/salesforce/androidsdk/smartstore/store/SmartStore.java", "license": "unlicense", "size": 29286 }
[ "android.content.ContentValues", "org.json.JSONException", "org.json.JSONObject" ]
import android.content.ContentValues; import org.json.JSONException; import org.json.JSONObject;
import android.content.*; import org.json.*;
[ "android.content", "org.json" ]
android.content; org.json;
1,271,628
public static boolean checkGooglePlayServicesAvailable(Activity activity) { final int connectionStatusCode = GooglePlayServicesUtil .isGooglePlayServicesAvailable(activity); if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) { showGooglePlayServicesA...
static boolean function(Activity activity) { final int connectionStatusCode = GooglePlayServicesUtil .isGooglePlayServicesAvailable(activity); if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) { showGooglePlayServicesAvailabilityErrorDialog(activity, connectionStatusCode); return false; } return ...
/** * Check that Google Play services APK is installed and up to date. */
Check that Google Play services APK is installed and up to date
checkGooglePlayServicesAvailable
{ "repo_name": "udacity/conference-central-android-app", "path": "app/src/main/java/com/udacity/devrel/training/conference/android/utils/Utils.java", "license": "gpl-2.0", "size": 8431 }
[ "android.app.Activity", "com.google.android.gms.common.GooglePlayServicesUtil" ]
import android.app.Activity; import com.google.android.gms.common.GooglePlayServicesUtil;
import android.app.*; import com.google.android.gms.common.*;
[ "android.app", "com.google.android" ]
android.app; com.google.android;
134,328
@After public void unregisterIdlingResource() { Espresso.unregisterIdlingResources( mDashboardActivity.getActivity().getCountingIdlingResource()); }
void function() { Espresso.unregisterIdlingResources( mDashboardActivity.getActivity().getCountingIdlingResource()); }
/** * Unregister your Idling Resource so it can be garbage collected and does not leak any memory. */
Unregister your Idling Resource so it can be garbage collected and does not leak any memory
unregisterIdlingResource
{ "repo_name": "coderaashir/android-client", "path": "mifosng-android/src/instrumentTest/java/com/mifos/mifosxdroid/tests/ClientSearchFragmentTest.java", "license": "mpl-2.0", "size": 2461 }
[ "android.support.test.espresso.Espresso" ]
import android.support.test.espresso.Espresso;
import android.support.test.espresso.*;
[ "android.support" ]
android.support;
1,171,480
protected void writeMeeting(Meeting meeting, boolean attachExtRefs, boolean showSignatureFields) throws ExportException { Protocol protocol = meeting.getProtocol(); if (protocol != null) { try { Font plainFont = new Font(BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED), ...
void function(Meeting meeting, boolean attachExtRefs, boolean showSignatureFields) throws ExportException { Protocol protocol = meeting.getProtocol(); if (protocol != null) { try { Font plainFont = new Font(BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED), 10); Font boldFont = new Font( BaseF...
/** * Writes the given meeting to the protocol. * * @param meeting * the meeting * @param attachExtRefs * true if the external references should be part of the protocol * @param showSignatureFields * true, if the signature fields should be part of the protocol * * ...
Writes the given meeting to the protocol
writeMeeting
{ "repo_name": "googol42/revager", "path": "src/org/revager/export/ProtocolPDFExporter.java", "license": "gpl-3.0", "size": 48844 }
[ "com.lowagie.text.Anchor", "com.lowagie.text.Element", "com.lowagie.text.Font", "com.lowagie.text.Phrase", "com.lowagie.text.pdf.BaseFont", "com.lowagie.text.pdf.PdfPCell", "com.lowagie.text.pdf.PdfPTable", "java.util.List", "org.revager.app.model.schema.Meeting", "org.revager.app.model.schema.Pro...
import com.lowagie.text.Anchor; import com.lowagie.text.Element; import com.lowagie.text.Font; import com.lowagie.text.Phrase; import com.lowagie.text.pdf.BaseFont; import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPTable; import java.util.List; import org.revager.app.model.schema.Meeting; import org...
import com.lowagie.text.*; import com.lowagie.text.pdf.*; import java.util.*; import org.revager.app.model.schema.*; import org.revager.tools.*;
[ "com.lowagie.text", "java.util", "org.revager.app", "org.revager.tools" ]
com.lowagie.text; java.util; org.revager.app; org.revager.tools;
2,596,017
static OtpErlangString otpObjectToOtpString(final OtpErlangObject value) throws ClassCastException { // need special handling if OTP returned an empty list if (value instanceof OtpErlangList) { try { return new OtpErlangString((OtpErlangList) value); ...
static OtpErlangString otpObjectToOtpString(final OtpErlangObject value) throws ClassCastException { if (value instanceof OtpErlangList) { try { return new OtpErlangString((OtpErlangList) value); } catch (final OtpErlangException e) { throw new ClassCastException(STR + e.getMessage()); } } else if (value instanceof Otp...
/** * Converts an {@link OtpErlangObject} to a {@link OtpErlangString} taking * special care of lists which have not be converted to strings * automatically using the OTP library. * * @param value * the value to convert * * @return the value as a String * * @...
Converts an <code>OtpErlangObject</code> to a <code>OtpErlangString</code> taking special care of lists which have not be converted to strings automatically using the OTP library
otpObjectToOtpString
{ "repo_name": "tectronics/scalaris", "path": "java-api/src/de/zib/scalaris/ErlangValue.java", "license": "apache-2.0", "size": 23629 }
[ "com.ericsson.otp.erlang.OtpErlangAtom", "com.ericsson.otp.erlang.OtpErlangException", "com.ericsson.otp.erlang.OtpErlangList", "com.ericsson.otp.erlang.OtpErlangObject", "com.ericsson.otp.erlang.OtpErlangString" ]
import com.ericsson.otp.erlang.OtpErlangAtom; import com.ericsson.otp.erlang.OtpErlangException; import com.ericsson.otp.erlang.OtpErlangList; import com.ericsson.otp.erlang.OtpErlangObject; import com.ericsson.otp.erlang.OtpErlangString;
import com.ericsson.otp.erlang.*;
[ "com.ericsson.otp" ]
com.ericsson.otp;
2,348,632
public static final void writeBooleanArrayXml(boolean[] val, String name, XmlSerializer out) throws XmlPullParserException, IOException { if (val == null) { out.startTag(null, "null"); out.endTag(null, "null"); return; } out.startTag(null, "b...
static final void function(boolean[] val, String name, XmlSerializer out) throws XmlPullParserException, IOException { if (val == null) { out.startTag(null, "null"); out.endTag(null, "null"); return; } out.startTag(null, STR); if (name != null) { out.attribute(null, "name", name); } final int N = val.length; out.attrib...
/** * Flatten a boolean[] into an XmlSerializer. The list can later be read back * with readThisBooleanArrayXml(). * * @param val The boolean array to be flattened. * @param name Name attribute to include with this array's tag, or null for * none. * @param out XmlSerializ...
Flatten a boolean[] into an XmlSerializer. The list can later be read back with readThisBooleanArrayXml()
writeBooleanArrayXml
{ "repo_name": "wiki2014/Learning-Summary", "path": "alps/cts/tests/tests/content/src/android/content/cts/util/XmlUtils.java", "license": "gpl-3.0", "size": 62083 }
[ "java.io.IOException", "org.xmlpull.v1.XmlPullParserException", "org.xmlpull.v1.XmlSerializer" ]
import java.io.IOException; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer;
import java.io.*; import org.xmlpull.v1.*;
[ "java.io", "org.xmlpull.v1" ]
java.io; org.xmlpull.v1;
12,908
public void restoreLoaderNonConfig(ArrayMap<String, LoaderManager> loaderManagers) { mHost.restoreLoaderNonConfig(loaderManagers); }
void function(ArrayMap<String, LoaderManager> loaderManagers) { mHost.restoreLoaderNonConfig(loaderManagers); }
/** * Restores the saved state for all LoaderManagers. The given LoaderManager list are * LoaderManager instances retained across configuration changes. * * @see #retainLoaderNonConfig() */
Restores the saved state for all LoaderManagers. The given LoaderManager list are LoaderManager instances retained across configuration changes
restoreLoaderNonConfig
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/app/FragmentController.java", "license": "apache-2.0", "size": 14271 }
[ "android.util.ArrayMap" ]
import android.util.ArrayMap;
import android.util.*;
[ "android.util" ]
android.util;
1,432,970
public void autoshrine(final Marker marker, final Message msg) { logger.logIfEnabled(FQCN, AUTOSHRINE, marker, msg, (Throwable) null); }
void function(final Marker marker, final Message msg) { logger.logIfEnabled(FQCN, AUTOSHRINE, marker, msg, (Throwable) null); }
/** * Logs a message with the specific Marker at the {@code AUTOSHRINE} level. * * @param marker the marker data specific to this log statement * @param msg the message string to be logged */
Logs a message with the specific Marker at the AUTOSHRINE level
autoshrine
{ "repo_name": "Betalord/BHBot", "path": "src/main/java/BHBotLogger.java", "license": "gpl-3.0", "size": 177002 }
[ "org.apache.logging.log4j.Marker", "org.apache.logging.log4j.message.Message" ]
import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.*; import org.apache.logging.log4j.message.*;
[ "org.apache.logging" ]
org.apache.logging;
1,153,310
public List<T> from(Iterable<?> c) { return propertySupport.propertyValues(propertyName, propertyType, c); }
List<T> function(Iterable<?> c) { return propertySupport.propertyValues(propertyName, propertyType, c); }
/** * Extracts the values of the property (specified previously in <code>{@link #extractProperty(String)}</code>) from the elements * of the given <code>{@link Iterable}</code>. * @param c the given {@code Iterable}. * @return the values of the previously specified property extracted from the given {@code I...
Extracts the values of the property (specified previously in <code><code>#extractProperty(String)</code></code>) from the elements of the given <code><code>Iterable</code></code>
from
{ "repo_name": "mdecourci/assertj-core", "path": "src/main/java/org/assertj/core/groups/Properties.java", "license": "apache-2.0", "size": 4948 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,493,148
public Boolean organisationHasAuditModule(int organisationId) throws XmlMappingException, IOException, WSClientException{ logger.debug("organisationHasAuditModule START"); Boolean hasAudit; try { //create the bean marshalled into the request OrganisationHasAuditModuleRequest request = new Organ...
Boolean function(int organisationId) throws XmlMappingException, IOException, WSClientException{ logger.debug(STR); Boolean hasAudit; try { OrganisationHasAuditModuleRequest request = new OrganisationHasAuditModuleRequest(); request.setOrganisationId(organisationId); OrganisationHasAuditModuleResponse response = (Organ...
/** * Checks if an organization has the audit module * * @author coni * * @param moduleId * @return * @throws XmlMappingException * @throws IOException * @throws WSClientException */
Checks if an organization has the audit module
organisationHasAuditModule
{ "repo_name": "CodeSphere/termitaria", "path": "TermitariaTS/src/ro/cs/ts/ws/client/om/OMWebServiceClient.java", "license": "agpl-3.0", "size": 21818 }
[ "java.io.IOException", "javax.xml.bind.JAXBElement", "org.springframework.oxm.XmlMappingException", "org.springframework.ws.soap.SoapFaultDetail", "org.springframework.ws.soap.SoapFaultDetailElement", "org.springframework.ws.soap.client.SoapFaultClientException", "ro.cs.ts.exception.WSClientException", ...
import java.io.IOException; import javax.xml.bind.JAXBElement; import org.springframework.oxm.XmlMappingException; import org.springframework.ws.soap.SoapFaultDetail; import org.springframework.ws.soap.SoapFaultDetailElement; import org.springframework.ws.soap.client.SoapFaultClientException; import ro.cs.ts.exception....
import java.io.*; import javax.xml.bind.*; import org.springframework.oxm.*; import org.springframework.ws.soap.*; import org.springframework.ws.soap.client.*; import ro.cs.ts.exception.*; import ro.cs.ts.ws.client.om.entity.*;
[ "java.io", "javax.xml", "org.springframework.oxm", "org.springframework.ws", "ro.cs.ts" ]
java.io; javax.xml; org.springframework.oxm; org.springframework.ws; ro.cs.ts;
1,679,874
public static void throwIfUnrecognizedParamName(final Enumeration initParamNames) { val recognizedParameterNames = new HashSet<String>(); recognizedParameterNames.add(ALLOW_MULTI_VALUED_PARAMETERS); recognizedParameterNames.add(PARAMETERS_TO_CHECK); recognizedParameterNames.add(ONLY_...
static void function(final Enumeration initParamNames) { val recognizedParameterNames = new HashSet<String>(); recognizedParameterNames.add(ALLOW_MULTI_VALUED_PARAMETERS); recognizedParameterNames.add(PARAMETERS_TO_CHECK); recognizedParameterNames.add(ONLY_POST_PARAMETERS); recognizedParameterNames.add(CHARACTERS_TO_FO...
/** * Examines the Filter init parameter names and throws ServletException if they contain an unrecognized * init parameter name. * <p> * This is a stateless static method. * <p> * This method is an implementation detail and is not exposed API. * This method is only non-private to all...
Examines the Filter init parameter names and throws ServletException if they contain an unrecognized init parameter name. This is a stateless static method. This method is an implementation detail and is not exposed API. This method is only non-private to allow JUnit testing
throwIfUnrecognizedParamName
{ "repo_name": "leleuj/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/filters/RequestParameterPolicyEnforcementFilter.java", "license": "apache-2.0", "size": 19859 }
[ "java.util.Enumeration", "java.util.HashSet", "javax.servlet.ServletException" ]
import java.util.Enumeration; import java.util.HashSet; import javax.servlet.ServletException;
import java.util.*; import javax.servlet.*;
[ "java.util", "javax.servlet" ]
java.util; javax.servlet;
1,025,475
protected static boolean isValid(L2PcInstance player, L2ItemInstance item, L2ItemInstance refinerItem) { if (!isValid(player, item)) { return false; } // Item must belong to owner if (refinerItem.getOwnerId() != player.getObjectId()) { return false; } // Lifestone must be located in invento...
static boolean function(L2PcInstance player, L2ItemInstance item, L2ItemInstance refinerItem) { if (!isValid(player, item)) { return false; } if (refinerItem.getOwnerId() != player.getObjectId()) { return false; } if (refinerItem.getItemLocation() != ItemLocation.INVENTORY) { return false; } final LifeStone ls = _lifeS...
/** * Checks player, source item and lifestone validity for augmentation process * @param player * @param item * @param refinerItem * @return */
Checks player, source item and lifestone validity for augmentation process
isValid
{ "repo_name": "rubenswagner/L2J-Global", "path": "java/com/l2jglobal/gameserver/network/clientpackets/AbstractRefinePacket.java", "license": "gpl-3.0", "size": 16461 }
[ "com.l2jglobal.gameserver.enums.ItemLocation", "com.l2jglobal.gameserver.model.actor.instance.L2PcInstance", "com.l2jglobal.gameserver.model.items.L2Armor", "com.l2jglobal.gameserver.model.items.L2Weapon", "com.l2jglobal.gameserver.model.items.instance.L2ItemInstance" ]
import com.l2jglobal.gameserver.enums.ItemLocation; import com.l2jglobal.gameserver.model.actor.instance.L2PcInstance; import com.l2jglobal.gameserver.model.items.L2Armor; import com.l2jglobal.gameserver.model.items.L2Weapon; import com.l2jglobal.gameserver.model.items.instance.L2ItemInstance;
import com.l2jglobal.gameserver.enums.*; import com.l2jglobal.gameserver.model.actor.instance.*; import com.l2jglobal.gameserver.model.items.*; import com.l2jglobal.gameserver.model.items.instance.*;
[ "com.l2jglobal.gameserver" ]
com.l2jglobal.gameserver;
1,063,383
private double[] removeValues(final double[] input, final Set<Integer> indices) { if (indices.isEmpty()) { return input; } final double[] result = new double[input.length - indices.size()]; for (int i = 0, j = 0; i < input.length; i++) { if (!indices.contains(...
double[] function(final double[] input, final Set<Integer> indices) { if (indices.isEmpty()) { return input; } final double[] result = new double[input.length - indices.size()]; for (int i = 0, j = 0; i < input.length; i++) { if (!indices.contains(i)) { result[j++] = input[i]; } } return result; }
/** * Removes all values from the input array at the specified indices. * * @param input the input array * @param indices a set containing the indices to be removed * @return the input array without the values at the specified indices */
Removes all values from the input array at the specified indices
removeValues
{ "repo_name": "tbepler/seq-svm", "path": "src/org/apache/commons/math3/stat/correlation/SpearmansCorrelation.java", "license": "mit", "size": 9945 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
717,263
@RequestMapping("/getWMSCapabilities.do") public ModelAndView getWmsCapabilities(@RequestParam("serviceUrl") String serviceUrl, @RequestParam("version") String version) throws Exception { try { GetCapabilitiesRecord capabilitiesRec = wmsService.getWmsCapabilities(serviceUrl, version); return generateJSONRe...
@RequestMapping(STR) ModelAndView function(@RequestParam(STR) String serviceUrl, @RequestParam(STR) String version) throws Exception { try { GetCapabilitiesRecord capabilitiesRec = wmsService.getWmsCapabilities(serviceUrl, version); return generateJSONResponseMAV(true, capabilitiesRec, STRUnable to retrieve WMS GetCapa...
/** * Gets the GetCapabilities response for the given WMS URL * * @param serviceUrl The WMS URL to query */
Gets the GetCapabilities response for the given WMS URL
getWmsCapabilities
{ "repo_name": "squireg/portal-core", "path": "src/main/java/org/auscope/portal/core/server/controllers/WMSController.java", "license": "lgpl-3.0", "size": 25279 }
[ "org.auscope.portal.core.services.responses.wms.GetCapabilitiesRecord", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestParam", "org.springframework.web.servlet.ModelAndView" ]
import org.auscope.portal.core.services.responses.wms.GetCapabilitiesRecord; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView;
import org.auscope.portal.core.services.responses.wms.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "org.auscope.portal", "org.springframework.web" ]
org.auscope.portal; org.springframework.web;
1,211,793
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY) Page<SoftwareModuleMetadata> findSoftwareModuleMetadataBySoftwareModuleId(@NotNull Long swId, @NotNull Pageable pageable); /** * finds all meta data by the given software module id. * * @param softwareModuleId * ...
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY) Page<SoftwareModuleMetadata> findSoftwareModuleMetadataBySoftwareModuleId(@NotNull Long swId, @NotNull Pageable pageable); /** * finds all meta data by the given software module id. * * @param softwareModuleId * the software module id to retrieve the meta da...
/** * finds all meta data by the given software module id. * * @param swId * the software module id to retrieve the meta data from * @param pageable * the page request to page the result * @return a paged result of all meta data entries for a given software ...
finds all meta data by the given software module id
findSoftwareModuleMetadataBySoftwareModuleId
{ "repo_name": "StBurcher/hawkbit", "path": "hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/SoftwareManagement.java", "license": "epl-1.0", "size": 19464 }
[ "javax.validation.constraints.NotNull", "org.eclipse.hawkbit.im.authentication.SpPermission", "org.eclipse.hawkbit.repository.exception.RSQLParameterUnsupportedFieldException", "org.eclipse.hawkbit.repository.model.SoftwareModuleMetadata", "org.springframework.data.domain.Page", "org.springframework.data....
import javax.validation.constraints.NotNull; import org.eclipse.hawkbit.im.authentication.SpPermission; import org.eclipse.hawkbit.repository.exception.RSQLParameterUnsupportedFieldException; import org.eclipse.hawkbit.repository.model.SoftwareModuleMetadata; import org.springframework.data.domain.Page; import org.spri...
import javax.validation.constraints.*; import org.eclipse.hawkbit.im.authentication.*; import org.eclipse.hawkbit.repository.exception.*; import org.eclipse.hawkbit.repository.model.*; import org.springframework.data.domain.*; import org.springframework.security.access.prepost.*;
[ "javax.validation", "org.eclipse.hawkbit", "org.springframework.data", "org.springframework.security" ]
javax.validation; org.eclipse.hawkbit; org.springframework.data; org.springframework.security;
96,717
public String decrypt(String encryptedKey) throws Exception { SecretKeySpec key = new SecretKeySpec(KEY_BYTES, "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.DECRYPT_MODE, key); byte[] decoded = decode(encryptedKey); byte[] plainText = new byte[ciph...
String function(String encryptedKey) throws Exception { SecretKeySpec key = new SecretKeySpec(KEY_BYTES, "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.DECRYPT_MODE, key); byte[] decoded = decode(encryptedKey); byte[] plainText = new byte[cipher.getOutputSize(decoded.length)]; int ptLength = ciph...
/** * Decrypts the password. * @param encryptedKey the encrypted password. * @return The plain text password. * @throws Exception If an error occurs. */
Decrypts the password
decrypt
{ "repo_name": "TinyGroup/tiny", "path": "framework/org.tinygroup.commons/src/main/java/org/tinygroup/commons/cryptor/DefaultCryptor.java", "license": "gpl-3.0", "size": 6425 }
[ "javax.crypto.Cipher", "javax.crypto.spec.SecretKeySpec" ]
import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec;
import javax.crypto.*; import javax.crypto.spec.*;
[ "javax.crypto" ]
javax.crypto;
498,218
public Date getUpdated() { return _updated; }
Date function() { return _updated; }
/** * Returns the updated * <p> * @return Returns the updated. * @since Atom 1.0 */
Returns the updated
getUpdated
{ "repo_name": "OpenNTF/collaborationtoday", "path": "DOTSFeedMonster/org.openntf.rome/org.openntf.rome/src/com/sun/syndication/feed/atom/Entry.java", "license": "apache-2.0", "size": 14309 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
65,512
@Test public void testFilterQueryOnFilterView11() { checkNoMaterialize( "select \"name\", \"deptno\" from \"emps\" where " + "(\"salary\" < 1111.9 and \"deptno\" > 10)" + "or (\"empid\" > 400 and \"salary\" > 5000)", "select \"name\" from \"emps\" where \"deptno\" > 30 and ...
@Test void function() { checkNoMaterialize( STRname\STRdeptno\STRemps\STR + "(\"salary\STRdeptno\STR + STRempid\STRsalary\STR, STRname\STRemps\STRdeptno\STRsalary\STR, HR_FKUK_MODEL); }
/** As {@link #testFilterQueryOnFilterView()} but condition is weaker in * query and columns selected are subset of columns in materialized view. * Condition here is complex. */
As <code>#testFilterQueryOnFilterView()</code> but condition is weaker in query and columns selected are subset of columns in materialized view
testFilterQueryOnFilterView11
{ "repo_name": "b-slim/calcite", "path": "core/src/test/java/org/apache/calcite/test/MaterializationTest.java", "license": "apache-2.0", "size": 104701 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
241,796
@FXML private void check(ActionEvent event) { if (game != null && CheckOperator.getCheckoperator().isApplicable(game) && game.getCurrentplayer().isHuman()) { CheckOperator.getCheckoperator().apply(game); } }
void function(ActionEvent event) { if (game != null && CheckOperator.getCheckoperator().isApplicable(game) && game.getCurrentplayer().isHuman()) { CheckOperator.getCheckoperator().apply(game); } }
/** * Checks if the check operator is applicable. * * @param event an event that occured on the check button */
Checks if the check operator is applicable
check
{ "repo_name": "feco93/Zsir", "path": "src/main/java/hu/zsir/game/MainController.java", "license": "gpl-3.0", "size": 4829 }
[ "hu.zsir.game.operators.CheckOperator" ]
import hu.zsir.game.operators.CheckOperator;
import hu.zsir.game.operators.*;
[ "hu.zsir.game" ]
hu.zsir.game;
1,597,336
@Override public CacheRequest put(URI uri, URLConnection connection) throws IOException { if (!isCacheable(connection)) { return null; } Stack<Frame> stack = mStack.get(); if (stack == null || stack.isEmpty()) { return null; } Fram...
CacheRequest function(URI uri, URLConnection connection) throws IOException { if (!isCacheable(connection)) { return null; } Stack<Frame> stack = mStack.get(); if (stack == null stack.isEmpty()) { return null; } Frame frame = stack.peek(); File file = getFile(frame); if (file != null) { File parent = file.getParentFile...
/** * Please see {@link ResponseCache#put(URI, URLConnection)}. */
Please see <code>ResponseCache#put(URI, URLConnection)</code>
put
{ "repo_name": "pierrealexvezinet/excusedemerde", "path": "edm/src/com/google/android/filecache/FileResponseCache.java", "license": "epl-1.0", "size": 27141 }
[ "java.io.File", "java.io.IOException", "java.net.CacheRequest", "java.net.URLConnection", "java.util.Stack" ]
import java.io.File; import java.io.IOException; import java.net.CacheRequest; import java.net.URLConnection; import java.util.Stack;
import java.io.*; import java.net.*; import java.util.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
2,149,443
public void close() throws IOException { _in.close(); } static class StreamingInputStream extends InputStream { private InputStream _is; private int _length; StreamingInputStream(InputStream is) { _is = is; }
void function() throws IOException { _in.close(); } static class StreamingInputStream extends InputStream { private InputStream _is; private int _length; StreamingInputStream(InputStream is) { _is = is; }
/** * Close the output. */
Close the output
close
{ "repo_name": "pvo99i/hessdroid", "path": "src/com/caucho/hessian/io/Hessian2StreamingInput.java", "license": "apache-2.0", "size": 4363 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
787,881
@org.junit.Test public void action() throws Exception { RMTHelper helper = RMTHelper.getDefaultInstance(); final ResourceManager r = helper.getResourceManager(); // The username and thr password must be the same a used to connect to the RM final String adminLogin = RMTHelper.def...
@org.junit.Test void function() throws Exception { RMTHelper helper = RMTHelper.getDefaultInstance(); final ResourceManager r = helper.getResourceManager(); final String adminLogin = RMTHelper.defaultUserName; final String adminPassword = RMTHelper.defaultUserPassword; final RMAuthentication auth = (RMAuthentication) h...
/** * Test function. * @throws Exception */
Test function
action
{ "repo_name": "acontes/scheduling", "path": "src/resource-manager/tests/functionaltests/jmx/account/AddGetRemoveTest.java", "license": "agpl-3.0", "size": 6174 }
[ "java.security.PublicKey", "java.util.HashMap", "javax.management.MBeanServerConnection", "javax.management.ObjectName", "javax.management.remote.JMXConnector", "javax.management.remote.JMXConnectorFactory", "javax.management.remote.JMXServiceURL", "org.junit.Assert", "org.objectweb.proactive.core.n...
import java.security.PublicKey; import java.util.HashMap; import javax.management.MBeanServerConnection; import javax.management.ObjectName; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import org.junit.Assert; import org....
import java.security.*; import java.util.*; import javax.management.*; import javax.management.remote.*; import org.junit.*; import org.objectweb.proactive.core.node.*; import org.ow2.proactive.authentication.crypto.*; import org.ow2.proactive.jmx.naming.*; import org.ow2.proactive.resourcemanager.authentication.*; imp...
[ "java.security", "java.util", "javax.management", "org.junit", "org.objectweb.proactive", "org.ow2.proactive" ]
java.security; java.util; javax.management; org.junit; org.objectweb.proactive; org.ow2.proactive;
1,654,384
private void simpleTest(int datanodeToKill) throws IOException { Configuration conf = new HdfsConfiguration(); conf.setInt(DFSConfigKeys.DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY, 2000); conf.setInt(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1); conf.setInt(DFSConfigKeys.DFS_NAMENODE_REPLICATION_PEND...
void function(int datanodeToKill) throws IOException { Configuration conf = new HdfsConfiguration(); conf.setInt(DFSConfigKeys.DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY, 2000); conf.setInt(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, 1); conf.setInt(DFSConfigKeys.DFS_NAMENODE_REPLICATION_PENDING_TIMEOUT_SEC_KEY, 2); con...
/** * Write to one file, then kill one datanode in the pipeline and then * close the file. */
Write to one file, then kill one datanode in the pipeline and then close the file
simpleTest
{ "repo_name": "ZhangXFeng/hadoop", "path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDatanodeDeath.java", "license": "apache-2.0", "size": 14158 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.protocol.DatanodeInfo", "org.junit.Assert" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
885,133
@Test public void testSubmitEditModifyRevertNotOpenedErrE2E() throws Exception { List<IFileSpec> submittedFiles = null; List<IFileSpec> editedFiles = null; debugPrintTestName("testSubmitEditModifyRevertNotOpenedErrE2E"); String clientRoot = client.getRoot(); assertNotNu...
void function() throws Exception { List<IFileSpec> submittedFiles = null; List<IFileSpec> editedFiles = null; debugPrintTestName(STR); String clientRoot = client.getRoot(); assertNotNull(STR, clientRoot); String testText = STR + getName(); String newFile = clientRoot + File.separator + testId + File.separator + STR; St...
/** * Create file, Add->Submit(reOpen)->Edit->Modify->Submit->Revert()=Error(files not opened) */
Create file, Add->Submit(reOpen)->Edit->Modify->Submit->Revert()=Error(files not opened)
testSubmitEditModifyRevertNotOpenedErrE2E
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/endtoend/ClientEditSubmitE2ETest.java", "license": "apache-2.0", "size": 52979 }
[ "com.perforce.p4java.core.file.FileAction", "com.perforce.p4java.core.file.FileSpecBuilder", "com.perforce.p4java.core.file.FileSpecOpStatus", "com.perforce.p4java.core.file.IFileSpec", "java.io.File", "java.util.List", "org.junit.Assert" ]
import com.perforce.p4java.core.file.FileAction; import com.perforce.p4java.core.file.FileSpecBuilder; import com.perforce.p4java.core.file.FileSpecOpStatus; import com.perforce.p4java.core.file.IFileSpec; import java.io.File; import java.util.List; import org.junit.Assert;
import com.perforce.p4java.core.file.*; import java.io.*; import java.util.*; import org.junit.*;
[ "com.perforce.p4java", "java.io", "java.util", "org.junit" ]
com.perforce.p4java; java.io; java.util; org.junit;
731,689
void assertEquals(String msg, ActionNameMap expected, ActionNameMap actual) { assertEquals("Verify locale", expected.getLocale(), actual.getLocale()); int size = expected.size(); assertEquals(msg + " size ", size, actual.size()); if (size ==...
void assertEquals(String msg, ActionNameMap expected, ActionNameMap actual) { assertEquals(STR, expected.getLocale(), actual.getLocale()); int size = expected.size(); assertEquals(msg + STR, size, actual.size()); if (size == actual.size()) { for (int i = 0; i < size; i++) { assertEquals(msg + STR, expected.getAction(i)...
/** * Verify that two ActionNameMaps are equal. * @param msg the message to print if a compare fails * @param expected the expected map * @param actual the actual map */
Verify that two ActionNameMaps are equal
assertEquals
{ "repo_name": "tommythorn/yari", "path": "shared/cacao-related/phoneme_feature/jsr211/src/i3test/com/sun/midp/content/TestRegReadWrite.java", "license": "gpl-2.0", "size": 11357 }
[ "javax.microedition.content.ActionNameMap" ]
import javax.microedition.content.ActionNameMap;
import javax.microedition.content.*;
[ "javax.microedition" ]
javax.microedition;
2,228,260
@GET @Path("geomz/count") public long getTopicInstancesGeomzCount( @Context UriInfo uriInfo, @Context HttpServletRequest request, @PathParam("projectId") UUID projectId, @PathParam("topicCharacteristicId") UUID topicCharacteristicId) { return new TopicGeo...
@Path(STR) long function( @Context UriInfo uriInfo, @Context HttpServletRequest request, @PathParam(STR) UUID projectId, @PathParam(STR) UUID topicCharacteristicId) { return new TopicGeomzRbac( projectId, OpenInfraSchemas.PROJECTS, null).getCount( OpenInfraHttpMethod.valueOf(request.getMethod()), uriInfo, topicCharacte...
/** * This is a special representation of the topic object. It delivers always * a list of topic instances with corresponding 3D attribute values as X3D. * <ul> * <li>rest/v1/projects/[uuid]/topiccharacteristics/[topicCharacteristicId]/topicinstances/geomz/count</li> * </ul> * ...
This is a special representation of the topic object. It delivers always a list of topic instances with corresponding 3D attribute values as X3D. rest/v1/projects/[uuid]/topiccharacteristics/[topicCharacteristicId]/topicinstances/geomz/count
getTopicInstancesGeomzCount
{ "repo_name": "noacktino/core", "path": "openinfra_core/src/main/java/de/btu/openinfra/backend/rest/project/TopicCharacteristicResource.java", "license": "gpl-3.0", "size": 13235 }
[ "de.btu.openinfra.backend.db.OpenInfraSchemas", "de.btu.openinfra.backend.db.rbac.OpenInfraHttpMethod", "de.btu.openinfra.backend.db.rbac.TopicGeomzRbac", "javax.servlet.http.HttpServletRequest", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.Context", "javax.ws.rs.core.UriInfo" ]
import de.btu.openinfra.backend.db.OpenInfraSchemas; import de.btu.openinfra.backend.db.rbac.OpenInfraHttpMethod; import de.btu.openinfra.backend.db.rbac.TopicGeomzRbac; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Context; import javax.ws....
import de.btu.openinfra.backend.db.*; import de.btu.openinfra.backend.db.rbac.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "de.btu.openinfra", "javax.servlet", "javax.ws" ]
de.btu.openinfra; javax.servlet; javax.ws;
2,858,599
public static HistoryStateData getStateData(HistoryState state) { Indicator indicator = null; String indicatorIdent = state.getIndicatorIdent(); if (indicatorIdent != null) { indicator = Indicator.objects .where() .ilike("ident", indicatorIdent...
static HistoryStateData function(HistoryState state) { Indicator indicator = null; String indicatorIdent = state.getIndicatorIdent(); if (indicatorIdent != null) { indicator = Indicator.objects .where() .ilike("ident", indicatorIdent) .query() .findUnique(); } List<Country> countries = null; List<String> countryISOList...
/** * Exchange a {@link HistoryState} for a {@link HistoryStateData}. * * @param state History state. * @return History state data. */
Exchange a <code>HistoryState</code> for a <code>HistoryStateData</code>
getStateData
{ "repo_name": "snogaraleal/wbi", "path": "app/services/WBIExplorationService.java", "license": "gpl-3.0", "size": 4563 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,824,464
public List<String> getMappedPersistenceUnit(Class<?> clazz) { return this.clazzToPuMap != null ? this.clazzToPuMap.get(clazz.getName()) : null; }
List<String> function(Class<?> clazz) { return this.clazzToPuMap != null ? this.clazzToPuMap.get(clazz.getName()) : null; }
/** * Gets the mapped persistence unit. * * @param clazz * the clazz * * @return the mapped persistence unit */
Gets the mapped persistence unit
getMappedPersistenceUnit
{ "repo_name": "ravisund/Kundera", "path": "src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/ApplicationMetadata.java", "license": "apache-2.0", "size": 13000 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
760,508
public void copyTo(Value target) { if (target == this) { return; } Debug.$assert0.t(!isLongRecordMode()); Debug.$assert0.t(!target.isLongRecordMode()); target.ensureFit(_size); System.arraycopy(_bytes, 0, target._bytes, 0, _size); target._size = _...
void function(Value target) { if (target == this) { return; } Debug.$assert0.t(!isLongRecordMode()); Debug.$assert0.t(!target.isLongRecordMode()); target.ensureFit(_size); System.arraycopy(_bytes, 0, target._bytes, 0, _size); target._size = _size; target._maximumSize = _maximumSize; target._pointer = _pointer; target._...
/** * Copy the state of this <code>Value</code> to another <code>Value</code>. * * @param target * The <code>Value</code> to which state should be copied. */
Copy the state of this <code>Value</code> to another <code>Value</code>
copyTo
{ "repo_name": "jaytaylor/persistit", "path": "src/main/java/com/persistit/Value.java", "license": "epl-1.0", "size": 180447 }
[ "com.persistit.util.Debug" ]
import com.persistit.util.Debug;
import com.persistit.util.*;
[ "com.persistit.util" ]
com.persistit.util;
644,224
public static byte[] transcodeSignatureToDER(byte[] jwsSignature) throws JwtException { int rawLen = jwsSignature.length / 2; int i = rawLen; while((i > 0) && (jwsSignature[rawLen - i] == 0)) i--; int j = i; if (jwsSignature[rawLen...
static byte[] function(byte[] jwsSignature) throws JwtException { int rawLen = jwsSignature.length / 2; int i = rawLen; while((i > 0) && (jwsSignature[rawLen - i] == 0)) i--; int j = i; if (jwsSignature[rawLen - i] < 0) { j += 1; } int k = rawLen; while ((k > 0) && (jwsSignature[2 * rawLen - k] == 0)) k--; int l = k; i...
/** * Transcodes the ECDSA JWS signature into ASN.1/DER format for use by * the JCA verifier. * * @param jwsSignature The JWS signature, consisting of the * concatenated R and S values. Must not be * {@code null}. * * @return The ASN.1/DER ...
Transcodes the ECDSA JWS signature into ASN.1/DER format for use by the JCA verifier
transcodeSignatureToDER
{ "repo_name": "dogeared/jjwt", "path": "src/main/java/io/jsonwebtoken/impl/crypto/EllipticCurveProvider.java", "license": "apache-2.0", "size": 12298 }
[ "io.jsonwebtoken.JwtException" ]
import io.jsonwebtoken.JwtException;
import io.jsonwebtoken.*;
[ "io.jsonwebtoken" ]
io.jsonwebtoken;
47,723
public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { boolean hasErrors = !resource.getErrors().isEmpty(); if (hasErrors || !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, ...
Diagnostic function(Resource resource, Exception exception) { boolean hasErrors = !resource.getErrors().isEmpty(); if (hasErrors !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (hasErrors ? Diagnostic.ERROR : Diagnostic.WARNING, STR, 0, getString(STR, resource.getURI()), new O...
/** * Returns a diagnostic describing the errors and warnings listed in the resource * and the specified exception (if any). * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Returns a diagnostic describing the errors and warnings listed in the resource and the specified exception (if any).
analyzeResourceProblems
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.elasticocci.editor/src-gen/org/eclipse/cmf/occi/multicloud/elasticocci/presentation/ElasticocciEditor.java", "license": "epl-1.0", "size": 55123 }
[ "org.eclipse.emf.common.util.BasicDiagnostic", "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.emf.ecore.resource.Resource", "org.eclipse.emf.ecore.util.EcoreUtil" ]
import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.ecore.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,963,042
public static List<UserPermission> getUserPermissions(Connection connection, String tableRegex, byte[] columnFamily, byte[] columnQualifier, String userName) throws Throwable { if (tableRegex == null || tableRegex.isEmpty() || tableRegex.charAt(0) == '@') { throw new IllegalArgumentException("Table na...
static List<UserPermission> function(Connection connection, String tableRegex, byte[] columnFamily, byte[] columnQualifier, String userName) throws Throwable { if (tableRegex == null tableRegex.isEmpty() tableRegex.charAt(0) == '@') { throw new IllegalArgumentException(STR); } List<UserPermission> permList = new ArrayL...
/** * List all the userPermissions matching the given table pattern, column family and column * qualifier. * @param connection Connection * @param tableRegex The regular expression string to match against. It shouldn't be null, empty * or a namespace regular expression. * @param columnFamily ...
List all the userPermissions matching the given table pattern, column family and column qualifier
getUserPermissions
{ "repo_name": "ultratendency/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlClient.java", "license": "apache-2.0", "size": 17971 }
[ "java.util.ArrayList", "java.util.List", "java.util.regex.Pattern", "org.apache.hadoop.hbase.client.Admin", "org.apache.hadoop.hbase.client.Connection", "org.apache.hadoop.hbase.client.TableDescriptor" ]
import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.TableDescriptor;
import java.util.*; import java.util.regex.*; import org.apache.hadoop.hbase.client.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
637,015
public static Long createSessionLog(Connection con, Long userId) { Long sessionId = null; try { //insert PreparedStatement stmt = con.prepareStatement("insert into session_log (user_id) values(?)", Statement.RETURN_GENERATED_KEYS); stmt.setLong(1, userId); ...
static Long function(Connection con, Long userId) { Long sessionId = null; try { PreparedStatement stmt = con.prepareStatement(STR, Statement.RETURN_GENERATED_KEYS); stmt.setLong(1, userId); stmt.execute(); ResultSet rs = stmt.getGeneratedKeys(); if (rs != null && rs.next()) { sessionId = rs.getLong(1); } DBUtils.close...
/** * insert new session record for user * * @param con DB connection * @param userId user id * @return session id */
insert new session record for user
createSessionLog
{ "repo_name": "enascimento/KeyBox", "path": "src/main/java/com/keybox/manage/db/SessionAuditDB.java", "license": "apache-2.0", "size": 12572 }
[ "com.keybox.manage.util.DBUtils", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.Statement" ]
import com.keybox.manage.util.DBUtils; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement;
import com.keybox.manage.util.*; import java.sql.*;
[ "com.keybox.manage", "java.sql" ]
com.keybox.manage; java.sql;
1,761,552
AuthorizationLevel save(AuthorizationLevel level);
AuthorizationLevel save(AuthorizationLevel level);
/** * Saves the specified authorization level, returning the resulting object */
Saves the specified authorization level, returning the resulting object
save
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/services/transfertypes/AuthorizationLevelService.java", "license": "gpl-2.0", "size": 1680 }
[ "nl.strohalm.cyclos.entities.accounts.transactions.AuthorizationLevel" ]
import nl.strohalm.cyclos.entities.accounts.transactions.AuthorizationLevel;
import nl.strohalm.cyclos.entities.accounts.transactions.*;
[ "nl.strohalm.cyclos" ]
nl.strohalm.cyclos;
710,384
public void init(final Vocabulary vocab) { this.namespaceIV = vocab.get(new URIImpl(namespace)); if (namespaceIV == null) log.warn("No vocabulary entry for namespace - URIs with this namespace will not be inlined: namespace=" + namespace); }
void function(final Vocabulary vocab) { this.namespaceIV = vocab.get(new URIImpl(namespace)); if (namespaceIV == null) log.warn(STR + namespace); }
/** * Lookup the namespace IV from the vocabulary. */
Lookup the namespace IV from the vocabulary
init
{ "repo_name": "blazegraph/database", "path": "bigdata-core/bigdata-rdf/src/java/com/bigdata/rdf/internal/InlineURIHandler.java", "license": "gpl-2.0", "size": 4054 }
[ "com.bigdata.rdf.vocab.Vocabulary", "org.openrdf.model.impl.URIImpl" ]
import com.bigdata.rdf.vocab.Vocabulary; import org.openrdf.model.impl.URIImpl;
import com.bigdata.rdf.vocab.*; import org.openrdf.model.impl.*;
[ "com.bigdata.rdf", "org.openrdf.model" ]
com.bigdata.rdf; org.openrdf.model;
1,818,816
static long nextEventNumberFromPath(final Path channelPath) throws IOException { AtomicLong currentlyMostRecent = new AtomicLong(); return Files.list(channelPath) //.filter(f -> Files.isRegularFile(f)) .filter( f -> { // FileName must ...
static long nextEventNumberFromPath(final Path channelPath) throws IOException { AtomicLong currentlyMostRecent = new AtomicLong(); return Files.list(channelPath) .filter( f -> { if (f.toFile().getName().chars().allMatch(x -> Character.isDigit(x)) && f.toFile().lastModified() >= currentlyMostRecent.get()) { currentlyMo...
/** * Look at all the files in the channel and return the event number of the next one * to be created. * @param channelPath * @return theNextValidEventNumber */
Look at all the files in the channel and return the event number of the next one to be created
nextEventNumberFromPath
{ "repo_name": "Tesco/mewbase", "path": "mewbase-core/src/main/java/io/mewbase/eventsource/impl/file/FileEventUtils.java", "license": "mit", "size": 4836 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "java.util.concurrent.atomic.AtomicLong" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.concurrent.atomic.AtomicLong;
import java.io.*; import java.nio.file.*; import java.util.concurrent.atomic.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
1,069,729
public static CommandLineOptions makeOptions(String calExpression, ModuleName moduleName, Level verbosity, Logger logger) { if (calExpression == null) { logger.severe("Error: No cal expression provided."); return null; } ...
static CommandLineOptions function(String calExpression, ModuleName moduleName, Level verbosity, Logger logger) { if (calExpression == null) { logger.severe(STR); return null; } if (moduleName == null) { SourceModel.Expr expr = SourceModelUtilities.TextParsing.parseExprIntoSourceModel(calExpression); if (expr == null) ...
/** * Create a command-line options object given the arguments. * * @param calExpression * @param moduleName * @param verbosity * @param logger the logger to which to log any errors. * * @return the options object, or null if there were e...
Create a command-line options object given the arguments
makeOptions
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/CAL.java", "license": "bsd-3-clause", "size": 22870 }
[ "java.util.logging.Level", "java.util.logging.Logger", "org.openquark.cal.compiler.ModuleName", "org.openquark.cal.compiler.SourceModel", "org.openquark.cal.compiler.SourceModelUtilities" ]
import java.util.logging.Level; import java.util.logging.Logger; import org.openquark.cal.compiler.ModuleName; import org.openquark.cal.compiler.SourceModel; import org.openquark.cal.compiler.SourceModelUtilities;
import java.util.logging.*; import org.openquark.cal.compiler.*;
[ "java.util", "org.openquark.cal" ]
java.util; org.openquark.cal;
1,648,404
public void doctypeDecl( String rootElement, String publicId, String systemId, Augmentations augs) throws XNIException { // call handlers if (fDocumentHandler != null) { fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs); ...
void function( String rootElement, String publicId, String systemId, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs); } }
/** * Notifies of the presence of the DOCTYPE line in the document. * * @param rootElement The name of the root element. * @param publicId The public identifier if an external DTD or null * if the external DTD is specified using SYSTEM. * @param systemId The system...
Notifies of the presence of the DOCTYPE line in the document
doctypeDecl
{ "repo_name": "PrincetonUniversity/NVJVM", "path": "build/linux-amd64/jaxp/drop/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java", "license": "gpl-2.0", "size": 177439 }
[ "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.XNIException" ]
import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.*;
[ "com.sun.org" ]
com.sun.org;
2,721,992
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<VirtualMachineInner> updateAsync( String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { return beginUpdateAsync(resourceGroupName, vmName, parameters) .last() .flatMap(this.client::getLroFi...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<VirtualMachineInner> function( String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters) { return beginUpdateAsync(resourceGroupName, vmName, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); }
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @throws IllegalArgumentException thrown if param...
The operation to update a virtual machine
updateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java", "license": "mit", "size": 333925 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineInner", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineUpdateInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineInner; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineUpdateInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
902,587
public void createAuthor(String email, Date dob, String name, String displayName, String bio) { try { Connection connection = dataSource.getConnection(); String sql = "INSERT INTO AUTHOR VALUES (?,?,?,?,?)"; PreparedStatement ppsm = connection.prepareStatement(sql); ppsm.setString(1, email...
void function(String email, Date dob, String name, String displayName, String bio) { try { Connection connection = dataSource.getConnection(); String sql = STR; PreparedStatement ppsm = connection.prepareStatement(sql); ppsm.setString(1, email); ppsm.setString(2, bio); ppsm.setString(3, displayName); if (dob != null) p...
/** * Create an author record * * @param a * The author object to be created * @throws ParseException * @throws ParseException */
Create an author record
createAuthor
{ "repo_name": "WouterBanckenACA/aries", "path": "samples/blog/blog-persistence-jdbc/src/main/java/org/apache/aries/samples/blog/persistence/jdbc/BlogPersistenceServiceImpl.java", "license": "apache-2.0", "size": 20662 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "java.util.Date" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Date;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,249,034
public IBasicExpression compile(Element expressionElement) throws BadQueryException;
IBasicExpression function(Element expressionElement) throws BadQueryException;
/** * Compiles an IBasicExpression (-tree) from the given <code>expressionElement</code>. * * @param expressionElement the (root) expression Element to compile * into an IBasicExpression. * * @return the compiled IBasicExpression. * * @thr...
Compiles an IBasicExpression (-tree) from the given <code>expressionElement</code>
compile
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/share/org/apache/slide/search/basic/IBasicExpressionCompiler.java", "license": "apache-2.0", "size": 1768 }
[ "org.apache.slide.search.BadQueryException", "org.jdom.a.Element" ]
import org.apache.slide.search.BadQueryException; import org.jdom.a.Element;
import org.apache.slide.search.*; import org.jdom.a.*;
[ "org.apache.slide", "org.jdom.a" ]
org.apache.slide; org.jdom.a;
928,615
private void testVariance(String testName, Sparsity sparsity, DataType dataType, ExecType platform) { boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG; RUNTIME_PLATFORM platformOld = setRuntimePlatform(platform); if(shouldSkipTest()) return; try { ...
void function(String testName, Sparsity sparsity, DataType dataType, ExecType platform) { boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG; RUNTIME_PLATFORM platformOld = setRuntimePlatform(platform); if(shouldSkipTest()) return; try { getAndLoadTestConfiguration(testName); String HOME = SCRIPT_DIR + TEST_DIR;...
/** * Test the variance function, "var(X)", on * dense/sparse matrices/vectors on the CP/Spark/MR platforms. * * @param testName The name of this test case. * @param sparsity Selection between empty, sparse, and dense data. * @param dataType Selection between a matrix, a row vector, and a ...
Test the variance function, "var(X)", on dense/sparse matrices/vectors on the CP/Spark/MR platforms
testVariance
{ "repo_name": "deroneriksson/incubator-systemml", "path": "src/test/java/org/apache/sysml/test/integration/functions/aggregate/VarianceTest.java", "license": "apache-2.0", "size": 9491 }
[ "java.util.HashMap", "org.apache.sysml.api.DMLScript", "org.apache.sysml.lops.LopProperties", "org.apache.sysml.runtime.matrix.data.MatrixValue", "org.apache.sysml.test.utils.TestUtils" ]
import java.util.HashMap; import org.apache.sysml.api.DMLScript; import org.apache.sysml.lops.LopProperties; import org.apache.sysml.runtime.matrix.data.MatrixValue; import org.apache.sysml.test.utils.TestUtils;
import java.util.*; import org.apache.sysml.api.*; import org.apache.sysml.lops.*; import org.apache.sysml.runtime.matrix.data.*; import org.apache.sysml.test.utils.*;
[ "java.util", "org.apache.sysml" ]
java.util; org.apache.sysml;
2,331,388
private static SimpleSubmission<?> createSubmission(int[] procTimes, List<Long> times, int index) { List<Command> commands = null; if (procTimes != null) { commands = new ArrayList<>(); for (int procTime : procTimes) { commands.add(new SimpleCommand("process " + procTime, (outputLine, outp...
static SimpleSubmission<?> function(int[] procTimes, List<Long> times, int index) { List<Command> commands = null; if (procTimes != null) { commands = new ArrayList<>(); for (int procTime : procTimes) { commands.add(new SimpleCommand(STR + procTime, (outputLine, outputStore) -> "ready".equals(outputLine))); } } return ...
/** * Creates a submission to submit to a test process. * * @param procTimes An array of the number of processing cycles each command of the submission is to entail. * {@link Command#isCompleted(String, boolean)} method is invoked. * @param times A list of times that the submission is to update upon its ...
Creates a submission to submit to a test process
createSubmission
{ "repo_name": "ViktorC/PSPPool", "path": "src/test/java/net/viktorc/pp4j/impl/PPEPerformanceTest.java", "license": "gpl-2.0", "size": 11783 }
[ "java.util.ArrayList", "java.util.List", "net.viktorc.pp4j.api.Command" ]
import java.util.ArrayList; import java.util.List; import net.viktorc.pp4j.api.Command;
import java.util.*; import net.viktorc.pp4j.api.*;
[ "java.util", "net.viktorc.pp4j" ]
java.util; net.viktorc.pp4j;
1,300,982
if (object == null) return "None"; if (object instanceof Class) { return ((Class<?>) object).getName(); } if (object instanceof Collection) { @SuppressWarnings("unchecked") Collection<Object> collection = (Collection<Object>) object; String elements = collection.stream().map(Tracker:...
if (object == null) return "None"; if (object instanceof Class) { return ((Class<?>) object).getName(); } if (object instanceof Collection) { @SuppressWarnings(STR) Collection<Object> collection = (Collection<Object>) object; String elements = collection.stream().map(Tracker::display).collect(Collectors.joining(STR)); ...
/** * Display string. * * @param object the object * @return the string */
Display string
display
{ "repo_name": "apache/solr", "path": "solr/benchmark/src/java/org/apache/solr/bench/generators/Tracker.java", "license": "apache-2.0", "size": 4862 }
[ "java.util.Arrays", "java.util.Collection", "java.util.Locale", "java.util.stream.Collectors" ]
import java.util.Arrays; import java.util.Collection; import java.util.Locale; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
952,341
Duration interFrameDelayVariationForwardMin();
Duration interFrameDelayVariationForwardMin();
/** * The minimum one-way inter-frame delay interval in the forward direction. * calculated by this MEP for this Measurement Interval. * @return A java duration */
The minimum one-way inter-frame delay interval in the forward direction. calculated by this MEP for this Measurement Interval
interFrameDelayVariationForwardMin
{ "repo_name": "sdnwiselab/onos", "path": "incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/delay/DelayMeasurementStat.java", "license": "apache-2.0", "size": 13086 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
1,974,872
public void testExe() throws Exception { String ret = content(F.asMap("cmd", GridRestCommand.EXE.key())); assertNotNull(ret); assertTrue(!ret.isEmpty()); info("Exe command result: " + ret); jsonEquals(ret, pattern("null", false)); // Attempt to execute unknown tas...
void function() throws Exception { String ret = content(F.asMap("cmd", GridRestCommand.EXE.key())); assertNotNull(ret); assertTrue(!ret.isEmpty()); info(STR + ret); jsonEquals(ret, pattern("null", false)); ret = content(F.asMap("cmd", GridRestCommand.EXE.key(), "name", STR)); assertNotNull(ret); assertTrue(!ret.isEmpty...
/** * Tests {@code exe} command. * <p> * Note that attempt to execute unknown task (UNKNOWN_TASK) will result in exception on server. * * @throws Exception If failed. */
Tests exe command. Note that attempt to execute unknown task (UNKNOWN_TASK) will result in exception on server
testExe
{ "repo_name": "shurun19851206/ignite", "path": "modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java", "license": "apache-2.0", "size": 39992 }
[ "org.apache.ignite.internal.util.typedef.F" ]
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.*;
[ "org.apache.ignite" ]
org.apache.ignite;
488,953
public static void timeoutTask(CompletionService completionService) { if (completionService instanceof SubmitOrderedCompletionService) { ((SubmitOrderedCompletionService) completionService).timeoutTask(); } } private static final class CamelThreadFactory implements Th...
static void function(CompletionService completionService) { if (completionService instanceof SubmitOrderedCompletionService) { ((SubmitOrderedCompletionService) completionService).timeoutTask(); } } private static final class CamelThreadFactory implements ThreadFactory { private final String pattern; private final Stri...
/** * Timeout the completion service. * <p/> * This can be used to mark the completion service as timed out, allowing you to poll any already completed tasks. * This applies when using the {@link SubmitOrderedCompletionService}. * * @param completionService the completion service. ...
Timeout the completion service. This can be used to mark the completion service as timed out, allowing you to poll any already completed tasks. This applies when using the <code>SubmitOrderedCompletionService</code>
timeoutTask
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/main/java/org/apache/camel/util/concurrent/ExecutorServiceHelper.java", "license": "apache-2.0", "size": 17861 }
[ "java.util.concurrent.CompletionService", "java.util.concurrent.ThreadFactory" ]
import java.util.concurrent.CompletionService; import java.util.concurrent.ThreadFactory;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,106,014
protected void sort() { Collections.sort(m_List, m_Comparator); }
void function() { Collections.sort(m_List, m_Comparator); }
/** * Sorts the list. */
Sorts the list
sort
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/data/SortedList.java", "license": "gpl-3.0", "size": 11522 }
[ "java.util.Collections", "java.util.Comparator", "java.util.List" ]
import java.util.Collections; import java.util.Comparator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,193,934
public static Schema parseSchemaFromFile(Path filePath, FileSystem fs) throws IOException { Closer closer = Closer.create(); try { InputStream in = closer.register(fs.open(filePath)); return new Schema.Parser().parse(in); } finally { closer.close(); } }
static Schema function(Path filePath, FileSystem fs) throws IOException { Closer closer = Closer.create(); try { InputStream in = closer.register(fs.open(filePath)); return new Schema.Parser().parse(in); } finally { closer.close(); } }
/** * Parse Avro schema from a schema file. */
Parse Avro schema from a schema file
parseSchemaFromFile
{ "repo_name": "Hanmourang/Gobblin", "path": "gobblin-utility/src/main/java/gobblin/util/AvroUtils.java", "license": "apache-2.0", "size": 18467 }
[ "com.google.common.io.Closer", "java.io.IOException", "java.io.InputStream", "org.apache.avro.Schema", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import com.google.common.io.Closer; import java.io.IOException; import java.io.InputStream; import org.apache.avro.Schema; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import com.google.common.io.*; import java.io.*; import org.apache.avro.*; import org.apache.hadoop.fs.*;
[ "com.google.common", "java.io", "org.apache.avro", "org.apache.hadoop" ]
com.google.common; java.io; org.apache.avro; org.apache.hadoop;
1,639,250
private Map<String, List<ViewWorldbankIndicatorDataCountrySummary>> getTopicIndicatorMap() { final DataContainer<ViewWorldbankIndicatorDataCountrySummary, WorldbankIndicatorDataCountrySummaryEmbeddedId> indicatorDataCountrSummaryDailyDataContainer = applicationManager .getDataContainer(ViewWorldbankIndicatorDa...
Map<String, List<ViewWorldbankIndicatorDataCountrySummary>> function() { final DataContainer<ViewWorldbankIndicatorDataCountrySummary, WorldbankIndicatorDataCountrySummaryEmbeddedId> indicatorDataCountrSummaryDailyDataContainer = applicationManager .getDataContainer(ViewWorldbankIndicatorDataCountrySummary.class); retu...
/** * Gets the topic indicator map. * * @return the topic indicator map */
Gets the topic indicator map
getTopicIndicatorMap
{ "repo_name": "Hack23/cia", "path": "citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/CountryMenuItemFactoryImpl.java", "license": "apache-2.0", "size": 7661 }
[ "com.hack23.cia.model.internal.application.data.impl.ViewWorldbankIndicatorDataCountrySummary", "com.hack23.cia.model.internal.application.data.impl.WorldbankIndicatorDataCountrySummaryEmbeddedId", "com.hack23.cia.service.api.DataContainer", "java.util.AbstractMap", "java.util.Arrays", "java.util.List", ...
import com.hack23.cia.model.internal.application.data.impl.ViewWorldbankIndicatorDataCountrySummary; import com.hack23.cia.model.internal.application.data.impl.WorldbankIndicatorDataCountrySummaryEmbeddedId; import com.hack23.cia.service.api.DataContainer; import java.util.AbstractMap; import java.util.Arrays; import j...
import com.hack23.cia.model.internal.application.data.impl.*; import com.hack23.cia.service.api.*; import java.util.*; import java.util.stream.*;
[ "com.hack23.cia", "java.util" ]
com.hack23.cia; java.util;
79,750
public static MethodAnnotation fromCalledMethod(DismantleBytecode visitor) { String className = visitor.getDottedClassConstantOperand(); String methodName = visitor.getNameConstantOperand(); String methodSig = visitor.getSigConstantOperand(); return fromCalledMethod(className, methodName, methodSig, ...
static MethodAnnotation function(DismantleBytecode visitor) { String className = visitor.getDottedClassConstantOperand(); String methodName = visitor.getNameConstantOperand(); String methodSig = visitor.getSigConstantOperand(); return fromCalledMethod(className, methodName, methodSig, visitor.getOpcode() == Constants.I...
/** * Factory method to create a MethodAnnotation from a method * called by the instruction the given visitor is currently visiting. * * @param visitor the visitor * @return the MethodAnnotation representing the called method */
Factory method to create a MethodAnnotation from a method called by the instruction the given visitor is currently visiting
fromCalledMethod
{ "repo_name": "optivo-org/fingbugs-1.3.9-optivo", "path": "src/java/edu/umd/cs/findbugs/MethodAnnotation.java", "license": "lgpl-2.1", "size": 16781 }
[ "edu.umd.cs.findbugs.visitclass.DismantleBytecode", "org.apache.bcel.Constants" ]
import edu.umd.cs.findbugs.visitclass.DismantleBytecode; import org.apache.bcel.Constants;
import edu.umd.cs.findbugs.visitclass.*; import org.apache.bcel.*;
[ "edu.umd.cs", "org.apache.bcel" ]
edu.umd.cs; org.apache.bcel;
2,127,419
BigInteger getX();
BigInteger getX();
/** * Returns the private value, <code>x</code>. * * @return the private value, <code>x</code> */
Returns the private value, <code>x</code>
getX
{ "repo_name": "md-5/jdk10", "path": "src/java.base/share/classes/javax/crypto/interfaces/DHPrivateKey.java", "license": "gpl-2.0", "size": 2009 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
276,967
public static DatanodeDescriptor getDatanode(final FSNamesystem ns, DatanodeID id) throws IOException { ns.readLock(); try { return ns.getBlockManager().getDatanodeManager().getDatanode(id); } finally { ns.readUnlock(); } }
static DatanodeDescriptor function(final FSNamesystem ns, DatanodeID id) throws IOException { ns.readLock(); try { return ns.getBlockManager().getDatanodeManager().getDatanode(id); } finally { ns.readUnlock(); } }
/** * Return the datanode descriptor for the given datanode. */
Return the datanode descriptor for the given datanode
getDatanode
{ "repo_name": "NJUJYB/disYarn", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/NameNodeAdapter.java", "license": "apache-2.0", "size": 9394 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.DatanodeID", "org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.blockmanagement.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,697,761
return configuration.isUseDefaultCredentialsProvider() ? new EventbridgeClientIAMOptimizedImpl(configuration) : new EventbridgeClientStandardImpl(configuration); }
return configuration.isUseDefaultCredentialsProvider() ? new EventbridgeClientIAMOptimizedImpl(configuration) : new EventbridgeClientStandardImpl(configuration); }
/** * Return the correct AWS Eventbridge client (based on remote vs local). * * @param configuration configuration * @return EventBridgeClient */
Return the correct AWS Eventbridge client (based on remote vs local)
getEventbridgeClient
{ "repo_name": "pax95/camel", "path": "components/camel-aws/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/client/EventbridgeClientFactory.java", "license": "apache-2.0", "size": 1800 }
[ "org.apache.camel.component.aws2.eventbridge.client.impl.EventbridgeClientIAMOptimizedImpl", "org.apache.camel.component.aws2.eventbridge.client.impl.EventbridgeClientStandardImpl" ]
import org.apache.camel.component.aws2.eventbridge.client.impl.EventbridgeClientIAMOptimizedImpl; import org.apache.camel.component.aws2.eventbridge.client.impl.EventbridgeClientStandardImpl;
import org.apache.camel.component.aws2.eventbridge.client.impl.*;
[ "org.apache.camel" ]
org.apache.camel;
911,932
public void layout(final int width, final int height, Collection<NodeProxy> lockedNodes);
void function(final int width, final int height, Collection<NodeProxy> lockedNodes);
/** * Perform the graph layout calculation. * Elements of the model are expected to contain proper positions/dimensions after layout is invoked. * * @param width graph canvas width * @param height graph canvas height * @param lockedNodes collection of nodes which should not be moved by layout calculation ...
Perform the graph layout calculation. Elements of the model are expected to contain proper positions/dimensions after layout is invoked
layout
{ "repo_name": "quaxquax/Graph-Explorer", "path": "src/main/java/com/vaadin/graph/LayoutEngine.java", "license": "apache-2.0", "size": 701 }
[ "com.vaadin.graph.shared.NodeProxy", "java.util.Collection" ]
import com.vaadin.graph.shared.NodeProxy; import java.util.Collection;
import com.vaadin.graph.shared.*; import java.util.*;
[ "com.vaadin.graph", "java.util" ]
com.vaadin.graph; java.util;
12,292
public Cursor fetchAccountsOrderedByFullName(String where, String[] whereArgs) { Log.v(LOG_TAG, "Fetching all accounts from db where " + where); return mDb.query(AccountEntry.TABLE_NAME, null, where, whereArgs, null, null, AccountEntry.COLUMN_FULL_NAME + " ASC"); ...
Cursor function(String where, String[] whereArgs) { Log.v(LOG_TAG, STR + where); return mDb.query(AccountEntry.TABLE_NAME, null, where, whereArgs, null, null, AccountEntry.COLUMN_FULL_NAME + STR); }
/** * Returns a Cursor set of accounts which fulfill <code>where</code> * <p>This method returns the accounts list sorted by the full account name</p> * @param where SQL WHERE statement without the 'WHERE' itself * @param whereArgs where args * @return Cursor set of accounts which fulfill <code...
Returns a Cursor set of accounts which fulfill <code>where</code> This method returns the accounts list sorted by the full account name
fetchAccountsOrderedByFullName
{ "repo_name": "leerduo/gnucash-android", "path": "app/src/main/java/org/gnucash/android/db/AccountsDbAdapter.java", "license": "apache-2.0", "size": 54669 }
[ "android.database.Cursor", "android.util.Log", "org.gnucash.android.db.DatabaseSchema" ]
import android.database.Cursor; import android.util.Log; import org.gnucash.android.db.DatabaseSchema;
import android.database.*; import android.util.*; import org.gnucash.android.db.*;
[ "android.database", "android.util", "org.gnucash.android" ]
android.database; android.util; org.gnucash.android;
1,248,061
public static boolean isQuadraticResidueMod2PowN(BigInteger a, int n) { BigInteger m = I_1.shiftLeft(n); if (a.compareTo(m) >= 0) a = a.and(m.subtract(I_1)); // now 0 <= a < m BigInteger lastM = m; for (int i=n; i>=2; i--) { lastM = lastM.shiftRight(1); if ((i & 1) == 1) { // odd i if (a.equals(...
static boolean function(BigInteger a, int n) { BigInteger m = I_1.shiftLeft(n); if (a.compareTo(m) >= 0) a = a.and(m.subtract(I_1)); BigInteger lastM = m; for (int i=n; i>=2; i--) { lastM = lastM.shiftRight(1); if ((i & 1) == 1) { if (a.equals(lastM.add(lastM.shiftRight(2)))) return false; } else { if (a.equals(lastM) ...
/** * Computes if 'a' is a quadratic residue modulo 2^n. * Iterative implementation for BigIntegers. * * @param a argument * @param n exponent of the modulus m=2^n * @return true if 'a' is a quadratic residue modulo 2^n */
Computes if 'a' is a quadratic residue modulo 2^n. Iterative implementation for BigIntegers
isQuadraticResidueMod2PowN
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-gpl/src/main/java/de/tilman_neumann/jml/quadraticResidues/QuadraticResiduesMod2PowN.java", "license": "gpl-3.0", "size": 8184 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
14,031
public void deleteLocalInstructionComment(final INaviInstruction instruction, final IComment comment) throws CouldntDeleteException { CommentManager.get(m_provider).deleteLocalInstructionComment(instruction, m_codeNode, comment); }
void function(final INaviInstruction instruction, final IComment comment) throws CouldntDeleteException { CommentManager.get(m_provider).deleteLocalInstructionComment(instruction, m_codeNode, comment); }
/** * Deletes a local instruction comment from the code node. * * @param instruction The instruction in this code node where to delete the comment. * @param comment The comment to be deleted. * * @throws CouldntDeleteException if the comment could not be deleted from the database. */
Deletes a local instruction comment from the code node
deleteLocalInstructionComment
{ "repo_name": "AmesianX/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/CCodeNodeComments.java", "license": "apache-2.0", "size": 17598 }
[ "com.google.security.zynamics.binnavi.Database", "com.google.security.zynamics.binnavi.Gui" ]
import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.Gui;
import com.google.security.zynamics.binnavi.*;
[ "com.google.security" ]
com.google.security;
1,457,737
@Override public String getHexMessage() { return ModbusUtil.toHex(this); }// getHexMessage
String function() { return ModbusUtil.toHex(this); }
/** * Returns the this message as hexadecimal string. * * @return the message as hex encoded string. */
Returns the this message as hexadecimal string
getHexMessage
{ "repo_name": "cdjackson/openhab", "path": "bundles/binding/org.openhab.binding.modbus/src/main/java/net/wimpi/modbus/msg/ModbusMessageImpl.java", "license": "epl-1.0", "size": 7041 }
[ "net.wimpi.modbus.util.ModbusUtil" ]
import net.wimpi.modbus.util.ModbusUtil;
import net.wimpi.modbus.util.*;
[ "net.wimpi.modbus" ]
net.wimpi.modbus;
2,696,406
@SuppressWarnings("UnusedReturnValue") public Step popStep() { if (!params.isEmpty()) { params = Collections.emptyMap(); state = State.HAS_NEXT_STEP; } else if (!history.isEmpty()) { currentStep = history.pop(); } return currentStep; }
@SuppressWarnings(STR) Step function() { if (!params.isEmpty()) { params = Collections.emptyMap(); state = State.HAS_NEXT_STEP; } else if (!history.isEmpty()) { currentStep = history.pop(); } return currentStep; }
/** * Pops previous step from history setting it as a current step. * <p/> * It will remove params if context has state {@code COMPLETED} and the state will be reset to * {@code HAS_NEXT_STEP}. * <p/> * If history is empty nothing will be done. * * @return previous step */
Pops previous step from history setting it as a current step. It will remove params if context has state COMPLETED and the state will be reset to HAS_NEXT_STEP. If history is empty nothing will be done
popStep
{ "repo_name": "RomanPozdeev/yandex-money-sdk-java", "path": "src/main/java/com/yandex/money/api/model/showcase/ShowcaseContext.java", "license": "mit", "size": 13001 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,837,127
public void setLoadsImagesAutomatically(boolean flag) { if (TRACE) Log.i(LOGTAG, "setLoadsImagesAutomatically=" + flag); synchronized (mAwSettingsLock) { if (mLoadsImagesAutomatically != flag) { mLoadsImagesAutomatically = flag; mEventHandler.updateWebkitP...
void function(boolean flag) { if (TRACE) Log.i(LOGTAG, STR + flag); synchronized (mAwSettingsLock) { if (mLoadsImagesAutomatically != flag) { mLoadsImagesAutomatically = flag; mEventHandler.updateWebkitPreferencesLocked(); } } }
/** * See {@link android.webkit.WebSettings#setLoadsImagesAutomatically}. */
See <code>android.webkit.WebSettings#setLoadsImagesAutomatically</code>
setLoadsImagesAutomatically
{ "repo_name": "endlessm/chromium-browser", "path": "android_webview/java/src/org/chromium/android_webview/AwSettings.java", "license": "bsd-3-clause", "size": 65458 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,816,066
Response createChange(String projectId, String zoneName, Change change, String... fields) { ZoneContainer zoneContainer = findZone(projectId, zoneName); if (zoneContainer == null) { return Error.NOT_FOUND.response(String.format( "The 'parameters.managedZone' resource named %s does not exist.",...
Response createChange(String projectId, String zoneName, Change change, String... fields) { ZoneContainer zoneContainer = findZone(projectId, zoneName); if (zoneContainer == null) { return Error.NOT_FOUND.response(String.format( STR, zoneName)); } Response response = checkChange(change, zoneContainer); if (response != ...
/** * Creates a new change, stores it, and if delayChange > 0, invokes processing in a new thread. */
Creates a new change, stores it, and if delayChange > 0, invokes processing in a new thread
createChange
{ "repo_name": "aozarov/gcloud-java", "path": "gcloud-java-dns/src/main/java/com/google/cloud/dns/testing/LocalDnsHelper.java", "license": "apache-2.0", "size": 50076 }
[ "com.google.api.services.dns.model.Change", "com.google.common.collect.ImmutableList", "java.io.IOException", "java.util.concurrent.ConcurrentLinkedQueue", "org.joda.time.format.ISODateTimeFormat" ]
import com.google.api.services.dns.model.Change; import com.google.common.collect.ImmutableList; import java.io.IOException; import java.util.concurrent.ConcurrentLinkedQueue; import org.joda.time.format.ISODateTimeFormat;
import com.google.api.services.dns.model.*; import com.google.common.collect.*; import java.io.*; import java.util.concurrent.*; import org.joda.time.format.*;
[ "com.google.api", "com.google.common", "java.io", "java.util", "org.joda.time" ]
com.google.api; com.google.common; java.io; java.util; org.joda.time;
1,792,769
public Set getNonCriticalExtensionOIDs() { return CertUtils.getNonCriticalExtensionOIDs(entry.getExtensions()); }
Set function() { return CertUtils.getNonCriticalExtensionOIDs(entry.getExtensions()); }
/** * Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the * non-critical extensions contained in this holder's CRL entry. * * @return a set of non-critical extension OIDs. */
Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the non-critical extensions contained in this holder's CRL entry
getNonCriticalExtensionOIDs
{ "repo_name": "rex-xxx/mt6572_x201", "path": "external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/cert/X509CRLEntryHolder.java", "license": "gpl-2.0", "size": 3861 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,643,376
public static float[] toFloatArray(final Collection<Float> values) { final float[] items = new float[values.size()]; final Iterator<Float> iterator = values.iterator(); for (int i = 0; i < items.length; i++) { items[i] = iterator.next(); } return items; }
static float[] function(final Collection<Float> values) { final float[] items = new float[values.size()]; final Iterator<Float> iterator = values.iterator(); for (int i = 0; i < items.length; i++) { items[i] = iterator.next(); } return items; }
/** * Converts a list of <code>Float</code> objects into an array of * primitive <code>float</code>s. * * @param values the list of <code>Float</code>s * @return an array of <code>float</code>s */
Converts a list of <code>Float</code> objects into an array of primitive <code>float</code>s
toFloatArray
{ "repo_name": "StrikerX3/java-utils", "path": "src/main/java/com/ivan/utils/collections/CollectionUtils.java", "license": "mit", "size": 11156 }
[ "java.util.Collection", "java.util.Iterator" ]
import java.util.Collection; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,232,921
ConnectivityManager connectivity = (ConnectivityManager) _context .getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity != null) { NetworkInfo[] info = connectivity.getAllNetworkInfo(); if (info != null) for (int i = 0; i < info.length; i++) if (info[i].getState() == NetworkInfo.State...
ConnectivityManager connectivity = (ConnectivityManager) _context .getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity != null) { NetworkInfo[] info = connectivity.getAllNetworkInfo(); if (info != null) for (int i = 0; i < info.length; i++) if (info[i].getState() == NetworkInfo.State.CONNECTED) { return tr...
/** * Checking for all possible internet providers * **/
Checking for all possible internet providers
isConnectingToInternet
{ "repo_name": "lawrence615/Kodesearch", "path": "src/com/kodesearch/external/ConnectionDetector.java", "license": "unlicense", "size": 770 }
[ "android.content.Context", "android.net.ConnectivityManager", "android.net.NetworkInfo" ]
import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo;
import android.content.*; import android.net.*;
[ "android.content", "android.net" ]
android.content; android.net;
414,282
@Override public void unregisterUserGroup(final String localServerName, final UserGroup userGroup) throws RemoteException { if (LOG.isDebugEnabled()) { LOG.debug("unregisterUserGroup called :: userGroup = " + userGroup); // NOI18N } try { um.unregisterUserGroup(l...
void function(final String localServerName, final UserGroup userGroup) throws RemoteException { if (LOG.isDebugEnabled()) { LOG.debug(STR + userGroup); } try { um.unregisterUserGroup(localServerName, userGroup); status.addMessage( NbBundle.getMessage(Registry.class, STR) , NbBundle.getMessage( Registry.class, STR , new...
/** * DOCUMENT ME! * * @param localServerName DOCUMENT ME! * @param userGroup DOCUMENT ME! * * @throws RemoteException DOCUMENT ME! */
DOCUMENT ME
unregisterUserGroup
{ "repo_name": "cismet/cids-server", "path": "src/main/java/Sirius/server/registry/Registry.java", "license": "lgpl-3.0", "size": 39621 }
[ "java.rmi.RemoteException", "org.openide.util.NbBundle" ]
import java.rmi.RemoteException; import org.openide.util.NbBundle;
import java.rmi.*; import org.openide.util.*;
[ "java.rmi", "org.openide.util" ]
java.rmi; org.openide.util;
2,356,830
String compactMessage(String msg) { final UPCALogicImpl upcaLogic = new UPCALogicImpl(ChecksumMode.CP_AUTO); upcaLogic.validateMessage(msg); final String upca = upcaLogic.handleChecksum(msg, ChecksumMode.CP_AUTO); final byte numberSystem = extractNumberSystem(upca); if ((numb...
String compactMessage(String msg) { final UPCALogicImpl upcaLogic = new UPCALogicImpl(ChecksumMode.CP_AUTO); upcaLogic.validateMessage(msg); final String upca = upcaLogic.handleChecksum(msg, ChecksumMode.CP_AUTO); final byte numberSystem = extractNumberSystem(upca); if ((numberSystem != 0) && (numberSystem != 1)) { ret...
/** * Compacts an UPC-A message to an UPC-E message if possible. * * @param msg an UPC-A message * @return String the derived UPC-E message (with checksum), null if the * message is a valid UPC-A message but no UPC-E representation is possible */
Compacts an UPC-A message to an UPC-E message if possible
compactMessage
{ "repo_name": "mbhk/barcode4j", "path": "barcode4j-light/src/main/java/org/krysalis/barcode4j/impl/upcean/UPCELogicImpl.java", "license": "apache-2.0", "size": 12411 }
[ "java.util.logging.Level", "org.krysalis.barcode4j.ChecksumMode" ]
import java.util.logging.Level; import org.krysalis.barcode4j.ChecksumMode;
import java.util.logging.*; import org.krysalis.barcode4j.*;
[ "java.util", "org.krysalis.barcode4j" ]
java.util; org.krysalis.barcode4j;
2,881,708
public Paint getPositivePaint() { return this.positivePaint; }
Paint function() { return this.positivePaint; }
/** * Returns the paint used to highlight positive differences. * * @return The paint (never <code>null</code>). * * @see #setPositivePaint(Paint) */
Returns the paint used to highlight positive differences
getPositivePaint
{ "repo_name": "JSansalone/JFreeChart", "path": "source/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java", "license": "lgpl-2.1", "size": 48487 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,637,467
SubscriptionResponse addSubscription(ApiTypeWrapper apiTypeWrapper, String userId, int applicationId, String groupId) throws APIManagementException;
SubscriptionResponse addSubscription(ApiTypeWrapper apiTypeWrapper, String userId, int applicationId, String groupId) throws APIManagementException;
/** * Add new Subscriber with GroupId * * @param apiTypeWrapper APIIdentifier * @param userId id of the user * @param applicationId Application Id * @param groupId GroupId of user * @return SubscriptionResponse subscription response object * @throws APIManagementE...
Add new Subscriber with GroupId
addSubscription
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIConsumer.java", "license": "apache-2.0", "size": 41368 }
[ "org.wso2.carbon.apimgt.api.model.ApiTypeWrapper", "org.wso2.carbon.apimgt.api.model.SubscriptionResponse" ]
import org.wso2.carbon.apimgt.api.model.ApiTypeWrapper; import org.wso2.carbon.apimgt.api.model.SubscriptionResponse;
import org.wso2.carbon.apimgt.api.model.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,988,287
public static ByteBuffer putModifiedUtf8(ByteBuffer dest, String orig) throws BufferOverflowException { final char[] chars = orig.toCharArray(); for (char c : chars) { if (c > 0 && c <= 0x7f) { dest.put((byte) c); } else if (c <= 0x07ff) { dest...
static ByteBuffer function(ByteBuffer dest, String orig) throws BufferOverflowException { final char[] chars = orig.toCharArray(); for (char c : chars) { if (c > 0 && c <= 0x7f) { dest.put((byte) c); } else if (c <= 0x07ff) { dest.put((byte)(0xc0 0x1f & c >> 6)); dest.put((byte)(0x80 0x3f & c)); } else { dest.put((byte...
/** * Put the string into the byte buffer, encoding it using "modified UTF-8" encoding. * * @param dest the byte buffer * @param orig the source bytes * @return the byte buffer * @throws BufferOverflowException if there is not enough space in the buffer for the complete string * @see ...
Put the string into the byte buffer, encoding it using "modified UTF-8" encoding
putModifiedUtf8
{ "repo_name": "stuartwdouglas/xnio", "path": "api/src/main/java/org/xnio/Buffers.java", "license": "apache-2.0", "size": 86113 }
[ "java.nio.BufferOverflowException", "java.nio.BufferUnderflowException", "java.nio.ByteBuffer" ]
import java.nio.BufferOverflowException; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
864,596
public BytesReference source() { return source; }
BytesReference function() { return source; }
/** * The mapping source definition. */
The mapping source definition
source
{ "repo_name": "gingerwizard/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/indices/PutMappingRequest.java", "license": "apache-2.0", "size": 4907 }
[ "org.elasticsearch.common.bytes.BytesReference" ]
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.bytes.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,436,359
public static <V> ListenableFuture<V> sendMessage(final ZKClient zkClient, String messagePathPrefix, Message message, final V completionResult) { SettableFuture<V> result = SettableFuture.create(); sendMessage(zkClient, messagePathPrefix, message, result, co...
static <V> ListenableFuture<V> function(final ZKClient zkClient, String messagePathPrefix, Message message, final V completionResult) { SettableFuture<V> result = SettableFuture.create(); sendMessage(zkClient, messagePathPrefix, message, result, completionResult); return result; }
/** * Creates a message node in zookeeper. The message node created is a PERSISTENT_SEQUENTIAL node. * * @param zkClient The ZooKeeper client for interacting with ZooKeeper. * @param messagePathPrefix ZooKeeper path prefix for the message node. * @param message The {@link Message} object for the content ...
Creates a message node in zookeeper. The message node created is a PERSISTENT_SEQUENTIAL node
sendMessage
{ "repo_name": "cdapio/twill", "path": "twill-core/src/main/java/org/apache/twill/internal/ZKMessages.java", "license": "apache-2.0", "size": 4170 }
[ "com.google.common.util.concurrent.ListenableFuture", "com.google.common.util.concurrent.SettableFuture", "org.apache.twill.internal.state.Message", "org.apache.twill.zookeeper.ZKClient" ]
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import org.apache.twill.internal.state.Message; import org.apache.twill.zookeeper.ZKClient;
import com.google.common.util.concurrent.*; import org.apache.twill.internal.state.*; import org.apache.twill.zookeeper.*;
[ "com.google.common", "org.apache.twill" ]
com.google.common; org.apache.twill;
1,285,908
public Observable<ServiceResponse<Page<P2SVpnGatewayInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<P2SVpnGatewayInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Lists all the P2SVpnGateways in a subscription. * ServiceResponse<PageImpl<P2SVpnGatewayInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;P2S...
Lists all the P2SVpnGateways in a subscription
listNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/P2sVpnGatewaysInner.java", "license": "mit", "size": 129361 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,888,994
public ItemHelperIfc getItemHelperInstance(int versionCode) { switch (versionCode) { case QTIVersion.VERSION_1_2: return new ItemHelper12Impl();// very specific code for v 1.2 case QTIVersion.VERSION_2_0: return new ItemHelper20Impl();// very specific code for v 2.0 (stubbed) ...
ItemHelperIfc function(int versionCode) { switch (versionCode) { case QTIVersion.VERSION_1_2: return new ItemHelper12Impl(); case QTIVersion.VERSION_2_0: return new ItemHelper20Impl(); default: throw new IllegalArgumentException( VERSION_SUPPORTED_STRING); } }
/** * Factory method. ItemHelperIfc. * @param versionCode supported: QTIVersion.VERSION_1_2, QTIVersion.VERSION_2_0 * @return ItemHelperIfc */
Factory method. ItemHelperIfc
getItemHelperInstance
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/helper/QTIHelperFactory.java", "license": "apache-2.0", "size": 4221 }
[ "org.sakaiproject.tool.assessment.qti.constants.QTIVersion", "org.sakaiproject.tool.assessment.qti.helper.item.ItemHelper12Impl", "org.sakaiproject.tool.assessment.qti.helper.item.ItemHelper20Impl", "org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperIfc" ]
import org.sakaiproject.tool.assessment.qti.constants.QTIVersion; import org.sakaiproject.tool.assessment.qti.helper.item.ItemHelper12Impl; import org.sakaiproject.tool.assessment.qti.helper.item.ItemHelper20Impl; import org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperIfc;
import org.sakaiproject.tool.assessment.qti.constants.*; import org.sakaiproject.tool.assessment.qti.helper.item.*;
[ "org.sakaiproject.tool" ]
org.sakaiproject.tool;
2,169,765
@FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.Currency) public Currency getCurrency() { return currency; }
@FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.Currency) Currency function() { return currency; }
/** * Message field getter. * @return field value */
Message field getter
getCurrency
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/SecurityStatusRequestMsg.java", "license": "gpl-3.0", "size": 43886 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.Currency", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.Currency; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
166,022
public static MozuClient<com.mozu.api.contracts.location.Location> updateLocationClient(com.mozu.api.contracts.location.Location location, String locationCode) throws Exception { return updateLocationClient( location, locationCode, null); }
static MozuClient<com.mozu.api.contracts.location.Location> function(com.mozu.api.contracts.location.Location location, String locationCode) throws Exception { return updateLocationClient( location, locationCode, null); }
/** * * <p><pre><code> * MozuClient<com.mozu.api.contracts.location.Location> mozuClient=UpdateLocationClient( location, locationCode); * client.setBaseAddress(url); * client.executeRequest(); * Location location = client.Result(); * </code></pre></p> * @param locationCode The unique, user-def...
<code><code> MozuClient mozuClient=UpdateLocationClient( location, locationCode); client.setBaseAddress(url); client.executeRequest(); Location location = client.Result(); </code></code>
updateLocationClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/admin/LocationClient.java", "license": "mit", "size": 11864 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
263,642
void report(Log log, int pos, Type site, Name name, List argtypes) { AmbiguityError pair = this; while (true) { if (pair.sym1.kind == AMBIGUOUS) pair = (AmbiguityError) pair.sym1; else if (pair.sym2.kind == AMBIGUOUS) pair = (AmbiguityError) pair.sym2; else break; } Name snam...
void report(Log log, int pos, Type site, Name name, List argtypes) { AmbiguityError pair = this; while (true) { if (pair.sym1.kind == AMBIGUOUS) pair = (AmbiguityError) pair.sym1; else if (pair.sym2.kind == AMBIGUOUS) pair = (AmbiguityError) pair.sym2; else break; } Name sname = pair.sym1.name; if (sname == sname.table...
/** * Report error. * * @param log * The error log to be used for error reporting. * @param pos * The position to be used for error reporting. * @param site * The original type from where the selection took place. * @param name * The name of the...
Report error
report
{ "repo_name": "nileshpatelksy/hello-pod-cast", "path": "archive/FILE/Compiler/java_GJC1.42_src/src/com/sun/tools/javac/v8/comp/Resolve.java", "license": "apache-2.0", "size": 42456 }
[ "com.sun.tools.javac.v8.code.Type", "com.sun.tools.javac.v8.util.List", "com.sun.tools.javac.v8.util.Log", "com.sun.tools.javac.v8.util.Name" ]
import com.sun.tools.javac.v8.code.Type; import com.sun.tools.javac.v8.util.List; import com.sun.tools.javac.v8.util.Log; import com.sun.tools.javac.v8.util.Name;
import com.sun.tools.javac.v8.code.*; import com.sun.tools.javac.v8.util.*;
[ "com.sun.tools" ]
com.sun.tools;
2,693,618
private void assignReplicasToPartitions(String topic, int partition) { List<Integer> assignedReplicas = GuiceDI.getInstance(ZkUtils.class).getReplicasForPartition(topic, partition); controllerContext.partitionReplicaAssignment.putAll(new TopicAndPartition(topic, partition), assignedReplicas); }
void function(String topic, int partition) { List<Integer> assignedReplicas = GuiceDI.getInstance(ZkUtils.class).getReplicasForPartition(topic, partition); controllerContext.partitionReplicaAssignment.putAll(new TopicAndPartition(topic, partition), assignedReplicas); }
/** * Invoked on the NonExistentPartition->NewPartition state transition to update the controller's cache with the * partition's replica assignment. * * @param topic The topic of the partition whose replica assignment is to be cached * @param partition The partition whose replica assignment...
Invoked on the NonExistentPartition->NewPartition state transition to update the controller's cache with the partition's replica assignment
assignReplicasToPartitions
{ "repo_name": "lemonJun/Jkafka", "path": "jkafka-core/src/main/java/kafka/controller/PartitionStateMachine.java", "license": "apache-2.0", "size": 28881 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,390,693
public void deletePbPositioningOtherInfo(Long positioningOtherOid) throws ServiceException; public void deletePbPositioningOtherInfoByIds(List<Long> positioningOtherOids) throws ServiceException; public List<PbPositioningOtherInfoDTO> listPbPositioningOtherInfoByPersonOid(Long personOid) throws ServiceExcep...
void deletePbPositioningOtherInfo(Long positioningOtherOid) throws ServiceException; public void deletePbPositioningOtherInfoByIds(List<Long> positioningOtherOids) throws ServiceException; public List<PbPositioningOtherInfoDTO> function(Long personOid) throws ServiceException;
/** * list PbPositioningOtherInfo obj * @param personOid * @return * @throws ServiceException */
list PbPositioningOtherInfo obj
listPbPositioningOtherInfoByPersonOid
{ "repo_name": "meijmOrg/Repo-test", "path": "freelance-hr-res/src/java/com/yh/hr/res/pb/service/PbPositioningOtherInfoService.java", "license": "gpl-2.0", "size": 1919 }
[ "com.yh.hr.res.pb.dto.PbPositioningOtherInfoDTO", "com.yh.platform.core.exception.ServiceException", "java.util.List" ]
import com.yh.hr.res.pb.dto.PbPositioningOtherInfoDTO; import com.yh.platform.core.exception.ServiceException; import java.util.List;
import com.yh.hr.res.pb.dto.*; import com.yh.platform.core.exception.*; import java.util.*;
[ "com.yh.hr", "com.yh.platform", "java.util" ]
com.yh.hr; com.yh.platform; java.util;
1,334,547
EReference getNode_OutArcs();
EReference getNode_OutArcs();
/** * Returns the meta object for the reference list '{@link fr.lip6.move.pnml.ptnet.Node#getOutArcs <em>Out Arcs</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Out Arcs</em>'. * @see fr.lip6.move.pnml.ptnet.Node#getOutArcs() * @see #getNode()...
Returns the meta object for the reference list '<code>fr.lip6.move.pnml.ptnet.Node#getOutArcs Out Arcs</code>'.
getNode_OutArcs
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PTNet/src/fr/lip6/move/pnml/ptnet/PtnetPackage.java", "license": "epl-1.0", "size": 146931 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,556,541
private void readProcCpuInfoFile() { // This directory needs to be read only once if (readCpuInfoFile) { return; } // Read "/proc/cpuinfo" file BufferedReader in = null; FileReader fReader = null; try { fReader = new FileReader(procfsCpuFile); in = new BufferedReader(fRea...
void function() { if (readCpuInfoFile) { return; } BufferedReader in = null; FileReader fReader = null; try { fReader = new FileReader(procfsCpuFile); in = new BufferedReader(fReader); } catch (FileNotFoundException f) { return; } Matcher mat = null; try { numProcessors = 0; String str = in.readLine(); while (str != nu...
/** * Read /proc/cpuinfo, parse and calculate CPU information */
Read /proc/cpuinfo, parse and calculate CPU information
readProcCpuInfoFile
{ "repo_name": "jayantgolhar/Hadoop-0.21.0", "path": "mapred/src/java/org/apache/hadoop/mapreduce/util/LinuxResourceCalculatorPlugin.java", "license": "apache-2.0", "size": 12695 }
[ "java.io.BufferedReader", "java.io.FileNotFoundException", "java.io.FileReader", "java.io.IOException", "java.util.regex.Matcher" ]
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.regex.Matcher;
import java.io.*; import java.util.regex.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,137,347
private Object logger(final Method method, final String name) { final Object source; if (name.isEmpty()) { source = method.getDeclaringClass(); } else { source = name; } return source; }
Object function(final Method method, final String name) { final Object source; if (name.isEmpty()) { source = method.getDeclaringClass(); } else { source = name; } return source; }
/** * Get the destination logger for this method. * @param method The method * @param name The Loggable annotation * @return The logger that will be used */
Get the destination logger for this method
logger
{ "repo_name": "shelan/jcabi-aspects", "path": "src/main/java/com/jcabi/aspects/aj/MethodLogger.java", "license": "bsd-3-clause", "size": 16706 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,667,613
public static String generateTag() { return new SB() .a(LEFT_PART[new Random().nextInt(LEFT_PART.length)]) .a('_') .a(RIGHT_PART[new Random().nextInt(RIGHT_PART.length)]).toString(); }
static String function() { return new SB() .a(LEFT_PART[new Random().nextInt(LEFT_PART.length)]) .a('_') .a(RIGHT_PART[new Random().nextInt(RIGHT_PART.length)]).toString(); }
/** * Generates cluster tag. * * @return String to use as default cluster tag. */
Generates cluster tag
generateTag
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterTagGenerator.java", "license": "apache-2.0", "size": 54711 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,884,840
public void positioningBackground() { ImageView background = (ImageView) findViewById(R.id.background); RelativeLayout.LayoutParams paramsBackground = (RelativeLayout.LayoutParams) background.getLayoutParams(); if (!modeMiniature) { paramsBackground.addRule(RelativeLayout.CENTER_IN_PARENT, Rela...
void function() { ImageView background = (ImageView) findViewById(R.id.background); RelativeLayout.LayoutParams paramsBackground = (RelativeLayout.LayoutParams) background.getLayoutParams(); if (!modeMiniature) { paramsBackground.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE); paramsBackground.addRule(Re...
/** * Handle the position of the background */
Handle the position of the background
positioningBackground
{ "repo_name": "popovicsandras/customCamera", "path": "src/android/customCamera/src/org/geneanet/customcamera/CameraActivity.java", "license": "bsd-3-clause", "size": 38304 }
[ "android.content.res.Resources", "android.graphics.drawable.BitmapDrawable", "android.view.ViewGroup", "android.widget.ImageView", "android.widget.RelativeLayout" ]
import android.content.res.Resources; import android.graphics.drawable.BitmapDrawable; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout;
import android.content.res.*; import android.graphics.drawable.*; import android.view.*; import android.widget.*;
[ "android.content", "android.graphics", "android.view", "android.widget" ]
android.content; android.graphics; android.view; android.widget;
2,433,677
public void onUpgrade(SQLiteDatabase database, int versaoAntiga, int versaoNova) { // Definicao do comando para destruir a tabela Aluno String sql = "DROP TABLE IF EXISTS " + TABELA; // Execucao do comando de destruicao database.execSQL(sql); Log.i(TAG, "Tabela excluida: " + TABELA); // Chamada ao ...
void function(SQLiteDatabase database, int versaoAntiga, int versaoNova) { String sql = STR + TABELA; database.execSQL(sql); Log.i(TAG, STR + TABELA); onCreate(database); }
/** * Metodo responsavel pela atualizacao das estrutura das tableas * */
Metodo responsavel pela atualizacao das estrutura das tableas
onUpgrade
{ "repo_name": "marciopalheta/cursosandroid", "path": "CadastroAluno/src/br/com/cursoandroid/cadastroaluno/modelo/dao/AlunoDAO.java", "license": "gpl-2.0", "size": 5333 }
[ "android.database.sqlite.SQLiteDatabase", "android.util.Log" ]
import android.database.sqlite.SQLiteDatabase; import android.util.Log;
import android.database.sqlite.*; import android.util.*;
[ "android.database", "android.util" ]
android.database; android.util;
969,535
@RequestMapping(value = "/published", method = RequestMethod.GET, produces = { "text/html" }) @ResponseBody public ModelAndView listPublishedHtml() throws IOException { final ModelMap model = new ModelMap(); model.addAttribute("result", this.listPublished()); return new ModelAndView(...
@RequestMapping(value = STR, method = RequestMethod.GET, produces = { STR }) ModelAndView function() throws IOException { final ModelMap model = new ModelMap(); model.addAttribute(STR, this.listPublished()); return new ModelAndView(STR, model); }
/** * Controller method for a retrieving a HTML view using a HTTP GET containing a list of * {@link net.objecthunter .larch.model.Entity}s * * @return a Spring MVC {@link org.springframework.web.servlet.ModelAndView} for rendering the HTML view */
Controller method for a retrieving a HTML view using a HTTP GET containing a list of <code>net.objecthunter .larch.model.Entity</code>s
listPublishedHtml
{ "repo_name": "fasseg/larch", "path": "larch-server/src/main/java/net/objecthunter/larch/controller/ListController.java", "license": "apache-2.0", "size": 3846 }
[ "java.io.IOException", "org.springframework.ui.ModelMap", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.servlet.ModelAndView" ]
import java.io.IOException; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView;
import java.io.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "java.io", "org.springframework.ui", "org.springframework.web" ]
java.io; org.springframework.ui; org.springframework.web;
2,658,310
public double getMean() { if (mean == meanImpl) { return new Mean(secondMoment).getResult(); } else { return meanImpl.getResult(); } }
double function() { if (mean == meanImpl) { return new Mean(secondMoment).getResult(); } else { return meanImpl.getResult(); } }
/** * Returns the mean of the values that have been added. * <p> * Double.NaN is returned if no values have been added. * </p> * @return the mean */
Returns the mean of the values that have been added. Double.NaN is returned if no values have been added.
getMean
{ "repo_name": "SpoonLabs/astor", "path": "examples/Math-issue-288/src/main/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java", "license": "gpl-2.0", "size": 24923 }
[ "org.apache.commons.math.stat.descriptive.moment.Mean" ]
import org.apache.commons.math.stat.descriptive.moment.Mean;
import org.apache.commons.math.stat.descriptive.moment.*;
[ "org.apache.commons" ]
org.apache.commons;
1,199,224
public Optional<LinuxSettings> getLinuxSettings() { return this.linuxSettings; }
Optional<LinuxSettings> function() { return this.linuxSettings; }
/** * Settings for creating a Linux VM. Will only be set if this is a * {@link VmSpec} for a Linux VM. * * @return */
Settings for creating a Linux VM. Will only be set if this is a <code>VmSpec</code> for a Linux VM
getLinuxSettings
{ "repo_name": "elastisys/scale.cloudpool", "path": "azure/src/main/java/com/elastisys/scale/cloudpool/azure/driver/client/VmSpec.java", "license": "apache-2.0", "size": 7963 }
[ "com.elastisys.scale.cloudpool.azure.driver.config.LinuxSettings", "java.util.Optional" ]
import com.elastisys.scale.cloudpool.azure.driver.config.LinuxSettings; import java.util.Optional;
import com.elastisys.scale.cloudpool.azure.driver.config.*; import java.util.*;
[ "com.elastisys.scale", "java.util" ]
com.elastisys.scale; java.util;
1,774,619
@SuppressWarnings("unchecked") public Delete addDeleteMarker(Cell kv) throws IOException { // TODO: Deprecate and rename 'add' so it matches how we add KVs to Puts. if (!CellUtil.isDelete(kv)) { throw new IOException("The recently added KeyValue is not of type " + "delete. Rowkey: " + Bytes....
@SuppressWarnings(STR) Delete function(Cell kv) throws IOException { if (!CellUtil.isDelete(kv)) { throw new IOException(STR + STR + Bytes.toStringBinary(this.row)); } if (Bytes.compareTo(this.row, 0, row.length, kv.getRowArray(), kv.getRowOffset(), kv.getRowLength()) != 0) { throw new WrongRowIOException(STR + kv.toSt...
/** * Advanced use only. * Add an existing delete marker to this Delete object. * @param kv An existing KeyValue of type "delete". * @return this for invocation chaining * @throws IOException */
Advanced use only. Add an existing delete marker to this Delete object
addDeleteMarker
{ "repo_name": "grokcoder/pbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java", "license": "apache-2.0", "size": 16427 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.CellUtil", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,007,219
public final WebApplicationContext getWebApplicationContext() { return this.webApplicationContext; }
final WebApplicationContext function() { return this.webApplicationContext; }
/** * Return the current WebApplicationContext. */
Return the current WebApplicationContext
getWebApplicationContext
{ "repo_name": "ZJU-Shaonian-Biancheng-Tuan/bbossgroups-3.5", "path": "bboss-mvc/src/org/frameworkset/web/servlet/support/RequestContext.java", "license": "apache-2.0", "size": 34447 }
[ "org.frameworkset.web.servlet.context.WebApplicationContext" ]
import org.frameworkset.web.servlet.context.WebApplicationContext;
import org.frameworkset.web.servlet.context.*;
[ "org.frameworkset.web" ]
org.frameworkset.web;
1,324,583
protected IQueryComponentDescriptorFactory getQueryComponentDescriptorFactory() { return queryComponentDescriptorFactory; } private static class FilterComponentTracker implements PropertyChangeListener { private final FilterableBeanCollectionModule target; public FilterComponentTracker(Filtera...
IQueryComponentDescriptorFactory function() { return queryComponentDescriptorFactory; } private static class FilterComponentTracker implements PropertyChangeListener { private final FilterableBeanCollectionModule target; public FilterComponentTracker(FilterableBeanCollectionModule target) { this.target = target; } /** ...
/** * Gets the query component descriptor factory used to create the filter model * descriptor. * * @return the query component descriptor factory used to create the filter model descriptor. */
Gets the query component descriptor factory used to create the filter model descriptor
getQueryComponentDescriptorFactory
{ "repo_name": "jspresso/jspresso-ce", "path": "application/src/main/java/org/jspresso/framework/application/model/FilterableBeanCollectionModule.java", "license": "lgpl-3.0", "size": 33039 }
[ "java.beans.PropertyChangeListener", "org.jspresso.framework.model.descriptor.IQueryComponentDescriptorFactory" ]
import java.beans.PropertyChangeListener; import org.jspresso.framework.model.descriptor.IQueryComponentDescriptorFactory;
import java.beans.*; import org.jspresso.framework.model.descriptor.*;
[ "java.beans", "org.jspresso.framework" ]
java.beans; org.jspresso.framework;
2,035,258
public InetAddress getDccInetAddress() { return _dccInetAddress; }
InetAddress function() { return _dccInetAddress; }
/** * Returns the InetAddress used when sending DCC chat or file transfers. * If this is null, the default InetAddress will be used. * * @since PircBot 1.4.4 * * @return The current DCC InetAddress, or null if left as default. */
Returns the InetAddress used when sending DCC chat or file transfers. If this is null, the default InetAddress will be used
getDccInetAddress
{ "repo_name": "heriniaina/karajiandroid", "path": "application/src/org/jibble/pircbot/PircBot.java", "license": "gpl-3.0", "size": 123404 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
627,786
parameters = {"contextNodeRef", "xpath", "parameters", "namespacePrefixResolver", "followAllParentLinks"}, recordable = {true, true, true, false, true}) public List<Serializable> selectProperties(NodeRef contextNodeRef, String xpath, QueryParamet...
parameters = {STR, "xpath", STR, STR, STR}, recordable = {true, true, true, false, true}) List<Serializable> function(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks) throws InvalidNodeRefException, XPathException...
/** * Select properties using an xpath expression * * @param contextNodeRef - * the context node for relative expressions etc * @param xpath - * the xpath string to evaluate * @param parameters - * parameters to bind in to the xpath expre...
Select properties using an xpath expression
selectProperties
{ "repo_name": "Alfresco/community-edition", "path": "projects/data-model/source/java/org/alfresco/service/cmr/search/SearchService.java", "license": "lgpl-3.0", "size": 11511 }
[ "java.io.Serializable", "java.util.List", "org.alfresco.service.Auditable", "org.alfresco.service.cmr.repository.InvalidNodeRefException", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.cmr.repository.XPathException", "org.alfresco.service.namespace.NamespacePrefixResolver" ]
import java.io.Serializable; import java.util.List; import org.alfresco.service.Auditable; import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.XPathException; import org.alfresco.service.namespace.NamespacePre...
import java.io.*; import java.util.*; import org.alfresco.service.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "java.io", "java.util", "org.alfresco.service" ]
java.io; java.util; org.alfresco.service;
1,692,878
public static void logoutSubjectIdentifier(Connection c, String subjectIdentifier) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "session.logout_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {M...
static void function(Connection c, String subjectIdentifier) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; Map response = c.dispatch(metho...
/** * Log out all sessions associated to a user subject-identifier, except the session associated with the context calling this function * * @param subjectIdentifier User subject-identifier of the sessions to be destroyed */
Log out all sessions associated to a user subject-identifier, except the session associated with the context calling this function
logoutSubjectIdentifier
{ "repo_name": "guzy/OnceCenter", "path": "src/com/once/xenapi/Session.java", "license": "apache-2.0", "size": 25779 }
[ "com.once.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.once.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.once.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.once.xenapi", "java.util", "org.apache.xmlrpc" ]
com.once.xenapi; java.util; org.apache.xmlrpc;
1,890,394
public ArrayList<Long> serviceName_users_login_jobs_GET(String serviceName, String login) throws IOException { String qPath = "/sms/{serviceName}/users/{login}/jobs"; StringBuilder sb = path(qPath, serviceName, login); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t2); }
ArrayList<Long> function(String serviceName, String login) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, serviceName, login); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t2); }
/** * Sms in pending associated to the sms user * * REST: GET /sms/{serviceName}/users/{login}/jobs * @param serviceName [required] The internal name of your SMS offer * @param login [required] The sms user login */
Sms in pending associated to the sms user
serviceName_users_login_jobs_GET
{ "repo_name": "UrielCh/ovh-java-sdk", "path": "ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java", "license": "bsd-3-clause", "size": 76622 }
[ "java.io.IOException", "java.util.ArrayList" ]
import java.io.IOException; import java.util.ArrayList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
452,792
public List<ValidationMessage> getErrors() { return errors; }
List<ValidationMessage> function() { return errors; }
/** * The errors. * * @return The errors. */
The errors
getErrors
{ "repo_name": "garyhodgson/enunciate", "path": "core/src/main/java/org/codehaus/enunciate/contract/validation/ValidationResult.java", "license": "apache-2.0", "size": 6666 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,476,365
private List<String> getChildren(String path) throws Exception { try { return zkClient.getChildren(path).get(TIMEOUT_SECONDS, TimeUnit.SECONDS).getChildren(); } catch (ExecutionException e) { if (e.getCause() instanceof KeeperException.NoNodeException) { // If the node doesn't ...
List<String> function(String path) throws Exception { try { return zkClient.getChildren(path).get(TIMEOUT_SECONDS, TimeUnit.SECONDS).getChildren(); } catch (ExecutionException e) { if (e.getCause() instanceof KeeperException.NoNodeException) { return Collections.emptyList(); } throw e; } } }
/** * Returns the list of children node under the given path. * * @param path path to get children * @return the list of children or empty list if the path doesn't exist. * @throws Exception if failed to get children */
Returns the list of children node under the given path
getChildren
{ "repo_name": "serranom/twill", "path": "twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterMain.java", "license": "apache-2.0", "size": 14120 }
[ "java.util.Collections", "java.util.List", "java.util.concurrent.ExecutionException", "java.util.concurrent.TimeUnit", "org.apache.zookeeper.KeeperException" ]
import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import org.apache.zookeeper.KeeperException;
import java.util.*; import java.util.concurrent.*; import org.apache.zookeeper.*;
[ "java.util", "org.apache.zookeeper" ]
java.util; org.apache.zookeeper;
915,325
@Override public void get(Signal[] output, int outputLength) { Calendar calendar = Calendar.getInstance(); out(0, SignalUtils.getSignal((double)calendar.get(Calendar.SECOND)), output, outputLength); out(1, SignalUtils.getSignal((double)calendar.get(Calendar.MINUTE)), output, outputLength); out(2,...
void function(Signal[] output, int outputLength) { Calendar calendar = Calendar.getInstance(); out(0, SignalUtils.getSignal((double)calendar.get(Calendar.SECOND)), output, outputLength); out(1, SignalUtils.getSignal((double)calendar.get(Calendar.MINUTE)), output, outputLength); out(2, SignalUtils.getSignal((double)cale...
/** * Returns actual local system time. It returns an array of size * six with following meaning: * <ol> * <li value="0"> second * <li> minute * <li> hour * <li> day * <li> month * <li> year * </ol> * */
Returns actual local system time. It returns an array of size six with following meaning: second minute hour day month year
get
{ "repo_name": "jilm/control4j", "path": "src/cz/control4j/modules/auxiliary/OMClock.java", "license": "lgpl-3.0", "size": 2267 }
[ "cz.control4j.Signal", "cz.control4j.SignalUtils", "java.util.Calendar" ]
import cz.control4j.Signal; import cz.control4j.SignalUtils; import java.util.Calendar;
import cz.control4j.*; import java.util.*;
[ "cz.control4j", "java.util" ]
cz.control4j; java.util;
2,659,990