method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void addBundle(String bundleId, String bundleUri, String bundlePath,
String activator, Map<String, String> params) {
nativeAddBundle(bundleId, bundleUri, bundlePath, activator, params);
} | void function(String bundleId, String bundleUri, String bundlePath, String activator, Map<String, String> params) { nativeAddBundle(bundleId, bundleUri, bundlePath, activator, params); } | /**
* API for adding the bundle to the Container
*
* @param bundleId
* Id of the Bundle
* @param bundleUri
* Uri of the bundle
* @param bundlePath
* Path of the bundle
* @param activator
* Activation prefix for .so bundles, or... | API for adding the bundle to the Container | addBundle | {
"repo_name": "santais/iotivity",
"path": "service/resource-container/android/resource-container/src/main/java/org/iotivity/service/resourcecontainer/RcsResourceContainer.java",
"license": "apache-2.0",
"size": 14155
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,106,810 |
public void updateObject(int columnIndex, Object x) throws SQLException {
checksBeforeUpdateXXX("updateObject", columnIndex);
int colType = getColumnType(columnIndex);
if (colType == Types.JAVA_OBJECT) {
try {
((UserDataValue) getDVDforColumnToBeUpdated(columnIndex, "updateObject")).setValue(x);
ret... | void function(int columnIndex, Object x) throws SQLException { checksBeforeUpdateXXX(STR, columnIndex); int colType = getColumnType(columnIndex); if (colType == Types.JAVA_OBJECT) { try { ((UserDataValue) getDVDforColumnToBeUpdated(columnIndex, STR)).setValue(x); return; } catch (StandardException t) { throw noStateCha... | /**
* JDBC 2.0
*
* Update a column with an Object value.
*
* The updateXXX() methods are used to update column values in the current
* row, or the insert row. The updateXXX() methods do not update the
* underlying database, instead the updateRow() or insertRow() methods are
* called to update the databa... | JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database | updateObject | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"license": "apache-2.0",
"size": 178663
} | [
"java.sql.Blob",
"java.sql.Clob",
"java.sql.Date",
"java.sql.SQLException",
"java.sql.Time",
"java.sql.Timestamp",
"java.sql.Types",
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.types.UserDataValue"
] | import java.sql.Blob; import java.sql.Clob; import java.sql.Date; import java.sql.SQLException; import java.sql.Time; import java.sql.Timestamp; import java.sql.Types; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.types.UserDataValue; | import java.sql.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.types.*; | [
"java.sql",
"org.apache.derby"
] | java.sql; org.apache.derby; | 348,545 |
public ConsistencyLevel getConsistencyLevel()
{
return (cLevel != null) ? cLevel : defaultConsistency;
} | ConsistencyLevel function() { return (cLevel != null) ? cLevel : defaultConsistency; } | /**
* Returns the consistency level of this <code>UPDATE</code> statement, either
* one parsed from the CQL statement, or the default level otherwise.
*
* @return the consistency level as a Thrift enum.
*/ | Returns the consistency level of this <code>UPDATE</code> statement, either one parsed from the CQL statement, or the default level otherwise | getConsistencyLevel | {
"repo_name": "HyczZhu/dtcassandra",
"path": "src/java/org/apache/cassandra/cql/UpdateStatement.java",
"license": "apache-2.0",
"size": 5641
} | [
"org.apache.cassandra.thrift.ConsistencyLevel"
] | import org.apache.cassandra.thrift.ConsistencyLevel; | import org.apache.cassandra.thrift.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 1,945,891 |
public static TkeyDoppelkommandoCustomBean getDefaultDoppelkommando1() {
return defaultDoppelkommando1;
} | static TkeyDoppelkommandoCustomBean function() { return defaultDoppelkommando1; } | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getDefaultDoppelkommando1 | {
"repo_name": "cismet/belis-client",
"path": "src/main/java/de/cismet/belis/broker/BelisBroker.java",
"license": "gpl-3.0",
"size": 138018
} | [
"de.cismet.cids.custom.beans.belis2.TkeyDoppelkommandoCustomBean"
] | import de.cismet.cids.custom.beans.belis2.TkeyDoppelkommandoCustomBean; | import de.cismet.cids.custom.beans.belis2.*; | [
"de.cismet.cids"
] | de.cismet.cids; | 69,653 |
@InterfaceAudience.Public
public void setValidation(String name, Validator validator) {
if(validations == null) {
validations = new HashMap<String, Validator>();
}
if (validator != null) {
validations.put(name, validator);
}
else {
vali... | @InterfaceAudience.Public void function(String name, Validator validator) { if(validations == null) { validations = new HashMap<String, Validator>(); } if (validator != null) { validations.put(name, validator); } else { validations.remove(name); } } | /**
* Defines or clears a named document validation function.
* Before any change to the database, all registered validation functions are called and given a
* chance to reject it. (This includes incoming changes from a pull replication.)
*/ | Defines or clears a named document validation function. Before any change to the database, all registered validation functions are called and given a chance to reject it. (This includes incoming changes from a pull replication.) | setValidation | {
"repo_name": "netsense-sas/couchbase-lite-java-core",
"path": "src/main/java/com/couchbase/lite/Database.java",
"license": "apache-2.0",
"size": 203426
} | [
"com.couchbase.lite.internal.InterfaceAudience",
"java.util.HashMap"
] | import com.couchbase.lite.internal.InterfaceAudience; import java.util.HashMap; | import com.couchbase.lite.internal.*; import java.util.*; | [
"com.couchbase.lite",
"java.util"
] | com.couchbase.lite; java.util; | 507,504 |
private static Map<String, Class> computelinks(Collection<Component> _components) {
Map<String, Class> ret = new HashMap<>();
for (Component c : _components) {
if (c.getStrategy() != null)
ret.put(c.getUuid(), c.getStrategy().getClass());
}
return ret;
} | static Map<String, Class> function(Collection<Component> _components) { Map<String, Class> ret = new HashMap<>(); for (Component c : _components) { if (c.getStrategy() != null) ret.put(c.getUuid(), c.getStrategy().getClass()); } return ret; } | /**
* Recupere le nom des strategies associees aux composants
*
* @param _components
* @return
*/ | Recupere le nom des strategies associees aux composants | computelinks | {
"repo_name": "jmarginier/simulator",
"path": "simulator/src/main/java/fr/ensicaen/simulator/model/dao/ScenarioData.java",
"license": "apache-2.0",
"size": 6485
} | [
"fr.ensicaen.simulator.model.component.Component",
"java.util.Collection",
"java.util.HashMap",
"java.util.Map"
] | import fr.ensicaen.simulator.model.component.Component; import java.util.Collection; import java.util.HashMap; import java.util.Map; | import fr.ensicaen.simulator.model.component.*; import java.util.*; | [
"fr.ensicaen.simulator",
"java.util"
] | fr.ensicaen.simulator; java.util; | 2,283,048 |
private void populateNativeAdView(NativeAd nativeAd, NativeAdView adView) {
adView.setMediaView((MediaView) adView.findViewById(R.id.ad_media));
adView.setHeadlineView(adView.findViewById(R.id.ad_headline));
adView.setBodyView(adView.findViewById(R.id.ad_body));
adView.setCallToActionView(adView.find... | void function(NativeAd nativeAd, NativeAdView adView) { adView.setMediaView((MediaView) adView.findViewById(R.id.ad_media)); adView.setHeadlineView(adView.findViewById(R.id.ad_headline)); adView.setBodyView(adView.findViewById(R.id.ad_body)); adView.setCallToActionView(adView.findViewById(R.id.ad_call_to_action)); adVi... | /**
* Populates a {@link NativeAdView} object with data from a given {@link NativeAd}.
*
* @param nativeAd the object containing the ad's assets
* @param adView the view to be populated
*/ | Populates a <code>NativeAdView</code> object with data from a given <code>NativeAd</code> | populateNativeAdView | {
"repo_name": "googleads/googleads-mobile-android-examples",
"path": "java/advanced/APIDemo/app/src/main/java/com/google/android/gms/example/apidemo/AdMobCustomMuteThisAdFragment.java",
"license": "apache-2.0",
"size": 9758
} | [
"android.view.View",
"android.widget.Button",
"android.widget.ImageView",
"android.widget.RatingBar",
"android.widget.TextView",
"com.google.android.gms.ads.nativead.MediaView",
"com.google.android.gms.ads.nativead.NativeAd",
"com.google.android.gms.ads.nativead.NativeAdView"
] | import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.RatingBar; import android.widget.TextView; import com.google.android.gms.ads.nativead.MediaView; import com.google.android.gms.ads.nativead.NativeAd; import com.google.android.gms.ads.nativead.NativeAdView; | import android.view.*; import android.widget.*; import com.google.android.gms.ads.nativead.*; | [
"android.view",
"android.widget",
"com.google.android"
] | android.view; android.widget; com.google.android; | 1,265,150 |
public void collectionProcessComplete(ProcessTrace trace)
throws ResourceProcessException, IOException {
GIS.PRINT_MESSAGES = false;
char eos[] = null;
if (eosChars != null) {
eos = eosChars.toCharArray();
}
SentenceDetectorFactory sdFactory = SentenceDetectorFactory.create(... | void function(ProcessTrace trace) throws ResourceProcessException, IOException { GIS.PRINT_MESSAGES = false; char eos[] = null; if (eosChars != null) { eos = eosChars.toCharArray(); } SentenceDetectorFactory sdFactory = SentenceDetectorFactory.create( null, language, true, null, eos); TrainingParameters mlParams = Mode... | /**
* Called if the processing is finished, this method
* does the training.
*/ | Called if the processing is finished, this method does the training | collectionProcessComplete | {
"repo_name": "SowaLabs/OpenNLP",
"path": "opennlp-uima/src/main/java/opennlp/uima/sentdetect/SentenceDetectorTrainer.java",
"license": "apache-2.0",
"size": 6794
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter",
"java.io.Writer",
"org.apache.uima.resource.ResourceProcessException",
"org.apache.uima.util.ProcessTrace"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import org.apache.uima.resource.ResourceProcessException; import org.apache.uima.util.ProcessTrace; | import java.io.*; import org.apache.uima.resource.*; import org.apache.uima.util.*; | [
"java.io",
"org.apache.uima"
] | java.io; org.apache.uima; | 2,188,012 |
public MetaProperty<Boolean> notionalExchange() {
return notionalExchange;
} | MetaProperty<Boolean> function() { return notionalExchange; } | /**
* The meta-property for the {@code notionalExchange} property.
* @return the meta-property, not null
*/ | The meta-property for the notionalExchange property | notionalExchange | {
"repo_name": "OpenGamma/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/swap/type/InflationRateSwapLegConvention.java",
"license": "apache-2.0",
"size": 27910
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 325,262 |
public static MozuClient<com.mozu.api.contracts.sitesettings.order.CartSettings> getCartSettingsClient(String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.settings.CartSettingsUrl.getCartSettingsUrl(responseFields);
String verb = "GET";
Class<?> clz = com.mozu.api.contracts.... | static MozuClient<com.mozu.api.contracts.sitesettings.order.CartSettings> function(String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.settings.CartSettingsUrl.getCartSettingsUrl(responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.sitesettings.order.CartSettings.cl... | /**
*
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.sitesettings.order.CartSettings> mozuClient=GetCartSettingsClient( responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* CartSettings cartSettings = client.Result();
* </code></pre></p>
* @param responseFields Filt... | <code><code> MozuClient mozuClient=GetCartSettingsClient( responseFields); client.setBaseAddress(url); client.executeRequest(); CartSettings cartSettings = client.Result(); </code></code> | getCartSettingsClient | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/settings/CartSettingsClient.java",
"license": "mit",
"size": 7480
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,438,665 |
public Command addMaterialCommandToLeftSideMenu(String name, char icon, final ActionListener ev) {
Command cmd = Command.create(name, null, ev);
setCommandMaterialIcon(cmd, icon, "SideCommand");
addCommandToLeftSideMenu(cmd);
return cmd;
}
| Command function(String name, char icon, final ActionListener ev) { Command cmd = Command.create(name, null, ev); setCommandMaterialIcon(cmd, icon, STR); addCommandToLeftSideMenu(cmd); return cmd; } | /**
* Adds a Command to the left side navigation menu with a material design
* icon reference {@link com.codename1.ui.FontImage}.
*
* @param name the name/title of the command
* @param icon the icon for the command
* @param ev the even handler
* @return a newly created Command ... | Adds a Command to the left side navigation menu with a material design icon reference <code>com.codename1.ui.FontImage</code> | addMaterialCommandToLeftSideMenu | {
"repo_name": "codenameone/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/Toolbar.java",
"license": "gpl-2.0",
"size": 114065
} | [
"com.codename1.ui.events.ActionListener"
] | import com.codename1.ui.events.ActionListener; | import com.codename1.ui.events.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 1,465,167 |
@Test
public void inodePathExists() throws Exception {
assertFalse(mTree.inodePathExists(TEST_URI));
createPath(mTree, TEST_URI, sFileOptions);
assertTrue(mTree.inodePathExists(TEST_URI));
deleteInodeByPath(mTree, TEST_URI);
assertFalse(mTree.inodePathExists(TEST_URI));
} | void function() throws Exception { assertFalse(mTree.inodePathExists(TEST_URI)); createPath(mTree, TEST_URI, sFileOptions); assertTrue(mTree.inodePathExists(TEST_URI)); deleteInodeByPath(mTree, TEST_URI); assertFalse(mTree.inodePathExists(TEST_URI)); } | /**
* Tests {@link InodeTree#inodePathExists(AlluxioURI)}.
*/ | Tests <code>InodeTree#inodePathExists(AlluxioURI)</code> | inodePathExists | {
"repo_name": "ChangerYoung/alluxio",
"path": "core/server/master/src/test/java/alluxio/master/file/meta/InodeTreeTest.java",
"license": "apache-2.0",
"size": 29711
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,290,943 |
public int read() throws EOFException; | int function() throws EOFException; | /**
* Reads a code unit.
*/ | Reads a code unit | read | {
"repo_name": "alibaba/atlas",
"path": "atlas-update/src/main/java/com/taobao/atlas/dexmerge/dx/io/instructions/CodeInput.java",
"license": "apache-2.0",
"size": 1364
} | [
"java.io.EOFException"
] | import java.io.EOFException; | import java.io.*; | [
"java.io"
] | java.io; | 2,473,521 |
private HashTree getProperBranch(HashTree tree) {
for (Object o : new LinkedList<>(tree.list())) {
TestElement item = (TestElement) o;
//if we found a TestPlan, then we are on our way to the TestFragment
if (item instanceof TestPlan)
{
return ... | HashTree function(HashTree tree) { for (Object o : new LinkedList<>(tree.list())) { TestElement item = (TestElement) o; if (item instanceof TestPlan) { return getProperBranch(tree.getTree(item)); } if (item instanceof TestFragmentController) { return tree.getTree(item); } } log.warn(STR); return new HashTree(); } | /**
* Extract from tree (included test plan) all Test Elements located in a Test Fragment
* @param tree HashTree included Test Plan
* @return HashTree Subset within Test Fragment or Empty HashTree
*/ | Extract from tree (included test plan) all Test Elements located in a Test Fragment | getProperBranch | {
"repo_name": "ubikfsabbe/jmeter",
"path": "src/components/org/apache/jmeter/control/IncludeController.java",
"license": "apache-2.0",
"size": 7479
} | [
"java.util.LinkedList",
"org.apache.jmeter.testelement.TestElement",
"org.apache.jmeter.testelement.TestPlan",
"org.apache.jorphan.collections.HashTree"
] | import java.util.LinkedList; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.TestPlan; import org.apache.jorphan.collections.HashTree; | import java.util.*; import org.apache.jmeter.testelement.*; import org.apache.jorphan.collections.*; | [
"java.util",
"org.apache.jmeter",
"org.apache.jorphan"
] | java.util; org.apache.jmeter; org.apache.jorphan; | 300,914 |
public synchronized String startNode(Settings.Builder settings) {
return startNode(settings.build());
} | synchronized String function(Settings.Builder settings) { return startNode(settings.build()); } | /**
* Starts a node with the given settings builder and returns it's name.
*/ | Starts a node with the given settings builder and returns it's name | startNode | {
"repo_name": "zkidkid/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java",
"license": "apache-2.0",
"size": 85193
} | [
"org.elasticsearch.common.settings.Settings"
] | import org.elasticsearch.common.settings.Settings; | import org.elasticsearch.common.settings.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 58,247 |
public byte[] toByteArray() {
return Arrays.clone(bytes);
} | byte[] function() { return Arrays.clone(bytes); } | /**
* The digest representing the address
*
* @return a copy of the digest
*/ | The digest representing the address | toByteArray | {
"repo_name": "DigitalAssetCom/hlp-candidate",
"path": "client/api/src/main/java/org/hyperledger/common/Address.java",
"license": "apache-2.0",
"size": 4696
} | [
"org.bouncycastle.util.Arrays"
] | import org.bouncycastle.util.Arrays; | import org.bouncycastle.util.*; | [
"org.bouncycastle.util"
] | org.bouncycastle.util; | 1,949,842 |
public SLExpressionNode createBinary(Token opToken, SLExpressionNode leftNode, SLExpressionNode rightNode) {
final SLExpressionNode result;
switch (opToken.val) {
case "+":
result = SLAddNodeGen.create(leftNode, rightNode);
break;
case "*":
... | SLExpressionNode function(Token opToken, SLExpressionNode leftNode, SLExpressionNode rightNode) { final SLExpressionNode result; switch (opToken.val) { case "+": result = SLAddNodeGen.create(leftNode, rightNode); break; case "*": result = SLMulNodeGen.create(leftNode, rightNode); break; case "/": result = SLDivNodeGen.... | /**
* Returns the corresponding subclass of {@link SLExpressionNode} for binary expressions. </br>
* These nodes are currently not instrumented.
*
* @param opToken The operator of the binary expression
* @param leftNode The left node of the expression
* @param rightNode The right node of t... | Returns the corresponding subclass of <code>SLExpressionNode</code> for binary expressions. These nodes are currently not instrumented | createBinary | {
"repo_name": "azadmanesh/sl-tracer",
"path": "truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SLNodeFactory.java",
"license": "gpl-2.0",
"size": 24522
} | [
"com.oracle.truffle.sl.nodes.SLExpressionNode",
"com.oracle.truffle.sl.nodes.expression.SLAddNodeGen",
"com.oracle.truffle.sl.nodes.expression.SLDivNodeGen",
"com.oracle.truffle.sl.nodes.expression.SLEqualNodeGen",
"com.oracle.truffle.sl.nodes.expression.SLLessOrEqualNodeGen",
"com.oracle.truffle.sl.nodes... | import com.oracle.truffle.sl.nodes.SLExpressionNode; import com.oracle.truffle.sl.nodes.expression.SLAddNodeGen; import com.oracle.truffle.sl.nodes.expression.SLDivNodeGen; import com.oracle.truffle.sl.nodes.expression.SLEqualNodeGen; import com.oracle.truffle.sl.nodes.expression.SLLessOrEqualNodeGen; import com.oracle... | import com.oracle.truffle.sl.nodes.*; import com.oracle.truffle.sl.nodes.expression.*; import com.oracle.truffle.sl.tracer.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 1,273,415 |
private void handleKeyTap(KeyTapGesture g) {
try {
mcClickMouseMethod.invoke(getMinecraft(), 2);
} catch (Exception ex) {
System.out.println("!! Leap: Error invoking Minecraft method!");
ex.printStackTrace();
}
} | void function(KeyTapGesture g) { try { mcClickMouseMethod.invoke(getMinecraft(), 2); } catch (Exception ex) { System.out.println(STR); ex.printStackTrace(); } } | /**
* Handles a key tap gesture.
*
* @param g the KeyTapGesture to use
*/ | Handles a key tap gesture | handleKeyTap | {
"repo_name": "forairan/Leapcraft",
"path": "com/forairan/leap/LeapManager.java",
"license": "apache-2.0",
"size": 7125
} | [
"com.leapmotion.leap.KeyTapGesture"
] | import com.leapmotion.leap.KeyTapGesture; | import com.leapmotion.leap.*; | [
"com.leapmotion.leap"
] | com.leapmotion.leap; | 2,854,997 |
@Test
public final void testDetachDeserializer() {
User user = new User(1, "Riza", "Hawkeye", 29, false);
String subpath = "/detach", body = new Gson().toJson(user);
stubFor(get(urlEqualTo(subpath))
.willReturn(aResponse()
.withBody(body)));
String responseContent = "";
try {
re... | @Test final void function() { User user = new User(1, "Riza", STR, 29, false); String subpath = STR, body = new Gson().toJson(user); stubFor(get(urlEqualTo(subpath)) .willReturn(aResponse() .withBody(body))); String responseContent = STRJSON deserialization was attempted."); } verify(getRequestedFor(urlEqualTo(subpath)... | /**
* <p>Test for detachment of the inherited deserializer.</p>
*
* @since 1.3.0
*/ | Test for detachment of the inherited deserializer | testDetachDeserializer | {
"repo_name": "sahan/ZombieLink",
"path": "zombielink/src/test/java/com/lonepulse/zombielink/processor/DeserializerEndpointTest.java",
"license": "apache-2.0",
"size": 8605
} | [
"com.github.tomakehurst.wiremock.client.WireMock",
"com.google.gson.Gson",
"com.lonepulse.zombielink.model.User",
"org.junit.Assert",
"org.junit.Test"
] | import com.github.tomakehurst.wiremock.client.WireMock; import com.google.gson.Gson; import com.lonepulse.zombielink.model.User; import org.junit.Assert; import org.junit.Test; | import com.github.tomakehurst.wiremock.client.*; import com.google.gson.*; import com.lonepulse.zombielink.model.*; import org.junit.*; | [
"com.github.tomakehurst",
"com.google.gson",
"com.lonepulse.zombielink",
"org.junit"
] | com.github.tomakehurst; com.google.gson; com.lonepulse.zombielink; org.junit; | 2,136,936 |
@Test
public void testRequestWithApproxMatchFilter()
{
Dsmlv2Parser parser = null;
try
{
parser = newParser();
parser.setInput(
SearchRequestTest.class.getResource( "filters/request_with_approxMatch.xml" ).openStream(), "UTF-8" );
... | void function() { Dsmlv2Parser parser = null; try { parser = newParser(); parser.setInput( SearchRequestTest.class.getResource( STR ).openStream(), "UTF-8" ); parser.parse(); } catch ( Exception e ) { fail( e.getMessage() ); } SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();... | /**
* Test parsing of a request with an approxMatch Filter
*/ | Test parsing of a request with an approxMatch Filter | testRequestWithApproxMatchFilter | {
"repo_name": "darranl/directory-shared",
"path": "dsml/parser/src/test/java/org/apache/directory/api/dsmlv2/searchRequest/SearchRequestTest.java",
"license": "apache-2.0",
"size": 67826
} | [
"org.apache.directory.api.dsmlv2.Dsmlv2Parser",
"org.apache.directory.api.ldap.model.filter.ApproximateNode",
"org.apache.directory.api.ldap.model.filter.ExprNode",
"org.apache.directory.api.ldap.model.message.SearchRequest",
"org.junit.Assert"
] | import org.apache.directory.api.dsmlv2.Dsmlv2Parser; import org.apache.directory.api.ldap.model.filter.ApproximateNode; import org.apache.directory.api.ldap.model.filter.ExprNode; import org.apache.directory.api.ldap.model.message.SearchRequest; import org.junit.Assert; | import org.apache.directory.api.dsmlv2.*; import org.apache.directory.api.ldap.model.filter.*; import org.apache.directory.api.ldap.model.message.*; import org.junit.*; | [
"org.apache.directory",
"org.junit"
] | org.apache.directory; org.junit; | 1,656,988 |
@Variability(id = { AnnotationConstants.VAR_CURRENT_PROCESS_DATA,
AnnotationConstants.VAR_IO_DATA }, op = Operation.AND)
public IoStatistics getCurrentProcessIo();
| @Variability(id = { AnnotationConstants.VAR_CURRENT_PROCESS_DATA, AnnotationConstants.VAR_IO_DATA }, op = Operation.AND) IoStatistics function(); | /**
* Returns the I/O statistics of the current process.
*
* @return the I/O statistics of the current process, may
* be <b>null</b> if invalid
*/ | Returns the I/O statistics of the current process | getCurrentProcessIo | {
"repo_name": "SSEHUB/spassMeter",
"path": "gearsBridgeJ/src/de/uni_hildesheim/sse/system/IThisProcessDataGatherer.java",
"license": "apache-2.0",
"size": 4927
} | [
"de.uni_hildesheim.sse.codeEraser.annotations.Operation",
"de.uni_hildesheim.sse.codeEraser.annotations.Variability"
] | import de.uni_hildesheim.sse.codeEraser.annotations.Operation; import de.uni_hildesheim.sse.codeEraser.annotations.Variability; | import de.uni_hildesheim.sse.*; | [
"de.uni_hildesheim.sse"
] | de.uni_hildesheim.sse; | 1,486,082 |
Map<Integer, String> getSpeciesTaxonIdsAndNames();
| Map<Integer, String> getSpeciesTaxonIdsAndNames(); | /**
* Returns the species taonomy ids and names.
*
* @return the species taonomy ids and names
*/ | Returns the species taonomy ids and names | getSpeciesTaxonIdsAndNames | {
"repo_name": "compomics/compomics-sigpep",
"path": "sigpep-persistence/src/main/java/com/compomics/sigpep/persistence/dao/SimpleQueryDao.java",
"license": "apache-2.0",
"size": 8358
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,985,786 |
private int increaseNodeNominated(Node node) {
int nominations = increaseIntAttribute(node, NOMINATED);
return nominations;
} | int function(Node node) { int nominations = increaseIntAttribute(node, NOMINATED); return nominations; } | /**
* Increase {@code nodenominated} attribute for the specified node.
*
* @param node
* the node
* @return the new value
*/ | Increase nodenominated attribute for the specified node | increaseNodeNominated | {
"repo_name": "r-kober/ReCaLys",
"path": "ReCaLys/src/de/upb/recalys/visualization/PieGraph.java",
"license": "mit",
"size": 12121
} | [
"org.graphstream.graph.Node"
] | import org.graphstream.graph.Node; | import org.graphstream.graph.*; | [
"org.graphstream.graph"
] | org.graphstream.graph; | 199,239 |
@Override
public Iterator<Card> iterator() {
return cards.iterator();
} | Iterator<Card> function() { return cards.iterator(); } | /**
* Returns an iterator for the hand.
* @return an iterator for the hand
*/ | Returns an iterator for the hand | iterator | {
"repo_name": "addcninblue/blackjack",
"path": "src/game/Hand.java",
"license": "apache-2.0",
"size": 3237
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,853,593 |
HierarchyBrowser createHierarchyBrowser(final PsiElement target); | HierarchyBrowser createHierarchyBrowser(final PsiElement target); | /**
* Creates a browser for viewing the hierarchy of the specified element.
*
* @param target the element to view the hierarchy for.
* @return the browser instance.
*/ | Creates a browser for viewing the hierarchy of the specified element | createHierarchyBrowser | {
"repo_name": "jexp/idea2",
"path": "platform/lang-api/src/com/intellij/ide/hierarchy/HierarchyProvider.java",
"license": "apache-2.0",
"size": 2217
} | [
"com.intellij.psi.PsiElement"
] | import com.intellij.psi.PsiElement; | import com.intellij.psi.*; | [
"com.intellij.psi"
] | com.intellij.psi; | 1,354,506 |
public static void levelUp(EntityPlayer player, ItemStack stack)
{
NBTTagCompound nbt = stack.getTagCompound();
if (nbt != null)
{
while (Experience.getLevel(nbt) < Config.maxLevel && Experience.getExperience(nbt) >= Experience.getNextLevelExperience(Experience.getLevel(nbt)))
{
Experience.setLev... | static void function(EntityPlayer player, ItemStack stack) { NBTTagCompound nbt = stack.getTagCompound(); if (nbt != null) { while (Experience.getLevel(nbt) < Config.maxLevel && Experience.getExperience(nbt) >= Experience.getNextLevelExperience(Experience.getLevel(nbt))) { Experience.setLevel(nbt, Experience.getLevel(n... | /**
* Levels up the current weapon/armor to the next level, assuming it is not at max level.
* @param player
* @param stack
*/ | Levels up the current weapon/armor to the next level, assuming it is not at max level | levelUp | {
"repo_name": "TheXFactor117/Levels",
"path": "src/main/java/com/thexfactor117/levels/leveling/Experience.java",
"license": "gpl-2.0",
"size": 4659
} | [
"com.thexfactor117.levels.config.Config",
"com.thexfactor117.levels.util.NBTHelper",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemArmor",
"net.minecraft.item.ItemAxe",
"net.minecraft.item.ItemStack",
"net.minecraft.item.ItemSword",
"net.minecraft.nbt.NBTTagCompound",
"net.mine... | import com.thexfactor117.levels.config.Config; import com.thexfactor117.levels.util.NBTHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.nbt.NBTTa... | import com.thexfactor117.levels.config.*; import com.thexfactor117.levels.util.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.nbt.*; import net.minecraft.util.text.*; | [
"com.thexfactor117.levels",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.nbt",
"net.minecraft.util"
] | com.thexfactor117.levels; net.minecraft.entity; net.minecraft.item; net.minecraft.nbt; net.minecraft.util; | 1,631,441 |
@Test
public void testSimpleMovingAverage() {
logger.info("simpleMovingAverage");
FlatDataList flatDataList = generateFlatDataList();
int N = 3;
double expResult = 23.0;
double result = Smoothing.simpleMovingAverage(flatDataList, N);
assertEquals(expResult, result... | void function() { logger.info(STR); FlatDataList flatDataList = generateFlatDataList(); int N = 3; double expResult = 23.0; double result = Smoothing.simpleMovingAverage(flatDataList, N); assertEquals(expResult, result, Constants.DOUBLE_ACCURACY_HIGH); } | /**
* Test of simpleMovingAverage method, of class Smoothing.
*/ | Test of simpleMovingAverage method, of class Smoothing | testSimpleMovingAverage | {
"repo_name": "datumbox/datumbox-framework",
"path": "datumbox-framework-core/src/test/java/com/datumbox/framework/core/statistics/timeseries/SmoothingTest.java",
"license": "apache-2.0",
"size": 4498
} | [
"com.datumbox.framework.common.dataobjects.FlatDataList",
"com.datumbox.framework.tests.Constants",
"org.junit.Assert"
] | import com.datumbox.framework.common.dataobjects.FlatDataList; import com.datumbox.framework.tests.Constants; import org.junit.Assert; | import com.datumbox.framework.common.dataobjects.*; import com.datumbox.framework.tests.*; import org.junit.*; | [
"com.datumbox.framework",
"org.junit"
] | com.datumbox.framework; org.junit; | 2,064,590 |
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[] {
new MBeanNotificationInfo(
new String[] { AttributeChangeNotification.ATTRIBUTE_CHANGE },
AttributeChangeNotification.class.getName(),
"This notification is emitted whe... | MBeanNotificationInfo[] function() { return new MBeanNotificationInfo[] { new MBeanNotificationInfo( new String[] { AttributeChangeNotification.ATTRIBUTE_CHANGE }, AttributeChangeNotification.class.getName(), STR) }; } private String state = STR; private int nbChanges = 0; private int nbResets = 0; | /**
* Returns an array indicating, for each notification this MBean
* may send, the name of the Java class of the notification and
* the notification type.</p>
*
* @return the array of possible notifications.
*/ | Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type | getNotificationInfo | {
"repo_name": "linewx/Derecho",
"path": "jmx/src/main/java/com/cloudrain/dercho/jmx/Security/subject_delegation/mbeans/SimpleStandard.java",
"license": "apache-2.0",
"size": 6329
} | [
"javax.management.AttributeChangeNotification",
"javax.management.MBeanNotificationInfo"
] | import javax.management.AttributeChangeNotification; import javax.management.MBeanNotificationInfo; | import javax.management.*; | [
"javax.management"
] | javax.management; | 500,768 |
private Strategy findStrategy(final VersionResolution resolution)
{
final String dependencyName = resolution.getDependencyName();
Strategy strategy = (Strategy) resolverMap.get(dependencyName);
if (strategy != null) {
LOG.debug("Found direct match: {}", strategy.getName());
... | Strategy function(final VersionResolution resolution) { final String dependencyName = resolution.getDependencyName(); Strategy strategy = (Strategy) resolverMap.get(dependencyName); if (strategy != null) { LOG.debug(STR, strategy.getName()); return strategy; } final String[] elements = StringUtils.split(dependencyName,... | /**
* Locate the version strategy for a given version resolution. This will try
* to locate a direct match and also do wildcard match on "group only" and "group and artifact".
*/ | Locate the version strategy for a given version resolution. This will try to locate a direct match and also do wildcard match on "group only" and "group and artifact" | findStrategy | {
"repo_name": "ning/maven-dependency-versions-check-plugin",
"path": "src/main/java/com/ning/maven/plugins/dependencyversionscheck/AbstractDependencyVersionsMojo.java",
"license": "apache-2.0",
"size": 39126
} | [
"com.ning.maven.plugins.dependencyversionscheck.strategy.Strategy",
"com.ning.maven.plugins.dependencyversionscheck.version.VersionResolution",
"java.util.Iterator",
"java.util.Map",
"java.util.regex.Pattern",
"org.apache.commons.lang.StringUtils"
] | import com.ning.maven.plugins.dependencyversionscheck.strategy.Strategy; import com.ning.maven.plugins.dependencyversionscheck.version.VersionResolution; import java.util.Iterator; import java.util.Map; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; | import com.ning.maven.plugins.dependencyversionscheck.strategy.*; import com.ning.maven.plugins.dependencyversionscheck.version.*; import java.util.*; import java.util.regex.*; import org.apache.commons.lang.*; | [
"com.ning.maven",
"java.util",
"org.apache.commons"
] | com.ning.maven; java.util; org.apache.commons; | 2,336,373 |
public static void setDataBase(BibDatabase db) {
database = db;
} | static void function(BibDatabase db) { database = db; } | /**
* Required for LabelPatternUtilTest
*
* @param db the DB to use as global database
*/ | Required for LabelPatternUtilTest | setDataBase | {
"repo_name": "motokito/jabref",
"path": "src/main/java/net/sf/jabref/logic/bibtexkeypattern/BibtexKeyPatternUtil.java",
"license": "mit",
"size": 53518
} | [
"net.sf.jabref.model.database.BibDatabase"
] | import net.sf.jabref.model.database.BibDatabase; | import net.sf.jabref.model.database.*; | [
"net.sf.jabref"
] | net.sf.jabref; | 2,016,756 |
Slot comAgentSlot = new Slot(SlotContent.COMPUTATION_AGENT,
"Data computed by an agent.");
Slot comAgentErrorSlot = new Slot(SlotContent.ERRORS,
"Errors from computing agent.");
Slot recommendSlot = new Slot(SlotContent.RECOMMEND,
"Recommends an agent to use (its name).");
Slot searchSlot = new ... | Slot comAgentSlot = new Slot(SlotContent.COMPUTATION_AGENT, STR); Slot comAgentErrorSlot = new Slot(SlotContent.ERRORS, STR); Slot recommendSlot = new Slot(SlotContent.RECOMMEND, STR); Slot searchSlot = new Slot(SlotContent.SEARCH, STR); return Arrays.asList( recommendSlot, comAgentSlot, searchSlot, comAgentErrorSlot);... | /**
* Get the input slots definition for the ontology
* @return - list of slots
*/ | Get the input slots definition for the ontology | getIntputSlots_CARecSearchComplex | {
"repo_name": "tomkren/pikater",
"path": "src/org/pikater/core/options/SlotsHelper.java",
"license": "apache-2.0",
"size": 4056
} | [
"java.util.Arrays",
"org.pikater.core.CoreConstant",
"org.pikater.core.ontology.subtrees.agentinfo.Slot"
] | import java.util.Arrays; import org.pikater.core.CoreConstant; import org.pikater.core.ontology.subtrees.agentinfo.Slot; | import java.util.*; import org.pikater.core.*; import org.pikater.core.ontology.subtrees.agentinfo.*; | [
"java.util",
"org.pikater.core"
] | java.util; org.pikater.core; | 2,810,923 |
public Value parsePropertyValue(CSSStylableElement elt,
String prop, String value) {
int idx = getPropertyIndex(prop);
if (idx == -1) return null;
ValueManager vm = valueManagers[idx];
try {
element = elt;
LexicalUnit lu;
... | Value function(CSSStylableElement elt, String prop, String value) { int idx = getPropertyIndex(prop); if (idx == -1) return null; ValueManager vm = valueManagers[idx]; try { element = elt; LexicalUnit lu; lu = parser.parsePropertyValue(value); return vm.createValue(lu, this); } catch (Exception e) { String m = e.getMes... | /**
* Parses and creates a property value from elt.
* @param elt The element property is from.
* @param prop The property name.
* @param value The property value.
*/ | Parses and creates a property value from elt | parsePropertyValue | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/css/engine/CSSEngine.java",
"license": "apache-2.0",
"size": 91557
} | [
"org.apache.batik.css.engine.value.Value",
"org.apache.batik.css.engine.value.ValueManager",
"org.w3c.css.sac.LexicalUnit",
"org.w3c.dom.DOMException"
] | import org.apache.batik.css.engine.value.Value; import org.apache.batik.css.engine.value.ValueManager; import org.w3c.css.sac.LexicalUnit; import org.w3c.dom.DOMException; | import org.apache.batik.css.engine.value.*; import org.w3c.css.sac.*; import org.w3c.dom.*; | [
"org.apache.batik",
"org.w3c.css",
"org.w3c.dom"
] | org.apache.batik; org.w3c.css; org.w3c.dom; | 2,180,647 |
JList<E> getObjList(); | JList<E> getObjList(); | /**
* Metoda zwracajaca liste elementow slownika (jako komponent)
* @return Komponent listy elementow slownika
*/ | Metoda zwracajaca liste elementow slownika (jako komponent) | getObjList | {
"repo_name": "makaw/somado",
"path": "src/main/java/gui/dialogs/IGlossDialog.java",
"license": "mit",
"size": 1555
} | [
"javax.swing.JList"
] | import javax.swing.JList; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,019,056 |
public static BufferedImage createAlpha(BufferedImage image, Color bg) {
if (bg == null) {
return image;
}
BufferedImage imgNew = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
for (int x = 0; x < image.getWidth(); x++) {
for (int y = 0; y < image.getHeight(); y++)... | static BufferedImage function(BufferedImage image, Color bg) { if (bg == null) { return image; } BufferedImage imgNew = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB); for (int x = 0; x < image.getWidth(); x++) { for (int y = 0; y < image.getHeight(); y++) { int rgb = image.getRGB(x... | /**
* replace bg color with transparency
*
* @param image
* @param bg
* @return image with transparency
*/ | replace bg color with transparency | createAlpha | {
"repo_name": "Javlo/javlo",
"path": "src/main/java/org/javlo/image/ImageEngine.java",
"license": "lgpl-3.0",
"size": 72834
} | [
"java.awt.Color",
"java.awt.image.BufferedImage"
] | import java.awt.Color; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 304,691 |
public void getSubItems(Item itemIn, CreativeTabs tab, List<ItemStack> subItems)
{
for (EnumRingBase base : EnumRingBase.values())
{
for (EnumRingStone stone : EnumRingStone.values())
{
ItemStack is = new ItemStack(itemIn, 1, base.getMetadata());
... | void function(Item itemIn, CreativeTabs tab, List<ItemStack> subItems) { for (EnumRingBase base : EnumRingBase.values()) { for (EnumRingStone stone : EnumRingStone.values()) { ItemStack is = new ItemStack(itemIn, 1, base.getMetadata()); NBTTagCompound tagCompound = is.hasTagCompound() ? is.getTagCompound() : new NBTTag... | /**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
*/ | returns a list of items with the same ID, but different meta (eg: dye returns 16 items) | getSubItems | {
"repo_name": "scribblemaniac/AwakenDreamsClient",
"path": "mcp/src/minecraft/com/elementfx/tvp/ad/item/ItemRing.java",
"license": "gpl-3.0",
"size": 1900
} | [
"java.util.List",
"net.minecraft.creativetab.CreativeTabs",
"net.minecraft.item.Item",
"net.minecraft.item.ItemStack",
"net.minecraft.nbt.NBTTagCompound"
] | import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; | import java.util.*; import net.minecraft.creativetab.*; import net.minecraft.item.*; import net.minecraft.nbt.*; | [
"java.util",
"net.minecraft.creativetab",
"net.minecraft.item",
"net.minecraft.nbt"
] | java.util; net.minecraft.creativetab; net.minecraft.item; net.minecraft.nbt; | 732,402 |
public void close() throws IOException {
logger.entering(_CLASS, "close()");
IOEvent event=null;
try {
super.close();
} catch (IOException ex) {
} finally {
event=new IOEvent(IOEvent.EventType.Close,this);
for (IOEventListener listener: this.e... | void function() throws IOException { logger.entering(_CLASS, STR); IOEvent event=null; try { super.close(); } catch (IOException ex) { } finally { event=new IOEvent(IOEvent.EventType.Close,this); for (IOEventListener listener: this.eventListeners) { listener.onEvent(event); } } logger.exiting(_CLASS, STR); } | /**
* Close the {@code InputStream} and invoke registered listeners.
*
* <p>The {@code close()} method will invoke the {@code close()} method on the
* super class and then it will invoke the {@code onEvent()} method on all
* registered {@code IOEventListener} objects.</p>
*/ | Close the InputStream and invoke registered listeners. The close() method will invoke the close() method on the super class and then it will invoke the onEvent() method on all registered IOEventListener objects | close | {
"repo_name": "derekberube/wildstar-foundation-architecture",
"path": "src/main/java/com/wildstartech/wfa/io/ActionableInputStream.java",
"license": "gpl-3.0",
"size": 4253
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 549,488 |
private void generateTagHandlerAttributes(TagInfo tagInfo) {
if (tagInfo.hasDynamicAttributes()) {
out.printil("private java.util.HashMap _jspx_dynamic_attrs = new java.util.HashMap();");
}
// Declare attributes
TagAttributeInfo[] attrInfos = tagInfo.getAttributes();
... | void function(TagInfo tagInfo) { if (tagInfo.hasDynamicAttributes()) { out.printil(STR); } TagAttributeInfo[] attrInfos = tagInfo.getAttributes(); for (int i = 0; i < attrInfos.length; i++) { out.printin(STR); if (attrInfos[i].isFragment()) { out.print(STR); } else { out.print(JspUtil.toJavaSourceType(attrInfos[i].getT... | /**
* Generates declarations for tag handler attributes, and defines the getter
* and setter methods for each.
*/ | Generates declarations for tag handler attributes, and defines the getter and setter methods for each | generateTagHandlerAttributes | {
"repo_name": "SourceStudyNotes/Tomcat8",
"path": "src/main/java/org/apache/jasper/compiler/Generator.java",
"license": "apache-2.0",
"size": 175187
} | [
"javax.servlet.jsp.tagext.TagAttributeInfo",
"javax.servlet.jsp.tagext.TagInfo"
] | import javax.servlet.jsp.tagext.TagAttributeInfo; import javax.servlet.jsp.tagext.TagInfo; | import javax.servlet.jsp.tagext.*; | [
"javax.servlet"
] | javax.servlet; | 1,395,792 |
public static void log(@Nullable CharSequence message) {
if (StagProcessor.DEBUG) {
//noinspection UseOfSystemOutOrSystemErr
System.out.println(TAG + ": " + message);
}
} | static void function(@Nullable CharSequence message) { if (StagProcessor.DEBUG) { System.out.println(TAG + STR + message); } } | /**
* Log the provided message with the default log tag "Stag"
*
* @param message the message to log.
*/ | Log the provided message with the default log tag "Stag" | log | {
"repo_name": "Flipkart/stag-java",
"path": "stag-library-compiler/src/main/java/com/vimeo/stag/processor/utils/DebugLog.java",
"license": "mit",
"size": 2409
} | [
"com.vimeo.stag.processor.StagProcessor",
"org.jetbrains.annotations.Nullable"
] | import com.vimeo.stag.processor.StagProcessor; import org.jetbrains.annotations.Nullable; | import com.vimeo.stag.processor.*; import org.jetbrains.annotations.*; | [
"com.vimeo.stag",
"org.jetbrains.annotations"
] | com.vimeo.stag; org.jetbrains.annotations; | 2,351,215 |
public IntegrationServiceEnvironmentSubnetNetworkHealthInner withOutboundNetworkHealth(
IntegrationServiceEnvironmentNetworkDependencyHealth outboundNetworkHealth) {
this.outboundNetworkHealth = outboundNetworkHealth;
return this;
} | IntegrationServiceEnvironmentSubnetNetworkHealthInner function( IntegrationServiceEnvironmentNetworkDependencyHealth outboundNetworkHealth) { this.outboundNetworkHealth = outboundNetworkHealth; return this; } | /**
* Set the outboundNetworkHealth property: The integration service environment network health.
*
* @param outboundNetworkHealth the outboundNetworkHealth value to set.
* @return the IntegrationServiceEnvironmentSubnetNetworkHealthInner object itself.
*/ | Set the outboundNetworkHealth property: The integration service environment network health | withOutboundNetworkHealth | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/fluent/models/IntegrationServiceEnvironmentSubnetNetworkHealthInner.java",
"license": "mit",
"size": 5196
} | [
"com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth"
] | import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth; | import com.azure.resourcemanager.logic.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,647,288 |
@Test
public void testAbortRolledBackTaskAndAutoPurge(PrintWriter out) throws Exception {
SharedRollbackTask.counter.set(0);
SharedRollbackTask.execProps.put(AutoPurge.PROPERTY_NAME, AutoPurge.ALWAYS.toString());
SharedRollbackTask.rollBackOn.add(1l);
SharedRollbackTask.rollBackO... | void function(PrintWriter out) throws Exception { SharedRollbackTask.counter.set(0); SharedRollbackTask.execProps.put(AutoPurge.PROPERTY_NAME, AutoPurge.ALWAYS.toString()); SharedRollbackTask.rollBackOn.add(1l); SharedRollbackTask.rollBackOn.add(2l); SharedRollbackTask.rollBackOn.add(3l); try { Callable<Long> task = ne... | /**
* Schedule a task that rolls back on every execution attempt, exceeding the failure limit,
* and is auto purged from the persistent store.
*/ | Schedule a task that rolls back on every execution attempt, exceeding the failure limit, and is auto purged from the persistent store | testAbortRolledBackTaskAndAutoPurge | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent_fat/test-applications/schedtest/src/web/SchedulerFATServlet.java",
"license": "epl-1.0",
"size": 196518
} | [
"com.ibm.websphere.concurrent.persistent.AutoPurge",
"com.ibm.websphere.concurrent.persistent.TaskStatus",
"java.io.PrintWriter",
"java.util.concurrent.Callable",
"java.util.concurrent.TimeUnit"
] | import com.ibm.websphere.concurrent.persistent.AutoPurge; import com.ibm.websphere.concurrent.persistent.TaskStatus; import java.io.PrintWriter; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; | import com.ibm.websphere.concurrent.persistent.*; import java.io.*; import java.util.concurrent.*; | [
"com.ibm.websphere",
"java.io",
"java.util"
] | com.ibm.websphere; java.io; java.util; | 2,398,482 |
public static double[] characteristic(final double[][] a) {
squareCheck(a);
final int n = a.length;
int j, k;
double nbk, tr;
double[][] bk = identity(n);
final double[] c = new double[n + 1];
c[n] = 1;
for (k = 1; k <= n; k++) {
bk = mult(a, bk);
for (j = 0, tr = 0; j < n;... | static double[] function(final double[][] a) { squareCheck(a); final int n = a.length; int j, k; double nbk, tr; double[][] bk = identity(n); final double[] c = new double[n + 1]; c[n] = 1; for (k = 1; k <= n; k++) { bk = mult(a, bk); for (j = 0, tr = 0; j < n; tr += bk[j][j], j++) ; for (j = 0, tr /= k; j < n; bk[j][j... | /**
* Calculate the coefficient of the characteristic polynomial of a NxN square matrix A. This
* algorithm uses the method of Faddejew-Leverrier.
*
* @param a the matrix elements of A
* @return the characteristic polynomial coefficients
*/ | Calculate the coefficient of the characteristic polynomial of a NxN square matrix A. This algorithm uses the method of Faddejew-Leverrier | characteristic | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/lapack/LinearAlgebra.java",
"license": "gpl-3.0",
"size": 103733
} | [
"de.lab4inf.math.util.Accuracy",
"de.lab4inf.math.util.Strings",
"java.lang.Math",
"java.lang.String"
] | import de.lab4inf.math.util.Accuracy; import de.lab4inf.math.util.Strings; import java.lang.Math; import java.lang.String; | import de.lab4inf.math.util.*; import java.lang.*; | [
"de.lab4inf.math",
"java.lang"
] | de.lab4inf.math; java.lang; | 23,579 |
boolean checkResult_rgoUnresolved(NonRootModelElement source,
NonRootModelElement target) {
try {
Method defaultReferenceMethod = getDefaultReferenceMethod(rgo, rto);
Boolean bool = (Boolean) defaultReferenceMethod.invoke(rgo,
new Object[0]);
return bool.booleanValue();
} catch (SecurityE... | boolean checkResult_rgoUnresolved(NonRootModelElement source, NonRootModelElement target) { try { Method defaultReferenceMethod = getDefaultReferenceMethod(rgo, rto); Boolean bool = (Boolean) defaultReferenceMethod.invoke(rgo, new Object[0]); return bool.booleanValue(); } catch (SecurityException e) { fail(e.getMessage... | /**
* This function verifies an expected result.
*
* @param source
* A model element instance aquired through a action taken on a
* column of the matrix.
* @param destination
* A model element instance aquired through a action taken taken
* on a row o... | This function verifies an expected result | checkResult_rgoUnresolved | {
"repo_name": "HebaKhaled/bposs",
"path": "src/com.mentor.nucleus.bp.core.test/src/com/mentor/nucleus/bp/core/test/rtomove/RTOMoveTests.java",
"license": "apache-2.0",
"size": 21784
} | [
"com.mentor.nucleus.bp.core.common.NonRootModelElement",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import com.mentor.nucleus.bp.core.common.NonRootModelElement; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import com.mentor.nucleus.bp.core.common.*; import java.lang.reflect.*; | [
"com.mentor.nucleus",
"java.lang"
] | com.mentor.nucleus; java.lang; | 1,828,532 |
public Pixa getTextlines() {
return new Pixa(nativeGetTextlines(), 0, 0);
} | Pixa function() { return new Pixa(nativeGetTextlines(), 0, 0); } | /**
* Returns the textlines as a Pixa.
*
* Block IDs are not returned.
*
* @return Pixa containing textlines
*/ | Returns the textlines as a Pixa. Block IDs are not returned | getTextlines | {
"repo_name": "winlqvin/AdTranslator-with-textfairy",
"path": "tess-two/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java",
"license": "apache-2.0",
"size": 22387
} | [
"com.googlecode.leptonica.android.Pixa"
] | import com.googlecode.leptonica.android.Pixa; | import com.googlecode.leptonica.android.*; | [
"com.googlecode.leptonica"
] | com.googlecode.leptonica; | 2,275,871 |
InventoryUtil initInventoryUtil(); | InventoryUtil initInventoryUtil(); | /**
* Get the {@link InventoryUtil} class (used for implementation specific
* inventory guis).
* @return
*/ | Get the <code>InventoryUtil</code> class (used for implementation specific inventory guis) | initInventoryUtil | {
"repo_name": "storm345/PlotSquared",
"path": "Core/src/main/java/com/intellectualcrafters/plot/IPlotMain.java",
"license": "gpl-3.0",
"size": 5910
} | [
"com.intellectualcrafters.plot.util.InventoryUtil"
] | import com.intellectualcrafters.plot.util.InventoryUtil; | import com.intellectualcrafters.plot.util.*; | [
"com.intellectualcrafters.plot"
] | com.intellectualcrafters.plot; | 421,374 |
public final List<EdgeInfo> getInputEdges() {
return Collections.unmodifiableList(inEdgeList);
} | final List<EdgeInfo> function() { return Collections.unmodifiableList(inEdgeList); } | /**
* Get incoming edge information for a specific vertex
*
* @return List<EdgeInfo> list of input edges on this vertex
*/ | Get incoming edge information for a specific vertex | getInputEdges | {
"repo_name": "ChetnaChaudhari/tez",
"path": "tez-plugins/tez-history-parser/src/main/java/org/apache/tez/history/parser/datamodel/VertexInfo.java",
"license": "apache-2.0",
"size": 21101
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 338,815 |
protected void addAnnotationsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor(
getResourceLocator(),
getString("_UI_Member_annotations_feature"),
JavaPackage.Literals.MEMBER__ANNOTATIONS,
true,
true,
false,
ItemPropertyDesc... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor( getResourceLocator(), getString(STR), JavaPackage.Literals.MEMBER__ANNOTATIONS, true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null, null)); } | /**
* This adds a property descriptor for the Annotations feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/ | This adds a property descriptor for the Annotations feature. | addAnnotationsPropertyDescriptor | {
"repo_name": "Nasdanika/codegen",
"path": "java.edit/src/org/nasdanika/codegen/java/provider/MemberItemProvider.java",
"license": "epl-1.0",
"size": 9799
} | [
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.nasdanika.codegen.java.JavaPackage"
] | import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.nasdanika.codegen.java.JavaPackage; | import org.eclipse.emf.edit.provider.*; import org.nasdanika.codegen.java.*; | [
"org.eclipse.emf",
"org.nasdanika.codegen"
] | org.eclipse.emf; org.nasdanika.codegen; | 596,467 |
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
} | ComposeableAdapterFactory function() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); } | /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the root adapter factory that contains this factory. | getRootAdapterFactory | {
"repo_name": "ObeoNetwork/EAST-ADL-Designer",
"path": "plugins/org.obeonetwork.dsl.eastadl.edit/src/org/obeonetwork/dsl/east_adl/structure/functional_analysis_architecture/provider/Functional_analysis_architectureItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 8911
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,013,507 |
@Test
public void verifyMinMaxStatusReport() {
final byte[] data = new byte[50000 * 20];
data[231014] = 100;
final Img img = ArrayImgs.bytes(data, 50000, 20);
TestMinMaxMethod mmMethod = new TestMinMaxMethod();
ctx.inject(mmMethod);
mmMethod.initialize(img);
mmMethod.process();
assertEquals(100, m... | void function() { final byte[] data = new byte[50000 * 20]; data[231014] = 100; final Img img = ArrayImgs.bytes(data, 50000, 20); TestMinMaxMethod mmMethod = new TestMinMaxMethod(); ctx.inject(mmMethod); mmMethod.initialize(img); mmMethod.process(); assertEquals(100, mmMethod.reported); } private static class TestMinMa... | /**
* Verifies that the DefaultMinMaxMethod will always report 100% progress.
* Failure to do so can cause significant problems in environments depending
* on progress updates to the status bar.
*/ | Verifies that the DefaultMinMaxMethod will always report 100% progress. Failure to do so can cause significant problems in environments depending on progress updates to the status bar | verifyMinMaxStatusReport | {
"repo_name": "imagej/imagej-common",
"path": "src/test/java/net/imagej/minmax/MinMaxMethodTest.java",
"license": "bsd-2-clause",
"size": 4947
} | [
"net.imglib2.IterableInterval",
"net.imglib2.img.Img",
"net.imglib2.img.array.ArrayImgs",
"net.imglib2.type.Type",
"org.junit.Assert"
] | import net.imglib2.IterableInterval; import net.imglib2.img.Img; import net.imglib2.img.array.ArrayImgs; import net.imglib2.type.Type; import org.junit.Assert; | import net.imglib2.*; import net.imglib2.img.*; import net.imglib2.img.array.*; import net.imglib2.type.*; import org.junit.*; | [
"net.imglib2",
"net.imglib2.img",
"net.imglib2.type",
"org.junit"
] | net.imglib2; net.imglib2.img; net.imglib2.type; org.junit; | 850,491 |
public static void insertValue(HashMap m, String var, String val, boolean eventAppendMode) {
insertValue(m, var, val, null, eventAppendMode);
} | static void function(HashMap m, String var, String val, boolean eventAppendMode) { insertValue(m, var, val, null, eventAppendMode); } | /**
* Inserts the variable in the appropriate place in a {@link HashMap},
* according to the AcePathfinder.
*
* @param m the HashMap to add the variable to.
* @param var Variable to lookup
* @param val the value to insert into the HashMap
* @param eventAppendMode True for add variable... | Inserts the variable in the appropriate place in a <code>HashMap</code>, according to the AcePathfinder | insertValue | {
"repo_name": "agmip/ace-lookup",
"path": "src/main/java/org/agmip/ace/util/AcePathfinderUtil.java",
"license": "bsd-3-clause",
"size": 13013
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,419,896 |
private void processAlterTable() throws HsqlException {
String tableName = tokenizer.getName();
String schema =
session.getSchemaNameForWrite(tokenizer.getLongNameFirst());
Table t = database.schemaManager.getUserTable(session, tableName,
schema);
String toke... | void function() throws HsqlException { String tableName = tokenizer.getName(); String schema = session.getSchemaNameForWrite(tokenizer.getLongNameFirst()); Table t = database.schemaManager.getUserTable(session, tableName, schema); String token; if (t.isView()) { throw Trace.error(Trace.NOT_A_TABLE); } session.setScript... | /**
* Handles ALTER TABLE DDL.
*
* @throws HsqlException
*/ | Handles ALTER TABLE DDL | processAlterTable | {
"repo_name": "jonathant/rhodes",
"path": "platform/bb/Hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java",
"license": "gpl-3.0",
"size": 107732
} | [
"org.hsqldb.HsqlNameManager"
] | import org.hsqldb.HsqlNameManager; | import org.hsqldb.*; | [
"org.hsqldb"
] | org.hsqldb; | 2,546,776 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<SecureScoreItemInner> list(); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<SecureScoreItemInner> list(); | /**
* List secure scores for all your Security Center initiatives within your current scope.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sen... | List secure scores for all your Security Center initiatives within your current scope | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/SecureScoresClient.java",
"license": "mit",
"size": 3491
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.security.fluent.models.SecureScoreItemInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.security.fluent.models.SecureScoreItemInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.security.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 402,769 |
public ServiceCall<GenericResourceInner> createOrUpdateAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters, final ServiceCallback<GenericResourceInner> serviceCallback) {
ret... | ServiceCall<GenericResourceInner> function(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters, final ServiceCallback<GenericResourceInner> serviceCallback) { return ServiceCall.create(createO... | /**
* Create a resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceProviderNamespace Resource identity.
* @param parentResourcePath Resource identity.
* @param resourceType Resource identity.
* @param resourceName Resou... | Create a resource | createOrUpdateAsync | {
"repo_name": "herveyw/azure-sdk-for-java",
"path": "azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java",
"license": "mit",
"size": 56236
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,643,764 |
TestResultStatus getStatus();
| TestResultStatus getStatus(); | /**
* Returns test result status (success, failure, etc.)
*
* @return test result status
*/ | Returns test result status (success, failure, etc.) | getStatus | {
"repo_name": "sleshchenko/che",
"path": "wsagent/che-core-api-testing-shared/src/main/java/org/eclipse/che/api/testing/shared/dto/TestResultDto.java",
"license": "epl-1.0",
"size": 2899
} | [
"org.eclipse.che.api.testing.shared.common.TestResultStatus"
] | import org.eclipse.che.api.testing.shared.common.TestResultStatus; | import org.eclipse.che.api.testing.shared.common.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 1,118,663 |
public final MetaProperty<Expiry> expiry() {
return _expiry;
} | final MetaProperty<Expiry> function() { return _expiry; } | /**
* The meta-property for the {@code expiry} property.
* @return the meta-property, not null
*/ | The meta-property for the expiry property | expiry | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/option/IRFutureOptionSecurity.java",
"license": "apache-2.0",
"size": 21933
} | [
"com.opengamma.util.time.Expiry",
"org.joda.beans.MetaProperty"
] | import com.opengamma.util.time.Expiry; import org.joda.beans.MetaProperty; | import com.opengamma.util.time.*; import org.joda.beans.*; | [
"com.opengamma.util",
"org.joda.beans"
] | com.opengamma.util; org.joda.beans; | 296,602 |
public BaseField getSourceField()
{
return m_fldSource;
} | BaseField function() { return m_fldSource; } | /**
* Get the destination field.
* @return The destination field.
*/ | Get the destination field | getSourceField | {
"repo_name": "jbundle/jbundle",
"path": "base/base/src/main/java/org/jbundle/base/db/event/MoveOnEventHandler.java",
"license": "gpl-3.0",
"size": 9554
} | [
"org.jbundle.base.field.BaseField"
] | import org.jbundle.base.field.BaseField; | import org.jbundle.base.field.*; | [
"org.jbundle.base"
] | org.jbundle.base; | 2,550,412 |
@Override public T visitBehaviorParams(@NotNull DuroParser.BehaviorParamsContext ctx) { return visitChildren(ctx); } | @Override public T visitBehaviorParams(@NotNull DuroParser.BehaviorParamsContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
* <p/>
* The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitSlotAssignment | {
"repo_name": "jakobehmsen/duro",
"path": "eclipse/src/duro/reflang/antlr4/DuroBaseVisitor.java",
"license": "mit",
"size": 14027
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,093,191 |
double unitLength = map.getUnitLength();
double distance = length * unitLength;
String unit = "m";
if (map.getMapModel().getMapInfo().getDisplayUnitType() == UnitType.METRIC) {
// Right now, the distance is expressed in meter. Switch to km?
if (distance > 10000) {
distance /= METERS_IN_KM;
unit =... | double unitLength = map.getUnitLength(); double distance = length * unitLength; String unit = "m"; if (map.getMapModel().getMapInfo().getDisplayUnitType() == UnitType.METRIC) { if (distance > 10000) { distance /= METERS_IN_KM; unit = "km"; } } else if (map.getMapModel().getMapInfo().getDisplayUnitType() == UnitType.ENG... | /**
* Distance formatting method. Requires a length as parameter, expressed in the CRS units of the given map.
*
* @param map
* The map for which a distance should be formatted. This map may be configured to use the metric system
* or the English system.
* @param length
* ... | Distance formatting method. Requires a length as parameter, expressed in the CRS units of the given map | asMapLength | {
"repo_name": "geomajas/geomajas-project-client-gwt",
"path": "client/src/main/java/org/geomajas/gwt/client/util/DistanceFormat.java",
"license": "agpl-3.0",
"size": 4734
} | [
"com.google.gwt.i18n.client.NumberFormat",
"org.geomajas.configuration.client.UnitType"
] | import com.google.gwt.i18n.client.NumberFormat; import org.geomajas.configuration.client.UnitType; | import com.google.gwt.i18n.client.*; import org.geomajas.configuration.client.*; | [
"com.google.gwt",
"org.geomajas.configuration"
] | com.google.gwt; org.geomajas.configuration; | 1,456,609 |
private void delayedSetup() {
//
// Find out the estimated max batch size, etc
// and compute the max numPartitions possible
// See partitionNumTuning()
//
spilledState.initialize(numPartitions);
// Create array for the partitions
partitions = new HashPartition[numPartitions];
} | void function() { spilledState.initialize(numPartitions); partitions = new HashPartition[numPartitions]; } | /**
* Call only after num partitions is known
*/ | Call only after num partitions is known | delayedSetup | {
"repo_name": "kkhatua/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/HashJoinBatch.java",
"license": "apache-2.0",
"size": 61488
} | [
"org.apache.drill.exec.physical.impl.common.HashPartition"
] | import org.apache.drill.exec.physical.impl.common.HashPartition; | import org.apache.drill.exec.physical.impl.common.*; | [
"org.apache.drill"
] | org.apache.drill; | 379,978 |
static int fixupDaughter(final Result result, final byte [] qualifier,
final AssignmentManager assignmentManager,
final CatalogTracker catalogTracker)
throws IOException {
HRegionInfo daughter =
MetaReader.parseHRegionInfoFromCatalogResult(result, qualifier);
if (daughter == null) return 0... | static int fixupDaughter(final Result result, final byte [] qualifier, final AssignmentManager assignmentManager, final CatalogTracker catalogTracker) throws IOException { HRegionInfo daughter = MetaReader.parseHRegionInfoFromCatalogResult(result, qualifier); if (daughter == null) return 0; if (isDaughterMissing(catalo... | /**
* Check individual daughter is up in .META.; fixup if its not.
* @param result The contents of the parent row in .META.
* @param qualifier Which daughter to check for.
* @return 1 if the daughter is missing and fixed. Otherwise 0
* @throws IOException
*/ | Check individual daughter is up in .META.; fixup if its not | fixupDaughter | {
"repo_name": "zqxjjj/NobidaBase",
"path": "target/hbase-0.94.9/hbase-0.94.9/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java",
"license": "apache-2.0",
"size": 21555
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.catalog.CatalogTracker",
"org.apache.hadoop.hbase.catalog.MetaEditor",
"org.apache.hadoop.hbase.catalog.MetaReader",
"org.apache.hadoop.hbase.client.Result",
"org.apache.hadoop.hbase.master.AssignmentManager"
] | import java.io.IOException; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.catalog.CatalogTracker; import org.apache.hadoop.hbase.catalog.MetaEditor; import org.apache.hadoop.hbase.catalog.MetaReader; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.master.Assignm... | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.catalog.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.master.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,903,177 |
private boolean ping(boolean exepectServerUp, Process proc) {
boolean pingOk = false;
try {
pingOk = NetworkServerTestSetup.pingForServerUp(
networkServerControl, proc, exepectServerUp);
} catch (InterruptedException ie) {
Thread.currentThread().interr... | boolean function(boolean exepectServerUp, Process proc) { boolean pingOk = false; try { pingOk = NetworkServerTestSetup.pingForServerUp( networkServerControl, proc, exepectServerUp); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); } return pingOk; } | /**
* Pings the server.
*
* @param exepectServerUp whether the server is expected to be up or down
* @param proc the process in which the server runs (may be {@code null})
* @return Whether the ping is considered ok, which is determined by the
* response or lack of response from the s... | Pings the server | ping | {
"repo_name": "scnakandala/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionedNetworkServerTestSetup.java",
"license": "apache-2.0",
"size": 8473
} | [
"org.apache.derbyTesting.junit.NetworkServerTestSetup"
] | import org.apache.derbyTesting.junit.NetworkServerTestSetup; | import org.apache.*; | [
"org.apache"
] | org.apache; | 2,819,462 |
public Date encode(final Temporal aTemporal) {
return TemporalConverter.applyByType(aTemporal, localDateConversion(),
offsetDateTimeConversion(), zonedDateTimeConversion());
} | Date function(final Temporal aTemporal) { return TemporalConverter.applyByType(aTemporal, localDateConversion(), offsetDateTimeConversion(), zonedDateTimeConversion()); } | /**
* Encodes a temporal data into an iCal4J date.
* @param aTemporal the temporal data to encode.
* @return an iCal4J date.
* @throws IllegalArgumentException if the encoding fails.
*/ | Encodes a temporal data into an iCal4J date | encode | {
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/calendar/ical4j/ICal4JDateCodec.java",
"license": "agpl-3.0",
"size": 9722
} | [
"java.time.temporal.Temporal",
"net.fortuna.ical4j.model.Date",
"org.silverpeas.core.date.TemporalConverter"
] | import java.time.temporal.Temporal; import net.fortuna.ical4j.model.Date; import org.silverpeas.core.date.TemporalConverter; | import java.time.temporal.*; import net.fortuna.ical4j.model.*; import org.silverpeas.core.date.*; | [
"java.time",
"net.fortuna.ical4j",
"org.silverpeas.core"
] | java.time; net.fortuna.ical4j; org.silverpeas.core; | 159,694 |
public boolean cumpleañosManiana(int socioId) throws SQLException {
String fechaAyerFormateada = null;
String fechaNacimientoFormateada = null;
Date fechaNacimientoSocio = null;
//obteniendo la fecha de maniana
Calendar cal = Calendar.getInstance();
cal.add(Calendar.... | boolean function(int socioId) throws SQLException { String fechaAyerFormateada = null; String fechaNacimientoFormateada = null; Date fechaNacimientoSocio = null; Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, +1); Date fechaAyer = cal.getTime(); SimpleDateFormat formato = new SimpleDateFormat(STR); Strin... | /**
* Esta funcion permite saber si un socio cumple anios maniana
* @param socioId
* @return boolean
* @throws SQLException
*/ | Esta funcion permite saber si un socio cumple anios maniana | cumpleañosManiana | {
"repo_name": "camilozuluaga/softGYM",
"path": "src/desarrollo/CumpleaniosSocio.java",
"license": "gpl-3.0",
"size": 4779
} | [
"java.sql.SQLException",
"java.text.SimpleDateFormat",
"java.util.Calendar",
"java.util.Date"
] | import java.sql.SQLException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; | import java.sql.*; import java.text.*; import java.util.*; | [
"java.sql",
"java.text",
"java.util"
] | java.sql; java.text; java.util; | 1,334,580 |
@SuppressWarnings("overloads") // These are ambiguous if you aren't using ctor references but we always do
public static <T extends Function> FunctionDefinition def(Class<T> function,
DistinctAwareUnaryFunctionBuilder<T> ctorRef, String... names) {
FunctionBuilder builder = (source, childre... | @SuppressWarnings(STR) static <T extends Function> FunctionDefinition function(Class<T> function, DistinctAwareUnaryFunctionBuilder<T> ctorRef, String... names) { FunctionBuilder builder = (source, children, distinct, cfg) -> { if (children.size() != 1) { throw new QlIllegalArgumentException(STR); } return ctorRef.buil... | /**
* Build a {@linkplain FunctionDefinition} for a unary function that is not
* aware of time zone but does support {@code DISTINCT}.
*/ | Build a FunctionDefinition for a unary function that is not aware of time zone but does support DISTINCT | def | {
"repo_name": "gingerwizard/elasticsearch",
"path": "x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/function/FunctionRegistry.java",
"license": "apache-2.0",
"size": 25304
} | [
"org.elasticsearch.xpack.ql.QlIllegalArgumentException"
] | import org.elasticsearch.xpack.ql.QlIllegalArgumentException; | import org.elasticsearch.xpack.ql.*; | [
"org.elasticsearch.xpack"
] | org.elasticsearch.xpack; | 2,105,022 |
@Override public String getAddColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc,
String pk, boolean semicolon ) {
return "ALTER TABLE " + tablename + " ADD " + getFieldDefinition( v, tk, pk, use_autoinc, true, false );
} | @Override String function( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon ) { return STR + tablename + STR + getFieldDefinition( v, tk, pk, use_autoinc, true, false ); } | /**
* Generates the SQL statement to add a column to the specified table
*
* @param tablename
* The table to add
* @param v
* The column defined as a value
* @param tk
* the name of the technical key field
* @param use_autoinc
* whether or not this field uses auto increment
* @p... | Generates the SQL statement to add a column to the specified table | getAddColumnStatement | {
"repo_name": "lgrill-pentaho/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/MySQLDatabaseMeta.java",
"license": "apache-2.0",
"size": 15975
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 769,630 |
public List<Substring> getSuggestions() {
return suggestions;
} | List<Substring> function() { return suggestions; } | /**
* Get the list of suggestions that are to be presented.
*
* <p>
* Each Substring holds the replacement as the substring,
* and the replacement range as the original substring range.
* </p>
*
* @return the list of suggestions
*/ | Get the list of suggestions that are to be presented. Each Substring holds the replacement as the substring, and the replacement range as the original substring range. | getSuggestions | {
"repo_name": "HolodeckOne-Minecraft/WorldEdit",
"path": "worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/CommandSuggestionEvent.java",
"license": "gpl-3.0",
"size": 2689
} | [
"com.sk89q.worldedit.internal.util.Substring",
"java.util.List"
] | import com.sk89q.worldedit.internal.util.Substring; import java.util.List; | import com.sk89q.worldedit.internal.util.*; import java.util.*; | [
"com.sk89q.worldedit",
"java.util"
] | com.sk89q.worldedit; java.util; | 387,332 |
void setValue(int rowIndex, int columnIndex, Number value) throws MacroExecutionException; | void setValue(int rowIndex, int columnIndex, Number value) throws MacroExecutionException; | /**
* Set a value in the dataset.
*
* @param rowIndex The row index.
* @param columnIndex The column index.
* @param value The value.
* @throws MacroExecutionException if the value is invalid for the dataset.
*/ | Set a value in the dataset | setValue | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-chart/xwiki-platform-chart-macro/src/main/java/org/xwiki/rendering/internal/macro/chart/source/table/TableDatasetBuilder.java",
"license": "lgpl-2.1",
"size": 4183
} | [
"org.xwiki.rendering.macro.MacroExecutionException"
] | import org.xwiki.rendering.macro.MacroExecutionException; | import org.xwiki.rendering.macro.*; | [
"org.xwiki.rendering"
] | org.xwiki.rendering; | 2,000,014 |
private void executeProgram(Event event) {
try {
homematicClient.executeProgram(((ProgramConfig) event.getBindingConfig()).getName());
} catch (HomematicClientException ex) {
logger.error(ex.getMessage(), ex);
} finally {
itemDisabler.add(event.getBindingConfig());
}
} | void function(Event event) { try { homematicClient.executeProgram(((ProgramConfig) event.getBindingConfig()).getName()); } catch (HomematicClientException ex) { logger.error(ex.getMessage(), ex); } finally { itemDisabler.add(event.getBindingConfig()); } } | /**
* Executes a program on the Homematic server.
*/ | Executes a program on the Homematic server | executeProgram | {
"repo_name": "rahulopengts/myhome",
"path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/HomematicCommunicator.java",
"license": "epl-1.0",
"size": 13588
} | [
"org.openhab.binding.homematic.internal.communicator.client.HomematicClientException",
"org.openhab.binding.homematic.internal.config.binding.ProgramConfig"
] | import org.openhab.binding.homematic.internal.communicator.client.HomematicClientException; import org.openhab.binding.homematic.internal.config.binding.ProgramConfig; | import org.openhab.binding.homematic.internal.communicator.client.*; import org.openhab.binding.homematic.internal.config.binding.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,375,165 |
protected boolean closeServerSocket(ServerSocket socket)
{
return this.closeServerSocket_do(socket, true);
} | boolean function(ServerSocket socket) { return this.closeServerSocket_do(socket, true); } | /**
* Closes the specified ServerSocket
*/ | Closes the specified ServerSocket | closeServerSocket | {
"repo_name": "trixmot/mod1",
"path": "build/tmp/recompileMc/sources/net/minecraft/network/rcon/RConThreadBase.java",
"license": "lgpl-2.1",
"size": 5480
} | [
"java.net.ServerSocket"
] | import java.net.ServerSocket; | import java.net.*; | [
"java.net"
] | java.net; | 1,750,977 |
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
{
int l = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
if (l == 0)
{
par1World.setBlo... | void function(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { int l = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if (l == 0) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); } if (l == 1)... | /**
* Called when the block is placed in the world.
*/ | Called when the block is placed in the world | onBlockPlacedBy | {
"repo_name": "Robbi-Blechdose/StarTrekMod",
"path": "java/StarTrekMod/TileEntity/Helm/BlockHelm.java",
"license": "gpl-3.0",
"size": 3058
} | [
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.item.ItemStack",
"net.minecraft.util.MathHelper",
"net.minecraft.world.World"
] | import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.util.MathHelper; import net.minecraft.world.World; | import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world; | 807,393 |
@Test
public void getOutputFilter()
{
assertEquals(OUTPUT_FILTER, appliance0.getOutputFilter());
} | void function() { assertEquals(OUTPUT_FILTER, appliance0.getOutputFilter()); } | /**
* Test the <code>getOutputFilter()</code> method.
*/ | Test the <code>getOutputFilter()</code> method | getOutputFilter | {
"repo_name": "jmthompson2015/vizzini",
"path": "ai/src/test/java/org/vizzini/ai/neuralnetwork/DefaultNeuralNetworkApplianceTest.java",
"license": "mit",
"size": 20180
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 921,220 |
@Test(dependsOnMethods = { "test02AddGroupToGroup" })
public void test03AddGroupMemberToBlog() throws Exception {
// add user3 of group2 as Reader
Long userId = UserAndGroupTestUtils.findNthUser(getHierarchicalGroupUserAliasPattern(2), 3)
.getId();
putBlogManagerInSe... | @Test(dependsOnMethods = { STR }) void function() throws Exception { Long userId = UserAndGroupTestUtils.findNthUser(getHierarchicalGroupUserAliasPattern(2), 3) .getId(); putBlogManagerInSecurityContext(); getBlogRightsManagement().addEntity(this.blogId, userId, BlogRole.MEMBER); assertBlogAccess(this.blogId, userId, B... | /**
* Tests adding a user that is a member of a group that is a subgroup of a group added as blog
* member to the blog.
*
* @throws Exception
* if the test fails
*/ | Tests adding a user that is a member of a group that is a subgroup of a group added as blog member to the blog | test03AddGroupMemberToBlog | {
"repo_name": "Communote/communote-server",
"path": "communote/tests/all-versions/integration/src/test/java/com/communote/server/core/blog/BlogRightsHierarchicalGroupsTest.java",
"license": "apache-2.0",
"size": 26170
} | [
"com.communote.server.model.blog.BlogRole",
"com.communote.server.test.util.UserAndGroupTestUtils",
"java.util.HashSet",
"java.util.Set",
"org.testng.annotations.Test"
] | import com.communote.server.model.blog.BlogRole; import com.communote.server.test.util.UserAndGroupTestUtils; import java.util.HashSet; import java.util.Set; import org.testng.annotations.Test; | import com.communote.server.model.blog.*; import com.communote.server.test.util.*; import java.util.*; import org.testng.annotations.*; | [
"com.communote.server",
"java.util",
"org.testng.annotations"
] | com.communote.server; java.util; org.testng.annotations; | 1,801,574 |
public void setLogicalOperator(DAGNode node, int operandIndex, String operator)
{
int parentExpId = node.getExpressionId();
dagPanel.updateLogicalOperator(parentExpId, operandIndex, operator);
}
| void function(DAGNode node, int operandIndex, String operator) { int parentExpId = node.getExpressionId(); dagPanel.updateLogicalOperator(parentExpId, operandIndex, operator); } | /**
* Sets logical operator set from UI
* @param node
* @param operandIndex
* @param operator
*/ | Sets logical operator set from UI | setLogicalOperator | {
"repo_name": "NCIP/catissue-tools",
"path": "WEB-INF/src/edu/wustl/clinportal/flex/FlexInterface.java",
"license": "bsd-3-clause",
"size": 17599
} | [
"edu.wustl.clinportal.flex.dag.DAGNode"
] | import edu.wustl.clinportal.flex.dag.DAGNode; | import edu.wustl.clinportal.flex.dag.*; | [
"edu.wustl.clinportal"
] | edu.wustl.clinportal; | 1,278,710 |
// TODO(digit): Use KeyChain official extra values to pass the public and private
// keys when they're available. The "KEY" and "PKEY" hard-coded constants were taken
// from the platform sources, since there are no official KeyChain.EXTRA_XXX definitions
// for them. b/5859651
try {
... | try { Intent intent = KeyChain.createInstallIntent(); intent.putExtra("PKEY", privateKey); intent.putExtra("KEY", publicKey); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); return true; } catch (ActivityNotFoundException e) { Log.w(TAG, STR + e); } return false; } | /**
* Stores the key pair through the CertInstaller activity.
* @param context current application context.
* @param publicKey The public key bytes as DER-encoded SubjectPublicKeyInfo (X.509)
* @param privateKey The private key as DER-encoded PrivateKeyInfo (PKCS#8).
* @return: true on success,... | Stores the key pair through the CertInstaller activity | storeKeyPair | {
"repo_name": "guorendong/iridium-browser-ubuntu",
"path": "net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java",
"license": "bsd-3-clause",
"size": 7918
} | [
"android.content.ActivityNotFoundException",
"android.content.Intent",
"android.security.KeyChain",
"android.util.Log"
] | import android.content.ActivityNotFoundException; import android.content.Intent; import android.security.KeyChain; import android.util.Log; | import android.content.*; import android.security.*; import android.util.*; | [
"android.content",
"android.security",
"android.util"
] | android.content; android.security; android.util; | 2,220,605 |
void save(Site site, Data data); | void save(Site site, Data data); | /**
* Save a new data point into the database.
*
* @param data The new data point to be saved.
*/ | Save a new data point into the database | save | {
"repo_name": "MTUHIDE/CoCoTemp",
"path": "src/main/java/space/hideaway/services/data/DataService.java",
"license": "mit",
"size": 1284
} | [
"space.hideaway.model.Data",
"space.hideaway.model.site.Site"
] | import space.hideaway.model.Data; import space.hideaway.model.site.Site; | import space.hideaway.model.*; import space.hideaway.model.site.*; | [
"space.hideaway.model"
] | space.hideaway.model; | 489,098 |
private boolean empty(List<Integer> list)
{
for(Integer value : list)
if(value != null)
return false;
return true;
}
| boolean function(List<Integer> list) { for(Integer value : list) if(value != null) return false; return true; } | /**
* A list is "empty" when it contains only nulls.
*
* @param list
* @return
*/ | A list is "empty" when it contains only nulls | empty | {
"repo_name": "Data2Semantics/nodes",
"path": "nodes/src/main/java/org/nodes/algorithms/UVF2.java",
"license": "mit",
"size": 6976
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 840,294 |
protected Dimension getImageSize(Image image)
{
return new Dimension(image.getWidth(null), image.getHeight(null));
}
| Dimension function(Image image) { return new Dimension(image.getWidth(null), image.getHeight(null)); } | /**
* Returns the size for the given image.
*/ | Returns the size for the given image | getImageSize | {
"repo_name": "alect/Puzzledice",
"path": "Tools/PuzzleMapEditor/src/com/mxgraph/canvas/mxGraphics2DCanvas.java",
"license": "mit",
"size": 14402
} | [
"java.awt.Dimension",
"java.awt.Image"
] | import java.awt.Dimension; import java.awt.Image; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,657,168 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<MetricDefinition> listMetricDefinitions(String resourceUri) {
return listMetricDefinitions(resourceUri, null, Context.NONE);
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<MetricDefinition> function(String resourceUri) { return listMetricDefinitions(resourceUri, null, Context.NONE); } | /**
* Lists all the metrics definitions created for the resource URI.
* @param resourceUri The resource URI for which the metrics definitions are listed.
* @return A {@link PagedIterable paged collection} of metrics definitions.
*/ | Lists all the metrics definitions created for the resource URI | listMetricDefinitions | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/MetricsQueryClient.java",
"license": "mit",
"size": 7002
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.monitor.query.models.MetricDefinition"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.monitor.query.models.MetricDefinition; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.monitor.query.models.*; | [
"com.azure.core",
"com.azure.monitor"
] | com.azure.core; com.azure.monitor; | 1,807,922 |
public void scheduleOwnerSelection(YangInstanceIdentifier entityPath, Collection<String> allCandidates,
EntityOwnerSelectionStrategy strategy){
Cancellable lastScheduledTask = entityToScheduledOwnershipTask.get(entityPath);
if(lastScheduledTask != null && !last... | void function(YangInstanceIdentifier entityPath, Collection<String> allCandidates, EntityOwnerSelectionStrategy strategy){ Cancellable lastScheduledTask = entityToScheduledOwnershipTask.get(entityPath); if(lastScheduledTask != null && !lastScheduledTask.isCancelled()){ lastScheduledTask.cancel(); } lastScheduledTask = ... | /**
* Schedule a new owner selection job. Cancelling any outstanding job if it has not been cancelled.
*
* @param entityPath
* @param allCandidates
*/ | Schedule a new owner selection job. Cancelling any outstanding job if it has not been cancelled | scheduleOwnerSelection | {
"repo_name": "inocybe/odl-controller",
"path": "opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipShard.java",
"license": "epl-1.0",
"size": 25896
} | [
"java.util.Collection",
"java.util.concurrent.TimeUnit",
"org.opendaylight.controller.cluster.datastore.entityownership.messages.SelectOwner",
"org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy.EntityOwnerSelectionStrategy",
"org.opendaylight.yangtools.yang.data.api.YangInstanc... | import java.util.Collection; import java.util.concurrent.TimeUnit; import org.opendaylight.controller.cluster.datastore.entityownership.messages.SelectOwner; import org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy.EntityOwnerSelectionStrategy; import org.opendaylight.yangtools.yang.data.a... | import java.util.*; import java.util.concurrent.*; import org.opendaylight.controller.cluster.datastore.entityownership.messages.*; import org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy.*; import org.opendaylight.yangtools.yang.data.api.*; | [
"java.util",
"org.opendaylight.controller",
"org.opendaylight.yangtools"
] | java.util; org.opendaylight.controller; org.opendaylight.yangtools; | 658,593 |
static void closeFileDescriptor(FileDescriptor fd) {
// Os.dup and Os.close was introduced in API 21 so this method shouldn't be called
// in API < 21.
if (Build.VERSION.SDK_INT >= 21) {
try {
Api21Impl.close(fd);
// Catching ErrnoException will ra... | static void closeFileDescriptor(FileDescriptor fd) { if (Build.VERSION.SDK_INT >= 21) { try { Api21Impl.close(fd); } catch (Exception ex) { Log.e(TAG, STR); } } else { Log.e(TAG, STR); } } @RequiresApi(21) static class Api21Impl { private Api21Impl() {} | /**
* Closes a file descriptor that has been duplicated.
*/ | Closes a file descriptor that has been duplicated | closeFileDescriptor | {
"repo_name": "AndroidX/androidx",
"path": "exifinterface/exifinterface/src/main/java/androidx/exifinterface/media/ExifInterfaceUtils.java",
"license": "apache-2.0",
"size": 5946
} | [
"android.os.Build",
"android.util.Log",
"androidx.annotation.RequiresApi",
"java.io.FileDescriptor"
] | import android.os.Build; import android.util.Log; import androidx.annotation.RequiresApi; import java.io.FileDescriptor; | import android.os.*; import android.util.*; import androidx.annotation.*; import java.io.*; | [
"android.os",
"android.util",
"androidx.annotation",
"java.io"
] | android.os; android.util; androidx.annotation; java.io; | 918,519 |
@Test
public void testAutoGeneratedVersionBytePrimitive() {
final Object obj = new AutoKeyAndVal<String>() {
private byte rvn;
@DynamoDBAttribute
public String getVal() { return super.getVal(); } | void function() { final Object obj = new AutoKeyAndVal<String>() { private byte rvn; public String getVal() { return super.getVal(); } | /**
* Test mappings.
*/ | Test mappings | testAutoGeneratedVersionBytePrimitive | {
"repo_name": "jentfoo/aws-sdk-java",
"path": "aws-java-sdk-dynamodb/src/test/java/com/amazonaws/services/dynamodbv2/datamodeling/StandardModelFactoriesTest.java",
"license": "apache-2.0",
"size": 62787
} | [
"com.amazonaws.services.dynamodbv2.pojos.AutoKeyAndVal"
] | import com.amazonaws.services.dynamodbv2.pojos.AutoKeyAndVal; | import com.amazonaws.services.dynamodbv2.pojos.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 2,708,639 |
@Test
public void testPreviousXMLResult() throws IOException, JAXBException, TransformerException, ParserConfigurationException {
plateWriter.resultToXML(maps);
PlateReaderInteger reader = new PlateReaderInteger(file);
ListIterator<Map<WellInteger, Integer>> iter = maps.listIterator(maps.size());
... | void function() throws IOException, JAXBException, TransformerException, ParserConfigurationException { plateWriter.resultToXML(maps); PlateReaderInteger reader = new PlateReaderInteger(file); ListIterator<Map<WellInteger, Integer>> iter = maps.listIterator(maps.size()); while(reader.hasNextXMLResult()) { reader.nextXM... | /**
* Tests the previous XML result method.
* @throws JAXBException
* @throws IOException
* @throws ParserConfigurationException
* @throws TransformerException
*/ | Tests the previous XML result method | testPreviousXMLResult | {
"repo_name": "jessemull/MicroFlex",
"path": "src/test/java/com/github/jessemull/microflex/io/iointeger/PlateReaderIntegerResultsTest.java",
"license": "apache-2.0",
"size": 23466
} | [
"com.github.jessemull.microflex.integerflex.io.PlateReaderInteger",
"com.github.jessemull.microflex.integerflex.plate.WellInteger",
"com.github.jessemull.microflex.integerflex.plate.WellSetInteger",
"java.io.IOException",
"java.util.Iterator",
"java.util.ListIterator",
"java.util.Map",
"javax.xml.bind... | import com.github.jessemull.microflex.integerflex.io.PlateReaderInteger; import com.github.jessemull.microflex.integerflex.plate.WellInteger; import com.github.jessemull.microflex.integerflex.plate.WellSetInteger; import java.io.IOException; import java.util.Iterator; import java.util.ListIterator; import java.util.Map... | import com.github.jessemull.microflex.integerflex.io.*; import com.github.jessemull.microflex.integerflex.plate.*; import java.io.*; import java.util.*; import javax.xml.bind.*; import javax.xml.parsers.*; import javax.xml.transform.*; import org.junit.*; | [
"com.github.jessemull",
"java.io",
"java.util",
"javax.xml",
"org.junit"
] | com.github.jessemull; java.io; java.util; javax.xml; org.junit; | 2,064,662 |
public static void wipeRepositories(String... repositories) {
// if nothing is provided, delete all
if (repositories.length == 0) {
repositories = new String[]{"*"};
}
for (String repository : repositories) {
try {
client().admin().cluster().pr... | static void function(String... repositories) { if (repositories.length == 0) { repositories = new String[]{"*"}; } for (String repository : repositories) { try { client().admin().cluster().prepareDeleteRepository(repository).execute().actionGet(); } catch (RepositoryMissingException ex) { } } } | /**
* Deletes repositories, supports wildcard notation.
*/ | Deletes repositories, supports wildcard notation | wipeRepositories | {
"repo_name": "diendt/elasticsearch",
"path": "plugins/repository-azure/src/test/java/org/elasticsearch/cloud/azure/AbstractAzureRepositoryServiceTestCase.java",
"license": "apache-2.0",
"size": 4612
} | [
"org.elasticsearch.repositories.RepositoryMissingException"
] | import org.elasticsearch.repositories.RepositoryMissingException; | import org.elasticsearch.repositories.*; | [
"org.elasticsearch.repositories"
] | org.elasticsearch.repositories; | 1,096,917 |
public static String[] getNames(JSONObject jo) {
int length = jo.length();
if (length == 0) {
return null;
}
Iterator<String> iterator = jo.keys();
String[] names = new String[length];
int i = 0;
while (iterator.hasNext()) {
names[i] = ... | static String[] function(JSONObject jo) { int length = jo.length(); if (length == 0) { return null; } Iterator<String> iterator = jo.keys(); String[] names = new String[length]; int i = 0; while (iterator.hasNext()) { names[i] = iterator.next(); i += 1; } return names; } | /**
* Get an array of field names from a JSONObject.
*
* @return An array of field names, or null if there are no names.
*/ | Get an array of field names from a JSONObject | getNames | {
"repo_name": "ChilliWorks/ChilliSource",
"path": "Projects/Tools/CoreUtils/src/org/json/JSONObject.java",
"license": "mit",
"size": 57686
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,755,545 |
public VideoModel getVideoEntryByVideoId(String videoId,
final DataCallback<VideoModel> callback) {
DbOperationGetVideo op = new DbOperationGetVideo(false, DbStructure.Table.DOWNLOADS, null,
DbStructure.Column.VIDEO_ID + "=? AND " + DbStructure.Co... | VideoModel function(String videoId, final DataCallback<VideoModel> callback) { DbOperationGetVideo op = new DbOperationGetVideo(false, DbStructure.Table.DOWNLOADS, null, DbStructure.Column.VIDEO_ID + STR + DbStructure.Column.USERNAME + "=?", new String[]{videoId, username()}, null); op.setCallback(callback); return enq... | /**
* Returns download entry for given video id.
*
* @param videoId
* @return
*/ | Returns download entry for given video id | getVideoEntryByVideoId | {
"repo_name": "FDoubleman/wd-edx-android",
"path": "VideoLocker/src/main/java/org/edx/mobile/module/db/impl/IDatabaseImpl.java",
"license": "apache-2.0",
"size": 39308
} | [
"org.edx.mobile.model.VideoModel",
"org.edx.mobile.module.db.DataCallback",
"org.edx.mobile.module.db.DbStructure"
] | import org.edx.mobile.model.VideoModel; import org.edx.mobile.module.db.DataCallback; import org.edx.mobile.module.db.DbStructure; | import org.edx.mobile.model.*; import org.edx.mobile.module.db.*; | [
"org.edx.mobile"
] | org.edx.mobile; | 1,274,815 |
//------------------------------------- Meta Types ----------------------------------
@CheckReturnValue
Type getMetaConcept(); | Type getMetaConcept(); | /**
* Get the root of all Types.
*
* @return The meta type -> type.
*/ | Get the root of all Types | getMetaConcept | {
"repo_name": "pluraliseseverythings/grakn",
"path": "grakn-core/src/main/java/ai/grakn/kb/admin/GraknAdmin.java",
"license": "gpl-3.0",
"size": 6455
} | [
"ai.grakn.concept.Type"
] | import ai.grakn.concept.Type; | import ai.grakn.concept.*; | [
"ai.grakn.concept"
] | ai.grakn.concept; | 283,961 |
public String serialize(Object object) throws IOException {
if (object == null) {
return null;
}
StringWriter writer = new StringWriter();
getObjectMapper().writeValue(writer, object);
return writer.toString();
} | String function(Object object) throws IOException { if (object == null) { return null; } StringWriter writer = new StringWriter(); getObjectMapper().writeValue(writer, object); return writer.toString(); } | /**
* Serializes an object into a JSON string using the current {@link ObjectMapper}.
*
* @param object the object to serialize.
* @return the serialized string. Null if the object to serialize is null.
* @throws IOException exception from serialization.
*/ | Serializes an object into a JSON string using the current <code>ObjectMapper</code> | serialize | {
"repo_name": "sharadagarwal/autorest",
"path": "ClientRuntimes/Java/client-runtime/src/main/java/com/microsoft/rest/serializer/JacksonMapperAdapter.java",
"license": "mit",
"size": 6555
} | [
"java.io.IOException",
"java.io.StringWriter"
] | import java.io.IOException; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,416,333 |
public void replicateLogEntries(HLog.Entry[] entries) throws IOException; | void function(HLog.Entry[] entries) throws IOException; | /**
* Replicates the given entries. The guarantee is that the given entries
* will be durable on the slave cluster if this method returns without
* any exception.
* hbase.replication has to be set to true for this to work.
*
* @param entries entries to replicate
* @throws IOException
*/ | Replicates the given entries. The guarantee is that the given entries will be durable on the slave cluster if this method returns without any exception. hbase.replication has to be set to true for this to work | replicateLogEntries | {
"repo_name": "Shmuma/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java",
"license": "apache-2.0",
"size": 13285
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.regionserver.wal.HLog"
] | import java.io.IOException; import org.apache.hadoop.hbase.regionserver.wal.HLog; | import java.io.*; import org.apache.hadoop.hbase.regionserver.wal.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,856,935 |
public static Temperature fromLocalTemperature(BigDecimal localTemp) {
if (localScale.equals(Scale.CELSIUS)) {
return fromCelsius(localTemp);
} else {
return fromFahrenheit(localTemp);
}
} | static Temperature function(BigDecimal localTemp) { if (localScale.equals(Scale.CELSIUS)) { return fromCelsius(localTemp); } else { return fromFahrenheit(localTemp); } } | /**
* Factory method to construct a Temperature from the local temperature scale.
*
* @param localTemp
* the temperature in the local temperature scale.
* @return a new Temperature object
*/ | Factory method to construct a Temperature from the local temperature scale | fromLocalTemperature | {
"repo_name": "theoweiss/openhab",
"path": "bundles/binding/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/messages/Temperature.java",
"license": "epl-1.0",
"size": 5075
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,429,296 |
public static String getHtml(String headerTitle, String extraHeader, String body){
if(extraHeader == null){
extraHeader = "";
}
if(body == null){
body = "";
}
if(headerTitle == null){
headerTitle = "";
}
return MessageFormat.format(BASE, headerTitle, extraHeader, body);
}
| static String function(String headerTitle, String extraHeader, String body){ if(extraHeader == null){ extraHeader = STRSTR"; } return MessageFormat.format(BASE, headerTitle, extraHeader, body); } | /**
* Returns a basic HTML page (base on the format specified by {@link #BASE})
* @param extraHeader header to be added to the default header.
* @param headerTitle header title
* @param body HTML body.
* @return a basic HTML page.
*/ | Returns a basic HTML page (base on the format specified by <code>#BASE</code>) | getHtml | {
"repo_name": "esdc-esac-esa-int/gaia",
"path": "sl/tags/gaia-sl-tap-0.5.3-20150629/src/java/esac/archive/gacs/sl/services/publicgroup/Templates.java",
"license": "lgpl-3.0",
"size": 6335
} | [
"java.text.MessageFormat"
] | import java.text.MessageFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,032,885 |
public SeekableByteChannel openSeekable() throws IOException {
checkState(
getMetadata().isReadSeekEfficient(),
"The file %s is not seekable",
metadata.resourceId());
return ((SeekableByteChannel) open());
} | SeekableByteChannel function() throws IOException { checkState( getMetadata().isReadSeekEfficient(), STR, metadata.resourceId()); return ((SeekableByteChannel) open()); } | /**
* Returns a {@link SeekableByteChannel} equivalent to {@link #open}, but fails if this file is
* not {@link MatchResult.Metadata#isReadSeekEfficient seekable}.
*/ | Returns a <code>SeekableByteChannel</code> equivalent to <code>#open</code>, but fails if this file is not <code>MatchResult.Metadata#isReadSeekEfficient seekable</code> | openSeekable | {
"repo_name": "shakamunyi/beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileIO.java",
"license": "apache-2.0",
"size": 17337
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"java.nio.channels.SeekableByteChannel"
] | import com.google.common.base.Preconditions; import java.io.IOException; import java.nio.channels.SeekableByteChannel; | import com.google.common.base.*; import java.io.*; import java.nio.channels.*; | [
"com.google.common",
"java.io",
"java.nio"
] | com.google.common; java.io; java.nio; | 2,880,479 |
public void extendToConference(String[] participants) {
if (mClosed) {
return;
}
try {
miSession.extendToConference(participants);
} catch (RemoteException e) {
}
} | void function(String[] participants) { if (mClosed) { return; } try { miSession.extendToConference(participants); } catch (RemoteException e) { } } | /**
* Extends this call to the conference call with the specified recipients.
*
* @participants participant list to be invited to the conference call after extending the call
* @see Listener#sessionConferenceExtened, Listener#sessionConferenceExtendFailed
*/ | Extends this call to the conference call with the specified recipients | extendToConference | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/ims/internal/ImsCallSession.java",
"license": "gpl-3.0",
"size": 40341
} | [
"android.os.RemoteException"
] | import android.os.RemoteException; | import android.os.*; | [
"android.os"
] | android.os; | 511,707 |
public void setBackgroundImage(Image backgroundImage) {
this.backgroundImage = backgroundImage;
} | void function(Image backgroundImage) { this.backgroundImage = backgroundImage; } | /**
* The background {@link Image} used by {@link CLabel} in the default
* implementation
*
* @param backgroundImage
* the {@link Image} or <code>null</code> if no image should be
* displayed in the background
*/ | The background <code>Image</code> used by <code>CLabel</code> in the default implementation | setBackgroundImage | {
"repo_name": "css-iter/org.csstudio.iter",
"path": "plugins/org.eclipse.jface/src/org/eclipse/jface/window/DefaultToolTip.java",
"license": "epl-1.0",
"size": 8091
} | [
"org.eclipse.swt.graphics.Image"
] | import org.eclipse.swt.graphics.Image; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,927,839 |
public final void testGetPublicExponent() {
RSAPublicKeySpec rpks =
new RSAPublicKeySpec(BigInteger.valueOf(3L),
BigInteger.valueOf(1234567890L));
assertTrue(BigInteger.valueOf(1234567890L).equals(rpks.getPublicExponent()));
} | final void function() { RSAPublicKeySpec rpks = new RSAPublicKeySpec(BigInteger.valueOf(3L), BigInteger.valueOf(1234567890L)); assertTrue(BigInteger.valueOf(1234567890L).equals(rpks.getPublicExponent())); } | /**
* Test for <code>getPublicExponent()</code> method<br>
* Assertion: returns public exponent
*/ | Test for <code>getPublicExponent()</code> method Assertion: returns public exponent | testGetPublicExponent | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "luni/src/test/java/tests/security/spec/RSAPublicKeySpecTest.java",
"license": "gpl-2.0",
"size": 2760
} | [
"java.math.BigInteger",
"java.security.spec.RSAPublicKeySpec"
] | import java.math.BigInteger; import java.security.spec.RSAPublicKeySpec; | import java.math.*; import java.security.spec.*; | [
"java.math",
"java.security"
] | java.math; java.security; | 1,907,833 |
@Override
public List<String> listHosts() {
try {
// TODO (dano): only return hosts whose agents completed registration (i.e. has id nodes)
return provider.get("listHosts").getChildren(Paths.configHosts());
} catch (KeeperException.NoNodeException e) {
return emptyList();
} catch (Keep... | List<String> function() { try { return provider.get(STR).getChildren(Paths.configHosts()); } catch (KeeperException.NoNodeException e) { return emptyList(); } catch (KeeperException e) { throw new HeliosRuntimeException(STR, e); } } | /**
* Returns a list of the hosts/agents that have been registered.
*/ | Returns a list of the hosts/agents that have been registered | listHosts | {
"repo_name": "mattnworb/helios",
"path": "helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java",
"license": "apache-2.0",
"size": 86476
} | [
"com.spotify.helios.common.HeliosRuntimeException",
"com.spotify.helios.servicescommon.coordination.Paths",
"java.util.Collections",
"java.util.List",
"org.apache.zookeeper.KeeperException"
] | import com.spotify.helios.common.HeliosRuntimeException; import com.spotify.helios.servicescommon.coordination.Paths; import java.util.Collections; import java.util.List; import org.apache.zookeeper.KeeperException; | import com.spotify.helios.common.*; import com.spotify.helios.servicescommon.coordination.*; import java.util.*; import org.apache.zookeeper.*; | [
"com.spotify.helios",
"java.util",
"org.apache.zookeeper"
] | com.spotify.helios; java.util; org.apache.zookeeper; | 1,602,146 |
public static int countOccurrencesOf(Object comparisonObject, List list) {
int instances = 0;
boolean comparisonObjectIsNull = comparisonObject == null;
if (list != null) {
for (int i = 0; i < list.size(); i++) {
Object listObject = list.get(i);
... | static int function(Object comparisonObject, List list) { int instances = 0; boolean comparisonObjectIsNull = comparisonObject == null; if (list != null) { for (int i = 0; i < list.size(); i++) { Object listObject = list.get(i); if ((comparisonObjectIsNull & listObject == null) (!comparisonObjectIsNull && comparisonObj... | /**
* Return an integer representing the number of occurrences (using equals()) of the
* specified object in the specified list.
* If the list is null or empty (or both the object and the list is null), 0 is returned.
*/ | Return an integer representing the number of occurrences (using equals()) of the specified object in the specified list. If the list is null or empty (or both the object and the list is null), 0 is returned | countOccurrencesOf | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/helper/Helper.java",
"license": "epl-1.0",
"size": 92748
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,286,265 |
@Override
protected int sortFieldType() {
return SortField.DOUBLE;
} | int function() { return SortField.DOUBLE; } | /**
* Returns the sort field type.
* @return the sort field type (SortField.DOUBLE)
*/ | Returns the sort field type | sortFieldType | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/catalog/lucene/DoubleField.java",
"license": "apache-2.0",
"size": 7368
} | [
"org.apache.lucene.search.SortField"
] | import org.apache.lucene.search.SortField; | import org.apache.lucene.search.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,517,814 |
public static final Map<String, Object> Create(Method handler,
Handler handlerConfig,
Enveloped enveloped,
IMessageFilter[] filter,
... | static final Map<String, Object> function(Method handler, Handler handlerConfig, Enveloped enveloped, IMessageFilter[] filter, MessageListener listenerConfig){ if(handler == null){ throw new IllegalArgumentException(STR); } if(filter == null){ filter = new IMessageFilter[]{}; } Class[] handledMessages = enveloped != nu... | /**
* Create the property map for the {@link MessageHandler} constructor using the default objects.
*
* @param handler The handler annotated method of the listener
* @param handlerConfig The annotation that configures the handler
* @param filter The set of preconfigu... | Create the property map for the <code>MessageHandler</code> constructor using the default objects | Create | {
"repo_name": "bennidi/mbassador",
"path": "src/main/java/net/engio/mbassy/listener/MessageHandler.java",
"license": "mit",
"size": 9269
} | [
"java.lang.reflect.Method",
"java.util.HashMap",
"java.util.Map",
"net.engio.mbassy.common.ReflectionUtils",
"net.engio.mbassy.dispatch.el.ElFilter"
] | import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import net.engio.mbassy.common.ReflectionUtils; import net.engio.mbassy.dispatch.el.ElFilter; | import java.lang.reflect.*; import java.util.*; import net.engio.mbassy.common.*; import net.engio.mbassy.dispatch.el.*; | [
"java.lang",
"java.util",
"net.engio.mbassy"
] | java.lang; java.util; net.engio.mbassy; | 1,540,199 |
public List<Participant> getParticipants() {
if(participants == null) {
participants = new ArrayList<>();
if(data.getParticipants() != null) {
for(final com.robrua.orianna.type.dto.currentgame.Participant part : data.getParticipants()) {
parti... | List<Participant> function() { if(participants == null) { participants = new ArrayList<>(); if(data.getParticipants() != null) { for(final com.robrua.orianna.type.dto.currentgame.Participant part : data.getParticipants()) { participants.add(new Participant(part)); } } } return Collections.unmodifiableList(participants)... | /**
* The participant information
*
* @return the participant information
*/ | The participant information | getParticipants | {
"repo_name": "prefanatic/Orianna",
"path": "src/com/robrua/orianna/type/core/currentgame/CurrentGame.java",
"license": "mit",
"size": 4380
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 111,194 |
protected boolean allowedAt(final Calendar cal) {
return weekdays[cal.get(Calendar.DAY_OF_WEEK) - Calendar.SUNDAY];
} | boolean function(final Calendar cal) { return weekdays[cal.get(Calendar.DAY_OF_WEEK) - Calendar.SUNDAY]; } | /**
* returns TRUE if the schedule can run at given date
*/ | returns TRUE if the schedule can run at given date | allowedAt | {
"repo_name": "rPraml/de.foconis.scheduler",
"path": "de.foconis.core/src/de/foconis/core/internal/schedule/AbstractSchedule.java",
"license": "apache-2.0",
"size": 2685
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,883,754 |
public static String returnErrorFunction() throws IOException {
return JavascriptLoader.getFileContent("printajaxerror.js");
} | static String function() throws IOException { return JavascriptLoader.getFileContent(STR); } | /**
* Returns the (global) javascript function, that tells the user about the
* occured error
*/ | Returns the (global) javascript function, that tells the user about the occured error | returnErrorFunction | {
"repo_name": "arahusky/performance_javadoc",
"path": "src/java-doclet/cz/cuni/mff/d3s/tools/perfdoc/doclets/formats/html/js/JSAjaxHandler.java",
"license": "gpl-3.0",
"size": 4362
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 322,230 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.