method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void newPartitioningSchema( TransMeta transMeta ) {
delegates.partitions.newPartitioningSchema( transMeta );
} | void function( TransMeta transMeta ) { delegates.partitions.newPartitioningSchema( transMeta ); } | /**
* This creates a new partitioning schema, edits it and adds it to the transformation metadata if its name is not a
* duplicate of any of existing
*/ | This creates a new partitioning schema, edits it and adds it to the transformation metadata if its name is not a duplicate of any of existing | newPartitioningSchema | {
"repo_name": "cjsonger/pentaho-kettle",
"path": "ui/src/main/java/org/pentaho/di/ui/spoon/Spoon.java",
"license": "apache-2.0",
"size": 341299
} | [
"org.pentaho.di.trans.TransMeta"
] | import org.pentaho.di.trans.TransMeta; | import org.pentaho.di.trans.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,902,098 |
public void executeRenderResult(String finalLocation, ActionInvocation invocation) throws Exception {
ValueStack stack = ActionContext.getContext().getValueStack();
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getRes... | void function(String finalLocation, ActionInvocation invocation) throws Exception { ValueStack stack = ActionContext.getContext().getValueStack(); HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); ServletContext servletContext = ServletAct... | /**
* Creates a Velocity context from the action, loads a Velocity template and
* executes the template. Output is written to the servlet output stream.
*
* @param finalLocation the location of the Velocity template
* @param invocation an encapsulation of the action execution state.
... | Creates a Velocity context from the action, loads a Velocity template and executes the template. Output is written to the servlet output stream | executeRenderResult | {
"repo_name": "Ile2/struts2-showcase-demo",
"path": "src/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java",
"license": "apache-2.0",
"size": 10930
} | [
"com.opensymphony.xwork2.ActionContext",
"com.opensymphony.xwork2.ActionInvocation",
"com.opensymphony.xwork2.util.ValueStack",
"java.io.OutputStreamWriter",
"java.io.Writer",
"javax.servlet.Servlet",
"javax.servlet.ServletContext",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSe... | import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.util.ValueStack; import java.io.OutputStreamWriter; import java.io.Writer; import javax.servlet.Servlet; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import... | import com.opensymphony.xwork2.*; import com.opensymphony.xwork2.util.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import org.apache.struts2.*; import org.apache.struts2.views.*; import org.apache.velocity.*; import org.apache.velocity.context.*; | [
"com.opensymphony.xwork2",
"java.io",
"javax.servlet",
"org.apache.struts2",
"org.apache.velocity"
] | com.opensymphony.xwork2; java.io; javax.servlet; org.apache.struts2; org.apache.velocity; | 1,567,682 |
public void shiftEpisode(String shifter)
{
if (UHConfig.EPISODES.ENABLED.get())
{
this.episode++;
final EpisodeChangedCause cause;
if (shifter == null || shifter.equals("")) cause = EpisodeChangedCause.FINISHED;
else cause = EpisodeChangedCause.SH... | void function(String shifter) { if (UHConfig.EPISODES.ENABLED.get()) { this.episode++; final EpisodeChangedCause cause; if (shifter == null shifter.equals("")) cause = EpisodeChangedCause.FINISHED; else cause = EpisodeChangedCause.SHIFTED; if (cause == EpisodeChangedCause.SHIFTED) { p.getTimerManager().getMainTimer().s... | /**
* Shifts an episode.
*
* @param shifter The player who shifts the episode, an empty string if the episode is shifted
* because the timer is up.
*/ | Shifts an episode | shiftEpisode | {
"repo_name": "AmauryCarrade/UHPlugin",
"path": "src/main/java/eu/carrade/amaury/UHCReloaded/game/UHGameManager.java",
"license": "gpl-3.0",
"size": 42228
} | [
"eu.carrade.amaury.UHCReloaded"
] | import eu.carrade.amaury.UHCReloaded; | import eu.carrade.amaury.*; | [
"eu.carrade.amaury"
] | eu.carrade.amaury; | 2,582,283 |
public void closeTablePool(final String tableName) throws IOException {
Collection<HTableInterface> tables = this.tables.values(tableName);
if (tables != null) {
for (HTableInterface table : tables) {
this.tableFactory.releaseHTableInterface(table);
}
}
this.tables.remove(tableName... | void function(final String tableName) throws IOException { Collection<HTableInterface> tables = this.tables.values(tableName); if (tables != null) { for (HTableInterface table : tables) { this.tableFactory.releaseHTableInterface(table); } } this.tables.remove(tableName); } | /**
* Closes all the HTable instances , belonging to the given table, in the
* table pool.
* <p>
* Note: this is a 'shutdown' of the given table pool and different from
* {@link #putTable(HTableInterface)}, that is used to return the table
* instance to the pool for future re-use.
*
* @param tab... | Closes all the HTable instances , belonging to the given table, in the table pool. Note: this is a 'shutdown' of the given table pool and different from <code>#putTable(HTableInterface)</code>, that is used to return the table instance to the pool for future re-use | closeTablePool | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java",
"license": "apache-2.0",
"size": 19955
} | [
"java.io.IOException",
"java.util.Collection"
] | import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,003,789 |
@Test(expected = BgpParseException.class)
public void bgpUpdateMessageTest16() throws BgpParseException {
byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0... | @Test(expected = BgpParseException.class) void function() throws BgpParseException { byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x... | /**
* In this test case, Invalid AFI is given as input and expecting
* an exception.
*/ | In this test case, Invalid AFI is given as input and expecting an exception | bgpUpdateMessageTest16 | {
"repo_name": "sonu283304/onos",
"path": "protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java",
"license": "apache-2.0",
"size": 100189
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.junit.Test",
"org.onosproject.bgpio.exceptions.BgpParseException",
"org.onosproject.bgpio.types.BgpHeader"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.junit.Test; import org.onosproject.bgpio.exceptions.BgpParseException; import org.onosproject.bgpio.types.BgpHeader; | import org.hamcrest.*; import org.jboss.netty.buffer.*; import org.junit.*; import org.onosproject.bgpio.exceptions.*; import org.onosproject.bgpio.types.*; | [
"org.hamcrest",
"org.jboss.netty",
"org.junit",
"org.onosproject.bgpio"
] | org.hamcrest; org.jboss.netty; org.junit; org.onosproject.bgpio; | 2,701,995 |
@Message(id = 11400, value = "name == null")
IllegalArgumentException nameNull(); | @Message(id = 11400, value = STR) IllegalArgumentException nameNull(); | /**
* nameNull method definition.
* @return IllegalArgumentException
*/ | nameNull method definition | nameNull | {
"repo_name": "tadayosi/switchyard",
"path": "core/common/core/src/main/java/org/switchyard/common/CommonCoreMessages.java",
"license": "apache-2.0",
"size": 1613
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 1,197,284 |
public OneResponse chmod(int octet)
{
return chmod(client, id, octet);
}
// =================================
// Helpers
// ================================= | OneResponse function(int octet) { return chmod(client, id, octet); } | /**
* Changes the permissions
*
* @param octet Permissions octed , e.g. 640
* @return If an error occurs the error message contains the reason.
*/ | Changes the permissions | chmod | {
"repo_name": "bcec/opennebula3.4.1",
"path": "src/oca/java/src/org/opennebula/client/datastore/Datastore.java",
"license": "apache-2.0",
"size": 11298
} | [
"org.opennebula.client.OneResponse"
] | import org.opennebula.client.OneResponse; | import org.opennebula.client.*; | [
"org.opennebula.client"
] | org.opennebula.client; | 2,512,049 |
@GwtIncompatible("used only in GwtIncompatible tests")
private static void runExtensiveMergerTest(Merger merger)
throws InterruptedException {
int inputCount = new TestFutureBatch().allFutures.size();
for (int i = 0; i < inputCount; i++) {
for (int j = 0; j < inputCount; j++) {
for (boo... | @GwtIncompatible(STR) static void function(Merger merger) throws InterruptedException { int inputCount = new TestFutureBatch().allFutures.size(); for (int i = 0; i < inputCount; i++) { for (int j = 0; j < inputCount; j++) { for (boolean iBeforeJ : new boolean[]{true, false}) { TestFutureBatch inputs = new TestFutureBat... | /**
* For each possible pair of futures from {@link TestFutureBatch}, for each possible completion
* order of those futures, test that various get calls (timed before future completion, untimed
* before future completion, and untimed after future completion) return or throw the proper
* values.
*/ | For each possible pair of futures from <code>TestFutureBatch</code>, for each possible completion order of those futures, test that various get calls (timed before future completion, untimed before future completion, and untimed after future completion) return or throw the proper values | runExtensiveMergerTest | {
"repo_name": "sunbeansoft/guava",
"path": "guava-tests/test/com/google/common/util/concurrent/FuturesTest.java",
"license": "apache-2.0",
"size": 136171
} | [
"com.google.common.annotations.GwtIncompatible",
"java.util.Arrays",
"java.util.List",
"java.util.concurrent.CancellationException",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.TimeoutException"
] | import com.google.common.annotations.GwtIncompatible; import java.util.Arrays; import java.util.List; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; | import com.google.common.annotations.*; import java.util.*; import java.util.concurrent.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,101,917 |
//-------------------------------------------------------------------------
public SwaptionSensitivity presentValueSensitivityNormalVolatility(SwaptionTrade tradeSwaption, RatesProvider rates,
NormalVolatilitySwaptionProvider volatilities) {
Swaption product = tradeSwaption.getProduct();
return PRIC... | SwaptionSensitivity function(SwaptionTrade tradeSwaption, RatesProvider rates, NormalVolatilitySwaptionProvider volatilities) { Swaption product = tradeSwaption.getProduct(); return PRICER_PRODUCT.presentValueSensitivityNormalVolatility(product, rates, volatilities); } | /**
* Calculates the present value sensitivity to the implied volatility of the swaption trade.
* <p>
* The sensitivity to the implied normal volatility is also called normal vega.
*
* @param tradeSwaption the swaption trade
* @param rates the rates provider
* @param volatilities the normal vol... | Calculates the present value sensitivity to the implied volatility of the swaption trade. The sensitivity to the implied normal volatility is also called normal vega | presentValueSensitivityNormalVolatility | {
"repo_name": "nssales/Strata",
"path": "modules/pricer-beta/src/main/java/com/opengamma/strata/pricer/rate/swaption/NormalSwaptionPhysicalTradePricerBeta.java",
"license": "apache-2.0",
"size": 5848
} | [
"com.opengamma.strata.finance.rate.swaption.Swaption",
"com.opengamma.strata.finance.rate.swaption.SwaptionTrade",
"com.opengamma.strata.pricer.provider.NormalVolatilitySwaptionProvider",
"com.opengamma.strata.pricer.rate.RatesProvider",
"com.opengamma.strata.pricer.sensitivity.SwaptionSensitivity"
] | import com.opengamma.strata.finance.rate.swaption.Swaption; import com.opengamma.strata.finance.rate.swaption.SwaptionTrade; import com.opengamma.strata.pricer.provider.NormalVolatilitySwaptionProvider; import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.pricer.sensitivity.SwaptionSensiti... | import com.opengamma.strata.finance.rate.swaption.*; import com.opengamma.strata.pricer.provider.*; import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.pricer.sensitivity.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 2,415,067 |
public ItemTextIfc loadPublishedItemText(String itemTextId)
{
try
{
PublishedAssessmentService service = new PublishedAssessmentService();
return service.loadPublishedItemText(itemTextId);
}
catch (Exception ex)
{
throw new AssessmentServiceException(ex);
}
} | ItemTextIfc function(String itemTextId) { try { PublishedAssessmentService service = new PublishedAssessmentService(); return service.loadPublishedItemText(itemTextId); } catch (Exception ex) { throw new AssessmentServiceException(ex); } } | /**
* Load published assessment item text.
* @param itemTextId the id string of the itemtext.
* @return the item.
*/ | Load published assessment item text | loadPublishedItemText | {
"repo_name": "bzhouduke123/sakai",
"path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/shared/impl/assessment/PublishedAssessmentServiceImpl.java",
"license": "apache-2.0",
"size": 16234
} | [
"org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc",
"org.sakaiproject.tool.assessment.services.assessment.AssessmentServiceException",
"org.sakaiproject.tool.assessment.services.assessment.PublishedAssessmentService"
] | import org.sakaiproject.tool.assessment.data.ifc.assessment.ItemTextIfc; import org.sakaiproject.tool.assessment.services.assessment.AssessmentServiceException; import org.sakaiproject.tool.assessment.services.assessment.PublishedAssessmentService; | import org.sakaiproject.tool.assessment.data.ifc.assessment.*; import org.sakaiproject.tool.assessment.services.assessment.*; | [
"org.sakaiproject.tool"
] | org.sakaiproject.tool; | 2,217,156 |
@Override
public void onMovieItemSelected(long movieDBId) {
MovieDetailFragment fragment = (MovieDetailFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_movie_details);
fragment.showDetailsByMovieDBId(movieDBId);
} | void function(long movieDBId) { MovieDetailFragment fragment = (MovieDetailFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_movie_details); fragment.showDetailsByMovieDBId(movieDBId); } | /**
* Ask the movie details fragment to use the movie identified by movieDBId
* @param movieDBId
*/ | Ask the movie details fragment to use the movie identified by movieDBId | onMovieItemSelected | {
"repo_name": "frank-tan/Popular-Movies",
"path": "app/src/main/java/com/franktan/popularmovies/ui/activities/MovieGridActivity.java",
"license": "apache-2.0",
"size": 3547
} | [
"com.franktan.popularmovies.ui.fragments.MovieDetailFragment"
] | import com.franktan.popularmovies.ui.fragments.MovieDetailFragment; | import com.franktan.popularmovies.ui.fragments.*; | [
"com.franktan.popularmovies"
] | com.franktan.popularmovies; | 2,803,737 |
protected void startActivityForResult(Intent intent, int code) {
if (fragment == null) {
activity.startActivityForResult(intent, code);
} else {
fragment.startActivityForResult(intent, code);
}
} | void function(Intent intent, int code) { if (fragment == null) { activity.startActivityForResult(intent, code); } else { fragment.startActivityForResult(intent, code); } } | /**
* Start an activity. This method is defined to allow different methods of
* activity starting for newer versions of Android and for compatibility
* library.
*
* @param intent
* Intent to start.
* @param code
* Request code for the activity
* @see android.app.Activity#startAct... | Start an activity. This method is defined to allow different methods of activity starting for newer versions of Android and for compatibility library | startActivityForResult | {
"repo_name": "Kharatsa/tracking-app",
"path": "SampleTracking/src/com/google/zxing/integration/android/IntentIntegrator.java",
"license": "apache-2.0",
"size": 15245
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 2,847,565 |
public WsPk insert(Ws dto)
{
SqlUpdate su = new SqlUpdate( dataSource, "INSERT INTO " + getTableName() + " ( ws_code, ws_date, supplier_name, fish_species, fish_size, fish_weight, quantity, remarks, issued_by, checked_by, received_by, is_active, is_delete, created_by, created_date, updated_by, updated_date ) VALU... | WsPk function(Ws dto) { SqlUpdate su = new SqlUpdate( dataSource, STR + getTableName() + STR); su.declareParameter( new SqlParameter( java.sql.Types.VARCHAR) ); su.declareParameter( new SqlParameter( java.sql.Types.VARCHAR) ); su.declareParameter( new SqlParameter( java.sql.Types.VARCHAR) ); su.declareParameter( new Sq... | /**
* Method 'insert'
*
* @param dto
* @return WsPk
*/ | Method 'insert' | insert | {
"repo_name": "rmage/gnvc-ims",
"path": "src/java/com/app/wms/engine/db/dao/spring/WsDaoImpl.java",
"license": "lgpl-3.0",
"size": 19191
} | [
"com.app.wms.engine.db.dto.Ws",
"com.app.wms.engine.db.dto.WsPk",
"org.springframework.jdbc.core.SqlParameter",
"org.springframework.jdbc.object.SqlUpdate"
] | import com.app.wms.engine.db.dto.Ws; import com.app.wms.engine.db.dto.WsPk; import org.springframework.jdbc.core.SqlParameter; import org.springframework.jdbc.object.SqlUpdate; | import com.app.wms.engine.db.dto.*; import org.springframework.jdbc.core.*; import org.springframework.jdbc.object.*; | [
"com.app.wms",
"org.springframework.jdbc"
] | com.app.wms; org.springframework.jdbc; | 1,456,775 |
@SuppressWarnings({"unchecked"})
@Nullable public CacheInterceptor<K, V> getInterceptor() {
return (CacheInterceptor<K, V>)interceptor;
} | @SuppressWarnings({STR}) @Nullable CacheInterceptor<K, V> function() { return (CacheInterceptor<K, V>)interceptor; } | /**
* Gets cache interceptor.
*
* @return Cache interceptor.
*/ | Gets cache interceptor | getInterceptor | {
"repo_name": "leveyj/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java",
"license": "apache-2.0",
"size": 96148
} | [
"org.apache.ignite.cache.CacheInterceptor",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.cache.CacheInterceptor; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.cache.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 639,191 |
public Date getGmtModified() {
return gmtModified;
}
| Date function() { return gmtModified; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column metal_zinc_price.gmt_modified
*
* @return the value of metal_zinc_price.gmt_modified
*
* @mbggenerated Sun Jan 22 16:27:31 GMT+08:00 2017
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column metal_zinc_price.gmt_modified | getGmtModified | {
"repo_name": "bbbbb1202/devzb",
"path": "self/src/main/java/com/devzb/metal/dao/model/MetalZincPrice.java",
"license": "apache-2.0",
"size": 5000
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,686,969 |
public Query setBigInteger(String name, BigInteger number); | Query function(String name, BigInteger number); | /**
* Bind a named BigInteger-valued parameter.
*
* @param name The parameter name
* @param number The bind value
*
* @return {@code this}, for method chaining
*/ | Bind a named BigInteger-valued parameter | setBigInteger | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/Query.java",
"license": "lgpl-2.1",
"size": 25174
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,397,671 |
private void paintSetOfPositions(final CanvasType dest, final Color thisCol, final int lineStyle) {
if (_ptCtr > 0) {
dest.setColor(thisCol);
dest.setLineStyle(lineStyle);
final int[] poly = new int[_ptCtr];
System.arraycopy(_myPts, 0, poly, 0, _ptCtr);
dest.drawPolyline(poly);
dest.setL... | void function(final CanvasType dest, final Color thisCol, final int lineStyle) { if (_ptCtr > 0) { dest.setColor(thisCol); dest.setLineStyle(lineStyle); final int[] poly = new int[_ptCtr]; System.arraycopy(_myPts, 0, poly, 0, _ptCtr); dest.drawPolyline(poly); dest.setLineStyle(CanvasType.SOLID); _ptCtr = 0; } } | /**
* paint any polyline that we've built up
*
* @param dest - where we're painting to
* @param thisCol
* @param lineStyle
*/ | paint any polyline that we've built up | paintSetOfPositions | {
"repo_name": "debrief/debrief",
"path": "org.mwc.debrief.legacy/src/Debrief/Wrappers/TrackWrapper.java",
"license": "epl-1.0",
"size": 120981
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,090,107 |
void moveFilestore(File destination) throws FileStoreException; | void moveFilestore(File destination) throws FileStoreException; | /**
* Moves the contents of this store to the given destination.
*/ | Moves the contents of this store to the given destination | moveFilestore | {
"repo_name": "gstevey/gradle",
"path": "subprojects/resources/src/main/java/org/gradle/internal/resource/local/FileStore.java",
"license": "apache-2.0",
"size": 1654
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,866,944 |
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
EmbeddedLinuxJVMConsoleView.getInstance(project).createToolWindowContent(toolWindow);
} | void function(@NotNull Project project, @NotNull ToolWindow toolWindow) { EmbeddedLinuxJVMConsoleView.getInstance(project).createToolWindowContent(toolWindow); } | /**
* Creates a custom tool window show pi logs (might be temporary)
*
* @param project
* @param toolWindow
*/ | Creates a custom tool window show pi logs (might be temporary) | createToolWindowContent | {
"repo_name": "asebak/embeddedlinux-jvmdebugger-intellij",
"path": "src/com/atsebak/embeddedlinuxjvm/console/EmbeddedLinuxJVMToolWindowFactory.java",
"license": "apache-2.0",
"size": 772
} | [
"com.intellij.openapi.project.Project",
"com.intellij.openapi.wm.ToolWindow",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.project.Project; import com.intellij.openapi.wm.ToolWindow; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.project.*; import com.intellij.openapi.wm.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"org.jetbrains.annotations"
] | com.intellij.openapi; org.jetbrains.annotations; | 221,214 |
@Test
public void testGetRelationalExprValuesForFilterSize() throws IOException {
final String path = "$.[?(\"@.Sizes\" size ['S', 'M', 'L'])]";
JsonPath jsonPath = JsonPath.compile(path);
List<SimpleEntry<String, String>> valuesMap = jsonPath.getRelationalExprValues();
... | void function() throws IOException { final String path = STR@.Sizes\STR; JsonPath jsonPath = JsonPath.compile(path); List<SimpleEntry<String, String>> valuesMap = jsonPath.getRelationalExprValues(); Assert.assertNotNull(valuesMap); Assert.assertEquals(valuesMap.get(0).getValue(), STR); Assert.assertEquals(valuesMap.get... | /**
* Test extraction of relational expression values for "Size" filter
* @throws IOException
*/ | Test extraction of relational expression values for "Size" filter | testGetRelationalExprValuesForFilterSize | {
"repo_name": "lafaspot/JsonPath",
"path": "json-path/src/test/java/com/jayway/jsonpath/FilterTest.java",
"license": "apache-2.0",
"size": 30061
} | [
"java.io.IOException",
"java.util.AbstractMap",
"java.util.List",
"org.junit.Assert"
] | import java.io.IOException; import java.util.AbstractMap; import java.util.List; import org.junit.Assert; | import java.io.*; import java.util.*; import org.junit.*; | [
"java.io",
"java.util",
"org.junit"
] | java.io; java.util; org.junit; | 617,712 |
Collection<ObjectiveDisplayMode> getObjectiveDisplayModes(); | Collection<ObjectiveDisplayMode> getObjectiveDisplayModes(); | /**
* Gets a {@link Collection} of all possible {@link ObjectiveDisplayMode}s.
*
* @return The Collection of all available {@link ObjectiveDisplayMode}s
*/ | Gets a <code>Collection</code> of all possible <code>ObjectiveDisplayMode</code>s | getObjectiveDisplayModes | {
"repo_name": "SpongeHistory/SpongeAPI-History",
"path": "src/main/java/org/spongepowered/api/GameRegistry.java",
"license": "mit",
"size": 37085
} | [
"java.util.Collection",
"org.spongepowered.api.scoreboard.objective.displaymode.ObjectiveDisplayMode"
] | import java.util.Collection; import org.spongepowered.api.scoreboard.objective.displaymode.ObjectiveDisplayMode; | import java.util.*; import org.spongepowered.api.scoreboard.objective.displaymode.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,218,154 |
public boolean stopSipStack() throws SameThreadException {
Log.d(THIS_FILE, "Stop sip stack");
boolean canStop = true;
if(pjService != null) {
canStop &= pjService.sipStop();
}
if(canStop) {
if(presenceMgr != null) {
presenceMgr.stopMonitoring();
}
// Due to http:/... | boolean function() throws SameThreadException { Log.d(THIS_FILE, STR); boolean canStop = true; if(pjService != null) { canStop &= pjService.sipStop(); } if(canStop) { if(presenceMgr != null) { presenceMgr.stopMonitoring(); } if(!Compatibility.isCompatible(14)) { applyComponentEnablingState(false); } unregisterBroadcast... | /**
* Safe stop the sip stack
* @return true if can be stopped, false if there is a pending call and the sip service should not be stopped
*/ | Safe stop the sip stack | stopSipStack | {
"repo_name": "djkskqyr3/CSipSimple",
"path": "src/com/csipsimple/service/SipService.java",
"license": "lgpl-3.0",
"size": 62719
} | [
"com.csipsimple.utils.Compatibility",
"com.csipsimple.utils.Log"
] | import com.csipsimple.utils.Compatibility; import com.csipsimple.utils.Log; | import com.csipsimple.utils.*; | [
"com.csipsimple.utils"
] | com.csipsimple.utils; | 2,140,972 |
@ReactMethod
public void measure(int reactTag, Callback callback) {
mUIImplementation.measure(reactTag, callback);
} | void function(int reactTag, Callback callback) { mUIImplementation.measure(reactTag, callback); } | /**
* Determines the location on screen, width, and height of the given view and returns the values
* via an async callback.
*/ | Determines the location on screen, width, and height of the given view and returns the values via an async callback | measure | {
"repo_name": "Ten-Wang/hackfoldr-android",
"path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java",
"license": "apache-2.0",
"size": 20678
} | [
"com.facebook.react.bridge.Callback"
] | import com.facebook.react.bridge.Callback; | import com.facebook.react.bridge.*; | [
"com.facebook.react"
] | com.facebook.react; | 1,969,753 |
public void loadConfig(final String fileName) throws IOException, InvalidConfigurationException {
final Path path = Paths.get(this.plugin.getDataFolder().toPath().toAbsolutePath() + File.separator + fileName);
if (!Files.exists(path)) {
path.toFile().getParentFile().mkdirs();
... | void function(final String fileName) throws IOException, InvalidConfigurationException { final Path path = Paths.get(this.plugin.getDataFolder().toPath().toAbsolutePath() + File.separator + fileName); if (!Files.exists(path)) { path.toFile().getParentFile().mkdirs(); Files.createFile(path); this.writeConfig(path); } el... | /**
* Load the config containing messages
* Creates a new config if it does not exists
* Fix the config after parsing
*
* @param fileName The name of the file to load
*
* @throws IOException If there is an error reading / writing file
* @throws InvalidConfigurat... | Load the config containing messages Creates a new config if it does not exists Fix the config after parsing | loadConfig | {
"repo_name": "Ribesg/NPlugins",
"path": "NCore/src/main/java/fr/ribesg/bukkit/ncore/config/AbstractConfig.java",
"license": "gpl-3.0",
"size": 5951
} | [
"fr.ribesg.bukkit.ncore.util.DateUtil",
"java.io.BufferedReader",
"java.io.File",
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.Paths",
"org.bukkit.configuration.InvalidConfigurationException",
"org.bukkit.configuration.file.YamlConfiguration"
] | import fr.ribesg.bukkit.ncore.util.DateUtil; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfigur... | import fr.ribesg.bukkit.ncore.util.*; import java.io.*; import java.nio.file.*; import org.bukkit.configuration.*; import org.bukkit.configuration.file.*; | [
"fr.ribesg.bukkit",
"java.io",
"java.nio",
"org.bukkit.configuration"
] | fr.ribesg.bukkit; java.io; java.nio; org.bukkit.configuration; | 2,666,262 |
SecurityQuestionWithMaskedAnswerWidget getSecurityQuestionsWidget();
}
private final Display display;
public TempPwdLoginPresenter(Display displayArg) {
this.display = displayArg;
display.getReset().addClickHandler(new ClickHandler() { | SecurityQuestionWithMaskedAnswerWidget getSecurityQuestionsWidget(); } private final Display display; public TempPwdLoginPresenter(Display displayArg) { this.display = displayArg; display.getReset().addClickHandler(new ClickHandler() { | /**
* Gets the security questions widget.
*
* @return the security questions widget
*/ | Gets the security questions widget | getSecurityQuestionsWidget | {
"repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint",
"path": "mat/src/mat/client/login/TempPwdLoginPresenter.java",
"license": "apache-2.0",
"size": 15370
} | [
"com.google.gwt.event.dom.client.ClickHandler"
] | import com.google.gwt.event.dom.client.ClickHandler; | import com.google.gwt.event.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,016,334 |
protected boolean processing() {
log.debug("Starting processing");
if (config.getProperty(AJPropertyConstants.QUIET.getKey()).equals(
"false")
&& config.getProperty(
AJPropertyConstants.SHOW_LICENSE_AT_START.getKey())
.equals("true")) {
showLicense();
}
if (config.getProperty(AJPropertyConstants.... | boolean function() { log.debug(STR); if (config.getProperty(AJPropertyConstants.QUIET.getKey()).equals( "false") && config.getProperty( AJPropertyConstants.SHOW_LICENSE_AT_START.getKey()) .equals("true")) { showLicense(); } if (config.getProperty(AJPropertyConstants.QUIET.getKey()).equals( "false") && config.getPropert... | /**
* Generate the journals.
*
* @return true if the processing phase succeeded.
*/ | Generate the journals | processing | {
"repo_name": "pdp10/AstroJournal",
"path": "src/main/java/org/astrojournal/AJMainControls.java",
"license": "gpl-3.0",
"size": 5158
} | [
"org.astrojournal.configuration.ajconfiguration.AJPropertyConstants"
] | import org.astrojournal.configuration.ajconfiguration.AJPropertyConstants; | import org.astrojournal.configuration.ajconfiguration.*; | [
"org.astrojournal.configuration"
] | org.astrojournal.configuration; | 449,362 |
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
{
if (!this.canBlockStay(worldIn, pos))
{
worldIn.setBlockToAir(pos);
}
}
| void function(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) { if (!this.canBlockStay(worldIn, pos)) { worldIn.setBlockToAir(pos); } } | /**
* Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor
* change. Cases may include when redstone power is updated, cactus blocks popping off due to a neighboring solid
* block, etc.
*/ | Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor change. Cases may include when redstone power is updated, cactus blocks popping off due to a neighboring solid block, etc | neighborChanged | {
"repo_name": "InverMN/MinecraftForgeReference",
"path": "MinecraftBlocks/BlockCake.java",
"license": "unlicense",
"size": 6140
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | 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; | 2,423,551 |
protected void deregister(String ssoId, Session session) {
synchronized (reverse) {
reverse.remove(session);
}
SingleSignOnEntry sso = lookup(ssoId);
if (sso == null)
return;
sso.removeSession(session);
// see if we are the last session, if... | void function(String ssoId, Session session) { synchronized (reverse) { reverse.remove(session); } SingleSignOnEntry sso = lookup(ssoId); if (sso == null) return; sso.removeSession(session); Session sessions[] = sso.findSessions(); if (sessions == null sessions.length == 0) { synchronized (cache) { cache.remove(ssoId);... | /**
* Deregister the specified session. If it is the last session,
* then also get rid of the single sign on identifier
*
* @param ssoId Single sign on identifier
* @param session Session to be deregistered
*/ | Deregister the specified session. If it is the last session, then also get rid of the single sign on identifier | deregister | {
"repo_name": "sdw2330976/apache-tomcat-7.0.57",
"path": "target/classes/org/apache/catalina/authenticator/SingleSignOn.java",
"license": "apache-2.0",
"size": 22954
} | [
"org.apache.catalina.Session"
] | import org.apache.catalina.Session; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,811,925 |
@Override
public void run() {
amIActive = true;
String destHeader = null;
String outputHeader = null;
String backLinkHeader = null;
WhiteboxRaster destImage;
WhiteboxRaster output;
WhiteboxRaster backLink;
int cols, rows;
d... | void function() { amIActive = true; String destHeader = null; String outputHeader = null; String backLinkHeader = null; WhiteboxRaster destImage; WhiteboxRaster output; WhiteboxRaster backLink; int cols, rows; double z, flowDir; float progress = 0; int[] dX = new int[]{1, 1, 1, 0, -1, -1, -1, 0}; int[] dY = new int[]{-... | /**
* Used to execute this plugin tool.
*/ | Used to execute this plugin tool | run | {
"repo_name": "jblindsay/jblindsay.github.io",
"path": "ghrg/Whitebox/WhiteboxGAT-linux/resources/plugins/source_files/CostPathway.java",
"license": "mit",
"size": 10180
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 536,777 |
public static Path createRegularConvexPolygon(int left, int top, int right, int bottom,
int numSides, float rotationDegrees) {
return RegularConvexPolygonCreator.createRegularConvexPolygon(left, top, right, bottom,
numSides, rotationDegrees)... | static Path function(int left, int top, int right, int bottom, int numSides, float rotationDegrees) { return RegularConvexPolygonCreator.createRegularConvexPolygon(left, top, right, bottom, numSides, rotationDegrees); } | /**
* Creates a regular convex polygon {@link android.graphics.Path}.
*
* @param left Left bound
* @param top Top bound
* @param right Right bound
* @param bottom Bottom bound
* @param numSides Number of sides
* @param rotationDegr... | Creates a regular convex polygon <code>android.graphics.Path</code> | createRegularConvexPolygon | {
"repo_name": "xiayouli0122/Wardroid",
"path": "src/com/example/ward/view/artise/Artiste.java",
"license": "apache-2.0",
"size": 6336
} | [
"android.graphics.Path"
] | import android.graphics.Path; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,744,941 |
public void unsubscribeAllDurable() throws MessagingException {
for (String name : durableSubscriptions.keySet()) {
unsubscribeDurable(name);
}
} | void function() throws MessagingException { for (String name : durableSubscriptions.keySet()) { unsubscribeDurable(name); } } | /**
* Removes all durable topic subscriptions created using
* this JMSManager instance
*
* @throws MessagingException
*/ | Removes all durable topic subscriptions created using this JMSManager instance | unsubscribeAllDurable | {
"repo_name": "andreasnef/fcrepo",
"path": "fcrepo-server/src/main/java/org/fcrepo/server/messaging/JMSManager.java",
"license": "apache-2.0",
"size": 35566
} | [
"org.fcrepo.server.errors.MessagingException"
] | import org.fcrepo.server.errors.MessagingException; | import org.fcrepo.server.errors.*; | [
"org.fcrepo.server"
] | org.fcrepo.server; | 1,667,432 |
Observable<List<Smiley>> getFavoriteSmileys(User user); | Observable<List<Smiley>> getFavoriteSmileys(User user); | /**
* Returns a list of the user's favorite smileys
*/ | Returns a list of the user's favorite smileys | getFavoriteSmileys | {
"repo_name": "Ayuget/Redface",
"path": "app/src/main/java/com/ayuget/redface/data/api/MDService.java",
"license": "apache-2.0",
"size": 5380
} | [
"com.ayuget.redface.data.api.model.Smiley",
"com.ayuget.redface.data.api.model.User",
"java.util.List"
] | import com.ayuget.redface.data.api.model.Smiley; import com.ayuget.redface.data.api.model.User; import java.util.List; | import com.ayuget.redface.data.api.model.*; import java.util.*; | [
"com.ayuget.redface",
"java.util"
] | com.ayuget.redface; java.util; | 1,432,526 |
@Test
public void testGetCause () {
assertNull(unknownSQLError.getCause());
assertNull(knownSQLError.getCause());
assertEquals(SQLException.class, knownCauseSQLError.getCause().getClass());
}
| void function () { assertNull(unknownSQLError.getCause()); assertNull(knownSQLError.getCause()); assertEquals(SQLException.class, knownCauseSQLError.getCause().getClass()); } | /**
* Test method for {@link java.lang.Throwable#getCause()}.
*/ | Test method for <code>java.lang.Throwable#getCause()</code> | testGetCause | {
"repo_name": "Club-Rock-ISEN/EntryManager",
"path": "src/test/java/org/clubrockisen/common/error/SQLConfigurationErrorTest.java",
"license": "bsd-3-clause",
"size": 1276
} | [
"java.sql.SQLException",
"org.junit.Assert"
] | import java.sql.SQLException; import org.junit.Assert; | import java.sql.*; import org.junit.*; | [
"java.sql",
"org.junit"
] | java.sql; org.junit; | 2,084,649 |
public void setField(Map<Field, String> fields) {
Objects.requireNonNull(fields, "fields must not be null");
fields.forEach(this::setField);
} | void function(Map<Field, String> fields) { Objects.requireNonNull(fields, STR); fields.forEach(this::setField); } | /**
* Sets a number of fields simultaneously. The given HashMap contains field
* names as keys, each mapped to the value to set.
*/ | Sets a number of fields simultaneously. The given HashMap contains field names as keys, each mapped to the value to set | setField | {
"repo_name": "JabRef/jabref",
"path": "src/main/java/org/jabref/model/entry/BibEntry.java",
"license": "mit",
"size": 38993
} | [
"java.util.Map",
"java.util.Objects",
"org.jabref.model.entry.field.Field"
] | import java.util.Map; import java.util.Objects; import org.jabref.model.entry.field.Field; | import java.util.*; import org.jabref.model.entry.field.*; | [
"java.util",
"org.jabref.model"
] | java.util; org.jabref.model; | 336,084 |
private boolean isActivated()
{
BlockPos blockpos = this.getSpawnerPosition();
return this.getSpawnerWorld().isAnyPlayerWithinRangeAt((double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 0.5D, (double)blockpos.getZ() + 0.5D, (double)this.activatingRangeFromPlayer);
} | boolean function() { BlockPos blockpos = this.getSpawnerPosition(); return this.getSpawnerWorld().isAnyPlayerWithinRangeAt((double)blockpos.getX() + 0.5D, (double)blockpos.getY() + 0.5D, (double)blockpos.getZ() + 0.5D, (double)this.activatingRangeFromPlayer); } | /**
* Returns true if there's a player close enough to this mob spawner to activate it.
*/ | Returns true if there's a player close enough to this mob spawner to activate it | isActivated | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/tileentity/MobSpawnerBaseLogic.java",
"license": "gpl-3.0",
"size": 15437
} | [
"net.minecraft.util.BlockPos"
] | import net.minecraft.util.BlockPos; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 472,192 |
MetricField getMetricField(); | MetricField getMetricField(); | /**
* The field in the query model representing the value of this metric.
*
* @return An aggregation or post aggregation appearing in the template druid query.
*/ | The field in the query model representing the value of this metric | getMetricField | {
"repo_name": "yahoo/fili",
"path": "fili-core/src/main/java/com/yahoo/bard/webservice/data/metric/LogicalMetric.java",
"license": "apache-2.0",
"size": 2289
} | [
"com.yahoo.bard.webservice.druid.model.MetricField"
] | import com.yahoo.bard.webservice.druid.model.MetricField; | import com.yahoo.bard.webservice.druid.model.*; | [
"com.yahoo.bard"
] | com.yahoo.bard; | 816,860 |
public static ChannelBuilder create(ChannelUID channelUID, String acceptedItemType) {
return new ChannelBuilder(channelUID, acceptedItemType, new HashSet<String>());
} | static ChannelBuilder function(ChannelUID channelUID, String acceptedItemType) { return new ChannelBuilder(channelUID, acceptedItemType, new HashSet<String>()); } | /**
* Creates a channel builder for the given channel UID and item type.
*
* @param channelUID
* channel UID
* @param acceptedItemType
* item type that is accepted by this channel
* @return channel builder
*/ | Creates a channel builder for the given channel UID and item type | create | {
"repo_name": "kaikreuzer/smarthome",
"path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/binding/builder/ChannelBuilder.java",
"license": "epl-1.0",
"size": 2481
} | [
"java.util.HashSet",
"org.eclipse.smarthome.core.thing.ChannelUID"
] | import java.util.HashSet; import org.eclipse.smarthome.core.thing.ChannelUID; | import java.util.*; import org.eclipse.smarthome.core.thing.*; | [
"java.util",
"org.eclipse.smarthome"
] | java.util; org.eclipse.smarthome; | 1,341,552 |
public void testSkipOnRollOver() {
appendEntries(log, 1020);
log.skip(10);
assertEquals(log.length(), 1030);
long index;
try (TestEntry entry = log.create(TestEntry.class)) {
entry.setTerm(1);
entry.setRemove(true);
index = log.append(entry);
}
assertEquals(log.length... | void function() { appendEntries(log, 1020); log.skip(10); assertEquals(log.length(), 1030); long index; try (TestEntry entry = log.create(TestEntry.class)) { entry.setTerm(1); entry.setRemove(true); index = log.append(entry); } assertEquals(log.length(), 1031); try (TestEntry entry = log.get(1021)) { assertNull(entry);... | /**
* Tests skipping entries on a segment rollover.
*/ | Tests skipping entries on a segment rollover | testSkipOnRollOver | {
"repo_name": "tempbottle/copycat",
"path": "storage/src/test/java/net/kuujo/copycat/io/storage/LogTest.java",
"license": "apache-2.0",
"size": 6576
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 162,304 |
public void setInformationDate(final LocalDateTime informationDate) {
this.informationDate = informationDate;
}
public Domesticviolence() {
// Default constructor
}
public Domesticviolence(java.util.UUID id) {
this.id = id;
} | void function(final LocalDateTime informationDate) { this.informationDate = informationDate; } public Domesticviolence() { } public Domesticviolence(java.util.UUID id) { this.id = id; } | /**
* Set the value related to the column: informationDate.
* @param informationDate the informationDate value you wish to set
*/ | Set the value related to the column: informationDate | setInformationDate | {
"repo_name": "servinglynk/servinglynk-hmis",
"path": "hmis-model-v2017/src/main/java/com/servinglynk/hmis/warehouse/model/v2017/Domesticviolence.java",
"license": "mpl-2.0",
"size": 13696
} | [
"java.time.LocalDateTime"
] | import java.time.LocalDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 2,218,785 |
public Optional<Reader> getReaderIfFileExists(Path pathRelativeToProjectRoot) {
Path fileToRead = getPathForRelativePath(pathRelativeToProjectRoot);
if (Files.isRegularFile(fileToRead)) {
try {
return Optional.of(
(Reader) new BufferedReader(
new InputStreamReader(new... | Optional<Reader> function(Path pathRelativeToProjectRoot) { Path fileToRead = getPathForRelativePath(pathRelativeToProjectRoot); if (Files.isRegularFile(fileToRead)) { try { return Optional.of( (Reader) new BufferedReader( new InputStreamReader(newFileInputStream(pathRelativeToProjectRoot)))); } catch (Exception e) { t... | /**
* Attempts to open the file for future read access. Returns {@link Optional#absent()} if the file
* does not exist.
*/ | Attempts to open the file for future read access. Returns <code>Optional#absent()</code> if the file does not exist | getReaderIfFileExists | {
"repo_name": "MarkRunWu/buck",
"path": "src/com/facebook/buck/io/ProjectFilesystem.java",
"license": "apache-2.0",
"size": 31690
} | [
"com.google.common.base.Optional",
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.io.Reader",
"java.nio.file.Files",
"java.nio.file.Path"
] | import com.google.common.base.Optional; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.Reader; import java.nio.file.Files; import java.nio.file.Path; | import com.google.common.base.*; import java.io.*; import java.nio.file.*; | [
"com.google.common",
"java.io",
"java.nio"
] | com.google.common; java.io; java.nio; | 1,895,217 |
public void testInterop() throws Exception {
//
// This cert corresponds to the cert in wss86.keystore
// Extracted with:
// keytool -export -rfc -keystore wss86.keystore -alias wss86 -file wss86.cer
//
byte[] certBytes =
org.apache.ws.security.util.Base... | void function() throws Exception { org.apache.ws.security.util.Base64.decode( STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR ); CertificateFactory factory = CertificateFactory.getInstance("X.509", "BC"); X509Certificate cert = (X509Certificate)factory.generateCertificate( ... | /**
* Test loading a certificate using BouncyCastle, and using it to encrypt a message, but
* decrypt the message using the Java Keystore provider
*/ | Test loading a certificate using BouncyCastle, and using it to encrypt a message, but decrypt the message using the Java Keystore provider | testInterop | {
"repo_name": "wso2/wso2-wss4j",
"path": "modules/wss4j/test/wssec/TestWSSecurityWSS86.java",
"license": "apache-2.0",
"size": 11349
} | [
"java.io.ByteArrayInputStream",
"java.security.cert.CertificateFactory",
"java.security.cert.X509Certificate",
"org.apache.axis.message.SOAPEnvelope",
"org.apache.ws.security.message.WSSecEncrypt",
"org.apache.ws.security.message.WSSecHeader",
"org.w3c.dom.Document"
] | import java.io.ByteArrayInputStream; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import org.apache.axis.message.SOAPEnvelope; import org.apache.ws.security.message.WSSecEncrypt; import org.apache.ws.security.message.WSSecHeader; import org.w3c.dom.Document; | import java.io.*; import java.security.cert.*; import org.apache.axis.message.*; import org.apache.ws.security.message.*; import org.w3c.dom.*; | [
"java.io",
"java.security",
"org.apache.axis",
"org.apache.ws",
"org.w3c.dom"
] | java.io; java.security; org.apache.axis; org.apache.ws; org.w3c.dom; | 492,505 |
@Test
public void testRenameMoreThanOnceAcrossSnapDirs() throws Exception {
final Path sdir1 = new Path("/dir1");
final Path sdir2 = new Path("/dir2");
final Path sdir3 = new Path("/dir3");
hdfs.mkdirs(sdir1);
hdfs.mkdirs(sdir2);
hdfs.mkdirs(sdir3);
final Path foo_dir1 = new Path(sd... | void function() throws Exception { final Path sdir1 = new Path("/dir1"); final Path sdir2 = new Path("/dir2"); final Path sdir3 = new Path("/dir3"); hdfs.mkdirs(sdir1); hdfs.mkdirs(sdir2); hdfs.mkdirs(sdir3); final Path foo_dir1 = new Path(sdir1, "foo"); final Path bar1_dir1 = new Path(foo_dir1, "bar1"); final Path bar... | /**
* Test rename a dir and a file multiple times across snapshottable
* directories: /dir1/foo -> /dir2/foo -> /dir3/foo -> /dir2/foo -> /dir1/foo
*
* Only create snapshots in the beginning (before the rename).
*/ | Test rename a dir and a file multiple times across snapshottable directories: /dir1/foo -> /dir2/foo -> /dir3/foo -> /dir2/foo -> /dir1/foo Only create snapshots in the beginning (before the rename) | testRenameMoreThanOnceAcrossSnapDirs | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java",
"license": "gpl-3.0",
"size": 105217
} | [
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apache.hadoop.hdfs.DFSUtil",
"org.apache.hadoop.hdfs.server.namenode.INodeDirectory",
"org.apache.hadoop.hdfs.server.namenode.INodeFile",
"org.apache.hadoop.hdfs.server.namenode.INodeReference",
... | import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; import org.apache.hadoop.hdfs.server.namenode.INodeFile; import org.apache.hadoop.hdfs.server.namenode... | import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,438,172 |
@Test(groups =
{ "DataPrepCloudSync1", "DataPrepCloudSync" })
public void dataPrep_ALF_1846() throws Exception
{
testName = getTestName();
String user1OP = getUserNameForDomain(testName + "-1", hybridDomainPremium);
String user1CL = getUserNameForDomain(testName + "-1", hybridDom... | @Test(groups = { STR, STR }) void function() throws Exception { testName = getTestName(); String user1OP = getUserNameForDomain(testName + "-1", hybridDomainPremium); String user1CL = getUserNameForDomain(testName + "-1", hybridDomainPremium); String user2CL = getUserNameForDomain(testName + "-2", hybridDomainFree); cl... | /**
* 1. Create User1 (On-premise) 2. Create Cloud User1 with PremierNet domain
* and Cloud User2 wih FreeNet domain 3. Login to Cloud as User1, create a
* site 4. Login as User1 (On-Premise), configure Cloud Sync (with Cloud
* User2), Create a site and upload a document
*
* @throws Excep... | 1. Create User1 (On-premise) 2. Create Cloud User1 with PremierNet domain and Cloud User2 wih FreeNet domain 3. Login to Cloud as User1, create a site 4. Login as User1 (On-Premise), configure Cloud Sync (with Cloud User2), Create a site and upload a document | dataPrep_ALF_1846 | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/qa-share/src/test/java/org/alfresco/share/cloudsync/CloudSyncAccessTest.java",
"license": "lgpl-3.0",
"size": 105081
} | [
"org.alfresco.share.util.ShareUser",
"org.alfresco.share.util.api.CreateUserAPI",
"org.testng.annotations.Test"
] | import org.alfresco.share.util.ShareUser; import org.alfresco.share.util.api.CreateUserAPI; import org.testng.annotations.Test; | import org.alfresco.share.util.*; import org.alfresco.share.util.api.*; import org.testng.annotations.*; | [
"org.alfresco.share",
"org.testng.annotations"
] | org.alfresco.share; org.testng.annotations; | 1,507,232 |
public SVGAnimatedBoolean getExternalResourcesRequired() {
return externalResourcesRequired;
}
// SVGTests support /////////////////////////////////////////////////// | SVGAnimatedBoolean function() { return externalResourcesRequired; } | /**
* <b>DOM</b>: Implements {@link
* org.w3c.dom.svg.SVGExternalResourcesRequired#getExternalResourcesRequired()}.
*/ | DOM: Implements <code>org.w3c.dom.svg.SVGExternalResourcesRequired#getExternalResourcesRequired()</code> | getExternalResourcesRequired | {
"repo_name": "shyamalschandra/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/svg/SVGOMSVGElement.java",
"license": "apache-2.0",
"size": 29079
} | [
"org.w3c.dom.svg.SVGAnimatedBoolean"
] | import org.w3c.dom.svg.SVGAnimatedBoolean; | import org.w3c.dom.svg.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,308,070 |
@Override
protected void createObject() {
Rectangle location = getLocation();
if (location == null) {
if (jrElement != null)
location = new Rectangle(jrElement.getX(), jrElement.getY(), jrElement.getWidth(), jrElement.getHeight());
else
location = new Rectangle(0, 0, 100, 50);
}
if (location.w... | void function() { Rectangle location = getLocation(); if (location == null) { if (jrElement != null) location = new Rectangle(jrElement.getX(), jrElement.getY(), jrElement.getWidth(), jrElement.getHeight()); else location = new Rectangle(0, 0, 100, 50); } if (location.width < 0) location.width = srcNode.getDefaultWidth... | /**
* Creates the object.
*/ | Creates the object | createObject | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio/src/com/jaspersoft/studio/model/textfield/command/CreatePageXofYCommand.java",
"license": "lgpl-3.0",
"size": 6747
} | [
"com.jaspersoft.studio.messages.Messages",
"com.jaspersoft.studio.model.textfield.MPageNumber",
"com.jaspersoft.studio.model.textfield.MTotalPages",
"net.sf.jasperreports.engine.JRElementGroup",
"net.sf.jasperreports.engine.design.JRDesignElementGroup",
"net.sf.jasperreports.engine.design.JRDesignExpressi... | import com.jaspersoft.studio.messages.Messages; import com.jaspersoft.studio.model.textfield.MPageNumber; import com.jaspersoft.studio.model.textfield.MTotalPages; import net.sf.jasperreports.engine.JRElementGroup; import net.sf.jasperreports.engine.design.JRDesignElementGroup; import net.sf.jasperreports.engine.design... | import com.jaspersoft.studio.messages.*; import com.jaspersoft.studio.model.textfield.*; import net.sf.jasperreports.engine.*; import net.sf.jasperreports.engine.design.*; import net.sf.jasperreports.engine.type.*; import org.eclipse.draw2d.geometry.*; | [
"com.jaspersoft.studio",
"net.sf.jasperreports",
"org.eclipse.draw2d"
] | com.jaspersoft.studio; net.sf.jasperreports; org.eclipse.draw2d; | 319,892 |
public void setFramesDiamonds(ArrayList<BufferedImage> framesDiamonds) {
this.framesDiamonds = framesDiamonds;
} | void function(ArrayList<BufferedImage> framesDiamonds) { this.framesDiamonds = framesDiamonds; } | /**
* Un setter qui permet de changer les sprites de Diamond si besoin
**/ | Un setter qui permet de changer les sprites de Diamond si besoin | setFramesDiamonds | {
"repo_name": "NunusPower/BoulderDash",
"path": "src/Controleur/Jeu.java",
"license": "mit",
"size": 4602
} | [
"java.awt.image.BufferedImage",
"java.util.ArrayList"
] | import java.awt.image.BufferedImage; import java.util.ArrayList; | import java.awt.image.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,098,758 |
public void executeScenarioDdl(List<Ddl> ddls, String tenantId, DataLoadTimeSummary dataLoadTimeSummary) throws Exception {
if (null != ddls) {
Connection conn = null;
try {
for (Ddl ddl : ddls) {
LOGGER.info("\nExecuting DDL:" + ddl + " on tenantId:"... | void function(List<Ddl> ddls, String tenantId, DataLoadTimeSummary dataLoadTimeSummary) throws Exception { if (null != ddls) { Connection conn = null; try { for (Ddl ddl : ddls) { LOGGER.info(STR + ddl + STR +tenantId); long startTime = EnvironmentEdgeManager.currentTimeMillis(); executeStatement(ddl.toString(), conn =... | /**
* Executes any ddl defined at the scenario level. This is executed before we commence
* the data load.
*
* @throws Exception
*/ | Executes any ddl defined at the scenario level. This is executed before we commence the data load | executeScenarioDdl | {
"repo_name": "ankitsinghal/phoenix",
"path": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/PhoenixUtil.java",
"license": "apache-2.0",
"size": 23580
} | [
"java.sql.Connection",
"java.util.List",
"org.apache.phoenix.pherf.configuration.Ddl",
"org.apache.phoenix.pherf.result.DataLoadTimeSummary",
"org.apache.phoenix.util.EnvironmentEdgeManager"
] | import java.sql.Connection; import java.util.List; import org.apache.phoenix.pherf.configuration.Ddl; import org.apache.phoenix.pherf.result.DataLoadTimeSummary; import org.apache.phoenix.util.EnvironmentEdgeManager; | import java.sql.*; import java.util.*; import org.apache.phoenix.pherf.configuration.*; import org.apache.phoenix.pherf.result.*; import org.apache.phoenix.util.*; | [
"java.sql",
"java.util",
"org.apache.phoenix"
] | java.sql; java.util; org.apache.phoenix; | 859,640 |
private void processXmpTag(@NotNull XMPMeta meta, @NotNull XmpDirectory directory, int tagType, int formatCode) throws XMPException
{
String schemaNS = XmpDirectory._tagSchemaMap.get(tagType);
String propName = XmpDirectory._tagPropNameMap.get(tagType);
String property = meta.getPropertyString(schemaNS, p... | void function(@NotNull XMPMeta meta, @NotNull XmpDirectory directory, int tagType, int formatCode) throws XMPException { String schemaNS = XmpDirectory._tagSchemaMap.get(tagType); String propName = XmpDirectory._tagPropNameMap.get(tagType); String property = meta.getPropertyString(schemaNS, propName); if (property == n... | /**
* Reads an property value with given namespace URI and property name. Add property value to directory if exists
*/ | Reads an property value with given namespace URI and property name. Add property value to directory if exists | processXmpTag | {
"repo_name": "Odrahcyr/amanda-xmp",
"path": "Source/com/drew/metadata/xmp/XmpReader.java",
"license": "apache-2.0",
"size": 12530
} | [
"com.adobe.xmp.XMPException",
"com.adobe.xmp.XMPMeta",
"com.drew.lang.Rational",
"com.drew.lang.annotations.NotNull"
] | import com.adobe.xmp.XMPException; import com.adobe.xmp.XMPMeta; import com.drew.lang.Rational; import com.drew.lang.annotations.NotNull; | import com.adobe.xmp.*; import com.drew.lang.*; import com.drew.lang.annotations.*; | [
"com.adobe.xmp",
"com.drew.lang"
] | com.adobe.xmp; com.drew.lang; | 1,702,114 |
public static String[] split(String s, Pattern delim, boolean keep) {
if (s == null) {
s = "";
}
int lastMatch = 0;
ArrayList<String> parts = new ArrayList<>();
Matcher m = delim.matcher(s);
while (m.find()) {
String x = s.substring(lastMatch, ... | static String[] function(String s, Pattern delim, boolean keep) { if (s == null) { s = ""; } int lastMatch = 0; ArrayList<String> parts = new ArrayList<>(); Matcher m = delim.matcher(s); while (m.find()) { String x = s.substring(lastMatch, m.start()); if (!x.isEmpty()) { parts.add(x); } if (keep) { parts.add(m.group(0)... | /**
* Splits a string by a pattern.
*
* @param s The string to split.
* @param delim The delimeter.
* @param keep Indicates if the delimeters should be kept.
* @return The splitted string.
*/ | Splits a string by a pattern | split | {
"repo_name": "Intevation/downloadclient",
"path": "src/main/java/de/bayern/gdi/utils/StringUtils.java",
"license": "apache-2.0",
"size": 8957
} | [
"java.util.ArrayList",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 1,381,921 |
@Override
public boolean containsEntry(RegionEntry entry) {
return false;
} | boolean function(RegionEntry entry) { return false; } | /**
* This implementation is for PrimaryKeyIndex. RangeIndex has its own implementation. For
* PrimaryKeyIndex , this method should not be used
* <p>
* TODO: check if an Exception should be thrown if the function implementation of this class gets
* invoked
*/ | This implementation is for PrimaryKeyIndex. RangeIndex has its own implementation. For PrimaryKeyIndex , this method should not be used invoked | containsEntry | {
"repo_name": "pdxrunner/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/index/AbstractIndex.java",
"license": "apache-2.0",
"size": 77062
} | [
"org.apache.geode.internal.cache.RegionEntry"
] | import org.apache.geode.internal.cache.RegionEntry; | import org.apache.geode.internal.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,701,956 |
public boolean isBefore(@NonNull CalendarDay other) {
if (other == null) {
throw new IllegalArgumentException("other cannot be null");
}
if (year == other.year) {
return ((month == other.month) ? (day < other.day) : (month < other.month));
} else {
... | boolean function(@NonNull CalendarDay other) { if (other == null) { throw new IllegalArgumentException(STR); } if (year == other.year) { return ((month == other.month) ? (day < other.day) : (month < other.month)); } else { return year < other.year; } } | /**
* Determine if this day is before the given instance
*
* @param other the other day to test
* @return true if this is before other, false if equal or after
*/ | Determine if this day is before the given instance | isBefore | {
"repo_name": "Zhangsongsong/GraduationPro",
"path": "毕业设计/code/android/YYFramework/src/com/prolificinteractive/materialcalendarview/CalendarDay.java",
"license": "apache-2.0",
"size": 8115
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,671,658 |
T get(ResultRetriever<T> retriever); | T get(ResultRetriever<T> retriever); | /**
* Gets {@link java.sql.ResultSet} and retrieves single result
* <p>
* Note: Only for direct JDBC streams
* <p/>
*
* @param retriever
*
* @return T single query result
* @see java.sql.ResultSet
* @see org.lightmare.criteria.config.Configuration.ResultRetriever
... | Gets <code>java.sql.ResultSet</code> and retrieves single result Note: Only for direct JDBC streams | get | {
"repo_name": "levants/lightmare",
"path": "lightmare-criteria/src/main/java/org/lightmare/criteria/query/providers/jdbc/JdbcResultStream.java",
"license": "lgpl-2.1",
"size": 3311
} | [
"org.lightmare.criteria.config.Configuration"
] | import org.lightmare.criteria.config.Configuration; | import org.lightmare.criteria.config.*; | [
"org.lightmare.criteria"
] | org.lightmare.criteria; | 800,479 |
public void setSelectedCell(CellDisplay cell)
{
if (cell == null) return;
if (!(model instanceof WellsModel)) return;
//quietly save the description of the well and the color.
((WellsModel) model).setSelectedCell(cell);
view.repaint();
}
| void function(CellDisplay cell) { if (cell == null) return; if (!(model instanceof WellsModel)) return; ((WellsModel) model).setSelectedCell(cell); view.repaint(); } | /**
* Implemented as specified by the {@link DataBrowser} interface.
* @see DataBrowser#setSelectedCell(CellDisplay)
*/ | Implemented as specified by the <code>DataBrowser</code> interface | setSelectedCell | {
"repo_name": "hflynn/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowserComponent.java",
"license": "gpl-2.0",
"size": 52375
} | [
"org.openmicroscopy.shoola.agents.dataBrowser.browser.CellDisplay"
] | import org.openmicroscopy.shoola.agents.dataBrowser.browser.CellDisplay; | import org.openmicroscopy.shoola.agents.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 294,235 |
EAttribute getFeatureTypeType_OtherCRS(); | EAttribute getFeatureTypeType_OtherCRS(); | /**
* Returns the meta object for the attribute list '{@link net.opengis.wfs20.FeatureTypeType#getOtherCRS <em>Other CRS</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Other CRS</em>'.
* @see net.opengis.wfs20.FeatureTypeType#getOtherCRS(... | Returns the meta object for the attribute list '<code>net.opengis.wfs20.FeatureTypeType#getOtherCRS Other CRS</code>'. | getFeatureTypeType_OtherCRS | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java",
"license": "lgpl-2.1",
"size": 404067
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,181,484 |
@Override
public String toString() {
return StringUtils.join(" ", this.parts);
} | String function() { return StringUtils.join(" ", this.parts); } | /**
* Convert the parts to a string.
*
* @return The part as a string.
*/ | Convert the parts to a string | toString | {
"repo_name": "sgdc3/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/command/CommandParts.java",
"license": "gpl-3.0",
"size": 1445
} | [
"fr.xephi.authme.util.StringUtils"
] | import fr.xephi.authme.util.StringUtils; | import fr.xephi.authme.util.*; | [
"fr.xephi.authme"
] | fr.xephi.authme; | 2,278,016 |
try {
readData(
new DataInputStream(
new ByteArrayInputStream(msg)
)
);
} catch (IOException ex) {
}
}//setMessage | try { readData( new DataInputStream( new ByteArrayInputStream(msg) ) ); } catch (IOException ex) { } } | /**
* Utility method to set the raw data of the message.
* Should not be used except under rare circumstances.
* <p>
* @param msg the <tt>byte[]</tt> resembling the raw modbus
* response message.
*/ | Utility method to set the raw data of the message. Should not be used except under rare circumstances. | setMessage | {
"repo_name": "geog-opensource/jamod",
"path": "src/net/wimpi/modbus/msg/ModbusResponse.java",
"license": "bsd-3-clause",
"size": 2910
} | [
"java.io.ByteArrayInputStream",
"java.io.DataInputStream",
"java.io.IOException"
] | import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 116,384 |
@SneakyThrows
protected String generateToken(final Service service, final Map<String, String> parameters) {
final String ticketId = parameters.get(CasProtocolConstants.PARAMETER_TICKET);
return this.tokenTicketBuilder.build(ticketId, service);
} | String function(final Service service, final Map<String, String> parameters) { final String ticketId = parameters.get(CasProtocolConstants.PARAMETER_TICKET); return this.tokenTicketBuilder.build(ticketId, service); } | /**
* Generate token string.
*
* @param service the service
* @param parameters the parameters
* @return the jwt
*/ | Generate token string | generateToken | {
"repo_name": "prigaux/cas",
"path": "support/cas-server-support-token-tickets/src/main/java/org/apereo/cas/token/authentication/principal/TokenWebApplicationServiceResponseBuilder.java",
"license": "apache-2.0",
"size": 2826
} | [
"java.util.Map",
"org.apereo.cas.CasProtocolConstants",
"org.apereo.cas.authentication.principal.Service"
] | import java.util.Map; import org.apereo.cas.CasProtocolConstants; import org.apereo.cas.authentication.principal.Service; | import java.util.*; import org.apereo.cas.*; import org.apereo.cas.authentication.principal.*; | [
"java.util",
"org.apereo.cas"
] | java.util; org.apereo.cas; | 2,072,763 |
public void testDirWithFiles() throws Exception {
final List<Event> evtList = new ArrayList<>();
final int evtsCnt = 4 + 3 + 1;
final CountDownLatch latch = new CountDownLatch(evtsCnt); | void function() throws Exception { final List<Event> evtList = new ArrayList<>(); final int evtsCnt = 4 + 3 + 1; final CountDownLatch latch = new CountDownLatch(evtsCnt); | /**
* Checks events on CRUD operations on a single directory
* with some files.
*
* @throws Exception If failed.
*/ | Checks events on CRUD operations on a single directory with some files | testDirWithFiles | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java",
"license": "apache-2.0",
"size": 29327
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.CountDownLatch",
"org.apache.ignite.events.Event"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import org.apache.ignite.events.Event; | import java.util.*; import java.util.concurrent.*; import org.apache.ignite.events.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 989,750 |
public Comment remove(long commentId)
throws NoSuchCommentException, SystemException {
return remove(Long.valueOf(commentId));
} | Comment function(long commentId) throws NoSuchCommentException, SystemException { return remove(Long.valueOf(commentId)); } | /**
* Removes the Comment with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param commentId the primary key of the Comment
* @return the Comment that was removed
* @throws it.gebhard.qa.NoSuchCommentException if a Comment with the primary key could not be found
* @t... | Removes the Comment with the primary key from the database. Also notifies the appropriate model listeners | remove | {
"repo_name": "p-gebhard/QuickAnswer",
"path": "docroot/WEB-INF/src/it/gebhard/qa/service/persistence/CommentPersistenceImpl.java",
"license": "gpl-3.0",
"size": 49083
} | [
"com.liferay.portal.kernel.exception.SystemException",
"it.gebhard.qa.NoSuchCommentException",
"it.gebhard.qa.model.Comment"
] | import com.liferay.portal.kernel.exception.SystemException; import it.gebhard.qa.NoSuchCommentException; import it.gebhard.qa.model.Comment; | import com.liferay.portal.kernel.exception.*; import it.gebhard.qa.*; import it.gebhard.qa.model.*; | [
"com.liferay.portal",
"it.gebhard.qa"
] | com.liferay.portal; it.gebhard.qa; | 2,477,909 |
public void testPersistenceGenerateSchemaDropOnlyScript() {
Map properties = new HashMap();
properties.put(PersistenceUnitProperties.SESSION_NAME, "generate-schema-no-conn-session-drop-only");
properties.put(PersistenceUnitProperties.ORM_SCHEMA_VALIDATION, true);
properties.put(Persi... | void function() { Map properties = new HashMap(); properties.put(PersistenceUnitProperties.SESSION_NAME, STR); properties.put(PersistenceUnitProperties.ORM_SCHEMA_VALIDATION, true); properties.put(PersistenceUnitProperties.SCHEMA_DATABASE_PRODUCT_NAME, "MySQL"); properties.put(PersistenceUnitProperties.SCHEMA_DATABASE_... | /**
* Test the generate schema feature from the Persistence API.
*/ | Test the generate schema feature from the Persistence API | testPersistenceGenerateSchemaDropOnlyScript | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/DDLTestSuite.java",
"license": "epl-1.0",
"size": 28321
} | [
"java.util.HashMap",
"java.util.Map",
"javax.persistence.Persistence",
"org.eclipse.persistence.config.PersistenceUnitProperties"
] | import java.util.HashMap; import java.util.Map; import javax.persistence.Persistence; import org.eclipse.persistence.config.PersistenceUnitProperties; | import java.util.*; import javax.persistence.*; import org.eclipse.persistence.config.*; | [
"java.util",
"javax.persistence",
"org.eclipse.persistence"
] | java.util; javax.persistence; org.eclipse.persistence; | 1,882,004 |
List<Bill> getBillsByPatientId(int patientId, PagingInfo paging); | List<Bill> getBillsByPatientId(int patientId, PagingInfo paging); | /**
* Returns all {@link Bill}s for the specified patient with the specified paging.
* @param patientId The patient id.
* @param paging The paging information.
* @return All of the bills for the specified patient.
* @should throw IllegalArgumentException if the patientId is less than zero
* @should throw Nu... | Returns all <code>Bill</code>s for the specified patient with the specified paging | getBillsByPatientId | {
"repo_name": "andrewmoko/openmrs-module-openhmis.cashier",
"path": "api/src/main/java/org/openmrs/module/openhmis/cashier/api/IBillService.java",
"license": "mpl-2.0",
"size": 4392
} | [
"java.util.List",
"org.openmrs.module.openhmis.cashier.api.model.Bill",
"org.openmrs.module.openhmis.commons.api.PagingInfo"
] | import java.util.List; import org.openmrs.module.openhmis.cashier.api.model.Bill; import org.openmrs.module.openhmis.commons.api.PagingInfo; | import java.util.*; import org.openmrs.module.openhmis.cashier.api.model.*; import org.openmrs.module.openhmis.commons.api.*; | [
"java.util",
"org.openmrs.module"
] | java.util; org.openmrs.module; | 602,577 |
public String getLocalName(int index)
{
return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index)));
}
| String function(int index) { return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index))); } | /**
* Look up an attribute's local name by index.
*
* @param index The attribute index (zero-based).
* @return The local name, or the empty string if Namespace
* processing is not being performed, or null
* if the index is out of range.
*/ | Look up an attribute's local name by index | getLocalName | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xml/serializer/utils/AttList.java",
"license": "gpl-3.0",
"size": 6927
} | [
"org.w3c.dom.Attr"
] | import org.w3c.dom.Attr; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 363,376 |
public AggregatorRegistry getAggregatorRegistry()
{
return aggregatorRegistry;
} | AggregatorRegistry function() { return aggregatorRegistry; } | /**
* Gets the {@link AggregatorRegistry} associated with this schema.
*
* @return The {@link AggregatorRegistry} associated with this schema.
*/ | Gets the <code>AggregatorRegistry</code> associated with this schema | getAggregatorRegistry | {
"repo_name": "ananthc/apex-malhar",
"path": "library/src/main/java/org/apache/apex/malhar/lib/appdata/schemas/DimensionalConfigurationSchema.java",
"license": "apache-2.0",
"size": 108286
} | [
"org.apache.apex.malhar.lib.dimensions.aggregator.AggregatorRegistry"
] | import org.apache.apex.malhar.lib.dimensions.aggregator.AggregatorRegistry; | import org.apache.apex.malhar.lib.dimensions.aggregator.*; | [
"org.apache.apex"
] | org.apache.apex; | 522,210 |
public Reliability getExceptionDiscardReliability(); | Reliability function(); | /**
* Get the reliability level at which exceptioned messages on a link will
* automatically be discarded. The default level is BEST_EFFORT_NONPERSISTENT.
*
* @return Reliability
*/ | Get the reliability level at which exceptioned messages on a link will automatically be discarded. The default level is BEST_EFFORT_NONPERSISTENT | getExceptionDiscardReliability | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/admin/VirtualLinkDefinition.java",
"license": "epl-1.0",
"size": 2742
} | [
"com.ibm.websphere.sib.Reliability"
] | import com.ibm.websphere.sib.Reliability; | import com.ibm.websphere.sib.*; | [
"com.ibm.websphere"
] | com.ibm.websphere; | 2,188,418 |
@Test
public void testGetDescription() {
final Item mo = new Item("name1", "class", "subclass",
new HashMap<String, String>());
assertEquals("", mo.getDescription());
} | void function() { final Item mo = new Item("name1", "class", STR, new HashMap<String, String>()); assertEquals("", mo.getDescription()); } | /**
* Tests for getDescription.
*/ | Tests for getDescription | testGetDescription | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "tests/games/stendhal/server/entity/item/ItemTest.java",
"license": "gpl-2.0",
"size": 14749
} | [
"java.util.HashMap",
"org.junit.Assert"
] | import java.util.HashMap; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 719,204 |
byte[] recoverData(byte[] envelop, PrivateKeyEntry addresseePke) throws InvalidKeyException, AOException, IOException, InvalidKeySpecException; | byte[] recoverData(byte[] envelop, PrivateKeyEntry addresseePke) throws InvalidKeyException, AOException, IOException, InvalidKeySpecException; | /** Recupera los datos contenidos en un envoltorio.
* @param envelop
* Envoltorio de datos.
* @param addresseePke
* Clave privada del receptor del envoltorio (si es necesario)
* @return Datos contenidos en el envoltorio.
* @throws InvalidKeyException
* Si la clave indicada no... | Recupera los datos contenidos en un envoltorio | recoverData | {
"repo_name": "venanciolm/afirma-ui-miniapplet_x_x",
"path": "afirma_ui_miniapplet/src/main/java/es/gob/afirma/core/envelopers/AOEnveloper.java",
"license": "mit",
"size": 3628
} | [
"es.gob.afirma.core.AOException",
"java.io.IOException",
"java.security.InvalidKeyException",
"java.security.KeyStore",
"java.security.spec.InvalidKeySpecException"
] | import es.gob.afirma.core.AOException; import java.io.IOException; import java.security.InvalidKeyException; import java.security.KeyStore; import java.security.spec.InvalidKeySpecException; | import es.gob.afirma.core.*; import java.io.*; import java.security.*; import java.security.spec.*; | [
"es.gob.afirma",
"java.io",
"java.security"
] | es.gob.afirma; java.io; java.security; | 196,971 |
protected static void reportError(String message, Throwable throwable) {
IStatus status = null;
if (throwable instanceof CoreException) {
status = ((CoreException) throwable).getStatus();
} else {
status = new Status(IStatus.ERROR, AngularUIPlugin.PLUGIN_ID, 0, message, throwable);
}
ErrorDial... | static void function(String message, Throwable throwable) { IStatus status = null; if (throwable instanceof CoreException) { status = ((CoreException) throwable).getStatus(); } else { status = new Status(IStatus.ERROR, AngularUIPlugin.PLUGIN_ID, 0, message, throwable); } ErrorDialog.openError(AngularUIPlugin.getActiveW... | /**
* Opens an error dialog presenting the user with the specified message and
* throwable
*
* @param message
* @param throwable
*/ | Opens an error dialog presenting the user with the specified message and throwable | reportError | {
"repo_name": "angelozerr/angularjs-eclipse",
"path": "org.eclipse.angularjs.ui/src/org/eclipse/angularjs/internal/ui/launchConfigurations/ProtractorLaunchShortcut.java",
"license": "epl-1.0",
"size": 8963
} | [
"org.eclipse.angularjs.internal.ui.AngularUIMessages",
"org.eclipse.angularjs.internal.ui.AngularUIPlugin",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IStatus",
"org.eclipse.core.runtime.Status",
"org.eclipse.jface.dialogs.ErrorDialog"
] | import org.eclipse.angularjs.internal.ui.AngularUIMessages; import org.eclipse.angularjs.internal.ui.AngularUIPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.ErrorDialog; | import org.eclipse.angularjs.internal.ui.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.dialogs.*; | [
"org.eclipse.angularjs",
"org.eclipse.core",
"org.eclipse.jface"
] | org.eclipse.angularjs; org.eclipse.core; org.eclipse.jface; | 2,071,280 |
protected static Node buildTree(Node root, List nested, MessageCollection warnings, MessageCollection errors, ArrayConsumer consumer) {
String cmdline;
Actor actor;
Node node;
int i;
if (nested.size() == 0)
return null;
i = 0;
while (i < nested.size()) {
try {
c... | static Node function(Node root, List nested, MessageCollection warnings, MessageCollection errors, ArrayConsumer consumer) { String cmdline; Actor actor; Node node; int i; if (nested.size() == 0) return null; i = 0; while (i < nested.size()) { try { cmdline = ((Line) nested.get(i)).getContent(); actor = (Actor) consume... | /**
* Builds the tree from the nested commandlines.
*
* @param root the root node to add to
* @param nested the nested commandlines
* @param warnings for storing any warnings
* @param errors for storing any errors
* @return the root node, null if failed to build
*/ | Builds the tree from the nested commandlines | buildTree | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/flow/tree/TreeHelper.java",
"license": "gpl-3.0",
"size": 11651
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,762,550 |
public Map<String,Integer> getCommandPendingTasks()
{
return messagingServiceMBean.getCommandPendingTasks();
} | Map<String,Integer> function() { return messagingServiceMBean.getCommandPendingTasks(); } | /**
* Get command pending tasks
* @return map Map<String,Integer>
*/ | Get command pending tasks | getCommandPendingTasks | {
"repo_name": "lankavitharana/carbon-storage-management",
"path": "components/cassandra/org.wso2.carbon.cassandra.cluster.mgt/src/main/java/org/wso2/carbon/cassandra/cluster/mgt/mbean/ClusterMessagingServiceMBeanService.java",
"license": "apache-2.0",
"size": 3038
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 918,187 |
public Set<Sensor> getAllValuesOfsensor() {
return rawAccumulateAllValuesOfsensor(emptyArray());
} | Set<Sensor> function() { return rawAccumulateAllValuesOfsensor(emptyArray()); } | /**
* Retrieve the set of values that occur in matches for sensor.
* @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for sensor | getAllValuesOfsensor | {
"repo_name": "FTSRG/viatra-cep-examples",
"path": "com.rh12.tbcep/src-gen/com/rh12/tbcep/queries/SensorZPlusMatcher.java",
"license": "epl-1.0",
"size": 9711
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,755,887 |
@FIXVersion(introduced="4.0", retired="4.1")
@TagNumRef(tagNum=TagNum.SettlCurrency)
public Currency getSettlCurrency() {
throw new UnsupportedOperationException(getUnsupportedTagMessage());
} | @FIXVersion(introduced="4.0", retired="4.1") @TagNumRef(tagNum=TagNum.SettlCurrency) Currency function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getSettlCurrency | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/AllocationInstructionMsg.java",
"license": "gpl-3.0",
"size": 122626
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.Currency",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.Currency; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,939,883 |
private DataBrowser handleDiscardedBrowser(TreeImageDisplay display)
{
if (!DataBrowserFactory.hasBeenDiscarded(display)) return null;
DataBrowser db = null;
Browser browser = model.getSelectedBrowser();
List list;
List<ApplicationData> app = null;
if (display.isChildrenLoaded()
... | DataBrowser function(TreeImageDisplay display) { if (!DataBrowserFactory.hasBeenDiscarded(display)) return null; DataBrowser db = null; Browser browser = model.getSelectedBrowser(); List list; List<ApplicationData> app = null; if (display.isChildrenLoaded() && display.containsImages()) { List l = display.getChildrenDis... | /**
* Checks if a browser associated to the passed node has been
* discarded.
*
* @param display The node to handle.
*/ | Checks if a browser associated to the passed node has been discarded | handleDiscardedBrowser | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java",
"license": "gpl-2.0",
"size": 160473
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowser",
"org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowserFactory",
"org.openmicroscopy.shoola.agents.treeviewer.browser.Browser",
"org.openmicroscopy.shoo... | import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowser; import org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowserFactory; import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser; import ... | import java.util.*; import org.openmicroscopy.shoola.agents.*; import org.openmicroscopy.shoola.agents.treeviewer.browser.*; import org.openmicroscopy.shoola.agents.util.browser.*; import org.openmicroscopy.shoola.env.data.model.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,584,206 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<SqlRoleAssignmentGetResultsInner> listSqlRoleAssignmentsAsync(
String resourceGroupName, String accountName) {
return new PagedFlux<>(() -> listSqlRoleAssignmentsSinglePageAsync(resourceGroupName, accountName));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<SqlRoleAssignmentGetResultsInner> function( String resourceGroupName, String accountName) { return new PagedFlux<>(() -> listSqlRoleAssignmentsSinglePageAsync(resourceGroupName, accountName)); } | /**
* Retrieves the list of all Azure Cosmos DB SQL Role Assignments.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
... | Retrieves the list of all Azure Cosmos DB SQL Role Assignments | listSqlRoleAssignmentsAsync | {
"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.http.rest.PagedFlux",
"com.azure.resourcemanager.cosmos.fluent.models.SqlRoleAssignmentGetResultsInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.cosmos.fluent.models.SqlRoleAssignmentGetResultsInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.cosmos.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,839,669 |
@Test public void testSortExpThenLimit() {
final RelBuilder builder = RelBuilder.create(config().build());
final RelNode root =
builder.scan("DEPT")
.sort(
builder.desc(
builder.call(SqlStdOperatorTable.PLUS,
builder.field("DEPTNO... | @Test void function() { final RelBuilder builder = RelBuilder.create(config().build()); final RelNode root = builder.scan("DEPT") .sort( builder.desc( builder.call(SqlStdOperatorTable.PLUS, builder.field(STR), builder.literal(1)))) .limit(3, 10) .build(); final String expected = STRLogicalProject(DEPTNO=[$0], DNAME=[$1... | /** Tests that a sort on an expression followed by a limit gives the same
* effect as calling sortLimit. */ | Tests that a sort on an expression followed by a limit gives the same | testSortExpThenLimit | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/RelBuilderTest.java",
"license": "apache-2.0",
"size": 116680
} | [
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.sql.fun.SqlStdOperatorTable",
"org.apache.calcite.test.Matchers",
"org.apache.calcite.tools.RelBuilder",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.calcite.rel.RelNode; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.calcite.test.Matchers; import org.apache.calcite.tools.RelBuilder; import org.junit.Assert; import org.junit.Test; | import org.apache.calcite.rel.*; import org.apache.calcite.sql.fun.*; import org.apache.calcite.test.*; import org.apache.calcite.tools.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 1,156,130 |
@Test
public void outputInstructionTest() {
final Instructions.OutputInstruction instruction =
Instructions.createOutput(PortNumber.portNumber(22));
final ObjectNode instructionJson =
instructionCodec.encode(instruction, context);
assertThat(instructionJso... | void function() { final Instructions.OutputInstruction instruction = Instructions.createOutput(PortNumber.portNumber(22)); final ObjectNode instructionJson = instructionCodec.encode(instruction, context); assertThat(instructionJson, matchesInstruction(instruction)); } | /**
* Tests the encoding of output instructions.
*/ | Tests the encoding of output instructions | outputInstructionTest | {
"repo_name": "shlee89/athena",
"path": "core/common/src/test/java/org/onosproject/codec/impl/InstructionCodecTest.java",
"license": "apache-2.0",
"size": 9279
} | [
"com.fasterxml.jackson.databind.node.ObjectNode",
"org.hamcrest.MatcherAssert",
"org.onosproject.codec.impl.InstructionJsonMatcher",
"org.onosproject.net.PortNumber",
"org.onosproject.net.flow.instructions.Instructions"
] | import com.fasterxml.jackson.databind.node.ObjectNode; import org.hamcrest.MatcherAssert; import org.onosproject.codec.impl.InstructionJsonMatcher; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.instructions.Instructions; | import com.fasterxml.jackson.databind.node.*; import org.hamcrest.*; import org.onosproject.codec.impl.*; import org.onosproject.net.*; import org.onosproject.net.flow.instructions.*; | [
"com.fasterxml.jackson",
"org.hamcrest",
"org.onosproject.codec",
"org.onosproject.net"
] | com.fasterxml.jackson; org.hamcrest; org.onosproject.codec; org.onosproject.net; | 2,513,225 |
public void debug(
@Nullable final String event,
@Nullable final String message,
@Nullable final String dataKey1,
@Nullable final Object dataValue1,
@Nullable final Throwable throwable) {
if (getSlf4jLogger().isDebugEnabled()) {
LogLeve... | void function( @Nullable final String event, @Nullable final String message, @Nullable final String dataKey1, @Nullable final Object dataValue1, @Nullable final Throwable throwable) { if (getSlf4jLogger().isDebugEnabled()) { LogLevel.DEBUG.log( getSlf4jLogger(), event, createKeysFromArgs(MESSAGE_DATA_KEY, dataKey1), cr... | /**
* Log a message for a canonical event with supporting key-value pairs and
* a {@link Throwable} at the debug level. This method is provided
* only for efficiency over the var-args method above as it avoids an array
* creation during invocation.
*
* @since 1.3.0
*
* @param eve... | Log a message for a canonical event with supporting key-value pairs and a <code>Throwable</code> at the debug level. This method is provided only for efficiency over the var-args method above as it avoids an array creation during invocation | debug | {
"repo_name": "ArpNetworking/logback-steno",
"path": "src/main/java/com/arpnetworking/steno/Logger.java",
"license": "apache-2.0",
"size": 68020
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,208,211 |
default void load(final PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy) {
throw new UnsupportedOperationException("You should call this method only for default qualified injected instances.");
} | default void load(final PreferenceScopeResolutionStrategyInfo customScopeResolutionStrategy) { throw new UnsupportedOperationException(STR); } | /**
* Loads the preference content recursively through its properties.
* @param customScopeResolutionStrategy Custom preference scope resolution strategy to be used.
*/ | Loads the preference content recursively through its properties | load | {
"repo_name": "ederign/uberfire",
"path": "uberfire-preferences/uberfire-preferences-api/src/main/java/org/uberfire/preferences/shared/bean/BasePreference.java",
"license": "apache-2.0",
"size": 7544
} | [
"org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo"
] | import org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo; | import org.uberfire.preferences.shared.impl.*; | [
"org.uberfire.preferences"
] | org.uberfire.preferences; | 1,920,122 |
@Override
public void selectionChanged(SelectionChangedEvent event) {
// Remove any menu items for old selection.
//
if (createChildMenuManager != null) {
depopulateManager(createChildMenuManager, createChildActions);
}
if (createSiblingMenuManager != null) {
... | void function(SelectionChangedEvent event) { depopulateManager(createChildMenuManager, createChildActions); } if (createSiblingMenuManager != null) { depopulateManager(createSiblingMenuManager, createSiblingActions); } Collection<?> newSiblingDescriptors = null; ISelection selection = event.getSelection(); if (selectio... | /**
* This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
* handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
* that can be added to the selected object and updating the menus accordingly.
* <!-- begin-user-doc -->
... | This implements <code>org.eclipse.jface.viewers.ISelectionChangedListener</code>, handling <code>org.eclipse.jface.viewers.SelectionChangedEvent</code>s by querying for the children and siblings that can be added to the selected object and updating the menus accordingly. | selectionChanged | {
"repo_name": "RobertHilbrich/assist",
"path": "ch.hilbri.assist.model.editor/src/ch/hilbri/assist/model/presentation/ModelActionBarContributor.java",
"license": "gpl-2.0",
"size": 15709
} | [
"java.util.Collection",
"org.eclipse.emf.edit.domain.EditingDomain",
"org.eclipse.emf.edit.domain.IEditingDomainProvider",
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.IStructuredSelection",
"org.eclipse.jface.viewers.SelectionChangedEvent"
] | import java.util.Collection; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; | import java.util.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.jface"
] | java.util; org.eclipse.emf; org.eclipse.jface; | 467,609 |
private String generateOctetJsonWebKeyOfSize(final int size) {
final OctetSequenceJsonWebKey octetKey = OctJwkGenerator.generateJwk(size);
final Map<String, Object> params = octetKey.toParams(JsonWebKey.OutputControlLevel.INCLUDE_SYMMETRIC);
return params.get("k").toString();
} | String function(final int size) { final OctetSequenceJsonWebKey octetKey = OctJwkGenerator.generateJwk(size); final Map<String, Object> params = octetKey.toParams(JsonWebKey.OutputControlLevel.INCLUDE_SYMMETRIC); return params.get("k").toString(); } | /**
* Generate octet json web key of size string.
*
* @param size the size
* @return the string
*/ | Generate octet json web key of size string | generateOctetJsonWebKeyOfSize | {
"repo_name": "y1011/cas-server",
"path": "cas-server-core-util/src/main/java/org/jasig/cas/util/BinaryCipherExecutor.java",
"license": "apache-2.0",
"size": 4646
} | [
"java.util.Map",
"org.jose4j.jwk.JsonWebKey",
"org.jose4j.jwk.OctJwkGenerator",
"org.jose4j.jwk.OctetSequenceJsonWebKey"
] | import java.util.Map; import org.jose4j.jwk.JsonWebKey; import org.jose4j.jwk.OctJwkGenerator; import org.jose4j.jwk.OctetSequenceJsonWebKey; | import java.util.*; import org.jose4j.jwk.*; | [
"java.util",
"org.jose4j.jwk"
] | java.util; org.jose4j.jwk; | 1,331,048 |
private void readGroups(Element groupsNode) throws Exception
{
NodeList groupElements = groupsNode.getElementsByTagName(GROUP_ELEMENT);
for (int i = 0; i < groupElements.getLength(); ++i)
{
if (groupElements.item(i).getNodeType() == Node.ELEMENT_NODE)
{
... | void function(Element groupsNode) throws Exception { NodeList groupElements = groupsNode.getElementsByTagName(GROUP_ELEMENT); for (int i = 0; i < groupElements.getLength(); ++i) { if (groupElements.item(i).getNodeType() == Node.ELEMENT_NODE) { Element g = (Element) groupElements.item(i); String name = g.getAttribute(NA... | /**
* Read defined transformation groups in configuration. Order determines
* application order of transformation.
*
* @param groupsNode The "groups" element of the configuration.
* @throws Exception If the group name is not an available in any transformation
* set.
... | Read defined transformation groups in configuration. Order determines application order of transformation | readGroups | {
"repo_name": "clementval/claw-compiler",
"path": "cx2t/src/claw/wani/x2t/configuration/Configuration.java",
"license": "bsd-2-clause",
"size": 32882
} | [
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 690,115 |
List<String> schoolYears = request.getQueryParameters().get(ParameterConstants.SCHOOL_YEARS);
// only process if there is a schoolYear query parameter
if (schoolYears != null && schoolYears.size() > 0) {
String schoolYearRange = schoolYears.get(0);
//Extract date range ... | List<String> schoolYears = request.getQueryParameters().get(ParameterConstants.SCHOOL_YEARS); if (schoolYears != null && schoolYears.size() > 0) { String schoolYearRange = schoolYears.get(0); SessionDateInfo sessionDateInfo = sessionRangeCalculator.findDateRange(schoolYearRange); EntityFilterInfo entityFilterInfo = ent... | /**
* Generates the date filter based on the request
* @param request
*/ | Generates the date filter based on the request | generate | {
"repo_name": "inbloom/secure-data-service",
"path": "sli/api/src/main/java/org/slc/sli/api/criteriaGenerator/DateFilterCriteriaGenerator.java",
"license": "apache-2.0",
"size": 6878
} | [
"java.util.List",
"java.util.Set",
"org.slc.sli.common.constants.ParameterConstants"
] | import java.util.List; import java.util.Set; import org.slc.sli.common.constants.ParameterConstants; | import java.util.*; import org.slc.sli.common.constants.*; | [
"java.util",
"org.slc.sli"
] | java.util; org.slc.sli; | 2,055,063 |
return ObjectifyService.ofy();
} | return ObjectifyService.ofy(); } | /**
* Use this static method for getting the Objectify service object in order to make sure the
* above static block is executed before using Objectify.
* @return Objectify service object.
*/ | Use this static method for getting the Objectify service object in order to make sure the above static block is executed before using Objectify | ofy | {
"repo_name": "yannliao/conference",
"path": "src/main/java/com/google/devrel/training/conference/service/OfyService.java",
"license": "apache-2.0",
"size": 1011
} | [
"com.googlecode.objectify.ObjectifyService"
] | import com.googlecode.objectify.ObjectifyService; | import com.googlecode.objectify.*; | [
"com.googlecode.objectify"
] | com.googlecode.objectify; | 2,159,497 |
public double div(double firstOperand, double secondOperand) {
checkArgument(secondOperand != 0, "secondOperand must be != 0, you cannot divide by zero");
return firstOperand / secondOperand;
} | double function(double firstOperand, double secondOperand) { checkArgument(secondOperand != 0, STR); return firstOperand / secondOperand; } | /**
* Divide operation
*/ | Divide operation | div | {
"repo_name": "bootstraponline/zip_align_test_apk",
"path": "testrunner/AndroidJunitRunnerSample/app/src/main/java/com/example/android/testing/androidjunitrunnersample/Calculator.java",
"license": "apache-2.0",
"size": 1629
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,644,359 |
public static InputParameter fileParameter(String id) {
return new InputParameter(id).withDatatypeJavaClass(FileDescriptor.class);
} | static InputParameter function(String id) { return new InputParameter(id).withDatatypeJavaClass(FileDescriptor.class); } | /**
* Creates parameter with FileDescriptor type.
*
* @param id field id
* @return input parameter
*/ | Creates parameter with FileDescriptor type | fileParameter | {
"repo_name": "cuba-platform/cuba",
"path": "modules/gui/src/com/haulmont/cuba/gui/app/core/inputdialog/InputParameter.java",
"license": "apache-2.0",
"size": 12698
} | [
"com.haulmont.cuba.core.entity.FileDescriptor"
] | import com.haulmont.cuba.core.entity.FileDescriptor; | import com.haulmont.cuba.core.entity.*; | [
"com.haulmont.cuba"
] | com.haulmont.cuba; | 2,867,842 |
public ValueNode checkIsBoolean()
throws StandardException
{
ValueNode whereClause = this;
TypeId whereTypeId = whereClause.getTypeId();
if (whereTypeId.userType())
{
whereClause = whereClause.genSQLJavaSQLTree();
whereTypeId = whereClause.getTypeId();
}
if (! whereTypeId.equals(TypeId.... | ValueNode function() throws StandardException { ValueNode whereClause = this; TypeId whereTypeId = whereClause.getTypeId(); if (whereTypeId.userType()) { whereClause = whereClause.genSQLJavaSQLTree(); whereTypeId = whereClause.getTypeId(); } if (! whereTypeId.equals(TypeId.BOOLEAN_ID)) { throw StandardException.newExce... | /**
* Bind time logic. Raises an error if this ValueNode does not resolve to
* a boolean value. This method is called by WHERE clauses.
*
* @return bound coercion of this node to a builtin type as necessary
*
* @exception StandardException Thrown on error
*/ | Bind time logic. Raises an error if this ValueNode does not resolve to a boolean value. This method is called by WHERE clauses | checkIsBoolean | {
"repo_name": "lpxz/grail-derby104",
"path": "java/engine/org/apache/derby/impl/sql/compile/ValueNode.java",
"license": "apache-2.0",
"size": 44750
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.reference.SQLState",
"org.apache.derby.iapi.types.TypeId"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.types.TypeId; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.types.*; | [
"org.apache.derby"
] | org.apache.derby; | 318,590 |
public void setSeriesItemLabelsVisible(int series, Boolean visible,
boolean notify) {
this.itemLabelsVisibleList.setBoolean(series, visible);
if (notify) {
notifyListeners(new RendererChangeEvent(this));
}
} | void function(int series, Boolean visible, boolean notify) { this.itemLabelsVisibleList.setBoolean(series, visible); if (notify) { notifyListeners(new RendererChangeEvent(this)); } } | /**
* Sets the visibility of item labels for a series and, if requested, sends
* a {@link RendererChangeEvent} to all registered listeners.
*
* @param series the series index (zero-based).
* @param visible the visible flag.
* @param notify a flag that controls whether or not listeners... | Sets the visibility of item labels for a series and, if requested, sends a <code>RendererChangeEvent</code> to all registered listeners | setSeriesItemLabelsVisible | {
"repo_name": "opensim-org/opensim-gui",
"path": "Gui/opensim/jfreechart/src/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "apache-2.0",
"size": 98153
} | [
"org.jfree.chart.event.RendererChangeEvent"
] | import org.jfree.chart.event.RendererChangeEvent; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,950,237 |
public CoinfloorExchangeEvent watchTicker(String tradableIdentifier, String tradingCurrency) {
return doNewRequest(new RequestFactory.WatchTickerRequest(tradableIdentifier, tradingCurrency), ExchangeEventType.SUBSCRIBE_TICKER);
} | CoinfloorExchangeEvent function(String tradableIdentifier, String tradingCurrency) { return doNewRequest(new RequestFactory.WatchTickerRequest(tradableIdentifier, tradingCurrency), ExchangeEventType.SUBSCRIBE_TICKER); } | /**
* Watch the ticker feed
* Upon receipt of response, a CoinfloorExchangeEvent with payload Map<String, Object>, consisting of:
* > A raw object of type CoinfloorTicker (key "raw")
* > A generic object of type Ticker (key "generic")
*/ | Watch the ticker feed Upon receipt of response, a CoinfloorExchangeEvent with payload Map, consisting of: > A raw object of type CoinfloorTicker (key "raw") > A generic object of type Ticker (key "generic") | watchTicker | {
"repo_name": "Achterhoeker/XChange",
"path": "xchange-coinfloor/src/main/java/com/xeiam/xchange/coinfloor/streaming/CoinfloorStreamingExchangeService.java",
"license": "mit",
"size": 12702
} | [
"com.xeiam.xchange.coinfloor.dto.streaming.CoinfloorExchangeEvent",
"com.xeiam.xchange.service.streaming.ExchangeEventType"
] | import com.xeiam.xchange.coinfloor.dto.streaming.CoinfloorExchangeEvent; import com.xeiam.xchange.service.streaming.ExchangeEventType; | import com.xeiam.xchange.coinfloor.dto.streaming.*; import com.xeiam.xchange.service.streaming.*; | [
"com.xeiam.xchange"
] | com.xeiam.xchange; | 1,726,231 |
private void createPR(VM vm) {
SerializableRunnable createDS = new SerializableRunnable("Creating PR Datastore") { | void function(VM vm) { SerializableRunnable createDS = new SerializableRunnable(STR) { | /**
* CReates a PR on a VM with NUM_BKTS buckets.
*
*/ | CReates a PR on a VM with NUM_BKTS buckets | createPR | {
"repo_name": "deepakddixit/incubator-geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/cache/query/internal/index/IndexTrackingQueryObserverDUnitTest.java",
"license": "apache-2.0",
"size": 8916
} | [
"org.apache.geode.test.dunit.SerializableRunnable"
] | import org.apache.geode.test.dunit.SerializableRunnable; | import org.apache.geode.test.dunit.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,365,978 |
public Tag scan (Tag tag, Lexer lexer, NodeList stack)
throws ParserException
{
Node content;
int position;
Node node;
Attribute attribute;
Vector vector;
content = lexer.parseCDATA ();
position = lexer.getPosition ();
node = lexer.nextNod... | Tag function (Tag tag, Lexer lexer, NodeList stack) throws ParserException { Node content; int position; Node node; Attribute attribute; Vector vector; content = lexer.parseCDATA (); position = lexer.getPosition (); node = lexer.nextNode (false); if (null != node) if (!(node instanceof Tag) !( ((Tag)node).isEndTag () &... | /**
* Scan for style definitions.
* Accumulates text from the page, until </[a-zA-Z] is encountered.
* @param tag The tag this scanner is responsible for.
* @param lexer The source of CDATA.
* @param stack The parse stack, <em>not used</em>.
*/ | Scan for style definitions. Accumulates text from the page, until </[a-zA-Z] is encountered | scan | {
"repo_name": "patrickfav/tuwien",
"path": "master/swt workspace/HTMLParser/src/org/htmlparser/scanners/StyleScanner.java",
"license": "apache-2.0",
"size": 3228
} | [
"java.util.Vector",
"org.htmlparser.Attribute",
"org.htmlparser.Node",
"org.htmlparser.Tag",
"org.htmlparser.lexer.Lexer",
"org.htmlparser.util.NodeList",
"org.htmlparser.util.ParserException"
] | import java.util.Vector; import org.htmlparser.Attribute; import org.htmlparser.Node; import org.htmlparser.Tag; import org.htmlparser.lexer.Lexer; import org.htmlparser.util.NodeList; import org.htmlparser.util.ParserException; | import java.util.*; import org.htmlparser.*; import org.htmlparser.lexer.*; import org.htmlparser.util.*; | [
"java.util",
"org.htmlparser",
"org.htmlparser.lexer",
"org.htmlparser.util"
] | java.util; org.htmlparser; org.htmlparser.lexer; org.htmlparser.util; | 1,146,919 |
public void replaceCACertificatesAndCRLs(String[] caCert) throws HostConfigFault, RuntimeFault, RemoteException {
replaceCACertificatesAndCRLs(caCert, null);
} | void function(String[] caCert) throws HostConfigFault, RuntimeFault, RemoteException { replaceCACertificatesAndCRLs(caCert, null); } | /**
* Replaces the trusted Certificate Authority (CA) certificates and Certification Revocation List (CRL) used by the
* server with the provided values. These determine whether the server can verify the identity of an external entity.
*
* @param caCert List of SSL certificates, in PEM format, of al... | Replaces the trusted Certificate Authority (CA) certificates and Certification Revocation List (CRL) used by the server with the provided values. These determine whether the server can verify the identity of an external entity | replaceCACertificatesAndCRLs | {
"repo_name": "hubertverstraete/yavijava",
"path": "src/main/java/com/vmware/vim25/mo/HostCertificateManager.java",
"license": "bsd-3-clause",
"size": 5370
} | [
"com.vmware.vim25.HostConfigFault",
"com.vmware.vim25.RuntimeFault",
"java.rmi.RemoteException"
] | import com.vmware.vim25.HostConfigFault; import com.vmware.vim25.RuntimeFault; import java.rmi.RemoteException; | import com.vmware.vim25.*; import java.rmi.*; | [
"com.vmware.vim25",
"java.rmi"
] | com.vmware.vim25; java.rmi; | 2,396,833 |
private void setPopupMenu(JPopupMenu pop) {
this.pop = pop;
pop.addPopupMenuListener(new PopupMenuListener() {
public void popupMenuCanceled(PopupMenuEvent e) {} | void function(JPopupMenu pop) { this.pop = pop; pop.addPopupMenuListener(new PopupMenuListener() { public void popupMenuCanceled(PopupMenuEvent e) {} | /**
* Seteaza popup-ul lansat de catre buton
* @param pop
*/ | Seteaza popup-ul lansat de catre buton | setPopupMenu | {
"repo_name": "genomeartist/genomeartist",
"path": "sources_java/Components/src/ro/genomeartist/components/dropdownbutton/JDropDownButton.java",
"license": "gpl-3.0",
"size": 3565
} | [
"javax.swing.JPopupMenu",
"javax.swing.event.PopupMenuEvent",
"javax.swing.event.PopupMenuListener"
] | import javax.swing.JPopupMenu; import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; | import javax.swing.*; import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,010,089 |
Template getTemplate(String id); | Template getTemplate(String id); | /**
* Returns the template with the given ID
*
* @param id the ID of the template
* @return the template with the given ID or <code>null</code> if no template
* exists in this Process Group with the given ID
*/ | Returns the template with the given ID | getTemplate | {
"repo_name": "InspurUSA/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java",
"license": "apache-2.0",
"size": 33748
} | [
"org.apache.nifi.controller.Template"
] | import org.apache.nifi.controller.Template; | import org.apache.nifi.controller.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 2,821,290 |
public Vertex matches(Vertex source, Vertex text, Vertex pattern) {
if (pattern.isPrimitive()) {
pattern = pattern.getRelationship(Primitive.REGEX);
if (pattern == null) {
return null;
}
}
if (text.printString().matches(pattern.printString())) {
return source.getNetwork().createVertex(Primitive... | Vertex function(Vertex source, Vertex text, Vertex pattern) { if (pattern.isPrimitive()) { pattern = pattern.getRelationship(Primitive.REGEX); if (pattern == null) { return null; } } if (text.printString().matches(pattern.printString())) { return source.getNetwork().createVertex(Primitive.TRUE); } else { return source.... | /**
* Convert the pattern to a regex and return if the text matches the expression.
*/ | Convert the pattern to a regex and return if the text matches the expression | matches | {
"repo_name": "BOTlibre/BOTlibre",
"path": "ai-engine/source/org/botlibre/tool/Utils.java",
"license": "epl-1.0",
"size": 10785
} | [
"org.botlibre.api.knowledge.Vertex",
"org.botlibre.knowledge.Primitive"
] | import org.botlibre.api.knowledge.Vertex; import org.botlibre.knowledge.Primitive; | import org.botlibre.api.knowledge.*; import org.botlibre.knowledge.*; | [
"org.botlibre.api",
"org.botlibre.knowledge"
] | org.botlibre.api; org.botlibre.knowledge; | 2,584,059 |
private static RecordDescriptor getServerOutputRecordDescriptor() {
RecordDescriptor rd = new RecordDescriptor("WSOS", "Server Output Record Descriptor");
rd.getFields().add(new FieldDescriptor("DFCODE", "Response Code", "responseCode", "CHAR", 7, 0));
rd.getFields().add(new FieldDescriptor("DFPARM", "Service ... | static RecordDescriptor function() { RecordDescriptor rd = new RecordDescriptor("WSOS", STR); rd.getFields().add(new FieldDescriptor(STR, STR, STR, "CHAR", 7, 0)); rd.getFields().add(new FieldDescriptor(STR, STR, STR, "CHAR", 32000, 0)); return rd; } | /**
* Returns the input record format for a WS Message
*
* @return
*/ | Returns the input record format for a WS Message | getServerOutputRecordDescriptor | {
"repo_name": "mhapanow/iseries-ws",
"path": "ws-services/src/main/java/org/dcm/services/impl/WSBrokerImpl.java",
"license": "apache-2.0",
"size": 22560
} | [
"org.dcm.services.model.FieldDescriptor",
"org.dcm.services.model.RecordDescriptor"
] | import org.dcm.services.model.FieldDescriptor; import org.dcm.services.model.RecordDescriptor; | import org.dcm.services.model.*; | [
"org.dcm.services"
] | org.dcm.services; | 2,628,014 |
// Setter
public void setWorld(World world) {
this.world = world;
} | void function(World world) { this.world = world; } | /**
* Sets <code>world</code>
*
* @param world
*/ | Sets <code>world</code> | setWorld | {
"repo_name": "Blockhaus2000/SelfMadeRegion",
"path": "src/main/java/de/whichdesign/selfmaderegion/types/Region.java",
"license": "gpl-3.0",
"size": 9819
} | [
"org.bukkit.World"
] | import org.bukkit.World; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 817,532 |
protected void bindPropertyToField(Object rowId, Object colId,
Property property, Field field) {
// check if field has a property that is Viewer set. In that case we
// expect developer has e.g. PropertyFormatter that he wishes to use and
// assign the property to the Viewer inst... | void function(Object rowId, Object colId, Property property, Field field) { boolean hasFilterProperty = field.getPropertyDataSource() != null && (field.getPropertyDataSource() instanceof Property.Viewer); if (hasFilterProperty) { ((Property.Viewer) field.getPropertyDataSource()) .setPropertyDataSource(property); } else... | /**
* Binds an item property to a field generated by TableFieldFactory. The
* default behavior is to bind property straight to Field. If
* Property.Viewer type property (e.g. PropertyFormatter) is already set for
* field, the property is bound to that Property.Viewer.
*
* @param rowId
... | Binds an item property to a field generated by TableFieldFactory. The default behavior is to bind property straight to Field. If Property.Viewer type property (e.g. PropertyFormatter) is already set for field, the property is bound to that Property.Viewer | bindPropertyToField | {
"repo_name": "jdahlstrom/vaadin.react",
"path": "server/src/main/java/com/vaadin/ui/Table.java",
"license": "apache-2.0",
"size": 223299
} | [
"com.vaadin.data.Property"
] | import com.vaadin.data.Property; | import com.vaadin.data.*; | [
"com.vaadin.data"
] | com.vaadin.data; | 755,785 |
private String loadAndValidateFormat(String property, String deflt) {
String format = loadFormat(property, deflt);
// construct new SDF to make sure it's properly formatted
new SimpleDateFormat(format);
return format;
} | String function(String property, String deflt) { String format = loadFormat(property, deflt); new SimpleDateFormat(format); return format; } | /**
* Loads a particular date format from the config, using a default for fallback,
* and validates the format.
* @param property the config property
* @param deflt the default value
* @return the validated config value or default value
*/ | Loads a particular date format from the config, using a default for fallback, and validates the format | loadAndValidateFormat | {
"repo_name": "ua-eas/ua-rice-2.1.9",
"path": "core/impl/src/main/java/org/kuali/rice/core/impl/datetime/DateTimeServiceImpl.java",
"license": "apache-2.0",
"size": 14530
} | [
"java.text.SimpleDateFormat"
] | import java.text.SimpleDateFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,115,450 |
public byte[] exportPreferences(SharedPreferences preferences) throws IOException {
ByteArrayOutputStream bufStream = new ByteArrayOutputStream(BUFFER_SIZE);
DataOutputStream outWriter = new DataOutputStream(bufStream);
exportPreferences(preferences, outWriter);
return bufStream.toByteArray();
} | byte[] function(SharedPreferences preferences) throws IOException { ByteArrayOutputStream bufStream = new ByteArrayOutputStream(BUFFER_SIZE); DataOutputStream outWriter = new DataOutputStream(bufStream); exportPreferences(preferences, outWriter); return bufStream.toByteArray(); } | /**
* Exports all shared preferences from the given object as a byte array.
*
* @param preferences the preferences to export
* @return the corresponding byte array
* @throws IOException if there are any errors while writing to the byte array
*/ | Exports all shared preferences from the given object as a byte array | exportPreferences | {
"repo_name": "Plonk42/mytracks",
"path": "myTracks/src/main/java/com/google/android/apps/mytracks/io/backup/PreferenceBackupHelper.java",
"license": "apache-2.0",
"size": 8003
} | [
"android.content.SharedPreferences",
"java.io.ByteArrayOutputStream",
"java.io.DataOutputStream",
"java.io.IOException"
] | import android.content.SharedPreferences; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 2,290,658 |
public void deleteModule(String moduleName) throws Exception {
OpenCms.getModuleManager().deleteModule(
m_cms,
moduleName,
false,
new CmsShellReport(m_cms.getRequestContext().getLocale()));
}
/**
* Deletes a project by name.<p>
*... | void function(String moduleName) throws Exception { OpenCms.getModuleManager().deleteModule( m_cms, moduleName, false, new CmsShellReport(m_cms.getRequestContext().getLocale())); } /** * Deletes a project by name.<p> * * @param name the name of the project to delete | /**
* Deletes a module.<p>
*
* @param moduleName the name of the module
* @throws Exception if something goes wrong
*/ | Deletes a module | deleteModule | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/main/CmsShellCommands.java",
"license": "lgpl-2.1",
"size": 43138
} | [
"org.opencms.report.CmsShellReport"
] | import org.opencms.report.CmsShellReport; | import org.opencms.report.*; | [
"org.opencms.report"
] | org.opencms.report; | 1,696,410 |
private static File[] getCachedDirectoryList(final Context context) {
return new File(getWordListCacheDirectory(context)).listFiles();
} | static File[] function(final Context context) { return new File(getWordListCacheDirectory(context)).listFiles(); } | /**
* Helper method to the list of cache directories, one for each distinct locale.
*/ | Helper method to the list of cache directories, one for each distinct locale | getCachedDirectoryList | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java",
"license": "gpl-2.0",
"size": 21034
} | [
"android.content.Context",
"java.io.File"
] | import android.content.Context; import java.io.File; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 21,241 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.