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 List<String> convertToIpAddressList(String addressist) { List<String> listIpAddress = null; if (addressist != null && !addressist.isEmpty()) { StringTokenizer tkn = new StringTokenizer(addressist, ", \t\n\r\f"); listIpAddress = new ArrayList<String>(t...
List<String> function(String addressist) { List<String> listIpAddress = null; if (addressist != null && !addressist.isEmpty()) { StringTokenizer tkn = new StringTokenizer(addressist, STR); listIpAddress = new ArrayList<String>(tkn.countTokens()); while (tkn.hasMoreTokens()) { String instance = tkn.nextToken(); listIpAd...
/** * Convert string of addresses to the address list. * * @param addressist */
Convert string of addresses to the address list
convertToIpAddressList
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/filesys/config/CIFSConfigBean.java", "license": "lgpl-3.0", "size": 14434 }
[ "java.util.ArrayList", "java.util.List", "java.util.StringTokenizer" ]
import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
2,135,362
public static List<GuardingDynamicLinker> loadLinkers(final ClassLoader cl) { return getLinkers(ServiceLoader.load(GuardingDynamicLinker.class, cl)); }
static List<GuardingDynamicLinker> function(final ClassLoader cl) { return getLinkers(ServiceLoader.load(GuardingDynamicLinker.class, cl)); }
/** * Discovers all guarding dynamic linkers listed in JAR files of the specified class loader. * * @param cl the class loader to use * @return a list of guarding dynamic linkers available through the specified class loader. Can be zero-length list * but not null. */
Discovers all guarding dynamic linkers listed in JAR files of the specified class loader
loadLinkers
{ "repo_name": "malaporte/kaziranga", "path": "src/jdk/internal/dynalink/support/AutoDiscovery.java", "license": "gpl-2.0", "size": 5945 }
[ "java.util.List", "java.util.ServiceLoader" ]
import java.util.List; import java.util.ServiceLoader;
import java.util.*;
[ "java.util" ]
java.util;
2,039,494
RestClient restClient();
RestClient restClient();
/** * Gets the REST client. * * @return the {@link RestClient} object. */
Gets the REST client
restClient
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/applicationinsights/microsoft-azure-applicationinsights-query/src/main/java/com/microsoft/azure/applicationinsights/query/ApplicationInsightsDataClient.java", "license": "mit", "size": 2990 }
[ "com.microsoft.rest.RestClient" ]
import com.microsoft.rest.RestClient;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
708,590
@Override public FieldSchema clone() throws CloneNotSupportedException { // Strings are immutable, so we don't need to copy alias. Schemas // are mutable so we need to make a copy. try { FieldSchema fs = new FieldSchema(alias, (sch...
FieldSchema function() throws CloneNotSupportedException { try { FieldSchema fs = new FieldSchema(alias, (schema == null ? null : schema.clone()), type); fs.canonicalName = CanonicalNamer.getNewName(); return fs; } catch (FrontendException fe) { throw new RuntimeException( STR, fe); } }
/** * Make a deep copy of this FieldSchema and return it. * @return clone of the this FieldSchema. * @throws CloneNotSupportedException */
Make a deep copy of this FieldSchema and return it
clone
{ "repo_name": "kaituo/sedge", "path": "trunk/src/org/apache/pig/impl/logicalLayer/schema/Schema.java", "license": "mit", "size": 72734 }
[ "org.apache.pig.impl.logicalLayer.CanonicalNamer", "org.apache.pig.impl.logicalLayer.FrontendException" ]
import org.apache.pig.impl.logicalLayer.CanonicalNamer; import org.apache.pig.impl.logicalLayer.FrontendException;
import org.apache.pig.impl.*;
[ "org.apache.pig" ]
org.apache.pig;
1,125,478
@MXBeanDescription("Total processed messages count.") public int getTotalProcessedMessages();
@MXBeanDescription(STR) int function();
/** * Gets total processed messages count. * * @return Total processed messages count. */
Gets total processed messages count
getTotalProcessedMessages
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java", "license": "apache-2.0", "size": 8612 }
[ "org.apache.ignite.mxbean.MXBeanDescription" ]
import org.apache.ignite.mxbean.MXBeanDescription;
import org.apache.ignite.mxbean.*;
[ "org.apache.ignite" ]
org.apache.ignite;
443,073
JobEntity createExecutableJobFromOtherJob(AbstractRuntimeJobEntity job);
JobEntity createExecutableJobFromOtherJob(AbstractRuntimeJobEntity job);
/** * Create an executable job from another job */
Create an executable job from another job
createExecutableJobFromOtherJob
{ "repo_name": "paulstapleton/flowable-engine", "path": "modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/asyncexecutor/JobManager.java", "license": "apache-2.0", "size": 7343 }
[ "org.flowable.job.service.impl.persistence.entity.AbstractRuntimeJobEntity", "org.flowable.job.service.impl.persistence.entity.JobEntity" ]
import org.flowable.job.service.impl.persistence.entity.AbstractRuntimeJobEntity; import org.flowable.job.service.impl.persistence.entity.JobEntity;
import org.flowable.job.service.impl.persistence.entity.*;
[ "org.flowable.job" ]
org.flowable.job;
590,608
public LegendItemCollection getLegendItems() { if (this.plot == null) { return new LegendItemCollection(); } LegendItemCollection result = new LegendItemCollection(); int index = this.plot.getIndexOf(this); XYDataset dataset = this.plot.getDataset(index); ...
LegendItemCollection function() { if (this.plot == null) { return new LegendItemCollection(); } LegendItemCollection result = new LegendItemCollection(); int index = this.plot.getIndexOf(this); XYDataset dataset = this.plot.getDataset(index); if (dataset != null) { int seriesCount = dataset.getSeriesCount(); for (int i...
/** * Returns a (possibly empty) collection of legend items for the series * that this renderer is responsible for drawing. * * @return The legend item collection (never <code>null</code>). */
Returns a (possibly empty) collection of legend items for the series that this renderer is responsible for drawing
getLegendItems
{ "repo_name": "apetresc/JFreeChart", "path": "src/main/java/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java", "license": "lgpl-2.1", "size": 74987 }
[ "org.jfree.chart.LegendItem", "org.jfree.chart.LegendItemCollection", "org.jfree.data.xy.XYDataset" ]
import org.jfree.chart.LegendItem; import org.jfree.chart.LegendItemCollection; import org.jfree.data.xy.XYDataset;
import org.jfree.chart.*; import org.jfree.data.xy.*;
[ "org.jfree.chart", "org.jfree.data" ]
org.jfree.chart; org.jfree.data;
717,964
ViewLifecyclePhase buildPhase(String viewPhase, LifecycleElement element, Component parent, String parentPath, List<String> refreshPaths);
ViewLifecyclePhase buildPhase(String viewPhase, LifecycleElement element, Component parent, String parentPath, List<String> refreshPaths);
/** * Creates a lifecycle phase instance for a specific component in the current lifecycle. * * @param viewPhase view phase to build an instance for * @param element lifecycle element to build an instance for * @param parent parent component * @param parentPath path relative to the p...
Creates a lifecycle phase instance for a specific component in the current lifecycle
buildPhase
{ "repo_name": "jruchcolo/rice-cd", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/lifecycle/ViewLifecyclePhaseBuilder.java", "license": "apache-2.0", "size": 2150 }
[ "java.util.List", "org.kuali.rice.krad.uif.component.Component", "org.kuali.rice.krad.uif.util.LifecycleElement" ]
import java.util.List; import org.kuali.rice.krad.uif.component.Component; import org.kuali.rice.krad.uif.util.LifecycleElement;
import java.util.*; import org.kuali.rice.krad.uif.component.*; import org.kuali.rice.krad.uif.util.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,604,184
public static void rename(IBinding oldName, String newName) { oldName = getBindingDeclaration(oldName); String previousName = instance.renamings.get(oldName); if (previousName != null && !previousName.equals(newName)) { logger.fine(String.format("Changing previous rename: %s => %s, now: %s => %s", ...
static void function(IBinding oldName, String newName) { oldName = getBindingDeclaration(oldName); String previousName = instance.renamings.get(oldName); if (previousName != null && !previousName.equals(newName)) { logger.fine(String.format(STR, oldName.toString(), previousName, oldName, newName)); } instance.renamings...
/** * Adds a name to the renamings map, used by getName(). */
Adds a name to the renamings map, used by getName()
rename
{ "repo_name": "jiachenning/j2objc", "path": "translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java", "license": "apache-2.0", "size": 27742 }
[ "org.eclipse.jdt.core.dom.IBinding" ]
import org.eclipse.jdt.core.dom.IBinding;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
1,874,591
public HashMap<String, Section> getSections() { return mSections; }
HashMap<String, Section> function() { return mSections; }
/** * Returns an iterator over the section names available in the INI file. * * @return an iterator over the section names */
Returns an iterator over the section names available in the INI file
getSections
{ "repo_name": "Caleydo/caleydo", "path": "org.caleydo.core/src/org/caleydo/core/serialize/INIParser.java", "license": "bsd-3-clause", "size": 9389 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,451,673
private List<Dependency> getDependents (Provider p) throws StandardException { List<Dependency> deps = new ArrayList<Dependency>(); synchronized (this) { List<Dependency> memDeps = providers.get(p.getObjectID()); if (memDeps != null) { deps.addAll(memDeps); ...
List<Dependency> function (Provider p) throws StandardException { List<Dependency> deps = new ArrayList<Dependency>(); synchronized (this) { List<Dependency> memDeps = providers.get(p.getObjectID()); if (memDeps != null) { deps.addAll(memDeps); } } if (p.isPersistent()) { List<Dependency> storedList = getDependencyDesc...
/** * Returns an enumeration of all dependencies that this * provider is supporting for any dependent at all (even * invalid ones). Includes all dependency types. * * @param p the provider * @return A list of dependents (possibly empty). * @throws StandardException if something goes w...
Returns an enumeration of all dependencies that this provider is supporting for any dependent at all (even invalid ones). Includes all dependency types
getDependents
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java", "license": "apache-2.0", "size": 35824 }
[ "java.util.ArrayList", "java.util.List", "org.apache.derby.iapi.sql.depend.Dependency", "org.apache.derby.iapi.sql.depend.Provider", "org.apache.derby.shared.common.error.StandardException" ]
import java.util.ArrayList; import java.util.List; import org.apache.derby.iapi.sql.depend.Dependency; import org.apache.derby.iapi.sql.depend.Provider; import org.apache.derby.shared.common.error.StandardException;
import java.util.*; import org.apache.derby.iapi.sql.depend.*; import org.apache.derby.shared.common.error.*;
[ "java.util", "org.apache.derby" ]
java.util; org.apache.derby;
47,535
private void removeBorderColors(CellRangeAddress range) { Set<String> properties = new HashSet<String>(); properties.add(CellUtil.TOP_BORDER_COLOR); properties.add(CellUtil.BOTTOM_BORDER_COLOR); properties.add(CellUtil.LEFT_BORDER_COLOR); properties.add(CellUtil.RIGHT_BORDER_...
void function(CellRangeAddress range) { Set<String> properties = new HashSet<String>(); properties.add(CellUtil.TOP_BORDER_COLOR); properties.add(CellUtil.BOTTOM_BORDER_COLOR); properties.add(CellUtil.LEFT_BORDER_COLOR); properties.add(CellUtil.RIGHT_BORDER_COLOR); for (int row = range.getFirstRow(); row <= range.getLa...
/** * Removes all border properties from this {@link PropertyTemplate} for the * specified range. * * @parm range - {@link CellRangeAddress} range of cells to remove borders. */
Removes all border properties from this <code>PropertyTemplate</code> for the specified range
removeBorderColors
{ "repo_name": "lvweiwolf/poi-3.16", "path": "src/java/org/apache/poi/ss/util/PropertyTemplate.java", "license": "apache-2.0", "size": 34382 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,604,498
private void calculateParentGoal(String strategyId) { List<String> parentList = linkManager.getSource(strategyId); if (parentList != null) { for (String parentId : parentList) { NodeInfo parentNode = linkManager.getNodeInfo(parentId); NodeType type = ...
void function(String strategyId) { List<String> parentList = linkManager.getSource(strategyId); if (parentList != null) { for (String parentId : parentList) { NodeInfo parentNode = linkManager.getNodeInfo(parentId); NodeType type = parentNode.getNodeType(); if (type == NodeType.GOAL type == NodeType.SYSTEM) { calculate...
/** * Calculates the score of a parents. * * @param strategyId the ID of the Strategy node. */
Calculates the score of a parents
calculateParentGoal
{ "repo_name": "kuriking/testdc2", "path": "net.dependableos.dcase.diagram.editor/src/net/dependableos/dcase/diagram/editor/logic/assessment/Assessment.java", "license": "epl-1.0", "size": 8624 }
[ "java.util.List", "net.dependableos.dcase.diagram.common.model.NodeInfo", "net.dependableos.dcase.diagram.common.model.NodeType" ]
import java.util.List; import net.dependableos.dcase.diagram.common.model.NodeInfo; import net.dependableos.dcase.diagram.common.model.NodeType;
import java.util.*; import net.dependableos.dcase.diagram.common.model.*;
[ "java.util", "net.dependableos.dcase" ]
java.util; net.dependableos.dcase;
2,053,283
public static final void render(Graphics2D g, Slice slice, double scale, Color color) { double radius = slice.getSliceRadius(); double theta2 = slice.getTheta() * 0.5; // get the local rotation and translation double rotation = slice.getRotation(); Vector2 circleCenter = sli...
static final void function(Graphics2D g, Slice slice, double scale, Color color) { double radius = slice.getSliceRadius(); double theta2 = slice.getTheta() * 0.5; double rotation = slice.getRotation(); Vector2 circleCenter = slice.getCircleCenter(); AffineTransform oTransform = g.getTransform(); g.translate(circleCente...
/** * Renders the given {@link Slice} to the given graphics context using the given scale and color. * @param g the graphics context * @param slice the slice to render * @param scale the scale to render the shape (pixels per dyn4j unit (typically meter)) * @param color the color */
Renders the given <code>Slice</code> to the given graphics context using the given scale and color
render
{ "repo_name": "yenbekbay/wordie", "path": "src/kz/yenbekbay/Wordie/Box/Graphics2DRenderer.java", "license": "mit", "size": 11774 }
[ "java.awt.Color", "java.awt.Graphics2D", "java.awt.geom.AffineTransform", "java.awt.geom.Arc2D", "org.dyn4j.geometry.Slice", "org.dyn4j.geometry.Vector2" ]
import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.geom.Arc2D; import org.dyn4j.geometry.Slice; import org.dyn4j.geometry.Vector2;
import java.awt.*; import java.awt.geom.*; import org.dyn4j.geometry.*;
[ "java.awt", "org.dyn4j.geometry" ]
java.awt; org.dyn4j.geometry;
1,338,616
void checkout(CheckoutRequest request) throws GitException;
void checkout(CheckoutRequest request) throws GitException;
/** * Checkout a branch / file to the working tree. * * @param request * checkout request * @throws GitException * if any error occurs when checkout * @see CheckoutRequest */
Checkout a branch / file to the working tree
checkout
{ "repo_name": "dhuebner/che", "path": "wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConnection.java", "license": "epl-1.0", "size": 15360 }
[ "org.eclipse.che.api.git.shared.CheckoutRequest" ]
import org.eclipse.che.api.git.shared.CheckoutRequest;
import org.eclipse.che.api.git.shared.*;
[ "org.eclipse.che" ]
org.eclipse.che;
134,596
public Dimension maximumLayoutSize(Container target) { return preferredLayoutSize(target); }
Dimension function(Container target) { return preferredLayoutSize(target); }
/** * DOCUMENT ME! * * @param target DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
maximumLayoutSize
{ "repo_name": "aosm/gcc_40", "path": "libjava/javax/swing/JRootPane.java", "license": "gpl-2.0", "size": 12772 }
[ "java.awt.Container", "java.awt.Dimension" ]
import java.awt.Container; import java.awt.Dimension;
import java.awt.*;
[ "java.awt" ]
java.awt;
449,118
public boolean supportsUnionAll() throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_supportsUnionAll].methodEntry(); try { return true; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_supportsUnionAll].methodExit(); } }
boolean function() throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_supportsUnionAll].methodEntry(); try { return true; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_supportsUnionAll].methodExit(); } }
/** * Retrieves whether this database supports SQL UNION ALL. * * @return true * @throws SQLException * - if a database access error occurs **/
Retrieves whether this database supports SQL UNION ALL
supportsUnionAll
{ "repo_name": "mashengchen/incubator-trafodion", "path": "core/conn/jdbc_type2/src/main/java/org/apache/trafodion/jdbc/t2/SQLMXDatabaseMetaData.java", "license": "apache-2.0", "size": 191582 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,236,261
private void sendFinishMessage() { //sends notification - node has finished sendMessage(Message.createNodeFinishedMessage(this)); }
void function() { sendMessage(Message.createNodeFinishedMessage(this)); }
/** * This method should be called every time when node finishes its work. */
This method should be called every time when node finishes its work
sendFinishMessage
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.engine/src/org/jetel/graph/Node.java", "license": "lgpl-2.1", "size": 57962 }
[ "org.jetel.graph.runtime.Message" ]
import org.jetel.graph.runtime.Message;
import org.jetel.graph.runtime.*;
[ "org.jetel.graph" ]
org.jetel.graph;
1,339,214
@GET @Produces({"text/html"}) public Response getUsage(@Context HttpHeaders headers, @Context UriInfo ui) throws IOException{ String entity = "<h2>Usage of calculator</h2><br>" + "<ul>" + "<li><b>calculator/add/{a}/{b}</b> - add {a} to {b}</li>" + "<li><b>calculator/subtract/{a}/{b}</...
@Produces({STR}) Response function(@Context HttpHeaders headers, @Context UriInfo ui) throws IOException{ String entity = STR + "<ul>" + STR + STR + STR + STR + "</ul>" ; return Response.ok(entity).type(STR).build(); }
/** * Handles: GET /calculator Get the calculator usage. * * @param headers http headers * @param ui uri info * * @return the response including the usage of the calculator resource */
Handles: GET /calculator Get the calculator usage
getUsage
{ "repo_name": "arenadata/ambari", "path": "ambari-views/examples/calculator-view/src/main/java/org/apache/ambari/view/proxy/CalculatorResource.java", "license": "apache-2.0", "size": 4141 }
[ "java.io.IOException", "javax.ws.rs.Produces", "javax.ws.rs.core.Context", "javax.ws.rs.core.HttpHeaders", "javax.ws.rs.core.Response", "javax.ws.rs.core.UriInfo" ]
import java.io.IOException; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo;
import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "java.io", "javax.ws" ]
java.io; javax.ws;
374,153
public Map<String, JRVariable> getVariablesMap() { return variablesMap; }
Map<String, JRVariable> function() { return variablesMap; }
/** * Returns the map of variable, including build-in ones, indexed by name. * * @return {@link JRVariable JRVariable} objects indexed by name */
Returns the map of variable, including build-in ones, indexed by name
getVariablesMap
{ "repo_name": "sikachu/jasperreports", "path": "src/net/sf/jasperreports/engine/design/JRDesignDataset.java", "license": "lgpl-3.0", "size": 37999 }
[ "java.util.Map", "net.sf.jasperreports.engine.JRVariable" ]
import java.util.Map; import net.sf.jasperreports.engine.JRVariable;
import java.util.*; import net.sf.jasperreports.engine.*;
[ "java.util", "net.sf.jasperreports" ]
java.util; net.sf.jasperreports;
1,280,429
public static IInternalInterface getSystemInterface() { try { return IInternalInterface.Stub.asInterface( (IBinder) Class.forName("android.os.ServiceManager") .getMethod("getService", String.class) .invoke(null, ModuleIn...
static IInternalInterface function() { try { return IInternalInterface.Stub.asInterface( (IBinder) Class.forName(STR) .getMethod(STR, String.class) .invoke(null, ModuleInit.SYSTEM_SERVICE_NAME) ); } catch (Exception e) { throw new RuntimeException(e); } }
/** * Get SystemService interface * * This doesn't rely on XposedBridge library */
Get SystemService interface This doesn't rely on XposedBridge library
getSystemInterface
{ "repo_name": "michalbednarski/IntentsLab", "path": "XposedHooks/src/main/java/com/github/michalbednarski/intentslab/xposedhooks/internal/XHUtils.java", "license": "gpl-3.0", "size": 9103 }
[ "android.os.IBinder" ]
import android.os.IBinder;
import android.os.*;
[ "android.os" ]
android.os;
1,585,451
default AdvancedStubEndpointBuilder queue(BlockingQueue queue) { doSetProperty("queue", queue); return this; }
default AdvancedStubEndpointBuilder queue(BlockingQueue queue) { doSetProperty("queue", queue); return this; }
/** * Define the queue instance which will be used by the endpoint. * * The option is a: <code>java.util.concurrent.BlockingQueue</code> * type. * * Group: advanced */
Define the queue instance which will be used by the endpoint. The option is a: <code>java.util.concurrent.BlockingQueue</code> type. Group: advanced
queue
{ "repo_name": "ullgren/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StubEndpointBuilderFactory.java", "license": "apache-2.0", "size": 37671 }
[ "java.util.concurrent.BlockingQueue" ]
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,737,434
public static String getNodeOrNodeSourceDescriptor(String nodeId, String foreignSource, String foreignId) { if (!Strings.isNullOrEmpty(foreignSource) && !Strings.isNullOrEmpty(foreignId)) { return String.format("nodeSource[%s:%s]", foreignSource, foreignId); } return String.forma...
static String function(String nodeId, String foreignSource, String foreignId) { if (!Strings.isNullOrEmpty(foreignSource) && !Strings.isNullOrEmpty(foreignId)) { return String.format(STR, foreignSource, foreignId); } return String.format(STR, nodeId); }
/** * Returns the descriptor of the node or node source, depending on the input parameters (e.g. node[&lt;nodeId&gt;] or nodeSource[&lt;foreignSource&gt;:&lt;foreignId&gt;]. * * @param nodeId * @param foreignSource * @param foreignId * @return the descriptor of the node or node source, de...
Returns the descriptor of the node or node source, depending on the input parameters (e.g. node[&lt;nodeId&gt;] or nodeSource[&lt;foreignSource&gt;:&lt;foreignId&gt;]
getNodeOrNodeSourceDescriptor
{ "repo_name": "aihua/opennms", "path": "integrations/opennms-jasper-extensions/src/main/java/org/opennms/netmgt/jasper/helper/MeasurementsHelper.java", "license": "agpl-3.0", "size": 3807 }
[ "com.google.common.base.Strings" ]
import com.google.common.base.Strings;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
717,006
public DTDHandler getDTDHandler() { return null; }
DTDHandler function() { return null; }
/** * Not supported. * * @see org.xml.sax.XMLReader#getDTDHandler() */
Not supported
getDTDHandler
{ "repo_name": "NCIP/cadsr-cgmdr-nci-uk", "path": "src/org/exist/cocoon/XMLReaderWrapper.java", "license": "bsd-3-clause", "size": 4868 }
[ "org.xml.sax.DTDHandler" ]
import org.xml.sax.DTDHandler;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
798,985
@Override public Adapter createAdapter(Notifier target) { return modelSwitch.doSwitch((EObject)target); }
Adapter function(Notifier target) { return modelSwitch.doSwitch((EObject)target); }
/** * Creates an adapter for the <code>target</code>. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param target the object to adapt. * @return the adapter for the <code>target</code>. * @generated */
Creates an adapter for the <code>target</code>.
createAdapter
{ "repo_name": "lunifera/lunifera-ecview", "path": "org.lunifera.ecview.core.extension.model/src/org/lunifera/ecview/core/extension/model/datatypes/util/ExtDatatypesAdapterFactory.java", "license": "epl-1.0", "size": 20233 }
[ "org.eclipse.emf.common.notify.Adapter", "org.eclipse.emf.common.notify.Notifier", "org.eclipse.emf.ecore.EObject" ]
import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,878,596
protected Users search(String userStatus) throws SQLException { users = new Users(); try { searchUser = connect.prepareStatement("SELECT user_id, user_inscription_date, " + "user_status, user_alias, user_mail, user_afpa " + "FROM cdi_user " + "WHERE user_status = ?"); searchUser.s...
Users function(String userStatus) throws SQLException { users = new Users(); try { searchUser = connect.prepareStatement(STR + STR + STR + STR); searchUser.setString(1, userStatus); requestRes = searchUser.executeQuery(); while(requestRes.next()){ userId = requestRes.getInt(1); userInscriptionDate = requestRes.getStrin...
/** * Search an user by status from database and displays it. * * @author Claire * @param userStatus * @return user * @version 22-10-2016 */
Search an user by status from database and displays it
search
{ "repo_name": "CDI-Enterprise/ecf-16035-b", "path": "src/fr/cdiEnterprise/dao/UserDAO.java", "license": "gpl-3.0", "size": 15263 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
414,939
@ReportableProperty(order = 2, value = "Offset value.") public long getOffset() { return entry.offset; }
@ReportableProperty(order = 2, value = STR) long function() { return entry.offset; }
/** * Returns the offset of the beginning of this entry in the GZip * file. * @return the offset of this entry, as a number of bytes from the * start of the GZip file. */
Returns the offset of the beginning of this entry in the GZip file
getOffset
{ "repo_name": "opf-labs/jhove2", "path": "src/main/java/org/jhove2/module/format/gzip/properties/GzipEntryProperties.java", "license": "bsd-2-clause", "size": 11500 }
[ "org.jhove2.annotation.ReportableProperty" ]
import org.jhove2.annotation.ReportableProperty;
import org.jhove2.annotation.*;
[ "org.jhove2.annotation" ]
org.jhove2.annotation;
583,851
EClass getUiHorizontalButtonGroupAssigment();
EClass getUiHorizontalButtonGroupAssigment();
/** * Returns the meta object for class '{@link org.lunifera.ecview.semantic.uimodel.UiHorizontalButtonGroupAssigment <em>Ui Horizontal Button Group Assigment</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Ui Horizontal Button Group Assigment</em>'. * @see o...
Returns the meta object for class '<code>org.lunifera.ecview.semantic.uimodel.UiHorizontalButtonGroupAssigment Ui Horizontal Button Group Assigment</code>'.
getUiHorizontalButtonGroupAssigment
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java", "license": "epl-1.0", "size": 498897 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,566
@Test public void testRubyStyleReturnValues() throws Exception { Node node = j.parse("5;4"); Object result = j.evaluate(node); assertEquals(BigDecimal.valueOf(4), result); }
void function() throws Exception { Node node = j.parse("5;4"); Object result = j.evaluate(node); assertEquals(BigDecimal.valueOf(4), result); }
/** * Test that last evaluated expression is returned * @throws Exception */
Test that last evaluated expression is returned
testRubyStyleReturnValues
{ "repo_name": "xicmiah/jep-decimal", "path": "src/test/org/nfunk/jep/MultiExpressionTest.java", "license": "gpl-3.0", "size": 2227 }
[ "java.math.BigDecimal", "org.junit.Assert" ]
import java.math.BigDecimal; import org.junit.Assert;
import java.math.*; import org.junit.*;
[ "java.math", "org.junit" ]
java.math; org.junit;
816,428
@Override public boolean onTouchEvent(MotionEvent event) { if (!isEnabled()) return false; int pointerIndex; final int action = event.getAction(); switch (action & MotionEvent.ACTION_MASK) { ...
boolean function(MotionEvent event) { if (!isEnabled()) return false; int pointerIndex; final int action = event.getAction(); switch (action & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_DOWN: mActivePointerId = event.getPointerId(event.getPointerCount() - 1); pointerIndex = event.findPointerIndex(mActivePointer...
/** * Handles thumb selection and movement. Notifies listener callback on certain events. */
Handles thumb selection and movement. Notifies listener callback on certain events
onTouchEvent
{ "repo_name": "simon0191/MinerPCAdviser", "path": "MpcaAndroidApp/src/com/mpca/ui/RangeSeekBar.java", "license": "mit", "size": 26758 }
[ "android.view.MotionEvent" ]
import android.view.MotionEvent;
import android.view.*;
[ "android.view" ]
android.view;
2,604,292
protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds to the collection of * {@link org.eclipse.emf.edit.command.CommandParameter}s describing all of * the children that can be created under this object. <!-- begin-user-doc * --> <!-- end-user-doc --> * * @generated */
This adds to the collection of <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing all of the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "apache/geronimo-devtools", "path": "plugins/org.apache.geronimo.deployment.model.edit/src/org/apache/geronimo/xml/ns/naming/provider/ResourceRefTypeItemProvider.java", "license": "apache-2.0", "size": 13484 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
490,004
public static boolean isValidSegment(CarbonLoadModel loadModel, int currentLoad) { CarbonTable carbonTable = loadModel.getCarbonDataLoadSchema() .getCarbonTable(); CarbonTablePath carbonTablePath = CarbonStorePath.getCarbonTablePath( loadModel.getStorePath(), carbonTable.getCarbonTableId...
static boolean function(CarbonLoadModel loadModel, int currentLoad) { CarbonTable carbonTable = loadModel.getCarbonDataLoadSchema() .getCarbonTable(); CarbonTablePath carbonTablePath = CarbonStorePath.getCarbonTablePath( loadModel.getStorePath(), carbonTable.getCarbonTableIdentifier()); int fileCount = 0; int partition...
/** * the method returns true if the segment has carbondata file else returns false. * * @param loadModel * @param currentLoad * @return */
the method returns true if the segment has carbondata file else returns false
isValidSegment
{ "repo_name": "shivangi1015/incubator-carbondata", "path": "integration/spark-common/src/main/java/org/apache/carbondata/spark/load/CarbonLoaderUtil.java", "license": "apache-2.0", "size": 33765 }
[ "org.apache.carbondata.core.datastore.filesystem.CarbonFile", "org.apache.carbondata.core.datastore.filesystem.CarbonFileFilter", "org.apache.carbondata.core.datastore.impl.FileFactory", "org.apache.carbondata.core.metadata.schema.table.CarbonTable", "org.apache.carbondata.core.util.path.CarbonStorePath", ...
import org.apache.carbondata.core.datastore.filesystem.CarbonFile; import org.apache.carbondata.core.datastore.filesystem.CarbonFileFilter; import org.apache.carbondata.core.datastore.impl.FileFactory; import org.apache.carbondata.core.metadata.schema.table.CarbonTable; import org.apache.carbondata.core.util.path.Carbo...
import org.apache.carbondata.core.datastore.filesystem.*; import org.apache.carbondata.core.datastore.impl.*; import org.apache.carbondata.core.metadata.schema.table.*; import org.apache.carbondata.core.util.path.*; import org.apache.carbondata.processing.model.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
396,345
public void setDefaultTabTextColor(int color) { tabViewTextColors = ColorStateList.valueOf(color); }
void function(int color) { tabViewTextColors = ColorStateList.valueOf(color); }
/** * Set the color used for styling the tab text. This will need to be called prior to calling * {@link #setViewPager(android.support.v4.view.ViewPager)} otherwise it will not get set * * @param color to use for tab text */
Set the color used for styling the tab text. This will need to be called prior to calling <code>#setViewPager(android.support.v4.view.ViewPager)</code> otherwise it will not get set
setDefaultTabTextColor
{ "repo_name": "weisterjie/AppCtr", "path": "ycjlibrary/src/main/java/com/ycj/ycjlibrary/smartTab/SmartTabLayout.java", "license": "apache-2.0", "size": 25929 }
[ "android.content.res.ColorStateList" ]
import android.content.res.ColorStateList;
import android.content.res.*;
[ "android.content" ]
android.content;
466,095
protected static DeclarationContextIF optimisticParse(TopicMapIF tm, String query) { try { return QueryUtils.parseDeclarations(tm, query); } catch (InvalidQueryException e) { throw new OntopiaRuntimeException("There was a problem parsing the " + "query \"" + query + "\"...
static DeclarationContextIF function(TopicMapIF tm, String query) { try { return QueryUtils.parseDeclarations(tm, query); } catch (InvalidQueryException e) { throw new OntopiaRuntimeException(STR + STRSTR\STR, e); } }
/** * Parse the given declaration-context-query for the given topic map. * InvalidQueryExceptions thrown during the parse process are caught and * re-thrown with an additional message as OntopiaRuntimeExceptions. This * avoids external try {} catch() {} blocks around this method. * @param tm The topicmap...
Parse the given declaration-context-query for the given topic map. InvalidQueryExceptions thrown during the parse process are caught and re-thrown with an additional message as OntopiaRuntimeExceptions. This avoids external try {} catch() {} blocks around this method
optimisticParse
{ "repo_name": "ontopia/ontopia", "path": "ontopia-navigator/src/main/java/net/ontopia/topicmaps/nav2/portlets/pojos/MenuUtils.java", "license": "apache-2.0", "size": 20375 }
[ "net.ontopia.topicmaps.core.TopicMapIF", "net.ontopia.topicmaps.query.core.DeclarationContextIF", "net.ontopia.topicmaps.query.core.InvalidQueryException", "net.ontopia.topicmaps.query.utils.QueryUtils", "net.ontopia.utils.OntopiaRuntimeException" ]
import net.ontopia.topicmaps.core.TopicMapIF; import net.ontopia.topicmaps.query.core.DeclarationContextIF; import net.ontopia.topicmaps.query.core.InvalidQueryException; import net.ontopia.topicmaps.query.utils.QueryUtils; import net.ontopia.utils.OntopiaRuntimeException;
import net.ontopia.topicmaps.core.*; import net.ontopia.topicmaps.query.core.*; import net.ontopia.topicmaps.query.utils.*; import net.ontopia.utils.*;
[ "net.ontopia.topicmaps", "net.ontopia.utils" ]
net.ontopia.topicmaps; net.ontopia.utils;
810,036
set3Bytes(D10Constants.OFS_ADDRESS, address); }
set3Bytes(D10Constants.OFS_ADDRESS, address); }
/** * Sets the address. * @param address The address to set */
Sets the address
setAddress
{ "repo_name": "jpcaruana/jsynthlib", "path": "src/main/java/org/jsynthlib/drivers/roland/d10/message/D10TransferMessage.java", "license": "gpl-2.0", "size": 1929 }
[ "org.jsynthlib.drivers.roland.d10.D10Constants" ]
import org.jsynthlib.drivers.roland.d10.D10Constants;
import org.jsynthlib.drivers.roland.d10.*;
[ "org.jsynthlib.drivers" ]
org.jsynthlib.drivers;
990,124
public void setDrawArea(Rectangle drawArea) { this.drawArea = drawArea; }
void function(Rectangle drawArea) { this.drawArea = drawArea; }
/** * Sets the area where the graph will be drawn. This is not * including the heading, key etc. but is essentially the * rectangle around which the border of the graph is drawn. * @param drawArea the area where the graph will be drawn */
Sets the area where the graph will be drawn. This is not including the heading, key etc. but is essentially the rectangle around which the border of the graph is drawn
setDrawArea
{ "repo_name": "shaze/genesis", "path": "src/pca/drawInfo/DrawInfo3D.java", "license": "agpl-3.0", "size": 10752 }
[ "org.eclipse.swt.graphics.Rectangle" ]
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,226,134
public void testLongArrayAccumulateAndGet() { AtomicLongArray a = new AtomicLongArray(1); a.set(0, 1); assertEquals(7L, a.accumulateAndGet(0, 6L, Long::sum)); assertEquals(10L, a.accumulateAndGet(0, 3L, Long::sum)); assertEquals(10L, a.get(0)); }
void function() { AtomicLongArray a = new AtomicLongArray(1); a.set(0, 1); assertEquals(7L, a.accumulateAndGet(0, 6L, Long::sum)); assertEquals(10L, a.accumulateAndGet(0, 3L, Long::sum)); assertEquals(10L, a.get(0)); }
/** * AtomicLongArray accumulateAndGet updates with supplied function and * returns result. */
AtomicLongArray accumulateAndGet updates with supplied function and returns result
testLongArrayAccumulateAndGet
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/test/java/util/concurrent/tck/Atomic8Test.java", "license": "gpl-2.0", "size": 24432 }
[ "java.util.concurrent.atomic.AtomicLongArray" ]
import java.util.concurrent.atomic.AtomicLongArray;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
2,721,481
Assert.notNull(builder, "Builder must not be null"); return new BuildRequest(this.name, this.applicationContent, builder.inTaggedForm(), this.creator, this.env, this.cleanCache, this.verboseLogging); }
Assert.notNull(builder, STR); return new BuildRequest(this.name, this.applicationContent, builder.inTaggedForm(), this.creator, this.env, this.cleanCache, this.verboseLogging); }
/** * Return a new {@link BuildRequest} with an updated builder. * @param builder the new builder to use * @return an updated build request */
Return a new <code>BuildRequest</code> with an updated builder
withBuilder
{ "repo_name": "joshiste/spring-boot", "path": "spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/BuildRequest.java", "license": "apache-2.0", "size": 8108 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
540,726
void onThreadPoolAdd(CamelContext camelContext, ThreadPoolExecutor threadPool, String id, String sourceId, String routeId, String threadPoolProfileId);
void onThreadPoolAdd(CamelContext camelContext, ThreadPoolExecutor threadPool, String id, String sourceId, String routeId, String threadPoolProfileId);
/** * Notification on adding a thread pool. * * @param camelContext the camel context * @param threadPool the thread pool * @param id id of the thread pool (can be null in special cases) * @param sourceId id of the source creating the threa...
Notification on adding a thread pool
onThreadPoolAdd
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/main/java/org/apache/camel/spi/LifecycleStrategy.java", "license": "apache-2.0", "size": 5178 }
[ "java.util.concurrent.ThreadPoolExecutor", "org.apache.camel.CamelContext" ]
import java.util.concurrent.ThreadPoolExecutor; import org.apache.camel.CamelContext;
import java.util.concurrent.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,027,964
LearnerProgress learnerProgress = LearningWebUtil.getLearnerProgress(request, learnerService); Lesson lesson = learnerProgress.getLesson(); Set<Lesson> releasedLessons = lessonService.getReleasedSucceedingLessons(lesson.getLessonId(), learnerProgress.getUser().getUserId()); if (!releasedLessons.isEmpty()) { ...
LearnerProgress learnerProgress = LearningWebUtil.getLearnerProgress(request, learnerService); Lesson lesson = learnerProgress.getLesson(); Set<Lesson> releasedLessons = lessonService.getReleasedSucceedingLessons(lesson.getLessonId(), learnerProgress.getUser().getUserId()); if (!releasedLessons.isEmpty()) { StringBuild...
/** * Gets an activity from the request (attribute) and forwards onto a display action using the ActionMappings class. * If no activity is in request then use the current activity in learnerProgress. */
Gets an activity from the request (attribute) and forwards onto a display action using the ActionMappings class. If no activity is in request then use the current activity in learnerProgress
execute
{ "repo_name": "lamsfoundation/lams", "path": "lams_learning/src/java/org/lamsfoundation/lams/learning/web/controller/LessonCompleteActivityController.java", "license": "gpl-2.0", "size": 3947 }
[ "java.util.Set", "org.lamsfoundation.lams.learning.web.util.LearningWebUtil", "org.lamsfoundation.lams.lesson.LearnerProgress", "org.lamsfoundation.lams.lesson.Lesson", "org.lamsfoundation.lams.util.WebUtil" ]
import java.util.Set; import org.lamsfoundation.lams.learning.web.util.LearningWebUtil; import org.lamsfoundation.lams.lesson.LearnerProgress; import org.lamsfoundation.lams.lesson.Lesson; import org.lamsfoundation.lams.util.WebUtil;
import java.util.*; import org.lamsfoundation.lams.learning.web.util.*; import org.lamsfoundation.lams.lesson.*; import org.lamsfoundation.lams.util.*;
[ "java.util", "org.lamsfoundation.lams" ]
java.util; org.lamsfoundation.lams;
2,160,022
private boolean isLineBreak( char c) throws IOException { if (c == '\n') { return true; } else if (c == '\r') { // if the \r is immediately followed by a \n, this counts as one line break char int next = in.read(); if (next!=-1 && next!='\n') {...
boolean function( char c) throws IOException { if (c == '\n') { return true; } else if (c == '\r') { int next = in.read(); if (next!=-1 && next!='\n') { ((PushbackReader) in).unread( (char) next); } return true; } else { return false; } }
/** * Test if the character read from the underlying stream signals a line break. * If the character is a '\r', the method will test if the following character is a '\n' and * will consume that char. * * @param c The character last read from the underlying reader. */
Test if the character read from the underlying stream signals a line break. If the character is a '\r', the method will test if the following character is a '\n' and will consume that char
isLineBreak
{ "repo_name": "tensberg/jgloss-mirror", "path": "jgloss/src/main/java/jgloss/ui/xml/JGlossifyReader.java", "license": "gpl-2.0", "size": 14236 }
[ "java.io.IOException", "java.io.PushbackReader" ]
import java.io.IOException; import java.io.PushbackReader;
import java.io.*;
[ "java.io" ]
java.io;
933,339
if (key == null) { return null; } final String[] keys = key.trim().split("\\|"); final int keyLen = keys.length; final String subKey = keys[0].trim(); final String subValue = keyLen < 2 ? key : keys[1].trim(); try { final InetAddress inetAddress = ...
if (key == null) { return null; } final String[] keys = key.trim().split(STR); final int keyLen = keys.length; final String subKey = keys[0].trim(); final String subValue = keyLen < 2 ? key : keys[1].trim(); try { final InetAddress inetAddress = InetAddress.getByName(subValue); switch (subKey) { case InetAddressKeys.KE...
/** * Looks up the DNS value of the key. * * @param key the key to be looked up, may be null * @return The DNS value. */
Looks up the DNS value of the key
lookup
{ "repo_name": "apache/commons-text", "path": "src/main/java/org/apache/commons/text/lookup/DnsStringLookup.java", "license": "apache-2.0", "size": 3496 }
[ "java.net.InetAddress", "java.net.UnknownHostException" ]
import java.net.InetAddress; import java.net.UnknownHostException;
import java.net.*;
[ "java.net" ]
java.net;
1,568,080
public void loadUrl(LoadUrlParams params) { if (params.getLoadUrlType() == LoadUrlParams.LOAD_TYPE_DATA && !params.isBaseUrlDataScheme()) { // This allows data URLs with a non-data base URL access to file:///android_asset/ and // file:///android_res/ URLs. If AwSettings.g...
void function(LoadUrlParams params) { if (params.getLoadUrlType() == LoadUrlParams.LOAD_TYPE_DATA && !params.isBaseUrlDataScheme()) { params.setCanLoadLocalResources(true); } if (params.getUrl() != null && params.getUrl().equals(mContentViewCore.getUrl()) && params.getTransitionType() == PageTransitionTypes.PAGE_TRANSI...
/** * Load url without fixing up the url string. Consumers of ContentView are responsible for * ensuring the URL passed in is properly formatted (i.e. the scheme has been added if left * off during user input). * * @param pararms Parameters for this load. */
Load url without fixing up the url string. Consumers of ContentView are responsible for ensuring the URL passed in is properly formatted (i.e. the scheme has been added if left off during user input)
loadUrl
{ "repo_name": "espadrine/opera", "path": "chromium/src/android_webview/java/src/org/chromium/android_webview/AwContents.java", "license": "bsd-3-clause", "size": 59889 }
[ "org.chromium.content.browser.LoadUrlParams", "org.chromium.content.browser.PageTransitionTypes" ]
import org.chromium.content.browser.LoadUrlParams; import org.chromium.content.browser.PageTransitionTypes;
import org.chromium.content.browser.*;
[ "org.chromium.content" ]
org.chromium.content;
2,799,424
public static void parseReactionsDetailed(String filename, MongoDB db) throws IOException { Map<String, Long> keggID_ActID = db.getKeggID_ActID(false); BufferedReader br = new BufferedReader( new InputStreamReader( new DataInputStream(new FileInputStream(filename)))); int numEntriesAd...
static void function(String filename, MongoDB db) throws IOException { Map<String, Long> keggID_ActID = db.getKeggID_ActID(false); BufferedReader br = new BufferedReader( new InputStreamReader( new DataInputStream(new FileInputStream(filename)))); int numEntriesAdded = 0; int failed = 0; String currKeggID = null; Strin...
/** * Parses KEGG file with reaction details. * Add all reactions that involve only chemicals in our database. * @param filename * @param db * @throws IOException */
Parses KEGG file with reaction details. Add all reactions that involve only chemicals in our database
parseReactionsDetailed
{ "repo_name": "20n/act", "path": "reachables/src/main/java/act/installer/kegg/KeggParser.java", "license": "gpl-3.0", "size": 24841 }
[ "java.io.BufferedReader", "java.io.DataInputStream", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader", "java.util.HashMap", "java.util.Map" ]
import java.io.BufferedReader; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,347,459
public Concourse connect() { return connect("admin", "admin"); }
Concourse function() { return connect("admin", "admin"); }
/** * Return a connection handler to the server using the default "admin" * credentials. * * @return the connection handler */
Return a connection handler to the server using the default "admin" credentials
connect
{ "repo_name": "dubex/concourse", "path": "concourse-ete-test-core/src/main/java/com/cinchapi/concourse/server/ManagedConcourseServer.java", "license": "apache-2.0", "size": 75641 }
[ "com.cinchapi.concourse.Concourse" ]
import com.cinchapi.concourse.Concourse;
import com.cinchapi.concourse.*;
[ "com.cinchapi.concourse" ]
com.cinchapi.concourse;
2,287,525
public void setUserStyleList(List<UserStyleInfo> list) { userStyleList = list; } public static class ChoiceInfo implements Serializable { private static final long serialVersionUID = 100; private int choiceSelect = -1; private static final int INLINE_FEATURE_CHOICE = 0; private static final int RE...
void function(List<UserStyleInfo> list) { userStyleList = list; } public static class ChoiceInfo implements Serializable { private static final long serialVersionUID = 100; private int choiceSelect = -1; private static final int INLINE_FEATURE_CHOICE = 0; private static final int REMOTE_OWS_CHOICE = 1; private InlineFe...
/** * Set the list of 'UserStyle' element items. * * @param list */
Set the list of 'UserStyle' element items
setUserStyleList
{ "repo_name": "geomajas/geomajas-project-sld", "path": "api/src/main/java/org/geomajas/sld/UserLayerInfo.java", "license": "apache-2.0", "size": 9045 }
[ "java.io.Serializable", "java.util.List" ]
import java.io.Serializable; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
46,691
@Override public void invalidateTextureContent(Bitmap bitmap) { BasicTexture resultTexture = getTextureFromMap(bitmap); if (resultTexture instanceof UploadedTexture) { ((UploadedTexture) resultTexture).invalidateContent(); } }
void function(Bitmap bitmap) { BasicTexture resultTexture = getTextureFromMap(bitmap); if (resultTexture instanceof UploadedTexture) { ((UploadedTexture) resultTexture).invalidateContent(); } }
/*** * Use this to the bitmap to texture. Called when your bitmap content pixels changed * @param bitmap the bitmap whose content pixels changed */
Use this to the bitmap to texture. Called when your bitmap content pixels changed
invalidateTextureContent
{ "repo_name": "ChillingVan/android-openGL-canvas", "path": "canvasgl/src/main/java/com/chillingvan/canvasgl/CanvasGL.java", "license": "apache-2.0", "size": 16273 }
[ "android.graphics.Bitmap", "com.chillingvan.canvasgl.glcanvas.BasicTexture", "com.chillingvan.canvasgl.glcanvas.UploadedTexture" ]
import android.graphics.Bitmap; import com.chillingvan.canvasgl.glcanvas.BasicTexture; import com.chillingvan.canvasgl.glcanvas.UploadedTexture;
import android.graphics.*; import com.chillingvan.canvasgl.glcanvas.*;
[ "android.graphics", "com.chillingvan.canvasgl" ]
android.graphics; com.chillingvan.canvasgl;
1,746,961
private void handleSearchContext(SearchContext ctx) { String query = ctx.getQuery(); UserNotifier un = FinderFactory.getRegistry().getUserNotifier(); Timestamp start = ctx.getStartTime(); Timestamp end = ctx.getEndTime(); if (start != null && end != null && start.after(end)) { un.notifyInfo(TITLE, "The...
void function(SearchContext ctx) { String query = ctx.getQuery(); UserNotifier un = FinderFactory.getRegistry().getUserNotifier(); Timestamp start = ctx.getStartTime(); Timestamp end = ctx.getEndTime(); if (start != null && end != null && start.after(end)) { un.notifyInfo(TITLE, STR); return; } if (CommonsLangUtils.isE...
/** * Converts the UI context into a context to search for. * * @param ctx The value to convert. */
Converts the UI context into a context to search for
handleSearchContext
{ "repo_name": "knabar/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/finder/AdvancedFinder.java", "license": "gpl-2.0", "size": 14535 }
[ "java.sql.Timestamp", "java.util.ArrayList", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Set", "org.openmicroscopy.shoola.env.ui.UserNotifier", "org.openmicroscopy.shoola.util.CommonsLangUtils", "org.openmicroscopy.shoola.util.ui.search.GroupContext", "org.openmicroscop...
import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.openmicroscopy.shoola.env.ui.UserNotifier; import org.openmicroscopy.shoola.util.CommonsLangUtils; import org.openmicroscopy.shoola.util.ui.search.GroupCont...
import java.sql.*; import java.util.*; import org.openmicroscopy.shoola.env.ui.*; import org.openmicroscopy.shoola.util.*; import org.openmicroscopy.shoola.util.ui.search.*;
[ "java.sql", "java.util", "org.openmicroscopy.shoola" ]
java.sql; java.util; org.openmicroscopy.shoola;
2,801,913
protected Set<Vector<T>> getCombinations() { return getCombinations(new Vector<T>(), m_alphabet, m_strength); }
Set<Vector<T>> function() { return getCombinations(new Vector<T>(), m_alphabet, m_strength); }
/** * Gets the set of all combinations of t events * @return The set of combinations */
Gets the set of all combinations of t events
getCombinations
{ "repo_name": "liflab/sealtest", "path": "Source/Core/src/ca/uqac/lif/ecp/TWayScoringTraceGenerator.java", "license": "lgpl-3.0", "size": 5741 }
[ "java.util.Set", "java.util.Vector" ]
import java.util.Set; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,443,959
public List<Variable> getUpperVariables() { List<Variable> uVarList = new ArrayList<>(); for (Variable aVar : VARDEF.getVars()) { if (aVar.getLevelNum() > 1) { uVarList.add(aVar); } } return uVarList; }
List<Variable> function() { List<Variable> uVarList = new ArrayList<>(); for (Variable aVar : VARDEF.getVars()) { if (aVar.getLevelNum() > 1) { uVarList.add(aVar); } } return uVarList; }
/** * Get variable list they have upper levels * * @return Upper variables */
Get variable list they have upper levels
getUpperVariables
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/data/meteodata/grads/GrADSDataInfo.java", "license": "lgpl-3.0", "size": 115651 }
[ "java.util.ArrayList", "java.util.List", "org.meteoinfo.data.meteodata.Variable" ]
import java.util.ArrayList; import java.util.List; import org.meteoinfo.data.meteodata.Variable;
import java.util.*; import org.meteoinfo.data.meteodata.*;
[ "java.util", "org.meteoinfo.data" ]
java.util; org.meteoinfo.data;
561,794
@RequestMapping({ "/company" }) public String goCompanyManagementPage(Model model, HttpSession session) { return "/admin/company-management"; }
@RequestMapping({ STR }) String function(Model model, HttpSession session) { return STR; }
/** * Go company management page. * * @param model the model * @param session the session * @return the string */
Go company management page
goCompanyManagementPage
{ "repo_name": "aholake/hiringviet", "path": "src/main/java/vn/com/hiringviet/controller/AdminController.java", "license": "apache-2.0", "size": 3766 }
[ "javax.servlet.http.HttpSession", "org.springframework.ui.Model", "org.springframework.web.bind.annotation.RequestMapping" ]
import javax.servlet.http.HttpSession; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*;
[ "javax.servlet", "org.springframework.ui", "org.springframework.web" ]
javax.servlet; org.springframework.ui; org.springframework.web;
213,700
public boolean deleteQueryById(String userId, String queryId) { boolean operationStatus = false; if (StringUtils.isNotBlank(queryId) && StringUtils.isNotBlank(userId)) { // Fetch all queries from query log file ObjectNode queries = fetchAllQueriesFromFile(); // Get user's query history li...
boolean function(String userId, String queryId) { boolean operationStatus = false; if (StringUtils.isNotBlank(queryId) && StringUtils.isNotBlank(userId)) { ObjectNode queries = fetchAllQueriesFromFile(); ObjectNode userQueries = (ObjectNode) queries.get(userId); if (userQueries != null) { userQueries.remove(queryId); q...
/** * deleteQueryById method deletes query from query history file * * @param userId Logged in user's Unique Id * @param queryId Unique Id of Query to be deleted */
deleteQueryById method deletes query from query history file
deleteQueryById
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/DataBrowser.java", "license": "apache-2.0", "size": 7160 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "org.apache.commons.lang3.StringUtils" ]
import com.fasterxml.jackson.databind.node.ObjectNode; import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.databind.node.*; import org.apache.commons.lang3.*;
[ "com.fasterxml.jackson", "org.apache.commons" ]
com.fasterxml.jackson; org.apache.commons;
1,957,156
public boolean isOfType(String type) { return types.contains(type.trim().toUpperCase(Locale.ENGLISH), false); }
boolean function(String type) { return types.contains(type.trim().toUpperCase(Locale.ENGLISH), false); }
/** * Returns true if this effect is * of the supplied type. * * @param types * @return */
Returns true if this effect is of the supplied type
isOfType
{ "repo_name": "mganzarcik/fabulae", "path": "core/src/mg/fishchicken/gamelogic/effects/Effect.java", "license": "mit", "size": 19964 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
962,147
protected void publishReadEvent(final NodeRef nodeRef, final String name, final String mimeType, final long contentSize, final String encoding, final String range) { final QName nodeType = nodeRef==null?null:nodeService.getType(nodeRef);
void function(final NodeRef nodeRef, final String name, final String mimeType, final long contentSize, final String encoding, final String range) { final QName nodeType = nodeRef==null?null:nodeService.getType(nodeRef);
/** * Notifies listeners that a read has taken place. * * @param nodeRef NodeRef * @param name String * @param mimeType String * @param contentSize long * @param encoding String * @param range String */
Notifies listeners that a read has taken place
publishReadEvent
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java", "license": "lgpl-3.0", "size": 150987 }
[ "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.namespace.QName" ]
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName;
import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,661,044
// @GuardedBy annotation is doing lexical analysis that doesn't understand the closures below // will be running under the synchronized block. @SuppressWarnings("GuardedBy") private void post(BuildEvent event) { List<BuildEvent> linkEvents = null; BuildEventId id = event.getEventId(); List<BuildEven...
@SuppressWarnings(STR) void function(BuildEvent event) { List<BuildEvent> linkEvents = null; BuildEventId id = event.getEventId(); List<BuildEvent> flushEvents = null; boolean lastEvent = false; synchronized (this) { if (announcedEvents == null) { announcedEvents = new HashSet<>(); announcedEvents.add(id); if (!event.g...
/** * Post a new event to all transports; simultaneously keep track of the events we announce to * still come. * * <p>Moreover, link unannounced events to the progress stream; we only expect failure events to * come before their parents. */
Post a new event to all transports; simultaneously keep track of the events we announce to still come. Moreover, link unannounced events to the progress stream; we only expect failure events to come before their parents
post
{ "repo_name": "ulfjack/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BuildEventStreamer.java", "license": "apache-2.0", "size": 30431 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.analysis.BuildInfoEvent", "com.google.devtools.build.lib.buildeventstream.BuildEvent", "com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos", "com.google.devtools.build.lib.buildeventstream.BuildEventTransport", "c...
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.analysis.BuildInfoEvent; import com.google.devtools.build.lib.buildeventstream.BuildEvent; import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos; import com.google.devtools.build.lib.buildeventstream.BuildEventTr...
import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.buildeventstream.*; import com.google.devtools.build.lib.util.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
1,685,810
public static Media createMedia(InputStream stream, String mimeType) throws IOException { return createMedia(stream, mimeType, null); }
static Media function(InputStream stream, String mimeType) throws IOException { return createMedia(stream, mimeType, null); }
/** * Creates the Media in the given stream * Notice that a Media is "auto destroyed" on completion and cannot be played * twice! * * @param stream the stream containing the media data * @param mimeType the type of the data in the stream * @return Media a Media Object that can be used...
Creates the Media in the given stream Notice that a Media is "auto destroyed" on completion and cannot be played twice
createMedia
{ "repo_name": "skyHALud/codenameone", "path": "CodenameOne/src/com/codename1/media/MediaManager.java", "license": "gpl-2.0", "size": 6714 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,484,107
public void setPath(Path path) { _database.setPath(path); }
void function(Path path) { _database.setPath(path); }
/** * Sets the path to the database. */
Sets the path to the database
setPath
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/db/jdbc/DataSourceImpl.java", "license": "gpl-2.0", "size": 3908 }
[ "com.caucho.vfs.Path" ]
import com.caucho.vfs.Path;
import com.caucho.vfs.*;
[ "com.caucho.vfs" ]
com.caucho.vfs;
808,926
public static void main(String args[]) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { Logger.getLogger(MainApplication.class.getName()).log(Level.SEVERE, null, ex); } catch (Instantiation...
static void function(String args[]) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { Logger.getLogger(MainApplication.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(MainApplication.class.getName()).lo...
/** * Main function of the Application * @param args */
Main function of the Application
main
{ "repo_name": "andrasfuchs/BioBalanceDetector", "path": "Tools/KiCad_FreeRouting/FreeRouting-miho-master/freerouting-master/src/main/java/eu/mihosoft/freerouting/gui/MainApplication.java", "license": "gpl-3.0", "size": 15842 }
[ "java.util.logging.Level", "java.util.logging.Logger", "javax.swing.UIManager", "javax.swing.UnsupportedLookAndFeelException" ]
import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException;
import java.util.logging.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
2,156,567
private static Connection connect(Ignite node) throws Exception { IgniteKernal node0 = (IgniteKernal)node; int port = node0.context().sqlListener().port(); return DriverManager.getConnection("jdbc:ignite:thin://127.0.0.1:" + port); }
static Connection function(Ignite node) throws Exception { IgniteKernal node0 = (IgniteKernal)node; int port = node0.context().sqlListener().port(); return DriverManager.getConnection("jdbc:ignite:thin: }
/** * Get connection for node. * * @param node Node. * @return Connection. */
Get connection for node
connect
{ "repo_name": "samaitra/ignite", "path": "modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinWalModeChangeSelfTest.java", "license": "apache-2.0", "size": 4692 }
[ "java.sql.Connection", "java.sql.DriverManager", "org.apache.ignite.Ignite", "org.apache.ignite.internal.IgniteKernal" ]
import java.sql.Connection; import java.sql.DriverManager; import org.apache.ignite.Ignite; import org.apache.ignite.internal.IgniteKernal;
import java.sql.*; import org.apache.ignite.*; import org.apache.ignite.internal.*;
[ "java.sql", "org.apache.ignite" ]
java.sql; org.apache.ignite;
1,553,785
public Builder withNimbusWrapper(UnaryOperator<Nimbus> nimbusWrapper) { this.nimbusWrapper = nimbusWrapper; return this; }
Builder function(UnaryOperator<Nimbus> nimbusWrapper) { this.nimbusWrapper = nimbusWrapper; return this; }
/** * Before nimbus is created/used call nimbusWrapper on it first and use the * result instead. This is intended for internal testing only, and it here to * allow a mocking framework to spy on the nimbus class. */
Before nimbus is created/used call nimbusWrapper on it first and use the result instead. This is intended for internal testing only, and it here to allow a mocking framework to spy on the nimbus class
withNimbusWrapper
{ "repo_name": "carl34/storm", "path": "storm-server/src/main/java/org/apache/storm/LocalCluster.java", "license": "apache-2.0", "size": 43008 }
[ "java.util.function.UnaryOperator", "org.apache.storm.daemon.nimbus.Nimbus" ]
import java.util.function.UnaryOperator; import org.apache.storm.daemon.nimbus.Nimbus;
import java.util.function.*; import org.apache.storm.daemon.nimbus.*;
[ "java.util", "org.apache.storm" ]
java.util; org.apache.storm;
635,947
private static boolean isTooAggressive(Block currentBlock, Block newBlock) { Material currentType = currentBlock.getType(); Material newType = newBlock.getType(); if ((currentType.equals(Material.LEAVES) || currentType.equals(Material.AIR) || (Config.getInstance().getBlockModsEnabled() ...
static boolean function(Block currentBlock, Block newBlock) { Material currentType = currentBlock.getType(); Material newType = newBlock.getType(); if ((currentType.equals(Material.LEAVES) currentType.equals(Material.AIR) (Config.getInstance().getBlockModsEnabled() && ModChecks.isCustomLeafBlock(currentBlock))) && (new...
/** * Check if Tree Feller is being too aggressive. * * @param currentBlock The current block being felled * @param newBlock The next block to be felled * @return true if Tree Feller is too aggressive, false otherwise */
Check if Tree Feller is being too aggressive
isTooAggressive
{ "repo_name": "javalangSystemwin/mcMMOPlus", "path": "src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java", "license": "agpl-3.0", "size": 20284 }
[ "com.gmail.nossr50.config.Config", "com.gmail.nossr50.util.ModChecks", "org.bukkit.Material", "org.bukkit.block.Block" ]
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.util.ModChecks; import org.bukkit.Material; import org.bukkit.block.Block;
import com.gmail.nossr50.config.*; import com.gmail.nossr50.util.*; import org.bukkit.*; import org.bukkit.block.*;
[ "com.gmail.nossr50", "org.bukkit", "org.bukkit.block" ]
com.gmail.nossr50; org.bukkit; org.bukkit.block;
1,434,199
@Test (timeout=300000) public void testCreateTableRPCTimeOut() throws Exception { String name = "testCreateTableRPCTimeOut"; int oldTimeout = TEST_UTIL.getConfiguration(). getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT); TEST_UTIL.getConfiguration().setInt(HConstants...
@Test (timeout=300000) void function() throws Exception { String name = STR; int oldTimeout = TEST_UTIL.getConfiguration(). getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, 1500); try { int expectedRegions = 100; byte [...
/*** * HMaster.createTable used to be kind of synchronous call * Thus creating of table with lots of regions can cause RPC timeout * After the fix to make createTable truly async, RPC timeout shouldn't be an * issue anymore * @throws Exception */
HMaster.createTable used to be kind of synchronous call Thus creating of table with lots of regions can cause RPC timeout After the fix to make createTable truly async, RPC timeout shouldn't be an issue anymore
testCreateTableRPCTimeOut
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java", "license": "apache-2.0", "size": 27669 }
[ "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.hbase.HTableDescriptor", "org.apache.hadoop.hbase.TableName", "org.junit.Test" ]
import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName; import org.junit.Test;
import org.apache.hadoop.hbase.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
2,336,300
public static String changeDateFormate(String actual_frmt, String return_frmt, String current_date) { // TODO Auto-generated method stub SimpleDateFormat date_frmt_actual = new SimpleDateFormat(actual_frmt); SimpleDateFormat date_frmt_retrn = new SimpleDateFormat(return_frmt); Date temp_date = null; ...
static String function(String actual_frmt, String return_frmt, String current_date) { SimpleDateFormat date_frmt_actual = new SimpleDateFormat(actual_frmt); SimpleDateFormat date_frmt_retrn = new SimpleDateFormat(return_frmt); Date temp_date = null; try { temp_date = date_frmt_actual.parse(current_date); } catch (Parse...
/*** * Change Date Format * ***/
Change Date Format
changeDateFormate
{ "repo_name": "jalotsav/Aalayam", "path": "app/src/main/java/com/jalotsav/aalayam/common/General_Fnctns.java", "license": "apache-2.0", "size": 25150 }
[ "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,017,707
int ordinal = getTableID().ordinal(); List<GlobalObject<?, ?>> objs; synchronized(locks[ordinal]) { synchronized(tableObjs) { objs=tableObjs.get(ordinal); } } if(objs!=null) return objs.size(); return -1; }
int ordinal = getTableID().ordinal(); List<GlobalObject<?, ?>> objs; synchronized(locks[ordinal]) { synchronized(tableObjs) { objs=tableObjs.get(ordinal); } } if(objs!=null) return objs.size(); return -1; }
/** * Gets the number of accessible rows in the table or <code>-1</code> if the * table is not yet loaded. */
Gets the number of accessible rows in the table or <code>-1</code> if the table is not yet loaded
getGlobalRowCount
{ "repo_name": "aoindustries/aoserv-client", "path": "src/main/java/com/aoindustries/aoserv/client/GlobalTable.java", "license": "lgpl-3.0", "size": 9939 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
367,240
private double getLengthMw(final int gewId) { double length = 0; for (final SbPartObjOffen tmp : objList) { if (((gewId == -1) || (tmp.getId() == gewId)) && (tmp.getMw() != null) && (tmp.getMw() != 0)) { length += tmp.getLength(); } } return ...
double function(final int gewId) { double length = 0; for (final SbPartObjOffen tmp : objList) { if (((gewId == -1) (tmp.getId() == gewId)) && (tmp.getMw() != null) && (tmp.getMw() != 0)) { length += tmp.getLength(); } } return length; }
/** * DOCUMENT ME! * * @param gewId DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getLengthMw
{ "repo_name": "cismet/watergis-client", "path": "src/main/java/de/cismet/watergis/reports/GerinneOSbReport.java", "license": "lgpl-3.0", "size": 56987 }
[ "de.cismet.watergis.reports.types.SbPartObjOffen" ]
import de.cismet.watergis.reports.types.SbPartObjOffen;
import de.cismet.watergis.reports.types.*;
[ "de.cismet.watergis" ]
de.cismet.watergis;
2,912,207
private Game createGame() { ManagedChannel channel = createManagedChannel(); SimonSaysGrpc.SimonSaysStub asyncStub = createAsyncStub(channel);; return new Game(window, asyncStub); }
Game function() { ManagedChannel channel = createManagedChannel(); SimonSaysGrpc.SimonSaysStub asyncStub = createAsyncStub(channel);; return new Game(window, asyncStub); }
/** * Create a game. In order to create a game, you need: * * Read server ip and server port (using reader) and create a ManagedChannel. * Create an async stub using the created ManagedChannel. */
Create a game. In order to create a game, you need: Read server ip and server port (using reader) and create a ManagedChannel. Create an async stub using the created ManagedChannel
createGame
{ "repo_name": "grpc-ecosystem/grpc-simon-says", "path": "client/java-cli/src/main/java/io/grpc/examples/simonsays/Main.java", "license": "apache-2.0", "size": 3764 }
[ "io.grpc.ManagedChannel" ]
import io.grpc.ManagedChannel;
import io.grpc.*;
[ "io.grpc" ]
io.grpc;
462,319
private String getAudioFilePath() { Logger.v(TAG, "getFilePath()"); Context context = getInstrumentation().getTargetContext(); Cursor cursor = null; String filePath = null; try { cursor = context.getContentResolver().query( MediaStore.Audio.Med...
String function() { Logger.v(TAG, STR); Context context = getInstrumentation().getTargetContext(); Cursor cursor = null; String filePath = null; try { cursor = context.getContentResolver().query( MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, null, null, null, null); if (null != cursor && cursor.getCount() > 0) { cursor....
/** * Get a audio file path from database */
Get a audio file path from database
getAudioFilePath
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/RCSe/core/tests/src/com/mediatek/rcse/test/activity/PluginProxyActivityTest.java", "license": "gpl-2.0", "size": 56842 }
[ "android.content.Context", "android.database.Cursor", "android.provider.MediaStore", "com.mediatek.rcse.api.Logger" ]
import android.content.Context; import android.database.Cursor; import android.provider.MediaStore; import com.mediatek.rcse.api.Logger;
import android.content.*; import android.database.*; import android.provider.*; import com.mediatek.rcse.api.*;
[ "android.content", "android.database", "android.provider", "com.mediatek.rcse" ]
android.content; android.database; android.provider; com.mediatek.rcse;
2,609,819
public void testToVtnBuilder(XmlVTenant xvtn) throws Exception { XmlLogger xlogger = mock(XmlLogger.class); String tname = getName(); VtnBuilder builder = xvtn.toVtnBuilder(xlogger, tname); assertEquals(tname, builder.getName().getValue()); VtenantConfig vtnc = builder.getVt...
void function(XmlVTenant xvtn) throws Exception { XmlLogger xlogger = mock(XmlLogger.class); String tname = getName(); VtnBuilder builder = xvtn.toVtnBuilder(xlogger, tname); assertEquals(tname, builder.getName().getValue()); VtenantConfig vtnc = builder.getVtenantConfig(); assertEquals(getDescription(), vtnc.getDescri...
/** * Test case for {@link XmlVTenant#toVtnBuilder(XmlLogger, String)}. * * @param xvtn A {@link XmlVTenant} instance that contains the same * configuration as this instance. * @throws Exception An error occurred. */
Test case for <code>XmlVTenant#toVtnBuilder(XmlLogger, String)</code>
testToVtnBuilder
{ "repo_name": "opendaylight/vtn", "path": "manager/implementation/src/test/java/org/opendaylight/vtn/manager/internal/vnode/xml/VTenantConfig.java", "license": "epl-1.0", "size": 10961 }
[ "org.junit.Assert", "org.mockito.Mockito", "org.opendaylight.vtn.manager.internal.util.log.VTNLogLevel", "org.opendaylight.vtn.manager.internal.util.vnode.VTenantIdentifier", "org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtn.info.VtenantConfig", "org.opendaylight.yang.gen.v1.urn.opendayligh...
import org.junit.Assert; import org.mockito.Mockito; import org.opendaylight.vtn.manager.internal.util.log.VTNLogLevel; import org.opendaylight.vtn.manager.internal.util.vnode.VTenantIdentifier; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtn.info.VtenantConfig; import org.opendaylight.yang.gen.v...
import org.junit.*; import org.mockito.*; import org.opendaylight.vtn.manager.internal.util.log.*; import org.opendaylight.vtn.manager.internal.util.vnode.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtn.info.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.rev150328.vtns.*;
[ "org.junit", "org.mockito", "org.opendaylight.vtn", "org.opendaylight.yang" ]
org.junit; org.mockito; org.opendaylight.vtn; org.opendaylight.yang;
1,653,995
public static String resourceQualifierString(Configuration config) { ArrayList<String> parts = new ArrayList<String>(); if (config.mcc != 0) { parts.add("mcc" + config.mcc); if (config.mnc != 0) { parts.add("mnc" + config.mnc); } } ...
static String function(Configuration config) { ArrayList<String> parts = new ArrayList<String>(); if (config.mcc != 0) { parts.add("mcc" + config.mcc); if (config.mnc != 0) { parts.add("mnc" + config.mnc); } } if (!config.mLocaleList.isEmpty()) { final String resourceQualifier = localesToResourceQualifier(config.mLocal...
/** * Returns a string representation of the configuration that can be parsed * by build tools (like AAPT). * * @hide */
Returns a string representation of the configuration that can be parsed by build tools (like AAPT)
resourceQualifierString
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/content/res/Configuration.java", "license": "apache-2.0", "size": 87508 }
[ "android.os.Build", "android.text.TextUtils", "java.util.ArrayList" ]
import android.os.Build; import android.text.TextUtils; import java.util.ArrayList;
import android.os.*; import android.text.*; import java.util.*;
[ "android.os", "android.text", "java.util" ]
android.os; android.text; java.util;
936,601
public boolean contains(Point p) { return false; }
boolean function(Point p) { return false; }
/** * Determines whether the specified {@link Point} is inside this <code>Polyline2D</code>. This method is required to * implement the Shape interface, but in the case of Line2D objects it always returns false since a line contains no * area. */
Determines whether the specified <code>Point</code> is inside this <code>Polyline2D</code>. This method is required to implement the Shape interface, but in the case of Line2D objects it always returns false since a line contains no area
contains
{ "repo_name": "Estada1401/anuwhscript", "path": "GameServer/src/com/aionemu/gameserver/model/geometry/Polyline2D.java", "license": "gpl-3.0", "size": 15266 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,710,417
private void fitImageToView() { Drawable drawable = getDrawable(); if (drawable == null || drawable.getIntrinsicWidth() == 0 || drawable.getIntrinsicHeight() == 0) { return; } if (matrix == null || prevMatrix == null) { return; } int drawableW...
void function() { Drawable drawable = getDrawable(); if (drawable == null drawable.getIntrinsicWidth() == 0 drawable.getIntrinsicHeight() == 0) { return; } if (matrix == null prevMatrix == null) { return; } int drawableWidth = drawable.getIntrinsicWidth(); int drawableHeight = drawable.getIntrinsicHeight(); float scale...
/** * If the normalizedScale is equal to 1, then the image is made to fit the screen. Otherwise, * it is made to fit the screen according to the dimensions of the previous image matrix. This * allows the image to maintain its zoom after rotation. */
If the normalizedScale is equal to 1, then the image is made to fit the screen. Otherwise, it is made to fit the screen according to the dimensions of the previous image matrix. This allows the image to maintain its zoom after rotation
fitImageToView
{ "repo_name": "tcking/ImageCroppingView", "path": "app/src/main/java/com/github/tcking/imagecroppingview/ImageCroppingView.java", "license": "mit", "size": 33430 }
[ "android.graphics.Matrix", "android.graphics.drawable.Drawable" ]
import android.graphics.Matrix; import android.graphics.drawable.Drawable;
import android.graphics.*; import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
819,387
public void onLivingUpdate() { if (this.world.isRemote) { this.setHealth(this.getHealth()); if (!this.isSilent()) { float f = MathHelper.cos(this.animTime * ((float)Math.PI * 2F)); float f1 = MathHelper.cos(this.prevAnimTime * ...
void function() { if (this.world.isRemote) { this.setHealth(this.getHealth()); if (!this.isSilent()) { float f = MathHelper.cos(this.animTime * ((float)Math.PI * 2F)); float f1 = MathHelper.cos(this.prevAnimTime * ((float)Math.PI * 2F)); if (f1 <= -0.3F && f >= -0.3F) { this.world.playSound(this.posX, this.posY, this.p...
/** * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */
Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn
onLivingUpdate
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/boss/EntityDragon.java", "license": "lgpl-2.1", "size": 45484 }
[ "net.minecraft.entity.MoverType", "net.minecraft.entity.boss.dragon.phase.IPhase", "net.minecraft.init.SoundEvents", "net.minecraft.util.EnumParticleTypes", "net.minecraft.util.math.MathHelper", "net.minecraft.util.math.Vec3d" ]
import net.minecraft.entity.MoverType; import net.minecraft.entity.boss.dragon.phase.IPhase; import net.minecraft.init.SoundEvents; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d;
import net.minecraft.entity.*; import net.minecraft.entity.boss.dragon.phase.*; import net.minecraft.init.*; import net.minecraft.util.*; import net.minecraft.util.math.*;
[ "net.minecraft.entity", "net.minecraft.init", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.init; net.minecraft.util;
1,842,107
@Nullable public ClientConnectorConfiguration getClientConnectorConfiguration() { return cliConnCfg; }
@Nullable ClientConnectorConfiguration function() { return cliConnCfg; }
/** * Gets client connector configuration. * * @return Client connector configuration. */
Gets client connector configuration
getClientConnectorConfiguration
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java", "license": "apache-2.0", "size": 125128 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,224,781
private IScript getParsedScript() { IAsset scriptAsset = getScriptAsset(); String scriptPath = getScriptPath(); //only one of the two is allowed if (scriptAsset != null && scriptPath != null) throw new ApplicationRuntimeException(HTMLMessages.multiAssetParameterErr...
IScript function() { IAsset scriptAsset = getScriptAsset(); String scriptPath = getScriptPath(); if (scriptAsset != null && scriptPath != null) throw new ApplicationRuntimeException(HTMLMessages.multiAssetParameterError(getBinding(STR), getBinding(STR))); if (scriptPath == null && scriptAsset == null) throw new Applica...
/** * Gets the {@link IScript}for the correct script. */
Gets the <code>IScript</code>for the correct script
getParsedScript
{ "repo_name": "apache/tapestry4", "path": "framework/src/java/org/apache/tapestry/html/Script.java", "license": "apache-2.0", "size": 5504 }
[ "org.apache.hivemind.ApplicationRuntimeException", "org.apache.hivemind.Resource", "org.apache.tapestry.IAsset", "org.apache.tapestry.IScript", "org.apache.tapestry.engine.IScriptSource" ]
import org.apache.hivemind.ApplicationRuntimeException; import org.apache.hivemind.Resource; import org.apache.tapestry.IAsset; import org.apache.tapestry.IScript; import org.apache.tapestry.engine.IScriptSource;
import org.apache.hivemind.*; import org.apache.tapestry.*; import org.apache.tapestry.engine.*;
[ "org.apache.hivemind", "org.apache.tapestry" ]
org.apache.hivemind; org.apache.tapestry;
2,580,631
public Comparator<T> getComparator();
Comparator<T> function();
/** * Retrieve the natural comparator for this type. * * @return The natural comparator. */
Retrieve the natural comparator for this type
getComparator
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JavaTypeDescriptor.java", "license": "unlicense", "size": 3495 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
1,728,347
default Set<String> getProperties(String component) { return ImmutableSet.of(); }
default Set<String> getProperties(String component) { return ImmutableSet.of(); }
/** * Returns set of component configuration property names. This includes * only the names of properties whose values depart from their default. * * @param component component name * @return set of property names whose values are set to non-default values */
Returns set of component configuration property names. This includes only the names of properties whose values depart from their default
getProperties
{ "repo_name": "opennetworkinglab/onos", "path": "core/api/src/main/java/org/onosproject/cfg/ComponentConfigStore.java", "license": "apache-2.0", "size": 2824 }
[ "com.google.common.collect.ImmutableSet", "java.util.Set" ]
import com.google.common.collect.ImmutableSet; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,773,222
@Nullable public OrganizationalBranding post(@Nonnull final OrganizationalBranding newOrganizationalBranding) throws ClientException { return send(HttpMethod.POST, newOrganizationalBranding); }
OrganizationalBranding function(@Nonnull final OrganizationalBranding newOrganizationalBranding) throws ClientException { return send(HttpMethod.POST, newOrganizationalBranding); }
/** * Creates a OrganizationalBranding with a new object * * @param newOrganizationalBranding the new object to create * @return the created OrganizationalBranding * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Creates a OrganizationalBranding with a new object
post
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/OrganizationalBrandingRequest.java", "license": "mit", "size": 6504 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.OrganizationalBranding", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.OrganizationalBranding; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
568,670
registry = Registry.newInstance(); registry.setPrioritizer(fifo); ff.put(APP, "FF"); RemoteProxy p1 = RemoteProxyFactory.getNewBasicRemoteProxy(ff, "http://machine1:4444", registry); registry.add(p1); for (int i = 1; i <= MAX; i++) { Map<String, Object> cap = new HashMap<>(); cap....
registry = Registry.newInstance(); registry.setPrioritizer(fifo); ff.put(APP, "FF"); RemoteProxy p1 = RemoteProxyFactory.getNewBasicRemoteProxy(ff, STRFFSTR_priority", i); MockedRequestHandler req = GridHelper.createNewSessionHandler(registry, cap); requests.add(req); } MockedRequestHandler newSessionRequest =GridHelpe...
/** * create a hub with 1 FF * * @throws InterruptedException */
create a hub with 1 FF
setup
{ "repo_name": "doungni/selenium", "path": "java/server/test/org/openqa/grid/internal/DefaultToFIFOPriorityTest.java", "license": "apache-2.0", "size": 3774 }
[ "org.openqa.grid.internal.mock.GridHelper", "org.openqa.grid.internal.mock.MockedRequestHandler" ]
import org.openqa.grid.internal.mock.GridHelper; import org.openqa.grid.internal.mock.MockedRequestHandler;
import org.openqa.grid.internal.mock.*;
[ "org.openqa.grid" ]
org.openqa.grid;
2,777,651
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "YojhanLR/ProyectoSTPI-JavaEE", "path": "src/java/com/stpi/controller/ConductorStore.java", "license": "apache-2.0", "size": 3856 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
124,300
public Date getDate() { return this.date; }
Date function() { return this.date; }
/** * An intrinsic property of a version control repository is that it has a well defined * state at any historic timestamp. * For a decentralized VCS one also has to know which copy of the repository it refers to. * @return The technology-agnostic way of representing the baseline, UTC timestamp. */
An intrinsic property of a version control repository is that it has a well defined state at any historic timestamp. For a decentralized VCS one also has to know which copy of the repository it refers to
getDate
{ "repo_name": "simonsoft/cms-item", "path": "src/main/java/se/simonsoft/cms/item/RepoRevision.java", "license": "apache-2.0", "size": 9321 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
877,486
@Deprecated public static byte[] toByteArray(final String input) throws IOException { // make explicit the use of the default charset return input.getBytes(Charset.defaultCharset()); }
static byte[] function(final String input) throws IOException { return input.getBytes(Charset.defaultCharset()); }
/** * Gets the contents of a <code>String</code> as a <code>byte[]</code> * using the default character encoding of the platform. * <p> * This is the same as {@link String#getBytes()}. * * @param input the <code>String</code> to convert * @return the requested byte array * @throw...
Gets the contents of a <code>String</code> as a <code>byte[]</code> using the default character encoding of the platform. This is the same as <code>String#getBytes()</code>
toByteArray
{ "repo_name": "krosenvold/commons-io", "path": "src/main/java/org/apache/commons/io/IOUtils.java", "license": "apache-2.0", "size": 125142 }
[ "java.io.IOException", "java.nio.charset.Charset" ]
import java.io.IOException; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,548,548
public void testJobSubmissionLimits() throws Exception { System.err.println("testJobSubmissionLimits"); // set up the scheduler String[] qs = {"default", "q2"}; taskTrackerManager = new FakeTaskTrackerManager(2, 1, 1); scheduler.setTaskTrackerManager(taskTrackerManager); taskTrackerManage...
void function() throws Exception { System.err.println(STR); String[] qs = {STR, "q2"}; taskTrackerManager = new FakeTaskTrackerManager(2, 1, 1); scheduler.setTaskTrackerManager(taskTrackerManager); taskTrackerManager.addQueues(qs); ArrayList<FakeQueueInfo> queues = new ArrayList<FakeQueueInfo>(); queues.add(new FakeQue...
/** * This testcase test limits on job-submission per-user and per-queue. */
This testcase test limits on job-submission per-user and per-queue
testJobSubmissionLimits
{ "repo_name": "gndpig/hadoop-1.2", "path": "src/contrib/capacity-scheduler/src/test/org/apache/hadoop/mapred/TestCapacityScheduler.java", "license": "apache-2.0", "size": 148941 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.HashMap", "java.util.Set" ]
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
577,887
public String getLastAccessedTime() { return session != null ? DateFormat.getDateTimeInstance().format(new Date(session.getLastAccessedTime())): ""; }
String function() { return session != null ? DateFormat.getDateTimeInstance().format(new Date(session.getLastAccessedTime())): ""; }
/** * get last access time for session * @return */
get last access time for session
getLastAccessedTime
{ "repo_name": "sdtabilit/Scada-LTS", "path": "src/org/scada_lts/session/SessionInfo.java", "license": "gpl-2.0", "size": 3575 }
[ "java.text.DateFormat", "java.util.Date" ]
import java.text.DateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,535,082
public void addAddon(Class<? extends Skin> addonClass, AddonMetadata metadata) { supportedAddons.add(new SupportedAddon(addonClass, metadata)); }
void function(Class<? extends Skin> addonClass, AddonMetadata metadata) { supportedAddons.add(new SupportedAddon(addonClass, metadata)); }
/** * Adds an addon. When invoked, the factory exposes the given look-and-feel addon. * @param addonClass The class of the look-and-feel exposed to the user. * @param metadata Metadata about this look-and-feel. */
Adds an addon. When invoked, the factory exposes the given look-and-feel addon
addAddon
{ "repo_name": "langmo/youscope", "path": "core/api/src/main/java/org/youscope/addon/skin/SkinFactoryAdapter.java", "license": "gpl-2.0", "size": 4410 }
[ "org.youscope.addon.AddonMetadata" ]
import org.youscope.addon.AddonMetadata;
import org.youscope.addon.*;
[ "org.youscope.addon" ]
org.youscope.addon;
1,960,509
GuardedInvocation createGuardedInvocation(final SwitchPoint builtinSwitchPoint) { return createSetMethod(builtinSwitchPoint).createGuardedInvocation(); } private class SetMethod { private final MethodHandle methodHandle; private final Property property; SetMet...
GuardedInvocation createGuardedInvocation(final SwitchPoint builtinSwitchPoint) { return createSetMethod(builtinSwitchPoint).createGuardedInvocation(); } private class SetMethod { private final MethodHandle methodHandle; private final Property property; SetMethod(final MethodHandle methodHandle, final Property property...
/** * Creates the actual guarded invocation that represents the dynamic setter method for the property. * @return the actual guarded invocation that represents the dynamic setter method for the property. */
Creates the actual guarded invocation that represents the dynamic setter method for the property
createGuardedInvocation
{ "repo_name": "FauxFaux/jdk9-nashorn", "path": "src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SetMethodCreator.java", "license": "gpl-2.0", "size": 12063 }
[ "java.lang.invoke.MethodHandle", "java.lang.invoke.SwitchPoint" ]
import java.lang.invoke.MethodHandle; import java.lang.invoke.SwitchPoint;
import java.lang.invoke.*;
[ "java.lang" ]
java.lang;
2,065,770
@Test(groups = "wso2.mb", description = "single publisher single subscriber stream messages", enabled = true) @Parameters({"messageCount"}) public void testStreamMessageSingleSubSinglePub(long messageCount) throws IOException, JMSException, AndesClientConfigurationException, XPathExp...
@Test(groups = STR, description = STR, enabled = true) @Parameters({STR}) void function(long messageCount) throws IOException, JMSException, AndesClientConfigurationException, XPathExpressionException, NamingException, AndesClientException, DataAccessUtilException { this.runMessageTypeTestCase(JMSMessageType.STREAM, 1,...
/** * Publish stream messages to a queue in a single node and receive from the same node with one * subscriber * * @param messageCount number of message to send and receive * @throws IOException * @throws JMSException * @throws AndesClientConfigurationException * @throws XPathExp...
Publish stream messages to a queue in a single node and receive from the same node with one subscriber
testStreamMessageSingleSubSinglePub
{ "repo_name": "wso2/product-ei", "path": "integration/broker-tests/tests-platform/tests-clustering/src/test/java/org/wso2/mb/platform/tests/clustering/DifferentMessageTypesQueueTestCase.java", "license": "apache-2.0", "size": 16272 }
[ "java.io.IOException", "javax.jms.JMSException", "javax.naming.NamingException", "javax.xml.xpath.XPathExpressionException", "org.testng.annotations.Parameters", "org.testng.annotations.Test", "org.wso2.mb.integration.common.clients.exceptions.AndesClientConfigurationException", "org.wso2.mb.integrati...
import java.io.IOException; import javax.jms.JMSException; import javax.naming.NamingException; import javax.xml.xpath.XPathExpressionException; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import org.wso2.mb.integration.common.clients.exceptions.AndesClientConfigurationException; impor...
import java.io.*; import javax.jms.*; import javax.naming.*; import javax.xml.xpath.*; import org.testng.annotations.*; import org.wso2.mb.integration.common.clients.exceptions.*; import org.wso2.mb.integration.common.clients.operations.utils.*; import org.wso2.mb.platform.common.utils.exceptions.*;
[ "java.io", "javax.jms", "javax.naming", "javax.xml", "org.testng.annotations", "org.wso2.mb" ]
java.io; javax.jms; javax.naming; javax.xml; org.testng.annotations; org.wso2.mb;
2,133,035
public void testGetRendererDescriptorExplicit() throws QuickFixException { DefDescriptor<? extends BaseComponentDef> ddParent = define( baseTag, "extensible='true' renderer='java://org.auraframework.impl.renderer.sampleJavaRenderers.TestOverridingRenderer'", "...
void function() throws QuickFixException { DefDescriptor<? extends BaseComponentDef> ddParent = define( baseTag, STRSTRrenderer='java: ddParent.getDescriptorName()), STRjava: dd.getQualifiedName()); }
/** * Test method for {@link BaseComponentDef#getRendererDescriptor()}. */
Test method for <code>BaseComponentDef#getRendererDescriptor()</code>
testGetRendererDescriptorExplicit
{ "repo_name": "igor-sfdc/aura", "path": "aura-impl/src/test/java/org/auraframework/def/BaseComponentDefTest.java", "license": "apache-2.0", "size": 93773 }
[ "org.auraframework.throwable.quickfix.QuickFixException" ]
import org.auraframework.throwable.quickfix.QuickFixException;
import org.auraframework.throwable.quickfix.*;
[ "org.auraframework.throwable" ]
org.auraframework.throwable;
2,024,201
private void setCookieParams(HttpFormAuthConfigurer formConfigurer, HttpMethodParams params) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { // NUTCH-2280 - set the HttpClient cookie policy if (formConfigurer.getCookiePolicy() != null) { Str...
void function(HttpFormAuthConfigurer formConfigurer, HttpMethodParams params) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { if (formConfigurer.getCookiePolicy() != null) { String policy = formConfigurer.getCookiePolicy(); Object p = FieldUtils.readDeclaredStaticField...
/** * NUTCH-2280 Set the cookie policy value from httpclient-auth.xml for the * Post httpClient action. * * @param fromConfigurer * - the httpclient-auth.xml values * * @param params * - the HttpMethodParams from the current httpclient instance * * @throws NoSuchFieldE...
NUTCH-2280 Set the cookie policy value from httpclient-auth.xml for the Post httpClient action
setCookieParams
{ "repo_name": "code4wt/nutch-learning", "path": "src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpFormAuthentication.java", "license": "apache-2.0", "size": 9541 }
[ "org.apache.commons.httpclient.cookie.CookiePolicy", "org.apache.commons.httpclient.params.HttpMethodParams", "org.apache.commons.lang3.reflect.FieldUtils" ]
import org.apache.commons.httpclient.cookie.CookiePolicy; import org.apache.commons.httpclient.params.HttpMethodParams; import org.apache.commons.lang3.reflect.FieldUtils;
import org.apache.commons.httpclient.cookie.*; import org.apache.commons.httpclient.params.*; import org.apache.commons.lang3.reflect.*;
[ "org.apache.commons" ]
org.apache.commons;
72,566
private static void zipDir(File dir, String relativePath, ZipOutputStream zos, boolean start) throws IOException { String[] dirList = dir.list(); for (String aDirList : dirList) { File f = new File(dir, aDirList); if (!f.isHidden()) { if (f.isDirectory()) { if (!start) { ...
static void function(File dir, String relativePath, ZipOutputStream zos, boolean start) throws IOException { String[] dirList = dir.list(); for (String aDirList : dirList) { File f = new File(dir, aDirList); if (!f.isHidden()) { if (f.isDirectory()) { if (!start) { ZipEntry dirEntry = new ZipEntry(relativePath + f.getN...
/** * This recursive method is used by the {@link #zipDir(File, String, ZipOutputStream)} method. * <p/> * A special handling is required for the start of the zip (via the start parameter). * * @param dir directory contents to zip. * @param relativePath relative path top prepend to all files in the z...
This recursive method is used by the <code>#zipDir(File, String, ZipOutputStream)</code> method. A special handling is required for the start of the zip (via the start parameter)
zipDir
{ "repo_name": "showyou/hoop-webhdfs-hue", "path": "hoop-server/src/main/java/com/cloudera/lib/io/IOUtils.java", "license": "apache-2.0", "size": 8444 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.util.zip.ZipEntry", "java.util.zip.ZipOutputStream" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
501,014
public void selectAllGlyphs() { for (Iterator<Glyph> e = visualEnts.iterator(); e.hasNext();) { e.next().select(true); } }
void function() { for (Iterator<Glyph> e = visualEnts.iterator(); e.hasNext();) { e.next().select(true); } }
/** * Select all glyphs */
Select all glyphs
selectAllGlyphs
{ "repo_name": "sharwell/zgrnbviewer", "path": "org-tvl-netbeans-zgrviewer/src/fr/inria/zvtm/engine/VirtualSpace.java", "license": "lgpl-3.0", "size": 25742 }
[ "fr.inria.zvtm.glyphs.Glyph", "java.util.Iterator" ]
import fr.inria.zvtm.glyphs.Glyph; import java.util.Iterator;
import fr.inria.zvtm.glyphs.*; import java.util.*;
[ "fr.inria.zvtm", "java.util" ]
fr.inria.zvtm; java.util;
459,005
void addKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId);
void addKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId);
/** * Add key binding for action. * * @param key * the hot key which bind * @param actionId * the action id which keys bind */
Add key binding for action
addKey
{ "repo_name": "Ori-Libhaber/che-core", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/Scheme.java", "license": "epl-1.0", "size": 2113 }
[ "javax.validation.constraints.NotNull", "org.eclipse.che.ide.util.input.CharCodeWithModifiers" ]
import javax.validation.constraints.NotNull; import org.eclipse.che.ide.util.input.CharCodeWithModifiers;
import javax.validation.constraints.*; import org.eclipse.che.ide.util.input.*;
[ "javax.validation", "org.eclipse.che" ]
javax.validation; org.eclipse.che;
558,248
Optional<PackingPlan.InstancePlan> removeAnyInstanceOfComponent(String component) { Optional<PackingPlan.InstancePlan> instancePlan = getAnyInstanceOfComponent(component); if (instancePlan.isPresent()) { PackingPlan.InstancePlan plan = instancePlan.get(); this.instances.remove(plan); return ...
Optional<PackingPlan.InstancePlan> removeAnyInstanceOfComponent(String component) { Optional<PackingPlan.InstancePlan> instancePlan = getAnyInstanceOfComponent(component); if (instancePlan.isPresent()) { PackingPlan.InstancePlan plan = instancePlan.get(); this.instances.remove(plan); return instancePlan; } return Optio...
/** * Remove an instance of a particular component from a container and update its * corresponding resources. * * @return the corresponding instance plan if the instance is removed the container. * Return void if an instance is not found */
Remove an instance of a particular component from a container and update its corresponding resources
removeAnyInstanceOfComponent
{ "repo_name": "mycFelix/heron", "path": "heron/packing/src/java/org/apache/heron/packing/builder/Container.java", "license": "apache-2.0", "size": 7500 }
[ "com.google.common.base.Optional", "org.apache.heron.spi.packing.PackingPlan" ]
import com.google.common.base.Optional; import org.apache.heron.spi.packing.PackingPlan;
import com.google.common.base.*; import org.apache.heron.spi.packing.*;
[ "com.google.common", "org.apache.heron" ]
com.google.common; org.apache.heron;
1,934,446
protected Path normalizePath(final String path) { return environment.resolvePath(path).toAbsolutePath().normalize(); }
Path function(final String path) { return environment.resolvePath(path).toAbsolutePath().normalize(); }
/** * Resolves the path to the path relative to the WildFly home directory. * * @param path the name of the relative path * * @return the normalized path */
Resolves the path to the path relative to the WildFly home directory
normalizePath
{ "repo_name": "aloubyansky/wildfly-core", "path": "launcher/src/main/java/org/wildfly/core/launcher/AbstractCommandBuilder.java", "license": "lgpl-2.1", "size": 21903 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
2,578,593
public static Collection<SkillDefinition> getSkillDefinitions() { return getInstance().skillDefinitions.values(); }
static Collection<SkillDefinition> function() { return getInstance().skillDefinitions.values(); }
/** * Gets a list of all currently registered skill classes. * @return the list of registered skill classes */
Gets a list of all currently registered skill classes
getSkillDefinitions
{ "repo_name": "timothyb89/skillful", "path": "src/main/java/net/asrex/skillful/skill/SkillRegistry.java", "license": "mit", "size": 8179 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,004,102
public ServiceFuture<TopicInner> createOrUpdateAsync(String resourceGroupName, String topicName, TopicInner topicInfo, final ServiceCallback<TopicInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo), serviceCallback); ...
ServiceFuture<TopicInner> function(String resourceGroupName, String topicName, TopicInner topicInfo, final ServiceCallback<TopicInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, topicName, topicInfo), serviceCallback); }
/** * Create a topic. * Asynchronously creates a new topic with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param topicName Name of the topic. * @param topicInfo Topic information. * @param serviceCallback th...
Create a topic. Asynchronously creates a new topic with the specified parameters
createOrUpdateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/eventgrid/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_06_01/implementation/TopicsInner.java", "license": "mit", "size": 112449 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,732,516
Set<String> findLanguageLabels();
Set<String> findLanguageLabels();
/** * Find all the unique label names all the languages are using. * * @return a set of all the labels. */
Find all the unique label names all the languages are using
findLanguageLabels
{ "repo_name": "kevinearls/camel", "path": "platforms/camel-catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java", "license": "apache-2.0", "size": 18710 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,215,771
public SIMPLocalSubscriptionControllable getLocalSubscriptionControlByName(String subscriptionName) throws SIMPException, SIMPControllableNotFoundException;
SIMPLocalSubscriptionControllable function(String subscriptionName) throws SIMPException, SIMPControllableNotFoundException;
/** * Returns a SIMPLocalSubscriptionControllable with the specified name. * NOTE: this is not to be confused with a subscription ID. * The subscription name only applies to Durable subscriptions. * Therefore this method will always return either a SIMPLocalSubscriptionControllable * for a durable subscr...
Returns a SIMPLocalSubscriptionControllable with the specified name. The subscription name only applies to Durable subscriptions. Therefore this method will always return either a SIMPLocalSubscriptionControllable for a durable subscription or will throw a SIMPControllableNotFoundException
getLocalSubscriptionControlByName
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/processor/runtime/SIMPTopicSpaceControllable.java", "license": "epl-1.0", "size": 4141 }
[ "com.ibm.ws.sib.processor.exceptions.SIMPControllableNotFoundException", "com.ibm.ws.sib.processor.exceptions.SIMPException" ]
import com.ibm.ws.sib.processor.exceptions.SIMPControllableNotFoundException; import com.ibm.ws.sib.processor.exceptions.SIMPException;
import com.ibm.ws.sib.processor.exceptions.*;
[ "com.ibm.ws" ]
com.ibm.ws;
241,984
public String getColumnTypeName(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].columnTypeName; }
String function(int column) throws SQLException { checkColumn(column); return columnMetaData[--column].columnTypeName; }
/** * <!-- start generic documentation --> * Retrieves the designated column's database-specific type name. <p> * <!-- end generic documentation --> * * @param column the first column is 1, the second is 2, ... * @return type name used by the database. If the column type is * a user-d...
Retrieves the designated column's database-specific type name.
getColumnTypeName
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/hsqldb1733/src/org/hsqldb/jdbc/jdbcResultSetMetaData.java", "license": "lgpl-3.0", "size": 46192 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
627,426
List<RefactoringRule> refactorings= getAllCleanUpRules(); for (final Iterator<RefactoringRule> iter= refactorings.iterator(); iter.hasNext();) { RefactoringRule refactoring= iter.next(); if (!refactoring.isEnabled(preferences)) { iter.remove(); } } return refactorings; }
List<RefactoringRule> refactorings= getAllCleanUpRules(); for (final Iterator<RefactoringRule> iter= refactorings.iterator(); iter.hasNext();) { RefactoringRule refactoring= iter.next(); if (!refactoring.isEnabled(preferences)) { iter.remove(); } } return refactorings; }
/** * Returns the cleanup rules which have been enabled from the Eclipse * preferences. * * @param preferences the preferences * @return the cleanup rules which have been enabled from the Eclipse * preferences */
Returns the cleanup rules which have been enabled from the Eclipse preferences
getConfiguredRefactoringRules
{ "repo_name": "rpau/AutoRefactor", "path": "plugin/src/main/java/org/autorefactor/jdt/internal/ui/fix/AllCleanUpRules.java", "license": "epl-1.0", "size": 9065 }
[ "java.util.Iterator", "java.util.List", "org.autorefactor.jdt.internal.corext.dom.RefactoringRule" ]
import java.util.Iterator; import java.util.List; import org.autorefactor.jdt.internal.corext.dom.RefactoringRule;
import java.util.*; import org.autorefactor.jdt.internal.corext.dom.*;
[ "java.util", "org.autorefactor.jdt" ]
java.util; org.autorefactor.jdt;
2,731,261
@Override public void setQty (java.math.BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); }
void function (java.math.BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); }
/** Set Menge. @param Qty Menge */
Set Menge
setQty
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/eevolution/model/X_PP_MRP.java", "license": "gpl-2.0", "size": 30002 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,170,752