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
Response<PeeringServicePrefix> getByIdWithResponse(String id, String expand, Context context);
Response<PeeringServicePrefix> getByIdWithResponse(String id, String expand, Context context);
/** * Gets an existing prefix with the specified name under the given subscription, resource group and peering service. * * @param id the resource ID. * @param expand The properties to be expanded. * @param context The context to associate with this operation. * @throws IllegalArgumentExce...
Gets an existing prefix with the specified name under the given subscription, resource group and peering service
getByIdWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/models/Prefixes.java", "license": "mit", "size": 8450 }
[ "com.azure.core.http.rest.Response", "com.azure.core.util.Context" ]
import com.azure.core.http.rest.Response; import com.azure.core.util.Context;
import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
1,829,185
public void run() { try { if ( log.isDebugEnabled() ) { log.debug( "Listening" ); } JGConnectionHolder holder = JGConnectionHolder.getInstance( ilca ); Channel javagroups = holder.getChannel(); // don't nee...
void function() { try { if ( log.isDebugEnabled() ) { log.debug( STR ); } JGConnectionHolder holder = JGConnectionHolder.getInstance( ilca ); Channel javagroups = holder.getChannel(); if ( !ilca.getPutOnlyMode() ) { RpcDispatcher disp = holder.getDispatcher(); if ( log.isDebugEnabled() ) { log.debug( STR + disp ); } } ...
/** * Main processing method for the LateralJGReceiver object */
Main processing method for the LateralJGReceiver object
run
{ "repo_name": "tikue/jcs2-snapshot", "path": "auxiliary-builds/jdk14/src/java/org/apache/commons/jcs/auxiliary/lateral/javagroups/LateralJGReceiver.java", "license": "apache-2.0", "size": 5315 }
[ "java.io.IOException", "org.apache.commons.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes", "org.apache.commons.jcs.auxiliary.lateral.javagroups.behavior.ILateralCacheJGListener", "org.jgroups.Channel", "org.jgroups.ChannelNotConnectedException", "org.jgroups.Message", "org.jgroups.blocks.RpcDis...
import java.io.IOException; import org.apache.commons.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes; import org.apache.commons.jcs.auxiliary.lateral.javagroups.behavior.ILateralCacheJGListener; import org.jgroups.Channel; import org.jgroups.ChannelNotConnectedException; import org.jgroups.Message; import org.j...
import java.io.*; import org.apache.commons.jcs.auxiliary.lateral.behavior.*; import org.apache.commons.jcs.auxiliary.lateral.javagroups.behavior.*; import org.jgroups.*; import org.jgroups.blocks.*;
[ "java.io", "org.apache.commons", "org.jgroups", "org.jgroups.blocks" ]
java.io; org.apache.commons; org.jgroups; org.jgroups.blocks;
737,149
public boolean unlinkBlock(int numLinks) throws IOException { if (isUnlinked()) { return false; } File file = getBlockFile(); if (file == null || getVolume() == null) { throw new IOException("detachBlock:Block not found. " + this); } File meta = getMetaFile(); if (HardLink.get...
boolean function(int numLinks) throws IOException { if (isUnlinked()) { return false; } File file = getBlockFile(); if (file == null getVolume() == null) { throw new IOException(STR + this); } File meta = getMetaFile(); if (HardLink.getLinkCount(file) > numLinks) { DataNode.LOG.info(STR + this); unlinkFile(file, this);...
/** * Remove a hard link by copying the block to a temporary place and * then moving it back * @param numLinks number of hard links * @return true if copy is successful; * false if it is already detached or no need to be detached * @throws IOException if there is any copy error */
Remove a hard link by copying the block to a temporary place and then moving it back
unlinkBlock
{ "repo_name": "jonathangizmo/HadoopDistJ", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java", "license": "mit", "size": 9790 }
[ "java.io.File", "java.io.IOException", "org.apache.hadoop.fs.HardLink" ]
import java.io.File; import java.io.IOException; import org.apache.hadoop.fs.HardLink;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,824,092
protected String getSqlForEvery(AliasedField aliasedField) { return "MIN(" + getSqlFrom(aliasedField) + ")"; };
String function(AliasedField aliasedField) { return "MIN(" + getSqlFrom(aliasedField) + ")"; };
/** * Converts the every function into SQL. * * @param aliasedField the field to get the minimum for. * @return a string representation of the SQL. * @see org.alfasoftware.morf.sql.element.Function#every(AliasedField) */
Converts the every function into SQL
getSqlForEvery
{ "repo_name": "badgerwithagun/morf", "path": "morf-core/src/main/java/org/alfasoftware/morf/jdbc/SqlDialect.java", "license": "apache-2.0", "size": 128834 }
[ "org.alfasoftware.morf.sql.element.AliasedField" ]
import org.alfasoftware.morf.sql.element.AliasedField;
import org.alfasoftware.morf.sql.element.*;
[ "org.alfasoftware.morf" ]
org.alfasoftware.morf;
75,046
public void setExecutorService(ExecutorService execSvc){ this.execSvc = execSvc; }
void function(ExecutorService execSvc){ this.execSvc = execSvc; }
/** * Sets executor service. * * @param execSvc Executor service */
Sets executor service
setExecutorService
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/test/java/org/apache/ignite/testframework/junits/GridTestKernalContext.java", "license": "apache-2.0", "size": 3989 }
[ "java.util.concurrent.ExecutorService" ]
import java.util.concurrent.ExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,562,905
public static StartEndDate getLocalStartEndDate(Date theDate, TimeZone theTimeZone) { DateTime localDate = new DateTime(theDate, DateTimeZone.forTimeZone(theTimeZone)); return new StartEndDate(localDate.toString(ISODateTimeFormat.dateTimeNoMillis())); }
static StartEndDate function(Date theDate, TimeZone theTimeZone) { DateTime localDate = new DateTime(theDate, DateTimeZone.forTimeZone(theTimeZone)); return new StartEndDate(localDate.toString(ISODateTimeFormat.dateTimeNoMillis())); }
/** * Create a new StartEndDate using the given Date and TimeZone * @param theDate the Date to set the StartEndDate to. (UTC is implied). * @param theTimeZone the timeZone to convert the given timestamp to. * @return a StartEndDate with the dateStr correctly set to the given time zone. */
Create a new StartEndDate using the given Date and TimeZone
getLocalStartEndDate
{ "repo_name": "OpenAMEE/amee.platform.api", "path": "amee-platform-science/src/main/java/com/amee/platform/science/StartEndDate.java", "license": "mit", "size": 3328 }
[ "java.util.Date", "java.util.TimeZone", "org.joda.time.DateTime", "org.joda.time.DateTimeZone", "org.joda.time.format.ISODateTimeFormat" ]
import java.util.Date; import java.util.TimeZone; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.ISODateTimeFormat;
import java.util.*; import org.joda.time.*; import org.joda.time.format.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
721,859
public String displaySearch(String fieldname, String className, XWikiCriteria criteria) throws XWikiException { return this.xwiki.displaySearch(fieldname, className, criteria, getXWikiContext()); }
String function(String fieldname, String className, XWikiCriteria criteria) throws XWikiException { return this.xwiki.displaySearch(fieldname, className, criteria, getXWikiContext()); }
/** * API to display a field in search mode for a specific class with preselected values This field data can then be * used to generate an XWiki Query showing a table with the relevant data * * @param fieldname field name in the class * @param className class name to display the field from ...
API to display a field in search mode for a specific class with preselected values This field data can then be used to generate an XWiki Query showing a table with the relevant data
displaySearch
{ "repo_name": "xwiki-labs/sankoreorg", "path": "xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java", "license": "lgpl-2.1", "size": 124899 }
[ "com.xpn.xwiki.XWikiException", "com.xpn.xwiki.plugin.query.XWikiCriteria" ]
import com.xpn.xwiki.XWikiException; import com.xpn.xwiki.plugin.query.XWikiCriteria;
import com.xpn.xwiki.*; import com.xpn.xwiki.plugin.query.*;
[ "com.xpn.xwiki" ]
com.xpn.xwiki;
1,650,870
public TextComponent getTextComponent();
TextComponent function();
/** * Get the text component * @return */
Get the text component
getTextComponent
{ "repo_name": "bwyap/java-engine-lwjgl", "path": "src/com/bwyap/engine/gui/interfaces/ITextDisplay.java", "license": "mit", "size": 325 }
[ "com.bwyap.engine.gui.element.properties.TextComponent" ]
import com.bwyap.engine.gui.element.properties.TextComponent;
import com.bwyap.engine.gui.element.properties.*;
[ "com.bwyap.engine" ]
com.bwyap.engine;
1,934,843
@Test(timeout = 120_000L) public void testEndOfShard() throws Exception { recordSupplier.assign(EasyMock.anyObject()); EasyMock.expectLastCall().anyTimes(); EasyMock.expect(recordSupplier.getEarliestSequenceNumber(EasyMock.anyObject())).andReturn("0").anyTimes(); recordSupplier.seek(EasyMock.any...
@Test(timeout = 120_000L) void function() throws Exception { recordSupplier.assign(EasyMock.anyObject()); EasyMock.expectLastCall().anyTimes(); EasyMock.expect(recordSupplier.getEarliestSequenceNumber(EasyMock.anyObject())).andReturn("0").anyTimes(); recordSupplier.seek(EasyMock.anyObject(), EasyMock.anyString()); Easy...
/** * Tests handling of a closed shard. The task is initially given an unlimited end sequence number and * eventually gets an EOS marker which causes it to stop reading. */
Tests handling of a closed shard. The task is initially given an unlimited end sequence number and eventually gets an EOS marker which causes it to stop reading
testEndOfShard
{ "repo_name": "jon-wei/druid", "path": "extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/KinesisIndexTaskTest.java", "license": "apache-2.0", "size": 107453 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableMap", "com.google.common.collect.ImmutableSet", "com.google.common.util.concurrent.ListenableFuture", "java.util.List", "org.apache.druid.data.input.impl.ByteEntity", "org.apache.druid.indexer.TaskState", "org.apache.druid....
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; import java.util.List; import org.apache.druid.data.input.impl.ByteEntity; import org.apache.druid.indexer.TaskState; i...
import com.google.common.collect.*; import com.google.common.util.concurrent.*; import java.util.*; import org.apache.druid.data.input.impl.*; import org.apache.druid.indexer.*; import org.apache.druid.indexing.seekablestream.*; import org.apache.druid.indexing.seekablestream.common.*; import org.easymock.*; import org...
[ "com.google.common", "java.util", "org.apache.druid", "org.easymock", "org.junit" ]
com.google.common; java.util; org.apache.druid; org.easymock; org.junit;
246,019
DerValue val = in.getDerValue(); // save the DER encoding with its proper tag byte. byte[] derEncoding = val.toByteArray(); derEncoding[0] = DerValue.tag_SetOf; DerInputStream derIn = new DerInputStream(derEncoding); DerValue[] derVals = derIn.getSet(3,true); P...
DerValue val = in.getDerValue(); byte[] derEncoding = val.toByteArray(); derEncoding[0] = DerValue.tag_SetOf; DerInputStream derIn = new DerInputStream(derEncoding); DerValue[] derVals = derIn.getSet(3,true); PKCS9Attribute attrib; ObjectIdentifier oid; boolean reuseEncoding = true; for (int i=0; i < derVals.length; i+...
/** * Decode this set of PKCS9 attributes from the contents of its * DER encoding. Ignores unsupported attributes when directed. * * @param in * the contents of the DER encoding of the attribute set. * * @exception IOException * on i/o error, encoding syntax error, unacceptable o...
Decode this set of PKCS9 attributes from the contents of its DER encoding. Ignores unsupported attributes when directed
decode
{ "repo_name": "nypgit/alto", "path": "src/alto/sec/pkcs/PKCS9Attributes.java", "license": "lgpl-3.0", "size": 12741 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,118,090
@Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, State state) { super.getItemOffsets(outRect, view, parent, state); if (parent.getChildAdapterPosition(view) <= mWrapAdapter.getHeadersCount() + 1) { return; } ...
void function(Rect outRect, View view, RecyclerView parent, State state) { super.getItemOffsets(outRect, view, parent, state); if (parent.getChildAdapterPosition(view) <= mWrapAdapter.getHeadersCount() + 1) { return; } mOrientation = ((LinearLayoutManager) parent.getLayoutManager()).getOrientation(); if (mOrientation =...
/** * Determines the size and location of offsets between items in the parent * RecyclerView. * * @param outRect The {@link Rect} of offsets to be added around the child * view * @param view The child view to be decorated with an offset * @pa...
Determines the size and location of offsets between items in the parent RecyclerView
getItemOffsets
{ "repo_name": "wpy2016/TimeContrloller", "path": "app/src/main/java/com/wpy/faxianbei/sk/ui/xrecyclerview/XRecyclerView.java", "license": "gpl-2.0", "size": 28016 }
[ "android.graphics.Rect", "android.support.v7.widget.LinearLayoutManager", "android.support.v7.widget.RecyclerView", "android.view.View" ]
import android.graphics.Rect; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View;
import android.graphics.*; import android.support.v7.widget.*; import android.view.*;
[ "android.graphics", "android.support", "android.view" ]
android.graphics; android.support; android.view;
819,596
public HTMLCollection getFrames();
HTMLCollection function();
/** * Gets a collection of frames from the document currently in the context. */
Gets a collection of frames from the document currently in the context
getFrames
{ "repo_name": "lobobrowser/Cobra", "path": "src/main/java/org/cobraparser/html/HtmlRendererContext.java", "license": "mit", "size": 12034 }
[ "org.w3c.dom.html.HTMLCollection" ]
import org.w3c.dom.html.HTMLCollection;
import org.w3c.dom.html.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,692,207
SortedSet<String> getChildren(long waitMillis) throws KeeperException, InterruptedException { long waitNanos = TimeUnit.MILLISECONDS.toNanos(waitMillis); while (waitNanos > 0) { // Trigger a fetch if needed. firstElement(); updateLock.lockInterruptibly(); try { if (!knownChildr...
SortedSet<String> getChildren(long waitMillis) throws KeeperException, InterruptedException { long waitNanos = TimeUnit.MILLISECONDS.toNanos(waitMillis); while (waitNanos > 0) { firstElement(); updateLock.lockInterruptibly(); try { if (!knownChildren.isEmpty()) { return new TreeSet<>(knownChildren); } waitNanos = notEm...
/** * Return the currently-known set of children from memory. If there are no children, * waits up to {@code waitMillis} for at least one child to become available. May * update the set of known children. */
Return the currently-known set of children from memory. If there are no children, waits up to waitMillis for at least one child to become available. May update the set of known children
getChildren
{ "repo_name": "PATRIC3/p3_solr", "path": "solr/core/src/java/org/apache/solr/cloud/DistributedQueue.java", "license": "apache-2.0", "size": 13841 }
[ "com.google.common.collect.ImmutableSortedSet", "java.util.SortedSet", "java.util.TreeSet", "java.util.concurrent.TimeUnit", "org.apache.zookeeper.KeeperException" ]
import com.google.common.collect.ImmutableSortedSet; import java.util.SortedSet; import java.util.TreeSet; import java.util.concurrent.TimeUnit; import org.apache.zookeeper.KeeperException;
import com.google.common.collect.*; import java.util.*; import java.util.concurrent.*; import org.apache.zookeeper.*;
[ "com.google.common", "java.util", "org.apache.zookeeper" ]
com.google.common; java.util; org.apache.zookeeper;
440,016
public boolean acceptQualifiedName(QualifiedName qualifiedName);
boolean function(QualifiedName qualifiedName);
/** * Returns whether the given qualified name should be accepted. * @param qualifiedName the qualified name. * @return true if the name should be accepted; false otherwise. */
Returns whether the given qualified name should be accepted
acceptQualifiedName
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/filter/QualifiedNameFilter.java", "license": "bsd-3-clause", "size": 2335 }
[ "org.openquark.cal.compiler.QualifiedName" ]
import org.openquark.cal.compiler.QualifiedName;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
1,205,517
public void apply(ApiTestRequest request) { operation.apply(request, header); } }
void function(ApiTestRequest request) { operation.apply(request, header); } }
/** * Applies this operation to the specified request. * * @param request the request to configure */
Applies this operation to the specified request
apply
{ "repo_name": "probedock/java-api-test", "path": "src/main/java/io/probedock/api/test/headers/ApiHeadersManager.java", "license": "mit", "size": 8440 }
[ "io.probedock.api.test.client.ApiTestRequest" ]
import io.probedock.api.test.client.ApiTestRequest;
import io.probedock.api.test.client.*;
[ "io.probedock.api" ]
io.probedock.api;
1,834,224
Bank getBank(int localBankIndex) { if (banks != null) { return banks[localBankIndex]; } else { return null; } }
Bank getBank(int localBankIndex) { if (banks != null) { return banks[localBankIndex]; } else { return null; } }
/** * used only for unit testing * * @param localBankIndex 0-based position of bank to return * @return the bank at the position specified */
used only for unit testing
getBank
{ "repo_name": "theHilikus/JRoboCom", "path": "jrobocom-core/src/main/java/com/github/thehilikus/jrobocom/robot/Robot.java", "license": "gpl-3.0", "size": 16577 }
[ "com.github.thehilikus.jrobocom.player.Bank" ]
import com.github.thehilikus.jrobocom.player.Bank;
import com.github.thehilikus.jrobocom.player.*;
[ "com.github.thehilikus" ]
com.github.thehilikus;
90,043
public boolean isApplicable(Item item);
boolean function(Item item);
/** * Determines whether this form processor is applicable for * the supplied item * * @param item The item the form is being generated for * @return true if the processor is applicable */
Determines whether this form processor is applicable for the supplied item
isApplicable
{ "repo_name": "thumx/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/forms/processor/FormProcessor.java", "license": "lgpl-3.0", "size": 2944 }
[ "org.alfresco.repo.forms.Item" ]
import org.alfresco.repo.forms.Item;
import org.alfresco.repo.forms.*;
[ "org.alfresco.repo" ]
org.alfresco.repo;
1,775,462
public UniqueId writeTimeSeries(final String description, final String dataSource, final String dataProvider, final String dataField, final String observationTime, final ExternalIdBundle externalIdBundle, final ExternalIdSearchType externalIdSearchType, final LocalDateDoubleTimeSeries timeSeries) { Ar...
UniqueId function(final String description, final String dataSource, final String dataProvider, final String dataField, final String observationTime, final ExternalIdBundle externalIdBundle, final ExternalIdSearchType externalIdSearchType, final LocalDateDoubleTimeSeries timeSeries) { ArgumentChecker.notNull(descriptio...
/** * Adds or updates a time-series in the master. Can be a sub-set of the data points present and will not 'erase' * points that are missing, only supplement them. * * @param description a description of the time-series for display purposes, not null * @param dataSource the data source, not null *...
Adds or updates a time-series in the master. Can be a sub-set of the data points present and will not 'erase' points that are missing, only supplement them
writeTimeSeries
{ "repo_name": "McLeodMoores/starling", "path": "projects/master/src/main/java/com/opengamma/master/historicaltimeseries/impl/HistoricalTimeSeriesMasterUtils.java", "license": "apache-2.0", "size": 12970 }
[ "com.opengamma.id.ExternalIdBundle", "com.opengamma.id.ExternalIdBundleWithDates", "com.opengamma.id.ExternalIdSearch", "com.opengamma.id.ExternalIdSearchType", "com.opengamma.id.UniqueId", "com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoDocument", "com.opengamma.master.historicaltime...
import com.opengamma.id.ExternalIdBundle; import com.opengamma.id.ExternalIdBundleWithDates; import com.opengamma.id.ExternalIdSearch; import com.opengamma.id.ExternalIdSearchType; import com.opengamma.id.UniqueId; import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoDocument; import com.opengamma.m...
import com.opengamma.id.*; import com.opengamma.master.historicaltimeseries.*; import com.opengamma.timeseries.date.localdate.*; import com.opengamma.util.*;
[ "com.opengamma.id", "com.opengamma.master", "com.opengamma.timeseries", "com.opengamma.util" ]
com.opengamma.id; com.opengamma.master; com.opengamma.timeseries; com.opengamma.util;
498,504
public static Object findResult(Object self, Closure closure) { for (Iterator iter = InvokerHelper.asIterator(self); iter.hasNext();) { Object value = iter.next(); Object result = closure.call(value); if (result != null) { return result; } ...
static Object function(Object self, Closure closure) { for (Iterator iter = InvokerHelper.asIterator(self); iter.hasNext();) { Object value = iter.next(); Object result = closure.call(value); if (result != null) { return result; } } return null; } /** * Finds the first value matching the closure condition. Example: * <...
/** * Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns null. * * @param self an Object with an iterator returning its values * @param closure a closure that returns a non-null value...
Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns null
findResult
{ "repo_name": "xien777/yajsw", "path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "lgpl-2.1", "size": 704150 }
[ "groovy.lang.Closure", "java.util.Iterator" ]
import groovy.lang.Closure; import java.util.Iterator;
import groovy.lang.*; import java.util.*;
[ "groovy.lang", "java.util" ]
groovy.lang; java.util;
2,415,712
public void setParameters(HashMap<String, String> parameters) { this.parameters = parameters; }
void function(HashMap<String, String> parameters) { this.parameters = parameters; }
/** * For unit testing. * @param parameters parameters to set */
For unit testing
setParameters
{ "repo_name": "maxdelo77/replyit-master-3.2-final", "path": "src/java/com/sapienter/jbilling/server/rule/task/VelocityRulesGeneratorTask.java", "license": "agpl-3.0", "size": 5084 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,688,325
void exitParamPair(@NotNull AnsaGrammarParser.ParamPairContext ctx);
void exitParamPair(@NotNull AnsaGrammarParser.ParamPairContext ctx);
/** * Exit a parse tree produced by {@link AnsaGrammarParser#paramPair}. * * @param ctx * the parse tree */
Exit a parse tree produced by <code>AnsaGrammarParser#paramPair</code>
exitParamPair
{ "repo_name": "tzbee/ansa-bot", "path": "src/com/touzbi/ansa/antlrgrammar/AnsaGrammarListener.java", "license": "mit", "size": 4423 }
[ "com.sun.istack.internal.NotNull" ]
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.*;
[ "com.sun.istack" ]
com.sun.istack;
2,401,631
@Test public void testBuilderWithIncorrectPropertyTypeAndLossyCast() { assertThrows( IllegalArgumentException.class, () -> Projo.builder(Interval.class).with(Interval::begin, -1).with(Interval::end, 1L).build()); }
void function() { assertThrows( IllegalArgumentException.class, () -> Projo.builder(Interval.class).with(Interval::begin, -1).with(Interval::end, 1L).build()); }
/** * Tests the opposite scenario of {@link #testBuilderWithIncorrectPropertyTypeLong()}. Despite the fact that * the type system allows it, passing a {@code long} for an {@code int} should not be permitted because a * {@code long} cannot be losslessly converted to an {@code int} and should therefore result...
Tests the opposite scenario of <code>#testBuilderWithIncorrectPropertyTypeLong()</code>. Despite the fact that the type system allows it, passing a long for an int should not be permitted because a long cannot be losslessly converted to an int and should therefore result in an exception
testBuilderWithIncorrectPropertyTypeAndLossyCast
{ "repo_name": "raner/projo", "path": "projo/src/test/java/pro/projo/BuilderTest.java", "license": "apache-2.0", "size": 6513 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
678,155
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { return this.getBiomeGenAt(par1ArrayOfBiomeGenBase, par2, par3, par4, par5, true); }
BiomeGenBase[] function(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) { return this.getBiomeGenAt(par1ArrayOfBiomeGenBase, par2, par3, par4, par5, true); }
/** * Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the * WorldChunkManager Args: oldBiomeList, x, z, width, depth */
Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the WorldChunkManager Args: oldBiomeList, x, z, width, depth
loadBlockGeneratorData
{ "repo_name": "DirectCodeGraveyard/Minetweak", "path": "src/main/java/net/minecraft/world/chunk/WorldChunkManager.java", "license": "lgpl-3.0", "size": 7931 }
[ "net.minecraft.world.biome.BiomeGenBase" ]
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.*;
[ "net.minecraft.world" ]
net.minecraft.world;
1,529,602
public void setAllNote(Map<String, NXnote> note);
void function(Map<String, NXnote> note);
/** * Set multiple child nodes of a particular type. * <ul> * <li> * describe an additional information in a note*</li> * </ul> * * @param note the child nodes to add */
Set multiple child nodes of a particular type. describe an additional information in a note*
setAllNote
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXaperture.java", "license": "epl-1.0", "size": 6548 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,110,314
@SuppressWarnings("unchecked") protected static Method findSuitableMethod(Class targetClass, String MethodName, Delegator templ) { Class[] args = templ.getArguments(); Class retClass = templ.getReturn(); // perfect match try { Method ret = targetClass.getMethod(...
@SuppressWarnings(STR) static Method function(Class targetClass, String MethodName, Delegator templ) { Class[] args = templ.getArguments(); Class retClass = templ.getReturn(); try { Method ret = targetClass.getMethod(MethodName, args); if (!isValidReturn(ret, retClass)) throw new IllegalArgumentException(REQUESTED_METH...
/** * Utility method to locate a proper Method object */
Utility method to locate a proper Method object
findSuitableMethod
{ "repo_name": "SK-HOLDINGS-CC/NEXCORE-UML-Modeler", "path": "nexcore.tool.uml.core/src/java/nexcore/tool/uml/core/util/Delegator.java", "license": "epl-1.0", "size": 17383 }
[ "java.lang.reflect.Method", "java.lang.reflect.Modifier" ]
import java.lang.reflect.Method; import java.lang.reflect.Modifier;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
294,788
@Override protected SpreadSheet doRead(Reader r) { m_Header = null; if (r instanceof BufferedReader) m_Reader = (BufferedReader) r; else m_Reader = new BufferedReader(r); return nextChunk(); }
SpreadSheet function(Reader r) { m_Header = null; if (r instanceof BufferedReader) m_Reader = (BufferedReader) r; else m_Reader = new BufferedReader(r); return nextChunk(); }
/** * Performs the actual reading. * * @param r the reader to read from * @return the spreadsheet or null in case of an error * @see #getInputType() */
Performs the actual reading
doRead
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-spreadsheet/src/main/java/adams/data/io/input/SimpleStreamSpreadSheetReader.java", "license": "gpl-3.0", "size": 11940 }
[ "java.io.BufferedReader", "java.io.Reader" ]
import java.io.BufferedReader; import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
1,169,709
@Override public API getLightweightAPIByUUID(String uuid, String requestedTenantDomain) throws APIManagementException { try { Organization org = new Organization(requestedTenantDomain); DevPortalAPI devPortalApi = apiPersistenceInstance.getDevPortalAPI(org, uuid); if ...
API function(String uuid, String requestedTenantDomain) throws APIManagementException { try { Organization org = new Organization(requestedTenantDomain); DevPortalAPI devPortalApi = apiPersistenceInstance.getDevPortalAPI(org, uuid); if (devPortalApi != null) { checkVisibilityPermission(userNameWithoutChange, devPortalA...
/** * Get minimal details of API by registry artifact id * * @param uuid Registry artifact id * @return API of the provided artifact id * @throws APIManagementException */
Get minimal details of API by registry artifact id
getLightweightAPIByUUID
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java", "license": "apache-2.0", "size": 317390 }
[ "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.APIMgtResourceNotFoundException", "org.wso2.carbon.apimgt.impl.utils.APIUtil", "org.wso2.carbon.apimgt.persistence.dto.DevPortalAPI", "org.wso2.carbon.apimgt.persistence.dto.Organization", "org.wso2.carbon.apimgt.persistence....
import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIMgtResourceNotFoundException; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.wso2.carbon.apimgt.persistence.dto.DevPortalAPI; import org.wso2.carbon.apimgt.persistence.dto.Organization; import org.wso2.carbon.ap...
import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.apimgt.persistence.dto.*; import org.wso2.carbon.apimgt.persistence.exceptions.*; import org.wso2.carbon.apimgt.persistence.mapper.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
945,032
void setCacheColorHint(int color) { if (mViewTypeCount == 1) { final ArrayList<View> scrap = mCurrentScrap; final int scrapCount = scrap.size(); for (int i = 0; i < scrapCount; i++) { scrap.get(i).setDrawingCacheBackgroundColor(colo...
void setCacheColorHint(int color) { if (mViewTypeCount == 1) { final ArrayList<View> scrap = mCurrentScrap; final int scrapCount = scrap.size(); for (int i = 0; i < scrapCount; i++) { scrap.get(i).setDrawingCacheBackgroundColor(color); } } else { final int typeCount = mViewTypeCount; for (int i = 0; i < typeCount; i++)...
/** * Updates the cache color hint of all known views. * * @param color The new cache color hint. */
Updates the cache color hint of all known views
setCacheColorHint
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/core/java/android/widget/AbsListView.java", "license": "gpl-2.0", "size": 262204 }
[ "android.view.View", "java.util.ArrayList" ]
import android.view.View; import java.util.ArrayList;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
2,207,676
public static String getVersion() { String version = ""; InputStream stream = null; try { stream = StringUtils.class.getResourceAsStream(Constants.VERSION_RESOURCE_PATH); try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) { version = reader.readLine(); if (versi...
static String function() { String version = STRSTR"; } finally { if (stream!=null) { try{stream.close();} catch (IOException e) {} } } return version; }
/** * Returns jboard version. * @return jboard version. */
Returns jboard version
getVersion
{ "repo_name": "asher-stern/jboard", "path": "src/org/jboard/jboard/utilities/StringUtils.java", "license": "mit", "size": 3642 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,565,603
protected String getEndpointRouting(AbstractEndpoint endpoint) { throw new UnsupportedOperationException(); }
String function(AbstractEndpoint endpoint) { throw new UnsupportedOperationException(); }
/** * For implementations that rely on explicit routing, return the routing expression. */
For implementations that rely on explicit routing, return the routing expression
getEndpointRouting
{ "repo_name": "pperalta/spring-cloud-stream", "path": "spring-cloud-stream-binders/spring-cloud-stream-binder-test/src/main/java/org/springframework/cloud/stream/binder/PartitionCapableBinderTests.java", "license": "apache-2.0", "size": 14401 }
[ "org.springframework.integration.endpoint.AbstractEndpoint" ]
import org.springframework.integration.endpoint.AbstractEndpoint;
import org.springframework.integration.endpoint.*;
[ "org.springframework.integration" ]
org.springframework.integration;
1,491,176
public static long decrementAndGet(AtomicLong al) { return Atomic.decrementAndGet(al); }
static long function(AtomicLong al) { return Atomic.decrementAndGet(al); }
/** * Atomically decrements by one the current value. * * @param al AtomicLong whose value is decremented. * @return the updated value */
Atomically decrements by one the current value
decrementAndGet
{ "repo_name": "haitaoyao/btrace", "path": "src/share/classes/com/sun/btrace/BTraceUtils.java", "license": "gpl-2.0", "size": 234341 }
[ "java.util.concurrent.atomic.AtomicLong" ]
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,733,934
public void addIngredient(String recipeName, int versionId, Ingredient ingredient, int position) throws SQLException, IOException, ParseException { try (DBIngredient dbIngredient = new DBIngredient()) { if (!dbIngredient.exists(ingredient.getName())) { dbIngredient.n...
void function(String recipeName, int versionId, Ingredient ingredient, int position) throws SQLException, IOException, ParseException { try (DBIngredient dbIngredient = new DBIngredient()) { if (!dbIngredient.exists(ingredient.getName())) { dbIngredient.newIngredient(ingredient.getName()); } } final PreparedStatement p...
/** * Fuegt Zutat zu bestehendem Gericht hinzu */
Fuegt Zutat zu bestehendem Gericht hinzu
addIngredient
{ "repo_name": "anycook/anycook-api", "path": "src/main/java/de/anycook/db/mysql/DBSaveRecipe.java", "license": "gpl-3.0", "size": 13521 }
[ "de.anycook.recipe.ingredient.Ingredient", "java.io.IOException", "java.sql.PreparedStatement", "java.sql.SQLException", "org.apache.lucene.queryparser.classic.ParseException" ]
import de.anycook.recipe.ingredient.Ingredient; import java.io.IOException; import java.sql.PreparedStatement; import java.sql.SQLException; import org.apache.lucene.queryparser.classic.ParseException;
import de.anycook.recipe.ingredient.*; import java.io.*; import java.sql.*; import org.apache.lucene.queryparser.classic.*;
[ "de.anycook.recipe", "java.io", "java.sql", "org.apache.lucene" ]
de.anycook.recipe; java.io; java.sql; org.apache.lucene;
2,731,567
// TODO use an options parsing library if (args.length < 1) { LOG.error("Must provide at least one model file to render."); return; } for (final String filename : args) { try { // render the image and write it to the output file final BufferedImage image = ImageCreator.fro...
if (args.length < 1) { LOG.error(STR); return; } for (final String filename : args) { try { final BufferedImage image = ImageCreator.fromFile(filename); final File outputFile = new File(outputFilename(filename)); ImageIO.write(image, OUTPUT_FILE_TYPE, outputFile); } catch (final FileNotFoundException exception) { LOG.e...
/** * Renders the models specified by the files given as command line arguments. * * @param args * The command-line arguments. */
Renders the models specified by the files given as command line arguments
main
{ "repo_name": "jfinkels/jeffraytracer", "path": "src/main/java/jeffraytracer/main/Main.java", "license": "gpl-3.0", "size": 3462 }
[ "java.awt.image.BufferedImage", "java.io.File", "java.io.FileNotFoundException", "java.io.IOException", "javax.imageio.ImageIO" ]
import java.awt.image.BufferedImage; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import javax.imageio.ImageIO;
import java.awt.image.*; import java.io.*; import javax.imageio.*;
[ "java.awt", "java.io", "javax.imageio" ]
java.awt; java.io; javax.imageio;
2,196,180
public void moveEntityWithHeading(float strafe, float forward) { if (this.isInWater()) { this.moveFlying(strafe, forward, 0.02F); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.800000011920929D; this.motionY *= 0.80000...
void function(float strafe, float forward) { if (this.isInWater()) { this.moveFlying(strafe, forward, 0.02F); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0.800000011920929D; this.motionY *= 0.800000011920929D; this.motionZ *= 0.800000011920929D; } else if (this.isInLava()) { this.moveFlyi...
/** * Moves the entity based on the specified heading. Args: strafe, forward */
Moves the entity based on the specified heading. Args: strafe, forward
moveEntityWithHeading
{ "repo_name": "TorchPowered/CraftBloom", "path": "src/net/minecraft/entity/EntityFlying.java", "license": "mit", "size": 2804 }
[ "net.minecraft.util.BlockPos", "net.minecraft.util.MathHelper" ]
import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
2,530,994
@Test public void testSetAsInitial() { MozBackgroundSize backgroundSize = new MozBackgroundSize(); assertNotNull(backgroundSize.getWidth()); assertNotNull(backgroundSize.getHeight()); assertNotNull(backgroundSize.getWidthUnit()); assertNotNull(backgroundSize.getHeightUnit...
void function() { MozBackgroundSize backgroundSize = new MozBackgroundSize(); assertNotNull(backgroundSize.getWidth()); assertNotNull(backgroundSize.getHeight()); assertNotNull(backgroundSize.getWidthUnit()); assertNotNull(backgroundSize.getHeightUnit()); backgroundSize.setAsInitial(); assertEquals(MozBackgroundSize.IN...
/** * Test method for * {@link com.webfirmframework.wffweb.css.MozBackgroundSize#setAsInitial()}. */
Test method for <code>com.webfirmframework.wffweb.css.MozBackgroundSize#setAsInitial()</code>
testSetAsInitial
{ "repo_name": "webfirmframework/wff", "path": "wffweb/src/test/java/com/webfirmframework/wffweb/css/css3/MozBackgroundSizeTest.java", "license": "apache-2.0", "size": 15430 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
457,261
public BeanNameGenerator getNameGenerator() { return nameGenerator; }
BeanNameGenerator function() { return nameGenerator; }
/** * Gets beanNameGenerator to be used while running the scanner. * * @return the beanNameGenerator BeanNameGenerator that has been configured * @since 1.2.0 */
Gets beanNameGenerator to be used while running the scanner
getNameGenerator
{ "repo_name": "moishalo/MybatisSpring2.5.X", "path": "src/main/java/org/mybatis/spring/mapper/MapperScannerConfigurer.java", "license": "apache-2.0", "size": 13939 }
[ "org.springframework.beans.factory.support.BeanNameGenerator" ]
import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.beans.factory.support.*;
[ "org.springframework.beans" ]
org.springframework.beans;
694,036
public static List<PathFragment> asExpandedExecPaths(Iterable<Artifact> artifacts, MiddlemanExpander middlemanExpander) { List<PathFragment> result = new ArrayList<>(); addExpandedExecPaths(artifacts, result, middlemanExpander); return result; }
static List<PathFragment> function(Iterable<Artifact> artifacts, MiddlemanExpander middlemanExpander) { List<PathFragment> result = new ArrayList<>(); addExpandedExecPaths(artifacts, result, middlemanExpander); return result; }
/** * Converts a collection of artifacts into execution-time path fragments, and * returns those as a list. Middleman artifacts are expanded once. The * returned list is mutable. */
Converts a collection of artifacts into execution-time path fragments, and returns those as a list. Middleman artifacts are expanded once. The returned list is mutable
asExpandedExecPaths
{ "repo_name": "joshua0pang/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/Artifact.java", "license": "apache-2.0", "size": 26737 }
[ "com.google.devtools.build.lib.vfs.PathFragment", "java.util.ArrayList", "java.util.List" ]
import com.google.devtools.build.lib.vfs.PathFragment; import java.util.ArrayList; import java.util.List;
import com.google.devtools.build.lib.vfs.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
2,269,423
@Exported public final String getWhy() { CauseOfBlockage cob = getCauseOfBlockage(); return cob!=null ? cob.getShortDescription() : null; }
final String function() { CauseOfBlockage cob = getCauseOfBlockage(); return cob!=null ? cob.getShortDescription() : null; }
/** * Gets a human-readable status message describing why it's in the queue. */
Gets a human-readable status message describing why it's in the queue
getWhy
{ "repo_name": "jtnord/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 59609 }
[ "hudson.model.queue.CauseOfBlockage" ]
import hudson.model.queue.CauseOfBlockage;
import hudson.model.queue.*;
[ "hudson.model.queue" ]
hudson.model.queue;
2,296,363
@Test(expected = IOException.class) public void testDeserializeValueTooMany2() throws Exception { // Long + 2 bytes KvStateRequestSerializer.deserializeValue(new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 2, 2}, LongSerializer.INSTANCE); }
@Test(expected = IOException.class) void function() throws Exception { KvStateRequestSerializer.deserializeValue(new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 2, 2}, LongSerializer.INSTANCE); }
/** * Tests value deserialization with too many bytes. */
Tests value deserialization with too many bytes
testDeserializeValueTooMany2
{ "repo_name": "mtunique/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/query/netty/message/KvStateRequestSerializerTest.java", "license": "apache-2.0", "size": 20016 }
[ "java.io.IOException", "org.apache.flink.api.common.typeutils.base.LongSerializer", "org.junit.Test" ]
import java.io.IOException; import org.apache.flink.api.common.typeutils.base.LongSerializer; import org.junit.Test;
import java.io.*; import org.apache.flink.api.common.typeutils.base.*; import org.junit.*;
[ "java.io", "org.apache.flink", "org.junit" ]
java.io; org.apache.flink; org.junit;
1,488,332
private void buildClassifier() throws Exception { // Generate input format for classifier FastVector atts = new FastVector(); for (int i = 0; i < getInputFormat().numAttributes(); i++) { if (i == documentAtt) { atts.addElement(new Attribute("Term_frequency")); // 2 atts.addElement(new Attribute("ID...
void function() throws Exception { FastVector atts = new FastVector(); for (int i = 0; i < getInputFormat().numAttributes(); i++) { if (i == documentAtt) { atts.addElement(new Attribute(STR)); atts.addElement(new Attribute("IDF")); atts.addElement(new Attribute(STR)); atts.addElement(new Attribute(STR)); atts.addElemen...
/** * Builds the classifier. */
Builds the classifier
buildClassifier
{ "repo_name": "HIIT/maui-2", "path": "src/maui/filters/MauiFilter.java", "license": "gpl-3.0", "size": 60931 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
908,048
public Attribute getAttribute(AttributeKey key, String groupID) { Map<String, AttributeGroup> map = groups[key.getGroupType()]; if (!map.containsKey(groupID)) { map.put(groupID, new AttributeGroup(key.getGroupType(), groupID)); } return map.get(groupID).getAttribute(key); }
Attribute function(AttributeKey key, String groupID) { Map<String, AttributeGroup> map = groups[key.getGroupType()]; if (!map.containsKey(groupID)) { map.put(groupID, new AttributeGroup(key.getGroupType(), groupID)); } return map.get(groupID).getAttribute(key); }
/** * Get the specified attribute from the specified group * * @param key * @param groupID * @return */
Get the specified attribute from the specified group
getAttribute
{ "repo_name": "Subterranean-Security/Crimson", "path": "src/main/java/com/subterranean_security/crimson/sv/profile/Profile.java", "license": "apache-2.0", "size": 8091 }
[ "com.subterranean_security.crimson.core.attribute.Attribute", "com.subterranean_security.crimson.core.attribute.AttributeGroup", "com.subterranean_security.crimson.core.attribute.keys.AttributeKey", "java.util.Map" ]
import com.subterranean_security.crimson.core.attribute.Attribute; import com.subterranean_security.crimson.core.attribute.AttributeGroup; import com.subterranean_security.crimson.core.attribute.keys.AttributeKey; import java.util.Map;
import com.subterranean_security.crimson.core.attribute.*; import com.subterranean_security.crimson.core.attribute.keys.*; import java.util.*;
[ "com.subterranean_security.crimson", "java.util" ]
com.subterranean_security.crimson; java.util;
243,547
GenomeComparator getBestComparator();
GenomeComparator getBestComparator();
/** * Get the comparator that is used to choose the "true best" genome. This * uses the real score, and not the adjusted score. * <p/> * @return The best comparator. */
Get the comparator that is used to choose the "true best" genome. This uses the real score, and not the adjusted score.
getBestComparator
{ "repo_name": "ladygagapowerbot/bachelor-thesis-implementation", "path": "lib/Encog/src/main/java/org/encog/ml/ea/train/EvolutionaryAlgorithm.java", "license": "mit", "size": 7203 }
[ "org.encog.ml.ea.sort.GenomeComparator" ]
import org.encog.ml.ea.sort.GenomeComparator;
import org.encog.ml.ea.sort.*;
[ "org.encog.ml" ]
org.encog.ml;
2,006,643
public BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return Env.ZERO; return bd; }
/** Get Quantity. @return Quantity */
Get Quantity
getQty
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_W_BasketLine.java", "license": "gpl-2.0", "size": 6475 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
536,012
public List<org.ng200.openolympus.jooq.tables.pojos.Solution> fetchByFile(String... values) { return fetch(Solution.SOLUTION.FILE, values); }
List<org.ng200.openolympus.jooq.tables.pojos.Solution> function(String... values) { return fetch(Solution.SOLUTION.FILE, values); }
/** * Fetch records that have <code>file IN (values)</code> */
Fetch records that have <code>file IN (values)</code>
fetchByFile
{ "repo_name": "nickguletskii/OpenOlympus", "path": "src-gen/main/java/org/ng200/openolympus/jooq/tables/daos/SolutionDao.java", "license": "mit", "size": 4564 }
[ "java.util.List", "org.ng200.openolympus.jooq.tables.Solution" ]
import java.util.List; import org.ng200.openolympus.jooq.tables.Solution;
import java.util.*; import org.ng200.openolympus.jooq.tables.*;
[ "java.util", "org.ng200.openolympus" ]
java.util; org.ng200.openolympus;
1,261,515
private void plot(PixelCallback c, int x, int y, double alphaInterval) { int alpha = (int) Math.round(alphaInterval * 0xFF); Color color = paint.getColor(x, y); if (alpha != color.getAlpha()) { color = color.withAlpha(alpha); } c.accept(color, x, y); }
void function(PixelCallback c, int x, int y, double alphaInterval) { int alpha = (int) Math.round(alphaInterval * 0xFF); Color color = paint.getColor(x, y); if (alpha != color.getAlpha()) { color = color.withAlpha(alpha); } c.accept(color, x, y); }
/** * Plots the point at the specified location on the specified * {@code Canvas} with the specified alpha interval (0-1). * * @param canvas * the {@code Canvas} to draw on * @param x * the x point * @param y * the y point * @param alphaInterval * ...
Plots the point at the specified location on the specified Canvas with the specified alpha interval (0-1)
plot
{ "repo_name": "Omoshu/AGUIT", "path": "src/com/cionik/aguit/geometry/StyledLine.java", "license": "apache-2.0", "size": 7746 }
[ "com.cionik.aguit.graphics.Color", "com.cionik.aguit.graphics.PixelCallback" ]
import com.cionik.aguit.graphics.Color; import com.cionik.aguit.graphics.PixelCallback;
import com.cionik.aguit.graphics.*;
[ "com.cionik.aguit" ]
com.cionik.aguit;
1,637,349
@Override public Collection<KeyStoreEntry<K>> getEntries() { return unmodifiableEntries; }
Collection<KeyStoreEntry<K>> function() { return unmodifiableEntries; }
/** * Returns an unmodifiable copy of all entries currently in the store. Since this is only a * snapshot, modifications to the store after the call do not affect the returned entries. * * @return All entries currently in the store. */
Returns an unmodifiable copy of all entries currently in the store. Since this is only a snapshot, modifications to the store after the call do not affect the returned entries
getEntries
{ "repo_name": "timberdoodle/TimberdoodleApp", "path": "project/app/src/main/java/de/tu_darmstadt/adtn/generickeystore/KeyStore.java", "license": "gpl-2.0", "size": 5580 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,351,517
private long dispatchBlockMoves() throws InterruptedException { final long bytesLastMoved = getBytesMoved(); final Future<?>[] futures = new Future<?>[sources.size()];
long function() throws InterruptedException { final long bytesLastMoved = getBytesMoved(); final Future<?>[] futures = new Future<?>[sources.size()];
/** * Dispatch block moves for each source. The thread selects blocks to move & * sends request to proxy source to initiate block move. The process is flow * controlled. Block selection is blocked if there are too many un-confirmed * block moves. * * @return the total number of bytes successfully mov...
Dispatch block moves for each source. The thread selects blocks to move & sends request to proxy source to initiate block move. The process is flow controlled. Block selection is blocked if there are too many un-confirmed block moves
dispatchBlockMoves
{ "repo_name": "gilv/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java", "license": "apache-2.0", "size": 38709 }
[ "java.util.concurrent.Future" ]
import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,494,510
EReference getBasicJointType_Stiffness();
EReference getBasicJointType_Stiffness();
/** * Returns the meta object for the containment reference '{@link uk.ac.kcl.inf.robotics.rigidBodies.BasicJointType#getStiffness <em>Stiffness</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Stiffness</em>'. * @see uk.ac.kcl.inf.rob...
Returns the meta object for the containment reference '<code>uk.ac.kcl.inf.robotics.rigidBodies.BasicJointType#getStiffness Stiffness</code>'.
getBasicJointType_Stiffness
{ "repo_name": "szschaler/RigidBodies", "path": "uk.ac.kcl.inf.robotics.rigid_bodies/src-gen/uk/ac/kcl/inf/robotics/rigidBodies/RigidBodiesPackage.java", "license": "mit", "size": 163741 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
842,703
if (fis == null) { fis = new FileInputStream(file); } // Read either the maximum available data or size requested bytes (which ever is smaller) byte data[] = new byte[Math.min(fis.available(), size)]; // Don't try and read 0 bytes of data ... if (data.length > 0) { fis.read(data); } return data...
if (fis == null) { fis = new FileInputStream(file); } byte data[] = new byte[Math.min(fis.available(), size)]; if (data.length > 0) { fis.read(data); } return data; }
/** * Read up to <pre>size</pre> bytes from the file. * @param size The maximum size of data to return * @return An array of data. It may be zero length if there is no data available. * @throws IOException on IO Exception :-) */
Read up to <code>size</code> bytes from the file
read
{ "repo_name": "sovcik/jpigpio", "path": "JPigpio/src/jpigpio/FileIO.java", "license": "apache-2.0", "size": 1272 }
[ "java.io.FileInputStream" ]
import java.io.FileInputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,897,758
public synchronized List<LocatedBlock> getAllBlocks() throws IOException { return getBlockRange(0, getFileLength()); }
synchronized List<LocatedBlock> function() throws IOException { return getBlockRange(0, getFileLength()); }
/** * Return collection of blocks that has already been located. */
Return collection of blocks that has already been located
getAllBlocks
{ "repo_name": "yelshater/hadoop-2.3.0", "path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java", "license": "apache-2.0", "size": 62394 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.hdfs.protocol.LocatedBlock" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.hdfs.protocol.LocatedBlock;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
264,629
public static String queryObjectPathExpressionToString(Query q, List<Object> parameters, QueryObjectPathExpression ref) { StringBuffer retval = new StringBuffer(); retval.append(q.getAliases().get(ref.getQueryClass())) .append(".") .append(ref.getFieldName()); ...
static String function(Query q, List<Object> parameters, QueryObjectPathExpression ref) { StringBuffer retval = new StringBuffer(); retval.append(q.getAliases().get(ref.getQueryClass())) .append(".") .append(ref.getFieldName()); if (ref.getSubclass() != null) { Class<?> subclass = ref.getSubclass(); Collection<Class<?>...
/** * Converts a QueryObjectPathExpression into a String. * * @param q a Query, to provide aliases * @param parameters a List, in which this method will place objects corresponding to the * question marks in the resulting String * @param ref an Object to convert * @return a String ...
Converts a QueryObjectPathExpression into a String
queryObjectPathExpressionToString
{ "repo_name": "JoeCarlson/intermine", "path": "intermine/objectstore/main/src/org/intermine/objectstore/query/iql/IqlQuery.java", "license": "lgpl-2.1", "size": 38394 }
[ "java.util.Collection", "java.util.Collections", "java.util.HashSet", "java.util.List", "java.util.Set", "org.intermine.metadata.Util", "org.intermine.objectstore.query.Query", "org.intermine.objectstore.query.QueryObjectPathExpression", "org.intermine.objectstore.query.QuerySelectable" ]
import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import org.intermine.metadata.Util; import org.intermine.objectstore.query.Query; import org.intermine.objectstore.query.QueryObjectPathExpression; import org.intermine.objectstore.query.Que...
import java.util.*; import org.intermine.metadata.*; import org.intermine.objectstore.query.*;
[ "java.util", "org.intermine.metadata", "org.intermine.objectstore" ]
java.util; org.intermine.metadata; org.intermine.objectstore;
1,777,706
public static Long parseLong(CamelContext camelContext, String text) throws Exception { // ensure we support property placeholders String s = camelContext.resolvePropertyPlaceholders(text); if (s != null) { try { return camelContext.getTypeConverter().mandatoryCon...
static Long function(CamelContext camelContext, String text) throws Exception { String s = camelContext.resolvePropertyPlaceholders(text); if (s != null) { try { return camelContext.getTypeConverter().mandatoryConvertTo(Long.class, s); } catch (NumberFormatException e) { if (s.equals(text)) { throw new IllegalArgumentE...
/** * Parses the given text and converts it to an Long and handling property placeholders as well * * @param camelContext the camel context * @param text the text * @return the long vale, or <tt>null</tt> if the text was <tt>null</tt> * @throws Exception is thrown if illegal argument or t...
Parses the given text and converts it to an Long and handling property placeholders as well
parseLong
{ "repo_name": "curso007/camel", "path": "camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java", "license": "apache-2.0", "size": 35365 }
[ "org.apache.camel.CamelContext" ]
import org.apache.camel.CamelContext;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,823,717
protected void destroyMBeans(Context context) throws Exception { // Deregister ourselves as a ContainerListener context.removeContainerListener(this); // destroy the MBeans for the associated Valves if (context instanceof StandardContext) { Valve cValves[] = ((StandardContext) context).getValv...
void function(Context context) throws Exception { context.removeContainerListener(this); if (context instanceof StandardContext) { Valve cValves[] = ((StandardContext) context).getValves(); for (int l = 0; l < cValves.length; l++) { if (debug >= 4) log(STR + cValves[l]); MBeanUtils.destroyMBean(cValves[l], context); } ...
/** * Deregister the MBeans for the specified Context and its nested * components. * * @param context Context for which to deregister MBeans * @throws Exception if an exception is thrown during MBean destruction */
Deregister the MBeans for the specified Context and its nested components
destroyMBeans
{ "repo_name": "NorthFacing/step-by-Java", "path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/mbeans/ServerLifecycleListener.java", "license": "gpl-2.0", "size": 51276 }
[ "org.apache.catalina.Context", "org.apache.catalina.Loader", "org.apache.catalina.Logger", "org.apache.catalina.Manager", "org.apache.catalina.Realm", "org.apache.catalina.Valve", "org.apache.catalina.core.StandardContext", "org.apache.catalina.deploy.NamingResources" ]
import org.apache.catalina.Context; import org.apache.catalina.Loader; import org.apache.catalina.Logger; import org.apache.catalina.Manager; import org.apache.catalina.Realm; import org.apache.catalina.Valve; import org.apache.catalina.core.StandardContext; import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.*; import org.apache.catalina.core.*; import org.apache.catalina.deploy.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,587,807
public ServiceResponseWithHeaders<Void, LROSADsPost202RetryInvalidHeaderHeadersInner> beginPost202RetryInvalidHeader(ProductInner product) throws CloudException, IOException { Validator.validate(product); Call<ResponseBody> call = service.beginPost202RetryInvalidHeader(product, this.client.acceptLan...
ServiceResponseWithHeaders<Void, LROSADsPost202RetryInvalidHeaderHeadersInner> function(ProductInner product) throws CloudException, IOException { Validator.validate(product); Call<ResponseBody> call = service.beginPost202RetryInvalidHeader(product, this.client.acceptLanguage(), this.client.userAgent()); return beginPo...
/** * Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers. * * @param product Product to put * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization ...
Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers
beginPost202RetryInvalidHeader
{ "repo_name": "John-Hart/autorest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROSADsInner.java", "license": "mit", "size": 244077 }
[ "com.microsoft.azure.CloudException", "com.microsoft.rest.ServiceResponseWithHeaders", "com.microsoft.rest.Validator", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import com.microsoft.rest.Validator; import java.io.IOException;
import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.io" ]
com.microsoft.azure; com.microsoft.rest; java.io;
2,080,596
public void setEncoding(String encoding) { setOutputProperty(OutputKeys.ENCODING,encoding); } static final class BoolStack { private boolean m_values[]; private int m_allocatedSize; private int m_index; public BoolS...
void function(String encoding) { setOutputProperty(OutputKeys.ENCODING,encoding); } static final class BoolStack { private boolean m_values[]; private int m_allocatedSize; private int m_index; public BoolStack() { this(32); } public BoolStack(int size) { m_allocatedSize = size; m_values = new boolean[size]; m_index = -...
/** * Sets the character encoding coming from the xsl:output encoding stylesheet attribute. * @param encoding the character encoding */
Sets the character encoding coming from the xsl:output encoding stylesheet attribute
setEncoding
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.xml/src/main/resources/META-INF/modules/java.xml/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java", "license": "apache-2.0", "size": 125544 }
[ "javax.xml.transform.OutputKeys" ]
import javax.xml.transform.OutputKeys;
import javax.xml.transform.*;
[ "javax.xml" ]
javax.xml;
2,611,556
@XLFunction(name = "Method", description = "Call a named Java method", category = "Java", typeConversionMode = TypeConversionMode.PASSTHROUGH) public static Object jMethod(@XLParameter(name = "object reference", description = "The object reference") final XLObject objectReference, @XLParamet...
@XLFunction(name = STR, description = STR, category = "Java", typeConversionMode = TypeConversionMode.PASSTHROUGH) static Object function(@XLParameter(name = STR, description = STR) final XLObject objectReference, @XLParameter(name = STR, description = STR) final XLString methodName, @XLParameter(name = "args", descrip...
/** * Invoke a method on a class, converting the result to an Excel type if possible. * * @param objectReference * the object reference * @param methodName * the name of the method * @param args * a vararg list of arguments * @return the result, converted to an Exce...
Invoke a method on a class, converting the result to an Excel type if possible
jMethod
{ "repo_name": "McLeodMoores/xl4j", "path": "xll-java/src/main/java/com/mcleodmoores/xl4j/v1/javacode/JMethod.java", "license": "gpl-3.0", "size": 13571 }
[ "com.mcleodmoores.xl4j.v1.api.annotations.TypeConversionMode", "com.mcleodmoores.xl4j.v1.api.annotations.XLFunction", "com.mcleodmoores.xl4j.v1.api.annotations.XLParameter", "com.mcleodmoores.xl4j.v1.api.core.Excel", "com.mcleodmoores.xl4j.v1.api.core.ExcelFactory", "com.mcleodmoores.xl4j.v1.api.core.Heap...
import com.mcleodmoores.xl4j.v1.api.annotations.TypeConversionMode; import com.mcleodmoores.xl4j.v1.api.annotations.XLFunction; import com.mcleodmoores.xl4j.v1.api.annotations.XLParameter; import com.mcleodmoores.xl4j.v1.api.core.Excel; import com.mcleodmoores.xl4j.v1.api.core.ExcelFactory; import com.mcleodmoores.xl4j...
import com.mcleodmoores.xl4j.v1.api.annotations.*; import com.mcleodmoores.xl4j.v1.api.core.*; import com.mcleodmoores.xl4j.v1.api.values.*; import java.util.*;
[ "com.mcleodmoores.xl4j", "java.util" ]
com.mcleodmoores.xl4j; java.util;
2,803,273
public final void setConfirmPassword(IContext context, String confirmpassword) { getMendixObject().setValue(context, MemberNames.ConfirmPassword.toString(), confirmpassword); }
final void function(IContext context, String confirmpassword) { getMendixObject().setValue(context, MemberNames.ConfirmPassword.toString(), confirmpassword); }
/** * Set value of ConfirmPassword * @param context * @param confirmpassword */
Set value of ConfirmPassword
setConfirmPassword
{ "repo_name": "mendix/circle-diagram-widget", "path": "test4X/javasource/administration/proxies/AccountPasswordData.java", "license": "apache-2.0", "size": 9118 }
[ "com.mendix.systemwideinterfaces.core.IContext" ]
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.systemwideinterfaces.core.*;
[ "com.mendix.systemwideinterfaces" ]
com.mendix.systemwideinterfaces;
1,517,476
public Node lastChild() { Node result = lastChild(currentNode); if (result != null) { currentNode = result; } return result; }
Node function() { Node result = lastChild(currentNode); if (result != null) { currentNode = result; } return result; }
/** * <b>DOM</b>: Implements {@link TreeWalker#lastChild()}. */
DOM: Implements <code>TreeWalker#lastChild()</code>
lastChild
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/dom/traversal/DOMTreeWalker.java", "license": "apache-2.0", "size": 10667 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
122,869
protected static synchronized java.util.Date getDate(int year, int month, int dom) { if (cal == null) { cal = new java.util.GregorianCalendar(); } cal.clear(); cal.set(year, month, dom); return cal.getTime(); } private static class TestParams ...
static synchronized java.util.Date function(int year, int month, int dom) { if (cal == null) { cal = new java.util.GregorianCalendar(); } cal.clear(); cal.set(year, month, dom); return cal.getTime(); } private static class TestParams { private int inclusion; private long seed; private int loggingLevel; private String p...
/** * Return a Date given a year, month, and day of month. This is similar to * new Date(y-1900, m, d). It uses the default time zone at the time this * method is first called. * * @param year * use 2000 for 2000, unlike new Date() * @param month * use Calen...
Return a Date given a year, month, and day of month. This is similar to new Date(y-1900, m, d). It uses the default time zone at the time this method is first called
getDate
{ "repo_name": "life-beam/j2objc", "path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/TestFmwk.java", "license": "apache-2.0", "size": 26423 }
[ "java.util.List", "java.util.Map", "java.util.Properties" ]
import java.util.List; import java.util.Map; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,648,195
protected static Tuple2<String, String> buildMatchPair(final JsonNode template) { return Tuples._2T( Optional.ofNullable(template.get(RAW_MATCH_NAME)).map(j -> j.asText()) .orElse(Optional.ofNullable(template.get(PATH_MATCH_NAME)).map(j -> j.asText()).orElse("*")) , Optional.ofNullable(te...
static Tuple2<String, String> function(final JsonNode template) { return Tuples._2T( Optional.ofNullable(template.get(RAW_MATCH_NAME)).map(j -> j.asText()) .orElse(Optional.ofNullable(template.get(PATH_MATCH_NAME)).map(j -> j.asText()).orElse("*")) , Optional.ofNullable(template.get(TYPE_MATCH_NAME)).map(j -> j.asText(...
/** Builds a match pair from a field mapping * @param template * @return */
Builds a match pair from a field mapping
buildMatchPair
{ "repo_name": "robgil/Aleph2-contrib", "path": "aleph2_search_index_service_elasticsearch/src/com/ikanow/aleph2/search_service/elasticsearch/utils/ElasticsearchIndexUtils.java", "license": "apache-2.0", "size": 34925 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.ikanow.aleph2.data_model.utils.Tuples", "java.util.Optional" ]
import com.fasterxml.jackson.databind.JsonNode; import com.ikanow.aleph2.data_model.utils.Tuples; import java.util.Optional;
import com.fasterxml.jackson.databind.*; import com.ikanow.aleph2.data_model.utils.*; import java.util.*;
[ "com.fasterxml.jackson", "com.ikanow.aleph2", "java.util" ]
com.fasterxml.jackson; com.ikanow.aleph2; java.util;
2,679,902
public String updateDomain(Domain theDomain) { SilverTrace.info("admin", "AdminController.updateDomain", "root.MSG_GEN_ENTER_METHOD"); try { return getAdminService().updateDomain(theDomain); } catch (Exception e) { SilverTrace.error("admin", "AdminController.updateDomain", "a...
String function(Domain theDomain) { SilverTrace.info("admin", STR, STR); try { return getAdminService().updateDomain(theDomain); } catch (Exception e) { SilverTrace.error("admin", STR, STR, e); return ""; } }
/** * update a domain */
update a domain
updateDomain
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/webactiv/beans/admin/AdminController.java", "license": "agpl-3.0", "size": 59352 }
[ "com.stratelia.silverpeas.silvertrace.SilverTrace", "com.stratelia.webactiv.beans.admin.AdminReference" ]
import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.beans.admin.AdminReference;
import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.beans.admin.*;
[ "com.stratelia.silverpeas", "com.stratelia.webactiv" ]
com.stratelia.silverpeas; com.stratelia.webactiv;
437,337
public ResponseAPDU sendReadRecord(byte recordNumber, byte mode, byte length) throws CardServiceException { CommandAPDU capdu = new CommandAPDU(GSM1111.CLA_GSM, GSM1111.INS_READ_RECORD, recordNumber, mode, (int) (length & 0x000000FF)); return transmit(capdu); }
ResponseAPDU function(byte recordNumber, byte mode, byte length) throws CardServiceException { CommandAPDU capdu = new CommandAPDU(GSM1111.CLA_GSM, GSM1111.INS_READ_RECORD, recordNumber, mode, (int) (length & 0x000000FF)); return transmit(capdu); }
/** * Described in 9.2.5 of ETSI TS 100 977. * * @throws CardServiceException * if something goes wrong. */
Described in 9.2.5 of ETSI TS 100 977
sendReadRecord
{ "repo_name": "credentials/smartcardjs", "path": "ext/scuba/simservice/src/net/sourceforge/scuba/simservice/SIMAPDUService.java", "license": "gpl-3.0", "size": 8819 }
[ "javax.smartcardio.CommandAPDU", "javax.smartcardio.ResponseAPDU", "net.sourceforge.scuba.smartcards.CardServiceException" ]
import javax.smartcardio.CommandAPDU; import javax.smartcardio.ResponseAPDU; import net.sourceforge.scuba.smartcards.CardServiceException;
import javax.smartcardio.*; import net.sourceforge.scuba.smartcards.*;
[ "javax.smartcardio", "net.sourceforge.scuba" ]
javax.smartcardio; net.sourceforge.scuba;
39,653
private List generate(List classes, List extras, Map classelems, Map elemschemas, Map classtypes, Map typeschemas, Collection exists) throws JiBXException, IOException { // add any service classes not already present in customizations WsdlCustom wsdlcustom = m_generationParameters.g...
List function(List classes, List extras, Map classelems, Map elemschemas, Map classtypes, Map typeschemas, Collection exists) throws JiBXException, IOException { WsdlCustom wsdlcustom = m_generationParameters.getWsdlCustom(); for (int i = 0; i < classes.size(); i++) { String sclas = (String)classes.get(i); if (wsdlcust...
/** * Generate based on list of service classes. * * @param classes service class list * @param extras list of extra classes for binding * @param classelems fully-qualified class name to element qualified name map * @param elemschemas element qualified name to schema element map * @p...
Generate based on list of service classes
generate
{ "repo_name": "vkorbut/jibx", "path": "jibx/build/src/org/jibx/ws/wsdl/tools/Jibx2Wsdl.java", "license": "bsd-3-clause", "size": 43854 }
[ "java.io.File", "java.io.IOException", "java.util.ArrayList", "java.util.Collection", "java.util.HashMap", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.Set", "org.jibx.binding.model.BindingHolder", "org.jibx.custom.classes.GlobalCustom", "org.jibx....
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.jibx.binding.model.BindingHolder; import org.jibx.custom....
import java.io.*; import java.util.*; import org.jibx.binding.model.*; import org.jibx.custom.classes.*; import org.jibx.runtime.*; import org.jibx.schema.*; import org.jibx.util.*; import org.jibx.ws.wsdl.tools.custom.*;
[ "java.io", "java.util", "org.jibx.binding", "org.jibx.custom", "org.jibx.runtime", "org.jibx.schema", "org.jibx.util", "org.jibx.ws" ]
java.io; java.util; org.jibx.binding; org.jibx.custom; org.jibx.runtime; org.jibx.schema; org.jibx.util; org.jibx.ws;
570,484
protected void sequence_ArrayType(EObject context, ArrayType semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(EObject context, ArrayType semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Constraint: * (primitive=Primitive | record=RecordType | recordRef=[Record|ID] | etype=EnumType) */
Constraint: (primitive=Primitive | record=RecordType | recordRef=[Record|ID] | etype=EnumType)
sequence_ArrayType
{ "repo_name": "LangleyStudios/eclipse-avro", "path": "plugins/net.langleystudios.avro.dsl/src-gen/net/langleystudios/dsl/serializer/AvroSchemaSemanticSequencer.java", "license": "epl-1.0", "size": 9020 }
[ "net.langleystudios.dsl.avroSchema.ArrayType", "org.eclipse.emf.ecore.EObject" ]
import net.langleystudios.dsl.avroSchema.ArrayType; import org.eclipse.emf.ecore.EObject;
import net.langleystudios.dsl.*; import org.eclipse.emf.ecore.*;
[ "net.langleystudios.dsl", "org.eclipse.emf" ]
net.langleystudios.dsl; org.eclipse.emf;
549,254
public void stopAndAwaitTask(ConnectorTaskId taskId) { stopTask(taskId); awaitStopTasks(Collections.singletonList(taskId)); }
void function(ConnectorTaskId taskId) { stopTask(taskId); awaitStopTasks(Collections.singletonList(taskId)); }
/** * Stop a task that belongs to this worker and await its termination. * * @param taskId the ID of the task to be stopped. */
Stop a task that belongs to this worker and await its termination
stopAndAwaitTask
{ "repo_name": "guozhangwang/kafka", "path": "connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java", "license": "apache-2.0", "size": 51839 }
[ "java.util.Collections", "org.apache.kafka.connect.util.ConnectorTaskId" ]
import java.util.Collections; import org.apache.kafka.connect.util.ConnectorTaskId;
import java.util.*; import org.apache.kafka.connect.util.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
131,941
@Implementation public String buildUnionSubQuery( String typeDiscriminatorColumn, String[] unionColumns, Set<String> columnsPresentInTable, int computedColumnsOffset, String typeDiscriminatorValue, String selection, String group...
String function( String typeDiscriminatorColumn, String[] unionColumns, Set<String> columnsPresentInTable, int computedColumnsOffset, String typeDiscriminatorValue, String selection, String groupBy, String having) { int unionColumnsCount = unionColumns.length; String[] projectionIn = new String[unionColumnsCount]; for ...
/** * Construct a SELECT statement suitable for use in a group of * SELECT statements that will be joined through UNION operators * in buildUnionQuery. * * @param typeDiscriminatorColumn the name of the result column * whose cells will contain the name of the table from which * ea...
Construct a SELECT statement suitable for use in a group of SELECT statements that will be joined through UNION operators in buildUnionQuery
buildUnionSubQuery
{ "repo_name": "CyberEagle/AndroidTestLibrary", "path": "library/src/main/java/br/com/cybereagle/androidtestlibrary/shadow/ShadowSQLiteQueryBuilder.java", "license": "apache-2.0", "size": 28558 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,432,088
public static Resources open(String resource) throws IOException { return open(resource, -1); }
static Resources function(String resource) throws IOException { return open(resource, -1); }
/** * Creates a resource object from the local JAR resource identifier * * @param resource a local reference to a resource using the syntax of Class.getResourceAsStream(String) * @return a resource object * @throws java.io.IOException if opening/reading the resource fails */
Creates a resource object from the local JAR resource identifier
open
{ "repo_name": "shannah/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/util/Resources.java", "license": "gpl-2.0", "size": 64757 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,641,623
public static void clearSavedProgress(Context context, String url) { if (TextUtils.isEmpty(url)) { SharedPreferences spn = context.getSharedPreferences("JCVD_PROGRESS", Context.MODE_PRIVATE); spn.edit().clear().apply(); } else { SharedPreferenc...
static void function(Context context, String url) { if (TextUtils.isEmpty(url)) { SharedPreferences spn = context.getSharedPreferences(STR, Context.MODE_PRIVATE); spn.edit().clear().apply(); } else { SharedPreferences spn = context.getSharedPreferences(STR, Context.MODE_PRIVATE); spn.edit().putInt(url, 0).apply(); } }
/** * if url == null, clear all progress * * @param context * @param url if url!=null clear this url progress */
if url == null, clear all progress
clearSavedProgress
{ "repo_name": "simonOrganization/safe", "path": "jcvideoplayer-lib/src/main/java/fm/jiecao/jcvideoplayer_lib/JCUtils.java", "license": "apache-2.0", "size": 4378 }
[ "android.content.Context", "android.content.SharedPreferences", "android.text.TextUtils" ]
import android.content.Context; import android.content.SharedPreferences; import android.text.TextUtils;
import android.content.*; import android.text.*;
[ "android.content", "android.text" ]
android.content; android.text;
474,235
@Test public void testNonConsecutiveBlocks() { long blockSize = 1000; int noOfBlocks = (int)((testMeta.dataFile.length() / blockSize) + (((testMeta.dataFile.length() % blockSize) == 0) ? 0 : 1)); testMeta.blockReader.beginWindow(1); for (int i = 0; i < 10; i++) { for (int j = 0; j ...
void function() { long blockSize = 1000; int noOfBlocks = (int)((testMeta.dataFile.length() / blockSize) + (((testMeta.dataFile.length() % blockSize) == 0) ? 0 : 1)); testMeta.blockReader.beginWindow(1); for (int i = 0; i < 10; i++) { for (int j = 0; j < Math.ceil(noOfBlocks / 10.0); j++) { int blockNo = 10 * j + i; if...
/** * The file is divided into multiple blocks, blocks are processed * non-consecutively */
The file is divided into multiple blocks, blocks are processed non-consecutively
testNonConsecutiveBlocks
{ "repo_name": "yogidevendra/incubator-apex-malhar", "path": "library/src/test/java/org/apache/apex/malhar/lib/fs/s3/S3DelimitedRecordReaderTest.java", "license": "apache-2.0", "size": 9976 }
[ "com.datatorrent.lib.io.block.BlockMetadata", "java.util.List", "org.junit.Assert" ]
import com.datatorrent.lib.io.block.BlockMetadata; import java.util.List; import org.junit.Assert;
import com.datatorrent.lib.io.block.*; import java.util.*; import org.junit.*;
[ "com.datatorrent.lib", "java.util", "org.junit" ]
com.datatorrent.lib; java.util; org.junit;
1,499,628
Request options(String partialUrl);
Request options(String partialUrl);
/** * Create a OPTIONS request using the base hostname and port defined in the factory configuration. * * @param partialUrl the portion of the URL after the port (and slash) * * @return a fluent Request object */
Create a OPTIONS request using the base hostname and port defined in the factory configuration
options
{ "repo_name": "badvision/acs-aem-commons", "path": "bundle/src/main/java/com/adobe/acs/commons/http/HttpClientFactory.java", "license": "apache-2.0", "size": 2634 }
[ "org.apache.http.client.fluent.Request" ]
import org.apache.http.client.fluent.Request;
import org.apache.http.client.fluent.*;
[ "org.apache.http" ]
org.apache.http;
1,546,501
protected String getSQLStatementFragment(Object ro) throws RegistryException { ClassificationType classification = (ClassificationType)ro; String stmtFragment = null; String classificationNodeId = classification.getClassificationNode(); if (clas...
String function(Object ro) throws RegistryException { ClassificationType classification = (ClassificationType)ro; String stmtFragment = null; String classificationNodeId = classification.getClassificationNode(); if (classificationNodeId != null) { classificationNodeId = "'" + classificationNodeId + "'"; } String scheme...
/** * Returns the SQL fragment string needed by insert or update statements * within insert or update method of sub-classes. This is done to avoid code * duplication. */
Returns the SQL fragment string needed by insert or update statements within insert or update method of sub-classes. This is done to avoid code duplication
getSQLStatementFragment
{ "repo_name": "kef/hieos", "path": "src/omar/src/org/freebxml/omar/server/persistence/rdb/ClassificationDAO.java", "license": "apache-2.0", "size": 6322 }
[ "javax.xml.registry.RegistryException", "org.oasis.ebxml.registry.bindings.rim.ClassificationType", "org.oasis.ebxml.registry.bindings.rim.RegistryObjectType" ]
import javax.xml.registry.RegistryException; import org.oasis.ebxml.registry.bindings.rim.ClassificationType; import org.oasis.ebxml.registry.bindings.rim.RegistryObjectType;
import javax.xml.registry.*; import org.oasis.ebxml.registry.bindings.rim.*;
[ "javax.xml", "org.oasis.ebxml" ]
javax.xml; org.oasis.ebxml;
2,350,245
private void drawString(int flag, Graphics2D g2d, AttributedCharacterIterator ati, float x, float y, TextLayout layout, WMFFont wmfFont, int align) { if (wmfFont.escape == 0) { if (flag != -1) fillTextBackground(-1, flag, g2d, x, y, 0, layout); float width = (float)(layout.g...
void function(int flag, Graphics2D g2d, AttributedCharacterIterator ati, float x, float y, TextLayout layout, WMFFont wmfFont, int align) { if (wmfFont.escape == 0) { if (flag != -1) fillTextBackground(-1, flag, g2d, x, y, 0, layout); float width = (float)(layout.getBounds().getWidth()); if (align == WMFConstants.TA_CE...
/** Draw an AttributedCharacterIterator taking into account the following characteristics. : * <ul> * <li>the orientation (escapement) of the WMF Font</li> * <li>the aligment of the text</li> * </ul> * <p>The other characteristics of the text, deriving from the WMF Font, must have been ...
Draw an AttributedCharacterIterator taking into account the following characteristics. : the orientation (escapement) of the WMF Font the aligment of the text The other characteristics of the text, deriving from the WMF Font, must have been collected before to constitute the AttributedCharacterIterator
drawString
{ "repo_name": "Groostav/CMPT880-term-project", "path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/transcoder/wmf/tosvg/WMFPainter.java", "license": "apache-2.0", "size": 52810 }
[ "java.awt.Graphics2D", "java.awt.Stroke", "java.awt.font.TextLayout", "java.awt.geom.AffineTransform", "java.text.AttributedCharacterIterator", "org.apache.batik.transcoder.wmf.WMFConstants" ]
import java.awt.Graphics2D; import java.awt.Stroke; import java.awt.font.TextLayout; import java.awt.geom.AffineTransform; import java.text.AttributedCharacterIterator; import org.apache.batik.transcoder.wmf.WMFConstants;
import java.awt.*; import java.awt.font.*; import java.awt.geom.*; import java.text.*; import org.apache.batik.transcoder.wmf.*;
[ "java.awt", "java.text", "org.apache.batik" ]
java.awt; java.text; org.apache.batik;
1,283,534
public void doSaveas_role(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); // read the form - if rejected, leave things as they are if (!readRoleForm(data, state)) return; // go to saveas_role mode state.setAttr...
void function(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); if (!readRoleForm(data, state)) return; state.setAttribute("mode", STR); }
/** * Handle a request to remove the role being edited. */
Handle a request to remove the role being edited
doSaveas_role
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "authz/authz-tool/tool/src/java/org/sakaiproject/authz/tool/RealmsAction.java", "license": "apache-2.0", "size": 44395 }
[ "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.cheftool; org.sakaiproject.event;
1,418,513
public double[] getJointDistribution(BayesianNetwork bn_Q, int v) { // Do the query TIntArrayList q = new TIntArrayList(); q.add(v); for (int p : bn_Q.parents(v)) { q.add(p); } BayesianFactor fact = inf_P.query(q.toArray()); return fact.getPote...
double[] function(BayesianNetwork bn_Q, int v) { TIntArrayList q = new TIntArrayList(); q.add(v); for (int p : bn_Q.parents(v)) { q.add(p); } BayesianFactor fact = inf_P.query(q.toArray()); return fact.getPotent(); }
/** * Get the joint distribution over bn_P of the variable v and its parents in the bn_Q map. * * @param bn_Q network where to writeSample the query * @param v variable of interest * @return joint distribution as factor */
Get the joint distribution over bn_P of the variable v and its parents in the bn_Q map
getJointDistribution
{ "repo_name": "mauro-idsia/blip", "path": "core/src/main/java/ch/idsia/blip/core/utils/other/KLDiv.java", "license": "lgpl-3.0", "size": 4720 }
[ "ch.idsia.blip.core.inference.ve.BayesianFactor", "ch.idsia.blip.core.utils.BayesianNetwork", "ch.idsia.blip.core.utils.data.array.TIntArrayList" ]
import ch.idsia.blip.core.inference.ve.BayesianFactor; import ch.idsia.blip.core.utils.BayesianNetwork; import ch.idsia.blip.core.utils.data.array.TIntArrayList;
import ch.idsia.blip.core.inference.ve.*; import ch.idsia.blip.core.utils.*; import ch.idsia.blip.core.utils.data.array.*;
[ "ch.idsia.blip" ]
ch.idsia.blip;
1,987,951
public String applyJson(String json) throws Exception { Object dto = loadJson(json); apply(dto, "REST call"); return ""; }
String function(String json) throws Exception { Object dto = loadJson(json); apply(dto, STR); return ""; }
/** * Applies the given JSON to the underlying REST APIs in a single operation without needing to explicitly parse first. */
Applies the given JSON to the underlying REST APIs in a single operation without needing to explicitly parse first
applyJson
{ "repo_name": "migue/fabric8", "path": "components/kubernetes-api/src/main/java/io/fabric8/kubernetes/api/Controller.java", "license": "apache-2.0", "size": 35140 }
[ "io.fabric8.kubernetes.api.KubernetesHelper" ]
import io.fabric8.kubernetes.api.KubernetesHelper;
import io.fabric8.kubernetes.api.*;
[ "io.fabric8.kubernetes" ]
io.fabric8.kubernetes;
2,046,642
public Response head(String path) throws IOException { return head(cluster, path, null); }
Response function(String path) throws IOException { return head(cluster, path, null); }
/** * Send a HEAD request * @param path the path or URI * @return a Response object with response detail * @throws IOException */
Send a HEAD request
head
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java", "license": "apache-2.0", "size": 22269 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,536,052
public boolean grow(NimbleTree<Symbol> dt) { Rule rule; Iterator<Production> prodIt; ArrayList<Integer> possibleRules = new ArrayList<Integer>(); boolean recursiveRules; Production prod; int prodVal; boolean result; int newMaxDepth; Iterator<Sy...
boolean function(NimbleTree<Symbol> dt) { Rule rule; Iterator<Production> prodIt; ArrayList<Integer> possibleRules = new ArrayList<Integer>(); boolean recursiveRules; Production prod; int prodVal; boolean result; int newMaxDepth; Iterator<Symbol> symIt; Symbol symbol; try { if(dt.getCurrentNode().getData().getType() ==...
/** * Recursively builds a tree. * @param dt Tree to grow on * @return If the tree is valid **/
Recursively builds a tree
grow
{ "repo_name": "geronimo-iia/geva", "path": "GEVA/src/Operator/Operations/FullInitialiser.java", "license": "gpl-3.0", "size": 6927 }
[ "java.util.ArrayList", "java.util.Iterator" ]
import java.util.ArrayList; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
885,735
private void init(ImageCacheParams cacheParams) { mCacheParams = cacheParams; // Set up memory cache if (mCacheParams.memoryCacheEnabled) { if (BuildConfig.DEBUG) { Log.d(TAG, "Memory cache created (size = " + mCacheParams.memCacheSize + ")"); } ...
void function(ImageCacheParams cacheParams) { mCacheParams = cacheParams; if (mCacheParams.memoryCacheEnabled) { if (BuildConfig.DEBUG) { Log.d(TAG, STR + mCacheParams.memCacheSize + ")"); } if (Utils.hasHoneycomb()) { mReusableBitmaps = new HashSet<SoftReference<Bitmap>>(); } mMemoryCache = new LruCache<String, Bitmap...
/** * Initialize the cache, providing all parameters. * * @param cacheParams The cache parameters to initialize the cache */
Initialize the cache, providing all parameters
init
{ "repo_name": "maonanyue/bitmapfun", "path": "src/com/example/android/bitmapfun/util/ImageCache.java", "license": "apache-2.0", "size": 26506 }
[ "android.graphics.Bitmap", "android.graphics.drawable.BitmapDrawable", "android.support.v4.util.LruCache", "android.util.Log", "com.example.android.bitampfun.BuildConfig", "java.lang.ref.SoftReference", "java.util.HashSet" ]
import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.support.v4.util.LruCache; import android.util.Log; import com.example.android.bitampfun.BuildConfig; import java.lang.ref.SoftReference; import java.util.HashSet;
import android.graphics.*; import android.graphics.drawable.*; import android.support.v4.util.*; import android.util.*; import com.example.android.bitampfun.*; import java.lang.ref.*; import java.util.*;
[ "android.graphics", "android.support", "android.util", "com.example.android", "java.lang", "java.util" ]
android.graphics; android.support; android.util; com.example.android; java.lang; java.util;
1,730,045
@Override public Ref getRef(int columnIndex) throws SQLException { throw unsupported("ref"); }
Ref function(int columnIndex) throws SQLException { throw unsupported("ref"); }
/** * [Not supported] Gets a column as a reference. */
[Not supported] Gets a column as a reference
getRef
{ "repo_name": "wizardofos/Protozoo", "path": "extra/h2/src/main/java/org/h2/jdbc/JdbcResultSet.java", "license": "mit", "size": 120208 }
[ "java.sql.Ref", "java.sql.SQLException" ]
import java.sql.Ref; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,839,158
public static HttpServletResponse getHttpServletResponse( final RequestContext context) { Assert.isInstanceOf(ServletExternalContext.class, context.getExternalContext(), "Cannot obtain HttpServletResponse from event of type: " + context.getExternalContext().getClass().getName());...
static HttpServletResponse function( final RequestContext context) { Assert.isInstanceOf(ServletExternalContext.class, context.getExternalContext(), STR + context.getExternalContext().getClass().getName()); return (HttpServletResponse) context.getExternalContext().getNativeResponse(); }
/** * Gets the http servlet response from the context. * * @param context the context * @return the http servlet response */
Gets the http servlet response from the context
getHttpServletResponse
{ "repo_name": "zhoffice/cas", "path": "cas-server-core-web/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 23288 }
[ "javax.servlet.http.HttpServletResponse", "org.springframework.util.Assert", "org.springframework.webflow.context.servlet.ServletExternalContext", "org.springframework.webflow.execution.RequestContext" ]
import javax.servlet.http.HttpServletResponse; import org.springframework.util.Assert; import org.springframework.webflow.context.servlet.ServletExternalContext; import org.springframework.webflow.execution.RequestContext;
import javax.servlet.http.*; import org.springframework.util.*; import org.springframework.webflow.context.servlet.*; import org.springframework.webflow.execution.*;
[ "javax.servlet", "org.springframework.util", "org.springframework.webflow" ]
javax.servlet; org.springframework.util; org.springframework.webflow;
1,732,041
protected void fireRootNodeChanged(Object previousRoot) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); TreeModelEvent e = null; // Process the listeners last to first, notifying // those that are interested in this event ...
void function(Object previousRoot) { Object[] listeners = listenerList.getListenerList(); TreeModelEvent e = null; for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == TreeModelListener.class) { if (e == null) { e = new TreeModelEvent(this, new Object[] { previousRoot }); } ((TreeModelListener) list...
/** * The only event raised by this model is TreeStructureChanged with the root * as path, i.e. the whole tree has changed. */
The only event raised by this model is TreeStructureChanged with the root as path, i.e. the whole tree has changed
fireRootNodeChanged
{ "repo_name": "springrichclient/springrcp", "path": "spring-richclient-core/src/main/java/org/springframework/richclient/tree/AbstractTreeModel.java", "license": "apache-2.0", "size": 10777 }
[ "javax.swing.event.TreeModelEvent", "javax.swing.event.TreeModelListener" ]
import javax.swing.event.TreeModelEvent; import javax.swing.event.TreeModelListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
253,992
@Override protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); container.setLayout(new GridLayout(1, false)); container.getShell().setText(Messages.JDK_PATH_DIALOG_TITLE); Composite mainComposite = new Composite(container, SWT.NONE); ...
Control function(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); container.setLayout(new GridLayout(1, false)); container.getShell().setText(Messages.JDK_PATH_DIALOG_TITLE); Composite mainComposite = new Composite(container, SWT.NONE); mainComposite.setLayout(new GridLayout(1, fals...
/** * Create contents of the dialog. * @param parent */
Create contents of the dialog
createDialogArea
{ "repo_name": "capitalone/Hydrograph", "path": "hydrograph.ui/hydrograph.ui.perspective/src/main/java/hydrograph/ui/perspective/dialog/JdkPathDialog.java", "license": "apache-2.0", "size": 6528 }
[ "org.eclipse.swt.layout.GridData", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Control" ]
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,820,605
@CheckReturnValue public final <T> FluentIterable<T> transform(Function<? super E, T> function) { return from(Iterables.transform(iterable, function)); } /** * Applies {@code function} to each element of this fluent iterable and returns * a fluent iterable with the concatenated combination of results...
final <T> FluentIterable<T> function(Function<? super E, T> function) { return from(Iterables.transform(iterable, function)); } /** * Applies {@code function} to each element of this fluent iterable and returns * a fluent iterable with the concatenated combination of results. {@code function}
/** * Returns a fluent iterable that applies {@code function} to each element of this * fluent iterable. * * <p>The returned fluent iterable's iterator supports {@code remove()} if this iterable's * iterator does. After a successful {@code remove()} call, this fluent iterable no longer * contains the ...
Returns a fluent iterable that applies function to each element of this fluent iterable. The returned fluent iterable's iterator supports remove() if this iterable's iterator does. After a successful remove() call, this fluent iterable no longer contains the corresponding element. Stream equivalent: stream.map(function...
transform
{ "repo_name": "monokurobo/guava", "path": "guava/src/com/google/common/collect/FluentIterable.java", "license": "apache-2.0", "size": 26848 }
[ "com.google.common.base.Function" ]
import com.google.common.base.Function;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,788,381
boolean checkAccess(Account caller, Domain domain) throws PermissionDeniedException;
boolean checkAccess(Account caller, Domain domain) throws PermissionDeniedException;
/** * Checks if the account owns the object. * * @param caller account to check against. * @param object object that the account is trying to access. * @return true if access allowed. false if this adapter cannot authenticate ownership. * @throws PermissionDeniedException if this adapter i...
Checks if the account owns the object
checkAccess
{ "repo_name": "remibergsma/cosmic", "path": "cosmic-core/api/src/main/java/com/cloud/acl/SecurityChecker.java", "license": "apache-2.0", "size": 4311 }
[ "com.cloud.domain.Domain", "com.cloud.exception.PermissionDeniedException", "com.cloud.user.Account" ]
import com.cloud.domain.Domain; import com.cloud.exception.PermissionDeniedException; import com.cloud.user.Account;
import com.cloud.domain.*; import com.cloud.exception.*; import com.cloud.user.*;
[ "com.cloud.domain", "com.cloud.exception", "com.cloud.user" ]
com.cloud.domain; com.cloud.exception; com.cloud.user;
1,860,263
@Test public void getEventHubProperties() { final EventHubConsumerAsyncClient consumer = createBuilder() .consumerGroup(DEFAULT_CONSUMER_GROUP_NAME) .buildAsyncConsumerClient(); // Act & Assert try { StepVerifier.create(consumer.getEventHubProperties(...
void function() { final EventHubConsumerAsyncClient consumer = createBuilder() .consumerGroup(DEFAULT_CONSUMER_GROUP_NAME) .buildAsyncConsumerClient(); try { StepVerifier.create(consumer.getEventHubProperties()) .assertNext(properties -> { Assertions.assertNotNull(properties); Assertions.assertEquals(consumer.getEventH...
/** * Verifies that we can get the metadata about an Event Hub */
Verifies that we can get the metadata about an Event Hub
getEventHubProperties
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/eventhubs/azure-messaging-eventhubs/src/test/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClientIntegrationTest.java", "license": "mit", "size": 28597 }
[ "org.junit.jupiter.api.Assertions" ]
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
1,114,865
public static<T> Constructor<T> getConstructor(Class<T> clazz) throws SecurityException, NoSuchMethodException { if(clazz == null) { throw new IllegalArgumentException("class cannot be null"); } Constructor<T> cons = clazz.getConstructor(EMPTY_CLASS_ARRAY); cons.setAccessible(true); ret...
static<T> Constructor<T> function(Class<T> clazz) throws SecurityException, NoSuchMethodException { if(clazz == null) { throw new IllegalArgumentException(STR); } Constructor<T> cons = clazz.getConstructor(EMPTY_CLASS_ARRAY); cons.setAccessible(true); return cons; }
/** * Returns the empty argument constructor of the class. */
Returns the empty argument constructor of the class
getConstructor
{ "repo_name": "jaferreiro/gora-indra", "path": "gora-core/src/main/java/org/apache/gora/util/ReflectionUtils.java", "license": "apache-2.0", "size": 3927 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,855,640
@Override public AtomicInteger gauge(String name, String description, Tags tags) { AtomicInteger gauge = new AtomicInteger(0); Gauge.builder(name, () -> gauge) .description(description) .tags(tags) .register(metrics); return gauge; }
AtomicInteger function(String name, String description, Tags tags) { AtomicInteger gauge = new AtomicInteger(0); Gauge.builder(name, () -> gauge) .description(description) .tags(tags) .register(metrics); return gauge; }
/** * Creates new Gauge type metric * * @param name Name of the metric * @param description Description of the metric * @param tags Tags used for the metric * @return AtomicInteger which represents the Gauge metric */
Creates new Gauge type metric
gauge
{ "repo_name": "ppatierno/kaas", "path": "operator-common/src/main/java/io/strimzi/operator/common/MicrometerMetricsProvider.java", "license": "apache-2.0", "size": 2872 }
[ "io.micrometer.core.instrument.Gauge", "io.micrometer.core.instrument.Tags", "java.util.concurrent.atomic.AtomicInteger" ]
import io.micrometer.core.instrument.Gauge; import io.micrometer.core.instrument.Tags; import java.util.concurrent.atomic.AtomicInteger;
import io.micrometer.core.instrument.*; import java.util.concurrent.atomic.*;
[ "io.micrometer.core", "java.util" ]
io.micrometer.core; java.util;
882,438
@Override public void afterError(final Request<?> request, final Response<?> response, final Exception exception) { span.afterError(request, response, exception); }
void function(final Request<?> request, final Response<?> response, final Exception exception) { span.afterError(request, response, exception); }
/** * Forward to the inner span. * @param request request * @param response response. * @param exception exception raised. */
Forward to the inner span
afterError
{ "repo_name": "apurtell/hadoop", "path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/audit/impl/ActiveAuditManagerS3A.java", "license": "apache-2.0", "size": 23237 }
[ "com.amazonaws.Request", "com.amazonaws.Response" ]
import com.amazonaws.Request; import com.amazonaws.Response;
import com.amazonaws.*;
[ "com.amazonaws" ]
com.amazonaws;
373,659
@Path("roles-by-id") public RoleByIdResource rolesById() { RoleByIdResource resource = new RoleByIdResource(realm, auth, adminEvent); ResteasyProviderFactory.getInstance().injectProperties(resource); //resourceContext.initResource(resource); return resource; }
@Path(STR) RoleByIdResource function() { RoleByIdResource resource = new RoleByIdResource(realm, auth, adminEvent); ResteasyProviderFactory.getInstance().injectProperties(resource); return resource; }
/** * Path for managing all realm-level or client-level roles defined in this realm by its id. * * @return */
Path for managing all realm-level or client-level roles defined in this realm by its id
rolesById
{ "repo_name": "lkubik/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java", "license": "apache-2.0", "size": 26623 }
[ "javax.ws.rs.Path", "org.jboss.resteasy.spi.ResteasyProviderFactory" ]
import javax.ws.rs.Path; import org.jboss.resteasy.spi.ResteasyProviderFactory;
import javax.ws.rs.*; import org.jboss.resteasy.spi.*;
[ "javax.ws", "org.jboss.resteasy" ]
javax.ws; org.jboss.resteasy;
2,346,026
@NotNull PsiElement addProperty(@NotNull Property property) throws IncorrectOperationException;
@NotNull PsiElement addProperty(@NotNull Property property) throws IncorrectOperationException;
/** * Adds property to the end of the file. * @param property to add. Typically you create the property via {@link com.intellij.lang.properties.psi.PropertiesElementFactory}. * @return newly added property. * It is this value you use to do actual PSI work, e.g. call {@link com.intellij.psi.PsiElement#delete...
Adds property to the end of the file
addProperty
{ "repo_name": "jexp/idea2", "path": "plugins/properties/src/com/intellij/lang/properties/psi/PropertiesFile.java", "license": "apache-2.0", "size": 3234 }
[ "com.intellij.psi.PsiElement", "com.intellij.util.IncorrectOperationException", "org.jetbrains.annotations.NotNull" ]
import com.intellij.psi.PsiElement; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull;
import com.intellij.psi.*; import com.intellij.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.psi", "com.intellij.util", "org.jetbrains.annotations" ]
com.intellij.psi; com.intellij.util; org.jetbrains.annotations;
936,738
@Override public boolean equivalent(PMap<K, V> that, BiPredicate<V, V> equivalence) { return equivalent( !this.isEmpty() ? this : null, !that.isEmpty() ? (HamtPMap<K, V>) that : null, equivalence); }
boolean function(PMap<K, V> that, BiPredicate<V, V> equivalence) { return equivalent( !this.isEmpty() ? this : null, !that.isEmpty() ? (HamtPMap<K, V>) that : null, equivalence); }
/** * Checks equality recursively based on the given equivalence. Short-circuits as soon as a 'false' * result is found. */
Checks equality recursively based on the given equivalence. Short-circuits as soon as a 'false' result is found
equivalent
{ "repo_name": "GoogleChromeLabs/chromeos_smart_card_connector", "path": "third_party/closure-compiler/src/src/com/google/javascript/rhino/HamtPMap.java", "license": "apache-2.0", "size": 25604 }
[ "java.util.function.BiPredicate" ]
import java.util.function.BiPredicate;
import java.util.function.*;
[ "java.util" ]
java.util;
2,882,517
List<WorkUnit> workUnits = Lists.newArrayList(); try { DatasetFinder<CopyableDataset> datasetFinder = DatasetUtils.instantiateDatasetFinder(state.getProperties(), getSourceFileSystem(state), DEFAULT_DATASET_PROFILE_CLASS_KEY); List<CopyableDataset> copyableDatasets = dataset...
List<WorkUnit> workUnits = Lists.newArrayList(); try { DatasetFinder<CopyableDataset> datasetFinder = DatasetUtils.instantiateDatasetFinder(state.getProperties(), getSourceFileSystem(state), DEFAULT_DATASET_PROFILE_CLASS_KEY); List<CopyableDataset> copyableDatasets = datasetFinder.findDatasets(); FileSystem targetFs = ...
/** * <ul> * Does the following: * <li>Instantiate a {@link DatasetFinder}. * <li>Find all {@link Dataset} using {@link DatasetFinder}. * <li>For each {@link CopyableDataset} get all {@link CopyableFile}s. * <li>Create a {@link WorkUnit} per {@link CopyableFile}. * </ul> * * <p> * In this ...
Does the following: Instantiate a <code>DatasetFinder</code>. Find all <code>Dataset</code> using <code>DatasetFinder</code>. For each <code>CopyableDataset</code> get all <code>CopyableFile</code>s. Create a <code>WorkUnit</code> per <code>CopyableFile</code>. In this implementation, one workunit is created for every ...
getWorkunits
{ "repo_name": "sahooamit/bigdata", "path": "gobblin-data-management/src/main/java/gobblin/data/management/copy/CopySource.java", "license": "apache-2.0", "size": 8038 }
[ "com.google.common.collect.Lists", "java.io.IOException", "java.util.Collection", "java.util.List", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import com.google.common.collect.Lists; import java.io.IOException; import java.util.Collection; import java.util.List; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import com.google.common.collect.*; import java.io.*; import java.util.*; import org.apache.hadoop.fs.*;
[ "com.google.common", "java.io", "java.util", "org.apache.hadoop" ]
com.google.common; java.io; java.util; org.apache.hadoop;
1,342,365
public Map<String, Object> getAttributes();
Map<String, Object> function();
/** * Returns a non-modifiable map of the attributes held by the event. */
Returns a non-modifiable map of the attributes held by the event
getAttributes
{ "repo_name": "monochromata/EyeTrackerAPI", "path": "src/main/java/rit/eyeTracking/Event.java", "license": "mit", "size": 16698 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
980,613
private static byte[] generateSeed() { try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer); seedBufferOut.writeLong(System.currentTimeMillis()); seedBufferOut.writeLong(System.nanoTime()); ...
static byte[] function() { try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer); seedBufferOut.writeLong(System.currentTimeMillis()); seedBufferOut.writeLong(System.nanoTime()); seedBufferOut.writeInt(Process.myPid()); seedBufferOut.writ...
/** * Generates a device- and invocation-specific seed to be mixed into the * Linux PRNG. */
Generates a device- and invocation-specific seed to be mixed into the Linux PRNG
generateSeed
{ "repo_name": "andyao/hawk", "path": "hawk/src/main/java/com/orhanobut/hawk/AesCbcWithIntegrity.java", "license": "apache-2.0", "size": 33429 }
[ "android.os.Process", "java.io.ByteArrayOutputStream", "java.io.DataOutputStream", "java.io.IOException" ]
import android.os.Process; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException;
import android.os.*; import java.io.*;
[ "android.os", "java.io" ]
android.os; java.io;
1,584,298
public static void setMoney(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException { User user = getUserByName(name); if (user == null) { throw new UserDoesNotExistException(name); } if (balance < 0.0 && !user.isAuthorized("essentials.eco.loan")) { throw new NoLoanPe...
static void function(String name, double balance) throws UserDoesNotExistException, NoLoanPermittedException { User user = getUserByName(name); if (user == null) { throw new UserDoesNotExistException(name); } if (balance < 0.0 && !user.isAuthorized(STR)) { throw new NoLoanPermittedException(); } ((UserData)user).setMon...
/** * Sets the balance of a user * @param name Name of the user * @param balance The balance you want to set * @throws UserDoesNotExistException If a user by that name does not exists * @throws NoLoanPermittedException If the user is not allowed to have a negative balance */
Sets the balance of a user
setMoney
{ "repo_name": "AkintudnesServer/essentials", "path": "Essentials/src/com/earth2me/essentials/api/Economy.java", "license": "gpl-3.0", "size": 8461 }
[ "com.earth2me.essentials.User", "com.earth2me.essentials.UserData" ]
import com.earth2me.essentials.User; import com.earth2me.essentials.UserData;
import com.earth2me.essentials.*;
[ "com.earth2me.essentials" ]
com.earth2me.essentials;
487,136
public void publish(String topic, String message, int subQoS, int pubQoS) { MqttMessage messageToPublish = new MqttMessage(message.getBytes()); messageToPublish.setQos(pubQoS); messageToPublish.setRetained(false); try { myClient.publish(topic, messageToPublish); ...
void function(String topic, String message, int subQoS, int pubQoS) { MqttMessage messageToPublish = new MqttMessage(message.getBytes()); messageToPublish.setQos(pubQoS); messageToPublish.setRetained(false); try { myClient.publish(topic, messageToPublish); } catch (MqttException ex) { LOG.error(STR{}\STR{}\"", message,...
/** * Publishes a message on a topic. * * @param topic * @param message * @param subQoS * @param pubQoS */
Publishes a message on a topic
publish
{ "repo_name": "abollaert/freedomotic", "path": "plugins/devices/mqtt-client/src/main/java/com/freedomotic/plugins/devices/mqttclient/Mqtt.java", "license": "gpl-2.0", "size": 6453 }
[ "org.eclipse.paho.client.mqttv3.MqttException", "org.eclipse.paho.client.mqttv3.MqttMessage" ]
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.*;
[ "org.eclipse.paho" ]
org.eclipse.paho;
1,814,733
private void testPositionalQuery() { String queryString = "Select min(p.salary) from PersonES p where p.personName = ?1"; Query query = em.createQuery(queryString); query.setParameter(1, "amit"); List resultList = query.getResultList(); Assert.assertEquals(1, resultList....
void function() { String queryString = STR; Query query = em.createQuery(queryString); query.setParameter(1, "amit"); List resultList = query.getResultList(); Assert.assertEquals(1, resultList.size()); Assert.assertEquals(100.0, resultList.get(0)); }
/** * Test positional query. */
Test positional query
testPositionalQuery
{ "repo_name": "ravisund/Kundera", "path": "src/kundera-elastic-search/src/test/java/com/impetus/client/es/ESAggregationTest.java", "license": "apache-2.0", "size": 20052 }
[ "java.util.List", "javax.persistence.Query", "junit.framework.Assert" ]
import java.util.List; import javax.persistence.Query; import junit.framework.Assert;
import java.util.*; import javax.persistence.*; import junit.framework.*;
[ "java.util", "javax.persistence", "junit.framework" ]
java.util; javax.persistence; junit.framework;
2,758,871
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static YearMonthCurveNodeMetadata.Meta meta() { return YearMonthCurveNodeMetadata.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(YearMonthCurveNodeMetadata.Meta.INSTANCE); } private stati...
static YearMonthCurveNodeMetadata.Meta function() { return YearMonthCurveNodeMetadata.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(YearMonthCurveNodeMetadata.Meta.INSTANCE); } private static final long serialVersionUID = 1L; private YearMonthCurveNodeMetadata( LocalDate date, YearMonth yearMonth, String lab...
/** * The meta-bean for {@code YearMonthCurveNodeMetadata}. * @return the meta-bean, not null */
The meta-bean for YearMonthCurveNodeMetadata
meta
{ "repo_name": "nssales/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/curve/YearMonthCurveNodeMetadata.java", "license": "apache-2.0", "size": 13499 }
[ "java.time.LocalDate", "java.time.YearMonth", "org.joda.beans.JodaBeanUtils" ]
import java.time.LocalDate; import java.time.YearMonth; import org.joda.beans.JodaBeanUtils;
import java.time.*; import org.joda.beans.*;
[ "java.time", "org.joda.beans" ]
java.time; org.joda.beans;
2,874,547
@Test public void testFileRetrievalWithParameters() throws ClientProtocolException, IOException { final String expFileContent = "This is a test-entry"; // create a test-file which we want to retrieve final File file = new File(testDir, UUID.randomUUID().toString()); Files.writeToFile(file, expFileConten...
void function() throws ClientProtocolException, IOException { final String expFileContent = STR; final File file = new File(testDir, UUID.randomUUID().toString()); Files.writeToFile(file, expFileContent, "UTF-8"); final byte[] response = TestHelper.getResponse(httpListener.getPort(), file.getName() + STR); final String...
/** * Tests the retrieval of a file via the handler specifying parameters with * it. * * @throws ClientProtocolException * if the client cannot access the server with the specified * protocol (should never happen) * @throws IOException * if the file or data cannot be...
Tests the retrieval of a file via the handler specifying parameters with it
testFileRetrievalWithParameters
{ "repo_name": "pmeisen/gen-server-http-listener", "path": "test/net/meisen/general/server/http/listener/handler/TestFileHandler.java", "license": "mit", "size": 20094 }
[ "java.io.File", "java.io.IOException", "java.util.UUID", "net.meisen.general.genmisc.types.Files", "net.meisen.general.server.http.listener.testutilities.TestHelper", "org.apache.http.client.ClientProtocolException", "org.junit.Assert" ]
import java.io.File; import java.io.IOException; import java.util.UUID; import net.meisen.general.genmisc.types.Files; import net.meisen.general.server.http.listener.testutilities.TestHelper; import org.apache.http.client.ClientProtocolException; import org.junit.Assert;
import java.io.*; import java.util.*; import net.meisen.general.genmisc.types.*; import net.meisen.general.server.http.listener.testutilities.*; import org.apache.http.client.*; import org.junit.*;
[ "java.io", "java.util", "net.meisen.general", "org.apache.http", "org.junit" ]
java.io; java.util; net.meisen.general; org.apache.http; org.junit;
217,657
public RawComparator getOutputKeyComparator() { Class<? extends RawComparator> theClass = getClass( JobContext.KEY_COMPARATOR, null, RawComparator.class); if (theClass != null) return ReflectionUtils.newInstance(theClass, this); return WritableComparator.get(getMapOutputKeyClass().asSubclass(W...
RawComparator function() { Class<? extends RawComparator> theClass = getClass( JobContext.KEY_COMPARATOR, null, RawComparator.class); if (theClass != null) return ReflectionUtils.newInstance(theClass, this); return WritableComparator.get(getMapOutputKeyClass().asSubclass(WritableComparable.class), this); }
/** * Get the {@link RawComparator} comparator used to compare keys. * * @return the {@link RawComparator} comparator used to compare keys. */
Get the <code>RawComparator</code> comparator used to compare keys
getOutputKeyComparator
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java", "license": "apache-2.0", "size": 75549 }
[ "org.apache.hadoop.io.RawComparator", "org.apache.hadoop.io.WritableComparable", "org.apache.hadoop.io.WritableComparator", "org.apache.hadoop.util.ReflectionUtils" ]
import org.apache.hadoop.io.RawComparator; import org.apache.hadoop.io.WritableComparable; import org.apache.hadoop.io.WritableComparator; import org.apache.hadoop.util.ReflectionUtils;
import org.apache.hadoop.io.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,453,498