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 removeAll(Iterator<?> iterator) {
while (iterator.hasNext()) {
iterator.next();
iterator.remove();
}
} | static void function(Iterator<?> iterator) { while (iterator.hasNext()) { iterator.next(); iterator.remove(); } } | /**
* Removes all elements of the given iterator.
*
* @param iterator the input iterator.
*/ | Removes all elements of the given iterator | removeAll | {
"repo_name": "hannoman/xxl",
"path": "src/xxl/core/cursors/Cursors.java",
"license": "lgpl-3.0",
"size": 46425
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,796,689 |
@Test
public void testAddToSlotOneMarked() {
final Player frodo = PlayerTestHelper.createPlayer("frodo");
final WeddingRing ring = (WeddingRing) SingletonRepository.getEntityManager().getItem("wedding ring");
final WeddingRing ring2 = (WeddingRing) SingletonRepository.getEntityManager().getItem("wedding ring"... | void function() { final Player frodo = PlayerTestHelper.createPlayer("frodo"); final WeddingRing ring = (WeddingRing) SingletonRepository.getEntityManager().getItem(STR); final WeddingRing ring2 = (WeddingRing) SingletonRepository.getEntityManager().getItem(STR); ring.setBoundTo("frodo"); frodo.equip("bag", ring); frod... | /**
* Tests for addToSlotOneMarked.
*/ | Tests for addToSlotOneMarked | testAddToSlotOneMarked | {
"repo_name": "markuskeunecke/stendhal",
"path": "tests/games/stendhal/server/entity/item/WeddingRingTest.java",
"license": "gpl-2.0",
"size": 13796
} | [
"games.stendhal.server.core.engine.SingletonRepository",
"games.stendhal.server.entity.player.Player",
"org.junit.Assert"
] | import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.entity.player.Player; import org.junit.Assert; | import games.stendhal.server.core.engine.*; import games.stendhal.server.entity.player.*; import org.junit.*; | [
"games.stendhal.server",
"org.junit"
] | games.stendhal.server; org.junit; | 471,082 |
@Override
Set<N> adjacentNodes(N node); | Set<N> adjacentNodes(N node); | /**
* Returns the nodes which have an incident edge in common with {@code node} in this graph.
*
* @throws IllegalArgumentException if {@code node} is not an element of this graph
*/ | Returns the nodes which have an incident edge in common with node in this graph | adjacentNodes | {
"repo_name": "rgoldberg/guava",
"path": "guava/src/com/google/common/graph/ValueGraph.java",
"license": "apache-2.0",
"size": 11818
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,123,129 |
public FormValidation doCheckFileRelative(@QueryParameter String value) throws IOException, ServletException {
String v = fixEmpty(value);
if ((v == null) || (v.length() == 0)) {
// Null values are allowed.
return FormValidation.ok();
}
if ((v.startsWith("/"))... | FormValidation function(@QueryParameter String value) throws IOException, ServletException { String v = fixEmpty(value); if ((v == null) (v.length() == 0)) { return FormValidation.ok(); } if ((v.startsWith("/")) (v.startsWith("\\")) (v.matches(STR))) { return FormValidation.error(Messages.MavenModuleSet_AlternateSettin... | /**
* Check that the provided file is a relative path. And check that it exists, just in case.
*/ | Check that the provided file is a relative path. And check that it exists, just in case | doCheckFileRelative | {
"repo_name": "sumitk1/jenkins",
"path": "maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java",
"license": "mit",
"size": 32211
} | [
"hudson.util.FormValidation",
"java.io.IOException",
"javax.servlet.ServletException",
"org.kohsuke.stapler.QueryParameter"
] | import hudson.util.FormValidation; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.QueryParameter; | import hudson.util.*; import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*; | [
"hudson.util",
"java.io",
"javax.servlet",
"org.kohsuke.stapler"
] | hudson.util; java.io; javax.servlet; org.kohsuke.stapler; | 1,834,156 |
public static final SourceModel.Expr containsAnyAlt(SourceModel.Expr vars, SourceModel.Expr alts) {
return
SourceModel.Expr.Application.make(
new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.containsAnyAlt), vars, alts});
}
public static final QualifiedName containsAnyAlt =
... | static final SourceModel.Expr function(SourceModel.Expr vars, SourceModel.Expr alts) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.containsAnyAlt), vars, alts}); } static final QualifiedName function = QualifiedName.make( CAL_Optimizer_Expression_internal.MODULE... | /**
* Helper binding method for function: containsAnyAlt.
* @param vars
* @param alts
* @return the SourceModule.expr representing an application of containsAnyAlt
*/ | Helper binding method for function: containsAnyAlt | containsAnyAlt | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Platform/src/org/openquark/cal/internal/module/Cal/Internal/CAL_Optimizer_Expression_internal.java",
"license": "bsd-3-clause",
"size": 265925
} | [
"org.openquark.cal.compiler.QualifiedName",
"org.openquark.cal.compiler.SourceModel"
] | import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel; | import org.openquark.cal.compiler.*; | [
"org.openquark.cal"
] | org.openquark.cal; | 1,092,237 |
void removeAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<? extends AttributeDefinition> attributes) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException; | void removeAttributes(PerunSession sess, Facility facility, Resource resource, User user, Member member, List<? extends AttributeDefinition> attributes) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException; | /**
* Unset the member, user, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn't unseted (It's skipped without any notification).
*
* @param sess perun session
* @param facility
* @param resource resource to set on
* @param user
* @param member member ... | Unset the member, user, member-resource and user-facility attributes. If an attribute is core attribute then the attribute isn't unseted (It's skipped without any notification) | removeAttributes | {
"repo_name": "jirmauritz/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java",
"license": "bsd-2-clause",
"size": 193360
} | [
"cz.metacentrum.perun.core.api.AttributeDefinition",
"cz.metacentrum.perun.core.api.Facility",
"cz.metacentrum.perun.core.api.Member",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.Resource",
"cz.metacentrum.perun.core.api.User",
"cz.metacentrum.perun.core.api.exceptions.I... | import cz.metacentrum.perun.core.api.AttributeDefinition; import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Resource; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.c... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,296,632 |
public static int validateShadedLic(String zipFileName, String file, String outTempDir) throws Exception
{
File outTempDir2 = new File (outTempDir + "/" + "2");
outTempDir2.mkdir();
if(!ValidateLicAndNotice.extractFile(zipFileName, file, outTempDir2.getAbsolutePath(), false))
return Constants.FAILED_TO_EX... | static int function(String zipFileName, String file, String outTempDir) throws Exception { File outTempDir2 = new File (outTempDir + "/" + "2"); outTempDir2.mkdir(); if(!ValidateLicAndNotice.extractFile(zipFileName, file, outTempDir2.getAbsolutePath(), false)) return Constants.FAILED_TO_EXTRACT; if(!ValidateLicAndNotic... | /**
* This will validate objects (class files) from jar file within a zip file.
*
* @param zipFileName is the name of zip file from which set of class packages will be returned.
* @param fileName is the name of the file within zip (jar) file to validate list of packages within.
* @param outTempDir is the te... | This will validate objects (class files) from jar file within a zip file | validateShadedLic | {
"repo_name": "nakul02/incubator-systemml",
"path": "dev/release/src/test/java/org/apache/sysml/validation/ValidateLicAndNotice.java",
"license": "apache-2.0",
"size": 30510
} | [
"java.io.File",
"java.util.HashMap",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import java.util.HashMap; import org.apache.commons.io.FileUtils; | import java.io.*; import java.util.*; import org.apache.commons.io.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 2,023,207 |
private void buildDirectionalCreateMenuItem(
Object metaType,
Object source,
Object dest,
String relationshipDescr,
JMenu menu) {
if (Model.getUmlFactory().isConnectionValid(
metaType, source, dest, true)) {
... | void function( Object metaType, Object source, Object dest, String relationshipDescr, JMenu menu) { if (Model.getUmlFactory().isConnectionValid( metaType, source, dest, true)) { JMenuItem menuItem = new JMenuItem( new ActionCreateEdgeModelElement( metaType, source, dest, relationshipDescr)); if (menuItem != null) { men... | /**
* Attempt to build a menu item to create the given model element type
* as a relation betwen two existing model elements.
* If succesful then the menu item is added to the given menu
* @param metaType The type of model element the menu item should create
* @param source The source mode... | Attempt to build a menu item to create the given model element type as a relation betwen two existing model elements. If succesful then the menu item is added to the given menu | buildDirectionalCreateMenuItem | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/argouml_critics/argouml-app/src/org/argouml/ui/explorer/ExplorerPopup.java",
"license": "gpl-3.0",
"size": 35710
} | [
"javax.swing.JMenu",
"javax.swing.JMenuItem",
"org.argouml.model.Model",
"org.argouml.ui.ActionCreateEdgeModelElement"
] | import javax.swing.JMenu; import javax.swing.JMenuItem; import org.argouml.model.Model; import org.argouml.ui.ActionCreateEdgeModelElement; | import javax.swing.*; import org.argouml.model.*; import org.argouml.ui.*; | [
"javax.swing",
"org.argouml.model",
"org.argouml.ui"
] | javax.swing; org.argouml.model; org.argouml.ui; | 2,086,121 |
public void doUpdates(MetricsContext unused) {
synchronized (this) {
bytesWritten.pushMetric(metricsRecord);
bytesRead.pushMetric(metricsRecord);
blocksWritten.pushMetric(metricsRecord);
blocksRead.pushMetric(metricsRecord);
blocksReplicated.pushMetric(metricsRecord);
... | void function(MetricsContext unused) { synchronized (this) { bytesWritten.pushMetric(metricsRecord); bytesRead.pushMetric(metricsRecord); blocksWritten.pushMetric(metricsRecord); blocksRead.pushMetric(metricsRecord); blocksReplicated.pushMetric(metricsRecord); blocksRemoved.pushMetric(metricsRecord); blocksVerified.pus... | /**
* Since this object is a registered updater, this method will be called
* periodically, e.g. every 5 seconds.
*/ | Since this object is a registered updater, this method will be called periodically, e.g. every 5 seconds | doUpdates | {
"repo_name": "kohsuke/hadoop",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodeMetrics.java",
"license": "apache-2.0",
"size": 6373
} | [
"org.apache.hadoop.metrics.MetricsContext"
] | import org.apache.hadoop.metrics.MetricsContext; | import org.apache.hadoop.metrics.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 785,488 |
@WebMethod String listRooms();
| @WebMethod String listRooms(); | /**
* Lista todas as salas que existem
*
* @return
*/ | Lista todas as salas que existem | listRooms | {
"repo_name": "gabrieltavaresmelo/jsim_app_server",
"path": "src/main/java/br/com/gtmf/SimInterface.java",
"license": "apache-2.0",
"size": 2680
} | [
"javax.jws.WebMethod"
] | import javax.jws.WebMethod; | import javax.jws.*; | [
"javax.jws"
] | javax.jws; | 2,617,359 |
public static Element updateElement( final IndentationCounter counter, final Element parent, final String name,
final boolean shouldExist )
{
Element element = parent.getChild( name, parent.getNamespace() );
if ( shouldExist )
{
if ( e... | static Element function( final IndentationCounter counter, final Element parent, final String name, final boolean shouldExist ) { Element element = parent.getChild( name, parent.getNamespace() ); if ( shouldExist ) { if ( element == null ) { element = factory.element( name, parent.getNamespace() ); insertAtPreferredLoc... | /**
* Method updateElement.
*
* @param counter
* @param shouldExist
* @param name
* @param parent
* @return Element
*/ | Method updateElement | updateElement | {
"repo_name": "eBay/RTran",
"path": "rtran-maven/src/main/java/org/apache/maven/io/util/WriterUtils2.java",
"license": "apache-2.0",
"size": 17283
} | [
"org.jdom2.Content",
"org.jdom2.Element",
"org.jdom2.Text"
] | import org.jdom2.Content; import org.jdom2.Element; import org.jdom2.Text; | import org.jdom2.*; | [
"org.jdom2"
] | org.jdom2; | 1,744,921 |
@POST
@Path("cookie")
@Consumes("application/x-www-form-urlencoded")
@Produces(MediaType.TEXT_HTML)
public Response setCookies(@FormParam("rsid") String rsid) throws URISyntaxException{
logger.debug(rsid);
return Response.seeOther(new URI("auth/"))
.cookie(new NewCookie("RSID", rsid)).build();
}
| @Path(STR) @Consumes(STR) @Produces(MediaType.TEXT_HTML) Response function(@FormParam("rsid") String rsid) throws URISyntaxException{ logger.debug(rsid); return Response.seeOther(new URI("auth/")) .cookie(new NewCookie("RSID", rsid)).build(); } | /**
* For cookies test when not in same domains
* @param rsid
* @return
* @throws URISyntaxException
*/ | For cookies test when not in same domains | setCookies | {
"repo_name": "kinddevil/restMVC",
"path": "luna-api/src/main/java/luna/tmm/rosettastone/application/resources/Authorization.java",
"license": "apache-2.0",
"size": 6159
} | [
"java.net.URISyntaxException",
"javax.ws.rs.Consumes",
"javax.ws.rs.FormParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.NewCookie",
"javax.ws.rs.core.Response"
] | import java.net.URISyntaxException; import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.NewCookie; import javax.ws.rs.core.Response; | import java.net.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"java.net",
"javax.ws"
] | java.net; javax.ws; | 532,873 |
public void setLegendItemToolTipGenerator(
XYSeriesLabelGenerator generator) {
this.legendItemToolTipGenerator = generator;
fireChangeEvent();
}
| void function( XYSeriesLabelGenerator generator) { this.legendItemToolTipGenerator = generator; fireChangeEvent(); } | /**
* Sets the legend item tool tip generator and sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getLegendItemToolTipGenerator()
* @since 1.0.14
*/ | Sets the legend item tool tip generator and sends a <code>RendererChangeEvent</code> to all registered listeners | setLegendItemToolTipGenerator | {
"repo_name": "greearb/jfreechart-fse-ct",
"path": "src/main/java/org/jfree/chart/renderer/DefaultPolarItemRenderer.java",
"license": "lgpl-2.1",
"size": 32031
} | [
"org.jfree.chart.labels.XYSeriesLabelGenerator"
] | import org.jfree.chart.labels.XYSeriesLabelGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,827,350 |
private void buildLinkForRouterLsa(RouterLsa routerLsa, OspfInterface ospfInterface) {
OspfInterfaceImpl nextInterface;
Iterator interfaces = ospfInterfaceList.iterator();
while (interfaces.hasNext()) {
nextInterface = (OspfInterfaceImpl) interfaces.next();
if (nextIn... | void function(RouterLsa routerLsa, OspfInterface ospfInterface) { OspfInterfaceImpl nextInterface; Iterator interfaces = ospfInterfaceList.iterator(); while (interfaces.hasNext()) { nextInterface = (OspfInterfaceImpl) interfaces.next(); if (nextInterface.state() == OspfInterfaceState.DOWN) { continue; } else if (nextIn... | /**
* Builds LSA link for router LSA.
*
* @param routerLsa router LSA instance
* @param ospfInterface interface instance
*/ | Builds LSA link for router LSA | buildLinkForRouterLsa | {
"repo_name": "kuujo/onos",
"path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java",
"license": "apache-2.0",
"size": 27942
} | [
"java.util.Iterator",
"java.util.List",
"org.onosproject.ospf.controller.OspfInterface",
"org.onosproject.ospf.controller.OspfNbr",
"org.onosproject.ospf.protocol.lsa.subtypes.OspfLsaLink",
"org.onosproject.ospf.protocol.lsa.types.RouterLsa",
"org.onosproject.ospf.protocol.util.OspfInterfaceState"
] | import java.util.Iterator; import java.util.List; import org.onosproject.ospf.controller.OspfInterface; import org.onosproject.ospf.controller.OspfNbr; import org.onosproject.ospf.protocol.lsa.subtypes.OspfLsaLink; import org.onosproject.ospf.protocol.lsa.types.RouterLsa; import org.onosproject.ospf.protocol.util.OspfI... | import java.util.*; import org.onosproject.ospf.controller.*; import org.onosproject.ospf.protocol.lsa.subtypes.*; import org.onosproject.ospf.protocol.lsa.types.*; import org.onosproject.ospf.protocol.util.*; | [
"java.util",
"org.onosproject.ospf"
] | java.util; org.onosproject.ospf; | 2,908,660 |
public Person getAccountDelegate() {
return accountDelegate;
}
| Person function() { return accountDelegate; } | /**
* Gets the accountDelegate attribute.
*
* @return Returns the accountDelegate.
*/ | Gets the accountDelegate attribute | getAccountDelegate | {
"repo_name": "bhutchinson/rice",
"path": "rice-framework/krad-development-tools/src/test/groovy/org/kuali/rice/krad/devtools/maintainablexml/TestDelegateModelDetail.java",
"license": "apache-2.0",
"size": 8656
} | [
"org.kuali.rice.kim.api.identity.Person"
] | import org.kuali.rice.kim.api.identity.Person; | import org.kuali.rice.kim.api.identity.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,206,222 |
private boolean shouldIndexResource(Resource resource) {
final URI uri = resource.getURI();
final ResourceType resourceType = ResourceType.getResourceType(uri);
// We only want to index raw JS files if they are contained in an N4JS source container.
switch (resourceType) {
case JS:
return n4jsCore.find... | boolean function(Resource resource) { final URI uri = resource.getURI(); final ResourceType resourceType = ResourceType.getResourceType(uri); switch (resourceType) { case JS: return n4jsCore.findN4JSSourceContainer(uri).isPresent(); case JSX: return n4jsCore.findN4JSSourceContainer(uri).isPresent(); case UNKOWN: return... | /**
* Indicates whether or not the given resource should be indexed.
*
* @param resource
* the resource to be indexed
* @return <code>true</code> if the given resource should be indexed and <code>false</code> otherwise
*/ | Indicates whether or not the given resource should be indexed | shouldIndexResource | {
"repo_name": "lbeurerkellner/n4js",
"path": "plugins/org.eclipse.n4js.generator.headless/src/org/eclipse/n4js/generator/headless/N4HeadlessCompiler.java",
"license": "epl-1.0",
"size": 45170
} | [
"org.eclipse.emf.ecore.resource.Resource",
"org.eclipse.n4js.utils.ResourceType"
] | import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.n4js.utils.ResourceType; | import org.eclipse.emf.ecore.resource.*; import org.eclipse.n4js.utils.*; | [
"org.eclipse.emf",
"org.eclipse.n4js"
] | org.eclipse.emf; org.eclipse.n4js; | 729,043 |
protected String [] getSubcommandArgs(String [] argv) {
if (null == argv) {
return null;
}
for (int i = 0; i < argv.length; i++) {
if (argv[i].equals("--")) {
return Arrays.copyOfRange(argv, i + 1, argv.length);
}
}
return null;
} | String [] function(String [] argv) { if (null == argv) { return null; } for (int i = 0; i < argv.length; i++) { if (argv[i].equals("--")) { return Arrays.copyOfRange(argv, i + 1, argv.length); } } return null; } | /**
* If argv contains an entry "--", return an array containing all elements
* after the "--" separator. Otherwise, return null.
* @param argv a set of arguments to scan for the subcommand arguments.
*/ | If argv contains an entry "--", return an array containing all elements after the "--" separator. Otherwise, return null | getSubcommandArgs | {
"repo_name": "cloudbow/sqoop-couchbase-pass-fix",
"path": "src/java/org/apache/sqoop/tool/BaseSqoopTool.java",
"license": "apache-2.0",
"size": 50645
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,523,293 |
private void setBackground(Color bg, Component[] components) {
for (Component c : components) {
c.setBackground(bg);
if (c instanceof Container) {
setBackground(bg, ((Container) c).getComponents());
}
}
} | void function(Color bg, Component[] components) { for (Component c : components) { c.setBackground(bg); if (c instanceof Container) { setBackground(bg, ((Container) c).getComponents()); } } } | /**
* Sets background color in given components
*
* @param bg color
* @param components components
*/ | Sets background color in given components | setBackground | {
"repo_name": "kiminoboku/emorg-lab",
"path": "java/netbeans/remote-control/src/main/java/pl/kiminoboku/netbeans/components/operation/OperationRowJPanel.java",
"license": "gpl-3.0",
"size": 10942
} | [
"java.awt.Color",
"java.awt.Component",
"java.awt.Container"
] | import java.awt.Color; import java.awt.Component; import java.awt.Container; | import java.awt.*; | [
"java.awt"
] | java.awt; | 951,060 |
protected void updateActionBarTitleAndHomeButton(OCFile chosenFile) {
String title = getString(R.string.default_display_name_for_root_folder); // default
boolean inRoot;
// choose the appropriate title
inRoot = (
chosenFile == null ||
(chos... | void function(OCFile chosenFile) { String title = getString(R.string.default_display_name_for_root_folder); boolean inRoot; inRoot = ( chosenFile == null (chosenFile.isFolder() && chosenFile.getParentId() == FileDataStorageManager.ROOT_PARENT_ID) ); if (!inRoot) { title = chosenFile.getFileName(); } updateActionBarTitl... | /**
* Updates title bar and home buttons (state and icon).
*/ | Updates title bar and home buttons (state and icon) | updateActionBarTitleAndHomeButton | {
"repo_name": "PauloSantos13/android",
"path": "src/com/owncloud/android/ui/activity/ToolbarActivity.java",
"license": "gpl-2.0",
"size": 3665
} | [
"com.owncloud.android.datamodel.FileDataStorageManager",
"com.owncloud.android.datamodel.OCFile"
] | import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; | import com.owncloud.android.datamodel.*; | [
"com.owncloud.android"
] | com.owncloud.android; | 1,461,545 |
boolean qualifiedNameBeginsWithStripType(Node n) {
String name = n.getQualifiedName();
return qualifiedNameBeginsWithStripType(name);
} | boolean qualifiedNameBeginsWithStripType(Node n) { String name = n.getQualifiedName(); return qualifiedNameBeginsWithStripType(name); } | /**
* Gets whether a qualified name begins with a strip name. The names
* "goog.debug", "goog.debug.Logger", and "goog.debug.Logger.Level" are
* examples of strip names that would result in this function returning
* true for a node representing the name "goog.debug.Logger.Level".
*
* @para... | Gets whether a qualified name begins with a strip name. The names "goog.debug", "goog.debug.Logger", and "goog.debug.Logger.Level" are examples of strip names that would result in this function returning true for a node representing the name "goog.debug.Logger.Level" | qualifiedNameBeginsWithStripType | {
"repo_name": "johan/closure-compiler",
"path": "src/com/google/javascript/jscomp/StripCode.java",
"license": "apache-2.0",
"size": 21318
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,799,322 |
@Nullable
public ColorStateList getDefaultHintTextColor() {
return defaultHintTextColor;
} | ColorStateList function() { return defaultHintTextColor; } | /**
* Returns the text color used by the hint in both the collapsed and expanded states, or null if
* no color has been set.
*/ | Returns the text color used by the hint in both the collapsed and expanded states, or null if no color has been set | getDefaultHintTextColor | {
"repo_name": "material-components/material-components-android",
"path": "lib/java/com/google/android/material/textfield/TextInputLayout.java",
"license": "apache-2.0",
"size": 171507
} | [
"android.content.res.ColorStateList"
] | import android.content.res.ColorStateList; | import android.content.res.*; | [
"android.content"
] | android.content; | 1,858,267 |
@Override
public void showError(int text) {
mPbNewChat.setVisibility(View.GONE);
Toast.makeText(this, getApplicationContext().getResources().
getString(text), Toast.LENGTH_LONG).show();
} | void function(int text) { mPbNewChat.setVisibility(View.GONE); Toast.makeText(this, getApplicationContext().getResources(). getString(text), Toast.LENGTH_LONG).show(); } | /**
* Shows toast with error message
*/ | Shows toast with error message | showError | {
"repo_name": "kamilabrito/orachat",
"path": "app/src/main/java/com/orainteractive/orachat/view/home/HomeActivity.java",
"license": "apache-2.0",
"size": 6127
} | [
"android.view.View",
"android.widget.Toast"
] | import android.view.View; import android.widget.Toast; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 2,079,288 |
protected void reconnect(KeeperException ke) {
if (ke instanceof ConnectionLossException || ke instanceof SessionExpiredException
|| ke instanceof AuthFailedException) {
String clusterKey = ctx.getPeerConfig().getClusterKey();
LOG.warn("Lost the ZooKeeper connection for peer " + clusterKey, ke... | void function(KeeperException ke) { if (ke instanceof ConnectionLossException ke instanceof SessionExpiredException ke instanceof AuthFailedException) { String clusterKey = ctx.getPeerConfig().getClusterKey(); LOG.warn(STR + clusterKey, ke); try { reloadZkWatcher(); } catch (IOException io) { LOG.warn(STR + clusterKey,... | /**
* A private method used to re-establish a zookeeper session with a peer cluster.
* @param ke
*/ | A private method used to re-establish a zookeeper session with a peer cluster | reconnect | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/HBaseReplicationEndpoint.java",
"license": "apache-2.0",
"size": 7654
} | [
"java.io.IOException",
"org.apache.zookeeper.KeeperException"
] | import java.io.IOException; import org.apache.zookeeper.KeeperException; | import java.io.*; import org.apache.zookeeper.*; | [
"java.io",
"org.apache.zookeeper"
] | java.io; org.apache.zookeeper; | 727,421 |
InfiniumFileTOC[] getTableOfContents() throws IOException {
final InfiniumFileTOC[] tableOfContents = new InfiniumFileTOC[getNumberOfEntries()];
//read in the table of contents... order them by offset so that we
//only have to traverse the input stream once.
for (int i = 0; i < get... | InfiniumFileTOC[] getTableOfContents() throws IOException { final InfiniumFileTOC[] tableOfContents = new InfiniumFileTOC[getNumberOfEntries()]; for (int i = 0; i < getNumberOfEntries(); i++) { final InfiniumFileTOC toc = new InfiniumFileTOC(); toc.setTableOfContentsId(Short.reverseBytes(stream.readShort())); toc.setOf... | /**
* Parse the table of contents.
*
* @return The TOC
* @throws java.io.IOException Any errors reading in the TOC
*/ | Parse the table of contents | getTableOfContents | {
"repo_name": "alecw/picard",
"path": "src/main/java/picard/arrays/illumina/InfiniumDataFile.java",
"license": "mit",
"size": 12781
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,799,815 |
public static GridLayout createGridLayout(int cols, int marginWidth, int marginHeight, boolean makeColumnsEqualWidth) {
return createGridLayout(cols, marginWidth, marginHeight, 5, 5, makeColumnsEqualWidth);
}
| static GridLayout function(int cols, int marginWidth, int marginHeight, boolean makeColumnsEqualWidth) { return createGridLayout(cols, marginWidth, marginHeight, 5, 5, makeColumnsEqualWidth); } | /**
* Create a new GridLayout with the given parameters
*
* @param cols The number of columns
* @param marginWidth Margin width in pixel
* @param marginHeight Margin height in pixel
* @param makeColumnsEqualWidth TRUE if columns should be equals in size
* @return GridLayout New GridLayout wi... | Create a new GridLayout with the given parameters | createGridLayout | {
"repo_name": "rssowl/RSSOwl",
"path": "org.rssowl.ui/src/org/rssowl/ui/internal/util/LayoutUtils.java",
"license": "epl-1.0",
"size": 6668
} | [
"org.eclipse.swt.layout.GridLayout"
] | import org.eclipse.swt.layout.GridLayout; | import org.eclipse.swt.layout.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,220,221 |
public void initGradient() {
if (gradientTexture == 0) {
Image slider = GameImage.SLIDER_GRADIENT.getImage().getScaledCopy(1.0f / GameImage.getUIscale());
staticState.gradientTexture = GL11.glGenTextures();
ByteBuffer buff = BufferUtils.createByteBuffer(slider.getWidth() * 4);
for (int i = 0; i ... | void function() { if (gradientTexture == 0) { Image slider = GameImage.SLIDER_GRADIENT.getImage().getScaledCopy(1.0f / GameImage.getUIscale()); staticState.gradientTexture = GL11.glGenTextures(); ByteBuffer buff = BufferUtils.createByteBuffer(slider.getWidth() * 4); for (int i = 0; i < slider.getWidth(); ++i) { Color c... | /**
* Reads the first row of the slider gradient texture and upload it as
* a 1D texture to OpenGL if it hasn't already been done.
*/ | Reads the first row of the slider gradient texture and upload it as a 1D texture to OpenGL if it hasn't already been done | initGradient | {
"repo_name": "kanekikun420/opsu",
"path": "src/itdelatrisu/opsu/render/CurveRenderState.java",
"license": "gpl-3.0",
"size": 17681
} | [
"java.nio.ByteBuffer",
"org.lwjgl.BufferUtils",
"org.lwjgl.opengl.EXTFramebufferObject",
"org.newdawn.slick.Color",
"org.newdawn.slick.Image"
] | import java.nio.ByteBuffer; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.EXTFramebufferObject; import org.newdawn.slick.Color; import org.newdawn.slick.Image; | import java.nio.*; import org.lwjgl.*; import org.lwjgl.opengl.*; import org.newdawn.slick.*; | [
"java.nio",
"org.lwjgl",
"org.lwjgl.opengl",
"org.newdawn.slick"
] | java.nio; org.lwjgl; org.lwjgl.opengl; org.newdawn.slick; | 352,371 |
protected void zoomTo(final PInputEvent event) {
PBounds zoomToBounds;
final PNode picked = event.getPickedNode();
if (picked instanceof PCamera) {
final PCamera c = (PCamera) picked;
zoomToBounds = c.getUnionOfLayerFullBounds();
}
else {
... | void function(final PInputEvent event) { PBounds zoomToBounds; final PNode picked = event.getPickedNode(); if (picked instanceof PCamera) { final PCamera c = (PCamera) picked; zoomToBounds = c.getUnionOfLayerFullBounds(); } else { zoomToBounds = picked.getGlobalFullBounds(); } event.getCamera().animateViewToCenterBound... | /**
* Zooms the camera to the picked node of the event.
* @param event Event from which to extract the zoom target
*/ | Zooms the camera to the picked node of the event | zoomTo | {
"repo_name": "bdaum/zoraPD",
"path": "piccolo3/src/org/piccolo2d/extras/event/PZoomToEventHandler.java",
"license": "gpl-2.0",
"size": 3308
} | [
"org.piccolo2d.PCamera",
"org.piccolo2d.PNode",
"org.piccolo2d.event.PInputEvent",
"org.piccolo2d.util.PBounds"
] | import org.piccolo2d.PCamera; import org.piccolo2d.PNode; import org.piccolo2d.event.PInputEvent; import org.piccolo2d.util.PBounds; | import org.piccolo2d.*; import org.piccolo2d.event.*; import org.piccolo2d.util.*; | [
"org.piccolo2d",
"org.piccolo2d.event",
"org.piccolo2d.util"
] | org.piccolo2d; org.piccolo2d.event; org.piccolo2d.util; | 664,683 |
public void writeQuads(OutputStream out){
StmtIterator stIter=model.listStatements();
String defaultGraphSpace="http://default";
if(quadGraph.isEmpty()){ // No namedgraphs were used, so output everything from the triples model in the quadGraph to export it in TRIG format
N... | void function(OutputStream out){ StmtIterator stIter=model.listStatements(); String defaultGraphSpace="http: if(quadGraph.isEmpty()){ Node defgraph=new ResourceImpl(defaultGraphSpace).asNode(); while(stIter.hasNext()){ Statement st=stIter.next(); quadGraph.add(defgraph, st.getSubject().asNode(), st.getPredicate().asNod... | /** Exports the transformed contents of graph as Quads using the given output stream.
* The contents are exported in TRIG format.
* This method is used when: (a) the mappings contain namedgraphs, (b) the user defined trig as the export format.
*
* @param out the output stream that will be used ... | Exports the transformed contents of graph as Quads using the given output stream. The contents are exported in TRIG format. This method is used when: (a) the mappings contain namedgraphs, (b) the user defined trig as the export format | writeQuads | {
"repo_name": "isl/x3ml",
"path": "src/main/java/gr/forth/ics/isl/x3ml/engine/ModelOutput.java",
"license": "apache-2.0",
"size": 13490
} | [
"com.hp.hpl.jena.graph.Node",
"com.hp.hpl.jena.rdf.model.Statement",
"com.hp.hpl.jena.rdf.model.StmtIterator",
"com.hp.hpl.jena.rdf.model.impl.ResourceImpl",
"java.io.OutputStream",
"org.apache.jena.riot.Lang",
"org.apache.jena.riot.RDFDataMgr"
] | import com.hp.hpl.jena.graph.Node; import com.hp.hpl.jena.rdf.model.Statement; import com.hp.hpl.jena.rdf.model.StmtIterator; import com.hp.hpl.jena.rdf.model.impl.ResourceImpl; import java.io.OutputStream; import org.apache.jena.riot.Lang; import org.apache.jena.riot.RDFDataMgr; | import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.rdf.model.impl.*; import java.io.*; import org.apache.jena.riot.*; | [
"com.hp.hpl",
"java.io",
"org.apache.jena"
] | com.hp.hpl; java.io; org.apache.jena; | 2,537,162 |
private static BigInteger getMcaId(ShoppingContent session) throws IOException {
List<AccountIdentifier> ids = session.accounts().authinfo().execute().getAccountIdentifiers();
Preconditions.checkArgument(
!ids.isEmpty(),
"Authenticated user does not have access to any Merchant Center accounts"... | static BigInteger function(ShoppingContent session) throws IOException { List<AccountIdentifier> ids = session.accounts().authinfo().execute().getAccountIdentifiers(); Preconditions.checkArgument( !ids.isEmpty(), STR); Preconditions.checkArgument( ids.size() < 2, STR); BigInteger aggregatorId = ids.get(0).getAggregator... | /**
* Retrieves the Merchant Center multi-client account ID to which the authenticated client has
* been added as a user.
*
* @throws IllegalArgumentException if the client is not a user on any MC accounts, is a user on
* multiple accounts, or the sole MC account is not a multi-client account
* @t... | Retrieves the Merchant Center multi-client account ID to which the authenticated client has been added as a user | getMcaId | {
"repo_name": "googlecodelabs/shopping-account-linking",
"path": "src/main/java/SolutionRunner.java",
"license": "apache-2.0",
"size": 8207
} | [
"com.google.api.services.content.ShoppingContent",
"com.google.api.services.content.model.AccountIdentifier",
"com.google.common.base.Preconditions",
"java.io.IOException",
"java.math.BigInteger",
"java.util.List"
] | import com.google.api.services.content.ShoppingContent; import com.google.api.services.content.model.AccountIdentifier; import com.google.common.base.Preconditions; import java.io.IOException; import java.math.BigInteger; import java.util.List; | import com.google.api.services.content.*; import com.google.api.services.content.model.*; import com.google.common.base.*; import java.io.*; import java.math.*; import java.util.*; | [
"com.google.api",
"com.google.common",
"java.io",
"java.math",
"java.util"
] | com.google.api; com.google.common; java.io; java.math; java.util; | 339,117 |
public boolean sendMessageToEndPoint(final String url, final String message, final boolean async) {
final Future<Boolean> result = EXECUTOR_SERVICE.submit(new MessageSender(url, message, this.readTimeout, this.connectionTimeout, this.followRedirects));
if (async) {
return true;
... | boolean function(final String url, final String message, final boolean async) { final Future<Boolean> result = EXECUTOR_SERVICE.submit(new MessageSender(url, message, this.readTimeout, this.connectionTimeout, this.followRedirects)); if (async) { return true; } try { return result.get(); } catch (final Exception e) { re... | /**
* Sends a message to a particular endpoint. Option of sending it without waiting to ensure a response was returned.
* <p>
* This is useful when it doesn't matter about the response as you'll perform no action based on the response.
*
* @param url the url to send the message to
* @para... | Sends a message to a particular endpoint. Option of sending it without waiting to ensure a response was returned. This is useful when it doesn't matter about the response as you'll perform no action based on the response | sendMessageToEndPoint | {
"repo_name": "ConnCollege/cas",
"path": "cas-server-core/src/main/java/org/jasig/cas/util/HttpClient.java",
"license": "bsd-3-clause",
"size": 10144
} | [
"java.util.concurrent.Future"
] | import java.util.concurrent.Future; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,833,084 |
private void loadGLTexture(GL10 gl) { // New function
// Generate one texture pointer...
int[] textures = new int[1];
gl.glGenTextures(1, textures, 0);
mTextureId = textures[0];
// ...and bind it to our array
gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureId);
// Create Nearest Filtered Texture
gl.gl... | void function(GL10 gl) { int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); mTextureId = textures[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureId); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.... | /**
* Loads the texture.
*
* @param gl
*/ | Loads the texture | loadGLTexture | {
"repo_name": "NaioTechnologies/DiagnOztic",
"path": "src/com/naio/opengl/Mesh.java",
"license": "mit",
"size": 6557
} | [
"android.opengl.GLUtils"
] | import android.opengl.GLUtils; | import android.opengl.*; | [
"android.opengl"
] | android.opengl; | 1,426,962 |
private void dumpBlockMeta(Block block, PrintWriter out) {
List<DatanodeDescriptor> containingNodes =
new ArrayList<DatanodeDescriptor>();
List<DatanodeStorageInfo> containingLiveReplicasNodes =
new ArrayList<DatanodeStorageInfo>();
NumberReplicas numReplic... | void function(Block block, PrintWriter out) { List<DatanodeDescriptor> containingNodes = new ArrayList<DatanodeDescriptor>(); List<DatanodeStorageInfo> containingLiveReplicasNodes = new ArrayList<DatanodeStorageInfo>(); NumberReplicas numReplicas = new NumberReplicas(); chooseSourceDatanode(block, containingNodes, cont... | /**
* Dump the metadata for the given block in a human-readable
* form.
*/ | Dump the metadata for the given block in a human-readable form | dumpBlockMeta | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java",
"license": "apache-2.0",
"size": 147791
} | [
"java.io.PrintWriter",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hdfs.protocol.Block"
] | import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hdfs.protocol.Block; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 368,979 |
public SVGElementInstance getInstanceRoot() {
throw new UnsupportedOperationException
("SVGUseElement.getInstanceRoot is not implemented"); // XXX
} | SVGElementInstance function() { throw new UnsupportedOperationException (STR); } | /**
* <b>DOM</b>: Implements {@link SVGUseElement#getInstanceRoot()}.
*/ | DOM: Implements <code>SVGUseElement#getInstanceRoot()</code> | getInstanceRoot | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/svg/SVGOMUseElement.java",
"license": "apache-2.0",
"size": 8087
} | [
"org.w3c.dom.svg.SVGElementInstance"
] | import org.w3c.dom.svg.SVGElementInstance; | import org.w3c.dom.svg.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,391,907 |
private void submitJobToHelix(JobConfig.Builder jobConfigBuilder) throws Exception {
// Create one queue for each job with the job name being the queue name
if (null == this.helixTaskDriver.getWorkflowConfig(this.helixManager, this.helixQueueName)) {
JobQueue jobQueue = new JobQueue.Builder(this.helixQu... | void function(JobConfig.Builder jobConfigBuilder) throws Exception { if (null == this.helixTaskDriver.getWorkflowConfig(this.helixManager, this.helixQueueName)) { JobQueue jobQueue = new JobQueue.Builder(this.helixQueueName).build(); this.helixTaskDriver.createQueue(jobQueue); LOGGER.info(STR, this.helixQueueName); } e... | /**
* Submit a job to run.
*/ | Submit a job to run | submitJobToHelix | {
"repo_name": "mwol/gobblin",
"path": "gobblin-cluster/src/main/java/gobblin/cluster/GobblinHelixJobLauncher.java",
"license": "apache-2.0",
"size": 16838
} | [
"org.apache.helix.task.JobConfig",
"org.apache.helix.task.JobQueue"
] | import org.apache.helix.task.JobConfig; import org.apache.helix.task.JobQueue; | import org.apache.helix.task.*; | [
"org.apache.helix"
] | org.apache.helix; | 1,506,376 |
public static DefaultTableModel getEventSummaryTableModel(FHFile file, EventTypeToProcess eventType) {
try
{
AbstractFireHistoryReader fr = file.getFireHistoryReader();
// Create array list to hold data
ArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>();
for (int i = 0; i ... | static DefaultTableModel function(FHFile file, EventTypeToProcess eventType) { try { AbstractFireHistoryReader fr = file.getFireHistoryReader(); ArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(); for (int i = 0; i <= fr.getNumberOfSeries(); i++) { list.add(new ArrayList<Integer>()); } ArrayList<D... | /**
* Returns a table that replicates the event summary table produced by SSIZ (second table in output). The table has three columns:
*
* <ol>
* <li>Number of trees recording an event</li>
* <li>Number of years in which this many trees recording events</li>
* <li>List of years in which this happened</li>
... | Returns a table that replicates the event summary table produced by SSIZ (second table in output). The table has three columns: Number of trees recording an event Number of years in which this many trees recording events List of years in which this happened | getEventSummaryTableModel | {
"repo_name": "petebrew/fhaes",
"path": "fhaes/src/main/java/org/fhaes/analysis/FHDescriptiveStats.java",
"license": "gpl-3.0",
"size": 8407
} | [
"java.util.ArrayList",
"java.util.Vector",
"javax.swing.table.DefaultTableModel",
"org.fhaes.enums.EventTypeToProcess",
"org.fhaes.fhfilereader.AbstractFireHistoryReader",
"org.fhaes.fhfilereader.FHFile"
] | import java.util.ArrayList; import java.util.Vector; import javax.swing.table.DefaultTableModel; import org.fhaes.enums.EventTypeToProcess; import org.fhaes.fhfilereader.AbstractFireHistoryReader; import org.fhaes.fhfilereader.FHFile; | import java.util.*; import javax.swing.table.*; import org.fhaes.enums.*; import org.fhaes.fhfilereader.*; | [
"java.util",
"javax.swing",
"org.fhaes.enums",
"org.fhaes.fhfilereader"
] | java.util; javax.swing; org.fhaes.enums; org.fhaes.fhfilereader; | 2,696,824 |
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
} | Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } | /**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link SessionCreateParams.Discount#extraParams} for the field documentation.
*/ | Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>SessionCreateParams.Discount#extraParams</code> for the field documentation | putAllExtraParam | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/checkout/SessionCreateParams.java",
"license": "mit",
"size": 222478
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,385,413 |
public static PolygonShape createPolygonShape(List<Number> x_p, List<Number> y_p) {
PolygonShape ps = new PolygonShape();
List<PointD> points = new ArrayList<>();
for (int i = 0; i < x_p.size(); i++) {
points.add(new PointD(x_p.get(i).doubleValue(), y_p.get(i).doubleValue()))... | static PolygonShape function(List<Number> x_p, List<Number> y_p) { PolygonShape ps = new PolygonShape(); List<PointD> points = new ArrayList<>(); for (int i = 0; i < x_p.size(); i++) { points.add(new PointD(x_p.get(i).doubleValue(), y_p.get(i).doubleValue())); } if (!points.get(points.size() - 1).equals(points.get(0)))... | /**
* Create polygon shape
*
* @param x_p X coordinate list
* @param y_p Y coordinate list
* @return Polygon shape
*/ | Create polygon shape | createPolygonShape | {
"repo_name": "meteoinfo/meteoinfolib",
"path": "src/org/meteoinfo/shape/ShapeUtil.java",
"license": "lgpl-3.0",
"size": 9765
} | [
"java.util.ArrayList",
"java.util.List",
"org.meteoinfo.global.PointD"
] | import java.util.ArrayList; import java.util.List; import org.meteoinfo.global.PointD; | import java.util.*; import org.meteoinfo.global.*; | [
"java.util",
"org.meteoinfo.global"
] | java.util; org.meteoinfo.global; | 670,907 |
public List<ProjectInnovationCountry> findAll();
| List<ProjectInnovationCountry> function(); | /**
* This method gets a list of projectInnovationCountry that are active
*
* @return a list from ProjectInnovationCountry null if no exist records
*/ | This method gets a list of projectInnovationCountry that are active | findAll | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ProjectInnovationCountryDAO.java",
"license": "gpl-3.0",
"size": 3726
} | [
"java.util.List",
"org.cgiar.ccafs.marlo.data.model.ProjectInnovationCountry"
] | import java.util.List; import org.cgiar.ccafs.marlo.data.model.ProjectInnovationCountry; | import java.util.*; import org.cgiar.ccafs.marlo.data.model.*; | [
"java.util",
"org.cgiar.ccafs"
] | java.util; org.cgiar.ccafs; | 2,602,605 |
EAttribute getAccount_PeriodStart(); | EAttribute getAccount_PeriodStart(); | /**
* Returns the meta object for the attribute '{@link org.nasdanika.examples.bank.Account#getPeriodStart <em>Period Start</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Period Start</em>'.
* @see org.nasdanika.examples.bank.Account#getPeriodStart()... | Returns the meta object for the attribute '<code>org.nasdanika.examples.bank.Account#getPeriodStart Period Start</code>'. | getAccount_PeriodStart | {
"repo_name": "Nasdanika/examples",
"path": "org.nasdanika.examples.bank/src/org/nasdanika/examples/bank/BankPackage.java",
"license": "epl-1.0",
"size": 69780
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,165,110 |
private static Properties getProperties(String propFileName) {
InputStream inputStream = null;
Properties prop = new Properties();
try {
// non static method
// inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
// static method
inputStream = Oracle.class.getClassLoa... | static Properties function(String propFileName) { InputStream inputStream = null; Properties prop = new Properties(); try { inputStream = Oracle.class.getClassLoader().getResourceAsStream(propFileName); if (inputStream != null) prop.load(inputStream); else throw new FileNotFoundException(STR + propFileName + STR); } ca... | /**
* Retrieve all properties from specified property file.
*
* @param propFileName Property file to retrieve
* @return All properties included in propFileName
*/ | Retrieve all properties from specified property file | getProperties | {
"repo_name": "axel-halin/Thesis-JHipster",
"path": "FML-brute/src/oracle/Oracle.java",
"license": "mit",
"size": 25079
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.InputStream",
"java.util.Properties"
] | import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,524,972 |
Map<String, List<MessageReference>> getDeliveringMessages(); | Map<String, List<MessageReference>> getDeliveringMessages(); | /**
* Return a Map consisting of consumer.toString and its messages
* Delivering message is a property of the consumer, this method will aggregate the results per Server's consumer object
*
* @return
*/ | Return a Map consisting of consumer.toString and its messages Delivering message is a property of the consumer, this method will aggregate the results per Server's consumer object | getDeliveringMessages | {
"repo_name": "kjniemi/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/Queue.java",
"license": "apache-2.0",
"size": 14315
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 60,341 |
@Override
public void disconnect(HttpConsumer consumer) throws Exception {
// If the connector is not needed anymore then stop it
HttpCommonEndpoint endpoint = consumer.getEndpoint();
String connectorKey = getConnectorKey(endpoint);
synchronized (CONNECTORS) {
... | void function(HttpConsumer consumer) throws Exception { HttpCommonEndpoint endpoint = consumer.getEndpoint(); String connectorKey = getConnectorKey(endpoint); synchronized (CONNECTORS) { ConnectorRef connectorRef = CONNECTORS.get(connectorKey); if (connectorRef != null) { connectorRef.servlet.disconnect(consumer); if (... | /**
* Disconnects the URL specified on the endpoint from the specified processor.
*/ | Disconnects the URL specified on the endpoint from the specified processor | disconnect | {
"repo_name": "satishgummadelli/camel",
"path": "components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java",
"license": "apache-2.0",
"size": 57094
} | [
"org.apache.camel.http.common.HttpCommonEndpoint",
"org.apache.camel.http.common.HttpConsumer"
] | import org.apache.camel.http.common.HttpCommonEndpoint; import org.apache.camel.http.common.HttpConsumer; | import org.apache.camel.http.common.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,816,909 |
private static ImmutableSortedSet<ThriftLibrary> resolveThriftDeps(
BuildTarget target,
Iterable<BuildRule> deps) {
ImmutableSortedSet.Builder<ThriftLibrary> libDepsBuilder = ImmutableSortedSet.naturalOrder();
for (BuildRule dep : deps) {
if (!(dep instanceof ThriftLibrary)) {
throw... | static ImmutableSortedSet<ThriftLibrary> function( BuildTarget target, Iterable<BuildRule> deps) { ImmutableSortedSet.Builder<ThriftLibrary> libDepsBuilder = ImmutableSortedSet.naturalOrder(); for (BuildRule dep : deps) { if (!(dep instanceof ThriftLibrary)) { throw new HumanReadableException( STRdeps\STR%s\STR, target... | /**
* Downcast the given deps to {@link ThriftLibrary} rules, throwing an error if we see an
* unexpected type.
*/ | Downcast the given deps to <code>ThriftLibrary</code> rules, throwing an error if we see an unexpected type | resolveThriftDeps | {
"repo_name": "MarkRunWu/buck",
"path": "src/com/facebook/buck/thrift/ThriftLibraryDescription.java",
"license": "apache-2.0",
"size": 17297
} | [
"com.facebook.buck.model.BuildTarget",
"com.facebook.buck.rules.BuildRule",
"com.facebook.buck.util.HumanReadableException",
"com.google.common.collect.ImmutableSortedSet"
] | import com.facebook.buck.model.BuildTarget; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.util.HumanReadableException; import com.google.common.collect.ImmutableSortedSet; | import com.facebook.buck.model.*; import com.facebook.buck.rules.*; import com.facebook.buck.util.*; import com.google.common.collect.*; | [
"com.facebook.buck",
"com.google.common"
] | com.facebook.buck; com.google.common; | 2,055,884 |
FileChannel fromChannel = null;
FileChannel toChannel = null;
try {
fromChannel = fromFile.getChannel();
toChannel = toFile.getChannel();
fromChannel.transferTo(0, fromChannel.size(), toChannel);
} finally {
try {
if (fromChannel !=... | FileChannel fromChannel = null; FileChannel toChannel = null; try { fromChannel = fromFile.getChannel(); toChannel = toFile.getChannel(); fromChannel.transferTo(0, fromChannel.size(), toChannel); } finally { try { if (fromChannel != null) { fromChannel.close(); } } finally { if (toChannel != null) { toChannel.close(); ... | /**
* Creates the specified <code>toFile</code> as a byte for byte copy of the <code>fromFile</code>.
* If <code>toFile</code> already exists, then it will be replaced with a copy of
* <code>fromFile</code>. The name and path of <code>toFile</code> will be that of
* <code>toFile</code>.<br/>
* ... | Creates the specified <code>toFile</code> as a byte for byte copy of the <code>fromFile</code>. If <code>toFile</code> already exists, then it will be replaced with a copy of <code>fromFile</code>. The name and path of <code>toFile</code> will be that of <code>toFile</code>. Note: <code>fromFile</code> and <code>toFile... | copyFile | {
"repo_name": "selesse/WineDB",
"path": "src/main/java/com/selesse/android/winedb/database/FileUtils.java",
"license": "mit",
"size": 1436
} | [
"java.nio.channels.FileChannel"
] | import java.nio.channels.FileChannel; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 966,695 |
void setXMLAnnotations(Collection<XMLAnnotationData> annotations)
{
modulo = new HashMap<Integer, ModuloInfo>();
if (CollectionUtils.isEmpty(annotations)) return;
ModuloParser parser;
Iterator<XMLAnnotationData> i = annotations.iterator();
XMLAnnotationData data;
List<Mo... | void setXMLAnnotations(Collection<XMLAnnotationData> annotations) { modulo = new HashMap<Integer, ModuloInfo>(); if (CollectionUtils.isEmpty(annotations)) return; ModuloParser parser; Iterator<XMLAnnotationData> i = annotations.iterator(); XMLAnnotationData data; List<ModuloInfo> infos; Iterator<ModuloInfo> j; ModuloIn... | /**
* Sets the annotations and parses the content.
*
* @param annotations The annotations to parse.
*/ | Sets the annotations and parses the content | setXMLAnnotations | {
"repo_name": "knabar/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/rnd/RendererModel.java",
"license": "gpl-2.0",
"size": 50413
} | [
"java.util.Collection",
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"org.apache.commons.collections.CollectionUtils",
"org.openmicroscopy.shoola.agents.metadata.MetadataViewerAgent",
"org.openmicroscopy.shoola.util.file.modulo.ModuloInfo",
"org.openmicroscopy.shoola.util.file.modulo.M... | import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.openmicroscopy.shoola.agents.metadata.MetadataViewerAgent; import org.openmicroscopy.shoola.util.file.modulo.ModuloInfo; import org.openmicroscopy.sh... | import java.util.*; import org.apache.commons.collections.*; import org.openmicroscopy.shoola.agents.metadata.*; import org.openmicroscopy.shoola.util.file.modulo.*; | [
"java.util",
"org.apache.commons",
"org.openmicroscopy.shoola"
] | java.util; org.apache.commons; org.openmicroscopy.shoola; | 1,986,447 |
private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace =... | void function(java.lang.String namespace, java.lang.String attName, javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String attributeNamespace = qname.getNamespaceURI(); java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNam... | /**
* Util method to write an attribute without the ns prefix
*/ | Util method to write an attribute without the ns prefix | writeQNameAttribute | {
"repo_name": "zzsoszz/axis2webservice",
"path": "opensource_axis2.1.6.2/org/apache/axis2/databinding/types/soapencoding/AnyURI.java",
"license": "apache-2.0",
"size": 21294
} | [
"javax.xml.stream.XMLStreamWriter"
] | import javax.xml.stream.XMLStreamWriter; | import javax.xml.stream.*; | [
"javax.xml"
] | javax.xml; | 1,329,085 |
@Test
public void testResourceRequestRecoveryToTheRightAppAttempt()
throws Exception {
configureScheduler();
YarnConfiguration conf = getConf();
MockRM rm = new MockRM(conf);
try {
rm.start();
RMApp rmApp =
rm.submitApp(200, "name", "user",
new HashMap<Applic... | void function() throws Exception { configureScheduler(); YarnConfiguration conf = getConf(); MockRM rm = new MockRM(conf); try { rm.start(); RMApp rmApp = rm.submitApp(200, "name", "user", new HashMap<ApplicationAccessType, String>(), false, STR, -1, null, "Test", false, true); MockNM node = new MockNM(STR, 10240, rm.g... | /**
* Test to verify that ResourceRequests recovery back to the right app-attempt
* after a container gets killed at ACQUIRED state: YARN-4502.
*
* @throws Exception
*/ | Test to verify that ResourceRequests recovery back to the right app-attempt after a container gets killed at ACQUIRED state: YARN-4502 | testResourceRequestRecoveryToTheRightAppAttempt | {
"repo_name": "legend-hua/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestAbstractYarnScheduler.java",
"license": "apache-2.0",
"size": 35457
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"org.apache.hadoop.yarn.api.records.ApplicationAccessType",
"org.apache.hadoop.yarn.api.records.ApplicationAttemptId",
"org.apache.hadoop.yarn.api.records.Container",
"org.apache.hadoop.yarn.api.records.ContainerId",
"org.apache.hadoop.yarn... | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.hadoop.yarn.api.records.ApplicationAccessType; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.api.records.Container; import org.apache.hadoop.yarn.api.records.ContainerId; import... | import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.conf.*; import org.apache.hadoop.yarn.server.resourcemanager.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.*; import org.apache.hadoop.yarn... | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 2,553,885 |
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
this.createFlatWorldListSlotGui.drawScreen(mouseX, mouseY, partialTicks);
this.drawCenteredString(this.fontRenderer, this.flatWorldTitle, this.width / 2, 8, 16777215);
int i = this.... | void function(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); this.createFlatWorldListSlotGui.drawScreen(mouseX, mouseY, partialTicks); this.drawCenteredString(this.fontRenderer, this.flatWorldTitle, this.width / 2, 8, 16777215); int i = this.width / 2 - 92 - 16; this.drawString(this.fontRen... | /**
* Draws the screen and all the components in it.
*/ | Draws the screen and all the components in it | drawScreen | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiCreateFlatWorld.java",
"license": "gpl-3.0",
"size": 12638
} | [
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import net.minecraftforge.fml.relauncher.*; | [
"net.minecraftforge.fml"
] | net.minecraftforge.fml; | 1,145,671 |
public List<WeatherLocation> getWeatherLocationsForUser(Long userId) {
return this.weatherLocationRepository.findByUserId(userId);
} | List<WeatherLocation> function(Long userId) { return this.weatherLocationRepository.findByUserId(userId); } | /**
* Gets all weather locations for a user
* @param userId the user id to find by
* @return the list of weather locations for a user
*/ | Gets all weather locations for a user | getWeatherLocationsForUser | {
"repo_name": "jackcmeyer/SmartSync",
"path": "smartsync-weather-service/src/main/java/com/smartsync/service/WeatherService.java",
"license": "mit",
"size": 3538
} | [
"com.smartsync.model.WeatherLocation",
"java.util.List"
] | import com.smartsync.model.WeatherLocation; import java.util.List; | import com.smartsync.model.*; import java.util.*; | [
"com.smartsync.model",
"java.util"
] | com.smartsync.model; java.util; | 397,708 |
private void initPaths() {
pathHorizontal.add(new Step(1, 0));
pathHorizontal.add(new Step(1, 0));
pathHorizontal.add(new Step(1, 0));
pathHorizontal.setID(1);
pathLShape.add(new Step(0, -1));
pathLShape.add(new Step(0, -1));
pathLShape.add(new Step(0, -1));
pathLShape.add(new Step(1, 0));
pathLSh... | void function() { pathHorizontal.add(new Step(1, 0)); pathHorizontal.add(new Step(1, 0)); pathHorizontal.add(new Step(1, 0)); pathHorizontal.setID(1); pathLShape.add(new Step(0, -1)); pathLShape.add(new Step(0, -1)); pathLShape.add(new Step(0, -1)); pathLShape.add(new Step(1, 0)); pathLShape.setID(2); pathZShape.add(ne... | /**
* Initializes the paths that will be used for the tests.
*/ | Initializes the paths that will be used for the tests | initPaths | {
"repo_name": "hndgzkn/dpgame",
"path": "org.dpgame/src/tests/org/dpgame/visitor/model/components/JUnit_VisitorSolutionCompiler.java",
"license": "gpl-3.0",
"size": 9718
} | [
"org.dpgame.puzzle.model.basics.HVPath",
"org.dpgame.puzzle.model.basics.Step"
] | import org.dpgame.puzzle.model.basics.HVPath; import org.dpgame.puzzle.model.basics.Step; | import org.dpgame.puzzle.model.basics.*; | [
"org.dpgame.puzzle"
] | org.dpgame.puzzle; | 1,110,714 |
public void setAppMessageFinder(AppMessageFinder appMessageFinder) {
this.appMessageFinder = appMessageFinder;
} | void function(AppMessageFinder appMessageFinder) { this.appMessageFinder = appMessageFinder; } | /**
* Sets the app message finder.
*
* @param appMessageFinder the app message finder
*/ | Sets the app message finder | setAppMessageFinder | {
"repo_name": "openegovplatform/OEPv2",
"path": "oep-ssomgt-portlet/docroot/WEB-INF/src/org/oep/ssomgt/service/base/AppMessageServiceBaseImpl.java",
"license": "apache-2.0",
"size": 21159
} | [
"org.oep.ssomgt.service.persistence.AppMessageFinder"
] | import org.oep.ssomgt.service.persistence.AppMessageFinder; | import org.oep.ssomgt.service.persistence.*; | [
"org.oep.ssomgt"
] | org.oep.ssomgt; | 1,445,440 |
public Model createSphere(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, final Material material, final long attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) {
return createSphere(width, height, depth, divisionsU, divisionsV, flipN... | Model function(float width, float height, float depth, int divisionsU, int divisionsV, boolean flipNormals, final Material material, final long attributes, float angleUFrom, float angleUTo, float angleVFrom, float angleVTo) { return createSphere(width, height, depth, divisionsU, divisionsV, flipNormals, GL20.GL_TRIANGL... | /**
* Convenience method to create a model with a single node containing a
* sphere shape. The resources the Material might contain are not managed,
* use {@link Model#manageDisposable(Disposable)} to add those to the model.
*
* @param attributes
* bitwise mask of the
* ... | Convenience method to create a model with a single node containing a sphere shape. The resources the Material might contain are not managed, use <code>Model#manageDisposable(Disposable)</code> to add those to the model | createSphere | {
"repo_name": "ari-zah/gaiasky",
"path": "core/src/gaia/cu9/ari/gaiaorbit/util/g3d/ModelBuilder2.java",
"license": "lgpl-3.0",
"size": 43207
} | [
"com.badlogic.gdx.graphics.g3d.Material",
"com.badlogic.gdx.graphics.g3d.Model"
] | import com.badlogic.gdx.graphics.g3d.Material; import com.badlogic.gdx.graphics.g3d.Model; | import com.badlogic.gdx.graphics.g3d.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 990,567 |
public BigInteger period() {
RandomGeneratorProperties properties = getProperties();
int i = properties.i();
int j = properties.j();
int k = properties.k();
if (i == 0 && j == 0 && k == 0) {
return BigInteger.ZERO;
} else {
return BigInteger.O... | BigInteger function() { RandomGeneratorProperties properties = getProperties(); int i = properties.i(); int j = properties.j(); int k = properties.k(); if (i == 0 && j == 0 && k == 0) { return BigInteger.ZERO; } else { return BigInteger.ONE.shiftLeft(i).subtract(BigInteger.valueOf(j)).shiftLeft(k); } } | /**
* Return the period of the <a href="package-summary.html#algorithms">algorithm</a>
* used by the random number generator.
* Returns BigInteger.ZERO if period is not determinable.
*
* @return BigInteger period.
*/ | Return the period of the algorithm used by the random number generator. Returns BigInteger.ZERO if period is not determinable | period | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/java/util/random/RandomGeneratorFactory.java",
"license": "apache-2.0",
"size": 23374
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 2,735,190 |
int countAllMembersNamesForGroup(String group, XWikiContext context) throws XWikiException; | int countAllMembersNamesForGroup(String group, XWikiContext context) throws XWikiException; | /**
* Return the number of members provided group contains.
*
* @param group the name of the group.
* @param context the XWiki context.
* @return the number of members.
* @throws XWikiException error when getting number of groups.
* @since 1.1.2
* @since 1.2M2
*/ | Return the number of members provided group contains | countAllMembersNamesForGroup | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/api/XWikiGroupService.java",
"license": "lgpl-2.1",
"size": 11143
} | [
"com.xpn.xwiki.XWikiContext",
"com.xpn.xwiki.XWikiException"
] | import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException; | import com.xpn.xwiki.*; | [
"com.xpn.xwiki"
] | com.xpn.xwiki; | 1,611,351 |
public String readXml(ElasticContext ec, String id, String indexName) throws Exception {
return (new XmlContent(ec)).readXml(ec,id,indexName);
} | String function(ElasticContext ec, String id, String indexName) throws Exception { return (new XmlContent(ec)).readXml(ec,id,indexName); } | /**
* Read an xml.
* @param ec the context
* @param id the id
* @return the index name
* @throws Exception
*/ | Read an xml | readXml | {
"repo_name": "usgin/geoportal-server-catalog",
"path": "geoportal/src/main/java/com/esri/geoportal/lib/elastic/util/ItemIO.java",
"license": "apache-2.0",
"size": 7537
} | [
"com.esri.geoportal.lib.elastic.ElasticContext",
"com.esri.geoportal.lib.elastic.kvp.XmlContent"
] | import com.esri.geoportal.lib.elastic.ElasticContext; import com.esri.geoportal.lib.elastic.kvp.XmlContent; | import com.esri.geoportal.lib.elastic.*; import com.esri.geoportal.lib.elastic.kvp.*; | [
"com.esri.geoportal"
] | com.esri.geoportal; | 908,640 |
public static View getFirstChildScrollableView(ViewGroup view){
View viewResult = null;
ArrayList<View> allViews = new ArrayList<View>();
if(null != view){
allViews= getAllChildViews(view);
for(View eachView : allViews){
if(eachView instanceof Scrol... | static View function(ViewGroup view){ View viewResult = null; ArrayList<View> allViews = new ArrayList<View>(); if(null != view){ allViews= getAllChildViews(view); for(View eachView : allViews){ if(eachView instanceof ScrollView eachView instanceof RecyclerView){ return eachView; } } } return viewResult; } | /**
* scroller or RecyclerView
* @param view
* @return
*/ | scroller or RecyclerView | getFirstChildScrollableView | {
"repo_name": "cxfeng1/weex",
"path": "android/playground/app/src/androidTest/java/com/alibaba/weex/util/ViewUtil.java",
"license": "apache-2.0",
"size": 4473
} | [
"android.support.v7.widget.RecyclerView",
"android.view.View",
"android.view.ViewGroup",
"android.widget.ScrollView",
"java.util.ArrayList"
] | import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.ScrollView; import java.util.ArrayList; | import android.support.v7.widget.*; import android.view.*; import android.widget.*; import java.util.*; | [
"android.support",
"android.view",
"android.widget",
"java.util"
] | android.support; android.view; android.widget; java.util; | 2,812,682 |
public void executeRecord(String strRecordId)
{
ScriptBuffer script = new ScriptBuffer();
script.appendCall(getContextPath() + "executeRecord", strRecordId);
ScriptSessions.addScript(script);
} | void function(String strRecordId) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + STR, strRecordId); ScriptSessions.addScript(script); } | /**
* Executes any bound code for the record with id strRecordId. This method only invokes the
EXECUTE model event for this tree under the deprecated 3.0 model event protocol.
* @param strRecordId <code>jsxid</code> value for the record node (according to the CDF) to execute
*/ | Executes any bound code for the record with id strRecordId. This method only invokes the | executeRecord | {
"repo_name": "burris/dwr",
"path": "ui/gi/generated/java/jsx3/gui/Tree.java",
"license": "apache-2.0",
"size": 87147
} | [
"org.directwebremoting.ScriptBuffer",
"org.directwebremoting.ScriptSessions"
] | import org.directwebremoting.ScriptBuffer; import org.directwebremoting.ScriptSessions; | import org.directwebremoting.*; | [
"org.directwebremoting"
] | org.directwebremoting; | 1,788,895 |
@SuppressWarnings("unchecked")
public synchronized ServerLocation getServerForGroups(
Collection<String> groups, Collection<String> intersectGroups,
Set<?> excludedServers) {
final Map<ServerLocation, LoadHolder> groupServers;
if (groups == null || groups.isEmpty()) {
groups = null;
... | @SuppressWarnings(STR) synchronized ServerLocation function( Collection<String> groups, Collection<String> intersectGroups, Set<?> excludedServers) { final Map<ServerLocation, LoadHolder> groupServers; if (groups == null groups.isEmpty()) { groups = null; if (intersectGroups != null && !intersectGroups.isEmpty()) { gro... | /**
* Pick the least loaded server in the given groups.
*
* @param groups
* the groups, or null if the client has no server group.
* @param excludedServers
* a list of servers to exclude as choices
* @return the least loaded server, or null if there are no servers that
* ... | Pick the least loaded server in the given groups | getServerForGroups | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorLoadSnapshot.java",
"license": "apache-2.0",
"size": 23993
} | [
"java.util.Collection",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"java.util.Set"
] | import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,230,904 |
void restoreMetadata() {
if (!CU.isPersistenceEnabled(ctx.config()))
return;
for (File file : workDir.listFiles()) {
try (FileInputStream in = new FileInputStream(file)) {
BinaryMetadata meta = U.unmarshal(ctx.config().getMarshaller(), in, U.resolveClassLoade... | void restoreMetadata() { if (!CU.isPersistenceEnabled(ctx.config())) return; for (File file : workDir.listFiles()) { try (FileInputStream in = new FileInputStream(file)) { BinaryMetadata meta = U.unmarshal(ctx.config().getMarshaller(), in, U.resolveClassLoader(ctx.config())); metadataLocCache.put(meta.typeId(), new Bin... | /**
* Restores metadata on startup of {@link CacheObjectBinaryProcessorImpl} but before starting discovery.
*/ | Restores metadata on startup of <code>CacheObjectBinaryProcessorImpl</code> but before starting discovery | restoreMetadata | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataFileStore.java",
"license": "apache-2.0",
"size": 6700
} | [
"java.io.File",
"java.io.FileInputStream",
"org.apache.ignite.internal.binary.BinaryMetadata",
"org.apache.ignite.internal.util.typedef.internal.CU",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import java.io.File; import java.io.FileInputStream; import org.apache.ignite.internal.binary.BinaryMetadata; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; | import java.io.*; import org.apache.ignite.internal.binary.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"java.io",
"org.apache.ignite"
] | java.io; org.apache.ignite; | 214,788 |
@Test
public void testImportApplicationsPostAPINotPublishedError() throws Exception {
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource("sampleApp.zip").getFile());
FileInputStream fis;
fis = new FileInputStream(file);
Att... | void function() throws Exception { ClassLoader classLoader = getClass().getClassLoader(); File file = new File(classLoader.getResource(STR).getFile()); FileInputStream fis; fis = new FileInputStream(file); Attachment fileInfo = Mockito.mock(Attachment.class); PowerMockito.mockStatic(RestApiUtil.class); PowerMockito.whe... | /**
* This method tests the functionality of ImportApplicationsGet, for an attempt to import a subscription when
* the target API is unavailable as it is not published
*
* @throws Exception Exception.
*/ | This method tests the functionality of ImportApplicationsGet, for an attempt to import a subscription when the target API is unavailable as it is not published | testImportApplicationsPostAPINotPublishedError | {
"repo_name": "nuwand/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.admin/src/test/java/org/wso2/carbon/apimgt/rest/api/admin/impl/ImportApiServiceImplTestCase.java",
"license": "apache-2.0",
"size": 10239
} | [
"java.io.File",
"java.io.FileInputStream",
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"java.util.SortedSet",
"java.util.TreeSet",
"javax.ws.rs.core.Response",
"org.apache.cxf.jaxrs.ext.multipart.Attachment",
"org.junit.Assert",
"org.mockito.Mockito",
"org.pow... | import java.io.File; import java.io.FileInputStream; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import javax.ws.rs.core.Response; import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.junit.Assert; impo... | import java.io.*; import java.util.*; import javax.ws.rs.core.*; import org.apache.cxf.jaxrs.ext.multipart.*; import org.junit.*; import org.mockito.*; import org.powermock.api.mockito.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.apimgt.rest.api.util.u... | [
"java.io",
"java.util",
"javax.ws",
"org.apache.cxf",
"org.junit",
"org.mockito",
"org.powermock.api",
"org.wso2.carbon"
] | java.io; java.util; javax.ws; org.apache.cxf; org.junit; org.mockito; org.powermock.api; org.wso2.carbon; | 2,317,228 |
public void addIngestJobEventListener(final PropertyChangeListener listener) {
jobEventPublisher.addSubscriber(INGEST_JOB_EVENT_NAMES, listener);
} | void function(final PropertyChangeListener listener) { jobEventPublisher.addSubscriber(INGEST_JOB_EVENT_NAMES, listener); } | /**
* Adds an ingest job event property change listener.
*
* @param listener The PropertyChangeListener to be added.
*/ | Adds an ingest job event property change listener | addIngestJobEventListener | {
"repo_name": "narfindustries/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java",
"license": "apache-2.0",
"size": 48733
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,523,237 |
public void print(String string) throws IOException
{
write(string.getBytes(outputEncoding));
} | void function(String string) throws IOException { write(string.getBytes(outputEncoding)); } | /**
* Write the given string to the buffer using the given encoding.
* @param string the given string
* @throws IOException If an error occurs during writing the data to the buffer
*/ | Write the given string to the buffer using the given encoding | print | {
"repo_name": "joansmith/pdfbox",
"path": "fontbox/src/main/java/org/apache/fontbox/cff/DataOutput.java",
"license": "apache-2.0",
"size": 3167
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,707,378 |
@VisibleForTesting
static boolean isFirstPointCloserRect(final WorldPoint firstPoint, final WorldPoint secondPoint, final Rectangle rect)
{
final WorldPoint nePoint = new WorldPoint((rect.x + rect.width), (rect.y + rect.height), 0);
if (!isFirstPointCloser(firstPoint, secondPoint, nePoint))
{
return fals... | static boolean isFirstPointCloserRect(final WorldPoint firstPoint, final WorldPoint secondPoint, final Rectangle rect) { final WorldPoint nePoint = new WorldPoint((rect.x + rect.width), (rect.y + rect.height), 0); if (!isFirstPointCloser(firstPoint, secondPoint, nePoint)) { return false; } final WorldPoint sePoint = ne... | /**
* Determines whether the first point passed is closer to each corner of the given rectangle than the second point.
*
* @param firstPoint First point to test. Return result will be relating to this point's location.
* @param secondPoint Second point to test
* @param rect Rectangle, whose corner poi... | Determines whether the first point passed is closer to each corner of the given rectangle than the second point | isFirstPointCloserRect | {
"repo_name": "runelite/runelite",
"path": "runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdSolver.java",
"license": "bsd-2-clause",
"size": 7800
} | [
"java.awt.Rectangle",
"net.runelite.api.coords.WorldPoint"
] | import java.awt.Rectangle; import net.runelite.api.coords.WorldPoint; | import java.awt.*; import net.runelite.api.coords.*; | [
"java.awt",
"net.runelite.api"
] | java.awt; net.runelite.api; | 2,396,761 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<FirewallRuleInner>> updateWithResponseAsync(
String resourceGroupName,
String accountName,
String firewallRuleName,
UpdateFirewallRuleParameters parameters) {
if (this.client.getEndpoint() == null) {
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<FirewallRuleInner>> function( String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.ge... | /**
* Updates the specified firewall rule.
*
* @param resourceGroupName The name of the Azure resource group.
* @param accountName The name of the Data Lake Store account.
* @param firewallRuleName The name of the firewall rule to update.
* @param parameters Parameters supplied to update t... | Updates the specified firewall rule | updateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datalakestore/azure-resourcemanager-datalakestore/src/main/java/com/azure/resourcemanager/datalakestore/implementation/FirewallRulesClientImpl.java",
"license": "mit",
"size": 55791
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.datalakestore.fluent.models.FirewallRuleInner",
"com.azure.resourcemanager.datalakestore.models.UpdateFirewallRuleParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.datalakestore.fluent.models.FirewallRuleInner; import com.azure.resourcemanager.datalakestore.models.UpdateFirewall... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.datalakestore.fluent.models.*; import com.azure.resourcemanager.datalakestore.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,162,405 |
public void setChannel( final AbstractSelectableChannel channel ) {
serverChannel = (ServerSocketChannel)channel;
}
public void setKey( final SelectionKey key ) {} | void function( final AbstractSelectableChannel channel ) { serverChannel = (ServerSocketChannel)channel; } public void setKey( final SelectionKey key ) {} | /**
* Expecting a ServerSocketChannel to be set here.
*
* @see coyote.mbus.network.NetworkServiceHandler#setChannel(java.nio.channels.spi.AbstractSelectableChannel)
*/ | Expecting a ServerSocketChannel to be set here | setChannel | {
"repo_name": "sdcote/blip",
"path": "src/main/java/coyote/mbus/network/MessageService.java",
"license": "mit",
"size": 10483
} | [
"java.nio.channels.SelectionKey",
"java.nio.channels.ServerSocketChannel",
"java.nio.channels.spi.AbstractSelectableChannel"
] | import java.nio.channels.SelectionKey; import java.nio.channels.ServerSocketChannel; import java.nio.channels.spi.AbstractSelectableChannel; | import java.nio.channels.*; import java.nio.channels.spi.*; | [
"java.nio"
] | java.nio; | 473,189 |
static ParamDescriptor of(Param param, Class<?> paramClass, StarlarkSemantics starlarkSemantics) {
String defaultExpr = param.defaultValue();
String disabledByFlag = null;
if (!starlarkSemantics.isFeatureEnabledBasedOnTogglingFlags(
param.enableOnlyWithFlag(), param.disableWithFlag())) {
def... | static ParamDescriptor of(Param param, Class<?> paramClass, StarlarkSemantics starlarkSemantics) { String defaultExpr = param.defaultValue(); String disabledByFlag = null; if (!starlarkSemantics.isFeatureEnabledBasedOnTogglingFlags( param.enableOnlyWithFlag(), param.disableWithFlag())) { defaultExpr = param.valueWhenDi... | /**
* Returns a {@link ParamDescriptor} representing the given raw {@link Param} annotation and the
* given semantics.
*/ | Returns a <code>ParamDescriptor</code> representing the given raw <code>Param</code> annotation and the given semantics | of | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/net/starlark/java/eval/ParamDescriptor.java",
"license": "apache-2.0",
"size": 8678
} | [
"com.google.common.base.Preconditions",
"java.util.ArrayList",
"java.util.List",
"net.starlark.java.annot.Param",
"net.starlark.java.annot.ParamType"
] | import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.List; import net.starlark.java.annot.Param; import net.starlark.java.annot.ParamType; | import com.google.common.base.*; import java.util.*; import net.starlark.java.annot.*; | [
"com.google.common",
"java.util",
"net.starlark.java"
] | com.google.common; java.util; net.starlark.java; | 2,307,934 |
public static ims.RefMan.domain.objects.TCIForPatientElectiveList extractTCIForPatientElectiveList(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.TCIForPatientElectiveListAppointmentDNAVo valueObject)
{
return extractTCIForPatientElectiveList(domainFactory, valueObject, new HashMap());
} | static ims.RefMan.domain.objects.TCIForPatientElectiveList function(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.TCIForPatientElectiveListAppointmentDNAVo valueObject) { return extractTCIForPatientElectiveList(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 | extractTCIForPatientElectiveList | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/RefMan/vo/domain/TCIForPatientElectiveListAppointmentDNAVoAssembler.java",
"license": "agpl-3.0",
"size": 18202
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,628,425 |
@SuppressLint("Recycle")
public static void extractAndApplyTypeface(TypefacedView typefacedView, Context context, AttributeSet attrs, int[] styleSet, int typefaceStyle) {
final TypedArray typedArray = context.obtainStyledAttributes(attrs, styleSet);
final String availableTypefaceString = typedAr... | @SuppressLint(STR) static void function(TypefacedView typefacedView, Context context, AttributeSet attrs, int[] styleSet, int typefaceStyle) { final TypedArray typedArray = context.obtainStyledAttributes(attrs, styleSet); final String availableTypefaceString = typedArray.getString(typefaceStyle); if (TextUtils.isEmpty(... | /**
* Extracts the desired typeface from the given style attributes.
*
* @param typefacedView The view to apply the typeface to. Views that implement this interface should
* have a styleable attribute "typeface."
* @param context context
* @param attrs pa... | Extracts the desired typeface from the given style attributes | extractAndApplyTypeface | {
"repo_name": "fiveagency/android-core",
"path": "android-core/src/main/java/eu/fiveminutes/ui/util/TypefaceUtils.java",
"license": "mit",
"size": 3883
} | [
"android.annotation.SuppressLint",
"android.content.Context",
"android.content.res.TypedArray",
"android.graphics.Typeface",
"android.text.TextUtils",
"android.util.AttributeSet",
"eu.fiveminutes.ui.TypefacedView"
] | import android.annotation.SuppressLint; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Typeface; import android.text.TextUtils; import android.util.AttributeSet; import eu.fiveminutes.ui.TypefacedView; | import android.annotation.*; import android.content.*; import android.content.res.*; import android.graphics.*; import android.text.*; import android.util.*; import eu.fiveminutes.ui.*; | [
"android.annotation",
"android.content",
"android.graphics",
"android.text",
"android.util",
"eu.fiveminutes.ui"
] | android.annotation; android.content; android.graphics; android.text; android.util; eu.fiveminutes.ui; | 1,120,950 |
public void setRestriction(int code, @AttributeUsage int usage, int mode,
String[] exceptionPackages) {
try {
final int uid = Binder.getCallingUid();
mService.setAudioRestriction(code, usage, uid, mode, exceptionPackages);
} catch (RemoteException e) {
... | void function(int code, @AttributeUsage int usage, int mode, String[] exceptionPackages) { try { final int uid = Binder.getCallingUid(); mService.setAudioRestriction(code, usage, uid, mode, exceptionPackages); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } | /**
* Set a non-persisted restriction on an audio operation at a stream-level.
* Restrictions are temporary additional constraints imposed on top of the persisted rules
* defined by {@link #setMode}.
*
* @param code The operation to restrict.
* @param usage The {@link android.media.AudioAt... | Set a non-persisted restriction on an audio operation at a stream-level. Restrictions are temporary additional constraints imposed on top of the persisted rules defined by <code>#setMode</code> | setRestriction | {
"repo_name": "xorware/android_frameworks_base",
"path": "core/java/android/app/AppOpsManager.java",
"license": "apache-2.0",
"size": 71322
} | [
"android.media.AudioAttributes",
"android.os.Binder",
"android.os.RemoteException"
] | import android.media.AudioAttributes; import android.os.Binder; import android.os.RemoteException; | import android.media.*; import android.os.*; | [
"android.media",
"android.os"
] | android.media; android.os; | 2,413,157 |
public static long convertStringToTimeMillis(String time) {
long result = 0;
if (time.endsWith("H")) {
long hoursToAdd = Integer.valueOf(StringUtils.remove(time, 'H'));
result = ((1000 * 60) * 60) * hoursToAdd;
} else if (time.endsWith("M")) {
long minsToAdd = Integer.valueOf(StringUtils.remove(... | static long function(String time) { long result = 0; if (time.endsWith("H")) { long hoursToAdd = Integer.valueOf(StringUtils.remove(time, 'H')); result = ((1000 * 60) * 60) * hoursToAdd; } else if (time.endsWith("M")) { long minsToAdd = Integer.valueOf(StringUtils.remove(time, 'M')); result = (1000 * 60) * minsToAdd; }... | /**
* Converts a string denoting an amount of time into milliseconds. Strings
* are expected to follow this form where # equals a digit: #M The following
* are permitted for denoting time: H = hours, M = minutes, S = seconds
*
* @param time time
* @return time in milliseconds
*/ | Converts a string denoting an amount of time into milliseconds. Strings are expected to follow this form where # equals a digit: #M The following are permitted for denoting time: H = hours, M = minutes, S = seconds | convertStringToTimeMillis | {
"repo_name": "cwpenhale/red5-mobileconsole",
"path": "red5_server/src/main/java/org/red5/server/util/PropertyConverter.java",
"license": "apache-2.0",
"size": 5698
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,829,514 |
protected void checkState() {
boolean valid = true;
invalidFieldEditor = null;
// The state can only be set to true if all
// field editors contain a valid value. So we must check them all
if (fields != null) {
int size = fields.size();
for (int i = 0; i < size; i++) {
FieldEditor editor = fields... | void function() { boolean valid = true; invalidFieldEditor = null; if (fields != null) { int size = fields.size(); for (int i = 0; i < size; i++) { FieldEditor editor = fields.get(i); valid = valid && editor.isValid(); if (!valid) { invalidFieldEditor = editor; break; } } } setValid(valid); } | /**
* Recomputes the page's error state by calling <code>isValid</code> for
* every field editor.
*/ | Recomputes the page's error state by calling <code>isValid</code> for every field editor | checkState | {
"repo_name": "ChallenHB/droolsjbpm-tools",
"path": "drools-eclipse/org.kie.eclipse.navigator/src/main/java/org/kie/eclipse/navigator/preferences/FieldEditorPropertyPage.java",
"license": "apache-2.0",
"size": 9297
} | [
"org.eclipse.jface.preference.FieldEditor"
] | import org.eclipse.jface.preference.FieldEditor; | import org.eclipse.jface.preference.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 481,241 |
public void afterIndexClosed(Index index, @IndexSettings Settings indexSettings) {
} | void function(Index index, @IndexSettings Settings indexSettings) { } | /**
* Called after the index has been closed.
*
* @param index The index
*/ | Called after the index has been closed | afterIndexClosed | {
"repo_name": "jeteve/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/indices/IndicesLifecycle.java",
"license": "apache-2.0",
"size": 6921
} | [
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.index.Index",
"org.elasticsearch.index.settings.IndexSettings"
] | import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.Index; import org.elasticsearch.index.settings.IndexSettings; | import org.elasticsearch.common.settings.*; import org.elasticsearch.index.*; import org.elasticsearch.index.settings.*; | [
"org.elasticsearch.common",
"org.elasticsearch.index"
] | org.elasticsearch.common; org.elasticsearch.index; | 2,533,217 |
public String peek(int length) throws IOException {
int[] array = new int[length];
peek(array);
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < length; i++) {
if (array[i] != -1) {
buffer.append((char)array[i]);
} else {
break;
}
}
return buff... | String function(int length) throws IOException { int[] array = new int[length]; peek(array); StringBuffer buffer = new StringBuffer(); for (int i = 0; i < length; i++) { if (array[i] != -1) { buffer.append((char)array[i]); } else { break; } } return buffer.toString(); } | /**
* Return the string represented by the next given length characters in the
* reader without advancing the reader.
*
* @param length how far ahead to peek
*
* @return the character the next read operation will return
*
* @throws IOException
*/ | Return the string represented by the next given length characters in the reader without advancing the reader | peek | {
"repo_name": "sdcote/dataframe",
"path": "src/main/java/coyote/commons/StringParser.java",
"license": "mit",
"size": 20272
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,279,758 |
public String getString(int index) throws IOException {
InputStream in = newInputStream(index);
return in != null ? inputStreamToString(in) : null;
} | String function(int index) throws IOException { InputStream in = newInputStream(index); return in != null ? inputStreamToString(in) : null; } | /**
* Returns the last committed value as a string, or null if no value
* has been committed.
*/ | Returns the last committed value as a string, or null if no value has been committed | getString | {
"repo_name": "niostar/DouFM",
"path": "app/src/main/java/info/doufm/android/io/DiskLruCache.java",
"license": "mit",
"size": 33957
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 7,638 |
String name() throws IOException; | String name() throws IOException; | /**
* Gets name of the FS.
* @return name of this file system.
* @throws IOException in case of failure.
*/ | Gets name of the FS | name | {
"repo_name": "mcherkasov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsSecondaryFileSystemTestAdapter.java",
"license": "apache-2.0",
"size": 3750
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,556,165 |
void infer(@Nullable Handler<? super Statement> handler) throws IOException,
IllegalStateException; | void infer(@Nullable Handler<? super Statement> handler) throws IOException, IllegalStateException; | /**
* Performs inference, materializing the logical closure of the RDF statements contained in
* the triple store. The method accepts an optional {@code Handler} inferred statements can be
* notified to, allowing for their additional processing by external code.
*
* @param handler
* ... | Performs inference, materializing the logical closure of the RDF statements contained in the triple store. The method accepts an optional Handler inferred statements can be notified to, allowing for their additional processing by external code | infer | {
"repo_name": "dkmfbk/knowledgestore",
"path": "ks-server/src/main/java/eu/fbk/knowledgestore/triplestore/TripleTransaction.java",
"license": "apache-2.0",
"size": 11112
} | [
"eu.fbk.knowledgestore.data.Handler",
"java.io.IOException",
"javax.annotation.Nullable",
"org.openrdf.model.Statement"
] | import eu.fbk.knowledgestore.data.Handler; import java.io.IOException; import javax.annotation.Nullable; import org.openrdf.model.Statement; | import eu.fbk.knowledgestore.data.*; import java.io.*; import javax.annotation.*; import org.openrdf.model.*; | [
"eu.fbk.knowledgestore",
"java.io",
"javax.annotation",
"org.openrdf.model"
] | eu.fbk.knowledgestore; java.io; javax.annotation; org.openrdf.model; | 61,013 |
public DataTable ave_stdev(List<DataColumn> cols) throws Exception {
DataTable rTable = new DataTable();
for (DataColumn col : cols) {
rTable.addColumn(col.getColumnName(), DataTypes.Double);
rTable.addColumn(col.getColumnName() + "_sd", DataTypes.Double);
}
... | DataTable function(List<DataColumn> cols) throws Exception { DataTable rTable = new DataTable(); for (DataColumn col : cols) { rTable.addColumn(col.getColumnName(), DataTypes.Double); rTable.addColumn(col.getColumnName() + "_sd", DataTypes.Double); } DataRow nRow = rTable.addRow(); for (DataColumn col : cols) { List<Do... | /**
* Average data and calculate standard deviation
*
* @param cols The data columns
* @return Result data table
* @throws Exception
*/ | Average data and calculate standard deviation | ave_stdev | {
"repo_name": "meteoinfo/meteoinfolib",
"path": "src/org/meteoinfo/data/TableData.java",
"license": "lgpl-3.0",
"size": 41061
} | [
"java.util.List",
"org.meteoinfo.data.analysis.Statistics",
"org.meteoinfo.table.DataColumn",
"org.meteoinfo.table.DataRow",
"org.meteoinfo.table.DataTable"
] | import java.util.List; import org.meteoinfo.data.analysis.Statistics; import org.meteoinfo.table.DataColumn; import org.meteoinfo.table.DataRow; import org.meteoinfo.table.DataTable; | import java.util.*; import org.meteoinfo.data.analysis.*; import org.meteoinfo.table.*; | [
"java.util",
"org.meteoinfo.data",
"org.meteoinfo.table"
] | java.util; org.meteoinfo.data; org.meteoinfo.table; | 2,282,852 |
public void addSeeAlso(Resource value) {
Base.add(this.model, this.getResource(), SEEALSO, value);
}
| void function(Resource value) { Base.add(this.model, this.getResource(), SEEALSO, value); } | /**
* Adds a value to property SeeAlso from an instance of Resource
*
* @param value
*
* [Generated from RDFReactor template rule #add4dynamic]
*/ | Adds a value to property SeeAlso from an instance of Resource | addSeeAlso | {
"repo_name": "semweb4j/semweb4j",
"path": "org.semweb4j.rdfreactor.generator/src/main/java/org/ontoware/rdfreactor/schema/bootstrap/Resource.java",
"license": "bsd-2-clause",
"size": 83665
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 1,541,715 |
public Map<String, XAnnotationField<?>> getFieldsMap() {
return fieldsMap;
} | Map<String, XAnnotationField<?>> function() { return fieldsMap; } | /**
* Returns the map of the fields.
*
* @return map of the fields.
*/ | Returns the map of the fields | getFieldsMap | {
"repo_name": "highsource/annox",
"path": "core/src/main/java/org/jvnet/annox/model/XAnnotation.java",
"license": "bsd-2-clause",
"size": 7326
} | [
"java.util.Map",
"org.jvnet.annox.model.annotation.field.XAnnotationField"
] | import java.util.Map; import org.jvnet.annox.model.annotation.field.XAnnotationField; | import java.util.*; import org.jvnet.annox.model.annotation.field.*; | [
"java.util",
"org.jvnet.annox"
] | java.util; org.jvnet.annox; | 2,093,556 |
public static void setSession(ApplicationSession session) {
VuforiaBackgroundPlugin.session = session;
} | static void function(ApplicationSession session) { VuforiaBackgroundPlugin.session = session; } | /**
* Set the currect Vuforia sessions, so the plugin can mange Vuforia state.
*
* @param session
*/ | Set the currect Vuforia sessions, so the plugin can mange Vuforia state | setSession | {
"repo_name": "Laureckis/cordova-plugin-vuforia-background",
"path": "src/android/lv/aspired/vuforia/VuforiaBackgroundPlugin.java",
"license": "mit",
"size": 13848
} | [
"lv.aspired.vuforia.app.ApplicationSession"
] | import lv.aspired.vuforia.app.ApplicationSession; | import lv.aspired.vuforia.app.*; | [
"lv.aspired.vuforia"
] | lv.aspired.vuforia; | 806,592 |
public final OperationsClient getOperationsClient() {
return operationsClient;
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists possible versions for Data Fusion instances in the specified project and location.
*
* <p>Sample code:
*
* <pre>{@code
* try (DataFusionClient dataFusio... | final OperationsClient function() { return operationsClient; } /** * Lists possible versions for Data Fusion instances in the specified project and location. * * <p>Sample code: * * <pre>{ * try (DataFusionClient dataFusionClient = DataFusionClient.create()) { * LocationName parent = LocationName.of(STR, STR); * for (V... | /**
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/ | Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call | getOperationsClient | {
"repo_name": "googleapis/java-data-fusion",
"path": "google-cloud-data-fusion/src/main/java/com/google/cloud/datafusion/v1beta1/DataFusionClient.java",
"license": "apache-2.0",
"size": 66708
} | [
"com.google.longrunning.OperationsClient"
] | import com.google.longrunning.OperationsClient; | import com.google.longrunning.*; | [
"com.google.longrunning"
] | com.google.longrunning; | 652,339 |
public Attributes getMainAttributes() throws java.io.IOException {
Manifest m = getJarFile().getManifest();
return (m == null) ? null : m.getMainAttributes();
} | Attributes function() throws java.io.IOException { Manifest m = getJarFile().getManifest(); return (m == null) ? null : m.getMainAttributes(); } | /**
* Gets all attributes of the manifest file referenced by this {@code
* JarURLConnection}. If this instance refers to a JAR-file rather than a
* JAR-file entry, {@code null} will be returned.
*
* @return the attributes of the manifest file or {@code null}.
* @throws IOException
* ... | Gets all attributes of the manifest file referenced by this JarURLConnection. If this instance refers to a JAR-file rather than a JAR-file entry, null will be returned | getMainAttributes | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/java/net/JarURLConnection.java",
"license": "apache-2.0",
"size": 6699
} | [
"java.io.IOException",
"java.util.jar.Attributes",
"java.util.jar.Manifest"
] | import java.io.IOException; import java.util.jar.Attributes; import java.util.jar.Manifest; | import java.io.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,123,269 |
public StreamDefinition getExportedStreamDefinition() {
return exportedStreamDefinition;
} | StreamDefinition function() { return exportedStreamDefinition; } | /**
* Returns the stream definition that is exported by this event builder.
* This stream definition will available to any object that consumes the event builder service
* (e.g. EventProcessors)
*
* @return the {@link StreamDefinition} of the stream that will be
* sending out event... | Returns the stream definition that is exported by this event builder. This stream definition will available to any object that consumes the event builder service (e.g. EventProcessors) | getExportedStreamDefinition | {
"repo_name": "lankavitharana/carbon-event-processing",
"path": "components/event-stream/event-builder/org.wso2.carbon.event.builder.core/src/main/java/org/wso2/carbon/event/builder/core/internal/EventBuilder.java",
"license": "apache-2.0",
"size": 15931
} | [
"org.wso2.carbon.databridge.commons.StreamDefinition"
] | import org.wso2.carbon.databridge.commons.StreamDefinition; | import org.wso2.carbon.databridge.commons.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 959,176 |
private String toString(Collection<?> collection, int maxLen) {
StringBuilder builder = new StringBuilder();
builder.append("[");
int i = 0;
for (Iterator<?> iterator = collection.iterator(); iterator.hasNext() && i < maxLen; i++) {
if (i > 0)
builder.append(", ");
builder.append(i... | String function(Collection<?> collection, int maxLen) { StringBuilder builder = new StringBuilder(); builder.append("["); int i = 0; for (Iterator<?> iterator = collection.iterator(); iterator.hasNext() && i < maxLen; i++) { if (i > 0) builder.append(STR); builder.append(iterator.next()); } builder.append("]"); return ... | /**
* To string.
*
* @param collection the collection
* @param maxLen the max len
* @return the string
*/ | To string | toString | {
"repo_name": "apache/uima-uimaj",
"path": "uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSHashSet.java",
"license": "apache-2.0",
"size": 14162
} | [
"java.util.Collection",
"java.util.Iterator"
] | import java.util.Collection; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,777,115 |
void signal(ServerType server, String hostname, String signal) throws IOException; | void signal(ServerType server, String hostname, String signal) throws IOException; | /**
* Send the provided signal to the process on the host
*/ | Send the provided signal to the process on the host | signal | {
"repo_name": "keith-turner/accumulo",
"path": "minicluster/src/main/java/org/apache/accumulo/cluster/ClusterControl.java",
"license": "apache-2.0",
"size": 2771
} | [
"java.io.IOException",
"org.apache.accumulo.minicluster.ServerType"
] | import java.io.IOException; import org.apache.accumulo.minicluster.ServerType; | import java.io.*; import org.apache.accumulo.minicluster.*; | [
"java.io",
"org.apache.accumulo"
] | java.io; org.apache.accumulo; | 2,307,927 |
protected IndexShard newShard(boolean primary) throws IOException {
return newShard(primary, Settings.EMPTY);
} | IndexShard function(boolean primary) throws IOException { return newShard(primary, Settings.EMPTY); } | /**
* Creates a new initializing shard. The shard will have its own unique data path.
*
* @param primary indicates whether to a primary shard (ready to recover from an empty store) or a replica (ready to recover from
* another shard)
*/ | Creates a new initializing shard. The shard will have its own unique data path | newShard | {
"repo_name": "ern/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java",
"license": "apache-2.0",
"size": 44678
} | [
"java.io.IOException",
"org.elasticsearch.common.settings.Settings"
] | import java.io.IOException; import org.elasticsearch.common.settings.Settings; | import java.io.*; import org.elasticsearch.common.settings.*; | [
"java.io",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.common; | 1,544,110 |
@Override
protected AWSIoTFleetHubAsync build(AwsAsyncClientParams params) {
return new AWSIoTFleetHubAsyncClient(params);
} | AWSIoTFleetHubAsync function(AwsAsyncClientParams params) { return new AWSIoTFleetHubAsyncClient(params); } | /**
* Construct an asynchronous implementation of AWSIoTFleetHubAsync using the current builder configuration.
*
* @param params
* Current builder configuration represented as a parameter object.
* @return Fully configured implementation of AWSIoTFleetHubAsync.
*/ | Construct an asynchronous implementation of AWSIoTFleetHubAsync using the current builder configuration | build | {
"repo_name": "aws/aws-sdk-java",
"path": "aws-java-sdk-iotfleethub/src/main/java/com/amazonaws/services/iotfleethub/AWSIoTFleetHubAsyncClientBuilder.java",
"license": "apache-2.0",
"size": 2432
} | [
"com.amazonaws.client.AwsAsyncClientParams"
] | import com.amazonaws.client.AwsAsyncClientParams; | import com.amazonaws.client.*; | [
"com.amazonaws.client"
] | com.amazonaws.client; | 148,560 |
public static MozuClient<com.mozu.api.contracts.location.LocationCollection> getLocationsInUsageTypeClient(String locationUsageType) throws Exception
{
return getLocationsInUsageTypeClient( locationUsageType, null, null, null, null, null);
} | static MozuClient<com.mozu.api.contracts.location.LocationCollection> function(String locationUsageType) throws Exception { return getLocationsInUsageTypeClient( locationUsageType, null, null, null, null, null); } | /**
* Retrieves a list of the locations configured for a specified location usage type for the specified site, according to any defined filter or sort criteria.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.location.LocationCollection> mozuClient=GetLocationsInUsageTypeClient( locationUsageType);
* clien... | Retrieves a list of the locations configured for a specified location usage type for the specified site, according to any defined filter or sort criteria. <code><code> MozuClient mozuClient=GetLocationsInUsageTypeClient( locationUsageType); client.setBaseAddress(url); client.executeRequest(); LocationCollection locatio... | getLocationsInUsageTypeClient | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/LocationClient.java",
"license": "mit",
"size": 15090
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,374,106 |
public StepMeta newStep( TransMeta transMeta, String name, String description, boolean openit, boolean rename ) {
StepMeta inf = null;
// See if we need to rename the step to avoid doubles!
if ( rename && transMeta.findStep( name ) != null ) {
int i = 2;
String newName = name + " " + i;
... | StepMeta function( TransMeta transMeta, String name, String description, boolean openit, boolean rename ) { StepMeta inf = null; if ( rename && transMeta.findStep( name ) != null ) { int i = 2; String newName = name + " " + i; while ( transMeta.findStep( newName ) != null ) { i++; newName = name + " " + i; } name = new... | /**
* Allocate new step, optionally open and rename it.
*
* @param name
* Name of the new step
* @param description
* Description of the type of step
* @param openit
* Open the dialog for this step?
* @param rename
* Rename this step?
*
* @return T... | Allocate new step, optionally open and rename it | newStep | {
"repo_name": "codek/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/spoon/Spoon.java",
"license": "apache-2.0",
"size": 340171
} | [
"java.io.File",
"java.io.FileInputStream",
"org.eclipse.swt.widgets.MessageBox",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.core.plugins.PluginInterface",
"org.pentaho.di.core.plugins.PluginRegistry",
"org.pentaho.di.core.plugins.StepPluginType",
"o... | import java.io.File; import java.io.FileInputStream; import org.eclipse.swt.widgets.MessageBox; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.plugins.PluginInterface; import org.pentaho.di.core.plugins.PluginRegistry; import org.pentaho.di.core.plugin... | import java.io.*; import org.eclipse.swt.widgets.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.plugins.*; import org.pentaho.di.i18n.*; import org.pentaho.di.trans.*; import org.pentaho.di.trans.step.*; import org.pentaho.di.ui.core.dialog.*; | [
"java.io",
"org.eclipse.swt",
"org.pentaho.di"
] | java.io; org.eclipse.swt; org.pentaho.di; | 624,706 |
public void bindParameters(final Map<Object, Object> iArgs) {
if (parameterItems == null || iArgs == null || iArgs.size() == 0)
return;
for (Entry<Object, Object> entry : iArgs.entrySet()) {
if (entry.getKey() instanceof Integer)
parameterItems.get(((Integer) entry.getKey())).setVal... | void function(final Map<Object, Object> iArgs) { if (parameterItems == null iArgs == null iArgs.size() == 0) return; for (Entry<Object, Object> entry : iArgs.entrySet()) { if (entry.getKey() instanceof Integer) parameterItems.get(((Integer) entry.getKey())).setValue(entry.setValue(entry.getValue())); else { String para... | /**
* Binds parameters.
*/ | Binds parameters | bindParameters | {
"repo_name": "DiceHoldingsInc/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/sql/filter/OSQLPredicate.java",
"license": "apache-2.0",
"size": 15245
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,785,798 |
public void setUniformf (String name, Color values) {
setUniformf(name, values.r, values.g, values.b, values.a);
}
| void function (String name, Color values) { setUniformf(name, values.r, values.g, values.b, values.a); } | /** Sets the uniform with the given name. The {@link ShaderProgram} must be bound for this to work.
*
* @param name the name of the uniform
* @param values r, g, b and a as the first through fourth values respectively */ | Sets the uniform with the given name. The <code>ShaderProgram</code> must be bound for this to work | setUniformf | {
"repo_name": "MadcowD/libgdx",
"path": "gdx/src/com/badlogic/gdx/graphics/glutils/ShaderProgram.java",
"license": "apache-2.0",
"size": 31675
} | [
"com.badlogic.gdx.graphics.Color"
] | import com.badlogic.gdx.graphics.Color; | import com.badlogic.gdx.graphics.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,451,082 |
protected void cleanup(Context context) throws IOException, InterruptedException {
| void function(Context context) throws IOException, InterruptedException { | /**
* Cleanup Mapper
* Get Top N results of this mapper, and pass them to reducer
*/ | Cleanup Mapper Get Top N results of this mapper, and pass them to reducer | cleanup | {
"repo_name": "hiiamok/DISH",
"path": "src/is/ImageSearcher.java",
"license": "mit",
"size": 10813
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,955,683 |
public ArrayList<Pojo> getFavorites() {
String favApps = PreferenceManager.getDefaultSharedPreferences(this.context).
getString("favorite-apps-list", "");
List<String> favAppsList = Arrays.asList(favApps.split(";"));
ArrayList<Pojo> favorites = new ArrayList<>(favAppsList.si... | ArrayList<Pojo> function() { String favApps = PreferenceManager.getDefaultSharedPreferences(this.context). getString(STR, STR;")); ArrayList<Pojo> favorites = new ArrayList<>(favAppsList.size()); for (int i = 0; i < favAppsList.size(); i++) { Pojo pojo = getPojo(favAppsList.get(i)); if (pojo != null) { favorites.add(po... | /**
* Return most used items.<br />
* May return null if no items were ever selected (app first use)
*
* @return favorites' pojo
*/ | Return most used items. May return null if no items were ever selected (app first use) | getFavorites | {
"repo_name": "Neamar/KISS",
"path": "app/src/main/java/fr/neamar/kiss/DataHandler.java",
"license": "gpl-3.0",
"size": 35477
} | [
"android.preference.PreferenceManager",
"fr.neamar.kiss.pojo.Pojo",
"java.util.ArrayList"
] | import android.preference.PreferenceManager; import fr.neamar.kiss.pojo.Pojo; import java.util.ArrayList; | import android.preference.*; import fr.neamar.kiss.pojo.*; import java.util.*; | [
"android.preference",
"fr.neamar.kiss",
"java.util"
] | android.preference; fr.neamar.kiss; java.util; | 2,282,736 |
public void write(StatusCodeType statusCodeType) throws ProcessingException {
StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.STATUS_CODE.get(), JBossSAMLURIConstants.PROTOCOL_NSURI.get());
URI value = statusCodeType.getValue();
if (value != null) {
StaxUt... | void function(StatusCodeType statusCodeType) throws ProcessingException { StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, JBossSAMLConstants.STATUS_CODE.get(), JBossSAMLURIConstants.PROTOCOL_NSURI.get()); URI value = statusCodeType.getValue(); if (value != null) { StaxUtil.writeAttribute(writer, JBossSAMLConstants.... | /**
* Write a {@code StatusCodeType} to stream
*
* @param statusCodeType
* @param out
*
* @throws ProcessingException
*/ | Write a StatusCodeType to stream | write | {
"repo_name": "vmuzikar/keycloak",
"path": "saml-core/src/main/java/org/keycloak/saml/processing/core/saml/v2/writers/SAMLResponseWriter.java",
"license": "apache-2.0",
"size": 11015
} | [
"org.keycloak.dom.saml.v2.protocol.StatusCodeType",
"org.keycloak.saml.common.constants.JBossSAMLConstants",
"org.keycloak.saml.common.constants.JBossSAMLURIConstants",
"org.keycloak.saml.common.exceptions.ProcessingException",
"org.keycloak.saml.common.util.StaxUtil"
] | import org.keycloak.dom.saml.v2.protocol.StatusCodeType; import org.keycloak.saml.common.constants.JBossSAMLConstants; import org.keycloak.saml.common.constants.JBossSAMLURIConstants; import org.keycloak.saml.common.exceptions.ProcessingException; import org.keycloak.saml.common.util.StaxUtil; | import org.keycloak.dom.saml.v2.protocol.*; import org.keycloak.saml.common.constants.*; import org.keycloak.saml.common.exceptions.*; import org.keycloak.saml.common.util.*; | [
"org.keycloak.dom",
"org.keycloak.saml"
] | org.keycloak.dom; org.keycloak.saml; | 1,096,941 |
public static InetAddress getIp(byte[] buffer, int offset, boolean v6) throws UnknownHostException {
if (v6)
return Inet6Address.getByAddress(IOBGPMessage.getBytes(buffer,offset,6));
return Inet4Address.getByAddress(IOBGPMessage.getBytes(buffer,offset,6));
}
| static InetAddress function(byte[] buffer, int offset, boolean v6) throws UnknownHostException { if (v6) return Inet6Address.getByAddress(IOBGPMessage.getBytes(buffer,offset,6)); return Inet4Address.getByAddress(IOBGPMessage.getBytes(buffer,offset,6)); } | /**
* Get ip address from a buffer in the offset position.
* @param buffer
* @param offset
* @param v6 This value say that it's ipv4 or ipv6
* @return Ip value in InetAddress format
* @throws UnknownHostException
*/ | Get ip address from a buffer in the offset position | getIp | {
"repo_name": "yunxao/JN-Sim",
"path": "Simulador/src/tid/utils/BytesUtils.java",
"license": "apache-2.0",
"size": 7733
} | [
"java.net.Inet4Address",
"java.net.Inet6Address",
"java.net.InetAddress",
"java.net.UnknownHostException"
] | import java.net.Inet4Address; import java.net.Inet6Address; import java.net.InetAddress; import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 1,876,477 |
public CmsUser readUser(CmsRequestContext context, String username, String password) throws CmsException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
CmsUser result = null;
try {
result = m_driverManager.readUser(dbc, CmsOrganizationalUnit.removeLeadingSep... | CmsUser function(CmsRequestContext context, String username, String password) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsUser result = null; try { result = m_driverManager.readUser(dbc, CmsOrganizationalUnit.removeLeadingSeparator(username), password); } catch (Exception e) { ... | /**
* Returns a user object if the password for the user is correct.<p>
*
* If the user/password pair is not valid a <code>{@link CmsException}</code> is thrown.<p>
*
* @param context the current request context
* @param username the user name of the user that is to be read
* @... | Returns a user object if the password for the user is correct. If the user/password pair is not valid a <code><code>CmsException</code></code> is thrown | readUser | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/db/CmsSecurityManager.java",
"license": "lgpl-2.1",
"size": 242914
} | [
"org.opencms.file.CmsRequestContext",
"org.opencms.file.CmsUser",
"org.opencms.main.CmsException",
"org.opencms.security.CmsOrganizationalUnit"
] | import org.opencms.file.CmsRequestContext; import org.opencms.file.CmsUser; import org.opencms.main.CmsException; import org.opencms.security.CmsOrganizationalUnit; | import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*; | [
"org.opencms.file",
"org.opencms.main",
"org.opencms.security"
] | org.opencms.file; org.opencms.main; org.opencms.security; | 1,940,112 |
public RestoreInProgress updateRestoreInfoWithRoutingChanges(RestoreInProgress restoreInProgress) {
return restoreInProgressUpdater.applyChanges(restoreInProgress);
} | RestoreInProgress function(RestoreInProgress restoreInProgress) { return restoreInProgressUpdater.applyChanges(restoreInProgress); } | /**
* Returns updated {@link RestoreInProgress} based on the changes that were made to the routing nodes
*/ | Returns updated <code>RestoreInProgress</code> based on the changes that were made to the routing nodes | updateRestoreInfoWithRoutingChanges | {
"repo_name": "coding0011/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java",
"license": "apache-2.0",
"size": 10369
} | [
"org.elasticsearch.cluster.RestoreInProgress"
] | import org.elasticsearch.cluster.RestoreInProgress; | import org.elasticsearch.cluster.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 1,169,204 |
public static ServletConfig getConfig( )
{
return _tlConfig.get( );
} | static ServletConfig function( ) { return _tlConfig.get( ); } | /**
* Read <code>ServletConfig</code> associate to the current thread
*
* @return the <code>ServletConfig</code> associate to the current thread
*/ | Read <code>ServletConfig</code> associate to the current thread | getConfig | {
"repo_name": "rzara/lutece-core",
"path": "src/java/fr/paris/lutece/portal/web/LocalVariables.java",
"license": "bsd-3-clause",
"size": 3703
} | [
"javax.servlet.ServletConfig"
] | import javax.servlet.ServletConfig; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 2,288,003 |
@Override
public Algorithm configure(Properties configuration) throws JMException {
Algorithm algorithm ;
Selection selection ;
Crossover crossover ;
Mutation mutation ;
HashMap parameters ; // Operator parameters
// Creating the algorithm.
algorithm = new SMSEMOA(problem_) ;
... | Algorithm function(Properties configuration) throws JMException { Algorithm algorithm ; Selection selection ; Crossover crossover ; Mutation mutation ; HashMap parameters ; algorithm = new SMSEMOA(problem_) ; populationSize_ = Integer.parseInt(configuration.getProperty(STR,String.valueOf(populationSize_))); maxEvaluati... | /**
* Configure SMSEMOA with user-defined parameter experiments.settings
* @return A SMSEMOA algorithm object
*/ | Configure SMSEMOA with user-defined parameter experiments.settings | configure | {
"repo_name": "dkatsios/JSOptimizer",
"path": "JSOptimizer/JMETALHOME/jmetal/experiments/settings/SMSEMOA_Settings.java",
"license": "gpl-3.0",
"size": 6610
} | [
"java.util.HashMap",
"java.util.Properties"
] | import java.util.HashMap; import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,502,609 |
public Collection<TableBlock> getTableBlocks() {
return tableBlocks;
} | Collection<TableBlock> function() { return tableBlocks; } | /**
* Returns the found {@link TableBlock}s.
*
* @return the {@link Collection} of {@link TableBlock}s.
*/ | Returns the found <code>TableBlock</code>s | getTableBlocks | {
"repo_name": "commitd/krill",
"path": "src/main/java/io/committed/krill/extraction/pdfbox/text/TableResult.java",
"license": "apache-2.0",
"size": 1194
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 659,669 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.