method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void authenticate(Context context, String consumerKey, String consumerSecret, AuthProviderInfo authProviderInfo, SocializeAuthListener authListener);
| void function(Context context, String consumerKey, String consumerSecret, AuthProviderInfo authProviderInfo, SocializeAuthListener authListener); | /**
* Authenticates the application against the API.
* @param context The current context.
* @param consumerKey The consumer key, obtained from registration at http://www.getsocialize.com.
* @param consumerSecret The consumer secret, obtained from registration at http://www.getsocialize.com.
* @param authProv... | Authenticates the application against the API | authenticate | {
"repo_name": "dylanmaryk/InsanityRadio-Android",
"path": "socialize/src/com/socialize/SocializeService.java",
"license": "mit",
"size": 12949
} | [
"android.content.Context",
"com.socialize.auth.AuthProviderInfo",
"com.socialize.listener.SocializeAuthListener"
] | import android.content.Context; import com.socialize.auth.AuthProviderInfo; import com.socialize.listener.SocializeAuthListener; | import android.content.*; import com.socialize.auth.*; import com.socialize.listener.*; | [
"android.content",
"com.socialize.auth",
"com.socialize.listener"
] | android.content; com.socialize.auth; com.socialize.listener; | 1,229,666 |
public static <T extends AddsToRuleKey> void recordOutputs(
BuildableContext buildableContext, OutputPathResolver outputPathResolver, T buildable) {
recordOutputs(
buildableContext,
outputPathResolver,
DefaultClassInfoFactory.forInstance(buildable),
buildable);
} | static <T extends AddsToRuleKey> void function( BuildableContext buildableContext, OutputPathResolver outputPathResolver, T buildable) { recordOutputs( buildableContext, outputPathResolver, DefaultClassInfoFactory.forInstance(buildable), buildable); } | /**
* Records the outputs of this buildrule. An output will only be recorded once (i.e. no duplicates
* and if a directory is recorded, none of its contents will be).
*/ | Records the outputs of this buildrule. An output will only be recorded once (i.e. no duplicates and if a directory is recorded, none of its contents will be) | recordOutputs | {
"repo_name": "facebook/buck",
"path": "src/com/facebook/buck/rules/modern/ModernBuildRule.java",
"license": "apache-2.0",
"size": 18620
} | [
"com.facebook.buck.core.build.buildable.context.BuildableContext",
"com.facebook.buck.core.rulekey.AddsToRuleKey",
"com.facebook.buck.rules.modern.impl.DefaultClassInfoFactory"
] | import com.facebook.buck.core.build.buildable.context.BuildableContext; import com.facebook.buck.core.rulekey.AddsToRuleKey; import com.facebook.buck.rules.modern.impl.DefaultClassInfoFactory; | import com.facebook.buck.core.build.buildable.context.*; import com.facebook.buck.core.rulekey.*; import com.facebook.buck.rules.modern.impl.*; | [
"com.facebook.buck"
] | com.facebook.buck; | 777,886 |
public static boolean validateAttributeName(String attributeName) {
Pattern p = Pattern.compile("^[a-zA-Z_].[-a-zA-Z0-9_]*$");
Matcher m = p.matcher(attributeName);
boolean a = m.find();
return a;
} | static boolean function(String attributeName) { Pattern p = Pattern.compile(STR); Matcher m = p.matcher(attributeName); boolean a = m.find(); return a; } | /**
* Attribute Name validation: This is done here since we want to validate attribute names entered in quick fix as
* well.
*
* @param attributeName is the attribute name which is being validated
* @return a : true if the name is valid and false if its invalid
*/ | Attribute Name validation: This is done here since we want to validate attribute names entered in quick fix as well | validateAttributeName | {
"repo_name": "DebalinaDey/AuraDevelopDeb",
"path": "aura-util/src/main/java/org/auraframework/util/AuraTextUtil.java",
"license": "apache-2.0",
"size": 28322
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,192,550 |
public final void startNewOutput(PageBuilderStatus status, int expectedEntries)
{
for (int i = 0; i < getChannelCount(); i++) {
unnestBlockBuilders[i].startNewOutput(status, expectedEntries);
}
} | final void function(PageBuilderStatus status, int expectedEntries) { for (int i = 0; i < getChannelCount(); i++) { unnestBlockBuilders[i].startNewOutput(status, expectedEntries); } } | /**
* Prepare for a new output page
*/ | Prepare for a new output page | startNewOutput | {
"repo_name": "wyukawa/presto",
"path": "presto-main/src/main/java/io/prestosql/operator/unnest/Unnester.java",
"license": "apache-2.0",
"size": 4136
} | [
"io.prestosql.spi.block.PageBuilderStatus"
] | import io.prestosql.spi.block.PageBuilderStatus; | import io.prestosql.spi.block.*; | [
"io.prestosql.spi"
] | io.prestosql.spi; | 1,576,986 |
List<HtmlData> htmlDataList = new ArrayList<HtmlData>();
boolean hasModifyPermission = getKcNotificationAuthorizationService().hasPermission(PermissionConstants.MODIFY_NOTIFICATION);
if (hasModifyPermission) {
AnchorHtmlData editHtmlData = getUrlData(businessObject, KRADConstants.MAINTENANCE... | List<HtmlData> htmlDataList = new ArrayList<HtmlData>(); boolean hasModifyPermission = getKcNotificationAuthorizationService().hasPermission(PermissionConstants.MODIFY_NOTIFICATION); if (hasModifyPermission) { AnchorHtmlData editHtmlData = getUrlData(businessObject, KRADConstants.MAINTENANCE_EDIT_METHOD_TO_CALL, pkName... | /**
* Only display edit, copy and view links for the Questions if proper permission is given.
* @see org.kuali.rice.kns.lookup.AbstractLookupableHelperServiceImpl#getCustomActionUrls(org.kuali.rice.kns.bo.BusinessObject, java.util.List)
*/ | Only display edit, copy and view links for the Questions if proper permission is given | getCustomActionUrls | {
"repo_name": "sanjupolus/kc-coeus-1508.3",
"path": "coeus-impl/src/main/java/org/kuali/coeus/common/notification/impl/NotificationLookupableHelperServiceImpl.java",
"license": "agpl-3.0",
"size": 2609
} | [
"java.util.ArrayList",
"java.util.List",
"org.kuali.kra.infrastructure.PermissionConstants",
"org.kuali.rice.kns.lookup.HtmlData",
"org.kuali.rice.krad.util.KRADConstants"
] | import java.util.ArrayList; import java.util.List; import org.kuali.kra.infrastructure.PermissionConstants; import org.kuali.rice.kns.lookup.HtmlData; import org.kuali.rice.krad.util.KRADConstants; | import java.util.*; import org.kuali.kra.infrastructure.*; import org.kuali.rice.kns.lookup.*; import org.kuali.rice.krad.util.*; | [
"java.util",
"org.kuali.kra",
"org.kuali.rice"
] | java.util; org.kuali.kra; org.kuali.rice; | 2,482,051 |
@Override
public Optional<String> readFirstLine(Path path) {
List<String> lines;
try {
lines = readLines(path);
} catch (IOException e) {
return Optional.absent();
}
return Optional.fromNullable(Iterables.get(lines, 0, null));
} | Optional<String> function(Path path) { List<String> lines; try { lines = readLines(path); } catch (IOException e) { return Optional.absent(); } return Optional.fromNullable(Iterables.get(lines, 0, null)); } | /**
* Does not support symlinks.
*/ | Does not support symlinks | readFirstLine | {
"repo_name": "dushmis/buck",
"path": "test/com/facebook/buck/testutil/FakeProjectFilesystem.java",
"license": "apache-2.0",
"size": 21762
} | [
"com.google.common.base.Optional",
"com.google.common.collect.Iterables",
"java.io.IOException",
"java.nio.file.Path",
"java.util.List"
] | import com.google.common.base.Optional; import com.google.common.collect.Iterables; import java.io.IOException; import java.nio.file.Path; import java.util.List; | import com.google.common.base.*; import com.google.common.collect.*; import java.io.*; import java.nio.file.*; import java.util.*; | [
"com.google.common",
"java.io",
"java.nio",
"java.util"
] | com.google.common; java.io; java.nio; java.util; | 2,253,635 |
public void setupPaths() {
ensureSource();
templatesPath = setupRequiredFolderFromConfig(Keys.TEMPLATE_FOLDER);
contentsPath = setupRequiredFolderFromConfig(Keys.CONTENT_FOLDER);
assetsPath = setupPathFromConfig(Keys.ASSET_FOLDER);
if (!assetsPath.exists()) {
LOGGER.warn("No asset fold... | void function() { ensureSource(); templatesPath = setupRequiredFolderFromConfig(Keys.TEMPLATE_FOLDER); contentsPath = setupRequiredFolderFromConfig(Keys.CONTENT_FOLDER); assetsPath = setupPathFromConfig(Keys.ASSET_FOLDER); if (!assetsPath.exists()) { LOGGER.warn(STR); } ensureDestination(); } | /**
* Checks source path contains required sub-folders (i.e. templates) and setups up variables for them.
*
* @throws JBakeException If template or contents folder don't exist
*/ | Checks source path contains required sub-folders (i.e. templates) and setups up variables for them | setupPaths | {
"repo_name": "leonac/jbake",
"path": "src/main/java/org/jbake/app/Oven.java",
"license": "mit",
"size": 10190
} | [
"org.jbake.app.ConfigUtil"
] | import org.jbake.app.ConfigUtil; | import org.jbake.app.*; | [
"org.jbake.app"
] | org.jbake.app; | 156,440 |
Set<String> listMetaStoreEntries(String storeName, String prefix)
throws IOException;
| Set<String> listMetaStoreEntries(String storeName, String prefix) throws IOException; | /**
* Get a list of all named entries starting with the given prefix
*
* @param storeName the name of the store to get entries for
* @param prefix the prefix with which to search for entries
* @return a list of entries
* @throws IOException if a problem occurs
*/ | Get a list of all named entries starting with the given prefix | listMetaStoreEntries | {
"repo_name": "runqingz/umple",
"path": "Umplificator/UmplifiedProjects/weka-umplified-0/src/main/java/weka/gui/beans/KFMetaStore.java",
"license": "mit",
"size": 3334
} | [
"java.io.IOException",
"java.util.Set"
] | import java.io.IOException; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 568,273 |
@Override
public int compare(String file0, String file1) {
Matcher m0 = pattern.matcher(file0);
Matcher m1 = pattern.matcher(file1);
if (!m0.matches()) {
Log.w(TAG, "could not parse upgrade script file: " + file0);
throw new SQLiteAssetException("Invalid upgrade scri... | int function(String file0, String file1) { Matcher m0 = pattern.matcher(file0); Matcher m1 = pattern.matcher(file1); if (!m0.matches()) { Log.w(TAG, STR + file0); throw new SQLiteAssetException(STR); } if (!m1.matches()) { Log.w(TAG, STR + file1); throw new SQLiteAssetException(STR); } int v0_from = Integer.valueOf(m0.... | /**
* Compares the two specified upgrade script strings to determine their
* relative ordering considering their two version numbers. Assumes all
* database names used are the same, as this function only compares the
* two version numbers.
*
* @param file0
* an upgrade scri... | Compares the two specified upgrade script strings to determine their relative ordering considering their two version numbers. Assumes all database names used are the same, as this function only compares the two version numbers | compare | {
"repo_name": "ming030890/Eng-Chi-Dictionary",
"path": "sqlite-assest-helper/src/main/java/com/readystatesoftware/sqliteasset/VersionComparator.java",
"license": "gpl-2.0",
"size": 2935
} | [
"android.util.Log",
"com.readystatesoftware.sqliteasset.SQLiteAssetHelper",
"java.util.regex.Matcher"
] | import android.util.Log; import com.readystatesoftware.sqliteasset.SQLiteAssetHelper; import java.util.regex.Matcher; | import android.util.*; import com.readystatesoftware.sqliteasset.*; import java.util.regex.*; | [
"android.util",
"com.readystatesoftware.sqliteasset",
"java.util"
] | android.util; com.readystatesoftware.sqliteasset; java.util; | 1,683,678 |
public String join(JsonArray ja, String separator) {
final int len = ja.size();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < len; i += 1) {
if (i > 0) {
sb.append(separator);
}
sb.append(valueToString(ja.get(i)));
}
... | String function(JsonArray ja, String separator) { final int len = ja.size(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < len; i += 1) { if (i > 0) { sb.append(separator); } sb.append(valueToString(ja.get(i))); } return sb.toString(); } | /**
* Make a string from the contents of this JSONArray. The
* <code>separator</code> string is inserted between each element.
* Warning: This method assumes that the data structure is acyclical.
* @param separator A string that will be inserted between the elements.
* @return a string.
* ... | Make a string from the contents of this JSONArray. The <code>separator</code> string is inserted between each element. Warning: This method assumes that the data structure is acyclical | join | {
"repo_name": "labertasch/sling",
"path": "bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/util/JsonRenderer.java",
"license": "apache-2.0",
"size": 16824
} | [
"javax.json.JsonArray"
] | import javax.json.JsonArray; | import javax.json.*; | [
"javax.json"
] | javax.json; | 1,520,139 |
@Override
public ORecordIteratorClusters<REC> begin() {
if (clusterIds.length == 0)
return this;
browsedRecords = 0;
currentClusterIdx = 0;
current.clusterId = clusterIds[currentClusterIdx];
updateClusterRange();
resetCurrentPosition();
nextPosition();
final O... | ORecordIteratorClusters<REC> function() { if (clusterIds.length == 0) return this; browsedRecords = 0; currentClusterIdx = 0; current.clusterId = clusterIds[currentClusterIdx]; updateClusterRange(); resetCurrentPosition(); nextPosition(); final ORecord record = getRecord(); currentRecord = readCurrentRecord(record, 0);... | /**
* Move the iterator to the begin of the range. If no range was specified move to the first record of the cluster.
*
* @return The object itself
*/ | Move the iterator to the begin of the range. If no range was specified move to the first record of the cluster | begin | {
"repo_name": "wouterv/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/iterator/ORecordIteratorClusters.java",
"license": "apache-2.0",
"size": 13131
} | [
"com.orientechnologies.orient.core.record.ORecord"
] | import com.orientechnologies.orient.core.record.ORecord; | import com.orientechnologies.orient.core.record.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 2,357,121 |
public float mapCoordInSelfToDescendent(View descendant, int[] coord) {
return Utilities.mapCoordInSelfToDescendent(descendant, this, coord);
} | float function(View descendant, int[] coord) { return Utilities.mapCoordInSelfToDescendent(descendant, this, coord); } | /**
* Inverse of {@link #getDescendantCoordRelativeToSelf(View, int[])}.
*/ | Inverse of <code>#getDescendantCoordRelativeToSelf(View, int[])</code> | mapCoordInSelfToDescendent | {
"repo_name": "Hapsidra/Chavah",
"path": "Chavah/src/main/java/com/android/chavah/DragLayer.java",
"license": "gpl-3.0",
"size": 37908
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,677,467 |
public static boolean channelHasPendingAsyncCloneJobs(Channel channel) {
return AsyncErrataCloneCounter.getInstance().channelHasPendingJobs(
channel.getId());
} | static boolean function(Channel channel) { return AsyncErrataCloneCounter.getInstance().channelHasPendingJobs( channel.getId()); } | /**
* Check if the channel has pending asynchronous errata clone jobs
* @param channel channel to check
* @return true if there are pending jobs, false otherwise
*/ | Check if the channel has pending asynchronous errata clone jobs | channelHasPendingAsyncCloneJobs | {
"repo_name": "Pajinek/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java",
"license": "gpl-2.0",
"size": 70020
} | [
"com.redhat.rhn.domain.channel.Channel"
] | import com.redhat.rhn.domain.channel.Channel; | import com.redhat.rhn.domain.channel.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 2,443,697 |
protected TalkService getTalkService() {
return this.talkService;
} | TalkService function() { return this.talkService; } | /**
* Getter for the talk service EJB.
*
* @return the talk service
*/ | Getter for the talk service EJB | getTalkService | {
"repo_name": "pd-nmoser/Conference",
"path": "com.prodyna.pac.conference/com.prodyna.pac.conference.rest/com.prodyna.pac.conference.rest.beans/src/main/java/com/prodyna/pac/conference/rest/beans/resource/TalkResourceBean.java",
"license": "mit",
"size": 2373
} | [
"com.prodyna.pac.conference.ejb.api.service.talk.TalkService"
] | import com.prodyna.pac.conference.ejb.api.service.talk.TalkService; | import com.prodyna.pac.conference.ejb.api.service.talk.*; | [
"com.prodyna.pac"
] | com.prodyna.pac; | 294,660 |
public List<GeneratorOutput> getGenerateOutput(Filer filer) throws IOException; | List<GeneratorOutput> function(Filer filer) throws IOException; | /**
* Returns the list of generated files derived from this Generator during the
* generate phase of annotation processing.
*/ | Returns the list of generated files derived from this Generator during the generate phase of annotation processing | getGenerateOutput | {
"repo_name": "moparisthebest/beehive",
"path": "beehive-controls/src/main/java/org/apache/beehive/controls/runtime/generator/Generator.java",
"license": "apache-2.0",
"size": 1989
} | [
"com.sun.mirror.apt.Filer",
"java.io.IOException",
"java.util.List"
] | import com.sun.mirror.apt.Filer; import java.io.IOException; import java.util.List; | import com.sun.mirror.apt.*; import java.io.*; import java.util.*; | [
"com.sun.mirror",
"java.io",
"java.util"
] | com.sun.mirror; java.io; java.util; | 2,625,327 |
public static List<Order> makeOrder(List<Item> selects) {
List<Order> orders = new ArrayList<>();
for (Item sel : selects) {
Order order = new Order(sel, SQLOrderingSpecification.ASC);
orders.add(order);
}
return orders;
} | static List<Order> function(List<Item> selects) { List<Order> orders = new ArrayList<>(); for (Item sel : selects) { Order order = new Order(sel, SQLOrderingSpecification.ASC); orders.add(order); } return orders; } | /**
* make order by from distinct
*
* @param selects selects
* @return order list
*/ | make order by from distinct | makeOrder | {
"repo_name": "actiontech/dble",
"path": "src/main/java/com/actiontech/dble/backend/mysql/nio/handler/util/HandlerTool.java",
"license": "gpl-2.0",
"size": 16715
} | [
"com.actiontech.dble.plan.Order",
"com.actiontech.dble.plan.common.item.Item",
"com.alibaba.druid.sql.ast.SQLOrderingSpecification",
"java.util.ArrayList",
"java.util.List"
] | import com.actiontech.dble.plan.Order; import com.actiontech.dble.plan.common.item.Item; import com.alibaba.druid.sql.ast.SQLOrderingSpecification; import java.util.ArrayList; import java.util.List; | import com.actiontech.dble.plan.*; import com.actiontech.dble.plan.common.item.*; import com.alibaba.druid.sql.ast.*; import java.util.*; | [
"com.actiontech.dble",
"com.alibaba.druid",
"java.util"
] | com.actiontech.dble; com.alibaba.druid; java.util; | 71,882 |
public FileSystemsSetPropertiesHeaders setDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
return this;
} | FileSystemsSetPropertiesHeaders function(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; } | /**
* Set the dateProperty property: The Date property.
*
* @param dateProperty the dateProperty value to set.
* @return the FileSystemsSetPropertiesHeaders object itself.
*/ | Set the dateProperty property: The Date property | setDateProperty | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemsSetPropertiesHeaders.java",
"license": "mit",
"size": 4416
} | [
"com.azure.core.util.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.azure.core.util.*; import java.time.*; | [
"com.azure.core",
"java.time"
] | com.azure.core; java.time; | 1,582,678 |
public void process(
final HttpResponse response,
final HttpContext context) throws HttpException, IOException {
HttpEntity entity = response.getEntity();
// It wasn't a 304 Not Modified response, 204 No Content or similar
if (entity != null) {
Hea... | void function( final HttpResponse response, final HttpContext context) throws HttpException, IOException { HttpEntity entity = response.getEntity(); if (entity != null) { Header ceheader = entity.getContentEncoding(); if (ceheader != null) { HeaderElement[] codecs = ceheader.getElements(); for (HeaderElement codec : co... | /**
* Handles the following {@code Content-Encoding}s by
* using the appropriate decompressor to wrap the response Entity:
* <ul>
* <li>gzip - see {@link GzipDecompressingEntity}</li>
* <li>deflate - see {@link DeflateDecompressingEntity}</li>
* <li>identity - no action needed</li>
... | Handles the following Content-Encodings by using the appropriate decompressor to wrap the response Entity: gzip - see <code>GzipDecompressingEntity</code> deflate - see <code>DeflateDecompressingEntity</code> identity - no action needed | process | {
"repo_name": "0x90sled/droidtowers",
"path": "main/source/org/apach3/http/client/protocol/ResponseContentEncoding.java",
"license": "mit",
"size": 4288
} | [
"java.io.IOException",
"java.util.Locale",
"org.apach3.http.Header",
"org.apach3.http.HeaderElement",
"org.apach3.http.HttpEntity",
"org.apach3.http.HttpException",
"org.apach3.http.HttpResponse",
"org.apach3.http.client.entity.DeflateDecompressingEntity",
"org.apach3.http.client.entity.GzipDecompre... | import java.io.IOException; import java.util.Locale; import org.apach3.http.Header; import org.apach3.http.HeaderElement; import org.apach3.http.HttpEntity; import org.apach3.http.HttpException; import org.apach3.http.HttpResponse; import org.apach3.http.client.entity.DeflateDecompressingEntity; import org.apach3.http.... | import java.io.*; import java.util.*; import org.apach3.http.*; import org.apach3.http.client.entity.*; import org.apach3.http.protocol.*; | [
"java.io",
"java.util",
"org.apach3.http"
] | java.io; java.util; org.apach3.http; | 1,443,819 |
public BigMatrix add(BigMatrix m) throws IllegalArgumentException {
try {
return add((BigMatrixImpl) m);
} catch (ClassCastException cce) {
// safety check
MatrixUtils.checkAdditionCompatible(this, m);
final int rowCount = getRowDimension();
... | BigMatrix function(BigMatrix m) throws IllegalArgumentException { try { return add((BigMatrixImpl) m); } catch (ClassCastException cce) { MatrixUtils.checkAdditionCompatible(this, m); final int rowCount = getRowDimension(); final int columnCount = getColumnDimension(); final BigDecimal[][] outData = new BigDecimal[rowC... | /**
* Compute the sum of this and <code>m</code>.
*
* @param m matrix to be added
* @return this + m
* @throws IllegalArgumentException if m is not the same size as this
*/ | Compute the sum of this and <code>m</code> | add | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_63/src/main/java/org/apache/commons/math/linear/BigMatrixImpl.java",
"license": "gpl-2.0",
"size": 54472
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,505,807 |
public static String relUrlWithServletName(String relUrl) {
String ctxtPath = StringUtils.defaultString(getExternalContext().getRequestContextPath());
StringBuilder sb = new StringBuilder(ctxtPath.length() + 1 + relUrl.length());
sb.append(ctxtPath);
if (! relUrl.startsWith("/")) {
sb.append("/... | static String function(String relUrl) { String ctxtPath = StringUtils.defaultString(getExternalContext().getRequestContextPath()); StringBuilder sb = new StringBuilder(ctxtPath.length() + 1 + relUrl.length()); sb.append(ctxtPath); if (! relUrl.startsWith("/")) { sb.append("/"); } sb.append(relUrl); return sb.toString()... | /**
* Converts a relative application URL to another relative URL that contains
* the application URL.
* <p>
* Example: "my/page.jsf" will be converted to "/myservletname/my/page.jsf"
*
* @param relUrl The relative application URL.
* @return The URL which includes the servlet path.
*/ | Converts a relative application URL to another relative URL that contains the application URL. Example: "my/page.jsf" will be converted to "/myservletname/my/page.jsf" | relUrlWithServletName | {
"repo_name": "pm4j/org.pm4j",
"path": "pm4j-facelets/src/main/java/org/pm4j/jsf/util/JsfUtil.java",
"license": "bsd-2-clause",
"size": 12673
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,777,106 |
private Triangle update (Pnt site, Set<Triangle> cavity) {
Set<Set<Pnt>> boundary = new HashSet<Set<Pnt>>();
Set<Triangle> theTriangles = new HashSet<Triangle>();
// Find boundary facets and adjacent triangles
for (Triangle triangle: cavity) {
theTriangles.addAll(neighbo... | Triangle function (Pnt site, Set<Triangle> cavity) { Set<Set<Pnt>> boundary = new HashSet<Set<Pnt>>(); Set<Triangle> theTriangles = new HashSet<Triangle>(); for (Triangle triangle: cavity) { theTriangles.addAll(neighbors(triangle)); for (Pnt vertex: triangle) { Set<Pnt> facet = triangle.facetOpposite(vertex); if (bound... | /**
* Update the triangulation by removing the cavity triangles and then
* filling the cavity with new triangles.
* @param site the site that created the cavity
* @param cavity the triangles with site in their circumcircle
* @return one of the new triangles
*/ | Update the triangulation by removing the cavity triangles and then filling the cavity with new triangles | update | {
"repo_name": "ETH-NEXUS/TMARKER",
"path": "src/tmarker/delaunay/Triangulation.java",
"license": "gpl-2.0",
"size": 10865
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 635,583 |
public static QueryType getFromSQL(String stmt) {
// trim the front whitespace, substring to the first word and normalize
stmt = StringUtils.stripStart(stmt, null).substring(0, 6).toLowerCase();
// determine the type of the query
if (stmt.startsWith("insert")) {
return Q... | static QueryType function(String stmt) { stmt = StringUtils.stripStart(stmt, null).substring(0, 6).toLowerCase(); if (stmt.startsWith(STR)) { return QueryType.INSERT; } else if (stmt.startsWith(STR)) { return QueryType.UPDATE; } else if (stmt.startsWith(STR)) { return QueryType.DELETE; } else if (stmt.startsWith(STR)) ... | /**
* Determine what kind of SQL statement the given text represents.
* Don't use rocket science or anything, use the first word mostly.
* Code moved from deeper in the planner to here to be more general.
* @param stmt String of SQL
* @return Type of query
*/ | Determine what kind of SQL statement the given text represents. Don't use rocket science or anything, use the first word mostly. Code moved from deeper in the planner to here to be more general | getFromSQL | {
"repo_name": "kobronson/cs-voltdb",
"path": "src/frontend/org/voltdb/types/QueryType.java",
"license": "agpl-3.0",
"size": 5054
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,767,260 |
public static Object min(GeoTimeSerie gts) throws WarpScriptException {
Object[] parms = new Object[8];
int i = 0;
parms[i++] = 0L;
parms[i++] = null;
parms[i++] = null;
parms[i++] = Arrays.copyOf(gts.ticks, gts.values);
if (null != gts.locations) {
parms[i++] = Arrays.copyO... | static Object function(GeoTimeSerie gts) throws WarpScriptException { Object[] parms = new Object[8]; int i = 0; parms[i++] = 0L; parms[i++] = null; parms[i++] = null; parms[i++] = Arrays.copyOf(gts.ticks, gts.values); if (null != gts.locations) { parms[i++] = Arrays.copyOf(gts.locations, gts.values); } else { parms[i+... | /**
* Handy method to compute the min value of a GTS instance.
*
* It uses 'map_min' under the hood.
*
* @param gts GTS to compute the max of
*
* @return The computed min value
*/ | Handy method to compute the min value of a GTS instance. It uses 'map_min' under the hood | min | {
"repo_name": "StevenLeRoux/warp10-platform",
"path": "warp10/src/main/java/io/warp10/continuum/gts/GTSHelper.java",
"license": "apache-2.0",
"size": 304137
} | [
"io.warp10.script.WarpScriptAggregatorFunction",
"io.warp10.script.WarpScriptException",
"io.warp10.script.WarpScriptLib",
"java.util.Arrays"
] | import io.warp10.script.WarpScriptAggregatorFunction; import io.warp10.script.WarpScriptException; import io.warp10.script.WarpScriptLib; import java.util.Arrays; | import io.warp10.script.*; import java.util.*; | [
"io.warp10.script",
"java.util"
] | io.warp10.script; java.util; | 1,425,742 |
public ProjectExpectedStudy saveProjectExpectedStudy(ProjectExpectedStudy projectExpectedStudy);
| ProjectExpectedStudy function(ProjectExpectedStudy projectExpectedStudy); | /**
* This method saves the information of the given projectExpectedStudy
*
* @param projectExpectedStudy - is the projectExpectedStudy object with the new information to be added/updated.
* @return a number greater than 0 representing the new ID assigned by the database, 0 if the projectExpectedStudy ... | This method saves the information of the given projectExpectedStudy | saveProjectExpectedStudy | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ProjectExpectedStudyManager.java",
"license": "gpl-3.0",
"size": 6986
} | [
"org.cgiar.ccafs.marlo.data.model.ProjectExpectedStudy"
] | import org.cgiar.ccafs.marlo.data.model.ProjectExpectedStudy; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 2,833,896 |
boolean containsOnCompletion(Synchronization onCompletion); | boolean containsOnCompletion(Synchronization onCompletion); | /**
* Checks if the passed {@link org.apache.camel.spi.Synchronization} instance is
* already contained on this exchange.
*
* @param onCompletion the callback instance that is being checked for
* @return <tt>true</tt>, if callback instance is already contained on this exchange, else <tt>false<... | Checks if the passed <code>org.apache.camel.spi.Synchronization</code> instance is already contained on this exchange | containsOnCompletion | {
"repo_name": "punkhorn/camel-upstream",
"path": "core/camel-api/src/main/java/org/apache/camel/Exchange.java",
"license": "apache-2.0",
"size": 26121
} | [
"org.apache.camel.spi.Synchronization"
] | import org.apache.camel.spi.Synchronization; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 928,829 |
void writeOutData(OutData outData); | void writeOutData(OutData outData); | /**
* Sends data object to the client (microcontroller).
*
* @param outData
* the data to send
*/ | Sends data object to the client (microcontroller) | writeOutData | {
"repo_name": "svanacker/cen-info-common",
"path": "communication/src/java/main/org/cen/com/IComService.java",
"license": "mit",
"size": 1157
} | [
"org.cen.com.out.OutData"
] | import org.cen.com.out.OutData; | import org.cen.com.out.*; | [
"org.cen.com"
] | org.cen.com; | 2,513,574 |
public PipelineBuild getUpstreamPipelineBuild() {
@SuppressWarnings("rawtypes")
final List<AbstractProject> upstreamProjects = getProject().getUpstreamProjects();
AbstractProject<?, ?> previousProject = null;
String upstreamBuildName;
final PipelineBuild previousPB = new... | PipelineBuild function() { @SuppressWarnings(STR) final List<AbstractProject> upstreamProjects = getProject().getUpstreamProjects(); AbstractProject<?, ?> previousProject = null; String upstreamBuildName; final PipelineBuild previousPB = new PipelineBuild(); if (this.upstreamBuild != null) { upstreamBuildName = this.up... | /**
* Returns the upstream PipelineBuild object from the current PipelineBuild object.
*
* @return - Upstream PipelineBuild object from the current PipelineBuild object
*/ | Returns the upstream PipelineBuild object from the current PipelineBuild object | getUpstreamPipelineBuild | {
"repo_name": "wgreven/build-pipeline-plugin",
"path": "src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/PipelineBuild.java",
"license": "mit",
"size": 19214
} | [
"hudson.model.AbstractProject",
"java.util.List"
] | import hudson.model.AbstractProject; import java.util.List; | import hudson.model.*; import java.util.*; | [
"hudson.model",
"java.util"
] | hudson.model; java.util; | 2,591,004 |
void unbind(Name name) throws NamingException; | void unbind(Name name) throws NamingException; | /**
* Unbind an object from the naming store. An entry for the name must exist.
*
* @param name The entry name
* @throws NamingException If any problems occur
*/ | Unbind an object from the naming store. An entry for the name must exist | unbind | {
"repo_name": "xasx/wildfly",
"path": "naming/src/main/java/org/jboss/as/naming/WritableNamingStore.java",
"license": "lgpl-2.1",
"size": 3547
} | [
"javax.naming.Name",
"javax.naming.NamingException"
] | import javax.naming.Name; import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 1,834,008 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<P2SVpnGatewayInner>, P2SVpnGatewayInner> beginReset(
String resourceGroupName, String gatewayName, Context context) {
return beginResetAsync(resourceGroupName, gatewayName, context).getSyncPoller();
} | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<P2SVpnGatewayInner>, P2SVpnGatewayInner> function( String resourceGroupName, String gatewayName, Context context) { return beginResetAsync(resourceGroupName, gatewayName, context).getSyncPoller(); } | /**
* Resets the primary of the p2s vpn gateway in the specified resource group.
*
* @param resourceGroupName The resource group name of the P2SVpnGateway.
* @param gatewayName The name of the gateway.
* @param context The context to associate with this operation.
* @throws IllegalArgument... | Resets the primary of the p2s vpn gateway in the specified resource group | beginReset | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/P2SVpnGatewaysClientImpl.java",
"license": "mit",
"size": 155308
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.network.fluent.models.P2SVpnGatewayInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.network.fluent.models.P2SVpnGatewayInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,353,527 |
public static String i18nInstancePropertyLabel(
final String property,
final Object instance,
final boolean shortLabel,
final ResourceBundleLoadStrategy strategy) {
return i18nPropertyLabel(property,
instance.getClass(),
shortLabel,... | static String function( final String property, final Object instance, final boolean shortLabel, final ResourceBundleLoadStrategy strategy) { return i18nPropertyLabel(property, instance.getClass(), shortLabel, strategy); } public static final String I18N_PROPERTY_LABEL_KEY_PREFIX = STR; public static final String I18N_S... | /**
* <p>Return a label for a property with name <code>property</code>
* of a type <code>instance.getClass()</code>.</p>
*
* @see #i18nPropertyLabel(String, Class, boolean, ResourceBundleLoadStrategy)
*
* @param property
* The name of the property to return an i18n'ed label for.
* @para... | Return a label for a property with name <code>property</code> of a type <code>instance.getClass()</code> | i18nInstancePropertyLabel | {
"repo_name": "jandppw/ppwcode-recovered-from-google-code",
"path": "java/vernacular/semantics/dev/d20081116-2052/src/main/java/org/ppwcode/vernacular/semantics_VI/i18n/I18nLabelHelpers.java",
"license": "apache-2.0",
"size": 17014
} | [
"org.ppwcode.vernacular.resourcebundle_II.ResourceBundleLoadStrategy"
] | import org.ppwcode.vernacular.resourcebundle_II.ResourceBundleLoadStrategy; | import org.ppwcode.vernacular.*; | [
"org.ppwcode.vernacular"
] | org.ppwcode.vernacular; | 254,197 |
public TableItem[] getItems() {
checkWidget();
return this.table.getItems();
} | TableItem[] function() { checkWidget(); return this.table.getItems(); } | /**
* Returns a (possibly empty) array of <code>String</code>s which are the items in the
* receiver's list.
* <p>
* Note: This is not the actual structure used by the receiver to maintain its list of items, so
* modifying the array will not affect the receiver.
* </p>
* @return the i... | Returns a (possibly empty) array of <code>String</code>s which are the items in the receiver's list. Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver. | getItems | {
"repo_name": "DavidGutknecht/elexis-3-base",
"path": "bundles/ch.gpb.elexis.cst/src/ch/gpb/elexis/cst/widget/ImageCombo.java",
"license": "epl-1.0",
"size": 48590
} | [
"org.eclipse.swt.widgets.TableItem"
] | import org.eclipse.swt.widgets.TableItem; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,472,628 |
Observable<JobInformation> createAsync(String accountName, UUID jobIdentity, JobInformation parameters); | Observable<JobInformation> createAsync(String accountName, UUID jobIdentity, JobInformation parameters); | /**
* Submits a job to the specified Data Lake Analytics account.
*
* @param accountName The Azure Data Lake Analytics account to execute job operations on.
* @param jobIdentity The job ID (a GUID) for the job being submitted.
* @param parameters The parameters to submit a job.
* @return t... | Submits a job to the specified Data Lake Analytics account | createAsync | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Jobs.java",
"license": "mit",
"size": 20587
} | [
"com.microsoft.azure.management.datalake.analytics.models.JobInformation"
] | import com.microsoft.azure.management.datalake.analytics.models.JobInformation; | import com.microsoft.azure.management.datalake.analytics.models.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,375,718 |
public static void addProcessAnnotation(ProcessAnnotation annotation) {
if (annotation == null) {
throw new IllegalArgumentException("annotation must not be null!");
}
WorkflowAnnotations annotations = lookupProcessAnnotations(annotation.getProcess());
if (annotations == null) {
annotations = new Work... | static void function(ProcessAnnotation annotation) { if (annotation == null) { throw new IllegalArgumentException(STR); } WorkflowAnnotations annotations = lookupProcessAnnotations(annotation.getProcess()); if (annotations == null) { annotations = new WorkflowAnnotations(); } annotations.addAnnotation(annotation); anno... | /**
* Adds a {@link ProcessAnnotation}.
*
* @param annotation
* the new annotation
*/ | Adds a <code>ProcessAnnotation</code> | addProcessAnnotation | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/io/process/AnnotationProcessXMLFilter.java",
"license": "agpl-3.0",
"size": 15128
} | [
"com.rapidminer.gui.flow.processrendering.annotations.model.ProcessAnnotation",
"com.rapidminer.gui.flow.processrendering.annotations.model.WorkflowAnnotations"
] | import com.rapidminer.gui.flow.processrendering.annotations.model.ProcessAnnotation; import com.rapidminer.gui.flow.processrendering.annotations.model.WorkflowAnnotations; | import com.rapidminer.gui.flow.processrendering.annotations.model.*; | [
"com.rapidminer.gui"
] | com.rapidminer.gui; | 2,815,746 |
@Override
protected DependentElement getFixture() {
return (DependentElement)fixture;
} | DependentElement function() { return (DependentElement)fixture; } | /**
* Returns the fixture for this Dependent Element test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Returns the fixture for this Dependent Element test case. | getFixture | {
"repo_name": "netuh/DecodePlatformPlugin",
"path": "br.ufpe.ines.decode/bundles/br.ufpe.ines.decode.model.tests/src/br/ufpe/ines/decode/decode/artifacts/questionnaire/tests/DependentElementTest.java",
"license": "gpl-3.0",
"size": 1571
} | [
"br.ufpe.ines.decode.decode.artifacts.questionnaire.DependentElement"
] | import br.ufpe.ines.decode.decode.artifacts.questionnaire.DependentElement; | import br.ufpe.ines.decode.decode.artifacts.questionnaire.*; | [
"br.ufpe.ines"
] | br.ufpe.ines; | 1,025,012 |
public static int getDefaultDistanceUnits() {
if (defaultDistanceUnits == -1) {
XMLEntity xml = PluginServices.getPluginServices(
"com.iver.cit.gvsig").getPersistentXML();
if (xml.contains("DefaultDistanceUnits")) {
defaultDistanceUnits = xml
.getIntProperty("DefaultDistanceUnits");
} else ... | static int function() { if (defaultDistanceUnits == -1) { XMLEntity xml = PluginServices.getPluginServices( STR).getPersistentXML(); if (xml.contains(STR)) { defaultDistanceUnits = xml .getIntProperty(STR); } else { String[] unitNames = MapContext.getDistanceNames(); for (int i = 0; i < unitNames.length; i++) { if (uni... | /**
* Returns the user's default view units for measuring distances. This is
* the units that the user will see in the status bar of the view.
*
* @return int (index of the <b>Attributes.NAMES array</b>)
*/ | Returns the user's default view units for measuring distances. This is the units that the user will see in the status bar of the view | getDefaultDistanceUnits | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/iver/cit/gvsig/project/Project.java",
"license": "gpl-3.0",
"size": 62151
} | [
"com.iver.andami.PluginServices",
"com.iver.cit.gvsig.fmap.MapContext",
"com.iver.utiles.XMLEntity"
] | import com.iver.andami.PluginServices; import com.iver.cit.gvsig.fmap.MapContext; import com.iver.utiles.XMLEntity; | import com.iver.andami.*; import com.iver.cit.gvsig.fmap.*; import com.iver.utiles.*; | [
"com.iver.andami",
"com.iver.cit",
"com.iver.utiles"
] | com.iver.andami; com.iver.cit; com.iver.utiles; | 2,785,265 |
private static NetworkGroup lookupGroup( final String groupId,
final String groupName ) throws EucalyptusCloudException, MetadataException {
final Context ctx = Contexts.lookup( );
final AccountFullName lookUpGroupAccount = ctx.getUserFullName( ).asAccountFullName();... | static NetworkGroup function( final String groupId, final String groupName ) throws EucalyptusCloudException, MetadataException { final Context ctx = Contexts.lookup( ); final AccountFullName lookUpGroupAccount = ctx.getUserFullName( ).asAccountFullName(); try ( final TransactionResource tx = Entities.transactionFor( N... | /**
* Caller must perform authorization checks
*/ | Caller must perform authorization checks | lookupGroup | {
"repo_name": "acmyonghua/eucalyptus",
"path": "clc/modules/cluster-manager/src/main/java/com/eucalyptus/network/NetworkGroupManager.java",
"license": "gpl-3.0",
"size": 37551
} | [
"com.eucalyptus.auth.principal.AccountFullName",
"com.eucalyptus.cloud.util.MetadataException",
"com.eucalyptus.cloud.util.NoSuchMetadataException",
"com.eucalyptus.compute.ClientComputeException",
"com.eucalyptus.context.Context",
"com.eucalyptus.context.Contexts",
"com.eucalyptus.entities.Entities",
... | import com.eucalyptus.auth.principal.AccountFullName; import com.eucalyptus.cloud.util.MetadataException; import com.eucalyptus.cloud.util.NoSuchMetadataException; import com.eucalyptus.compute.ClientComputeException; import com.eucalyptus.context.Context; import com.eucalyptus.context.Contexts; import com.eucalyptus.e... | import com.eucalyptus.auth.principal.*; import com.eucalyptus.cloud.util.*; import com.eucalyptus.compute.*; import com.eucalyptus.context.*; import com.eucalyptus.entities.*; import com.eucalyptus.util.*; import com.google.common.base.*; | [
"com.eucalyptus.auth",
"com.eucalyptus.cloud",
"com.eucalyptus.compute",
"com.eucalyptus.context",
"com.eucalyptus.entities",
"com.eucalyptus.util",
"com.google.common"
] | com.eucalyptus.auth; com.eucalyptus.cloud; com.eucalyptus.compute; com.eucalyptus.context; com.eucalyptus.entities; com.eucalyptus.util; com.google.common; | 1,213,901 |
private void validateStartingDates( SpecialEventTO specialEventTO )
{
if( specialEventTO.getFinalDay() == null
|| this.rulePresaleStartDate.after( specialEventTO.getStartDay() ) )
{
throw DigitalBookingExceptionBuilder.build( DigitalBookingExceptionCode.INVALID_STARTING_DATES,
new Obje... | void function( SpecialEventTO specialEventTO ) { if( specialEventTO.getFinalDay() == null this.rulePresaleStartDate.after( specialEventTO.getStartDay() ) ) { throw DigitalBookingExceptionBuilder.build( DigitalBookingExceptionCode.INVALID_STARTING_DATES, new Object[] { specialEventTO.getTheater().getName() } ); } } | /**
* Method that validates whether exist a booking with invalid starting dates.
*
* @param specialEventTO, the {@link mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO} to save.
*/ | Method that validates whether exist a booking with invalid starting dates | validateStartingDates | {
"repo_name": "sidlors/digital-booking",
"path": "digital-booking-web/src/main/java/mx/com/cinepolis/digital/booking/web/beans/booking/PreReleaseBookingBean.java",
"license": "epl-1.0",
"size": 49794
} | [
"mx.com.cinepolis.digital.booking.commons.exception.DigitalBookingExceptionCode",
"mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO",
"mx.com.cinepolis.digital.booking.commons.utils.DigitalBookingExceptionBuilder"
] | import mx.com.cinepolis.digital.booking.commons.exception.DigitalBookingExceptionCode; import mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO; import mx.com.cinepolis.digital.booking.commons.utils.DigitalBookingExceptionBuilder; | import mx.com.cinepolis.digital.booking.commons.exception.*; import mx.com.cinepolis.digital.booking.commons.to.*; import mx.com.cinepolis.digital.booking.commons.utils.*; | [
"mx.com.cinepolis"
] | mx.com.cinepolis; | 603,455 |
public static int saturatedSubtract(int a, int b) {
return Ints.saturatedCast((long) a - b);
} | static int function(int a, int b) { return Ints.saturatedCast((long) a - b); } | /**
* Returns the difference of {@code a} and {@code b} unless it would overflow or underflow in
* which case {@code Integer.MAX_VALUE} or {@code Integer.MIN_VALUE} is returned, respectively.
*
* @since 20.0
*/ | Returns the difference of a and b unless it would overflow or underflow in which case Integer.MAX_VALUE or Integer.MIN_VALUE is returned, respectively | saturatedSubtract | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/guava25/math/IntMath.java",
"license": "mit",
"size": 23812
} | [
"com.azure.cosmos.implementation.guava25.primitives.Ints"
] | import com.azure.cosmos.implementation.guava25.primitives.Ints; | import com.azure.cosmos.implementation.guava25.primitives.*; | [
"com.azure.cosmos"
] | com.azure.cosmos; | 2,639,203 |
@VisibleForTesting
public AtomicLong getSequenceId() {
return this.sequenceId;
} | AtomicLong function() { return this.sequenceId; } | /**
* Do not change this sequence id. See {@link #sequenceId} comment.
* @return sequenceId
*/ | Do not change this sequence id. See <code>#sequenceId</code> comment | getSequenceId | {
"repo_name": "intel-hadoop/hbase-rhino",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 236546
} | [
"java.util.concurrent.atomic.AtomicLong"
] | import java.util.concurrent.atomic.AtomicLong; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 903,485 |
@Test(expected = IllegalArgumentException.class)
public void testInvalidConstructorParameters() {
new GetObservationByIdParameterBuilder_v100(null, null);
new GetObservationByIdParameterBuilder_v100("", null);
new GetObservationByIdParameterBuilder_v100(null, "");
} | @Test(expected = IllegalArgumentException.class) void function() { new GetObservationByIdParameterBuilder_v100(null, null); new GetObservationByIdParameterBuilder_v100(STR"); } | /**
* Checks the behaviour on invalid constructor parameters.
*/ | Checks the behaviour on invalid constructor parameters | testInvalidConstructorParameters | {
"repo_name": "EHJ-52n/OX-Framework",
"path": "52n-oxf-adapters/oxf-sos-adapter/src/test/java/org/n52/oxf/sos/adapter/GetObservationByIdParameterBuilder_v100Test.java",
"license": "gpl-2.0",
"size": 4540
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,432,631 |
@Override
public Date getConvertedValue() {
String dateStr = this.getFirstValue();
if (dateStr != null && !dateStr.trim().isEmpty()) {
dateStr = dateStr.trim();
try {
return dateFormat.parse(dateStr);
} catch (ParseException ex) {
... | Date function() { String dateStr = this.getFirstValue(); if (dateStr != null && !dateStr.trim().isEmpty()) { dateStr = dateStr.trim(); try { return dateFormat.parse(dateStr); } catch (ParseException ex) { throw new UniformException(String.format(STR, dateStr), ex); } } return null; } | /**
* Returns the value of this element as a Date, automatically converting the value string with the configured date format.
* If the value is not empty and its format is incorrect, an exception will be thrown.
* @return Date
*/ | Returns the value of this element as a Date, automatically converting the value string with the configured date format. If the value is not empty and its format is incorrect, an exception will be thrown | getConvertedValue | {
"repo_name": "uniform-java/uniform",
"path": "src/main/java/net/uniform/html/elements/DatePicker.java",
"license": "apache-2.0",
"size": 4723
} | [
"java.text.ParseException",
"java.util.Date",
"net.uniform.exceptions.UniformException"
] | import java.text.ParseException; import java.util.Date; import net.uniform.exceptions.UniformException; | import java.text.*; import java.util.*; import net.uniform.exceptions.*; | [
"java.text",
"java.util",
"net.uniform.exceptions"
] | java.text; java.util; net.uniform.exceptions; | 1,059,609 |
public void remove(String id) throws Exception {
DeleteResponse response = _client.prepareDelete(_index, _type, id).setRouting(id)
.execute()
.actionGet();
if (!response.isFound()) {
LOG.warning("Unable to find document [" + _index + "/" + _type + "/" + i... | void function(String id) throws Exception { DeleteResponse response = _client.prepareDelete(_index, _type, id).setRouting(id) .execute() .actionGet(); if (!response.isFound()) { LOG.warning(STR + _index + "/" + _type + "/" + id + STR); } } | /**
* This method removes the document with the supplied id.
*
* @param id The id
* @throws Exception Failed to remove document
*/ | This method removes the document with the supplied id | remove | {
"repo_name": "djcoleman/rtgov",
"path": "modules/common/rtgov-elasticsearch/src/main/java/org/overlord/rtgov/common/elasticsearch/ElasticsearchClient.java",
"license": "apache-2.0",
"size": 26432
} | [
"org.elasticsearch.action.delete.DeleteResponse"
] | import org.elasticsearch.action.delete.DeleteResponse; | import org.elasticsearch.action.delete.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,362,710 |
public void addJoinColumns(String joinColumn)
{
if (joinColumns == null || joinColumns.isEmpty())
{
joinColumns = new HashSet<String>();
}
joinColumns.add(joinColumn);
} | void function(String joinColumn) { if (joinColumns == null joinColumns.isEmpty()) { joinColumns = new HashSet<String>(); } joinColumns.add(joinColumn); } | /**
* Adds the join columns.
*
* @param joinColumn
* the joinColumns to add
*/ | Adds the join columns | addJoinColumns | {
"repo_name": "ravisund/Kundera",
"path": "src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/JoinTableMetadata.java",
"license": "apache-2.0",
"size": 3991
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 985,079 |
private static void dumpConfiguration(Writer writer) throws IOException {
Configuration.dumpConfiguration(new JobConf(), writer);
writer.write("\n");
} | static void function(Writer writer) throws IOException { Configuration.dumpConfiguration(new JobConf(), writer); writer.write("\n"); } | /**
* Dumps the configuration properties in Json format
* @param writer {@link}Writer object to which the output is written
* @throws IOException
*/ | Dumps the configuration properties in Json format | dumpConfiguration | {
"repo_name": "steveloughran/hadoop-mapreduce",
"path": "src/java/org/apache/hadoop/mapred/JobTracker.java",
"license": "apache-2.0",
"size": 169624
} | [
"java.io.IOException",
"java.io.Writer",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import java.io.Writer; import org.apache.hadoop.conf.Configuration; | import java.io.*; import org.apache.hadoop.conf.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 348,423 |
@ServiceMethod(returns = ReturnType.SINGLE)
public void disableRecommendation(
String resourceGroupName,
String workspaceName,
String sqlPoolName,
String schemaName,
String tableName,
String columnName) {
disableRecommendationAsync(resourceGroupName, works... | @ServiceMethod(returns = ReturnType.SINGLE) void function( String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName) { disableRecommendationAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName) .block(); } | /**
* Disables sensitivity recommendations on a given column.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param sqlPoolName SQL pool name.
* @param schemaName The name of the schema.
* ... | Disables sensitivity recommendations on a given column | disableRecommendation | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSensitivityLabelsClientImpl.java",
"license": "mit",
"size": 109648
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 582,640 |
private void updateClientNodes(UUID leftNodeId) {
for (Map.Entry<String, CachePredicate> entry : registeredCaches.entrySet()) {
CachePredicate pred = entry.getValue();
pred.onNodeLeft(leftNodeId);
}
} | void function(UUID leftNodeId) { for (Map.Entry<String, CachePredicate> entry : registeredCaches.entrySet()) { CachePredicate pred = entry.getValue(); pred.onNodeLeft(leftNodeId); } } | /**
* Called from discovery thread.
*
* @param leftNodeId Left node ID.
*/ | Called from discovery thread | updateClientNodes | {
"repo_name": "ntikhonov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java",
"license": "apache-2.0",
"size": 113733
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,783,868 |
protected boolean isBlockTag(AttributeSet attr) {
Object o = attr.getAttribute(StyleConstants.NameAttribute);
if (o instanceof HTML.Tag) {
HTML.Tag name = (HTML.Tag) o;
return name.isBlock();
}
return false;
} | boolean function(AttributeSet attr) { Object o = attr.getAttribute(StyleConstants.NameAttribute); if (o instanceof HTML.Tag) { HTML.Tag name = (HTML.Tag) o; return name.isBlock(); } return false; } | /**
* Determines if the HTML.Tag associated with the
* element is a block tag.
*
* @param attr an AttributeSet
* @return true if tag is block tag, false otherwise.
*/ | Determines if the HTML.Tag associated with the element is a block tag | isBlockTag | {
"repo_name": "christophpickl/gadsu",
"path": "src/main/java/org/openmechanics/htmleditor/AltHTMLWriter.java",
"license": "apache-2.0",
"size": 81855
} | [
"javax.swing.text.AttributeSet",
"javax.swing.text.StyleConstants"
] | import javax.swing.text.AttributeSet; import javax.swing.text.StyleConstants; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 1,999,390 |
public T photos_get(Long albumId)
throws FacebookException, IOException; | T function(Long albumId) throws FacebookException, IOException; | /**
* Used to retrieve photo objects using the search parameters (one or more of the
* parameters must be provided).
*
* @param albumId retrieve from photos from this album (optional)
* @return an T of photo objects.
* @see #photos_get(Integer, Long, Collection)
* @see <a href="http://wiki.develope... | Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided) | photos_get | {
"repo_name": "jkinner/ringside",
"path": "api/clients/java/com/facebook/api/IFacebookRestClient.java",
"license": "lgpl-2.1",
"size": 46105
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 141,104 |
public static QueueEntry convertAMQMessageToQueueEntry(AMQMessage message, AMQQueue queue) {
SimpleQueueEntryList list = new SimpleQueueEntryList(queue);
return list.add(message);
} | static QueueEntry function(AMQMessage message, AMQQueue queue) { SimpleQueueEntryList list = new SimpleQueueEntryList(queue); return list.add(message); } | /**
* convert a AMQMessage to a queue entry
*
* @param message AMQMessage
* @param queue qpid queue
* @return queue entry
*/ | convert a AMQMessage to a queue entry | convertAMQMessageToQueueEntry | {
"repo_name": "abeykoon/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/amqp/AMQPUtils.java",
"license": "apache-2.0",
"size": 20212
} | [
"org.wso2.andes.server.message.AMQMessage",
"org.wso2.andes.server.queue.AMQQueue",
"org.wso2.andes.server.queue.QueueEntry",
"org.wso2.andes.server.queue.SimpleQueueEntryList"
] | import org.wso2.andes.server.message.AMQMessage; import org.wso2.andes.server.queue.AMQQueue; import org.wso2.andes.server.queue.QueueEntry; import org.wso2.andes.server.queue.SimpleQueueEntryList; | import org.wso2.andes.server.message.*; import org.wso2.andes.server.queue.*; | [
"org.wso2.andes"
] | org.wso2.andes; | 584,477 |
public void setName(Name name) {
this.name = name;
}
| void function(Name name) { this.name = name; } | /**
* Name of the Project Position
*
* @param name the Name.
*/ | Name of the Project Position | setName | {
"repo_name": "NABUCCO/org.nabucco.business.project",
"path": "org.nabucco.business.project.facade.datatype/src/main/gen/org/nabucco/business/project/facade/datatype/ProjectPosition.java",
"license": "epl-1.0",
"size": 17946
} | [
"org.nabucco.framework.base.facade.datatype.Name"
] | import org.nabucco.framework.base.facade.datatype.Name; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 1,001,995 |
public final void flush(CacheEvent event, boolean propagate){
doFlush(event);
if(propagate){
propagate(event);
}
String message = "Cache purged: " + (event.getType() == CacheEvent.CacheEventType.ALL
? "all caches" : "table: " + event.getGroup());
... | final void function(CacheEvent event, boolean propagate){ doFlush(event); if(propagate){ propagate(event); } String message = STR + (event.getType() == CacheEvent.CacheEventType.ALL ? STR : STR + event.getGroup()); LogFilter.log(LOGGER, LogLevel.DEBUG, message); } | /**
* Flashes cache.
*
* @param propagate true to propagate event to listeners, false to not propagate
* @param event type of caches to flush.
*/ | Flashes cache | flush | {
"repo_name": "javalite/activejdbc",
"path": "activejdbc/src/main/java/org/javalite/activejdbc/cache/CacheManager.java",
"license": "apache-2.0",
"size": 4702
} | [
"org.javalite.activejdbc.logging.LogFilter",
"org.javalite.activejdbc.logging.LogLevel"
] | import org.javalite.activejdbc.logging.LogFilter; import org.javalite.activejdbc.logging.LogLevel; | import org.javalite.activejdbc.logging.*; | [
"org.javalite.activejdbc"
] | org.javalite.activejdbc; | 2,656,264 |
public BlockAppender prepareMetaBlock(String name, String compressionName)
throws IOException, MetaBlockAlreadyExists {
return prepareMetaBlock(name, Compression
.getCompressionAlgorithmByName(compressionName));
} | BlockAppender function(String name, String compressionName) throws IOException, MetaBlockAlreadyExists { return prepareMetaBlock(name, Compression .getCompressionAlgorithmByName(compressionName)); } | /**
* Create a Meta Block and obtain an output stream for adding data into the
* block. There can only be one BlockAppender stream active at any time.
* Regular Blocks may not be created after the first Meta Blocks. The caller
* must call BlockAppender.close() to conclude the block creation.
* ... | Create a Meta Block and obtain an output stream for adding data into the block. There can only be one BlockAppender stream active at any time. Regular Blocks may not be created after the first Meta Blocks. The caller must call BlockAppender.close() to conclude the block creation | prepareMetaBlock | {
"repo_name": "gndpig/hadoop",
"path": "src/core/org/apache/hadoop/io/file/tfile/BCFile.java",
"license": "apache-2.0",
"size": 29697
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,745,569 |
public Builder setSSLContext(final SSLContext ctx) {
if (ctx == null) {
throw(new IllegalArgumentException(
"SSL context cannot be null"));
}
bSSLContext = ctx;
return this;
} | Builder function(final SSLContext ctx) { if (ctx == null) { throw(new IllegalArgumentException( STR)); } bSSLContext = ctx; return this; } | /**
* Set the SSL context to use for this session. This can be used
* to configure certificate-based authentication, etc..
*
* @param ctx SSL context
* @return builder instance
*/ | Set the SSL context to use for this session. This can be used to configure certificate-based authentication, etc. | setSSLContext | {
"repo_name": "igniterealtime/jbosh",
"path": "src/main/java/org/igniterealtime/jbosh/BOSHClientConfig.java",
"license": "apache-2.0",
"size": 15579
} | [
"javax.net.ssl.SSLContext"
] | import javax.net.ssl.SSLContext; | import javax.net.ssl.*; | [
"javax.net"
] | javax.net; | 1,120,025 |
@NonNull
public Builder setRedirectUri(@Nullable Uri redirectUri) {
if (redirectUri != null) {
checkNotNull(redirectUri.getScheme(), "redirectUri must have a scheme");
}
mRedirectUri = redirectUri;
return this;
} | Builder function(@Nullable Uri redirectUri) { if (redirectUri != null) { checkNotNull(redirectUri.getScheme(), STR); } mRedirectUri = redirectUri; return this; } | /**
* Specifies the redirect URI for the request. This is required for authorization code
* exchanges, but otherwise optional. If specified, the redirect URI must have a scheme.
*/ | Specifies the redirect URI for the request. This is required for authorization code exchanges, but otherwise optional. If specified, the redirect URI must have a scheme | setRedirectUri | {
"repo_name": "openid/AppAuth-Android",
"path": "library/java/net/openid/appauth/TokenRequest.java",
"license": "apache-2.0",
"size": 22465
} | [
"android.net.Uri",
"androidx.annotation.Nullable",
"net.openid.appauth.Preconditions"
] | import android.net.Uri; import androidx.annotation.Nullable; import net.openid.appauth.Preconditions; | import android.net.*; import androidx.annotation.*; import net.openid.appauth.*; | [
"android.net",
"androidx.annotation",
"net.openid.appauth"
] | android.net; androidx.annotation; net.openid.appauth; | 2,822,512 |
@Test(groups = {"wso2.mb", "topic"})
public void performTopicPermissionTestCase()
throws IOException, UserAdminUserAdminException, XPathExpressionException,
NamingException, JMSException, AndesClientException,
AndesClientConfigurationException {
this.cre... | @Test(groups = {STR, "topic"}) void function() throws IOException, UserAdminUserAdminException, XPathExpressionException, NamingException, JMSException, AndesClientException, AndesClientConfigurationException { this.createPublishAndSubscribeFromUser(STR, STR); } | /**
* User creates a topic and then publishes and consumes messages.
*
* @throws IOException
* @throws UserAdminUserAdminException
* @throws XPathExpressionException
* @throws NamingException
* @throws JMSException
* @throws AndesClientException
* @throws AndesClientConfigur... | User creates a topic and then publishes and consumes messages | performTopicPermissionTestCase | {
"repo_name": "milindaperera/product-ei",
"path": "integration/broker-tests/tests-integration/tests-amqp/src/test/java/org/wso2/mb/integration/tests/amqp/functional/TopicUserAuthorizationTestCase.java",
"license": "apache-2.0",
"size": 32937
} | [
"java.io.IOException",
"javax.jms.JMSException",
"javax.naming.NamingException",
"javax.xml.xpath.XPathExpressionException",
"org.testng.annotations.Test",
"org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException",
"org.wso2.mb.integration.common.clients.exceptions.AndesClientConfigurationException",
... | import java.io.IOException; import javax.jms.JMSException; import javax.naming.NamingException; import javax.xml.xpath.XPathExpressionException; import org.testng.annotations.Test; import org.wso2.carbon.user.mgt.stub.UserAdminUserAdminException; import org.wso2.mb.integration.common.clients.exceptions.AndesClientConfi... | import java.io.*; import javax.jms.*; import javax.naming.*; import javax.xml.xpath.*; import org.testng.annotations.*; import org.wso2.carbon.user.mgt.stub.*; import org.wso2.mb.integration.common.clients.exceptions.*; | [
"java.io",
"javax.jms",
"javax.naming",
"javax.xml",
"org.testng.annotations",
"org.wso2.carbon",
"org.wso2.mb"
] | java.io; javax.jms; javax.naming; javax.xml; org.testng.annotations; org.wso2.carbon; org.wso2.mb; | 943,443 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "bryansiebert/PrioritizeMe",
"path": "src/main/java/servlet/RegisterView.java",
"license": "mit",
"size": 2603
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,261,357 |
private void ensureCachedScrollSelectorValue(int selectorIndex) {
SparseArray<String> cache = mSelectorIndexToStringCache;
String scrollSelectorValue = cache.get(selectorIndex);
if (scrollSelectorValue != null) {
return;
}
if (selectorIndex < mMinValue || selectorIndex > mMaxValue) {
scrollSelectorVa... | void function(int selectorIndex) { SparseArray<String> cache = mSelectorIndexToStringCache; String scrollSelectorValue = cache.get(selectorIndex); if (scrollSelectorValue != null) { return; } if (selectorIndex < mMinValue selectorIndex > mMaxValue) { scrollSelectorValue = ""; } else { if (mDisplayedValues != null) { in... | /**
* Ensures we have a cached string representation of the given <code>
* selectorIndex</code> to avoid multiple instantiations of the same string.
*/ | Ensures we have a cached string representation of the given <code> selectorIndex</code> to avoid multiple instantiations of the same string | ensureCachedScrollSelectorValue | {
"repo_name": "tsdl2013/Android-Holo-DateTimePicker",
"path": "Android_Holo_DateTimePicker/src/com/ai/android/picker/NumberPicker.java",
"license": "apache-2.0",
"size": 81720
} | [
"android.util.SparseArray"
] | import android.util.SparseArray; | import android.util.*; | [
"android.util"
] | android.util; | 1,274,764 |
public static Job createJob(VdcActionType actionType, CommandBase<?> command) {
Job job = new Job();
job.setId(Guid.newGuid());
job.setActionType(actionType);
job.setDescription(ExecutionMessageDirector.resolveJobMessage(actionType, command.getJobMessageProperties()));
job.s... | static Job function(VdcActionType actionType, CommandBase<?> command) { Job job = new Job(); job.setId(Guid.newGuid()); job.setActionType(actionType); job.setDescription(ExecutionMessageDirector.resolveJobMessage(actionType, command.getJobMessageProperties())); job.setJobSubjectEntities(getSubjectEntities(command.getPe... | /**
* Creates and returns an instance of {@link Job} entity.
*
* @param actionType
* The action type the job entity represents.
* @param command
* The {@code CommandBase} instance which the job entity describes.
* @return An initialized {@code Job} instance.
... | Creates and returns an instance of <code>Job</code> entity | createJob | {
"repo_name": "jtux270/translate",
"path": "ovirt/3.6_source/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java",
"license": "gpl-3.0",
"size": 36653
} | [
"java.util.Date",
"org.ovirt.engine.core.bll.CommandBase",
"org.ovirt.engine.core.common.action.VdcActionType",
"org.ovirt.engine.core.common.job.Job",
"org.ovirt.engine.core.common.job.JobExecutionStatus",
"org.ovirt.engine.core.compat.Guid",
"org.ovirt.engine.core.dal.job.ExecutionMessageDirector"
] | import java.util.Date; import org.ovirt.engine.core.bll.CommandBase; import org.ovirt.engine.core.common.action.VdcActionType; import org.ovirt.engine.core.common.job.Job; import org.ovirt.engine.core.common.job.JobExecutionStatus; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.dal.job.Execution... | import java.util.*; import org.ovirt.engine.core.bll.*; import org.ovirt.engine.core.common.action.*; import org.ovirt.engine.core.common.job.*; import org.ovirt.engine.core.compat.*; import org.ovirt.engine.core.dal.job.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 2,842,733 |
private void removeLocks(final short packageSequence, final ClientConnectionHandler clientConnectionHandler,
final short requestPackage) throws IOException, PacketEncodeException {
final LockManager lockManager = clientConnectionHandler.getLockManager();
final List<LockEntry> removedLocks = lockManager.... | void function(final short packageSequence, final ClientConnectionHandler clientConnectionHandler, final short requestPackage) throws IOException, PacketEncodeException { final LockManager lockManager = clientConnectionHandler.getLockManager(); final List<LockEntry> removedLocks = lockManager.removeAllForLocksForObjectA... | /**
* Remove the locks for the given sequence
* @param packageSequence
* @param clientConnectionHandler
* @param requestPackage
* @throws IOException
* @throws PacketEncodeException
*/ | Remove the locks for the given sequence | removeLocks | {
"repo_name": "jnidzwetzki/bboxdb",
"path": "bboxdb-server/src/main/java/org/bboxdb/network/server/connection/handler/request/CancelRequestHandler.java",
"license": "apache-2.0",
"size": 3757
} | [
"java.io.IOException",
"java.util.List",
"org.bboxdb.network.packets.PacketEncodeException",
"org.bboxdb.network.server.connection.ClientConnectionHandler",
"org.bboxdb.network.server.connection.lock.LockEntry",
"org.bboxdb.network.server.connection.lock.LockManager"
] | import java.io.IOException; import java.util.List; import org.bboxdb.network.packets.PacketEncodeException; import org.bboxdb.network.server.connection.ClientConnectionHandler; import org.bboxdb.network.server.connection.lock.LockEntry; import org.bboxdb.network.server.connection.lock.LockManager; | import java.io.*; import java.util.*; import org.bboxdb.network.packets.*; import org.bboxdb.network.server.connection.*; import org.bboxdb.network.server.connection.lock.*; | [
"java.io",
"java.util",
"org.bboxdb.network"
] | java.io; java.util; org.bboxdb.network; | 1,018,878 |
@Override
public void RemoveFromSuppressLLDPs(DatapathId sw, OFPort port) {
NodePortTuple npt = new NodePortTuple(sw, port);
this.suppressLinkDiscovery.remove(npt);
discover(npt);
} | void function(DatapathId sw, OFPort port) { NodePortTuple npt = new NodePortTuple(sw, port); this.suppressLinkDiscovery.remove(npt); discover(npt); } | /**
* Remove a switch port from the suppressed LLDP list. Discover links on
* that switchport.
*/ | Remove a switch port from the suppressed LLDP list. Discover links on that switchport | RemoveFromSuppressLLDPs | {
"repo_name": "pawtul/ssp_projekt",
"path": "src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java",
"license": "apache-2.0",
"size": 76003
} | [
"net.floodlightcontroller.topology.NodePortTuple",
"org.projectfloodlight.openflow.types.DatapathId",
"org.projectfloodlight.openflow.types.OFPort"
] | import net.floodlightcontroller.topology.NodePortTuple; import org.projectfloodlight.openflow.types.DatapathId; import org.projectfloodlight.openflow.types.OFPort; | import net.floodlightcontroller.topology.*; import org.projectfloodlight.openflow.types.*; | [
"net.floodlightcontroller.topology",
"org.projectfloodlight.openflow"
] | net.floodlightcontroller.topology; org.projectfloodlight.openflow; | 2,884,588 |
void serve( File defaultReply ); | void serve( File defaultReply ); | /**
* Associate a predefined response when serving specific status codes.
*
* @param defaultReply the file has to be served.
*/ | Associate a predefined response when serving specific status codes | serve | {
"repo_name": "zentaur/api",
"path": "src/main/java/org/zentaur/DefaultResponseBuilder.java",
"license": "apache-2.0",
"size": 1000
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 127,102 |
public Object saveData(Collection<DataObject> data,
List<AnnotationData> toAdd, List<AnnotationData> toRemove,
long userID)
throws DSOutOfServiceException, DSAccessException
{
if (data == null)
throw new IllegalArgumentException("No data to save");
OmeroDataService service = conte... | Object function(Collection<DataObject> data, List<AnnotationData> toAdd, List<AnnotationData> toRemove, long userID) throws DSOutOfServiceException, DSAccessException { if (data == null) throw new IllegalArgumentException(STR); OmeroDataService service = context.getDataService(); DataObject object; List<AnnotationData>... | /**
* Implemented as specified by {@link OmeroDataService}.
* @see OmeroMetadataService#saveData(Collection, List, List, long)
*/ | Implemented as specified by <code>OmeroDataService</code> | saveData | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OmeroMetadataServiceImpl.java",
"license": "gpl-2.0",
"size": 61398
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,490,040 |
boolean validateViewHolderForOffsetPosition(ViewHolder holder) {
// if it is a removed holder, nothing to verify since we cannot ask adapter anymore
// if it is not removed, verify the type and id.
if (holder.isRemoved()) {
return true;
}
... | boolean validateViewHolderForOffsetPosition(ViewHolder holder) { if (holder.isRemoved()) { return true; } if (holder.mPosition < 0 holder.mPosition >= mAdapter.getItemCount()) { throw new IndexOutOfBoundsException(STR + STR + holder); } if (!mState.isPreLayout()) { final int type = mAdapter.getItemViewType(holder.mPosi... | /**
* Helper method for getViewForPosition.
* <p>
* Checks whether a given view holder can be used for the provided position.
*
* @param holder ViewHolder
* @return true if ViewHolder matches the provided position, false otherwise
*/ | Helper method for getViewForPosition. Checks whether a given view holder can be used for the provided position | validateViewHolderForOffsetPosition | {
"repo_name": "rugram/RuGram",
"path": "TMessagesProj/src/main/java/org/telegram/android/support/widget/RecyclerView.java",
"license": "gpl-2.0",
"size": 416898
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 434,603 |
EList<Anonymous_beforeCode_2_> getAnonymous_beforeCode_2_1(); | EList<Anonymous_beforeCode_2_> getAnonymous_beforeCode_2_1(); | /**
* Returns the value of the '<em><b>Anonymous before Code 21</b></em>' containment reference list.
* The list contents are of type {@link cruise.umple.umple.Anonymous_beforeCode_2_}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Anonymous before Code 21</em>' containment reference list ... | Returns the value of the 'Anonymous before Code 21' containment reference list. The list contents are of type <code>cruise.umple.umple.Anonymous_beforeCode_2_</code>. If the meaning of the 'Anonymous before Code 21' containment reference list isn't clear, there really should be more of a description here... | getAnonymous_beforeCode_2_1 | {
"repo_name": "umple/umple",
"path": "cruise.umple.xtext/src-gen/cruise/umple/umple/BeforeCode_.java",
"license": "mit",
"size": 4066
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,795,729 |
public ExecutorService getHealthCheckExecutorService() {
return healthCheckExecutorService;
} | ExecutorService function() { return healthCheckExecutorService; } | /**
* Returns an {@link ExecutorService} to run time bound health checks
*/ | Returns an <code>ExecutorService</code> to run time bound health checks | getHealthCheckExecutorService | {
"repo_name": "ryankennedy/dropwizard",
"path": "dropwizard-core/src/main/java/io/dropwizard/setup/Environment.java",
"license": "apache-2.0",
"size": 6204
} | [
"java.util.concurrent.ExecutorService"
] | import java.util.concurrent.ExecutorService; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,509,927 |
void execute(File[] sourceDirs, File outputDir) throws Exception {
for(File f : sourceDirs) {
execute(f, outputDir);
}
} | void execute(File[] sourceDirs, File outputDir) throws Exception { for(File f : sourceDirs) { execute(f, outputDir); } } | /**
* Recursively parses the files in the hierarchy to the output directory
*/ | Recursively parses the files in the hierarchy to the output directory | execute | {
"repo_name": "Firethunder/CodenameOne",
"path": "vm/ByteCodeTranslator/src/com/codename1/tools/translator/ByteCodeTranslator.java",
"license": "gpl-2.0",
"size": 29100
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,642,659 |
@Test
public void testDateAccessors() {
assertAccessorsCorrect(new WPartialDateField(), "date", null, DateUtilities.createDate(01,
01, 2010),
DateUtilities.createDate(2, 2, 2012));
} | void function() { assertAccessorsCorrect(new WPartialDateField(), "date", null, DateUtilities.createDate(01, 01, 2010), DateUtilities.createDate(2, 2, 2012)); } | /**
* test setDate - with Date input.
*/ | test setDate - with Date input | testDateAccessors | {
"repo_name": "marksreeves/wcomponents",
"path": "wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WPartialDateField_Test.java",
"license": "gpl-3.0",
"size": 40537
} | [
"com.github.bordertech.wcomponents.util.DateUtilities"
] | import com.github.bordertech.wcomponents.util.DateUtilities; | import com.github.bordertech.wcomponents.util.*; | [
"com.github.bordertech"
] | com.github.bordertech; | 1,400,979 |
public static void setMaxConnections(final HttpClient httpClient,
int max) {
// would have been nice if there was a common interface
if (httpClient.getConnectionManager() instanceof ThreadSafeClientConnManager) {
ThreadSafeClientConnManager mgr = (ThreadSafeClientConnManager)httpClient.getConnecti... | static void function(final HttpClient httpClient, int max) { if (httpClient.getConnectionManager() instanceof ThreadSafeClientConnManager) { ThreadSafeClientConnManager mgr = (ThreadSafeClientConnManager)httpClient.getConnectionManager(); mgr.setMaxTotal(max); } else if (httpClient.getConnectionManager() instanceof Poo... | /**
* Set max total connections allowed. This call will only work when
* {@link ThreadSafeClientConnManager} or
* {@link PoolingClientConnectionManager} is used.
*/ | Set max total connections allowed. This call will only work when <code>ThreadSafeClientConnManager</code> or <code>PoolingClientConnectionManager</code> is used | setMaxConnections | {
"repo_name": "netboynb/netty-tool",
"path": "src/main/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java",
"license": "gpl-2.0",
"size": 11349
} | [
"org.apache.http.client.HttpClient",
"org.apache.http.impl.conn.PoolingClientConnectionManager"
] | import org.apache.http.client.HttpClient; import org.apache.http.impl.conn.PoolingClientConnectionManager; | import org.apache.http.client.*; import org.apache.http.impl.conn.*; | [
"org.apache.http"
] | org.apache.http; | 1,439,735 |
public static CRUDFrame getWindowList(){
CRUDFrame frame = new CajasCRUDFrame(I18nMessages.CAJA_FRAME_TITULO, UIServiceFactory.getUICajaService());
AppContext.getInstance().addToContainer((ILinkWindowList)frame);
return frame;
}
//
// public static DialogActivarCaja getWindowActivar(){
//
... | static CRUDFrame function(){ CRUDFrame frame = new CajasCRUDFrame(I18nMessages.CAJA_FRAME_TITULO, UIServiceFactory.getUICajaService()); AppContext.getInstance().addToContainer((ILinkWindowList)frame); return frame; } | /**
* ventana para listar cajas.
* @return
*/ | ventana para listar cajas | getWindowList | {
"repo_name": "iriber/miGestionUI",
"path": "src/main/java/com/migestion/ui/swing/cajas/factories/WindowCajaFactory.java",
"license": "gpl-2.0",
"size": 3501
} | [
"com.migestion.swing.navigation.interfaces.ILinkWindowList",
"com.migestion.swing.view.frames.CRUDFrame",
"com.migestion.ui.context.AppContext",
"com.migestion.ui.service.UIServiceFactory",
"com.migestion.ui.swing.cajas.CajasCRUDFrame",
"com.migestion.ui.swing.i18n.I18nMessages"
] | import com.migestion.swing.navigation.interfaces.ILinkWindowList; import com.migestion.swing.view.frames.CRUDFrame; import com.migestion.ui.context.AppContext; import com.migestion.ui.service.UIServiceFactory; import com.migestion.ui.swing.cajas.CajasCRUDFrame; import com.migestion.ui.swing.i18n.I18nMessages; | import com.migestion.swing.navigation.interfaces.*; import com.migestion.swing.view.frames.*; import com.migestion.ui.context.*; import com.migestion.ui.service.*; import com.migestion.ui.swing.cajas.*; import com.migestion.ui.swing.i18n.*; | [
"com.migestion.swing",
"com.migestion.ui"
] | com.migestion.swing; com.migestion.ui; | 2,259,084 |
@Nullable
private ConfiguredTarget createRule(
AnalysisEnvironment env,
Rule rule,
BuildConfiguration configuration,
BuildConfiguration hostConfiguration,
OrderedSetMultimap<Attribute, ConfiguredTarget> prerequisiteMap,
ImmutableMap<Label, ConfigMatchingProvider> configConditions... | ConfiguredTarget function( AnalysisEnvironment env, Rule rule, BuildConfiguration configuration, BuildConfiguration hostConfiguration, OrderedSetMultimap<Attribute, ConfiguredTarget> prerequisiteMap, ImmutableMap<Label, ConfigMatchingProvider> configConditions, ToolchainContext toolchainContext) throws InterruptedExcep... | /**
* Factory method: constructs a RuleConfiguredTarget of the appropriate class, based on the rule
* class. May return null if an error occurred.
*/ | Factory method: constructs a RuleConfiguredTarget of the appropriate class, based on the rule class. May return null if an error occurred | createRule | {
"repo_name": "damienmg/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/ConfiguredTargetFactory.java",
"license": "apache-2.0",
"size": 23098
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.analysis.config.ConfigMatchingProvider",
"com.google.devtools.build.lib.analysis.skylark.SkylarkRuleConfiguredTargetUtil",
... | import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.analysis.config.ConfigMatchingProvider; import com.google.devtools.build.lib.analysis.skylark.SkylarkRuleConfigured... | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.analysis.skylark.*; import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.util.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 495,007 |
public HttpClientParams getClientParams() {
return clientParams;
} | HttpClientParams function() { return clientParams; } | /**
* Provide access to the client parameters used on new {@link HttpClient} instances
* used by producers or consumers of this endpoint.
*/ | Provide access to the client parameters used on new <code>HttpClient</code> instances used by producers or consumers of this endpoint | getClientParams | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java",
"license": "apache-2.0",
"size": 12194
} | [
"org.apache.commons.httpclient.params.HttpClientParams"
] | import org.apache.commons.httpclient.params.HttpClientParams; | import org.apache.commons.httpclient.params.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,381,962 |
ServiceFuture<List<DataLakeAnalyticsAccountBasic>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<DataLakeAnalyticsAccountBasic> serviceCallback); | ServiceFuture<List<DataLakeAnalyticsAccountBasic>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<DataLakeAnalyticsAccountBasic> serviceCallback); | /**
* Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any.
*
* @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.
* @param serviceCallback the async Serv... | Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any | listByResourceGroupAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java",
"license": "mit",
"size": 49196
} | [
"com.microsoft.azure.ListOperationCallback",
"com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountBasic",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountBasic; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.util"
] | com.microsoft.azure; com.microsoft.rest; java.util; | 307,781 |
EAttribute getType_Datatype(); | EAttribute getType_Datatype(); | /**
* Returns the meta object for the attribute '{@link net.blimster.gwt.threejs.wdl.threeJsWrapperDescriptionLanguage.Type#getDatatype <em>Datatype</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Datatype</em>'.
* @see net.blimster.gwt.threejs.w... | Returns the meta object for the attribute '<code>net.blimster.gwt.threejs.wdl.threeJsWrapperDescriptionLanguage.Type#getDatatype Datatype</code>'. | getType_Datatype | {
"repo_name": "Blimster/three4g",
"path": "net.blimster.gwt.threejs.wdl/src-gen/net/blimster/gwt/threejs/wdl/threeJsWrapperDescriptionLanguage/ThreeJsWrapperDescriptionLanguagePackage.java",
"license": "lgpl-3.0",
"size": 48992
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,479,105 |
@Override
public void addView(View child) {
throw new UnsupportedOperationException("addView(View) is not supported in AdapterView");
} | void function(View child) { throw new UnsupportedOperationException(STR); } | /**
* This method is not supported and throws an UnsupportedOperationException when called.
*
* @param child Ignored.
*
* @throws UnsupportedOperationException Every time this method is invoked.
*/ | This method is not supported and throws an UnsupportedOperationException when called | addView | {
"repo_name": "pengqinping/androidProject",
"path": "CustomeGallery/MyGallery/src/seker/mygallery/view/MyAdapterView.java",
"license": "gpl-3.0",
"size": 37642
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 126,496 |
WebSocketPolicy getPolicy(); | WebSocketPolicy getPolicy(); | /**
* Get the policy that the connection is running under.
*
* @return the policy for the connection
*/ | Get the policy that the connection is running under | getPolicy | {
"repo_name": "hypercube1024/firefly",
"path": "firefly-net/src/main/java/com/fireflysource/net/websocket/common/WebSocketConnection.java",
"license": "apache-2.0",
"size": 2279
} | [
"com.fireflysource.net.websocket.common.model.WebSocketPolicy"
] | import com.fireflysource.net.websocket.common.model.WebSocketPolicy; | import com.fireflysource.net.websocket.common.model.*; | [
"com.fireflysource.net"
] | com.fireflysource.net; | 2,580,295 |
private synchronized void updateSubscribeRate(ConsumerIdentifier consumerIdentifier, SubscribeRate subscribeRate) {
long ratePerConsumer = subscribeRate.subscribeThrottlingRatePerConsumer;
long ratePeriod = subscribeRate.ratePeriodInSecond;
// update subscribe-rateLimiter
if (rateP... | synchronized void function(ConsumerIdentifier consumerIdentifier, SubscribeRate subscribeRate) { long ratePerConsumer = subscribeRate.subscribeThrottlingRatePerConsumer; long ratePeriod = subscribeRate.ratePeriodInSecond; if (ratePerConsumer > 0) { if (this.subscribeRateLimiter.get(consumerIdentifier) == null) { this.s... | /**
* Update subscribe rate by updating rate-limiter. If subscribe-rate is configured < 0 then it closes
* the rate-limiter and disables appropriate rate-limiter.
*
* @param subscribeRate
*/ | Update subscribe rate by updating rate-limiter. If subscribe-rate is configured < 0 then it closes the rate-limiter and disables appropriate rate-limiter | updateSubscribeRate | {
"repo_name": "ArvinDevel/incubator-pulsar",
"path": "pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/SubscribeRateLimiter.java",
"license": "apache-2.0",
"size": 11505
} | [
"java.util.concurrent.TimeUnit",
"org.apache.pulsar.common.policies.data.SubscribeRate",
"org.apache.pulsar.common.util.RateLimiter"
] | import java.util.concurrent.TimeUnit; import org.apache.pulsar.common.policies.data.SubscribeRate; import org.apache.pulsar.common.util.RateLimiter; | import java.util.concurrent.*; import org.apache.pulsar.common.policies.data.*; import org.apache.pulsar.common.util.*; | [
"java.util",
"org.apache.pulsar"
] | java.util; org.apache.pulsar; | 1,938,347 |
@NotNull
protected static Pair<String, String> parse() {
SelectionModel selectionModel = myEditor.getSelectionModel();
if (!selectionModel.hasSelection()) {
return new Pair<>(null, myEditor.getDocument().getText());
}
CharSequence text = myEditor.getDocument().getCharsSequence();
Stri... | static Pair<String, String> function() { SelectionModel selectionModel = myEditor.getSelectionModel(); if (!selectionModel.hasSelection()) { return new Pair<>(null, myEditor.getDocument().getText()); } CharSequence text = myEditor.getDocument().getCharsSequence(); String selectedText = text.subSequence(selectionModel.g... | /**
* Checks current editor and returns tuple of {@code (selected text; text over than selected)}.
*
* @return tuple of {@code (selected text; text over than selected)}.
*/ | Checks current editor and returns tuple of (selected text; text over than selected) | parse | {
"repo_name": "vvv1559/intellij-community",
"path": "platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/AbstractRegionToKillRingTest.java",
"license": "apache-2.0",
"size": 2325
} | [
"com.intellij.openapi.editor.SelectionModel",
"com.intellij.openapi.util.Pair"
] | import com.intellij.openapi.editor.SelectionModel; import com.intellij.openapi.util.Pair; | import com.intellij.openapi.editor.*; import com.intellij.openapi.util.*; | [
"com.intellij.openapi"
] | com.intellij.openapi; | 2,085,498 |
@Column(name = "drink_by_date")
public LocalDate getDrinkByDate() {
return (LocalDate) get(8);
} | @Column(name = STR) LocalDate function() { return (LocalDate) get(8); } | /**
* Getter for <code>public.cellared_drink.drink_by_date</code>.
*/ | Getter for <code>public.cellared_drink.drink_by_date</code> | getDrinkByDate | {
"repo_name": "CellarHQ/cellarhq.com",
"path": "model/src/main/generated/com/cellarhq/generated/tables/records/CellaredDrinkRecord.java",
"license": "mit",
"size": 15928
} | [
"java.time.LocalDate",
"javax.persistence.Column"
] | import java.time.LocalDate; import javax.persistence.Column; | import java.time.*; import javax.persistence.*; | [
"java.time",
"javax.persistence"
] | java.time; javax.persistence; | 1,336,362 |
protected void sequence_Service(ISerializationContext context, ServiceCS semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, ServiceCS semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* Service returns ServiceCS
*
* Constraint:
* (name=ID dimensions+=QosDimension*)
*/ | Contexts: Service returns ServiceCS Constraint: (name=ID dimensions+=QosDimension*) | sequence_Service | {
"repo_name": "upohl/eloquent",
"path": "plugins/org.muml.psm.allocation.language.xtext/src-gen/org/muml/psm/allocation/language/xtext/serializer/AbstractAllocationSpecificationLanguageSemanticSequencer.java",
"license": "epl-1.0",
"size": 39665
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.muml.psm.allocation.language.cs.ServiceCS"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.muml.psm.allocation.language.cs.ServiceCS; | import org.eclipse.xtext.serializer.*; import org.muml.psm.allocation.language.cs.*; | [
"org.eclipse.xtext",
"org.muml.psm"
] | org.eclipse.xtext; org.muml.psm; | 2,579,617 |
public void writeExif(InputStream jpegStream, String exifOutFileName)
throws FileNotFoundException, IOException {
if (jpegStream == null || exifOutFileName == null) {
throw new IllegalArgumentException(NULL_ARGUMENT_STRING);
}
OutputStream s = null;
try {
... | void function(InputStream jpegStream, String exifOutFileName) throws FileNotFoundException, IOException { if (jpegStream == null exifOutFileName == null) { throw new IllegalArgumentException(NULL_ARGUMENT_STRING); } OutputStream s = null; try { s = getExifWriterStream(exifOutFileName); doExifStreamIO(jpegStream, s); s.... | /**
* Writes the tags from this ExifInterface object into a jpeg stream,
* removing prior exif tags.
*
* @param jpegStream an InputStream containing a jpeg compressed image.
* @param exifOutFileName a String containing the filepath to which the jpeg
* image with added exif tags ... | Writes the tags from this ExifInterface object into a jpeg stream, removing prior exif tags | writeExif | {
"repo_name": "bmaupin/android-sms-plus",
"path": "src/com/android/mms/exif/ExifInterface.java",
"license": "apache-2.0",
"size": 92509
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream"
] | import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 905,022 |
public void testNext() {
Hour h = new Hour(1, 12, 12, 2000);
h = (Hour) h.next();
assertEquals(2000, h.getYear());
assertEquals(12, h.getMonth());
assertEquals(12, h.getDayOfMonth());
assertEquals(2, h.getHour());
h = new Hour(23, 31, 12, 9999);
assert... | void function() { Hour h = new Hour(1, 12, 12, 2000); h = (Hour) h.next(); assertEquals(2000, h.getYear()); assertEquals(12, h.getMonth()); assertEquals(12, h.getDayOfMonth()); assertEquals(2, h.getHour()); h = new Hour(23, 31, 12, 9999); assertNull(h.next()); } | /**
* Some checks for the testNext() method.
*/ | Some checks for the testNext() method | testNext | {
"repo_name": "JSansalone/JFreeChart",
"path": "tests/org/jfree/data/time/junit/HourTests.java",
"license": "lgpl-2.1",
"size": 12693
} | [
"org.jfree.data.time.Hour"
] | import org.jfree.data.time.Hour; | import org.jfree.data.time.*; | [
"org.jfree.data"
] | org.jfree.data; | 708,347 |
public GuidedActionsStylist onCreateButtonActionsStylist() {
GuidedActionsStylist stylist = new GuidedActionsStylist();
stylist.setAsButtonActions();
return stylist;
} | GuidedActionsStylist function() { GuidedActionsStylist stylist = new GuidedActionsStylist(); stylist.setAsButtonActions(); return stylist; } | /**
* Creates the presenter used to style a sided actions panel for button only.
* The default implementation returns a basic GuidedActionsStylist.
* @return The GuidedActionsStylist used in this fragment.
*/ | Creates the presenter used to style a sided actions panel for button only. The default implementation returns a basic GuidedActionsStylist | onCreateButtonActionsStylist | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "leanback/src/main/java/androidx/leanback/app/GuidedStepFragment.java",
"license": "apache-2.0",
"size": 63362
} | [
"androidx.leanback.widget.GuidedActionsStylist"
] | import androidx.leanback.widget.GuidedActionsStylist; | import androidx.leanback.widget.*; | [
"androidx.leanback"
] | androidx.leanback; | 1,126,747 |
@Deprecated
public void setTypeId(int type) {
this.type = type;
if (this.meta != null) {
this.meta = Bukkit.getItemFactory().asMetaFor(meta, getType0());
}
createData((byte) 0);
} | void function(int type) { this.type = type; if (this.meta != null) { this.meta = Bukkit.getItemFactory().asMetaFor(meta, getType0()); } createData((byte) 0); } | /**
* Sets the type id of this item
* <p>
* Note that in doing so you will reset the MaterialData for this stack
*
* @param type New type id to set the items in this stack to
* @deprecated Magic value
*/ | Sets the type id of this item Note that in doing so you will reset the MaterialData for this stack | setTypeId | {
"repo_name": "MasterMarkHarmon/Spigot",
"path": "src/main/java/org/bukkit/inventory/ItemStack.java",
"license": "gpl-3.0",
"size": 17865
} | [
"org.bukkit.Bukkit"
] | import org.bukkit.Bukkit; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 823,039 |
TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();
// BEGIN: com.azure.monitor.query.LogsQueryClient.instantiation
LogsQueryClient logsQueryClient = new LogsQueryClientBuilder()
.credential(tokenCredential)
.buildClient();
// END: com.a... | TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient(); LogsQueryAsyncClient logsQueryAsyncClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildAsyncClient(); } | /**
* Code snippet for creating a logs query client.
*/ | Code snippet for creating a logs query client | instantiation | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/codesnippets/LogsQueryClientJavaDocCodeSnippets.java",
"license": "mit",
"size": 8786
} | [
"com.azure.core.credential.TokenCredential",
"com.azure.identity.DefaultAzureCredentialBuilder",
"com.azure.monitor.query.LogsQueryAsyncClient",
"com.azure.monitor.query.LogsQueryClient",
"com.azure.monitor.query.LogsQueryClientBuilder"
] | import com.azure.core.credential.TokenCredential; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.monitor.query.LogsQueryAsyncClient; import com.azure.monitor.query.LogsQueryClient; import com.azure.monitor.query.LogsQueryClientBuilder; | import com.azure.core.credential.*; import com.azure.identity.*; import com.azure.monitor.query.*; | [
"com.azure.core",
"com.azure.identity",
"com.azure.monitor"
] | com.azure.core; com.azure.identity; com.azure.monitor; | 2,696,521 |
public List<ServerName> getSlavesAddresses(String peerClusterId) {
if (this.peerClusters.size() == 0) {
return Collections.emptyList();
}
ReplicationPeer peer = this.peerClusters.get(peerClusterId);
if (peer == null) {
return Collections.emptyList();
}
List<ServerName> address... | List<ServerName> function(String peerClusterId) { if (this.peerClusters.size() == 0) { return Collections.emptyList(); } ReplicationPeer peer = this.peerClusters.get(peerClusterId); if (peer == null) { return Collections.emptyList(); } List<ServerName> addresses; try { addresses = fetchSlavesAddresses(peer.getZkw()); }... | /**
* Returns all region servers from given peer
*
* @param peerClusterId (byte) the cluster to interrogate
* @return addresses of all region servers
*/ | Returns all region servers from given peer | getSlavesAddresses | {
"repo_name": "indi60/hbase-pmc",
"path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java",
"license": "apache-2.0",
"size": 29800
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hbase.ServerName",
"org.apache.zookeeper.KeeperException"
] | import java.io.IOException; import java.util.Collections; import java.util.List; import org.apache.hadoop.hbase.ServerName; import org.apache.zookeeper.KeeperException; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.zookeeper.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.zookeeper"
] | java.io; java.util; org.apache.hadoop; org.apache.zookeeper; | 1,001,303 |
StringBuilder output = new StringBuilder();
boolean success = AppleScript.execute("count {\"How\", \"many\", \"items\", \"in\", \"this\", \"list\"}", output);
if(OsFamily.MAC_OS_X.isCurrent()) {
// Assert that the script was executed successfully and that the output matches what is expected... | StringBuilder output = new StringBuilder(); boolean success = AppleScript.execute(STRHow\STRmany\STRitems\STRin\STRthis\STRlist\"}", output); if(OsFamily.MAC_OS_X.isCurrent()) { assert success; assert "6".equals(output.toString()); } else { assert !success; } } | /**
* Tests a simple AppleScript that outputs something to stdout.
*/ | Tests a simple AppleScript that outputs something to stdout | testScriptOutput | {
"repo_name": "jorgevasquezp/mucommander",
"path": "src/test/com/mucommander/ui/macosx/AppleScriptTest.java",
"license": "gpl-3.0",
"size": 3598
} | [
"com.mucommander.commons.runtime.OsFamily"
] | import com.mucommander.commons.runtime.OsFamily; | import com.mucommander.commons.runtime.*; | [
"com.mucommander.commons"
] | com.mucommander.commons; | 2,080,113 |
public byte readByte() throws IOException {
return dataInputStream.readByte();
} | byte function() throws IOException { return dataInputStream.readByte(); } | /**
* Read byte.
*
* @return the byte
*
* @throws IOException Signals that an I/O exception has occurred.
*/ | Read byte | readByte | {
"repo_name": "Adirockzz95/GenderDetect",
"path": "src/src/fr/lium/spkDiarization/lib/IOFile.java",
"license": "gpl-3.0",
"size": 11395
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,789,409 |
protected void validateDateTime(String value, int month, int day, int year,
int hours, int minutes, int seconds) {
Date date = parseSingleDate(value);
validateDateTime(date, month, day, year, hours, minutes, seconds);
} | void function(String value, int month, int day, int year, int hours, int minutes, int seconds) { Date date = parseSingleDate(value); validateDateTime(date, month, day, year, hours, minutes, seconds); } | /**
*
* Asserts that the given string value parses down to the given
* month, day, year, hours, minutes, and seconds
*
* @param value
* @param month
* @param day
* @param year
* @param hours
* @param minutes
* @param seconds
*/ | Asserts that the given string value parses down to the given month, day, year, hours, minutes, and seconds | validateDateTime | {
"repo_name": "etourdot/natty",
"path": "src/test/java/com/joestelmach/natty/AbstractTest.java",
"license": "mit",
"size": 4148
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 714,428 |
@Override
public void close() throws IOException {
if (!this.closed) {
this.closed = true;
finish();
this.out.flush();
}
} | void function() throws IOException { if (!this.closed) { this.closed = true; finish(); this.out.flush(); } } | /**
* Finishes writing to the underlying stream, but does NOT close the underlying stream.
*/ | Finishes writing to the underlying stream, but does NOT close the underlying stream | close | {
"repo_name": "mcomella/FirefoxAccounts-android",
"path": "thirdparty/src/main/java/ch/boye/httpclientandroidlib/impl/io/ChunkedOutputStream.java",
"license": "mpl-2.0",
"size": 6955
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,580,025 |
public int compareTo(XMLString xstr)
{
int len1 = this.length();
int len2 = xstr.length();
int n = Math.min(len1, len2);
int i = 0;
int j = 0;
while (n-- != 0)
{
char c1 = this.charAt(i);
char c2 = xstr.charAt(j);
if (c1 != c2)
{
return c1 - c2;
}... | int function(XMLString xstr) { int len1 = this.length(); int len2 = xstr.length(); int n = Math.min(len1, len2); int i = 0; int j = 0; while (n-- != 0) { char c1 = this.charAt(i); char c2 = xstr.charAt(j); if (c1 != c2) { return c1 - c2; } i++; j++; } return len1 - len2; } | /**
* Compares two strings lexicographically.
*
* @param xstr the <code>String</code> to be compared.
*
* @return the value <code>0</code> if the argument string is equal to
* this string; a value less than <code>0</code> if this string
* is lexicographically less than the st... | Compares two strings lexicographically | compareTo | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XString.java",
"license": "gpl-2.0",
"size": 37074
} | [
"com.sun.org.apache.xml.internal.utils.XMLString"
] | import com.sun.org.apache.xml.internal.utils.XMLString; | import com.sun.org.apache.xml.internal.utils.*; | [
"com.sun.org"
] | com.sun.org; | 1,964,630 |
protected void setRealmService(RealmService realmService) {
if (log.isDebugEnabled()) {
log.debug("DefaultUserRealm set in Entitlement bundle");
}
EntitlementServiceComponent.realmservice = realmService;
} | void function(RealmService realmService) { if (log.isDebugEnabled()) { log.debug(STR); } EntitlementServiceComponent.realmservice = realmService; } | /**
* sets realm service
*
* @param realmService <code>RealmService</code>
*/ | sets realm service | setRealmService | {
"repo_name": "laki88/carbon-identity",
"path": "components/entitlement/org.wso2.carbon.identity.entitlement/src/main/java/org/wso2/carbon/identity/entitlement/internal/EntitlementServiceComponent.java",
"license": "apache-2.0",
"size": 19641
} | [
"org.wso2.carbon.user.core.service.RealmService"
] | import org.wso2.carbon.user.core.service.RealmService; | import org.wso2.carbon.user.core.service.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 354,902 |
public static double closeColor(BufferedImage image, Color color) {
double colorDistance = 0;
int STEP = 20;
if (image.getWidth() * 4 < STEP || image.getHeight() * 4 < STEP) {
STEP = 1;
}
int maxDistance = getColorDistance(Color.WHITE, Color.BLACK);
int imageSize = ((STEP + 1) * (STEP + 1));
int c =... | static double function(BufferedImage image, Color color) { double colorDistance = 0; int STEP = 20; if (image.getWidth() * 4 < STEP image.getHeight() * 4 < STEP) { STEP = 1; } int maxDistance = getColorDistance(Color.WHITE, Color.BLACK); int imageSize = ((STEP + 1) * (STEP + 1)); int c = 0; for (int x = 0; x < image.ge... | /**
* search a color inside a image.
*
* @param image
* @param color
* @return the distance from all pixels to color (0:no difference (all pixel are
* the same and is exactly the color value) 1 : max difference (image in
* black and color is white)).
*/ | search a color inside a image | closeColor | {
"repo_name": "Javlo/javlo",
"path": "src/main/java/org/javlo/image/ImageEngine.java",
"license": "lgpl-3.0",
"size": 72834
} | [
"java.awt.Color",
"java.awt.image.BufferedImage"
] | import java.awt.Color; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 304,699 |
@Override
public RpcClient createTls(Context ctx, String target, TlsOptions tlsOptions) {
final SslContextBuilder sslContextBuilder = GrpcSslContexts.forClient();
// trustManager should always be set
final KeyStore trustStore = loadKeyStore(tlsOptions.getTrustStore(), tlsOptions.getTrustStorePassword()... | RpcClient function(Context ctx, String target, TlsOptions tlsOptions) { final SslContextBuilder sslContextBuilder = GrpcSslContexts.forClient(); final KeyStore trustStore = loadKeyStore(tlsOptions.getTrustStore(), tlsOptions.getTrustStorePassword()); if (trustStore == null) { throw new RuntimeException(STR); } final X5... | /**
* <p>Factory method to construct a gRPC client connection with transport-layer security.</p>
*
* <p>Within the <code>tlsOptions</code> parameter value, the <code>trustStore</code> field should
* always be populated. All other fields are optional.</p>
*
* @param ctx TODO: This parameter is not act... | Factory method to construct a gRPC client connection with transport-layer security. Within the <code>tlsOptions</code> parameter value, the <code>trustStore</code> field should always be populated. All other fields are optional | createTls | {
"repo_name": "NazarethCollege/heweb2017-devops-presentation",
"path": "sites/tweetheat/src/backend/vendor/src/github.com/youtube/vitess/java/grpc-client/src/main/java/io/vitess/client/grpc/GrpcClientFactory.java",
"license": "mit",
"size": 13234
} | [
"io.grpc.netty.GrpcSslContexts",
"io.grpc.netty.NegotiationType",
"io.grpc.netty.NettyChannelBuilder",
"io.netty.handler.ssl.SslContext",
"io.netty.handler.ssl.SslContextBuilder",
"io.vitess.client.Context",
"io.vitess.client.RpcClient",
"io.vitess.client.grpc.tls.TlsOptions",
"java.security.KeyStor... | import io.grpc.netty.GrpcSslContexts; import io.grpc.netty.NegotiationType; import io.grpc.netty.NettyChannelBuilder; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.vitess.client.Context; import io.vitess.client.RpcClient; import io.vitess.client.grpc.tls.TlsOptions; im... | import io.grpc.netty.*; import io.netty.handler.ssl.*; import io.vitess.client.*; import io.vitess.client.grpc.tls.*; import java.security.*; import java.security.cert.*; import javax.net.ssl.*; | [
"io.grpc.netty",
"io.netty.handler",
"io.vitess.client",
"java.security",
"javax.net"
] | io.grpc.netty; io.netty.handler; io.vitess.client; java.security; javax.net; | 1,721,489 |
List<QApplicationModule> getModules(); | List<QApplicationModule> getModules(); | /**
* Returns the value of the '<em><b>Modules</b></em>' containment reference list.
* The list contents are of type {@link org.smeup.sys.rt.core.QApplicationModule}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Modules</em>' reference list isn't clear,
* there really should be more of a des... | Returns the value of the 'Modules' containment reference list. The list contents are of type <code>org.smeup.sys.rt.core.QApplicationModule</code>. If the meaning of the 'Modules' reference list isn't clear, there really should be more of a description here... | getModules | {
"repo_name": "smeup/asup",
"path": "org.smeup.sys.rt.core/src/org/smeup/sys/rt/core/QApplicationComponent.java",
"license": "epl-1.0",
"size": 4907
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,477,632 |
public void setScienceAppManagerPersistence(
ScienceAppManagerPersistence scienceAppManagerPersistence) {
this.scienceAppManagerPersistence = scienceAppManagerPersistence;
} | void function( ScienceAppManagerPersistence scienceAppManagerPersistence) { this.scienceAppManagerPersistence = scienceAppManagerPersistence; } | /**
* Sets the science app manager persistence.
*
* @param scienceAppManagerPersistence the science app manager persistence
*/ | Sets the science app manager persistence | setScienceAppManagerPersistence | {
"repo_name": "queza85/edison",
"path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/RequiredLibServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 52463
} | [
"org.kisti.edison.science.service.persistence.ScienceAppManagerPersistence"
] | import org.kisti.edison.science.service.persistence.ScienceAppManagerPersistence; | import org.kisti.edison.science.service.persistence.*; | [
"org.kisti.edison"
] | org.kisti.edison; | 2,156,648 |
public static <T> List<Pair<T, T>> list(T... data) {
if (data.length % 2 != 0) {
throw new IllegalArgumentException(
"Pair list factory requires an even number of arguments.");
}
List<Pair<T, T>> pairList = Lists.newArrayListWithCapacity(data.length /... | static <T> List<Pair<T, T>> function(T... data) { if (data.length % 2 != 0) { throw new IllegalArgumentException( STR); } List<Pair<T, T>> pairList = Lists.newArrayListWithCapacity(data.length / 2); T pairFirst = null; for (T datum: data) { if (pairFirst == null) { pairFirst = datum; } else { pairList.add(Pair.of(pairF... | /**
* Static factory for pair lists. Builds a list of pairs, where the first
* two items in the data set are the first and second items in the first
* pair, and so on.
* @param data The data that will comprise the pairs. Must contain an even
* number of items.
* @return An im... | Static factory for pair lists. Builds a list of pairs, where the first two items in the data set are the first and second items in the first pair, and so on | list | {
"repo_name": "dmhuff/Kuebiko",
"path": "src/main/java/dmh/kuebiko/util/Pair.java",
"license": "bsd-3-clause",
"size": 3276
} | [
"com.google.common.collect.Lists",
"java.util.Collections",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,779,395 |
@Override
public void setQueryTimeout(int seconds) throws SQLException {
try {
checkClosed();
if (seconds < 0) {
throw JdbcException.getInvalidValueException("seconds", seconds);
}
conn.setQueryTimeout(seconds);
} catch (Exception e) {
throw Logger.logAndConvert(log, e)... | void function(int seconds) throws SQLException { try { checkClosed(); if (seconds < 0) { throw JdbcException.getInvalidValueException(STR, seconds); } conn.setQueryTimeout(seconds); } catch (Exception e) { throw Logger.logAndConvert(log, e); } } | /**
* Sets the current query timeout in seconds. Changing the value will affect
* all statements of this connection. This method does not commit a
* transaction, and rolling back a transaction does not affect this setting.
*
* @param seconds
* the timeout in seconds - 0 means no timeout, val... | Sets the current query timeout in seconds. Changing the value will affect all statements of this connection. This method does not commit a transaction, and rolling back a transaction does not affect this setting | setQueryTimeout | {
"repo_name": "fengshao0907/wasp",
"path": "src/main/java/com/alibaba/wasp/jdbc/JdbcStatement.java",
"license": "apache-2.0",
"size": 28665
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,372,384 |
public Observable<ServiceResponse<Page<TldLegalAgreementInner>>> listTopLevelDomainAgreementsSinglePageAsync(final String name, final Boolean includePrivacy) {
if (name == null) {
throw new IllegalArgumentException("Parameter name is required and cannot be null.");
}
if (this.cli... | Observable<ServiceResponse<Page<TldLegalAgreementInner>>> function(final String name, final Boolean includePrivacy) { if (name == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new Il... | /**
* Lists legal agreements that user needs to accept before purchasing domain.
*
ServiceResponse<PageImpl<TldLegalAgreementInner>> * @param name Name of the top level domain
ServiceResponse<PageImpl<TldLegalAgreementInner>> * @param includePrivacy If true then the list of agreements will inclue agre... | Lists legal agreements that user needs to accept before purchasing domain | listTopLevelDomainAgreementsSinglePageAsync | {
"repo_name": "herveyw/azure-sdk-for-java",
"path": "azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java",
"license": "mit",
"size": 37342
} | [
"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; | 836,865 |
public static void makeColorSchemes(PApplet app) {
// If the palettes have not been created then create them
// otherwise do nothing
if(palettes != null)
return;
// Load the image
PImage image = null;;
InputStream is = app.createInput("user_gui_palette.png");
if(is != null){
try {
i... | static void function(PApplet app) { if(palettes != null) return; PImage image = null;; InputStream is = app.createInput(STR); if(is != null){ try { is.close(); } catch (IOException e) { e.printStackTrace(); } image = app.loadImage(STR); GMessenger.message(USER_COL_SCHEME, null); } else { image = app.loadImage(STR); } p... | /**
* Called every time we create a control. The palettes will be made when
* the first control is created.
*
* @param app
*/ | Called every time we create a control. The palettes will be made when the first control is created | makeColorSchemes | {
"repo_name": "vbuendia/lfsom",
"path": "lfsom/contents/libraries/G4P/src/g4p_controls/GCScheme.java",
"license": "apache-2.0",
"size": 4530
} | [
"java.awt.Color",
"java.io.IOException",
"java.io.InputStream"
] | import java.awt.Color; import java.io.IOException; import java.io.InputStream; | import java.awt.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 1,358,756 |
String getUserName(final HttpServletRequest httpServletRequest); | String getUserName(final HttpServletRequest httpServletRequest); | /**
* Gets the user name of the current logged in user.
*
* @param httpServletRequest {@link HttpServletRequest} request attribute used to save the fetched result in session.
* @return <code>NULL</code> in case of errors otherwise user name.
*/ | Gets the user name of the current logged in user | getUserName | {
"repo_name": "ungerik/ephesoft",
"path": "Ephesoft_Community_Release_4.0.2.0/source/gxt/gxt-core/src/main/java/com/ephesoft/gxt/core/server/security/service/AuthorizationService.java",
"license": "agpl-3.0",
"size": 5722
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,521,301 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.