method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public boolean computeScrollOffset() {
if (mFinished) {
return false;
}
int timePassed = (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime);
if (timePassed < mDuration) {
switch (mMode) {
case SCROLL_MODE:
float x = ... | boolean function() { if (mFinished) { return false; } int timePassed = (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime); if (timePassed < mDuration) { switch (mMode) { case SCROLL_MODE: float x = timePassed * mDurationReciprocal; if (mInterpolator == null) x = viscousFluid(x); else x = mInterpolator.get... | /**
* Call this when you want to know the new location. If it returns true,
* the animation is not yet finished. loc will be altered to provide the
* new location.
*/ | Call this when you want to know the new location. If it returns true, the animation is not yet finished. loc will be altered to provide the new location | computeScrollOffset | {
"repo_name": "infakt/android-menudrawer",
"path": "menudrawer/src/net/simonvt/menudrawer/Scroller.java",
"license": "apache-2.0",
"size": 17015
} | [
"android.view.animation.AnimationUtils"
] | import android.view.animation.AnimationUtils; | import android.view.animation.*; | [
"android.view"
] | android.view; | 580,903 |
@Override
public void close() throws IOException {
if (!this.closed) {
this.closed = true;
this.out.flush();
}
} | void function() throws IOException { if (!this.closed) { this.closed = true; this.out.flush(); } } | /**
* <p>Does not close the underlying socket output.</p>
*
* @throws IOException If an I/O problem occurs.
*/ | Does not close the underlying socket output | close | {
"repo_name": "SxdsF/Visit",
"path": "src/org/apache/http/impl/io/ContentLengthOutputStreamHC4.java",
"license": "apache-2.0",
"size": 4357
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 880,452 |
public void networkPlayerReconnect(PlayerConnection playerConnection, int playerId) {
// TODO: avoid that everybody can do this
_logger.debug(
"network reconnect for player id: {} stop timeout first. ---------------------",
playerId);
_playerTimeoutScheduler.stopTimeout(playerId);
Player oldPlr... | void function(PlayerConnection playerConnection, int playerId) { _logger.debug( STR, playerId); _playerTimeoutScheduler.stopTimeout(playerId); Player oldPlrToCopy = _playerList.get(playerId); ReconnectRequestResponse resp = new ReconnectRequestResponse(); resp.reconnectSuccess = false; if (oldPlrToCopy == null) { _logg... | /**
* Called from player on network reconnect.
*
* @param playerId
*/ | Called from player on network reconnect | networkPlayerReconnect | {
"repo_name": "lumannnn/AudioRacer",
"path": "AudioRacer-Server/src/at/fhv/audioracer/server/game/GameModerator.java",
"license": "gpl-3.0",
"size": 26275
} | [
"at.fhv.audioracer.communication.player.message.ReconnectRequestResponse",
"at.fhv.audioracer.core.model.Car",
"at.fhv.audioracer.core.model.ConnectionState",
"at.fhv.audioracer.server.PlayerConnection",
"at.fhv.audioracer.server.model.Player"
] | import at.fhv.audioracer.communication.player.message.ReconnectRequestResponse; import at.fhv.audioracer.core.model.Car; import at.fhv.audioracer.core.model.ConnectionState; import at.fhv.audioracer.server.PlayerConnection; import at.fhv.audioracer.server.model.Player; | import at.fhv.audioracer.communication.player.message.*; import at.fhv.audioracer.core.model.*; import at.fhv.audioracer.server.*; import at.fhv.audioracer.server.model.*; | [
"at.fhv.audioracer"
] | at.fhv.audioracer; | 2,787,910 |
public void enableResizedPosting()
{
// Does nothing
}
/**
* Adds a listener so that it receives {@link PropertyChangeEvent} | void function() { } /** * Adds a listener so that it receives {@link PropertyChangeEvent} | /**
* This method is empty, unused and deprecated.
* @deprecated 1.3
*/ | This method is empty, unused and deprecated | enableResizedPosting | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/table/TableColumn.java",
"license": "bsd-3-clause",
"size": 20195
} | [
"java.beans.PropertyChangeEvent"
] | import java.beans.PropertyChangeEvent; | import java.beans.*; | [
"java.beans"
] | java.beans; | 2,529,022 |
private byte [] sendMessage(QueuedTask job) {
byte [] result = null;
try {
// prepare ipcMessage
FlatBufferBuilder flatbuffer = new FlatBufferBuilder(1);
// prepare a vector for ipcData
int [] ipcDataArray = new int[job.action.length];
for (int index = 0; index... | byte [] function(QueuedTask job) { byte [] result = null; try { FlatBufferBuilder flatbuffer = new FlatBufferBuilder(1); int [] ipcDataArray = new int[job.action.length]; for (int index = 0; index < job.action.length; index++) { byte [] ipcDataPayLoad = new byte[1]; int emptyPayLoad = ipcData.createPayloadVector(flatbu... | /**
* send request to osmcore and get data when data is ready
* @param[in] job the new job
* @return result the new data
*/ | send request to osmcore and get data when data is ready | sendMessage | {
"repo_name": "ic2y/OSMonitor",
"path": "app/src/main/java/com/eolwral/osmonitor/ipc/IpcService.java",
"license": "apache-2.0",
"size": 13918
} | [
"com.google.flatbuffers.FlatBufferBuilder",
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream"
] | import com.google.flatbuffers.FlatBufferBuilder; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; | import com.google.flatbuffers.*; import java.io.*; | [
"com.google.flatbuffers",
"java.io"
] | com.google.flatbuffers; java.io; | 479,611 |
public final void setColumn(int column, double value1, double value2, double value3, double value4) {
assert column >= 0 && column < 4 : AssertMessages.outsideRangeInclusiveParameter(0, column, 0, 3);
switch (column) {
case 0:
this.m00 = value1;
this.m10 = value2;
... | final void function(int column, double value1, double value2, double value3, double value4) { assert column >= 0 && column < 4 : AssertMessages.outsideRangeInclusiveParameter(0, column, 0, 3); switch (column) { case 0: this.m00 = value1; this.m10 = value2; this.m20 = value3; this.m30 = value4; break; case 1: this.m01 =... | /**
* Sets the specified column of this Matrix4f to the three values provided.
*
* @param column
* the column number to be modified (zero indexed)
* @param value1
* the first row element
* @param value2
* the second row element
* @param value... | Sets the specified column of this Matrix4f to the three values provided | setColumn | {
"repo_name": "tpiotrow/afc",
"path": "core/math/src/main/java/org/arakhne/afc/math/matrix/Matrix4d.java",
"license": "apache-2.0",
"size": 75836
} | [
"org.arakhne.afc.vmutil.asserts.AssertMessages"
] | import org.arakhne.afc.vmutil.asserts.AssertMessages; | import org.arakhne.afc.vmutil.asserts.*; | [
"org.arakhne.afc"
] | org.arakhne.afc; | 2,126,239 |
public PlanarYUVLuminanceSource buildLuminanceSource(byte[] data, int width, int height) {
Rect rect = scanManager.getCropRect();
if (rect == null) {
return null;
}
// Go ahead and assume it's YUV rather than die.
return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top, rect.width()... | PlanarYUVLuminanceSource function(byte[] data, int width, int height) { Rect rect = scanManager.getCropRect(); if (rect == null) { return null; } return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top, rect.width(), rect.height(), false); } | /**
* A factory method to build the appropriate LuminanceSource object based on
* the format of the preview buffers, as described by Camera.Parameters.
*
* @param data
* A preview frame.
* @param width
* The width of the image.
* @param height
* The height of the imag... | A factory method to build the appropriate LuminanceSource object based on the format of the preview buffers, as described by Camera.Parameters | buildLuminanceSource | {
"repo_name": "jpush/jchat-android",
"path": "chatapp/src/main/java/jiguang/chat/utils/zxing/decode/DecodeHandler.java",
"license": "mit",
"size": 4927
} | [
"android.graphics.Rect",
"com.google.zxing.PlanarYUVLuminanceSource"
] | import android.graphics.Rect; import com.google.zxing.PlanarYUVLuminanceSource; | import android.graphics.*; import com.google.zxing.*; | [
"android.graphics",
"com.google.zxing"
] | android.graphics; com.google.zxing; | 1,642,343 |
public void setOldValueInEvent(EntryEventImpl event) {
CqService cqService = event.getRegion().getCache().getCqService();
if (cqService.isRunning()) {
event.setOldValueForQueryProcessing();
if (!event.hasOldValue() && this.hasOldValue) {
if (this.oldValueIsSerialized) {
... | void function(EntryEventImpl event) { CqService cqService = event.getRegion().getCache().getCqService(); if (cqService.isRunning()) { event.setOldValueForQueryProcessing(); if (!event.hasOldValue() && this.hasOldValue) { if (this.oldValueIsSerialized) { event.setSerializedOldValue((byte[])this.oldValue); } else { event... | /**
* Insert this message's oldValue into the given event. This fixes
* bug 38382 by propagating old values with Entry level
* CacheOperationMessages during initial image transfer
* @since 5.5
*/ | Insert this message's oldValue into the given event. This fixes bug 38382 by propagating old values with Entry level CacheOperationMessages during initial image transfer | setOldValueInEvent | {
"repo_name": "kidaa/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedCacheOperation.java",
"license": "apache-2.0",
"size": 58863
} | [
"com.gemstone.gemfire.cache.query.internal.cq.CqService"
] | import com.gemstone.gemfire.cache.query.internal.cq.CqService; | import com.gemstone.gemfire.cache.query.internal.cq.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 5,959 |
WebViewDatabase getWebViewDatabase(Context context); | WebViewDatabase getWebViewDatabase(Context context); | /**
* Gets the singleton WebViewDatabase instance for this WebView implementation. The
* implementation must return the same instance on subsequent calls.
*
* @return the singleton WebViewDatabase instance
*/ | Gets the singleton WebViewDatabase instance for this WebView implementation. The implementation must return the same instance on subsequent calls | getWebViewDatabase | {
"repo_name": "yuzaipiaofei/chromium_webview",
"path": "java/src/com/mogoweb/chrome/impl/WebViewFactoryProvider.java",
"license": "bsd-3-clause",
"size": 4358
} | [
"android.content.Context",
"com.mogoweb.chrome.WebViewDatabase"
] | import android.content.Context; import com.mogoweb.chrome.WebViewDatabase; | import android.content.*; import com.mogoweb.chrome.*; | [
"android.content",
"com.mogoweb.chrome"
] | android.content; com.mogoweb.chrome; | 2,857,946 |
protected Cell getCell(DataType type, Row r, String columnName)
throws InvocationTargetException, IllegalAccessException {
Method m = transformations.get(type.toString());
Object value = m.invoke(r, columnName);
return new Cell(value);
} | Cell function(DataType type, Row r, String columnName) throws InvocationTargetException, IllegalAccessException { Method m = transformations.get(type.toString()); Object value = m.invoke(r, columnName); return new Cell(value); } | /**
* Get a {@link com.stratio.crossdata.common.data.Cell} with the column contents of a Row.
*
* @param type The {@link com.datastax.driver.core.DataType} of the column.
* @param r The row that contains the column.
* @param columnName The column name.
* @return A {@link com... | Get a <code>com.stratio.crossdata.common.data.Cell</code> with the column contents of a Row | getCell | {
"repo_name": "Stratio/stratio-connector-cassandra",
"path": "cassandra-connector/src/main/java/com/stratio/connector/cassandra/utils/Utils.java",
"license": "apache-2.0",
"size": 16932
} | [
"com.datastax.driver.core.DataType",
"com.datastax.driver.core.Row",
"com.stratio.crossdata.common.data.Cell",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import com.datastax.driver.core.DataType; import com.datastax.driver.core.Row; import com.stratio.crossdata.common.data.Cell; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import com.datastax.driver.core.*; import com.stratio.crossdata.common.data.*; import java.lang.reflect.*; | [
"com.datastax.driver",
"com.stratio.crossdata",
"java.lang"
] | com.datastax.driver; com.stratio.crossdata; java.lang; | 253,181 |
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginExecute(String resourceGroupName, String labName, String name); | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<Void>, Void> beginExecute(String resourceGroupName, String labName, String name); | /**
* Execute a schedule. This operation can take a while to complete.
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the schedule.
* @throws IllegalArgumentException thrown if parameters fail the validation.
... | Execute a schedule. This operation can take a while to complete | beginExecute | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/SchedulesClient.java",
"license": "mit",
"size": 13394
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 1,778,180 |
@Override public T visitPattern1(@NotNull ScalaParser.Pattern1Context ctx) { return visitChildren(ctx); } | @Override public T visitPattern1(@NotNull ScalaParser.Pattern1Context ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitTypes | {
"repo_name": "IsThisThePayneResidence/intellidots",
"path": "src/main/java/ua/edu/hneu/ast/parsers/ScalaBaseVisitor.java",
"license": "gpl-3.0",
"size": 26845
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,020,849 |
Set<MainCommand> getCommandsFromPlugin(DioritePlugin dioritePlugin); | Set<MainCommand> getCommandsFromPlugin(DioritePlugin dioritePlugin); | /**
* Returns all commands from given plugin.
*
* @param dioritePlugin plugin instance.
*
* @return all commands from given plugin.
*/ | Returns all commands from given plugin | getCommandsFromPlugin | {
"repo_name": "marszczybrew/Diorite",
"path": "DioriteAPI/src/main/java/org/diorite/command/CommandMap.java",
"license": "mit",
"size": 2695
} | [
"java.util.Set",
"org.diorite.plugin.DioritePlugin"
] | import java.util.Set; import org.diorite.plugin.DioritePlugin; | import java.util.*; import org.diorite.plugin.*; | [
"java.util",
"org.diorite.plugin"
] | java.util; org.diorite.plugin; | 132,590 |
public static void pingPong()
{
final String[] protos = { OSCChannel.UDP, OSCChannel.TCP };
final String[] words = { "One", "Two", "Three", "Four", "Five", "Six",
"Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve" };
final Object sync = new Object();
int wordIdx = 0;
int failures = 0;
Syste... | static void function() { final String[] protos = { OSCChannel.UDP, OSCChannel.TCP }; final String[] words = { "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", STR, STR }; final Object sync = new Object(); int wordIdx = 0; int failures = 0; System.out.println( STR ); for( int i = 0; i < 1; ... | /**
* Creates two receivers and two transmitters, one of each
* being restricted to loopback. Sends from each transmitter
* to each receiver. The expected result is that all messages
* arrive except those sent from the local host transmitter
* to loopback receiver (trns2 to rcv1, i.e. "five", "six").
*/ | Creates two receivers and two transmitters, one of each being restricted to loopback. Sends from each transmitter to each receiver. The expected result is that all messages arrive except those sent from the local host transmitter to loopback receiver (trns2 to rcv1, i.e. "five", "six") | pingPong | {
"repo_name": "wolkstein/ardroid-export",
"path": "app/src/main/java/main/java/de/sciss/net/test/NetUtilTest.java",
"license": "gpl-2.0",
"size": 14256
} | [
"de.sciss.net.OSCChannel",
"de.sciss.net.OSCReceiver",
"de.sciss.net.OSCTransmitter"
] | import de.sciss.net.OSCChannel; import de.sciss.net.OSCReceiver; import de.sciss.net.OSCTransmitter; | import de.sciss.net.*; | [
"de.sciss.net"
] | de.sciss.net; | 997,108 |
public KeyPropagation findKeyPropagation( TableName table1, List<SQLIdentifier> table1KeyColumns, TableName table2,
List<SQLIdentifier> table2KeyColumns ) {
KeyPropagation fromToTo = new KeyPropagation( table1, table1KeyColumns, table2, table2KeyColumns );
... | KeyPropagation function( TableName table1, List<SQLIdentifier> table1KeyColumns, TableName table2, List<SQLIdentifier> table2KeyColumns ) { KeyPropagation fromToTo = new KeyPropagation( table1, table1KeyColumns, table2, table2KeyColumns ); KeyPropagation toToFrom = new KeyPropagation( table2, table2KeyColumns, table1, ... | /**
* Performs a lookup for the specified key propagation.
*
* @param table1
* first table, must not be <code>null</code>
* @param table1KeyColumns
* key columns (of first table), must not be <code>null</code> and contain at least one entry
* @param table2
... | Performs a lookup for the specified key propagation | findKeyPropagation | {
"repo_name": "deegree/deegree3",
"path": "deegree-datastores/deegree-featurestores/deegree-featurestore-sql/src/main/java/org/deegree/feature/persistence/sql/id/TableDependencies.java",
"license": "lgpl-2.1",
"size": 13526
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.deegree.commons.jdbc.SQLIdentifier",
"org.deegree.commons.jdbc.TableName"
] | import java.util.HashSet; import java.util.List; import java.util.Set; import org.deegree.commons.jdbc.SQLIdentifier; import org.deegree.commons.jdbc.TableName; | import java.util.*; import org.deegree.commons.jdbc.*; | [
"java.util",
"org.deegree.commons"
] | java.util; org.deegree.commons; | 2,694,785 |
int updateByExampleSelective(@Param("record") TSysUser record, @Param("example") TSysUserExample example); | int updateByExampleSelective(@Param(STR) TSysUser record, @Param(STR) TSysUserExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table t_sys_user
*
* @mbg.generated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table t_sys_user | updateByExampleSelective | {
"repo_name": "tkdiooo/sfsctech",
"path": "demo-parent/demo-dubbox/demo-dubbox-dao/src/main/java/com/sfsctech/framework/mapper/TSysUserMapper.java",
"license": "gpl-2.0",
"size": 2755
} | [
"com.sfsctech.framework.model.domain.TSysUser",
"com.sfsctech.framework.model.domain.TSysUserExample",
"org.apache.ibatis.annotations.Param"
] | import com.sfsctech.framework.model.domain.TSysUser; import com.sfsctech.framework.model.domain.TSysUserExample; import org.apache.ibatis.annotations.Param; | import com.sfsctech.framework.model.domain.*; import org.apache.ibatis.annotations.*; | [
"com.sfsctech.framework",
"org.apache.ibatis"
] | com.sfsctech.framework; org.apache.ibatis; | 2,891,326 |
private void sendSMS(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
Gson gson = new Gson();
SmsWrapper smsWrapper = gson.fromJson(request.getParameter("smsWrapper"), SmsWrapper.class);
String[] numbers = smsWrapper.getRecipients();
String message = smsWrapper... | void function(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Gson gson = new Gson(); SmsWrapper smsWrapper = gson.fromJson(request.getParameter(STR), SmsWrapper.class); String[] numbers = smsWrapper.getRecipients(); String message = smsWrapper.getMessage(); Map<String, ... | /**
* Processes the request to send an SMS
* @param request a request containing message and recipients wrapped in a SmsWrapper-object
* @param response a response with data describing the result in JSON
* @throws IOException
* @throws ServletException
*/ | Processes the request to send an SMS | sendSMS | {
"repo_name": "lacrossebjorne/ServiceExperienceTool",
"path": "ServiceExperienceTool/src/com/set/servlets/SMSServlet.java",
"license": "apache-2.0",
"size": 5257
} | [
"com.google.gson.Gson",
"com.set.dao.RecipientError",
"com.set.entities.SmsWrapper",
"com.set.sms.SMSSender",
"java.io.IOException",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.... | import com.google.gson.Gson; import com.set.dao.RecipientError; import com.set.entities.SmsWrapper; import com.set.sms.SMSSender; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.htt... | import com.google.gson.*; import com.set.dao.*; import com.set.entities.*; import com.set.sms.*; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; | [
"com.google.gson",
"com.set.dao",
"com.set.entities",
"com.set.sms",
"java.io",
"java.util",
"javax.servlet"
] | com.google.gson; com.set.dao; com.set.entities; com.set.sms; java.io; java.util; javax.servlet; | 622,379 |
public void addSessionCookieInternal(final Cookie cookie) {
if (isCommitted()) {
return;
}
String name = cookie.getName();
final String headername = "Set-Cookie";
final String startsWith = name + "=";
final StringBuffer sb = generateCookieString(cookie);
... | void function(final Cookie cookie) { if (isCommitted()) { return; } String name = cookie.getName(); final String headername = STR; final String startsWith = name + "="; final StringBuffer sb = generateCookieString(cookie); boolean set = false; MimeHeaders headers = getCoyoteResponse().getMimeHeaders(); int n = headers.... | /**
* Special method for adding a session cookie as we should be overriding
* any previous
* @param cookie
*/ | Special method for adding a session cookie as we should be overriding any previous | addSessionCookieInternal | {
"repo_name": "thanple/tomcatsrc",
"path": "java/org/apache/catalina/connector/Response.java",
"license": "apache-2.0",
"size": 54096
} | [
"javax.servlet.http.Cookie",
"org.apache.tomcat.util.http.MimeHeaders"
] | import javax.servlet.http.Cookie; import org.apache.tomcat.util.http.MimeHeaders; | import javax.servlet.http.*; import org.apache.tomcat.util.http.*; | [
"javax.servlet",
"org.apache.tomcat"
] | javax.servlet; org.apache.tomcat; | 2,571,633 |
void setEntityType(Entity entity); | void setEntityType(Entity entity); | /**
* Set the entity type to use.
* @param entity The entity type to use.
*/ | Set the entity type to use | setEntityType | {
"repo_name": "krharrison/cilib",
"path": "library/src/main/java/net/sourceforge/cilib/algorithm/initialisation/PopulationInitialisationStrategy.java",
"license": "gpl-3.0",
"size": 1587
} | [
"net.sourceforge.cilib.entity.Entity"
] | import net.sourceforge.cilib.entity.Entity; | import net.sourceforge.cilib.entity.*; | [
"net.sourceforge.cilib"
] | net.sourceforge.cilib; | 710,305 |
public void executeUpdate (String update)
{
try
{
DatabaseConnection.update (update);
}
catch (SQLException sqle)
{
this.rollbackTransaction ();
PopupMessageFrame mes = new PopupMessageFrame();
String warning = "Empty during update. Possible confli... | void function (String update) { try { DatabaseConnection.update (update); } catch (SQLException sqle) { this.rollbackTransaction (); PopupMessageFrame mes = new PopupMessageFrame(); String warning = STR; mes.setWarning (warning); sqle.printStackTrace (); System.exit(1); } } | /**
* this method is used for queries (insert,update,delete etc) that do not return results
*
* @param update
*/ | this method is used for queries (insert,update,delete etc) that do not return results | executeUpdate | {
"repo_name": "nickapos/myBill",
"path": "src/main/java/gr/oncrete/nick/mybill/RDBMS/TransactionSQLOperations.java",
"license": "gpl-3.0",
"size": 2921
} | [
"gr.oncrete.nick.mybill.UserInterface",
"java.sql.SQLException"
] | import gr.oncrete.nick.mybill.UserInterface; import java.sql.SQLException; | import gr.oncrete.nick.mybill.*; import java.sql.*; | [
"gr.oncrete.nick",
"java.sql"
] | gr.oncrete.nick; java.sql; | 266,265 |
public Calendar getCalLayout() {
return calLayout;
}
| Calendar function() { return calLayout; } | /**
* Getter for calLayout
*
* @return Calendar Vaadin calendar component
*/ | Getter for calLayout | getCalLayout | {
"repo_name": "paulswithers/Key-Dates",
"path": "osgiworlds/src/uk/co/intec/keyDatesApp/pages/CalendarView.java",
"license": "apache-2.0",
"size": 5600
} | [
"com.vaadin.ui.Calendar"
] | import com.vaadin.ui.Calendar; | import com.vaadin.ui.*; | [
"com.vaadin.ui"
] | com.vaadin.ui; | 1,111,834 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<SqlContainerGetResultsInner> createUpdateSqlContainerAsync(
String resourceGroupName,
String accountName,
String databaseName,
String containerName,
SqlContainerCreateUpdateParameters createUpdateSqlContainerParamet... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<SqlContainerGetResultsInner> function( String resourceGroupName, String accountName, String databaseName, String containerName, SqlContainerCreateUpdateParameters createUpdateSqlContainerParameters, Context context) { return beginCreateUpdateSqlContainerAsync( resourceGr... | /**
* Create or update an Azure Cosmos DB SQL container.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @param containerName Cosmos DB containe... | Create or update an Azure Cosmos DB SQL container | createUpdateSqlContainerAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/SqlResourcesClientImpl.java",
"license": "mit",
"size": 547809
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.cosmos.fluent.models.SqlContainerGetResultsInner",
"com.azure.resourcemanager.cosmos.models.SqlContainerCreateUpdateParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.cosmos.fluent.models.SqlContainerGetResultsInner; import com.azure.resourcemanager.cosmos.models.SqlContainerCreateUpdateParameters; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.cosmos.fluent.models.*; import com.azure.resourcemanager.cosmos.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,839,470 |
void lockSegmentAtTheSameOffsetIfAny(final int number) {
if (number == -1) {
return;
}
final RangeMarker current = mySegments.get(number);
int offset = current.getStartOffset();
for (int i = 0; i < mySegments.size(); i++) {
if (i != number) {
final RangeMarker segment = mySeg... | void lockSegmentAtTheSameOffsetIfAny(final int number) { if (number == -1) { return; } final RangeMarker current = mySegments.get(number); int offset = current.getStartOffset(); for (int i = 0; i < mySegments.size(); i++) { if (i != number) { final RangeMarker segment = mySegments.get(i); final int startOffset2 = segme... | /**
* IDEADEV-13618
*
* prevent two different segments to grow simultaneously if they both starts at the same offset.
*/ | IDEADEV-13618 prevent two different segments to grow simultaneously if they both starts at the same offset | lockSegmentAtTheSameOffsetIfAny | {
"repo_name": "goodwinnk/intellij-community",
"path": "platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateSegments.java",
"license": "apache-2.0",
"size": 3790
} | [
"com.intellij.openapi.editor.RangeMarker"
] | import com.intellij.openapi.editor.RangeMarker; | import com.intellij.openapi.editor.*; | [
"com.intellij.openapi"
] | com.intellij.openapi; | 1,289,889 |
public void clearTextWrap() {
float tmpHeight = imageEnd - currentHeight;
if (line != null) {
tmpHeight += line.height();
}
if ((imageEnd > -1) && (tmpHeight > 0)) {
carriageReturn();
currentHeight += tmpHeight;
}
}
protected Image imageWait = null; | void function() { float tmpHeight = imageEnd - currentHeight; if (line != null) { tmpHeight += line.height(); } if ((imageEnd > -1) && (tmpHeight > 0)) { carriageReturn(); currentHeight += tmpHeight; } } protected Image imageWait = null; | /**
* Method added by Pelikan Stephan
*/ | Method added by Pelikan Stephan | clearTextWrap | {
"repo_name": "bullda/DroidText",
"path": "src/core/com/lowagie/text/pdf/PdfDocument.java",
"license": "lgpl-3.0",
"size": 117456
} | [
"com.lowagie.text.Image"
] | import com.lowagie.text.Image; | import com.lowagie.text.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 1,042,420 |
void refreshIfEmpty() {
if (ancestor != null) {
ancestor.refreshIfEmpty();
if (ancestor.getDelegate() != ancestorDelegate) {
throw new ConcurrentModificationException();
}
} else if (delegate.isEmpty()) {
Collection<V> newDelegate = map.get(key);
if (new... | void refreshIfEmpty() { if (ancestor != null) { ancestor.refreshIfEmpty(); if (ancestor.getDelegate() != ancestorDelegate) { throw new ConcurrentModificationException(); } } else if (delegate.isEmpty()) { Collection<V> newDelegate = map.get(key); if (newDelegate != null) { delegate = newDelegate; } } } | /**
* If the delegate collection is empty, but the multimap has values for the
* key, replace the delegate with the new collection for the key.
*
* <p>For a subcollection, refresh its ancestor and validate that the
* ancestor delegate hasn't changed.
*/ | If the delegate collection is empty, but the multimap has values for the key, replace the delegate with the new collection for the key. For a subcollection, refresh its ancestor and validate that the ancestor delegate hasn't changed | refreshIfEmpty | {
"repo_name": "congdepeng/java-guava-lib-demo",
"path": "guava-libraries/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/AbstractMapBasedMultimap.java",
"license": "apache-2.0",
"size": 36194
} | [
"java.util.Collection",
"java.util.ConcurrentModificationException"
] | import java.util.Collection; import java.util.ConcurrentModificationException; | import java.util.*; | [
"java.util"
] | java.util; | 78,292 |
@DeleteOperation(produces = {ActuatorMediaType.V2_JSON, "application/vnd.cas.services+yaml", MediaType.APPLICATION_JSON_VALUE})
public RegisteredService deleteService(@Selector final String id) {
if (NumberUtils.isDigits(id)) {
val svc = this.servicesManager.findServiceBy(Long.parseLong(id))... | @DeleteOperation(produces = {ActuatorMediaType.V2_JSON, STR, MediaType.APPLICATION_JSON_VALUE}) RegisteredService function(@Selector final String id) { if (NumberUtils.isDigits(id)) { val svc = this.servicesManager.findServiceBy(Long.parseLong(id)); if (svc != null) { return this.servicesManager.delete(svc); } } else {... | /**
* Delete registered service.
*
* @param id the id
* @return the registered service
*/ | Delete registered service | deleteService | {
"repo_name": "pdrados/cas",
"path": "support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/RegisteredServicesEndpoint.java",
"license": "apache-2.0",
"size": 3488
} | [
"org.apache.commons.lang3.math.NumberUtils",
"org.apereo.cas.services.RegisteredService",
"org.springframework.boot.actuate.endpoint.annotation.DeleteOperation",
"org.springframework.boot.actuate.endpoint.annotation.Selector",
"org.springframework.boot.actuate.endpoint.http.ActuatorMediaType",
"org.spring... | import org.apache.commons.lang3.math.NumberUtils; import org.apereo.cas.services.RegisteredService; import org.springframework.boot.actuate.endpoint.annotation.DeleteOperation; import org.springframework.boot.actuate.endpoint.annotation.Selector; import org.springframework.boot.actuate.endpoint.http.ActuatorMediaType; ... | import org.apache.commons.lang3.math.*; import org.apereo.cas.services.*; import org.springframework.boot.actuate.endpoint.annotation.*; import org.springframework.boot.actuate.endpoint.http.*; import org.springframework.http.*; | [
"org.apache.commons",
"org.apereo.cas",
"org.springframework.boot",
"org.springframework.http"
] | org.apache.commons; org.apereo.cas; org.springframework.boot; org.springframework.http; | 2,192,164 |
public static long readUE7(InputStream stream) throws IOException {
int i;
long v = 0;
while ((i = stream.read()) >= 0) {
v = v << 7;
if ((i & 128) == 128) {
// Continues
v += (i&127);
} else {
// Last value
... | static long function(InputStream stream) throws IOException { int i; long v = 0; while ((i = stream.read()) >= 0) { v = v << 7; if ((i & 128) == 128) { v += (i&127); } else { v += i; break; } } return v; } | /**
* Gets the integer value that is stored in UTF-8 like fashion, in Big Endian
* but with the high bit on each number indicating if it continues or not
*/ | Gets the integer value that is stored in UTF-8 like fashion, in Big Endian but with the high bit on each number indicating if it continues or not | readUE7 | {
"repo_name": "andrm/VorbisJava",
"path": "core/src/main/java/org/gagravarr/ogg/IOUtils.java",
"license": "apache-2.0",
"size": 12523
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 570,262 |
@ServiceMethod(returns = ReturnType.SINGLE)
public UsageListResultInner listUsages(String resourceGroupName, String accountName) {
final String filter = null;
return listUsagesAsync(resourceGroupName, accountName, filter).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) UsageListResultInner function(String resourceGroupName, String accountName) { final String filter = null; return listUsagesAsync(resourceGroupName, accountName, filter).block(); } | /**
* Get usages for the requested Cognitive Services account.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation.
... | Get usages for the requested Cognitive Services account | listUsages | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java",
"license": "mit",
"size": 114340
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.cognitiveservices.fluent.models.UsageListResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.cognitiveservices.fluent.models.UsageListResultInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.cognitiveservices.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 797,803 |
public void setTargetDensity(Canvas canvas) {
setTargetDensity(canvas.getDensity());
} | void function(Canvas canvas) { setTargetDensity(canvas.getDensity()); } | /**
* Set the density scale at which this drawable will be rendered. This
* method assumes the drawable will be rendered at the same density as the
* specified canvas.
*
* @param canvas The Canvas from which the density scale must be obtained.
*
* @see android.graphics.Bitmap#setDensi... | Set the density scale at which this drawable will be rendered. This method assumes the drawable will be rendered at the same density as the specified canvas | setTargetDensity | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/graphics/drawable/BitmapDrawable.java",
"license": "apache-2.0",
"size": 19531
} | [
"android.graphics.Canvas"
] | import android.graphics.Canvas; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,388,964 |
public V1beta1PriorityLevelConfiguration patchPriorityLevelConfiguration(
String name,
V1Patch body,
String pretty,
String dryRun,
String fieldManager,
String fieldValidation,
Boolean force)
throws ApiException {
ApiResponse<V1beta1PriorityLevelConfiguration> localV... | V1beta1PriorityLevelConfiguration function( String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force) throws ApiException { ApiResponse<V1beta1PriorityLevelConfiguration> localVarResp = patchPriorityLevelConfigurationWithHttpInfo( name, body, pretty, dryRun, fi... | /**
* partially update the specified PriorityLevelConfiguration
*
* @param name name of the PriorityLevelConfiguration (required)
* @param body (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param dryRun When present, indicates that modifications should ... | partially update the specified PriorityLevelConfiguration | patchPriorityLevelConfiguration | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta1Api.java",
"license": "apache-2.0",
"size": 322022
} | [
"io.kubernetes.client.custom.V1Patch",
"io.kubernetes.client.openapi.ApiException",
"io.kubernetes.client.openapi.ApiResponse",
"io.kubernetes.client.openapi.models.V1beta1PriorityLevelConfiguration"
] | import io.kubernetes.client.custom.V1Patch; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.ApiResponse; import io.kubernetes.client.openapi.models.V1beta1PriorityLevelConfiguration; | import io.kubernetes.client.custom.*; import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; | [
"io.kubernetes.client"
] | io.kubernetes.client; | 1,781,107 |
public static java.util.Set extractCategoryProceduresSet(ims.domain.ILightweightDomainFactory domainFactory, ims.admin.vo.CategoryProceduresVoCollection voCollection)
{
return extractCategoryProceduresSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.admin.vo.CategoryProceduresVoCollection voCollection) { return extractCategoryProceduresSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.clinical.domain.objects.CategoryProcedures set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.clinical.domain.objects.CategoryProcedures set from the value object collection | extractCategoryProceduresSet | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/admin/vo/domain/CategoryProceduresVoAssembler.java",
"license": "agpl-3.0",
"size": 19572
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 780,514 |
public String buildReport() throws JspException, ServletException, IOException {
CmsDeleteBrokenRelationsList list = new CmsDeleteBrokenRelationsList(
getJsp(),
getResourceList(),
Boolean.valueOf(getParamDeleteSiblings()).booleanValue());
list.actionDialog();
... | String function() throws JspException, ServletException, IOException { CmsDeleteBrokenRelationsList list = new CmsDeleteBrokenRelationsList( getJsp(), getResourceList(), Boolean.valueOf(getParamDeleteSiblings()).booleanValue()); list.actionDialog(); StringBuffer result = new StringBuffer(512); list.getList().setBoxed(f... | /**
* Returns html code for the possible broken relations.<p>
*
* @return html code for the possible broken relations
*
* @throws JspException if dialog actions fail
* @throws IOException in case of errros forwarding to the required result page
* @throws ServletException in case of er... | Returns html code for the possible broken relations | buildReport | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-modules/org/opencms/workplace/commons/CmsDelete.java",
"license": "lgpl-2.1",
"size": 15384
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.jsp.JspException",
"org.opencms.workplace.list.CmsListExplorerColumn"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.jsp.JspException; import org.opencms.workplace.list.CmsListExplorerColumn; | import java.io.*; import javax.servlet.*; import javax.servlet.jsp.*; import org.opencms.workplace.list.*; | [
"java.io",
"javax.servlet",
"org.opencms.workplace"
] | java.io; javax.servlet; org.opencms.workplace; | 1,305,412 |
public void close()
throws IOException
{
if (out == null || workbook == null) return;
workbook.write(out);
out.close();
}
| void function() throws IOException { if (out == null workbook == null) return; workbook.write(out); out.close(); } | /**
* Writes the workbook to excel and closes file.
* @throws IOException Thrown if an error occurs while writing the output.
*/ | Writes the workbook to excel and closes file | close | {
"repo_name": "bramalingam/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/file/ExcelWriter.java",
"license": "gpl-2.0",
"size": 27191
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,131,202 |
@Override
protected void edgeWasAdded(Edge edge) throws GraphException {
super.edgeWasAdded(edge);
// TODO organize this.
if (edge instanceof DataEdge) {
DataEdge dataEdge = (DataEdge) edge;
DataPort toPort = dataEdge.getToPort();
QName toType = toPor... | void function(Edge edge) throws GraphException { super.edgeWasAdded(edge); if (edge instanceof DataEdge) { DataEdge dataEdge = (DataEdge) edge; DataPort toPort = dataEdge.getToPort(); QName toType = toPort.getType(); List<DataEdge> edges = getEdges(); if (edges.size() == 1) { setParameterType(toType); if (!isConfigured... | /**
* Called when an Edge was added to the parameter port. Change the name of
* this node.
*
* @throws GraphException
*
* @see edu.indiana.extreme.xbaya.graph.impl.NodeImpl#edgeWasAdded(edu.indiana.extreme.xbaya.graph.impl.EdgeImpl)
*/ | Called when an Edge was added to the parameter port. Change the name of this node | edgeWasAdded | {
"repo_name": "glahiru/airavata",
"path": "modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/graph/system/DifferedInputNode.java",
"license": "apache-2.0",
"size": 9900
} | [
"java.util.List",
"javax.xml.namespace.QName",
"org.apache.airavata.common.utils.WSConstants",
"org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException",
"org.apache.airavata.workflow.model.graph.DataEdge",
"org.apache.airavata.workflow.model.graph.DataPort",
"org.apache.airavata.workflow... | import java.util.List; import javax.xml.namespace.QName; import org.apache.airavata.common.utils.WSConstants; import org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException; import org.apache.airavata.workflow.model.graph.DataEdge; import org.apache.airavata.workflow.model.graph.DataPort; import org.apac... | import java.util.*; import javax.xml.namespace.*; import org.apache.airavata.common.utils.*; import org.apache.airavata.workflow.model.exceptions.*; import org.apache.airavata.workflow.model.graph.*; import org.apache.airavata.workflow.model.graph.ws.*; | [
"java.util",
"javax.xml",
"org.apache.airavata"
] | java.util; javax.xml; org.apache.airavata; | 1,830,218 |
@Override
protected boolean onRequestFocusInDescendants(int direction,
Rect previouslyFocusedRect) {
int index;
int increment;
int end;
int count = getChildCount();
if ((direction & FOCUS_FORWARD) != 0) {
index = 0;
increment = 1;
... | boolean function(int direction, Rect previouslyFocusedRect) { int index; int increment; int end; int count = getChildCount(); if ((direction & FOCUS_FORWARD) != 0) { index = 0; increment = 1; end = count; } else { index = count - 1; increment = -1; end = -1; } for (int i = index; i != end; i += increment) { View child ... | /**
* We only want the current page that is being shown to be focusable.
*/ | We only want the current page that is being shown to be focusable | onRequestFocusInDescendants | {
"repo_name": "immopoly/android",
"path": "src/org/immopoly/android/widget/ViewPager.java",
"license": "apache-2.0",
"size": 82147
} | [
"android.graphics.Rect",
"android.view.View"
] | import android.graphics.Rect; import android.view.View; | import android.graphics.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 847,723 |
private void genFile(Path file, long fileSize) throws IOException {
long startTime = System.currentTimeMillis();
FSDataOutputStream out = fc.create(file,
EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE),
CreateOpts.createParent(), CreateOpts.bufferSize(4096),
CreateOpts.repFac((shor... | void function(Path file, long fileSize) throws IOException { long startTime = System.currentTimeMillis(); FSDataOutputStream out = fc.create(file, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE), CreateOpts.createParent(), CreateOpts.bufferSize(4096), CreateOpts.repFac((short) 3)); executionTime[CREATE] += (System.... | /** Create a file with a length of <code>fileSize</code>.
* The file is filled with 'a'.
*/ | Create a file with a length of <code>fileSize</code>. The file is filled with 'a' | genFile | {
"repo_name": "linpawslitap/mds_scaling",
"path": "hadoop/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/loadGenerator/LoadGenerator.java",
"license": "bsd-3-clause",
"size": 23079
} | [
"java.io.IOException",
"java.util.EnumSet",
"org.apache.hadoop.fs.CreateFlag",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.Options",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import java.util.EnumSet; import org.apache.hadoop.fs.CreateFlag; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Options; import org.apache.hadoop.fs.Path; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 805,904 |
public void setPageContext(PageContext page)
{
this.pageContext = page;
} | void function(PageContext page) { this.pageContext = page; } | /**
* Stores the page context for the JSP page.
*/ | Stores the page context for the JSP page | setPageContext | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/servlet16/src/javax/servlet/jsp/tagext/TagSupport.java",
"license": "gpl-2.0",
"size": 4789
} | [
"javax.servlet.jsp.PageContext"
] | import javax.servlet.jsp.PageContext; | import javax.servlet.jsp.*; | [
"javax.servlet"
] | javax.servlet; | 1,173,547 |
SparseArray<TsPayloadReader> createInitialPayloadReaders(); | SparseArray<TsPayloadReader> createInitialPayloadReaders(); | /**
* Returns the initial mapping from PIDs to payload readers.
*
* <p>This method allows the injection of payload readers for reserved PIDs, excluding PID 0.
*
* @return A {@link SparseArray} that maps PIDs to payload readers.
*/ | Returns the initial mapping from PIDs to payload readers. This method allows the injection of payload readers for reserved PIDs, excluding PID 0 | createInitialPayloadReaders | {
"repo_name": "google/ExoPlayer",
"path": "library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsPayloadReader.java",
"license": "apache-2.0",
"size": 8318
} | [
"android.util.SparseArray"
] | import android.util.SparseArray; | import android.util.*; | [
"android.util"
] | android.util; | 1,545,614 |
private boolean lookUpFieldFromDcat(IFeedRecord r, DcatField dcatField, boolean before) {
String delimiter = ",";
String dl = dcatField.getDelimiter();
if(dl.length() > 0){
delimiter = dl;
}
String indexKey = dcatField.getIndex();
Map<String, IFeedAttribute> index = r.getData(IFeedRecord.STD_CO... | boolean function(IFeedRecord r, DcatField dcatField, boolean before) { String delimiter = ","; String dl = dcatField.getDelimiter(); if(dl.length() > 0){ delimiter = dl; } String indexKey = dcatField.getIndex(); Map<String, IFeedAttribute> index = r.getData(IFeedRecord.STD_COLLECTION_INDEX); if (indexKey.length() > 0) ... | /**
* Looks up dcat mapping field for a give a record and writes response.
*
* @param r the record
* @param dcatField the dcat field
* @param before the indentation boolean cursor
* @return the indentation boolean cursor
*/ | Looks up dcat mapping field for a give a record and writes response | lookUpFieldFromDcat | {
"repo_name": "treejames/GeoprocessingAppstore",
"path": "src/com/esri/gpt/control/georss/DcatJsonFeedWriter.java",
"license": "apache-2.0",
"size": 24855
} | [
"com.esri.gpt.catalog.search.ResourceLinks",
"java.util.Map"
] | import com.esri.gpt.catalog.search.ResourceLinks; import java.util.Map; | import com.esri.gpt.catalog.search.*; import java.util.*; | [
"com.esri.gpt",
"java.util"
] | com.esri.gpt; java.util; | 2,159,156 |
public static TableId of(String dataset, String table) {
return new TableId(null, checkNotNull(dataset), checkNotNull(table));
} | static TableId function(String dataset, String table) { return new TableId(null, checkNotNull(dataset), checkNotNull(table)); } | /**
* Creates a table identity given dataset's and table's user-defined ids.
*/ | Creates a table identity given dataset's and table's user-defined ids | of | {
"repo_name": "jabubake/google-cloud-java",
"path": "google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableId.java",
"license": "apache-2.0",
"size": 3736
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 688,280 |
public String getIndividualName(OWLIndividual i)
{
if (i.isAnonymous())
{
print("Anonymous individual not supported");
return null;
}
else
{
String name = getShortName(i.asOWLNamedIndividual());
print("Print individual " + name);
return name;
}
} | String function(OWLIndividual i) { if (i.isAnonymous()) { print(STR); return null; } else { String name = getShortName(i.asOWLNamedIndividual()); print(STR + name); return name; } } | /**
* Gets a String representation of an OWL 2 individual.
*
* @param i An OWL 2 individual.
* @return A String representation of i.
*/ | Gets a String representation of an OWL 2 individual | getIndividualName | {
"repo_name": "eschwert/DL-Learner",
"path": "components-core/src/main/java/org/dllearner/utilities/FuzzyOwl2.java",
"license": "gpl-3.0",
"size": 63381
} | [
"org.semanticweb.owlapi.model.OWLIndividual"
] | import org.semanticweb.owlapi.model.OWLIndividual; | import org.semanticweb.owlapi.model.*; | [
"org.semanticweb.owlapi"
] | org.semanticweb.owlapi; | 545,923 |
public static String searchRemoveFromCategory(HttpServletRequest request, HttpServletResponse response) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
String productCategoryId = request.getParameter("SE_SEARCH_CATEGORY_ID");
String errMsg=null;
try {
... | static String function(HttpServletRequest request, HttpServletResponse response) { Delegator delegator = (Delegator) request.getAttribute(STR); String productCategoryId = request.getParameter(STR); String errMsg=null; try { boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT); try (EntityListIterator el... | /** Removes the results of a search from the specified category
*@param request The HTTPRequest object for the current request
*@param response The HTTPResponse object for the current request
*@return String specifying the exit status of this event
*/ | Removes the results of a search from the specified category | searchRemoveFromCategory | {
"repo_name": "ilscipio/scipio-erp",
"path": "applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java",
"license": "apache-2.0",
"size": 24336
} | [
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.ofbiz.base.util.Debug",
"org.ofbiz.base.util.UtilHttp",
"org.ofbiz.base.util.UtilMisc",
"org.ofbiz.base.util.UtilProperties",
"org.ofbiz.entity.Delegator",
"org.ofbiz.entity.GenericEntityExceptio... | import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilProperties; import org.ofbiz.entity.Delegator; import org.ofbiz.en... | import java.util.*; import javax.servlet.http.*; import org.ofbiz.base.util.*; import org.ofbiz.entity.*; import org.ofbiz.entity.transaction.*; import org.ofbiz.entity.util.*; | [
"java.util",
"javax.servlet",
"org.ofbiz.base",
"org.ofbiz.entity"
] | java.util; javax.servlet; org.ofbiz.base; org.ofbiz.entity; | 2,376,983 |
public boolean isConflict(Reservation reservation);
| boolean function(Reservation reservation); | /**
* Tests if this reservation conflicts with an existing one
* @param reservation the new reservation
* @return true if there is a conflict false if not
*/ | Tests if this reservation conflicts with an existing one | isConflict | {
"repo_name": "NoraFarahin/konfman",
"path": "src/main/java/com/jmw/konfman/service/ReservationManager.java",
"license": "apache-2.0",
"size": 3592
} | [
"com.jmw.konfman.model.Reservation"
] | import com.jmw.konfman.model.Reservation; | import com.jmw.konfman.model.*; | [
"com.jmw.konfman"
] | com.jmw.konfman; | 1,785,633 |
public BlobItemPropertiesInternal setImmutabilityPolicyExpiresOn(OffsetDateTime immutabilityPolicyExpiresOn) {
if (immutabilityPolicyExpiresOn == null) {
this.immutabilityPolicyExpiresOn = null;
} else {
this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolic... | BlobItemPropertiesInternal function(OffsetDateTime immutabilityPolicyExpiresOn) { if (immutabilityPolicyExpiresOn == null) { this.immutabilityPolicyExpiresOn = null; } else { this.immutabilityPolicyExpiresOn = new DateTimeRfc1123(immutabilityPolicyExpiresOn); } return this; } | /**
* Set the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property.
*
* @param immutabilityPolicyExpiresOn the immutabilityPolicyExpiresOn value to set.
* @return the BlobItemPropertiesInternal object itself.
*/ | Set the immutabilityPolicyExpiresOn property: The ImmutabilityPolicyUntilDate property | setImmutabilityPolicyExpiresOn | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java",
"license": "mit",
"size": 32524
} | [
"com.azure.core.util.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.azure.core.util.*; import java.time.*; | [
"com.azure.core",
"java.time"
] | com.azure.core; java.time; | 1,282,307 |
private void notifyRemovals() {
Set<File> removed = removals;
for (DirectoryChangeListener listener : listeners.getListeners()) {
for (Iterator<File> j = removed.iterator(); j.hasNext();) {
File file = j.next();
if (isInterested(listener, file)) {
... | void function() { Set<File> removed = removals; for (DirectoryChangeListener listener : listeners.getListeners()) { for (Iterator<File> j = removed.iterator(); j.hasNext();) { File file = j.next(); if (isInterested(listener, file)) { listener.removed(file); } } } } | /**
* Notify the listeners of the files that have been deleted or marked for deletion.
*/ | Notify the listeners of the files that have been deleted or marked for deletion | notifyRemovals | {
"repo_name": "aptana/Pydev",
"path": "bundles/org.python.pydev.core/src/org/python/pydev/core/path_watch/DirectoryWatcher.java",
"license": "epl-1.0",
"size": 6346
} | [
"java.io.File",
"java.util.Iterator",
"java.util.Set"
] | import java.io.File; import java.util.Iterator; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 46,030 |
public ComboBox getComboBox(String optionsInName,
final String selectedOutName) {
final ComboBox combo = new ComboBox();
combo.setNullSelectionAllowed(false);
buildSelectOptions(combo, optionsInName);
buildSelectListener(combo, selectedOutName);
return combo;
} | ComboBox function(String optionsInName, final String selectedOutName) { final ComboBox combo = new ComboBox(); combo.setNullSelectionAllowed(false); buildSelectOptions(combo, optionsInName); buildSelectListener(combo, selectedOutName); return combo; } | /**
* <p>
* Returns a Vaadin ComboBox object with an implicit ValueChangeListener
* that writes the selected options directly to the R workspace. See
* {@link RContainer#getListSelect} for examples, and how to (re)set the
* values and set the listener explicitly.
* </p>
*
* @param optionsInName
* ... | Returns a Vaadin ComboBox object with an implicit ValueChangeListener that writes the selected options directly to the R workspace. See <code>RContainer#getListSelect</code> for examples, and how to (re)set the values and set the listener explicitly. | getComboBox | {
"repo_name": "avirkki/RVaadin",
"path": "src/fi/vtt/RVaadin/RContainer.java",
"license": "apache-2.0",
"size": 60137
} | [
"com.vaadin.ui.ComboBox"
] | import com.vaadin.ui.ComboBox; | import com.vaadin.ui.*; | [
"com.vaadin.ui"
] | com.vaadin.ui; | 2,226,960 |
static public CalculationMethod newInstance(
final String name,
final String codeRoutineName,
final String description,
final CalculationMethodPrior prior,
final ArrayList<Parameter> parameters) {
return new CalculationMethod(
name,
codeRoutineName,
description,
prior,
parameters);
} | static CalculationMethod function( final String name, final String codeRoutineName, final String description, final CalculationMethodPrior prior, final ArrayList<Parameter> parameters) { return new CalculationMethod( name, codeRoutineName, description, prior, parameters); } | /**
* New instance.
*
* @return the calculation method
*/ | New instance | newInstance | {
"repo_name": "smallAreaHealthStatisticsUnit/rapidInquiryFacility",
"path": "rifServices/src/main/java/org/sahsu/rif/services/concepts/CalculationMethod.java",
"license": "lgpl-3.0",
"size": 14068
} | [
"java.util.ArrayList",
"org.sahsu.rif.generic.concepts.Parameter"
] | import java.util.ArrayList; import org.sahsu.rif.generic.concepts.Parameter; | import java.util.*; import org.sahsu.rif.generic.concepts.*; | [
"java.util",
"org.sahsu.rif"
] | java.util; org.sahsu.rif; | 218,307 |
@Override
public void run() {
synchronized (this) {
m_status = RUNNING;
}
for (;;) {
synchronized (this) {
// if stopped or stop pending then break out
//
if (m_status == STOP_PENDING || m_status == STOPPED) {
... | void function() { synchronized (this) { m_status = RUNNING; } for (;;) { synchronized (this) { break; } m_status = PAUSED; try { wait(); } catch (InterruptedException ex) { break; } } m_status = RUNNING; } } LOG.debug(STR, m_maxProcCount); synchronized (m_reaperRun) { m_reaperRun.notifyAll(); try { m_reaperRun.wait(); ... | /**
* The main worker of the fiber. This method is executed by the encapsualted
* thread to read commands from the execution queue and to execute those
* commands. If the thread is interrupted or the status changes to
* <code>STOP_PENDING</code> then the method will return as quickly as
* possi... | The main worker of the fiber. This method is executed by the encapsualted thread to read commands from the execution queue and to execute those commands. If the thread is interrupted or the status changes to <code>STOP_PENDING</code> then the method will return as quickly as possible | run | {
"repo_name": "aihua/opennms",
"path": "opennms-services/src/main/java/org/opennms/netmgt/actiond/Executor.java",
"license": "agpl-3.0",
"size": 19064
} | [
"java.io.IOException",
"java.util.concurrent.TimeUnit"
] | import java.io.IOException; import java.util.concurrent.TimeUnit; | import java.io.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,550,638 |
public void spin() {
lastTimeAnimated = SystemClock.uptimeMillis();
isSpinning = true;
invalidate();
} | void function() { lastTimeAnimated = SystemClock.uptimeMillis(); isSpinning = true; invalidate(); } | /**
* Puts the view on spin mode
*/ | Puts the view on spin mode | spin | {
"repo_name": "cowthan/Ayo2022",
"path": "ayokit/src/main/java/org/ayo/view/progress/ProgressWheel.java",
"license": "mit",
"size": 22750
} | [
"android.os.SystemClock"
] | import android.os.SystemClock; | import android.os.*; | [
"android.os"
] | android.os; | 591,846 |
protected void sequence_DefinitionFacet(ISerializationContext context, Facet semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, Facet semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* DefinitionFacet returns Facet
* GamlDefinition returns Facet
* VarDefinition returns Facet
*
* Constraint:
* (key=DefinitionFacetKey (name=Valid_ID | name=STRING))
*/ | Contexts: DefinitionFacet returns Facet GamlDefinition returns Facet VarDefinition returns Facet Constraint: (key=DefinitionFacetKey (name=Valid_ID | name=STRING)) | sequence_DefinitionFacet | {
"repo_name": "gama-platform/gama",
"path": "msi.gama.lang.gaml/src-gen/msi/gama/lang/gaml/serializer/AbstractGamlSemanticSequencer.java",
"license": "gpl-3.0",
"size": 77218
} | [
"org.eclipse.xtext.serializer.ISerializationContext"
] | import org.eclipse.xtext.serializer.ISerializationContext; | import org.eclipse.xtext.serializer.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 126,354 |
public boolean runAfter(List tasks, int size) {
return false;
}//end runAfter
}//end class DiscoveredEventTask | boolean function(List tasks, int size) { return false; } } | /** This method returns true if the current instance of this class
* must be run after at least one task in the input task list with
* an index less than the <code>size</code> parameter (size may be
* less than tasks.size()).
* <p>
* Note that using List.get will be mor... | This method returns true if the current instance of this class must be run after at least one task in the input task list with an index less than the <code>size</code> parameter (size may be less than tasks.size()). Note that using List.get will be more efficient than List.iterator | runAfter | {
"repo_name": "cdegroot/river",
"path": "src/com/sun/jini/fiddler/FiddlerImpl.java",
"license": "apache-2.0",
"size": 419779
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 872,642 |
public void setLabelFont(Font fnt) {
if(labelFont_ == null || !labelFont_.equals(fnt)) {
labelFont_ = fnt;
modified("Axis: setLabelFont()");
}
} | void function(Font fnt) { if(labelFont_ == null !labelFont_.equals(fnt)) { labelFont_ = fnt; modified(STR); } } | /**
* Set the label font.
*
* @param fnt label font
*/ | Set the label font | setLabelFont | {
"repo_name": "kernsuite-debian/lofar",
"path": "JAVA/GUI/Plotter/src/gov/noaa/pmel/sgt/Axis.java",
"license": "gpl-3.0",
"size": 18325
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 844,119 |
public void testAliasesAreIDs() {
final Collection<String> ids = new HashSet(TimeZoneTest.ALIAS_TABLE.values());
for (final Iterator iterator = ids.iterator(); iterator.hasNext();) {
final String id = (String) iterator.next();
final TimeZone zone = java.util.TimeZone.ge... | void function() { final Collection<String> ids = new HashSet(TimeZoneTest.ALIAS_TABLE.values()); for (final Iterator iterator = ids.iterator(); iterator.hasNext();) { final String id = (String) iterator.next(); final TimeZone zone = java.util.TimeZone.getTimeZone(id); Assert.assertEquals(id, zone.getID()); } } | /**
* TimeZoneTest.testAliasTable The values in the alias table are all valid ids
*/ | TimeZoneTest.testAliasTable The values in the alias table are all valid ids | testAliasesAreIDs | {
"repo_name": "homiak/pims-lims",
"path": "TestSource/org/pimslims/presentation/TimeZoneTest.java",
"license": "bsd-2-clause",
"size": 9525
} | [
"java.util.Collection",
"java.util.HashSet",
"java.util.Iterator",
"java.util.TimeZone",
"junit.framework.Assert"
] | import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.TimeZone; import junit.framework.Assert; | import java.util.*; import junit.framework.*; | [
"java.util",
"junit.framework"
] | java.util; junit.framework; | 431,363 |
public final ManagedChannel getChannel() {
return channel;
} | final ManagedChannel function() { return channel; } | /**
* Returns a {@link ManagedChannel} connected to this service.
*/ | Returns a <code>ManagedChannel</code> connected to this service | getChannel | {
"repo_name": "nmittler/grpc-java",
"path": "testing/src/main/java/io/grpc/testing/GrpcServerRule.java",
"license": "bsd-3-clause",
"size": 5035
} | [
"io.grpc.ManagedChannel"
] | import io.grpc.ManagedChannel; | import io.grpc.*; | [
"io.grpc"
] | io.grpc; | 1,714,220 |
public void setDescription(String label, Integer languageId, String content) {
JbillingTableDAS tableDas = Context.getBean(Context.Name.JBILLING_TABLE_DAS);
JbillingTable table = tableDas.findByName(getTable());
InternationalDescriptionId id = new InternationalDescriptionId(table.getId(), g... | void function(String label, Integer languageId, String content) { JbillingTableDAS tableDas = Context.getBean(Context.Name.JBILLING_TABLE_DAS); JbillingTable table = tableDas.findByName(getTable()); InternationalDescriptionId id = new InternationalDescriptionId(table.getId(), getId(), label, languageId); InternationalD... | /**
* Updates ands aves the description for the given label (psudo column), and language id.
*
* @param label psudo column label
* @param languageId language id
* @param content text description
*/ | Updates ands aves the description for the given label (psudo column), and language id | setDescription | {
"repo_name": "maxdelo77/replyit-master-3.2-final",
"path": "src/java/com/sapienter/jbilling/server/util/db/AbstractDescription.java",
"license": "agpl-3.0",
"size": 6048
} | [
"com.sapienter.jbilling.server.util.Context"
] | import com.sapienter.jbilling.server.util.Context; | import com.sapienter.jbilling.server.util.*; | [
"com.sapienter.jbilling"
] | com.sapienter.jbilling; | 1,820,251 |
List<ProcessDefinition> getDeployedProcessDefinitions(); | List<ProcessDefinition> getDeployedProcessDefinitions(); | /**
* Returns the process definitions, which are deployed with that deployment.
*
* @return the process definitions which are deployed
*/ | Returns the process definitions, which are deployed with that deployment | getDeployedProcessDefinitions | {
"repo_name": "AlexMinsk/camunda-bpm-platform",
"path": "engine/src/main/java/org/camunda/bpm/engine/repository/DeploymentWithDefinitions.java",
"license": "apache-2.0",
"size": 1786
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,855,746 |
public void dumpOutAsLatin1(OutputStream out) {
getFileOutputStream().dumpOut(out);
} | void function(OutputStream out) { getFileOutputStream().dumpOut(out); } | /**
* Writes the captured out content to the given output stream,
* avoiding keeping the entire contents in memory.
*/ | Writes the captured out content to the given output stream, avoiding keeping the entire contents in memory | dumpOutAsLatin1 | {
"repo_name": "mikelikespie/bazel",
"path": "src/main/java/com/google/devtools/build/lib/util/io/FileOutErr.java",
"license": "apache-2.0",
"size": 11217
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,149,231 |
public Map<String,String> read(InputStream input) throws IOException, SAXException,
ConfigReadException {
Digester digester = new Digester();
digester.addRuleSet(new RuleSet());
Object result = digester.parse(input);
if (result == null && !(result instanceof Profiles)) {
throw new ConfigReadExc... | Map<String,String> function(InputStream input) throws IOException, SAXException, ConfigReadException { Digester digester = new Digester(); digester.addRuleSet(new RuleSet()); Object result = digester.parse(input); if (result == null && !(result instanceof Profiles)) { throw new ConfigReadException(STR); } Profiles prof... | /**
* Read from the <code>input</code> and return it's configuration settings
* as a {@link Map}.
*
* @param input
* @return return {@link Map} with all the configurations read from the
* config file, or throws an exception if there's a problem reading
* the input, e.g.: invalid XM... | Read from the <code>input</code> and return it's configuration settings as a <code>Map</code> | read | {
"repo_name": "cipriancraciun/maven-java-formatter-plugin",
"path": "src/main/java/com/relativitas/maven/plugins/formatter/ConfigReader.java",
"license": "apache-2.0",
"size": 2210
} | [
"com.relativitas.maven.plugins.formatter.xml.Profiles",
"java.io.IOException",
"java.io.InputStream",
"java.util.List",
"java.util.Map",
"org.apache.commons.digester.Digester",
"org.xml.sax.SAXException"
] | import com.relativitas.maven.plugins.formatter.xml.Profiles; import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Map; import org.apache.commons.digester.Digester; import org.xml.sax.SAXException; | import com.relativitas.maven.plugins.formatter.xml.*; import java.io.*; import java.util.*; import org.apache.commons.digester.*; import org.xml.sax.*; | [
"com.relativitas.maven",
"java.io",
"java.util",
"org.apache.commons",
"org.xml.sax"
] | com.relativitas.maven; java.io; java.util; org.apache.commons; org.xml.sax; | 424,566 |
public void delete() {
final Map<String, BlobMetaData> blobs;
try {
blobs = blobContainer.listBlobs();
} catch (IOException e) {
throw new IndexShardSnapshotException(shardId, "Failed to list content of gateway", e);
}
... | void function() { final Map<String, BlobMetaData> blobs; try { blobs = blobContainer.listBlobs(); } catch (IOException e) { throw new IndexShardSnapshotException(shardId, STR, e); } Tuple<BlobStoreIndexShardSnapshots, Integer> tuple = buildBlobStoreIndexShardSnapshots(blobs); BlobStoreIndexShardSnapshots snapshots = tu... | /**
* Delete shard snapshot
*/ | Delete shard snapshot | delete | {
"repo_name": "rajanm/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java",
"license": "apache-2.0",
"size": 79218
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.elasticsearch.common.blobstore.BlobMetaData",
"org.elasticsearch.common.collect.Tuple",
"org.elasticsearch.index.snapshots.IndexShardSnapshotException",
"org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShar... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.elasticsearch.common.blobstore.BlobMetaData; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.index.snapshots.IndexShardSnapshotException; import org.elasticsearch.index.snapshots.blobs... | import java.io.*; import java.util.*; import org.elasticsearch.common.blobstore.*; import org.elasticsearch.common.collect.*; import org.elasticsearch.index.snapshots.*; import org.elasticsearch.index.snapshots.blobstore.*; | [
"java.io",
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; java.util; org.elasticsearch.common; org.elasticsearch.index; | 906,200 |
private static String selectFirstParentHostWithNActiveNodesExcept(NodeRepository nodeRepository, int n, String... except) {
Set<String> exceptSet = Arrays.stream(except).collect(Collectors.toSet());
return nodeRepository.nodes().list(Node.State.active).nodeType(NodeType.tenant).stream()
... | static String function(NodeRepository nodeRepository, int n, String... except) { Set<String> exceptSet = Arrays.stream(except).collect(Collectors.toSet()); return nodeRepository.nodes().list(Node.State.active).nodeType(NodeType.tenant).stream() .collect(Collectors.groupingBy(Node::parentHostname)) .entrySet().stream() ... | /**
* Selects the first parent host that:
* - has exactly n nodes in state 'active'
* - is not present in the 'except' array
*/ | Selects the first parent host that: - has exactly n nodes in state 'active' - is not present in the 'except' array | selectFirstParentHostWithNActiveNodesExcept | {
"repo_name": "vespa-engine/vespa",
"path": "node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailerTest.java",
"license": "apache-2.0",
"size": 41491
} | [
"com.yahoo.config.provision.NodeType",
"com.yahoo.vespa.hosted.provision.Node",
"com.yahoo.vespa.hosted.provision.NodeRepository",
"java.util.Arrays",
"java.util.Map",
"java.util.Set",
"java.util.stream.Collectors",
"java.util.stream.Stream"
] | import com.yahoo.config.provision.NodeType; import com.yahoo.vespa.hosted.provision.Node; import com.yahoo.vespa.hosted.provision.NodeRepository; import java.util.Arrays; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; | import com.yahoo.config.provision.*; import com.yahoo.vespa.hosted.provision.*; import java.util.*; import java.util.stream.*; | [
"com.yahoo.config",
"com.yahoo.vespa",
"java.util"
] | com.yahoo.config; com.yahoo.vespa; java.util; | 1,277,981 |
public static String toShortString(Collection<? extends ClusterNode> ns) {
SB sb = new SB("Grid nodes [cnt=" + ns.size());
for (ClusterNode n : ns)
sb.a(", ").a(toShortString(n));
return sb.a(']').toString();
} | static String function(Collection<? extends ClusterNode> ns) { SB sb = new SB(STR + ns.size()); for (ClusterNode n : ns) sb.a(STR).a(toShortString(n)); return sb.a(']').toString(); } | /**
* Short node representation.
*
* @param ns Grid nodes.
* @return Short string representing the node.
*/ | Short node representation | toShortString | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 374177
} | [
"java.util.Collection",
"org.apache.ignite.cluster.ClusterNode"
] | import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; | import java.util.*; import org.apache.ignite.cluster.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 211,401 |
public void setMidiSendingSignatures(List<String> signatures) {
midiSendingSignatures = signatures;
} | void function(List<String> signatures) { midiSendingSignatures = signatures; } | /**
* Sets the midi signatures the items are sending on opening
*
* @param signatures
* The signatures for the files
*/ | Sets the midi signatures the items are sending on opening | setMidiSendingSignatures | {
"repo_name": "aguelle/MIDI-Automator",
"path": "Midi Automator/src/main/java/com/midi_automator/view/windows/MainFrame/MainFrame.java",
"license": "mit",
"size": 24941
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,656,028 |
public void addTask(long taskId, WorkerInfo workerInfo, Object args) {
TaskInfo oldValue = mTaskIdToInfo.putIfAbsent(taskId,
new TaskInfo(mId, taskId, Status.CREATED, workerInfo.getAddress(), args));
// the task is expected to not exist in the map.
Preconditions.checkState(oldValue == null,
... | void function(long taskId, WorkerInfo workerInfo, Object args) { TaskInfo oldValue = mTaskIdToInfo.putIfAbsent(taskId, new TaskInfo(mId, taskId, Status.CREATED, workerInfo.getAddress(), args)); Preconditions.checkState(oldValue == null, String.format(STR, mId, taskId)); } | /**
* Registers a task.
*
* @param taskId the task id
* @param workerInfo the worker info
* @param args the arguments
*/ | Registers a task | addTask | {
"repo_name": "Alluxio/alluxio",
"path": "job/common/src/main/java/alluxio/job/plan/meta/PlanInfo.java",
"license": "apache-2.0",
"size": 8787
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 380,073 |
public void nonServerJoinColony(Unit builder, Colony colony) {
builder.setLocation(colony);
builder.setMovesLeft(0);
} | void function(Unit builder, Colony colony) { builder.setLocation(colony); builder.setMovesLeft(0); } | /**
* Join a colony with a unit, without requiring the server.
*/ | Join a colony with a unit, without requiring the server | nonServerJoinColony | {
"repo_name": "edijman/SOEN_6431_Colonization_Game",
"path": "test/src/net/sf/freecol/util/test/FreeColTestCase.java",
"license": "gpl-2.0",
"size": 24424
} | [
"net.sf.freecol.common.model.Colony",
"net.sf.freecol.common.model.Unit"
] | import net.sf.freecol.common.model.Colony; import net.sf.freecol.common.model.Unit; | import net.sf.freecol.common.model.*; | [
"net.sf.freecol"
] | net.sf.freecol; | 809,668 |
public boolean setShared(List<String[]> shared){
//iterate through list, adding
ArrayList<String> lsSharedOptions = new ArrayList<String>();
for(String[] line : shared){ //for each line in the shared file
lsSharedOptions.add(line[0]); //option
String[] toAdd = {line[... | boolean function(List<String[]> shared){ ArrayList<String> lsSharedOptions = new ArrayList<String>(); for(String[] line : shared){ lsSharedOptions.add(line[0]); String[] toAdd = {line[0], line[1]}; this.collection.lsShared.add(toAdd); LOGGER.info(String.format(STR, line[0],line[1])); } if(!isValidOptions(lsSharedOption... | /**
* populate the list of shared values from a given array
*/ | populate the list of shared values from a given array | setShared | {
"repo_name": "lib-re/dublin-core-text-parser",
"path": "main/java/main/Parser.java",
"license": "mit",
"size": 10375
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,424,518 |
public void mouseClicked(MouseEvent e)
{
// Double click with selected row => exit
if (e.getClickCount() > 1 && m_table.getSelectedRow() != -1)
{
enableButtons();
close();
}
} // mouseClicked
public void mouseEntered (MouseEvent e) {}
| void function(MouseEvent e) { if (e.getClickCount() > 1 && m_table.getSelectedRow() != -1) { enableButtons(); close(); } } public void mouseEntered (MouseEvent e) {} | /**
* Mouse Clicked
* @param e event
*/ | Mouse Clicked | mouseClicked | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/client/src/org/compiere/pos/QueryBPartner.java",
"license": "gpl-2.0",
"size": 11642
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,474,796 |
ComponentMetadata<?> getComponentMetadata(String typeIdentifier) throws AddonException; | ComponentMetadata<?> getComponentMetadata(String typeIdentifier) throws AddonException; | /**
* Returns the metadata (like human readable name) for a given configuration type.
* @param typeIdentifier The type identifier of the configuration for which the metadata should be returned.
* @return The metadata of the given configuration.
* @throws AddonException Thrown if identifier is not supported by t... | Returns the metadata (like human readable name) for a given configuration type | getComponentMetadata | {
"repo_name": "langmo/youscope",
"path": "core/api/src/main/java/org/youscope/addon/component/ComponentAddonFactory.java",
"license": "gpl-2.0",
"size": 3922
} | [
"org.youscope.addon.AddonException"
] | import org.youscope.addon.AddonException; | import org.youscope.addon.*; | [
"org.youscope.addon"
] | org.youscope.addon; | 2,856,399 |
public ResourceAdapterMetaData getMetaData()
throws ResourceException; | ResourceAdapterMetaData function() throws ResourceException; | /**
* Returns the metadata for the resource adapter.
*/ | Returns the metadata for the resource adapter | getMetaData | {
"repo_name": "christianchristensen/resin",
"path": "modules/jca/src/javax/resource/cci/ConnectionFactory.java",
"license": "gpl-2.0",
"size": 2031
} | [
"javax.resource.ResourceException"
] | import javax.resource.ResourceException; | import javax.resource.*; | [
"javax.resource"
] | javax.resource; | 2,425,518 |
void submitOperations(int revision, List<M> operations, Callback callback); | void submitOperations(int revision, List<M> operations, Callback callback); | /**
* Submit operations at the given revision.
*
* <p>Will be called back with the revision at which the ops were applied.
*/ | Submit operations at the given revision. Will be called back with the revision at which the ops were applied | submitOperations | {
"repo_name": "WeTheInternet/collide",
"path": "client/src/main/java/com/google/collide/client/collaboration/cc/GenericOperationChannel.java",
"license": "apache-2.0",
"size": 19163
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 739,043 |
private int getCursorLuminosity(final IBlockState state, final EnumSkyBlock lightType) {
if (lightType == EnumSkyBlock.SKY) {
if (canSeeSky(this.curCube, this.curPos)) {
return EnumSkyBlock.SKY.defaultLightValue;
} else {
return 0;
}
... | int function(final IBlockState state, final EnumSkyBlock lightType) { if (lightType == EnumSkyBlock.SKY) { if (canSeeSky(this.curCube, this.curPos)) { return EnumSkyBlock.SKY.defaultLightValue; } else { return 0; } } return MathHelper.clamp(state.getLightValue(this.world, this.curPos), 0, MAX_LIGHT); } | /**
* Calculates the luminosity for <code>curPos</code>, taking into account <code>lightType</code>
*/ | Calculates the luminosity for <code>curPos</code>, taking into account <code>lightType</code> | getCursorLuminosity | {
"repo_name": "OpenCubicChunks/CubicChunks",
"path": "src/main/java/io/github/opencubicchunks/cubicchunks/core/lighting/phosphor/PhosphorLightEngine.java",
"license": "mit",
"size": 25918
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.math.MathHelper",
"net.minecraft.world.EnumSkyBlock"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.MathHelper; import net.minecraft.world.EnumSkyBlock; | import net.minecraft.block.state.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.util; net.minecraft.world; | 1,578,222 |
private boolean checkTouchSlop(View child, float dx, float dy) {
if (child == null) {
return false;
}
final boolean checkHorizontal = mCallback.getViewHorizontalDragRange(child) > 0;
final boolean checkVertical = mCallback.getViewVerticalDragRange(child) > 0;
if ... | boolean function(View child, float dx, float dy) { if (child == null) { return false; } final boolean checkHorizontal = mCallback.getViewHorizontalDragRange(child) > 0; final boolean checkVertical = mCallback.getViewVerticalDragRange(child) > 0; if (checkHorizontal && checkVertical) { return dx * dx + dy * dy > mTouchS... | /**
* Check if we've crossed a reasonable touch slop for the given child view.
* If the child cannot be dragged along the horizontal or vertical axis,
* motion along that axis will not count toward the slop check.
*
* @param child Child to check
* @param dx Motion since initial position... | Check if we've crossed a reasonable touch slop for the given child view. If the child cannot be dragged along the horizontal or vertical axis, motion along that axis will not count toward the slop check | checkTouchSlop | {
"repo_name": "YiuChoi/MicroReader",
"path": "swipebackactivity/src/main/java/com/example/swipebackactivity/ViewDragHelper.java",
"license": "mit",
"size": 62390
} | [
"android.view.MotionEvent",
"android.view.View"
] | import android.view.MotionEvent; import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,672,506 |
public void testMethodReference09() throws CoreException { // was testStaticMethodReference2
IType type = getCompilationUnit("JSSearch", "src", "p", "X.js").getType("X");
IFunction method = type.getFunction("bar", new String[] {});
search(
method,
REFERENCES,
getJavaSearchScope(),
this.resultCollector);
... | void function() throws CoreException { IType type = getCompilationUnit(STR, "src", "p", "X.js").getType("X"); IFunction method = type.getFunction("bar", new String[] {}); search( method, REFERENCES, getJavaSearchScope(), this.resultCollector); assertSearchResults( "", this.resultCollector); } | /**
* Static method reference test.
*/ | Static method reference test | testMethodReference09 | {
"repo_name": "echoes-tech/eclipse.jsdt.core",
"path": "org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java",
"license": "epl-1.0",
"size": 120852
} | [
"org.eclipse.core.runtime.CoreException",
"org.eclipse.wst.jsdt.core.IFunction",
"org.eclipse.wst.jsdt.core.IType"
] | import org.eclipse.core.runtime.CoreException; import org.eclipse.wst.jsdt.core.IFunction; import org.eclipse.wst.jsdt.core.IType; | import org.eclipse.core.runtime.*; import org.eclipse.wst.jsdt.core.*; | [
"org.eclipse.core",
"org.eclipse.wst"
] | org.eclipse.core; org.eclipse.wst; | 326,428 |
public static String toString(InputStream input, Charset encoding) throws IOException {
StringBuilderWriter sw = new StringBuilderWriter();
copy(input, sw, encoding);
return sw.toString();
} | static String function(InputStream input, Charset encoding) throws IOException { StringBuilderWriter sw = new StringBuilderWriter(); copy(input, sw, encoding); return sw.toString(); } | /**
* Get the contents of an <code>InputStream</code> as a String
* using the specified character encoding.
* <p>
* This method buffers the input internally, so there is no need to use a
* <code>BufferedInputStream</code>.
* </p>
* @param input the <code>InputStream</code> to read fr... | Get the contents of an <code>InputStream</code> as a String using the specified character encoding. This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>. | toString | {
"repo_name": "trivium-io/trivium-core",
"path": "src/io/trivium/dep/org/apache/commons/io/IOUtils.java",
"license": "apache-2.0",
"size": 97969
} | [
"io.trivium.dep.org.apache.commons.io.output.StringBuilderWriter",
"java.io.IOException",
"java.io.InputStream",
"java.nio.charset.Charset"
] | import io.trivium.dep.org.apache.commons.io.output.StringBuilderWriter; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; | import io.trivium.dep.org.apache.commons.io.output.*; import java.io.*; import java.nio.charset.*; | [
"io.trivium.dep",
"java.io",
"java.nio"
] | io.trivium.dep; java.io; java.nio; | 2,665,187 |
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link BigInteger } | return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link BigInteger } | /**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/ | Gets the value of the value property | getValue | {
"repo_name": "JeffRisberg/BING01",
"path": "proxies/com/microsoft/bingads/v10/bulk/NonPositiveInteger.java",
"license": "mit",
"size": 1438
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 2,560,267 |
public ServiceResponse<Map<String, Widget>> getComplexItemNull() throws ErrorException, IOException {
return getComplexItemNullAsync().toBlocking().single();
} | ServiceResponse<Map<String, Widget>> function() throws ErrorException, IOException { return getComplexItemNullAsync().toBlocking().single(); } | /**
* Get dictionary of complex type with null item {"0": {"integer": 1, "string": "2"}, "1": null, "2": {"integer": 5, "string": "6"}}.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the Map<Stri... | Get dictionary of complex type with null item {"0": {"integer": 1, "string": "2"}, "1": null, "2": {"integer": 5, "string": "6"}} | getComplexItemNull | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java",
"license": "mit",
"size": 176746
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException",
"java.util.Map"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.Map; | import com.microsoft.rest.*; import java.io.*; import java.util.*; | [
"com.microsoft.rest",
"java.io",
"java.util"
] | com.microsoft.rest; java.io; java.util; | 1,873,533 |
protected void addStartOnLoadPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProxyService_sta... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.PROXY_SERVICE__START_ON_LOAD, true, false, false, ItemPropertyDescriptor.BOOL... | /**
* This adds a property descriptor for the Start On Load feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Start On Load feature. | addStartOnLoadPropertyDescriptor | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/ProxyServiceItemProvider.java",
"license": "apache-2.0",
"size": 49025
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 970,957 |
public boolean is(Flag flag) {
return Iterables.contains(get(FLAG), flag);
} | boolean function(Flag flag) { return Iterables.contains(get(FLAG), flag); } | /**
* Indicates whether {@code flag} is set on this provider.
*/ | Indicates whether flag is set on this provider | is | {
"repo_name": "vt09/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java",
"license": "apache-2.0",
"size": 14924
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 959,303 |
void setGhostSlotContents(int slot, @Nonnull ItemStack stack, int realsize);
}
@Nullable
private TileEntityBase te = null;
private int slot = -1;
private int x;
private int y;
private boolean visible = true;
private boolean grayOut = true;
private float grayOutLevel = 0.5f;
private boolean dis... | void setGhostSlotContents(int slot, @Nonnull ItemStack stack, int realsize); } private TileEntityBase te = null; private int slot = -1; private int x; private int y; private boolean visible = true; private boolean grayOut = true; private float grayOutLevel = 0.5f; private boolean displayStdOverlay = false; private int ... | /**
* Called server-side on the container when a GhostSlot is changed. Check that the given slot number really is a ghost slot before storing the given stack.
*
* @param slot
* The slot number that was given to the ghost slot
* @param stack
* The stack that should be plac... | Called server-side on the container when a GhostSlot is changed. Check that the given slot number really is a ghost slot before storing the given stack | setGhostSlotContents | {
"repo_name": "SleepyTrousers/EnderCore",
"path": "src/main/java/com/enderio/core/client/gui/widget/GhostSlot.java",
"license": "cc0-1.0",
"size": 4476
} | [
"com.enderio.core.common.TileEntityBase",
"javax.annotation.Nonnull",
"net.minecraft.item.ItemStack"
] | import com.enderio.core.common.TileEntityBase; import javax.annotation.Nonnull; import net.minecraft.item.ItemStack; | import com.enderio.core.common.*; import javax.annotation.*; import net.minecraft.item.*; | [
"com.enderio.core",
"javax.annotation",
"net.minecraft.item"
] | com.enderio.core; javax.annotation; net.minecraft.item; | 663,212 |
try {
Map<String, Object> jobMap = Maps.newHashMap();
Set<JobKey> keys = this.schedulingService.getAllJobKeys(JOB_INSTANCE);
Set<JobKey> runningKeys = this.schedulingService.getRunningJobKeys(JOB_INSTANCE);
List<WebsiteCrawlerStats> allCurrentStats = this.statis... | try { Map<String, Object> jobMap = Maps.newHashMap(); Set<JobKey> keys = this.schedulingService.getAllJobKeys(JOB_INSTANCE); Set<JobKey> runningKeys = this.schedulingService.getRunningJobKeys(JOB_INSTANCE); List<WebsiteCrawlerStats> allCurrentStats = this.statisticsService.getAllCurrentStats(); List<WebsiteCrawlerStats... | /**
* ********* HTML Resources ***************
**/ | HTML Resources | getAllJobsHtml | {
"repo_name": "Deutsche-Digitale-Bibliothek/ddb-backend",
"path": "JobSchedulerServer/src/main/java/de/fhg/iais/cortex/jobscheduler/crawler/rest/CrawlerResource.java",
"license": "apache-2.0",
"size": 17489
} | [
"com.google.common.collect.Maps",
"com.sun.jersey.api.view.Viewable",
"de.fhg.iais.cortex.jobscheduler.crawler.hibernate.WebsiteCrawlerStats",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.quartz.JobKey"
] | import com.google.common.collect.Maps; import com.sun.jersey.api.view.Viewable; import de.fhg.iais.cortex.jobscheduler.crawler.hibernate.WebsiteCrawlerStats; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; import org.quartz.JobKey; | import com.google.common.collect.*; import com.sun.jersey.api.view.*; import de.fhg.iais.cortex.jobscheduler.crawler.hibernate.*; import java.util.*; import org.quartz.*; | [
"com.google.common",
"com.sun.jersey",
"de.fhg.iais",
"java.util",
"org.quartz"
] | com.google.common; com.sun.jersey; de.fhg.iais; java.util; org.quartz; | 2,350,195 |
public Timestamp getCreated();
public static final String COLUMNNAME_CreatedBy = "CreatedBy"; | Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR; | /** Get Created.
* Date this record was created
*/ | Get Created. Date this record was created | getCreated | {
"repo_name": "armenrz/adempiere",
"path": "base/src/org/compiere/model/I_GL_DistributionLine.java",
"license": "gpl-2.0",
"size": 15709
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 939,596 |
public String[] compileAllCatalogs(
int sitesPerHost, int length,
int kFactor, String voltRoot)
{
throw new NotImplementedException("This project builder does not support compileAllCatalogs");
} | String[] function( int sitesPerHost, int length, int kFactor, String voltRoot) { throw new NotImplementedException(STR); } | /**
* Produce all catalogs this project builder knows how to produce.
* Written to allow BenchmarkController to cause compilation of multiple
* catalogs for benchmarks that need to update running appplications and
* consequently need multiple benchmark controlled catalog jars.
* @param sitesPer... | Produce all catalogs this project builder knows how to produce. Written to allow BenchmarkController to cause compilation of multiple catalogs for benchmarks that need to update running appplications and consequently need multiple benchmark controlled catalog jars | compileAllCatalogs | {
"repo_name": "eoneil1942/voltdb-4.7fix",
"path": "src/frontend/org/voltdb/compiler/VoltProjectBuilder.java",
"license": "agpl-3.0",
"size": 38412
} | [
"org.voltdb.utils.NotImplementedException"
] | import org.voltdb.utils.NotImplementedException; | import org.voltdb.utils.*; | [
"org.voltdb.utils"
] | org.voltdb.utils; | 92,478 |
public static List<KafkaTopicPartitionLeader> getPartitionsForTopic(List<String> topics, Properties properties) {
String seedBrokersConfString = properties.getProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG);
final int numRetries = getInt(properties, GET_PARTITIONS_RETRIES_KEY, DEFAULT_GET_PARTITIONS_RETRIES);
... | static List<KafkaTopicPartitionLeader> function(List<String> topics, Properties properties) { String seedBrokersConfString = properties.getProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG); final int numRetries = getInt(properties, GET_PARTITIONS_RETRIES_KEY, DEFAULT_GET_PARTITIONS_RETRIES); checkNotNull(seedBrokersCon... | /**
* Send request to Kafka to get partitions for topic.
*
* @param topics The name of the topics.
* @param properties The properties for the Kafka Consumer that is used to query the partitions for the topic.
*/ | Send request to Kafka to get partitions for topic | getPartitionsForTopic | {
"repo_name": "WangTaoTheTonic/flink",
"path": "flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer08.java",
"license": "apache-2.0",
"size": 17570
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Properties",
"java.util.Random",
"org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition",
"org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartitionLeader",
"org.apache.flink.util.NetUtils",
"org.apache.flink.util.... | import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.Random; import org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition; import org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartitionLeader; import org.apache.flink.util.NetUtils; import... | import java.util.*; import org.apache.flink.streaming.connectors.kafka.internals.*; import org.apache.flink.util.*; import org.apache.kafka.clients.consumer.*; import org.apache.kafka.common.*; | [
"java.util",
"org.apache.flink",
"org.apache.kafka"
] | java.util; org.apache.flink; org.apache.kafka; | 169,255 |
public Tag scan(Tag tag, Lexer lexer, NodeList stack)
throws ParserException
{
String language;
Node node;
boolean done;
int position;
StringNode last;
Tag end;
NodeFactory factory;
CompositeTag ret;
done = false;
last = null;
end = null;
factory = lexer.getNodeFactory();
if (tag insta... | Tag function(Tag tag, Lexer lexer, NodeList stack) throws ParserException { String language; Node node; boolean done; int position; StringNode last; Tag end; NodeFactory factory; CompositeTag ret; done = false; last = null; end = null; factory = lexer.getNodeFactory(); if (tag instanceof ScriptTag) { language = ((Scrip... | /**
* Scan for script.
* Accumulates nodes returned from the lexer, until </SCRIPT>,
* <BODY> or <HTML> is encountered. Replaces the node factory
* in the lexer with a new (empty) one to avoid other scanners missing their
* end tags and accumulating even the </SCRIPT> tag.
*
* @par... | Scan for script. Accumulates nodes returned from the lexer, until </SCRIPT>, <BODY> or <HTML> is encountered. Replaces the node factory in the lexer with a new (empty) one to avoid other scanners missing their end tags and accumulating even the </SCRIPT> tag | scan | {
"repo_name": "stefandmn/AREasy",
"path": "src/java/org/areasy/common/parser/html/engine/scanners/ScriptScanner.java",
"license": "lgpl-3.0",
"size": 4949
} | [
"java.util.Vector",
"org.areasy.common.parser.html.engine.Node",
"org.areasy.common.parser.html.engine.PrototypicalNodeFactory",
"org.areasy.common.parser.html.engine.RemarkNode",
"org.areasy.common.parser.html.engine.StringNode",
"org.areasy.common.parser.html.engine.lexer.Lexer",
"org.areasy.common.pa... | import java.util.Vector; import org.areasy.common.parser.html.engine.Node; import org.areasy.common.parser.html.engine.PrototypicalNodeFactory; import org.areasy.common.parser.html.engine.RemarkNode; import org.areasy.common.parser.html.engine.StringNode; import org.areasy.common.parser.html.engine.lexer.Lexer; import ... | import java.util.*; import org.areasy.common.parser.html.engine.*; import org.areasy.common.parser.html.engine.lexer.*; import org.areasy.common.parser.html.engine.lexer.nodes.*; import org.areasy.common.parser.html.engine.tags.*; import org.areasy.common.parser.html.utilities.*; | [
"java.util",
"org.areasy.common"
] | java.util; org.areasy.common; | 1,100,942 |
ArtifactVersion getOldestUpdate( UpdateScope updateScope ); | ArtifactVersion getOldestUpdate( UpdateScope updateScope ); | /**
* Returns the oldest version newer than the current version, but within the the specified update scope or
* <code>null</code> if no such version exists.
*
* @param updateScope the update scope to include.
* @return the oldest version after currentVersion within the specified update scope or... | Returns the oldest version newer than the current version, but within the the specified update scope or <code>null</code> if no such version exists | getOldestUpdate | {
"repo_name": "prostagma/versions-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/versions/api/VersionDetails.java",
"license": "apache-2.0",
"size": 28383
} | [
"org.apache.maven.artifact.versioning.ArtifactVersion"
] | import org.apache.maven.artifact.versioning.ArtifactVersion; | import org.apache.maven.artifact.versioning.*; | [
"org.apache.maven"
] | org.apache.maven; | 878,191 |
@Nonnull <T extends Listener> T unregisterEvents(@Nonnull T listener); | @Nonnull <T extends Listener> T unregisterEvents(@Nonnull T listener); | /**
* Unregisters a {@link Listener} to this plugin.
*
* @param listener listener to unregister
* @param <T> listener type
*
* @return unregistered listener (that is the given parameter)
*/ | Unregisters a <code>Listener</code> to this plugin | unregisterEvents | {
"repo_name": "SupaHam/SupaCommons",
"path": "commons-bungee/src/main/java/com/supaham/commons/bungee/CommonPlugin.java",
"license": "gpl-3.0",
"size": 1585
} | [
"javax.annotation.Nonnull",
"net.md_5.bungee.api.plugin.Listener"
] | import javax.annotation.Nonnull; import net.md_5.bungee.api.plugin.Listener; | import javax.annotation.*; import net.md_5.bungee.api.plugin.*; | [
"javax.annotation",
"net.md_5.bungee"
] | javax.annotation; net.md_5.bungee; | 1,682,128 |
public InterceptorType<T> interceptorClass(String interceptorClass)
{
childNode.getOrCreate("interceptor-class").text(interceptorClass);
return this;
} | InterceptorType<T> function(String interceptorClass) { childNode.getOrCreate(STR).text(interceptorClass); return this; } | /**
* Sets the <code>interceptor-class</code> element
* @param interceptorClass the value for the element <code>interceptor-class</code>
* @return the current instance of <code>InterceptorType<T></code>
*/ | Sets the <code>interceptor-class</code> element | interceptorClass | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar30/InterceptorTypeImpl.java",
"license": "epl-1.0",
"size": 39854
} | [
"org.jboss.shrinkwrap.descriptor.api.ejbjar30.InterceptorType"
] | import org.jboss.shrinkwrap.descriptor.api.ejbjar30.InterceptorType; | import org.jboss.shrinkwrap.descriptor.api.ejbjar30.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,516,228 |
protected void fireStateChanged() {
if (!mChangeEnabled)
return;
ChangeEvent ev = null;
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length-2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
// Lazil... | void function() { if (!mChangeEnabled) return; ChangeEvent ev = null; Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length-2; i >= 0; i -= 2) { if (listeners[i] == ChangeListener.class) { if (ev == null) { ev = new ChangeEvent(this); } ((ChangeListener)listeners[i+1]).stateChanged(ev); } }... | /**
* Run each <code>ChangeListener</code>'s <code>stateChanged</code>
* method.
*/ | Run each <code>ChangeListener</code>'s <code>stateChanged</code> method | fireStateChanged | {
"repo_name": "z7z8th/aster",
"path": "src/org/zeroxlab/aster/DefaultActionListModel.java",
"license": "apache-2.0",
"size": 5638
} | [
"javax.swing.event.ChangeEvent",
"javax.swing.event.ChangeListener"
] | import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 1,756,710 |
public List<IUserGroup> getUserGroups(final String userOrGroupName,
final GetUserGroupsOptions opts) throws P4JavaException; | List<IUserGroup> function(final String userOrGroupName, final GetUserGroupsOptions opts) throws P4JavaException; | /**
* Get a list of Perforce user groups from the server.
* <p>
*
* Note that the Perforce server considers it an error to have both indirect
* and displayValues parameters set true; this will cause the server to
* throw a RequestException with an appropriate usage message.
*
* @... | Get a list of Perforce user groups from the server. Note that the Perforce server considers it an error to have both indirect and displayValues parameters set true; this will cause the server to throw a RequestException with an appropriate usage message | getUserGroups | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/src/main/java/com/perforce/p4java/server/delegator/IGroupsDelegator.java",
"license": "apache-2.0",
"size": 1327
} | [
"com.perforce.p4java.core.IUserGroup",
"com.perforce.p4java.exception.P4JavaException",
"com.perforce.p4java.option.server.GetUserGroupsOptions",
"java.util.List"
] | import com.perforce.p4java.core.IUserGroup; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.option.server.GetUserGroupsOptions; import java.util.List; | import com.perforce.p4java.core.*; import com.perforce.p4java.exception.*; import com.perforce.p4java.option.server.*; import java.util.*; | [
"com.perforce.p4java",
"java.util"
] | com.perforce.p4java; java.util; | 1,635,138 |
public static URLImage createToFileSystem(EncodedImage placeholder, String file, String url, ImageAdapter adapter) {
// intern is used to trigger an NPE in case of a null URL or storage file
URLImage out = pendingToFile.get(file);
if (out != null) {
return out;
}
... | static URLImage function(EncodedImage placeholder, String file, String url, ImageAdapter adapter) { URLImage out = pendingToFile.get(file); if (out != null) { return out; } out = new URLImage(placeholder, url.intern(), adapter, null, file.intern()); pendingToFile.put(file, out); return out; } /** * Creates an image tha... | /**
* Creates an image the will be downloaded on the fly as necessary
*
* @param placeholder the image placeholder is shown as the image is loading/downloading
* and serves as the guideline to the size of the downloaded image.
* @param file the file in the file system to which the image will ... | Creates an image the will be downloaded on the fly as necessary | createToFileSystem | {
"repo_name": "diamonddevgroup/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/URLImage.java",
"license": "gpl-2.0",
"size": 40311
} | [
"com.codename1.io.FileSystemStorage"
] | import com.codename1.io.FileSystemStorage; | import com.codename1.io.*; | [
"com.codename1.io"
] | com.codename1.io; | 876,471 |
boolean hasHeldLocks() {
synchronized (this.tokens) {
for (Iterator iter = this.tokens.values().iterator(); iter.hasNext();) {
DLockToken token = (DLockToken) iter.next();
if (token.isLeaseHeld()) {
return true;
}
}
}
return false;
} | boolean hasHeldLocks() { synchronized (this.tokens) { for (Iterator iter = this.tokens.values().iterator(); iter.hasNext();) { DLockToken token = (DLockToken) iter.next(); if (token.isLeaseHeld()) { return true; } } } return false; } | /**
* Returns true if any tokens in this service are currently held. Synchronizes on tokens map and
* on each token to check the lease.
*
* @return true if any tokens in this service are currently held
*/ | Returns true if any tokens in this service are currently held. Synchronizes on tokens map and on each token to check the lease | hasHeldLocks | {
"repo_name": "pivotal-amurmann/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java",
"license": "apache-2.0",
"size": 116745
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,566,014 |
public Message readMessage(AgentID agentID, Performative performative) throws JAMMessageBoxException, InterruptedException {
if (agentID == null || performative == null) {
throw new IllegalArgumentException("Wrong parameters");
}
if (box.isEmpty()) {
throw new JAMMess... | Message function(AgentID agentID, Performative performative) throws JAMMessageBoxException, InterruptedException { if (agentID == null performative == null) { throw new IllegalArgumentException(STR); } if (box.isEmpty()) { throw new JAMMessageBoxException(STR); } ListIterator<E> it = box.listIterator(); while (it.hasNe... | /**
* Retrieve and delete from message box the first message sent by agent and with performative provided.
* If no message found an exception it.francescosantagati.jam.JAMMessageBoxException will be thrown
*
* @param agentID it.francescosantagati.jam.AgentID
* @param performative it.france... | Retrieve and delete from message box the first message sent by agent and with performative provided. If no message found an exception it.francescosantagati.jam.JAMMessageBoxException will be thrown | readMessage | {
"repo_name": "FrancescoSantagati/java-agent-middleware",
"path": "jam/src/main/java/it/francescosantagati/jam/MessageBoxNoSync.java",
"license": "mit",
"size": 8105
} | [
"java.util.ListIterator"
] | import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 770,304 |
public LogEncounterDAO getLogEncounterDAO() {
return logEncounterDAO;
}
| LogEncounterDAO function() { return logEncounterDAO; } | /**
* Gets the log encounter dao.
*
* @return the log encounter dao
*/ | Gets the log encounter dao | getLogEncounterDAO | {
"repo_name": "jembi/rhea-shr-adapter",
"path": "api/src/main/java/org/openmrs/module/rheashradapter/api/LogEncounterServiceImpl.java",
"license": "mpl-2.0",
"size": 3889
} | [
"org.openmrs.module.rheashradapter.hibernate.LogEncounterDAO"
] | import org.openmrs.module.rheashradapter.hibernate.LogEncounterDAO; | import org.openmrs.module.rheashradapter.hibernate.*; | [
"org.openmrs.module"
] | org.openmrs.module; | 2,876,325 |
private PDFObject readObject(
int objNum, int objGen,
boolean numscan, PDFDecrypter decrypter) throws IOException {
// skip whitespace
int c;
PDFObject obj = null;
while (obj == null && this.buf.hasRemaining()) {
while (isWhiteSpace(c = this... | PDFObject function( int objNum, int objGen, boolean numscan, PDFDecrypter decrypter) throws IOException { int c; PDFObject obj = null; while (obj == null && this.buf.hasRemaining()) { while (isWhiteSpace(c = this.buf.get())) { if(!buf.hasRemaining()) { break; } } if (c == '<') { c = this.buf.get(); if (c == '<') { obj=... | /**
* read the next object with a special catch for numbers
* @param numscan if true, don't bother trying to see if a number is
* an object reference (used when already in the middle of testing for
* an object reference, and not otherwise)
* @param objNum the object number of the object ... | read the next object with a special catch for numbers | readObject | {
"repo_name": "katjas/PDFrenderer",
"path": "src/com/sun/pdfview/PDFFile.java",
"license": "lgpl-2.1",
"size": 72428
} | [
"com.sun.pdfview.decrypt.PDFDecrypter",
"java.io.IOException"
] | import com.sun.pdfview.decrypt.PDFDecrypter; import java.io.IOException; | import com.sun.pdfview.decrypt.*; import java.io.*; | [
"com.sun.pdfview",
"java.io"
] | com.sun.pdfview; java.io; | 268,433 |
private void manualPurge( List<String> includes )
throws MojoExecutionException
{
for ( String gavPattern : includes )
{
if ( StringUtils.isEmpty( gavPattern ) )
{
getLog().debug( "Skipping empty gav pattern: " + gavPattern );
conti... | void function( List<String> includes ) throws MojoExecutionException { for ( String gavPattern : includes ) { if ( StringUtils.isEmpty( gavPattern ) ) { getLog().debug( STR + gavPattern ); continue; } String relativePath = gavToPath( gavPattern ); if ( StringUtils.isEmpty( relativePath ) ) { continue; } File purgeDir =... | /**
* Purge/Delete artifacts from the local repository according to the given patterns.
*
* @param inclusionPatterns
* @throws MojoExecutionException
*/ | Purge/Delete artifacts from the local repository according to the given patterns | manualPurge | {
"repo_name": "lennartj/maven-plugins",
"path": "maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java",
"license": "apache-2.0",
"size": 23202
} | [
"java.io.File",
"java.io.IOException",
"java.util.List",
"org.apache.maven.plugin.MojoExecutionException",
"org.codehaus.plexus.util.FileUtils",
"org.codehaus.plexus.util.StringUtils"
] | import java.io.File; import java.io.IOException; import java.util.List; import org.apache.maven.plugin.MojoExecutionException; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.StringUtils; | import java.io.*; import java.util.*; import org.apache.maven.plugin.*; import org.codehaus.plexus.util.*; | [
"java.io",
"java.util",
"org.apache.maven",
"org.codehaus.plexus"
] | java.io; java.util; org.apache.maven; org.codehaus.plexus; | 2,390,910 |
@Override
public RequestMessage.Builder buildMessage(final RequestMessage.Builder builder) {
builder.processor("session");
builder.addArg(Tokens.ARGS_SESSION, sessionId);
builder.addArg(Tokens.ARGS_MANAGE_TRANSACTION, manageTransactions);
return builder;
... | RequestMessage.Builder function(final RequestMessage.Builder builder) { builder.processor(STR); builder.addArg(Tokens.ARGS_SESSION, sessionId); builder.addArg(Tokens.ARGS_MANAGE_TRANSACTION, manageTransactions); return builder; } | /**
* Adds the {@link Tokens#ARGS_SESSION} value to every {@link RequestMessage}.
*/ | Adds the <code>Tokens#ARGS_SESSION</code> value to every <code>RequestMessage</code> | buildMessage | {
"repo_name": "pluradj/incubator-tinkerpop",
"path": "gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java",
"license": "apache-2.0",
"size": 37116
} | [
"org.apache.tinkerpop.gremlin.driver.message.RequestMessage"
] | import org.apache.tinkerpop.gremlin.driver.message.RequestMessage; | import org.apache.tinkerpop.gremlin.driver.message.*; | [
"org.apache.tinkerpop"
] | org.apache.tinkerpop; | 1,154,127 |
default Map<String, Object> toMap(int fromIndex, int endIndex) {
Map<String, Object> map = new LinkedHashMap<>();
for(int i = fromIndex; i<= endIndex; i++) {
map.put(getArguments()[i].getName(), get(i));
}
return map;
} | default Map<String, Object> toMap(int fromIndex, int endIndex) { Map<String, Object> map = new LinkedHashMap<>(); for(int i = fromIndex; i<= endIndex; i++) { map.put(getArguments()[i].getName(), get(i)); } return map; } | /**
* Returns the argument name and values as {@link Map} in the given index range.
*/ | Returns the argument name and values as <code>Map</code> in the given index range | toMap | {
"repo_name": "leapframework/framework",
"path": "web/core/src/main/java/leap/web/action/ActionParams.java",
"license": "apache-2.0",
"size": 1756
} | [
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,950,462 |
public String updateByExampleSelective(Map<String, Object> parameter) {
LdHomeWork record = (LdHomeWork) parameter.get("record");
LdHomeWorkExample example = (LdHomeWorkExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("ld_homework");
if (re... | String function(Map<String, Object> parameter) { LdHomeWork record = (LdHomeWork) parameter.get(STR); LdHomeWorkExample example = (LdHomeWorkExample) parameter.get(STR); SQL sql = new SQL(); sql.UPDATE(STR); if (record.getId() != null) { sql.SET(STR); } if (record.getUserid() != null) { sql.SET(STR); } if (record.getCl... | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ld_homework
*
* @mbg.generated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table ld_homework | updateByExampleSelective | {
"repo_name": "upup1000/spring",
"path": "spring-09/target/classes/edu/ldcollege/mapping/LdHomeWorkSqlProvider.java",
"license": "apache-2.0",
"size": 13959
} | [
"edu.ldcollege.domain.LdHomeWork",
"edu.ldcollege.domain.LdHomeWorkExample",
"java.util.Map"
] | import edu.ldcollege.domain.LdHomeWork; import edu.ldcollege.domain.LdHomeWorkExample; import java.util.Map; | import edu.ldcollege.domain.*; import java.util.*; | [
"edu.ldcollege.domain",
"java.util"
] | edu.ldcollege.domain; java.util; | 2,186,263 |
private MPayment createPayment(HttpSession session, Properties ctx,
WebUser wu, WebOrder wo)
{
// See PaymentServlet.doGet
MPayment p = new MPayment(ctx, 0, null);
p.setAD_Org_ID(wo.getAD_Org_ID());
p.setIsSelfService(true);
p.setAmount (wo.getC_Currency_ID(), wo.getGrandTotal ()); // for CC sele... | MPayment function(HttpSession session, Properties ctx, WebUser wu, WebOrder wo) { MPayment p = new MPayment(ctx, 0, null); p.setAD_Org_ID(wo.getAD_Org_ID()); p.setIsSelfService(true); p.setAmount (wo.getC_Currency_ID(), wo.getGrandTotal ()); p.setIsOnline (true); p.setC_DocType_ID(true); p.setTrxType(MPayment.TRXTYPE_S... | /**************************************************************************
* Create Payment, but don't save it
* @param session session
* @param ctx context
* @param wu web user
* @param wo Order
* @return Payment
*/ | Create Payment, but don't save it | createPayment | {
"repo_name": "erpcya/adempierePOS",
"path": "serverApps/src/main/servlet/org/compiere/wstore/OrderServlet.java",
"license": "gpl-2.0",
"size": 10401
} | [
"java.util.Properties",
"javax.servlet.http.HttpSession",
"org.compiere.model.MPayment",
"org.compiere.util.WebUser"
] | import java.util.Properties; import javax.servlet.http.HttpSession; import org.compiere.model.MPayment; import org.compiere.util.WebUser; | import java.util.*; import javax.servlet.http.*; import org.compiere.model.*; import org.compiere.util.*; | [
"java.util",
"javax.servlet",
"org.compiere.model",
"org.compiere.util"
] | java.util; javax.servlet; org.compiere.model; org.compiere.util; | 1,816,879 |
private static final String urlEncode(String s) {
try {
return URLEncoder.encode(s, "UTF-8");
} catch (Exception e) {
logger.warn("Failed to encode '" + s + "'", e);
return s;
}
} | static final String function(String s) { try { return URLEncoder.encode(s, "UTF-8"); } catch (Exception e) { logger.warn(STR + s + "'", e); return s; } } | /**
* URL-encode the given string using UTF-8 encoding.
*/ | URL-encode the given string using UTF-8 encoding | urlEncode | {
"repo_name": "fcrepo3/fcrepo",
"path": "fcrepo-server/src/main/java/org/fcrepo/server/storage/GSearchDOManager.java",
"license": "apache-2.0",
"size": 8547
} | [
"java.net.URLEncoder"
] | import java.net.URLEncoder; | import java.net.*; | [
"java.net"
] | java.net; | 1,543,035 |
@Test
public void testPostUngroupWorksheetRows() {
System.out.println("PostUngroupWorksheetRows");
String name = "test_cells.xlsx";
String sheetName = "Sheet1";
Integer firstIndex = 1;
Integer lastIndex = 1;
Boolean isAll = false;
String storage = "";
String folder = "";
try {
SaaSposeRespo... | void function() { System.out.println(STR); String name = STR; String sheetName = STR; Integer firstIndex = 1; Integer lastIndex = 1; Boolean isAll = false; String storage = STRSTRexp:" + apiException.getMessage()); assertNull(apiException); } } | /**
* Test of PostUngroupWorksheetRows method, of class CellsApi.
*/ | Test of PostUngroupWorksheetRows method, of class CellsApi | testPostUngroupWorksheetRows | {
"repo_name": "aspose-cells/Aspose.Cells-for-Cloud",
"path": "SDKs/Aspose.Cells-Cloud-SDK-for-Android/Aspose.Cells-Cloud-SDK-Android/src/test/java/com/aspose/cells/api/CellsApiTest.java",
"license": "mit",
"size": 91749
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 239,815 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.