method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static void closeQuietly(InputStream is) {
close(is);
} | static void function(InputStream is) { close(is); } | /**
* Performs the same function as the commons io version but also performs
* logging of streams which threw an exception when trying to close them and
* logs them at error level
*/ | Performs the same function as the commons io version but also performs logging of streams which threw an exception when trying to close them and logs them at error level | closeQuietly | {
"repo_name": "thomasmaurel/ensj-healthcheck",
"path": "src/org/ensembl/healthcheck/util/InputOutputUtils.java",
"license": "apache-2.0",
"size": 9464
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 566,897 |
@SuppressWarnings({"rawtypes", "unchecked"})
public static Object atPath(String jsonPath, Map<String,Object> json) {
if ("/".equals(jsonPath))
return json;
if (!jsonPath.startsWith("/"))
throw new IllegalArgumentException("Invalid JSON path: "+
jsonPath+"! Must start with a /");
... | @SuppressWarnings({STR, STR}) static Object function(String jsonPath, Map<String,Object> json) { if ("/".equals(jsonPath)) return json; if (!jsonPath.startsWith("/")) throw new IllegalArgumentException(STR+ jsonPath+STR); Map<String,Object> parent = json; Object result = null; String[] path = jsonPath.split("/"); for (... | /**
* Helper function for reading an Object of unknown type from a JSON Object tree.
*/ | Helper function for reading an Object of unknown type from a JSON Object tree | atPath | {
"repo_name": "q474818917/solr-5.2.0",
"path": "solr/core/src/java/org/apache/solr/util/SolrCLI.java",
"license": "apache-2.0",
"size": 68456
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,646,985 |
public void setBulletFont(String typeface) {
if (typeface == null) {
setPropVal(_paragraphStyle, _masterStyle, "bullet.font", null);
setFlag(ParagraphFlagsTextProp.BULLET_HARDFONT_IDX, false);
return;
}
FontCollection fc = getSheet().getSlideShow().getFon... | void function(String typeface) { if (typeface == null) { setPropVal(_paragraphStyle, _masterStyle, STR, null); setFlag(ParagraphFlagsTextProp.BULLET_HARDFONT_IDX, false); return; } FontCollection fc = getSheet().getSlideShow().getFontCollection(); int idx = fc.addFont(typeface); setParagraphTextPropVal(STR, idx); setFl... | /**
* Sets the bullet font
*/ | Sets the bullet font | setBulletFont | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java",
"license": "apache-2.0",
"size": 58932
} | [
"org.apache.poi.hslf.model.textproperties.ParagraphFlagsTextProp",
"org.apache.poi.hslf.record.FontCollection"
] | import org.apache.poi.hslf.model.textproperties.ParagraphFlagsTextProp; import org.apache.poi.hslf.record.FontCollection; | import org.apache.poi.hslf.model.textproperties.*; import org.apache.poi.hslf.record.*; | [
"org.apache.poi"
] | org.apache.poi; | 1,002,756 |
public static AckSystemMessage parse(final InputStream stream) throws IOException {
if (stream == null) {
return null;
}
return new AckSystemMessage(stream);
} | static AckSystemMessage function(final InputStream stream) throws IOException { if (stream == null) { return null; } return new AckSystemMessage(stream); } | /**
* Creates a new AckSystemMessage by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding.<br>
* If the stream contains multiple messages, only the first one will be parsed.
*
* @param stream an input stream in UTF-8 encoding with the MT message in it... | Creates a new AckSystemMessage by parsing a input stream with the message content in its swift FIN format, using "UTF-8" as encoding. If the stream contains multiple messages, only the first one will be parsed | parse | {
"repo_name": "prowide/prowide-core",
"path": "src/main/java/com/prowidesoftware/swift/model/mt/AckSystemMessage.java",
"license": "apache-2.0",
"size": 6173
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,578,870 |
public void setEnabledConverters(List<String> enabledConverters) {
if (enabledConverters != null && !enabledConverters.isEmpty()) {
this.enabledConverters = new ArrayList(enabledConverters);
}
} | void function(List<String> enabledConverters) { if (enabledConverters != null && !enabledConverters.isEmpty()) { this.enabledConverters = new ArrayList(enabledConverters); } } | /**
* A list of converters to enable as full class name or simple class name.
* All the converters automatically registered are enabled if empty or null
*/ | A list of converters to enable as full class name or simple class name. All the converters automatically registered are enabled if empty or null | setEnabledConverters | {
"repo_name": "acartapanis/camel",
"path": "components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java",
"license": "apache-2.0",
"size": 35566
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,853,498 |
public FilePluginInstaller
installFromFile(
File file )
throws PluginException; | FilePluginInstaller function( File file ) throws PluginException; | /**
* Installs a plugin from a file - must be either a ZIP file or a JAR file as per
* normal plugin update semantics. Name of file must be of the form:
* <plugin_id> "_" <plugin_version> "." ["jar" | "zip" ].
* For example
* myplugin_1.0.jar
* @param file
* @throws PluginException
*/ | Installs a plugin from a file - must be either a ZIP file or a JAR file as per normal plugin update semantics. Name of file must be of the form: "_" "." ["jar" | "zip" ]. For example myplugin_1.0.jar | installFromFile | {
"repo_name": "BiglySoftware/BiglyBT",
"path": "core/src/com/biglybt/pif/installer/PluginInstaller.java",
"license": "gpl-2.0",
"size": 3059
} | [
"com.biglybt.pif.PluginException",
"java.io.File"
] | import com.biglybt.pif.PluginException; import java.io.File; | import com.biglybt.pif.*; import java.io.*; | [
"com.biglybt.pif",
"java.io"
] | com.biglybt.pif; java.io; | 668,176 |
public LockService getLockService()
{
return lockService;
} | LockService function() { return lockService; } | /**
* Sets the lock service.
*/ | Sets the lock service | getLockService | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java",
"license": "lgpl-3.0",
"size": 147090
} | [
"org.alfresco.service.cmr.lock.LockService"
] | import org.alfresco.service.cmr.lock.LockService; | import org.alfresco.service.cmr.lock.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 905,833 |
public static SkylarkNestedSet convertPathFragmentsToSkylark(
Iterable<PathFragment> pathFragments) {
NestedSetBuilder<String> result = NestedSetBuilder.stableOrder();
for (PathFragment path : pathFragments) {
result.add(path.getSafePathString());
}
return SkylarkNestedSet.of(String.class,... | static SkylarkNestedSet function( Iterable<PathFragment> pathFragments) { NestedSetBuilder<String> result = NestedSetBuilder.stableOrder(); for (PathFragment path : pathFragments) { result.add(path.getSafePathString()); } return SkylarkNestedSet.of(String.class, result.build()); } | /**
* Converts {@link PathFragment}s into a skylark-compatible nested set of path strings.
*/ | Converts <code>PathFragment</code>s into a skylark-compatible nested set of path strings | convertPathFragmentsToSkylark | {
"repo_name": "ButterflyNetwork/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProviderSkylarkConverters.java",
"license": "apache-2.0",
"size": 9222
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder",
"com.google.devtools.build.lib.syntax.SkylarkNestedSet",
"com.google.devtools.build.lib.vfs.PathFragment"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.syntax.SkylarkNestedSet; import com.google.devtools.build.lib.vfs.PathFragment; | import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.syntax.*; import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 56,294 |
void onSucceed(int what, Response<T> response); | void onSucceed(int what, Response<T> response); | /**
* Server correct response to callback when an HTTP request.
*
* @param what
* the credit of the incoming request is used to distinguish
* between multiple requests.
* @param response
* in response to the results.
*/ | Server correct response to callback when an HTTP request | onSucceed | {
"repo_name": "AntTaylor/SweetLife",
"path": "common/src/main/java/com/anttaylor/common/network/http/nohttp/HttpCallBack.java",
"license": "apache-2.0",
"size": 1317
} | [
"com.yolanda.nohttp.rest.Response"
] | import com.yolanda.nohttp.rest.Response; | import com.yolanda.nohttp.rest.*; | [
"com.yolanda.nohttp"
] | com.yolanda.nohttp; | 2,146,166 |
QueryResult result = null;
SessionFactory factory = FLRSessionFactory.getFactory();
Session session = null;
try {
int colCount = getTableInfo().getColumnClasses().length;
int pageSize = PAGE_SIZE;
int startIndex = Math.max(rowIndex.intValue() - (pageSize / 2), 0);
int endIndex = startIndex + pageSiz... | QueryResult result = null; SessionFactory factory = FLRSessionFactory.getFactory(); Session session = null; try { int colCount = getTableInfo().getColumnClasses().length; int pageSize = PAGE_SIZE; int startIndex = Math.max(rowIndex.intValue() - (pageSize / 2), 0); int endIndex = startIndex + pageSize - 1; session = fac... | /**
* The information needed for the kundes table.
*/ | The information needed for the kundes table | getPageAt | {
"repo_name": "erdincay/ejb",
"path": "src/com/lp/server/angebotstkl/fastlanereader/AgstklpositionHandler.java",
"license": "agpl-3.0",
"size": 21576
} | [
"com.lp.server.angebotstkl.fastlanereader.generated.FLRAgstklposition",
"com.lp.server.artikel.service.ArtikellieferantDto",
"com.lp.server.bestellung.service.WareneingangDto",
"com.lp.server.bestellung.service.WareneingangspositionDto",
"com.lp.server.stueckliste.fastlanereader.generated.FLRStueckliste",
... | import com.lp.server.angebotstkl.fastlanereader.generated.FLRAgstklposition; import com.lp.server.artikel.service.ArtikellieferantDto; import com.lp.server.bestellung.service.WareneingangDto; import com.lp.server.bestellung.service.WareneingangspositionDto; import com.lp.server.stueckliste.fastlanereader.generated.FLRS... | import com.lp.server.angebotstkl.fastlanereader.generated.*; import com.lp.server.artikel.service.*; import com.lp.server.bestellung.service.*; import com.lp.server.stueckliste.fastlanereader.generated.*; import com.lp.server.system.service.*; import com.lp.server.util.fastlanereader.*; import com.lp.server.util.fastla... | [
"com.lp.server",
"com.lp.util",
"java.util",
"org.hibernate"
] | com.lp.server; com.lp.util; java.util; org.hibernate; | 1,499,012 |
protected Event newEvent(final String id, final Throwable error) {
return newEvent(id, new LocalAttributeMap(CasWebflowConstants.TRANSITION_ID_ERROR, error));
} | Event function(final String id, final Throwable error) { return newEvent(id, new LocalAttributeMap(CasWebflowConstants.TRANSITION_ID_ERROR, error)); } | /**
* New event based on the id, which contains an error attribute referring to the exception occurred.
*
* @param id the id
* @param error the error
* @return the event
*/ | New event based on the id, which contains an error attribute referring to the exception occurred | newEvent | {
"repo_name": "GIP-RECIA/cas",
"path": "core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/AbstractCasWebflowEventResolver.java",
"license": "apache-2.0",
"size": 8962
} | [
"org.apereo.cas.web.flow.CasWebflowConstants",
"org.springframework.webflow.core.collection.LocalAttributeMap",
"org.springframework.webflow.execution.Event"
] | import org.apereo.cas.web.flow.CasWebflowConstants; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.execution.Event; | import org.apereo.cas.web.flow.*; import org.springframework.webflow.core.collection.*; import org.springframework.webflow.execution.*; | [
"org.apereo.cas",
"org.springframework.webflow"
] | org.apereo.cas; org.springframework.webflow; | 1,829,947 |
void setPluginContext( Map pluginContext ); | void setPluginContext( Map pluginContext ); | /**
* Set a new shared context <code>Map</code> to a mojo before executing it.
*
* @param pluginContext a new <code>Map</code>
*/ | Set a new shared context <code>Map</code> to a mojo before executing it | setPluginContext | {
"repo_name": "vedmishr/demo1",
"path": "maven-plugin-api/src/main/java/org/apache/maven/plugin/ContextEnabled.java",
"license": "apache-2.0",
"size": 1526
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 655,998 |
@Nullable
String getRequestLogged(@NonNull final String uri, @Nullable final Parameters params) {
final HttpResponse response = Network.getRequest(uri, params);
final String data = Network.getResponseData(response, canRemoveWhitespace(uri));
// A page not found will not be found if the ... | String getRequestLogged(@NonNull final String uri, @Nullable final Parameters params) { final HttpResponse response = Network.getRequest(uri, params); final String data = Network.getResponseData(response, canRemoveWhitespace(uri)); if (Network.isPageNotFound(response) getLoginStatus(data)) { return data; } if (login() ... | /**
* GET HTTP request. Do the request a second time if the user is not logged in
*
*/ | GET HTTP request. Do the request a second time if the user is not logged in | getRequestLogged | {
"repo_name": "xiaoyanit/cgeo",
"path": "main/src/cgeo/geocaching/connector/gc/GCLogin.java",
"license": "apache-2.0",
"size": 18924
} | [
"ch.boye.httpclientandroidlib.HttpResponse",
"org.eclipse.jdt.annotation.NonNull",
"org.eclipse.jdt.annotation.Nullable"
] | import ch.boye.httpclientandroidlib.HttpResponse; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; | import ch.boye.httpclientandroidlib.*; import org.eclipse.jdt.annotation.*; | [
"ch.boye.httpclientandroidlib",
"org.eclipse.jdt"
] | ch.boye.httpclientandroidlib; org.eclipse.jdt; | 2,657,906 |
public double num()
throws javax.xml.transform.TransformerException
{
XMLString s = xstr();
return s.toDouble();
} | double function() throws javax.xml.transform.TransformerException { XMLString s = xstr(); return s.toDouble(); } | /**
* Cast result object to a number.
*
* @return The result tree fragment as a number or NaN
*/ | Cast result object to a number | num | {
"repo_name": "itgeeker/jdk",
"path": "src/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java",
"license": "apache-2.0",
"size": 7691
} | [
"com.sun.org.apache.xml.internal.utils.XMLString"
] | import com.sun.org.apache.xml.internal.utils.XMLString; | import com.sun.org.apache.xml.internal.utils.*; | [
"com.sun.org"
] | com.sun.org; | 2,740,748 |
public void updateList(Waypoint waypoint) {
String code = "";
String name = "";
String time = "";
if (waypoint == null) {
// Send empty waypoints to scroll the list
System.out.println("DBG updateList waypoint = null");
} else {
name = waypoint.getWaypointName();
code = waypoint.getWaypointStopC... | void function(Waypoint waypoint) { String code = STRSTRSTRDBG updateList waypoint = nullSTRDBG updateList: " + name); } | /**
* Scroll the Pebble list UI one waypoint forward.
*
* @param waypoint new waypoint to be added to the list.
*/ | Scroll the Pebble list UI one waypoint forward | updateList | {
"repo_name": "apps8os/trafficsense",
"path": "TrafficSense_Library/src/org/apps8os/trafficsense/pebble/PebbleCommunication.java",
"license": "mit",
"size": 10021
} | [
"org.apps8os.trafficsense.core.Waypoint"
] | import org.apps8os.trafficsense.core.Waypoint; | import org.apps8os.trafficsense.core.*; | [
"org.apps8os.trafficsense"
] | org.apps8os.trafficsense; | 2,385,552 |
private static void updateMetadataForShipment() throws IOException, SQLException
{
final List<String> updateSQLForShipment = new ArrayList<String>();
updateSQLForShipment.add("Update dyextn_primitive_attribute SET IS_IDENTIFIED =1"
+ " where IDENTIFIER in (select identifier"
+ " from dyextn_attribu... | static void function() throws IOException, SQLException { final List<String> updateSQLForShipment = new ArrayList<String>(); updateSQLForShipment.add(STR + STR + STR + STR + STR + STR + STR); updateSQLForShipment.add(STR + STR + STR + STR + STR + STR + STR + STR); updateSQLForShipment.add(STR + STR + STR + STR + STR + ... | /**
* Updating the identifier attribute related to Shipment to make it as identified.
* @throws SQLException SQL Exception
* @throws IOException IO Exception
*/ | Updating the identifier attribute related to Shipment to make it as identified | updateMetadataForShipment | {
"repo_name": "NCIP/catissue-core",
"path": "software/caTissue/modules/core/src/main/java/edu/wustl/catissuecore/querysuite/metadata/UpdateMetadata.java",
"license": "bsd-3-clause",
"size": 43118
} | [
"java.io.IOException",
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List"
] | import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.sql.*; import java.util.*; | [
"java.io",
"java.sql",
"java.util"
] | java.io; java.sql; java.util; | 1,860,920 |
Directory newInstance(LuceneIndexDefinition definition, NodeBuilder builder, String dirName,
boolean reindex) throws IOException; | Directory newInstance(LuceneIndexDefinition definition, NodeBuilder builder, String dirName, boolean reindex) throws IOException; | /**
* Open a new directory.
*
* Internally, it read the data from the index definition. It writes to the
* builder, for example when closing the directory.
*
* @param definition the index definition
* @param builder the builder pointing to the index definition (see above
* ... | Open a new directory. Internally, it read the data from the index definition. It writes to the builder, for example when closing the directory | newInstance | {
"repo_name": "apache/jackrabbit-oak",
"path": "oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/DirectoryFactory.java",
"license": "apache-2.0",
"size": 1963
} | [
"java.io.IOException",
"org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexDefinition",
"org.apache.jackrabbit.oak.spi.state.NodeBuilder",
"org.apache.lucene.store.Directory"
] | import java.io.IOException; import org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexDefinition; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.lucene.store.Directory; | import java.io.*; import org.apache.jackrabbit.oak.plugins.index.lucene.*; import org.apache.jackrabbit.oak.spi.state.*; import org.apache.lucene.store.*; | [
"java.io",
"org.apache.jackrabbit",
"org.apache.lucene"
] | java.io; org.apache.jackrabbit; org.apache.lucene; | 1,338,399 |
ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withDetails(List<Details> details); | ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withDetails(List<Details> details); | /**
* A string indicating which domain-specific details to return. Multiple values should be comma-separated.
* Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks
* - identifies notable landmarks in the image.
... | A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks - identifies notable landmarks in the image | withDetails | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java",
"license": "mit",
"size": 98515
} | [
"com.microsoft.azure.cognitiveservices.vision.computervision.models.Details",
"java.util.List"
] | import com.microsoft.azure.cognitiveservices.vision.computervision.models.Details; import java.util.List; | import com.microsoft.azure.cognitiveservices.vision.computervision.models.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,773,229 |
public final void delegateConnectionClosed(CloseStatus status) throws Exception {
if (!isClosed()) {
try {
updateLastActiveTime();
cancelHeartbeat();
}
finally {
this.state = State.CLOSED;
this.handler.afterConnectionClosed(this, status);
}
}
} | final void function(CloseStatus status) throws Exception { if (!isClosed()) { try { updateLastActiveTime(); cancelHeartbeat(); } finally { this.state = State.CLOSED; this.handler.afterConnectionClosed(this, status); } } } | /**
* Invoked when the underlying connection is closed.
*/ | Invoked when the underlying connection is closed | delegateConnectionClosed | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java",
"license": "apache-2.0",
"size": 12903
} | [
"org.springframework.web.socket.CloseStatus"
] | import org.springframework.web.socket.CloseStatus; | import org.springframework.web.socket.*; | [
"org.springframework.web"
] | org.springframework.web; | 2,573,200 |
public Collection<BinaryCategorizer<? super InputType>> getCategorizers()
{
return this.categorizers;
} | Collection<BinaryCategorizer<? super InputType>> function() { return this.categorizers; } | /**
* Gets the collection of categorizers that the learner selects from.
*
* @return The collection of categorizers that the learner selects from.
*/ | Gets the collection of categorizers that the learner selects from | getCategorizers | {
"repo_name": "codeaudit/Foundry",
"path": "Components/LearningCore/Source/gov/sandia/cognition/learning/algorithm/ensemble/BinaryCategorizerSelector.java",
"license": "bsd-3-clause",
"size": 5530
} | [
"gov.sandia.cognition.learning.function.categorization.BinaryCategorizer",
"java.util.Collection"
] | import gov.sandia.cognition.learning.function.categorization.BinaryCategorizer; import java.util.Collection; | import gov.sandia.cognition.learning.function.categorization.*; import java.util.*; | [
"gov.sandia.cognition",
"java.util"
] | gov.sandia.cognition; java.util; | 1,775,513 |
public static String format(Calendar cal) {
if (cal == null) {
throw new IllegalArgumentException("argument can not be null");
}
// determine era and adjust year if necessary
int year = cal.get(Calendar.YEAR);
if (cal.isSet(Calendar.ERA)
&& cal.ge... | static String function(Calendar cal) { if (cal == null) { throw new IllegalArgumentException(STR); } int year = cal.get(Calendar.YEAR); if (cal.isSet(Calendar.ERA) && cal.get(Calendar.ERA) == GregorianCalendar.BC) { year = 0 - year + 1; } StringBuffer buf = new StringBuffer(); buf.append(XXXX_FORMAT.format(year)); buf.... | /**
* Formats a <code>Calendar</code> value into an ISO8601-compliant
* date/time string.
*
* @param cal the time value to be formatted into a date/time string.
* @return the formatted date/time string.
* @throws IllegalArgumentException if a <code>null</code> argument is passed
*/ | Formats a <code>Calendar</code> value into an ISO8601-compliant date/time string | format | {
"repo_name": "jalkanen/Priha",
"path": "src/java/org/priha/util/ISO8601.java",
"license": "apache-2.0",
"size": 9862
} | [
"java.util.Calendar",
"java.util.GregorianCalendar",
"java.util.TimeZone"
] | import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 115,331 |
@Nullable
ColorStateList getTabTitleTextColor(); | ColorStateList getTabTitleTextColor(); | /**
* Returns the default text color of a tab's title.
*
* @return The default text color of a tab's title as an instance of the class {@link
* ColorStateList} or null, if the default color is used
*/ | Returns the default text color of a tab's title | getTabTitleTextColor | {
"repo_name": "michael-rapp/ChromeLikeTabSwitcher",
"path": "library/src/main/java/de/mrapp/android/tabswitcher/model/Model.java",
"license": "apache-2.0",
"size": 56796
} | [
"android.content.res.ColorStateList"
] | import android.content.res.ColorStateList; | import android.content.res.*; | [
"android.content"
] | android.content; | 1,966,211 |
SmallLRUCache<String, String[]> getLobFileListCache(); | SmallLRUCache<String, String[]> getLobFileListCache(); | /**
* Get the lob file list cache if it is used.
*
* @return the cache or null
*/ | Get the lob file list cache if it is used | getLobFileListCache | {
"repo_name": "paulnguyen/data",
"path": "sqldbs/h2java/src/main/org/h2/store/DataHandler.java",
"license": "apache-2.0",
"size": 3212
} | [
"org.h2.util.SmallLRUCache"
] | import org.h2.util.SmallLRUCache; | import org.h2.util.*; | [
"org.h2.util"
] | org.h2.util; | 694,024 |
public void invoke(Request request, Response response,
ValveContext context)
throws IOException, ServletException {
// Pass this request on to the next valve in our pipeline
context.invokeNext(request, response);
Date date = getDate();
StringBuffer re... | void function(Request request, Response response, ValveContext context) throws IOException, ServletException { context.invokeNext(request, response); Date date = getDate(); StringBuffer result = new StringBuffer(); if (common combined) { String value = null; ServletRequest req = request.getRequest(); HttpServletRequest... | /**
* Log a message summarizing the specified request and response, according
* to the format specified by the <code>pattern</code> property.
*
* @param request Request being processed
* @param response Response being processed
* @param context The valve context used to invoke the next val... | Log a message summarizing the specified request and response, according to the format specified by the <code>pattern</code> property | invoke | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java",
"license": "apache-2.0",
"size": 26884
} | [
"java.io.IOException",
"java.util.Date",
"javax.servlet.ServletException",
"javax.servlet.ServletRequest",
"javax.servlet.http.HttpServletRequest",
"org.apache.catalina.HttpResponse",
"org.apache.catalina.Request",
"org.apache.catalina.Response",
"org.apache.catalina.ValveContext"
] | import java.io.IOException; import java.util.Date; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import org.apache.catalina.HttpResponse; import org.apache.catalina.Request; import org.apache.catalina.Response; import org.apache.catalina.ValveC... | import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.catalina.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.apache.catalina"
] | java.io; java.util; javax.servlet; org.apache.catalina; | 986,841 |
@Test
public void testConstructorAlphaOutOfRange()
{
final NeuralNetwork network = new FeedForwardNetwork(3, 3, 3, new BipolarSigmoidFunction(), false);
network.fillWeights(0.1);
final double beta = 0.9;
final List<Example> examples = new ArrayList<Example>();
{
... | void function() { final NeuralNetwork network = new FeedForwardNetwork(3, 3, 3, new BipolarSigmoidFunction(), false); network.fillWeights(0.1); final double beta = 0.9; final List<Example> examples = new ArrayList<Example>(); { final double alpha = -0.1; try { new NeuralNetworkBatchTrainer(network, examples, IS_VERBOSE... | /**
* Test the <code>NeuralNetworkBatchTrainer()</code> method.
*/ | Test the <code>NeuralNetworkBatchTrainer()</code> method | testConstructorAlphaOutOfRange | {
"repo_name": "jmthompson2015/vizzini",
"path": "ai/src/test/java/org/vizzini/ai/neuralnetwork/NeuralNetworkBatchTrainerTest.java",
"license": "mit",
"size": 15019
} | [
"java.util.ArrayList",
"java.util.List",
"org.hamcrest.CoreMatchers",
"org.junit.Assert",
"org.vizzini.ai.neuralnetwork.BipolarSigmoidFunction",
"org.vizzini.ai.neuralnetwork.Example",
"org.vizzini.ai.neuralnetwork.FeedForwardNetwork",
"org.vizzini.ai.neuralnetwork.NeuralNetwork",
"org.vizzini.ai.ne... | import java.util.ArrayList; import java.util.List; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.vizzini.ai.neuralnetwork.BipolarSigmoidFunction; import org.vizzini.ai.neuralnetwork.Example; import org.vizzini.ai.neuralnetwork.FeedForwardNetwork; import org.vizzini.ai.neuralnetwork.NeuralNetwork... | import java.util.*; import org.hamcrest.*; import org.junit.*; import org.vizzini.ai.neuralnetwork.*; | [
"java.util",
"org.hamcrest",
"org.junit",
"org.vizzini.ai"
] | java.util; org.hamcrest; org.junit; org.vizzini.ai; | 465,431 |
public List<String> getExts()
{
return exts;
} | List<String> function() { return exts; } | /**
* Gets the values of the {@link #exts} field.
*
* @return the values of the {@link #exts} field
*/ | Gets the values of the <code>#exts</code> field | getExts | {
"repo_name": "mojohaus/keytool",
"path": "keytool-api/src/main/java/org/codehaus/mojo/keytool/requests/KeyToolGenerateCertificateRequest.java",
"license": "apache-2.0",
"size": 6835
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,080,390 |
private void createMarkerBasedOnResultData(ValidationResultData data, boolean isResourceAPK,
IResource analyzedResource)
{
// Create a marker for each result data (only errors and warnings)
if ((data.getSeverity() == SEVERITY.FATAL) || (data.getSeverity() == SEVERITY.ERROR)
... | void function(ValidationResultData data, boolean isResourceAPK, IResource analyzedResource) { if ((data.getSeverity() == SEVERITY.FATAL) (data.getSeverity() == SEVERITY.ERROR) (data.getSeverity() == SEVERITY.WARNING)) { if ((!isResourceAPK) && (data.getFileToIssueLines() != null) && (data.getFileToIssueLines().size() >... | /**
* Auxiliary method to create markers based on a validation result data.
* @param data The validation result data
* @param isResourceAPK boolean determining if the resource being analyzed is an APK or not
*/ | Auxiliary method to create markers based on a validation result data | createMarkerBasedOnResultData | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/preflighting.ui/src/com/motorolamobility/preflighting/ui/handlers/AnalyzeApkHandler.java",
"license": "gpl-2.0",
"size": 40813
} | [
"com.motorolamobility.preflighting.core.validation.ValidationResultData",
"java.io.File",
"java.util.List",
"org.eclipse.core.resources.IResource",
"org.eclipse.core.resources.IWorkspace",
"org.eclipse.core.resources.ResourcesPlugin",
"org.eclipse.core.runtime.IPath",
"org.eclipse.core.runtime.Path"
] | import com.motorolamobility.preflighting.core.validation.ValidationResultData; import java.io.File; import java.util.List; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclip... | import com.motorolamobility.preflighting.core.validation.*; import java.io.*; import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; | [
"com.motorolamobility.preflighting",
"java.io",
"java.util",
"org.eclipse.core"
] | com.motorolamobility.preflighting; java.io; java.util; org.eclipse.core; | 106,330 |
public void cleanupPartition() {
blocks.clear();
for (VectorizedRowBatch batch : bufferedBatches) {
batch.reset();
}
currentBufferedBatchCount = 0;
resetEvaluators();
if (boundaryCache != null) {
boundaryCache.clear();
}
if (valueCache != null) {
valueCache.clear();... | void function() { blocks.clear(); for (VectorizedRowBatch batch : bufferedBatches) { batch.reset(); } currentBufferedBatchCount = 0; resetEvaluators(); if (boundaryCache != null) { boundaryCache.clear(); } if (valueCache != null) { valueCache.clear(); } cachedSize = -1; partitionMetrics.clear(); } | /**
* This should be called, when all of the batches were processed for a group (all of the
* evaluators have been evaluated for this group). The data is not needed anymore.
*/ | This should be called, when all of the batches were processed for a group (all of the evaluators have been evaluated for this group). The data is not needed anymore | cleanupPartition | {
"repo_name": "jcamachor/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFGroupBatches.java",
"license": "apache-2.0",
"size": 46005
} | [
"org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch"
] | import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch; | import org.apache.hadoop.hive.ql.exec.vector.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 481,327 |
@Test
public void testOnNextAfterOnError() {
TestObservable t = new TestObservable();
Observable<String> st = Observable.create(t);
@SuppressWarnings("unchecked")
Observer<String> w = mock(Observer.class);
@SuppressWarnings("unused")
Subscription ws = st.subscrib... | void function() { TestObservable t = new TestObservable(); Observable<String> st = Observable.create(t); @SuppressWarnings(STR) Observer<String> w = mock(Observer.class); @SuppressWarnings(STR) Subscription ws = st.subscribe(new SafeSubscriber<String>(new TestSubscriber<String>(w))); t.sendOnNext("one"); t.sendOnError(... | /**
* Ensure onNext can not be called after onError
*/ | Ensure onNext can not be called after onError | testOnNextAfterOnError | {
"repo_name": "zsxwing/RxJava",
"path": "src/test/java/rx/internal/operators/SafeSubscriberTest.java",
"license": "apache-2.0",
"size": 5322
} | [
"org.mockito.Mockito"
] | import org.mockito.Mockito; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 1,946,580 |
public void
serializeGraph (final String graph_file)
throws Exception
{
for (Node n : graph.values()) {
n.marked = false;
}
final TreeSet<String> entries = new TreeSet<String>();
for (Node n : ngram_subgraph.values()) {
final NGram gram = (NGram) n.value;
final MetricVector mv = metric_sp... | void function (final String graph_file) throws Exception { for (Node n : graph.values()) { n.marked = false; } final TreeSet<String> entries = new TreeSet<String>(); for (Node n : ngram_subgraph.values()) { final NGram gram = (NGram) n.value; final MetricVector mv = metric_space.get(gram); if (mv != null) { final Strin... | /**
* Serialize the graph to a file which can be rendered.
*/ | Serialize the graph to a file which can be rendered | serializeGraph | {
"repo_name": "samxhuan/textrank",
"path": "src/com/sharethis/textrank/TextRank.java",
"license": "bsd-3-clause",
"size": 12748
} | [
"java.io.FileOutputStream",
"java.io.OutputStreamWriter",
"java.util.TreeSet"
] | import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.util.TreeSet; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,901,272 |
public Observable<ServiceResponse<Page<PrivateEndpointConnectionInner>>> listSinglePageAsync(final String resourceGroupName, final String workspaceName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot... | Observable<ServiceResponse<Page<PrivateEndpointConnectionInner>>> function(final String resourceGroupName, final String workspaceName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (workspaceName ==... | /**
* Lists private endpoint connection in workspace.
*
ServiceResponse<PageImpl<PrivateEndpointConnectionInner>> * @param resourceGroupName The name of the resource group. The name is case insensitive.
ServiceResponse<PageImpl<PrivateEndpointConnectionInner>> * @param workspaceName The name of the wo... | Lists private endpoint connection in workspace | listSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateEndpointConnectionsInner.java",
"license": "mit",
"size": 48240
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 823,935 |
protected final void throwNotWholeNumber(Fraction f, String i18nprefix) throws CannotPerformOperationFractionException {
if ( !f.isWholeNumber(false) ) throw new CannotPerformOperationFractionException(i18nprefix, f);
} | final void function(Fraction f, String i18nprefix) throws CannotPerformOperationFractionException { if ( !f.isWholeNumber(false) ) throw new CannotPerformOperationFractionException(i18nprefix, f); } | /**
* Throws CannotPerformOperationException if Fraction is not whole number with given i18n prefix.
* @param f Fraction to check
* @param i18nprefix prefix to i18n key name for message
* @throws CannotPerformOperationFractionException
*/ | Throws CannotPerformOperationException if Fraction is not whole number with given i18n prefix | throwNotWholeNumber | {
"repo_name": "MarPiRK/PolynomialCalc",
"path": "src/net/marpirk/dev/polynomialcalc/Fraction.java",
"license": "gpl-3.0",
"size": 26897
} | [
"net.marpirk.dev.polynomialcalc.exceptions.CannotPerformOperationFractionException"
] | import net.marpirk.dev.polynomialcalc.exceptions.CannotPerformOperationFractionException; | import net.marpirk.dev.polynomialcalc.exceptions.*; | [
"net.marpirk.dev"
] | net.marpirk.dev; | 1,647,565 |
private void executeRequest(Weather weather, String url, LocationConfig locationConfig) {
GetMethod get = null;
try {
logger.trace("{}[{}]: request : {}", getProviderName(), locationConfig.getLocationId(), url);
get = new GetMethod(url);
httpClient.executeMethod(get);
InputStream is = null;
if (... | void function(Weather weather, String url, LocationConfig locationConfig) { GetMethod get = null; try { logger.trace(STR, getProviderName(), locationConfig.getLocationId(), url); get = new GetMethod(url); httpClient.executeMethod(get); InputStream is = null; if (logger.isTraceEnabled()) { String response = get.getRespo... | /**
* Executes the http request and parses the returned stream.
*/ | Executes the http request and parses the returned stream | executeRequest | {
"repo_name": "rahulopengts/myhome",
"path": "bundles/binding/org.openhab.binding.weather/src/main/java/org/openhab/binding/weather/internal/provider/AbstractWeatherProvider.java",
"license": "epl-1.0",
"size": 5989
} | [
"java.io.ByteArrayInputStream",
"java.io.InputStream",
"org.apache.commons.httpclient.HttpStatus",
"org.apache.commons.httpclient.methods.GetMethod",
"org.apache.commons.lang.StringUtils",
"org.openhab.binding.weather.internal.common.LocationConfig",
"org.openhab.binding.weather.internal.model.ProviderN... | import java.io.ByteArrayInputStream; import java.io.InputStream; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.lang.StringUtils; import org.openhab.binding.weather.internal.common.LocationConfig; import org.openhab.binding.weather.inte... | import java.io.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*; import org.apache.commons.lang.*; import org.openhab.binding.weather.internal.common.*; import org.openhab.binding.weather.internal.model.*; | [
"java.io",
"org.apache.commons",
"org.openhab.binding"
] | java.io; org.apache.commons; org.openhab.binding; | 1,327,458 |
protected List<KeyValueScanner> getScannersNoCompaction() throws IOException {
final boolean isCompaction = false;
boolean usePread = isGet || scanUsePread;
return selectScannersFrom(store.getScanners(cacheBlocks, isGet, usePread,
isCompaction, matcher, scan.getStartRow(), scan.getStopRow(), this.... | List<KeyValueScanner> function() throws IOException { final boolean isCompaction = false; boolean usePread = isGet scanUsePread; return selectScannersFrom(store.getScanners(cacheBlocks, isGet, usePread, isCompaction, matcher, scan.getStartRow(), scan.getStopRow(), this.readPt)); } | /**
* Get a filtered list of scanners. Assumes we are not in a compaction.
* @return list of scanners to seek
*/ | Get a filtered list of scanners. Assumes we are not in a compaction | getScannersNoCompaction | {
"repo_name": "tobegit3hub/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java",
"license": "apache-2.0",
"size": 26459
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,657,122 |
CompositeData uninstallBundles(long[] bundleIdentifiers) throws IOException; | CompositeData uninstallBundles(long[] bundleIdentifiers) throws IOException; | /**
* Batch uninstall the bundles indicated by the list of bundle identifiers
*
* @see #BATCH_ACTION_RESULT_TYPE BATCH_ACTION_RESULT_TYPE for the precise
* specification of the CompositeData type representing the returned
* result.
*
* @param bundleIdentifiers the array of bundle identifiers
*... | Batch uninstall the bundles indicated by the list of bundle identifiers | uninstallBundles | {
"repo_name": "WouterBanckenACA/aries",
"path": "jmx/jmx-api/src/main/java/org/osgi/jmx/framework/FrameworkMBean.java",
"license": "apache-2.0",
"size": 20726
} | [
"java.io.IOException",
"javax.management.openmbean.CompositeData"
] | import java.io.IOException; import javax.management.openmbean.CompositeData; | import java.io.*; import javax.management.openmbean.*; | [
"java.io",
"javax.management"
] | java.io; javax.management; | 210,314 |
public void setInterpolator(Interpolator interpolator) {
scroller.forceFinished(true);
scroller = new Scroller(context, interpolator);
} | void function(Interpolator interpolator) { scroller.forceFinished(true); scroller = new Scroller(context, interpolator); } | /**
* Set the the specified scrolling interpolator
* @param interpolator the interpolator
*/ | Set the the specified scrolling interpolator | setInterpolator | {
"repo_name": "Tomorrowhi/GpsTracker",
"path": "src/com/bct/gpstracker/wheel/WheelScroller.java",
"license": "apache-2.0",
"size": 7298
} | [
"android.view.animation.Interpolator",
"android.widget.Scroller"
] | import android.view.animation.Interpolator; import android.widget.Scroller; | import android.view.animation.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 2,504,318 |
void addRootRegion(RegionCreation root) throws RegionExistsException {
String name = root.getName();
RegionCreation existing = (RegionCreation) this.roots.get(name);
if (existing != null) {
throw new RegionExistsException(existing);
} else {
this.roots.put(root.getName(), root);
}
... | void addRootRegion(RegionCreation root) throws RegionExistsException { String name = root.getName(); RegionCreation existing = (RegionCreation) this.roots.get(name); if (existing != null) { throw new RegionExistsException(existing); } else { this.roots.put(root.getName(), root); } } | /**
* Sets the attributes of the root region
*
* @throws RegionExistsException If this cache already contains a region with the same name as
* {@code root}.
*/ | Sets the attributes of the root region | addRootRegion | {
"repo_name": "prasi-in/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java",
"license": "apache-2.0",
"size": 75611
} | [
"org.apache.geode.cache.RegionExistsException"
] | import org.apache.geode.cache.RegionExistsException; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,240,939 |
public void testBlendingType() throws IOException {
BytesRef pl = new BytesRef("lake");
long w = 20;
Input keys[] = new Input[]{
new Input("top of the lake", w, pl)
};
Path tempDir = createTempDir("BlendedInfixSuggesterTest");
Analyzer a = new StandardAnalyzer(CharArraySet.EMPTY_SET... | void function() throws IOException { BytesRef pl = new BytesRef("lake"); long w = 20; Input keys[] = new Input[]{ new Input(STR, w, pl) }; Path tempDir = createTempDir(STR); Analyzer a = new StandardAnalyzer(CharArraySet.EMPTY_SET); BlendedInfixSuggester suggester = new BlendedInfixSuggester(newFSDirectory(tempDir), a)... | /**
* Verify the different flavours of the blender types
*/ | Verify the different flavours of the blender types | testBlendingType | {
"repo_name": "PATRIC3/p3_solr",
"path": "lucene/suggest/src/test/org/apache/lucene/search/suggest/analyzing/BlendedInfixSuggesterTest.java",
"license": "apache-2.0",
"size": 12391
} | [
"java.io.IOException",
"java.nio.file.Path",
"org.apache.lucene.analysis.Analyzer",
"org.apache.lucene.analysis.standard.StandardAnalyzer",
"org.apache.lucene.analysis.util.CharArraySet",
"org.apache.lucene.search.suggest.Input",
"org.apache.lucene.search.suggest.InputArrayIterator",
"org.apache.lucen... | import java.io.IOException; import java.nio.file.Path; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.analysis.util.CharArraySet; import org.apache.lucene.search.suggest.Input; import org.apache.lucene.search.suggest.InputArrayIterator; ... | import java.io.*; import java.nio.file.*; import org.apache.lucene.analysis.*; import org.apache.lucene.analysis.standard.*; import org.apache.lucene.analysis.util.*; import org.apache.lucene.search.suggest.*; import org.apache.lucene.util.*; | [
"java.io",
"java.nio",
"org.apache.lucene"
] | java.io; java.nio; org.apache.lucene; | 2,324,181 |
@Deprecated
public Future<CommandResult> gpTranslationTableRequest(Integer startIndex) {
GpTranslationTableRequest command = new GpTranslationTableRequest();
// Set the fields
command.setStartIndex(startIndex);
return sendCommand(command);
} | Future<CommandResult> function(Integer startIndex) { GpTranslationTableRequest command = new GpTranslationTableRequest(); command.setStartIndex(startIndex); return sendCommand(command); } | /**
* The Gp Translation Table Request
* <p>
* The GP Translation Table Request is generated to request information from the GPD
* Command Translation Table of remote device(s).
*
* @param startIndex {@link Integer} Start Index
* @return the {@link Future<CommandResult>} command resul... | The Gp Translation Table Request The GP Translation Table Request is generated to request information from the GPD Command Translation Table of remote device(s) | gpTranslationTableRequest | {
"repo_name": "zsmartsystems/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclGreenPowerCluster.java",
"license": "epl-1.0",
"size": 87295
} | [
"com.zsmartsystems.zigbee.CommandResult",
"com.zsmartsystems.zigbee.zcl.clusters.greenpower.GpTranslationTableRequest",
"java.util.concurrent.Future"
] | import com.zsmartsystems.zigbee.CommandResult; import com.zsmartsystems.zigbee.zcl.clusters.greenpower.GpTranslationTableRequest; import java.util.concurrent.Future; | import com.zsmartsystems.zigbee.*; import com.zsmartsystems.zigbee.zcl.clusters.greenpower.*; import java.util.concurrent.*; | [
"com.zsmartsystems.zigbee",
"java.util"
] | com.zsmartsystems.zigbee; java.util; | 2,467,874 |
Configurable withProtectionDomain(ProtectionDomain protectionDomain); | Configurable withProtectionDomain(ProtectionDomain protectionDomain); | /**
* Overrides the implicitly set default {@link java.security.ProtectionDomain} with an explicit one.
*
* @param protectionDomain The protection domain to apply.
* @return This class loading strategy with an explicitly set {@link java.security.ProtectionDomain}.
*/ | Overrides the implicitly set default <code>java.security.ProtectionDomain</code> with an explicit one | withProtectionDomain | {
"repo_name": "vic/byte-buddy",
"path": "byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassLoadingStrategy.java",
"license": "apache-2.0",
"size": 20861
} | [
"java.security.ProtectionDomain"
] | import java.security.ProtectionDomain; | import java.security.*; | [
"java.security"
] | java.security; | 1,567,204 |
@GET
@Path("runstructure")
@Produces(MediaType.APPLICATION_XML)
public Response findRunStructureById(@PathParam("courseId") final Long courseId, @Context final HttpServletRequest httpRequest, @Context final Request request) {
if (!isAuthor(httpRequest)) { return Response.serverError().status(Status.UNAUTHORIZED... | @Path(STR) @Produces(MediaType.APPLICATION_XML) Response function(@PathParam(STR) final Long courseId, @Context final HttpServletRequest httpRequest, @Context final Request request) { if (!isAuthor(httpRequest)) { return Response.serverError().status(Status.UNAUTHORIZED).build(); } final ICourse course = loadCourse(cou... | /**
* Get the runstructure of the course by id
*
* @response.representation.200.mediaType application/xml
* @response.representation.200.doc The run structure of the course
* @response.representation.401.doc The roles of the authenticated user are not sufficient
* @response.representation.404.doc The cours... | Get the runstructure of the course by id | findRunStructureById | {
"repo_name": "RLDevOps/Demo",
"path": "src/main/java/org/olat/restapi/repository/course/CourseWebService.java",
"license": "apache-2.0",
"size": 23034
} | [
"java.util.Date",
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Request",
"javax.ws.rs.core.Response",
"org.olat.core.util.vfs.VFSItem",
"org.olat.course.IC... | import java.util.Date; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Request; import javax.ws.rs.core.Response; import org.olat.core.util.vfs.VF... | import java.util.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.olat.core.util.vfs.*; import org.olat.course.*; | [
"java.util",
"javax.servlet",
"javax.ws",
"org.olat.core",
"org.olat.course"
] | java.util; javax.servlet; javax.ws; org.olat.core; org.olat.course; | 109,092 |
public static CompactMealyMachineProxy createFrom(MealyMachine<?, String, ?, String> machine,
Alphabet<String> alphabet) {
return createProxy(machine, alphabet);
} | static CompactMealyMachineProxy function(MealyMachine<?, String, ?, String> machine, Alphabet<String> alphabet) { return createProxy(machine, alphabet); } | /**
* Create a proxy around a specific MealyMachine.
*
* @param machine
* The MealyMachine the Proxy should wrap in
* @param alphabet
* The alphabet of the MealyMachine.
* @return A new Proxy around the given MealyMachine.
*/ | Create a proxy around a specific MealyMachine | createFrom | {
"repo_name": "LearnLib/alex",
"path": "backend/src/main/java/de/learnlib/alex/learning/entities/learnlibproxies/CompactMealyMachineProxy.java",
"license": "apache-2.0",
"size": 9034
} | [
"net.automatalib.automata.transducers.MealyMachine",
"net.automatalib.words.Alphabet"
] | import net.automatalib.automata.transducers.MealyMachine; import net.automatalib.words.Alphabet; | import net.automatalib.automata.transducers.*; import net.automatalib.words.*; | [
"net.automatalib.automata",
"net.automatalib.words"
] | net.automatalib.automata; net.automatalib.words; | 1,503,417 |
public CE getLocalRemoteControlStateCode() { return CEnull.NI; } | public CE getLocalRemoteControlStateCode() { return CEnull.NI; } | /** Property mutator, does nothing if not overloaded.softwareName.
@see org.hl7.rim.Device#setSoftwareName
*/ | Property mutator, does nothing if not overloaded.softwareName | setSoftwareName | {
"repo_name": "markusgumbel/dshl7",
"path": "hl7-javasig/gencode/org/hl7/rim/decorators/DeviceDecorator.java",
"license": "apache-2.0",
"size": 4744
} | [
"org.hl7.types.impl.CEnull"
] | import org.hl7.types.impl.CEnull; | import org.hl7.types.impl.*; | [
"org.hl7.types"
] | org.hl7.types; | 1,557,524 |
protected List<AssociationsInfo> getForeignKeyAssociations(String className, boolean isEager) {
if (isEager) {
analyzeAssociations(className);
return fkInCurrentModel;
}
return null;
} | List<AssociationsInfo> function(String className, boolean isEager) { if (isEager) { analyzeAssociations(className); return fkInCurrentModel; } return null; } | /**
* Get the foreign key associations of the specified class.
*
* @param className
* The full class name.
* @param isEager
* True to load the associated models, false not.
* @return The foreign key associations of the specified class
*/ | Get the foreign key associations of the specified class | getForeignKeyAssociations | {
"repo_name": "hongyangAndroid/LitePal",
"path": "litepal/src/main/java/org/litepal/crud/DataHandler.java",
"license": "apache-2.0",
"size": 47358
} | [
"java.util.List",
"org.litepal.crud.model.AssociationsInfo"
] | import java.util.List; import org.litepal.crud.model.AssociationsInfo; | import java.util.*; import org.litepal.crud.model.*; | [
"java.util",
"org.litepal.crud"
] | java.util; org.litepal.crud; | 1,954,489 |
public static <T extends ConfigAction> Builder<T> getBuilder(
final URLSet<T> urlSet,
final ConfigItem<Boolean, T> ignoreIPHeaders,
final ConfigItem<Boolean, T> includeStackTraceInResponse) {
return new Builder<>(urlSet, ignoreIPHeaders, includeStackTraceInResponse);
}
public static class Builder<T ... | static <T extends ConfigAction> Builder<T> function( final URLSet<T> urlSet, final ConfigItem<Boolean, T> ignoreIPHeaders, final ConfigItem<Boolean, T> includeStackTraceInResponse) { return new Builder<>(urlSet, ignoreIPHeaders, includeStackTraceInResponse); } public static class Builder<T extends ConfigAction> { priva... | /** Get a builder for an {@link AuthExternalConfig}.
* @param <T> Either {@link State} for the state of the configuration, or {@link Action} to
* specify a change to the configuration.
* @param urlSet the set of urls for the default environment.
* @param ignoreIPHeaders either the state or a change action for t... | Get a builder for an <code>AuthExternalConfig</code> | getBuilder | {
"repo_name": "MrCreosote/auth2",
"path": "src/us/kbase/auth2/service/AuthExternalConfig.java",
"license": "mit",
"size": 23646
} | [
"java.util.HashMap",
"java.util.Map",
"us.kbase.auth2.lib.Utils",
"us.kbase.auth2.lib.config.ConfigAction",
"us.kbase.auth2.lib.config.ConfigItem"
] | import java.util.HashMap; import java.util.Map; import us.kbase.auth2.lib.Utils; import us.kbase.auth2.lib.config.ConfigAction; import us.kbase.auth2.lib.config.ConfigItem; | import java.util.*; import us.kbase.auth2.lib.*; import us.kbase.auth2.lib.config.*; | [
"java.util",
"us.kbase.auth2"
] | java.util; us.kbase.auth2; | 1,664,307 |
default List<String> listSchemaNames(ConnectorSession session)
{
return emptyList();
} | default List<String> listSchemaNames(ConnectorSession session) { return emptyList(); } | /**
* Returns the schemas provided by this connector.
*/ | Returns the schemas provided by this connector | listSchemaNames | {
"repo_name": "treasure-data/presto",
"path": "presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorMetadata.java",
"license": "apache-2.0",
"size": 42204
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,490,729 |
public default <E2> GraphTraversal<S, E2> map(final Function<Traverser<E>, E2> function) {
this.asAdmin().getBytecode().addStep(Symbols.map, function);
return this.asAdmin().addStep(new LambdaMapStep<>(this.asAdmin(), function));
} | default <E2> GraphTraversal<S, E2> function(final Function<Traverser<E>, E2> function) { this.asAdmin().getBytecode().addStep(Symbols.map, function); return this.asAdmin().addStep(new LambdaMapStep<>(this.asAdmin(), function)); } | /**
* Map a {@link Traverser} referencing an object of type <code>E</code> to an object of type <code>E2</code>.
*
* @param function the lambda expression that does the functional mapping
* @return the traversal with an appended {@link LambdaMapStep}.
* @see <a href="http://tinkerpop.apache.org... | Map a <code>Traverser</code> referencing an object of type <code>E</code> to an object of type <code>E2</code> | map | {
"repo_name": "artem-aliev/tinkerpop",
"path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java",
"license": "apache-2.0",
"size": 151973
} | [
"java.util.function.Function",
"org.apache.tinkerpop.gremlin.process.traversal.Traverser",
"org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaMapStep"
] | import java.util.function.Function; import org.apache.tinkerpop.gremlin.process.traversal.Traverser; import org.apache.tinkerpop.gremlin.process.traversal.step.map.LambdaMapStep; | import java.util.function.*; import org.apache.tinkerpop.gremlin.process.traversal.*; import org.apache.tinkerpop.gremlin.process.traversal.step.map.*; | [
"java.util",
"org.apache.tinkerpop"
] | java.util; org.apache.tinkerpop; | 1,430,334 |
@Override
public void writeReadsAlignedToHaplotypes(final Collection<Haplotype> haplotypes,
final Locatable paddedReferenceLoc,
final Collection<Haplotype> bestHaplotypes,
fi... | void function(final Collection<Haplotype> haplotypes, final Locatable paddedReferenceLoc, final Collection<Haplotype> bestHaplotypes, final Set<Haplotype> calledHaplotypes, final ReadLikelihoods<Haplotype> readLikelihoods) { Utils.nonNull(haplotypes, STR); Utils.nonNull(paddedReferenceLoc, STR); Utils.nonNull(calledHap... | /**
* Write out a BAM representing for the haplotype caller at this site
*
* @param haplotypes a list of all possible haplotypes at this loc, must not be null
* @param paddedReferenceLoc the span of the based reference here, must not be null
* @param bestHaplotypes a list of the best (a subset ... | Write out a BAM representing for the haplotype caller at this site | writeReadsAlignedToHaplotypes | {
"repo_name": "BGI-flexlab/SOAPgaeaDevelopment4.0",
"path": "src/main/java/org/bgi/flexlab/gaea/tools/haplotypecaller/writer/CalledHaplotypeBAMWriter.java",
"license": "gpl-3.0",
"size": 2453
} | [
"java.util.Collection",
"java.util.Set",
"org.bgi.flexlab.gaea.data.structure.bam.GaeaSamRecord",
"org.bgi.flexlab.gaea.tools.haplotypecaller.Haplotype",
"org.bgi.flexlab.gaea.tools.haplotypecaller.ReadLikelihoods",
"org.bgi.flexlab.gaea.util.Utils"
] | import java.util.Collection; import java.util.Set; import org.bgi.flexlab.gaea.data.structure.bam.GaeaSamRecord; import org.bgi.flexlab.gaea.tools.haplotypecaller.Haplotype; import org.bgi.flexlab.gaea.tools.haplotypecaller.ReadLikelihoods; import org.bgi.flexlab.gaea.util.Utils; | import java.util.*; import org.bgi.flexlab.gaea.data.structure.bam.*; import org.bgi.flexlab.gaea.tools.haplotypecaller.*; import org.bgi.flexlab.gaea.util.*; | [
"java.util",
"org.bgi.flexlab"
] | java.util; org.bgi.flexlab; | 1,058,502 |
public long[] insert(final Collection<T> list) throws LiteDatabaseException {
return insert(list, true);
} | long[] function(final Collection<T> list) throws LiteDatabaseException { return insert(list, true); } | /**
* Use transaction to insert bulk array of object
* @param list
* @return the list of created object id
* @throws LiteDatabaseException
*/ | Use transaction to insert bulk array of object | insert | {
"repo_name": "luhonghai/LiteDB",
"path": "litedb/src/main/java/com/luhonghai/litedb/LiteBaseDao.java",
"license": "mit",
"size": 27812
} | [
"com.luhonghai.litedb.exception.LiteDatabaseException",
"java.util.Collection"
] | import com.luhonghai.litedb.exception.LiteDatabaseException; import java.util.Collection; | import com.luhonghai.litedb.exception.*; import java.util.*; | [
"com.luhonghai.litedb",
"java.util"
] | com.luhonghai.litedb; java.util; | 1,060,270 |
final void consume() {
Subscriber<? super T> s;
if ((s = subscriber) != null) { // hoist checks
subscribeOnOpen(s);
long d = demand;
for (int h = head, t = tail;;) {
int c, taken; boolean empty;
... | final void consume() { Subscriber<? super T> s; if ((s = subscriber) != null) { subscribeOnOpen(s); long d = demand; for (int h = head, t = tail;;) { int c, taken; boolean empty; if (((c = ctl) & ERROR) != 0) { closeOnError(s, null); break; } else if ((taken = takeItems(s, d, h)) > 0) { head = h += taken; d = subtractD... | /**
* Consumer loop, called from ConsumerTask, or indirectly when
* helping during submit.
*/ | Consumer loop, called from ConsumerTask, or indirectly when helping during submit | consume | {
"repo_name": "md-5/jdk10",
"path": "src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java",
"license": "gpl-2.0",
"size": 59715
} | [
"java.util.concurrent.Flow"
] | import java.util.concurrent.Flow; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,016,639 |
public SolrQuery setTerms(boolean b) {
if (b) {
this.set(TermsParams.TERMS, true);
} else {
this.remove(TermsParams.TERMS);
this.remove(TermsParams.TERMS_FIELD);
this.remove(TermsParams.TERMS_LOWER);
this.remove(TermsParams.TERMS_UPPER);
this.remove(TermsParams.TERMS_UPPER_... | SolrQuery function(boolean b) { if (b) { this.set(TermsParams.TERMS, true); } else { this.remove(TermsParams.TERMS); this.remove(TermsParams.TERMS_FIELD); this.remove(TermsParams.TERMS_LOWER); this.remove(TermsParams.TERMS_UPPER); this.remove(TermsParams.TERMS_UPPER_INCLUSIVE); this.remove(TermsParams.TERMS_LOWER_INCLU... | /** enable/disable terms.
*
* @param b flag to indicate terms should be enabled. <br /> if b==false, removes all other terms parameters
* @return Current reference (<i>this</i>)
*/ | enable/disable terms | setTerms | {
"repo_name": "visouza/solr-5.0.0",
"path": "solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java",
"license": "apache-2.0",
"size": 30920
} | [
"org.apache.solr.common.params.TermsParams"
] | import org.apache.solr.common.params.TermsParams; | import org.apache.solr.common.params.*; | [
"org.apache.solr"
] | org.apache.solr; | 1,488,989 |
public static Predicate<Warp> isViewable(final Actor actor) {
return new Predicate<Warp>() { | static Predicate<Warp> function(final Actor actor) { return new Predicate<Warp>() { | /**
* Returns a predicate that evaluates to {@code true} if the warp being tested is viewable by the given Actor.
*
* @param actor the Actor
* @return a predicate that checks if the given warp is usable by the given Actor
* @see Warp#isViewable(Actor)
*/ | Returns a predicate that evaluates to true if the warp being tested is viewable by the given Actor | isViewable | {
"repo_name": "epicbastion/MyWarp",
"path": "mywarp-core/src/main/java/me/taylorkelly/mywarp/util/WarpUtils.java",
"license": "gpl-3.0",
"size": 8251
} | [
"com.google.common.base.Predicate",
"me.taylorkelly.mywarp.Actor",
"me.taylorkelly.mywarp.warp.Warp"
] | import com.google.common.base.Predicate; import me.taylorkelly.mywarp.Actor; import me.taylorkelly.mywarp.warp.Warp; | import com.google.common.base.*; import me.taylorkelly.mywarp.*; import me.taylorkelly.mywarp.warp.*; | [
"com.google.common",
"me.taylorkelly.mywarp"
] | com.google.common; me.taylorkelly.mywarp; | 835,916 |
public void write(ByteBuffer buffer) throws IOException {
int mark = buffer.position();
int size = buffer.limit();
if(mark > size) {
throw new TransferException("Buffer position greater than limit");
}
write(buffer, 0, size - mark);
} | void function(ByteBuffer buffer) throws IOException { int mark = buffer.position(); int size = buffer.limit(); if(mark > size) { throw new TransferException(STR); } write(buffer, 0, size - mark); } | /**
* This method is used to write content to the underlying socket.
* This will make use of the <code>Producer</code> object to
* encode the response body as required. If the producer has not
* been created then this will throw an exception.
*
* @param buffer this is the buffer of bytes to sen... | This method is used to write content to the underlying socket. This will make use of the <code>Producer</code> object to encode the response body as required. If the producer has not been created then this will throw an exception | write | {
"repo_name": "ael-code/preston",
"path": "src/org/simpleframework/http/core/Transfer.java",
"license": "gpl-2.0",
"size": 11144
} | [
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 144,817 |
private void confidenceThresholdStateChanged()
{
ConfidenceThresholdState selectedConfidenceThresholdState =
this.getSelectedThreshold();
switch(selectedConfidenceThresholdState)
{
case NO_THRESHOLD:
{
this.fullThresholdSpinner.setModel... | void function() { ConfidenceThresholdState selectedConfidenceThresholdState = this.getSelectedThreshold(); switch(selectedConfidenceThresholdState) { case NO_THRESHOLD: { this.fullThresholdSpinner.setModel(new SpinnerNumberModel()); this.fullVsOneSpinner.setModel(new SpinnerNumberModel()); this.interactionSpinner.setMo... | /**
* Respond to a change in confidence threshold
*/ | Respond to a change in confidence threshold | confidenceThresholdStateChanged | {
"repo_name": "churchill-lab/j-qtl",
"path": "modules/main/src/java/org/jax/qtl/scan/gui/ScanTwoSummaryPanel.java",
"license": "gpl-3.0",
"size": 80036
} | [
"javax.swing.SpinnerNumberModel",
"org.jax.qtl.scan.ConfidenceThresholdState"
] | import javax.swing.SpinnerNumberModel; import org.jax.qtl.scan.ConfidenceThresholdState; | import javax.swing.*; import org.jax.qtl.scan.*; | [
"javax.swing",
"org.jax.qtl"
] | javax.swing; org.jax.qtl; | 90,064 |
private ConcurrentMap<GroupId, Group>
getExtraneousGroupIdTable(DeviceId deviceId) {
return extraneousGroupEntriesById.computeIfAbsent(deviceId, k -> new ConcurrentHashMap<>());
} | ConcurrentMap<GroupId, Group> function(DeviceId deviceId) { return extraneousGroupEntriesById.computeIfAbsent(deviceId, k -> new ConcurrentHashMap<>()); } | /**
* Returns the extraneous group id table for specified device.
*
* @param deviceId identifier of the device
* @return Map representing group key table of given device.
*/ | Returns the extraneous group id table for specified device | getExtraneousGroupIdTable | {
"repo_name": "oplinkoms/onos",
"path": "core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java",
"license": "apache-2.0",
"size": 72622
} | [
"java.util.concurrent.ConcurrentHashMap",
"java.util.concurrent.ConcurrentMap",
"org.onosproject.core.GroupId",
"org.onosproject.net.DeviceId",
"org.onosproject.net.group.Group"
] | import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import org.onosproject.core.GroupId; import org.onosproject.net.DeviceId; import org.onosproject.net.group.Group; | import java.util.concurrent.*; import org.onosproject.core.*; import org.onosproject.net.*; import org.onosproject.net.group.*; | [
"java.util",
"org.onosproject.core",
"org.onosproject.net"
] | java.util; org.onosproject.core; org.onosproject.net; | 834,127 |
//-------------------------------------------------------------------------
@Override
public void setServletContext(final ServletContext servletContext) {
servletContext.setAttribute(SERVLET_CONTEXT_KEY, this);
for (final ServletContextAware obj : _servletContextAware) {
obj.setServletContext(servl... | void function(final ServletContext servletContext) { servletContext.setAttribute(SERVLET_CONTEXT_KEY, this); for (final ServletContextAware obj : _servletContextAware) { obj.setServletContext(servletContext); } } | /**
* Sets the {@code ServletContext}.
*
* @param servletContext the servlet context, not null
*/ | Sets the ServletContext | setServletContext | {
"repo_name": "McLeodMoores/starling",
"path": "projects/component/src/main/java/com/opengamma/component/ComponentRepository.java",
"license": "apache-2.0",
"size": 34442
} | [
"javax.servlet.ServletContext",
"org.springframework.web.context.ServletContextAware"
] | import javax.servlet.ServletContext; import org.springframework.web.context.ServletContextAware; | import javax.servlet.*; import org.springframework.web.context.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 891,306 |
// data input
String text = JFile.read(Env.SAMPLE_DIR + "news.txt");
String date = "2014-09-26";
// model loading
StanfordNlpWrapper nlp = new StanfordNlpWrapper(Env.STANFORDNLP_CFG);
nlp.loadTimeAnnotator();
// task run
System.out.println("-XML document------------------------------------------------... | String text = JFile.read(Env.SAMPLE_DIR + STR); String date = STR; StanfordNlpWrapper nlp = new StanfordNlpWrapper(Env.STANFORDNLP_CFG); nlp.loadTimeAnnotator(); System.out.println(STR); JXml xml = new JXml(nlp.normalizeTime(text, date)); System.out.println(xml.toString()); System.out.println(STR); for (Element timex :... | /**
* Main function
*
* @param args
* @throws Exception
*/ | Main function | main | {
"repo_name": "hakchul77/irnlp_toolkit",
"path": "src/test/java/kr/jihee/irnlp_toolkit/demo/TimeExpressionNormalization.java",
"license": "gpl-2.0",
"size": 1189
} | [
"kr.jihee.irnlp_toolkit.Env",
"kr.jihee.irnlp_toolkit.nlp.StanfordNlpWrapper",
"kr.jihee.java_toolkit.io.JFile",
"kr.jihee.java_toolkit.io.JXml",
"org.w3c.dom.Element"
] | import kr.jihee.irnlp_toolkit.Env; import kr.jihee.irnlp_toolkit.nlp.StanfordNlpWrapper; import kr.jihee.java_toolkit.io.JFile; import kr.jihee.java_toolkit.io.JXml; import org.w3c.dom.Element; | import kr.jihee.irnlp_toolkit.*; import kr.jihee.irnlp_toolkit.nlp.*; import kr.jihee.java_toolkit.io.*; import org.w3c.dom.*; | [
"kr.jihee.irnlp_toolkit",
"kr.jihee.java_toolkit",
"org.w3c.dom"
] | kr.jihee.irnlp_toolkit; kr.jihee.java_toolkit; org.w3c.dom; | 838,308 |
boolean removeNode(Block b, DatanodeDescriptor node) {
BlockInfo info = blocks.get(b);
if (info == null)
return false;
// remove block from the data-node list and the node from the block info
boolean removed = node.removeBlock(info);
if (info.getDatanode(0) == null // no datanodes left... | boolean removeNode(Block b, DatanodeDescriptor node) { BlockInfo info = blocks.get(b); if (info == null) return false; boolean removed = node.removeBlock(info); if (info.getDatanode(0) == null && info.isDeleted()) { blocks.remove(b); } return removed; } | /**
* Remove data-node reference from the block.
* Remove the block from the block map
* only if it does not belong to any file and data-nodes.
*/ | Remove data-node reference from the block. Remove the block from the block map only if it does not belong to any file and data-nodes | removeNode | {
"repo_name": "wankunde/cloudera_hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java",
"license": "apache-2.0",
"size": 7584
} | [
"org.apache.hadoop.hdfs.protocol.Block"
] | import org.apache.hadoop.hdfs.protocol.Block; | import org.apache.hadoop.hdfs.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,616,239 |
public boolean nextMove(int row, int column){
//This spot has been landed on. Mark it
board[row][column] = VISITED;
//search for all next possible valid moves
ArrayList<Location> nextMovePossibilities = possibleMoves(row,column);
//no more spots to go to. tour is done
if(nextMovePossib... | boolean function(int row, int column){ board[row][column] = VISITED; ArrayList<Location> nextMovePossibilities = possibleMoves(row,column); if(nextMovePossibilities.size() == 0){ displayBoard(); System.out.println(STR); } else{ Location nextMove = findBest(nextMovePossibilities); int nextRow = nextMove.getRow(); int ne... | /**
* This method begins and produces the tour.
* First row and column start at 0, and go to 7 (for 8x8 board)
*
* @param board This is the board for the knights tour
* @param row The row of the knights current location
* @param column The column of the knights current location
* @return true if t... | This method begins and produces the tour. First row and column start at 0, and go to 7 (for 8x8 board) | nextMove | {
"repo_name": "PaulVaroutsos/Scripts-Algorithms-and-Other-Projects",
"path": "Knights Tour/KnightsTour.java",
"license": "mit",
"size": 7114
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,123,468 |
public void configure(int width, int height, Window2D sibWin) {
synchronized (this) {
if (width <= 0 || height <= 0) {
throw new RuntimeException("Invalid window size");
}
this.size = new Dimension(width, height);
changeMask |= CHANGED_SIZE;
... | void function(int width, int height, Window2D sibWin) { synchronized (this) { if (width <= 0 height <= 0) { throw new RuntimeException(STR); } this.size = new Dimension(width, height); changeMask = CHANGED_SIZE; if (sibWin != null) { app.getWindowStack().restackAbove(this, sibWin); changeMask = CHANGED_STACK; updateVie... | /**
* Change both the window size and window stacking order in the same call.
* <br><br>
* This is like performing the following:
* <br><br>
* setSize(width, height);
* <br>
* restackAbove(sibling);
* <br><br>
* The visual representations of the window are updated according... | Change both the window size and window stacking order in the same call. This is like performing the following: setSize(width, height); restackAbove(sibling); The visual representations of the window are updated accordingly | configure | {
"repo_name": "AsherBond/MondocosmOS",
"path": "wonderland/modules/foundation/appbase/src/classes/org/jdesktop/wonderland/modules/appbase/client/Window2D.java",
"license": "agpl-3.0",
"size": 77097
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,118,676 |
public void testIntegerFieldUpdaterGetAndAccumulate() {
AtomicIntegerFieldUpdater a = anIntFieldUpdater();
a.set(this, 1);
assertEquals(1, a.getAndAccumulate(this, 2, Integer::sum));
assertEquals(3, a.getAndAccumulate(this, 3, Integer::sum));
assertEquals(6, a.get(this));
... | void function() { AtomicIntegerFieldUpdater a = anIntFieldUpdater(); a.set(this, 1); assertEquals(1, a.getAndAccumulate(this, 2, Integer::sum)); assertEquals(3, a.getAndAccumulate(this, 3, Integer::sum)); assertEquals(6, a.get(this)); assertEquals(6, anIntField); } | /**
* AtomicIntegerFieldUpdater getAndAccumulate returns previous value
* and updates with supplied function.
*/ | AtomicIntegerFieldUpdater getAndAccumulate returns previous value and updates with supplied function | testIntegerFieldUpdaterGetAndAccumulate | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/Atomic8Test.java",
"license": "gpl-2.0",
"size": 24432
} | [
"java.util.concurrent.atomic.AtomicIntegerFieldUpdater"
] | import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 2,721,496 |
public void processCollection(Collection<E> collection) {
for (E element : collection) {
processElement(element);
}
} | void function(Collection<E> collection) { for (E element : collection) { processElement(element); } } | /**
* Process the collection of elements.
*
* @param collection
* Collection that should be aggregated.
*/ | Process the collection of elements | processCollection | {
"repo_name": "stefansiegl/inspectIT",
"path": "CommonsCS/src/info/novatec/inspectit/indexing/aggregation/impl/AggregationPerformer.java",
"license": "agpl-3.0",
"size": 3331
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 918,916 |
@Override
public Date getCreateDate() {
return model.getCreateDate();
} | Date function() { return model.getCreateDate(); } | /**
* Returns the create date of this qux.
*
* @return the create date of this qux
*/ | Returns the create date of this qux | getCreateDate | {
"repo_name": "gamerson/liferay-blade-samples",
"path": "maven/apps/workflow/asset/asset-api/src/main/java/com/liferay/blade/workflow/asset/model/QuxWrapper.java",
"license": "apache-2.0",
"size": 10976
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 180,634 |
public static String toStringWithTimeZone(DateTime dateTime) {
return dateTimesHelper.toStringWithTimeZone(dateTime);
}
/**
* Returns string representation of this date time with a different time
* zone, preserving the millisecond instant.
* <p>This method is useful for finding the local time in ano... | static String function(DateTime dateTime) { return dateTimesHelper.toStringWithTimeZone(dateTime); } /** * Returns string representation of this date time with a different time * zone, preserving the millisecond instant. * <p>This method is useful for finding the local time in another time zone, * especially for filter... | /**
* Returns string representation of this date time with time zone. If you need
* to convert the date time into another time zone before filtering on it,
* please use {@link #toStringForTimeZone(DateTime, String)} instead.
*
* @param dateTime the date time to stringify
* @return a string representat... | Returns string representation of this date time with time zone. If you need to convert the date time into another time zone before filtering on it, please use <code>#toStringForTimeZone(DateTime, String)</code> instead | toStringWithTimeZone | {
"repo_name": "shyTNT/googleads-java-lib",
"path": "modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/utils/v201505/DateTimes.java",
"license": "apache-2.0",
"size": 5968
} | [
"com.google.api.ads.dfp.axis.v201505.DateTime"
] | import com.google.api.ads.dfp.axis.v201505.DateTime; | import com.google.api.ads.dfp.axis.v201505.*; | [
"com.google.api"
] | com.google.api; | 34,336 |
public TunnelInfo selectOutboundTunnel(Hash destination, Hash closestTo) {
if (destination == null) return selectOutboundExploratoryTunnel(closestTo);
TunnelPool pool = _clientOutboundPools.get(destination);
if (pool != null) {
return pool.selectTunnel(closestTo);
}
... | TunnelInfo function(Hash destination, Hash closestTo) { if (destination == null) return selectOutboundExploratoryTunnel(closestTo); TunnelPool pool = _clientOutboundPools.get(destination); if (pool != null) { return pool.selectTunnel(closestTo); } return null; } | /**
* Pick the outbound tunnel with the endpoint closest to the given hash
* from the given destination's pool.
* By using this instead of the random selectTunnel(),
* we force some locality in OBEP-IBGW connections to minimize
* those connections network-wide.
*
* @param destination ... | Pick the outbound tunnel with the endpoint closest to the given hash from the given destination's pool. By using this instead of the random selectTunnel(), we force some locality in OBEP-IBGW connections to minimize those connections network-wide | selectOutboundTunnel | {
"repo_name": "oakes/Nightweb",
"path": "common/java/router/net/i2p/router/tunnel/pool/TunnelPoolManager.java",
"license": "unlicense",
"size": 26471
} | [
"net.i2p.data.Hash",
"net.i2p.router.TunnelInfo"
] | import net.i2p.data.Hash; import net.i2p.router.TunnelInfo; | import net.i2p.data.*; import net.i2p.router.*; | [
"net.i2p.data",
"net.i2p.router"
] | net.i2p.data; net.i2p.router; | 310,442 |
IMetadataEngine getMetadataEngine() throws UnsupportedException; | IMetadataEngine getMetadataEngine() throws UnsupportedException; | /**
* Get the metadata engine.
*
* @return An implementation of {@link com.stratio.crossdata.common.connector.IMetadataEngine}.
* @throws UnsupportedException If the connector does not provide this functionality.
*/ | Get the metadata engine | getMetadataEngine | {
"repo_name": "pfcoperez/crossdata",
"path": "crossdata-common/src/main/java/com/stratio/crossdata/common/connector/IConnector.java",
"license": "apache-2.0",
"size": 4370
} | [
"com.stratio.crossdata.common.exceptions.UnsupportedException"
] | import com.stratio.crossdata.common.exceptions.UnsupportedException; | import com.stratio.crossdata.common.exceptions.*; | [
"com.stratio.crossdata"
] | com.stratio.crossdata; | 2,195,113 |
RepositoryHandle createRepository(String name) throws IOException; | RepositoryHandle createRepository(String name) throws IOException; | /**
* Create a new repository on the server. The newly created RepositoryHandle will contain
* a unique project ID for the client.
* @param name repository name.
* This ID will be used to identify and maintain checkout data.
* @return handle to new repository.
* @throws DuplicateFileException
* @throws ... | Create a new repository on the server. The newly created RepositoryHandle will contain a unique project ID for the client | createRepository | {
"repo_name": "NationalSecurityAgency/ghidra",
"path": "Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/RepositoryServerHandle.java",
"license": "apache-2.0",
"size": 3812
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 576,718 |
public Text toText(Document doc, Object o) throws PageException ;
| Text function(Document doc, Object o) throws PageException ; | /**
* casts a value to a XML Text
* @param doc XML Document
* @param o Object to cast
* @return XML Text Object
* @throws PageException
*/ | casts a value to a XML Text | toText | {
"repo_name": "lucee/unoffical-Lucee-no-jre",
"path": "source/java/loader/src/lucee/runtime/util/XMLUtil.java",
"license": "lgpl-2.1",
"size": 10306
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Text"
] | import org.w3c.dom.Document; import org.w3c.dom.Text; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 405,564 |
void onPhotoTap(View view, float x, float y);
}
public static interface OnViewTapListener { | void onPhotoTap(View view, float x, float y); } public static interface OnViewTapListener { | /**
* A callback to receive where the user taps on a photo. You will only
* receive a callback if the user taps on the actual photo, tapping on
* 'whitespace' will be ignored.
*
* @param view - View the user tapped.
* @param x - where the user tapped from the of the Drawable, as
* perce... | A callback to receive where the user taps on a photo. You will only receive a callback if the user taps on the actual photo, tapping on 'whitespace' will be ignored | onPhotoTap | {
"repo_name": "haodynasty/BaseUtilsLib",
"path": "XUtilsViewLib/src/main/java/com/plusub/lib/view/photoview/PhotoViewAttacher.java",
"license": "apache-2.0",
"size": 25460
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 918,284 |
public Collection<String> queryGroup(String queryString, int maxHits)
throws ParseException, CorruptIndexException, IOException {
query = new QueryParser(Version.LUCENE_40, "group", analyzer)
.parse(queryString);
search(maxHits);
return showResults();
} | Collection<String> function(String queryString, int maxHits) throws ParseException, CorruptIndexException, IOException { query = new QueryParser(Version.LUCENE_40, "group", analyzer) .parse(queryString); search(maxHits); return showResults(); } | /**
* Step 2c: generates the group query. Executes a query.
*
* @param queryString
* the String we will search for.
* @param maxHits
* maximum number of results to get.v
* @throws ParseException
* if the index is corrupted.
* @throws CorruptIndexException
* ... | Step 2c: generates the group query. Executes a query | queryGroup | {
"repo_name": "AngelesBroullon/AnaklusmosGD-Java",
"path": "AnaklusmosWS/AnaklusmosWS/src/main/java/anaklusmos/indexSystem/SearchSystem.java",
"license": "gpl-2.0",
"size": 12574
} | [
"java.io.IOException",
"java.util.Collection",
"org.apache.lucene.index.CorruptIndexException",
"org.apache.lucene.queryparser.classic.ParseException",
"org.apache.lucene.queryparser.classic.QueryParser",
"org.apache.lucene.util.Version"
] | import java.io.IOException; import java.util.Collection; import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.queryparser.classic.ParseException; import org.apache.lucene.queryparser.classic.QueryParser; import org.apache.lucene.util.Version; | import java.io.*; import java.util.*; import org.apache.lucene.index.*; import org.apache.lucene.queryparser.classic.*; import org.apache.lucene.util.*; | [
"java.io",
"java.util",
"org.apache.lucene"
] | java.io; java.util; org.apache.lucene; | 1,934,944 |
@GET
@Path("accounts/{address}/settings")
RippleAccountSettings getAccountSettings(@PathParam("address") final String address) throws IOException, RippleException; | @Path(STR) RippleAccountSettings getAccountSettings(@PathParam(STR) final String address) throws IOException, RippleException; | /**
* Returns the account settings for this address. This is public information in the ledger (secret not needed).
*/ | Returns the account settings for this address. This is public information in the ledger (secret not needed) | getAccountSettings | {
"repo_name": "gaborkolozsy/XChange",
"path": "xchange-ripple/src/main/java/org/knowm/xchange/ripple/RipplePublic.java",
"license": "mit",
"size": 3576
} | [
"java.io.IOException",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"org.knowm.xchange.ripple.dto.RippleException",
"org.knowm.xchange.ripple.dto.account.RippleAccountSettings"
] | import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.knowm.xchange.ripple.dto.RippleException; import org.knowm.xchange.ripple.dto.account.RippleAccountSettings; | import java.io.*; import javax.ws.rs.*; import org.knowm.xchange.ripple.dto.*; import org.knowm.xchange.ripple.dto.account.*; | [
"java.io",
"javax.ws",
"org.knowm.xchange"
] | java.io; javax.ws; org.knowm.xchange; | 58,460 |
public static <Request extends ActionRequest, Response extends ActionResponse> void executeAsyncWithOrigin(
ThreadContext threadContext, String origin, Request request, ActionListener<Response> listener,
BiConsumer<Request, ActionListener<Response>> consumer) {
final Supplier<ThreadC... | static <Request extends ActionRequest, Response extends ActionResponse> void function( ThreadContext threadContext, String origin, Request request, ActionListener<Response> listener, BiConsumer<Request, ActionListener<Response>> consumer) { final Supplier<ThreadContext.StoredContext> supplier = threadContext.newRestora... | /**
* Executes a consumer after setting the origin and wrapping the listener so that the proper context is restored
*/ | Executes a consumer after setting the origin and wrapping the listener so that the proper context is restored | executeAsyncWithOrigin | {
"repo_name": "gfyoung/elasticsearch",
"path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ClientHelper.java",
"license": "apache-2.0",
"size": 9081
} | [
"java.util.function.BiConsumer",
"java.util.function.Supplier",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.action.ActionRequest",
"org.elasticsearch.action.ActionResponse",
"org.elasticsearch.action.support.ContextPreservingActionListener",
"org.elasticsearch.common.util.concurrent.Th... | import java.util.function.BiConsumer; import java.util.function.Supplier; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.support.ContextPreservingActionListener; import org.elasticsearch.commo... | import java.util.function.*; import org.elasticsearch.action.*; import org.elasticsearch.action.support.*; import org.elasticsearch.common.util.concurrent.*; | [
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.common"
] | java.util; org.elasticsearch.action; org.elasticsearch.common; | 2,663,502 |
private void validateInputs(FunctionLibrary functionLibrary) throws FunctionLibraryManagementException {
if (StringUtils.isBlank(functionLibrary.getFunctionLibraryName())) {
throw FunctionLibraryExceptionManagementUtil.handleClientException(
FunctionLibraryManagementConstant... | void function(FunctionLibrary functionLibrary) throws FunctionLibraryManagementException { if (StringUtils.isBlank(functionLibrary.getFunctionLibraryName())) { throw FunctionLibraryExceptionManagementUtil.handleClientException( FunctionLibraryManagementConstants.ErrorMessage.ERROR_CODE_REQUIRE_SCRIPT_LIBRARY_NAME); } e... | /**
* Check for required attributes.
*
* @param functionLibrary Function library
* @throws FunctionLibraryManagementException
*/ | Check for required attributes | validateInputs | {
"repo_name": "omindu/carbon-identity-framework",
"path": "components/functions-library-mgt/org.wso2.carbon.identity.functions.library.mgt/src/main/java/org/wso2/carbon/identity/functions/library/mgt/FunctionLibraryManagementServiceImpl.java",
"license": "apache-2.0",
"size": 8330
} | [
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.identity.functions.library.mgt.exception.FunctionLibraryManagementException",
"org.wso2.carbon.identity.functions.library.mgt.model.FunctionLibrary",
"org.wso2.carbon.identity.functions.library.mgt.util.FunctionLibraryExceptionManagementUtil",
"org.wso... | import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.functions.library.mgt.exception.FunctionLibraryManagementException; import org.wso2.carbon.identity.functions.library.mgt.model.FunctionLibrary; import org.wso2.carbon.identity.functions.library.mgt.util.FunctionLibraryExceptionManagementUtil; ... | import org.apache.commons.lang.*; import org.wso2.carbon.identity.functions.library.mgt.exception.*; import org.wso2.carbon.identity.functions.library.mgt.model.*; import org.wso2.carbon.identity.functions.library.mgt.util.*; | [
"org.apache.commons",
"org.wso2.carbon"
] | org.apache.commons; org.wso2.carbon; | 816,637 |
public void setCustomerRequest(gov.nih.nci.calims2.domain.administration.customerservice.CustomerRequest customerRequest) {
this.customerRequest = customerRequest;
}
private gov.nih.nci.calims2.domain.workflow.ExperimentalResult experimentalResult;
... | void function(gov.nih.nci.calims2.domain.administration.customerservice.CustomerRequest customerRequest) { this.customerRequest = customerRequest; } private gov.nih.nci.calims2.domain.workflow.ExperimentalResult experimentalResult; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = STR) @org.hibernate.annotations.Fo... | /**
* Sets the value of customerRequest attribute.
* @param customerRequest .
**/ | Sets the value of customerRequest attribute | setCustomerRequest | {
"repo_name": "NCIP/calims",
"path": "calims2-model/src/java/gov/nih/nci/calims2/domain/workflow/Approval.java",
"license": "bsd-3-clause",
"size": 12565
} | [
"javax.persistence.FetchType",
"javax.persistence.JoinColumn",
"javax.persistence.ManyToOne",
"org.hibernate.annotations.ForeignKey"
] | import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import org.hibernate.annotations.ForeignKey; | import javax.persistence.*; import org.hibernate.annotations.*; | [
"javax.persistence",
"org.hibernate.annotations"
] | javax.persistence; org.hibernate.annotations; | 10,545 |
public void preGet(final RegionCoprocessorEnvironment e, final Get get,
final List<KeyValue> result)
throws IOException; | void function(final RegionCoprocessorEnvironment e, final Get get, final List<KeyValue> result) throws IOException; | /**
* Called before the client performs a Get
* <p>
* Call CoprocessorEnvironment#bypass to skip default actions
* <p>
* Call CoprocessorEnvironment#complete to skip any subsequent chained
* coprocessors
* @param e the environment provided by the region server
* @param get the Get request
* @... | Called before the client performs a Get Call CoprocessorEnvironment#bypass to skip default actions Call CoprocessorEnvironment#complete to skip any subsequent chained coprocessors | preGet | {
"repo_name": "centiteo/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java",
"license": "apache-2.0",
"size": 20383
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.client.Get"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Get; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,564,964 |
public static <T> ObjectName registerMBean(MBeanServer mbeanSrv, ObjectName name, T impl, Class<T> itf)
throws JMException {
assert mbeanSrv != null;
assert name != null;
assert itf != null;
DynamicMBean mbean = new IgniteStandardMXBean(impl, itf);
mbean.getMBeanInf... | static <T> ObjectName function(MBeanServer mbeanSrv, ObjectName name, T impl, Class<T> itf) throws JMException { assert mbeanSrv != null; assert name != null; assert itf != null; DynamicMBean mbean = new IgniteStandardMXBean(impl, itf); mbean.getMBeanInfo(); return mbeanSrv.registerMBean(mbean, name).getObjectName(); } | /**
* Registers MBean with the server.
*
* @param <T> Type of mbean.
* @param mbeanSrv MBean server.
* @param name MBean object name.
* @param impl MBean implementation.
* @param itf MBean interface.
* @return JMX object name.
* @throws JMException If MBean creation failed.
... | Registers MBean with the server | registerMBean | {
"repo_name": "pperalta/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 314980
} | [
"javax.management.DynamicMBean",
"javax.management.JMException",
"javax.management.MBeanServer",
"javax.management.ObjectName",
"org.apache.ignite.internal.mxbean.IgniteStandardMXBean"
] | import javax.management.DynamicMBean; import javax.management.JMException; import javax.management.MBeanServer; import javax.management.ObjectName; import org.apache.ignite.internal.mxbean.IgniteStandardMXBean; | import javax.management.*; import org.apache.ignite.internal.mxbean.*; | [
"javax.management",
"org.apache.ignite"
] | javax.management; org.apache.ignite; | 1,151,791 |
protected void addChild(RtfElement e)
throws RtfStructureException {
if (isClosed()) {
// No childs should be added to a container that has been closed
final StringBuffer sb = new StringBuffer();
sb.append("addChild: container already closed (parent=");
sb... | void function(RtfElement e) throws RtfStructureException { if (isClosed()) { final StringBuffer sb = new StringBuffer(); sb.append(STR); sb.append(this.getClass().getName()); sb.append(STR); sb.append(e.getClass().getName()); sb.append(")"); final String msg = sb.toString(); final RtfFile rf = getRtfFile(); } children.... | /**
* add a child element to this
* @param e child element to add
* @throws RtfStructureException for trying to add an invalid child (??)
*/ | add a child element to this | addChild | {
"repo_name": "spepping/fop-cs",
"path": "src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfContainer.java",
"license": "apache-2.0",
"size": 6353
} | [
"org.apache.fop.render.rtf.rtflib.exceptions.RtfStructureException"
] | import org.apache.fop.render.rtf.rtflib.exceptions.RtfStructureException; | import org.apache.fop.render.rtf.rtflib.exceptions.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,037,788 |
public JobEntryCopy[] getAllJobGraphEntries( String name ) {
int count = 0;
for ( int i = 0; i < nrJobEntries(); i++ ) {
JobEntryCopy je = getJobEntry( i );
if ( je.getName().equalsIgnoreCase( name ) ) {
count++;
}
}
JobEntryCopy[] retval = new JobEntryCopy[count];
count... | JobEntryCopy[] function( String name ) { int count = 0; for ( int i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy je = getJobEntry( i ); if ( je.getName().equalsIgnoreCase( name ) ) { count++; } } JobEntryCopy[] retval = new JobEntryCopy[count]; count = 0; for ( int i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy je = ... | /**
* Gets the all job graph entries.
*
* @param name
* the name
* @return the all job graph entries
*/ | Gets the all job graph entries | getAllJobGraphEntries | {
"repo_name": "ma459006574/pentaho-kettle",
"path": "engine/src/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 85011
} | [
"org.pentaho.di.job.entry.JobEntryCopy"
] | import org.pentaho.di.job.entry.JobEntryCopy; | import org.pentaho.di.job.entry.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 6,046 |
public static JSTypeReconserializer create(
JSTypeRegistry registry,
InvalidatingTypes invalidatingTypes,
StringPool.Builder stringPoolBuilder,
Predicate<String> shouldPropagatePropertyName,
SerializationOptions serializationMode) {
JSTypeReconserializer serializer =
new JSTy... | static JSTypeReconserializer function( JSTypeRegistry registry, InvalidatingTypes invalidatingTypes, StringPool.Builder stringPoolBuilder, Predicate<String> shouldPropagatePropertyName, SerializationOptions serializationMode) { JSTypeReconserializer serializer = new JSTypeReconserializer( registry, invalidatingTypes, s... | /**
* Initializes a JSTypeReconserializer
*
* @param shouldPropagatePropertyName decide whether a property present on some ObjectType should
* actually be serialized. Used to avoid serializing properties that won't impact
* optimizations (because they aren't present in the AST)
*/ | Initializes a JSTypeReconserializer | create | {
"repo_name": "GoogleChromeLabs/chromeos_smart_card_connector",
"path": "third_party/closure-compiler/src/src/com/google/javascript/jscomp/serialization/JSTypeReconserializer.java",
"license": "apache-2.0",
"size": 21788
} | [
"com.google.javascript.jscomp.InvalidatingTypes",
"com.google.javascript.rhino.jstype.JSTypeRegistry",
"java.util.function.Predicate"
] | import com.google.javascript.jscomp.InvalidatingTypes; import com.google.javascript.rhino.jstype.JSTypeRegistry; import java.util.function.Predicate; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.jstype.*; import java.util.function.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 1,938,817 |
//If quantity == 0, then
if(stock.getQuantityOfShares() > 0){
setQuantityOfShares(stock.getQuantityOfShares());
setPrinciple(stock.getPrinciple());
setTotalValue(stock.getTotalValue());
setNet(stock.getNet());
}
else{
principle = new BigDecimal(0);
totalValue = new BigDecimal(0);
net = new... | if(stock.getQuantityOfShares() > 0){ setQuantityOfShares(stock.getQuantityOfShares()); setPrinciple(stock.getPrinciple()); setTotalValue(stock.getTotalValue()); setNet(stock.getNet()); } else{ principle = new BigDecimal(0); totalValue = new BigDecimal(0); net = new BigDecimal(0); } } | /**
* Stock copying method. The values of the stock
* parameter, if there are any, will be set to
* this class.
*
* @param stock the stock to be copied.
*/ | Stock copying method. The values of the stock parameter, if there are any, will be set to this class | copyStock | {
"repo_name": "craigmiller160/StockMarket-2.0",
"path": "src/main/java/io/craigmiller160/stockmarket/stock/DefaultOwnedStock.java",
"license": "apache-2.0",
"size": 16939
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 221,172 |
@Test
public void testCreateTableWithQualifiedColumns() throws IOException {
final HBaseCreateTableBuilder hBaseCreateTableBuilder = (HBaseCreateTableBuilder) getUpdateCallback()
.createTable(getSchema(), TABLE_NAME);
hBaseCreateTableBuilder.withColumn(CF_FOO + ":" + Q_BAH);
... | void function() throws IOException { final HBaseCreateTableBuilder hBaseCreateTableBuilder = (HBaseCreateTableBuilder) getUpdateCallback() .createTable(getSchema(), TABLE_NAME); hBaseCreateTableBuilder.withColumn(CF_FOO + ":" + Q_BAH); hBaseCreateTableBuilder.withColumn(CF_FOO + ":" + Q_HELLO); hBaseCreateTableBuilder.... | /**
* Goodflow. Create a table including the ID-Column (columnFamilies not in constructor), should work
*
* @throws IOException
*/ | Goodflow. Create a table including the ID-Column (columnFamilies not in constructor), should work | testCreateTableWithQualifiedColumns | {
"repo_name": "apache/metamodel",
"path": "hbase/src/test/java/org/apache/metamodel/hbase/CreateTableTest.java",
"license": "apache-2.0",
"size": 7343
} | [
"java.io.IOException",
"org.apache.metamodel.schema.Table",
"org.junit.Assert"
] | import java.io.IOException; import org.apache.metamodel.schema.Table; import org.junit.Assert; | import java.io.*; import org.apache.metamodel.schema.*; import org.junit.*; | [
"java.io",
"org.apache.metamodel",
"org.junit"
] | java.io; org.apache.metamodel; org.junit; | 1,248,638 |
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processPdf(request, response);
} | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processPdf(request, response); } | /**
* Processes a GET request.
*
* @param request the request.
* @param response the response.
*
* @throws ServletException if there is a servlet related problem.
* @throws IOException if there is an I/O problem.
*/ | Processes a GET request | doGet | {
"repo_name": "jaffa-projects/jaffa-framework",
"path": "jaffa-components-printing/source/java/org/jaffa/modules/printing/components/formselectionmaintenance/ui/ShowPdfServlet.java",
"license": "gpl-3.0",
"size": 5170
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 5,648 |
@Override
public void appendRow(GridRow row) {
checkSimulation();
super.appendRow(row);
int rowIndex = getRowCount() - 1;
commonAddRow(rowIndex);
} | void function(GridRow row) { checkSimulation(); super.appendRow(row); int rowIndex = getRowCount() - 1; commonAddRow(rowIndex); } | /**
* This method <i>append</i> a new row to the grid <b>and</b> to the underlying model
* @param row
*/ | This method append a new row to the grid and to the underlying model | appendRow | {
"repo_name": "droolsjbpm/drools-wb",
"path": "drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-client/src/main/java/org/drools/workbench/screens/scenariosimulation/client/models/AbstractScesimGridModel.java",
"license": "apache-2.0",
"size": 56256
} | [
"org.uberfire.ext.wires.core.grids.client.model.GridRow"
] | import org.uberfire.ext.wires.core.grids.client.model.GridRow; | import org.uberfire.ext.wires.core.grids.client.model.*; | [
"org.uberfire.ext"
] | org.uberfire.ext; | 963,225 |
Activator instance = Activator.getDefault();
return instance == null ? null : instance.getModuleManager();
}
| Activator instance = Activator.getDefault(); return instance == null ? null : instance.getModuleManager(); } | /**
* The core {@link ModuleManager} instance.
*
* @return the core module manager, or null if this bundle is not activated
*/ | The core <code>ModuleManager</code> instance | getModuleManager | {
"repo_name": "nagyist/marketcetera",
"path": "trunk/photon/plugins/org.marketcetera.photon.module/src/main/java/org/marketcetera/photon/module/ModuleSupport.java",
"license": "apache-2.0",
"size": 2641
} | [
"org.marketcetera.photon.internal.module.Activator"
] | import org.marketcetera.photon.internal.module.Activator; | import org.marketcetera.photon.internal.module.*; | [
"org.marketcetera.photon"
] | org.marketcetera.photon; | 1,251,163 |
return new ValidEnum(enumClass, excludes);
}
private ValidEnum(Class<?> enumClass, String... excludes) {
Preconditions.checkNotNull(enumClass, "enumClass cannot be null");
Preconditions.checkState(enumClass.isEnum(), "enumClass must be an enum.");
Set<String> validEnums = new LinkedHashSet<>();
for... | return new ValidEnum(enumClass, excludes); } private ValidEnum(Class<?> enumClass, String... excludes) { Preconditions.checkNotNull(enumClass, STR); Preconditions.checkState(enumClass.isEnum(), STR); Set<String> validEnums = new LinkedHashSet<>(); for (Object o : enumClass.getEnumConstants()) { String key = o.toString(... | /**
* Method is used to create a new INSTANCE of the enum validator.
*
* @param enumClass Enum class with the entries to validate for.
* @param excludes Enum entries to exclude from the validator.
* @return ValidEnum
* @see com.github.jcustenborder.kafka.connect.utils.config.validators.Validators#val... | Method is used to create a new INSTANCE of the enum validator | of | {
"repo_name": "jcustenborder/connect-utils",
"path": "connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ValidEnum.java",
"license": "apache-2.0",
"size": 3097
} | [
"com.google.common.base.Preconditions",
"java.util.Arrays",
"java.util.LinkedHashSet",
"java.util.Set"
] | import com.google.common.base.Preconditions; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,650,991 |
FileInfo getNewImageInfo(VitroRequest vreq) throws UserMistakeException {
FileInfo fileInfo = TempFileHolder.remove(vreq.getSession(),
ATTRIBUTE_TEMP_FILE);
if (fileInfo == null) {
throw new UserMistakeException(ERROR_CODE_NO_IMAGE_TO_CROP);
}
return fileInfo;
} | FileInfo getNewImageInfo(VitroRequest vreq) throws UserMistakeException { FileInfo fileInfo = TempFileHolder.remove(vreq.getSession(), ATTRIBUTE_TEMP_FILE); if (fileInfo == null) { throw new UserMistakeException(ERROR_CODE_NO_IMAGE_TO_CROP); } return fileInfo; } | /**
* Get the info for the new image, from where we stored it in the session.
*
* @throws UserMistakeException
* if it isn't there.
*/ | Get the info for the new image, from where we stored it in the session | getNewImageInfo | {
"repo_name": "vivo-project/Vitro",
"path": "api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/freemarker/ImageUploadHelper.java",
"license": "bsd-3-clause",
"size": 12205
} | [
"edu.cornell.mannlib.vitro.webapp.controller.VitroRequest",
"edu.cornell.mannlib.vitro.webapp.controller.freemarker.ImageUploadController",
"edu.cornell.mannlib.vitro.webapp.filestorage.TempFileHolder",
"edu.cornell.mannlib.vitro.webapp.filestorage.model.FileInfo"
] | import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.controller.freemarker.ImageUploadController; import edu.cornell.mannlib.vitro.webapp.filestorage.TempFileHolder; import edu.cornell.mannlib.vitro.webapp.filestorage.model.FileInfo; | import edu.cornell.mannlib.vitro.webapp.controller.*; import edu.cornell.mannlib.vitro.webapp.controller.freemarker.*; import edu.cornell.mannlib.vitro.webapp.filestorage.*; import edu.cornell.mannlib.vitro.webapp.filestorage.model.*; | [
"edu.cornell.mannlib"
] | edu.cornell.mannlib; | 2,500,205 |
public static Constructor constructor(String className, List<String> parameterTypes) {
return new Constructor(className, parameterTypes);
} | static Constructor function(String className, List<String> parameterTypes) { return new Constructor(className, parameterTypes); } | /**
* Matches a constructor with the given class name and parameter types.
*/ | Matches a constructor with the given class name and parameter types | constructor | {
"repo_name": "diy1/error-prone-aspirator",
"path": "core/src/main/java/com/google/errorprone/matchers/Matchers.java",
"license": "apache-2.0",
"size": 31854
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 467,016 |
Network createMultiRegionNetwork() {
Parameters p = NetworkDemoHarness.getParameters();
p = p.union(NetworkDemoHarness.getNetworkDemoTestEncoderParams());
return Network.create("Network API Demo", p)
.add(Network.createRegion("Region 1")
.add(Network.crea... | Network createMultiRegionNetwork() { Parameters p = NetworkDemoHarness.getParameters(); p = p.union(NetworkDemoHarness.getNetworkDemoTestEncoderParams()); return Network.create(STR, p) .add(Network.createRegion(STR) .add(Network.createLayer(STR, p) .alterParameter(KEY.AUTO_CLASSIFY, Boolean.TRUE) .add(Anomaly.create())... | /**
* Creates a {@link Network} containing 2 {@link Region}s with multiple
* {@link Layer}s in each.
*
* @return a multi-region Network
*/ | Creates a <code>Network</code> containing 2 <code>Region</code>s with multiple <code>Layer</code>s in each | createMultiRegionNetwork | {
"repo_name": "clumsy/htm.java",
"path": "src/main/java/org/numenta/nupic/examples/napi/NetworkAPIDemo.java",
"license": "gpl-3.0",
"size": 10088
} | [
"org.numenta.nupic.Parameters",
"org.numenta.nupic.algorithms.Anomaly",
"org.numenta.nupic.network.Network",
"org.numenta.nupic.network.sensor.FileSensor",
"org.numenta.nupic.network.sensor.Sensor",
"org.numenta.nupic.network.sensor.SensorParams",
"org.numenta.nupic.research.SpatialPooler",
"org.numen... | import org.numenta.nupic.Parameters; import org.numenta.nupic.algorithms.Anomaly; import org.numenta.nupic.network.Network; import org.numenta.nupic.network.sensor.FileSensor; import org.numenta.nupic.network.sensor.Sensor; import org.numenta.nupic.network.sensor.SensorParams; import org.numenta.nupic.research.SpatialP... | import org.numenta.nupic.*; import org.numenta.nupic.algorithms.*; import org.numenta.nupic.network.*; import org.numenta.nupic.network.sensor.*; import org.numenta.nupic.research.*; | [
"org.numenta.nupic"
] | org.numenta.nupic; | 349,220 |
public void observeSelectionState(PERTChartSelectionState selection)
{
chartSelectionState = selection;
visPanel.observeSelectionState(chartSelectionState);
scrollBar.observeSelectionState(chartSelectionState); | void function(PERTChartSelectionState selection) { chartSelectionState = selection; visPanel.observeSelectionState(chartSelectionState); scrollBar.observeSelectionState(chartSelectionState); | /**
* Associate this view with a PERTChartSelectionState so that, when a new
* operator is selected, this view adds the operator info to the
* operatorInfoPanel.
*
* @param selection
*/ | Associate this view with a PERTChartSelectionState so that, when a new operator is selected, this view adds the operator info to the operatorInfoPanel | observeSelectionState | {
"repo_name": "cogtool/cogtool",
"path": "java/edu/cmu/cs/hcii/cogtool/view/PERTChartPanel.java",
"license": "lgpl-2.1",
"size": 21534
} | [
"edu.cmu.cs.hcii.cogtool.ui.PERTChartSelectionState"
] | import edu.cmu.cs.hcii.cogtool.ui.PERTChartSelectionState; | import edu.cmu.cs.hcii.cogtool.ui.*; | [
"edu.cmu.cs"
] | edu.cmu.cs; | 673,351 |
@Override
protected String getRelativePath(HttpServletRequest request) {
return getRelativePath(request, false);
}
| String function(HttpServletRequest request) { return getRelativePath(request, false); } | /**
* Override the DefaultServlet implementation and only use the PathInfo. If
* the ServletPath is non-null, it will be because the WebDAV servlet has
* been mapped to a url other than /* to configure editing at different url
* than normal viewing.
*
* @param request The servlet req... | Override the DefaultServlet implementation and only use the PathInfo. If the ServletPath is non-null, it will be because the WebDAV servlet has been mapped to a url other than /* to configure editing at different url than normal viewing | getRelativePath | {
"repo_name": "IAMTJW/Tomcat-8.5.20",
"path": "tomcat-8.5.20/java/org/apache/catalina/servlets/WebdavServlet.java",
"license": "apache-2.0",
"size": 101838
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,952,323 |
void addAllToBag(ObjectStoreBag osb,
Collection<Integer> coll) throws ObjectStoreException; | void addAllToBag(ObjectStoreBag osb, Collection<Integer> coll) throws ObjectStoreException; | /**
* Adds a collection of elements to an ObjectStoreBag.
*
* @param osb an ObjectStoreBag
* @param coll a Collection of Integers
* @throws ObjectStoreException if an error occurs
*/ | Adds a collection of elements to an ObjectStoreBag | addAllToBag | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/objectstore/main/src/org/intermine/objectstore/ObjectStoreWriter.java",
"license": "lgpl-2.1",
"size": 8152
} | [
"java.util.Collection",
"org.intermine.objectstore.query.ObjectStoreBag"
] | import java.util.Collection; import org.intermine.objectstore.query.ObjectStoreBag; | import java.util.*; import org.intermine.objectstore.query.*; | [
"java.util",
"org.intermine.objectstore"
] | java.util; org.intermine.objectstore; | 2,162,093 |
public static ims.coe.assessment.domain.objects.CommunicationSpeechAndLanguageUnderstanding extractCommunicationSpeechAndLanguageUnderstanding(ims.domain.ILightweightDomainFactory domainFactory, ims.coe.vo.CommunicationUnderstanding valueObject)
{
return extractCommunicationSpeechAndLanguageUnderstanding(doma... | static ims.coe.assessment.domain.objects.CommunicationSpeechAndLanguageUnderstanding function(ims.domain.ILightweightDomainFactory domainFactory, ims.coe.vo.CommunicationUnderstanding valueObject) { return extractCommunicationSpeechAndLanguageUnderstanding(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractCommunicationSpeechAndLanguageUnderstanding | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/coe/vo/domain/CommunicationUnderstandingAssembler.java",
"license": "agpl-3.0",
"size": 21253
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,593,721 |
public void setDefaultUseCaches(boolean newValue) {
if (connected) {
throw new IllegalAccessError(Messages.getString("luni.5E")); //$NON-NLS-1$
}
defaultUseCaches = newValue;
}
| void function(boolean newValue) { if (connected) { throw new IllegalAccessError(Messages.getString(STR)); } defaultUseCaches = newValue; } | /**
* Sets the default value for the flag indicating whether this connection
* allows to use caches. Existing {@code URLConnection}s are unaffected.
*
* @param newValue
* the default value of the flag to be used for new connections.
* @see #defaultUseCaches
* @see #... | Sets the default value for the flag indicating whether this connection allows to use caches. Existing URLConnections are unaffected | setDefaultUseCaches | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/luni/src/main/java/java/net/URLConnection.java",
"license": "gpl-2.0",
"size": 39856
} | [
"org.apache.harmony.luni.internal.nls.Messages"
] | import org.apache.harmony.luni.internal.nls.Messages; | import org.apache.harmony.luni.internal.nls.*; | [
"org.apache.harmony"
] | org.apache.harmony; | 1,501,200 |
@Test
public void testGetWithPermissionsUnprivilegedUser() {
List<VDSGroup> result = dao.getAll(UNPRIVILEGED_USER_ID, true);
assertNotNull(result);
assertTrue(result.isEmpty());
} | void function() { List<VDSGroup> result = dao.getAll(UNPRIVILEGED_USER_ID, true); assertNotNull(result); assertTrue(result.isEmpty()); } | /**
* Ensures that no VDS group is retrieved for an unprivileged user with filtering enabled.
*/ | Ensures that no VDS group is retrieved for an unprivileged user with filtering enabled | testGetWithPermissionsUnprivilegedUser | {
"repo_name": "derekhiggins/ovirt-engine",
"path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VdsGroupDAOTest.java",
"license": "apache-2.0",
"size": 9506
} | [
"java.util.List",
"org.junit.Assert",
"org.ovirt.engine.core.common.businessentities.VDSGroup"
] | import java.util.List; import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.VDSGroup; | import java.util.*; import org.junit.*; import org.ovirt.engine.core.common.businessentities.*; | [
"java.util",
"org.junit",
"org.ovirt.engine"
] | java.util; org.junit; org.ovirt.engine; | 1,458,571 |
@ModelNodeBinding(detypedName = "autoflush")
public Boolean autoflush() {
return this.autoflush;
} | @ModelNodeBinding(detypedName = STR) Boolean function() { return this.autoflush; } | /**
* Automatically flush after each write.
*/ | Automatically flush after each write | autoflush | {
"repo_name": "wildfly-swarm/wildfly-config-api",
"path": "generator/src/test/java/org/wildfly/apigen/test/invocation/logging/subsystem/sizeRotatingFileHandler/SizeRotatingFileHandler.java",
"license": "apache-2.0",
"size": 6969
} | [
"org.wildfly.swarm.config.runtime.ModelNodeBinding"
] | import org.wildfly.swarm.config.runtime.ModelNodeBinding; | import org.wildfly.swarm.config.runtime.*; | [
"org.wildfly.swarm"
] | org.wildfly.swarm; | 373,189 |
public ListMultimap<String, ? extends TransitiveInfoCollection> getConfiguredTargetMap() {
return Multimaps.transformValues(targetMap, ConfiguredTargetAndData::getConfiguredTarget);
} | ListMultimap<String, ? extends TransitiveInfoCollection> function() { return Multimaps.transformValues(targetMap, ConfiguredTargetAndData::getConfiguredTarget); } | /**
* Returns an immutable map from attribute name to list of configured targets for that attribute.
*/ | Returns an immutable map from attribute name to list of configured targets for that attribute | getConfiguredTargetMap | {
"repo_name": "ButterflyNetwork/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java",
"license": "apache-2.0",
"size": 82210
} | [
"com.google.common.collect.ListMultimap",
"com.google.common.collect.Multimaps",
"com.google.devtools.build.lib.skyframe.ConfiguredTargetAndData"
] | import com.google.common.collect.ListMultimap; import com.google.common.collect.Multimaps; import com.google.devtools.build.lib.skyframe.ConfiguredTargetAndData; | import com.google.common.collect.*; import com.google.devtools.build.lib.skyframe.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 19,534 |
public void assertAttrContains(String cssq, String attr, String value) {
Elements elem = doc.select(cssq);
if (elem != null) {
String attribute = elem.attr(attr);
if (attribute != null)
assertThat(attribute, CoreMatchers.containsString(value));
else
fail("cannot find attribute " + attr + " in " ... | void function(String cssq, String attr, String value) { Elements elem = doc.select(cssq); if (elem != null) { String attribute = elem.attr(attr); if (attribute != null) assertThat(attribute, CoreMatchers.containsString(value)); else fail(STR + attr + STR + cssq); } else fail(STR + cssq); } | /**
* Check the attribute of the node, selected with "css" query, contains the
* expected value
*
*
* of the selected node.
*
* @param cssq
* @param html
*/ | Check the attribute of the node, selected with "css" query, contains the expected value of the selected node | assertAttrContains | {
"repo_name": "agilesites/agilesites2-lib",
"path": "api/src/main/java/wcs/java/util/TestElement.java",
"license": "mit",
"size": 6966
} | [
"org.hamcrest.CoreMatchers",
"org.jsoup.select.Elements",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.jsoup.select.Elements; import org.junit.Assert; | import org.hamcrest.*; import org.jsoup.select.*; import org.junit.*; | [
"org.hamcrest",
"org.jsoup.select",
"org.junit"
] | org.hamcrest; org.jsoup.select; org.junit; | 542,813 |
@SuppressWarnings("static-method")
@Test
public void testSetScore() {
final int recordId = 1;
final int termFrequency = 3;
double score = 5;
final Posting posting = new Posting(recordId, termFrequency, score);
Assert.assertEquals(score, posting.getScore(), 0);
score += 2;
As... | @SuppressWarnings(STR) void function() { final int recordId = 1; final int termFrequency = 3; double score = 5; final Posting posting = new Posting(recordId, termFrequency, score); Assert.assertEquals(score, posting.getScore(), 0); score += 2; Assert.assertFalse(score == posting.getScore()); posting.setScore(score); As... | /**
* Test method for {@link Posting#setScore(double)}.
*/ | Test method for <code>Posting#setScore(double)</code> | testSetScore | {
"repo_name": "ZabuzaW/LexiSearch",
"path": "test/de/zabuza/lexisearch/indexing/PostingTest.java",
"license": "gpl-3.0",
"size": 8020
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 912,781 |
protected boolean processFormSubmitError(AjaxRequestTarget target)
{
return false;
} | boolean function(AjaxRequestTarget target) { return false; } | /**
* Process form submit error (validation)
* @param target
*/ | Process form submit error (validation) | processFormSubmitError | {
"repo_name": "momogentoo/ehour",
"path": "eHour-wicketweb/src/main/java/net/rrm/ehour/ui/common/panel/AbstractFormSubmittingPanel.java",
"license": "gpl-2.0",
"size": 3144
} | [
"org.apache.wicket.ajax.AjaxRequestTarget"
] | import org.apache.wicket.ajax.AjaxRequestTarget; | import org.apache.wicket.ajax.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,112,741 |
public String toStringPrettyValues(int containerIndex, Set<String> excludeGroups) throws MaltChainedException {
int reservedSpaceForOptionName = 30;
OptionGroup.toStringSetting = OptionGroup.WITHGROUPNAME;
StringBuilder sb = new StringBuilder();
if (containerIndex == OptionManager.DEFAULTVALUE) {
for... | String function(int containerIndex, Set<String> excludeGroups) throws MaltChainedException { int reservedSpaceForOptionName = 30; OptionGroup.toStringSetting = OptionGroup.WITHGROUPNAME; StringBuilder sb = new StringBuilder(); if (containerIndex == OptionManager.DEFAULTVALUE) { for (String groupname : optionDescription... | /**
* Returns a string representation of all option value, except the options in a option group specified
* by the excludeGroup argument.
*
* @param containerIndex The index of the option container (0..n and -1 is default values).
* @param excludeGroups a set of option group names that should by exclud... | Returns a string representation of all option value, except the options in a option group specified by the excludeGroup argument | toStringPrettyValues | {
"repo_name": "runelk/maltnob",
"path": "tools/maltparser-1.8.1/src/org/maltparser/core/options/OptionManager.java",
"license": "mit",
"size": 23342
} | [
"java.util.Formatter",
"java.util.Set",
"org.maltparser.core.exception.MaltChainedException",
"org.maltparser.core.options.option.Option"
] | import java.util.Formatter; import java.util.Set; import org.maltparser.core.exception.MaltChainedException; import org.maltparser.core.options.option.Option; | import java.util.*; import org.maltparser.core.exception.*; import org.maltparser.core.options.option.*; | [
"java.util",
"org.maltparser.core"
] | java.util; org.maltparser.core; | 846,611 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.