method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static AlluxioBlockStore create(FileSystemContext context) { return new AlluxioBlockStore(context, NetworkAddressUtils.getClientHostName()); } public AlluxioBlockStore(FileSystemContext context, String localHostName) { mContext = context; mLocalHostName = localHostName; mRandom = new Ra...
static AlluxioBlockStore function(FileSystemContext context) { return new AlluxioBlockStore(context, NetworkAddressUtils.getClientHostName()); } public AlluxioBlockStore(FileSystemContext context, String localHostName) { mContext = context; mLocalHostName = localHostName; mRandom = new Random(); }
/** * Creates an Alluxio block store with default local hostname. * * @param context the file system context * @return the {@link AlluxioBlockStore} created */
Creates an Alluxio block store with default local hostname
create
{ "repo_name": "jsimsa/alluxio", "path": "core/client/fs/src/main/java/alluxio/client/block/AlluxioBlockStore.java", "license": "apache-2.0", "size": 10565 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,517,491
// Pass the call callcontext used to create the subscription event public void checkSubscriptionEventCreated(final UUID bundleId, final UUID subscriptionEventId, final CallContext context) { final List<AuditLog> auditLogsForSubscriptionEvent = getAuditLogsForSubscriptionEvent(bundleId, subscriptionEvent...
void function(final UUID bundleId, final UUID subscriptionEventId, final CallContext context) { final List<AuditLog> auditLogsForSubscriptionEvent = getAuditLogsForSubscriptionEvent(bundleId, subscriptionEventId, context); Assert.assertEquals(auditLogsForSubscriptionEvent.size(), 1); checkAuditLog(ChangeType.INSERT, co...
/** * ******************************************** SUBSCRIPTION EVENTS ******************************************************* */
SUBSCRIPTION EVENTS
checkSubscriptionEventCreated
{ "repo_name": "liqianggao/killbill", "path": "beatrix/src/test/java/org/killbill/billing/beatrix/util/AuditChecker.java", "license": "apache-2.0", "size": 14941 }
[ "java.util.List", "org.killbill.billing.subscription.engine.dao.SubscriptionEventSqlDao", "org.killbill.billing.util.audit.AuditLog", "org.killbill.billing.util.audit.ChangeType", "org.killbill.billing.util.callcontext.CallContext", "org.testng.Assert" ]
import java.util.List; import org.killbill.billing.subscription.engine.dao.SubscriptionEventSqlDao; import org.killbill.billing.util.audit.AuditLog; import org.killbill.billing.util.audit.ChangeType; import org.killbill.billing.util.callcontext.CallContext; import org.testng.Assert;
import java.util.*; import org.killbill.billing.subscription.engine.dao.*; import org.killbill.billing.util.audit.*; import org.killbill.billing.util.callcontext.*; import org.testng.*;
[ "java.util", "org.killbill.billing", "org.testng" ]
java.util; org.killbill.billing; org.testng;
1,560,880
public ThreadStatusMsg getThreadStatus() { return this.threadStatus; }
ThreadStatusMsg function() { return this.threadStatus; }
/** * Return the internal status object, this allows methods that perform updates to be passed the status object * and not the entire thread. * * @return thread status object */
Return the internal status object, this allows methods that perform updates to be passed the status object and not the entire thread
getThreadStatus
{ "repo_name": "chetrebman/fedoraApp", "path": "src/edu/du/penrose/systems/fedoraApp/batchIngest/bus/BatchThreadHolder.java", "license": "gpl-3.0", "size": 4666 }
[ "edu.du.penrose.systems.fedoraApp.batchIngest.data.ThreadStatusMsg" ]
import edu.du.penrose.systems.fedoraApp.batchIngest.data.ThreadStatusMsg;
import edu.du.penrose.systems.*;
[ "edu.du.penrose" ]
edu.du.penrose;
1,649,736
public Object getParameter(String name) throws DOMException { if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) { return ((fFeatures & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE; } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) { return ((fFeatures &...
Object function(String name) throws DOMException { if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) { return ((fFeatures & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE; } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) { return ((fFeatures & CDATA) != 0) ? Boolean.TRUE : Boolean.FALSE; } else if...
/** * This method returns the value of a parameter if known. * * @see org.w3c.dom.DOMConfiguration#getParameter(java.lang.String) * * @param name A String containing the DOMConfiguration parameter name * whose value is to be returned. * @return Object The value of the p...
This method returns the value of a parameter if known
getParameter
{ "repo_name": "mirego/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java", "license": "apache-2.0", "size": 74517 }
[ "org.apache.xml.serializer.utils.MsgKey", "org.apache.xml.serializer.utils.Utils", "org.w3c.dom.DOMException" ]
import org.apache.xml.serializer.utils.MsgKey; import org.apache.xml.serializer.utils.Utils; import org.w3c.dom.DOMException;
import org.apache.xml.serializer.utils.*; import org.w3c.dom.*;
[ "org.apache.xml", "org.w3c.dom" ]
org.apache.xml; org.w3c.dom;
966,470
public String getCdeBrowserUrl(Connection conn_);
String function(Connection conn_);
/** * Get the CDE Browser Url * * @param conn_ an existing database connection * @return the URL */
Get the CDE Browser Url
getCdeBrowserUrl
{ "repo_name": "NCIP/cadsr-sentinel", "path": "software/src/java/gov/nih/nci/cadsr/sentinel/database/DBAlert.java", "license": "bsd-3-clause", "size": 73851 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
572,852
public OutputStream getOutputStream(OutputStream out) throws IOException { if (!saslClient.isComplete()) { throw new IOException("Sasl authentication exchange hasn't completed yet"); } return new SaslOutputStream(out, saslClient); }
OutputStream function(OutputStream out) throws IOException { if (!saslClient.isComplete()) { throw new IOException(STR); } return new SaslOutputStream(out, saslClient); }
/** * Get a SASL wrapped OutputStream. Can be called only after saslConnect() has * been called. * * @param out * the OutputStream to wrap * @return a SASL wrapped OutputStream * @throws IOException */
Get a SASL wrapped OutputStream. Can be called only after saslConnect() has been called
getOutputStream
{ "repo_name": "throughsky/lywebank", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/security/HBaseSaslRpcClient.java", "license": "apache-2.0", "size": 12082 }
[ "java.io.IOException", "java.io.OutputStream", "org.apache.hadoop.security.SaslOutputStream" ]
import java.io.IOException; import java.io.OutputStream; import org.apache.hadoop.security.SaslOutputStream;
import java.io.*; import org.apache.hadoop.security.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,916,484
public static long copyAndClose(InputStream is, OutputStream os) throws IOException { try { final long retval = ByteStreams.copy(is, os); // Workarround for http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/759aa847dcaf os.flush(); return retval; } finally { is.close(); os...
static long function(InputStream is, OutputStream os) throws IOException { try { final long retval = ByteStreams.copy(is, os); os.flush(); return retval; } finally { is.close(); os.close(); } }
/** * Copy from `is` to `os` and close the streams regardless of the result. * * @param is The `InputStream` to copy results from. It is closed * @param os The `OutputStream` to copy results to. It is closed * * @return The count of bytes written to `os` * * @throws IOException */
Copy from `is` to `os` and close the streams regardless of the result
copyAndClose
{ "repo_name": "jon-wei/java-util", "path": "src/main/java/com/metamx/common/StreamUtils.java", "license": "apache-2.0", "size": 6383 }
[ "com.google.common.io.ByteStreams", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import com.google.common.io.ByteStreams; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
1,946,088
public synchronized int countHolidayInRang(Calendar start, Calendar end) { int count = 0; fillHolidays(); for (Calendar data : this.holidays) { if (data.after(start) && data.before(end)) { count++; } } System.out.println("Количество пра...
synchronized int function(Calendar start, Calendar end) { int count = 0; fillHolidays(); for (Calendar data : this.holidays) { if (data.after(start) && data.before(end)) { count++; } } System.out.println(STR + count); return count; }
/** * counts holidays. * @param start - holiday start date * @param end - holiday end date * @return count */
counts holidays
countHolidayInRang
{ "repo_name": "dsaetgareev/junior", "path": "chapter_005/wait/src/main/java/ru/job4j/pool/Work.java", "license": "apache-2.0", "size": 4921 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
446,734
public void testAddAllIntName004() throws Exception { try { LdapName ln = new LdapName("t=test"); LdapName add = null; ln.addAll(1, add); fail("NPE expected"); } catch (NullPointerException e) {} }
void function() throws Exception { try { LdapName ln = new LdapName(STR); LdapName add = null; ln.addAll(1, add); fail(STR); } catch (NullPointerException e) {} }
/** * <p> * Test method for 'javax.naming.ldap.LdapName.addAll(int, Name)' * </p> * <p> * Here we are testing if this method correctly adds the components of the * given Name to an LdapName at the given index. * <p> * The expected result is an NullPointer Exception. * </p> ...
Test method for 'javax.naming.ldap.LdapName.addAll(int, Name)' Here we are testing if this method correctly adds the components of the given Name to an LdapName at the given index. The expected result is an NullPointer Exception.
testAddAllIntName004
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java", "license": "apache-2.0", "size": 119091 }
[ "javax.naming.ldap.LdapName" ]
import javax.naming.ldap.LdapName;
import javax.naming.ldap.*;
[ "javax.naming" ]
javax.naming;
176,934
public static boolean containsEqualEntries(final Set<Pair> set1, final Set<Pair> set2) { if (set1 == null || set2 == null) { return false; } return Sets.difference(set1, set2).isEmpty(); }
static boolean function(final Set<Pair> set1, final Set<Pair> set2) { if (set1 == null set2 == null) { return false; } return Sets.difference(set1, set2).isEmpty(); }
/** * Checks if two maps contain the same entities * * @param set1 * @param set2 * @return */
Checks if two maps contain the same entities
containsEqualEntries
{ "repo_name": "dryazanov/mockenger", "path": "core/src/main/java/org/mockenger/core/util/CommonUtils.java", "license": "gpl-2.0", "size": 7042 }
[ "com.google.common.collect.Sets", "java.util.Set", "org.mockenger.data.model.persistent.mock.request.part.Pair", "org.springframework.util.StringUtils" ]
import com.google.common.collect.Sets; import java.util.Set; import org.mockenger.data.model.persistent.mock.request.part.Pair; import org.springframework.util.StringUtils;
import com.google.common.collect.*; import java.util.*; import org.mockenger.data.model.persistent.mock.request.part.*; import org.springframework.util.*;
[ "com.google.common", "java.util", "org.mockenger.data", "org.springframework.util" ]
com.google.common; java.util; org.mockenger.data; org.springframework.util;
1,556,860
public synchronized void sync() { if (needsSync && dataFile != null) { if (busyWriting) { forceSync = true; return; } try { //fileStreamOut.flush(); dataFile.sync(); syncCount++; ...
synchronized void function() { if (needsSync && dataFile != null) { if (busyWriting) { forceSync = true; return; } try { dataFile.sync(); syncCount++; } catch (IOException e) { Trace.printSystemOut(STR + e.toString()); } needsSync = false; forceSync = false; } }
/** * Called internally or externally in write delay intervals. */
Called internally or externally in write delay intervals
sync
{ "repo_name": "jdrider/rhodes", "path": "platform/bb/Hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java", "license": "mit", "size": 14352 }
[ "java.io.IOException", "org.hsqldb.Trace" ]
import java.io.IOException; import org.hsqldb.Trace;
import java.io.*; import org.hsqldb.*;
[ "java.io", "org.hsqldb" ]
java.io; org.hsqldb;
650,676
public String serviceName_userLogs_login_changePassword_POST(String serviceName, String login, String password) throws IOException { String qPath = "/hosting/web/{serviceName}/userLogs/{login}/changePassword"; StringBuilder sb = path(qPath, serviceName, login); HashMap<String, Object>o = new HashMap<String, Ob...
String function(String serviceName, String login, String password) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, serviceName, login); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, STR, password); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp,...
/** * Request a password change * * REST: POST /hosting/web/{serviceName}/userLogs/{login}/changePassword * @param password [required] The new userLogs password * @param serviceName [required] The internal name of your hosting * @param login [required] The userLogs login used to connect to logs.ovh.net */
Request a password change
serviceName_userLogs_login_changePassword_POST
{ "repo_name": "UrielCh/ovh-java-sdk", "path": "ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java", "license": "bsd-3-clause", "size": 99470 }
[ "java.io.IOException", "java.util.HashMap" ]
import java.io.IOException; import java.util.HashMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
318,198
void recomputeProgress() { if (isComplete()) { this.progress = 1; // update the counters and the state TaskStatus completedStatus = taskStatuses.get(getSuccessfulTaskid()); this.counters = completedStatus.getCounters(); this.state = completedStatus.getStateString(); } else if (fa...
void recomputeProgress() { if (isComplete()) { this.progress = 1; TaskStatus completedStatus = taskStatuses.get(getSuccessfulTaskid()); this.counters = completedStatus.getCounters(); this.state = completedStatus.getStateString(); } else if (failed) { this.progress = 0; this.state = STR"; Counters bestCounters = new Cou...
/** * This method is called whenever there's a status change * for one of the TIP's sub-tasks. It recomputes the overall * progress for the TIP. We examine all sub-tasks and find * the one that's most advanced (and non-failed). */
This method is called whenever there's a status change for one of the TIP's sub-tasks. It recomputes the overall progress for the TIP. We examine all sub-tasks and find the one that's most advanced (and non-failed)
recomputeProgress
{ "repo_name": "IMCG/priter", "path": "src/mapred/org/apache/hadoop/mapred/TaskInProgress.java", "license": "apache-2.0", "size": 35902 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,012,972
public void registerProviderFreedListener(OnFreedListener onProviderFreedListener) { graph.registerProviderFreedListener(onProviderFreedListener); }
void function(OnFreedListener onProviderFreedListener) { graph.registerProviderFreedListener(onProviderFreedListener); }
/** * Register {@link OnFreedListener} which will be called when the last cached * instance of an injected contract is freed. * * @param onProviderFreedListener The listener */
Register <code>OnFreedListener</code> which will be called when the last cached instance of an injected contract is freed
registerProviderFreedListener
{ "repo_name": "tananrules/AndroidMvc", "path": "library/android-mvc-controller/src/main/java/com/shipdream/lib/android/mvc/MvcGraph.java", "license": "apache-2.0", "size": 15931 }
[ "com.shipdream.lib.poke.Provider" ]
import com.shipdream.lib.poke.Provider;
import com.shipdream.lib.poke.*;
[ "com.shipdream.lib" ]
com.shipdream.lib;
671,680
public BlockInstance getBlockInstanceAt(int index) { if (this.blockInstances == null) { return (null); } return (this.blockInstances.get(index)); }
BlockInstance function(int index) { if (this.blockInstances == null) { return (null); } return (this.blockInstances.get(index)); }
/** * get the block instance at the given location (relative to the terrain) */
get the block instance at the given location (relative to the terrain)
getBlockInstanceAt
{ "repo_name": "toss-dev/VoxelEngine", "path": "VoxelEngine/src/com/grillecube/common/world/terrain/WorldObjectTerrain.java", "license": "gpl-2.0", "size": 52402 }
[ "com.grillecube.common.world.block.instances.BlockInstance" ]
import com.grillecube.common.world.block.instances.BlockInstance;
import com.grillecube.common.world.block.instances.*;
[ "com.grillecube.common" ]
com.grillecube.common;
320,776
@Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { Bundle reply = new Bundle(); Account kolabAccount = getKolabDroidAccount(context); if (kolabAccount...
Bundle function(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { Bundle reply = new Bundle(); Account kolabAccount = getKolabDroidAccount(context); if (kolabAccount != null) handler.sendEmptyMessage(0); else create...
/** * {@inheritDoc} Check if a KolabAccount already exists. If this is the * case, we display an error since only one KolabAccount is supported * yet. If no KolabAccount exists, we create one. */
Check if a KolabAccount already exists. If this is the case, we display an error since only one KolabAccount is supported yet. If no KolabAccount exists, we create one
addAccount
{ "repo_name": "arthurzaczek/kolab-android", "path": "src/at/dasz/KolabDroid/Account/KolabAccountAuthenticatorService.java", "license": "gpl-3.0", "size": 5514 }
[ "android.accounts.Account", "android.accounts.AccountAuthenticatorResponse", "android.accounts.NetworkErrorException", "android.os.Bundle" ]
import android.accounts.Account; import android.accounts.AccountAuthenticatorResponse; import android.accounts.NetworkErrorException; import android.os.Bundle;
import android.accounts.*; import android.os.*;
[ "android.accounts", "android.os" ]
android.accounts; android.os;
2,112,818
public void testQueryWithoutEntityType() throws Exception { String configXml = "<multi-id-query />"; Element config = parse(configXml).getDocumentElement(); MultiIdQuery instance = MultiIdQuery.init(config); String xml = "<x><a id='1'/><a id='2'/><a id='3'/><b id='4'/><b id='5'/></x...
void function() throws Exception { String configXml = STR; Element config = parse(configXml).getDocumentElement(); MultiIdQuery instance = MultiIdQuery.init(config); String xml = STR; Document doc = parse(xml); String[] array = { "1", "3", "5", "7" }; Map<String, String[]> params = Collections.singletonMap("id", array)...
/** * Test of query method, of class MultiIdQuery. */
Test of query method, of class MultiIdQuery
testQueryWithoutEntityType
{ "repo_name": "pfstrack/eldamo", "path": "src/test/java/xdb/query/MultiIdQueryTest.java", "license": "mit", "size": 2873 }
[ "java.util.Collections", "java.util.LinkedList", "java.util.List", "java.util.Map", "org.w3c.dom.Document", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
2,907,093
public static void disableLocalizationServiceLogging() { Logger log = Logger.getLogger(LocalizationService.class); log.setLevel(Level.OFF); }
static void function() { Logger log = Logger.getLogger(LocalizationService.class); log.setLevel(Level.OFF); }
/** * Util for turning of the spew from the l10n service for * test cases that make calls with dummy string IDs. */
Util for turning of the spew from the l10n service for test cases that make calls with dummy string IDs
disableLocalizationServiceLogging
{ "repo_name": "ogajduse/spacewalk", "path": "java/code/src/com/redhat/rhn/testing/RhnBaseTestCase.java", "license": "gpl-2.0", "size": 9288 }
[ "com.redhat.rhn.common.localization.LocalizationService", "org.apache.log4j.Level", "org.apache.log4j.Logger" ]
import com.redhat.rhn.common.localization.LocalizationService; import org.apache.log4j.Level; import org.apache.log4j.Logger;
import com.redhat.rhn.common.localization.*; import org.apache.log4j.*;
[ "com.redhat.rhn", "org.apache.log4j" ]
com.redhat.rhn; org.apache.log4j;
453,409
private void test(Message msg) { assertMessage(msg); if (forbidden.contains(msg)) { Assert.fail("received forbidden message " + msg); } required.remove(msg); }
void function(Message msg) { assertMessage(msg); if (forbidden.contains(msg)) { Assert.fail(STR + msg); } required.remove(msg); }
/** * Tests the message for legal/illegal reception. * * @param msg the message */
Tests the message for legal/illegal reception
test
{ "repo_name": "QualiMaster/Infrastructure", "path": "AdaptationLayer/src/tests/eu/qualimaster/adaptation/ExternalTests.java", "license": "apache-2.0", "size": 33340 }
[ "eu.qualimaster.adaptation.external.Message", "org.junit.Assert" ]
import eu.qualimaster.adaptation.external.Message; import org.junit.Assert;
import eu.qualimaster.adaptation.external.*; import org.junit.*;
[ "eu.qualimaster.adaptation", "org.junit" ]
eu.qualimaster.adaptation; org.junit;
2,617,796
public GeoDistanceSortBuilder validation(GeoValidationMethod method) { this.validation = method; return this; }
GeoDistanceSortBuilder function(GeoValidationMethod method) { this.validation = method; return this; }
/** * Sets validation method for this sort builder. */
Sets validation method for this sort builder
validation
{ "repo_name": "strahanjen/strahanjen.github.io", "path": "elasticsearch-master/core/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortBuilder.java", "license": "bsd-3-clause", "size": 25937 }
[ "org.elasticsearch.index.query.GeoValidationMethod" ]
import org.elasticsearch.index.query.GeoValidationMethod;
import org.elasticsearch.index.query.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
2,805,065
public List<Integer> getEffTimes() { return effTimes; }
List<Integer> function() { return effTimes; }
/** * Gets the eff times. * * @return the eff times */
Gets the eff times
getEffTimes
{ "repo_name": "termMed/sct-descriptive-statistics-generator", "path": "src/main/java/com/termmed/inheritance/model/LongWithDates.java", "license": "apache-2.0", "size": 5511 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,042,802
private String[] getWeatherDataFromJson(String forecastJsonStr, int numDays) throws JSONException { // These are the names of the JSON objects that need to be extracted. final String OWM_LIST = "list"; final String OWM_WEATHER = "weather"; final S...
String[] function(String forecastJsonStr, int numDays) throws JSONException { final String OWM_LIST = "list"; final String OWM_WEATHER = STR; final String OWM_TEMPERATURE = "temp"; final String OWM_MAX = "max"; final String OWM_MIN = "min"; final String OWM_DESCRIPTION = "main"; JSONObject forecastJson = new JSONObject...
/** * Take the String representing the complete forecast in JSON Format and * pull out the data we need to construct the Strings needed for the wireframes. * <p> * Fortunately parsing is easy: constructor takes the JSON string and converts it * into an Object hierarchy for ...
Take the String representing the complete forecast in JSON Format and pull out the data we need to construct the Strings needed for the wireframes. Fortunately parsing is easy: constructor takes the JSON string and converts it into an Object hierarchy for us
getWeatherDataFromJson
{ "repo_name": "xeoneux/Sunshine", "path": "app/src/main/java/com/example/android/sunshine/app/ForecastFragment.java", "license": "apache-2.0", "size": 14129 }
[ "android.content.SharedPreferences", "android.preference.PreferenceManager", "android.text.format.Time", "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject" ]
import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.text.format.Time; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
import android.content.*; import android.preference.*; import android.text.format.*; import org.json.*;
[ "android.content", "android.preference", "android.text", "org.json" ]
android.content; android.preference; android.text; org.json;
1,818,521
public ValidationResult validate() { ValidationModel validationModel = new ValidationModel(component); validationModel.setConsumeFieldsOnly(true); ValidationResult validationResult = ValidationUtil.validate(validationModel); validationResult.merge(validateSubComponent(attributes)); validationResult.merge(...
ValidationResult function() { ValidationModel validationModel = new ValidationModel(component); validationModel.setConsumeFieldsOnly(true); ValidationResult validationResult = ValidationUtil.validate(validationModel); validationResult.merge(validateSubComponent(attributes)); validationResult.merge(validateSubComponent(...
/** * Validates all entities * * @return */
Validates all entities
validate
{ "repo_name": "skycow/openstorefront", "path": "server/openstorefront/openstorefront-core/model/src/main/java/edu/usu/sdl/openstorefront/core/model/ComponentAll.java", "license": "apache-2.0", "size": 11765 }
[ "edu.usu.sdl.openstorefront.core.entity.ComponentQuestion", "edu.usu.sdl.openstorefront.core.entity.ComponentReview", "edu.usu.sdl.openstorefront.core.entity.ComponentReviewCon", "edu.usu.sdl.openstorefront.core.entity.ComponentReviewPro", "edu.usu.sdl.openstorefront.validation.ValidationModel", "edu.usu....
import edu.usu.sdl.openstorefront.core.entity.ComponentQuestion; import edu.usu.sdl.openstorefront.core.entity.ComponentReview; import edu.usu.sdl.openstorefront.core.entity.ComponentReviewCon; import edu.usu.sdl.openstorefront.core.entity.ComponentReviewPro; import edu.usu.sdl.openstorefront.validation.ValidationModel...
import edu.usu.sdl.openstorefront.core.entity.*; import edu.usu.sdl.openstorefront.validation.*; import java.util.*;
[ "edu.usu.sdl", "java.util" ]
edu.usu.sdl; java.util;
2,293,617
public X509CertificateHolder build( ContentSigner signer) { tbsGen.setSignature(signer.getAlgorithmIdentifier()); if (!extGenerator.isEmpty()) { tbsGen.setExtensions(extGenerator.generate()); } return CertUtils.generateFullCert(signer, tbsGen.generat...
X509CertificateHolder function( ContentSigner signer) { tbsGen.setSignature(signer.getAlgorithmIdentifier()); if (!extGenerator.isEmpty()) { tbsGen.setExtensions(extGenerator.generate()); } return CertUtils.generateFullCert(signer, tbsGen.generateTBSCertificate()); }
/** * Generate an X.509 certificate, based on the current issuer and subject * using the passed in signer. * * @param signer the content signer to be used to generate the signature validating the certificate. * @return a holder containing the resulting signed certificate. */
Generate an X.509 certificate, based on the current issuer and subject using the passed in signer
build
{ "repo_name": "iseki-masaya/spongycastle", "path": "pkix/src/main/java/org/spongycastle/cert/X509v3CertificateBuilder.java", "license": "mit", "size": 7408 }
[ "org.spongycastle.operator.ContentSigner" ]
import org.spongycastle.operator.ContentSigner;
import org.spongycastle.operator.*;
[ "org.spongycastle.operator" ]
org.spongycastle.operator;
2,184,123
public Builder applyToAllUnaryMethods( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
/** * Applies the given settings updater function to all of the unary API methods in this service. * * <p>Note: This method does not support applying settings to streaming methods. */
Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods
applyToAllUnaryMethods
{ "repo_name": "googleapis/java-gkehub", "path": "google-cloud-gkehub/src/main/java/com/google/cloud/gkehub/v1/stub/GkeHubStubSettings.java", "license": "apache-2.0", "size": 44176 }
[ "com.google.api.core.ApiFunction", "com.google.api.gax.rpc.UnaryCallSettings" ]
import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.core.*; import com.google.api.gax.rpc.*;
[ "com.google.api" ]
com.google.api;
244,029
public int markAll(String toMark, boolean matchCase, boolean wholeWord, boolean regex) { Highlighter h = getHighlighter(); int numMarked = 0; if (toMark != null && !toMark.equals(markedWord) && h != null) { if (markAllHighlights != null) clearMarkAllHi...
int function(String toMark, boolean matchCase, boolean wholeWord, boolean regex) { Highlighter h = getHighlighter(); int numMarked = 0; if (toMark != null && !toMark.equals(markedWord) && h != null) { if (markAllHighlights != null) clearMarkAllHighlights(); else markAllHighlights = new ArrayList(10); int caretPos = get...
/** * Marks all instances of the specified text in this text area. * * @param toMark * The text to mark. * @param matchCase * Whether the match should be case-sensitive. * @param wholeWord * Whether the matches should be surrounded by spaces or t...
Marks all instances of the specified text in this text area
markAll
{ "repo_name": "kevinmcgoldrick/Tank", "path": "tools/agent_debugger/src/main/java/org/fife/ui/rtextarea/RTextArea.java", "license": "epl-1.0", "size": 54300 }
[ "java.util.ArrayList", "javax.swing.text.BadLocationException", "javax.swing.text.Highlighter" ]
import java.util.ArrayList; import javax.swing.text.BadLocationException; import javax.swing.text.Highlighter;
import java.util.*; import javax.swing.text.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
2,121,246
private void loadSessionData() throws SQLException { String query = "SELECT * FROM session WHERE sessionid=\'" + sessionId + "\';"; ResultSet rs = dbConn.executeQuery(query); if (rs == null) { System.err.println("Session id " + sessionId + " not found in session table!"); ...
void function() throws SQLException { String query = STR + sessionId + "\';"; ResultSet rs = dbConn.executeQuery(query); if (rs == null) { System.err.println(STR + sessionId + STR); System.exit(-1); } while (rs.next()) { Long timeStarted = rs.getLong(STR); session.setStartTime(timeStarted); } }
/** * Load Session data * * @throws SQLException */
Load Session data
loadSessionData
{ "repo_name": "dbhage/qasp", "path": "src/session/SessionLoader.java", "license": "bsd-2-clause", "size": 14396 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
749,700
// URL escapers should throw null pointer exceptions for null input try { e.escape((String) null); fail("Escaping null string should throw exception"); } catch (NullPointerException x) { // pass } // All URL escapers should leave 0-9, A-Z, a-z unescaped assertUnescaped(e, 'a'); ...
try { e.escape((String) null); fail(STR); } catch (NullPointerException x) { } assertUnescaped(e, 'a'); assertUnescaped(e, 'z'); assertUnescaped(e, 'A'); assertUnescaped(e, 'Z'); assertUnescaped(e, '0'); assertUnescaped(e, '9'); assertUnescaped(e, '-'); assertUnescaped(e, '_'); assertUnescaped(e, '.'); assertUnescaped(...
/** * Helper to assert common expected behaviour of uri escapers. You should call * assertBasicUrlEscaper() unless the escaper explicitly does not escape '%'. */
Helper to assert common expected behaviour of uri escapers. You should call assertBasicUrlEscaper() unless the escaper explicitly does not escape '%'
assertBasicUrlEscaperExceptPercent
{ "repo_name": "sensui/guava-libraries", "path": "guava-tests/test/com/google/common/net/UrlEscapersTest.java", "license": "apache-2.0", "size": 4751 }
[ "com.google.common.escape.testing.EscaperAsserts" ]
import com.google.common.escape.testing.EscaperAsserts;
import com.google.common.escape.testing.*;
[ "com.google.common" ]
com.google.common;
1,319,052
EAttribute getElementRule_CreateYN();
EAttribute getElementRule_CreateYN();
/** * Returns the meta object for the attribute '{@link nexcore.tool.mda.model.developer.reverseTransformation.ElementRule#isCreateYN <em>Create YN</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Create YN</em>'. * @see nexcore.too...
Returns the meta object for the attribute '<code>nexcore.tool.mda.model.developer.reverseTransformation.ElementRule#isCreateYN Create YN</code>'.
getElementRule_CreateYN
{ "repo_name": "SK-HOLDINGS-CC/NEXCORE-UML-Modeler", "path": "nexcore.tool.mda.model/src/java/nexcore/tool/mda/model/developer/reverseTransformation/ReverseTransformationPackage.java", "license": "epl-1.0", "size": 46728 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,726,372
protected Job constructDAGJob(String name, String directory, String dagBasename) { // for time being use the old functions. Job job = new Job(); // set the logical transformation job.setTransformation(CONDOR_DAGMAN_NAMESPACE, CONDOR_DAGMAN_LOGICAL_NAME, null); // set the lo...
Job function(String name, String directory, String dagBasename) { Job job = new Job(); job.setTransformation(CONDOR_DAGMAN_NAMESPACE, CONDOR_DAGMAN_LOGICAL_NAME, null); job.setDerivation(CONDOR_DAGMAN_NAMESPACE, CONDOR_DAGMAN_LOGICAL_NAME, null); job.setSiteHandle("local"); job.setName(name); List entries; Transformati...
/** * Constructs a job that plans and submits the partitioned workflow, referred to by a Partition. * The main job itself is a condor dagman job that submits the concrete workflow. The concrete * workflow is generated by running the planner in the prescript for the job. * * @param name the key ...
Constructs a job that plans and submits the partitioned workflow, referred to by a Partition. The main job itself is a condor dagman job that submits the concrete workflow. The concrete workflow is generated by running the planner in the prescript for the job
constructDAGJob
{ "repo_name": "pegasus-isi/pegasus", "path": "src/edu/isi/pegasus/planner/code/generator/condor/CondorGenerator.java", "license": "apache-2.0", "size": 75136 }
[ "edu.isi.pegasus.common.util.CondorVersion", "edu.isi.pegasus.planner.catalog.transformation.TransformationCatalogEntry", "edu.isi.pegasus.planner.catalog.transformation.classes.TCType", "edu.isi.pegasus.planner.classes.Job", "edu.isi.pegasus.planner.code.GridStartFactory", "edu.isi.pegasus.planner.namesp...
import edu.isi.pegasus.common.util.CondorVersion; import edu.isi.pegasus.planner.catalog.transformation.TransformationCatalogEntry; import edu.isi.pegasus.planner.catalog.transformation.classes.TCType; import edu.isi.pegasus.planner.classes.Job; import edu.isi.pegasus.planner.code.GridStartFactory; import edu.isi.pegas...
import edu.isi.pegasus.common.util.*; import edu.isi.pegasus.planner.catalog.transformation.*; import edu.isi.pegasus.planner.catalog.transformation.classes.*; import edu.isi.pegasus.planner.classes.*; import edu.isi.pegasus.planner.code.*; import edu.isi.pegasus.planner.namespace.*; import java.io.*; import java.util....
[ "edu.isi.pegasus", "java.io", "java.util" ]
edu.isi.pegasus; java.io; java.util;
2,019,973
public static final Date utc2date(Long time) { // don't accept negative values if (time == null || time < 0) return null; // add the timezone offset time += timezoneOffsetMillis(new Date(time)); return new Date(time); }
static final Date function(Long time) { if (time == null time < 0) return null; time += timezoneOffsetMillis(new Date(time)); return new Date(time); }
/** * Converts a time in UTC to a gwt Date object which is in the timezone of * the current browser. * * @return The Date corresponding to the time, adjusted for the timezone of * the current browser. null if the specified time is null or * represents a negative number. ...
Converts a time in UTC to a gwt Date object which is in the timezone of the current browser
utc2date
{ "repo_name": "tractionsoftware/gwt-traction", "path": "src/main/java/com/tractionsoftware/gwt/user/client/ui/UTCDateBox.java", "license": "apache-2.0", "size": 7947 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
414,494
EAttribute getMeasure_Name();
EAttribute getMeasure_Name();
/** * Returns the meta object for the attribute '{@link subkdm.SimplifiedDecisionMetrics.Measure#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see subkdm.SimplifiedDecisionMetrics.Measure#getName() * @see #get...
Returns the meta object for the attribute '<code>subkdm.SimplifiedDecisionMetrics.Measure#getName Name</code>'.
getMeasure_Name
{ "repo_name": "lfmendivelso10/AppModernization", "path": "source/i2/miso4301_201520/src/subkdm/SimplifiedDecisionMetrics/SimplifiedDecisionMetricsPackage.java", "license": "mit", "size": 24308 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
204,987
@Override public final BytesStreamOutput bytesOutput() { if (bytesOut == null) { bytesOut = newBytesOutput(); } else { bytesOut.reset(); } return bytesOut; }
final BytesStreamOutput function() { if (bytesOut == null) { bytesOut = newBytesOutput(); } else { bytesOut.reset(); } return bytesOut; }
/** * A channel level bytes output that can be reused. The bytes output is lazily instantiated * by a call to {@link #newBytesOutput()}. Once the stream is created, it gets reset on each * call to this method. */
A channel level bytes output that can be reused. The bytes output is lazily instantiated by a call to <code>#newBytesOutput()</code>. Once the stream is created, it gets reset on each call to this method
bytesOutput
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/rest/AbstractRestChannel.java", "license": "apache-2.0", "size": 6346 }
[ "org.elasticsearch.common.io.stream.BytesStreamOutput" ]
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,701,037
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> deleteInstancesAsync( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs) { final Boolean forceDeletion = null; return beginDeleteInstancesAsync(resourceGroupName, vmScal...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs) { final Boolean forceDeletion = null; return beginDeleteInstancesAsync(resourceGroupName, vmScaleSetName, vmInstanceIDs, forceDeletion) .last() .fl...
/** * Deletes virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. * @throws IllegalArgumentException throw...
Deletes virtual machines in a VM scale set
deleteInstancesAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java", "license": "mit", "size": 352067 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceRequiredIDs" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceRequiredIDs;
import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,864,402
@Nullable String getParameterValueWithName (@Nullable String sParamName);
String getParameterValueWithName (@Nullable String sParamName);
/** * Get the value of the parameter with the specified name. The names are * matched case sensitive! * * @param sParamName * The parameter name to search. May be <code>null</code>. * @return <code>null</code> if no such parameter exists. */
Get the value of the parameter with the specified name. The names are matched case sensitive
getParameterValueWithName
{ "repo_name": "phax/ph-commons", "path": "ph-commons/src/main/java/com/helger/commons/mime/IMimeType.java", "license": "apache-2.0", "size": 5841 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,722,710
interface WithAuthenticationCertificates { WithCreate withAuthenticationCertificates(List<ApplicationGatewayAuthenticationCertificate> authenticationCertificates); }
interface WithAuthenticationCertificates { WithCreate withAuthenticationCertificates(List<ApplicationGatewayAuthenticationCertificate> authenticationCertificates); }
/** * Specifies authenticationCertificates. * @param authenticationCertificates Authentication certificates of the application gateway resource * @return the next definition stage */
Specifies authenticationCertificates
withAuthenticationCertificates
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/ApplicationGateway.java", "license": "mit", "size": 24925 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
422,449
@Beta public static Writer nullWriter() { return NullWriter.INSTANCE; } private static final class NullWriter extends Writer { private static final NullWriter INSTANCE = new NullWriter(); @Override public void write(int c) {}
static Writer function() { return NullWriter.INSTANCE; } private static final class NullWriter extends Writer { private static final NullWriter INSTANCE = new NullWriter(); public void write(int c) {}
/** * Returns a {@link Writer} that simply discards written chars. * * @since 15.0 */
Returns a <code>Writer</code> that simply discards written chars
nullWriter
{ "repo_name": "EdwardLee03/guava", "path": "guava/src/com/google/common/io/CharStreams.java", "license": "apache-2.0", "size": 11050 }
[ "java.io.Writer" ]
import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,426,498
void enterNonWildcardTypeArguments(@NotNull JavaParser.NonWildcardTypeArgumentsContext ctx); void exitNonWildcardTypeArguments(@NotNull JavaParser.NonWildcardTypeArgumentsContext ctx);
void enterNonWildcardTypeArguments(@NotNull JavaParser.NonWildcardTypeArgumentsContext ctx); void exitNonWildcardTypeArguments(@NotNull JavaParser.NonWildcardTypeArgumentsContext ctx);
/** * Exit a parse tree produced by {@link JavaParser#nonWildcardTypeArguments}. * @param ctx the parse tree */
Exit a parse tree produced by <code>JavaParser#nonWildcardTypeArguments</code>
exitNonWildcardTypeArguments
{ "repo_name": "zmughal/oop-analysis", "path": "src/generated-sources/JavaListener.java", "license": "apache-2.0", "size": 38949 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
798,822
@ServiceMethod(returns = ReturnType.SINGLE) Response<CredentialResultsInner> listClusterUserCredentialsWithResponse( String resourceGroupName, String resourceName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<CredentialResultsInner> listClusterUserCredentialsWithResponse( String resourceGroupName, String resourceName, Context context);
/** * Gets cluster user credential of the managed cluster with a specified resource group and name. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * ...
Gets cluster user credential of the managed cluster with a specified resource group and name
listClusterUserCredentialsWithResponse
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java", "license": "mit", "size": 63960 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.containerservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,789,529
public void testCanExport( ) throws Exception { openDesign( "ElementExporterTest.xml" ); //$NON-NLS-1$ openLibrary( "ElementExporterTestLibrary.xml" ); //$NON-NLS-1$ DataSetHandle ds = designHandle.findDataSet( "dataSet1" ); //$NON-NLS-1$ assertTrue( ElementExportUtil.canExport( ds, libraryHandle, false )...
void function( ) throws Exception { openDesign( STR ); openLibrary( STR ); DataSetHandle ds = designHandle.findDataSet( STR ); assertTrue( ElementExportUtil.canExport( ds, libraryHandle, false ) ); assertTrue( ElementExportUtil.canExport( ds ) ); DataSetHandle tmpDs = libraryHandle.getElementFactory( ) .newScriptDataSe...
/** * Test the function that whether an element/structure can be exported. * * @throws Exception */
Test the function that whether an element/structure can be exported
testCanExport
{ "repo_name": "Charling-Huang/birt", "path": "model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/ElementExporterTest.java", "license": "epl-1.0", "size": 35512 }
[ "org.eclipse.birt.report.model.api.core.IModuleModel", "org.eclipse.birt.report.model.api.elements.structures.CustomColor", "org.eclipse.birt.report.model.api.util.ElementExportUtil" ]
import org.eclipse.birt.report.model.api.core.IModuleModel; import org.eclipse.birt.report.model.api.elements.structures.CustomColor; import org.eclipse.birt.report.model.api.util.ElementExportUtil;
import org.eclipse.birt.report.model.api.core.*; import org.eclipse.birt.report.model.api.elements.structures.*; import org.eclipse.birt.report.model.api.util.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
431,779
public void dupX1(){ mv.visitInsn(Opcodes.DUP_X1); }
void function(){ mv.visitInsn(Opcodes.DUP_X1); }
/** * Generates a DUP_X1 instruction. */
Generates a DUP_X1 instruction
dupX1
{ "repo_name": "hexosse/ProtocolLib", "path": "ProtocolLib/src/main/java/com/comphenix/protocol/reflect/compiler/BoxingHelper.java", "license": "gpl-2.0", "size": 8142 }
[ "net.sf.cglib.asm.Opcodes" ]
import net.sf.cglib.asm.Opcodes;
import net.sf.cglib.asm.*;
[ "net.sf.cglib" ]
net.sf.cglib;
1,210,537
public AppResponse getCapabilities() throws Exception { AppResponse response = new AppResponse(); String mime = null; boolean hasTextXml = false; boolean hasAppXml = false; boolean hasOther = false; String[] acceptFormats = getParameterValues("acceptFormats"); if (acceptFormats != null &&...
AppResponse function() throws Exception { AppResponse response = new AppResponse(); String mime = null; boolean hasTextXml = false; boolean hasAppXml = false; boolean hasOther = false; String[] acceptFormats = getParameterValues(STR); if (acceptFormats != null && acceptFormats.length == 1) { acceptFormats = Val.tokeniz...
/** * Generate an GetCapabilities response. * @return the response * @throws Exception if an exception occurs */
Generate an GetCapabilities response
getCapabilities
{ "repo_name": "usgin/geoportal-server-catalog", "path": "geoportal/src/main/java/com/esri/geoportal/lib/elastic/request/CswRequest.java", "license": "apache-2.0", "size": 20978 }
[ "com.esri.geoportal.base.util.ResourcePath", "com.esri.geoportal.base.util.Val", "com.esri.geoportal.base.xml.XmlUtil", "com.esri.geoportal.context.AppResponse", "com.esri.geoportal.lib.elastic.response.OwsException", "java.nio.file.Files", "java.nio.file.Paths", "javax.ws.rs.core.MediaType", "javax...
import com.esri.geoportal.base.util.ResourcePath; import com.esri.geoportal.base.util.Val; import com.esri.geoportal.base.xml.XmlUtil; import com.esri.geoportal.context.AppResponse; import com.esri.geoportal.lib.elastic.response.OwsException; import java.nio.file.Files; import java.nio.file.Paths; import javax.ws.rs.co...
import com.esri.geoportal.base.util.*; import com.esri.geoportal.base.xml.*; import com.esri.geoportal.context.*; import com.esri.geoportal.lib.elastic.response.*; import java.nio.file.*; import javax.ws.rs.core.*;
[ "com.esri.geoportal", "java.nio", "javax.ws" ]
com.esri.geoportal; java.nio; javax.ws;
1,363,684
public EffectiveNetworkSecurityRule withDestinationAddressPrefixes(List<String> destinationAddressPrefixes) { this.destinationAddressPrefixes = destinationAddressPrefixes; return this; }
EffectiveNetworkSecurityRule function(List<String> destinationAddressPrefixes) { this.destinationAddressPrefixes = destinationAddressPrefixes; return this; }
/** * Set the destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). * * @param destinationAddressPrefixes the destinationAddressPrefixes value to set * @return the EffectiveNetworkSecurityRul...
Set the destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*)
withDestinationAddressPrefixes
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/EffectiveNetworkSecurityRule.java", "license": "mit", "size": 13853 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
472,578
public void verify(){ JadeAgentIntrospector introspector = (JadeAgentIntrospector) PlatformSelector.getAgentIntrospector("jade"); while (((TesterAgent)introspector.getAgent("TestAgent")).isMessageReceived()==false) { // Wait... } checkAgentsBeliefEqueals...
void function(){ JadeAgentIntrospector introspector = (JadeAgentIntrospector) PlatformSelector.getAgentIntrospector("jade"); while (((TesterAgent)introspector.getAgent(STR)).isMessageReceived()==false) { } checkAgentsBeliefEquealsTo(STR, STR, true); }
/** * This is the method that must create the Evaluation. * It is related with the THEN part. * * In verify method the following method must be used * checkAgentsBeliefEquealsTo(agent_name,belief_name,expected_belief_value) */
This is the method that must create the Evaluation. It is related with the THEN part. In verify method the following method must be used checkAgentsBeliefEquealsTo(agent_name,belief_name,expected_belief_value)
verify
{ "repo_name": "gsi-upm/BeastTool", "path": "beast-tool/src/test/java/es/upm/dit/gsi/beast/platform/jade/jadePlatformTest/SendAMessage.java", "license": "gpl-2.0", "size": 5163 }
[ "es.upm.dit.gsi.beast.platform.PlatformSelector", "es.upm.dit.gsi.beast.platform.jade.JadeAgentIntrospector", "es.upm.dit.gsi.beast.test.agent.jade.TesterAgent" ]
import es.upm.dit.gsi.beast.platform.PlatformSelector; import es.upm.dit.gsi.beast.platform.jade.JadeAgentIntrospector; import es.upm.dit.gsi.beast.test.agent.jade.TesterAgent;
import es.upm.dit.gsi.beast.platform.*; import es.upm.dit.gsi.beast.platform.jade.*; import es.upm.dit.gsi.beast.test.agent.jade.*;
[ "es.upm.dit" ]
es.upm.dit;
381,541
Block readBlock(SliceInput input);
Block readBlock(SliceInput input);
/** * Read a block from the specified input. The returned * block should begin at the specified position. */
Read a block from the specified input. The returned block should begin at the specified position
readBlock
{ "repo_name": "sunchao/presto", "path": "presto-spi/src/main/java/com/facebook/presto/spi/block/BlockEncoding.java", "license": "apache-2.0", "size": 1439 }
[ "io.airlift.slice.SliceInput" ]
import io.airlift.slice.SliceInput;
import io.airlift.slice.*;
[ "io.airlift.slice" ]
io.airlift.slice;
885,111
protected void fireElementContentAboutToBeReplaced(Object element) { Iterator e= new ArrayList(fElementStateListeners).iterator(); while (e.hasNext()) { IElementStateListener l= (IElementStateListener) e.next(); l.elementContentAboutToBeReplaced(element); } }
void function(Object element) { Iterator e= new ArrayList(fElementStateListeners).iterator(); while (e.hasNext()) { IElementStateListener l= (IElementStateListener) e.next(); l.elementContentAboutToBeReplaced(element); } }
/** * Informs all registered element state listeners about an impending * replace of the given element's content. * * @param element the element * @see IElementStateListener#elementContentAboutToBeReplaced(Object) */
Informs all registered element state listeners about an impending replace of the given element's content
fireElementContentAboutToBeReplaced
{ "repo_name": "xiaguangme/simon_ide_tools", "path": "02.eclipse_enhance/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java", "license": "apache-2.0", "size": 31197 }
[ "java.util.ArrayList", "java.util.Iterator" ]
import java.util.ArrayList; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,892,656
public static boolean deleteColorItem(Context context, ColorItem colorItemToDelete) { if (colorItemToDelete == null) { throw new IllegalArgumentException("Can't delete a null color item"); } final SharedPreferences sharedPreferences = getPreferences(context); final List<...
static boolean function(Context context, ColorItem colorItemToDelete) { if (colorItemToDelete == null) { throw new IllegalArgumentException(STR); } final SharedPreferences sharedPreferences = getPreferences(context); final List<ColorItem> savedColorsItems = getSavedColorItems(sharedPreferences); for (Iterator<ColorItem...
/** * Delete a {@link fr.tvbarthel.apps.cameracolorpicker.data.ColorItem}. * * @param context a {@link android.content.Context}. * @param colorItemToDelete the {@link fr.tvbarthel.apps.cameracolorpicker.data.ColorItem} to be deleted. * @return Returns true if the new color was success...
Delete a <code>fr.tvbarthel.apps.cameracolorpicker.data.ColorItem</code>
deleteColorItem
{ "repo_name": "0359xiaodong/CameraColorPicker", "path": "CameraColorPicker/app/src/main/java/fr/tvbarthel/apps/cameracolorpicker/data/ColorItems.java", "license": "apache-2.0", "size": 9244 }
[ "android.content.Context", "android.content.SharedPreferences", "java.util.Iterator", "java.util.List" ]
import android.content.Context; import android.content.SharedPreferences; import java.util.Iterator; import java.util.List;
import android.content.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
1,236,896
public static FileUtils.FileCopyResult gzip(final File inFile, final File outFile, Predicate<Throwable> shouldRetry) throws IOException { gzip(Files.asByteSource(inFile), Files.asByteSink(outFile), shouldRetry); return new FileUtils.FileCopyResult(outFile); }
static FileUtils.FileCopyResult function(final File inFile, final File outFile, Predicate<Throwable> shouldRetry) throws IOException { gzip(Files.asByteSource(inFile), Files.asByteSink(outFile), shouldRetry); return new FileUtils.FileCopyResult(outFile); }
/** * Gzips the input file to the output * * @param inFile The file to gzip * @param outFile A target file to copy the uncompressed contents of inFile to * @param shouldRetry Predicate on a potential throwable to determine if the copy should be attempted again. * * @return The result of th...
Gzips the input file to the output
gzip
{ "repo_name": "praveev/druid", "path": "java-util/src/main/java/io/druid/java/util/common/CompressionUtils.java", "license": "apache-2.0", "size": 16791 }
[ "com.google.common.base.Predicate", "com.google.common.io.Files", "java.io.File", "java.io.IOException" ]
import com.google.common.base.Predicate; import com.google.common.io.Files; import java.io.File; import java.io.IOException;
import com.google.common.base.*; import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
2,500,637
public void addITraitsGetter(Name getterName, Name returnType, InstructionList body) { ITraitVisitor traitVisitor = addMethodToTraits(itraits, getterName, Collections.<Name>emptyList(), returnType, Collections.<Object>emptyList(), false, ABCConstants.TRAIT_Getter, body); traitVisitor.visitStart(...
void function(Name getterName, Name returnType, InstructionList body) { ITraitVisitor traitVisitor = addMethodToTraits(itraits, getterName, Collections.<Name>emptyList(), returnType, Collections.<Object>emptyList(), false, ABCConstants.TRAIT_Getter, body); traitVisitor.visitStart(); traitVisitor.visitEnd(); }
/** * Utility method to add an instance getter to the generated class. * * @param getterName {@link Name} of the method to add. * @param returnType {@link Name} of the return type of the method. * @param body An {@link InstructionList} for the body of the method. */
Utility method to add an instance getter to the generated class
addITraitsGetter
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/compiler/internal/abc/ClassGeneratorHelper.java", "license": "apache-2.0", "size": 21906 }
[ "java.util.Collections", "org.apache.flex.abc.ABCConstants", "org.apache.flex.abc.instructionlist.InstructionList", "org.apache.flex.abc.semantics.Name", "org.apache.flex.abc.visitors.ITraitVisitor" ]
import java.util.Collections; import org.apache.flex.abc.ABCConstants; import org.apache.flex.abc.instructionlist.InstructionList; import org.apache.flex.abc.semantics.Name; import org.apache.flex.abc.visitors.ITraitVisitor;
import java.util.*; import org.apache.flex.abc.*; import org.apache.flex.abc.instructionlist.*; import org.apache.flex.abc.semantics.*; import org.apache.flex.abc.visitors.*;
[ "java.util", "org.apache.flex" ]
java.util; org.apache.flex;
2,553,881
public static String toISO8601(Date date) { if (date == null) { return null; } synchronized (ISO_8601_DATE_FORMAT) { return ISO_8601_DATE_FORMAT.format(date); } }
static String function(Date date) { if (date == null) { return null; } synchronized (ISO_8601_DATE_FORMAT) { return ISO_8601_DATE_FORMAT.format(date); } }
/** * Formats the given date to a ISO-8601 date/time format, and UTC timezone. * <p/> * The returned date uses the following format: 2007-12-17T14:57:17 * * @param date The date to format * @return The corresponding ISO-8601 formatted string. */
Formats the given date to a ISO-8601 date/time format, and UTC timezone. The returned date uses the following format: 2007-12-17T14:57:17
toISO8601
{ "repo_name": "langera/libresonic", "path": "libresonic-main/src/main/java/org/libresonic/player/util/StringUtil.java", "license": "gpl-3.0", "size": 18105 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,533,843
@Deprecated public void setNonStrokingColor(float[] components) throws IOException { if (nonStrokingColorSpaceStack.isEmpty()) { throw new IllegalStateException("The color space must be set before setting a color"); } for (int i = 0; i < components.length; i++) ...
void function(float[] components) throws IOException { if (nonStrokingColorSpaceStack.isEmpty()) { throw new IllegalStateException(STR); } for (int i = 0; i < components.length; i++) { writeOperand(components[i]); } PDColorSpace currentNonStrokingColorSpace = nonStrokingColorSpaceStack.peek(); if (currentNonStrokingCol...
/** * Set the color components of current non-stroking color space. * * @param components The components to set for the current color. * @throws IOException If there is an error while writing to the stream. * @deprecated Use {@link #setNonStrokingColor(PDColor)} instead. */
Set the color components of current non-stroking color space
setNonStrokingColor
{ "repo_name": "benmccann/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java", "license": "apache-2.0", "size": 73640 }
[ "java.io.IOException", "org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace", "org.apache.pdfbox.pdmodel.graphics.color.PDICCBased", "org.apache.pdfbox.pdmodel.graphics.color.PDPattern", "org.apache.pdfbox.pdmodel.graphics.color.PDSeparation" ]
import java.io.IOException; import org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace; import org.apache.pdfbox.pdmodel.graphics.color.PDICCBased; import org.apache.pdfbox.pdmodel.graphics.color.PDPattern; import org.apache.pdfbox.pdmodel.graphics.color.PDSeparation;
import java.io.*; import org.apache.pdfbox.pdmodel.graphics.color.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
1,370,679
public Long getTagUsage(ContentItem contentItem);
Long function(ContentItem contentItem);
/** * Counts the current usages of a tag, meaning, how many ContentItems are tagged with the tag. * @param contentItem * @return * @author szabyg */
Counts the current usages of a tag, meaning, how many ContentItems are tagged with the tag
getTagUsage
{ "repo_name": "fregaham/KiWi", "path": "src/action/kiwi/api/tagging/TaggingService.java", "license": "bsd-3-clause", "size": 8103 }
[ "kiwi.model.content.ContentItem" ]
import kiwi.model.content.ContentItem;
import kiwi.model.content.*;
[ "kiwi.model.content" ]
kiwi.model.content;
853,245
public List<ReportNote> getNotes();
List<ReportNote> function();
/** * Gets the notes. * * @return the notes */
Gets the notes
getNotes
{ "repo_name": "IHTSDO/OTF-Mapping-Service", "path": "model/src/main/java/org/ihtsdo/otf/mapping/reports/Report.java", "license": "apache-2.0", "size": 4298 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,464,119
List<KeywordHit> getResults(Keyword keyword) { return results.get(keyword); }
List<KeywordHit> getResults(Keyword keyword) { return results.get(keyword); }
/** * Gets the keyword hits stored in this object for a given keyword. * * @param keyword The keyword. * * @return The keyword hits. */
Gets the keyword hits stored in this object for a given keyword
getResults
{ "repo_name": "rcordovano/autopsy", "path": "KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/QueryResults.java", "license": "apache-2.0", "size": 15198 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,101,741
private String[] validateUI() { ArrayList<String> errorList = new ArrayList<String>(); if (EDIT_MODE_CORRECT.equals(form.getLocalContext().getSelectedEditMode())) { if (form.ctnDetails().ccCorrectingHCP().getValue() == null) { errorList.add("Correcting HCP is mandatory."); } ...
String[] function() { ArrayList<String> errorList = new ArrayList<String>(); if (EDIT_MODE_CORRECT.equals(form.getLocalContext().getSelectedEditMode())) { if (form.ctnDetails().ccCorrectingHCP().getValue() == null) { errorList.add(STR); } if (form.ctnDetails().dtimCorrectedDateTime().getValue() == null) { errorList.add...
/** * WDEV-13872 * Custom validation (for correcting comment notes) */
WDEV-13872 Custom validation (for correcting comment notes)
validateUI
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/OCRR/src/ims/ocrr/forms/resultcommentsdialog/Logic.java", "license": "agpl-3.0", "size": 18889 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,621,354
public List<TerrainModification> getNewVersion(final String proprietaire, final long lastVersion, final String me) throws GeneralException { final List<TerrainModification> modifications = new ArrayList<>(); final Map<Integer, Map<Integer, Layers>> terrain = getTerrain(pr...
List<TerrainModification> function(final String proprietaire, final long lastVersion, final String me) throws GeneralException { final List<TerrainModification> modifications = new ArrayList<>(); final Map<Integer, Map<Integer, Layers>> terrain = getTerrain(proprietaire, false).getLayers(); for (final Entry<Integer, Ma...
/** * Renvoi la nouvelle version du terrain * * @param proprietaire * @param lastVersion * @param login * @return * @throws GeneralException */
Renvoi la nouvelle version du terrain
getNewVersion
{ "repo_name": "Mastersnes/BUL", "path": "src/main/java/bdd/TerrainDAO.java", "license": "apache-2.0", "size": 6946 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,111,141
public CreateBucketResult grabBucket(final int bucketId, final InternalDistributedMember moveSource, final boolean forceCreation, final boolean replaceOffineData, final boolean isRebalance, final InternalDistributedMember creationRequestor, final boolean isDiskRecovery) { CreateBucketResult grab...
CreateBucketResult function(final int bucketId, final InternalDistributedMember moveSource, final boolean forceCreation, final boolean replaceOffineData, final boolean isRebalance, final InternalDistributedMember creationRequestor, final boolean isDiskRecovery) { CreateBucketResult grab = grabFreeBucket(bucketId, parti...
/** * Create a redundancy bucket on this member * * @param bucketId the id of the bucket to create * @param moveSource the member id of where the bucket is being copied from, if this is a bucket * move. Setting this field means that we are allowed to go over redundancy. * @param forceCreation f...
Create a redundancy bucket on this member
grabBucket
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java", "license": "apache-2.0", "size": 123871 }
[ "java.util.List", "org.apache.geode.cache.RegionDestroyedException", "org.apache.geode.distributed.internal.membership.InternalDistributedMember" ]
import java.util.List; import org.apache.geode.cache.RegionDestroyedException; import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.distributed.internal.membership.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
548,294
@Override public String interceptSQL(String sql, int sqlType) { LOGGER.debug("sql interceptSQL:"); final int sqltype = sqlType; final String sqls = DefaultSqlInterceptor.processEscape(sql); NetSystem.getInstance().getExecutor() .execute(new StatisticsSqlRunner(sqltype, sqls)); return sql; }
String function(String sql, int sqlType) { LOGGER.debug(STR); final int sqltype = sqlType; final String sqls = DefaultSqlInterceptor.processEscape(sql); NetSystem.getInstance().getExecutor() .execute(new StatisticsSqlRunner(sqltype, sqls)); return sql; }
/** * interceptSQL , type :insert,delete,update,select exectime:xxx ms log * content : select:select 1 from table,exectime:100ms,shared:1 etc */
interceptSQL , type :insert,delete,update,select exectime:xxx ms log content : select:select 1 from table,exectime:100ms,shared:1 etc
interceptSQL
{ "repo_name": "huangsizhou/Mycat-Server", "path": "src/main/java/io/mycat/server/interceptor/impl/StatisticsSqlInterceptor.java", "license": "apache-2.0", "size": 3758 }
[ "io.mycat.net.NetSystem" ]
import io.mycat.net.NetSystem;
import io.mycat.net.*;
[ "io.mycat.net" ]
io.mycat.net;
1,197,150
private static DelegatedCredentialReference getDelegatedCredentialReference(String serializedDCR) throws AuthenticationException { StringReader serialDCR = new StringReader(serializedDCR); ClassLoader classLoader = CaGridWebSSODelegationLookupFilter.class.getClassLoader(); ...
static DelegatedCredentialReference function(String serializedDCR) throws AuthenticationException { StringReader serialDCR = new StringReader(serializedDCR); ClassLoader classLoader = CaGridWebSSODelegationLookupFilter.class.getClassLoader(); DelegatedCredentialReference dcr = null; try { InputStream wsddFile = classLo...
/** * This method de-serializes the client serialized DelegatedCredentialReference * * @param serializedDCR * @return DelegatedCredentialReference */
This method de-serializes the client serialized DelegatedCredentialReference
getDelegatedCredentialReference
{ "repo_name": "NCIP/cagrid-iphone-app", "path": "software/gss/src/gov/nih/nci/gss/grid/authentication/AuthenticationUtility.java", "license": "bsd-3-clause", "size": 7842 }
[ "gov.nih.nci.cagrid.common.Utils", "java.io.InputStream", "java.io.StringReader", "org.cagrid.gaards.cds.delegated.stubs.types.DelegatedCredentialReference", "org.cagrid.websso.client.filter.CaGridWebSSODelegationLookupFilter" ]
import gov.nih.nci.cagrid.common.Utils; import java.io.InputStream; import java.io.StringReader; import org.cagrid.gaards.cds.delegated.stubs.types.DelegatedCredentialReference; import org.cagrid.websso.client.filter.CaGridWebSSODelegationLookupFilter;
import gov.nih.nci.cagrid.common.*; import java.io.*; import org.cagrid.gaards.cds.delegated.stubs.types.*; import org.cagrid.websso.client.filter.*;
[ "gov.nih.nci", "java.io", "org.cagrid.gaards", "org.cagrid.websso" ]
gov.nih.nci; java.io; org.cagrid.gaards; org.cagrid.websso;
1,040,622
protected void logOutputToFile() { PrintWriter writer = null; try { String logHeader = null; String path = logFileDirectory(); int transferType = parent.getTransferType(); if (transferType == ImportExportDataProcess.EXPORT) { logHeader...
void function() { PrintWriter writer = null; try { String logHeader = null; String path = logFileDirectory(); int transferType = parent.getTransferType(); if (transferType == ImportExportDataProcess.EXPORT) { logHeader = STR; path += SystemProperties.getProperty(STR, STR); } else { logHeader = STR; path += SystemProper...
/** * Logs the contents of the output pane to file. */
Logs the contents of the output pane to file
logOutputToFile
{ "repo_name": "takisd123/executequery", "path": "src/org/executequery/gui/importexport/AbstractImportExportWorker.java", "license": "gpl-3.0", "size": 29777 }
[ "java.io.FileWriter", "java.io.IOException", "java.io.PrintWriter", "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date", "org.underworldlabs.util.SystemProperties" ]
import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.underworldlabs.util.SystemProperties;
import java.io.*; import java.text.*; import java.util.*; import org.underworldlabs.util.*;
[ "java.io", "java.text", "java.util", "org.underworldlabs.util" ]
java.io; java.text; java.util; org.underworldlabs.util;
2,080,817
public DiscoCache discoCache(AffinityTopologyVersion topVer) { return discoCacheHist.get(topVer); }
DiscoCache function(AffinityTopologyVersion topVer) { return discoCacheHist.get(topVer); }
/** * Gets discovery collection cache from SPI safely guarding against "floating" collections. * * @return Discovery collection cache. */
Gets discovery collection cache from SPI safely guarding against "floating" collections
discoCache
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java", "license": "apache-2.0", "size": 123630 }
[ "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion" ]
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.affinity.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,632,571
EClass getParameterExpressionType();
EClass getParameterExpressionType();
/** * Returns the meta object for class '{@link net.opengis.wfs20.ParameterExpressionType <em>Parameter Expression Type</em>}'. * <!-- begin-user-doc * --> <!-- end-user-doc --> * @return the meta object for class '<em>Parameter Expression Type</em>'. * @see net.opengis.wfs20.ParameterExpressionType ...
Returns the meta object for class '<code>net.opengis.wfs20.ParameterExpressionType Parameter Expression Type</code>'.
getParameterExpressionType
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java", "license": "lgpl-2.1", "size": 404067 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,181,568
private int getPrimaryColor() { TypedArray typedArray = getContext().obtainStyledAttributes(new TypedValue().data, new int[]{R.attr.colorPrimary}); int color = typedArray.getColor(0, 0); typedArray.recycle(); return color; }
int function() { TypedArray typedArray = getContext().obtainStyledAttributes(new TypedValue().data, new int[]{R.attr.colorPrimary}); int color = typedArray.getColor(0, 0); typedArray.recycle(); return color; }
/** * Gets the primary color of this project. * * @return primary color of this project. */
Gets the primary color of this project
getPrimaryColor
{ "repo_name": "PSD-Company/duo-navigation-drawer", "path": "duo-navigation-drawer/src/main/java/nl/psdcompany/duonavigationdrawer/views/DuoMenuView.java", "license": "apache-2.0", "size": 11793 }
[ "android.content.res.TypedArray", "android.util.TypedValue" ]
import android.content.res.TypedArray; import android.util.TypedValue;
import android.content.res.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
800,768
@Test public void testGetNestedNamespace2() { String msg = "The adaptation of Namespace.getNestedNamespace() seems to be wrong. The return type should be an EList."; assertTrue(msg, package1.getNestedNamespace() instanceof EList); } /** * <p> * A test case testing the operation {@link Namespa...
void function() { String msg = STR; assertTrue(msg, package1.getNestedNamespace() instanceof EList); } /** * <p> * A test case testing the operation {@link Namespace#getNestingNamespace()}
/** * <p> * A test case testing the operation {@link Namespace#getNestedNamespace()}. * </p> */
A test case testing the operation <code>Namespace#getNestedNamespace()</code>.
testGetNestedNamespace2
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.metamodels.test/src/org/dresdenocl/metamodels/test/tests/TestNamespace.java", "license": "lgpl-3.0", "size": 8809 }
[ "org.dresdenocl.pivotmodel.Namespace", "org.eclipse.emf.common.util.EList", "org.junit.Assert" ]
import org.dresdenocl.pivotmodel.Namespace; import org.eclipse.emf.common.util.EList; import org.junit.Assert;
import org.dresdenocl.pivotmodel.*; import org.eclipse.emf.common.util.*; import org.junit.*;
[ "org.dresdenocl.pivotmodel", "org.eclipse.emf", "org.junit" ]
org.dresdenocl.pivotmodel; org.eclipse.emf; org.junit;
2,515,119
protected JBuffer getMemoryBuffer(int minSize) { if (!memory.isInitialized() || memory.size() < minSize) { allocate(minSize); } return memory; }
JBuffer function(int minSize) { if (!memory.isInitialized() memory.size() < minSize) { allocate(minSize); } return memory; }
/** * Retrieves a memory buffer, allocated if neccessary, at least minSize in * bytes. If existing buffer is already big enough, it is returned, otherwise * a new buffer is allocated and the existing one released. * * @param minSize * minimum number of bytes required for the buffer * @return the...
Retrieves a memory buffer, allocated if neccessary, at least minSize in bytes. If existing buffer is already big enough, it is returned, otherwise a new buffer is allocated and the existing one released
getMemoryBuffer
{ "repo_name": "universsky/diddler", "path": "src/org/jnetpcap/packet/JPacket.java", "license": "lgpl-3.0", "size": 30500 }
[ "org.jnetpcap.nio.JBuffer" ]
import org.jnetpcap.nio.JBuffer;
import org.jnetpcap.nio.*;
[ "org.jnetpcap.nio" ]
org.jnetpcap.nio;
1,558,619
public void setWorkingDirectory( File workingDir ) { if ( workingDir != null ) { this.workingDir = workingDir.getAbsolutePath(); } }
void function( File workingDir ) { if ( workingDir != null ) { this.workingDir = workingDir.getAbsolutePath(); } }
/** * Sets execution directory. */
Sets execution directory
setWorkingDirectory
{ "repo_name": "CCM-Modding/Nucleum-Omnium", "path": "src/main/java/ccm/libs/org/codehaus/plexus/util/cli/shell/Shell.java", "license": "mit", "size": 10880 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,582,696
private void writeByte(int x) { assert x >= 0 && x < 256; // optimized if byte-aligned if (N == 0) { try { out.write(x); } catch (IOException e) { e.printStackTrace(); } return; } // otherwise write one bit at a time for (int i = ...
void function(int x) { assert x >= 0 && x < 256; if (N == 0) { try { out.write(x); } catch (IOException e) { e.printStackTrace(); } return; } for (int i = 0; i < 8; i++) { boolean bit = ((x >>> (8 - i - 1)) & 1) == 1; writeBit(bit); } }
/** * Write the 8-bit byte to the binary output stream. */
Write the 8-bit byte to the binary output stream
writeByte
{ "repo_name": "wz12406/accumulate", "path": "algorithm/src/webapp/doc/算法 第四版/AlgorithmsSedgewick-master/StdLib/BinaryOut.java", "license": "apache-2.0", "size": 9175 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
655,461
@Override public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) { super.doRouteStatusChange(statusChangeEvent); if (getDocumentHeader().getWorkflowDocument().isProcessed()) { changeLedgerPendingEntriesApprovedStatusCode(); } else if (getDocument...
void function(DocumentRouteStatusChange statusChangeEvent) { super.doRouteStatusChange(statusChangeEvent); if (getDocumentHeader().getWorkflowDocument().isProcessed()) { changeLedgerPendingEntriesApprovedStatusCode(); } else if (getDocumentHeader().getWorkflowDocument().isCanceled() getDocumentHeader().getWorkflowDocum...
/** * Override to call super and then iterate over all GLPEs and update the approved code appropriately. * * @see Document#doRouteStatusChange() */
Override to call super and then iterate over all GLPEs and update the approved code appropriately
doRouteStatusChange
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/document/LaborJournalVoucherDocument.java", "license": "agpl-3.0", "size": 12355 }
[ "org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange" ]
import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange;
import org.kuali.rice.kew.framework.postprocessor.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,649,163
public synchronized boolean sendAck(PowerMaxBaseMessage msg, byte ackType) { int code = msg.getCode(); byte[] rawData = msg.getRawData(); byte[] ackData; if ((code >= 0x80) || ((code < 0x10) && (rawData[rawData.length - 3] == 0x43))) { ackData = new byte[] { 0x0D, ackType...
synchronized boolean function(PowerMaxBaseMessage msg, byte ackType) { int code = msg.getCode(); byte[] rawData = msg.getRawData(); byte[] ackData; if ((code >= 0x80) ((code < 0x10) && (rawData[rawData.length - 3] == 0x43))) { ackData = new byte[] { 0x0D, ackType, 0x43, 0x00, 0x0A }; } else { ackData = new byte[] { 0x0...
/** * Send an ACK for a received message * * @param msg * the received message object * @param ackType * the type of ACK to be sent * * @return true if the ACK was sent or false if not */
Send an ACK for a received message
sendAck
{ "repo_name": "dominicdesu/openhab", "path": "bundles/binding/org.openhab.binding.powermax/src/main/java/org/openhab/binding/powermax/internal/message/PowerMaxCommDriver.java", "license": "epl-1.0", "size": 21994 }
[ "javax.xml.bind.DatatypeConverter" ]
import javax.xml.bind.DatatypeConverter;
import javax.xml.bind.*;
[ "javax.xml" ]
javax.xml;
1,775,653
public String toString() { StringBuffer text = new StringBuffer(); for (Iterator iter = turns.iterator(); iter.hasNext();) { text.append(iter.next()); if (iter.hasNext()) text.append(" -> "); } text.append(" ["); text.append(getScore()); text.append("]"); return text.to...
String function() { StringBuffer text = new StringBuffer(); for (Iterator iter = turns.iterator(); iter.hasNext();) { text.append(iter.next()); if (iter.hasNext()) text.append(STR); } text.append(STR); text.append(getScore()); text.append("]"); return text.toString(); }
/** * For debugging * * @see java.lang.Object#toString() */
For debugging
toString
{ "repo_name": "andrewswan/tally-ho", "path": "src/main/java/tallyho/model/player/ai/Path.java", "license": "mit", "size": 2293 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,667,910
public static Map<String, ResourceInformation> getNodeResourceInformation( Configuration conf) { if (!initializedNodeResources) { synchronized (ResourceUtils.class) { if (!initializedNodeResources) { Map<String, ResourceInformation> nodeResources = initializeNodeResourceInformation( ...
static Map<String, ResourceInformation> function( Configuration conf) { if (!initializedNodeResources) { synchronized (ResourceUtils.class) { if (!initializedNodeResources) { Map<String, ResourceInformation> nodeResources = initializeNodeResourceInformation( conf); checkMandatoryResources(nodeResources); addMandatoryRe...
/** * Function to get the resources for a node. This function will look at the * file {@link YarnConfiguration#NODE_RESOURCES_CONFIGURATION_FILE} to * determine the node resources. * * @param conf configuration file * @return a map to resource name to the ResourceInformation object. The map * is gu...
Function to get the resources for a node. This function will look at the file <code>YarnConfiguration#NODE_RESOURCES_CONFIGURATION_FILE</code> to determine the node resources
getNodeResourceInformation
{ "repo_name": "ChetnaChaudhari/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/resource/ResourceUtils.java", "license": "apache-2.0", "size": 28572 }
[ "java.util.Collections", "java.util.Map", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.yarn.api.records.ResourceInformation" ]
import java.util.Collections; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.api.records.ResourceInformation;
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.yarn.api.records.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
745,823
public final static VersionTypeImpl parseFactory( String versionAsString) throws NullPointerException, ParseException { if (versionAsString == null) throw new NullPointerException("Cannot convert a null string into a value of the version type."); int dotIndex = versionAsString.indexOf('.'); i...
final static VersionTypeImpl function( String versionAsString) throws NullPointerException, ParseException { if (versionAsString == null) throw new NullPointerException(STR); int dotIndex = versionAsString.indexOf('.'); if (dotIndex == -1) throw new ParseException(STR, 0); String majorString = versionAsString.substring...
/** * <p>Parse a string representation of a version number and create a value of this * class. The value must contain a&nbsp;'<code>.</code>' to be valid. The major and minor * parts of the version numbers, before and after the dot respectively, must range between * 0&nbsp;and&nbsp;255.</p> * * @param ver...
Parse a string representation of a version number and create a value of this class. The value must contain a&nbsp;'<code>.</code>' to be valid. The major and minor parts of the version numbers, before and after the dot respectively, must range between 0&nbsp;and&nbsp;255
parseFactory
{ "repo_name": "AMWA-TV/maj", "path": "src/main/java/tv/amwa/maj/record/impl/VersionTypeImpl.java", "license": "apache-2.0", "size": 9813 }
[ "java.text.ParseException" ]
import java.text.ParseException;
import java.text.*;
[ "java.text" ]
java.text;
443,974
@Bean(name = NAME) @ConditionalOnMissingBean(name = NAME) public String flywayCoreUnavailable() { return "N/A"; }
@Bean(name = NAME) @ConditionalOnMissingBean(name = NAME) String function() { return "N/A"; }
/** * Fallback, when flyway is disabled => some configuration depends on it (e.g. Rest Template) * @return */
Fallback, when flyway is disabled => some configuration depends on it (e.g. Rest Template)
flywayCoreUnavailable
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/config/flyway/CoreFlywayConfig.java", "license": "mit", "size": 2261 }
[ "org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean", "org.springframework.context.annotation.Bean" ]
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean;
import org.springframework.boot.autoconfigure.condition.*; import org.springframework.context.annotation.*;
[ "org.springframework.boot", "org.springframework.context" ]
org.springframework.boot; org.springframework.context;
2,459,402
private void onGetBlobDataError(Exception e, GetBlobOptionsInternal options, boolean encrypted) { onError(e); Counter blobErrorCount = encrypted ? getEncryptedBlobErrorCount : getBlobErrorCount; Counter blobWithRangeErrorCount = encrypted ? getEncryptedBlobWithRangeErrorCount : getBlobWithRangeErrorCount;...
void function(Exception e, GetBlobOptionsInternal options, boolean encrypted) { onError(e); Counter blobErrorCount = encrypted ? getEncryptedBlobErrorCount : getBlobErrorCount; Counter blobWithRangeErrorCount = encrypted ? getEncryptedBlobWithRangeErrorCount : getBlobWithRangeErrorCount; Meter operationErrorRateMeter =...
/** * Update appropriate metrics on a getBlob (Data or All) operation related error. * @param e the {@link Exception} associated with the error. * @param options the {@link GetBlobOptionsInternal} associated with the request. * @param encrypted {@code true} if blob is encrypted, {@code false} otherwise *...
Update appropriate metrics on a getBlob (Data or All) operation related error
onGetBlobDataError
{ "repo_name": "vgkholla/ambry", "path": "ambry-router/src/main/java/com.github.ambry.router/NonBlockingRouterMetrics.java", "license": "apache-2.0", "size": 46374 }
[ "com.codahale.metrics.Counter", "com.codahale.metrics.Meter" ]
import com.codahale.metrics.Counter; import com.codahale.metrics.Meter;
import com.codahale.metrics.*;
[ "com.codahale.metrics" ]
com.codahale.metrics;
1,066,180
protected void checkResultByFile(@Nullable String message, @TestDataFile @NotNull String expectedFilePath, final boolean ignoreTrailingSpaces) { bringRealEditorBack(); PostprocessReformattingAspect.getInstance(getProject()).doPostponedFormatting(); if (ignoreTrailingSpaces) { final Editor editor = ...
void function(@Nullable String message, @TestDataFile @NotNull String expectedFilePath, final boolean ignoreTrailingSpaces) { bringRealEditorBack(); PostprocessReformattingAspect.getInstance(getProject()).doPostponedFormatting(); if (ignoreTrailingSpaces) { final Editor editor = myEditor; TrailingSpacesStripper.strip(e...
/** * Validates that content of the editor as well as caret and selection matches one specified in data file that * should be formed with the same format as one used in configureByFile * @param message - this check specific message. Added to text, caret position, selection checking. May be null * @param exp...
Validates that content of the editor as well as caret and selection matches one specified in data file that should be formed with the same format as one used in configureByFile
checkResultByFile
{ "repo_name": "paplorinc/intellij-community", "path": "platform/testFramework/src/com/intellij/testFramework/LightPlatformCodeInsightTestCase.java", "license": "apache-2.0", "size": 28177 }
[ "com.intellij.openapi.editor.Editor", "com.intellij.openapi.editor.ex.util.EditorUtil", "com.intellij.openapi.editor.impl.TrailingSpacesStripper", "com.intellij.openapi.util.io.FileUtil", "com.intellij.openapi.util.text.StringUtil", "com.intellij.openapi.vfs.CharsetToolkit", "com.intellij.psi.PsiDocumen...
import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.ex.util.EditorUtil; import com.intellij.openapi.editor.impl.TrailingSpacesStripper; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.CharsetToolkit; import com.int...
import com.intellij.openapi.editor.*; import com.intellij.openapi.editor.ex.util.*; import com.intellij.openapi.editor.impl.*; import com.intellij.openapi.util.io.*; import com.intellij.openapi.util.text.*; import com.intellij.openapi.vfs.*; import com.intellij.psi.*; import com.intellij.psi.impl.source.*; import java....
[ "com.intellij.openapi", "com.intellij.psi", "java.io", "org.jetbrains.annotations" ]
com.intellij.openapi; com.intellij.psi; java.io; org.jetbrains.annotations;
1,337,668
StringBuilder sbStr = new StringBuilder(); sbStr.append(method.getName()); sbStr.append('('); for (AbstractMap.SimpleEntry<Type, SArray.Size> parameter : parameters) { Class clazz; Type parameterType = parameter.getKey(); SArray.Size parameterSize = parame...
StringBuilder sbStr = new StringBuilder(); sbStr.append(method.getName()); sbStr.append('('); for (AbstractMap.SimpleEntry<Type, SArray.Size> parameter : parameters) { Class clazz; Type parameterType = parameter.getKey(); SArray.Size parameterSize = parameter.getValue(); if (parameterSize != null) { clazz = SArray.getN...
/** * Get the signature of the given element. * Ex: bar(type1,type2,...) * * @return signature of the given element. */
Get the signature of the given element. Ex: bar(type1,type2,...)
transformToFullName
{ "repo_name": "ethmobile/ethdroid", "path": "ethdroid/src/main/java/io/ethmobile/ethdroid/solidity/element/SolidityElement.java", "license": "mit", "size": 4209 }
[ "io.ethmobile.ethdroid.solidity.types.SArray", "java.lang.reflect.Type", "java.util.AbstractMap" ]
import io.ethmobile.ethdroid.solidity.types.SArray; import java.lang.reflect.Type; import java.util.AbstractMap;
import io.ethmobile.ethdroid.solidity.types.*; import java.lang.reflect.*; import java.util.*;
[ "io.ethmobile.ethdroid", "java.lang", "java.util" ]
io.ethmobile.ethdroid; java.lang; java.util;
361,690
Value<Boolean> charged();
Value<Boolean> charged();
/** * Gets the {@link Value} for the current "charged" state. * * @return The value for the "charged" state */
Gets the <code>Value</code> for the current "charged" state
charged
{ "repo_name": "joshgarde/SpongeAPI", "path": "src/main/java/org/spongepowered/api/data/manipulator/mutable/entity/ChargedData.java", "license": "mit", "size": 1921 }
[ "org.spongepowered.api.data.value.mutable.Value" ]
import org.spongepowered.api.data.value.mutable.Value;
import org.spongepowered.api.data.value.mutable.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
2,789,824
StoredBlock get(Sha256Hash hash) throws BlockStoreException; /** * Returns the {@link StoredBlock} that represents the top of the chain of greatest total work. Note that this * can be arbitrarily expensive, you probably should use {@link com.google.bitcoin.core.BlockChain#getChainHead()}
StoredBlock get(Sha256Hash hash) throws BlockStoreException; /** * Returns the {@link StoredBlock} that represents the top of the chain of greatest total work. Note that this * can be arbitrarily expensive, you probably should use {@link com.google.bitcoin.core.BlockChain#getChainHead()}
/** * Returns the StoredBlock given a hash. The returned values block.getHash() method will be equal to the * parameter. If no such block is found, returns null. */
Returns the StoredBlock given a hash. The returned values block.getHash() method will be equal to the parameter. If no such block is found, returns null
get
{ "repo_name": "HashEngineering/myriadcoinj", "path": "core/src/main/java/com/google/bitcoin/store/BlockStore.java", "license": "apache-2.0", "size": 2568 }
[ "com.google.bitcoin.core.Sha256Hash", "com.google.bitcoin.core.StoredBlock" ]
import com.google.bitcoin.core.Sha256Hash; import com.google.bitcoin.core.StoredBlock;
import com.google.bitcoin.core.*;
[ "com.google.bitcoin" ]
com.google.bitcoin;
2,564,004
@Test public void testGetSetPrefix() { final StrSubstitutor sub = new StrSubstitutor(); assertTrue(sub.getVariablePrefixMatcher() instanceof StrMatcher.StringMatcher); sub.setVariablePrefix('<'); assertTrue(sub.getVariablePrefixMatcher() instanceof StrMatcher.CharMatcher); ...
void function() { final StrSubstitutor sub = new StrSubstitutor(); assertTrue(sub.getVariablePrefixMatcher() instanceof StrMatcher.StringMatcher); sub.setVariablePrefix('<'); assertTrue(sub.getVariablePrefixMatcher() instanceof StrMatcher.CharMatcher); sub.setVariablePrefix("<<"); assertTrue(sub.getVariablePrefixMatche...
/** * Tests get set. */
Tests get set
testGetSetPrefix
{ "repo_name": "kinow/commons-lang", "path": "src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java", "license": "apache-2.0", "size": 26361 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,280,827
@POST @Produces("text/plain") public Response createGroup(String body, @Context HttpHeaders headers, @Context UriInfo ui) { return handleRequest(headers, body, ui, Request.Type.POST, createGroupResource(null)); }
@Produces(STR) Response function(String body, @Context HttpHeaders headers, @Context UriInfo ui) { return handleRequest(headers, body, ui, Request.Type.POST, createGroupResource(null)); }
/** * Creates a group. * Handles: POST /groups requests. * * @param headers http headers * @param ui uri info * @return information regarding the created group */
Creates a group. Handles: POST /groups requests
createGroup
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java", "license": "apache-2.0", "size": 4590 }
[ "javax.ws.rs.Produces", "javax.ws.rs.core.Context", "javax.ws.rs.core.HttpHeaders", "javax.ws.rs.core.Response", "javax.ws.rs.core.UriInfo" ]
import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo;
import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
159,872
String getLocks() throws IOException;
String getLocks() throws IOException;
/** * Get locks. * @return lock list in JSON * @throws IOException if a remote or network exception occurs */
Get locks
getLocks
{ "repo_name": "vincentpoon/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 104154 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,668,801
public void setColor(@Nonnull Color color) { this.color = color; }
void function(@Nonnull Color color) { this.color = color; }
/** * Set the colour of the rectangle. * @param color the new colour */
Set the colour of the rectangle
setColor
{ "repo_name": "bensmith87/ui", "path": "src/main/java/ben/ui/renderer/FlatRenderer.java", "license": "lgpl-3.0", "size": 3128 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,292,988
public boolean isExternalStorageWritable() { String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { File publicDir = Environment.getExternalStorageDirectory(); return publicDir.canWrite(); } return false; }
boolean function() { String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { File publicDir = Environment.getExternalStorageDirectory(); return publicDir.canWrite(); } return false; }
/** * Checks if an external storage is present, and if there are write permissions for the documents folder. * * @return the boolean */
Checks if an external storage is present, and if there are write permissions for the documents folder
isExternalStorageWritable
{ "repo_name": "schocco/mds-droid", "path": "app/src/main/java/info/muni_scale/mdsdroid/gpx/GpxFileWriter.java", "license": "mit", "size": 7520 }
[ "android.os.Environment", "java.io.File" ]
import android.os.Environment; import java.io.File;
import android.os.*; import java.io.*;
[ "android.os", "java.io" ]
android.os; java.io;
2,452,704
public interface Listener { void onRequirementsStateChanged( RequirementsWatcher requirementsWatcher, @Requirements.RequirementFlags int notMetRequirements); } private final Context context; private final Listener listener; private final Requirements requirements; private final Han...
interface Listener { void function( RequirementsWatcher requirementsWatcher, @Requirements.RequirementFlags int notMetRequirements); } private final Context context; private final Listener listener; private final Requirements requirements; private final Handler handler; @Nullable private DeviceStatusChangeReceiver rece...
/** * Called when there is a change on the met requirements. * * @param requirementsWatcher Calling instance. * @param notMetRequirements {@link Requirements.RequirementFlags RequirementFlags} that are not * met, or 0. */
Called when there is a change on the met requirements
onRequirementsStateChanged
{ "repo_name": "ened/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/scheduler/RequirementsWatcher.java", "license": "apache-2.0", "size": 8075 }
[ "android.content.Context", "android.os.Handler", "androidx.annotation.Nullable", "com.google.android.exoplayer2.util.Util" ]
import android.content.Context; import android.os.Handler; import androidx.annotation.Nullable; import com.google.android.exoplayer2.util.Util;
import android.content.*; import android.os.*; import androidx.annotation.*; import com.google.android.exoplayer2.util.*;
[ "android.content", "android.os", "androidx.annotation", "com.google.android" ]
android.content; android.os; androidx.annotation; com.google.android;
276,582
private LiteralOp evalScalarOperation( Hop bop ) throws LopsException, DMLRuntimeException, IOException, HopsException { //Timing time = new Timing( true ); DataOp tmpWrite = new DataOp(TMP_VARNAME, bop.getDataType(), bop.getValueType(), bop, DataOpTypes.TRANSIENTWRITE, TMP_VARNAME); //generate runti...
LiteralOp function( Hop bop ) throws LopsException, DMLRuntimeException, IOException, HopsException { DataOp tmpWrite = new DataOp(TMP_VARNAME, bop.getDataType(), bop.getValueType(), bop, DataOpTypes.TRANSIENTWRITE, TMP_VARNAME); Dag<Lop> dag = new Dag<>(); Recompiler.rClearLops(tmpWrite); Lop lops = tmpWrite.construct...
/** * In order to (1) prevent unexpected side effects from constant folding and * (2) for simplicity with regard to arbitrary value type combinations, * we use the same compilation and runtime for constant folding as we would * use for actual instruction execution. * * @param bop high-level operator * ...
In order to (1) prevent unexpected side effects from constant folding and (2) for simplicity with regard to arbitrary value type combinations, we use the same compilation and runtime for constant folding as we would use for actual instruction execution
evalScalarOperation
{ "repo_name": "dusenberrymw/systemml", "path": "src/main/java/org/apache/sysml/hops/rewrite/RewriteConstantFolding.java", "license": "apache-2.0", "size": 9460 }
[ "java.io.IOException", "java.util.ArrayList", "org.apache.sysml.conf.ConfigurationManager", "org.apache.sysml.hops.DataOp", "org.apache.sysml.hops.Hop", "org.apache.sysml.hops.HopsException", "org.apache.sysml.hops.LiteralOp", "org.apache.sysml.hops.recompile.Recompiler", "org.apache.sysml.lops.Lop"...
import java.io.IOException; import java.util.ArrayList; import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.hops.DataOp; import org.apache.sysml.hops.Hop; import org.apache.sysml.hops.HopsException; import org.apache.sysml.hops.LiteralOp; import org.apache.sysml.hops.recompile.Recompiler; import ...
import java.io.*; import java.util.*; import org.apache.sysml.conf.*; import org.apache.sysml.hops.*; import org.apache.sysml.hops.recompile.*; import org.apache.sysml.lops.*; import org.apache.sysml.lops.compile.*; import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.controlprogram.*; import org.apache.s...
[ "java.io", "java.util", "org.apache.sysml" ]
java.io; java.util; org.apache.sysml;
614,351
public HTMSensor<?> getSensor() { return sensor; } /** * Returns the {@link Connections} object being used by this {@link Layer}
HTMSensor<?> function() { return sensor; } /** * Returns the {@link Connections} object being used by this {@link Layer}
/** * Returns the configured {@link Sensor} if any exists in this * {@code Layer}, or null if one does not. * @return */
Returns the configured <code>Sensor</code> if any exists in this Layer, or null if one does not
getSensor
{ "repo_name": "user405/test", "path": "src/main/java/org/numenta/nupic/network/Layer.java", "license": "agpl-3.0", "size": 72476 }
[ "org.numenta.nupic.Connections", "org.numenta.nupic.network.sensor.HTMSensor" ]
import org.numenta.nupic.Connections; import org.numenta.nupic.network.sensor.HTMSensor;
import org.numenta.nupic.*; import org.numenta.nupic.network.sensor.*;
[ "org.numenta.nupic" ]
org.numenta.nupic;
2,132,066
protected void listen() throws Exception { if (doListen()) { log.warn(sm.getString("nioReceiver.alreadyStarted")); return; } setListen(true); // Avoid NPEs if selector is set to null on stop. Selector selector = this.selector.get(); if (sele...
void function() throws Exception { if (doListen()) { log.warn(sm.getString(STR)); return; } setListen(true); Selector selector = this.selector.get(); if (selector!=null && datagramChannel!=null) { ObjectReader oreader = new ObjectReader(MAX_UDP_SIZE); registerChannel(selector,datagramChannel,SelectionKey.OP_READ,oreade...
/** * Get data from channel and store in byte array * send it to cluster * @throws IOException IO error */
Get data from channel and store in byte array send it to cluster
listen
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/catalina/tribes/transport/nio/NioReceiver.java", "license": "apache-2.0", "size": 18152 }
[ "java.nio.channels.CancelledKeyException", "java.nio.channels.ClosedSelectorException", "java.nio.channels.SelectionKey", "java.nio.channels.Selector", "java.nio.channels.ServerSocketChannel", "java.nio.channels.SocketChannel", "java.util.Iterator", "org.apache.catalina.tribes.io.ObjectReader", "org...
import java.nio.channels.CancelledKeyException; import java.nio.channels.ClosedSelectorException; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import java.util.Iterator; import org.apache.catalina.tribes.i...
import java.nio.channels.*; import java.util.*; import org.apache.catalina.tribes.io.*; import org.apache.catalina.tribes.util.*;
[ "java.nio", "java.util", "org.apache.catalina" ]
java.nio; java.util; org.apache.catalina;
1,488,512
public static ResourceBundle push(final String name, final ResourceBundle rb) { instance.pushInternal(instance.resourceName, instance.resourceBundle); instance.resourceBundle = rb; instance.resourceName = name; return rb; }
static ResourceBundle function(final String name, final ResourceBundle rb) { instance.pushInternal(instance.resourceName, instance.resourceBundle); instance.resourceBundle = rb; instance.resourceName = name; return rb; }
/** * Pushes the Resource Info onto the stack. * @param name the name of the resource * @param rb the resource bundle * @return the same res bundle */
Pushes the Resource Info onto the stack
push
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/ui/UIRegistry.java", "license": "gpl-2.0", "size": 98859 }
[ "java.util.ResourceBundle" ]
import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
1,424,933
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ProfileInner>> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this....
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ProfileInner>> function(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( STR)); } context ...
/** * Lists all of the CDN profiles within an Azure subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @thro...
Lists all of the CDN profiles within an Azure subscription
listSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java", "license": "mit", "size": 111257 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.cdn.fluent.models.ProfileInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.cdn.fluent.models.ProfileInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
809,339
public void endResponse(final OChannelBinaryClient iNetwork) { iNetwork.endResponse(); if (debug) System.out.println("<- res: " + getSessionId()); }
void function(final OChannelBinaryClient iNetwork) { iNetwork.endResponse(); if (debug) System.out.println(STR + getSessionId()); }
/** * End response reached: release the channel in the pool to being reused */
End response reached: release the channel in the pool to being reused
endResponse
{ "repo_name": "wuman/orientdb-android", "path": "client/src/main/java/com/orientechnologies/orient/client/remote/OStorageRemote.java", "license": "apache-2.0", "size": 56795 }
[ "com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryClient" ]
import com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryClient;
import com.orientechnologies.orient.enterprise.channel.binary.*;
[ "com.orientechnologies.orient" ]
com.orientechnologies.orient;
463,949
public static int decode(String data, OutputStream out) throws IOException { return encoder.decode(data, out); }
static int function(String data, OutputStream out) throws IOException { return encoder.decode(data, out); }
/** * decode the base 64 encoded String data writing it to the given output * stream, whitespace characters will be ignored. * * @return the number of bytes produced. */
decode the base 64 encoded String data writing it to the given output stream, whitespace characters will be ignored
decode
{ "repo_name": "tjulk/gaeproxy", "path": "src/org/emergent/android/weave/client/Base64.java", "license": "gpl-3.0", "size": 2518 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,592,108
public final void writeEnum(final int fieldNumber, final int value) throws IOException { writeInt32(fieldNumber, value); }
final void function(final int fieldNumber, final int value) throws IOException { writeInt32(fieldNumber, value); }
/** * Write an enum field, including tag, to the stream. The provided value is the numeric * value used to represent the enum value on the wire (not the enum ordinal value). */
Write an enum field, including tag, to the stream. The provided value is the numeric value used to represent the enum value on the wire (not the enum ordinal value)
writeEnum
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/CodedOutputStream.java", "license": "apache-2.0", "size": 105107 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,567,159
@Adjacency(label = TECH_TAG_TO_FILE_MODEL, direction = Direction.OUT) Iterable<FileModel> getFileModels();
@Adjacency(label = TECH_TAG_TO_FILE_MODEL, direction = Direction.OUT) Iterable<FileModel> getFileModels();
/** * References the {@link FileModel}s that use this technology. */
References the <code>FileModel</code>s that use this technology
getFileModels
{ "repo_name": "mareknovotny/windup", "path": "reporting/api/src/main/java/org/jboss/windup/reporting/model/TechnologyTagModel.java", "license": "epl-1.0", "size": 2416 }
[ "com.tinkerpop.blueprints.Direction", "com.tinkerpop.frames.Adjacency", "org.jboss.windup.graph.model.resource.FileModel" ]
import com.tinkerpop.blueprints.Direction; import com.tinkerpop.frames.Adjacency; import org.jboss.windup.graph.model.resource.FileModel;
import com.tinkerpop.blueprints.*; import com.tinkerpop.frames.*; import org.jboss.windup.graph.model.resource.*;
[ "com.tinkerpop.blueprints", "com.tinkerpop.frames", "org.jboss.windup" ]
com.tinkerpop.blueprints; com.tinkerpop.frames; org.jboss.windup;
2,438,127
GradoopIdSet readGraphIds(final Result res);
GradoopIdSet readGraphIds(final Result res);
/** * Reads the graph identifiers from the given {@link Result}. * * @param res HBase row * @return graphs identifiers */
Reads the graph identifiers from the given <code>Result</code>
readGraphIds
{ "repo_name": "galpha/gradoop", "path": "gradoop-store/gradoop-hbase/src/main/java/org/gradoop/storage/hbase/impl/api/GraphElementHandler.java", "license": "apache-2.0", "size": 1685 }
[ "org.apache.hadoop.hbase.client.Result", "org.gradoop.common.model.impl.id.GradoopIdSet" ]
import org.apache.hadoop.hbase.client.Result; import org.gradoop.common.model.impl.id.GradoopIdSet;
import org.apache.hadoop.hbase.client.*; import org.gradoop.common.model.impl.id.*;
[ "org.apache.hadoop", "org.gradoop.common" ]
org.apache.hadoop; org.gradoop.common;
931,310
protected KeyStore getKeyStore(InputStream storeStream, String storePath, String storeType, String storeProvider, String storePassword) throws Exception { return CertificateUtils.getKeyStore(storeStream, storePath, storeType, storeProvider, storePassword); }
KeyStore function(InputStream storeStream, String storePath, String storeType, String storeProvider, String storePassword) throws Exception { return CertificateUtils.getKeyStore(storeStream, storePath, storeType, storeProvider, storePassword); }
/** * Loads keystore using an input stream or a file path in the same * order of precedence. * * Required for integrations to be able to override the mechanism * used to load a keystore in order to provide their own implementation. * * @param storeStream keystore input stream * @...
Loads keystore using an input stream or a file path in the same order of precedence. Required for integrations to be able to override the mechanism used to load a keystore in order to provide their own implementation
getKeyStore
{ "repo_name": "leoleegit/jetty-8.0.4.v20111024", "path": "jetty-security/src/main/java/org/eclipse/jetty/security/authentication/ClientCertAuthenticator.java", "license": "apache-2.0", "size": 12221 }
[ "java.io.InputStream", "java.security.KeyStore", "org.eclipse.jetty.util.security.CertificateUtils" ]
import java.io.InputStream; import java.security.KeyStore; import org.eclipse.jetty.util.security.CertificateUtils;
import java.io.*; import java.security.*; import org.eclipse.jetty.util.security.*;
[ "java.io", "java.security", "org.eclipse.jetty" ]
java.io; java.security; org.eclipse.jetty;
940,552
CompletableFuture<Void> unremoveProject(String projectName);
CompletableFuture<Void> unremoveProject(String projectName);
/** * Unremoves a project. */
Unremoves a project
unremoveProject
{ "repo_name": "line/centraldogma", "path": "client/java/src/main/java/com/linecorp/centraldogma/client/CentralDogma.java", "license": "apache-2.0", "size": 40089 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
771,837
@Test public void testOwnerAddExistingExperimenterToGroup() throws Exception { // First create a new user. String uuid = UUID.randomUUID().toString(); Experimenter e = createExperimenterI(uuid, "user", "user"); IAdminPrx svc = root.getSession().getAdminService(); // alre...
void function() throws Exception { String uuid = UUID.randomUUID().toString(); Experimenter e = createExperimenterI(uuid, "user", "user"); IAdminPrx svc = root.getSession().getAdminService(); ExperimenterGroup g = new ExperimenterGroupI(); g.setName(omero.rtypes.rstring(uuid)); g.getDetails().setPermissions(new Permiss...
/** * Tests the addition of existing user by the owner of the group. The owner * is NOT an administrator. * * @throws Exception * Thrown if an error occurred. */
Tests the addition of existing user by the owner of the group. The owner is NOT an administrator
testOwnerAddExistingExperimenterToGroup
{ "repo_name": "jballanc/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/AdminServiceTest.java", "license": "gpl-2.0", "size": 70144 }
[ "java.util.ArrayList", "java.util.List", "java.util.UUID" ]
import java.util.ArrayList; import java.util.List; import java.util.UUID;
import java.util.*;
[ "java.util" ]
java.util;
579,952
@Test public void matchMetadataTest() { Criterion criterion = Criteria.matchMetadata(0xabcdL); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
void function() { Criterion criterion = Criteria.matchMetadata(0xabcdL); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
/** * Tests metadata criterion. */
Tests metadata criterion
matchMetadataTest
{ "repo_name": "sdnwiselab/onos", "path": "core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java", "license": "apache-2.0", "size": 14744 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "org.hamcrest.MatcherAssert", "org.onosproject.codec.impl.CriterionJsonMatcher", "org.onosproject.net.flow.criteria.Criteria", "org.onosproject.net.flow.criteria.Criterion" ]
import com.fasterxml.jackson.databind.node.ObjectNode; import org.hamcrest.MatcherAssert; import org.onosproject.codec.impl.CriterionJsonMatcher; import org.onosproject.net.flow.criteria.Criteria; import org.onosproject.net.flow.criteria.Criterion;
import com.fasterxml.jackson.databind.node.*; import org.hamcrest.*; import org.onosproject.codec.impl.*; import org.onosproject.net.flow.criteria.*;
[ "com.fasterxml.jackson", "org.hamcrest", "org.onosproject.codec", "org.onosproject.net" ]
com.fasterxml.jackson; org.hamcrest; org.onosproject.codec; org.onosproject.net;
2,576,387
public String getPercentage(Assignment<V, T> assignment) { double val = getValue(assignment); double[] bounds = getBounds(assignment); if (bounds[0] <= val && val <= bounds[1] && bounds[0] < bounds[1]) return getPerc(val, bounds[0], bounds[1]) + "%"; else if (bounds[1] <=...
String function(Assignment<V, T> assignment) { double val = getValue(assignment); double[] bounds = getBounds(assignment); if (bounds[0] <= val && val <= bounds[1] && bounds[0] < bounds[1]) return getPerc(val, bounds[0], bounds[1]) + "%"; else if (bounds[1] <= val && val <= bounds[0] && bounds[1] < bounds[0]) return ge...
/** * Return formatted value of this criterion, as percentage when possible * @param assignment current assignment * @return formatted value */
Return formatted value of this criterion, as percentage when possible
getPercentage
{ "repo_name": "UniTime/cpsolver", "path": "src/org/cpsolver/ifs/criteria/AbstractCriterion.java", "license": "lgpl-3.0", "size": 20667 }
[ "org.cpsolver.ifs.assignment.Assignment" ]
import org.cpsolver.ifs.assignment.Assignment;
import org.cpsolver.ifs.assignment.*;
[ "org.cpsolver.ifs" ]
org.cpsolver.ifs;
2,366,869
void productSelected(Product product, int clickCount);
void productSelected(Product product, int clickCount);
/** * Called when a product has been selected in the tree. * * @param product The selected product. * @param clickCount The number of mouse clicks. */
Called when a product has been selected in the tree
productSelected
{ "repo_name": "lveci/nest", "path": "beam/beam-ui/src/main/java/org/esa/beam/framework/ui/product/ProductTreeListener.java", "license": "gpl-3.0", "size": 2792 }
[ "org.esa.beam.framework.datamodel.Product" ]
import org.esa.beam.framework.datamodel.Product;
import org.esa.beam.framework.datamodel.*;
[ "org.esa.beam" ]
org.esa.beam;
2,100,205