method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public User getUser(String login){
User user = null;
try {
Statement stat = conn.createStatement();
ResultSet result = stat.executeQuery("SELECT * FROM users where login='"+login+"'");
String password;
if(result.next()) {
user = new User(login =... | User function(String login){ User user = null; try { Statement stat = conn.createStatement(); ResultSet result = stat.executeQuery(STR+login+"'"); String password; if(result.next()) { user = new User(login = result.getString("login"), password = result.getString(STR)); } stat.close(); } catch (SQLException e) { e.print... | /**
* Get specific user by id
* @param userID user id
* @return User
*/ | Get specific user by id | getUser | {
"repo_name": "puhw-dev/Monitor",
"path": "src/monitor/DataBase.java",
"license": "gpl-3.0",
"size": 16079
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,233,385 |
@Override
protected AbstractActor doGenerate() {
System.out.println("Generating filter flow automatically...");
// 1. Read file
// TODO Extend to other types of files
SpreadSheet sheet = m_CsvReader.read(m_TrainingFile);
// Converting to Weka format to use Weka methods
SpreadSheetTo... | AbstractActor function() { System.out.println(STR); SpreadSheet sheet = m_CsvReader.read(m_TrainingFile); SpreadSheetToWekaInstances m_Conversion = new SpreadSheetToWekaInstances(); m_Conversion.setInput(sheet); try { String out = m_Conversion.convert(); } catch (Exception e) { e.printStackTrace(); return null; } Insta... | /**
* Generates the actor.
*
* @return the generated actor
*/ | Generates the actor | doGenerate | {
"repo_name": "DraXus/adams",
"path": "adams-manuel/src/main/java/adams/flow/template/MyTransformer.java",
"license": "gpl-3.0",
"size": 12749
} | [
"java.util.Arrays",
"java.util.List"
] | import java.util.Arrays; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,742,954 |
@Override
public String getText(Object object) {
ActuateType labelValue = ((TimeCalendarPropertyType)object).getActuate();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
getString("_UI_TimeCalendarPropertyType_type") :
getString("_UI_TimeC... | String function(Object object) { ActuateType labelValue = ((TimeCalendarPropertyType)object).getActuate(); String label = labelValue == null ? null : labelValue.toString(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/TimeCalendarPropertyTypeItemProvider.java",
"license": "apache-2.0",
"size": 12297
} | [
"net.opengis.gml.TimeCalendarPropertyType",
"org.w3._1999.xlink.ActuateType"
] | import net.opengis.gml.TimeCalendarPropertyType; import org.w3._1999.xlink.ActuateType; | import net.opengis.gml.*; import org.w3.*; | [
"net.opengis.gml",
"org.w3"
] | net.opengis.gml; org.w3; | 1,666,213 |
final public boolean isVisible() {
return isAdded() && !isHidden() && mView != null
&& mView.getWindowToken() != null && mView.getVisibility() == View.VISIBLE;
} | final boolean function() { return isAdded() && !isHidden() && mView != null && mView.getWindowToken() != null && mView.getVisibility() == View.VISIBLE; } | /**
* Return true if the fragment is currently visible to the user. This means
* it: (1) has been added, (2) has its view attached to the window, and
* (3) is not hidden.
*/ | Return true if the fragment is currently visible to the user. This means it: (1) has been added, (2) has its view attached to the window, and (3) is not hidden | isVisible | {
"repo_name": "ycdev-aosp/sdk-support",
"path": "v4/src/java/android/support/v4/app/Fragment.java",
"license": "apache-2.0",
"size": 78335
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,783,406 |
PointCloudData orbitData = new PointCloudData();
BufferedReader br = new BufferedReader(new InputStreamReader(data));
String line;
Timestamp last = new Timestamp(0);
while ((line = br.readLine()) != null) {
if (!line.isEmpty() && !line.startsWith("#")) {
// ... | PointCloudData orbitData = new PointCloudData(); BufferedReader br = new BufferedReader(new InputStreamReader(data)); String line; Timestamp last = new Timestamp(0); while ((line = br.readLine()) != null) { if (!line.isEmpty() && !line.startsWith("#")) { String[] tokens = line.split("\\s+"); if (tokens.length >= 4) { T... | /**
* Loads the data in the input stream into an OrbitData object.
* @param data
* @throws Exception
*/ | Loads the data in the input stream into an OrbitData object | load | {
"repo_name": "ari-zah/gaiasky",
"path": "core/src/gaia/cu9/ari/gaiaorbit/data/orbit/FileDataLoader.java",
"license": "lgpl-3.0",
"size": 2422
} | [
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.sql.Timestamp"
] | import java.io.BufferedReader; import java.io.InputStreamReader; import java.sql.Timestamp; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 183,973 |
GetAdjacentIds getAdjacentIds(); | GetAdjacentIds getAdjacentIds(); | /**
* Generates an example for the {@link GetAdjacentIds} operation.
*
* @return the example class for GetAdjacentIds
*/ | Generates an example for the <code>GetAdjacentIds</code> operation | getAdjacentIds | {
"repo_name": "GovernmentCommunicationsHeadquarters/Gaffer",
"path": "rest-api/core-rest/src/main/java/uk/gov/gchq/gaffer/rest/service/v2/example/ExamplesFactory.java",
"license": "apache-2.0",
"size": 4243
} | [
"uk.gov.gchq.gaffer.operation.impl.get.GetAdjacentIds"
] | import uk.gov.gchq.gaffer.operation.impl.get.GetAdjacentIds; | import uk.gov.gchq.gaffer.operation.impl.get.*; | [
"uk.gov.gchq"
] | uk.gov.gchq; | 922,617 |
public Either<HttpFailure,PutObjectResult> putObject(final String bucketName,
final boolean rrs,
final ContentType type,
final InputStream input,
... | Either<HttpFailure,PutObjectResult> function(final String bucketName, final boolean rrs, final ContentType type, final InputStream input, final long contentLength, final String... path); | /**
* Put an object into a bucket.
* @param bucketName the name of the bucket
* @param type the {@link ContentType} of the object *
* @param rrs set to true to suggest the storage engine use
* reduced redundancy storage mode. Set to false to use a standard
* storage mode
* @param path path are joined ... | Put an object into a bucket | putObject | {
"repo_name": "markkolich/kolich-aws",
"path": "src/main/java/com/kolich/aws/services/s3/S3Client.java",
"license": "mit",
"size": 7645
} | [
"com.amazonaws.services.s3.model.PutObjectResult",
"com.kolich.common.functional.either.Either",
"com.kolich.http.common.response.HttpFailure",
"java.io.InputStream",
"org.apache.http.entity.ContentType"
] | import com.amazonaws.services.s3.model.PutObjectResult; import com.kolich.common.functional.either.Either; import com.kolich.http.common.response.HttpFailure; import java.io.InputStream; import org.apache.http.entity.ContentType; | import com.amazonaws.services.s3.model.*; import com.kolich.common.functional.either.*; import com.kolich.http.common.response.*; import java.io.*; import org.apache.http.entity.*; | [
"com.amazonaws.services",
"com.kolich.common",
"com.kolich.http",
"java.io",
"org.apache.http"
] | com.amazonaws.services; com.kolich.common; com.kolich.http; java.io; org.apache.http; | 2,846,719 |
@Override
public void clear() {
for(Position<T> position : positions())
treeNode(position).delete();
size = 0;
} | void function() { for(Position<T> position : positions()) treeNode(position).delete(); size = 0; } | /**
* Empty the tree
*/ | Empty the tree | clear | {
"repo_name": "pdoro/data-structures-and-algorithms",
"path": "src/main/java/com/pdomingo/data_structures/implementations/tree/LinkedTree.java",
"license": "mit",
"size": 5264
} | [
"com.pdomingo.data_structures.interfaces.Position"
] | import com.pdomingo.data_structures.interfaces.Position; | import com.pdomingo.data_structures.interfaces.*; | [
"com.pdomingo.data_structures"
] | com.pdomingo.data_structures; | 748,497 |
public void setMaximumRequestsPerPeriodExpression(Expression maxRequestsPerPeriodExpression) {
this.maxRequestsPerPeriodExpression = maxRequestsPerPeriodExpression;
} | void function(Expression maxRequestsPerPeriodExpression) { this.maxRequestsPerPeriodExpression = maxRequestsPerPeriodExpression; } | /**
* Sets the maximum number of requests per time period expression
*/ | Sets the maximum number of requests per time period expression | setMaximumRequestsPerPeriodExpression | {
"repo_name": "pax95/camel",
"path": "core/camel-core-processor/src/main/java/org/apache/camel/processor/Throttler.java",
"license": "apache-2.0",
"size": 19762
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,853,072 |
public TypeId getTypeId() throws StandardException
{
DataTypeDescriptor dtd = getTypeServices();
if (dtd != null)
return dtd.getTypeId();
return null;
} | TypeId function() throws StandardException { DataTypeDescriptor dtd = getTypeServices(); if (dtd != null) return dtd.getTypeId(); return null; } | /**
* Get the TypeId from this ValueNode.
*
* @return The TypeId from this ValueNode. This
* may be null if the node isn't bound yet.
*/ | Get the TypeId from this ValueNode | getTypeId | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java",
"license": "apache-2.0",
"size": 43555
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.types.DataTypeDescriptor",
"org.apache.derby.iapi.types.TypeId"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.types.DataTypeDescriptor; import org.apache.derby.iapi.types.TypeId; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.types.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,179,462 |
public void setDate(String date)
{
dictionary.setString(COSName.DATE, date);
} | void function(String date) { dictionary.setString(COSName.DATE, date); } | /**
* The build date of the software module. This string is normally produced by the
* compiler under C++.
*
* @param date is the build date of the software module
*/ | The build date of the software module. This string is normally produced by the compiler under C++ | setDate | {
"repo_name": "ZhenyaM/veraPDF-pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDPropBuildDataDict.java",
"license": "apache-2.0",
"size": 7038
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 735,091 |
public void testWhenProjectWithNoParamsDefinedThenRebuildofBuildWithParamsShouldShowParams()
throws Exception {
FreeStyleProject project = createFreeStyleProject();
// Build (#1)
project.scheduleBuild2(0, new Cause.UserIdCause(),
new ParametersAction(new StringParameterValue("name", "ABC")))
.get()... | void function() throws Exception { FreeStyleProject project = createFreeStyleProject(); project.scheduleBuild2(0, new Cause.UserIdCause(), new ParametersAction(new StringParameterValue("name", "ABC"))) .get(); HtmlPage rebuildConfigPage = createWebClient().getPage(project, STR); WebAssert.assertElementPresentByXPath(re... | /**
* Creates a new freestyle project and builds the project with a string
* parameter. If the build is succesful, a rebuild of the last build is
* done. The rebuild on the project level should point to the last build
*
* @throws Exception
* Exception
*/ | Creates a new freestyle project and builds the project with a string parameter. If the build is succesful, a rebuild of the last build is done. The rebuild on the project level should point to the last build | testWhenProjectWithNoParamsDefinedThenRebuildofBuildWithParamsShouldShowParams | {
"repo_name": "rashmikanta-1984/rebuild-plugin",
"path": "src/test/java/com/sonyericsson/rebuild/RebuildValidatorTest.java",
"license": "mit",
"size": 16345
} | [
"com.gargoylesoftware.htmlunit.WebAssert",
"com.gargoylesoftware.htmlunit.html.HtmlPage",
"hudson.model.Cause",
"hudson.model.FreeStyleProject",
"hudson.model.ParametersAction",
"hudson.model.StringParameterValue"
] | import com.gargoylesoftware.htmlunit.WebAssert; import com.gargoylesoftware.htmlunit.html.HtmlPage; import hudson.model.Cause; import hudson.model.FreeStyleProject; import hudson.model.ParametersAction; import hudson.model.StringParameterValue; | import com.gargoylesoftware.htmlunit.*; import com.gargoylesoftware.htmlunit.html.*; import hudson.model.*; | [
"com.gargoylesoftware.htmlunit",
"hudson.model"
] | com.gargoylesoftware.htmlunit; hudson.model; | 219,224 |
private static byte[] generateMultipartBoundary() {
final Random rand = new Random();
final byte[] bytes = new byte[rand.nextInt(11) + 30]; // a random size from 30 to 40 // NOSONAR ignore magic numbers.
for (int i = 0; i < bytes.length; i++) {
bytes[i] = MULTIPART_CHARS[rand.nex... | static byte[] function() { final Random rand = new Random(); final byte[] bytes = new byte[rand.nextInt(11) + 30]; for (int i = 0; i < bytes.length; i++) { bytes[i] = MULTIPART_CHARS[rand.nextInt(MULTIPART_CHARS.length)]; } return bytes; } private final Part[] parts; private byte[] multipartBoundary; private final Http... | /**
* Generates a random multipart boundary string.
*/ | Generates a random multipart boundary string | generateMultipartBoundary | {
"repo_name": "haku/Onosendai",
"path": "src/main/java/local/apache/MultipartEntity.java",
"license": "apache-2.0",
"size": 8307
} | [
"java.util.Arrays",
"java.util.Random",
"org.apache.http.params.HttpParams"
] | import java.util.Arrays; import java.util.Random; import org.apache.http.params.HttpParams; | import java.util.*; import org.apache.http.params.*; | [
"java.util",
"org.apache.http"
] | java.util; org.apache.http; | 1,806,381 |
public CbState getState(final int pIdx)
{
return CbState.fromKey(getStatesJs().charAt(pIdx));
} | CbState function(final int pIdx) { return CbState.fromKey(getStatesJs().charAt(pIdx)); } | /**
* Read a card state.
* @param pIdx index into the card state array
* @return state
*/ | Read a card state | getState | {
"repo_name": "Toadwana/civbuddy",
"path": "src/com/tj/civ/client/model/jso/CbSituationJSO.java",
"license": "gpl-3.0",
"size": 4472
} | [
"com.tj.civ.client.model.CbState"
] | import com.tj.civ.client.model.CbState; | import com.tj.civ.client.model.*; | [
"com.tj.civ"
] | com.tj.civ; | 1,263,445 |
private void showOrHideAnswerField()
{
Log.i(TAG, "showOrHideAnswerField - writeAnswers: " + writeAnswers);
if (!writeAnswers)
{
mAnswerField.setVisibility(View.GONE);
} else
{
mAnswerField.setVisibility(View.VISIBLE);
}
} | void function() { Log.i(TAG, STR + writeAnswers); if (!writeAnswers) { mAnswerField.setVisibility(View.GONE); } else { mAnswerField.setVisibility(View.VISIBLE); } } | /**
* Depending on preferences, show or hide the answer field.
*/ | Depending on preferences, show or hide the answer field | showOrHideAnswerField | {
"repo_name": "makiaea/Anki-Android",
"path": "src/com/ichi2/anki/AnkiDroid.java",
"license": "gpl-3.0",
"size": 42565
} | [
"android.util.Log",
"android.view.View"
] | import android.util.Log; import android.view.View; | import android.util.*; import android.view.*; | [
"android.util",
"android.view"
] | android.util; android.view; | 1,796,430 |
public static Test suite() {
return new TestSuite(ConvertUtilsTestCase.class);
} | static Test function() { return new TestSuite(ConvertUtilsTestCase.class); } | /**
* Creates the tests included in this test suite.
*/ | Creates the tests included in this test suite | suite | {
"repo_name": "apache/commons-beanutils",
"path": "src/test/java/org/apache/commons/beanutils2/ConvertUtilsTestCase.java",
"license": "apache-2.0",
"size": 25753
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,017,218 |
public B opt(@Nonnull final String key, @Nonnull final String value) {
mandatoryKeys.remove(key);
options.set(key, value);
return getThisBuilder();
} | B function(@Nonnull final String key, @Nonnull final String value) { mandatoryKeys.remove(key); options.set(key, value); return getThisBuilder(); } | /**
* Set optional Builder parameter.
*/ | Set optional Builder parameter | opt | {
"repo_name": "xiao-chen/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSDataOutputStreamBuilder.java",
"license": "apache-2.0",
"size": 11583
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,505,574 |
public static ims.core.clinical.domain.objects.SuppNetworkServiceProfessionDetail extractSuppNetworkServiceProfessionDetail(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.SuppNetworkServiceProfessionDetailVo valueObject)
{
return extractSuppNetworkServiceProfessionDetail(domainFactory, valueO... | static ims.core.clinical.domain.objects.SuppNetworkServiceProfessionDetail function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.SuppNetworkServiceProfessionDetailVo valueObject) { return extractSuppNetworkServiceProfessionDetail(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractSuppNetworkServiceProfessionDetail | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/SuppNetworkServiceProfessionDetailVoAssembler.java",
"license": "agpl-3.0",
"size": 20869
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,517,219 |
@Override
public void trace(final String message, final Object... params)
{
log(Level.FINER, message, params);
} | void function(final String message, final Object... params) { log(Level.FINER, message, params); } | /**
* Logs a message with parameters at the TRACE level.
*
* @param message the message to log; the format depends on the message factory.
* @param params parameters to the message.
*/ | Logs a message with parameters at the TRACE level | trace | {
"repo_name": "apache/commons-jcs",
"path": "commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/JulLogAdapter.java",
"license": "apache-2.0",
"size": 16168
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 177,948 |
protected void paintGutterText(Graphics gfx, int line, int x) {
String text = ta.getGutterText(line);
if (text == null) {
return;
}
gfx.setFont(getFont());
Color textColor = ta.getGutterTextColor(line);
if (textColor == null) {
gfx.setColor(getForeground());
} else {
gfx... | void function(Graphics gfx, int line, int x) { String text = ta.getGutterText(line); if (text == null) { return; } gfx.setFont(getFont()); Color textColor = ta.getGutterTextColor(line); if (textColor == null) { gfx.setColor(getForeground()); } else { gfx.setColor(textColor); } int y = ta.lineToY(line) + fm.getHeight();... | /**
* Paint the gutter text.
*
* @param gfx
* the graphics context
* @param line
* 0-based line number
* @param x
* horizontal position
*/ | Paint the gutter text | paintGutterText | {
"repo_name": "phiLangley/openPHD",
"path": "[CODE]/processing/modes/ExperimentalMode/src/processing/mode/experimental/TextAreaPainter.java",
"license": "gpl-2.0",
"size": 14768
} | [
"java.awt.Color",
"java.awt.Graphics",
"javax.swing.text.Segment",
"javax.swing.text.Utilities"
] | import java.awt.Color; import java.awt.Graphics; import javax.swing.text.Segment; import javax.swing.text.Utilities; | import java.awt.*; import javax.swing.text.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,228,200 |
public boolean hasEntityPermission(String entity, String action, GenericValue userLogin); | boolean function(String entity, String action, GenericValue userLogin); | /**
* Like hasPermission above, except it has functionality specific to Entity permissions. Checks the entity for the
* specified action, as well as for "_ADMIN" to allow for simplified general administration permission.
*
* @param entity The name of the Entity corresponding to the desired permissio... | Like hasPermission above, except it has functionality specific to Entity permissions. Checks the entity for the specified action, as well as for "_ADMIN" to allow for simplified general administration permission | hasEntityPermission | {
"repo_name": "ofbizfriends/vogue",
"path": "framework/security/src/org/ofbiz/security/Security.java",
"license": "apache-2.0",
"size": 9368
} | [
"org.ofbiz.entity.GenericValue"
] | import org.ofbiz.entity.GenericValue; | import org.ofbiz.entity.*; | [
"org.ofbiz.entity"
] | org.ofbiz.entity; | 996,941 |
void returnSession(SparkSession sparkSession) throws HiveException; | void returnSession(SparkSession sparkSession) throws HiveException; | /**
* Return the given <i>sparkSession</i> to pool. This is used when the client
* still holds references to session and may want to reuse it in future.
* When client wants to reuse the session, it should pass the it <i>getSession</i> method.
*/ | Return the given sparkSession to pool. This is used when the client still holds references to session and may want to reuse it in future. When client wants to reuse the session, it should pass the it getSession method | returnSession | {
"repo_name": "wisgood/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/spark/session/SparkSessionManager.java",
"license": "apache-2.0",
"size": 2479
} | [
"org.apache.hadoop.hive.ql.metadata.HiveException"
] | import org.apache.hadoop.hive.ql.metadata.HiveException; | import org.apache.hadoop.hive.ql.metadata.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,487,177 |
public List<Embeddable1> getEmbeddableList1() {
return embeddableList1;
}
| List<Embeddable1> function() { return embeddableList1; } | /**
* Accessor method.
*
* @return the addresses
*/ | Accessor method | getEmbeddableList1 | {
"repo_name": "ermanno-pirotta/playground",
"path": "hibernate.composition/src/main/java/com/piro84/model1/Entity1.java",
"license": "lgpl-3.0",
"size": 7140
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 437,433 |
protected void invalidate(XmldbURI collectionPath) {
//TODO : use XmldbURI.resolve !
// if (!collectionPath.startsWith(XmldbURI.CONFIG_COLLECTION_URI))
// return;
// collectionPath = collectionPath.trimFromBeginning(XmldbURI.CONFIG_COLLECTION_URI);
// CollectionCache collectionCache = pool.g... | void function(XmldbURI collectionPath) { } | /**
* Called by the collection cache if a collection is removed from the cache.
* This will delete the cached configuration instance for this collection.
*
* @param collectionPath
*/ | Called by the collection cache if a collection is removed from the cache. This will delete the cached configuration instance for this collection | invalidate | {
"repo_name": "NCIP/cadsr-cgmdr-nci-uk",
"path": "src/org/exist/collections/CollectionConfigurationManager.java",
"license": "bsd-3-clause",
"size": 18753
} | [
"org.exist.xmldb.XmldbURI"
] | import org.exist.xmldb.XmldbURI; | import org.exist.xmldb.*; | [
"org.exist.xmldb"
] | org.exist.xmldb; | 1,061,795 |
public interface QueryExecuteListener extends EventListener {
public void queryExecuted(QueryExecuteEvent evt); | interface QueryExecuteListener extends EventListener { public void function(QueryExecuteEvent evt); | /**
* This method gets called when a query has been executed.
*
* @param evt the event
*/ | This method gets called when a query has been executed | queryExecuted | {
"repo_name": "williamClanton/singularity",
"path": "weka/src/main/java/weka/gui/sql/event/QueryExecuteListener.java",
"license": "mit",
"size": 1272
} | [
"java.util.EventListener"
] | import java.util.EventListener; | import java.util.*; | [
"java.util"
] | java.util; | 2,140,056 |
@Override
public void respond(HttpServletRequest httpRequest, HttpServletResponse httpResponse) {
LOGGER.info("Responding to the change password request.");
super
.respond(
httpRequest,
httpResponse,
"hashed_password",
hashedPassword);
} | void function(HttpServletRequest httpRequest, HttpServletResponse httpResponse) { LOGGER.info(STR); super .respond( httpRequest, httpResponse, STR, hashedPassword); } | /**
* Responds with success if the user's password was successfully changed.
* Otherwise, a failure message and description are returned.
*/ | Responds with success if the user's password was successfully changed. Otherwise, a failure message and description are returned | respond | {
"repo_name": "HaiJiaoXinHeng/server-1",
"path": "src/org/ohmage/request/user/UserChangePasswordRequest.java",
"license": "apache-2.0",
"size": 6351
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,890,993 |
public Stroke getSeriesOutlineStroke(int series) {
// return the override, if there is one...
if (this.outlineStroke != null) {
return this.outlineStroke;
}
// otherwise look up the stroke table
Stroke result = this.outlineStrokeList.getStroke(series);
i... | Stroke function(int series) { if (this.outlineStroke != null) { return this.outlineStroke; } Stroke result = this.outlineStrokeList.getStroke(series); if (result == null) { DrawingSupplier supplier = getDrawingSupplier(); if (supplier != null) { result = supplier.getNextOutlineStroke(); this.outlineStrokeList.setStroke... | /**
* Returns the stroke used to outline the items in a series.
*
* @param series the series (zero-based index).
*
* @return The stroke (never <code>null</code>).
*/ | Returns the stroke used to outline the items in a series | getSeriesOutlineStroke | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-2.1",
"size": 97537
} | [
"java.awt.Stroke",
"org.jfree.chart.plot.DrawingSupplier"
] | import java.awt.Stroke; import org.jfree.chart.plot.DrawingSupplier; | import java.awt.*; import org.jfree.chart.plot.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 157,373 |
public void syncEndTagFile() {
copyTagToPageScope(VariableInfo.AT_BEGIN);
copyTagToPageScope(VariableInfo.AT_END);
restoreNestedVariables();
} | void function() { copyTagToPageScope(VariableInfo.AT_BEGIN); copyTagToPageScope(VariableInfo.AT_END); restoreNestedVariables(); } | /**
* Synchronize variables at end of tag file
*/ | Synchronize variables at end of tag file | syncEndTagFile | {
"repo_name": "apache/tomcat",
"path": "java/org/apache/jasper/runtime/JspContextWrapper.java",
"license": "apache-2.0",
"size": 20373
} | [
"jakarta.servlet.jsp.tagext.VariableInfo"
] | import jakarta.servlet.jsp.tagext.VariableInfo; | import jakarta.servlet.jsp.tagext.*; | [
"jakarta.servlet.jsp"
] | jakarta.servlet.jsp; | 1,676,414 |
RedisFuture<String> ltrim(K key, long start, long stop); | RedisFuture<String> ltrim(K key, long start, long stop); | /**
* Trim a list to the specified range.
*
* @param key the key
* @param start the start type: long
* @param stop the stop type: long
* @return String simple-string-reply
*/ | Trim a list to the specified range | ltrim | {
"repo_name": "mp911de/lettuce",
"path": "src/main/java/io/lettuce/core/api/async/RedisListAsyncCommands.java",
"license": "apache-2.0",
"size": 10363
} | [
"io.lettuce.core.RedisFuture"
] | import io.lettuce.core.RedisFuture; | import io.lettuce.core.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 2,340,348 |
public void setAwait(boolean await)
throws Exception {
Class<?> paramTypes[] = new Class[1];
paramTypes[0] = Boolean.TYPE;
Object paramValues[] = new Object[1];
paramValues[0] = Boolean.valueOf(await);
Method method =
catalinaDaemon.getClass().get... | void function(boolean await) throws Exception { Class<?> paramTypes[] = new Class[1]; paramTypes[0] = Boolean.TYPE; Object paramValues[] = new Object[1]; paramValues[0] = Boolean.valueOf(await); Method method = catalinaDaemon.getClass().getMethod(STR, paramTypes); method.invoke(catalinaDaemon, paramValues); } | /**
* Set flag.
*/ | Set flag | setAwait | {
"repo_name": "pistolove/sourcecode4junit",
"path": "Source4Tomcat/src/org/apache/catalina/startup/Bootstrap.java",
"license": "apache-2.0",
"size": 17749
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,116,230 |
public OffsetDateTime accessedTimestamp() {
return this.innerProperties() == null ? null : this.innerProperties().accessedTimestamp();
} | OffsetDateTime function() { return this.innerProperties() == null ? null : this.innerProperties().accessedTimestamp(); } | /**
* Get the accessedTimestamp property: accessedTimeStamp Most recent access time and date.
*
* @return the accessedTimestamp value.
*/ | Get the accessedTimestamp property: accessedTimeStamp Most recent access time and date | accessedTimestamp | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java",
"license": "mit",
"size": 10036
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,254,218 |
@Override
public InputStream getInputStream() throws IOException {
if (socket_was_closed) {
throw new IOException("Socket has already been closed.");
}
return appDataIS;
} | InputStream function() throws IOException { if (socket_was_closed) { throw new IOException(STR); } return appDataIS; } | /**
* This method works according to the specification of implemented class.
*
* @see javax.net.ssl.SSLSocket#getInputStream() method documentation for
* more information
*/ | This method works according to the specification of implemented class | getInputStream | {
"repo_name": "webos21/xi",
"path": "java/jcl/src/java/org/apache/harmony/xnet/provider/jsse/SSLSocketImpl.java",
"license": "apache-2.0",
"size": 25837
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 549,828 |
Map<Integer, List<Integer>> createPositionsMap(Integer[] data) {
Map<Integer, List<Integer>> positionsMap = new HashMap<>();
for (int i = 0; i < data.length; i++) {
final int position = i;
positionsMap.compute(data[i], (aVal, positions) -> { List<Integer> positionsList = positions == null... | Map<Integer, List<Integer>> createPositionsMap(Integer[] data) { Map<Integer, List<Integer>> positionsMap = new HashMap<>(); for (int i = 0; i < data.length; i++) { final int position = i; positionsMap.compute(data[i], (aVal, positions) -> { List<Integer> positionsList = positions == null ? new ArrayList<>() : position... | /**
* Create the index positions map for the corresponding input, e.g for each value in the input array an entry
* is added in the returned data map
*
* @param data the list of integers
* @return position map
*/ | Create the index positions map for the corresponding input, e.g for each value in the input array an entry is added in the returned data map | createPositionsMap | {
"repo_name": "cruja/algos",
"path": "Java/main/java/answers/ComplementaryPairs.java",
"license": "gpl-2.0",
"size": 4031
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,037,577 |
@Override
protected IModel<?> initModel() {
return new Model<Integer>(-1);
}
/**
* Generates the container for all tabs. The default container automatically adds the css
* <code>class</code> attribute based on the return value of {@link #getTabContainerCssClass()} | IModel<?> function() { return new Model<Integer>(-1); } /** * Generates the container for all tabs. The default container automatically adds the css * <code>class</code> attribute based on the return value of {@link #getTabContainerCssClass()} | /**
* Override of the default initModel behaviour. This component <strong>will not</strong> use any
* compound model of a parent.
*
* @see org.apache.wicket.Component#initModel()
*/ | Override of the default initModel behaviour. This component will not use any compound model of a parent | initModel | {
"repo_name": "gureronder/midpoint",
"path": "gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/TabbedPanel.java",
"license": "apache-2.0",
"size": 13190
} | [
"org.apache.wicket.model.IModel",
"org.apache.wicket.model.Model"
] | import org.apache.wicket.model.IModel; import org.apache.wicket.model.Model; | import org.apache.wicket.model.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,358,979 |
Optional<ExitCode> runHelp(PrintStream stream); | Optional<ExitCode> runHelp(PrintStream stream); | /**
* If the current command is a help command, run the action to print out the appropriate help
* message.
*
* <p>This is an optimization to avoid initializing everything in CommandRunnerParams, in order to
* return help strings quickly.
*
* @param stream stream to output the help text.
* @retu... | If the current command is a help command, run the action to print out the appropriate help message. This is an optimization to avoid initializing everything in CommandRunnerParams, in order to return help strings quickly | runHelp | {
"repo_name": "JoelMarcey/buck",
"path": "src/com/facebook/buck/cli/Command.java",
"license": "apache-2.0",
"size": 3452
} | [
"com.facebook.buck.util.ExitCode",
"java.io.PrintStream",
"java.util.Optional"
] | import com.facebook.buck.util.ExitCode; import java.io.PrintStream; import java.util.Optional; | import com.facebook.buck.util.*; import java.io.*; import java.util.*; | [
"com.facebook.buck",
"java.io",
"java.util"
] | com.facebook.buck; java.io; java.util; | 2,287,359 |
public URL getSignedUrl (TravelLogStorageObject s3Store, Date expirationDate) {
logger.log(Level.FINEST,"PRESIGNED URL: "+s3Store.getBucketName()+"/"+s3Store.getStoragePath());
return s3Client.generatePresignedUrl(s3Store.getBucketName(), s3Store.getStoragePath(), expirationDate);
}
| URL function (TravelLogStorageObject s3Store, Date expirationDate) { logger.log(Level.FINEST,STR+s3Store.getBucketName()+"/"+s3Store.getStoragePath()); return s3Client.generatePresignedUrl(s3Store.getBucketName(), s3Store.getStoragePath(), expirationDate); } | /**
* This method will obtain a presigned URL that will expire on the given
* date.
* @param s3Store the S3 object for which to obtain a presigned url
* @param expirationDate date when the presigned url should expire
* @return the signed URL
*/ | This method will obtain a presigned URL that will expire on the given date | getSignedUrl | {
"repo_name": "pujaraniyadav/SiQuoia",
"path": "src/com/amazon/aws/samplecode/travellog/aws/S3StorageManager.java",
"license": "apache-2.0",
"size": 8391
} | [
"java.util.Date",
"java.util.logging.Level"
] | import java.util.Date; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 1,537,024 |
private TestResult checkResults(
ObjectData wsObj, TestSpec tspec, FileSpec fs)
throws Exception {
String fileContainerName = getFileContainerName(fs.getWorkspaceType());
System.out.println(String.format("checking file " + fs.getLocation()));
@SuppressWarnings("unchecked")
Map<String, Object> data = ws... | TestResult function( ObjectData wsObj, TestSpec tspec, FileSpec fs) throws Exception { String fileContainerName = getFileContainerName(fs.getWorkspaceType()); System.out.println(String.format(STR + fs.getLocation())); @SuppressWarnings(STR) Map<String, Object> data = wsObj.getData().asClassInstance(Map.class); @Suppres... | /** Check the data pushed to KBase against expected data for a test.
* @param wsObj the object data retrieved from the workspace
* @param tspec the test specification to check against.
* @param fs the file specification associated with the workspace data.
* @return the results of the test.
* @throws Exception... | Check the data pushed to KBase against expected data for a test | checkResults | {
"repo_name": "MrCreosote/jgi_kbase_integration_tests",
"path": "src/us/kbase/jgiintegration/test/JGIIntegrationTest.java",
"license": "mit",
"size": 63558
} | [
"com.fasterxml.jackson.databind.JsonNode",
"java.util.Arrays",
"java.util.List",
"java.util.Map",
"org.hamcrest.CoreMatchers",
"org.junit.Assert",
"us.kbase.abstracthandle.Handle",
"us.kbase.auth.AuthService",
"us.kbase.auth.AuthToken",
"us.kbase.shock.client.BasicShockClient",
"us.kbase.shock.c... | import com.fasterxml.jackson.databind.JsonNode; import java.util.Arrays; import java.util.List; import java.util.Map; import org.hamcrest.CoreMatchers; import org.junit.Assert; import us.kbase.abstracthandle.Handle; import us.kbase.auth.AuthService; import us.kbase.auth.AuthToken; import us.kbase.shock.client.BasicShoc... | import com.fasterxml.jackson.databind.*; import java.util.*; import org.hamcrest.*; import org.junit.*; import us.kbase.abstracthandle.*; import us.kbase.auth.*; import us.kbase.shock.client.*; import us.kbase.workspace.*; | [
"com.fasterxml.jackson",
"java.util",
"org.hamcrest",
"org.junit",
"us.kbase.abstracthandle",
"us.kbase.auth",
"us.kbase.shock",
"us.kbase.workspace"
] | com.fasterxml.jackson; java.util; org.hamcrest; org.junit; us.kbase.abstracthandle; us.kbase.auth; us.kbase.shock; us.kbase.workspace; | 233,946 |
if (System.getProperty("XDG") == null)
return new File("./");
String OS = System.getProperty("os.name").toLowerCase();
if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0) {
String rootPath = System.getenv(env);
if (rootPath == null) {
String home = System.getProperty("user... | if (System.getProperty("XDG") == null) return new File("./"); String OS = System.getProperty(STR).toLowerCase(); if (OS.indexOf("nix") >= 0 OS.indexOf("nux") >= 0 OS.indexOf("aix") > 0) { String rootPath = System.getenv(env); if (rootPath == null) { String home = System.getProperty(STR); if (home == null) return new Fi... | /**
* Returns the directory based on the XDG base directory specification for
* Unix-like operating systems, only if the system property "XDG" has been defined.
* @param env the environment variable to check (XDG_*_*)
* @param fallback the fallback directory relative to ~home
* @return the XDG base directory,... | Returns the directory based on the XDG base directory specification for Unix-like operating systems, only if the system property "XDG" has been defined | getXDGBaseDir | {
"repo_name": "kanekikun420/opsu",
"path": "src/itdelatrisu/opsu/Options.java",
"license": "gpl-3.0",
"size": 44399
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,540,498 |
public Component getTreeCellRendererComponent(JTree tree,
Object value,
boolean sel,
boolean expanded,
... | Component function(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); switch (getNodeType(value)) { case Node.ELEMENT_NODE: setIcon(elementIcon); break; case Node.COMMENT_NODE: setIcon(c... | /**
* Sets the value of the current tree cell.
*/ | Sets the value of the current tree cell | getTreeCellRendererComponent | {
"repo_name": "git-moss/Push2Display",
"path": "lib/batik-1.8/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java",
"license": "lgpl-3.0",
"size": 79527
} | [
"java.awt.Component",
"javax.swing.JTree",
"org.w3c.dom.Node"
] | import java.awt.Component; import javax.swing.JTree; import org.w3c.dom.Node; | import java.awt.*; import javax.swing.*; import org.w3c.dom.*; | [
"java.awt",
"javax.swing",
"org.w3c.dom"
] | java.awt; javax.swing; org.w3c.dom; | 1,607,637 |
public static int getSecond(Date date) {
return dateToCalendar(date).get(Calendar.SECOND);
} | static int function(Date date) { return dateToCalendar(date).get(Calendar.SECOND); } | /**
* Get the second of the time
*
* @param date The time.
*
* @return The second of the time, always in the range 0-59
*/ | Get the second of the time | getSecond | {
"repo_name": "gosu-lang/gosu-lang",
"path": "gosu-core-api/src/main/java/gw/date/GosuDateUtil.java",
"license": "apache-2.0",
"size": 7581
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,035,781 |
long executeSQL() throws VoltAbortException {
long count = 0;
VoltTable[] results = voltExecuteSQL();
for (VoltTable result : results) {
long dmlUpdated = result.asScalarLong();
if (dmlUpdated == 0) {
throw new VoltAbortException("Insert failed for tup... | long executeSQL() throws VoltAbortException { long count = 0; VoltTable[] results = voltExecuteSQL(); for (VoltTable result : results) { long dmlUpdated = result.asScalarLong(); if (dmlUpdated == 0) { throw new VoltAbortException(STR); } if (dmlUpdated > 1) { throw new VoltAbortException(STR); } ++count; } return count... | /**
* Execute a set of queued inserts. Ensure each insert successfully
* inserts one row. Throw exception if not.
*
* @return Count of rows inserted.
* @throws VoltAbortException if any failure at all.
*/ | Execute a set of queued inserts. Ensure each insert successfully inserts one row. Throw exception if not | executeSQL | {
"repo_name": "eoneil1942/voltdb-4.7fix",
"path": "src/frontend/org/voltdb/sysprocs/LoadSinglepartitionTable.java",
"license": "agpl-3.0",
"size": 7650
} | [
"org.voltdb.VoltTable"
] | import org.voltdb.VoltTable; | import org.voltdb.*; | [
"org.voltdb"
] | org.voltdb; | 2,314,475 |
boolean shouldFlush() {
Engine engine = getEngineOrNull();
if (engine != null) {
try {
Translog translog = engine.getTranslog();
return translog.sizeInBytes() > indexSettings.getFlushThresholdSize().bytes();
} catch (AlreadyClosedException | En... | boolean shouldFlush() { Engine engine = getEngineOrNull(); if (engine != null) { try { Translog translog = engine.getTranslog(); return translog.sizeInBytes() > indexSettings.getFlushThresholdSize().bytes(); } catch (AlreadyClosedException EngineClosedException ex) { } } return false; } | /**
* Returns <code>true</code> iff this shard needs to be flushed due to too many translog operation or a too large transaction log.
* Otherwise <code>false</code>.
*/ | Returns <code>true</code> iff this shard needs to be flushed due to too many translog operation or a too large transaction log. Otherwise <code>false</code> | shouldFlush | {
"repo_name": "cwurm/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 76962
} | [
"org.apache.lucene.store.AlreadyClosedException",
"org.elasticsearch.index.engine.Engine",
"org.elasticsearch.index.engine.EngineClosedException",
"org.elasticsearch.index.translog.Translog"
] | import org.apache.lucene.store.AlreadyClosedException; import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.engine.EngineClosedException; import org.elasticsearch.index.translog.Translog; | import org.apache.lucene.store.*; import org.elasticsearch.index.engine.*; import org.elasticsearch.index.translog.*; | [
"org.apache.lucene",
"org.elasticsearch.index"
] | org.apache.lucene; org.elasticsearch.index; | 584,064 |
protected void copyRequestHeaders(HttpServletRequest servletRequest, HttpRequest proxyRequest) {
// Get an Enumeration of all of the header names sent by the client
Enumeration<String> enumerationOfHeaderNames = servletRequest.getHeaderNames();
while (enumerationOfHeaderNames.hasMoreElements()) {
St... | void function(HttpServletRequest servletRequest, HttpRequest proxyRequest) { Enumeration<String> enumerationOfHeaderNames = servletRequest.getHeaderNames(); while (enumerationOfHeaderNames.hasMoreElements()) { String headerName = enumerationOfHeaderNames.nextElement(); copyRequestHeader(servletRequest, proxyRequest, he... | /**
* Copy request headers from the servlet client to the proxy request.
* This is easily overridden to add your own.
*/ | Copy request headers from the servlet client to the proxy request. This is easily overridden to add your own | copyRequestHeaders | {
"repo_name": "cthiebaud/HTTP-Proxy-Servlet",
"path": "src/main/java/org/mitre/dsmiley/httpproxy/ProxyServlet.java",
"license": "apache-2.0",
"size": 36868
} | [
"java.util.Enumeration",
"javax.servlet.http.HttpServletRequest",
"org.apache.http.HttpRequest"
] | import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; import org.apache.http.HttpRequest; | import java.util.*; import javax.servlet.http.*; import org.apache.http.*; | [
"java.util",
"javax.servlet",
"org.apache.http"
] | java.util; javax.servlet; org.apache.http; | 2,603,330 |
public int getwhp_sites_external_documentsesCount()
throws SystemException {
return whp_sites_external_documentsPersistence.countAll();
} | int function() throws SystemException { return whp_sites_external_documentsPersistence.countAll(); } | /**
* Returns the number of whp_sites_external_documentses.
*
* @return the number of whp_sites_external_documentses
* @throws SystemException if a system exception occurred
*/ | Returns the number of whp_sites_external_documentses | getwhp_sites_external_documentsesCount | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/whp_sites_external_documentsLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 177106
} | [
"com.liferay.portal.kernel.exception.SystemException"
] | import com.liferay.portal.kernel.exception.SystemException; | import com.liferay.portal.kernel.exception.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,543,173 |
@Override
public GroovyClassDoc[] innerClasses() {
Collections.sort(nested);
return nested.toArray(EMPTY_GROOVYCLASSDOC_ARRAY);
} | GroovyClassDoc[] function() { Collections.sort(nested); return nested.toArray(EMPTY_GROOVYCLASSDOC_ARRAY); } | /**
* returns a sorted array of nested classes and interfaces
*/ | returns a sorted array of nested classes and interfaces | innerClasses | {
"repo_name": "apache/incubator-groovy",
"path": "subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java",
"license": "apache-2.0",
"size": 41401
} | [
"java.util.Collections",
"org.codehaus.groovy.groovydoc.GroovyClassDoc"
] | import java.util.Collections; import org.codehaus.groovy.groovydoc.GroovyClassDoc; | import java.util.*; import org.codehaus.groovy.groovydoc.*; | [
"java.util",
"org.codehaus.groovy"
] | java.util; org.codehaus.groovy; | 1,168,917 |
public Path getWorkPath() throws IOException {
return workPath;
} | Path function() throws IOException { return workPath; } | /**
* Get the directory that the task should write results into
* @return the work directory
* @throws IOException
*/ | Get the directory that the task should write results into | getWorkPath | {
"repo_name": "karahiyo/hanoi-hadoop-2.0.0-cdh",
"path": "src/mapred/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java",
"license": "apache-2.0",
"size": 9820
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 980,207 |
private void writeQName(final javax.xml.namespace.QName qname, final javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
final java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String pre... | void function(final javax.xml.namespace.QName qname, final javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { final java.lang.String namespaceURI = qname.getNamespaceURI(); if (namespaceURI != null) { java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); if (prefix == null) ... | /**
* method to handle Qnames
*/ | method to handle Qnames | writeQName | {
"repo_name": "jefperito/nfe",
"path": "src/main/java/com/fincatto/documentofiscal/cte300/webservices/consulta/CteConsultaStub.java",
"license": "apache-2.0",
"size": 93487
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 2,374,212 |
private void serialize(Metric metric, Date timestamp, T obj) {
String value = new String(serializer.serialize(obj), Charsets.UTF_8);
metric.addDataPoint(timestamp.getTime(), value);
} | void function(Metric metric, Date timestamp, T obj) { String value = new String(serializer.serialize(obj), Charsets.UTF_8); metric.addDataPoint(timestamp.getTime(), value); } | /**
* Adds a datapoint to {@code metric} consisting of the {@code timestamp}, the serialized
* form of {@code obj}, and the custom data type for the current {@code serializer}.
*/ | Adds a datapoint to metric consisting of the timestamp, the serialized form of obj, and the custom data type for the current serializer | serialize | {
"repo_name": "BrightTag/trident-kairosdb",
"path": "src/main/java/com/brighttag/trident/kairos/KairosState.java",
"license": "apache-2.0",
"size": 13920
} | [
"com.google.common.base.Charsets",
"java.util.Date",
"org.kairosdb.client.builder.Metric"
] | import com.google.common.base.Charsets; import java.util.Date; import org.kairosdb.client.builder.Metric; | import com.google.common.base.*; import java.util.*; import org.kairosdb.client.builder.*; | [
"com.google.common",
"java.util",
"org.kairosdb.client"
] | com.google.common; java.util; org.kairosdb.client; | 1,990,300 |
private void drawContent(GC gc) {
Rectangle clientArea = getClientArea();
// prepare fonts
m_baseFont = gc.getFont();
m_boldFont = DrawUtils.getBoldFont(m_baseFont);
m_italicFont = DrawUtils.getItalicFont(m_baseFont);
// show presentations
int[] presentationsWidth = showPresentations(clien... | void function(GC gc) { Rectangle clientArea = getClientArea(); m_baseFont = gc.getFont(); m_boldFont = DrawUtils.getBoldFont(m_baseFont); m_italicFont = DrawUtils.getItalicFont(m_baseFont); int[] presentationsWidth = showPresentations(clientArea); { int y = clientArea.y - m_rowHeight * m_selection; for (int i = 0; i < ... | /**
* Draws all {@link PropertyInfo}'s, separators, etc.
*/ | Draws all <code>PropertyInfo</code>'s, separators, etc | drawContent | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/internal/core/model/property/table/PropertyTable.java",
"license": "gpl-3.0",
"size": 51611
} | [
"org.eclipse.swt.graphics.Rectangle",
"org.eclipse.wb.internal.core.utils.ui.DrawUtils"
] | import org.eclipse.swt.graphics.Rectangle; import org.eclipse.wb.internal.core.utils.ui.DrawUtils; | import org.eclipse.swt.graphics.*; import org.eclipse.wb.internal.core.utils.ui.*; | [
"org.eclipse.swt",
"org.eclipse.wb"
] | org.eclipse.swt; org.eclipse.wb; | 2,587,839 |
private boolean checkFile(String name, int numOfEntries, int firstEntryNum) throws Exception {
File f = new File(name);
assertTrue(f.isFile());
assertTrue(f.canRead());
FileInputStream inF = new FileInputStream(name);
assertNotNull(inF);
StringBuilder readStrBuilder = new StringBuilder();
byte... | boolean function(String name, int numOfEntries, int firstEntryNum) throws Exception { File f = new File(name); assertTrue(f.isFile()); assertTrue(f.canRead()); FileInputStream inF = new FileInputStream(name); assertNotNull(inF); StringBuilder readStrBuilder = new StringBuilder(); byte[] buffer = new byte[1024]; int byt... | /**
* Check the content of the file with the passed name.
* The correctness is ensured if the file exists, is readable
* and it is composed of passed number of entries.
*
* @param name The name of the file
* @param numOfEntries The number of entries in the file
* @param firstEntryNum The number of the f... | Check the content of the file with the passed name. The correctness is ensured if the file exists, is readable and it is composed of passed number of entries | checkFile | {
"repo_name": "jbarriosc/ACSUFRO",
"path": "LGPL/CommonSoftware/acsGUIs/jlog/test/alma/acs/jlog/test/ErrorLogFileTest.java",
"license": "lgpl-2.1",
"size": 4837
} | [
"java.io.File",
"java.io.FileInputStream"
] | import java.io.File; import java.io.FileInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,649,775 |
public ResultForType getResult(Long resourceId, Characterization.Name type) {
ResultForType resultForType = getResult(resourceId).get(type);
if (resultForType == null)
return new ResultForType();
else
return resultForType;
}
| ResultForType function(Long resourceId, Characterization.Name type) { ResultForType resultForType = getResult(resourceId).get(type); if (resultForType == null) return new ResultForType(); else return resultForType; } | /**
* Retrieves the characterization result for a given Resource and a Characterization Type
*
* @param resourceId
* @param type name of the characterization
* @return
*/ | Retrieves the characterization result for a given Resource and a Characterization Type | getResult | {
"repo_name": "play4science/gwap",
"path": "src/hot/gwap/tools/CharacterizationBean.java",
"license": "agpl-3.0",
"size": 6840
} | [
"org.jboss.seam.annotations.Name"
] | import org.jboss.seam.annotations.Name; | import org.jboss.seam.annotations.*; | [
"org.jboss.seam"
] | org.jboss.seam; | 2,645,830 |
protected void adoptNodes(FlexibleNode node, Map<Taxon, Integer> taxonNumberMap) {
if (inEdit) throw new RuntimeException("Mustn't be in an edit transaction to call this method!");
internalNodeCount = 0;
externalNodeCount = 0;
root = node;
do {
node = (Flexibl... | void function(FlexibleNode node, Map<Taxon, Integer> taxonNumberMap) { if (inEdit) throw new RuntimeException(STR); internalNodeCount = 0; externalNodeCount = 0; root = node; do { node = (FlexibleNode) Tree.Utils.postorderSuccessor(this, node); if (node.isExternal()) { externalNodeCount++; } else internalNodeCount++; }... | /**
* Adopt a node hierarchy as its own. Only called by the FlexibleTree(FlexibleNode, TaxonList).
* This creates the node list and stores the nodes in post-traversal order.
*/ | Adopt a node hierarchy as its own. Only called by the FlexibleTree(FlexibleNode, TaxonList). This creates the node list and stores the nodes in post-traversal order | adoptNodes | {
"repo_name": "codeaudit/beast-mcmc",
"path": "src/dr/evolution/tree/FlexibleTree.java",
"license": "lgpl-2.1",
"size": 26177
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,491,963 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
processRequest(reques... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); } catch (CerberusException ex) { LOG.warn(ex); } } | /**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "cerberustesting/cerberus-source",
"path": "source/src/main/java/org/cerberus/servlet/crud/countryenvironment/ReadCountryEnvironmentParameters.java",
"license": "gpl-3.0",
"size": 9448
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.cerberus.exception.CerberusException"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.cerberus.exception.CerberusException; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.cerberus.exception.*; | [
"java.io",
"javax.servlet",
"org.cerberus.exception"
] | java.io; javax.servlet; org.cerberus.exception; | 706,268 |
void validateServerBaseIfConfiguredToDoSo(String theServerBase, IHttpClient theHttpClient, BaseClient theClient); | void validateServerBaseIfConfiguredToDoSo(String theServerBase, IHttpClient theHttpClient, BaseClient theClient); | /**
* This method is internal to HAPI - It may change in future versions, use with caution.
*/ | This method is internal to HAPI - It may change in future versions, use with caution | validateServerBaseIfConfiguredToDoSo | {
"repo_name": "botunge/hapi-fhir",
"path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java",
"license": "apache-2.0",
"size": 9057
} | [
"ca.uhn.fhir.rest.client.api.IHttpClient"
] | import ca.uhn.fhir.rest.client.api.IHttpClient; | import ca.uhn.fhir.rest.client.api.*; | [
"ca.uhn.fhir"
] | ca.uhn.fhir; | 1,611,895 |
private Instant shift(Instant timestamp, W window) {
Instant shifted =
windowingStrategy
.getTimestampCombiner()
.assign(window, windowingStrategy.getWindowFn().getOutputTime(timestamp, window));
// Don't call checkState(), to avoid calling BoundedWindow.formatTimestamp() every... | Instant function(Instant timestamp, W window) { Instant shifted = windowingStrategy .getTimestampCombiner() .assign(window, windowingStrategy.getWindowFn().getOutputTime(timestamp, window)); if (shifted.isBefore(timestamp)) { throw new IllegalStateException( String.format( STR, BoundedWindow.formatTimestamp(timestamp),... | /**
* Return {@code timestamp}, possibly shifted forward in time according to the window strategy's
* output time function.
*/ | Return timestamp, possibly shifted forward in time according to the window strategy's output time function | shift | {
"repo_name": "RyanSkraba/beam",
"path": "runners/core-java/src/main/java/org/apache/beam/runners/core/WatermarkHold.java",
"license": "apache-2.0",
"size": 19794
} | [
"org.apache.beam.sdk.transforms.windowing.BoundedWindow",
"org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions",
"org.joda.time.Instant"
] | import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions; import org.joda.time.Instant; | import org.apache.beam.sdk.transforms.windowing.*; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.*; import org.joda.time.*; | [
"org.apache.beam",
"org.joda.time"
] | org.apache.beam; org.joda.time; | 289,720 |
public StoreConfig getConfig() {
return store.getConfig();
} | StoreConfig function() { return store.getConfig(); } | /**
* Returns a copy of the entity store configuration.
*/ | Returns a copy of the entity store configuration | getConfig | {
"repo_name": "mollstam/UnrealPy",
"path": "UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/db-4.7.25.0/java/src/com/sleepycat/persist/raw/RawStore.java",
"license": "mit",
"size": 4137
} | [
"com.sleepycat.persist.StoreConfig"
] | import com.sleepycat.persist.StoreConfig; | import com.sleepycat.persist.*; | [
"com.sleepycat.persist"
] | com.sleepycat.persist; | 528,697 |
static ValueType getKnownValueType(Node n) {
switch (n.getType()) {
case Token.CAST:
return getKnownValueType(n.getFirstChild());
case Token.ASSIGN:
case Token.COMMA:
return getKnownValueType(n.getLastChild());
case Token.AND:
case Token.OR:
return and(
... | static ValueType getKnownValueType(Node n) { switch (n.getType()) { case Token.CAST: return getKnownValueType(n.getFirstChild()); case Token.ASSIGN: case Token.COMMA: return getKnownValueType(n.getLastChild()); case Token.AND: case Token.OR: return and( getKnownValueType(n.getFirstChild()), getKnownValueType(n.getLastC... | /**
* Apply the supplied predicate against
* all possible result Nodes of the expression.
*/ | Apply the supplied predicate against all possible result Nodes of the expression | getKnownValueType | {
"repo_name": "tntim96/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 117627
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 16,890 |
public static CubeValue from(final Map<Triple<Double, Double, Double>, Double> map) {
ArgumentChecker.notNull(map, "Map");
final HashMap<Triple<Double, Double, Double>, Double> data = new HashMap<>();
data.putAll(map);
return new CubeValue(data);
} | static CubeValue function(final Map<Triple<Double, Double, Double>, Double> map) { ArgumentChecker.notNull(map, "Map"); final HashMap<Triple<Double, Double, Double>, Double> data = new HashMap<>(); data.putAll(map); return new CubeValue(data); } | /**
* Builder from a map. A new map is created with the same values.
*
* @param map
* The map.
* @return The surface value.
*/ | Builder from a map. A new map is created with the same values | from | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/util/amount/CubeValue.java",
"license": "apache-2.0",
"size": 7481
} | [
"com.opengamma.util.ArgumentChecker",
"com.opengamma.util.tuple.Triple",
"java.util.HashMap",
"java.util.Map"
] | import com.opengamma.util.ArgumentChecker; import com.opengamma.util.tuple.Triple; import java.util.HashMap; import java.util.Map; | import com.opengamma.util.*; import com.opengamma.util.tuple.*; import java.util.*; | [
"com.opengamma.util",
"java.util"
] | com.opengamma.util; java.util; | 1,105,959 |
public JsonInputSchemaMapping withTopic(JsonField topic) {
if (this.innerProperties() == null) {
this.innerProperties = new JsonInputSchemaMappingProperties();
}
this.innerProperties().withTopic(topic);
return this;
} | JsonInputSchemaMapping function(JsonField topic) { if (this.innerProperties() == null) { this.innerProperties = new JsonInputSchemaMappingProperties(); } this.innerProperties().withTopic(topic); return this; } | /**
* Set the topic property: The mapping information for the Topic property of the Event Grid Event.
*
* @param topic the topic value to set.
* @return the JsonInputSchemaMapping object itself.
*/ | Set the topic property: The mapping information for the Topic property of the Event Grid Event | withTopic | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/JsonInputSchemaMapping.java",
"license": "mit",
"size": 6754
} | [
"com.azure.resourcemanager.eventgrid.fluent.models.JsonInputSchemaMappingProperties"
] | import com.azure.resourcemanager.eventgrid.fluent.models.JsonInputSchemaMappingProperties; | import com.azure.resourcemanager.eventgrid.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 712,789 |
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.talent.v4beta1.Tenant>
updateTenant(com.google.cloud.talent.v4beta1.UpdateTenantRequest request) {
return futureUnaryCall(
getChannel().newCall(getUpdateTenantMethodHelper(), getCallOptions()), request);
... | com.google.common.util.concurrent.ListenableFuture< com.google.cloud.talent.v4beta1.Tenant> function(com.google.cloud.talent.v4beta1.UpdateTenantRequest request) { return futureUnaryCall( getChannel().newCall(getUpdateTenantMethodHelper(), getCallOptions()), request); } | /**
*
*
* <pre>
* Updates specified tenant.
* </pre>
*/ | <code> Updates specified tenant. </code> | updateTenant | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceGrpc.java",
"license": "apache-2.0",
"size": 32189
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 288,637 |
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
public List<ServiceConfigsEntity> physicalSelectAll(Order order) {
String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ServiceConfigsDao/ServiceConfigsDao_physical_select_all.sql");
sq... | @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) List<ServiceConfigsEntity> function(Order order) { String sql = SQLManager.getInstance().getSql(STR); sql = String.format(sql, order.toString()); return executeQueryList(sql, ServiceConfigsEntity.class); } | /**
* Select all data.
* @param order order
* @return all data
*/ | Select all data | physicalSelectAll | {
"repo_name": "support-project/knowledge",
"path": "src/main/java/org/support/project/knowledge/dao/gen/GenServiceConfigsDao.java",
"license": "apache-2.0",
"size": 16811
} | [
"java.util.List",
"org.support.project.aop.Aspect",
"org.support.project.knowledge.entity.ServiceConfigsEntity",
"org.support.project.ormapping.common.SQLManager",
"org.support.project.ormapping.config.Order"
] | import java.util.List; import org.support.project.aop.Aspect; import org.support.project.knowledge.entity.ServiceConfigsEntity; import org.support.project.ormapping.common.SQLManager; import org.support.project.ormapping.config.Order; | import java.util.*; import org.support.project.aop.*; import org.support.project.knowledge.entity.*; import org.support.project.ormapping.common.*; import org.support.project.ormapping.config.*; | [
"java.util",
"org.support.project"
] | java.util; org.support.project; | 1,291,126 |
InputStream inputStream = null;
try {
inputStream = new FileInputStream(fileName);
return getMetadata(inputStream);
} catch (IOException ex) {
SilverTrace.warn("MetadataExtractor.getMetadata()", "SilverpeasException.WARNING",
"util.EXE_CANT_GET_SUMMARY_INFORMATION" + ex.getMessag... | InputStream inputStream = null; try { inputStream = new FileInputStream(fileName); return getMetadata(inputStream); } catch (IOException ex) { SilverTrace.warn(STR, STR, STR + ex.getMessage(), ex); return new MetaData(new Metadata()); } finally { Closeables.closeQuietly(inputStream); } } | /**
* Return Metadata of a document.
*
*
* @param fileName
* @return Metadata
*/ | Return Metadata of a document | extractMetadata | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/util/MetadataExtractor.java",
"license": "agpl-3.0",
"size": 3987
} | [
"com.google.common.io.Closeables",
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"org.apache.tika.metadata.Metadata"
] | import com.google.common.io.Closeables; import com.stratelia.silverpeas.silvertrace.SilverTrace; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import org.apache.tika.metadata.Metadata; | import com.google.common.io.*; import com.stratelia.silverpeas.silvertrace.*; import java.io.*; import org.apache.tika.metadata.*; | [
"com.google.common",
"com.stratelia.silverpeas",
"java.io",
"org.apache.tika"
] | com.google.common; com.stratelia.silverpeas; java.io; org.apache.tika; | 960,204 |
public static GitHub connectToEnterprise(String apiUrl, String oauthAccessToken) throws IOException {
return new GitHubBuilder().withEndpoint(apiUrl).withOAuthToken(oauthAccessToken).build();
} | static GitHub function(String apiUrl, String oauthAccessToken) throws IOException { return new GitHubBuilder().withEndpoint(apiUrl).withOAuthToken(oauthAccessToken).build(); } | /**
* Version that connects to GitHub Enterprise.
*
* @param apiUrl
* The URL of GitHub (or GitHub enterprise) API endpoint, such as "https://api.github.com" or
* "http://ghe.acme.com/api/v3". Note that GitHub Enterprise has <tt>/api/v3</tt> in the URL.
* For historical reas... | Version that connects to GitHub Enterprise | connectToEnterprise | {
"repo_name": "mmitche/github-api",
"path": "src/main/java/org/kohsuke/github/GitHub.java",
"license": "mit",
"size": 24522
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 470,679 |
public Iterator<Var> getDeclarativelyUnboundVarsWithoutTypes() {
return Iterators.filter(
getVars(), DECLARATIVELY_UNBOUND_VARS_WITHOUT_TYPES);
} | Iterator<Var> function() { return Iterators.filter( getVars(), DECLARATIVELY_UNBOUND_VARS_WITHOUT_TYPES); } | /**
* Gets all variables declared with "var" but without declared types attached.
*/ | Gets all variables declared with "var" but without declared types attached | getDeclarativelyUnboundVarsWithoutTypes | {
"repo_name": "Dandandan/wikiprogramming",
"path": "jsrepl/tools/closure-compiler/trunk/src/com/google/javascript/jscomp/Scope.java",
"license": "mit",
"size": 15927
} | [
"com.google.common.collect.Iterators",
"java.util.Iterator"
] | import com.google.common.collect.Iterators; import java.util.Iterator; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,130,607 |
public void add(ClusterStateListener listener) {
clusterStateListeners.add(listener);
} | void function(ClusterStateListener listener) { clusterStateListeners.add(listener); } | /**
* Adds a listener for updated cluster states.
*/ | Adds a listener for updated cluster states | add | {
"repo_name": "camilojd/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/cluster/service/ClusterService.java",
"license": "apache-2.0",
"size": 44266
} | [
"org.elasticsearch.cluster.ClusterStateListener"
] | import org.elasticsearch.cluster.ClusterStateListener; | import org.elasticsearch.cluster.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 477,200 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<DscpConfigurationInner> getByResourceGroupAsync(String resourceGroupName, String dscpConfigurationName); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<DscpConfigurationInner> getByResourceGroupAsync(String resourceGroupName, String dscpConfigurationName); | /**
* Gets a DSCP Configuration.
*
* @param resourceGroupName The name of the resource group.
* @param dscpConfigurationName The name of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementExcept... | Gets a DSCP Configuration | getByResourceGroupAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DscpConfigurationsClient.java",
"license": "mit",
"size": 19988
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.network.fluent.models.DscpConfigurationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.DscpConfigurationInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,254,188 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
consumptionBar = new javax.swing.JProgressBar();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
v... | @SuppressWarnings(STR) void function() { consumptionBar = new javax.swing.JProgressBar(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); voltageValueLabel = new javax.swing.JLabel(); currentValueLabel = new javax.swing.JLabel(); colorPanel = new javax.swing.JPanel(); consumptionBar.setStringPai... | /**
* 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.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "DivineCooperation/bco.dal",
"path": "visual/src/main/java/org/openbase/bco/dal/visual/service/PowerConsumptionStateServicePanel.java",
"license": "gpl-3.0",
"size": 7866
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,072,511 |
public void register(WorldObject registerable) {
for (Iterator<WorldObject> iter = objectSet.iterator(); iter.hasNext();) {
WorldObject object = iter.next();
if (object.getPosition().equals(registerable.getPosition())) {
iter.remove();
}
... | void function(WorldObject registerable) { for (Iterator<WorldObject> iter = objectSet.iterator(); iter.hasNext();) { WorldObject object = iter.next(); if (object.getPosition().equals(registerable.getPosition())) { iter.remove(); } } objectSet.add(registerable); for (Player player : World.getPlayers()) { if (player == n... | /**
* Registers a new object to the database.
*
* @param registerable
* the new object to register to the database.
*/ | Registers a new object to the database | register | {
"repo_name": "Carnewal/CastleClash",
"path": "src/server/world/object/RegisterableWorldObject.java",
"license": "gpl-3.0",
"size": 3809
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,163,644 |
public void testColumnCollations() throws Exception {
Statement stmt = con.createStatement();
stmt.execute("create table #testColumnCollations (id int primary key, "
+ "cp437val varchar(255) collate SQL_Latin1_General_Cp437_CI_AS, "
+ "cp850val varchar(255) collate SQ... | void function() throws Exception { Statement stmt = con.createStatement(); stmt.execute(STR + STR + STR + STR + STR + STR + STR + STR + STR + STR); ResultSet rs = stmt.executeQuery(STR); assertFalse(rs.next()); rs.close(); PreparedStatement pstmt = con.prepareStatement( STR + STR + STR + STR); pstmt.setInt(1, 1); for (... | /**
* Test column collations.
*/ | Test column collations | testColumnCollations | {
"repo_name": "TRITON-DLP/jtds-patch",
"path": "src/test/net/sourceforge/jtds/jdbc/Tds8Test.java",
"license": "gpl-2.0",
"size": 13932
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.Statement"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,954,941 |
public void setKnowledgeBase(ThinKnowledgeBase k);
| void function(ThinKnowledgeBase k); | /**
* Sets the KnowledgeBase to be operated on by the KBManager
*
* @param k
* The (Thin) Knowledgebase
*/ | Sets the KnowledgeBase to be operated on by the KBManager | setKnowledgeBase | {
"repo_name": "grosca/yarta",
"path": "mselib/MSE-Middleware/src/fr/inria/arles/yarta/middleware/msemanagement/ThinKnowledgeBaseManager.java",
"license": "lgpl-3.0",
"size": 472
} | [
"fr.inria.arles.yarta.knowledgebase.interfaces.ThinKnowledgeBase"
] | import fr.inria.arles.yarta.knowledgebase.interfaces.ThinKnowledgeBase; | import fr.inria.arles.yarta.knowledgebase.interfaces.*; | [
"fr.inria.arles"
] | fr.inria.arles; | 2,805,741 |
public void testSanityRandomUnsetBit() {
final int max = atLeast(100);
BitSet bits = new BitSet(max + 1);
for (int i = 0; i <= max; i++) {
assertFalse(
"how is bitset already full? iter=" + i + " card=" + bits.cardinality() + "/max=" + max,
bits.cardinality() == max + 1);
f... | void function() { final int max = atLeast(100); BitSet bits = new BitSet(max + 1); for (int i = 0; i <= max; i++) { assertFalse( STR + i + STR + bits.cardinality() + "/max=" + max, bits.cardinality() == max + 1); final int nextBit = randomUnsetBit(random(), bits, max); assertTrue(STR + nextBit, 0 <= nextBit); assertTru... | /**
* sanity check that randomUnsetBit works as expected
*
* @see #randomUnsetBit
*/ | sanity check that randomUnsetBit works as expected | testSanityRandomUnsetBit | {
"repo_name": "apache/solr",
"path": "solr/core/src/test/org/apache/solr/cloud/TestTolerantUpdateProcessorRandomCloud.java",
"license": "apache-2.0",
"size": 17167
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,399,187 |
public ServiceFuture<NetworkInterfaceInner> getByResourceGroupAsync(String resourceGroupName, String networkInterfaceName, String expand, final ServiceCallback<NetworkInterfaceInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInt... | ServiceFuture<NetworkInterfaceInner> function(String resourceGroupName, String networkInterfaceName, String expand, final ServiceCallback<NetworkInterfaceInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkInterfaceName, expand), serviceCallba... | /**
* Gets information about the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param expand Expands referenced resources.
* @param serviceCallback the async ServiceCallback to ha... | Gets information about the specified network interface | getByResourceGroupAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/NetworkInterfacesInner.java",
"license": "mit",
"size": 192507
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,565,023 |
File file(); | File file(); | /** The source file. Returns null if no file information is
* available. */ | The source file. Returns null if no file information is | file | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/langtools/src/share/classes/com/sun/javadoc/SourcePosition.java",
"license": "mit",
"size": 2055
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 927,606 |
List<AnswerHeader> getQuestionnaireAnswer(ModuleQuestionnaireBean moduleQuestionnaireBean); | List<AnswerHeader> getQuestionnaireAnswer(ModuleQuestionnaireBean moduleQuestionnaireBean); | /**
*
* This method is to get existing questionnaire answer or set up the associate questionnaire answer for the module keys
* specified in ModuleQuestionnaireBean.
*
* @param moduleQuestionnaireBean
* @return
*/ | This method is to get existing questionnaire answer or set up the associate questionnaire answer for the module keys specified in ModuleQuestionnaireBean | getQuestionnaireAnswer | {
"repo_name": "jwillia/kc-old1",
"path": "coeus-impl/src/main/java/org/kuali/coeus/common/questionnaire/framework/answer/QuestionnaireAnswerService.java",
"license": "agpl-3.0",
"size": 6791
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,757,126 |
public void setCaptionPositioning(String captionPositioning)
{
this.getCOSObject().setString(COSName.CP, captionPositioning);
} | void function(String captionPositioning) { this.getCOSObject().setString(COSName.CP, captionPositioning); } | /**
* This will set the caption positioning. Allowed values are: "Inline" and "Top"
*
* @param captionPositioning caption positioning
*/ | This will set the caption positioning. Allowed values are: "Inline" and "Top" | setCaptionPositioning | {
"repo_name": "joansmith/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java",
"license": "apache-2.0",
"size": 12900
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 1,319,127 |
@Override
public MdClasses rename(Name name) {
return new MdClasses(name, null);
} | MdClasses function(Name name) { return new MdClasses(name, null); } | /**
* Rename this table
*/ | Rename this table | rename | {
"repo_name": "okornev/oneops",
"path": "crawler/src/generated-sources/java/com/oneops/crawler/jooq/cms/tables/MdClasses.java",
"license": "apache-2.0",
"size": 5981
} | [
"org.jooq.Name"
] | import org.jooq.Name; | import org.jooq.*; | [
"org.jooq"
] | org.jooq; | 2,452,215 |
public void clientConnectionCreated(UUID channelID) {
InboundAndesChannelEvent channelEvent = new InboundAndesChannelEvent(channelID);
channelEvent.prepareForChannelOpen();
inboundEventManager.publishStateEvent(channelEvent);
} | void function(UUID channelID) { InboundAndesChannelEvent channelEvent = new InboundAndesChannelEvent(channelID); channelEvent.prepareForChannelOpen(); inboundEventManager.publishStateEvent(channelEvent); } | /**
* Notify client connection is opened. This is for message tracking purposes on Andes side.
*
* @param channelID channelID of the client connection
*/ | Notify client connection is opened. This is for message tracking purposes on Andes side | clientConnectionCreated | {
"repo_name": "hemikak/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/Andes.java",
"license": "apache-2.0",
"size": 28306
} | [
"org.wso2.andes.kernel.disruptor.inbound.InboundAndesChannelEvent"
] | import org.wso2.andes.kernel.disruptor.inbound.InboundAndesChannelEvent; | import org.wso2.andes.kernel.disruptor.inbound.*; | [
"org.wso2.andes"
] | org.wso2.andes; | 2,673,799 |
private void switchJGroupsToTcpping() throws IOException {
consoleOut.reset();
try {
commandCtx.handle("if outcome==success of /subsystem=jgroups:read-resource()");
// TODO This command is deprecated
commandCtx.handle(String.format(
... | void function() throws IOException { consoleOut.reset(); try { commandCtx.handle(STR); commandCtx.handle(String.format( STR%1$s[7600],%1$s[9600]\STR, Utils.stripSquareBrackets(host))); commandCtx.handle(STR); commandCtx.handle(STR); commandCtx.handle(STR); } catch (CommandLineException e) { LOGGER.error(STR, e); } fina... | /**
* Switch JGroups subsystem (if present) from using UDP multicast to TCPPING discovery protocol.
*/ | Switch JGroups subsystem (if present) from using UDP multicast to TCPPING discovery protocol | switchJGroupsToTcpping | {
"repo_name": "xasx/wildfly",
"path": "testsuite/integration/manualmode/src/test/java/org/wildfly/test/manual/elytron/seccontext/AbstractSecurityContextPropagationTestBase.java",
"license": "lgpl-2.1",
"size": 39080
} | [
"java.io.IOException",
"java.nio.charset.StandardCharsets",
"org.jboss.as.cli.CommandLineException",
"org.jboss.as.test.integration.security.common.Utils"
] | import java.io.IOException; import java.nio.charset.StandardCharsets; import org.jboss.as.cli.CommandLineException; import org.jboss.as.test.integration.security.common.Utils; | import java.io.*; import java.nio.charset.*; import org.jboss.as.cli.*; import org.jboss.as.test.integration.security.common.*; | [
"java.io",
"java.nio",
"org.jboss.as"
] | java.io; java.nio; org.jboss.as; | 2,428,957 |
public Adapter createWriteAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link LRBAC2.Write <em>Write</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @retur... | Creates a new adapter for an object of class '<code>LRBAC2.Write Write</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createWriteAdapter | {
"repo_name": "arnobl/kompren",
"path": "kompren-examples/LRBAC2.model/src/LRBAC2/util/LRBAC2AdapterFactory.java",
"license": "epl-1.0",
"size": 8165
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,449,392 |
public final ModuleConfig getModuleConfig() {
return this.moduleConfig;
} | final ModuleConfig function() { return this.moduleConfig; } | /**
* Return the Struts ModuleConfig that this PlugIn is associated with.
*/ | Return the Struts ModuleConfig that this PlugIn is associated with | getModuleConfig | {
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "src/org/springframework/web/struts/ContextLoaderPlugIn.java",
"license": "apache-2.0",
"size": 15298
} | [
"org.apache.struts.config.ModuleConfig"
] | import org.apache.struts.config.ModuleConfig; | import org.apache.struts.config.*; | [
"org.apache.struts"
] | org.apache.struts; | 1,716,257 |
public static String generateActivationKey() {
return RandomStringUtils.randomNumeric(DEF_COUNT);
} | static String function() { return RandomStringUtils.randomNumeric(DEF_COUNT); } | /**
* Generates an activation key.
*
* @return the generated activation key
*/ | Generates an activation key | generateActivationKey | {
"repo_name": "acardenasnet/santafe_jh",
"path": "src/main/java/net/acardenas/santafe/service/util/RandomUtil.java",
"license": "unlicense",
"size": 893
} | [
"org.apache.commons.lang.RandomStringUtils"
] | import org.apache.commons.lang.RandomStringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 123,928 |
public void setTimeZone(TimeZone newTimeZone) {
if (newTimeZone!=null) {
if (newTimeZone.equals(this.getTimeZone())==false) {
this.setZoneId(newTimeZone.toZoneId());
}
}
}
// ------------------------------------------------------------------------
// --- Till here, public data getter and se... | void function(TimeZone newTimeZone) { if (newTimeZone!=null) { if (newTimeZone.equals(this.getTimeZone())==false) { this.setZoneId(newTimeZone.toZoneId()); } } } | /**
* Sets the {@link ZoneId} based on the specified {@link TimeZone}.
* @param newTimeZone the new time zone
*/ | Sets the <code>ZoneId</code> based on the specified <code>TimeZone</code> | setTimeZone | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/de.enflexit.common/src/de/enflexit/common/swing/TimeZoneWidget.java",
"license": "lgpl-2.1",
"size": 13993
} | [
"java.util.TimeZone"
] | import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 2,805,709 |
NMSWrapper.getInstance().exec(nmsObject, s);
} | NMSWrapper.getInstance().exec(nmsObject, s); } | /**
* TODO Find correct name
* @see net.minecraft.server.v1_9_R1.ChatComponentScore#b(java.lang.String)
*/ | TODO Find correct name | b | {
"repo_name": "Vilsol/NMSWrapper",
"path": "src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSChatComponentScore.java",
"license": "apache-2.0",
"size": 2727
} | [
"me.vilsol.nmswrapper.NMSWrapper"
] | import me.vilsol.nmswrapper.NMSWrapper; | import me.vilsol.nmswrapper.*; | [
"me.vilsol.nmswrapper"
] | me.vilsol.nmswrapper; | 1,485,956 |
public static void updateLog4jConfiguration(Class<?> targetClass, String log4jPath, String log4jFileName)
throws IOException {
Closer closer = Closer.create();
try {
InputStream fileInputStream = closer.register(new FileInputStream(log4jPath));
InputStream inputStream = closer.register(targe... | static void function(Class<?> targetClass, String log4jPath, String log4jFileName) throws IOException { Closer closer = Closer.create(); try { InputStream fileInputStream = closer.register(new FileInputStream(log4jPath)); InputStream inputStream = closer.register(targetClass.getResourceAsStream("/" + log4jFileName)); P... | /**
* Update the log4j configuration.
*
* @param targetClass the target class used to get the original log4j configuration file as a resource
* @param log4jPath the custom log4j configuration properties file path
* @param log4jFileName the custom log4j configuration properties file name
* @throws IOEx... | Update the log4j configuration | updateLog4jConfiguration | {
"repo_name": "arjun4084346/gobblin",
"path": "gobblin-utility/src/main/java/org/apache/gobblin/util/logs/Log4jConfigurationHelper.java",
"license": "apache-2.0",
"size": 3424
} | [
"com.google.common.io.Closer",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.Map",
"java.util.Properties",
"org.apache.log4j.LogManager",
"org.apache.log4j.PropertyConfigurator"
] | import com.google.common.io.Closer; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Map; import java.util.Properties; import org.apache.log4j.LogManager; import org.apache.log4j.PropertyConfigurator; | import com.google.common.io.*; import java.io.*; import java.util.*; import org.apache.log4j.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.log4j"
] | com.google.common; java.io; java.util; org.apache.log4j; | 1,593,882 |
protected final void setLanguage(LanguageMode langIn, LanguageMode langOut) {
this.acceptedLanguage = langIn;
setLanguageOut(langOut);
} | final void function(LanguageMode langIn, LanguageMode langOut) { this.acceptedLanguage = langIn; setLanguageOut(langOut); } | /**
* Sets the input and output language modes..
*/ | Sets the input and output language modes. | setLanguage | {
"repo_name": "mprobst/closure-compiler",
"path": "test/com/google/javascript/jscomp/CompilerTestCase.java",
"license": "apache-2.0",
"size": 83332
} | [
"com.google.javascript.jscomp.CompilerOptions"
] | import com.google.javascript.jscomp.CompilerOptions; | import com.google.javascript.jscomp.*; | [
"com.google.javascript"
] | com.google.javascript; | 649,720 |
@Override
public boolean testTrustToken(JsonSessionState session, String token) {
String[] parts = StringUtils.split(token, ":");
// Check the length
if (parts.length != 4) {
log.error("TOKEN: Should have 4 parts, not {} : '{}'",
parts.length, token);
... | boolean function(JsonSessionState session, String token) { String[] parts = StringUtils.split(token, ":"); if (parts.length != 4) { log.error(STR, parts.length, token); return false; } String username = parts[0]; String timestamp = parts[1]; String publicKey = parts[2]; String userToken = parts[3]; if (username.isEmpty... | /**
* Validate the provided trust token.
*
* @param token : The token to validate
* @return boolean : True if the token is valid, False otherwise
*/ | Validate the provided trust token | testTrustToken | {
"repo_name": "the-fascinator/fascinator-portal",
"path": "src/main/java/com/googlecode/fascinator/portal/services/impl/PortalSecurityManagerImpl.java",
"license": "gpl-2.0",
"size": 30057
} | [
"com.googlecode.fascinator.portal.JsonSessionState",
"org.apache.commons.codec.digest.DigestUtils",
"org.apache.commons.lang.StringUtils"
] | import com.googlecode.fascinator.portal.JsonSessionState; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang.StringUtils; | import com.googlecode.fascinator.portal.*; import org.apache.commons.codec.digest.*; import org.apache.commons.lang.*; | [
"com.googlecode.fascinator",
"org.apache.commons"
] | com.googlecode.fascinator; org.apache.commons; | 1,360,764 |
public void lineNumber(ISourcePosition position); | void function(ISourcePosition position); | /**
* This method provides a way to specify a line number for the current piece of code
* being compiled. The compiler may use this information to create debugging
* information in a bytecode-format-dependent way.
*
* @param position The ISourcePosition information to use.
*/ | This method provides a way to specify a line number for the current piece of code being compiled. The compiler may use this information to create debugging information in a bytecode-format-dependent way | lineNumber | {
"repo_name": "google-code/android-scripting",
"path": "jruby/src/src/org/jruby/compiler/BodyCompiler.java",
"license": "apache-2.0",
"size": 24755
} | [
"org.jruby.lexer.yacc.ISourcePosition"
] | import org.jruby.lexer.yacc.ISourcePosition; | import org.jruby.lexer.yacc.*; | [
"org.jruby.lexer"
] | org.jruby.lexer; | 972,775 |
public void setRefs(final Map<String, Object> refs) {
this.refs = refs;
} | void function(final Map<String, Object> refs) { this.refs = refs; } | /**
* Set fetched referred persistent resource records.
*
* @param refs Referred persistent resource records by string
* representations of their corresponding references.
*/ | Set fetched referred persistent resource records | setRefs | {
"repo_name": "boylesoftware/thymes2",
"path": "src/main/java/org/bsworks/x2/resource/PersistentResourceFetchResult.java",
"license": "apache-2.0",
"size": 2765
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,157,334 |
@SuppressWarnings("deprecation")
public static double getFreeSpaceExternal() {
StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath());
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
return (double) stat.getAvailableBlocks() * (double) stat.ge... | @SuppressWarnings(STR) static double function() { StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath()); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { return (double) stat.getAvailableBlocks() * (double) stat.getBlockSize(); } else { return (double) stat.getAvailableBlocksLon... | /**
* Get the free space on the external storage device (like sd card)
*
* @return The free space in byte
*/ | Get the free space on the external storage device (like sd card) | getFreeSpaceExternal | {
"repo_name": "prescott66/Android-Remote",
"path": "app/src/de/qspool/clementineremote/utils/Utilities.java",
"license": "gpl-3.0",
"size": 7227
} | [
"android.os.Build",
"android.os.Environment",
"android.os.StatFs"
] | import android.os.Build; import android.os.Environment; import android.os.StatFs; | import android.os.*; | [
"android.os"
] | android.os; | 2,263,804 |
@Override
public Schema getSchema() {
return schema$;
} | Schema function() { return schema$; } | /**
* This method supports the Avro framework and is not intended to be called
* directly by the user.
*
* @return the schema object describing this class.
*
*/ | This method supports the Avro framework and is not intended to be called directly by the user | getSchema | {
"repo_name": "kineticadb/kinetica-api-java",
"path": "api/src/main/java/com/gpudb/protocol/DownloadFilesResponse.java",
"license": "mit",
"size": 6353
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 1,990,929 |
void removedTrace(INaviProject project, TraceList trace); | void removedTrace(INaviProject project, TraceList trace); | /**
* Invoked after a trace was removed from a project.
*
* @param project The project from which the trace was removed.
* @param trace The removed trace.
*/ | Invoked after a trace was removed from a project | removedTrace | {
"repo_name": "hoangcuongflp/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/IProjectListener.java",
"license": "apache-2.0",
"size": 5032
} | [
"com.google.security.zynamics.binnavi.debug.models.trace.TraceList"
] | import com.google.security.zynamics.binnavi.debug.models.trace.TraceList; | import com.google.security.zynamics.binnavi.debug.models.trace.*; | [
"com.google.security"
] | com.google.security; | 733,030 |
public static MethodLoading allArgumentsOf(MethodDescription methodDescription) {
return new MethodLoading(methodDescription, MethodLoading.TypeCastingHandler.NoOp.INSTANCE);
} | static MethodLoading function(MethodDescription methodDescription) { return new MethodLoading(methodDescription, MethodLoading.TypeCastingHandler.NoOp.INSTANCE); } | /**
* Loads all arguments of the provided method onto the operand stack.
*
* @param methodDescription The method for which all parameters are to be loaded onto the operand stack.
* @return A stack manipulation that loads all parameters of the provided method onto the operand stack.
*/ | Loads all arguments of the provided method onto the operand stack | allArgumentsOf | {
"repo_name": "DALDEI/byte-buddy",
"path": "byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/member/MethodVariableAccess.java",
"license": "apache-2.0",
"size": 16065
} | [
"net.bytebuddy.description.method.MethodDescription"
] | import net.bytebuddy.description.method.MethodDescription; | import net.bytebuddy.description.method.*; | [
"net.bytebuddy.description"
] | net.bytebuddy.description; | 1,981,455 |
private static CompoundStatement getIndexCalculationLocation (SubdomainIterator loop, CompoundStatement cmpstmtDefaultLocation)
{
// find the subdomain iterator iterating over the domain of the subdomain iterator loop
// and place the index calculations (i.e., the bounds for loop) within that subdomain
// ite... | static CompoundStatement function (SubdomainIterator loop, CompoundStatement cmpstmtDefaultLocation) { List<IndexBoundsCalculationInsertionAnnotation> listAnnotations = IndexBoundsCalculationInsertionAnnotation.getIndexBoundCalculationLocationsFor (loop); if (listAnnotations == null) return null; if (listAnnotations.si... | /**
* Determines the location at which the index calculations for loop
* <code>loop</code> are inserted.
*
* @param loop
* @param cmpstmtDefaultLocation
* @return The compound statement at which the index calculations are
* inserted. <code>null</code> is returned if the statement is to be
* ... | Determines the location at which the index calculations for loop <code>loop</code> are inserted | getIndexCalculationLocation | {
"repo_name": "bcosenza/patus",
"path": "src/ch/unibas/cs/hpwc/patus/codegen/iterator/MulticoreSubdomainIteratorCodeGenerator0.java",
"license": "lgpl-2.1",
"size": 14040
} | [
"ch.unibas.cs.hpwc.patus.ast.IndexBoundsCalculationInsertionAnnotation",
"ch.unibas.cs.hpwc.patus.ast.SubdomainIterator",
"java.util.List"
] | import ch.unibas.cs.hpwc.patus.ast.IndexBoundsCalculationInsertionAnnotation; import ch.unibas.cs.hpwc.patus.ast.SubdomainIterator; import java.util.List; | import ch.unibas.cs.hpwc.patus.ast.*; import java.util.*; | [
"ch.unibas.cs",
"java.util"
] | ch.unibas.cs; java.util; | 24,963 |
public boolean hasSubPools(Long poolId)
{
try
{
QuestionPoolService service = new QuestionPoolService();
return service.hasSubPools(poolId);
}
catch (Exception ex)
{
throw new QuestionPoolServiceException(ex);
}
} | boolean function(Long poolId) { try { QuestionPoolService service = new QuestionPoolService(); return service.hasSubPools(poolId); } catch (Exception ex) { throw new QuestionPoolServiceException(ex); } } | /**
* Checks to see if a pool has subpools
*/ | Checks to see if a pool has subpools | hasSubPools | {
"repo_name": "harfalm/Sakai-10.1",
"path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/shared/impl/questionpool/QuestionPoolServiceImpl.java",
"license": "apache-2.0",
"size": 9771
} | [
"org.sakaiproject.tool.assessment.services.QuestionPoolService",
"org.sakaiproject.tool.assessment.services.QuestionPoolServiceException"
] | import org.sakaiproject.tool.assessment.services.QuestionPoolService; import org.sakaiproject.tool.assessment.services.QuestionPoolServiceException; | import org.sakaiproject.tool.assessment.services.*; | [
"org.sakaiproject.tool"
] | org.sakaiproject.tool; | 1,523,349 |
public void start() throws LifecycleException {
// Perform normal superclass initialization
super.start();
} | void function() throws LifecycleException { super.start(); } | /**
* Prepare for active use of the public methods of this Component.
*
* @throws LifecycleException if this component detects a fatal error
* that prevents it from being started
*/ | Prepare for active use of the public methods of this Component | start | {
"repo_name": "NorthFacing/step-by-Java",
"path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/realm/JAASRealm.java",
"license": "gpl-2.0",
"size": 14357
} | [
"org.apache.catalina.LifecycleException"
] | import org.apache.catalina.LifecycleException; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 451,495 |
public String getTime( boolean inMilliseconds ) {
Calendar calendar = Calendar.getInstance();
String result = "";
if (inMilliseconds) {
result = String.valueOf(calendar.getTimeInMillis());
} else {
result = new SimpleDateFormat(DATE_FORMAT).format(calendar.g... | String function( boolean inMilliseconds ) { Calendar calendar = Calendar.getInstance(); String result = ""; if (inMilliseconds) { result = String.valueOf(calendar.getTimeInMillis()); } else { result = new SimpleDateFormat(DATE_FORMAT).format(calendar.getTime()); } return result; } | /**
* Get current system time
*
* @param inMilliseconds if the time value is in milliseconds or using a specific Date formatter
* @return the current system time
*/ | Get current system time | getTime | {
"repo_name": "Axway/ats-framework",
"path": "corelibrary/src/main/java/com/axway/ats/core/system/LocalSystemOperations.java",
"license": "apache-2.0",
"size": 22874
} | [
"java.text.SimpleDateFormat",
"java.util.Calendar"
] | import java.text.SimpleDateFormat; import java.util.Calendar; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 620,227 |
public void scrollToEnd() {
scrollToRow(escalator.getBody().getRowCount() - 1,
ScrollDestination.END);
} | void function() { scrollToRow(escalator.getBody().getRowCount() - 1, ScrollDestination.END); } | /**
* Scrolls to the end of the very last row.
*/ | Scrolls to the end of the very last row | scrollToEnd | {
"repo_name": "travisfw/vaadin",
"path": "client/src/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 285859
} | [
"com.vaadin.shared.ui.grid.ScrollDestination"
] | import com.vaadin.shared.ui.grid.ScrollDestination; | import com.vaadin.shared.ui.grid.*; | [
"com.vaadin.shared"
] | com.vaadin.shared; | 2,033,141 |
public void setHighValueColour(Color highValueColour) {
this.highValueColour = highValueColour;
updateColourDistance();
} | void function(Color highValueColour) { this.highValueColour = highValueColour; updateColourDistance(); } | /**
* Sets the colour to be used to fill cells of the heat map with the highest
* z-values in the dataset.
*
* <p>
* The full colour range will go through each RGB step between the high value
* colour and the low value colour.
*
* <p>
* Defaults to Color.BLACK.
*
* @param highValueCo... | Sets the colour to be used to fill cells of the heat map with the highest z-values in the dataset. The full colour range will go through each RGB step between the high value colour and the low value colour. Defaults to Color.BLACK | setHighValueColour | {
"repo_name": "mydzigear/weka.kmeanspp.silhouette_score",
"path": "wekafiles/packages/distributedWekaBase/src/main/java/org/tc33/jheatchart/HeatChart.java",
"license": "gpl-3.0",
"size": 59259
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 675,515 |
@RequirePOST
public final void doCancelQueue( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
asJob().checkPermission(Item.CANCEL);
Jenkins.getInstance().getQueue().cancel(asJob());
rsp.forwardToPreviousPage(req);
} | final void function( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { asJob().checkPermission(Item.CANCEL); Jenkins.getInstance().getQueue().cancel(asJob()); rsp.forwardToPreviousPage(req); } | /**
* Cancels a scheduled build.
* Create a method on your job marked {@link RequirePOST} but with the same signature and delegate to this.
*/ | Cancels a scheduled build. Create a method on your job marked <code>RequirePOST</code> but with the same signature and delegate to this | doCancelQueue | {
"repo_name": "jpbriend/jenkins",
"path": "core/src/main/java/jenkins/model/ParameterizedJobMixIn.java",
"license": "mit",
"size": 13841
} | [
"hudson.model.Item",
"java.io.IOException",
"javax.servlet.ServletException",
"org.kohsuke.stapler.StaplerRequest",
"org.kohsuke.stapler.StaplerResponse"
] | import hudson.model.Item; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; | import hudson.model.*; import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*; | [
"hudson.model",
"java.io",
"javax.servlet",
"org.kohsuke.stapler"
] | hudson.model; java.io; javax.servlet; org.kohsuke.stapler; | 2,195,543 |
public BeanDefinition parse(Element element, ParserContext parserContext, Object defaultSerializer) {
String strategy = element.getAttribute(STRATEGY_ATTRIBUTE);
Class<?> chainType = LazyUpcasterChain.class;
if (STRATEGY_EAGER.equals(strategy)) {
chainType = SimpleUpcasterChain.c... | BeanDefinition function(Element element, ParserContext parserContext, Object defaultSerializer) { String strategy = element.getAttribute(STRATEGY_ATTRIBUTE); Class<?> chainType = LazyUpcasterChain.class; if (STRATEGY_EAGER.equals(strategy)) { chainType = SimpleUpcasterChain.class; } BeanDefinition bd = BeanDefinitionBu... | /**
* Parses the given <code>element</code>, using the given <code>defaultSerializer</code> if none is explicitly
* configured.
*
* @param element The element in the application context representing the UpcasterChain
* @param parserContext The parserContext from the application co... | Parses the given <code>element</code>, using the given <code>defaultSerializer</code> if none is explicitly configured | parse | {
"repo_name": "christiaandejong/AxonFramework",
"path": "core/src/main/java/org/axonframework/contextsupport/spring/UpcasterChainBeanDefinitionParser.java",
"license": "apache-2.0",
"size": 4357
} | [
"org.axonframework.upcasting.LazyUpcasterChain",
"org.axonframework.upcasting.SimpleUpcasterChain",
"org.springframework.beans.factory.config.BeanDefinition",
"org.springframework.beans.factory.config.RuntimeBeanReference",
"org.springframework.beans.factory.support.BeanDefinitionBuilder",
"org.springfram... | import org.axonframework.upcasting.LazyUpcasterChain; import org.axonframework.upcasting.SimpleUpcasterChain; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.BeanDefinitionBuilder; impo... | import org.axonframework.upcasting.*; import org.springframework.beans.factory.config.*; import org.springframework.beans.factory.support.*; import org.springframework.beans.factory.xml.*; import org.w3c.dom.*; | [
"org.axonframework.upcasting",
"org.springframework.beans",
"org.w3c.dom"
] | org.axonframework.upcasting; org.springframework.beans; org.w3c.dom; | 13,316 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.