method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private static void clearBibTextSectionContent2(XTextDocument doc)
throws
CreationException,
NoDocumentException,
WrappedTargetException {
// Optional<XTextRange> sectionRange = UnoTextSection.getAnchor(doc, BIB_SECTION_NAME);
Optional<XTextRange> sectionRange = getB... | static void function(XTextDocument doc) throws CreationException, NoDocumentException, WrappedTargetException { Optional<XTextRange> sectionRange = getBibliographyRange(doc); if (sectionRange.isEmpty()) { createBibTextSection2(doc); return; } else { XTextCursor cursor = doc.getText().createTextCursorByRange(sectionRang... | /**
* Find and clear the text section BIB_SECTION_NAME to "",
* or create it.
*
* Only called from: `rebuildBibTextSection`
*
*/ | Find and clear the text section BIB_SECTION_NAME to "", or create it. Only called from: `rebuildBibTextSection` | clearBibTextSectionContent2 | {
"repo_name": "JabRef/jabref",
"path": "src/main/java/org/jabref/logic/openoffice/frontend/UpdateBibliography.java",
"license": "mit",
"size": 5266
} | [
"com.sun.star.lang.WrappedTargetException",
"com.sun.star.text.XTextCursor",
"com.sun.star.text.XTextDocument",
"com.sun.star.text.XTextRange",
"java.util.Optional",
"org.jabref.model.openoffice.uno.CreationException",
"org.jabref.model.openoffice.uno.NoDocumentException"
] | import com.sun.star.lang.WrappedTargetException; import com.sun.star.text.XTextCursor; import com.sun.star.text.XTextDocument; import com.sun.star.text.XTextRange; import java.util.Optional; import org.jabref.model.openoffice.uno.CreationException; import org.jabref.model.openoffice.uno.NoDocumentException; | import com.sun.star.lang.*; import com.sun.star.text.*; import java.util.*; import org.jabref.model.openoffice.uno.*; | [
"com.sun.star",
"java.util",
"org.jabref.model"
] | com.sun.star; java.util; org.jabref.model; | 2,657,066 |
private static String createTableDDL(String tableName, PDataType pkType, int saltBuckets, boolean isMultiTenant) {
StringBuilder ddlBuilder = new StringBuilder();
ddlBuilder.append("CREATE TABLE ").append(tableName).append(" ( ");
// column declarations
if(isMultiTenant) {
... | static String function(String tableName, PDataType pkType, int saltBuckets, boolean isMultiTenant) { StringBuilder ddlBuilder = new StringBuilder(); ddlBuilder.append(STR).append(tableName).append(STR); if(isMultiTenant) { ddlBuilder.append(STR); } for(int i = 0; i < 5; i++) { ddlBuilder.append("pk").append(i + 1).appe... | /**
* Builds the DDL statement that will create a table with the given properties.
* Assumes 5 pk columns of the given type.
* Adds a non primary key column named "nonPk"
* @param tableName the name to use for the table
* @param pkType the data type of the primary key columns
* @param sa... | Builds the DDL statement that will create a table with the given properties. Assumes 5 pk columns of the given type. Adds a non primary key column named "nonPk" | createTableDDL | {
"repo_name": "growingio/phoenix",
"path": "phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java",
"license": "apache-2.0",
"size": 26907
} | [
"org.apache.phoenix.schema.types.PDataType"
] | import org.apache.phoenix.schema.types.PDataType; | import org.apache.phoenix.schema.types.*; | [
"org.apache.phoenix"
] | org.apache.phoenix; | 2,212,743 |
// NavigableSet
//-----------------------------------------------------------------------
public static <E> SortedSet<E> unmodifiableNavigableSet(final NavigableSet<E> set) {
return UnmodifiableNavigableSet.unmodifiableNavigableSet(set);
} | static <E> SortedSet<E> function(final NavigableSet<E> set) { return UnmodifiableNavigableSet.unmodifiableNavigableSet(set); } | /**
* Returns an unmodifiable navigable set backed by the given navigable set.
* <p>
* This method uses the implementation in the decorators subpackage.
*
* @param <E> the element type
* @param set the navigable set to make unmodifiable, must not be null
* @return an unmodifiable set... | Returns an unmodifiable navigable set backed by the given navigable set. This method uses the implementation in the decorators subpackage | unmodifiableNavigableSet | {
"repo_name": "AffogatoLang/Moka",
"path": "lib/Apache_Commons_Collections/src/main/java/org/apache/commons/collections4/SetUtils.java",
"license": "bsd-3-clause",
"size": 24689
} | [
"java.util.NavigableSet",
"java.util.SortedSet",
"org.apache.commons.collections4.set.UnmodifiableNavigableSet"
] | import java.util.NavigableSet; import java.util.SortedSet; import org.apache.commons.collections4.set.UnmodifiableNavigableSet; | import java.util.*; import org.apache.commons.collections4.set.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,610,173 |
private ThreadContextDescriptor appendInflowContext() throws WorkCompletedException {
ThreadContextDescriptor merged = threadContextDescriptor.clone();
Set<String> inflowContext = new HashSet<String>();
// WorkContext
if (workContexts != null)
for (WorkContext workContex... | ThreadContextDescriptor function() throws WorkCompletedException { ThreadContextDescriptor merged = threadContextDescriptor.clone(); Set<String> inflowContext = new HashSet<String>(); if (workContexts != null) for (WorkContext workContext : workContexts) if (workContext instanceof HintsContext) { if (hintsContextSetupF... | /**
* Append work inflow context to the captured thread context.
*
* @return merged list of captured thread context and work inflow context.
* @throws WorkCompletedException if work context is unacceptable.
*/ | Append work inflow context to the captured thread context | appendInflowContext | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jca/src/com/ibm/ws/jca/internal/WorkProxy.java",
"license": "epl-1.0",
"size": 22224
} | [
"com.ibm.wsspi.threadcontext.ThreadContext",
"com.ibm.wsspi.threadcontext.ThreadContextDescriptor",
"com.ibm.wsspi.threadcontext.jca.JCAContextProvider",
"java.util.HashSet",
"java.util.Set",
"javax.resource.spi.work.HintsContext",
"javax.resource.spi.work.TransactionContext",
"javax.resource.spi.work... | import com.ibm.wsspi.threadcontext.ThreadContext; import com.ibm.wsspi.threadcontext.ThreadContextDescriptor; import com.ibm.wsspi.threadcontext.jca.JCAContextProvider; import java.util.HashSet; import java.util.Set; import javax.resource.spi.work.HintsContext; import javax.resource.spi.work.TransactionContext; import ... | import com.ibm.wsspi.threadcontext.*; import com.ibm.wsspi.threadcontext.jca.*; import java.util.*; import javax.resource.spi.work.*; | [
"com.ibm.wsspi",
"java.util",
"javax.resource"
] | com.ibm.wsspi; java.util; javax.resource; | 2,651,688 |
@Nonnull
public QValue getQValueOfEncoding (@Nonnull final String sEncoding)
{
ValueEnforcer.notNull (sEncoding, "Encoding");
// Direct search encoding
QValue aQuality = qvalueMap ().get (_unify (sEncoding));
if (aQuality == null)
{
// If not explicitly given, check for "*"
aQuali... | QValue function (@Nonnull final String sEncoding) { ValueEnforcer.notNull (sEncoding, STR); QValue aQuality = qvalueMap ().get (_unify (sEncoding)); if (aQuality == null) { aQuality = qvalueMap ().get (AcceptEncodingHandler.ANY_ENCODING); if (aQuality == null) { return QValue.MIN_QVALUE; } } return aQuality; } | /**
* Return the associated quality of the given encoding.
*
* @param sEncoding
* The encoding name to query. May not be <code>null</code>.
* @return The matching {@link QValue} and never <code>null</code>.
*/ | Return the associated quality of the given encoding | getQValueOfEncoding | {
"repo_name": "phax/ph-web",
"path": "ph-http/src/main/java/com/helger/http/AcceptEncodingList.java",
"license": "apache-2.0",
"size": 5469
} | [
"com.helger.commons.ValueEnforcer",
"javax.annotation.Nonnull"
] | import com.helger.commons.ValueEnforcer; import javax.annotation.Nonnull; | import com.helger.commons.*; import javax.annotation.*; | [
"com.helger.commons",
"javax.annotation"
] | com.helger.commons; javax.annotation; | 1,581,224 |
private TopicDto populateCoreTopicDto(TopicDto dto) {
dto.setTopicUrl(PREFIX + dto.getTopic().getId());
dto.setPostUrlPrefix("/posts/");
if (dto.getTopic().isCodeReview()) {
dto.setUnreadIconUrl(CODE_REVIEW_NEW_POSTS);
dto.setReadIconUrl(CODE_REVIEW_NO_NEW_POSTS);
... | TopicDto function(TopicDto dto) { dto.setTopicUrl(PREFIX + dto.getTopic().getId()); dto.setPostUrlPrefix(STR); if (dto.getTopic().isCodeReview()) { dto.setUnreadIconUrl(CODE_REVIEW_NEW_POSTS); dto.setReadIconUrl(CODE_REVIEW_NO_NEW_POSTS); } else if (dto.getTopic().isClosed()) { dto.setUnreadIconUrl(DISCUSSION_CLOSED_NE... | /**
* Populate topicUrl, readIconUrl, unreadIconUrl parameters of dto for topics (Discussion and CodeReview)
*
* @param dto dto to be populated
*
* @return populated dto
*/ | Populate topicUrl, readIconUrl, unreadIconUrl parameters of dto for topics (Discussion and CodeReview) | populateCoreTopicDto | {
"repo_name": "NCNecros/jcommune",
"path": "jcommune-service/src/main/java/org/jtalks/jcommune/service/dto/EntityToDtoConverter.java",
"license": "lgpl-2.1",
"size": 7460
} | [
"org.jtalks.jcommune.plugin.api.web.dto.TopicDto"
] | import org.jtalks.jcommune.plugin.api.web.dto.TopicDto; | import org.jtalks.jcommune.plugin.api.web.dto.*; | [
"org.jtalks.jcommune"
] | org.jtalks.jcommune; | 249,593 |
@CallSuper
public void onCreate() {
super.onCreate();
Log.i(TAG, "onCreate()");
mContext.onCreate();
} | void function() { super.onCreate(); Log.i(TAG, STR); mContext.onCreate(); } | /**
* When created, the application fires an intent to create a P2PService instance.
* @see P2PContext#ensure()
* @see P2PContext#quit()
*/ | When created, the application fires an intent to create a P2PService instance | onCreate | {
"repo_name": "DISCOOS/discoos-p2p",
"path": "p2p/src/main/java/org/discoos/p2p/P2PApplication.java",
"license": "bsd-2-clause",
"size": 3205
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,587,411 |
private void updateUser() throws ClassNotFoundException, NoSuchAlgorithmException{
if (usersTable.getSelectionModel().getSelectedIndex() > -1) {
if (changePassword) updateUserWithNewPassword();
else updateUserWithoutPassword();
}
}
| void function() throws ClassNotFoundException, NoSuchAlgorithmException{ if (usersTable.getSelectionModel().getSelectedIndex() > -1) { if (changePassword) updateUserWithNewPassword(); else updateUserWithoutPassword(); } } | /**
* Update user.
*
* @throws ClassNotFoundException the class not found exception
* @throws NoSuchAlgorithmException the no such algorithm exception
*/ | Update user | updateUser | {
"repo_name": "ultcyber/prk",
"path": "prk/src/main/java/task/timer/view/ManagerTabAddEmployeerController.java",
"license": "mit",
"size": 19092
} | [
"java.security.NoSuchAlgorithmException"
] | import java.security.NoSuchAlgorithmException; | import java.security.*; | [
"java.security"
] | java.security; | 532,029 |
public void setTextAppearance(Context context, int resid) {
if (mTextView != null) {
mTextView.setTextAppearance(context, resid);
}
} | void function(Context context, int resid) { if (mTextView != null) { mTextView.setTextAppearance(context, resid); } } | /**
* Sets the text color, size, style, hint color, and highlight color from the specified
* <code>TextAppearance</code> resource.
*
* @param resid the identifier of the resource.
*/ | Sets the text color, size, style, hint color, and highlight color from the specified <code>TextAppearance</code> resource | setTextAppearance | {
"repo_name": "googlemaps/android-maps-utils",
"path": "library/src/main/java/com/google/maps/android/ui/IconGenerator.java",
"license": "apache-2.0",
"size": 9647
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 2,711,043 |
@Test
public void perturbSuppliedObservableData() {
MarketDataFactory factory = MarketDataFactory.of(
ObservableDataProvider.none(),
new TestTimeSeriesProvider(ImmutableMap.of()));
TestObservableId id = TestObservableId.of(StandardId.of("reqs", "a"));
MarketDataRequirements requirements ... | void function() { MarketDataFactory factory = MarketDataFactory.of( ObservableDataProvider.none(), new TestTimeSeriesProvider(ImmutableMap.of())); TestObservableId id = TestObservableId.of(StandardId.of("reqs", "a")); MarketDataRequirements requirements = MarketDataRequirements.builder().addValues(id).build(); Perturba... | /**
* Tests that perturbations are applied to non-observable data supplied by the user.
*/ | Tests that perturbations are applied to non-observable data supplied by the user | perturbSuppliedObservableData | {
"repo_name": "OpenGamma/Strata",
"path": "modules/calc/src/test/java/com/opengamma/strata/calc/marketdata/DefaultMarketDataFactoryTest.java",
"license": "apache-2.0",
"size": 50542
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.opengamma.strata.basics.StandardId",
"com.opengamma.strata.data.scenario.MarketDataBox",
"org.assertj.core.api.Assertions"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.opengamma.strata.basics.StandardId; import com.opengamma.strata.data.scenario.MarketDataBox; import org.assertj.core.api.Assertions; | import com.google.common.collect.*; import com.opengamma.strata.basics.*; import com.opengamma.strata.data.scenario.*; import org.assertj.core.api.*; | [
"com.google.common",
"com.opengamma.strata",
"org.assertj.core"
] | com.google.common; com.opengamma.strata; org.assertj.core; | 144,214 |
public void mouseReleased(MouseEvent e) {
if (this.zoomRectangle != null) {
boolean hZoom = false;
boolean vZoom = false;
if (this.orientation == PlotOrientation.HORIZONTAL) {
hZoom = this.rangeZoomable;
vZoom = this.domainZoomable;... | void function(MouseEvent e) { if (this.zoomRectangle != null) { boolean hZoom = false; boolean vZoom = false; if (this.orientation == PlotOrientation.HORIZONTAL) { hZoom = this.rangeZoomable; vZoom = this.domainZoomable; } else { hZoom = this.domainZoomable; vZoom = this.rangeZoomable; } boolean zoomTrigger1 = hZoom &&... | /**
* Handles a 'mouse released' event. On Windows, we need to check if this
* is a popup trigger, but only if we haven't already been tracking a zoom
* rectangle.
*
* @param e information about the event.
*/ | Handles a 'mouse released' event. On Windows, we need to check if this is a popup trigger, but only if we haven't already been tracking a zoom rectangle | mouseReleased | {
"repo_name": "DrFuehrer/rdv",
"path": "src/org/rdv/viz/chart/ChartPanel.java",
"license": "mit",
"size": 94915
} | [
"java.awt.Graphics2D",
"java.awt.event.MouseEvent",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.Plot",
"org.jfree.chart.plot.PlotOrientation",
"org.jfree.chart.plot.XYPlot"
] | import java.awt.Graphics2D; import java.awt.event.MouseEvent; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.Plot; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; | import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 2,053,203 |
@GET
@Path("loggedinuser")
@Produces(MediaType.TEXT_PLAIN)
public String userloggedin(@Context HttpServletRequest request) {
Gson gson = new Gson();
User loggeduser = HibernateUtils.getUserFromSession(request);
return gson.toJson(loggeduser);
} | @Path(STR) @Produces(MediaType.TEXT_PLAIN) String function(@Context HttpServletRequest request) { Gson gson = new Gson(); User loggeduser = HibernateUtils.getUserFromSession(request); return gson.toJson(loggeduser); } | /***
* Logged in user
*/ | Logged in user | userloggedin | {
"repo_name": "lucaflorido/GECO",
"path": "src/geco/service/UserService.java",
"license": "mit",
"size": 4353
} | [
"com.google.gson.Gson",
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType"
] | import com.google.gson.Gson; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; | import com.google.gson.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.google.gson",
"javax.servlet",
"javax.ws"
] | com.google.gson; javax.servlet; javax.ws; | 2,056,513 |
public static void addProperty(Stanza packet, String name, Object value) {
JivePropertiesExtension jpe = (JivePropertiesExtension) packet.getExtension(JivePropertiesExtension.NAMESPACE);
if (jpe == null) {
jpe = new JivePropertiesExtension();
packet.addExtension(jpe);
... | static void function(Stanza packet, String name, Object value) { JivePropertiesExtension jpe = (JivePropertiesExtension) packet.getExtension(JivePropertiesExtension.NAMESPACE); if (jpe == null) { jpe = new JivePropertiesExtension(); packet.addExtension(jpe); } jpe.setProperty(name, value); } | /**
* Convenience method to add a property to a packet.
*
* @param packet the stanza(/packet) to add the property to.
* @param name the name of the property to add.
* @param value the value of the property to add.
*/ | Convenience method to add a property to a packet | addProperty | {
"repo_name": "Soo000/SooChat",
"path": "src/org/jivesoftware/smackx/jiveproperties/JivePropertiesManager.java",
"license": "apache-2.0",
"size": 4148
} | [
"org.jivesoftware.smack.packet.Stanza",
"org.jivesoftware.smackx.jiveproperties.packet.JivePropertiesExtension"
] | import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smackx.jiveproperties.packet.JivePropertiesExtension; | import org.jivesoftware.smack.packet.*; import org.jivesoftware.smackx.jiveproperties.packet.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.smackx"
] | org.jivesoftware.smack; org.jivesoftware.smackx; | 2,147,133 |
public GroupFullInfo groupsCreate(String groupName, String groupExternalId)
throws GroupsCreateException, DbxException
{
GroupCreateArg arg = new GroupCreateArg(groupName, groupExternalId);
return groupsCreate(arg);
}
public static class GroupsDeleteException extends DbxA... | GroupFullInfo function(String groupName, String groupExternalId) throws GroupsCreateException, DbxException { GroupCreateArg arg = new GroupCreateArg(groupName, groupExternalId); return groupsCreate(arg); } public static class GroupsDeleteException extends DbxApiException { public final GroupDeleteError errorValue; pub... | /**
* Creates a new, empty group, with a requested name. Permission : Team
* member management
*
* @param groupName Group name. {@code groupName} must not be {@code null}.
* @param groupExternalId Optional argument. The creator of a team can
* associate an arbitrary external ID to th... | Creates a new, empty group, with a requested name. Permission : Team member management | groupsCreate | {
"repo_name": "hunchee/dropbox-sdk-java",
"path": "src/com/dropbox/core/v2/DbxTeam.java",
"license": "mit",
"size": 1014346
} | [
"com.dropbox.core.DbxApiException",
"com.dropbox.core.DbxException",
"com.dropbox.core.LocalizedText"
] | import com.dropbox.core.DbxApiException; import com.dropbox.core.DbxException; import com.dropbox.core.LocalizedText; | import com.dropbox.core.*; | [
"com.dropbox.core"
] | com.dropbox.core; | 987,600 |
@NotNull
public static <IN, OUT> InvocationFactory<IN, OUT> castTo(
@NotNull final Class<? extends OUT> type) {
return Functions.functionMapping(FunctionDecorator.castTo(type));
} | static <IN, OUT> InvocationFactory<IN, OUT> function( @NotNull final Class<? extends OUT> type) { return Functions.functionMapping(FunctionDecorator.castTo(type)); } | /**
* Returns a factory of invocations casting the passed inputs to the specified class.
*
* @param type the class type.
* @param <IN> the input data type.
* @param <OUT> the output data type.
* @return the invocation factory instance.
*/ | Returns a factory of invocations casting the passed inputs to the specified class | castTo | {
"repo_name": "davide-maestroni/jroutine",
"path": "operator/src/main/java/com/github/dm/jrt/operator/Operators.java",
"license": "apache-2.0",
"size": 67942
} | [
"com.github.dm.jrt.core.invocation.InvocationFactory",
"com.github.dm.jrt.function.FunctionDecorator",
"com.github.dm.jrt.function.Functions",
"org.jetbrains.annotations.NotNull"
] | import com.github.dm.jrt.core.invocation.InvocationFactory; import com.github.dm.jrt.function.FunctionDecorator; import com.github.dm.jrt.function.Functions; import org.jetbrains.annotations.NotNull; | import com.github.dm.jrt.core.invocation.*; import com.github.dm.jrt.function.*; import org.jetbrains.annotations.*; | [
"com.github.dm",
"org.jetbrains.annotations"
] | com.github.dm; org.jetbrains.annotations; | 146,729 |
@SuppressWarnings("unchecked")
private IgfsPathsCreateResult createFileOrDirectory(boolean dir, IgfsPathIds pathIds,
Map<IgniteUuid, IgfsEntryInfo> lockInfos, Map<String, String> dirProps, Map<String, String> fileProps,
int blockSize, @Nullable IgniteUuid affKey, boolean evictExclude,
@N... | @SuppressWarnings(STR) IgfsPathsCreateResult function(boolean dir, IgfsPathIds pathIds, Map<IgniteUuid, IgfsEntryInfo> lockInfos, Map<String, String> dirProps, Map<String, String> fileProps, int blockSize, @Nullable IgniteUuid affKey, boolean evictExclude, @Nullable IgfsSecondaryFileSystemCreateContext secondaryCtx, @N... | /**
* Create file or directory.
*
* @param dir Directory flag.
* @param pathIds Path IDs.
* @param lockInfos Lock infos.
* @param dirProps Directory properties.
* @param fileProps File properties.
* @param blockSize Block size.
* @param affKey Affinity key.
* @param evi... | Create file or directory | createFileOrDirectory | {
"repo_name": "kromulan/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java",
"license": "apache-2.0",
"size": 132038
} | [
"java.io.OutputStream",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.cache.processor.EntryProcessor",
"javax.cache.processor.EntryProcessorResult",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.igfs.IgfsException",
"org.apache.ignite.igfs.I... | import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.cache.processor.EntryProcessor; import javax.cache.processor.EntryProcessorResult; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.igfs.IgfsException; im... | import java.io.*; import java.util.*; import javax.cache.processor.*; import org.apache.ignite.*; import org.apache.ignite.igfs.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.igfs.meta.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*; | [
"java.io",
"java.util",
"javax.cache",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.io; java.util; javax.cache; org.apache.ignite; org.jetbrains.annotations; | 1,843,249 |
public static String createBoxedSignatureStringFromMethod(MethodType method) {
StringBuffer methodString = new StringBuffer();
String methodName = CommonTools.lowerCaseFirstCharacter(method.getName());
if (method.getOutputMessageClass() != null) {
methodString.append("public ")... | static String function(MethodType method) { StringBuffer methodString = new StringBuffer(); String methodName = CommonTools.lowerCaseFirstCharacter(method.getName()); if (method.getOutputMessageClass() != null) { methodString.append(STR).append(method.getOutputMessageClass()).append(" ").append(methodName) .append("(")... | /**
* Creates a method signature which returnes the boxed data type
*
* @param method
* The method
* @return The method signature which returns a boxed data type
*/ | Creates a method signature which returnes the boxed data type | createBoxedSignatureStringFromMethod | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/introduce/src/java/Introduce/gov/nih/nci/cagrid/introduce/codegen/services/methods/SyncHelper.java",
"license": "bsd-3-clause",
"size": 28095
} | [
"gov.nih.nci.cagrid.introduce.beans.method.MethodType",
"gov.nih.nci.cagrid.introduce.common.CommonTools"
] | import gov.nih.nci.cagrid.introduce.beans.method.MethodType; import gov.nih.nci.cagrid.introduce.common.CommonTools; | import gov.nih.nci.cagrid.introduce.beans.method.*; import gov.nih.nci.cagrid.introduce.common.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 2,137,012 |
public List<JobListener> getJobListeners() {
synchronized ( jobListeners ) {
return new ArrayList<JobListener>( jobListeners );
}
} | List<JobListener> function() { synchronized ( jobListeners ) { return new ArrayList<JobListener>( jobListeners ); } } | /**
* Gets the job listeners.
*
* @return the job listeners
*/ | Gets the job listeners | getJobListeners | {
"repo_name": "gretchiemoran/pentaho-kettle",
"path": "engine/src/org/pentaho/di/job/Job.java",
"license": "apache-2.0",
"size": 71804
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 356,825 |
public static void trackedWait(CapturedTopology<TrackedTopology> topo) {
topo.topology.trackedWait();
} | static void function(CapturedTopology<TrackedTopology> topo) { topo.topology.trackedWait(); } | /**
* Simulated time wait for a tracked topology. This is intended for internal testing
*/ | Simulated time wait for a tracked topology. This is intended for internal testing | trackedWait | {
"repo_name": "dke-knu/i2am",
"path": "rdma-based-storm/storm-core/src/jvm/org/apache/storm/Testing.java",
"license": "apache-2.0",
"size": 26829
} | [
"org.apache.storm.testing.TrackedTopology"
] | import org.apache.storm.testing.TrackedTopology; | import org.apache.storm.testing.*; | [
"org.apache.storm"
] | org.apache.storm; | 176,208 |
public SubMenu setHeaderView(View view); | SubMenu function(View view); | /**
* Sets the header of the submenu to the {@link android.view.View} given in
* <var>view</var>. This replaces the header title and icon (and those
* replace this).
*
* @param view The {@link android.view.View} used for the header.
* @return This SubMenu so additional setters can be calle... | Sets the header of the submenu to the <code>android.view.View</code> given in view. This replaces the header title and icon (and those replace this) | setHeaderView | {
"repo_name": "rde8026/TwitterClient",
"path": "libraries/actionbarsherlock/src/com/actionbarsherlock/view/SubMenu.java",
"license": "apache-2.0",
"size": 3750
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,356,335 |
public void setCompletionStartDate(String startDate) throws ParseException {
completionStartDate = normalizeDateString(startDate);
}
| void function(String startDate) throws ParseException { completionStartDate = normalizeDateString(startDate); } | /**
* Set the Scheduled Procedure Step query start date.
* <p>
*
*
* @param startDate The start Date to set.
* @throws ParseException
*/ | Set the Scheduled Procedure Step query start date. | setCompletionStartDate | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_9_5/dcm4jboss-web/src/java/org/dcm4chex/archive/web/maverick/gpwl/model/GPWLFilter.java",
"license": "apache-2.0",
"size": 12372
} | [
"java.text.ParseException"
] | import java.text.ParseException; | import java.text.*; | [
"java.text"
] | java.text; | 1,364,916 |
public InstanceId getInstanceId(); | InstanceId function(); | /**
* Get the cluster InstanceId of the cluster that wrote the command log.
*/ | Get the cluster InstanceId of the cluster that wrote the command log | getInstanceId | {
"repo_name": "wolffcm/voltdb",
"path": "src/frontend/org/voltdb/CommandLogReinitiator.java",
"license": "agpl-3.0",
"size": 3617
} | [
"org.voltcore.utils.InstanceId"
] | import org.voltcore.utils.InstanceId; | import org.voltcore.utils.*; | [
"org.voltcore.utils"
] | org.voltcore.utils; | 2,431,456 |
public final Collection<?> convert(DataTypeDefinition propertyType, Collection<?> values)
{
ParameterCheck.mandatory("Property type definition", propertyType);
// Convert property type to java class
Class<?> javaClass = null;
String javaClassName = propertyType.get... | final Collection<?> function(DataTypeDefinition propertyType, Collection<?> values) { ParameterCheck.mandatory(STR, propertyType); Class<?> javaClass = null; String javaClassName = propertyType.getJavaClassName(); try { javaClass = Class.forName(javaClassName); } catch (ClassNotFoundException e) { throw new DictionaryE... | /**
* General conversion method to convert collection contents to the specified
* type.
*
* @param propertyType - the target property type
* @param values - the value to be converted
* @return - the converted value as the correct type
* @throws DictionaryException if the prope... | General conversion method to convert collection contents to the specified type | convert | {
"repo_name": "Alfresco/community-edition",
"path": "projects/data-model/source/java/org/alfresco/service/cmr/repository/datatype/TypeConverter.java",
"license": "lgpl-3.0",
"size": 18508
} | [
"java.util.Collection",
"org.alfresco.service.cmr.dictionary.DataTypeDefinition",
"org.alfresco.service.cmr.dictionary.DictionaryException",
"org.springframework.extensions.surf.util.ParameterCheck"
] | import java.util.Collection; import org.alfresco.service.cmr.dictionary.DataTypeDefinition; import org.alfresco.service.cmr.dictionary.DictionaryException; import org.springframework.extensions.surf.util.ParameterCheck; | import java.util.*; import org.alfresco.service.cmr.dictionary.*; import org.springframework.extensions.surf.util.*; | [
"java.util",
"org.alfresco.service",
"org.springframework.extensions"
] | java.util; org.alfresco.service; org.springframework.extensions; | 144,857 |
@Generated
@Selector("initWithDevice:right:upper:transpose:unit:order:numberOfRightHandSides:alpha:")
public native MPSMatrixSolveTriangular initWithDeviceRightUpperTransposeUnitOrderNumberOfRightHandSidesAlpha(
@Mapped(ObjCObjectMapper.class) MTLDevice device, boolean right, boolean upper, bool... | @Selector(STR) native MPSMatrixSolveTriangular function( @Mapped(ObjCObjectMapper.class) MTLDevice device, boolean right, boolean upper, boolean transpose, boolean unit, @NUInt long order, @NUInt long numberOfRightHandSides, double alpha); | /**
* Initialize an MPSMatrixSolveTriangular object on a device
* <p>
* This function initializes a MPSMatrixSolveTriangular object. It
* may allocate device side memory.
*
* @param device The device on which the kernel will execute.
* @param right A ... | Initialize an MPSMatrixSolveTriangular object on a device This function initializes a MPSMatrixSolveTriangular object. It may allocate device side memory | initWithDeviceRightUpperTransposeUnitOrderNumberOfRightHandSidesAlpha | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshaders/MPSMatrixSolveTriangular.java",
"license": "apache-2.0",
"size": 9689
} | [
"org.moe.natj.general.ann.Mapped",
"org.moe.natj.general.ann.NUInt",
"org.moe.natj.objc.ann.Selector",
"org.moe.natj.objc.map.ObjCObjectMapper"
] | import org.moe.natj.general.ann.Mapped; import org.moe.natj.general.ann.NUInt; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; import org.moe.natj.objc.map.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,509,546 |
void rightFloatValueChanged(short unit, float value)
throws DOMException; | void rightFloatValueChanged(short unit, float value) throws DOMException; | /**
* Called when the right float value has changed.
*/ | Called when the right float value has changed | rightFloatValueChanged | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/css/dom/CSSOMValue.java",
"license": "apache-2.0",
"size": 46308
} | [
"org.w3c.dom.DOMException"
] | import org.w3c.dom.DOMException; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 271,644 |
public void removePopupMenuListener(PopupMenuListener l) {
listenerList.remove(PopupMenuListener.class,l);
} | void function(PopupMenuListener l) { listenerList.remove(PopupMenuListener.class,l); } | /**
* Removes a <code>PopupMenuListener</code>.
*
* @param l the <code>PopupMenuListener</code> to remove
* @see #addPopupMenuListener
* @since 1.4
*/ | Removes a <code>PopupMenuListener</code> | removePopupMenuListener | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JComboBox.java",
"license": "apache-2.0",
"size": 92256
} | [
"javax.swing.event.PopupMenuListener"
] | import javax.swing.event.PopupMenuListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,587,646 |
private boolean nextNodeForTree(BranchingTree tree,
HashSet<BranchingTree> activeNodes, FlowDirection direction) {
boolean changed = false;
Collection<ProcessNode> nodes =
neighborNodesOfForDirection(tree.getNode(), direction);
for (ProcessNode node : nodes) {
BranchingTree add... | boolean function(BranchingTree tree, HashSet<BranchingTree> activeNodes, FlowDirection direction) { boolean changed = false; Collection<ProcessNode> nodes = neighborNodesOfForDirection(tree.getNode(), direction); for (ProcessNode node : nodes) { BranchingTree addedNode = addAsNewNodeAfter(node, tree, direction); if(add... | /**
* creates the next BranchingTree-node for a given node
* @param tree the BranchingTree-node for wich to create children
* @param activeNodes the set of nodes, that are currently active (needed in
* order to be updated)
* @param direction the direction, in which the tree is to be built
* @return tr... | creates the next BranchingTree-node for a given node | nextNodeForTree | {
"repo_name": "bptlab/processeditor",
"path": "src/com/inubit/research/gui/plugins/choreography/branchingTree/TreeBuilder.java",
"license": "apache-2.0",
"size": 5113
} | [
"java.util.Collection",
"java.util.HashSet",
"net.frapu.code.visualization.ProcessNode"
] | import java.util.Collection; import java.util.HashSet; import net.frapu.code.visualization.ProcessNode; | import java.util.*; import net.frapu.code.visualization.*; | [
"java.util",
"net.frapu.code"
] | java.util; net.frapu.code; | 2,153,098 |
public void setMultiSelect(boolean multiSelect) {
if (multiSelect && getNullSelectionItemId() != null) {
throw new IllegalStateException(
"Multiselect and NullSelectionItemId can not be set at the same time.");
}
if (multiSelect != this.multiSelect) {
... | void function(boolean multiSelect) { if (multiSelect && getNullSelectionItemId() != null) { throw new IllegalStateException( STR); } if (multiSelect != this.multiSelect) { final Object oldValue = getValue(); this.multiSelect = multiSelect; if (multiSelect) { final Set<Object> s = new HashSet<Object>(); if (oldValue != ... | /**
* Sets the multiselect mode. Setting multiselect mode false may lose
* selection information: if selected items set contains one or more
* selected items, only one of the selected items is kept as selected.
*
* Subclasses of AbstractSelect can choose not to support changing the
* mult... | Sets the multiselect mode. Setting multiselect mode false may lose selection information: if selected items set contains one or more selected items, only one of the selected items is kept as selected. Subclasses of AbstractSelect can choose not to support changing the multiselect mode, and may throw <code>UnsupportedOp... | setMultiSelect | {
"repo_name": "shahrzadmn/vaadin",
"path": "server/src/com/vaadin/ui/AbstractSelect.java",
"license": "apache-2.0",
"size": 76691
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,806,136 |
public void removeUser(MutationBatch mutator) {
mutator.withRow(CF_USER, user_id).delete();
}
| void function(MutationBatch mutator) { mutator.withRow(CF_USER, user_id).delete(); } | /**
* Don't touch to user's content.
*/ | Don't touch to user's content | removeUser | {
"repo_name": "hdsdi3g/MyDMAM",
"path": "app/hd3gtv/mydmam/ftpserver/FTPUser.java",
"license": "lgpl-3.0",
"size": 16055
} | [
"com.netflix.astyanax.MutationBatch"
] | import com.netflix.astyanax.MutationBatch; | import com.netflix.astyanax.*; | [
"com.netflix.astyanax"
] | com.netflix.astyanax; | 264,294 |
public static <T> T resolveReferenceParameter(CamelContext context, String value, Class<T> type, boolean mandatory) {
String valueNoHash = StringHelper.replaceAll(value, "#bean:", "");
valueNoHash = StringHelper.replaceAll(valueNoHash, "#", "");
if (mandatory) {
return CamelConte... | static <T> T function(CamelContext context, String value, Class<T> type, boolean mandatory) { String valueNoHash = StringHelper.replaceAll(value, STR, STR#STR"); if (mandatory) { return CamelContextHelper.mandatoryLookupAndConvert(context, valueNoHash, type); } else { return CamelContextHelper.lookupAndConvert(context,... | /**
* Resolves a reference parameter by making a lookup in the registry.
*
* @param <T> type of object to lookup.
* @param context Camel context to use for lookup.
* @param value reference parameter value.
* @param type type of object to lookup.
* @return lookup result (or <c... | Resolves a reference parameter by making a lookup in the registry | resolveReferenceParameter | {
"repo_name": "DariusX/camel",
"path": "core/camel-support/src/main/java/org/apache/camel/support/EndpointHelper.java",
"license": "apache-2.0",
"size": 16704
} | [
"org.apache.camel.CamelContext",
"org.apache.camel.util.StringHelper"
] | import org.apache.camel.CamelContext; import org.apache.camel.util.StringHelper; | import org.apache.camel.*; import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,274,692 |
public static void writeMiniLangDocument(URL xmlURL, Document document) {
URL styleSheetURL = null;
InputStream styleSheetInStream = null;
Transformer transformer = null;
try {
styleSheetURL = FlexibleLocation.resolveLocation("component://minilang/config/MiniLang.xslt");
... | static void function(URL xmlURL, Document document) { URL styleSheetURL = null; InputStream styleSheetInStream = null; Transformer transformer = null; try { styleSheetURL = FlexibleLocation.resolveLocation(STRError reading minilang/config/MiniLang.xslt: STRError closing minilang/config/MiniLang.xslt: STRSaved Mini-lang... | /**
* Writes a Mini-language <code>Document</code> to disk. The XML file is styled by the
* config/MiniLang.xslt style sheet.
*
* @param xmlURL
* @param document
*/ | Writes a Mini-language <code>Document</code> to disk. The XML file is styled by the config/MiniLang.xslt style sheet | writeMiniLangDocument | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-16.11.03/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java",
"license": "apache-2.0",
"size": 12586
} | [
"java.io.InputStream",
"javax.xml.transform.Transformer",
"org.apache.ofbiz.base.location.FlexibleLocation",
"org.w3c.dom.Document"
] | import java.io.InputStream; import javax.xml.transform.Transformer; import org.apache.ofbiz.base.location.FlexibleLocation; import org.w3c.dom.Document; | import java.io.*; import javax.xml.transform.*; import org.apache.ofbiz.base.location.*; import org.w3c.dom.*; | [
"java.io",
"javax.xml",
"org.apache.ofbiz",
"org.w3c.dom"
] | java.io; javax.xml; org.apache.ofbiz; org.w3c.dom; | 2,350,809 |
@Test
public void testDuplicateEdges() {
final ProtoEdgeTable tbl = new ProtoEdgeTable();
// for statement 0, add edge triple "1 HAS_COMPONENT 2"
final TableProtoEdge edge1 = new TableProtoEdge(1, "HAS_COMPONENT", 2);
tbl.addEdges(0, edge1);
// for statement 1, add the ... | void function() { final ProtoEdgeTable tbl = new ProtoEdgeTable(); final TableProtoEdge edge1 = new TableProtoEdge(1, STR, 2); tbl.addEdges(0, edge1); final TableProtoEdge edge2 = new TableProtoEdge(1, STR, 2); tbl.addEdges(1, edge2); assertThat(tbl.getStatementEdges().size(), is(2)); assertThat(tbl.getProtoEdges().siz... | /**
* Test adding duplicate edges from two separate statements. Base on BEL
* statements:
* <p>
* <tt>complex(p(1),p(2))</tt>
* <br>
* <tt>complex(p(1),p(2))</tt>
* </p>
*/ | Test adding duplicate edges from two separate statements. Base on BEL statements: complex(p(1),p(2)) complex(p(1),p(2)) | testDuplicateEdges | {
"repo_name": "OpenBEL/openbel-framework",
"path": "org.openbel.framework.common/src/test/java/org/openbel/framework/common/protonetwork/model/ProtoEdgeTableTest.java",
"license": "apache-2.0",
"size": 5936
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert",
"org.openbel.framework.common.protonetwork.model.ProtoEdgeTable"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.openbel.framework.common.protonetwork.model.ProtoEdgeTable; | import org.hamcrest.*; import org.junit.*; import org.openbel.framework.common.protonetwork.model.*; | [
"org.hamcrest",
"org.junit",
"org.openbel.framework"
] | org.hamcrest; org.junit; org.openbel.framework; | 2,839,091 |
@Override public void exitAssign_water(@NotNull FunctionParser.Assign_waterContext ctx) { } | @Override public void exitAssign_water(@NotNull FunctionParser.Assign_waterContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterAssign_water | {
"repo_name": "octopus-platform/joern",
"path": "projects/extensions/joern-fuzzyc/src/main/java/antlr/FunctionBaseListener.java",
"license": "lgpl-3.0",
"size": 42232
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 647,289 |
public static boolean isLocationLatLonAvailable(Context context) {
return false;
} | static boolean function(Context context) { return false; } | /**
* Returns true if the latitude and longitude values are available. The latitude and
* longitude will not be available until the lesson where the PlacePicker API is taught.
*
* @param context used to get the SharedPreferences
* @return true if lat/long are set
*/ | Returns true if the latitude and longitude values are available. The latitude and longitude will not be available until the lesson where the PlacePicker API is taught | isLocationLatLonAvailable | {
"repo_name": "iarif123/sunshine",
"path": "app/src/main/java/com/example/android/sunshine/app/data/SunshinePreferences.java",
"license": "apache-2.0",
"size": 5871
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,797,223 |
Instances getDataSet() throws IOException;
/**
* Read the data set incrementally---get the next instance in the data
* set or returns null if there are no
* more instances to get. If the structure hasn't yet been
* determined by a call to getStructure then method should do so before
* returning th... | Instances getDataSet() throws IOException; /** * Read the data set incrementally---get the next instance in the data * set or returns null if there are no * more instances to get. If the structure hasn't yet been * determined by a call to getStructure then method should do so before * returning the next instance in the... | /**
* Return the full data set. If the structure hasn't yet been determined
* by a call to getStructure then the method should do so before processing
* the rest of the data set.
*
* @return the full data set as an Instances object
* @exception IOException if there is an error during parsing or if
... | Return the full data set. If the structure hasn't yet been determined by a call to getStructure then the method should do so before processing the rest of the data set | getDataSet | {
"repo_name": "paolopavan/cfr",
"path": "src/weka/core/converters/Loader.java",
"license": "gpl-3.0",
"size": 6624
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,292,791 |
public void testSearchWithRelocationAndSlowClusterStateProcessing() throws Exception {
// Don't use AbstractDisruptionTestCase.DEFAULT_SETTINGS as settings
// (which can cause node disconnects on a slow CI machine)
internalCluster().startMasterOnlyNode();
final String node_1 = intern... | void function() throws Exception { internalCluster().startMasterOnlyNode(); final String node_1 = internalCluster().startDataOnlyNode(); logger.info(STR); assertAcked(prepareCreate("test").setSettings( Settings.builder().put(indexSettings()) .put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) .put(IndexMetaData.SETTING_NUM... | /**
* This test creates a scenario where a primary shard (0 replicas) relocates and is in POST_RECOVERY on the target
* node but already deleted on the source node. Search request should still work.
*/ | This test creates a scenario where a primary shard (0 replicas) relocates and is in POST_RECOVERY on the target node but already deleted on the source node. Search request should still work | testSearchWithRelocationAndSlowClusterStateProcessing | {
"repo_name": "strapdata/elassandra",
"path": "server/src/test/java/org/elasticsearch/discovery/ClusterDisruptionCleanSettingsIT.java",
"license": "apache-2.0",
"size": 3465
} | [
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.action.index.IndexRequestBuilder",
"org.elasticsearch.cluster.metadata.IndexMetaData",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.common.xcontent.XContentType",
"org.elasticsearch.indices.store.IndicesStoreIntegrationIT",
... | import java.util.ArrayList; import java.util.List; import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.indices.store.IndicesS... | import java.util.*; import org.elasticsearch.action.index.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.indices.store.*; import org.elasticsearch.test.hamcrest.*; import org.hamcrest.*; | [
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.indices",
"org.elasticsearch.test",
"org.hamcrest"
] | java.util; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.indices; org.elasticsearch.test; org.hamcrest; | 1,568,509 |
private Map<String, BigInteger> sendAndReceiveActualData(String serial)
{
Map<String, BigInteger> data = defaultDataMap();
String receiveTopic = serial + SUBSCRIBE_SUFFIX;
MqttResponseMessage responseMessage = new MqttResponseMessage(receiveTopic, 1);
//send message
mes... | Map<String, BigInteger> function(String serial) { Map<String, BigInteger> data = defaultDataMap(); String receiveTopic = serial + SUBSCRIBE_SUFFIX; MqttResponseMessage responseMessage = new MqttResponseMessage(receiveTopic, 1); messageService.publishAndReceive(serial + ENDPOINT_SUFFIX, "get", responseMessage); boolean ... | /**
* subscribes to the serial/usef/actual topic,
* publishes a request on the serial/usef/GetActual topic,
* waits 5 seconds for a response
* converts the json data to map values
*
* data keys:
* ptu
* Unctr
* BATTERY
* PV
*
* @param serial serial of the CG d... | subscribes to the serial/usef/actual topic, publishes a request on the serial/usef/GetActual topic, waits 5 seconds for a response converts the json data to map values data keys: ptu Unctr BATTERY PV | sendAndReceiveActualData | {
"repo_name": "USEF-Foundation/ri.usef.energy",
"path": "usef-build/usef-hoogdalem/usef-workflow-hd/usef-hd-agr1/src/main/java/nl/energieprojecthoogdalem/agr/pbc/DetermineNetDemands.java",
"license": "apache-2.0",
"size": 13537
} | [
"java.io.IOException",
"java.math.BigInteger",
"java.util.Arrays",
"java.util.Map",
"java.util.concurrent.TimeUnit",
"java.util.stream.Collectors",
"nl.energieprojecthoogdalem.messageservice.transportservice.data.ActualDeviceData",
"nl.energieprojecthoogdalem.messageservice.transportservice.mqttmessag... | import java.io.IOException; import java.math.BigInteger; import java.util.Arrays; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import nl.energieprojecthoogdalem.messageservice.transportservice.data.ActualDeviceData; import nl.energieprojecthoogdalem.messageservice.tran... | import java.io.*; import java.math.*; import java.util.*; import java.util.concurrent.*; import java.util.stream.*; import nl.energieprojecthoogdalem.messageservice.transportservice.data.*; import nl.energieprojecthoogdalem.messageservice.transportservice.mqttmessages.*; import org.codehaus.jackson.*; import org.codeha... | [
"java.io",
"java.math",
"java.util",
"nl.energieprojecthoogdalem.messageservice",
"org.codehaus.jackson",
"org.eclipse.paho"
] | java.io; java.math; java.util; nl.energieprojecthoogdalem.messageservice; org.codehaus.jackson; org.eclipse.paho; | 305,543 |
public void setInputSourceMaps(final ImmutableMap<String, SourceMapInput> inputSourceMaps) {
this.inputSourceMaps = inputSourceMaps;
}
boolean inferConsts = true; | void function(final ImmutableMap<String, SourceMapInput> inputSourceMaps) { this.inputSourceMaps = inputSourceMaps; } boolean inferConsts = true; | /**
* Sets the input sourcemap files, indexed by the JS files they refer to.
*
* @param inputSourceMaps the collection of input sourcemap files
*/ | Sets the input sourcemap files, indexed by the JS files they refer to | setInputSourceMaps | {
"repo_name": "GoogleChromeLabs/chromeos_smart_card_connector",
"path": "third_party/closure-compiler/src/src/com/google/javascript/jscomp/CompilerOptions.java",
"license": "apache-2.0",
"size": 112952
} | [
"com.google.common.collect.ImmutableMap"
] | import com.google.common.collect.ImmutableMap; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,581,808 |
@OnDisabled
public void shutdown() {
try {
dataSource.close();
} catch (final SQLException e) {
throw new ProcessException(e);
}
} | void function() { try { dataSource.close(); } catch (final SQLException e) { throw new ProcessException(e); } } | /**
* Shutdown pool, close all open connections.
*/ | Shutdown pool, close all open connections | shutdown | {
"repo_name": "mcgilman/nifi",
"path": "nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/dbcp/hive/Hive3ConnectionPool.java",
"license": "apache-2.0",
"size": 30156
} | [
"java.sql.SQLException",
"org.apache.nifi.processor.exception.ProcessException"
] | import java.sql.SQLException; import org.apache.nifi.processor.exception.ProcessException; | import java.sql.*; import org.apache.nifi.processor.exception.*; | [
"java.sql",
"org.apache.nifi"
] | java.sql; org.apache.nifi; | 2,493,338 |
protected void processRequest() {
final int timeout = getHTTPContext().getReadTimeout();
final TCPReadCompletedCallback callback = HttpICLReadCallback.getRef();
// keep looping on processing information until we fully parse the message
// and hand it off, or until the reads for more... | void function() { final int timeout = getHTTPContext().getReadTimeout(); final TCPReadCompletedCallback callback = HttpICLReadCallback.getRef(); VirtualConnection rc = null; do { if (handleNewInformation()) { return; } if (!isPartiallyParsed()) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.deb... | /**
* Process new information for an inbound request that needs to be parsed
* and handled by channels above.
*/ | Process new information for an inbound request that needs to be parsed and handled by channels above | processRequest | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/inbound/HttpInboundLink.java",
"license": "epl-1.0",
"size": 43496
} | [
"com.ibm.websphere.ras.Tr",
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.wsspi.channelfw.VirtualConnection",
"com.ibm.wsspi.tcpchannel.TCPReadCompletedCallback"
] | import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.wsspi.channelfw.VirtualConnection; import com.ibm.wsspi.tcpchannel.TCPReadCompletedCallback; | import com.ibm.websphere.ras.*; import com.ibm.wsspi.channelfw.*; import com.ibm.wsspi.tcpchannel.*; | [
"com.ibm.websphere",
"com.ibm.wsspi"
] | com.ibm.websphere; com.ibm.wsspi; | 2,879,881 |
@Test
public void testStoragePoliciesCK() throws Exception {
final Configuration conf = new HdfsConfiguration();
final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf)
.numDataNodes(3)
.storageTypes(
new StorageType[] {StorageType.DISK, StorageType.ARCHIVE})
.bui... | void function() throws Exception { final Configuration conf = new HdfsConfiguration(); final MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf) .numDataNodes(3) .storageTypes( new StorageType[] {StorageType.DISK, StorageType.ARCHIVE}) .build(); try { cluster.waitActive(); final DistributedFileSystem dfs = cluste... | /**
* Test storage policy display
*/ | Test storage policy display | testStoragePoliciesCK | {
"repo_name": "anjuncc/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFsck.java",
"license": "apache-2.0",
"size": 66060
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.StorageType",
"org.apache.hadoop.hdfs.DistributedFileSystem",
"org.apache.hadoop.hdfs.HdfsConfiguration",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.junit.Assert"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.junit.Assert; | import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 866,614 |
public static void removePropertyChangeListener(String property, PropertyChangeListener listener) {
support.removePropertyChangeListener(property, listener);
}
}
/*
* Open Source Physics software is free software; you can redistribute
* it and/or modify it under the terms of the GNU General Public License (... | static void function(String property, PropertyChangeListener listener) { support.removePropertyChangeListener(property, listener); } } /* * Open Source Physics software is free software; you can redistribute * it and/or modify it under the terms of the GNU General Public License (GPL) as * published by the Free Softwar... | /**
* Removes a PropertyChangeListener.
*
* @param property the name of the property (only "locale" accepted)
* @param listener the listener requesting removal
*/ | Removes a PropertyChangeListener | removePropertyChangeListener | {
"repo_name": "OpenSourcePhysics/osp",
"path": "src/org/opensourcephysics/tools/ToolsRes.java",
"license": "gpl-3.0",
"size": 4812
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,895,315 |
@Test(timeout=60000)
public void testDiskUsageStaySame() throws Exception {
//set a limit lower than max available space and set the period to 2 seconds
tempUsage.setLimit(10000000);
storeUsage.setLimit(100000000);
broker.setSchedulePeriodForDiskUsageCheck(2000);
startBro... | @Test(timeout=60000) void function() throws Exception { tempUsage.setLimit(10000000); storeUsage.setLimit(100000000); broker.setSchedulePeriodForDiskUsageCheck(2000); startBroker(); long originalDisk = broker.getSystemUsage().getStoreUsage().getLimit(); long originalTmp = broker.getSystemUsage().getTempUsage().getLimit... | /**
* This test will show that if a file is written to take away free space, but
* if the limit is greater than the store size and the remaining free space, then
* the usage limits will not adjust.
*/ | This test will show that if a file is written to take away free space, but if the limit is greater than the store size and the remaining free space, then the usage limits will not adjust | testDiskUsageStaySame | {
"repo_name": "chirino/activemq",
"path": "activemq-unit-tests/src/test/java/org/apache/activemq/usage/PeriodicDiskUsageLimitTest.java",
"license": "apache-2.0",
"size": 13102
} | [
"org.junit.Assert",
"org.junit.Test"
] | import org.junit.Assert; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,512,878 |
public IContestPermission setPermission(ContestPermissionType value); | IContestPermission function(ContestPermissionType value); | /**
* Setter for <code>public.contest_permission.permission</code>.
*/ | Setter for <code>public.contest_permission.permission</code> | setPermission | {
"repo_name": "nickguletskii/OpenOlympus",
"path": "src-gen/main/java/org/ng200/openolympus/jooq/tables/interfaces/IContestPermission.java",
"license": "mit",
"size": 3490
} | [
"org.ng200.openolympus.jooq.enums.ContestPermissionType"
] | import org.ng200.openolympus.jooq.enums.ContestPermissionType; | import org.ng200.openolympus.jooq.enums.*; | [
"org.ng200.openolympus"
] | org.ng200.openolympus; | 1,268,798 |
public void testAddAllParams() {
mArrayAdapter.setNotifyOnChange(true);
final MockDataSetObserver mockDataSetObserver = new MockDataSetObserver();
mArrayAdapter.registerDataSetObserver(mockDataSetObserver);
mArrayAdapter.clear();
assertEquals(mArrayAdapter.getCount(), 0);
... | void function() { mArrayAdapter.setNotifyOnChange(true); final MockDataSetObserver mockDataSetObserver = new MockDataSetObserver(); mArrayAdapter.registerDataSetObserver(mockDataSetObserver); mArrayAdapter.clear(); assertEquals(mArrayAdapter.getCount(), 0); mArrayAdapter.addAll("this", "is", "a", "unit", "test"); asser... | /**
* insert multiple items via addAll, notify data changed
* check count and content
*/ | insert multiple items via addAll, notify data changed check count and content | testAddAllParams | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "cts/tests/tests/widget/src/android/widget/cts/ArrayAdapterTest.java",
"license": "gpl-3.0",
"size": 17709
} | [
"android.database.DataSetObserver"
] | import android.database.DataSetObserver; | import android.database.*; | [
"android.database"
] | android.database; | 2,859,638 |
public final int onDrain(Buffer buffer, int maxDrained, Object... args)
throws IOException {
return getBuffer().drain(getWrappedChannel());
} | final int function(Buffer buffer, int maxDrained, Object... args) throws IOException { return getBuffer().drain(getWrappedChannel()); } | /**
* Drains the byte buffer.
*
* @param buffer
* The IO buffer to drain.
* @param maxDrained
* The maximum number of bytes drained by this call.
* @param args
* The optional arguments to pass back to the callbacks.
* @throws IOException
... | Drains the byte buffer | onDrain | {
"repo_name": "zhangjunfang/eclipse-dir",
"path": "restlet/src/org/restlet/engine/io/WritableBufferedChannel.java",
"license": "bsd-2-clause",
"size": 4065
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 676,465 |
private void validateSubject(final Resource subject) {
final String subjectURI = subject.getURI();
// blank nodes are okay
if (!subject.isAnon()) {
// hash URIs with the same base as the topic are okay
final int hashIndex = subjectURI.lastIndexOf("#");
if ... | void function(final Resource subject) { final String subjectURI = subject.getURI(); if (!subject.isAnon()) { final int hashIndex = subjectURI.lastIndexOf("#"); if (!(hashIndex > 0 && topic.getURI().equals(subjectURI.substring(0, hashIndex)))) { if (!topic.equals(subject.asNode())) { if (idTranslator.inDomain(subject)) ... | /**
* If it's not the right kind of node, throw an appropriate unchecked exception.
*
* @param subject
*/ | If it's not the right kind of node, throw an appropriate unchecked exception | validateSubject | {
"repo_name": "ruebot/fcrepo4",
"path": "fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/utils/JcrPropertyStatementListener.java",
"license": "apache-2.0",
"size": 8257
} | [
"com.hp.hpl.jena.rdf.model.Resource",
"org.fcrepo.kernel.api.exception.IncorrectTripleSubjectException",
"org.fcrepo.kernel.api.exception.OutOfDomainSubjectException"
] | import com.hp.hpl.jena.rdf.model.Resource; import org.fcrepo.kernel.api.exception.IncorrectTripleSubjectException; import org.fcrepo.kernel.api.exception.OutOfDomainSubjectException; | import com.hp.hpl.jena.rdf.model.*; import org.fcrepo.kernel.api.exception.*; | [
"com.hp.hpl",
"org.fcrepo.kernel"
] | com.hp.hpl; org.fcrepo.kernel; | 965,468 |
BkInfos selectByPrimaryKey(Integer id); | BkInfos selectByPrimaryKey(Integer id); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table bk_infos
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table bk_infos | selectByPrimaryKey | {
"repo_name": "gubaijin/gplucky",
"path": "common/src/main/java/com/gplucky/mybatis/dao/BkInfosMapper.java",
"license": "apache-2.0",
"size": 2628
} | [
"com.gplucky.mybatis.model.BkInfos"
] | import com.gplucky.mybatis.model.BkInfos; | import com.gplucky.mybatis.model.*; | [
"com.gplucky.mybatis"
] | com.gplucky.mybatis; | 1,879,219 |
public Point2D getLinePoint() {
return ourAttached.getLinePoint();
}
| Point2D function() { return ourAttached.getLinePoint(); } | /**
* Returns the point to draw the edge to.
* For a qualifier this is the position of the way point
* attached to the qualifier.
* @return
*/ | Returns the point to draw the edge to. For a qualifier this is the position of the way point attached to the qualifier | getLinePoint | {
"repo_name": "classicwuhao/maxuse",
"path": "src/gui/org/tzi/use/gui/views/diagrams/waypoints/QualifierWayPoint.java",
"license": "gpl-2.0",
"size": 6575
} | [
"java.awt.geom.Point2D"
] | import java.awt.geom.Point2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,021,646 |
@Test
public void startProcessInstanceByKeyAndTenantIdTest() throws ApiException {
String key = null;
String tenantId = null;
StartProcessInstanceDto startProcessInstanceDto = null;
ProcessInstanceWithVariablesDto response = api.startProcessInstanceByKeyAndTenantId(key, tenantId,... | void function() throws ApiException { String key = null; String tenantId = null; StartProcessInstanceDto startProcessInstanceDto = null; ProcessInstanceWithVariablesDto response = api.startProcessInstanceByKeyAndTenantId(key, tenantId, startProcessInstanceDto); } | /**
* Start Instance
*
* Instantiates a given process definition, starts the latest version of the process definition for tenant. Process variables and business key may be supplied in the request body.
*
* @throws ApiException
* if the Api call fails
*/ | Start Instance Instantiates a given process definition, starts the latest version of the process definition for tenant. Process variables and business key may be supplied in the request body | startProcessInstanceByKeyAndTenantIdTest | {
"repo_name": "camunda/camunda-consulting",
"path": "snippets/camunda-openapi-client/camunda-openapi-client/src/test/java/com/camunda/consulting/openapi/client/handler/ProcessDefinitionApiTest.java",
"license": "apache-2.0",
"size": 36593
} | [
"com.camunda.consulting.openapi.client.handler.ApiException",
"com.camunda.consulting.openapi.client.model.ProcessInstanceWithVariablesDto",
"com.camunda.consulting.openapi.client.model.StartProcessInstanceDto"
] | import com.camunda.consulting.openapi.client.handler.ApiException; import com.camunda.consulting.openapi.client.model.ProcessInstanceWithVariablesDto; import com.camunda.consulting.openapi.client.model.StartProcessInstanceDto; | import com.camunda.consulting.openapi.client.handler.*; import com.camunda.consulting.openapi.client.model.*; | [
"com.camunda.consulting"
] | com.camunda.consulting; | 1,765,423 |
private String readWriteFormatReject(Card new_card)
{
String method = "readWriteFormatReject";
String card_id = new_card.getCardId();
Tag detectedTag = new_intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
if(supportedTechs(card_tag.getTechList()))
{
Log.i(DEBUG_TAG, m... | String function(Card new_card) { String method = STR; String card_id = new_card.getCardId(); Tag detectedTag = new_intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); if(supportedTechs(card_tag.getTechList())) { Log.i(DEBUG_TAG, method+STR); if(writableTag(card_tag)) { String existing_message = writeTag(getTagAsNdef(new_c... | /**
* From http://www.tapwise.com/svn/nfcwritetag/trunk/src/com/tapwise/nfcwritetag/MainActivity.java
* @param new_card
* @return
*/ | From HREF | readWriteFormatReject | {
"repo_name": "timofeysie/wherewithal",
"path": "src/com/curchod/wherewithal/CardPlayerWordsActivity.java",
"license": "gpl-3.0",
"size": 87365
} | [
"android.nfc.NfcAdapter",
"android.nfc.Tag",
"android.util.Log",
"com.curchod.dto.Card"
] | import android.nfc.NfcAdapter; import android.nfc.Tag; import android.util.Log; import com.curchod.dto.Card; | import android.nfc.*; import android.util.*; import com.curchod.dto.*; | [
"android.nfc",
"android.util",
"com.curchod.dto"
] | android.nfc; android.util; com.curchod.dto; | 1,055,907 |
void visitTestResources(ResourceVisitor visitor); | void visitTestResources(ResourceVisitor visitor); | /**
* Recursively loops over all the test resource directories and for each file it finds, calls the visitor.
*
* @param visitor The {@link ResourceVisitor} that processes all the found files. Cannot be null.
*/ | Recursively loops over all the test resource directories and for each file it finds, calls the visitor | visitTestResources | {
"repo_name": "agoncal/core",
"path": "projects/api/src/main/java/org/jboss/forge/addon/projects/facets/ResourcesFacet.java",
"license": "epl-1.0",
"size": 3755
} | [
"org.jboss.forge.addon.resource.visit.ResourceVisitor"
] | import org.jboss.forge.addon.resource.visit.ResourceVisitor; | import org.jboss.forge.addon.resource.visit.*; | [
"org.jboss.forge"
] | org.jboss.forge; | 2,056,125 |
public final MutableNumber getCounter() {
return counter;
}
| final MutableNumber function() { return counter; } | /**
* Gets the counter that contains the amount of ticks this node has.
*
* @return the counter that contains the ticks.
*/ | Gets the counter that contains the amount of ticks this node has | getCounter | {
"repo_name": "lare96/asteria-3.0",
"path": "src/com/asteria/game/item/ItemNode.java",
"license": "gpl-3.0",
"size": 5875
} | [
"com.asteria.utility.MutableNumber"
] | import com.asteria.utility.MutableNumber; | import com.asteria.utility.*; | [
"com.asteria.utility"
] | com.asteria.utility; | 41,805 |
public Collection<Experiment> getExperiments(); | Collection<Experiment> function(); | /**
* Returns the registered Experiments of this Study object.
*
* @return Collection<Experiment> experiments.
*/ | Returns the registered Experiments of this Study object | getExperiments | {
"repo_name": "TGAC/miso-lims",
"path": "core/src/main/java/uk/ac/bbsrc/tgac/miso/core/data/Study.java",
"license": "gpl-3.0",
"size": 3867
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,656,631 |
void cancelSlotRequest(
SlotRequestId slotRequestId,
@Nullable SlotSharingGroupId slotSharingGroupId,
Throwable cause); | void cancelSlotRequest( SlotRequestId slotRequestId, @Nullable SlotSharingGroupId slotSharingGroupId, Throwable cause); | /**
* Cancels the slot request with the given {@link SlotRequestId} and {@link SlotSharingGroupId}.
*
* @param slotRequestId identifying the slot request to cancel
* @param slotSharingGroupId identifying the slot request to cancel
* @param cause of the cancellation
*/ | Cancels the slot request with the given <code>SlotRequestId</code> and <code>SlotSharingGroupId</code> | cancelSlotRequest | {
"repo_name": "darionyaphet/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotProvider.java",
"license": "apache-2.0",
"size": 3808
} | [
"javax.annotation.Nullable",
"org.apache.flink.runtime.instance.SlotSharingGroupId",
"org.apache.flink.runtime.jobmaster.SlotRequestId"
] | import javax.annotation.Nullable; import org.apache.flink.runtime.instance.SlotSharingGroupId; import org.apache.flink.runtime.jobmaster.SlotRequestId; | import javax.annotation.*; import org.apache.flink.runtime.instance.*; import org.apache.flink.runtime.jobmaster.*; | [
"javax.annotation",
"org.apache.flink"
] | javax.annotation; org.apache.flink; | 2,181,686 |
public void processCommand(ICommandSender sender, String[] args) throws CommandException
{
if (args.length <= 0)
{
throw new WrongUsageException("commands.gamemode.usage", new Object[0]);
}
else
{
WorldSettings.GameType worldsettings$gametype = thi... | void function(ICommandSender sender, String[] args) throws CommandException { if (args.length <= 0) { throw new WrongUsageException(STR, new Object[0]); } else { WorldSettings.GameType worldsettings$gametype = this.getGameModeFromCommand(sender, args[0]); EntityPlayer entityplayer = args.length >= 2 ? getPlayer(sender,... | /**
* Callback when the command is invoked
*
* @param sender The command sender that executed the command
* @param args The arguments that were passed
*/ | Callback when the command is invoked | processCommand | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/command/CommandGameMode.java",
"license": "gpl-3.0",
"size": 4204
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.util.ChatComponentTranslation",
"net.minecraft.util.IChatComponent",
"net.minecraft.world.WorldSettings"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.IChatComponent; import net.minecraft.world.WorldSettings; | import net.minecraft.entity.player.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.util; net.minecraft.world; | 846,257 |
public WorkflowImpl parse(AbstractWorkflow workflowApi) {
workflow = new WorkflowImpl();
workflow.id = workflowApi.getId();
pushContext("workflow", workflowApi, workflow, null);
workflow.parse(workflowApi, this);
popContext();
if (this.workflowParseListener!=null) {
this.workflowParseLis... | WorkflowImpl function(AbstractWorkflow workflowApi) { workflow = new WorkflowImpl(); workflow.id = workflowApi.getId(); pushContext(STR, workflowApi, workflow, null); workflow.parse(workflowApi, this); popContext(); if (this.workflowParseListener!=null) { this.workflowParseListener.workflowParsed(workflowApi, workflow,... | /**
* Parses the content of <code>workflowApi</code> into <code>workflowImpl</code> and
* adds any parse issues to <code>workflowApi</code>.
* Use one parser for each parse.
*/ | Parses the content of <code>workflowApi</code> into <code>workflowImpl</code> and adds any parse issues to <code>workflowApi</code>. Use one parser for each parse | parse | {
"repo_name": "jblankendaal/effektif",
"path": "effektif-workflow-impl/src/main/java/com/effektif/workflow/impl/WorkflowParser.java",
"license": "apache-2.0",
"size": 12430
} | [
"com.effektif.workflow.api.workflow.AbstractWorkflow",
"com.effektif.workflow.impl.workflow.WorkflowImpl"
] | import com.effektif.workflow.api.workflow.AbstractWorkflow; import com.effektif.workflow.impl.workflow.WorkflowImpl; | import com.effektif.workflow.api.workflow.*; import com.effektif.workflow.impl.workflow.*; | [
"com.effektif.workflow"
] | com.effektif.workflow; | 1,143,855 |
private void startAndBindService() {
serviceIntent = new Intent(this, LocationTraceService.class);
// Start the service in case it isn't already running
startService(serviceIntent);
// Now bind to service
bindService(serviceIntent, gpsServiceConnection, Context.BIND_AUTO_CREA... | void function() { serviceIntent = new Intent(this, LocationTraceService.class); startService(serviceIntent); bindService(serviceIntent, gpsServiceConnection, Context.BIND_AUTO_CREATE); } | /**
* Starts the service and binds the activity to it.
*/ | Starts the service and binds the activity to it | startAndBindService | {
"repo_name": "gmission/gmission_reborn_android",
"path": "gmission/src/main/java/hk/ust/gmission/ui/activities/MainActivity.java",
"license": "mit",
"size": 12401
} | [
"android.content.Context",
"android.content.Intent",
"hk.ust.gmission.services.LocationTraceService"
] | import android.content.Context; import android.content.Intent; import hk.ust.gmission.services.LocationTraceService; | import android.content.*; import hk.ust.gmission.services.*; | [
"android.content",
"hk.ust.gmission"
] | android.content; hk.ust.gmission; | 541,460 |
protected void initializeBuildPath(IJavaProject javaProject, IProgressMonitor monitor) throws CoreException {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPageTwo_monitor_init_build_path, 2);
try {
IClasspathEntry[] entries= null;... | void function(IJavaProject javaProject, IProgressMonitor monitor) throws CoreException { if (monitor == null) { monitor= new NullProgressMonitor(); } monitor.beginTask(NewWizardMessages.NewJavaProjectWizardPageTwo_monitor_init_build_path, 2); try { IClasspathEntry[] entries= null; IPath outputLocation= null; IProject p... | /**
* Evaluates the new build path and output folder according to the settings on the first page.
* The resulting build path is set by calling {@link #init(IJavaProject, IPath, IClasspathEntry[], boolean)}.
* Clients can override this method.
*
* @param javaProject the new project which is already created whe... | Evaluates the new build path and output folder according to the settings on the first page. The resulting build path is set by calling <code>#init(IJavaProject, IPath, IClasspathEntry[], boolean)</code>. Clients can override this method | initializeBuildPath | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageTwo.java",
"license": "epl-1.0",
"size": 19527
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.eclipse.core.resources.IFolder",
"org.eclipse.core.resources.IProject",
"org.eclipse.core.resources.IWorkspaceRoot",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IPath",
"org.eclipse.core.runtime.IProgressMonito... | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.co... | import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.ui.util.*; import org.eclipse.jdt.internal.ui.wizards.*; | [
"java.util",
"org.eclipse.core",
"org.eclipse.jdt"
] | java.util; org.eclipse.core; org.eclipse.jdt; | 37,316 |
protected byte[] messageDecrypt(byte[] input) {
// 1. Length checking:
// a. If the length of L is greater than the input limitation for the
// hash function
// (261 1 octets for SHA-1), output decryption error and stop.
// b. If the length of the ciphertext C is not k octets, output
// decryption error... | byte[] function(byte[] input) { if (input.length != cipherTextSize) { throw new RuntimeException(STR + STR); } if (cipherTextSize < (md.getDigestLength() << 1) + 2) { new RuntimeException(STR + STR); } byte[] EM = null; byte[] M = null; FlexiBigInt c = PKCS1Operations.OS2IP(input); FlexiBigInt m = null; try { m = MpRSA... | /**
* Decrypt a ciphertext.
*
* @param input
* the ciphertext
* @return the decrypted ciphertext
*/ | Decrypt a ciphertext | messageDecrypt | {
"repo_name": "besom/bbossgroups-mvn",
"path": "bboss_security/src/main/java/de/flexiprovider/core/mprsa/MpRSA.java",
"license": "apache-2.0",
"size": 9394
} | [
"de.flexiprovider.common.math.FlexiBigInt",
"de.flexiprovider.core.rsa.PKCS1Exception",
"de.flexiprovider.core.rsa.PKCS1Operations"
] | import de.flexiprovider.common.math.FlexiBigInt; import de.flexiprovider.core.rsa.PKCS1Exception; import de.flexiprovider.core.rsa.PKCS1Operations; | import de.flexiprovider.common.math.*; import de.flexiprovider.core.rsa.*; | [
"de.flexiprovider.common",
"de.flexiprovider.core"
] | de.flexiprovider.common; de.flexiprovider.core; | 1,141,574 |
public Observable<ServiceResponse<CognitiveServicesAccountKeysInner>> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String accountName, KeyName keyName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be ... | Observable<ServiceResponse<CognitiveServicesAccountKeysInner>> function(String resourceGroupName, String accountName, KeyName keyName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (accountName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == n... | /**
* Regenerates the specified account key for the specified Cognitive Services account.
*
* @param resourceGroupName The name of the resource group within the user's subscription.
* @param accountName The name of Cognitive Services account.
* @param keyName key name to generate (Key1|Key2). P... | Regenerates the specified account key for the specified Cognitive Services account | regenerateKeyWithServiceResponseAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-cognitiveservices/src/main/java/com/microsoft/azure/management/cognitiveservices/implementation/CognitiveServicesAccountsInner.java",
"license": "mit",
"size": 51860
} | [
"com.microsoft.azure.management.cognitiveservices.KeyName",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.management.cognitiveservices.KeyName; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.management.cognitiveservices.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,562,628 |
public void setParameters(LinkedHashMap<String, Member> parameters) {
this.parameters = parameters;
} | void function(LinkedHashMap<String, Member> parameters) { this.parameters = parameters; } | /**
* Set the method parameters
*
* @param parameters
*/ | Set the method parameters | setParameters | {
"repo_name": "Top-Q/jsystem",
"path": "jsystem-core-projects/jsystemApp/src/main/java/jsystem/treeui/sobrows/Method.java",
"license": "apache-2.0",
"size": 5729
} | [
"java.util.LinkedHashMap"
] | import java.util.LinkedHashMap; | import java.util.*; | [
"java.util"
] | java.util; | 389,051 |
public ApiContext apiContext(String usrToken, String server)
{
ApiContext apiContext = new ApiContext();
//set Api Token to access eBay Api Server
ApiCredential cred = apiContext.getApiCredential();
cred.seteBayToken(usrToken);
//set Api Server Url
apiContext.setApiServerUrl(server);
return apiCont... | ApiContext function(String usrToken, String server) { ApiContext apiContext = new ApiContext(); ApiCredential cred = apiContext.getApiCredential(); cred.seteBayToken(usrToken); apiContext.setApiServerUrl(server); return apiContext; } | /**
* used for getting an ApiContext object that can then be passed to individual API calls.
*
* @param usrToken an eBay API user token
* @param server the server to use for api calls (https://api.sandbox.ebay.com/wsapi for
* testing and XXXXXXXXXXXXX for production)
* @return ApiContext object.
*/ | used for getting an ApiContext object that can then be passed to individual API calls | apiContext | {
"repo_name": "jpchanson/OpenDMS",
"path": "src/tomoBay/model/eBayAPI/APIcontext.java",
"license": "gpl-3.0",
"size": 2064
} | [
"com.ebay.sdk.ApiContext",
"com.ebay.sdk.ApiCredential"
] | import com.ebay.sdk.ApiContext; import com.ebay.sdk.ApiCredential; | import com.ebay.sdk.*; | [
"com.ebay.sdk"
] | com.ebay.sdk; | 245,599 |
void clearRegion(DiskRegion dr, RegionVersionVector rvv) {
lock.lock();
try {
this.ifTotalRecordCount++;
if (dr.getClearRVV() == null) {
this.ifLiveRecordCount++;
} else {
// we now have one record to gc (the previous clear).
}
dr.setClearRVV(rvv);
writeClea... | void clearRegion(DiskRegion dr, RegionVersionVector rvv) { lock.lock(); try { this.ifTotalRecordCount++; if (dr.getClearRVV() == null) { this.ifLiveRecordCount++; } else { } dr.setClearRVV(rvv); writeClearRecord(dr, rvv); } finally { lock.unlock(); } } | /**
* Clear the region using an RVV.
*/ | Clear the region using an RVV | clearRegion | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskInitFile.java",
"license": "apache-2.0",
"size": 94728
} | [
"com.gemstone.gemfire.internal.cache.versions.RegionVersionVector"
] | import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector; | import com.gemstone.gemfire.internal.cache.versions.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,491,975 |
EAttribute getCategory_Count(); | EAttribute getCategory_Count(); | /**
* Returns the meta object for the attribute '{@link org.dawnsci.marketplace.Category#getCount <em>Count</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Count</em>'.
* @see org.dawnsci.marketplace.Category#getCount()
* @see #getCategory()
* @ge... | Returns the meta object for the attribute '<code>org.dawnsci.marketplace.Category#getCount Count</code>'. | getCategory_Count | {
"repo_name": "Itema-as/dawn-marketplace-server",
"path": "org.dawnsci.marketplace.core/src-gen/org/dawnsci/marketplace/MarketplacePackage.java",
"license": "epl-1.0",
"size": 104026
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,373,353 |
public Tuple<DoubleVector[], DoubleVector[]> vectorizeAdditionals(
List<K> words, List<Integer> labels) {
return extractInternal(words, labels);
} | Tuple<DoubleVector[], DoubleVector[]> function( List<K> words, List<Integer> labels) { return extractInternal(words, labels); } | /**
* Vectorizes the given data. Internally uses a dictionary that was created by
* {@link #vectorize()} or creates one on this data.
*
* @return a {@link Tuple} with the features in the first dimension, and on
* the second the outcome.
*/ | Vectorizes the given data. Internally uses a dictionary that was created by <code>#vectorize()</code> or creates one on this data | vectorizeAdditionals | {
"repo_name": "sourcewarehouse/thomasjungblut",
"path": "src/de/jungblut/ner/SparseFeatureExtractorHelper.java",
"license": "apache-2.0",
"size": 6733
} | [
"de.jungblut.math.DoubleVector",
"de.jungblut.math.tuple.Tuple",
"java.util.List"
] | import de.jungblut.math.DoubleVector; import de.jungblut.math.tuple.Tuple; import java.util.List; | import de.jungblut.math.*; import de.jungblut.math.tuple.*; import java.util.*; | [
"de.jungblut.math",
"java.util"
] | de.jungblut.math; java.util; | 1,118,126 |
@WebMethod(operationName = "GetGeoIPContext", action = "http://www.webservicex.net/GetGeoIPContext")
@RequestWrapper(localName = "GetGeoIPContext", targetNamespace = "http://www.webservicex.net/", className = "net.webservicex.GetGeoIPContext")
@ResponseWrapper(localName = "GetGeoIPContextResponse", targetNa... | @WebMethod(operationName = STR, action = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "GetGeoIPContextResponseSTRhttp: @WebResult(name = "GetGeoIPContextResultSTRhttp: net.webservicex.GeoIP function(); | /**
* GeoIPService - GetGeoIPContext enables you to easily look up countries by Context
*/ | GeoIPService - GetGeoIPContext enables you to easily look up countries by Context | getGeoIPContext | {
"repo_name": "adventurerka/Java",
"path": "soap-sample/src/main/java/net/webservicex/GeoIPServiceSoap.java",
"license": "apache-2.0",
"size": 1955
} | [
"javax.jws.WebMethod",
"javax.jws.WebResult",
"javax.xml.ws.RequestWrapper",
"javax.xml.ws.ResponseWrapper"
] | import javax.jws.WebMethod; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 2,243,882 |
protected final void refreshLoadingViewsSize() {
final int maximumPullScroll = (int) (getMaximumPullScroll() * 1.2f);
int pLeft = getPaddingLeft();
int pTop = getPaddingTop();
int pRight = getPaddingRight();
int pBottom = getPaddingBottom();
switch (getPullToRefreshScrollDirection()) {
case... | final void function() { final int maximumPullScroll = (int) (getMaximumPullScroll() * 1.2f); int pLeft = getPaddingLeft(); int pTop = getPaddingTop(); int pRight = getPaddingRight(); int pBottom = getPaddingBottom(); switch (getPullToRefreshScrollDirection()) { case HORIZONTAL: if (mMode.showHeaderLoadingLayout()) { mH... | /**
* Re-measure the Loading Views height, and adjust internal padding as
* necessary
*/ | Re-measure the Loading Views height, and adjust internal padding as necessary | refreshLoadingViewsSize | {
"repo_name": "qiurq/CYJ",
"path": "src/com/handmark/pulltorefresh/library/PullToRefreshBase.java",
"license": "apache-2.0",
"size": 48072
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,772,100 |
private String replaceWysiwygStringForImport(String oldCssClass, String newCssClass,
String wysiwygText) {
if (!StringUtil.isDefined(wysiwygText)) {
return "";
}
return wysiwygText.replaceAll(oldCssClass, newCssClass);
} | String function(String oldCssClass, String newCssClass, String wysiwygText) { if (!StringUtil.isDefined(wysiwygText)) { return ""; } return wysiwygText.replaceAll(oldCssClass, newCssClass); } | /**
* Methode chargee de remplacer une classe Css par une autre
*
* @param wysiwygText - contenu wysiwyg passe en parametre
* @param oldCssClass - la classe CSS a remplacer
* @param newCssClass - la nouvelle classe CSS a utiliser
* @return - le contenu wysiwyg mis a jour
*/ | Methode chargee de remplacer une classe Css par une autre | replaceWysiwygStringForImport | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "web-core/src/main/java/com/silverpeas/importExport/control/GEDImportExport.java",
"license": "agpl-3.0",
"size": 43338
} | [
"com.silverpeas.util.StringUtil"
] | import com.silverpeas.util.StringUtil; | import com.silverpeas.util.*; | [
"com.silverpeas.util"
] | com.silverpeas.util; | 306,786 |
default SchematicEntry getEntry( String key) {
Document doc = get(key);
return doc != null ? () -> doc : null;
} | default SchematicEntry getEntry( String key) { Document doc = get(key); return doc != null ? () -> doc : null; } | /**
* Get the entry with the supplied key.
* <p>
* If this method is called within an existing transaction, it should take into account the transient transactional context
* (i.e. any local but not yet committed changes)
* </p>
*
* @param key the key or identifier for the document
... | Get the entry with the supplied key. If this method is called within an existing transaction, it should take into account the transient transactional context (i.e. any local but not yet committed changes) | getEntry | {
"repo_name": "RobSis/modeshape",
"path": "modeshape-schematic/src/main/java/org/modeshape/schematic/SchematicDb.java",
"license": "apache-2.0",
"size": 7016
} | [
"org.modeshape.schematic.document.Document"
] | import org.modeshape.schematic.document.Document; | import org.modeshape.schematic.document.*; | [
"org.modeshape.schematic"
] | org.modeshape.schematic; | 298,465 |
public JSONObject _cardConf(Card card) {
return mCol.getDecks().confForDid(card.getDid());
} | JSONObject function(Card card) { return mCol.getDecks().confForDid(card.getDid()); } | /**
* Tools ******************************************************************** ***************************
*/ | Tools ******************************************************************** | _cardConf | {
"repo_name": "StKotok/Anki-Android",
"path": "AnkiDroid/src/main/java/com/ichi2/libanki/Sched.java",
"license": "gpl-3.0",
"size": 88068
} | [
"org.json.JSONObject"
] | import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 458,751 |
@PropertySetter(value = "sortOrder", defaultValue = "unsorted", description = "The ordering to be used when the sort method is invoked.")
public void setSortOrder(SortOrder sortOrder) {
sortOrder = sortOrder == null ? SortOrder.UNSORTED : sortOrder;
propertyChange("sortOrder", this.sortOrder, th... | @PropertySetter(value = STR, defaultValue = STR, description = STR) void function(SortOrder sortOrder) { sortOrder = sortOrder == null ? SortOrder.UNSORTED : sortOrder; propertyChange(STR, this.sortOrder, this.sortOrder = sortOrder, false); } | /**
* Sets the sort order. This does not affect the current sort order. Rather, it specifies the
* ordering to be used when the <code>sort</code> method is invoked.
*
* @param sortOrder The sort order.
*/ | Sets the sort order. This does not affect the current sort order. Rather, it specifies the ordering to be used when the <code>sort</code> method is invoked | setSortOrder | {
"repo_name": "fujion/fujion-framework",
"path": "fujion-core/src/main/java/org/fujion/component/Column.java",
"license": "apache-2.0",
"size": 9080
} | [
"org.fujion.annotation.Component",
"org.fujion.model.Sorting"
] | import org.fujion.annotation.Component; import org.fujion.model.Sorting; | import org.fujion.annotation.*; import org.fujion.model.*; | [
"org.fujion.annotation",
"org.fujion.model"
] | org.fujion.annotation; org.fujion.model; | 166,416 |
public ServiceFuture<SystemTopicInner> updateAsync(String resourceGroupName, String systemTopicName, Map<String, String> tags, final ServiceCallback<SystemTopicInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, systemTopicName, tags), serviceCallbac... | ServiceFuture<SystemTopicInner> function(String resourceGroupName, String systemTopicName, Map<String, String> tags, final ServiceCallback<SystemTopicInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, systemTopicName, tags), serviceCallback); } | /**
* Update a system topic.
* Asynchronously updates a system topic with the specified parameters.
*
* @param resourceGroupName The name of the resource group within the user's subscription.
* @param systemTopicName Name of the system topic.
* @param tags Tags of the system topic.
* ... | Update a system topic. Asynchronously updates a system topic with the specified parameters | updateAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/eventgrid/mgmt-v2020_04_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_04_01_preview/implementation/SystemTopicsInner.java",
"license": "mit",
"size": 97754
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.Map"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 799,971 |
// We should make this VisibleForTesting, but it is still used by TestHelper
public Set<PathFragment> getRunfilesSymlinkNames() {
return getRunfilesSymlinks().keySet();
} | Set<PathFragment> function() { return getRunfilesSymlinks().keySet(); } | /**
* Returns the names of the symlinks in the runfiles symlink farm as a Set of PathFragments. This
* method is slow.
*/ | Returns the names of the symlinks in the runfiles symlink farm as a Set of PathFragments. This method is slow | getRunfilesSymlinkNames | {
"repo_name": "spxtr/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java",
"license": "apache-2.0",
"size": 18505
} | [
"com.google.devtools.build.lib.vfs.PathFragment",
"java.util.Set"
] | import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Set; | import com.google.devtools.build.lib.vfs.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,675,846 |
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency) throws SQLException {
checkClosed();
try {
return StatementWrapper.getInstance(this, this.pooledConnection, this.mc
.createStatement(resultSetType, resultSetConcurrency));
} catch (SQLException sqlException) {
... | java.sql.Statement function(int resultSetType, int resultSetConcurrency) throws SQLException { checkClosed(); try { return StatementWrapper.getInstance(this, this.pooledConnection, this.mc .createStatement(resultSetType, resultSetConcurrency)); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlExcept... | /**
* Passes call to method on physical connection instance. Notifies listeners
* of any caught exceptions before re-throwing to client.
*
* @see java.sql.Connection#createStatement()
*/ | Passes call to method on physical connection instance. Notifies listeners of any caught exceptions before re-throwing to client | createStatement | {
"repo_name": "vaisaghvt/gameAnalyzer",
"path": "mysql-connector-java-5.1.22/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java",
"license": "mit",
"size": 72741
} | [
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,301,238 |
@Override
public void run() {
log.debug("SystemQueueReceiver has started...");
try {
// Step 1. Directly instantiate the JMS Queue object.
log.debug("Creating queue...");
Queue queue = HornetQJMSClient.createQueue(queueName);
// Step 9. Create a JMS Message Consumer
log.debug("Creating consume... | void function() { log.debug(STR); try { log.debug(STR); Queue queue = HornetQJMSClient.createQueue(queueName); log.debug(STR); messageConsumer = session.createConsumer(queue); } catch (JMSException e) { log.error(e.toString(), e); } catch (Exception e) { log.error(e.toString(), e); } while (!shouldStop()) { producer = ... | /**
* Create JMS message consumer for a queue and pass message content to EngineMessageProcessor.
*
* @see EngineMessageProcessor
*/ | Create JMS message consumer for a queue and pass message content to EngineMessageProcessor | run | {
"repo_name": "martin-kuba/perun",
"path": "perun-dispatcher/src/main/java/cz/metacentrum/perun/dispatcher/jms/EngineMessageConsumer.java",
"license": "bsd-2-clause",
"size": 4532
} | [
"cz.metacentrum.perun.dispatcher.exceptions.MessageFormatException",
"javax.jms.JMSException",
"javax.jms.Queue",
"javax.jms.TextMessage",
"org.hornetq.api.jms.HornetQJMSClient"
] | import cz.metacentrum.perun.dispatcher.exceptions.MessageFormatException; import javax.jms.JMSException; import javax.jms.Queue; import javax.jms.TextMessage; import org.hornetq.api.jms.HornetQJMSClient; | import cz.metacentrum.perun.dispatcher.exceptions.*; import javax.jms.*; import org.hornetq.api.jms.*; | [
"cz.metacentrum.perun",
"javax.jms",
"org.hornetq.api"
] | cz.metacentrum.perun; javax.jms; org.hornetq.api; | 978,100 |
public Set<Command> getCommands() {
this.container.getLogger().info(Internals.LOG_HEADER);
this.container.getLogger().info("Using reflection to access the registered commands...");
Set<Class<?>> classes = this.reflections.getTypesAnnotatedWith(RegisterCommand.class);
Set<Command> com... | Set<Command> function() { this.container.getLogger().info(Internals.LOG_HEADER); this.container.getLogger().info(STR); Set<Class<?>> classes = this.reflections.getTypesAnnotatedWith(RegisterCommand.class); Set<Command> commands = new HashSet<>(); for (Class<?> oneClass : classes) { try { Object o = oneClass.newInstance... | /**
* Uses reflection to get the commands of the plugin.
*
* @return A set of the commands
*/ | Uses reflection to get the commands of the plugin | getCommands | {
"repo_name": "XtraStudio/XtraCore",
"path": "src/main/java/com/xtra/core/util/ReflectionScanner.java",
"license": "mit",
"size": 6043
} | [
"com.xtra.api.command.Command",
"com.xtra.api.command.annotation.RegisterCommand",
"com.xtra.core.internal.Internals",
"java.util.HashSet",
"java.util.Set"
] | import com.xtra.api.command.Command; import com.xtra.api.command.annotation.RegisterCommand; import com.xtra.core.internal.Internals; import java.util.HashSet; import java.util.Set; | import com.xtra.api.command.*; import com.xtra.api.command.annotation.*; import com.xtra.core.internal.*; import java.util.*; | [
"com.xtra.api",
"com.xtra.core",
"java.util"
] | com.xtra.api; com.xtra.core; java.util; | 2,694,330 |
@Nullable RequestParameter cookieParameter(String name);
/**
* Return request body when parsed. Forms are managed as {@link JsonObject} | @Nullable RequestParameter cookieParameter(String name); /** * Return request body when parsed. Forms are managed as {@link JsonObject} | /**
* Get cookie parameter by name
*
* @param name Parameter name
* @return
*/ | Get cookie parameter by name | cookieParameter | {
"repo_name": "vert-x3/vertx-web",
"path": "vertx-web-validation/src/main/java/io/vertx/ext/web/validation/RequestParameters.java",
"license": "apache-2.0",
"size": 2035
} | [
"io.vertx.codegen.annotations.Nullable",
"io.vertx.core.json.JsonObject"
] | import io.vertx.codegen.annotations.Nullable; import io.vertx.core.json.JsonObject; | import io.vertx.codegen.annotations.*; import io.vertx.core.json.*; | [
"io.vertx.codegen",
"io.vertx.core"
] | io.vertx.codegen; io.vertx.core; | 605,035 |
private void doLargePut(Map expectedMap,
int nKeys,
int nDupsPerKey,
boolean commit)
throws DatabaseException {
Transaction txn = exampleEnv.beginTransaction(null, null);
for (int i = 0; i < nKeys; i++) {
... | void function(Map expectedMap, int nKeys, int nDupsPerKey, boolean commit) throws DatabaseException { Transaction txn = exampleEnv.beginTransaction(null, null); for (int i = 0; i < nKeys; i++) { byte[] key = new byte[N_KEY_BYTES]; TestUtils.generateRandomAlphaBytes(key); String keyString = new String(key); Set dataVals... | /**
* Helper routine. Generates keys with random alpha values while data
* is numbered numerically.
*/ | Helper routine. Generates keys with random alpha values while data is numbered numerically | doLargePut | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/je-3.2.74/test/com/sleepycat/je/cleaner/CleanerTest.java",
"license": "gpl-2.0",
"size": 39658
} | [
"com.sleepycat.je.DatabaseException",
"com.sleepycat.je.Transaction",
"com.sleepycat.je.util.StringDbt",
"com.sleepycat.je.util.TestUtils",
"java.util.HashSet",
"java.util.Map",
"java.util.Set"
] | import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Transaction; import com.sleepycat.je.util.StringDbt; import com.sleepycat.je.util.TestUtils; import java.util.HashSet; import java.util.Map; import java.util.Set; | import com.sleepycat.je.*; import com.sleepycat.je.util.*; import java.util.*; | [
"com.sleepycat.je",
"java.util"
] | com.sleepycat.je; java.util; | 619,416 |
public Set<HostInstance> getAllValuesOfHost() {
return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet());
} | Set<HostInstance> function() { return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet()); } | /**
* Retrieve the set of values that occur in matches for Host.
* @return the Set of all values or empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for Host | getAllValuesOfHost | {
"repo_name": "viatra/VIATRA-Generator",
"path": "Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java",
"license": "epl-1.0",
"size": 22796
} | [
"hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance",
"java.util.Set",
"java.util.stream.Collectors"
] | import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; import java.util.Set; import java.util.stream.Collectors; | import hu.bme.mit.inf.dslreasoner.domains.cps.*; import java.util.*; import java.util.stream.*; | [
"hu.bme.mit",
"java.util"
] | hu.bme.mit; java.util; | 1,731,329 |
@Override
public Request<AcceptVpcPeeringConnectionRequest> getDryRunRequest() {
Request<AcceptVpcPeeringConnectionRequest> request = new AcceptVpcPeeringConnectionRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | Request<AcceptVpcPeeringConnectionRequest> function() { Request<AcceptVpcPeeringConnectionRequest> request = new AcceptVpcPeeringConnectionRequestMarshaller().marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; } | /**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/ | This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run | getDryRunRequest | {
"repo_name": "dagnir/aws-sdk-java",
"path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/AcceptVpcPeeringConnectionRequest.java",
"license": "apache-2.0",
"size": 4427
} | [
"com.amazonaws.Request",
"com.amazonaws.services.ec2.model.transform.AcceptVpcPeeringConnectionRequestMarshaller"
] | import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.AcceptVpcPeeringConnectionRequestMarshaller; | import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 2,814,067 |
public Address getFirstSpillLoc() {
return framePtr.plus(SPILL_DISTANCE_FROM_FP);
} | Address function() { return framePtr.plus(SPILL_DISTANCE_FROM_FP); } | /**
* Get address of the first spill location for the frame ptr.
* @return the first spill location
*/ | Get address of the first spill location for the frame ptr | getFirstSpillLoc | {
"repo_name": "ut-osa/laminar",
"path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/compilers/opt/runtimesupport/ppc/OptGCMapIterator.java",
"license": "bsd-3-clause",
"size": 6187
} | [
"org.vmmagic.unboxed.Address"
] | import org.vmmagic.unboxed.Address; | import org.vmmagic.unboxed.*; | [
"org.vmmagic.unboxed"
] | org.vmmagic.unboxed; | 531,015 |
public boolean isFileValid(long fileNum) {
if (fileNum == currentFileNum || envImpl.isMemOnly()) {
return true;
}
String fileName = getFullFileName(fileNum, FileManager.JE_SUFFIX);
File file = new File(fileName);
return file.exists();
} | boolean function(long fileNum) { if (fileNum == currentFileNum envImpl.isMemOnly()) { return true; } String fileName = getFullFileName(fileNum, FileManager.JE_SUFFIX); File file = new File(fileName); return file.exists(); } | /**
* For assertions that check whether a file is valid or has been deleted
* via log cleaning.
*/ | For assertions that check whether a file is valid or has been deleted via log cleaning | isFileValid | {
"repo_name": "bjorndm/prebake",
"path": "code/third_party/bdb/src/com/sleepycat/je/log/FileManager.java",
"license": "apache-2.0",
"size": 100137
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 616,014 |
protected void awaitLoad() throws WaveletStateException {
Preconditions.checkState(!writeLock.isHeldByCurrentThread(), "should not hold write lock");
try {
if (!loadLatch.await(AWAIT_LOAD_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
throw new WaveletStateException("Timed out waiting for wavelet to load... | void function() throws WaveletStateException { Preconditions.checkState(!writeLock.isHeldByCurrentThread(), STR); try { if (!loadLatch.await(AWAIT_LOAD_TIMEOUT_SECONDS, TimeUnit.SECONDS)) { throw new WaveletStateException(STR); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new WaveletSt... | /**
* Blocks until the initial load of the wavelet state from storage completes.
* Should be called without the read or write lock held.
*
* @throws WaveletStateException if the wavelet fails to load,
* either because of a storage access failure or timeout,
* or because the current thr... | Blocks until the initial load of the wavelet state from storage completes. Should be called without the read or write lock held | awaitLoad | {
"repo_name": "somehume/wavefu",
"path": "src/org/waveprotocol/box/server/waveserver/WaveletContainerImpl.java",
"license": "apache-2.0",
"size": 21164
} | [
"com.google.common.base.Preconditions",
"java.util.concurrent.TimeUnit"
] | import com.google.common.base.Preconditions; import java.util.concurrent.TimeUnit; | import com.google.common.base.*; import java.util.concurrent.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 81,595 |
private List<ClassNode> getClassNode(ClassNode node, String classValue) {
List<ClassNode> cNodes = new ArrayList<ClassNode>();
if(node.toString().equalsIgnoreCase(classValue)) {
cNodes.add(node);
return cNodes;
}
Iterator children = node.getChildren();
while(children.hasNext()) {
... | List<ClassNode> function(ClassNode node, String classValue) { List<ClassNode> cNodes = new ArrayList<ClassNode>(); if(node.toString().equalsIgnoreCase(classValue)) { cNodes.add(node); return cNodes; } Iterator children = node.getChildren(); while(children.hasNext()) { ClassNode tempNode = (ClassNode)children.next(); Li... | /**
* Internal recursive method to find out the Node for given class
* Value under the heirarchy of given node
*
* @param node
* @param classValue
* @return
*/ | Internal recursive method to find out the Node for given class Value under the heirarchy of given node | getClassNode | {
"repo_name": "mr-justin/gate-semano",
"path": "src/semano/ontoviewer/OntologyTreePanel.java",
"license": "lgpl-3.0",
"size": 11086
} | [
"com.ontotext.gate.vr.ClassNode",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import com.ontotext.gate.vr.ClassNode; import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import com.ontotext.gate.vr.*; import java.util.*; | [
"com.ontotext.gate",
"java.util"
] | com.ontotext.gate; java.util; | 1,820,335 |
public int storeItemResource(int resource, int quantity) {
ItemStored s = itemStorage.get(resource);
if (s == null) {
s = new ItemStored();
s.massPerItem = ItemResourceUtil.findItemResource(resource).getMassPerItem();
s.totalMass = 0;
// Save the item resource
itemStorage.put(resource, s);
}
... | int function(int resource, int quantity) { ItemStored s = itemStorage.get(resource); if (s == null) { s = new ItemStored(); s.massPerItem = ItemResourceUtil.findItemResource(resource).getMassPerItem(); s.totalMass = 0; itemStorage.put(resource, s); } double massPerItem = s.massPerItem; double totalMass = s.totalMass; d... | /**
* Stores the item resource
*
* @param item resource
* @param quantity
* @return excess quantity that cannot be stored
*/ | Stores the item resource | storeItemResource | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/equipment/MicroInventory.java",
"license": "gpl-3.0",
"size": 12017
} | [
"org.mars_sim.msp.core.UnitEventType",
"org.mars_sim.msp.core.resource.ItemResourceUtil"
] | import org.mars_sim.msp.core.UnitEventType; import org.mars_sim.msp.core.resource.ItemResourceUtil; | import org.mars_sim.msp.core.*; import org.mars_sim.msp.core.resource.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 1,924,243 |
//----------------------------------------------------------------------------
public ICharacterProperties getCharacterProperties() {
XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class,
getXTextContent());
return new CharacterProperties(xPropertySet);
}
... | ICharacterProperties function() { XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, getXTextContent()); return new CharacterProperties(xPropertySet); } | /**
* Returns character properties belonging to the paragraph
*
* @return characterproperties of the paragraph
*
* @author Sebastian Rösgen
*/ | Returns character properties belonging to the paragraph | getCharacterProperties | {
"repo_name": "LibreOffice/noa-libre",
"path": "src/ag/ion/bion/officelayer/internal/text/Paragraph.java",
"license": "lgpl-2.1",
"size": 10024
} | [
"ag.ion.bion.officelayer.text.ICharacterProperties",
"com.sun.star.beans.XPropertySet",
"com.sun.star.uno.UnoRuntime"
] | import ag.ion.bion.officelayer.text.ICharacterProperties; import com.sun.star.beans.XPropertySet; import com.sun.star.uno.UnoRuntime; | import ag.ion.bion.officelayer.text.*; import com.sun.star.beans.*; import com.sun.star.uno.*; | [
"ag.ion.bion",
"com.sun.star"
] | ag.ion.bion; com.sun.star; | 223,260 |
protected final void setRequiredAttributes( StringList attrNames) {
m_reqAttributes = attrNames;
} | final void function( StringList attrNames) { m_reqAttributes = attrNames; } | /**
* Set the list of required attributes to be added to file requests
*
* @param attrNames StringList
*/ | Set the list of required attributes to be added to file requests | setRequiredAttributes | {
"repo_name": "arcusys/Liferay-CIFS",
"path": "source/java/org/alfresco/jlan/server/filesys/db/ObjectIdFileLoader.java",
"license": "gpl-3.0",
"size": 47480
} | [
"org.alfresco.jlan.util.StringList"
] | import org.alfresco.jlan.util.StringList; | import org.alfresco.jlan.util.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 2,664,067 |
EntityManagerFactoryBuilder getBootstrap(final PersistenceUnitInfo info, final Map map); | EntityManagerFactoryBuilder getBootstrap(final PersistenceUnitInfo info, final Map map); | /**
* Returns a two phase EntityManagerFactory builder
*
* @param info
* @param map
* @return
*/ | Returns a two phase EntityManagerFactory builder | getBootstrap | {
"repo_name": "scottmarlow/jipijapa",
"path": "spi/src/main/java/org/jipijapa/plugin/spi/TwoPhaseBootstrapCapable.java",
"license": "apache-2.0",
"size": 1303
} | [
"java.util.Map",
"javax.persistence.spi.PersistenceUnitInfo"
] | import java.util.Map; import javax.persistence.spi.PersistenceUnitInfo; | import java.util.*; import javax.persistence.spi.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 2,621,579 |
public static void skipFully(InputStream in, long n) throws IOException {
long toSkip = n;
while (n > 0) {
long amt = in.skip(n);
if (amt == 0) {
// Force a blocking read to avoid infinite loop
if (in.read() == -1) {
long skipped = toSkip - n;
throw new EOFExcep... | static void function(InputStream in, long n) throws IOException { long toSkip = n; while (n > 0) { long amt = in.skip(n); if (amt == 0) { if (in.read() == -1) { long skipped = toSkip - n; throw new EOFException(STR + skipped + STR + toSkip + STR); } n--; } else { n -= amt; } } } | /**
* Discards {@code n} bytes of data from the input stream. This method
* will block until the full amount has been skipped. Does not close the
* stream.
*
* @param in the input stream to read from
* @param n the number of bytes to skip
* @throws EOFException if this stream reaches the end before... | Discards n bytes of data from the input stream. This method will block until the full amount has been skipped. Does not close the stream | skipFully | {
"repo_name": "10045125/guava",
"path": "guava/src/com/google/common/io/ByteStreams.java",
"license": "apache-2.0",
"size": 21745
} | [
"java.io.EOFException",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.EOFException; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,766,333 |
private void handleCharacter(char c, String entity) throws XNIException {
if (fDocumentHandler != null) {
if (fNotifyBuiltInRefs) {
fDocumentHandler.startGeneralEntity(entity, null, null, null);
}
fSingleChar[0] = c;
fTempSt... | void function(char c, String entity) throws XNIException { if (fDocumentHandler != null) { if (fNotifyBuiltInRefs) { fDocumentHandler.startGeneralEntity(entity, null, null, null); } fSingleChar[0] = c; fTempString.setValues(fSingleChar, 0, 1); fDocumentHandler.characters(fTempString, null); if (fNotifyBuiltInRefs) { fD... | /**
* Calls document handler with a single character resulting from
* built-in entity resolution.
*
* @param c
* @param entity built-in name
*/ | Calls document handler with a single character resulting from built-in entity resolution | handleCharacter | {
"repo_name": "AaronZhangL/SplitCharater",
"path": "xerces-2_11_0/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java",
"license": "gpl-2.0",
"size": 69839
} | [
"org.apache.xerces.xni.XNIException"
] | import org.apache.xerces.xni.XNIException; | import org.apache.xerces.xni.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 673,025 |
public boolean isOnline()
{
return (SessionFacade.isUserInSession(this.id) != null);
} | boolean function() { return (SessionFacade.isUserInSession(this.id) != null); } | /**
* Is the user online?
*
* @return true if user is in Session
*/ | Is the user online | isOnline | {
"repo_name": "mrdon/jforum-plugins",
"path": "src/net/jforum/entities/User.java",
"license": "bsd-3-clause",
"size": 17778
} | [
"net.jforum.SessionFacade"
] | import net.jforum.SessionFacade; | import net.jforum.*; | [
"net.jforum"
] | net.jforum; | 1,043,108 |
public static Properties loadIfAvailable(String name)
{
Properties properties = null;
try
{
properties = load(name);
}
catch (IOException ignore)
{
Logger.getLogger(PropertiesUtils.class).debug(ignore.getMessage(), ignore);
}
... | static Properties function(String name) { Properties properties = null; try { properties = load(name); } catch (IOException ignore) { Logger.getLogger(PropertiesUtils.class).debug(ignore.getMessage(), ignore); } return properties; } | /**
* Returns a {@link Properties} loaded by a given properties file but only if it's available.
*
* @param name
* The path of the {@link Properties} file to be loaded. Might not be <code>null</code>.
* @return The {@link Properties} load of the given file or <code>null</code> if it... | Returns a <code>Properties</code> loaded by a given properties file but only if it's available | loadIfAvailable | {
"repo_name": "alessandroleite/greenapi",
"path": "core/src/main/java/greenapi/core/common/base/PropertiesUtils.java",
"license": "mit",
"size": 6269
} | [
"java.io.IOException",
"java.util.Properties",
"org.apache.log4j.Logger"
] | import java.io.IOException; import java.util.Properties; import org.apache.log4j.Logger; | import java.io.*; import java.util.*; import org.apache.log4j.*; | [
"java.io",
"java.util",
"org.apache.log4j"
] | java.io; java.util; org.apache.log4j; | 675,030 |
private FormulaBase deleteFormula(FormulaBase f, DeleteState state)
{
Coordinate coordinate = formulaListView.getCoordinate(f);
final int prewRowCount = formulaListView.getList().getChildCount();
FormulaBase selectedFormula = formulaListView.delete(f);
if (formulaListView.getList... | FormulaBase function(FormulaBase f, DeleteState state) { Coordinate coordinate = formulaListView.getCoordinate(f); final int prewRowCount = formulaListView.getList().getChildCount(); FormulaBase selectedFormula = formulaListView.delete(f); if (formulaListView.getList().getChildCount() != prewRowCount) { coordinate.col ... | /**
* Procedure creates a formula with given type
*/ | Procedure creates a formula with given type | deleteFormula | {
"repo_name": "mkulesh/microMathematics",
"path": "app/src/main/java/com/mkulesh/micromath/formula/FormulaList.java",
"license": "gpl-3.0",
"size": 41377
} | [
"com.mkulesh.micromath.undo.Coordinate",
"com.mkulesh.micromath.undo.DeleteState",
"com.mkulesh.micromath.utils.ViewUtils"
] | import com.mkulesh.micromath.undo.Coordinate; import com.mkulesh.micromath.undo.DeleteState; import com.mkulesh.micromath.utils.ViewUtils; | import com.mkulesh.micromath.undo.*; import com.mkulesh.micromath.utils.*; | [
"com.mkulesh.micromath"
] | com.mkulesh.micromath; | 948,688 |
private void start(String[] args) {
// Setup the classpath using JiveClassLoader
try {
// Load up the bootstrap container
final ClassLoader parent = findParentClassLoader();
File libDir;
final String workingDirectory = System.getProperty("appdir");
... | void function(String[] args) { try { final ClassLoader parent = findParentClassLoader(); File libDir; final String workingDirectory = System.getProperty(STR); if (workingDirectory == null) { libDir = new File(DEFAULT_LIB_DIR); } else { libDir = new File(new File(workingDirectory), "lib"); } File pluginDir = new File(li... | /**
* Starts the server by loading and instantiating the bootstrap
* container. Once the start method is called, the server is
* started and the server starter should not be used again.
*
* @param args the arguments passed into this initial instance of Spark.
*/ | Starts the server by loading and instantiating the bootstrap container. Once the start method is called, the server is started and the server starter should not be used again | start | {
"repo_name": "speedy01/Spark",
"path": "core/src/main/java/org/jivesoftware/launcher/Startup.java",
"license": "apache-2.0",
"size": 5862
} | [
"java.io.File",
"java.lang.reflect.Method"
] | import java.io.File; import java.lang.reflect.Method; | import java.io.*; import java.lang.reflect.*; | [
"java.io",
"java.lang"
] | java.io; java.lang; | 564,540 |
public StyledDocument getStyledDocument()
{
return (StyledDocument) super.getDocument();
} | StyledDocument function() { return (StyledDocument) super.getDocument(); } | /**
* Returns the {@link StyledDocument} that is the content model for
* this <code>JTextPane</code>. This is a typed wrapper for
* {@link #getDocument()}.
*
* @return the content model of this <code>JTextPane</code>
*/ | Returns the <code>StyledDocument</code> that is the content model for this <code>JTextPane</code>. This is a typed wrapper for <code>#getDocument()</code> | getStyledDocument | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/JTextPane.java",
"license": "gpl-2.0",
"size": 13214
} | [
"javax.swing.text.StyledDocument"
] | import javax.swing.text.StyledDocument; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 1,419,058 |
@Override
public void onConnectionSuspended(int cause) {
Log.i(TAG, "GoogleApiClient connection suspended");
} | void function(int cause) { Log.i(TAG, STR); } | /**
* Called when {@code mGoogleApiClient} connection is suspended.
*/ | Called when mGoogleApiClient connection is suspended | onConnectionSuspended | {
"repo_name": "linefeedse/avgangar",
"path": "mobile/src/main/java/se/linefeed/avgangar/GetStationService.java",
"license": "gpl-2.0",
"size": 6513
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,555,027 |
//Configure and Invoke the Publisher
PushPublishLogger.log(PublishThread.class, "Started bundle publish process", bundleName);
PublisherConfig pconf = new PublisherConfig();
BundlePublisher bundlePublisher = new BundlePublisher();
pconf.setId(bundleName);
pconf.setEndpoint(endpointId);
pconf.setGroupId... | PushPublishLogger.log(PublishThread.class, STR, bundleName); PublisherConfig pconf = new PublisherConfig(); BundlePublisher bundlePublisher = new BundlePublisher(); pconf.setId(bundleName); pconf.setEndpoint(endpointId); pconf.setGroupId(groupId); try { bundlePublisher.init(pconf); bundlePublisher.process(null); } catc... | /**
* Sends for processing a given bundle to the {@link BundlePublisher}
*
* @see PublisherConfig
* @see BundlePublisher
*/ | Sends for processing a given bundle to the <code>BundlePublisher</code> | run | {
"repo_name": "dotCMS/core-2.x",
"path": "src/com/dotcms/rest/PublishThread.java",
"license": "gpl-3.0",
"size": 1524
} | [
"com.dotcms.publisher.receiver.BundlePublisher",
"com.dotcms.publishing.DotPublishingException",
"com.dotcms.publishing.PublisherConfig",
"com.dotmarketing.util.Logger",
"com.dotmarketing.util.PushPublishLogger"
] | import com.dotcms.publisher.receiver.BundlePublisher; import com.dotcms.publishing.DotPublishingException; import com.dotcms.publishing.PublisherConfig; import com.dotmarketing.util.Logger; import com.dotmarketing.util.PushPublishLogger; | import com.dotcms.publisher.receiver.*; import com.dotcms.publishing.*; import com.dotmarketing.util.*; | [
"com.dotcms.publisher",
"com.dotcms.publishing",
"com.dotmarketing.util"
] | com.dotcms.publisher; com.dotcms.publishing; com.dotmarketing.util; | 2,156,731 |
public static void deletePackageKey(PackageKey key) {
HibernateFactory.getSession().delete(key);
} | static void function(PackageKey key) { HibernateFactory.getSession().delete(key); } | /**
* Deletes a package key
* @param key the key to delete
*/ | Deletes a package key | deletePackageKey | {
"repo_name": "lhellebr/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/rhnpackage/PackageFactory.java",
"license": "gpl-2.0",
"size": 21483
} | [
"com.redhat.rhn.common.hibernate.HibernateFactory"
] | import com.redhat.rhn.common.hibernate.HibernateFactory; | import com.redhat.rhn.common.hibernate.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 1,268,162 |
private void validateMetadataMatchesLocalFile(UploadMetadata metadata) throws OperationsException {
if (!metadata.getTargetStreamPath().trim().equalsIgnoreCase(this.getParameters().getTargetStreamPath().trim())) {
throw new OperationsException("Metadata points to a different target stream than t... | void function(UploadMetadata metadata) throws OperationsException { if (!metadata.getTargetStreamPath().trim().equalsIgnoreCase(this.getParameters().getTargetStreamPath().trim())) { throw new OperationsException(STR); } File metadataInputFileInfo = new File(metadata.getInputFilePath()); File paramInputFileInfo = new Fi... | /**
* Verifies that the metadata is consistent with the local file information.
*
* @param metadata The {@link UploadMetadata} to check against a serialized copy.
* @throws OperationsException
*/ | Verifies that the metadata is consistent with the local file information | validateMetadataMatchesLocalFile | {
"repo_name": "herveyw/azure-sdk-for-java",
"path": "azure-mgmt-datalake-store-uploader/src/main/java/com/microsoft/azure/management/datalake/store/uploader/DataLakeStoreUploader.java",
"license": "mit",
"size": 17543
} | [
"java.io.File",
"javax.management.OperationsException"
] | import java.io.File; import javax.management.OperationsException; | import java.io.*; import javax.management.*; | [
"java.io",
"javax.management"
] | java.io; javax.management; | 507,972 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.