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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private static void makeTResNames(){
titratableResNames = new Vector<String>();
titratableResNames.add("ARG");
titratableResNames.add("ASP");
titratableResNames.add("GLU");
titratableResNames.add("LYS");
titratableResNames.add("TYR");
titratableResNames.add("CTR");
titratableResNames.add("NTR");
ti... | static void function(){ titratableResNames = new Vector<String>(); titratableResNames.add("ARG"); titratableResNames.add("ASP"); titratableResNames.add("GLU"); titratableResNames.add("LYS"); titratableResNames.add("TYR"); titratableResNames.add("CTR"); titratableResNames.add("NTR"); titratableResNames.add("HIS"); } | /**
* Instantiates titratableResNames and adds all to the Vector.
*/ | Instantiates titratableResNames and adds all to the Vector | makeTResNames | {
"repo_name": "Electrostatics/graphcut",
"path": "java_src/prot/ProtCompl.java",
"license": "mit",
"size": 45166
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,926,172 |
GraphicsNode getGraphicsNode(); | GraphicsNode getGraphicsNode(); | /**
* Returns the <tt>GraphicsNode</tt> for which a rendering can be obtained
* @return the <tt>GraphicsNode</tt> associated with this image.
*/ | Returns the GraphicsNode for which a rendering can be obtained | getGraphicsNode | {
"repo_name": "sflyphotobooks/crp-batik",
"path": "sources/org/apache/batik/gvt/filter/GraphicsNodeRable.java",
"license": "apache-2.0",
"size": 2238
} | [
"org.apache.batik.gvt.GraphicsNode"
] | import org.apache.batik.gvt.GraphicsNode; | import org.apache.batik.gvt.*; | [
"org.apache.batik"
] | org.apache.batik; | 2,435,972 |
public ExecutorService get(final int connectionId) {
return executorServices.get(connectionId);
} | ExecutorService function(final int connectionId) { return executorServices.get(connectionId); } | /**
* Get executor service of connection.
*
* @param connectionId connection id
* @return executor service of current connection
*/ | Get executor service of connection | get | {
"repo_name": "apache/incubator-shardingsphere",
"path": "shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/executor/ConnectionThreadExecutorGroup.java",
"license": "apache-2.0",
"size": 3237
} | [
"java.util.concurrent.ExecutorService"
] | import java.util.concurrent.ExecutorService; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 688,322 |
@Func(funcCode="delete",moduleCode="message.smsIn")
@RequestMapping
public void deleteBatch(@RequestParam(value="ids[]") Integer[] ids) throws Exception
{
smsInService.deleteBatch(ids);
}
| @Func(funcCode=STR,moduleCode=STR) @RequestMapping void function(@RequestParam(value="ids[]") Integer[] ids) throws Exception { smsInService.deleteBatch(ids); } | /**
* Delete Batch.
* @param id id
* @throws Exception
*/ | Delete Batch | deleteBatch | {
"repo_name": "littcai/saap",
"path": "saap/saap-web/src/main/java/com/litt/saap/message/web/SmsInController.java",
"license": "gpl-2.0",
"size": 4994
} | [
"com.litt.core.module.annotation.Func",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestParam"
] | import com.litt.core.module.annotation.Func; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; | import com.litt.core.module.annotation.*; import org.springframework.web.bind.annotation.*; | [
"com.litt.core",
"org.springframework.web"
] | com.litt.core; org.springframework.web; | 94,463 |
public AlipayObject getBizModel() {
return this.bizModel;
} | AlipayObject function() { return this.bizModel; } | /**
* <p>Getter for the field <code>bizModel</code>.</p>
*
* @return a {@link cn.felord.wepay.ali.sdk.api.AlipayObject} object.
*/ | Getter for the field <code>bizModel</code> | getBizModel | {
"repo_name": "NotFound403/WePay",
"path": "src/main/java/cn/felord/wepay/ali/sdk/api/request/KoubeiMarketingDataDishdiagnoseBatchqueryRequest.java",
"license": "apache-2.0",
"size": 4881
} | [
"cn.felord.wepay.ali.sdk.api.AlipayObject"
] | import cn.felord.wepay.ali.sdk.api.AlipayObject; | import cn.felord.wepay.ali.sdk.api.*; | [
"cn.felord.wepay"
] | cn.felord.wepay; | 1,479,555 |
final int dayOfMarch = getEasterAsDayOfMarch(year);
final Calendar easter = new GregorianCalendar(year, Calendar.MARCH, 1);
easter.add(Calendar.DAY_OF_YEAR, dayOfMarch - 1);
return easter;
} | final int dayOfMarch = getEasterAsDayOfMarch(year); final Calendar easter = new GregorianCalendar(year, Calendar.MARCH, 1); easter.add(Calendar.DAY_OF_YEAR, dayOfMarch - 1); return easter; } | /**
* Figure out, for a given year, when Easter occurs.
*
* <h3>Usage</h3>
* <pre>
* Calendar easter = Easter4J.getEaster(2016);
* assert easter.get(Calendar.MONTH) == Calendar.MARCH;
* assert easter.get(Calendar.DAY_OF_MONTH) == 27;</pre>
*
* You can also get the result as ... | Figure out, for a given year, when Easter occurs. Usage <code> Calendar easter = Easter4J.getEaster(2016); assert easter.get(Calendar.MONTH) == Calendar.MARCH; assert easter.get(Calendar.DAY_OF_MONTH) == 27;</code> You can also get the result as a <code>java.util.Date</code> with <code> Date easter = Easter4J.getEaster... | getEaster | {
"repo_name": "Aldaviva/computus4j",
"path": "easter4j-calendar/src/main/java/com/aldaviva/easter4j/Easter4J.java",
"license": "apache-2.0",
"size": 1513
} | [
"java.util.Calendar",
"java.util.GregorianCalendar"
] | import java.util.Calendar; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 830,102 |
public static String humanReadableDuration(long millis) {
StringBuilder sb = new StringBuilder();
if (millis < 0) {
sb.append('-');
millis = -millis;
}
if (millis < 1_000)
sb.append(millis).append("ms");
else {
long days = Ti... | static String function(long millis) { StringBuilder sb = new StringBuilder(); if (millis < 0) { sb.append('-'); millis = -millis; } if (millis < 1_000) sb.append(millis).append("ms"); else { long days = TimeUnit.MILLISECONDS.toDays(millis); if (days > 0) { sb.append(days).append('d'); millis -= TimeUnit.DAYS.toMillis(d... | /**
* Converts duration to a human-readable format.
* Examples: 10 -> 10ms, 6_0000 -> 6s, 65_000 -> 1m5s, (65 * 60_000 + 32_000) -> 1h5m32s, etc.
*
* @param millis Duration in milliseconds.
* @return Human readable format for duration.
*/ | Converts duration to a human-readable format. Examples: 10 -> 10ms, 6_0000 -> 6s, 65_000 -> 1m5s, (65 * 60_000 + 32_000) -> 1h5m32s, etc | humanReadableDuration | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 388551
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,549,856 |
public User findByLogin(String login, String password) throws SQLException;
| User function(String login, String password) throws SQLException; | /**
* Trouve l'utilisateur via son login et son password
*
* @param login le login de l'utilisateur
* @param password le password de l'utilisateur
* @return l'utilisateur s'il a été trouvé
* @throws SQLException
*/ | Trouve l'utilisateur via son login et son password | findByLogin | {
"repo_name": "ecattez/webapp-skeleton",
"path": "src/main/java/fr/ecattez/dao/deprecated/UserDao.java",
"license": "gpl-3.0",
"size": 2900
} | [
"fr.ecattez.entity.deprecated.User",
"java.sql.SQLException"
] | import fr.ecattez.entity.deprecated.User; import java.sql.SQLException; | import fr.ecattez.entity.deprecated.*; import java.sql.*; | [
"fr.ecattez.entity",
"java.sql"
] | fr.ecattez.entity; java.sql; | 2,660,694 |
public void initInputStream()
throws SQLException
{
InputStream is = null;
Reader r = null;
// BLOBS
if (ndrdaType == DRDAConstants.DRDA_TYPE_NLOBBYTES)
{
is = this.rs.getBinaryStream(this.columnNumber);
if (is == null)
return;
}
// CLOBS
else if (ndrdaType == DR... | void function() throws SQLException { InputStream is = null; Reader r = null; if (ndrdaType == DRDAConstants.DRDA_TYPE_NLOBBYTES) { is = this.rs.getBinaryStream(this.columnNumber); if (is == null) return; } else if (ndrdaType == DRDAConstants.DRDA_TYPE_NLOBCMIXED) { try { r = this.rs.getCharacterStream(this.columnNumbe... | /**
* This method takes information of ResultSet and
* initializes the binaryInputStream variable of this object with not empty stream
* by calling getBinaryStream or getCharacterStream() as appropriate.
* The Reader returned from getCharacterStream() will be encoded in binarystream.
*
*... | This method takes information of ResultSet and initializes the binaryInputStream variable of this object with not empty stream by calling getBinaryStream or getCharacterStream() as appropriate. The Reader returned from getCharacterStream() will be encoded in binarystream | initInputStream | {
"repo_name": "lpxz/grail-derby104",
"path": "java/drda/org/apache/derby/impl/drda/EXTDTAInputStream.java",
"license": "apache-2.0",
"size": 6866
} | [
"java.io.BufferedInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.Reader",
"java.sql.SQLException",
"org.apache.derby.iapi.reference.DRDAConstants",
"org.apache.derby.iapi.services.sanity.SanityManager",
"org.apache.derby.impl.jdbc.Util"
] | import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.sql.SQLException; import org.apache.derby.iapi.reference.DRDAConstants; import org.apache.derby.iapi.services.sanity.SanityManager; import org.apache.derby.impl.jdbc.Util; | import java.io.*; import java.sql.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.services.sanity.*; import org.apache.derby.impl.jdbc.*; | [
"java.io",
"java.sql",
"org.apache.derby"
] | java.io; java.sql; org.apache.derby; | 1,809,530 |
public void setStatistics(Map<String, Long> statistics) {
ColumnDescription columndesc = new ColumnDescription(
OpenVSwitchColumn.STATISTICS
.columnName(),
... | void function(Map<String, Long> statistics) { ColumnDescription columndesc = new ColumnDescription( OpenVSwitchColumn.STATISTICS .columnName(), STR, VersionNum.VERSION100); super.setDataHandler(columndesc, statistics); } | /**
* Add a Column entity which column name is "statistics" to the Row entity
* of attributes.
* @param statistics the column data which column name is "statistics"
*/ | Add a Column entity which column name is "statistics" to the Row entity of attributes | setStatistics | {
"repo_name": "rvhub/onos",
"path": "ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/OpenVSwitch.java",
"license": "apache-2.0",
"size": 21822
} | [
"java.util.Map",
"org.onosproject.ovsdb.rfc.tableservice.ColumnDescription"
] | import java.util.Map; import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; | import java.util.*; import org.onosproject.ovsdb.rfc.tableservice.*; | [
"java.util",
"org.onosproject.ovsdb"
] | java.util; org.onosproject.ovsdb; | 1,843,485 |
private void switchToItemFrame() {
this.mFrameManager.switchToFrame(EFrame.ITEM);
}
| void function() { this.mFrameManager.switchToFrame(EFrame.ITEM); } | /**
* Switches to the item frame of <tt>Freewar</tt> and waits until it is loaded.
* It ensures that previous queued events are processed before switching frames.
*/ | Switches to the item frame of Freewar and waits until it is loaded. It ensures that previous queued events are processed before switching frames | switchToItemFrame | {
"repo_name": "ZabuzaW/Sparkle",
"path": "src/de/zabuza/sparkle/freewar/inventory/Inventory.java",
"license": "gpl-3.0",
"size": 9410
} | [
"de.zabuza.sparkle.freewar.frames.EFrame"
] | import de.zabuza.sparkle.freewar.frames.EFrame; | import de.zabuza.sparkle.freewar.frames.*; | [
"de.zabuza.sparkle"
] | de.zabuza.sparkle; | 668,280 |
public static String decompressString(String input) {
byte[] bCompressed = Base64Coder.decode(input);
byte[] bDecompressed = decompressByteArray(bCompressed);
return bytesToString(bDecompressed);
} | static String function(String input) { byte[] bCompressed = Base64Coder.decode(input); byte[] bDecompressed = decompressByteArray(bCompressed); return bytesToString(bDecompressed); } | /**
* Decompress a Base64 encoded String
* @param input Compressed + Base64 encoded String
* @return Raw String
*/ | Decompress a Base64 encoded String | decompressString | {
"repo_name": "Phazyck/nullpominai",
"path": "src/mu/nu/nullpo/game/net/NetUtil.java",
"license": "mit",
"size": 8903
} | [
"biz.source_code.base64Coder.Base64Coder"
] | import biz.source_code.base64Coder.Base64Coder; | import biz.source_code.*; | [
"biz.source_code"
] | biz.source_code; | 2,128,063 |
void setAttributes(Map<String, List<Object>> attributes); | void setAttributes(Map<String, List<Object>> attributes); | /**
* Sets the attributes.
*
* @param attributes the new attributes
*/ | Sets the attributes | setAttributes | {
"repo_name": "apereo/cas",
"path": "api/cas-server-core-api-authentication/src/main/java/org/apereo/cas/authentication/principal/Service.java",
"license": "apache-2.0",
"size": 881
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 858,340 |
public MultisetSort getMulti() {
return item.getMulti();
} | MultisetSort function() { return item.getMulti(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getMulti | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/terms/hlapi/MultisetSortHLAPI.java",
"license": "epl-1.0",
"size": 16242
} | [
"fr.lip6.move.pnml.pthlpng.terms.MultisetSort"
] | import fr.lip6.move.pnml.pthlpng.terms.MultisetSort; | import fr.lip6.move.pnml.pthlpng.terms.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 2,645,447 |
private void writeObject(ObjectOutputStream oos)
throws IOException {
oos.defaultWriteObject();
MatrixUtils.serializeRealVector(coefficients, oos);
} | void function(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); MatrixUtils.serializeRealVector(coefficients, oos); } | /**
* Serialize the instance.
* @param oos stream where object should be written
* @throws IOException if object cannot be written to stream
*/ | Serialize the instance | writeObject | {
"repo_name": "sdinot/hipparchus",
"path": "hipparchus-optim/src/main/java/org/hipparchus/optim/linear/LinearConstraint.java",
"license": "apache-2.0",
"size": 10467
} | [
"java.io.IOException",
"java.io.ObjectOutputStream",
"org.hipparchus.linear.MatrixUtils"
] | import java.io.IOException; import java.io.ObjectOutputStream; import org.hipparchus.linear.MatrixUtils; | import java.io.*; import org.hipparchus.linear.*; | [
"java.io",
"org.hipparchus.linear"
] | java.io; org.hipparchus.linear; | 1,559,544 |
public static boolean areEnchantmentsCompatible (Enchantment firstEnchantment, Enchantment secondEnchantment) {
return firstEnchantment.isCompatibleWith(secondEnchantment);
} | static boolean function (Enchantment firstEnchantment, Enchantment secondEnchantment) { return firstEnchantment.isCompatibleWith(secondEnchantment); } | /**
* Checks if two enchantments are compatible with each other. For two enchantments to be
* compatible, both of their canApplyTegether methods must return true.
*
* @param firstEnchantment The first Enchantment to check.
* @param secondEnchantment The second Enchantment to check.
* @retu... | Checks if two enchantments are compatible with each other. For two enchantments to be compatible, both of their canApplyTegether methods must return true | areEnchantmentsCompatible | {
"repo_name": "Darkhax-Minecraft/Bookshelf",
"path": "src/main/java/net/darkhax/bookshelf/util/EnchantmentUtils.java",
"license": "lgpl-2.1",
"size": 4040
} | [
"net.minecraft.enchantment.Enchantment"
] | import net.minecraft.enchantment.Enchantment; | import net.minecraft.enchantment.*; | [
"net.minecraft.enchantment"
] | net.minecraft.enchantment; | 527,826 |
Observable<Map<String, Widget>> getComplexNullAsync(); | Observable<Map<String, Widget>> getComplexNullAsync(); | /**
* Get dictionary of complex type null value.
*
* @return the observable to the Map<String, Widget> object
*/ | Get dictionary of complex type null value | getComplexNullAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/Dictionarys.java",
"license": "mit",
"size": 79030
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 788,861 |
public void load()
{
properties = new Properties();
propFile = new File(GlobalPreference.getApplicationDir(), ".PathVisio");
try
{
if(propFile.exists()) {
properties.load(new FileInputStream(propFile));
compatUpdate();
}
else
{
Logger.log.info("Preferences file " + propFile + "... | void function() { properties = new Properties(); propFile = new File(GlobalPreference.getApplicationDir(), STR); try { if(propFile.exists()) { properties.load(new FileInputStream(propFile)); compatUpdate(); } else { Logger.log.info(STR + propFile + STR); } } catch (IOException e) { Logger.log.error (STR, e); } dirty = ... | /**
* Load preferences from file
*/ | Load preferences from file | load | {
"repo_name": "egonw/pathvisio",
"path": "modules/org.pathvisio.core/src/org/pathvisio/core/preferences/PreferenceManager.java",
"license": "apache-2.0",
"size": 6189
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.util.Properties",
"org.pathvisio.core.debug.Logger"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; import org.pathvisio.core.debug.Logger; | import java.io.*; import java.util.*; import org.pathvisio.core.debug.*; | [
"java.io",
"java.util",
"org.pathvisio.core"
] | java.io; java.util; org.pathvisio.core; | 2,558,497 |
private HasCell<ManageMeasureSearchModel.Result, Boolean> getCheckBoxCell(final boolean isUsed) {
HasCell<ManageMeasureSearchModel.Result, Boolean> hasCell = new HasCell<ManageMeasureSearchModel.Result, Boolean>() {
private MatCheckBoxCell cell = new MatCheckBoxCell(false, true, isUsed); | HasCell<ManageMeasureSearchModel.Result, Boolean> function(final boolean isUsed) { HasCell<ManageMeasureSearchModel.Result, Boolean> hasCell = new HasCell<ManageMeasureSearchModel.Result, Boolean>() { private MatCheckBoxCell cell = new MatCheckBoxCell(false, true, isUsed); | /**
* Gets the check box cell.
*
* @param isUsed
* the is used
* @return the check box cell
*/ | Gets the check box cell | getCheckBoxCell | {
"repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_Release",
"path": "mat/src/main/java/mat/client/measure/EditIncludedComponentMeasureDialogBox.java",
"license": "cc0-1.0",
"size": 16337
} | [
"com.google.gwt.cell.client.HasCell"
] | import com.google.gwt.cell.client.HasCell; | import com.google.gwt.cell.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,417,977 |
@Override
public Map<String, String> getJQueryEventParameterListsForAjax() {
return null;
} | Map<String, String> function() { return null; } | /**
* Returns the subset of the parameter list of jQuery and other non-standard JS callbacks which is sent to the server via AJAX.
* If there's no parameter list for a certain event, the default is simply null.
*
* @return A hash map containing the events. May be null.
*/ | Returns the subset of the parameter list of jQuery and other non-standard JS callbacks which is sent to the server via AJAX. If there's no parameter list for a certain event, the default is simply null | getJQueryEventParameterListsForAjax | {
"repo_name": "chongma/BootsFaces-OSP",
"path": "src/main/java/net/bootsfaces/component/carousel/Carousel.java",
"license": "apache-2.0",
"size": 38342
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 86,481 |
private void runTest(final int nNameNodes, long[] capacities, String[] racks,
long newCapacity, String newRack, Configuration conf) throws Exception {
final int nDataNodes = capacities.length;
LOG.info("nNameNodes=" + nNameNodes + ", nDataNodes=" + nDataNodes);
Assert.assertEquals(nDataNodes, racks.... | void function(final int nNameNodes, long[] capacities, String[] racks, long newCapacity, String newRack, Configuration conf) throws Exception { final int nDataNodes = capacities.length; LOG.info(STR + nNameNodes + STR + nDataNodes); Assert.assertEquals(nDataNodes, racks.length); LOG.info(STR); final MiniDFSCluster clus... | /**
* This test start a cluster, fill the DataNodes to be 30% full;
* It then adds an empty node and start balancing.
*
* @param nNameNodes Number of NameNodes
* @param capacities Capacities of the datanodes
* @param racks Rack names
* @param newCapacity the capacity of the new DataNode
* @param... | This test start a cluster, fill the DataNodes to be 30% full; It then adds an empty node and start balancing | runTest | {
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerWithMultipleNameNodes.java",
"license": "mit",
"size": 14016
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.apache.hadoop.hdfs.MiniDFSNNTopology",
"org.junit.Assert"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.MiniDFSNNTopology; import org.junit.Assert; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,407,553 |
@Test
@Documented
@Title( "Sort a result using raw Groovy operations" )
@Graph( value = { "I know you", "I know him" }, autoIndexNodes = true )
public void testSortResults() throws UnsupportedEncodingException
{
// String script = "g.idx('node_auto_index')[[name:'I']].out.sort{it.name}";... | @Title( STR ) @Graph( value = { STR, STR }, autoIndexNodes = true ) void function() throws UnsupportedEncodingException { String script = STR + STR + STR + STR + STR + STR; String response = doRestCall( script, Status.OK ); assertTrue( response.contains( "you" ) ); assertTrue( response.contains( "him" ) ); } | /**
* The following script returns a sorted list of all nodes connected via
* outgoing relationships to node 1, sorted by their `name`-property.
*/ | The following script returns a sorted list of all nodes connected via outgoing relationships to node 1, sorted by their `name`-property | testSortResults | {
"repo_name": "neo4j-contrib/javascript-plugin",
"path": "src/test/java/org/neo4j/server/plugin/javascript/JSPluginFunctionalTest.java",
"license": "gpl-3.0",
"size": 38790
} | [
"java.io.UnsupportedEncodingException",
"javax.ws.rs.core.Response",
"org.junit.Assert",
"org.neo4j.test.GraphDescription",
"org.neo4j.test.TestData"
] | import java.io.UnsupportedEncodingException; import javax.ws.rs.core.Response; import org.junit.Assert; import org.neo4j.test.GraphDescription; import org.neo4j.test.TestData; | import java.io.*; import javax.ws.rs.core.*; import org.junit.*; import org.neo4j.test.*; | [
"java.io",
"javax.ws",
"org.junit",
"org.neo4j.test"
] | java.io; javax.ws; org.junit; org.neo4j.test; | 1,757,316 |
@Override
public TransAction viewThisUndo() {
if ( undo.isEmpty() || undo_position < 0 ) {
return null; // No undo left!
}
TransAction retval = undo.get( undo_position );
return retval;
} | TransAction function() { if ( undo.isEmpty() undo_position < 0 ) { return null; } TransAction retval = undo.get( undo_position ); return retval; } | /**
* View current undo, don't change undo position
*
* @return The current undo transaction
*/ | View current undo, don't change undo position | viewThisUndo | {
"repo_name": "codek/pentaho-kettle",
"path": "engine/src/org/pentaho/di/base/AbstractMeta.java",
"license": "apache-2.0",
"size": 46271
} | [
"org.pentaho.di.core.undo.TransAction"
] | import org.pentaho.di.core.undo.TransAction; | import org.pentaho.di.core.undo.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 765,134 |
public String getTextContent() {
Node child = listItemElement.getFirstChild();
while (child != null) {
if (child instanceof TextPElement) {
return child.getTextContent();
}
child = child.getNextSibling();
}
return null;
} | String function() { Node child = listItemElement.getFirstChild(); while (child != null) { if (child instanceof TextPElement) { return child.getTextContent(); } child = child.getNextSibling(); } return null; } | /**
* Get item text content. If this item has a List, its content is not
* included.
*
* @return the text content of this item
*/ | Get item text content. If this item has a List, its content is not included | getTextContent | {
"repo_name": "jbjonesjr/geoproponis",
"path": "external/simple-odf-0.8.1-incubating-sources/org/odftoolkit/simple/text/list/ListItem.java",
"license": "gpl-2.0",
"size": 10461
} | [
"org.odftoolkit.odfdom.dom.element.text.TextPElement",
"org.w3c.dom.Node"
] | import org.odftoolkit.odfdom.dom.element.text.TextPElement; import org.w3c.dom.Node; | import org.odftoolkit.odfdom.dom.element.text.*; import org.w3c.dom.*; | [
"org.odftoolkit.odfdom",
"org.w3c.dom"
] | org.odftoolkit.odfdom; org.w3c.dom; | 860,202 |
public final Attribute<?> getAttribute(String name) {
return attributes.get(name);
} | final Attribute<?> function(String name) { return attributes.get(name); } | /**
* Gets the value of the attribute with the specified name.
*
* @param name The name of the attribute.
* @return The value of the attribute.
*/ | Gets the value of the attribute with the specified name | getAttribute | {
"repo_name": "apollo-rsps/apollo",
"path": "game/src/main/java/org/apollo/game/model/entity/Mob.java",
"license": "isc",
"size": 14201
} | [
"org.apollo.game.model.entity.attr.Attribute"
] | import org.apollo.game.model.entity.attr.Attribute; | import org.apollo.game.model.entity.attr.*; | [
"org.apollo.game"
] | org.apollo.game; | 876,044 |
public Element getLocaleNode(Locale locale) throws CmsRuntimeException {
String localeStr = locale.toString();
Iterator<Element> i = CmsXmlGenericWrapper.elementIterator(m_document.getRootElement());
while (i.hasNext()) {
Element element = i.next();
if (localeStr.equ... | Element function(Locale locale) throws CmsRuntimeException { String localeStr = locale.toString(); Iterator<Element> i = CmsXmlGenericWrapper.elementIterator(m_document.getRootElement()); while (i.hasNext()) { Element element = i.next(); if (localeStr.equals(element.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_... | /**
* Returns the XML root element node for the given locale.<p>
*
* @param locale the locale to get the root element for
*
* @return the XML root element node for the given locale
*
* @throws CmsRuntimeException if no language element is found in the document
*/ | Returns the XML root element node for the given locale | getLocaleNode | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/xml/content/CmsXmlContent.java",
"license": "lgpl-2.1",
"size": 50054
} | [
"java.util.Iterator",
"java.util.Locale",
"org.dom4j.Element",
"org.opencms.main.CmsRuntimeException",
"org.opencms.xml.CmsXmlContentDefinition",
"org.opencms.xml.CmsXmlGenericWrapper"
] | import java.util.Iterator; import java.util.Locale; import org.dom4j.Element; import org.opencms.main.CmsRuntimeException; import org.opencms.xml.CmsXmlContentDefinition; import org.opencms.xml.CmsXmlGenericWrapper; | import java.util.*; import org.dom4j.*; import org.opencms.main.*; import org.opencms.xml.*; | [
"java.util",
"org.dom4j",
"org.opencms.main",
"org.opencms.xml"
] | java.util; org.dom4j; org.opencms.main; org.opencms.xml; | 2,411,875 |
public boolean removeAll(Collection<?> c) {
return this.list.removeAll(c);
} | boolean function(Collection<?> c) { return this.list.removeAll(c); } | /**
* Removes the all.
*
* @param c
* the c
* @return true, if successful
* @see java.util.AbstractCollection#removeAll(java.util.Collection)
*/ | Removes the all | removeAll | {
"repo_name": "universsky/diddler",
"path": "src/org/jnetpcap/util/PcapPacketArrayList.java",
"license": "lgpl-3.0",
"size": 8818
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,819,436 |
public static List<Slot> getOutputSlots_EvaluationMethod() {
Slot evaluationMethodSlot = new Slot(SlotContent.EVALUATION_METHOD);
return Arrays.asList(evaluationMethodSlot);
}
| static List<Slot> function() { Slot evaluationMethodSlot = new Slot(SlotContent.EVALUATION_METHOD); return Arrays.asList(evaluationMethodSlot); } | /**
* Get the output slots definition for the ontology
* @return - list of slots
*/ | Get the output slots definition for the ontology | getOutputSlots_EvaluationMethod | {
"repo_name": "tomkren/pikater",
"path": "src/org/pikater/core/options/SlotsHelper.java",
"license": "apache-2.0",
"size": 4056
} | [
"java.util.Arrays",
"java.util.List",
"org.pikater.core.CoreConstant",
"org.pikater.core.ontology.subtrees.agentinfo.Slot"
] | import java.util.Arrays; import java.util.List; 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,930 |
public static boolean corruptReplica(int i, ExtendedBlock blk)
throws IOException {
File blockFile = getBlockFile(i, blk);
return corruptBlock(blockFile);
} | static boolean function(int i, ExtendedBlock blk) throws IOException { File blockFile = getBlockFile(i, blk); return corruptBlock(blockFile); } | /**
* Corrupt a block on a particular datanode.
*
* @param i index of the datanode
* @param blk name of the block
* @throws IOException on error accessing the given block or if
* the contents of the block (on the same datanode) differ.
* @return true if a replica was corrupted, false otherwise
*... | Corrupt a block on a particular datanode | corruptReplica | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java",
"license": "apache-2.0",
"size": 74425
} | [
"java.io.File",
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock"
] | import java.io.File; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 88,297 |
public void setSourceTeNodeKey(TeNodeKey sourceTeNodeKey) {
this.sourceTeNodeKey = sourceTeNodeKey;
} | void function(TeNodeKey sourceTeNodeKey) { this.sourceTeNodeKey = sourceTeNodeKey; } | /**
* Sets the source node key.
*
* @param sourceTeNodeKey the sourceTeNodeKey to set
*/ | Sets the source node key | setSourceTeNodeKey | {
"repo_name": "donNewtonAlpha/onos",
"path": "apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/InternalTeNode.java",
"license": "apache-2.0",
"size": 10661
} | [
"org.onosproject.tetopology.management.api.node.TeNodeKey"
] | import org.onosproject.tetopology.management.api.node.TeNodeKey; | import org.onosproject.tetopology.management.api.node.*; | [
"org.onosproject.tetopology"
] | org.onosproject.tetopology; | 1,340,666 |
public void performCalculations(Set selectedNodes, Set allNodes, Set noClassificationsSet, String finished) {
final PostProcessTask calc = new PostProcessTask(selectedNodes, allNodes, noClassificationsSet, finished);
// Execute task here!
final TaskManager tm = adapter.getTaskManager();
tm.execute((new Gen... | void function(Set selectedNodes, Set allNodes, Set noClassificationsSet, String finished) { final PostProcessTask calc = new PostProcessTask(selectedNodes, allNodes, noClassificationsSet, finished); final TaskManager tm = adapter.getTaskManager(); tm.execute((new GenericTaskFactory(calc)).createTaskIterator()); } priva... | /**
* Method that redirects the calculations of the distribution and the
* correction. Redirects the visualization of the network and redirects the
* making of a file with the interesting data.
*/ | Method that redirects the calculations of the distribution and the correction. Redirects the visualization of the network and redirects the making of a file with the interesting data | performCalculations | {
"repo_name": "stmae/bingo",
"path": "src/main/java/bingo/internal/SettingsPanelActionListener.java",
"license": "gpl-2.0",
"size": 45892
} | [
"java.util.Set",
"org.cytoscape.work.AbstractTask",
"org.cytoscape.work.TaskManager"
] | import java.util.Set; import org.cytoscape.work.AbstractTask; import org.cytoscape.work.TaskManager; | import java.util.*; import org.cytoscape.work.*; | [
"java.util",
"org.cytoscape.work"
] | java.util; org.cytoscape.work; | 2,683,874 |
@Override
protected void afterExecute(Runnable command, Throwable throwable) {
super.afterExecute(command, throwable);
if (throwable != null) {
logger.error("runnable failed", throwable);
return;
}
if (!(command instanceof RequestDeserializer)) {
... | void function(Runnable command, Throwable throwable) { super.afterExecute(command, throwable); if (throwable != null) { logger.error(STR, throwable); return; } if (!(command instanceof RequestDeserializer)) { logger.error(STR); return; } final RequestDeserializer responseDeserializer = (RequestDeserializer)command; fin... | /**
* Print the log message indicating the status of the command.
*
* @parm runnable is the task which just completed.
* @parm throwable is the exception (null on success) thrown during the running of the runnable.
*/ | Print the log message indicating the status of the command | afterExecute | {
"repo_name": "isis-ammo/ammo-core",
"path": "AmmoCore/src/main/java/edu/vu/isis/ammo/core/distributor/ResponseExecutor.java",
"license": "mit",
"size": 4142
} | [
"edu.vu.isis.ammo.core.PLogger"
] | import edu.vu.isis.ammo.core.PLogger; | import edu.vu.isis.ammo.core.*; | [
"edu.vu.isis"
] | edu.vu.isis; | 1,290,110 |
public ServiceResponseWithHeaders<Product, LROsPutNoHeaderInRetryHeaders> putNoHeaderInRetry() throws CloudException, IOException, InterruptedException {
final Product product = null;
Response<ResponseBody> result = service.putNoHeaderInRetry(product, this.client.getAcceptLanguage()).execute();
... | ServiceResponseWithHeaders<Product, LROsPutNoHeaderInRetryHeaders> function() throws CloudException, IOException, InterruptedException { final Product product = null; Response<ResponseBody> result = service.putNoHeaderInRetry(product, this.client.getAcceptLanguage()).execute(); return client.getAzureClient().getPutOrPa... | /**
* Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not contain location header.
*
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization... | Long running put request, service returns a 202 to the initial request with location header. Subsequent calls to operation status do not contain location header | putNoHeaderInRetry | {
"repo_name": "sharadagarwal/autorest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROsOperationsImpl.java",
"license": "mit",
"size": 315973
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.azure.CloudException",
"com.microsoft.rest.ServiceResponseWithHeaders",
"java.io.IOException"
] | import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException; | import com.google.common.reflect.*; import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*; | [
"com.google.common",
"com.microsoft.azure",
"com.microsoft.rest",
"java.io"
] | com.google.common; com.microsoft.azure; com.microsoft.rest; java.io; | 2,700,780 |
void add(SolrInputDocument solrDocument) throws SolrServerException, IOException; | void add(SolrInputDocument solrDocument) throws SolrServerException, IOException; | /**
* Add a {@link SolrInputDocument} to the Solr index.
* <p>
* Note: Does not apply until you call {@link #commit()}.
*
* @param solrDocument the document.
* @throws SolrServerException if problems occur.
* @throws IOException if problems occur.
*/ | Add a <code>SolrInputDocument</code> to the Solr index. Note: Does not apply until you call <code>#commit()</code> | add | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/api/SolrInstance.java",
"license": "lgpl-2.1",
"size": 5427
} | [
"java.io.IOException",
"org.apache.solr.client.solrj.SolrServerException",
"org.apache.solr.common.SolrInputDocument"
] | import java.io.IOException; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.common.SolrInputDocument; | import java.io.*; import org.apache.solr.client.solrj.*; import org.apache.solr.common.*; | [
"java.io",
"org.apache.solr"
] | java.io; org.apache.solr; | 1,449,787 |
@Test
public void NoOPAudiences1ServerTests_StringInToken_ALLAudiencesInCfg() throws Exception {
TestSettings updatedTestSettings = rsTools.updateRSProtectedResource(testSettings, "snoop/AudAll");
String origJwtToken = buildAJWTToken(testSettings, Constants.PAYLOAD_AUDIENCE, badString);
... | void function() throws Exception { TestSettings updatedTestSettings = rsTools.updateRSProtectedResource(testSettings, STR); String origJwtToken = buildAJWTToken(testSettings, Constants.PAYLOAD_AUDIENCE, badString); positiveTest(updatedTestSettings, origJwtToken); } | /**
* Create a JWT token with soem string in "aud" in the token. The audiences in the config is configured and set to
* ALL_AUDIENCES
* We should have access to our app
*
* @throws Exception
*/ | Create a JWT token with soem string in "aud" in the token. The audiences in the config is configured and set to ALL_AUDIENCES We should have access to our app | NoOPAudiences1ServerTests_StringInToken_ALLAudiencesInCfg | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.oidc.server_fat.jaxrs.config/fat/src/com/ibm/ws/security/openidconnect/server/fat/jaxrs/config/noOP/NoOPAudiences1ServerTests.java",
"license": "epl-1.0",
"size": 23228
} | [
"com.ibm.ws.security.oauth_oidc.fat.commonTest.Constants",
"com.ibm.ws.security.oauth_oidc.fat.commonTest.TestSettings"
] | import com.ibm.ws.security.oauth_oidc.fat.commonTest.Constants; import com.ibm.ws.security.oauth_oidc.fat.commonTest.TestSettings; | import com.ibm.ws.security.oauth_oidc.fat.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 2,615,656 |
public Object clone() throws CloneNotSupportedException {
XYSeries clone = (XYSeries) super.clone();
clone.data = (List) ObjectUtilities.deepClone(this.data);
return clone;
}
| Object function() throws CloneNotSupportedException { XYSeries clone = (XYSeries) super.clone(); clone.data = (List) ObjectUtilities.deepClone(this.data); return clone; } | /**
* Returns a clone of the series.
*
* @return A clone of the series.
*
* @throws CloneNotSupportedException if there is a cloning problem.
*/ | Returns a clone of the series | clone | {
"repo_name": "integrated/jfreechart",
"path": "source/org/jfree/data/xy/XYSeries.java",
"license": "lgpl-2.1",
"size": 26207
} | [
"java.util.List",
"org.jfree.util.ObjectUtilities"
] | import java.util.List; import org.jfree.util.ObjectUtilities; | import java.util.*; import org.jfree.util.*; | [
"java.util",
"org.jfree.util"
] | java.util; org.jfree.util; | 2,252,189 |
public ArrayList<String> getHadoopMultiUsersList() throws
IOException {
String hadoopUserListPath = conf.get(CONF_HADOOP_MULTI_USER_LIST);
if (hadoopUserListPath == null || hadoopUserListPath.isEmpty()) {
LOG.error("Proxy user list path has not been passed for "
+ CONF_HADOOP_MULTI_USER_L... | ArrayList<String> function() throws IOException { String hadoopUserListPath = conf.get(CONF_HADOOP_MULTI_USER_LIST); if (hadoopUserListPath == null hadoopUserListPath.isEmpty()) { LOG.error(STR + CONF_HADOOP_MULTI_USER_LIST); throw new IllegalArgumentException( STR); } File fileObj = new File(hadoopUserListPath); DataI... | /**
* Get the multi users list.
* @return ArrayList - users list as a array list.
* @throws IOException - if an I/O error occurs.
*/ | Get the multi users list | getHadoopMultiUsersList | {
"repo_name": "YuMatsuzawa/HadoopEclipseProject",
"path": "src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java",
"license": "apache-2.0",
"size": 18165
} | [
"java.io.DataInputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.util.ArrayList"
] | import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,839,016 |
protected ConcurrentHashMap<Long, Player> loadPlayers(ZoneServer server) {
Statement s = null;
ResultSet result = null;
ConcurrentHashMap<Long, Player> vPlayersThisServer = new ConcurrentHashMap<Long, Player>();
try {
List<String> vCharacterNames = new ArrayList<String>();
String query = "Select * from... | ConcurrentHashMap<Long, Player> function(ZoneServer server) { Statement s = null; ResultSet result = null; ConcurrentHashMap<Long, Player> vPlayersThisServer = new ConcurrentHashMap<Long, Player>(); try { List<String> vCharacterNames = new ArrayList<String>(); String query = STR + server.getServerID() + ";"; s = conn.c... | /**
* Load all Players and their associated items for a given ZoneServer
*
* @param server
* -- The ZoneServer being loaded.
* @return -- The list of Players sorted by Object ID.
*/ | Load all Players and their associated items for a given ZoneServer | loadPlayers | {
"repo_name": "oswin06082/SwgAnh1.0a",
"path": "SWGCombined/src/DatabaseInterface.java",
"license": "gpl-3.0",
"size": 320465
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.DataOutputStream",
"java.io.ObjectInputStream",
"java.sql.ResultSet",
"java.sql.Statement",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"java.util.concurrent.ConcurrentHashMap",
"java.util.zip.Inflater",
... | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.ObjectInputStream; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.ConcurrentHashMap; i... | import java.io.*; import java.sql.*; import java.util.*; import java.util.concurrent.*; import java.util.zip.*; | [
"java.io",
"java.sql",
"java.util"
] | java.io; java.sql; java.util; | 1,705,951 |
protected String[] parseCommands(String content) {
Collection<String> parsedCommands = new ArrayList<String>();
BufferedReader in = new BufferedReader(new StringReader(content));
try {
String command;
while ((command = in.readLine()) != null) {
if (St... | String[] function(String content) { Collection<String> parsedCommands = new ArrayList<String>(); BufferedReader in = new BufferedReader(new StringReader(content)); try { String command; while ((command = in.readLine()) != null) { if (StringUtils.isNotBlank(command)) { parsedCommands.add(command.trim()); } } } catch (IO... | /**
* Reads the Calendar-Event content String line by line. It is assumed, that
* each line contains a single command. Blank lines are omitted.
*
* @param content the Calendar-Event content
* @return an array of single commands which can be executed afterwards
*/ | Reads the Calendar-Event content String line by line. It is assumed, that each line contains a single command. Blank lines are omitted | parseCommands | {
"repo_name": "steintore/openhab",
"path": "bundles/io/org.openhab.io.gcal/src/main/java/org/openhab/io/gcal/internal/util/ExecuteCommandJob.java",
"license": "epl-1.0",
"size": 5637
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.StringReader",
"java.util.ArrayList",
"java.util.Collection",
"org.apache.commons.lang.StringUtils"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; import java.util.ArrayList; import java.util.Collection; import org.apache.commons.lang.StringUtils; | import java.io.*; import java.util.*; import org.apache.commons.lang.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 750,399 |
protected void removeConfigurable(Configurable configurable) {
model.removeConfigurable(configurable);
// Update ParameterHandler
ConfigurationManager.getInstance().getAbstractConfigurator(configurable.getTypeId())
.removeCachedParameterHandler(configurable);
} | void function(Configurable configurable) { model.removeConfigurable(configurable); ConfigurationManager.getInstance().getAbstractConfigurator(configurable.getTypeId()) .removeCachedParameterHandler(configurable); } | /**
* Removes the specified {@link Configurable}.
*
* @param configurable
*/ | Removes the specified <code>Configurable</code> | removeConfigurable | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/tools/config/gui/ConfigurableController.java",
"license": "gpl-3.0",
"size": 15610
} | [
"com.rapidminer.tools.config.Configurable",
"com.rapidminer.tools.config.ConfigurationManager"
] | import com.rapidminer.tools.config.Configurable; import com.rapidminer.tools.config.ConfigurationManager; | import com.rapidminer.tools.config.*; | [
"com.rapidminer.tools"
] | com.rapidminer.tools; | 2,180,303 |
public void setAlertList(List<Alert> alertList) {
alerts = alertList;
} | void function(List<Alert> alertList) { alerts = alertList; } | /**
* Sets the list of alerts to generate the feed.
* @param alertList List of alerts to be included in the feed.
*/ | Sets the list of alerts to generate the feed | setAlertList | {
"repo_name": "mxabierto/avisos",
"path": "src/main/java/mx/org/cedn/avisosconagua/engine/FeedWriter.java",
"license": "mit",
"size": 6293
} | [
"com.google.publicalerts.cap.Alert",
"java.util.List"
] | import com.google.publicalerts.cap.Alert; import java.util.List; | import com.google.publicalerts.cap.*; import java.util.*; | [
"com.google.publicalerts",
"java.util"
] | com.google.publicalerts; java.util; | 2,606,818 |
public List<KeyValueScanner> getScanners(boolean cacheBlocks, boolean isGet, boolean usePread,
boolean isCompaction, ScanQueryMatcher matcher, byte[] startRow, byte[] stopRow, long readPt)
throws IOException {
return getScanners(cacheBlocks, usePread, isCompaction, matcher, startRow, true, stopRow, fa... | List<KeyValueScanner> function(boolean cacheBlocks, boolean isGet, boolean usePread, boolean isCompaction, ScanQueryMatcher matcher, byte[] startRow, byte[] stopRow, long readPt) throws IOException { return getScanners(cacheBlocks, usePread, isCompaction, matcher, startRow, true, stopRow, false, readPt); } | /**
* Get all scanners with no filtering based on TTL (that happens further down the line).
* @param cacheBlocks cache the blocks or not
* @param usePread true to use pread, false if not
* @param isCompaction true if the scanner is created for compaction
* @param matcher the scan query matcher
* @para... | Get all scanners with no filtering based on TTL (that happens further down the line) | getScanners | {
"repo_name": "mahak/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java",
"license": "apache-2.0",
"size": 94328
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.regionserver.querymatcher.ScanQueryMatcher; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.regionserver.querymatcher.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,408,276 |
public void moveFolderToTrash(Long userId, Long folderId)
throws ObjectNotFoundException, InsufficientPermissionsException; | void function(Long userId, Long folderId) throws ObjectNotFoundException, InsufficientPermissionsException; | /**
* Marks the specified folder as deleted in the specified user's namespace.
*
* @param userId the ID of the current user
* @param folderId the ID of the folder to delete
* @throws ObjectNotFoundException if the user or file was not found, with
* the exception message mentioning the precise p... | Marks the specified folder as deleted in the specified user's namespace | moveFolderToTrash | {
"repo_name": "andrewbissada/gss",
"path": "src/org/gss_project/gss/server/ejb/ExternalAPI.java",
"license": "gpl-3.0",
"size": 50977
} | [
"org.gss_project.gss.common.exceptions.InsufficientPermissionsException",
"org.gss_project.gss.common.exceptions.ObjectNotFoundException"
] | import org.gss_project.gss.common.exceptions.InsufficientPermissionsException; import org.gss_project.gss.common.exceptions.ObjectNotFoundException; | import org.gss_project.gss.common.exceptions.*; | [
"org.gss_project.gss"
] | org.gss_project.gss; | 2,344,000 |
protected void setStatus(Status newStatus) {
Status oldStatus = status;
status = newStatus;
logger.info("{}: changed status from: {} to: {} (interrupted={})",
getName(), oldStatus, newStatus, interrupted);
if (!Objects.equals(oldStatus, newStatus)) {
noti... | void function(Status newStatus) { Status oldStatus = status; status = newStatus; logger.info(STR, getName(), oldStatus, newStatus, interrupted); if (!Objects.equals(oldStatus, newStatus)) { notifyObservers(); } } | /**
* Updates the status setting and logs the outcome. Should only be called either by tests, by
* {@code this}, or by subclasses.
*
* @param newStatus the new status to be set
*/ | Updates the status setting and logs the outcome. Should only be called either by tests, by this, or by subclasses | setStatus | {
"repo_name": "tobilg/dcos-commons",
"path": "sdk/scheduler/src/main/java/com/mesosphere/sdk/scheduler/plan/AbstractStep.java",
"license": "apache-2.0",
"size": 2275
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,581,537 |
UserProject getUserProject(String userId, long projectId); | UserProject getUserProject(String userId, long projectId); | /**
* Returns the ProjectData object complete.
* @param userId a user Id (the request is made on behalf of this user)
* @param projectId project id
* @return new UserProject object
*/ | Returns the ProjectData object complete | getUserProject | {
"repo_name": "josmas/app-inventor",
"path": "appinventor/appengine/src/com/google/appinventor/server/storage/StorageIo.java",
"license": "apache-2.0",
"size": 20821
} | [
"com.google.appinventor.shared.rpc.project.UserProject"
] | import com.google.appinventor.shared.rpc.project.UserProject; | import com.google.appinventor.shared.rpc.project.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,901,889 |
public List<MessageBean> getMessagesFromTimeAscending(long mid) throws SQLException {
Connection conn = null;
PreparedStatement ps = null;
conn = factory.getConnection();
ps = conn.prepareStatement("SELECT * FROM message WHERE from_id = ? ORDER BY sent_date ASC");
ps.setLong(1, mid);
ResultSet rs = ps.e... | List<MessageBean> function(long mid) throws SQLException { Connection conn = null; PreparedStatement ps = null; conn = factory.getConnection(); ps = conn.prepareStatement(STR); ps.setLong(1, mid); ResultSet rs = ps.executeQuery(); List<MessageBean> mbList = this.mbLoader.loadList(rs); DBUtil.closeConnection(conn, ps); ... | /**
* Gets all the messages for a certain user MID sorted by ascending time.
* @param mid The MID of the user to be looked up.
* @return A java.util.List of MessageBeans.
* @throws SQLException
*/ | Gets all the messages for a certain user MID sorted by ascending time | getMessagesFromTimeAscending | {
"repo_name": "ModelWriter/Demonstrations",
"path": "eu.modelwriter.datasets.traceability/CoEST Datasets/iTrust-NASA (!)/itrust_v10_code/iTrust/src/edu/ncsu/csc/itrust/dao/mysql/MessageDAO.java",
"license": "epl-1.0",
"size": 9606
} | [
"edu.ncsu.csc.itrust.DBUtil",
"edu.ncsu.csc.itrust.beans.MessageBean",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.List"
] | import edu.ncsu.csc.itrust.DBUtil; import edu.ncsu.csc.itrust.beans.MessageBean; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; | import edu.ncsu.csc.itrust.*; import edu.ncsu.csc.itrust.beans.*; import java.sql.*; import java.util.*; | [
"edu.ncsu.csc",
"java.sql",
"java.util"
] | edu.ncsu.csc; java.sql; java.util; | 656,251 |
public List<UpgradeHistoryEntity> getHistory() {
return upgradeHistory;
} | List<UpgradeHistoryEntity> function() { return upgradeHistory; } | /**
* Gets the history of this component's upgrades and downgrades.
*
* @return the component history, or {@code null} if none.
*/ | Gets the history of this component's upgrades and downgrades | getHistory | {
"repo_name": "sekikn/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java",
"license": "apache-2.0",
"size": 17428
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,144,136 |
public Inventory getInventory();
public Attributes getAttributes();
public Defense getDefense();
public Effective getGEffectsTarget(); | Inventory getInventory(); public Attributes getAttributes(); public Defense getDefense(); public Effective function(); | /**
* Returns target for graphical effects
*
* @return Graphical object able to handle graphical effects
*/ | Returns target for graphical effects | getGEffectsTarget | {
"repo_name": "Isangeles/Senlin",
"path": "src/main/java/pl/isangeles/senlin/core/Targetable.java",
"license": "gpl-2.0",
"size": 4257
} | [
"pl.isangeles.senlin.graphic.Effective"
] | import pl.isangeles.senlin.graphic.Effective; | import pl.isangeles.senlin.graphic.*; | [
"pl.isangeles.senlin"
] | pl.isangeles.senlin; | 1,693,639 |
private IndexMetaData updateIndexSettings(IndexMetaData indexMetaData, Settings changeSettings, String[] ignoreSettings) {
if (changeSettings.names().isEmpty() && ignoreSettings.length == 0) {
return indexMetaData;
}
Set... | IndexMetaData function(IndexMetaData indexMetaData, Settings changeSettings, String[] ignoreSettings) { if (changeSettings.names().isEmpty() && ignoreSettings.length == 0) { return indexMetaData; } Settings normalizedChangeSettings = Settings.builder().put(changeSettings).normalizePrefix(IndexMetaData.INDEX_SETTING_PRE... | /**
* Optionally updates index settings in indexMetaData by removing settings listed in ignoreSettings and
* merging them with settings in changeSettings.
*/ | Optionally updates index settings in indexMetaData by removing settings listed in ignoreSettings and merging them with settings in changeSettings | updateIndexSettings | {
"repo_name": "camilojd/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/snapshots/RestoreService.java",
"license": "apache-2.0",
"size": 56141
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.elasticsearch.cluster.metadata.IndexMetaData",
"org.elasticsearch.common.regex.Regex",
"org.elasticsearch.common.settings.Settings"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.settings.Settings; | import java.util.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.regex.*; import org.elasticsearch.common.settings.*; | [
"java.util",
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | java.util; org.elasticsearch.cluster; org.elasticsearch.common; | 588,828 |
private GQLDocument validate(final GQLDocument doc) {
final ValidatingVisitor visitor = new ValidatingVisitor(doc);
return ImmutableGQLDocument.copyOf(doc)
.withDefinitions(doc.definitions().stream().map(def -> def.apply(visitor)).collect(Collectors.toList()));
} | GQLDocument function(final GQLDocument doc) { final ValidatingVisitor visitor = new ValidatingVisitor(doc); return ImmutableGQLDocument.copyOf(doc) .withDefinitions(doc.definitions().stream().map(def -> def.apply(visitor)).collect(Collectors.toList())); } | /**
* validates the document, and updates references etc.
*
* @param doc
* @return
*/ | validates the document, and updates references etc | validate | {
"repo_name": "zourzouvillys/graphql",
"path": "graphql-core/src/main/java/io/zrz/graphql/core/parser/DefaultGQLParser.java",
"license": "apache-2.0",
"size": 6113
} | [
"io.zrz.graphql.core.doc.GQLDocument",
"io.zrz.graphql.core.doc.ImmutableGQLDocument",
"java.util.stream.Collectors"
] | import io.zrz.graphql.core.doc.GQLDocument; import io.zrz.graphql.core.doc.ImmutableGQLDocument; import java.util.stream.Collectors; | import io.zrz.graphql.core.doc.*; import java.util.stream.*; | [
"io.zrz.graphql",
"java.util"
] | io.zrz.graphql; java.util; | 2,257,568 |
EMap<Referee, Game> getReferees(); | EMap<Referee, Game> getReferees(); | /**
* Returns the value of the '<em><b>Referees</b></em>' map.
* The key is of type {@link org.eclipse.emf.emfstore.bowling.Referee},
* and the value is of type {@link org.eclipse.emf.emfstore.bowling.Game},
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Referees</em>' map isn't clear, there r... | Returns the value of the 'Referees' map. The key is of type <code>org.eclipse.emf.emfstore.bowling.Referee</code>, and the value is of type <code>org.eclipse.emf.emfstore.bowling.Game</code>, If the meaning of the 'Referees' map isn't clear, there really should be more of a description here... | getReferees | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.examplemodel/src/org/eclipse/emf/emfstore/bowling/Tournament.java",
"license": "epl-1.0",
"size": 7233
} | [
"org.eclipse.emf.common.util.EMap"
] | import org.eclipse.emf.common.util.EMap; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,630,985 |
private void process(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession();
Gedcom g = (Gedcom) session.getAttribute(Constants.GEDCOM);
IAnalyzer a = null;
String analyzerId = req.getParameter("analyzerId");
... | void function(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession(); Gedcom g = (Gedcom) session.getAttribute(Constants.GEDCOM); IAnalyzer a = null; String analyzerId = req.getParameter(STR); if (analyzerId != null) { a = AnalyzerList.getInstance... | /**
* Servlet for handling all analysis requests
*
* @param req
* the http request
* @param resp
* the http response
* @throws ServletException
* if there is a code-related problemDescription
* @throws IOException
* if ther... | Servlet for handling all analysis requests | process | {
"repo_name": "frizbog/gedantic",
"path": "src/main/java/org/gedantic/web/servlet/AnalyzerServlet.java",
"license": "mit",
"size": 5840
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.List",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.servlet.http.HttpSession",
"org.apache.commons.lang.StringEscapeUtils",
"org.apache.poi.ss.usermodel.Workbook"... | import java.io.IOException; import java.util.Collections; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.lang.StringEscapeUtils; import org.apache.... | import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.commons.lang.*; import org.apache.poi.ss.usermodel.*; import org.gedantic.analyzer.*; import org.gedantic.analyzer.comparator.*; import org.gedantic.web.*; import org.gedcom4j.model.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.apache.commons",
"org.apache.poi",
"org.gedantic.analyzer",
"org.gedantic.web",
"org.gedcom4j.model"
] | java.io; java.util; javax.servlet; org.apache.commons; org.apache.poi; org.gedantic.analyzer; org.gedantic.web; org.gedcom4j.model; | 1,800,557 |
public void showScale(boolean show) {
if(show == false) {
resizePanel.remove(scalePanel);
}
else {
resizePanel.add(scalePanel, BorderLayout.SOUTH);
}
} | void function(boolean show) { if(show == false) { resizePanel.remove(scalePanel); } else { resizePanel.add(scalePanel, BorderLayout.SOUTH); } } | /**
* Sets the visibility of the plot axis limit sliders. Default is true(show).
* @param show show/unshow boolean
*/ | Sets the visibility of the plot axis limit sliders. Default is true(show) | showScale | {
"repo_name": "etomica/etomica",
"path": "etomica-core/src/main/java/etomica/graphics/DevicePlotPoints.java",
"license": "mpl-2.0",
"size": 20537
} | [
"java.awt.BorderLayout"
] | import java.awt.BorderLayout; | import java.awt.*; | [
"java.awt"
] | java.awt; | 537,267 |
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
| static ImageDescriptor function(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); } | /**
* Returns an image descriptor for the image file at the given plug-in
* relative path
*
* @param path
* the path
* @return the image descriptor
*/ | Returns an image descriptor for the image file at the given plug-in relative path | getImageDescriptor | {
"repo_name": "greenelk/dita-tools",
"path": "src/main/java/org/greenelk/ditatools/eclipse/DITAToolsPlugin.java",
"license": "apache-2.0",
"size": 8115
} | [
"org.eclipse.jface.resource.ImageDescriptor"
] | import org.eclipse.jface.resource.ImageDescriptor; | import org.eclipse.jface.resource.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,325,686 |
public static String getContextRoot(final JsonObject config, Class clazz) {
if (clazz.isAnnotationPresent(ServiceEndpoint.class)) {
final ServiceEndpoint endpoint = (ServiceEndpoint) clazz
.getAnnotation(ServiceEndpoint.class);
return getStringConfiguration(config, "contextRoot", endpoint.co... | static String function(final JsonObject config, Class clazz) { if (clazz.isAnnotationPresent(ServiceEndpoint.class)) { final ServiceEndpoint endpoint = (ServiceEndpoint) clazz .getAnnotation(ServiceEndpoint.class); return getStringConfiguration(config, STR, endpoint.contextRoot()); } return getStringConfiguration(confi... | /**
* Returns the http Root context defined in {@link ServiceEndpoint} or in configuration
*
* @param config, the configuration object
* @param clazz, the service class containing the {@link ServiceEndpoint} annotation
* @return tzhe defined Root context of your service
*/ | Returns the http Root context defined in <code>ServiceEndpoint</code> or in configuration | getContextRoot | {
"repo_name": "amoAHCP/vxms",
"path": "vxms-core/src/main/java/org/jacpfx/vxms/common/util/ConfigurationUtil.java",
"license": "apache-2.0",
"size": 9319
} | [
"io.vertx.core.json.JsonObject",
"org.jacpfx.vxms.common.ServiceEndpoint"
] | import io.vertx.core.json.JsonObject; import org.jacpfx.vxms.common.ServiceEndpoint; | import io.vertx.core.json.*; import org.jacpfx.vxms.common.*; | [
"io.vertx.core",
"org.jacpfx.vxms"
] | io.vertx.core; org.jacpfx.vxms; | 1,849,680 |
public SearchResultsBean<ApplicationSummaryBean> findApplications(SearchCriteriaBean criteria) throws StorageException; | SearchResultsBean<ApplicationSummaryBean> function(SearchCriteriaBean criteria) throws StorageException; | /**
* Finds applications by the provided criteria.
* @param criteria search criteria
* @return found applications
* @throws StorageException if a storage problem occurs while storing a bean.
*/ | Finds applications by the provided criteria | findApplications | {
"repo_name": "KevinHorvatin/apiman",
"path": "manager/api/core/src/main/java/io/apiman/manager/api/core/IStorageQuery.java",
"license": "apache-2.0",
"size": 12577
} | [
"io.apiman.manager.api.beans.search.SearchCriteriaBean",
"io.apiman.manager.api.beans.search.SearchResultsBean",
"io.apiman.manager.api.beans.summary.ApplicationSummaryBean",
"io.apiman.manager.api.core.exceptions.StorageException"
] | import io.apiman.manager.api.beans.search.SearchCriteriaBean; import io.apiman.manager.api.beans.search.SearchResultsBean; import io.apiman.manager.api.beans.summary.ApplicationSummaryBean; import io.apiman.manager.api.core.exceptions.StorageException; | import io.apiman.manager.api.beans.search.*; import io.apiman.manager.api.beans.summary.*; import io.apiman.manager.api.core.exceptions.*; | [
"io.apiman.manager"
] | io.apiman.manager; | 2,380,063 |
protected Integer extractUInt16(ModbusRegisterArray raw, int index, int def) {
return extractOptionalUInt16(raw, index).orElse(def);
} | Integer function(ModbusRegisterArray raw, int index, int def) { return extractOptionalUInt16(raw, index).orElse(def); } | /**
* Extract a mandatory uint16 value
*
* @param raw the register array to extract from
* @param index the address of the field
* @param def the default value
* @return the parsed value or the default if the field is not implemented
*/ | Extract a mandatory uint16 value | extractUInt16 | {
"repo_name": "openhab/openhab2",
"path": "bundles/org.openhab.binding.modbus.sunspec/src/main/java/org/openhab/binding/modbus/sunspec/internal/parser/AbstractBaseParser.java",
"license": "epl-1.0",
"size": 4601
} | [
"org.openhab.core.io.transport.modbus.ModbusRegisterArray"
] | import org.openhab.core.io.transport.modbus.ModbusRegisterArray; | import org.openhab.core.io.transport.modbus.*; | [
"org.openhab.core"
] | org.openhab.core; | 1,120,146 |
public void onUpdate()
{
super.onUpdate();
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
{
float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.prevRotationYaw = this.rotationYaw = (float)(Math... | void function() { super.onUpdate(); if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); this.pre... | /**
* Called to update the entity's position/logic.
*/ | Called to update the entity's position/logic | onUpdate | {
"repo_name": "Myrninvollo/Server",
"path": "src/net/minecraft/entity/projectile/EntityArrow.java",
"license": "gpl-2.0",
"size": 23111
} | [
"java.util.List",
"net.minecraft.block.Block",
"net.minecraft.block.material.Material",
"net.minecraft.enchantment.EnchantmentHelper",
"net.minecraft.entity.Entity",
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.entity.monster.EntityEnderman",
"net.minecraft.entity.player.EntityPlayer",
"n... | import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.pla... | import java.util.*; import net.minecraft.block.*; import net.minecraft.block.material.*; import net.minecraft.enchantment.*; import net.minecraft.entity.*; import net.minecraft.entity.monster.*; import net.minecraft.entity.player.*; import net.minecraft.network.play.server.*; import net.minecraft.util.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.enchantment",
"net.minecraft.entity",
"net.minecraft.network",
"net.minecraft.util"
] | java.util; net.minecraft.block; net.minecraft.enchantment; net.minecraft.entity; net.minecraft.network; net.minecraft.util; | 707,440 |
protected static Document getDocument(InputStream in)
throws ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
... | static Document function(InputStream in) throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); return builder.parse(in); } | /**
* Get a new DOM Document object from parsing the specified InputStream.
*
* @param in
* the InputStream to parse.
* @return a new DOM Document object.
* @throws ParserConfigurationException
* if a DocumentBuilder cannot be created.
* @throws SAXException
*... | Get a new DOM Document object from parsing the specified InputStream | getDocument | {
"repo_name": "FLVC/fcrepo-src-3.4.2",
"path": "fcrepo-server/src/main/java/org/fcrepo/utilities/XmlSerializer.java",
"license": "apache-2.0",
"size": 11226
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException",
"org.w3c.dom.Document",
"org.xml.sax.SAXException"
] | import java.io.IOException; import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.xml.sax.SAXException; | import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | java.io; javax.xml; org.w3c.dom; org.xml.sax; | 1,234,959 |
public FileField createFileField(GUIElementLocator locator); | FileField function(GUIElementLocator locator); | /** Creates a new FileField component for the given locator.
*
* @param locator Locator for the new component.
*
* @return A new FileField component for the given locator. */ | Creates a new FileField component for the given locator | createFileField | {
"repo_name": "vbergmann/aludratest",
"path": "src/main/java/org/aludratest/service/gui/component/GUIComponentFactory.java",
"license": "apache-2.0",
"size": 7487
} | [
"org.aludratest.service.locator.element.GUIElementLocator"
] | import org.aludratest.service.locator.element.GUIElementLocator; | import org.aludratest.service.locator.element.*; | [
"org.aludratest.service"
] | org.aludratest.service; | 2,260,579 |
public Builder product(BondFuture product) {
JodaBeanUtils.notNull(product, "product");
this.product = product;
return this;
} | Builder function(BondFuture product) { JodaBeanUtils.notNull(product, STR); this.product = product; return this; } | /**
* Sets the future that was traded.
* <p>
* The product captures the contracted financial details of the trade.
* @param product the new value, not null
* @return this, for chaining, not null
*/ | Sets the future that was traded. The product captures the contracted financial details of the trade | product | {
"repo_name": "jmptrader/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/bond/BondFutureTrade.java",
"license": "apache-2.0",
"size": 16965
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 510,619 |
public void setText(String text)
{
int idx = 0;
int idx_idx = 0;
int alreadyExpanded = 0;
int idxToMove = 0;
this.text = new StringCharacterIterator(text);
this.index = 0;
String work_text = text.intern();
ArrayList a_element = new ArrayList();
ArrayList a_idx = new ArrayList(... | void function(String text) { int idx = 0; int idx_idx = 0; int alreadyExpanded = 0; int idxToMove = 0; this.text = new StringCharacterIterator(text); this.index = 0; String work_text = text.intern(); ArrayList a_element = new ArrayList(); ArrayList a_idx = new ArrayList(); while (idx < work_text.length()) { String key,... | /**
* This method sets the <code>String</code> that it is iterating over
* to the specified <code>String</code>.
*
* @param text The new <code>String</code> to iterate over.
*
* @since 1.2
*/ | This method sets the <code>String</code> that it is iterating over to the specified <code>String</code> | setText | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/java/text/CollationElementIterator.java",
"license": "gpl-2.0",
"size": 13885
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,705,349 |
protected List<AdHocRoutePerson> createFyiFiscalOfficerListForNewUnorderedItems(PurchaseOrderDocument po) {
List<AdHocRoutePerson> adHocRoutePersons = new ArrayList<AdHocRoutePerson>();
Map fiscalOfficers = new HashMap();
AdHocRoutePerson adHocRoutePerson = null;
for (PurchaseOrder... | List<AdHocRoutePerson> function(PurchaseOrderDocument po) { List<AdHocRoutePerson> adHocRoutePersons = new ArrayList<AdHocRoutePerson>(); Map fiscalOfficers = new HashMap(); AdHocRoutePerson adHocRoutePerson = null; for (PurchaseOrderItem poItem : (List<PurchaseOrderItem>) po.getItems()) { if (poItem.isItemActiveIndica... | /**
* Creates a list of fiscal officers for new unordered items added to a purchase order.
*
* @param po
* @return
*/ | Creates a list of fiscal officers for new unordered items added to a purchase order | createFyiFiscalOfficerListForNewUnorderedItems | {
"repo_name": "ua-eas/kfs",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/document/service/impl/PurchaseOrderServiceImpl.java",
"license": "agpl-3.0",
"size": 126266
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.kuali.kfs.module.purap.PurapConstants",
"org.kuali.kfs.module.purap.businessobject.PurApAccountingLine",
"org.kuali.kfs.module.purap.businessobject.PurchaseOrderItem",
"org.kuali.kfs.module.purap.document.PurchaseOrder... | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.kuali.kfs.module.purap.PurapConstants; import org.kuali.kfs.module.purap.businessobject.PurApAccountingLine; import org.kuali.kfs.module.purap.businessobject.PurchaseOrderItem; import org.kuali.kfs.module.purap... | import java.util.*; import org.kuali.kfs.module.purap.*; import org.kuali.kfs.module.purap.businessobject.*; import org.kuali.kfs.module.purap.document.*; import org.kuali.kfs.sys.*; import org.kuali.rice.krad.bo.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 2,280,354 |
AbsoluteRecordId absoluteFromBytes(byte[] bytes);
/**
* Creates a RecordId based on the provided DataInput.
*
* @param dataInput DataInput based on the well-formed byte representation of the {@link RecordId} | AbsoluteRecordId absoluteFromBytes(byte[] bytes); /** * Creates a RecordId based on the provided DataInput. * * @param dataInput DataInput based on the well-formed byte representation of the {@link RecordId} | /**
* Creates an {@code AbsoluteRecordId} based on the provided byte array.
*
* @param bytes well-formed byte representation of the {@link AbsoluteRecordId}.
*/ | Creates an AbsoluteRecordId based on the provided byte array | absoluteFromBytes | {
"repo_name": "NGDATA/lilyproject",
"path": "cr/repository/api/src/main/java/org/lilyproject/repository/api/IdGenerator.java",
"license": "apache-2.0",
"size": 4751
} | [
"org.lilyproject.bytes.api.DataInput"
] | import org.lilyproject.bytes.api.DataInput; | import org.lilyproject.bytes.api.*; | [
"org.lilyproject.bytes"
] | org.lilyproject.bytes; | 203,062 |
public static void executor(EventLoop service) {
executor = service;
} | static void function(EventLoop service) { executor = service; } | /**
* Set the executor (in the form of an {@link EventLoop}) which JMH will use.
* <p>
* This must be called before JMH requires an executor to execute objects.
* @param eventLoop Used as an executor by JMH to run benchmarks.
*/ | Set the executor (in the form of an <code>EventLoop</code>) which JMH will use. This must be called before JMH requires an executor to execute objects | executor | {
"repo_name": "wuyinxian124/netty",
"path": "microbench/src/test/java/io/netty/microbench/util/AbstractSharedExecutorMicrobenchmark.java",
"license": "apache-2.0",
"size": 5088
} | [
"io.netty.channel.EventLoop"
] | import io.netty.channel.EventLoop; | import io.netty.channel.*; | [
"io.netty.channel"
] | io.netty.channel; | 1,918,517 |
@Override
public void transform(Message message, DataType from, DataType to) throws Exception {
Exchange exchange = message.getExchange();
CamelContext context = exchange.getContext();
// Unmarshaling into Java Object
if ((to == null || to.isJavaType()) && (from.equals(g... | void function(Message message, DataType from, DataType to) throws Exception { Exchange exchange = message.getExchange(); CamelContext context = exchange.getContext(); if ((to == null to.isJavaType()) && (from.equals(getFrom()) from.getModel().equals(getModel()))) { log.debug(STR, dataFormat); Object answer = dataFormat... | /**
* Perform data transformation with specified from/to type using DataFormat.
* @param message message to apply transformation
* @param from 'from' data type
* @param to 'to' data type
*/ | Perform data transformation with specified from/to type using DataFormat | transform | {
"repo_name": "objectiser/camel",
"path": "core/camel-base/src/main/java/org/apache/camel/impl/transformer/DataFormatTransformer.java",
"license": "apache-2.0",
"size": 4818
} | [
"java.io.InputStream",
"org.apache.camel.CamelContext",
"org.apache.camel.Exchange",
"org.apache.camel.Message",
"org.apache.camel.spi.DataType",
"org.apache.camel.support.builder.OutputStreamBuilder"
] | import java.io.InputStream; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.spi.DataType; import org.apache.camel.support.builder.OutputStreamBuilder; | import java.io.*; import org.apache.camel.*; import org.apache.camel.spi.*; import org.apache.camel.support.builder.*; | [
"java.io",
"org.apache.camel"
] | java.io; org.apache.camel; | 1,538,383 |
public int doStartTag()
throws JspException
{
Tag parent = getParent();
if (! (parent instanceof ChooseTag))
throw new JspException(L.l("c:otherwise tag must be contained in a c:choose tag."));
ChooseTag chooseTag = (ChooseTag) parent;
if (chooseTag.isMatch())
return SKIP_BODY;
... | int function() throws JspException { Tag parent = getParent(); if (! (parent instanceof ChooseTag)) throw new JspException(L.l(STR)); ChooseTag chooseTag = (ChooseTag) parent; if (chooseTag.isMatch()) return SKIP_BODY; chooseTag.setMatch(); return EVAL_BODY_INCLUDE; } | /**
* Process the tag.
*/ | Process the tag | doStartTag | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/jstl/OtherwiseTag.java",
"license": "gpl-2.0",
"size": 1787
} | [
"javax.servlet.jsp.JspException",
"javax.servlet.jsp.tagext.Tag"
] | import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; | import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; | [
"javax.servlet"
] | javax.servlet; | 1,225,652 |
protected Item getDropItem()
{
return Items.gunpowder;
} | Item function() { return Items.gunpowder; } | /**
* Returns the item ID for the item the mob drops on death.
*/ | Returns the item ID for the item the mob drops on death | getDropItem | {
"repo_name": "Stormister/Rediscovered-Mod-1.7.10",
"path": "src/main/java/com/stormister/rediscovered/EntityBlackSteve.java",
"license": "gpl-3.0",
"size": 8735
} | [
"net.minecraft.init.Items",
"net.minecraft.item.Item"
] | import net.minecraft.init.Items; import net.minecraft.item.Item; | import net.minecraft.init.*; import net.minecraft.item.*; | [
"net.minecraft.init",
"net.minecraft.item"
] | net.minecraft.init; net.minecraft.item; | 580,657 |
@SuppressWarnings("unused")
private class FooBackgroundTask extends AsyncTask<Void, Void, Long>
{
@Override
protected Long doInBackground(Void... params)
{
Log.d(TAG, "Starting up background worker task");
// Stopwatch used to time how long task took
StopWatch sw = new StopWatch();
tr... | @SuppressWarnings(STR) class FooBackgroundTask extends AsyncTask<Void, Void, Long> { protected Long function(Void... params) { Log.d(TAG, STR); StopWatch sw = new StopWatch(); try { sw.start(); URL url = new URL(STRUTF-8STRFinishing up background worker task - elapsed time = " + elapsedTime); return elapsedTime; } | /**
* Grab some data from a webpage
*
* @return How long in milliseconds this task took to do
*/ | Grab some data from a webpage | doInBackground | {
"repo_name": "mkolbly/MortgageComparerProject",
"path": "MortgageComparer/src/com/kolbly/mortgagecomparer/splashscreenactivity/MySplashScreenActivity.java",
"license": "apache-2.0",
"size": 5002
} | [
"android.os.AsyncTask",
"android.util.Log",
"org.apache.commons.lang3.time.StopWatch"
] | import android.os.AsyncTask; import android.util.Log; import org.apache.commons.lang3.time.StopWatch; | import android.os.*; import android.util.*; import org.apache.commons.lang3.time.*; | [
"android.os",
"android.util",
"org.apache.commons"
] | android.os; android.util; org.apache.commons; | 561,888 |
public static Class<?> getTestClass() {
return classNameRule.getTestClass();
}
// recorded seed: for beforeClass
private static long staticSeed;
// seed for individual test methods, changed in @before
private long seed;
static final Random seedRand = new Random();
protected static final SmartR... | static Class<?> function() { return classNameRule.getTestClass(); } private static long staticSeed; static final Random seedRand = new Random(); protected static final SmartRandom random = new SmartRandom(0); private String name = STR; @Retention(RetentionPolicy.RUNTIME) public @interface Nightly {} @Ignore(STR) public... | /**
* Return the current class being tested.
*/ | Return the current class being tested | getTestClass | {
"repo_name": "bighaidao/lucene",
"path": "lucene-test-framework/src/main/java/org/apache/lucene/util/LuceneTestCase.java",
"license": "apache-2.0",
"size": 52379
} | [
"java.lang.annotation.Retention",
"java.lang.annotation.RetentionPolicy",
"java.util.Random",
"org.junit.Ignore"
] | import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Random; import org.junit.Ignore; | import java.lang.annotation.*; import java.util.*; import org.junit.*; | [
"java.lang",
"java.util",
"org.junit"
] | java.lang; java.util; org.junit; | 2,528,506 |
private Configuration makeEvaluatorConfiguration(final ResourceLaunchEvent resourceLaunchEvent)
throws IOException {
return Tang.Factory.getTang()
.newConfigurationBuilder(resourceLaunchEvent.getEvaluatorConf())
.build();
} | Configuration function(final ResourceLaunchEvent resourceLaunchEvent) throws IOException { return Tang.Factory.getTang() .newConfigurationBuilder(resourceLaunchEvent.getEvaluatorConf()) .build(); } | /**
* Assembles the configuration for an Evaluator.
*
* @param resourceLaunchEvent
* @return
* @throws IOException
*/ | Assembles the configuration for an Evaluator | makeEvaluatorConfiguration | {
"repo_name": "gyeongin/reef",
"path": "lang/java/reef-runtime-yarn/src/main/java/org/apache/reef/runtime/yarn/driver/EvaluatorSetupHelper.java",
"license": "apache-2.0",
"size": 5510
} | [
"java.io.IOException",
"org.apache.reef.runtime.common.driver.api.ResourceLaunchEvent",
"org.apache.reef.tang.Configuration",
"org.apache.reef.tang.Tang"
] | import java.io.IOException; import org.apache.reef.runtime.common.driver.api.ResourceLaunchEvent; import org.apache.reef.tang.Configuration; import org.apache.reef.tang.Tang; | import java.io.*; import org.apache.reef.runtime.common.driver.api.*; import org.apache.reef.tang.*; | [
"java.io",
"org.apache.reef"
] | java.io; org.apache.reef; | 1,538,929 |
@FacesServiceMethod
public void create(DocumentImageType type, long width, long height) throws Exception {
update(type, width, height);
this.document = ApplicationObjectFactory.createDocument();
this.guid = document.getGuid();
} | void function(DocumentImageType type, long width, long height) throws Exception { update(type, width, height); this.document = ApplicationObjectFactory.createDocument(); this.guid = document.getGuid(); } | /**
* Creates the image.
*
* @param type the image type.
* @param width the width.
* @param height the height.
* @throws Exception if the method fails.
*/ | Creates the image | create | {
"repo_name": "lorislab/appky",
"path": "appky-web/src/main/java/org/lorislab/appky/web/admin/app/view/ImageViewController.java",
"license": "apache-2.0",
"size": 6583
} | [
"org.lorislab.appky.application.factory.ApplicationObjectFactory",
"org.lorislab.appky.web.admin.app.model.DocumentImageType"
] | import org.lorislab.appky.application.factory.ApplicationObjectFactory; import org.lorislab.appky.web.admin.app.model.DocumentImageType; | import org.lorislab.appky.application.factory.*; import org.lorislab.appky.web.admin.app.model.*; | [
"org.lorislab.appky"
] | org.lorislab.appky; | 592,888 |
public User getUser() {
return user;
} | User function() { return user; } | /**
* Returns user account information.
*
* @return user account information
*/ | Returns user account information | getUser | {
"repo_name": "emeryotopalik/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/Ode.java",
"license": "apache-2.0",
"size": 68455
} | [
"com.google.appinventor.shared.rpc.user.User"
] | import com.google.appinventor.shared.rpc.user.User; | import com.google.appinventor.shared.rpc.user.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,682,044 |
public static GameStartingServerEvent createGameStartingServerEvent(Cause cause, GameState state) {
HashMap<String, Object> values = new HashMap<>();
values.put("cause", cause);
values.put("state", state);
return SpongeEventFactoryUtils.createEventImpl(GameStartingServerEvent.class, ... | static GameStartingServerEvent function(Cause cause, GameState state) { HashMap<String, Object> values = new HashMap<>(); values.put("cause", cause); values.put("state", state); return SpongeEventFactoryUtils.createEventImpl(GameStartingServerEvent.class, values); } | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.game.state.GameStartingServerEvent}.
*
* @param cause The cause
* @param state The state
* @return A new game starting server event
*/ | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.game.state.GameStartingServerEvent</code> | createGameStartingServerEvent | {
"repo_name": "kashike/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 215110
} | [
"java.util.HashMap",
"org.spongepowered.api.GameState",
"org.spongepowered.api.event.cause.Cause",
"org.spongepowered.api.event.game.state.GameStartingServerEvent"
] | import java.util.HashMap; import org.spongepowered.api.GameState; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.event.game.state.GameStartingServerEvent; | import java.util.*; import org.spongepowered.api.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.event.game.state.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,946,754 |
public TableGenerator<Entity<T>> getOrCreateTableGenerator()
{
Node node = childNode.getOrCreate("table-generator");
TableGenerator<Entity<T>> tableGenerator = new TableGeneratorImpl<Entity<T>>(this, "table-generator", childNode, node);
return tableGenerator;
} | TableGenerator<Entity<T>> function() { Node node = childNode.getOrCreate(STR); TableGenerator<Entity<T>> tableGenerator = new TableGeneratorImpl<Entity<T>>(this, STR, childNode, node); return tableGenerator; } | /**
* If not already created, a new <code>table-generator</code> element with the given value will be created.
* Otherwise, the existing <code>table-generator</code> element will be returned.
* @return a new or existing instance of <code>TableGenerator<Entity<T>></code>
*/ | If not already created, a new <code>table-generator</code> element with the given value will be created. Otherwise, the existing <code>table-generator</code> element will be returned | getOrCreateTableGenerator | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm10/EntityImpl.java",
"license": "epl-1.0",
"size": 47108
} | [
"org.jboss.shrinkwrap.descriptor.api.orm10.Entity",
"org.jboss.shrinkwrap.descriptor.api.orm10.TableGenerator",
"org.jboss.shrinkwrap.descriptor.spi.node.Node"
] | import org.jboss.shrinkwrap.descriptor.api.orm10.Entity; import org.jboss.shrinkwrap.descriptor.api.orm10.TableGenerator; import org.jboss.shrinkwrap.descriptor.spi.node.Node; | import org.jboss.shrinkwrap.descriptor.api.orm10.*; import org.jboss.shrinkwrap.descriptor.spi.node.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,769,097 |
public JSONArray asJSONArray()
{
if ( entity == null ) {
return null;
}
String str = asString();
try {
return new JSONArray( str );
} catch ( JSONException ex ) {
throw new CStorageException( "Error parsing the JSON response: " + str, e... | JSONArray function() { if ( entity == null ) { return null; } String str = asString(); try { return new JSONArray( str ); } catch ( JSONException ex ) { throw new CStorageException( STR + str, ex ); } } | /**
* Get the response as a json array
*
* @return The json value
*/ | Get the response as a json array | asJSONArray | {
"repo_name": "netheosgithub/pcs_api",
"path": "java/src/main/java/net/netheos/pcsapi/request/CResponse.java",
"license": "apache-2.0",
"size": 5010
} | [
"net.netheos.pcsapi.exceptions.CStorageException",
"org.json.JSONArray",
"org.json.JSONException"
] | import net.netheos.pcsapi.exceptions.CStorageException; import org.json.JSONArray; import org.json.JSONException; | import net.netheos.pcsapi.exceptions.*; import org.json.*; | [
"net.netheos.pcsapi",
"org.json"
] | net.netheos.pcsapi; org.json; | 2,914,796 |
protected void saveGroupContainer(CmsObject cms, Element parent, CmsGroupContainerBean groupContainer)
throws CmsException {
parent.clearContent();
Element groupContainerElem = parent.addElement(XmlNode.GroupContainers.name());
groupContainerElem.addElement(XmlNode.Title.name()).addCDA... | void function(CmsObject cms, Element parent, CmsGroupContainerBean groupContainer) throws CmsException { parent.clearContent(); Element groupContainerElem = parent.addElement(XmlNode.GroupContainers.name()); groupContainerElem.addElement(XmlNode.Title.name()).addCDATA(groupContainer.getTitle()); groupContainerElem.addE... | /**
* Adds the given container page to the given element.<p>
*
* @param cms the current CMS object
* @param parent the element to add it
* @param groupContainer the container page to add
*
* @throws CmsException if something goes wrong
*/ | Adds the given container page to the given element | saveGroupContainer | {
"repo_name": "victos/opencms-core",
"path": "src/org/opencms/xml/containerpage/CmsXmlGroupContainer.java",
"license": "lgpl-2.1",
"size": 18555
} | [
"java.util.Map",
"org.dom4j.Element",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsResource",
"org.opencms.file.CmsResourceFilter",
"org.opencms.file.types.CmsResourceTypeXmlContainerPage",
"org.opencms.main.CmsException",
"org.opencms.main.OpenCms",
"org.opencms.xml.content.CmsXmlContentPrope... | import java.util.Map; import org.dom4j.Element; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.file.types.CmsResourceTypeXmlContainerPage; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; import org.opencms.xml.... | import java.util.*; import org.dom4j.*; import org.opencms.file.*; import org.opencms.file.types.*; import org.opencms.main.*; import org.opencms.xml.content.*; | [
"java.util",
"org.dom4j",
"org.opencms.file",
"org.opencms.main",
"org.opencms.xml"
] | java.util; org.dom4j; org.opencms.file; org.opencms.main; org.opencms.xml; | 164,928 |
public static SAXParserFactory createParserFactory(boolean disableSecureProcessing) throws IllegalStateException {
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "SAXParserFactory instance: ... | static SAXParserFactory function(boolean disableSecureProcessing) throws IllegalStateException { try { SAXParserFactory factory = SAXParserFactory.newInstance(); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, STR, factory); } factory.setNamespaceAware(true); factory.setFeature(XMLConstants.FEATURE_SECURE_P... | /**
* Returns properly configured (e.g. security features) parser factory
* - namespaceAware == true
* - securityProcessing == is set based on security processing property, default is true
*/ | Returns properly configured (e.g. security features) parser factory - namespaceAware == true - securityProcessing == is set based on security processing property, default is true | createParserFactory | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java",
"license": "mit",
"size": 11660
} | [
"com.sun.xml.internal.bind.v2.Messages",
"java.util.logging.Level",
"javax.xml.XMLConstants",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.parsers.SAXParserFactory",
"org.xml.sax.SAXNotRecognizedException",
"org.xml.sax.SAXNotSupportedException"
] | import com.sun.xml.internal.bind.v2.Messages; import java.util.logging.Level; import javax.xml.XMLConstants; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; | import com.sun.xml.internal.bind.v2.*; import java.util.logging.*; import javax.xml.*; import javax.xml.parsers.*; import org.xml.sax.*; | [
"com.sun.xml",
"java.util",
"javax.xml",
"org.xml.sax"
] | com.sun.xml; java.util; javax.xml; org.xml.sax; | 1,777,880 |
public String doctorTimeExecute(){
DoctorData docData = new DoctorData();
BranchData branchData = new BranchData();
HashMap<String, String> branchMap = branchData.getBranchCode(docModel.getBranchStandID());
docModel.setBranch_id(branchMap.get("branch_code"));
if(docData.addDoctorWorkdayPattern(... | String function(){ DoctorData docData = new DoctorData(); BranchData branchData = new BranchData(); HashMap<String, String> branchMap = branchData.getBranchCode(docModel.getBranchStandID()); docModel.setBranch_id(branchMap.get(STR)); if(docData.addDoctorWorkdayPattern(docModel, docTimeM) <= 0){ addActionMessage(STR); r... | /**
* Insert doctor schedule for same pattern.
* @author anubissmile
* @return String | Action result string.
*/ | Insert doctor schedule for same pattern | doctorTimeExecute | {
"repo_name": "smartictcoop/SmartDental",
"path": "src/main/java/com/smict/person/action/DoctorAction.java",
"license": "unlicense",
"size": 71988
} | [
"com.smict.person.data.BranchData",
"com.smict.person.data.DoctorData",
"java.util.HashMap"
] | import com.smict.person.data.BranchData; import com.smict.person.data.DoctorData; import java.util.HashMap; | import com.smict.person.data.*; import java.util.*; | [
"com.smict.person",
"java.util"
] | com.smict.person; java.util; | 718,042 |
public void testSparseDocuments() throws IOException {
BasicStats stats = createStats();
stats.setNumberOfFieldTokens(stats.getNumberOfDocuments());
stats.setTotalTermFreq(stats.getDocFreq());
stats.setAvgFieldLength(
(float)stats.getNumberOfFieldTokens() / stats.getNumberOfDocuments());
u... | void function() throws IOException { BasicStats stats = createStats(); stats.setNumberOfFieldTokens(stats.getNumberOfDocuments()); stats.setTotalTermFreq(stats.getDocFreq()); stats.setAvgFieldLength( (float)stats.getNumberOfFieldTokens() / stats.getNumberOfDocuments()); unitTestCore(stats, FREQ, DOC_LEN); } | /**
* Tests correct behavior when
* {@code numberOfDocuments = numberOfFieldTokens}.
*/ | Tests correct behavior when numberOfDocuments = numberOfFieldTokens | testSparseDocuments | {
"repo_name": "smartan/lucene",
"path": "src/test/java/org/apache/lucene/search/similarities/TestSimilarityBase.java",
"license": "apache-2.0",
"size": 24266
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,770,943 |
//-----------------------------------------------------------------------
@ToString
public String toString() {
return ISODateTimeFormat.date().print(this);
}
| String function() { return ISODateTimeFormat.date().print(this); } | /**
* Output the date time in ISO8601 format (yyyy-MM-dd).
*
* @return ISO8601 time formatted string.
*/ | Output the date time in ISO8601 format (yyyy-MM-dd) | toString | {
"repo_name": "likecool21/joda-time-2.3-Testing",
"path": "src/main/java/org/joda/time/LocalDate.java",
"license": "apache-2.0",
"size": 83596
} | [
"org.joda.time.format.ISODateTimeFormat"
] | import org.joda.time.format.ISODateTimeFormat; | import org.joda.time.format.*; | [
"org.joda.time"
] | org.joda.time; | 2,817,228 |
public BigFraction multiply(final long l) {
return multiply(BigInteger.valueOf(l));
} | BigFraction function(final long l) { return multiply(BigInteger.valueOf(l)); } | /**
* <p>
* Multiply the value of this fraction by the passed <tt>long</tt>,
* returning the result in reduced form.
* </p>
*
* @param l
* the <tt>long</tt> to multiply by.
* @return a {@link BigFraction} instance with the resulting values.
*/ | Multiply the value of this fraction by the passed long, returning the result in reduced form. | multiply | {
"repo_name": "haisamido/SFDaaS",
"path": "src/org/apache/commons/math/fraction/BigFraction.java",
"license": "lgpl-3.0",
"size": 37431
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,821,138 |
Set<URI> getArtifactUrls(); | Set<URI> getArtifactUrls(); | /**
* Returns the additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.
*
* @return The additional URLs. Returns an empty list if there are no such URLs.
*/ | Returns the additional URLs to use to find artifact files. Note that these URLs are not used to find POM files | getArtifactUrls | {
"repo_name": "cams7/gradle-samples",
"path": "plugin/core/src/main/groovy/org/gradle/api/artifacts/repositories/MavenArtifactRepository.java",
"license": "gpl-2.0",
"size": 3070
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,828,601 |
public void addBarCodeFlag(BarCodeFlag barCodeFlag) {
if (barCodeFlags == null) {
barCodeFlags = EnumSet.noneOf(BarCodeFlag.class);
}
if (barCodeFlag == BarCodeFlag.PositionHRIBelow) {
barCodeFlags.remove(BarCodeFlag.PositionHRIAbove);
} else if (barCodeFlag == BarCodeFlag.PositionHRIAbove... | void function(BarCodeFlag barCodeFlag) { if (barCodeFlags == null) { barCodeFlags = EnumSet.noneOf(BarCodeFlag.class); } if (barCodeFlag == BarCodeFlag.PositionHRIBelow) { barCodeFlags.remove(BarCodeFlag.PositionHRIAbove); } else if (barCodeFlag == BarCodeFlag.PositionHRIAbove) { barCodeFlags.remove(BarCodeFlag.Positio... | /**
* Adds the given {@link BarCodeFlag} to the set of {@link BarCodeFlag}. Takes care of mutual
* exclusive {@link BarCodeFlag}.
*/ | Adds the given <code>BarCodeFlag</code> to the set of <code>BarCodeFlag</code>. Takes care of mutual exclusive <code>BarCodeFlag</code> | addBarCodeFlag | {
"repo_name": "afpdev/alpheusafpparser",
"path": "src/main/java/com/mgz/afp/bcoca/BDA_BarCodeData.java",
"license": "gpl-3.0",
"size": 23936
} | [
"java.util.EnumSet"
] | import java.util.EnumSet; | import java.util.*; | [
"java.util"
] | java.util; | 881,216 |
public void setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
return;
}
}
throw new RuntimeException("No AP... | void function(String apiKeyPrefix) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); return; } } throw new RuntimeException(STR); } | /**
* Helper method to set API key prefix for the first API key authentication.
*
* @param apiKeyPrefix API key prefix
*/ | Helper method to set API key prefix for the first API key authentication | setApiKeyPrefix | {
"repo_name": "SDU-Software-Engineering/opn",
"path": "ws/BankingJava/src/main/java/dk/sdu/mmmi/opn/swaggerbank/ApiClient.java",
"license": "gpl-3.0",
"size": 46058
} | [
"dk.sdu.mmmi.opn.swaggerbank.auth.ApiKeyAuth",
"dk.sdu.mmmi.opn.swaggerbank.auth.Authentication"
] | import dk.sdu.mmmi.opn.swaggerbank.auth.ApiKeyAuth; import dk.sdu.mmmi.opn.swaggerbank.auth.Authentication; | import dk.sdu.mmmi.opn.swaggerbank.auth.*; | [
"dk.sdu.mmmi"
] | dk.sdu.mmmi; | 2,083,659 |
void setStorageClient(final StorageClient storage) {
_storage = storage;
} | void setStorageClient(final StorageClient storage) { _storage = storage; } | /**
* Set the given storage client, this method is used in tests.
*/ | Set the given storage client, this method is used in tests | setStorageClient | {
"repo_name": "mosoft521/memcached-session-manager",
"path": "core/src/main/java/de/javakaffee/web/msm/MemcachedSessionService.java",
"license": "apache-2.0",
"size": 78504
} | [
"de.javakaffee.web.msm.storage.StorageClient"
] | import de.javakaffee.web.msm.storage.StorageClient; | import de.javakaffee.web.msm.storage.*; | [
"de.javakaffee.web"
] | de.javakaffee.web; | 174,383 |
public void addRow(Object[] row, int rowIndex) throws RowDataException
{
if (metadata_ == null)
{
Trace.log(Trace.ERROR, "Attempting to add a row before setting the metadata.");
throw new ExtendedIllegalStateException("metadata", ExtendedIllegalStateException.PROPERTY_NOT_SET);
}
addRow(... | void function(Object[] row, int rowIndex) throws RowDataException { if (metadata_ == null) { Trace.log(Trace.ERROR, STR); throw new ExtendedIllegalStateException(STR, ExtendedIllegalStateException.PROPERTY_NOT_SET); } addRow(row, new Vector[metadata_.getColumnCount()], rowIndex); } | /**
* Adds the specified <i>row</i> to the list at <i>rowIndex</i>.
* The metadata needs to be set before adding a row to the list.
* @param row The row.
* @param rowIndex The row index (0-based).
* @exception RowDataException If the row length does not match the number
* of columns specified in the m... | Adds the specified row to the list at rowIndex. The metadata needs to be set before adding a row to the list | addRow | {
"repo_name": "devjunix/libjt400-java",
"path": "src/com/ibm/as400/util/servlet/ListRowData.java",
"license": "epl-1.0",
"size": 15314
} | [
"com.ibm.as400.access.ExtendedIllegalStateException",
"com.ibm.as400.access.Trace",
"java.util.Vector"
] | import com.ibm.as400.access.ExtendedIllegalStateException; import com.ibm.as400.access.Trace; import java.util.Vector; | import com.ibm.as400.access.*; import java.util.*; | [
"com.ibm.as400",
"java.util"
] | com.ibm.as400; java.util; | 2,742,004 |
public static long hash64(final String text, int from, int length)
throws UnsupportedEncodingException {
return hash64(text.substring(from, from + length));
} | static long function(final String text, int from, int length) throws UnsupportedEncodingException { return hash64(text.substring(from, from + length)); } | /**
* Generates 64 bit hash from a substring.
*
* @param text string to hash
* @param from starting index
* @param length length of the substring to hash
* @return 64 bit hash of the given array
* @throws UnsupportedEncodingException
*/ | Generates 64 bit hash from a substring | hash64 | {
"repo_name": "DanielCoutoVale/openccg",
"path": "src/opennlp/ccg/ngrams/kenlm/MurmurHash.java",
"license": "lgpl-2.1",
"size": 5282
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 1,365,625 |
return on.getTargetable(ability, tested);
}
private TestOn on;
| return on.getTargetable(ability, tested); } private TestOn on; | /**
* Return the target to use with this operation.
*
* @param ability
* is the ability owning this test. The card component of this
* ability should correspond to the card owning this test too.
* @param tested
* the tested card
* @return the target to use with this o... | Return the target to use with this operation | getTarget | {
"repo_name": "JoeyLeeuwinga/Firemox",
"path": "src/main/java/net/sf/firemox/expression/targetlist/TargetList.java",
"license": "gpl-2.0",
"size": 2400
} | [
"net.sf.firemox.test.TestOn"
] | import net.sf.firemox.test.TestOn; | import net.sf.firemox.test.*; | [
"net.sf.firemox"
] | net.sf.firemox; | 2,170,318 |
ClientType type = ClientType.SYNC;
Method method = SEARCH;
String query = "code::dive";
if (args.length > 0) {
type = ClientType.fromString(args[0]).getUnchecked();
if (args.length > 1) {
method = Method.fromString(args[1]).getUnchecked();
... | ClientType type = ClientType.SYNC; Method method = SEARCH; String query = STR; if (args.length > 0) { type = ClientType.fromString(args[0]).getUnchecked(); if (args.length > 1) { method = Method.fromString(args[1]).getUnchecked(); if (args.length > 2) { query = args[2]; } } } try { long start = System.currentTimeMillis... | /**
* Search Client. First argument is sync/async/deadline/stream type of the client. Second is a method {search/watch/biwatch}. Third if provided, is the query phrase
*/ | Search Client. First argument is sync/async/deadline/stream type of the client. Second is a method {search/watch/biwatch}. Third if provided, is the query phrase | main | {
"repo_name": "mateuszdyminski/grpc",
"path": "jvm/src/main/java/com/grpc/search/clients/Starter.java",
"license": "mit",
"size": 2398
} | [
"com.grpc.common.ClientType",
"com.grpc.common.Method"
] | import com.grpc.common.ClientType; import com.grpc.common.Method; | import com.grpc.common.*; | [
"com.grpc.common"
] | com.grpc.common; | 1,147,556 |
private Hook searchForHook(Method method) {
for (int hookIndex = 0; hookIndex < NR_COMMON_METHODS; hookIndex++) {
if (hooks[hookIndex].match(method)) {
return hooks[hookIndex];
}
}
return null;
} | Hook function(Method method) { for (int hookIndex = 0; hookIndex < NR_COMMON_METHODS; hookIndex++) { if (hooks[hookIndex].match(method)) { return hooks[hookIndex]; } } return null; } | /**
* Searches for a hook that matches a method.
*
* @param method
* the checked method
* @return The fetched hook, if found, null otherwise.
*/ | Searches for a hook that matches a method | searchForHook | {
"repo_name": "vmware/lmock",
"path": "src/com/vmware/lmock/impl/InvocationHooks.java",
"license": "apache-2.0",
"size": 7983
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,532,882 |
protected IAnnotationFinder getAnnotationFinder() {
return m_annotationFinder;
}
| IAnnotationFinder function() { return m_annotationFinder; } | /**
* TODO cquezel JavaDoc.
*
* @return
*/ | TODO cquezel JavaDoc | getAnnotationFinder | {
"repo_name": "ludovicc/testng-debian",
"path": "src/main/org/testng/internal/BaseTestMethod.java",
"license": "apache-2.0",
"size": 14418
} | [
"org.testng.internal.annotations.IAnnotationFinder"
] | import org.testng.internal.annotations.IAnnotationFinder; | import org.testng.internal.annotations.*; | [
"org.testng.internal"
] | org.testng.internal; | 1,037,486 |
public void changeRewriteSelection(Set<CmsRewriteAliasTableRow> selectedSet) {
boolean selectionEmpty = selectedSet.isEmpty();
m_view.setRewriteDeleteButtonEnabled(!selectionEmpty);
}
| void function(Set<CmsRewriteAliasTableRow> selectedSet) { boolean selectionEmpty = selectedSet.isEmpty(); m_view.setRewriteDeleteButtonEnabled(!selectionEmpty); } | /**
* Method which should be called when the selection of the rewrite table has been changed.<p>
*
* @param selectedSet the set of selected rewrite table entries
*/ | Method which should be called when the selection of the rewrite table has been changed | changeRewriteSelection | {
"repo_name": "PatidarWeb/opencms-core",
"path": "src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasTableController.java",
"license": "lgpl-2.1",
"size": 16161
} | [
"java.util.Set",
"org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow"
] | import java.util.Set; import org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow; | import java.util.*; import org.opencms.gwt.shared.alias.*; | [
"java.util",
"org.opencms.gwt"
] | java.util; org.opencms.gwt; | 2,150,958 |
public List<GridComponent> components(); | List<GridComponent> function(); | /**
* Gets list of all grid components in the order they were added.
*
* @return List of all grid components in the order they were added.
*/ | Gets list of all grid components in the order they were added | components | {
"repo_name": "vladisav/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java",
"license": "apache-2.0",
"size": 18966
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 284,284 |
try {
String messageBody = ((TextMessage)message).getText();
String eventType = message.getStringProperty(HCatConstants.HCAT_EVENT);
String messageVersion = message.getStringProperty(HCatConstants.HCAT_MESSAGE_VERSION);
String messageFormat = message.getStringProperty(HCatConstants.HCAT_MESSAG... | try { String messageBody = ((TextMessage)message).getText(); String eventType = message.getStringProperty(HCatConstants.HCAT_EVENT); String messageVersion = message.getStringProperty(HCatConstants.HCAT_MESSAGE_VERSION); String messageFormat = message.getStringProperty(HCatConstants.HCAT_MESSAGE_FORMAT); if (StringUtils... | /**
* Method to return HCatEventMessage contained in the JMS message.
* @param message The JMS Message instance
* @return The contained HCatEventMessage
*/ | Method to return HCatEventMessage contained in the JMS message | getMessage | {
"repo_name": "WANdisco/amplab-hive",
"path": "hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/messaging/jms/MessagingUtils.java",
"license": "apache-2.0",
"size": 2445
} | [
"javax.jms.JMSException",
"javax.jms.TextMessage",
"org.apache.commons.lang.StringUtils",
"org.apache.hive.hcatalog.common.HCatConstants",
"org.apache.hive.hcatalog.messaging.MessageFactory"
] | import javax.jms.JMSException; import javax.jms.TextMessage; import org.apache.commons.lang.StringUtils; import org.apache.hive.hcatalog.common.HCatConstants; import org.apache.hive.hcatalog.messaging.MessageFactory; | import javax.jms.*; import org.apache.commons.lang.*; import org.apache.hive.hcatalog.common.*; import org.apache.hive.hcatalog.messaging.*; | [
"javax.jms",
"org.apache.commons",
"org.apache.hive"
] | javax.jms; org.apache.commons; org.apache.hive; | 2,567,645 |
public MeasurementCSSImpl getBorderBottomWidth()
{
return borderBottomWidth;
} | MeasurementCSSImpl function() { return borderBottomWidth; } | /**
* Sets the width of the bottom border
*
* @return
*/ | Sets the width of the bottom border | getBorderBottomWidth | {
"repo_name": "GedMarc/JWebSwing",
"path": "src/main/java/com/jwebmp/core/htmlbuilder/css/borders/BorderCSSImpl.java",
"license": "gpl-3.0",
"size": 10918
} | [
"com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSSImpl"
] | import com.jwebmp.core.htmlbuilder.css.measurement.MeasurementCSSImpl; | import com.jwebmp.core.htmlbuilder.css.measurement.*; | [
"com.jwebmp.core"
] | com.jwebmp.core; | 388,370 |
@Override
public void stopReplication() {
logger.trace("stopReplication()");
storageManagerLock.writeLock().lock();
try {
if (replicator == null)
return;
bindingsJournal = originalBindingsJournal;
messageJournal = originalMessageJournal;
try {
... | void function() { logger.trace(STR); storageManagerLock.writeLock().lock(); try { if (replicator == null) return; bindingsJournal = originalBindingsJournal; messageJournal = originalMessageJournal; try { replicator.stop(); } catch (Exception e) { ActiveMQServerLogger.LOGGER.errorStoppingReplicationManager(e); } replica... | /**
* Stops replication by resetting replication-related fields to their 'unreplicated' state.
*/ | Stops replication by resetting replication-related fields to their 'unreplicated' state | stopReplication | {
"repo_name": "rgodfrey/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java",
"license": "apache-2.0",
"size": 33476
} | [
"org.apache.activemq.artemis.core.server.ActiveMQServerLogger"
] | import org.apache.activemq.artemis.core.server.ActiveMQServerLogger; | import org.apache.activemq.artemis.core.server.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 2,473,952 |
public List<PackageDto> listAllPackages(User loggedInUser, String channelLabel,
Date startDate) throws NoSuchChannelException {
return listAllPackages(loggedInUser, channelLabel, startDate, null);
} | List<PackageDto> function(User loggedInUser, String channelLabel, Date startDate) throws NoSuchChannelException { return listAllPackages(loggedInUser, channelLabel, startDate, null); } | /**
* Lists all packages in the channel, regardless of version whose last
* modified date is greater than given date.
* @param loggedInUser The current user
* @param channelLabel Label of channel whose package are sought.
* @param startDate last modified begin date (as a string)
* @return ... | Lists all packages in the channel, regardless of version whose last modified date is greater than given date | listAllPackages | {
"repo_name": "ogajduse/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java",
"license": "gpl-2.0",
"size": 133982
} | [
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.dto.PackageDto",
"com.redhat.rhn.frontend.xmlrpc.NoSuchChannelException",
"java.util.Date",
"java.util.List"
] | import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.dto.PackageDto; import com.redhat.rhn.frontend.xmlrpc.NoSuchChannelException; import java.util.Date; import java.util.List; | import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.frontend.xmlrpc.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 566,323 |
private IgniteCache<Object, Object> txPutDummyRecords(Ignite ignite, int recordsToWrite, int txCnt) {
IgniteCache<Object, Object> cache0 = ignite.cache(CACHE_NAME);
int keysPerTx = recordsToWrite / txCnt;
if (keysPerTx == 0)
keysPerTx = 1;
for (int t = 0; t < txCnt; t++) ... | IgniteCache<Object, Object> function(Ignite ignite, int recordsToWrite, int txCnt) { IgniteCache<Object, Object> cache0 = ignite.cache(CACHE_NAME); int keysPerTx = recordsToWrite / txCnt; if (keysPerTx == 0) keysPerTx = 1; for (int t = 0; t < txCnt; t++) { try (Transaction tx = ignite.transactions().txStart()) { for (i... | /**
* Puts provided number of records to fill WAL under transactions.
*
* @param ignite ignite instance.
* @param recordsToWrite count.
* @param txCnt transactions to run. If number is less then records count, txCnt records will be written.
*/ | Puts provided number of records to fill WAL under transactions | txPutDummyRecords | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java",
"license": "apache-2.0",
"size": 56148
} | [
"java.io.Serializable",
"org.apache.ignite.Ignite",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.transactions.Transaction"
] | import java.io.Serializable; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.transactions.Transaction; | import java.io.*; import org.apache.ignite.*; import org.apache.ignite.transactions.*; | [
"java.io",
"org.apache.ignite"
] | java.io; org.apache.ignite; | 28,783 |
public void loadTable(Path loadPath, String tableName, LoadFileType loadFileType, boolean isSrcLocal,
boolean isSkewedStoreAsSubdir, boolean isAcidIUDoperation, boolean resetStatistics,
Long writeId, int stmtId, boolean isInsertOverwrite, boolean isDirectInsert) throws HiveException {
PerfLogger perf... | void function(Path loadPath, String tableName, LoadFileType loadFileType, boolean isSrcLocal, boolean isSkewedStoreAsSubdir, boolean isAcidIUDoperation, boolean resetStatistics, Long writeId, int stmtId, boolean isInsertOverwrite, boolean isDirectInsert) throws HiveException { PerfLogger perfLogger = SessionState.getPe... | /**
* Load a directory into a Hive Table. - Alters existing content of table with
* the contents of loadPath. - If table does not exist - an exception is
* thrown - files in loadPath are moved into Hive. But the directory itself is
* not removed.
*
* @param loadPath
* Directory containing ... | Load a directory into a Hive Table. - Alters existing content of table with the contents of loadPath. - If table does not exist - an exception is thrown - files in loadPath are moved into Hive. But the directory itself is not removed | loadTable | {
"repo_name": "nishantmonu51/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java",
"license": "apache-2.0",
"size": 254947
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hive.common.FileUtils",
"org.apache.hadoop.hive.common.StatsSetupConst",
"org.apache.hadoop.hive.conf.HiveCon... | import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.FileUtils; import org.apache.hadoop.hive.common.StatsSetupConst; import org.ap... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.common.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.metastore.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.utils.*; import org.apache.hadoop.hive.ql.e... | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,047,567 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.