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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public String[] getOptions() {
ArrayList<String> result;
result = new ArrayList<String>(Arrays.asList(super.getOptions()));
result.add("-C");
result.add(getAttributeIndex());
return result.toArray(new String[result.size()]);
} | String[] function() { ArrayList<String> result; result = new ArrayList<String>(Arrays.asList(super.getOptions())); result.add("-C"); result.add(getAttributeIndex()); return result.toArray(new String[result.size()]); } | /**
* Gets the current settings of the filter.
*
* @return an array of strings suitable for passing to setOptions.
*/ | Gets the current settings of the filter | getOptions | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-weka/src/main/java/weka/filters/unsupervised/instance/SortOnAttribute.java",
"license": "gpl-3.0",
"size": 6355
} | [
"java.util.ArrayList",
"java.util.Arrays"
] | import java.util.ArrayList; import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,891,353 |
public Map<String, Object> removeSecrets(Map<String, Object> unsafeArgs) {
return makeSafe(unsafeArgs, false);
} | Map<String, Object> function(Map<String, Object> unsafeArgs) { return makeSafe(unsafeArgs, false); } | /**
* Returns a copy of the given arguments but with all secret arguments recursively removed.
* <p>
* This method does not validate the arguments, however it will throw random exceptions if the input does not match
* the expected structure. It is therefore best to validate the arguments before pass... | Returns a copy of the given arguments but with all secret arguments recursively removed. This method does not validate the arguments, however it will throw random exceptions if the input does not match the expected structure. It is therefore best to validate the arguments before passing them | removeSecrets | {
"repo_name": "m-sc/yamcs",
"path": "yamcs-core/src/main/java/org/yamcs/Spec.java",
"license": "agpl-3.0",
"size": 26341
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 917,301 |
public void put(InputStream is,
long accessedExpireTimeout,
long modifiedExpireTimeout,
long lastAccessTime,
long lastModifiedTime)
throws IOException
{
putStream(is,
accessedExpireTimeout,
modifiedExpireTime... | void function(InputStream is, long accessedExpireTimeout, long modifiedExpireTimeout, long lastAccessTime, long lastModifiedTime) throws IOException { putStream(is, accessedExpireTimeout, modifiedExpireTimeout, 0, lastAccessTime, lastModifiedTime, 0, false); } | /**
* Sets the value by an input stream
*/ | Sets the value by an input stream | put | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/server/distcache/DistCacheEntry.java",
"license": "gpl-2.0",
"size": 44515
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 325,442 |
public int getMaxSpeed(Profile profile) {
int profileSpeed = (type == HighwayType.Motorway || type == HighwayType.Trunk) ? profile
.getSpeedHighway() : profile.getSpeedRoad();
if (maxSpeed == 0 || profileSpeed < maxSpeed) {
return profileSpeed;
}
return maxSpeed;
} | int function(Profile profile) { int profileSpeed = (type == HighwayType.Motorway type == HighwayType.Trunk) ? profile .getSpeedHighway() : profile.getSpeedRoad(); if (maxSpeed == 0 profileSpeed < maxSpeed) { return profileSpeed; } return maxSpeed; } | /**
* Calculates the allowed maximum speed of the edge for the specified
* profile.
*
* @param profile
* the profile in use
* @return the allowed maximum speed (in kilometers per hour)
*/ | Calculates the allowed maximum speed of the edge for the specified profile | getMaxSpeed | {
"repo_name": "routeKIT/routeKIT",
"path": "src/edu/kit/pse/ws2013/routekit/map/EdgeProperties.java",
"license": "gpl-3.0",
"size": 4651
} | [
"edu.kit.pse.ws2013.routekit.profiles.Profile"
] | import edu.kit.pse.ws2013.routekit.profiles.Profile; | import edu.kit.pse.ws2013.routekit.profiles.*; | [
"edu.kit.pse"
] | edu.kit.pse; | 843,140 |
public static FilterValueSetParam findParameter(ArrayDeque<FilterValueSetParam> parameters,
FilterParamIndexBase index)
{
if (index instanceof FilterParamIndexLookupableBase)
{
FilterParamIndexLookupableBase propBasedIndex = (FilterPara... | static FilterValueSetParam function(ArrayDeque<FilterValueSetParam> parameters, FilterParamIndexBase index) { if (index instanceof FilterParamIndexLookupableBase) { FilterParamIndexLookupableBase propBasedIndex = (FilterParamIndexLookupableBase) index; FilterSpecLookupable indexLookupable = propBasedIndex.getLookupable... | /**
* Determine among the passed in filter parameters any parameter that matches the given index on property name and
* filter operator type. Returns null if none of the parameters matches the index.
* @param parameters is the filter parameter list
* @param index is a filter parameter constant value... | Determine among the passed in filter parameters any parameter that matches the given index on property name and filter operator type. Returns null if none of the parameters matches the index | findParameter | {
"repo_name": "b-cuts/esper",
"path": "esper/src/main/java/com/espertech/esper/filter/IndexHelper.java",
"license": "gpl-2.0",
"size": 5305
} | [
"java.util.ArrayDeque"
] | import java.util.ArrayDeque; | import java.util.*; | [
"java.util"
] | java.util; | 1,319,239 |
public void load(RulesDefinition.NewRepository repo, Reader reader) {
XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
xmlFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE);
xmlFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.FALSE);
// just so it won't try to l... | void function(RulesDefinition.NewRepository repo, Reader reader) { XMLInputFactory xmlFactory = XMLInputFactory.newInstance(); xmlFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE); xmlFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.FALSE); xmlFactory.setProperty(XMLInputFactory.SUPPORT_DT... | /**
* Loads rules by reading the XML input stream. The reader is not closed by the method, so it
* should be handled by the caller.
* @since 4.3
*/ | Loads rules by reading the XML input stream. The reader is not closed by the method, so it should be handled by the caller | load | {
"repo_name": "lbndev/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RulesDefinitionXmlLoader.java",
"license": "lgpl-3.0",
"size": 17172
} | [
"java.io.Reader",
"javax.xml.stream.XMLInputFactory",
"javax.xml.stream.XMLStreamException",
"org.codehaus.staxmate.SMInputFactory",
"org.codehaus.staxmate.in.SMHierarchicCursor",
"org.codehaus.staxmate.in.SMInputCursor"
] | import java.io.Reader; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import org.codehaus.staxmate.SMInputFactory; import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; | import java.io.*; import javax.xml.stream.*; import org.codehaus.staxmate.*; import org.codehaus.staxmate.in.*; | [
"java.io",
"javax.xml",
"org.codehaus.staxmate"
] | java.io; javax.xml; org.codehaus.staxmate; | 2,145,558 |
public void deleteWorkflowHistory(WorkflowHistory history) throws DotDataException; | void function(WorkflowHistory history) throws DotDataException; | /**
* deletes a history item from a workflow
*
* @param history
* @throws DotDataException
*/ | deletes a history item from a workflow | deleteWorkflowHistory | {
"repo_name": "zhiqinghuang/core",
"path": "src/com/dotmarketing/portlets/workflows/business/WorkflowAPI.java",
"license": "gpl-3.0",
"size": 9608
} | [
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.portlets.workflows.model.WorkflowHistory"
] | import com.dotmarketing.exception.DotDataException; import com.dotmarketing.portlets.workflows.model.WorkflowHistory; | import com.dotmarketing.exception.*; import com.dotmarketing.portlets.workflows.model.*; | [
"com.dotmarketing.exception",
"com.dotmarketing.portlets"
] | com.dotmarketing.exception; com.dotmarketing.portlets; | 1,164,241 |
public final ArrayList<Attribute> getMemberAttributes() {
return JsUtils.jsoAsList(JsUtils.getNativePropertyArray(this, "memberAttributes"));
} | final ArrayList<Attribute> function() { return JsUtils.jsoAsList(JsUtils.getNativePropertyArray(this, STR)); } | /**
* Get Member attributes stored in RichMember. If none present, return empty list.
* <p/>
* Included attributes can be specified on RichMember retrieval (see RPC API).
* Attributes are also filtered based on callers READ right.
*
* @return Member attributes of RichMember
*/ | Get Member attributes stored in RichMember. If none present, return empty list. Included attributes can be specified on RichMember retrieval (see RPC API). Attributes are also filtered based on callers READ right | getMemberAttributes | {
"repo_name": "zlamalp/perun-wui",
"path": "perun-wui-core/src/main/java/cz/metacentrum/perun/wui/model/beans/RichMember.java",
"license": "bsd-2-clause",
"size": 7747
} | [
"cz.metacentrum.perun.wui.client.utils.JsUtils",
"java.util.ArrayList"
] | import cz.metacentrum.perun.wui.client.utils.JsUtils; import java.util.ArrayList; | import cz.metacentrum.perun.wui.client.utils.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 127,200 |
@Test
public void whenTheSecondPropertyIsDisposedTheBindingWillNoLongerWork() {
cut = Bindings.bindBidirectional(x, y, converter);
y = new SimpleObjectProperty<>();
System.gc();
x.setValue(3L);
assertNull(y.getValue());
assertTrue(cut.wasGarbageCollected());
... | void function() { cut = Bindings.bindBidirectional(x, y, converter); y = new SimpleObjectProperty<>(); System.gc(); x.setValue(3L); assertNull(y.getValue()); assertTrue(cut.wasGarbageCollected()); } | /**
* When the first property is garbage collected, the binding will not work and a change of the second property will not effect the first property.
*/ | When the first property is garbage collected, the binding will not work and a change of the second property will not effect the first property | whenTheSecondPropertyIsDisposedTheBindingWillNoLongerWork | {
"repo_name": "Xyanid/bindableFX",
"path": "src/test/java/de/saxsys/bindablefx/BidirectionalBindingTest.java",
"license": "apache-2.0",
"size": 4802
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,816,358 |
public static FontImage createMaterial(char icon, Style s) {
Font f = getMaterialDesignFont().derive(s.getFont().getHeight(), Font.STYLE_PLAIN);
return create("" + icon, s, f);
} | static FontImage function(char icon, Style s) { Font f = getMaterialDesignFont().derive(s.getFont().getHeight(), Font.STYLE_PLAIN); return create("" + icon, s, f); } | /**
* <p>Creates a material design icon font for the given style</p>
* <script src="https://gist.github.com/codenameone/34fd9e519ec3d305a015.js"></script>
*
* @param icon the icon, one of the MATERIAL_* constants
* @param s the style to use, notice the font in the style only matters in terms o... | Creates a material design icon font for the given style | createMaterial | {
"repo_name": "Firethunder/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/FontImage.java",
"license": "gpl-2.0",
"size": 206874
} | [
"com.codename1.ui.plaf.Style"
] | import com.codename1.ui.plaf.Style; | import com.codename1.ui.plaf.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 726,627 |
Function<String,String> mapBasedFunction(final Map<String,String> m){
return new Function<String,String>(){ | Function<String,String> mapBasedFunction(final Map<String,String> m){ return new Function<String,String>(){ | /**
* Utility function to use in conjunction with .withDbNameMapping / .withTableNameMapping,
* if we desire usage of a Map<String,String> instead of implementing a Function<String,String>
*/ | Utility function to use in conjunction with .withDbNameMapping / .withTableNameMapping, if we desire usage of a Map instead of implementing a Function | mapBasedFunction | {
"repo_name": "sankarh/hive",
"path": "hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationUtils.java",
"license": "apache-2.0",
"size": 8869
} | [
"com.google.common.base.Function",
"java.util.Map"
] | import com.google.common.base.Function; import java.util.Map; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,536,899 |
if (cursor != null) {
try {
cursor.close();
} catch (Throwable th) { // NOSONAR Will be suppressed
try {
LOGGER.log(Level.WARN, "Failure closing a cursor", th);
} catch (Throwable loggingFailure) { // NOSONAR: Ignore catching Th... | if (cursor != null) { try { cursor.close(); } catch (Throwable th) { try { LOGGER.log(Level.WARN, STR, th); } catch (Throwable loggingFailure) { } root = ExceptionUtils.suppress(root, th); } } return root; } | /**
* Close the IIndexCursor and suppress any Throwable thrown by the close call.
* This method must NEVER throw any Throwable
*
* @param cursor
* the cursor to close
* @param root
* the first exception encountered during release of resources
* @return the r... | Close the IIndexCursor and suppress any Throwable thrown by the close call. This method must NEVER throw any Throwable | close | {
"repo_name": "ecarm002/incubator-asterixdb",
"path": "hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/util/IndexCursorUtils.java",
"license": "apache-2.0",
"size": 4110
} | [
"org.apache.hyracks.api.util.ExceptionUtils",
"org.apache.logging.log4j.Level"
] | import org.apache.hyracks.api.util.ExceptionUtils; import org.apache.logging.log4j.Level; | import org.apache.hyracks.api.util.*; import org.apache.logging.log4j.*; | [
"org.apache.hyracks",
"org.apache.logging"
] | org.apache.hyracks; org.apache.logging; | 1,877,348 |
public static NamedList<Object> sendRequest(HttpClient httpClient, String getUrl) throws Exception {
NamedList<Object> solrResp = null;
// Prepare a request object
HttpGet httpget = new HttpGet(getUrl);
// Execute the request
// System.out.print("\nSending GET request to: " + getUrl + " ");
... | static NamedList<Object> function(HttpClient httpClient, String getUrl) throws Exception { NamedList<Object> solrResp = null; HttpGet httpget = new HttpGet(getUrl); HttpResponse response = httpClient.execute(httpget); HttpEntity entity = response.getEntity(); if (response.getStatusLine().getStatusCode() != 200) { Strin... | /**
* Send HTTP GET request to Solr.
*/ | Send HTTP GET request to Solr | sendRequest | {
"repo_name": "jollysean/solr-scale-tk",
"path": "src/main/java/com/lucidworks/SolrCloudTools.java",
"license": "apache-2.0",
"size": 34677
} | [
"java.io.BufferedReader",
"java.io.InputStream",
"java.io.InputStreamReader",
"org.apache.http.HttpEntity",
"org.apache.http.HttpResponse",
"org.apache.http.client.HttpClient",
"org.apache.http.client.methods.HttpGet",
"org.apache.solr.client.solrj.impl.XMLResponseParser",
"org.apache.solr.common.ut... | import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.solr.client.solrj.impl.XMLResponseParser; import... | import java.io.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.solr.client.solrj.impl.*; import org.apache.solr.common.util.*; | [
"java.io",
"org.apache.http",
"org.apache.solr"
] | java.io; org.apache.http; org.apache.solr; | 126,794 |
public SocioDemographicData check(SocioDemographicData v,
Class<SocioDemographicData> t)
{
if (v == null)
v = new SocioDemographicData();
v.setGender(this.check(v.getGender(), SystemParameter.class));
v.setLivingWith(this.check(v.getLivingWith(), SystemParameter.class));
v.setMaritalStatus(this.check... | SocioDemographicData function(SocioDemographicData v, Class<SocioDemographicData> t) { if (v == null) v = new SocioDemographicData(); v.setGender(this.check(v.getGender(), SystemParameter.class)); v.setLivingWith(this.check(v.getLivingWith(), SystemParameter.class)); v.setMaritalStatus(this.check(v.getMaritalStatus(), ... | /**
* Check object for null values
*
* @param v object to be checked
* @param t class
* @return checked object
*/ | Check object for null values | check | {
"repo_name": "seaclouds-atos/softcare-final-implementation",
"path": "storage-component/src/main/java/eu/ehealth/util/NullChecker.java",
"license": "apache-2.0",
"size": 17990
} | [
"eu.ehealth.db.xsd.SocioDemographicData",
"eu.ehealth.db.xsd.SystemParameter"
] | import eu.ehealth.db.xsd.SocioDemographicData; import eu.ehealth.db.xsd.SystemParameter; | import eu.ehealth.db.xsd.*; | [
"eu.ehealth.db"
] | eu.ehealth.db; | 422,635 |
@Override
public URI execute(FileSystem fs) throws IOException {
if (replication == -1) {
replication = (short) fs.getConf().getInt("dfs.replication", 3);
}
if (blockSize == -1) {
blockSize = fs.getConf().getInt("dfs.block.size", 67108864);
}
FsPermission fsPermission = FSUtils.getPe... | URI function(FileSystem fs) throws IOException { if (replication == -1) { replication = (short) fs.getConf().getInt(STR, 3); } if (blockSize == -1) { blockSize = fs.getConf().getInt(STR, 67108864); } FsPermission fsPermission = FSUtils.getPermission(permission); int bufferSize = fs.getConf().getInt(STR, 4096); OutputSt... | /**
* Executes the filesystem operation.
*
* @param fs filesystem instance to use.
* @return The URI of the created file.
* @throws IOException thrown if an IO error occured.
*/ | Executes the filesystem operation | execute | {
"repo_name": "showyou/hoop-webhdfs-hue",
"path": "hoop-server/src/main/java/com/cloudera/hoop/fs/FSCreate.java",
"license": "apache-2.0",
"size": 2745
} | [
"com.cloudera.hoop.HoopServer",
"com.cloudera.lib.io.IOUtils",
"java.io.IOException",
"java.io.OutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.permission.FsPermission"
] | import com.cloudera.hoop.HoopServer; import com.cloudera.lib.io.IOUtils; import java.io.IOException; import java.io.OutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.permission.FsPermission; | import com.cloudera.hoop.*; import com.cloudera.lib.io.*; import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; | [
"com.cloudera.hoop",
"com.cloudera.lib",
"java.io",
"org.apache.hadoop"
] | com.cloudera.hoop; com.cloudera.lib; java.io; org.apache.hadoop; | 731,573 |
@Override
public Collection<String> getClasspath() {
return launcherpath;
} | Collection<String> function() { return launcherpath; } | /**
* We override getClasspath to use it just for the embedded launcher.
*/ | We override getClasspath to use it just for the embedded launcher | getClasspath | {
"repo_name": "psoreide/bnd",
"path": "biz.aQute.launcher/src/aQute/launcher/plugin/ProjectLauncherImpl.java",
"license": "apache-2.0",
"size": 17771
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,728,305 |
protected final <R extends RaftRequest> R logRequest(R request) {
log.trace("Received {}", request);
return request;
} | final <R extends RaftRequest> R function(R request) { log.trace(STR, request); return request; } | /**
* Logs a request.
*/ | Logs a request | logRequest | {
"repo_name": "kuujo/copycat",
"path": "protocols/raft/src/main/java/io/atomix/protocols/raft/roles/AbstractRole.java",
"license": "apache-2.0",
"size": 4139
} | [
"io.atomix.protocols.raft.protocol.RaftRequest"
] | import io.atomix.protocols.raft.protocol.RaftRequest; | import io.atomix.protocols.raft.protocol.*; | [
"io.atomix.protocols"
] | io.atomix.protocols; | 609,787 |
@Test
public void checkDataConstraintsInvalidObject() {
final String contextId = "test#context#Id";
final String uriName = "/context/index.html";
final String methodName = "POST";
final String[] mna = new String[] { methodName };
final WebUserDataPermission wudPerm = new ... | void function() { final String contextId = STR; final String uriName = STR; final String methodName = "POST"; final String[] mna = new String[] { methodName }; final WebUserDataPermission wudPerm = new WebUserDataPermission(uriName, mna, null); WebSecurityValidatorImpl wsv = new WebSecurityValidatorImpl(); assertFalse(... | /**
* Tests checkDataConstraints method
* with invalid httpservletrequest object.
* Expected result: false
*/ | Tests checkDataConstraints method with invalid httpservletrequest object. Expected result: false | checkDataConstraintsInvalidObject | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.authorization.jacc.web/test/com/ibm/ws/security/authorization/jacc/web/impl/WebSecurityValidatorImplTest.java",
"license": "epl-1.0",
"size": 5531
} | [
"javax.security.jacc.WebUserDataPermission",
"org.junit.Assert"
] | import javax.security.jacc.WebUserDataPermission; import org.junit.Assert; | import javax.security.jacc.*; import org.junit.*; | [
"javax.security",
"org.junit"
] | javax.security; org.junit; | 452,887 |
public Observable<ServiceResponse<KeyOperationResult>> signWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value) {
if (vaultBaseUrl == null) {
throw new IllegalArgumentException("Parameter vaultBaseUrl is required a... | Observable<ServiceResponse<KeyOperationResult>> function(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value) { if (vaultBaseUrl == null) { throw new IllegalArgumentException(STR); } if (keyName == null) { throw new IllegalArgumentException(STR); } if (keyVersion... | /**
* Creates a signature from a digest using the specified key.
*
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
* @param keyName The name of the key.
* @param keyVersion The version of the key.
* @param algorithm The signing/verification algorithm iden... | Creates a signature from a digest using the specified key | signWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java",
"license": "mit",
"size": 398315
} | [
"com.microsoft.azure.keyvault.models.KeyOperationResult",
"com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.keyvault.models.KeyOperationResult; import com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.keyvault.models.*; import com.microsoft.azure.keyvault.webkey.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,375,004 |
public Writer write(Writer writer) throws JSONException {
return this.write(writer, 0, 0);
} | Writer function(Writer writer) throws JSONException { return this.write(writer, 0, 0); } | /**
* Write the contents of the JSONObject as JSON text to a writer. For
* compactness, no whitespace is added.
* <p><b>
* Warning: This method assumes that the data structure is acyclical.
* </b>
*
* @return The writer.
* @throws JSONException
*/ | Write the contents of the JSONObject as JSON text to a writer. For compactness, no whitespace is added. Warning: This method assumes that the data structure is acyclical. | write | {
"repo_name": "singhpratyush/loklak_server",
"path": "src/org/json/JSONObject.java",
"license": "lgpl-2.1",
"size": 85081
} | [
"java.io.Writer"
] | import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,156,888 |
public static Properties getConfigProperties() {
Properties props = new Properties();
props.putAll(configProperties);
return props;
} | static Properties function() { Properties props = new Properties(); props.putAll(configProperties); return props; } | /**
* Get the config properties that have been added to this OpenMRS instance
*
* @return copy of the module properties
* @since 1.9
*/ | Get the config properties that have been added to this OpenMRS instance | getConfigProperties | {
"repo_name": "maany/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/context/Context.java",
"license": "mpl-2.0",
"size": 41351
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,300,761 |
public static int readLastUsedDaemonOrderNumber(SharedPreferences prefs, List<DaemonSettings> allDaemons) {
// Get last used number
String prefLast = prefs.getString(KEY_PREF_LASTUSED, "");
int last = (prefLast == ""? 0: Integer.parseInt(prefLast));
if (last > allDaemons.size()) {
// The us... | static int function(SharedPreferences prefs, List<DaemonSettings> allDaemons) { String prefLast = prefs.getString(KEY_PREF_LASTUSED, STR"? 0: Integer.parseInt(prefLast)); if (last > allDaemons.size()) { return 0; } return last; } | /**
* Determines the order number of the last used daemon settings object
* @param prefs The application's shared preferences
* @param allDaemons All available daemons settings
* @return The order number (0-based) of the server that was last used (or 0 if it doesn't exist any more)
*/ | Determines the order number of the last used daemon settings object | readLastUsedDaemonOrderNumber | {
"repo_name": "austgl/transdroid",
"path": "android/src/org/transdroid/preferences/Preferences.java",
"license": "gpl-3.0",
"size": 55006
} | [
"android.content.SharedPreferences",
"java.util.List",
"org.transdroid.daemon.DaemonSettings"
] | import android.content.SharedPreferences; import java.util.List; import org.transdroid.daemon.DaemonSettings; | import android.content.*; import java.util.*; import org.transdroid.daemon.*; | [
"android.content",
"java.util",
"org.transdroid.daemon"
] | android.content; java.util; org.transdroid.daemon; | 493,298 |
private void checkPendingCustomMessages() {
boolean joiningEmpty;
synchronized (mux) {
joiningEmpty = joiningNodes.isEmpty();
}
if (joiningEmpty && isLocalNodeCoordinator()) {
TcpDiscoveryCustomEventMessage msg;
w... | void function() { boolean joiningEmpty; synchronized (mux) { joiningEmpty = joiningNodes.isEmpty(); } if (joiningEmpty && isLocalNodeCoordinator()) { TcpDiscoveryCustomEventMessage msg; while ((msg = pollPendingCustomMessage()) != null) processCustomMessage(msg, true); } } | /**
* Checks and flushes custom event messages if no nodes are attempting to join the grid.
*/ | Checks and flushes custom event messages if no nodes are attempting to join the grid | checkPendingCustomMessages | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java",
"license": "apache-2.0",
"size": 332855
} | [
"org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryCustomEventMessage"
] | import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryCustomEventMessage; | import org.apache.ignite.spi.discovery.tcp.messages.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,330,978 |
public ArgumentListBuilder addKeyValuePairs(String prefix, Map<String,String> props, Set<String> propsToMask) {
for (Entry<String,String> e : props.entrySet()) {
addKeyValuePair(prefix, e.getKey(), e.getValue(), (propsToMask != null) && propsToMask.contains(e.getKey()));
}
return... | ArgumentListBuilder function(String prefix, Map<String,String> props, Set<String> propsToMask) { for (Entry<String,String> e : props.entrySet()) { addKeyValuePair(prefix, e.getKey(), e.getValue(), (propsToMask != null) && propsToMask.contains(e.getKey())); } return this; } | /**
* Adds key value pairs as "-Dkey=value -Dkey=value ..." with masking.
*
* @param prefix
* Configures the -D portion of the example. Defaults to -D if null.
* @param props
* The map of key/value pairs to add
* @param propsToMask
* Set containing key names to mar... | Adds key value pairs as "-Dkey=value -Dkey=value ..." with masking | addKeyValuePairs | {
"repo_name": "Jochen-A-Fuerbacher/jenkins",
"path": "core/src/main/java/hudson/util/ArgumentListBuilder.java",
"license": "mit",
"size": 15831
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,307,169 |
public void addFileset(FileSet set) {
add(set);
} | void function(FileSet set) { add(set); } | /**
* Add a fileset
* @param set a file set
*/ | Add a fileset | addFileset | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/taskdefs/Expand.java",
"license": "mit",
"size": 16932
} | [
"org.apache.tools.ant.types.FileSet"
] | import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.*; | [
"org.apache.tools"
] | org.apache.tools; | 813,852 |
String databaseSchemaUpgrade(Connection connection, String catalog, String schema); | String databaseSchemaUpgrade(Connection connection, String catalog, String schema); | /**
* programmatic schema update on a given connection returning feedback about what happened
*/ | programmatic schema update on a given connection returning feedback about what happened | databaseSchemaUpgrade | {
"repo_name": "lsmall/flowable-engine",
"path": "modules/flowable-engine/src/main/java/org/flowable/engine/ManagementService.java",
"license": "apache-2.0",
"size": 15046
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,045,767 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
popupMenu = new javax.swing.JPopupMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();
jMenuItem3 = new javax.swing.JMe... | void function() { popupMenu = new javax.swing.JPopupMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem2 = new javax.swing.JMenuItem(); jMenuItem3 = new javax.swing.JMenuItem(); jButton1 = new javax.swing.JButton(); toolBar = new javax.swing.JToolBar(); jLabel1 = new javax.swing.JLabel(); txtUrl = new javax.swi... | /**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
* content of this method is always regenerated by the Form Editor.
*/ | content of this method is always regenerated by the Form Editor | initComponents | {
"repo_name": "cismet/cismet-gui-commons",
"path": "src/main/java/de/cismet/tools/gui/historybutton/TestHistoryButton.java",
"license": "lgpl-3.0",
"size": 11545
} | [
"java.awt.event.ActionListener"
] | import java.awt.event.ActionListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,376,292 |
// TODO: are handles represented as strings?
void readHandle(ILocationSpecifier loc, String handle, String blockId, IRequestSender sender) throws InstanceNotAvailableException;
| void readHandle(ILocationSpecifier loc, String handle, String blockId, IRequestSender sender) throws InstanceNotAvailableException; | /**
* Read a handle
* @param loc the location specifier of the OBI
* @param handle the name of the handle
* @param blockId the block ID
* @param sender the sender interface
* @throws InstanceNotAvailableException
*/ | Read a handle | readHandle | {
"repo_name": "yotamhc/ml-temp",
"path": "src/main/java/org/moonlightcontroller/events/IHandleClient.java",
"license": "apache-2.0",
"size": 1313
} | [
"org.moonlightcontroller.managers.models.IRequestSender",
"org.moonlightcontroller.topology.ILocationSpecifier",
"org.openboxprotocol.exceptions.InstanceNotAvailableException"
] | import org.moonlightcontroller.managers.models.IRequestSender; import org.moonlightcontroller.topology.ILocationSpecifier; import org.openboxprotocol.exceptions.InstanceNotAvailableException; | import org.moonlightcontroller.managers.models.*; import org.moonlightcontroller.topology.*; import org.openboxprotocol.exceptions.*; | [
"org.moonlightcontroller.managers",
"org.moonlightcontroller.topology",
"org.openboxprotocol.exceptions"
] | org.moonlightcontroller.managers; org.moonlightcontroller.topology; org.openboxprotocol.exceptions; | 607,519 |
public CollectionWithPagingInfo<CustomModel> getCustomModels(Parameters parameters);
| CollectionWithPagingInfo<CustomModel> function(Parameters parameters); | /**
* Gets a paged list of all custom models
*
* @param parameters the {@link Parameters} object to get the parameters passed into the request
* @return a paged list of {@code org.alfresco.rest.api.model.CustomModel} objects
*/ | Gets a paged list of all custom models | getCustomModels | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/remote-api/source/java/org/alfresco/rest/api/CustomModels.java",
"license": "lgpl-3.0",
"size": 9139
} | [
"org.alfresco.rest.api.model.CustomModel",
"org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo",
"org.alfresco.rest.framework.resource.parameters.Parameters"
] | import org.alfresco.rest.api.model.CustomModel; import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo; import org.alfresco.rest.framework.resource.parameters.Parameters; | import org.alfresco.rest.api.model.*; import org.alfresco.rest.framework.resource.parameters.*; | [
"org.alfresco.rest"
] | org.alfresco.rest; | 2,445,073 |
public boolean isDirty(final IEditorPart editor) {
return Display.syncExec(new ResultRunnable<Boolean>() { | boolean function(final IEditorPart editor) { return Display.syncExec(new ResultRunnable<Boolean>() { | /**
* Check if editor is dirty.
* @param editor to check
* @return true if editor is dirty, false otherwise
*/ | Check if editor is dirty | isDirty | {
"repo_name": "jboss-reddeer/reddeer",
"path": "plugins/org.eclipse.reddeer.workbench/src/org/eclipse/reddeer/workbench/handler/EditorHandler.java",
"license": "epl-1.0",
"size": 6871
} | [
"org.eclipse.reddeer.common.util.Display",
"org.eclipse.reddeer.common.util.ResultRunnable",
"org.eclipse.ui.IEditorPart"
] | import org.eclipse.reddeer.common.util.Display; import org.eclipse.reddeer.common.util.ResultRunnable; import org.eclipse.ui.IEditorPart; | import org.eclipse.reddeer.common.util.*; import org.eclipse.ui.*; | [
"org.eclipse.reddeer",
"org.eclipse.ui"
] | org.eclipse.reddeer; org.eclipse.ui; | 1,835,804 |
@Test
public void JSF22ClientWindow_TestMultipleBasePages() throws Exception {
try (WebClient webClient = new WebClient()) {
//index.xhtml link
URL url = JSFUtils.createHttpUrl(jsfTestServer2, contextRoot, "index.jsf");
HtmlPage page = (HtmlPage) webClient.getPage(ur... | void function() throws Exception { try (WebClient webClient = new WebClient()) { URL url = JSFUtils.createHttpUrl(jsfTestServer2, contextRoot, STR); HtmlPage page = (HtmlPage) webClient.getPage(url); if (page == null) { Assert.fail(STR); } HtmlElement link = (HtmlElement) page.getElementById(STR); page = link.click(); ... | /**
* Load two base level pages, then click links in each one.
* Ensure that the client window ids do not match.
*
* @throws Exception
*/ | Load two base level pages, then click links in each one. Ensure that the client window ids do not match | JSF22ClientWindow_TestMultipleBasePages | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jsf.2.2_fat/fat/src/com/ibm/ws/jsf22/fat/tests/JSF22ClientWindowTests.java",
"license": "epl-1.0",
"size": 17031
} | [
"com.gargoylesoftware.htmlunit.WebClient",
"com.gargoylesoftware.htmlunit.html.HtmlElement",
"com.gargoylesoftware.htmlunit.html.HtmlPage",
"com.ibm.ws.jsf22.fat.JSFUtils",
"junit.framework.Assert",
"org.junit.Assert"
] | import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.ibm.ws.jsf22.fat.JSFUtils; import junit.framework.Assert; import org.junit.Assert; | import com.gargoylesoftware.htmlunit.*; import com.gargoylesoftware.htmlunit.html.*; import com.ibm.ws.jsf22.fat.*; import junit.framework.*; import org.junit.*; | [
"com.gargoylesoftware.htmlunit",
"com.ibm.ws",
"junit.framework",
"org.junit"
] | com.gargoylesoftware.htmlunit; com.ibm.ws; junit.framework; org.junit; | 846,224 |
protected boolean acceptActionPath(HttpServletRequest request, String actionPath) {
String extension = FileNameUtil.getExtension(actionPath);
if (extension.length() == 0) {
return true;
}
if (extension.equals("html") || extension.equals("htm")) {
return true;
}
return false;
}
| boolean function(HttpServletRequest request, String actionPath) { String extension = FileNameUtil.getExtension(actionPath); if (extension.length() == 0) { return true; } if (extension.equals("html") extension.equals("htm")) { return true; } return false; } | /**
* Accepts action path for further parsing. By default, only <code>*.htm(l)</code>
* requests are passed through and those without any extension.
*/ | Accepts action path for further parsing. By default, only <code>*.htm(l)</code> requests are passed through and those without any extension | acceptActionPath | {
"repo_name": "007slm/jodd",
"path": "jodd-lagarto-web/src/main/java/jodd/lagarto/filter/LagartoServletFilter.java",
"license": "bsd-3-clause",
"size": 3713
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,092,712 |
@Override
public Value callMethodRef(Env env, QuercusClass qClass, Value qThis)
{
return callMethodRef(env, qClass, qThis,
_args[0].eval(env));
} | Value function(Env env, QuercusClass qClass, Value qThis) { return callMethodRef(env, qClass, qThis, _args[0].eval(env)); } | /**
* Evaluates the method with the given variable arguments.
*/ | Evaluates the method with the given variable arguments | callMethodRef | {
"repo_name": "smba/oak",
"path": "quercus/src/main/java/com/caucho/quercus/function/CompiledMethodRef_1.java",
"license": "lgpl-3.0",
"size": 2621
} | [
"com.caucho.quercus.env.Env",
"com.caucho.quercus.env.QuercusClass",
"com.caucho.quercus.env.Value"
] | import com.caucho.quercus.env.Env; import com.caucho.quercus.env.QuercusClass; import com.caucho.quercus.env.Value; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,550,844 |
@SuppressWarnings("unchecked")
public ByteBuffer toByteBuffer(Object value) {
ByteBuffer byteBuffer = null;
Serializer serializer = GoraSerializerTypeInferer.getSerializer(value);
if (serializer == null) {
LOG.info("Serializer not found for: " + value.toString());
}
else {
byteBuffer... | @SuppressWarnings(STR) ByteBuffer function(Object value) { ByteBuffer byteBuffer = null; Serializer serializer = GoraSerializerTypeInferer.getSerializer(value); if (serializer == null) { LOG.info(STR + value.toString()); } else { byteBuffer = serializer.toByteBuffer(value); } if (byteBuffer == null) { LOG.info(STR + va... | /**
* Serialize value to ByteBuffer.
* @param value the member value
* @return ByteBuffer object
*/ | Serialize value to ByteBuffer | toByteBuffer | {
"repo_name": "prateekbansal/apache-gora-0.4",
"path": "gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java",
"license": "apache-2.0",
"size": 17283
} | [
"java.nio.ByteBuffer",
"me.prettyprint.hector.api.Serializer",
"org.apache.gora.cassandra.serializers.GoraSerializerTypeInferer"
] | import java.nio.ByteBuffer; import me.prettyprint.hector.api.Serializer; import org.apache.gora.cassandra.serializers.GoraSerializerTypeInferer; | import java.nio.*; import me.prettyprint.hector.api.*; import org.apache.gora.cassandra.serializers.*; | [
"java.nio",
"me.prettyprint.hector",
"org.apache.gora"
] | java.nio; me.prettyprint.hector; org.apache.gora; | 1,285,080 |
public RexNode makeReinterpretCast(
RelDataType type,
RexNode exp,
RexNode checkOverflow) {
List<RexNode> args;
if ((checkOverflow != null) && checkOverflow.isAlwaysTrue()) {
args = ImmutableList.of(exp, checkOverflow);
} else {
args = ImmutableList.of(exp);
}
return ... | RexNode function( RelDataType type, RexNode exp, RexNode checkOverflow) { List<RexNode> args; if ((checkOverflow != null) && checkOverflow.isAlwaysTrue()) { args = ImmutableList.of(exp, checkOverflow); } else { args = ImmutableList.of(exp); } return new RexCall( type, SqlStdOperatorTable.REINTERPRET, args); } | /**
* Makes a reinterpret cast.
*
* @param type type returned by the cast
* @param exp expression to be casted
* @param checkOverflow whether an overflow check is required
* @return a RexCall with two operands and a special return type
*/ | Makes a reinterpret cast | makeReinterpretCast | {
"repo_name": "wanglan/calcite",
"path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java",
"license": "apache-2.0",
"size": 45773
} | [
"com.google.common.collect.ImmutableList",
"java.util.List",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.sql.fun.SqlStdOperatorTable"
] | import com.google.common.collect.ImmutableList; import java.util.List; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.fun.SqlStdOperatorTable; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.fun.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 2,034,294 |
private static File locateFirefoxBinaryFromSystemProperty() {
String binaryName = System.getProperty("webdriver.firefox.bin");
if (binaryName == null)
return null;
File binary = new File(binaryName);
if (binary.exists())
return binary;
Platform current = Platform.getCurrent();
if... | static File function() { String binaryName = System.getProperty(STR); if (binaryName == null) return null; File binary = new File(binaryName); if (binary.exists()) return binary; Platform current = Platform.getCurrent(); if (current.is(WINDOWS)) { if (!binaryName.endsWith(".exe")) binaryName += ".exe"; } else if (curre... | /**
* Locates the firefox binary from a system property. Will throw an exception if the binary cannot
* be found.
*/ | Locates the firefox binary from a system property. Will throw an exception if the binary cannot be found | locateFirefoxBinaryFromSystemProperty | {
"repo_name": "sevaseva/selenium",
"path": "java/client/src/org/openqa/selenium/firefox/internal/Executable.java",
"license": "apache-2.0",
"size": 6713
} | [
"java.io.File",
"org.openqa.selenium.Platform",
"org.openqa.selenium.WebDriverException"
] | import java.io.File; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; | import java.io.*; import org.openqa.selenium.*; | [
"java.io",
"org.openqa.selenium"
] | java.io; org.openqa.selenium; | 2,765,542 |
private void doSend(NetarkivetMessage msg, ChannelID to)
throws JMSException {
connectionLock.readLock().lock();
try {
ObjectMessage message = getSession().createObjectMessage(msg);
synchronized (msg) {
getProducer(to.getName()).send(message);
... | void function(NetarkivetMessage msg, ChannelID to) throws JMSException { connectionLock.readLock().lock(); try { ObjectMessage message = getSession().createObjectMessage(msg); synchronized (msg) { getProducer(to.getName()).send(message); msg.updateId(message.getJMSMessageID()); } } finally { connectionLock.readLock().u... | /**
* Sends an ObjectMessage on a queue destination.
*
* @param msg the NetarkivetMessage to be wrapped and send as an
* ObjectMessage.
* @param to the destination topic.
*
* @throws JMSException if message failed to be sent.
*/ | Sends an ObjectMessage on a queue destination | doSend | {
"repo_name": "netarchivesuite/netarchivesuite-svngit-migration",
"path": "src/dk/netarkivet/common/distribute/JMSConnection.java",
"license": "lgpl-2.1",
"size": 28319
} | [
"javax.jms.JMSException",
"javax.jms.ObjectMessage"
] | import javax.jms.JMSException; import javax.jms.ObjectMessage; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 2,771,267 |
public void setLastupdatedtime(Date lastupdatedtime) {
this.lastupdatedtime = lastupdatedtime;
} | void function(Date lastupdatedtime) { this.lastupdatedtime = lastupdatedtime; } | /**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column m_tracker_version.lastUpdatedTime
*
* @param lastupdatedtime the value for m_tracker_version.lastUpdatedTime
*
* @mbggenerated Thu Jul 16 10:50:13 ICT 2015
*/ | This method was generated by MyBatis Generator. This method sets the value of the database column m_tracker_version.lastUpdatedTime | setLastupdatedtime | {
"repo_name": "uniteddiversity/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/tracker/domain/Version.java",
"license": "agpl-3.0",
"size": 13110
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,731,733 |
public boolean isDiscoverable() throws SimulatorException {
return nativeIsDiscoverable();
} | boolean function() throws SimulatorException { return nativeIsDiscoverable(); } | /**
* API to get the discoverable state of resource.
*
* @return Discoverable state - true if resource is discoverable, otherwise
* false.
*
* @throws SimulatorException
* This exception will be thrown if the native resource object
* does not exist... | API to get the discoverable state of resource | isDiscoverable | {
"repo_name": "kadasaikumar/iotivity-1.2.1",
"path": "service/simulator/java/sdk/src/org/oic/simulator/server/SimulatorResource.java",
"license": "gpl-3.0",
"size": 17612
} | [
"org.oic.simulator.SimulatorException"
] | import org.oic.simulator.SimulatorException; | import org.oic.simulator.*; | [
"org.oic.simulator"
] | org.oic.simulator; | 1,401,807 |
public Color getCurrentLineHighlightColor() {
return currentLineColor;
} | Color function() { return currentLineColor; } | /**
* Returns the color being used to highlight the current line. Note that
* if highlighting the current line is turned off, you will not be seeing
* this highlight.
*
* @return The color being used to highlight the current line.
* @see #getHighlightCurrentLine()
* @see #setHighlightCurrentLine(boolean)... | Returns the color being used to highlight the current line. Note that if highlighting the current line is turned off, you will not be seeing this highlight | getCurrentLineHighlightColor | {
"repo_name": "buffis/ESPlorer",
"path": "ESPlorer/src/org/fife/ui/rtextarea/RTextAreaBase.java",
"license": "gpl-2.0",
"size": 35549
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,756,233 |
public String toString(){
String message =this.getId() + ": " + this.getName() + "\n\t";
ArrayList<Node> adjacents = this.getAdjacent();
for (int i =0; i < adjacents.size(); i++){
message += ((State) adjacents.get(i)).getName() + " ";
}
message += "\n\t";
for (int i =0; i < cities.size(); i++){
me... | String function(){ String message =this.getId() + STR + this.getName() + "\n\t"; ArrayList<Node> adjacents = this.getAdjacent(); for (int i =0; i < adjacents.size(); i++){ message += ((State) adjacents.get(i)).getName() + " "; } message += "\n\t"; for (int i =0; i < cities.size(); i++){ message += cities.get(i); if (i ... | /**
* String representation of this state
*/ | String representation of this state | toString | {
"repo_name": "teovoinea/GLIFRP",
"path": "BackEnd/src/backend/State.java",
"license": "gpl-3.0",
"size": 4076
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,202,222 |
public void setDTDHandler(final DTDHandler dtdHandler) {
this.dtdHandler = dtdHandler;
}
| void function(final DTDHandler dtdHandler) { this.dtdHandler = dtdHandler; } | /**
* This will set the <code>DTDHandler</code>.
*
* @param dtdHandler
* contains <code>DTDHandler</code> callback methods.
*/ | This will set the <code>DTDHandler</code> | setDTDHandler | {
"repo_name": "autermann/geosoftware",
"path": "src/test/java/jdom/output/SAXOutputter.java",
"license": "gpl-3.0",
"size": 46959
} | [
"org.xml.sax.DTDHandler"
] | import org.xml.sax.DTDHandler; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 752,980 |
@Override
public void onNewFrame(HeadTransform headTransform) {
headTransform.getHeadView(mHeadView, 0);
headTransform.getForwardVector(lookForwardVector, 0);
} | void function(HeadTransform headTransform) { headTransform.getHeadView(mHeadView, 0); headTransform.getForwardVector(lookForwardVector, 0); } | /**
* Prepares OpenGL ES before we draw a frame.
* @param headTransform The head transformation in the new frame.
*/ | Prepares OpenGL ES before we draw a frame | onNewFrame | {
"repo_name": "VirtualWalker/RandCity",
"path": "app/src/main/java/fr/tjdev/randcity/vrgame/VRRenderer.java",
"license": "gpl-3.0",
"size": 31596
} | [
"com.google.vrtoolkit.cardboard.HeadTransform"
] | import com.google.vrtoolkit.cardboard.HeadTransform; | import com.google.vrtoolkit.cardboard.*; | [
"com.google.vrtoolkit"
] | com.google.vrtoolkit; | 2,198,582 |
@SuppressWarnings("unchecked")
public Type log(LoggingLevel loggingLevel, String logName, String message) {
LogDefinition answer = new LogDefinition(message);
answer.setLoggingLevel(loggingLevel);
answer.setLogName(logName);
addOutput(answer);
return (Type) this;
} | @SuppressWarnings(STR) Type function(LoggingLevel loggingLevel, String logName, String message) { LogDefinition answer = new LogDefinition(message); answer.setLoggingLevel(loggingLevel); answer.setLogName(logName); addOutput(answer); return (Type) this; } | /**
* Creates a log message to be logged at the given level and name.
*
* @param loggingLevel the logging level to use
* @param logName the log name to use
* @param message the log message, (you can use {@link org.apache.camel.language.simple.SimpleLanguage} syntax)
* @return the builder
... | Creates a log message to be logged at the given level and name | log | {
"repo_name": "dmvolod/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 177777
} | [
"org.apache.camel.LoggingLevel"
] | import org.apache.camel.LoggingLevel; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,920,214 |
private void init(String className) {
Collection types = new ArrayList();
if (className.equals(EntryRep.matchAnyClassName())) {
// handle "match any" specially" -- search from ROOT
// Simplification suggested by
// Lutz Birkhahn <lutz.birkhahn@GMX.DE>
className = ROOT;
} else {
// a... | void function(String className) { Collection types = new ArrayList(); if (className.equals(EntryRep.matchAnyClassName())) { className = ROOT; } else { types.add(className); } walkTree(classVector(className), types); typearray = types.toArray(); int randnum = 0; Object tmpobj = null; for (int i = 0; i < typearray.length... | /**
* Set up this iterator to walk over the subtypes of this class,
* including the class itself. It then randomizes the list.
*/ | Set up this iterator to walk over the subtypes of this class, including the class itself. It then randomizes the list | init | {
"repo_name": "MjAbuz/river",
"path": "src/com/sun/jini/outrigger/TypeTree.java",
"license": "apache-2.0",
"size": 7512
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 424,912 |
public static List<ShapeRecord> implicitClosepath(double startX, double startY, double endX, double endY)
{
List<ShapeRecord> shapeRecords = new ArrayList<ShapeRecord>();
StyleChangeRecord scr = move(startX, startY);
scr.setLinestyle(0);
shapeRecords.add(scr);
shapeRecord... | static List<ShapeRecord> function(double startX, double startY, double endX, double endY) { List<ShapeRecord> shapeRecords = new ArrayList<ShapeRecord>(); StyleChangeRecord scr = move(startX, startY); scr.setLinestyle(0); shapeRecords.add(scr); shapeRecords.addAll(straightEdge(startX, startY, endX, endY)); return shape... | /**
* Creates a List of ShapeRecord to draw a line that represents an implicit closepath
* origin (startX, startY) to the specified coordinates (in pixels).
*
* @param startX The origin x coordinate in pixels.
* @param startY The origin y coordinate in pixels.
* @param endX The end x coo... | Creates a List of ShapeRecord to draw a line that represents an implicit closepath origin (startX, startY) to the specified coordinates (in pixels) | implicitClosepath | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/fxgutils/src/java/com/adobe/internal/fxg/swf/ShapeHelper.java",
"license": "apache-2.0",
"size": 56460
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 712,543 |
@Test
public void testCascadeDelete() {
Set<Student> students = studentDao.getStudentByName("lucy");
if(students != null) {
for(Student student : students) {
studentDao.delete(student);
}
}
logger.debug(confidentialDao.loadAll());
}
| void function() { Set<Student> students = studentDao.getStudentByName("lucy"); if(students != null) { for(Student student : students) { studentDao.delete(student); } } logger.debug(confidentialDao.loadAll()); } | /**
* Exception will be throw here since Student reference Credential.<br>
*/ | Exception will be throw here since Student reference Credential | testCascadeDelete | {
"repo_name": "mars-yc/private",
"path": "hibernate/src/test/java/com/perfume/tech/hibernate/dao/impl/StudentDaoImplTest.java",
"license": "apache-2.0",
"size": 3156
} | [
"com.perfume.tech.hibernate.pojo.Student",
"java.util.Set"
] | import com.perfume.tech.hibernate.pojo.Student; import java.util.Set; | import com.perfume.tech.hibernate.pojo.*; import java.util.*; | [
"com.perfume.tech",
"java.util"
] | com.perfume.tech; java.util; | 1,699,417 |
public static Vector3 toVector3(Quaternion v1)
{
return toVector3(v1.x, v1.y, v1.z);
}
| static Vector3 function(Quaternion v1) { return toVector3(v1.x, v1.y, v1.z); } | /**
* Fills a vector3 with values from a vector4
*
* @param v1
* @return
*/ | Fills a vector3 with values from a vector4 | toVector3 | {
"repo_name": "Kenoshen/Winger",
"path": "src/main/java/com/winger/math/VectorMath.java",
"license": "mit",
"size": 7593
} | [
"com.badlogic.gdx.math.Quaternion",
"com.badlogic.gdx.math.Vector3"
] | import com.badlogic.gdx.math.Quaternion; import com.badlogic.gdx.math.Vector3; | import com.badlogic.gdx.math.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,829,194 |
public Iterator<H> iterator()
{
return new DepthFirstTreeIteratorImpl(this);
} | Iterator<H> function() { return new DepthFirstTreeIteratorImpl(this); } | /**
* Returns an iterator over a set of elements of type T.
*
* @return an Iterator.
*/ | Returns an iterator over a set of elements of type T | iterator | {
"repo_name": "davidsoergel/trees",
"path": "src/main/java/com/davidsoergel/trees/AbstractHierarchyNode.java",
"license": "apache-2.0",
"size": 4918
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,643,380 |
public static RangeSet fromString(String list, boolean skipError) {
RangeSet rs = new RangeSet();
for (String s : Util.tokenize(list,",")) {
s = s.trim();
// s is either single number or range "x-y".
// note that the end range is inclusive ... | static RangeSet function(String list, boolean skipError) { RangeSet rs = new RangeSet(); for (String s : Util.tokenize(list,",")) { s = s.trim(); try { if(s.contains("-")) { String[] tokens = Util.tokenize(s,"-"); rs.ranges.add(new Range(Integer.parseInt(tokens[0]),Integer.parseInt(tokens[1])+1)); } else { int n = Inte... | /**
* Parses a {@link RangeSet} from a string like "1-3,5,7-9"
*/ | Parses a <code>RangeSet</code> from a string like "1-3,5,7-9" | fromString | {
"repo_name": "IsCoolEntertainment/debpkg_jenkins",
"path": "core/src/main/java/hudson/model/Fingerprint.java",
"license": "mit",
"size": 28954
} | [
"com.thoughtworks.xstream.converters.Converter"
] | import com.thoughtworks.xstream.converters.Converter; | import com.thoughtworks.xstream.converters.*; | [
"com.thoughtworks.xstream"
] | com.thoughtworks.xstream; | 621,324 |
public List<? extends TransitiveInfoCollection> getPrerequisites(String attributeName,
Mode mode) {
Attribute attributeDefinition = getAttribute(attributeName);
if ((mode == Mode.TARGET) && (attributeDefinition.hasSplitConfigurationTransition())) {
// TODO(bazel-team): If you request a split-confi... | List<? extends TransitiveInfoCollection> function(String attributeName, Mode mode) { Attribute attributeDefinition = getAttribute(attributeName); if ((mode == Mode.TARGET) && (attributeDefinition.hasSplitConfigurationTransition())) { checkAttribute(attributeName, Mode.SPLIT); Map<Optional<String>, ? extends List<? exte... | /**
* Returns the list of transitive info collections that feed into this target through the
* specified attribute. Note that you need to specify the correct mode for the attribute,
* otherwise an assertion will be raised.
*/ | Returns the list of transitive info collections that feed into this target through the specified attribute. Note that you need to specify the correct mode for the attribute, otherwise an assertion will be raised | getPrerequisites | {
"repo_name": "mrdomino/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java",
"license": "apache-2.0",
"size": 82752
} | [
"com.google.common.base.Optional",
"com.google.common.collect.ImmutableList",
"com.google.devtools.build.lib.analysis.RuleConfiguredTarget",
"com.google.devtools.build.lib.packages.Attribute",
"java.util.List",
"java.util.Map"
] | import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.analysis.RuleConfiguredTarget; import com.google.devtools.build.lib.packages.Attribute; import java.util.List; import java.util.Map; | import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.packages.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,018,837 |
public void setCollection(PdfCollection collection) {
this.collection = collection;
}
// [C8] AcroForm
PdfAnnotationsImp annotationsImp; | void function(PdfCollection collection) { this.collection = collection; } PdfAnnotationsImp annotationsImp; | /**
* Sets the collection dictionary.
* @param collection a dictionary of type PdfCollection
*/ | Sets the collection dictionary | setCollection | {
"repo_name": "bullda/DroidText",
"path": "src/core/com/lowagie/text/pdf/PdfDocument.java",
"license": "lgpl-3.0",
"size": 117456
} | [
"com.lowagie.text.pdf.collection.PdfCollection",
"com.lowagie.text.pdf.internal.PdfAnnotationsImp"
] | import com.lowagie.text.pdf.collection.PdfCollection; import com.lowagie.text.pdf.internal.PdfAnnotationsImp; | import com.lowagie.text.pdf.collection.*; import com.lowagie.text.pdf.internal.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 1,042,418 |
private void uploadFilesFromCache() throws RepositoryException {
ArrayList<File> files = new ArrayList<File>();
listRecursive(files, directory);
long totalSize = 0;
for (File f : files) {
totalSize += f.length();
}
if (files.size() > 0) {
if (c... | void function() throws RepositoryException { ArrayList<File> files = new ArrayList<File>(); listRecursive(files, directory); long totalSize = 0; for (File f : files) { totalSize += f.length(); } if (files.size() > 0) { if (concurrentUploadsThreads > 1) { new FilesUploader(files, totalSize, concurrentUploadsThreads, fal... | /**
* Load files from {@link LocalCache} to {@link Backend}.
*/ | Load files from <code>LocalCache</code> to <code>Backend</code> | uploadFilesFromCache | {
"repo_name": "SylvesterAbreu/jackrabbit",
"path": "jackrabbit-data/src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java",
"license": "apache-2.0",
"size": 51878
} | [
"java.io.File",
"java.util.ArrayList",
"javax.jcr.RepositoryException"
] | import java.io.File; import java.util.ArrayList; import javax.jcr.RepositoryException; | import java.io.*; import java.util.*; import javax.jcr.*; | [
"java.io",
"java.util",
"javax.jcr"
] | java.io; java.util; javax.jcr; | 2,580,777 |
public void test0009() throws JavaScriptModelException {
IJavaScriptUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0009", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
ASTNode result = runConversion(sourceUnit, false);
... | void function() throws JavaScriptModelException { IJavaScriptUnit sourceUnit = getCompilationUnit(STR , "src", STR, STR); char[] source = sourceUnit.getSource().toCharArray(); ASTNode result = runConversion(sourceUnit, false); ASTNode expression = getASTNodeToCompare((JavaScriptUnit) result); assertNotNull(STR, express... | /**
* Test allocation expression: new int[][] {{1}, {2}} ==> ArrayCreation
*/ | Test allocation expression: new int[][] {{1}, {2}} ==> ArrayCreation | test0009 | {
"repo_name": "echoes-tech/eclipse.jsdt.core",
"path": "org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java",
"license": "epl-1.0",
"size": 521652
} | [
"org.eclipse.wst.jsdt.core.IJavaScriptUnit",
"org.eclipse.wst.jsdt.core.JavaScriptModelException",
"org.eclipse.wst.jsdt.core.dom.ASTMatcher",
"org.eclipse.wst.jsdt.core.dom.ASTNode",
"org.eclipse.wst.jsdt.core.dom.ArrayInitializer",
"org.eclipse.wst.jsdt.core.dom.JavaScriptUnit"
] | import org.eclipse.wst.jsdt.core.IJavaScriptUnit; import org.eclipse.wst.jsdt.core.JavaScriptModelException; import org.eclipse.wst.jsdt.core.dom.ASTMatcher; import org.eclipse.wst.jsdt.core.dom.ASTNode; import org.eclipse.wst.jsdt.core.dom.ArrayInitializer; import org.eclipse.wst.jsdt.core.dom.JavaScriptUnit; | import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.core.dom.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 2,129,251 |
@Rights(value = VKApiRigths.OPEN_METHOD)
public String getUniversities(VKParameters params) {
return execute(getUrl("getUniversities", params)).toString();
} | @Rights(value = VKApiRigths.OPEN_METHOD) String function(VKParameters params) { return execute(getUrl(STR, params)).toString(); } | /**
* <a href="https://vk.com/dev/database.getUniversities">API database.getUniversities()</a>
*
* @param params method parameters
* @return String with json respond
*/ | API database.getUniversities() | getUniversities | {
"repo_name": "AnBat/vk-java-sdk",
"path": "vk_sdk/src/main/java/com/batiaev/vk/api/VKApiDatabase.java",
"license": "apache-2.0",
"size": 6596
} | [
"com.batiaev.vk.common.VKParameters",
"com.batiaev.vk.common.annotation.Rights",
"com.batiaev.vk.common.consts.VKApiRigths"
] | import com.batiaev.vk.common.VKParameters; import com.batiaev.vk.common.annotation.Rights; import com.batiaev.vk.common.consts.VKApiRigths; | import com.batiaev.vk.common.*; import com.batiaev.vk.common.annotation.*; import com.batiaev.vk.common.consts.*; | [
"com.batiaev.vk"
] | com.batiaev.vk; | 564,302 |
public static Double getBlinkThreshold(final Intent request) {
if (!checkExistRequestData(request, PARAM_BLINK_THRESHOLD)) {
return null;
}
Double blinkThreshold = parseDouble(request, PARAM_BLINK_THRESHOLD);
if (blinkThreshold == null) {
throw new NumberForma... | static Double function(final Intent request) { if (!checkExistRequestData(request, PARAM_BLINK_THRESHOLD)) { return null; } Double blinkThreshold = parseDouble(request, PARAM_BLINK_THRESHOLD); if (blinkThreshold == null) { throw new NumberFormatException(ERROR_BLINK_THRESHOLD_DIFFERENT_TYPE); } if (NORMALIZE_VALUE_MIN ... | /**
* get blink threshold from request.
*
* @param request request parameter.
* @return threshold(0.0 ... 1.0). if nothing, null.
* @throws NumberFormatException
*/ | get blink threshold from request | getBlinkThreshold | {
"repo_name": "ssdwa/android",
"path": "dConnectDevicePlugin/dConnectDevicePluginSDK/src/org/deviceconnect/android/profile/HumanDetectProfile.java",
"license": "mit",
"size": 53966
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,770,388 |
public void expandAll() {
for (Node node : nodeStorage.getRootItems()) {
setExpanded(node, true, true);
}
} | void function() { for (Node node : nodeStorage.getRootItems()) { setExpanded(node, true, true); } } | /**
* Expands all non-leaf node in current tree.
* Be careful with this method. In case if you have nodes, which children may be loaded asynchronously it may perform powerful
* load to your server and completely reduce your performance. It useful for those tree, which has static data model.
*/ | Expands all non-leaf node in current tree. Be careful with this method. In case if you have nodes, which children may be loaded asynchronously it may perform powerful load to your server and completely reduce your performance. It useful for those tree, which has static data model | expandAll | {
"repo_name": "stour/che",
"path": "core/ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/Tree.java",
"license": "epl-1.0",
"size": 55274
} | [
"org.eclipse.che.ide.api.data.tree.Node"
] | import org.eclipse.che.ide.api.data.tree.Node; | import org.eclipse.che.ide.api.data.tree.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,472,676 |
public static List<String> getServiceUrlsFromConfig(EurekaClientConfig clientConfig, String instanceZone, boolean preferSameZone) {
List<String> orderedUrls = new ArrayList<String>();
String region = getRegion(clientConfig);
String[] availZones = clientConfig.getAvailabilityZones(clientConfi... | static List<String> function(EurekaClientConfig clientConfig, String instanceZone, boolean preferSameZone) { List<String> orderedUrls = new ArrayList<String>(); String region = getRegion(clientConfig); String[] availZones = clientConfig.getAvailabilityZones(clientConfig.getRegion()); if (availZones == null availZones.l... | /**
* Get the list of all eureka service urls from properties file for the eureka client to talk to.
*
* @param clientConfig the clientConfig to use
* @param instanceZone The zone in which the client resides
* @param preferSameZone true if we have to prefer the same zone as the client, false ot... | Get the list of all eureka service urls from properties file for the eureka client to talk to | getServiceUrlsFromConfig | {
"repo_name": "brharrington/eureka",
"path": "eureka-client/src/main/java/com/netflix/discovery/endpoint/EndpointUtils.java",
"license": "apache-2.0",
"size": 16956
} | [
"com.netflix.discovery.EurekaClientConfig",
"java.util.ArrayList",
"java.util.List"
] | import com.netflix.discovery.EurekaClientConfig; import java.util.ArrayList; import java.util.List; | import com.netflix.discovery.*; import java.util.*; | [
"com.netflix.discovery",
"java.util"
] | com.netflix.discovery; java.util; | 1,856,743 |
private void setBarcode() throws BizLogicException
{
if (edu.wustl.catissuecore.util.global.Variables.isStorageContainerBarcodeGeneratorAvl)
{
try
{
BarcodeGeneratorFactory
.getInstance(Constants.STORAGECONTAINER_BARCODE_GENERATOR_PROPERTY_NAME);
}
catch (final NameGeneratorExceptio... | void function() throws BizLogicException { if (edu.wustl.catissuecore.util.global.Variables.isStorageContainerBarcodeGeneratorAvl) { try { BarcodeGeneratorFactory .getInstance(Constants.STORAGECONTAINER_BARCODE_GENERATOR_PROPERTY_NAME); } catch (final NameGeneratorException e) { logger.error(e.getMessage(), e); throw t... | /**
* Set Barcode
* @throws BizLogicException BizLogicException
*/ | Set Barcode | setBarcode | {
"repo_name": "NCIP/catissue-core",
"path": "software/caTissue/modules/core/src/main/java/edu/wustl/catissuecore/bizlogic/StorageContainerBizLogic.java",
"license": "bsd-3-clause",
"size": 59947
} | [
"edu.wustl.catissuecore.namegenerator.BarcodeGeneratorFactory",
"edu.wustl.catissuecore.namegenerator.NameGeneratorException",
"edu.wustl.catissuecore.util.global.Constants",
"edu.wustl.common.exception.BizLogicException"
] | import edu.wustl.catissuecore.namegenerator.BarcodeGeneratorFactory; import edu.wustl.catissuecore.namegenerator.NameGeneratorException; import edu.wustl.catissuecore.util.global.Constants; import edu.wustl.common.exception.BizLogicException; | import edu.wustl.catissuecore.namegenerator.*; import edu.wustl.catissuecore.util.global.*; import edu.wustl.common.exception.*; | [
"edu.wustl.catissuecore",
"edu.wustl.common"
] | edu.wustl.catissuecore; edu.wustl.common; | 1,012,389 |
public static String getString(Context context, String key, String defaultValue) {
SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);
return settings.getString(key, defaultValue);
} | static String function(Context context, String key, String defaultValue) { SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE); return settings.getString(key, defaultValue); } | /**
* get string preferences
*
* @param context
* @param key The name of the preference to retrieve
* @param defaultValue Value to return if this preference does not exist
* @return The preference value if it exists, or defValue. Throws ClassCastException if there is a preference with
... | get string preferences | getString | {
"repo_name": "Veeson/allenglish",
"path": "app/src/main/java/com/lws/allenglish/util/common/PreferencesUtils.java",
"license": "apache-2.0",
"size": 9809
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 1,566 |
public Object accept(NodeVisitor iVisitor) {
return iVisitor.visitOpElementAsgnNode(this);
} | Object function(NodeVisitor iVisitor) { return iVisitor.visitOpElementAsgnNode(this); } | /**
* Accept for the visitor pattern.
* @param iVisitor the visitor
**/ | Accept for the visitor pattern | accept | {
"repo_name": "google-code/android-scripting",
"path": "jruby/src/src/org/jruby/ast/OpElementAsgnNode.java",
"license": "apache-2.0",
"size": 5379
} | [
"org.jruby.ast.visitor.NodeVisitor"
] | import org.jruby.ast.visitor.NodeVisitor; | import org.jruby.ast.visitor.*; | [
"org.jruby.ast"
] | org.jruby.ast; | 2,526,043 |
public static int copy(InputStream in, OutputStream out) throws IOException {
assert in != null;
assert out != null;
byte[] buf = new byte[BUF_SIZE];
int cnt = 0;
for (int n; (n = in.read(buf)) > 0;) {
out.write(buf, 0, n);
cnt += n;
}
... | static int function(InputStream in, OutputStream out) throws IOException { assert in != null; assert out != null; byte[] buf = new byte[BUF_SIZE]; int cnt = 0; for (int n; (n = in.read(buf)) > 0;) { out.write(buf, 0, n); cnt += n; } return cnt; } | /**
* Copies input byte stream to output byte stream.
*
* @param in Input byte stream.
* @param out Output byte stream.
* @return Number of the copied bytes.
* @throws IOException Thrown if an I/O error occurs.
*/ | Copies input byte stream to output byte stream | copy | {
"repo_name": "kromulan/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 298812
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,316,226 |
private static void addJavaIoFileRoots(List<AbstractFile> v) {
// Warning : No file operation should be performed on the resolved folders as under Win32, this would cause a
// dialog to appear for removable drives such as A:\ if no disk is present.
File fileRoots[] = File.listRoots();
... | static void function(List<AbstractFile> v) { File fileRoots[] = File.listRoots(); for (File fileRoot : fileRoots) try { v.add(FileFactory.getFile(fileRoot.getAbsolutePath(), true)); } catch (IOException e) { } } | /**
* Resolves the root folders returned by {@link File#listRoots()} and adds them to the given <code>Vector</code>.
*
* @param v the <code>Vector</code> to add root folders to
*/ | Resolves the root folders returned by <code>File#listRoots()</code> and adds them to the given <code>Vector</code> | addJavaIoFileRoots | {
"repo_name": "raisercostin/mucommander",
"path": "src/main/com/mucommander/commons/file/impl/local/LocalFile.java",
"license": "gpl-3.0",
"size": 59451
} | [
"com.mucommander.commons.file.AbstractFile",
"com.mucommander.commons.file.FileFactory",
"java.io.File",
"java.io.IOException",
"java.util.List"
] | import com.mucommander.commons.file.AbstractFile; import com.mucommander.commons.file.FileFactory; import java.io.File; import java.io.IOException; import java.util.List; | import com.mucommander.commons.file.*; import java.io.*; import java.util.*; | [
"com.mucommander.commons",
"java.io",
"java.util"
] | com.mucommander.commons; java.io; java.util; | 1,249,630 |
void injectData(Map<String, Object> data); | void injectData(Map<String, Object> data); | /**
* Inject coremod data into this coremod
* This data includes:
* "mcLocation" : the location of the minecraft directory,
* "coremodList" : the list of coremods
* "coremodLocation" : the file this coremod loaded from,
*/ | Inject coremod data into this coremod This data includes: "mcLocation" : the location of the minecraft directory, "coremodList" : the list of coremods "coremodLocation" : the file this coremod loaded from | injectData | {
"repo_name": "jdpadrnos/MinecraftForge",
"path": "src/main/java/net/minecraftforge/fml/relauncher/IFMLLoadingPlugin.java",
"license": "lgpl-2.1",
"size": 4717
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,293,066 |
public static TreeSet<String> getRoles(final Database database, final Name name) {
try {
if (null == database) {
throw new IllegalArgumentException("Database is null");
}
if (null == name) {
throw new IllegalArgumentException("Name is null");
}
return Names.getRoles(database, name.... | static TreeSet<String> function(final Database database, final Name name) { try { if (null == database) { throw new IllegalArgumentException(STR); } if (null == name) { throw new IllegalArgumentException(STR); } return Names.getRoles(database, name.getCanonical()); } catch (final Exception e) { DominoUtils.handleExcept... | /**
* Gets all the roles the specified user has for the Database.
*
* @param database
* Database for which to check the roles.
* @param name
* Name for which to get the roles.
* @return All roles the specified user has for the Database. Null on exception or no roles found.
... | Gets all the roles the specified user has for the Database | getRoles | {
"repo_name": "OpenNTF/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/utils/Names.java",
"license": "apache-2.0",
"size": 35655
} | [
"java.util.TreeSet",
"org.openntf.domino.Database",
"org.openntf.domino.Name"
] | import java.util.TreeSet; import org.openntf.domino.Database; import org.openntf.domino.Name; | import java.util.*; import org.openntf.domino.*; | [
"java.util",
"org.openntf.domino"
] | java.util; org.openntf.domino; | 2,662,710 |
EOperation getBoard__GetRamCapacity(); | EOperation getBoard__GetRamCapacity(); | /**
* Returns the meta object for the '{@link ch.hilbri.assist.model.Board#getRamCapacity() <em>Get Ram Capacity</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the '<em>Get Ram Capacity</em>' operation.
* @see ch.hilbri.assist.model.Board#getRa... | Returns the meta object for the '<code>ch.hilbri.assist.model.Board#getRamCapacity() Get Ram Capacity</code>' operation. | getBoard__GetRamCapacity | {
"repo_name": "RobertHilbrich/assist",
"path": "ch.hilbri.assist.model/src-gen/ch/hilbri/assist/model/ModelPackage.java",
"license": "gpl-2.0",
"size": 419306
} | [
"org.eclipse.emf.ecore.EOperation"
] | import org.eclipse.emf.ecore.EOperation; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 304,150 |
private void setSignatureTypeComboBoxModel() {
DefaultComboBoxModel<String> sigTypeComboBoxModel = new DefaultComboBoxModel<>();
sigTypeComboBoxModel.addElement(FileTypeIdGlobalSettingsPanel.RAW_SIGNATURE_TYPE_COMBO_BOX_ITEM);
sigTypeComboBoxModel.addElement(FileTypeIdGlobalSettingsPanel.ASC... | void function() { DefaultComboBoxModel<String> sigTypeComboBoxModel = new DefaultComboBoxModel<>(); sigTypeComboBoxModel.addElement(FileTypeIdGlobalSettingsPanel.RAW_SIGNATURE_TYPE_COMBO_BOX_ITEM); sigTypeComboBoxModel.addElement(FileTypeIdGlobalSettingsPanel.ASCII_SIGNATURE_TYPE_COMBO_BOX_ITEM); } | /**
* Sets the model for the signature type combo box.
*/ | Sets the model for the signature type combo box | setSignatureTypeComboBoxModel | {
"repo_name": "dgrove727/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdGlobalSettingsPanel.java",
"license": "apache-2.0",
"size": 26002
} | [
"javax.swing.DefaultComboBoxModel"
] | import javax.swing.DefaultComboBoxModel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,025,055 |
@Override
public void selectionChanged(IStructuredSelection selection) {
setEnabled(fEditor.isEditorInputModifiable());
}
}
private boolean fTopLevelTypeOnly;
private IJavaElement fInput;
private String fContextMenuID;
private Menu fMenu;
private JavaOutlineViewer fOutlineViewer;
private JavaEd... | void function(IStructuredSelection selection) { setEnabled(fEditor.isEditorInputModifiable()); } } private boolean fTopLevelTypeOnly; private IJavaElement fInput; private String fContextMenuID; private Menu fMenu; private JavaOutlineViewer fOutlineViewer; private JavaEditor fEditor; private MemberFilterActionGroup fMem... | /**
* Notifies the action of a change in the Selection.
*
* @param selection the new Structured Selection
*/ | Notifies the action of a change in the Selection | selectionChanged | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/ui/javaeditor/JavaOutlinePage.java",
"license": "mit",
"size": 42538
} | [
"java.util.Hashtable",
"org.eclipse.core.runtime.Assert",
"org.eclipse.core.runtime.ListenerList",
"org.eclipse.jdt.core.IJavaElement",
"org.eclipse.jdt.internal.ui.actions.CategoryFilterActionGroup",
"org.eclipse.jdt.internal.ui.actions.CollapseAllAction",
"org.eclipse.jdt.internal.ui.actions.Composite... | import java.util.Hashtable; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.ListenerList; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.internal.ui.actions.CategoryFilterActionGroup; import org.eclipse.jdt.internal.ui.actions.CollapseAllAction; import org.eclipse.jdt.internal.... | import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.ui.actions.*; import org.eclipse.jdt.internal.ui.dnd.*; import org.eclipse.jdt.ui.actions.*; import org.eclipse.jface.action.*; import org.eclipse.jface.util.*; import org.eclipse.jface.viewers.*; impor... | [
"java.util",
"org.eclipse.core",
"org.eclipse.jdt",
"org.eclipse.jface",
"org.eclipse.swt",
"org.eclipse.ui"
] | java.util; org.eclipse.core; org.eclipse.jdt; org.eclipse.jface; org.eclipse.swt; org.eclipse.ui; | 503,913 |
public boolean restoreAccessibilityFocus(CalendarDay day) {
if ((day.year != mYear) || (day.month != mMonth) || (day.day > mNumCells)) {
return false;
}
mNodeProvider.setFocusedItem(day);
return true;
}
private class MonthViewNodeProvider extends TouchExplo... | boolean function(CalendarDay day) { if ((day.year != mYear) (day.month != mMonth) (day.day > mNumCells)) { return false; } mNodeProvider.setFocusedItem(day); return true; } private class MonthViewNodeProvider extends TouchExplorationHelper<CalendarDay> { private final SparseArray<CalendarDay> mCachedItems = new SparseA... | /**
* Attempts to restore accessibility focus to the specified date.
*
* @param day The date which should receive focus
* @return {@code false} if the date is not valid for this month view, or {@code true} if the date received focus
*/ | Attempts to restore accessibility focus to the specified date | restoreAccessibilityFocus | {
"repo_name": "aucd29/calendar",
"path": "library/src/main/java/com/doomonafireball/betterpickers/calendardatepicker/SimpleMonthView.java",
"license": "apache-2.0",
"size": 25767
} | [
"android.content.Context",
"android.graphics.Rect",
"android.util.SparseArray",
"android.view.View",
"com.doomonafireball.betterpickers.TouchExplorationHelper",
"com.doomonafireball.betterpickers.calendardatepicker.SimpleMonthAdapter",
"java.util.Calendar"
] | import android.content.Context; import android.graphics.Rect; import android.util.SparseArray; import android.view.View; import com.doomonafireball.betterpickers.TouchExplorationHelper; import com.doomonafireball.betterpickers.calendardatepicker.SimpleMonthAdapter; import java.util.Calendar; | import android.content.*; import android.graphics.*; import android.util.*; import android.view.*; import com.doomonafireball.betterpickers.*; import com.doomonafireball.betterpickers.calendardatepicker.*; import java.util.*; | [
"android.content",
"android.graphics",
"android.util",
"android.view",
"com.doomonafireball.betterpickers",
"java.util"
] | android.content; android.graphics; android.util; android.view; com.doomonafireball.betterpickers; java.util; | 408,083 |
public static XYList removeZeroAndDuplicateDataPoints(XYList xyList, Constants.ACQUISITION_MODE acquisitionMode) {
XYPoint prevDp = new XYPoint(-1, -1);
boolean isValid = true;
for (XYPoint point : xyList) {
if (point.y == 0 || point.x == prevDp.x) {
isValid = fa... | static XYList function(XYList xyList, Constants.ACQUISITION_MODE acquisitionMode) { XYPoint prevDp = new XYPoint(-1, -1); boolean isValid = true; for (XYPoint point : xyList) { if (point.y == 0 point.x == prevDp.x) { isValid = false; break; } prevDp = point; } if (isValid) return xyList; prevDp = new XYPoint(-1, -1); X... | /**
* Removes data points with zero intensity from the data set.
*
* @param xyList a featureset m/z-intensity list
* @param acquisitionMode an acquisition mode
* @return the cleaned featureset data set
*/ | Removes data points with zero intensity from the data set | removeZeroAndDuplicateDataPoints | {
"repo_name": "tomas-pluskal/masscascade",
"path": "MassCascadeCore/src/main/java/uk/ac/ebi/masscascade/utilities/ScanUtils.java",
"license": "gpl-3.0",
"size": 12663
} | [
"uk.ac.ebi.masscascade.parameters.Constants",
"uk.ac.ebi.masscascade.utilities.xyz.XYList",
"uk.ac.ebi.masscascade.utilities.xyz.XYPoint"
] | import uk.ac.ebi.masscascade.parameters.Constants; import uk.ac.ebi.masscascade.utilities.xyz.XYList; import uk.ac.ebi.masscascade.utilities.xyz.XYPoint; | import uk.ac.ebi.masscascade.parameters.*; import uk.ac.ebi.masscascade.utilities.xyz.*; | [
"uk.ac.ebi"
] | uk.ac.ebi; | 1,771,677 |
@ApiModelProperty(example = "null", required = true, value = "label_name string")
public String getLabelName() {
return labelName;
} | @ApiModelProperty(example = "null", required = true, value = STR) String function() { return labelName; } | /**
* label_name string
*
* @return labelName
**/ | label_name string | getLabelName | {
"repo_name": "GoldenGnu/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/CorporationContactsLabelsResponse.java",
"license": "apache-2.0",
"size": 3057
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,985,971 |
private void initializeIntrospection()
{
String[] uberspectors = configuration.getStringArray(RuntimeConstants.UBERSPECT_CLASSNAME);
for (String rm : uberspectors)
{
Object o = null;
try
{
o = ClassUtils.getNewInstance(rm);
... | void function() { String[] uberspectors = configuration.getStringArray(RuntimeConstants.UBERSPECT_CLASSNAME); for (String rm : uberspectors) { Object o = null; try { o = ClassUtils.getNewInstance(rm); } catch (ClassNotFoundException cnfe) { String err = STR + rm + STR; log.error(err); throw new VelocityException(err, c... | /**
* Gets the classname for the Uberspect introspection package and
* instantiates an instance.
*/ | Gets the classname for the Uberspect introspection package and instantiates an instance | initializeIntrospection | {
"repo_name": "apache/velocity-engine",
"path": "velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java",
"license": "apache-2.0",
"size": 64509
} | [
"org.apache.velocity.exception.VelocityException",
"org.apache.velocity.util.ClassUtils",
"org.apache.velocity.util.RuntimeServicesAware",
"org.apache.velocity.util.introspection.ChainableUberspector",
"org.apache.velocity.util.introspection.LinkingUberspector",
"org.apache.velocity.util.introspection.Ube... | import org.apache.velocity.exception.VelocityException; import org.apache.velocity.util.ClassUtils; import org.apache.velocity.util.RuntimeServicesAware; import org.apache.velocity.util.introspection.ChainableUberspector; import org.apache.velocity.util.introspection.LinkingUberspector; import org.apache.velocity.util.... | import org.apache.velocity.exception.*; import org.apache.velocity.util.*; import org.apache.velocity.util.introspection.*; | [
"org.apache.velocity"
] | org.apache.velocity; | 588,156 |
public Differencer.DiffWithDelta getNewAndOldValues(WalkableGraph walkableGraph,
Iterable<SkyKey> keys, SkyValueDirtinessChecker dirtinessChecker)
throws InterruptedException {
return getDirtyValues(new WalkableGraphBackedValueFetcher(walkableGraph), keys,
dirtinessChecker, true);
} | Differencer.DiffWithDelta function(WalkableGraph walkableGraph, Iterable<SkyKey> keys, SkyValueDirtinessChecker dirtinessChecker) throws InterruptedException { return getDirtyValues(new WalkableGraphBackedValueFetcher(walkableGraph), keys, dirtinessChecker, true); } | /**
* Returns a {@link Differencer.DiffWithDelta} containing keys that are dirty according to the
* passed-in {@code dirtinessChecker}.
*/ | Returns a <code>Differencer.DiffWithDelta</code> containing keys that are dirty according to the passed-in dirtinessChecker | getNewAndOldValues | {
"repo_name": "damienmg/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/FilesystemValueChecker.java",
"license": "apache-2.0",
"size": 23010
} | [
"com.google.devtools.build.skyframe.Differencer",
"com.google.devtools.build.skyframe.SkyKey",
"com.google.devtools.build.skyframe.WalkableGraph"
] | import com.google.devtools.build.skyframe.Differencer; import com.google.devtools.build.skyframe.SkyKey; import com.google.devtools.build.skyframe.WalkableGraph; | import com.google.devtools.build.skyframe.*; | [
"com.google.devtools"
] | com.google.devtools; | 399,619 |
public void runActivity(Body body) {
Service service = new Service(body);
while (body.isActive()) {
try {
Request request = service.blockingRemoveOldest();
if (request != null) {
try {
service.serve(request);
... | void function(Body body) { Service service = new Service(body); while (body.isActive()) { try { Request request = service.blockingRemoveOldest(); if (request != null) { try { service.serve(request); } catch (Throwable e) { logger.error(STR + request, e); } } } catch (InterruptedException e) { logger.warn(STR, e); } } } | /**
* Method controls the execution of every request.
* Tries to keep this active object alive in case of any exception.
*/ | Method controls the execution of every request. Tries to keep this active object alive in case of any exception | runActivity | {
"repo_name": "youribonnaffe/scheduling",
"path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/nodesource/RMNodeConfigurator.java",
"license": "agpl-3.0",
"size": 6285
} | [
"org.objectweb.proactive.Body",
"org.objectweb.proactive.Service",
"org.objectweb.proactive.core.body.request.Request"
] | import org.objectweb.proactive.Body; import org.objectweb.proactive.Service; import org.objectweb.proactive.core.body.request.Request; | import org.objectweb.proactive.*; import org.objectweb.proactive.core.body.request.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 457,539 |
public interface Observer {
void onBlockUpdated(Block block, @UpdateState int updateStateMask);
}
// These values are immutable once a block is created
private final BlocklyController mController;
private final BlockFactory mFactory;
private final String mId;
private final Stri... | interface Observer { void function(Block block, @UpdateState int updateStateMask); } private final BlocklyController mController; private final BlockFactory mFactory; private final String mId; private final String mType; private boolean mIsShadow; private Mutator mMutator = null; private String mMutation = null; privat... | /**
* Called when any of the following block elements have changed, possibly triggering a
* change in the BlockView.
* <ul>
* <li>Inputs</li>
* <li>Fields</li>
* <li>Mutator</li>
* <li>Comment</li>
* <li>Shadow state</li>
... | Called when any of the following block elements have changed, possibly triggering a change in the BlockView. Inputs Fields Mutator Comment Shadow state Disabled state Collapsed state Editable state Deletable state | onBlockUpdated | {
"repo_name": "Axe-Ishmael/Blockly",
"path": "src/blocklylib-core/src/main/java/com/google/blockly/model/Block.java",
"license": "apache-2.0",
"size": 52147
} | [
"android.support.annotation.NonNull",
"android.support.annotation.Nullable",
"com.google.blockly.android.control.BlocklyController",
"com.google.blockly.utils.BlockLoadingException",
"com.google.blockly.utils.ColorUtils",
"java.util.Collections",
"java.util.List"
] | import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.google.blockly.android.control.BlocklyController; import com.google.blockly.utils.BlockLoadingException; import com.google.blockly.utils.ColorUtils; import java.util.Collections; import java.util.List; | import android.support.annotation.*; import com.google.blockly.android.control.*; import com.google.blockly.utils.*; import java.util.*; | [
"android.support",
"com.google.blockly",
"java.util"
] | android.support; com.google.blockly; java.util; | 284,523 |
private ArrayList<Event> getUnsentEvents() {
Collection<Event> events = mDataHandler.getStore().getLatestUnsentEvents(mRoomId);
ArrayList<Event> eventsList = new ArrayList<Event>(events);
ArrayList<Event> unsentEvents = new ArrayList<Event>();
// check if some events are already se... | ArrayList<Event> function() { Collection<Event> events = mDataHandler.getStore().getLatestUnsentEvents(mRoomId); ArrayList<Event> eventsList = new ArrayList<Event>(events); ArrayList<Event> unsentEvents = new ArrayList<Event>(); for (Event event : eventsList) { if (event.mSentState == Event.SentState.WAITING_RETRY) { e... | /**
* Returns the unsent messages except the sending ones.
* @return the unsent messages list.
*/ | Returns the unsent messages except the sending ones | getUnsentEvents | {
"repo_name": "Nehasing/Nehachat",
"path": "matrix-sdk/src/main/java/org/matrix/androidsdk/data/Room.java",
"license": "apache-2.0",
"size": 57990
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.matrix.androidsdk.rest.model.Event"
] | import java.util.ArrayList; import java.util.Collection; import org.matrix.androidsdk.rest.model.Event; | import java.util.*; import org.matrix.androidsdk.rest.model.*; | [
"java.util",
"org.matrix.androidsdk"
] | java.util; org.matrix.androidsdk; | 211,105 |
// Generate a document with 100 lines and 1000 words per line
DocumentMock mock=new DocumentMock();
String[][] document=mock.generateDocument(100, 1000, "the");
// Create a DocumentTask
DocumentTask task=new DocumentTask(document, 0, 100, "the");
// Create a ForkJoinPool
ForkJoinPool pool=new Fork... | DocumentMock mock=new DocumentMock(); String[][] document=mock.generateDocument(100, 1000, "the"); DocumentTask task=new DocumentTask(document, 0, 100, "the"); ForkJoinPool pool=new ForkJoinPool(); pool.execute(task); do { System.out.printf(STR); System.out.printf(STR,pool.getParallelism()); System.out.printf(STR,pool.... | /**
* Main method of the class
*/ | Main method of the class | main | {
"repo_name": "xuelvming/Java7ConcurrencyCookbook",
"path": "7881_code/Chapter 5/ch5_recipe02/src/com/packtpub/java7/concurrency/chapter5/recipe02/core/Main.java",
"license": "mit",
"size": 1912
} | [
"com.packtpub.java7.concurrency.chapter5.recipe02.task.DocumentTask",
"com.packtpub.java7.concurrency.chapter5.recipe02.utils.DocumentMock",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.ForkJoinPool",
"java.util.concurrent.TimeUnit"
] | import com.packtpub.java7.concurrency.chapter5.recipe02.task.DocumentTask; import com.packtpub.java7.concurrency.chapter5.recipe02.utils.DocumentMock; import java.util.concurrent.ExecutionException; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.TimeUnit; | import com.packtpub.java7.concurrency.chapter5.recipe02.task.*; import com.packtpub.java7.concurrency.chapter5.recipe02.utils.*; import java.util.concurrent.*; | [
"com.packtpub.java7",
"java.util"
] | com.packtpub.java7; java.util; | 1,277,460 |
public List getDistancesMap(Group run, String year) {
List distances = null;
Collection type = new ArrayList();
type.add(IWMarathonConstants.GROUP_TYPE_RUN_DISTANCE);
if (run != null) {
Collection years = getYears(run, year);
if (years != null) {
Iterator yearsIter = years.iterator();
while (ye... | List function(Group run, String year) { List distances = null; Collection type = new ArrayList(); type.add(IWMarathonConstants.GROUP_TYPE_RUN_DISTANCE); if (run != null) { Collection years = getYears(run, year); if (years != null) { Iterator yearsIter = years.iterator(); while (yearsIter.hasNext()) { Group y = (Group) ... | /**
* Gets a Collection of distances for a specific run and year. Distances are
* groups with the group type "iwma_distance".
*
* @param Group
* run - the supersupergroup of the specific run
* @param year
* - the year of the run
* @return Collection of all distances for a specific... | Gets a Collection of distances for a specific run and year. Distances are groups with the group type "iwma_distance" | getDistancesMap | {
"repo_name": "idega/is.idega.idegaweb.marathon",
"path": "src/java/is/idega/idegaweb/marathon/business/RunBusinessBean.java",
"license": "gpl-3.0",
"size": 81199
} | [
"com.idega.user.data.Group",
"is.idega.idegaweb.marathon.util.IWMarathonConstants",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.Iterator",
"java.util.List"
] | import com.idega.user.data.Group; import is.idega.idegaweb.marathon.util.IWMarathonConstants; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; | import com.idega.user.data.*; import is.idega.idegaweb.marathon.util.*; import java.util.*; | [
"com.idega.user",
"is.idega.idegaweb",
"java.util"
] | com.idega.user; is.idega.idegaweb; java.util; | 1,928,941 |
public static void parseRequest(TermVectorsRequest termVectorsRequest, XContentParser parser) throws IOException {
XContentParser.Token token;
String currentFieldName = null;
List<String> fields = new ArrayList<>();
while ((token = parser.nextToken()) != XContentParser.Token.END_OBJE... | static void function(TermVectorsRequest termVectorsRequest, XContentParser parser) throws IOException { XContentParser.Token token; String currentFieldName = null; List<String> fields = new ArrayList<>(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_N... | /**
* populates a request object (pre-populated with defaults) based on a parser.
*/ | populates a request object (pre-populated with defaults) based on a parser | parseRequest | {
"repo_name": "camilojd/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java",
"license": "apache-2.0",
"size": 24370
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.ElasticsearchParseException",
"org.elasticsearch.common.xcontent.XContentParser",
"org.elasticsearch.index.VersionType"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.VersionType; | import java.io.*; import java.util.*; import org.elasticsearch.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.index.*; | [
"java.io",
"java.util",
"org.elasticsearch",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; java.util; org.elasticsearch; org.elasticsearch.common; org.elasticsearch.index; | 2,614,057 |
@FIXVersion(introduced="4.2")
@TagNumRef(tagNum=TagNum.TradSesReqID)
public void setTradSesReqID(String tradSesReqID) {
this.tradSesReqID = tradSesReqID;
} | @FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.TradSesReqID) void function(String tradSesReqID) { this.tradSesReqID = tradSesReqID; } | /**
* Message field setter.
* @param tradSesReqID field value
*/ | Message field setter | setTradSesReqID | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/TradingSessionStatusMsg.java",
"license": "gpl-3.0",
"size": 30000
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,701,152 |
String getDescription() throws PhpException;
| String getDescription() throws PhpException; | /**
* Returns the description.
* @return description.
* @throws PhpException thrown on execution errors.
*/ | Returns the description | getDescription | {
"repo_name": "php-maven/pear-java",
"path": "pear-java-api/src/main/java/org/phpmaven/pear/library/IPackage.java",
"license": "gpl-3.0",
"size": 5225
} | [
"org.phpmaven.phpexec.library.PhpException"
] | import org.phpmaven.phpexec.library.PhpException; | import org.phpmaven.phpexec.library.*; | [
"org.phpmaven.phpexec"
] | org.phpmaven.phpexec; | 563,770 |
public void putField(String key, Date value) {
this.fields.put(key, BoxDateFormat.format(value));
} | void function(String key, Date value) { this.fields.put(key, BoxDateFormat.format(value)); } | /**
* Adds or updates a multipart field in this request.
* @param key the field's key.
* @param value the field's value.
*/ | Adds or updates a multipart field in this request | putField | {
"repo_name": "glawson6/box-java-sdk",
"path": "src/main/java/com/box/sdk/BoxMultipartRequest.java",
"license": "apache-2.0",
"size": 6907
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,038,558 |
public void startDTD(XMLLocator locator, Augmentations augs) throws XNIException {
//Initialize stack
fOpStack = null;
fNodeIndexStack = null;
fPrevNodeIndexStack = null;
} // startDTD(XMLLocator) | void function(XMLLocator locator, Augmentations augs) throws XNIException { fOpStack = null; fNodeIndexStack = null; fPrevNodeIndexStack = null; } | /**
* The start of the DTD.
*
* @param locator The document locator, or null if the document
* location cannot be reported during the parsing of
* the document DTD. However, it is <em>strongly</em>
* recommended that a locator be supplied th... | The start of the DTD | startDTD | {
"repo_name": "openjdk/jdk8u",
"path": "jaxp/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java",
"license": "gpl-2.0",
"size": 106590
} | [
"com.sun.org.apache.xerces.internal.xni.Augmentations",
"com.sun.org.apache.xerces.internal.xni.XMLLocator",
"com.sun.org.apache.xerces.internal.xni.XNIException"
] | import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XMLLocator; import com.sun.org.apache.xerces.internal.xni.XNIException; | import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 1,513,710 |
@Override
public boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey) {
if (Bytes.compareTo(rangeStartKey, rangeEndKey) > 0) {
throw new IllegalArgumentException(
"Invalid range: " + Bytes.toStringBinary(rangeStartKey) +
" > " + Bytes.toStringBinary(rangeEndKey));
}
boolean... | boolean function(byte[] rangeStartKey, byte[] rangeEndKey) { if (Bytes.compareTo(rangeStartKey, rangeEndKey) > 0) { throw new IllegalArgumentException( STR + Bytes.toStringBinary(rangeStartKey) + STR + Bytes.toStringBinary(rangeEndKey)); } boolean firstKeyInRange = Bytes.compareTo(rangeStartKey, startKey) >= 0; boolean... | /**
* Returns true if the given inclusive range of rows is fully contained
* by this region. For example, if the region is foo,a,g and this is
* passed ["b","c"] or ["a","c"] it will return true, but if this is passed
* ["b","z"] it will return false.
* @throws IllegalArgumentException if the range passe... | Returns true if the given inclusive range of rows is fully contained by this region. For example, if the region is foo,a,g and this is passed ["b","c"] or ["a","c"] it will return true, but if this is passed ["b","z"] it will return false | containsRange | {
"repo_name": "HubSpot/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java",
"license": "apache-2.0",
"size": 37347
} | [
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,465,592 |
protected String selectEncoding(ServletRequest request) {
return (this.encoding);
} | String function(ServletRequest request) { return (this.encoding); } | /**
* Select an appropriate character encoding to be used, based on the
* characteristics of the current request and/or filter initialization
* parameters. If no character encoding should be set, return
* <code>null</code>.
* <p>
* The default implementation unconditionally returns the va... | Select an appropriate character encoding to be used, based on the characteristics of the current request and/or filter initialization parameters. If no character encoding should be set, return <code>null</code>. The default implementation unconditionally returns the value configured by the encoding initialization param... | selectEncoding | {
"repo_name": "elsiklab/intermine",
"path": "intermine/web/main/src/org/intermine/web/filters/SetCharacterEncodingFilter.java",
"license": "lgpl-2.1",
"size": 6231
} | [
"javax.servlet.ServletRequest"
] | import javax.servlet.ServletRequest; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 2,647,459 |
private StepMeta addSlaveCopy(TransMeta transMeta, StepMeta stepMeta, SlaveServer slaveServer) {
StepMeta copy = (StepMeta) stepMeta.clone();
if (copy.isPartitioned()) {
StepPartitioningMeta stepPartitioningMeta = copy.getStepPartitioningMeta();
PartitionSchema partitionSchema = stepPartitioningMeta.getPa... | StepMeta function(TransMeta transMeta, StepMeta stepMeta, SlaveServer slaveServer) { StepMeta copy = (StepMeta) stepMeta.clone(); if (copy.isPartitioned()) { StepPartitioningMeta stepPartitioningMeta = copy.getStepPartitioningMeta(); PartitionSchema partitionSchema = stepPartitioningMeta.getPartitionSchema(); String sl... | /**
* Create a copy of a step from the original transformation for use in the a slave transformation.
* If the step is partitioned, the partitioning will be changed to "schemaName (slave)"
*
* @param stepMeta The step to copy / clone.
* @return a copy of the specified step for use in a slave ... | Create a copy of a step from the original transformation for use in the a slave transformation. If the step is partitioned, the partitioning will be changed to "schemaName (slave)" | addSlaveCopy | {
"repo_name": "icholy/geokettle-2.0",
"path": "src/org/pentaho/di/trans/cluster/TransSplitter.java",
"license": "lgpl-2.1",
"size": 84736
} | [
"org.pentaho.di.cluster.SlaveServer",
"org.pentaho.di.partition.PartitionSchema",
"org.pentaho.di.trans.TransMeta",
"org.pentaho.di.trans.step.StepMeta",
"org.pentaho.di.trans.step.StepPartitioningMeta"
] | import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.partition.PartitionSchema; import org.pentaho.di.trans.TransMeta; import org.pentaho.di.trans.step.StepMeta; import org.pentaho.di.trans.step.StepPartitioningMeta; | import org.pentaho.di.cluster.*; import org.pentaho.di.partition.*; import org.pentaho.di.trans.*; import org.pentaho.di.trans.step.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 698,174 |
public Date getDate() {
return new Date(time);
} | Date function() { return new Date(time); } | /**
* Get the current time of this <code>CalendarAstronomer</code> object,
* represented as a <code>Date</code> object.
*
* @see #setDate
* @see #getTime
* @hide draft / provisional / internal are hidden on Android
*/ | Get the current time of this <code>CalendarAstronomer</code> object, represented as a <code>Date</code> object | getDate | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CalendarAstronomer.java",
"license": "apache-2.0",
"size": 65781
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 281,128 |
public void delete() throws NitrapiException {
api.dataDelete("services/" + getId(), null);
} | void function() throws NitrapiException { api.dataDelete(STR + getId(), null); } | /**
* Deletes the service.
* You only can delete the service if it's suspended otherwise an error will be thrown.
*/ | Deletes the service. You only can delete the service if it's suspended otherwise an error will be thrown | delete | {
"repo_name": "nitrado/Nitrapi-Java",
"path": "src/main/java/net/nitrado/api/services/Service.java",
"license": "mit",
"size": 9027
} | [
"net.nitrado.api.common.exceptions.NitrapiException"
] | import net.nitrado.api.common.exceptions.NitrapiException; | import net.nitrado.api.common.exceptions.*; | [
"net.nitrado.api"
] | net.nitrado.api; | 1,585,093 |
public List<StreamletImpl<?>> getChildren() {
return children;
} | List<StreamletImpl<?>> function() { return children; } | /**
* Gets all the children of this streamlet.
* Children of a streamlet are streamlets that are resulting from transformations of elements of
* this and potentially other streamlets.
* @return The kid streamlets
*/ | Gets all the children of this streamlet. Children of a streamlet are streamlets that are resulting from transformations of elements of this and potentially other streamlets | getChildren | {
"repo_name": "mycFelix/heron",
"path": "heron/api/src/java/org/apache/heron/streamlet/impl/StreamletImpl.java",
"license": "apache-2.0",
"size": 29993
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 989,283 |
void deleteInRDT_POS(final byte [] rowKey, final byte [][] ids, final long value) throws DataAccessLayerException {
final Composite os_col = new Composite();
os_col.addComponent(value, LONG_SERIALIZER);
os_col.addComponent(ids[0], BYTE_SERIALIZER);
_mutators.get().addDeletion(rowKey, RDT_PO_S, os_col, COMPOS... | void deleteInRDT_POS(final byte [] rowKey, final byte [][] ids, final long value) throws DataAccessLayerException { final Composite os_col = new Composite(); os_col.addComponent(value, LONG_SERIALIZER); os_col.addComponent(ids[0], BYTE_SERIALIZER); _mutators.get().addDeletion(rowKey, RDT_PO_S, os_col, COMPOSITE_SERIALI... | /**
* Deletes a value in RDT_POS index.
*
* @param rowKey the row key.
* @param value the value.
* @param ids the triple identifiers.
* @throws DataAccessLayerException in case of data access failure.
*/ | Deletes a value in RDT_POS index | deleteInRDT_POS | {
"repo_name": "agazzarini/cumulusrdf",
"path": "cumulusrdf-pluggable-storage/cumulusrdf-pluggable-storage-cassandra12x-hector-full-tp-index/src/main/java/edu/kit/aifb/cumulus/datasource/impl/Cassandra12xTripleIndexDAO.java",
"license": "apache-2.0",
"size": 43341
} | [
"edu.kit.aifb.cumulus.framework.datasource.DataAccessLayerException",
"me.prettyprint.hector.api.beans.Composite"
] | import edu.kit.aifb.cumulus.framework.datasource.DataAccessLayerException; import me.prettyprint.hector.api.beans.Composite; | import edu.kit.aifb.cumulus.framework.datasource.*; import me.prettyprint.hector.api.beans.*; | [
"edu.kit.aifb",
"me.prettyprint.hector"
] | edu.kit.aifb; me.prettyprint.hector; | 1,389,179 |
public static void formatCalendar(Calendar calendar) {
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
} | static void function(Calendar calendar) { calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); } | /**
* Format calendar at begin of the day
*
* @param calendar
*/ | Format calendar at begin of the day | formatCalendar | {
"repo_name": "zhiaixinyang/LightThink",
"path": "greatbook/src/main/java/com/example/greatbook/utils/DateUtils.java",
"license": "apache-2.0",
"size": 22933
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 912,964 |
public T caseValueSpecification(ValueSpecification object) {
return null;
} | T function(ValueSpecification object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Value Specification</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
... | Returns the result of interpreting the object as an instance of 'Value Specification'. This implementation returns null; returning a non-null result will terminate the switch. | caseValueSpecification | {
"repo_name": "mjorod/textram",
"path": "tool/ca.mcgill.sel.ram/src/ca/mcgill/cs/sel/ram/util/RamSwitch.java",
"license": "mit",
"size": 90316
} | [
"ca.mcgill.cs.sel.ram.ValueSpecification"
] | import ca.mcgill.cs.sel.ram.ValueSpecification; | import ca.mcgill.cs.sel.ram.*; | [
"ca.mcgill.cs"
] | ca.mcgill.cs; | 1,987,243 |
public Timestamp getLastUpdate() {
return (Timestamp) getValue(6);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
/**
* {@inheritDoc} | Timestamp function() { return (Timestamp) getValue(6); } /** * {@inheritDoc} | /**
* Getter for <code>sakila.payment.last_update</code>.
*/ | Getter for <code>sakila.payment.last_update</code> | getLastUpdate | {
"repo_name": "bjansen/ceylon-jooq-example",
"path": "gen-source/gen/example/jooq/tables/records/PaymentRecord.java",
"license": "mit",
"size": 6958
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,042,133 |
public Collection<ConceptName> getShortNames() {
Vector<ConceptName> shortNames = new Vector<ConceptName>();
if (getNames().size() == 0) {
if (log.isDebugEnabled()) {
log.debug("The Concept with id: " + conceptId + " has no names");
}
} else {
for (ConceptName name : getNames()) {
if (name.isS... | Collection<ConceptName> function() { Vector<ConceptName> shortNames = new Vector<ConceptName>(); if (getNames().size() == 0) { if (log.isDebugEnabled()) { log.debug(STR + conceptId + STR); } } else { for (ConceptName name : getNames()) { if (name.isShort()) { shortNames.add(name); } } } return shortNames; } | /**
* Gets a collection of short names for this concept from all locales.
*
* @return a collection of all short names for this concept
*/ | Gets a collection of short names for this concept from all locales | getShortNames | {
"repo_name": "jembi/openmrs-core",
"path": "api/src/main/java/org/openmrs/Concept.java",
"license": "mpl-2.0",
"size": 56456
} | [
"java.util.Collection",
"java.util.Vector"
] | import java.util.Collection; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,674,978 |
Map<String, Object> getDocumentData(String name, Map<String, Object> parameters)
throws EXistException, PermissionDeniedException; | Map<String, Object> getDocumentData(String name, Map<String, Object> parameters) throws EXistException, PermissionDeniedException; | /**
* Retrieve the specified document, but limit the number of bytes
* transmitted to avoid memory shortage on the server.
*
* @param name
* @param parameters
* @return
* @throws EXistException
* @throws PermissionDeniedException
*/ | Retrieve the specified document, but limit the number of bytes transmitted to avoid memory shortage on the server | getDocumentData | {
"repo_name": "olvidalo/exist",
"path": "exist-core/src/main/java/org/exist/xmlrpc/RpcAPI.java",
"license": "lgpl-2.1",
"size": 39990
} | [
"java.util.Map",
"org.exist.EXistException",
"org.exist.security.PermissionDeniedException"
] | import java.util.Map; import org.exist.EXistException; import org.exist.security.PermissionDeniedException; | import java.util.*; import org.exist.*; import org.exist.security.*; | [
"java.util",
"org.exist",
"org.exist.security"
] | java.util; org.exist; org.exist.security; | 1,965,550 |
@JsonProperty("expectedBuildNumber")
public Integer getExpectedBuildNumber() {
return expectedBuildNumber;
} | @JsonProperty(STR) Integer function() { return expectedBuildNumber; } | /**
* Get expectedBuildNumber
* @return expectedBuildNumber
**/ | Get expectedBuildNumber | getExpectedBuildNumber | {
"repo_name": "cliffano/swaggy-jenkins",
"path": "clients/jaxrs-cxf-client/generated/src/gen/java/org/openapitools/model/QueueItemImpl.java",
"license": "mit",
"size": 3126
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 2,849,181 |
public int getState() {
if (VDBG) log("getState()");
if (mService != null) {
try {
return mService.getState();
} catch (RemoteException e) {Log.e(TAG, e.toString());}
} else {
Log.w(TAG, "Proxy not attached to service");
if (DBG... | int function() { if (VDBG) log(STR); if (mService != null) { try { return mService.getState(); } catch (RemoteException e) {Log.e(TAG, e.toString());} } else { Log.w(TAG, STR); if (DBG) log(Log.getStackTraceString(new Throwable())); } return BluetoothPbap.STATE_ERROR; } | /**
* Get the current state of the BluetoothPbap service.
* @return One of the STATE_ return codes, or STATE_ERROR if this proxy
* object is currently not connected to the Pbap service.
*/ | Get the current state of the BluetoothPbap service | getState | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/frameworks-ext/base/core/java/android/bluetooth/BluetoothPbap.java",
"license": "gpl-2.0",
"size": 13310
} | [
"android.os.RemoteException",
"android.util.Log"
] | import android.os.RemoteException; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 509,060 |
@Override
public Collection<String> getEventNames() {
return EVENT_NAMES;
} | Collection<String> function() { return EVENT_NAMES; } | /**
* Management of events
*
* @return
*/ | Management of events | getEventNames | {
"repo_name": "chongma/BootsFaces-OSP",
"path": "src/main/java/net/bootsfaces/component/tree/Tree.java",
"license": "apache-2.0",
"size": 3515
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,539,367 |
public boolean supportsTransactionIsolationLevel(
int level) throws SQLException {
return level == Connection.TRANSACTION_READ_UNCOMMITTED
|| level == Connection.TRANSACTION_READ_COMMITTED
|| level == Connection.TRANSACTION_REPEATABLE_READ
|| le... | boolean function( int level) throws SQLException { return level == Connection.TRANSACTION_READ_UNCOMMITTED level == Connection.TRANSACTION_READ_COMMITTED level == Connection.TRANSACTION_REPEATABLE_READ level == Connection.TRANSACTION_SERIALIZABLE; } | /**
* Retrieves whether this database supports the given transaction isolation level.
*
* <!-- start release-specific documentation -->
* <div class="ReleaseSpecificDocumentation">
* <h3>HSQLDB-Specific Information</h3>
* HSQLDB supports all levels.
* </div>
* <!-- end release-sp... | Retrieves whether this database supports the given transaction isolation level. HSQLDB-Specific Information HSQLDB supports all levels. | supportsTransactionIsolationLevel | {
"repo_name": "ThangBK2009/android-source-browsing.platform--external--hsqldb",
"path": "src/org/hsqldb/jdbc/JDBCDatabaseMetaData.java",
"license": "bsd-3-clause",
"size": 263631
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 765,527 |
private void handleMirrorOutError(IOException ioe) throws IOException {
String bpid = block.getBlockPoolId();
LOG.info(datanode.getDNRegistrationForBP(bpid)
+ ":Exception writing " + block + " to mirror " + mirrorAddr, ioe);
if (Thread.interrupted()) { // shut down if the thread is interrupted
... | void function(IOException ioe) throws IOException { String bpid = block.getBlockPoolId(); LOG.info(datanode.getDNRegistrationForBP(bpid) + STR + block + STR + mirrorAddr, ioe); if (Thread.interrupted()) { throw ioe; } else { mirrorError = true; } } | /**
* While writing to mirrorOut, failure to write to mirror should not
* affect this datanode unless it is caused by interruption.
*/ | While writing to mirrorOut, failure to write to mirror should not affect this datanode unless it is caused by interruption | handleMirrorOutError | {
"repo_name": "mapr/hadoop-common",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java",
"license": "apache-2.0",
"size": 68361
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,517,748 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.