method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private static void runClustering() throws IOException, FileFormatException, ExecutionException, Exception {
logger.logAndStderr("\nLoading clusters...");
List<Cluster> inClusters = FileIOManager.loadClustersFromCsv(inputFileName, false);
List<UniqueSequence> databaseSequences = new ArrayLis... | static void function() throws IOException, FileFormatException, ExecutionException, Exception { logger.logAndStderr(STR); List<Cluster> inClusters = FileIOManager.loadClustersFromCsv(inputFileName, false); List<UniqueSequence> databaseSequences = new ArrayList<>(); if (additionalSequencesPath != null){ logger.logAndStd... | /**
* Runs hmm clustering routine
*
* @throws IOException
* @throws FileFormatException
* @throws ExecutionException
* @throws Exception
*/ | Runs hmm clustering routine | runClustering | {
"repo_name": "hammock-dev/hammock",
"path": "src/cz/krejciadam/hammock/Hammock.java",
"license": "gpl-3.0",
"size": 79499
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Set",
"java.util.concurrent.ExecutionException"
] | import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import java.util.concurrent.ExecutionException; | import java.io.*; import java.util.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,878,194 |
private void addToFileListing(SequenceFile.Writer fileListWriter,
Path sourceRoot, Path path, DistCpContext context) throws IOException {
sourceRoot = getPathWithSchemeAndAuthority(sourceRoot);
path = getPathWithSchemeAndAuthority(path);
path = makeQualified(path);
FileSystem sourceFS = sourceR... | void function(SequenceFile.Writer fileListWriter, Path sourceRoot, Path path, DistCpContext context) throws IOException { sourceRoot = getPathWithSchemeAndAuthority(sourceRoot); path = getPathWithSchemeAndAuthority(path); path = makeQualified(path); FileSystem sourceFS = sourceRoot.getFileSystem(getConf()); FileStatus ... | /**
* Write a single file/directory to the sequence file.
* @throws IOException
*/ | Write a single file/directory to the sequence file | addToFileListing | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java",
"license": "apache-2.0",
"size": 31920
} | [
"java.io.IOException",
"java.util.LinkedList",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.SequenceFile",
"org.apache.hadoop.tools.DistCpOptions",
"org.apache.hadoop.tools.util.DistCpUtils"
] | import java.io.IOException; import java.util.LinkedList; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.tools.DistCpOptions; import org.apache.hadoop.tools.util.DistCpUtils; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.tools.*; import org.apache.hadoop.tools.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,146,937 |
@XmlElement(name="pdp_per_row")
@XmlJavaTypeAdapter(LongAdapter.class)
public Long getPdpPerRow() {
return pdpPerRow;
} | @XmlElement(name=STR) @XmlJavaTypeAdapter(LongAdapter.class) Long function() { return pdpPerRow; } | /**
* Gets the PDP (Primary Data Points) per row.
*
* @return the PDP (Primary Data Points) per row
*/ | Gets the PDP (Primary Data Points) per row | getPdpPerRow | {
"repo_name": "tdefilip/opennms",
"path": "opennms-rrd/opennms-rrd-model/src/main/java/org/opennms/netmgt/rrd/model/AbstractRRA.java",
"license": "agpl-3.0",
"size": 3615
} | [
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter"
] | import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; | import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.*; | [
"javax.xml"
] | javax.xml; | 1,428,844 |
public static Element generateFormat(Document doc, OMMFormat format)
{
Element tFormat = OMMXMLConverter.createXmlElement(doc, "format", OMM_NAMESPACE_PREFIX, OMM_NAMESPACE_URI);
tFormat.setTextContent(format.getMIMEType());
if (format.getSchema() != null) tFormat.setAttributeNS(OMM_NAMESPACE_URI, OMM_NAMESPA... | static Element function(Document doc, OMMFormat format) { Element tFormat = OMMXMLConverter.createXmlElement(doc, STR, OMM_NAMESPACE_PREFIX, OMM_NAMESPACE_URI); tFormat.setTextContent(format.getMIMEType()); if (format.getSchema() != null) tFormat.setAttributeNS(OMM_NAMESPACE_URI, OMM_NAMESPACE_PREFIX+STR, format.getSch... | /** Creates an XML Element representing a block's format entry.
* @param doc An XML {@link Document} which may be empty (can be obtained by calling {@link #createNewXmlDocument}).
* @param format The block's {@link OMMFormat}.
* @return An XML {@link Element} containing the format information of a block.
*/ | Creates an XML Element representing a block's format entry | generateFormat | {
"repo_name": "dfki-iui/libomm",
"path": "src/de/dfki/omm/tools/OMMXMLConverter.java",
"license": "gpl-3.0",
"size": 43838
} | [
"de.dfki.omm.types.OMMFormat",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import de.dfki.omm.types.OMMFormat; import org.w3c.dom.Document; import org.w3c.dom.Element; | import de.dfki.omm.types.*; import org.w3c.dom.*; | [
"de.dfki.omm",
"org.w3c.dom"
] | de.dfki.omm; org.w3c.dom; | 638,123 |
EClass getObjectPropertyType(); | EClass getObjectPropertyType(); | /**
* Returns the meta object for class '{@link org.eclipse.vorto.core.api.model.datatype.ObjectPropertyType <em>Object Property Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Object Property Type</em>'.
* @see org.eclipse.vorto.core.api.model.datatype.... | Returns the meta object for class '<code>org.eclipse.vorto.core.api.model.datatype.ObjectPropertyType Object Property Type</code>'. | getObjectPropertyType | {
"repo_name": "hrohmer/vorto",
"path": "bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/datatype/DatatypePackage.java",
"license": "epl-1.0",
"size": 57755
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 194,928 |
@Override
public int getItemCountInInventory(final Block block)
{
return InventoryUtils.getItemCountInItemHandler(citizen.getInventoryCitizen(), block);
} | int function(final Block block) { return InventoryUtils.getItemCountInItemHandler(citizen.getInventoryCitizen(), block); } | /**
* Returns the amount of a certain block in the inventory.
*
* @param block the block.
* @return the quantity.
*/ | Returns the amount of a certain block in the inventory | getItemCountInInventory | {
"repo_name": "Minecolonies/minecolonies",
"path": "src/main/java/com/minecolonies/coremod/entity/citizen/citizenhandlers/CitizenInventoryHandler.java",
"license": "gpl-3.0",
"size": 2917
} | [
"com.minecolonies.api.util.InventoryUtils",
"net.minecraft.block.Block"
] | import com.minecolonies.api.util.InventoryUtils; import net.minecraft.block.Block; | import com.minecolonies.api.util.*; import net.minecraft.block.*; | [
"com.minecolonies.api",
"net.minecraft.block"
] | com.minecolonies.api; net.minecraft.block; | 1,559,265 |
@SuppressWarnings("unused")
public static void nailMain(NGContext context) {
obtainResourceFileLock();
try (IdleKiller.CommandExecutionScope ignored =
DaemonBootstrap.getDaemonKillers().newCommandExecutionScope()) {
DaemonBootstrap.commandStarted();
new Main(context.out, context.err, con... | @SuppressWarnings(STR) static void function(NGContext context) { obtainResourceFileLock(); try (IdleKiller.CommandExecutionScope ignored = DaemonBootstrap.getDaemonKillers().newCommandExecutionScope()) { DaemonBootstrap.commandStarted(); new Main(context.out, context.err, context.in, Optional.of(context)) .runMainThenE... | /**
* When running as a daemon in the NailGun server, {@link #nailMain(NGContext)} is called instead
* of {@link Main#main(String[])} so that the given context can be used to listen for client
* disconnections and interrupt command processing when they occur.
*/ | When running as a daemon in the NailGun server, <code>#nailMain(NGContext)</code> is called instead of <code>Main#main(String[])</code> so that the given context can be used to listen for client disconnections and interrupt command processing when they occur | nailMain | {
"repo_name": "SeleniumHQ/buck",
"path": "src/com/facebook/buck/cli/MainWithNailgun.java",
"license": "apache-2.0",
"size": 3542
} | [
"com.facebook.buck.cli.Main",
"com.facebook.nailgun.NGContext",
"java.util.Optional"
] | import com.facebook.buck.cli.Main; import com.facebook.nailgun.NGContext; import java.util.Optional; | import com.facebook.buck.cli.*; import com.facebook.nailgun.*; import java.util.*; | [
"com.facebook.buck",
"com.facebook.nailgun",
"java.util"
] | com.facebook.buck; com.facebook.nailgun; java.util; | 60,406 |
public static ComponentUI createUI(JComponent c) {
return new TinyScrollBarUI();
} | static ComponentUI function(JComponent c) { return new TinyScrollBarUI(); } | /**
* Creates the UI delegate for the given component.
*
* @param mainColor
* The component to create its UI delegate.
* @return The UI delegate for the given component.
*/ | Creates the UI delegate for the given component | createUI | {
"repo_name": "scratchduino/scratch2",
"path": "java/src/de/muntjak/tinylookandfeel/TinyScrollBarUI.java",
"license": "gpl-2.0",
"size": 26363
} | [
"javax.swing.JComponent",
"javax.swing.plaf.ComponentUI"
] | import javax.swing.JComponent; import javax.swing.plaf.ComponentUI; | import javax.swing.*; import javax.swing.plaf.*; | [
"javax.swing"
] | javax.swing; | 2,022,678 |
public Tree<N, L> subTree(N node) {
Tree<N, L> res = new Tree<N, L>(node);
for (Map.Entry<N, L> entry : getChildrenWithLabels(node).entrySet()) {
// no need for overwrite
res.addSubTree(node, subTree(entry.getKey()), entry.getValue());
}
return res;
... | Tree<N, L> function(N node) { Tree<N, L> res = new Tree<N, L>(node); for (Map.Entry<N, L> entry : getChildrenWithLabels(node).entrySet()) { res.addSubTree(node, subTree(entry.getKey()), entry.getValue()); } return res; } | /**
* Returns the subtree with specified node as root. <br>
* <b>Subtree definition</b> (wikipedia) : Any node in a tree T, together
* with all the nodes below it, comprise a subtree of T. Note that the
* subtree corresponding to the root node is the entire tree.
*
* @param node the... | Returns the subtree with specified node as root. Subtree definition (wikipedia) : Any node in a tree T, together with all the nodes below it, comprise a subtree of T. Note that the subtree corresponding to the root node is the entire tree | subTree | {
"repo_name": "NCIP/wustl-common-utilities",
"path": "src/edu/wustl/common/util/Tree.java",
"license": "bsd-3-clause",
"size": 20703
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 239,744 |
public void setThumbnail(final Link newthumbnail) {
Link old = null;
for (final Link l : getOtherLinks()) {
if ("thumbnail".equals(l.getRel())) {
old = l;
break;
}
}
if (old != null) {
getOtherLinks().remove(old);
... | void function(final Link newthumbnail) { Link old = null; for (final Link l : getOtherLinks()) { if (STR.equals(l.getRel())) { old = l; break; } } if (old != null) { getOtherLinks().remove(old); newthumbnail.setRel(STR); } getOtherLinks().add(newthumbnail); } | /**
* Set the value of thumbnail
*
* @param newthumbnail new value of thumbnail
*/ | Set the value of thumbnail | setThumbnail | {
"repo_name": "rometools/rome",
"path": "rome-modules/src/main/java/com/rometools/modules/activitystreams/types/Bookmark.java",
"license": "apache-2.0",
"size": 4317
} | [
"com.rometools.rome.feed.atom.Link"
] | import com.rometools.rome.feed.atom.Link; | import com.rometools.rome.feed.atom.*; | [
"com.rometools.rome"
] | com.rometools.rome; | 2,669,002 |
public FontData getFontData() {
int rawSize = rawFontData.getHeight();
if (this.sizeInPixels) {
rawSize = pixelsToPoints(rawSize);
}
return new FontData(rawFontData.getName(), rawSize, rawFontData.getStyle());
} | FontData function() { int rawSize = rawFontData.getHeight(); if (this.sizeInPixels) { rawSize = pixelsToPoints(rawSize); } return new FontData(rawFontData.getName(), rawSize, rawFontData.getStyle()); } | /**
* Return the FontData, scaled according to whether its size represents pixels or points. This may be called only on
* the UI thread, since it uses the SWT Display to do the scaling.
*
* @return the scaled FontData
*/ | Return the FontData, scaled according to whether its size represents pixels or points. This may be called only on the UI thread, since it uses the SWT Display to do the scaling | getFontData | {
"repo_name": "fqqb/yamcs-studio",
"path": "bundles/org.csstudio.opibuilder/src/org/csstudio/opibuilder/util/OPIFont.java",
"license": "epl-1.0",
"size": 5856
} | [
"org.eclipse.swt.graphics.FontData"
] | import org.eclipse.swt.graphics.FontData; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 919,230 |
public void setMemory(SparseObjectMatrix<Column> mem) {
this.memory = mem;
} | void function(SparseObjectMatrix<Column> mem) { this.memory = mem; } | /**
* Sets the matrix containing the {@link Column}s
* @param mem
*/ | Sets the matrix containing the <code>Column</code>s | setMemory | {
"repo_name": "antidata/htm.java",
"path": "src/main/java/org/numenta/nupic/Connections.java",
"license": "agpl-3.0",
"size": 50990
} | [
"org.numenta.nupic.model.Column",
"org.numenta.nupic.util.SparseObjectMatrix"
] | import org.numenta.nupic.model.Column; import org.numenta.nupic.util.SparseObjectMatrix; | import org.numenta.nupic.model.*; import org.numenta.nupic.util.*; | [
"org.numenta.nupic"
] | org.numenta.nupic; | 878,294 |
public static String getConfigEntry(File configFile, String requestKey)
throws IOException {
if (configFile == null || !configFile.exists())
return null;
FileReader f = new FileReader(configFile);
BufferedReader b = new BufferedReader(f);
while (b.ready()) {
String line = b.readLine();
if (li... | static String function(File configFile, String requestKey) throws IOException { if (configFile == null !configFile.exists()) return null; FileReader f = new FileReader(configFile); BufferedReader b = new BufferedReader(f); while (b.ready()) { String line = b.readLine(); if (line.trim().length() == 0) continue; if (line... | /**
* Read a configuration value from a file
*
* @param configFile
* the file to read from
* @param requestKey
* the configuration key to request
* @return the value belonging to the requested key
* @throws IOException
* if reading from the configuration file fails o... | Read a configuration value from a file | getConfigEntry | {
"repo_name": "fkooman/nokicert",
"path": "src/net/tuxed/misc/Utils.java",
"license": "gpl-3.0",
"size": 13937
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 59,840 |
public static double sumDifference(final double[] sample1, final double[] sample2) {
int n = sample1.length;
if (n != sample2.length) {
throw new DimensionMismatchException(n, sample2.length);
}
if (n <= 0) {
throw new NoDataException(LocalizedFormats.INSUFFIC... | static double function(final double[] sample1, final double[] sample2) { int n = sample1.length; if (n != sample2.length) { throw new DimensionMismatchException(n, sample2.length); } if (n <= 0) { throw new NoDataException(LocalizedFormats.INSUFFICIENT_DIMENSION); } double result = 0; for (int i = 0; i < n; i++) { resu... | /**
* Returns the sum of the (signed) differences between corresponding elements of the
* input arrays -- i.e., sum(sample1[i] - sample2[i]).
*
* @param sample1 the first array
* @param sample2 the second array
* @return sum of paired differences
* @throws DimensionMismatchException... | Returns the sum of the (signed) differences between corresponding elements of the input arrays -- i.e., sum(sample1[i] - sample2[i]) | sumDifference | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_50v2/src/main/java/org/apache/commons/math/stat/StatUtils.java",
"license": "gpl-2.0",
"size": 26841
} | [
"org.apache.commons.math.exception.DimensionMismatchException",
"org.apache.commons.math.exception.NoDataException",
"org.apache.commons.math.exception.util.LocalizedFormats"
] | import org.apache.commons.math.exception.DimensionMismatchException; import org.apache.commons.math.exception.NoDataException; import org.apache.commons.math.exception.util.LocalizedFormats; | import org.apache.commons.math.exception.*; import org.apache.commons.math.exception.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,224,948 |
public Value convert(Value v) {
try {
return v.convertTo(type);
} catch (DbException e) {
if (e.getErrorCode() == ErrorCode.DATA_CONVERSION_ERROR_1) {
String target = (table == null ? "" : table.getName() + ": ") + getCreateSQL();
throw DbExcep... | Value function(Value v) { try { return v.convertTo(type); } catch (DbException e) { if (e.getErrorCode() == ErrorCode.DATA_CONVERSION_ERROR_1) { String target = (table == null ? STR: STR (STR)"); } throw e; } } | /**
* Convert a value to this column's type.
*
* @param v the value
* @return the value
*/ | Convert a value to this column's type | convert | {
"repo_name": "titus08/frostwire-desktop",
"path": "lib/jars-src/h2-1.3.164/org/h2/table/Column.java",
"license": "gpl-3.0",
"size": 22136
} | [
"org.h2.constant.ErrorCode",
"org.h2.message.DbException",
"org.h2.value.Value"
] | import org.h2.constant.ErrorCode; import org.h2.message.DbException; import org.h2.value.Value; | import org.h2.constant.*; import org.h2.message.*; import org.h2.value.*; | [
"org.h2.constant",
"org.h2.message",
"org.h2.value"
] | org.h2.constant; org.h2.message; org.h2.value; | 1,436,456 |
public void setInternalKettleVariables( VariableSpace var ) {
if ( jobMeta != null && jobMeta.getFilename() != null ) // we have a finename that's defined.
{
try {
FileObject fileObject = KettleVFS.getFileObject( jobMeta.getFilename(), this );
FileName fileName = fileObject.getName();
... | void function( VariableSpace var ) { if ( jobMeta != null && jobMeta.getFilename() != null ) { try { FileObject fileObject = KettleVFS.getFileObject( jobMeta.getFilename(), this ); FileName fileName = fileObject.getName(); var.setVariable( Const.INTERNAL_VARIABLE_JOB_FILENAME_NAME, fileName.getBaseName() ); FileName fi... | /**
* Sets the internal kettle variables.
*
* @param var
* the new internal kettle variables.
*/ | Sets the internal kettle variables | setInternalKettleVariables | {
"repo_name": "gretchiemoran/pentaho-kettle",
"path": "engine/src/org/pentaho/di/job/Job.java",
"license": "apache-2.0",
"size": 71804
} | [
"org.apache.commons.vfs2.FileName",
"org.apache.commons.vfs2.FileObject",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.variables.VariableSpace",
"org.pentaho.di.core.vfs.KettleVFS"
] | import org.apache.commons.vfs2.FileName; import org.apache.commons.vfs2.FileObject; import org.pentaho.di.core.Const; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.core.vfs.KettleVFS; | import org.apache.commons.vfs2.*; import org.pentaho.di.core.*; import org.pentaho.di.core.variables.*; import org.pentaho.di.core.vfs.*; | [
"org.apache.commons",
"org.pentaho.di"
] | org.apache.commons; org.pentaho.di; | 356,821 |
public Iterator<I> asIterator( )
throws IllegalStateException {
lock( );
return private_once( ).iterator( );
} | Iterator<I> function( ) throws IllegalStateException { lock( ); return private_once( ).iterator( ); } | /**
* <p>
* {@code asIterator} returns a view of this cursor as an
* {@link java.util.Iterator}.
* </p>
*
* <p>
* This is a transformation method.
* </p>
*
* @return A view of this cursor as a {@link java.util.Iterator}.
* @throws IllegalStateException
* when this cursor is not in pr... | asIterator returns a view of this cursor as an <code>java.util.Iterator</code>. This is a transformation method. | asIterator | {
"repo_name": "evenjn/knit",
"path": "src/main/java/org/github/evenjn/knit/KnittingCursor.java",
"license": "apache-2.0",
"size": 73315
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 209,021 |
public CIContact readCIContact(XMLStreamReader reader) throws XMLStreamException
{
boolean found = checkElementName(reader, "CI_Contact");
if (!found)
throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader));
return this.readCI... | CIContact function(XMLStreamReader reader) throws XMLStreamException { boolean found = checkElementName(reader, STR); if (!found) throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader)); return this.readCIContactType(reader); } | /**
* Read method for CIContact elements
*/ | Read method for CIContact elements | readCIContact | {
"repo_name": "sensiasoft/lib-sensorml",
"path": "sensorml-core/src/main/java/org/isotc211/v2005/gmd/bind/XMLStreamBindings.java",
"license": "mpl-2.0",
"size": 80004
} | [
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamReader",
"org.isotc211.v2005.gmd.CIContact"
] | import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.isotc211.v2005.gmd.CIContact; | import javax.xml.stream.*; import org.isotc211.v2005.gmd.*; | [
"javax.xml",
"org.isotc211.v2005"
] | javax.xml; org.isotc211.v2005; | 2,643,625 |
public void create(Entity owner, World world, float width, float height, float scale, Vector2 position,
Shape shape, FixtureDef fixtureDef, boolean dynamic) {
// Define the body
BodyDef bodyDef = new BodyDef();
if (dynamic)
bodyDef.type = BodyDef.BodyType.DynamicBody;
else
bodyDef.type = BodyDef.Bod... | void function(Entity owner, World world, float width, float height, float scale, Vector2 position, Shape shape, FixtureDef fixtureDef, boolean dynamic) { BodyDef bodyDef = new BodyDef(); if (dynamic) bodyDef.type = BodyDef.BodyType.DynamicBody; else bodyDef.type = BodyDef.BodyType.StaticBody; bodyDef.position.set( Phys... | /**
* Creates the body as a Shape physics object.
*
* @param owner
* The entity that has this component (will attatch to it using physics userdata)
* @param world
* The physics world to create the physics body
* @param width
* The desired physics width
* @param height... | Creates the body as a Shape physics object | create | {
"repo_name": "lucasmontec/Tubble",
"path": "core/src/com/carvalab/tubble/entity/components/PhysicsComponent.java",
"license": "apache-2.0",
"size": 4403
} | [
"com.badlogic.ashley.core.Entity",
"com.badlogic.gdx.math.Vector2",
"com.badlogic.gdx.physics.box2d.Body",
"com.badlogic.gdx.physics.box2d.BodyDef",
"com.badlogic.gdx.physics.box2d.FixtureDef",
"com.badlogic.gdx.physics.box2d.Shape",
"com.badlogic.gdx.physics.box2d.World",
"com.carvalab.tubble.Physics... | import com.badlogic.ashley.core.Entity; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.physics.box2d.Body; import com.badlogic.gdx.physics.box2d.BodyDef; import com.badlogic.gdx.physics.box2d.FixtureDef; import com.badlogic.gdx.physics.box2d.Shape; import com.badlogic.gdx.physics.box2d.World; import com.... | import com.badlogic.ashley.core.*; import com.badlogic.gdx.math.*; import com.badlogic.gdx.physics.box2d.*; import com.carvalab.tubble.*; | [
"com.badlogic.ashley",
"com.badlogic.gdx",
"com.carvalab.tubble"
] | com.badlogic.ashley; com.badlogic.gdx; com.carvalab.tubble; | 138,918 |
protected void uninstallListeners(JRootPane rp)
{
rp.removePropertyChangeListener(this);
} | void function(JRootPane rp) { rp.removePropertyChangeListener(this); } | /**
* Uninstalls any look and feel specific listeners from the root pane.
*
* @param rp the root pane to uninstall the listeners from
*/ | Uninstalls any look and feel specific listeners from the root pane | uninstallListeners | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/basic/BasicRootPaneUI.java",
"license": "gpl-2.0",
"size": 8658
} | [
"javax.swing.JRootPane"
] | import javax.swing.JRootPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,009,457 |
public void testBug37458() throws Exception {
int ids[] = { 13, 1, 8 };
String vals[] = { "c", "a", "b" };
createTable("testBug37458",
"(id int not null auto_increment, val varchar(100), "
+ "primary key (id), unique (val))");
stmt.executeUpdate("insert into testBug37458 values (1, 'a'), (8, 'b'), ... | void function() throws Exception { int ids[] = { 13, 1, 8 }; String vals[] = { "c", "a", "b" }; createTable(STR, STR + STR); stmt.executeUpdate(STR); pstmt = conn.prepareStatement( STR + STR, PreparedStatement.RETURN_GENERATED_KEYS); for (int i = 0; i < ids.length; ++i) { pstmt.setString(1, vals[i]); pstmt.addBatch(); ... | /**
* Bug #37458 - MySQL 5.1 returns generated keys in ascending order
*/ | Bug #37458 - MySQL 5.1 returns generated keys in ascending order | testBug37458 | {
"repo_name": "suthat/signal",
"path": "vendor/mysql-connector-java-5.1.26/src/testsuite/regression/StatementRegressionTest.java",
"license": "apache-2.0",
"size": 193675
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,322,330 |
private void _parameterCheck() throws BuildException
{
// Check that operation attribute has an appropriate value
if (_isOperationSet())
{
boolean match = false;
for (int i = 0; i < _VALID_OPERATIONS.length; i++)
{
if (_operation.compareTo(_VALID_OPERATIONS[i]) == 0)
{
match = true;
... | void function() throws BuildException { if (_isOperationSet()) { boolean match = false; for (int i = 0; i < _VALID_OPERATIONS.length; i++) { if (_operation.compareTo(_VALID_OPERATIONS[i]) == 0) { match = true; break; } } if (!match) { throw new BuildException( _PROGRAM_NAME + STR + _convertArrayToString(_VALID_OPERATIO... | /**
* Checks that all parameter inputs are valid before doing any real work.
*
* @throws BuildException
*/ | Checks that all parameter inputs are valid before doing any real work | _parameterCheck | {
"repo_name": "eitansuez/ashkelon",
"path": "src/org/ashkelon/ant/AshkelonTask.java",
"license": "gpl-2.0",
"size": 7251
} | [
"org.apache.tools.ant.BuildException"
] | import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.*; | [
"org.apache.tools"
] | org.apache.tools; | 1,839,816 |
// lock to make sure that the font is added to the cache only once
synchronized (fontsCache) {
if (!fontsCache.containsKey(fontName)) {
// Save the font in the cache first
Typeface typeface = Typeface.createFromAsset(context.getAssets(), "... | synchronized (fontsCache) { if (!fontsCache.containsKey(fontName)) { Typeface typeface = Typeface.createFromAsset(context.getAssets(), STR + fontName); fontsCache.put(fontName, typeface); } return fontsCache.get(fontName); } } | /**
* Loads custom fonts from the /assets folder and caches them.
*
*/ | Loads custom fonts from the /assets folder and caches them | loadFont | {
"repo_name": "manishpatelgt/MyTwitterRepo",
"path": "app/src/main/java/com/mytwitter/widgets/FontsHelper.java",
"license": "apache-2.0",
"size": 1810
} | [
"android.graphics.Typeface"
] | import android.graphics.Typeface; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 423,912 |
public void saveLockPattern(List<LockPatternView.Cell> pattern) {
// Compute the hash
final byte[] hash = LockPatternUtils.patternToHash(pattern);
try {
// Write the hash to file
RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename,
"rwd");
// Truncate the file if pattern is null, to ... | void function(List<LockPatternView.Cell> pattern) { final byte[] hash = LockPatternUtils.patternToHash(pattern); try { RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "rwd"); if (pattern == null) { raf.setLength(0); } else { raf.write(hash, 0, hash.length); } raf.close(); } catch (FileNotFoundExceptio... | /**
* Save a lock pattern.
*
* @param pattern
* The new pattern to save.
* @param isFallback
* Specifies if this is a fallback to biometric weak
*/ | Save a lock pattern | saveLockPattern | {
"repo_name": "KouChengjian/CamelCrown_Map",
"path": "CamelCrown/CamelCrown/src/com/camel/redpenguin/util/LockPatternUtils.java",
"license": "gpl-2.0",
"size": 6449
} | [
"android.util.Log",
"com.camel.redpenguin.view.LockPatternView",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.RandomAccessFile",
"java.util.List"
] | import android.util.Log; import com.camel.redpenguin.view.LockPatternView; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.util.List; | import android.util.*; import com.camel.redpenguin.view.*; import java.io.*; import java.util.*; | [
"android.util",
"com.camel.redpenguin",
"java.io",
"java.util"
] | android.util; com.camel.redpenguin; java.io; java.util; | 1,042,013 |
public Font getItemLabelFont(int row, int column);
| Font function(int row, int column); | /**
* Returns the font for an item label.
*
* @param row the row index (zero-based).
* @param column the column index (zero-based).
*
* @return The font (never <code>null</code>).
*/ | Returns the font for an item label | getItemLabelFont | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/renderer/xy/XYItemRenderer.java",
"license": "lgpl-3.0",
"size": 64436
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,960,038 |
private JSONWriter end(char mode, char c) throws JSONException {
if (this.mode != mode) {
throw new JSONException(mode == 'a' ? "Misplaced endArray." :
"Misplaced endObject.");
}
this.pop(mode);
try {
this.writer.write(c);
} catch ... | JSONWriter function(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? STR : STR); } this.pop(mode); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; } | /**
* End something.
* @param mode Mode
* @param c Closing character
* @return this
* @throws JSONException If unbalanced.
*/ | End something | end | {
"repo_name": "MCBans/MCBans",
"path": "src/main/java/com/mcbans/plugin/org/json/JSONWriter.java",
"license": "agpl-3.0",
"size": 10310
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 958,155 |
public void createBcastGroupFromVlan(VlanId vlanId, Collection<PortNumber> ports) {
VlanNextObjectiveStoreKey key = new VlanNextObjectiveStoreKey(deviceId, vlanId);
if (vlanNextObjStore.containsKey(key)) {
log.debug("Broadcast group for device {} and subnet {} exists",
... | void function(VlanId vlanId, Collection<PortNumber> ports) { VlanNextObjectiveStoreKey key = new VlanNextObjectiveStoreKey(deviceId, vlanId); if (vlanNextObjStore.containsKey(key)) { log.debug(STR, deviceId, vlanId); return; } TrafficSelector metadata = DefaultTrafficSelector.builder().matchVlanId(vlanId).build(); int ... | /**
* Creates a single broadcast group from a given vlan id and list of ports.
*
* @param vlanId vlan id
* @param ports list of ports in the subnet
*/ | Creates a single broadcast group from a given vlan id and list of ports | createBcastGroupFromVlan | {
"repo_name": "kuujo/onos",
"path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java",
"license": "apache-2.0",
"size": 73488
} | [
"java.util.Collection",
"org.onlab.packet.VlanId",
"org.onosproject.net.PortNumber",
"org.onosproject.net.flow.DefaultTrafficSelector",
"org.onosproject.net.flow.DefaultTrafficTreatment",
"org.onosproject.net.flow.TrafficSelector",
"org.onosproject.net.flow.TrafficTreatment",
"org.onosproject.net.flow... | import java.util.Collection; import org.onlab.packet.VlanId; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; import o... | import java.util.*; import org.onlab.packet.*; import org.onosproject.net.*; import org.onosproject.net.flow.*; import org.onosproject.net.flowobjective.*; import org.onosproject.segmentrouting.storekey.*; | [
"java.util",
"org.onlab.packet",
"org.onosproject.net",
"org.onosproject.segmentrouting"
] | java.util; org.onlab.packet; org.onosproject.net; org.onosproject.segmentrouting; | 193,872 |
public UnsignedInteger minus(UnsignedInteger val) {
return fromIntBits(value - checkNotNull(val).value);
} | UnsignedInteger function(UnsignedInteger val) { return fromIntBits(value - checkNotNull(val).value); } | /**
* Returns the result of subtracting this and {@code val}. If the result would be negative,
* returns the low 32 bits of the result.
*
* @since 14.0
*/ | Returns the result of subtracting this and val. If the result would be negative, returns the low 32 bits of the result | minus | {
"repo_name": "dmi3aleks/guava",
"path": "guava-gwt/src-super/com/google/common/primitives/super/com/google/common/primitives/UnsignedInteger.java",
"license": "apache-2.0",
"size": 8066
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,539,891 |
private ConsumerConfig getConsumerConfig(BasicFlowletContext flowletContext, Method method) {
ConsumerGroupConfig groupConfig = FlowUtils.createConsumerGroupConfig(flowletContext.getGroupId(),
flowletContext.getInstanceCount(), method);
... | ConsumerConfig function(BasicFlowletContext flowletContext, Method method) { ConsumerGroupConfig groupConfig = FlowUtils.createConsumerGroupConfig(flowletContext.getGroupId(), flowletContext.getInstanceCount(), method); return new ConsumerConfig(groupConfig, flowletContext.getInstanceId()); } | /**
* Creates a {@link ConsumerConfig} based on the method annotation and the flowlet context.
* @param flowletContext Runtime context of the flowlet.
* @param method The process method to inspect.
* @return A new instance of {@link ConsumerConfig}.
*/ | Creates a <code>ConsumerConfig</code> based on the method annotation and the flowlet context | getConsumerConfig | {
"repo_name": "mpouttuclarke/cdap",
"path": "cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/runtime/flow/FlowletProgramRunner.java",
"license": "apache-2.0",
"size": 36798
} | [
"co.cask.cdap.data2.queue.ConsumerConfig",
"co.cask.cdap.data2.queue.ConsumerGroupConfig",
"java.lang.reflect.Method"
] | import co.cask.cdap.data2.queue.ConsumerConfig; import co.cask.cdap.data2.queue.ConsumerGroupConfig; import java.lang.reflect.Method; | import co.cask.cdap.data2.queue.*; import java.lang.reflect.*; | [
"co.cask.cdap",
"java.lang"
] | co.cask.cdap; java.lang; | 1,804,738 |
public void description(Description newDescription) {
description = Description.emptyIfNull(newDescription);
}
/**
* {@inheritDoc} | void function(Description newDescription) { description = Description.emptyIfNull(newDescription); } /** * {@inheritDoc} | /**
* Sets the description of an assertion, if given null an empty {@link Description} is set.
* <p>
* To remove or clear the description, pass a <code>{@link EmptyTextDescription}</code> as
* argument.
*
* @param newDescription the new description.
*/ | Sets the description of an assertion, if given null an empty <code>Description</code> is set. To remove or clear the description, pass a <code><code>EmptyTextDescription</code></code> as argument | description | {
"repo_name": "xasx/assertj-core",
"path": "src/main/java/org/assertj/core/api/WritableAssertionInfo.java",
"license": "apache-2.0",
"size": 5023
} | [
"org.assertj.core.description.Description"
] | import org.assertj.core.description.Description; | import org.assertj.core.description.*; | [
"org.assertj.core"
] | org.assertj.core; | 2,222,368 |
public boolean isHideNativeVideoControls() {
return hideNativeVideoControls;
}
/**
* Checks to see if this player uses native video controls. For this to be {@literal true},
* the platform must support native video controls (iOS and Android) (See {@link Display#isNativeVideoPlayerCon... | boolean function() { return hideNativeVideoControls; } /** * Checks to see if this player uses native video controls. For this to be {@literal true}, * the platform must support native video controls (iOS and Android) (See {@link Display#isNativeVideoPlayerControlsIncluded() } * to find out if current platform supports... | /**
* On platforms that include native video player controls (Android and iOS), this indicates whether
* these controls should be hidden for this media player.
* @return {@literal true} if native video player controls should be hidden.
* @see Display#isNativeVideoPlayerControlsIncluded()
* @se... | On platforms that include native video player controls (Android and iOS), this indicates whether these controls should be hidden for this media player | isHideNativeVideoControls | {
"repo_name": "codenameone/CodenameOne",
"path": "CodenameOne/src/com/codename1/components/MediaPlayer.java",
"license": "gpl-2.0",
"size": 28152
} | [
"com.codename1.media.Media",
"com.codename1.ui.Display"
] | import com.codename1.media.Media; import com.codename1.ui.Display; | import com.codename1.media.*; import com.codename1.ui.*; | [
"com.codename1.media",
"com.codename1.ui"
] | com.codename1.media; com.codename1.ui; | 831,013 |
double ret = envelopeCentre.distance(cpg.envelopeCentre);
ret -= envelopeRadius;
ret -= cpg.envelopeRadius;
return ret;
}
}
private static class CachedProcessedGeom {
public CachedProcessedGeom(LatLong ll, MathTransform transform) {
Geometry geom = new GeometryFactory().createPoint(new Coordinat... | double ret = envelopeCentre.distance(cpg.envelopeCentre); ret -= envelopeRadius; ret -= cpg.envelopeRadius; return ret; } } private static class CachedProcessedGeom { public CachedProcessedGeom(LatLong ll, MathTransform transform) { Geometry geom = new GeometryFactory().createPoint(new Coordinate(ll.getLongitude(), ll.... | /**
* Calculate the minimum separation using the bounding circle
*
* @param cpg
* @return
*/ | Calculate the minimum separation using the bounding circle | minimumSeparation | {
"repo_name": "PGWelch/com.opendoorlogistics",
"path": "com.opendoorlogistics.core/src/com/opendoorlogistics/core/scripts/formulae/FmLookupNearest.java",
"license": "lgpl-3.0",
"size": 19511
} | [
"com.opendoorlogistics.api.geometry.LatLong",
"com.vividsolutions.jts.geom.Coordinate",
"com.vividsolutions.jts.geom.Geometry",
"com.vividsolutions.jts.geom.GeometryFactory",
"org.geotools.geometry.jts.JTS",
"org.opengis.referencing.operation.MathTransform"
] | import com.opendoorlogistics.api.geometry.LatLong; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; import org.geotools.geometry.jts.JTS; import org.opengis.referencing.operation.MathTransform; | import com.opendoorlogistics.api.geometry.*; import com.vividsolutions.jts.geom.*; import org.geotools.geometry.jts.*; import org.opengis.referencing.operation.*; | [
"com.opendoorlogistics.api",
"com.vividsolutions.jts",
"org.geotools.geometry",
"org.opengis.referencing"
] | com.opendoorlogistics.api; com.vividsolutions.jts; org.geotools.geometry; org.opengis.referencing; | 275,683 |
//-----------------------------------------------------------------------
public UniqueId getUniqueId() {
return _uniqueId;
} | UniqueId function() { return _uniqueId; } | /**
* Gets the unique id.
* @return the value of the property
*/ | Gets the unique id | getUniqueId | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/analytics/curve/CurveConstructionConfiguration.java",
"license": "apache-2.0",
"size": 15659
} | [
"com.opengamma.id.UniqueId"
] | import com.opengamma.id.UniqueId; | import com.opengamma.id.*; | [
"com.opengamma.id"
] | com.opengamma.id; | 1,933,709 |
public final void testImplies_08() {
s_that = "a.b.Credential a.b.Principal \"duke\" a.c.Principal \"nuke\"";
s_this = "a.b.Credential a.d.Principal \"duke\"";
p_that = new PrivateCredentialPermission(s_that, "read");
p_this = new PrivateCredentialPermission(s_this, "read");
... | final void function() { s_that = STRduke\STRnuke\STRa.b.Credential a.d.Principal \"duke\"STRreadSTRread"); assertFalse(p_this.implies(p_that)); } | /**
* [C1 P3 "duke" ] does not imply [C1 P1 "duke" P2 "nuke" ]
*/ | [C1 P3 "duke" ] does not imply [C1 P1 "duke" P2 "nuke" ] | testImplies_08 | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/auth/src/test/java/common/javax/security/auth/PrivateCredentialPermissionTest.java",
"license": "gpl-2.0",
"size": 39648
} | [
"java.security.Principal"
] | import java.security.Principal; | import java.security.*; | [
"java.security"
] | java.security; | 1,314,417 |
private Transpose findLastTransposeBeforeFirstNote(String instrumentID) {
for (MxlMeasure mxlMeasure : mxlPart.getMeasures()) {
MxlAttributes lastAttributes = null;
for (MxlMusicDataContent c : mxlMeasure.getMusicData().getContent()) {
if (c.getMusicDataContentType() == MxlMusicDataContentType.Attributes... | Transpose function(String instrumentID) { for (MxlMeasure mxlMeasure : mxlPart.getMeasures()) { MxlAttributes lastAttributes = null; for (MxlMusicDataContent c : mxlMeasure.getMusicData().getContent()) { if (c.getMusicDataContentType() == MxlMusicDataContentType.Attributes) { lastAttributes = (MxlAttributes) c; } else ... | /**
* Returns the last {@link Transpose} of this part that can be found
* before the first note that is played by the instrument with the given ID,
* or {@link Transpose#noTranspose} if there is none.
*/ | Returns the last <code>Transpose</code> of this part that can be found before the first note that is played by the instrument with the given ID, or <code>Transpose#noTranspose</code> if there is none | findLastTransposeBeforeFirstNote | {
"repo_name": "Xenoage/Zong",
"path": "musicxml-in/src/com/xenoage/zong/io/musicxml/in/readers/InstrumentsReader.java",
"license": "agpl-3.0",
"size": 7646
} | [
"com.xenoage.zong.core.instrument.Transpose",
"com.xenoage.zong.musicxml.types.MxlAttributes",
"com.xenoage.zong.musicxml.types.MxlNote",
"com.xenoage.zong.musicxml.types.choice.MxlMusicDataContent",
"com.xenoage.zong.musicxml.types.partwise.MxlMeasure"
] | import com.xenoage.zong.core.instrument.Transpose; import com.xenoage.zong.musicxml.types.MxlAttributes; import com.xenoage.zong.musicxml.types.MxlNote; import com.xenoage.zong.musicxml.types.choice.MxlMusicDataContent; import com.xenoage.zong.musicxml.types.partwise.MxlMeasure; | import com.xenoage.zong.core.instrument.*; import com.xenoage.zong.musicxml.types.*; import com.xenoage.zong.musicxml.types.choice.*; import com.xenoage.zong.musicxml.types.partwise.*; | [
"com.xenoage.zong"
] | com.xenoage.zong; | 2,914,288 |
protected void emit_EventMember_SemicolonKeyword_2_0_4_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
| void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); } | /**
* Ambiguous syntax:
* ';'?
*
* This ambiguous syntax occurs at:
* initialValue=XExpression (ambiguity) (rule end)
* name=ValidID (ambiguity) (rule end)
* type=JvmTypeReference (ambiguity) (rule end)
*/ | Ambiguous syntax: ';'? This ambiguous syntax occurs at: initialValue=XExpression (ambiguity) (rule end) name=ValidID (ambiguity) (rule end) type=JvmTypeReference (ambiguity) (rule end) | emit_EventMember_SemicolonKeyword_2_0_4_q | {
"repo_name": "jgfoster/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/serializer/SARLSyntacticSequencer.java",
"license": "apache-2.0",
"size": 38848
} | [
"java.util.List",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.nodemodel.INode",
"org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider"
] | import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider; | import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.xtext"
] | java.util; org.eclipse.emf; org.eclipse.xtext; | 2,104,203 |
public void run(Id.Application appId) throws Exception {
ApplicationSpecification app = store.getApplication(appId);
run(appId, app);
} | void function(Id.Application appId) throws Exception { ApplicationSpecification app = store.getApplication(appId); run(appId, app); } | /**
* Corrects queue.pending metric for all flowlets in an application.
*/ | Corrects queue.pending metric for all flowlets in an application | run | {
"repo_name": "anthcp/cdap",
"path": "cdap-master/src/main/java/co/cask/cdap/data/tools/flow/FlowQueuePendingCorrector.java",
"license": "apache-2.0",
"size": 20285
} | [
"co.cask.cdap.api.app.ApplicationSpecification",
"co.cask.cdap.proto.Id"
] | import co.cask.cdap.api.app.ApplicationSpecification; import co.cask.cdap.proto.Id; | import co.cask.cdap.api.app.*; import co.cask.cdap.proto.*; | [
"co.cask.cdap"
] | co.cask.cdap; | 533,415 |
public static void registerDisabledIcon(String key, ImageIcon icon) {
DISABLED_ICON_MAP.put(key, icon);
}
/**
* Register a GUI class so that it can later be retrieved via
* {@link #getGUI(Class)}. The key should match the fully-qualified class
* name for the class used as the paramet... | static void function(String key, ImageIcon icon) { DISABLED_ICON_MAP.put(key, icon); } /** * Register a GUI class so that it can later be retrieved via * {@link #getGUI(Class)}. The key should match the fully-qualified class * name for the class used as the parameter when retrieving the GUI. * * @param key * the name w... | /**
* Register an icon so that it can later be retrieved via
* {@link #getIcon(Class)}. The key should match the fully-qualified class
* name for the class used as the parameter when retrieving the icon.
*
* @param key
* the name which can be used to retrieve this icon later
... | Register an icon so that it can later be retrieved via <code>#getIcon(Class)</code>. The key should match the fully-qualified class name for the class used as the parameter when retrieving the icon | registerDisabledIcon | {
"repo_name": "apache/jmeter",
"path": "src/core/src/main/java/org/apache/jmeter/gui/GUIFactory.java",
"license": "apache-2.0",
"size": 6283
} | [
"javax.swing.ImageIcon"
] | import javax.swing.ImageIcon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,484,875 |
public static boolean isAccessible(final SymbolTable tab, final List<File> paths, final Type entity) {
return isAccessibleIn(tab, paths, entity, null);
}
| static boolean function(final SymbolTable tab, final List<File> paths, final Type entity) { return isAccessibleIn(tab, paths, entity, null); } | /** Is it allowed to use the entity from the current scope of the symbol table (gosling_et_al_2000 <a
* href="http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#104285">§6.6</a>)? */ | Is it allowed to use the entity from the current scope of the symbol table (gosling_et_al_2000 <a | isAccessible | {
"repo_name": "wandoulabs/xtc-rats",
"path": "xtc-core/src/main/java/xtc/lang/JavaEntities.java",
"license": "lgpl-2.1",
"size": 86171
} | [
"java.io.File",
"java.util.List",
"xtc.type.Type",
"xtc.util.SymbolTable"
] | import java.io.File; import java.util.List; import xtc.type.Type; import xtc.util.SymbolTable; | import java.io.*; import java.util.*; import xtc.type.*; import xtc.util.*; | [
"java.io",
"java.util",
"xtc.type",
"xtc.util"
] | java.io; java.util; xtc.type; xtc.util; | 633,513 |
public synchronized void changePasscode(String oldPass, String newPass) {
if (!isNewPasscode(oldPass, newPass)) {
return;
}
// Resets the cached encryption key, since the passcode has changed.
encryptionKey = null;
ClientManager.changePasscode(oldPass, newPass);
... | synchronized void function(String oldPass, String newPass) { if (!isNewPasscode(oldPass, newPass)) { return; } encryptionKey = null; ClientManager.changePasscode(oldPass, newPass); } | /**
* Changes the passcode to a new value.
*
* @param oldPass Old passcode.
* @param newPass New passcode.
*/ | Changes the passcode to a new value | changePasscode | {
"repo_name": "seethaa/force_analytics_example",
"path": "native/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.java",
"license": "apache-2.0",
"size": 38136
} | [
"com.salesforce.androidsdk.rest.ClientManager"
] | import com.salesforce.androidsdk.rest.ClientManager; | import com.salesforce.androidsdk.rest.*; | [
"com.salesforce.androidsdk"
] | com.salesforce.androidsdk; | 244,323 |
public void verifyOneSegment(SegmentedTimeline timeline) {
for (long testCycle = TEST_CYCLE_START; testCycle < TEST_CYCLE_END;
testCycle += TEST_CYCLE_INC) {
// get two consecutive segments for various tests
SegmentedTimeline.Segment segment1 =
... | void function(SegmentedTimeline timeline) { for (long testCycle = TEST_CYCLE_START; testCycle < TEST_CYCLE_END; testCycle += TEST_CYCLE_INC) { SegmentedTimeline.Segment segment1 = timeline.getSegment(this.monday.getTime().getTime() + testCycle); SegmentedTimeline.Segment segment2 = timeline.getSegment(segment1.getSegme... | /**
* Tests one segment of the Monday through Friday timeline. Internal indices
* inside one segment as well as adjacent segments are verified.
* @param timeline the timeline to use for verifications.
*/ | Tests one segment of the Monday through Friday timeline. Internal indices inside one segment as well as adjacent segments are verified | verifyOneSegment | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/chart/axis/junit/SegmentedTimelineTests.java",
"license": "lgpl-3.0",
"size": 47122
} | [
"org.jfree.chart.axis.SegmentedTimeline"
] | import org.jfree.chart.axis.SegmentedTimeline; | import org.jfree.chart.axis.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 187,190 |
Collection<V> get(@Nullable K key); | Collection<V> get(@Nullable K key); | /**
* Returns a collection view of all values associated with a key. If no
* mappings in the multimap have the provided key, an empty collection is
* returned.
*
* <p>Changes to the returned collection will update the underlying multimap,
* and vice versa.
*
* @param key key to search for in mul... | Returns a collection view of all values associated with a key. If no mappings in the multimap have the provided key, an empty collection is returned. Changes to the returned collection will update the underlying multimap, and vice versa | get | {
"repo_name": "TimurMahammadov/google-collections",
"path": "src/com/google/common/collect/Multimap.java",
"license": "apache-2.0",
"size": 9594
} | [
"java.util.Collection",
"javax.annotation.Nullable"
] | import java.util.Collection; import javax.annotation.Nullable; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 57,573 |
private static void addDescription(int type, String description) {
if (description.startsWith("<") && description.endsWith(">")) {
DESCRIPTIONS.put(type, description);
}
else {
DESCRIPTIONS.put(type, '"' + description + '"');
}
}
static {
It... | static void function(int type, String description) { if (description.startsWith("<") && description.endsWith(">")) { DESCRIPTIONS.put(type, description); } else { DESCRIPTIONS.put(type, 'STR'); } } static { Iterator<String> iterator = LOOKUP.keySet().iterator(); while( iterator.hasNext() ) { String text = iterator.next... | /**
* Adds a description to the set.
*/ | Adds a description to the set | addDescription | {
"repo_name": "PascalSchumacher/incubator-groovy",
"path": "src/main/org/codehaus/groovy/syntax/Types.java",
"license": "apache-2.0",
"size": 58535
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 562,217 |
ServiceResponse<Void> postMethodGlobalNotProvidedValid() throws ErrorException, IOException, IllegalArgumentException; | ServiceResponse<Void> postMethodGlobalNotProvidedValid() throws ErrorException, IOException, IllegalArgumentException; | /**
* POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentExc... | POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed | postMethodGlobalNotProvidedValid | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azurespecials/SubscriptionInCredentials.java",
"license": "mit",
"size": 6103
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 877,630 |
@SuppressWarnings("unchecked")
protected void reportAndCreateAuditCluster() {
if (auditErrors.size() > 0) {
AuditCluster existingErrors = (AuditCluster) KNSGlobalVariables.getAuditErrorMap().get(CONTACTS_AUDIT_ERRORS);
if (existingErrors == null) {
KNSGlobalVariab... | @SuppressWarnings(STR) void function() { if (auditErrors.size() > 0) { AuditCluster existingErrors = (AuditCluster) KNSGlobalVariables.getAuditErrorMap().get(CONTACTS_AUDIT_ERRORS); if (existingErrors == null) { KNSGlobalVariables.getAuditErrorMap().put(CONTACTS_AUDIT_ERRORS, new AuditCluster(Constants.CONTACTS_PANEL_N... | /**
* This method creates and adds the AuditCluster to the Global AuditErrorMap.
*/ | This method creates and adds the AuditCluster to the Global AuditErrorMap | reportAndCreateAuditCluster | {
"repo_name": "vivantech/kc_fixes",
"path": "src/main/java/org/kuali/kra/award/contacts/AwardSponsorContactAuditRule.java",
"license": "apache-2.0",
"size": 3680
} | [
"org.kuali.kra.infrastructure.Constants",
"org.kuali.rice.kns.util.AuditCluster",
"org.kuali.rice.kns.util.KNSGlobalVariables"
] | import org.kuali.kra.infrastructure.Constants; import org.kuali.rice.kns.util.AuditCluster; import org.kuali.rice.kns.util.KNSGlobalVariables; | import org.kuali.kra.infrastructure.*; import org.kuali.rice.kns.util.*; | [
"org.kuali.kra",
"org.kuali.rice"
] | org.kuali.kra; org.kuali.rice; | 377,818 |
public void testStepInt() {
List result = range.step(1);
assertTrue("too many elements", result.isEmpty());
// make sure a new list is returned each time
result.add(1);
result = range.step(1);
assertTrue("too many elements", result.isEmpty());
} | void function() { List result = range.step(1); assertTrue(STR, result.isEmpty()); result.add(1); result = range.step(1); assertTrue(STR, result.isEmpty()); } | /**
* Test method for {@link groovy.lang.EmptyRange#step(int)}.
*/ | Test method for <code>groovy.lang.EmptyRange#step(int)</code> | testStepInt | {
"repo_name": "fpavageau/groovy",
"path": "src/test/groovy/lang/EmptyRangeTest.java",
"license": "apache-2.0",
"size": 12119
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,029,279 |
public static List<Extension> loadExtensions(Connection conn, Properties props, String extensionClassNames, String errorMessageKey,
ExceptionInterceptor exceptionInterceptor) throws SQLException {
List<Extension> extensionList = new LinkedList<Extension>();
List<String> interceptorsToCr... | static List<Extension> function(Connection conn, Properties props, String extensionClassNames, String errorMessageKey, ExceptionInterceptor exceptionInterceptor) throws SQLException { List<Extension> extensionList = new LinkedList<Extension>(); List<String> interceptorsToCreate = StringUtils.split(extensionClassNames, ... | /**
* Returns initialized instances of classes listed in extensionClassNames.
* There is no need to call Extension.init() method after that if you don't change connection or properties.
*
* @param conn
* @param props
* @param extensionClassNames
* @param errorMessageKey
* @param... | Returns initialized instances of classes listed in extensionClassNames. There is no need to call Extension.init() method after that if you don't change connection or properties | loadExtensions | {
"repo_name": "swankjesse/mysql-connector-j",
"path": "src/com/mysql/jdbc/Util.java",
"license": "gpl-2.0",
"size": 24865
} | [
"java.sql.SQLException",
"java.util.LinkedList",
"java.util.List",
"java.util.Properties",
"java.util.concurrent.ConcurrentHashMap",
"java.util.concurrent.ConcurrentMap"
] | import java.sql.SQLException; import java.util.LinkedList; import java.util.List; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; | import java.sql.*; import java.util.*; import java.util.concurrent.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 465,208 |
private static String getHexRGBColor(@NonNull final Context context, final int color) {
return context.getResources().getString(color).substring(3);
} | static String function(@NonNull final Context context, final int color) { return context.getResources().getString(color).substring(3); } | /**
* Cast R.color to a hexadecimal color value.
*
* @param context the context to use
* @param color the color number from R.color
* @return a six characters long String with hexadecimal RGB values
*/ | Cast R.color to a hexadecimal color value | getHexRGBColor | {
"repo_name": "theScrabi/NewPipe",
"path": "app/src/main/java/org/schabi/newpipe/about/LicenseFragmentHelper.java",
"license": "gpl-3.0",
"size": 4613
} | [
"android.content.Context",
"androidx.annotation.NonNull"
] | import android.content.Context; import androidx.annotation.NonNull; | import android.content.*; import androidx.annotation.*; | [
"android.content",
"androidx.annotation"
] | android.content; androidx.annotation; | 2,315,672 |
public static Object extractHttpParameterValue(String value) {
if (value == null || ObjectHelper.isEmpty(value)) {
return value;
}
// trim value before checking for multiple parameters
String trimmed = value.trim();
if (trimmed.startsWith("[") && trimmed.endsWit... | static Object function(String value) { if (value == null ObjectHelper.isEmpty(value)) { return value; } String trimmed = value.trim(); if (trimmed.startsWith("[") && trimmed.endsWith("]")) { trimmed = trimmed.substring(1, trimmed.length() - 1); List<String> list = new ArrayList<String>(); String[] values = trimmed.spli... | /**
* Extracts the parameter value.
* <p/>
* This implementation supports HTTP multi value parameters which
* is based on the syntax of <tt>[value1, value2, value3]</tt> by returning
* a {@link List} containing the values.
* <p/>
* If the value is not a HTTP mulit value the value is r... | Extracts the parameter value. This implementation supports HTTP multi value parameters which is based on the syntax of [value1, value2, value3] by returning a <code>List</code> containing the values. If the value is not a HTTP mulit value the value is returned as is | extractHttpParameterValue | {
"repo_name": "grgrzybek/camel",
"path": "components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java",
"license": "apache-2.0",
"size": 19629
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.camel.util.ObjectHelper"
] | import java.util.ArrayList; import java.util.List; import org.apache.camel.util.ObjectHelper; | import java.util.*; import org.apache.camel.util.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 2,804,958 |
@Override
public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
super.tightMarshal2(wireFormat, o, dataOut, bs);
} | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } | /**
* Write a object instance to data output stream
*
* @param o
* the instance to be marshaled
* @param dataOut
* the output stream
* @throws IOException
* thrown if an error occurs
*/ | Write a object instance to data output stream | tightMarshal2 | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempQueueMarshaller.java",
"license": "apache-2.0",
"size": 3570
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.BooleanStream",
"org.apache.activemq.openwire.codec.OpenWireFormat"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; | import java.io.*; import org.apache.activemq.openwire.codec.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 2,130,748 |
void massUpdateWithSession(@Param("record") BugWithBLOBs record, @Param("primaryKeys") List primaryKeys); | void massUpdateWithSession(@Param(STR) BugWithBLOBs record, @Param(STR) List primaryKeys); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table m_prj_bug
*
* @mbg.generated Sat Apr 20 17:20:23 CDT 2019
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table m_prj_bug | massUpdateWithSession | {
"repo_name": "aglne/mycollab",
"path": "mycollab-services/src/main/java/com/mycollab/module/project/dao/BugMapper.java",
"license": "agpl-3.0",
"size": 4000
} | [
"com.mycollab.module.project.domain.BugWithBLOBs",
"java.util.List",
"org.apache.ibatis.annotations.Param"
] | import com.mycollab.module.project.domain.BugWithBLOBs; import java.util.List; import org.apache.ibatis.annotations.Param; | import com.mycollab.module.project.domain.*; import java.util.*; import org.apache.ibatis.annotations.*; | [
"com.mycollab.module",
"java.util",
"org.apache.ibatis"
] | com.mycollab.module; java.util; org.apache.ibatis; | 584,432 |
public static String encode( java.io.InputStream source,
int options ) {
CheckArg.isNotNull(source, "source");
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
Base64.OutputStream b64os = new Base64.OutputStream(baos, ENCODE | options... | static String function( java.io.InputStream source, int options ) { CheckArg.isNotNull(source, STR); java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); Base64.OutputStream b64os = new Base64.OutputStream(baos, ENCODE options); BufferedInputStream input = new BufferedInputStream(source); java.io.O... | /**
* Encodes the content of the supplied InputStream into Base64 notation.
* <p>
* Valid options:
*
* <pre>
* GZIP: gzip-compresses object before encoding it.
* DONT_BREAK_LINES: don't break lines at 76 characters
* <i>Note: Technically, this makes your encoding n... | Encodes the content of the supplied InputStream into Base64 notation. Valid options: <code> <i>Note: Technically, this makes your encoding non-compliant.</i> </code> Example: <code>encodeBytes( myData, Base64.GZIP )</code> or Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DONT_BREAK_LINES )</code> | encode | {
"repo_name": "phantomjinx/modeshape",
"path": "modeshape-common/src/main/java/org/modeshape/common/util/Base64.java",
"license": "apache-2.0",
"size": 88425
} | [
"java.io.BufferedInputStream",
"java.io.IOException",
"org.modeshape.common.SystemFailureException"
] | import java.io.BufferedInputStream; import java.io.IOException; import org.modeshape.common.SystemFailureException; | import java.io.*; import org.modeshape.common.*; | [
"java.io",
"org.modeshape.common"
] | java.io; org.modeshape.common; | 890,109 |
protected Object[] getFileInfo(String fileName, String currentFile) throws IOException {
if((fileName==null)||fileName.equals(""))
throw new IOException("No valid filename (filename is null or empty string).");
//temp var
String temp = fileName.trim();
String regexp = ".*"; //match all string... | Object[] function(String fileName, String currentFile) throws IOException { if((fileName==null) fileName.equals(STRNo valid filename (filename is null or empty string).STR.*STR\STR\STR STR STR STR/**STRfile: absolute = true; fileName = fileName.substring(8); } fileName = fileName.replace('/', File.separatorChar); if( (... | /**
* Returns the filename
* If the path starts with "." or ".." it is set relative to the currentFile
*
* @return the filename and the regexp
*
* @param fileName the filename
* @param startFile the name of the first conf file
* @since officebase4.01
*/ | Returns the filename If the path starts with "." or ".." it is set relative to the currentFile | getFileInfo | {
"repo_name": "nordapp/rest",
"path": "org.i3xx.util.ctree/src/main/java/org/i3xx/util/ctree/parser/KeyValueRuleIncludeA.java",
"license": "apache-2.0",
"size": 13549
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,475,876 |
@Test
public void testProcessTranslation() {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
DataStreamSource<Long> src = env.generateSequence(0, 0);
ProcessFunction<Long, Integer> processFunction = new ProcessFunction<Long, Integer>() {
private static final long ser... | void function() { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); DataStreamSource<Long> src = env.generateSequence(0, 0); ProcessFunction<Long, Integer> processFunction = new ProcessFunction<Long, Integer>() { private static final long serialVersionUID = 1L; | /**
* Verify that a {@link DataStream#process(ProcessFunction)} call is correctly translated to an operator.
*/ | Verify that a <code>DataStream#process(ProcessFunction)</code> call is correctly translated to an operator | testProcessTranslation | {
"repo_name": "hequn8128/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/api/DataStreamTest.java",
"license": "apache-2.0",
"size": 56971
} | [
"org.apache.flink.streaming.api.datastream.DataStreamSource",
"org.apache.flink.streaming.api.environment.StreamExecutionEnvironment",
"org.apache.flink.streaming.api.functions.ProcessFunction"
] | import org.apache.flink.streaming.api.datastream.DataStreamSource; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.functions.ProcessFunction; | import org.apache.flink.streaming.api.datastream.*; import org.apache.flink.streaming.api.environment.*; import org.apache.flink.streaming.api.functions.*; | [
"org.apache.flink"
] | org.apache.flink; | 665,122 |
public interface FileCollectionSnapshotter {
void registerSerializers(SerializerRegistry<FileCollectionSnapshot> registry); | interface FileCollectionSnapshotter { void function(SerializerRegistry<FileCollectionSnapshot> registry); | /**
* Registers the serializer(s) that can be used to serialize the {@link FileCollectionSnapshot} implementations produced by this snapshotter.
*/ | Registers the serializer(s) that can be used to serialize the <code>FileCollectionSnapshot</code> implementations produced by this snapshotter | registerSerializers | {
"repo_name": "Pushjet/Pushjet-Android",
"path": "gradle/wrapper/dists/gradle-2.2.1-all/c64ydeuardnfqctvr1gm30w53/gradle-2.2.1/src/core/org/gradle/api/internal/changedetection/state/FileCollectionSnapshotter.java",
"license": "bsd-2-clause",
"size": 1457
} | [
"org.gradle.messaging.serialize.SerializerRegistry"
] | import org.gradle.messaging.serialize.SerializerRegistry; | import org.gradle.messaging.serialize.*; | [
"org.gradle.messaging"
] | org.gradle.messaging; | 120,308 |
DateTimeFormatter toFormatter(ResolverStyle resolverStyle, Chronology chrono) {
return toFormatter(Locale.getDefault(Locale.Category.FORMAT), resolverStyle, chrono);
} | DateTimeFormatter toFormatter(ResolverStyle resolverStyle, Chronology chrono) { return toFormatter(Locale.getDefault(Locale.Category.FORMAT), resolverStyle, chrono); } | /**
* Completes this builder by creating the formatter.
* This uses the default locale.
*
* @param resolverStyle the resolver style to use, not null
* @return the created formatter, not null
*/ | Completes this builder by creating the formatter. This uses the default locale | toFormatter | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeFormatterBuilder.java",
"license": "apache-2.0",
"size": 204324
} | [
"java.time.chrono.Chronology",
"java.util.Locale"
] | import java.time.chrono.Chronology; import java.util.Locale; | import java.time.chrono.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 284,439 |
@Override
public void updateNCharacterStream(String columnLabel, Reader reader,
long length) throws SQLException {
throw new BQSQLFeatureNotSupportedException();
} | void function(String columnLabel, Reader reader, long length) throws SQLException { throw new BQSQLFeatureNotSupportedException(); } | /**
* <p>
* <h1>Implementation Details:</h1><br>
* Throws BQSQLFeatureNotSupportedException
* </p>
*
* @throws BQSQLFeatureNotSupportedException
*/ | Implementation Details: Throws BQSQLFeatureNotSupportedException | updateNCharacterStream | {
"repo_name": "jonathanswenson/starschema-bigquery-jdbc",
"path": "src/main/java/net/starschema/clouddb/jdbc/ScrollableResultset.java",
"license": "bsd-2-clause",
"size": 73793
} | [
"java.io.Reader",
"java.sql.SQLException"
] | import java.io.Reader; import java.sql.SQLException; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 2,020,349 |
@Deprecated
public static boolean isConcrete(XMethod xmethod) {
int accessFlags = xmethod.getAccessFlags();
return (accessFlags & Const.ACC_ABSTRACT) == 0 && (accessFlags & Const.ACC_NATIVE) == 0;
} | static boolean function(XMethod xmethod) { int accessFlags = xmethod.getAccessFlags(); return (accessFlags & Const.ACC_ABSTRACT) == 0 && (accessFlags & Const.ACC_NATIVE) == 0; } | /**
* Return whether or not the given method is concrete.
*
* @param xmethod
* the method
* @return true if the method is concrete, false otherwise
*/ | Return whether or not the given method is concrete | isConcrete | {
"repo_name": "spotbugs/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java",
"license": "lgpl-2.1",
"size": 38930
} | [
"org.apache.bcel.Const"
] | import org.apache.bcel.Const; | import org.apache.bcel.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 994,214 |
@NonNull
T parseSnapshot(@NonNull S snapshot); | T parseSnapshot(@NonNull S snapshot); | /**
* This method parses the Snapshot into the requested type.
*
* @param snapshot the Snapshot to extract the model from
* @return the model extracted from the DataSnapshot
*/ | This method parses the Snapshot into the requested type | parseSnapshot | {
"repo_name": "firebase/FirebaseUI-Android",
"path": "common/src/main/java/com/firebase/ui/common/BaseSnapshotParser.java",
"license": "apache-2.0",
"size": 495
} | [
"androidx.annotation.NonNull"
] | import androidx.annotation.NonNull; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 2,671,099 |
boolean doesCommandHaveRunnable(Class<? extends Command> clazz); | boolean doesCommandHaveRunnable(Class<? extends Command> clazz); | /**
* Checks if the specified command class has any corresponding
* {@link CommandRunnable}s.
*
* @param clazz The class to check
* @return If the class has any corresponding command runnables
*/ | Checks if the specified command class has any corresponding <code>CommandRunnable</code>s | doesCommandHaveRunnable | {
"repo_name": "XtraStudio/XtraAPI",
"path": "src/main/java/com/xtra/api/command/runnable/CommandRunnableHandler.java",
"license": "mit",
"size": 3371
} | [
"com.xtra.api.command.Command"
] | import com.xtra.api.command.Command; | import com.xtra.api.command.*; | [
"com.xtra.api"
] | com.xtra.api; | 2,606,890 |
private BufferedImage getOptimalScalingImage(BufferedImage inputImage,
int startSize, int endSize) {
int currentSize = startSize;
BufferedImage currentImage = inputImage;
int delta = currentSize - endSize;
int nextPow2 = currentSize >> 1;
while (currentSize ... | BufferedImage function(BufferedImage inputImage, int startSize, int endSize) { int currentSize = startSize; BufferedImage currentImage = inputImage; int delta = currentSize - endSize; int nextPow2 = currentSize >> 1; while (currentSize > 1) { if (delta <= nextPow2) { if (currentSize != endSize) { BufferedImage tmpImage... | /**
* Progressive bilinear scaling: for any downscale size, scale
* iteratively by halves using BILINEAR filtering until the proper
* size is reached.
*/ | Progressive bilinear scaling: for any downscale size, scale iteratively by halves using BILINEAR filtering until the proper size is reached | getOptimalScalingImage | {
"repo_name": "romainguy/filthy-rich-clients",
"path": "Images/ScaleTest/src/ScaleTest.java",
"license": "bsd-3-clause",
"size": 12980
} | [
"java.awt.Graphics",
"java.awt.Graphics2D",
"java.awt.RenderingHints",
"java.awt.image.BufferedImage"
] | import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 605,131 |
private void processAttribute(CQLAttribute attribute, StringBuilder hql,
List<java.lang.Object> parameters, CQLObject queryObject, String queryObjectAlias,
Stack<CQLAssociatedObject> associationStack, List<CqlDataBucket> typesProcessingList)
throws QueryTranslationException {
LOG.debug... | void function(CQLAttribute attribute, StringBuilder hql, List<java.lang.Object> parameters, CQLObject queryObject, String queryObjectAlias, Stack<CQLAssociatedObject> associationStack, List<CqlDataBucket> typesProcessingList) throws QueryTranslationException { LOG.debug(STR + queryObject.getClassName() + "." + attribut... | /**
* Processes a CQL query attribute into HQL
*
* @param attribute
* The CQL attribute
* @param hql
* The HQL statement fragment
* @param parameters
* The positional parameters list
* @param associationTrace
* The trace of associations
* @param objectClassName
* The class na... | Processes a CQL query attribute into HQL | processAttribute | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/sdkQuery44/src/java/translator/org/cagrid/data/sdkquery44/translator/cql2/CQL2ToParameterizedHQL.java",
"license": "bsd-3-clause",
"size": 48447
} | [
"java.util.List",
"java.util.Stack",
"org.cagrid.cql2.CQLAssociatedObject",
"org.cagrid.cql2.CQLAttribute",
"org.cagrid.cql2.CQLObject",
"org.cagrid.data.sdkquery44.translator.CqlDataBucket",
"org.cagrid.data.sdkquery44.translator.DatatypeFlavor",
"org.cagrid.data.sdkquery44.translator.QueryTranslatio... | import java.util.List; import java.util.Stack; import org.cagrid.cql2.CQLAssociatedObject; import org.cagrid.cql2.CQLAttribute; import org.cagrid.cql2.CQLObject; import org.cagrid.data.sdkquery44.translator.CqlDataBucket; import org.cagrid.data.sdkquery44.translator.DatatypeFlavor; import org.cagrid.data.sdkquery44.tra... | import java.util.*; import org.cagrid.cql2.*; import org.cagrid.data.sdkquery44.translator.*; | [
"java.util",
"org.cagrid.cql2",
"org.cagrid.data"
] | java.util; org.cagrid.cql2; org.cagrid.data; | 2,674,068 |
private void updateExistingBoboIndexes(int shard, long uid, int index, Set<String> columns) {
if (columns.isEmpty()) {
return;
}
Set<String> facets = new HashSet<String>();
for (String column : columns) {
if (columnToFacetMapping.containsKey(column)) {
facets.addAll(columnToFacetMa... | void function(int shard, long uid, int index, Set<String> columns) { if (columns.isEmpty()) { return; } Set<String> facets = new HashSet<String>(); for (String column : columns) { if (columnToFacetMapping.containsKey(column)) { facets.addAll(columnToFacetMapping.get(column)); } } if (facets.isEmpty()) { return; } BoboI... | /** Handles the specific case, when we've received a document, that will cause a creation of the new activityValue, but the corresponding document in Zoie remains untouched.
* We have to manually update Bobo indexes in this case
* @param uid
* @param index
* @param columns
*/ | Handles the specific case, when we've received a document, that will cause a creation of the new activityValue, but the corresponding document in Zoie remains untouched. We have to manually update Bobo indexes in this case | updateExistingBoboIndexes | {
"repo_name": "senseidb/sensei",
"path": "sensei-core/src/main/java/com/senseidb/indexing/activity/CompositeActivityManager.java",
"license": "apache-2.0",
"size": 13566
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,448,707 |
public static <K, V> Map<K, MapValueComparison> getMapComparison(Map<K, V> left, Map<K, V> right)
{
Set<K> keys = new HashSet<K>(left.size() + right.size());
keys.addAll(left.keySet());
keys.addAll(right.keySet());
Map<K, MapValueComparison> diff = new HashMap<K, M... | static <K, V> Map<K, MapValueComparison> function(Map<K, V> left, Map<K, V> right) { Set<K> keys = new HashSet<K>(left.size() + right.size()); keys.addAll(left.keySet()); keys.addAll(right.keySet()); Map<K, MapValueComparison> diff = new HashMap<K, MapValueComparison>(left.size() + right.size()); for (K key : keys) { b... | /**
* Compare two maps.
* <p/>
* The return codes that accompany the keys are:
* <ul>
* <li>{@link MapValueComparison#LEFT_ONLY}</li>
* <li>{@link MapValueComparison#RIGHT_ONLY}</li>
* <li>{@link MapValueComparison#EQUAL}</li>
* <li>{@link MapValueComparison#N... | Compare two maps. The return codes that accompany the keys are: <code>MapValueComparison#LEFT_ONLY</code> <code>MapValueComparison#RIGHT_ONLY</code> <code>MapValueComparison#EQUAL</code> <code>MapValueComparison#NOT_EQUAL</code> | getMapComparison | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/core/source/java/org/alfresco/util/EqualsHelper.java",
"license": "lgpl-3.0",
"size": 9657
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 898,083 |
@VisibleForTesting
public static boolean containsDartdocFlutterSample(@NotNull List<String> lines) {
if (lines.isEmpty()) {
return false;
}
for (String line : lines) {
if (DARTPAD_TOOL_PATTERN.matcher(line).find()) {
return true;
}
}
return false;
} | static boolean function(@NotNull List<String> lines) { if (lines.isEmpty()) { return false; } for (String line : lines) { if (DARTPAD_TOOL_PATTERN.matcher(line).find()) { return true; } } return false; } | /**
* Return whether the given lines of dartdoc text contain a reference to an embedded dartpad Flutter
* widget sample, eg. <code>"/// {\@tool dartpad ...}"</code>(.
*/ | Return whether the given lines of dartdoc text contain a reference to an embedded dartpad Flutter widget sample, eg. <code>"/// {\@tool dartpad ...}"</code>( | containsDartdocFlutterSample | {
"repo_name": "flutter/flutter-intellij",
"path": "flutter-idea/src/io/flutter/samples/FlutterSampleNotificationProvider.java",
"license": "bsd-3-clause",
"size": 5111
} | [
"java.util.List",
"org.jetbrains.annotations.NotNull"
] | import java.util.List; import org.jetbrains.annotations.NotNull; | import java.util.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 616,246 |
private String extractOrder(String text) {
if (StringUtil.isDefined(text)) {
int separatorIdx = text.lastIndexOf(PdcRequestRouter.sepOptionValueTag);
// the separator don't exist. Maybe, it's the last item of the selection
if (separatorIdx != -1) {
return text.substring(separatorIdx + Pd... | String function(String text) { if (StringUtil.isDefined(text)) { int separatorIdx = text.lastIndexOf(PdcRequestRouter.sepOptionValueTag); if (separatorIdx != -1) { return text.substring(separatorIdx + PdcRequestRouter.lenOfSeparator); } else { return text; } } return "0"; } | /**
* Extract the order of axis or values values.
* @param text - The value of the axis or the value (String+separator+order)
* @return the order
*/ | Extract the order of axis or values values | extractOrder | {
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-war/src/main/java/org/silverpeas/web/pdc/servlets/PdcRequestRouter.java",
"license": "agpl-3.0",
"size": 33290
} | [
"org.silverpeas.core.util.StringUtil"
] | import org.silverpeas.core.util.StringUtil; | import org.silverpeas.core.util.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 574,072 |
public void _registerScriptEvent() {
requiredMethod("insertEntry()");
desc = new ScriptEventDescriptor(
"XEventListener1",
"disposing", "", "Basic", "");
try {
oObj.registerScriptEvent(index, desc);
tRes.tested("registerScriptE... | void function() { requiredMethod(STR); desc = new ScriptEventDescriptor( STR, STR, STRBasicSTRSTRregisterScriptEvent()STRregisterScriptEvent() throws unexpected exception STRregisterScriptEvent()", false); } } ScriptEventDescriptor descs[]; | /**
* Test creates <code>ScriptEventDescriptor</code>, registers
* the script event and stores the descriptor. <p>
* Has <b> OK </b> status if the method successfully returns
* and no exceptions were thrown. <p>
* The following method tests are to be completed successfully before :
* <ul>
* ... | Test creates <code>ScriptEventDescriptor</code>, registers the script event and stores the descriptor. Has OK status if the method successfully returns and no exceptions were thrown. The following method tests are to be completed successfully before : <code> insertEntry() </code> : to have entry's index | _registerScriptEvent | {
"repo_name": "sbbic/core",
"path": "qadevOOo/tests/java/ifc/script/_XEventAttacherManager.java",
"license": "gpl-3.0",
"size": 17699
} | [
"com.sun.star.script.ScriptEventDescriptor"
] | import com.sun.star.script.ScriptEventDescriptor; | import com.sun.star.script.*; | [
"com.sun.star"
] | com.sun.star; | 2,036,399 |
protected void createContextMenuForGen(StructuredViewer viewer)
{
MenuManager contextMenu = new MenuManager("#PopUp");
contextMenu.add(new Separator("additions"));
contextMenu.setRemoveAllWhenShown(true);
contextMenu.addMenuListener(this);
Menu menu = contextMenu.createContextMenu(viewer.getCont... | void function(StructuredViewer viewer) { MenuManager contextMenu = new MenuManager(STR); contextMenu.add(new Separator(STR)); contextMenu.setRemoveAllWhenShown(true); contextMenu.addMenuListener(this); Menu menu = contextMenu.createContextMenu(viewer.getControl()); viewer.getControl().setMenu(menu); getSite().registerC... | /**
* This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates a context menu for the viewer and adds a listener as well registering the menu for extension. | createContextMenuForGen | {
"repo_name": "peterkir/org.eclipse.oomph",
"path": "plugins/org.eclipse.oomph.projectconfig.editor/src/org/eclipse/oomph/projectconfig/presentation/ProjectConfigEditor.java",
"license": "epl-1.0",
"size": 63263
} | [
"org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter",
"org.eclipse.emf.edit.ui.dnd.LocalTransfer",
"org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter",
"org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider",
"org.eclipse.jface.action.MenuManager",
"org.eclipse.jface.action.Separator",
"org.e... | import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; import org.eclipse.emf.edit.ui.dnd.LocalTransfer; import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Sep... | import org.eclipse.emf.edit.ui.dnd.*; import org.eclipse.emf.edit.ui.provider.*; import org.eclipse.jface.action.*; import org.eclipse.jface.util.*; import org.eclipse.jface.viewers.*; import org.eclipse.swt.dnd.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.emf",
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.emf; org.eclipse.jface; org.eclipse.swt; | 900,144 |
public void test_emptyNode() {
final int m = 3;
final int nkeys = 0;
final byte[][] keys = new byte[m][];
final int spannedTupleCount = 0;
final long[] childAddr = new long[m + 1];
final long[] childEntryCount = new long[m + 1];
final boolean hasVersi... | void function() { final int m = 3; final int nkeys = 0; final byte[][] keys = new byte[m][]; final int spannedTupleCount = 0; final long[] childAddr = new long[m + 1]; final long[] childEntryCount = new long[m + 1]; final boolean hasVersionTimestamps = false; final long minimumVersionTimestamp = 0L; final long maximumV... | /**
* Unit test for an empty node (this is not a legal instance since only the
* root leaf may ever be empty).
*/ | Unit test for an empty node (this is not a legal instance since only the root leaf may ever be empty) | test_emptyNode | {
"repo_name": "smalyshev/blazegraph",
"path": "bigdata/src/test/com/bigdata/btree/data/AbstractNodeDataRecordTestCase.java",
"license": "gpl-2.0",
"size": 6040
} | [
"com.bigdata.btree.raba.ReadOnlyKeysRaba",
"com.bigdata.io.DataOutputBuffer"
] | import com.bigdata.btree.raba.ReadOnlyKeysRaba; import com.bigdata.io.DataOutputBuffer; | import com.bigdata.btree.raba.*; import com.bigdata.io.*; | [
"com.bigdata.btree",
"com.bigdata.io"
] | com.bigdata.btree; com.bigdata.io; | 659,875 |
private void addBlockBasedOnMinMaxValue(FilterExecuter filterExecuter,
List<DataRefNode> listOfDataBlocksToScan, DataRefNode dataRefNode,
SegmentProperties segmentProperties) {
BitSet bitSet = filterExecuter
.isScanRequired(dataRefNode.getColumnsMaxValue(), dataRefNode.getColumnsMinValue());
... | void function(FilterExecuter filterExecuter, List<DataRefNode> listOfDataBlocksToScan, DataRefNode dataRefNode, SegmentProperties segmentProperties) { BitSet bitSet = filterExecuter .isScanRequired(dataRefNode.getColumnsMaxValue(), dataRefNode.getColumnsMinValue()); if (!bitSet.isEmpty()) { listOfDataBlocksToScan.add(d... | /**
* Selects the blocks based on col max and min value.
*
* @param filterResolver
* @param listOfDataBlocksToScan
* @param dataRefNode
* @param segmentProperties
*/ | Selects the blocks based on col max and min value | addBlockBasedOnMinMaxValue | {
"repo_name": "Zhangshunyu/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/scan/filter/FilterExpressionProcessor.java",
"license": "apache-2.0",
"size": 17519
} | [
"java.util.BitSet",
"java.util.List",
"org.apache.carbondata.core.carbon.datastore.DataRefNode",
"org.apache.carbondata.core.carbon.datastore.block.SegmentProperties",
"org.apache.carbondata.scan.filter.executer.FilterExecuter"
] | import java.util.BitSet; import java.util.List; import org.apache.carbondata.core.carbon.datastore.DataRefNode; import org.apache.carbondata.core.carbon.datastore.block.SegmentProperties; import org.apache.carbondata.scan.filter.executer.FilterExecuter; | import java.util.*; import org.apache.carbondata.core.carbon.datastore.*; import org.apache.carbondata.core.carbon.datastore.block.*; import org.apache.carbondata.scan.filter.executer.*; | [
"java.util",
"org.apache.carbondata"
] | java.util; org.apache.carbondata; | 1,631,831 |
@Override
public void processPacket(INetHandler inethandler)
{
this.netHandler = inethandler;
EmbeddedChannel internalChannel = NetworkRegistry.INSTANCE.getChannel(this.channel, this.target);
if (internalChannel != null)
{
internalChannel.attr(NetworkRegistry.NET_... | void function(INetHandler inethandler) { this.netHandler = inethandler; EmbeddedChannel internalChannel = NetworkRegistry.INSTANCE.getChannel(this.channel, this.target); if (internalChannel != null) { internalChannel.attr(NetworkRegistry.NET_HANDLER).set(this.netHandler); try { if (internalChannel.writeInbound(this)) {... | /**
* Passes this Packet on to the NetHandler for processing.
*/ | Passes this Packet on to the NetHandler for processing | processPacket | {
"repo_name": "F1r3w477/CustomWorldGen",
"path": "build/tmp/recompileMc/sources/net/minecraftforge/fml/common/network/internal/FMLProxyPacket.java",
"license": "lgpl-3.0",
"size": 7872
} | [
"com.google.common.collect.Multiset",
"com.google.common.collect.Multisets",
"io.netty.channel.embedded.EmbeddedChannel",
"net.minecraft.network.INetHandler",
"net.minecraftforge.fml.common.FMLLog",
"net.minecraftforge.fml.common.network.FMLNetworkException",
"net.minecraftforge.fml.common.network.Netwo... | import com.google.common.collect.Multiset; import com.google.common.collect.Multisets; import io.netty.channel.embedded.EmbeddedChannel; import net.minecraft.network.INetHandler; import net.minecraftforge.fml.common.FMLLog; import net.minecraftforge.fml.common.network.FMLNetworkException; import net.minecraftforge.fml.... | import com.google.common.collect.*; import io.netty.channel.embedded.*; import net.minecraft.network.*; import net.minecraftforge.fml.common.*; import net.minecraftforge.fml.common.network.*; import org.apache.logging.log4j.*; | [
"com.google.common",
"io.netty.channel",
"net.minecraft.network",
"net.minecraftforge.fml",
"org.apache.logging"
] | com.google.common; io.netty.channel; net.minecraft.network; net.minecraftforge.fml; org.apache.logging; | 1,991,347 |
ReplicaInfo getReplicaInfo(ExtendedBlock b)
throws ReplicaNotFoundException {
ReplicaInfo info = volumeMap.get(b.getBlockPoolId(), b.getLocalBlock());
if (info == null) {
throw new ReplicaNotFoundException(
ReplicaNotFoundException.NON_EXISTENT_REPLICA + b);
}
return info;
} | ReplicaInfo getReplicaInfo(ExtendedBlock b) throws ReplicaNotFoundException { ReplicaInfo info = volumeMap.get(b.getBlockPoolId(), b.getLocalBlock()); if (info == null) { throw new ReplicaNotFoundException( ReplicaNotFoundException.NON_EXISTENT_REPLICA + b); } return info; } | /**
* Get the meta info of a block stored in volumeMap. To find a block,
* block pool Id, block Id and generation stamp must match.
* @param b extended block
* @return the meta replica information
* @throws ReplicaNotFoundException if no entry is in the map or
* there is a gene... | Get the meta info of a block stored in volumeMap. To find a block, block pool Id, block Id and generation stamp must match | getReplicaInfo | {
"repo_name": "f7753/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java",
"license": "apache-2.0",
"size": 113025
} | [
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.server.datanode.ReplicaInfo",
"org.apache.hadoop.hdfs.server.datanode.ReplicaNotFoundException"
] | import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo; import org.apache.hadoop.hdfs.server.datanode.ReplicaNotFoundException; | import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 767,827 |
public void setProfile(WrappedGameProfile value) {
handle.getGameProfiles().write(0, value);
} | void function(WrappedGameProfile value) { handle.getGameProfiles().write(0, value); } | /**
* Set Name.
* @param value - new value.
*/ | Set Name | setProfile | {
"repo_name": "pekomiya/AirRide",
"path": "src/main/java/com/comphenix/packetwrapper/WrapperLoginClientStart.java",
"license": "lgpl-3.0",
"size": 1733
} | [
"com.comphenix.protocol.wrappers.WrappedGameProfile"
] | import com.comphenix.protocol.wrappers.WrappedGameProfile; | import com.comphenix.protocol.wrappers.*; | [
"com.comphenix.protocol"
] | com.comphenix.protocol; | 2,858,748 |
public void testAddSubtitle() {
DefaultPieDataset dataset = new DefaultPieDataset();
JFreeChart chart = ChartFactory.createPieChart("title", dataset, true,
false, false);
TextTitle t0 = new TextTitle("T0");
chart.addSubtitle(0, t0);
assertEquals(t0, ... | void function() { DefaultPieDataset dataset = new DefaultPieDataset(); JFreeChart chart = ChartFactory.createPieChart("title", dataset, true, false, false); TextTitle t0 = new TextTitle("T0"); chart.addSubtitle(0, t0); assertEquals(t0, chart.getSubtitle(0)); TextTitle t1 = new TextTitle("T1"); chart.addSubtitle(t1); as... | /**
* Some checks for the addSubtitle() methods.
*/ | Some checks for the addSubtitle() methods | testAddSubtitle | {
"repo_name": "martingwhite/astor",
"path": "examples/chart_11/tests/org/jfree/chart/junit/JFreeChartTests.java",
"license": "gpl-2.0",
"size": 19774
} | [
"org.jfree.chart.ChartFactory",
"org.jfree.chart.JFreeChart",
"org.jfree.chart.title.TextTitle",
"org.jfree.data.general.DefaultPieDataset"
] | import org.jfree.chart.ChartFactory; import org.jfree.chart.JFreeChart; import org.jfree.chart.title.TextTitle; import org.jfree.data.general.DefaultPieDataset; | import org.jfree.chart.*; import org.jfree.chart.title.*; import org.jfree.data.general.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 1,092,521 |
public byte[] toBinary3Tight()
{
BigInteger sum = Constants.BIGINT_ZERO;
for (int i = coeffs.length - 1; i >= 0; i--)
{
sum = sum.multiply(BigInteger.valueOf(3));
sum = sum.add(BigInteger.valueOf(coeffs[i] + 1));
}
int size = (BigInteger.valueOf(3... | byte[] function() { BigInteger sum = Constants.BIGINT_ZERO; for (int i = coeffs.length - 1; i >= 0; i--) { sum = sum.multiply(BigInteger.valueOf(3)); sum = sum.add(BigInteger.valueOf(coeffs[i] + 1)); } int size = (BigInteger.valueOf(3).pow(coeffs.length).bitLength() + 7) / 8; byte[] arr = sum.toByteArray(); if (arr.len... | /**
* Converts a polynomial with ternary coefficients to binary.
*
* @return the encoded polynomial
*/ | Converts a polynomial with ternary coefficients to binary | toBinary3Tight | {
"repo_name": "xdv/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/pqc/math/ntru/polynomial/IntegerPolynomial.java",
"license": "isc",
"size": 41346
} | [
"java.math.BigInteger",
"org.ripple.bouncycastle.util.Arrays"
] | import java.math.BigInteger; import org.ripple.bouncycastle.util.Arrays; | import java.math.*; import org.ripple.bouncycastle.util.*; | [
"java.math",
"org.ripple.bouncycastle"
] | java.math; org.ripple.bouncycastle; | 2,256,092 |
@Test
public final void testToSmallIsbn10IsWrong() {
for (final Isbn10WithSeparatorsTestBean testBean : Isbn10WithSeparatorsTestCases
.getToSmallTestBeans()) {
super.validationTest(testBean, false,
"de.knightsoftnet.validators.shared.impl.SizeWithoutSeparatorsValidator");
}
} | final void function() { for (final Isbn10WithSeparatorsTestBean testBean : Isbn10WithSeparatorsTestCases .getToSmallTestBeans()) { super.validationTest(testBean, false, STR); } } | /**
* isbn10 which is to small.
*/ | isbn10 which is to small | testToSmallIsbn10IsWrong | {
"repo_name": "ManfredTremmel/mt-bean-validators",
"path": "src/test/java/de/knightsoftnet/validators/server/Isbn10WithSeparatorsTest.java",
"license": "apache-2.0",
"size": 3103
} | [
"de.knightsoftnet.validators.shared.beans.Isbn10WithSeparatorsTestBean",
"de.knightsoftnet.validators.shared.testcases.Isbn10WithSeparatorsTestCases"
] | import de.knightsoftnet.validators.shared.beans.Isbn10WithSeparatorsTestBean; import de.knightsoftnet.validators.shared.testcases.Isbn10WithSeparatorsTestCases; | import de.knightsoftnet.validators.shared.beans.*; import de.knightsoftnet.validators.shared.testcases.*; | [
"de.knightsoftnet.validators"
] | de.knightsoftnet.validators; | 2,283,808 |
private String convertToDavUrl(String fileUrl) {
// Compile regular expression
Pattern pattern = Pattern.compile("access/content/group");
// Replace all occurrences of pattern in input
Matcher matcher = pattern.matcher(fileUrl);
fileUrl = matcher.replaceAll("dav");
return ... | String function(String fileUrl) { Pattern pattern = Pattern.compile(STR); Matcher matcher = pattern.matcher(fileUrl); fileUrl = matcher.replaceAll("dav"); return fileUrl; } | /**
* If site is Display to Site, need to retrieve files thru dav servlet.
* This converts a podcast URL to accomplish this.
*
* @param fileUrl
* The current file URL. Access is through content.
*
* @return String
* The changed URL that points to the dav servlet.
*/ | If site is Display to Site, need to retrieve files thru dav servlet. This converts a podcast URL to accomplish this | convertToDavUrl | {
"repo_name": "harfalm/Sakai-10.1",
"path": "podcasts/podcasts-impl/impl/src/java/org/sakaiproject/component/app/podcasts/BasicPodfeedService.java",
"license": "apache-2.0",
"size": 29928
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,008,315 |
@Override
public void put(KEY key, VALUE value) {
throw newUnsupportedOperationException("Put is not supported");
} | void function(KEY key, VALUE value) { throw newUnsupportedOperationException(STR); } | /**
* Puts the given {@link VALUE value} mapped to the given {@link KEY key} into this {@link Cache}.
*
* @param key {@link KEY} used to map the {@link VALUE value}; must not be {@literal null}.
* @param value {@link VALUE} put into this {@link Cache} mapped to the given {@link KEY key}.
* @throws Illega... | Puts the given <code>VALUE value</code> mapped to the given <code>KEY key</code> into this <code>Cache</code> | put | {
"repo_name": "codeprimate-software/cp-elements",
"path": "src/main/java/org/cp/elements/data/caching/AbstractCache.java",
"license": "apache-2.0",
"size": 4948
} | [
"org.cp.elements.lang.RuntimeExceptionsFactory"
] | import org.cp.elements.lang.RuntimeExceptionsFactory; | import org.cp.elements.lang.*; | [
"org.cp.elements"
] | org.cp.elements; | 1,064,581 |
CommentInfo delete(DeleteCommentInput input) throws RestApiException; | CommentInfo delete(DeleteCommentInput input) throws RestApiException; | /**
* Deletes a published comment of a revision. For NoteDb, it deletes the comment by rewriting the
* commit history.
*
* <p>Note instead of deleting the whole comment, this endpoint just replaces the comment's
* message.
*
* @return the comment with its message updated.
*/ | Deletes a published comment of a revision. For NoteDb, it deletes the comment by rewriting the commit history. Note instead of deleting the whole comment, this endpoint just replaces the comment's message | delete | {
"repo_name": "uwolfer/gerrit-rest-java-client",
"path": "src/main/java/com/google/gerrit/extensions/api/changes/CommentApi.java",
"license": "apache-2.0",
"size": 1739
} | [
"com.google.gerrit.extensions.common.CommentInfo",
"com.google.gerrit.extensions.restapi.RestApiException"
] | import com.google.gerrit.extensions.common.CommentInfo; import com.google.gerrit.extensions.restapi.RestApiException; | import com.google.gerrit.extensions.common.*; import com.google.gerrit.extensions.restapi.*; | [
"com.google.gerrit"
] | com.google.gerrit; | 1,630,742 |
public void setFieldValue(TemplateScript.Factory fieldPathTemplate, Object value, boolean ignoreEmptyValue) {
Map<String, Object> model = createTemplateModel();
if (ignoreEmptyValue) {
if (value == null) {
return;
}
if (value instanceof String) {
... | void function(TemplateScript.Factory fieldPathTemplate, Object value, boolean ignoreEmptyValue) { Map<String, Object> model = createTemplateModel(); if (ignoreEmptyValue) { if (value == null) { return; } if (value instanceof String) { String valueStr = (String) value; if (valueStr.isEmpty()) { return; } } } setFieldVal... | /**
* Sets the provided value to the provided path in the document.
* Any non existing path element will be created. If the last element is a list,
* the value will replace the existing list.
* @param fieldPathTemplate Resolves to the path with dot-notation within the document
* @param value Th... | Sets the provided value to the provided path in the document. Any non existing path element will be created. If the last element is a list, the value will replace the existing list | setFieldValue | {
"repo_name": "jmluy/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/ingest/IngestDocument.java",
"license": "apache-2.0",
"size": 40668
} | [
"java.util.Map",
"org.elasticsearch.script.TemplateScript"
] | import java.util.Map; import org.elasticsearch.script.TemplateScript; | import java.util.*; import org.elasticsearch.script.*; | [
"java.util",
"org.elasticsearch.script"
] | java.util; org.elasticsearch.script; | 242,722 |
public static Sha1HashCode fromBytes(byte[] bytes) {
Preconditions.checkArgument(bytes.length == NUM_BYTES_IN_HASH);
ByteBuffer buffer = ByteBuffer.wrap(bytes).order(BYTE_ORDER_FOR_FIELDS);
return new Sha1HashCode(buffer.getInt(), buffer.getLong(), buffer.getLong());
} | static Sha1HashCode function(byte[] bytes) { Preconditions.checkArgument(bytes.length == NUM_BYTES_IN_HASH); ByteBuffer buffer = ByteBuffer.wrap(bytes).order(BYTE_ORDER_FOR_FIELDS); return new Sha1HashCode(buffer.getInt(), buffer.getLong(), buffer.getLong()); } | /**
* Clones the specified bytes and uses the clone to create a new {@link Sha1HashCode}.
*/ | Clones the specified bytes and uses the clone to create a new <code>Sha1HashCode</code> | fromBytes | {
"repo_name": "daedric/buck",
"path": "src/com/facebook/buck/util/sha1/Sha1HashCode.java",
"license": "apache-2.0",
"size": 5751
} | [
"com.google.common.base.Preconditions",
"java.nio.ByteBuffer"
] | import com.google.common.base.Preconditions; import java.nio.ByteBuffer; | import com.google.common.base.*; import java.nio.*; | [
"com.google.common",
"java.nio"
] | com.google.common; java.nio; | 934,904 |
private static void loopUntilHMSReady(int port) throws Exception {
int retries = 0;
Exception exc;
while (true) {
try {
Socket socket = new Socket();
socket.connect(new InetSocketAddress(port), 5000);
socket.close();
return;
} catch (Exception e) {
if (r... | static void function(int port) throws Exception { int retries = 0; Exception exc; while (true) { try { Socket socket = new Socket(); socket.connect(new InetSocketAddress(port), 5000); socket.close(); return; } catch (Exception e) { if (retries++ > 60) { exc = e; break; } Thread.sleep(1000); } } LOG.error(STR + exc.getM... | /**
* A simple connect test to make sure that the metastore is up
* @throws Exception
*/ | A simple connect test to make sure that the metastore is up | loopUntilHMSReady | {
"repo_name": "alanfgates/hive",
"path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java",
"license": "apache-2.0",
"size": 59608
} | [
"java.net.InetSocketAddress",
"java.net.Socket"
] | import java.net.InetSocketAddress; import java.net.Socket; | import java.net.*; | [
"java.net"
] | java.net; | 572,013 |
void customize(GroovyObject goo); | void customize(GroovyObject goo); | /**
* Customize the supplied {@link GroovyObject}.
* <p>For example, this can be used to set a custom metaclass to
* handle missing methods.
* @param goo the {@code GroovyObject} to customize
*/ | Customize the supplied <code>GroovyObject</code>. For example, this can be used to set a custom metaclass to handle missing methods | customize | {
"repo_name": "sunpy1106/SpringBeanLifeCycle",
"path": "src/main/java/org/springframework/scripting/groovy/GroovyObjectCustomizer.java",
"license": "apache-2.0",
"size": 1365
} | [
"groovy.lang.GroovyObject"
] | import groovy.lang.GroovyObject; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 66,300 |
public BooleanDataValue greaterThan(DataValueDescriptor left,
DataValueDescriptor right)
throws StandardException
{
return SQLBoolean.truthValue(left,
right,
left.getInt() > right.getInt());
} | BooleanDataValue function(DataValueDescriptor left, DataValueDescriptor right) throws StandardException { return SQLBoolean.truthValue(left, right, left.getInt() > right.getInt()); } | /**
* The > operator as called from the language module, as opposed to
* the storage module.
*
* @param left The value on the left side of the >
* @param right The value on the right side of the >
*
* @return A SQL boolean value telling whether the first operand is greater
* than the second operan... | The > operator as called from the language module, as opposed to the storage module | greaterThan | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/SQLInteger.java",
"license": "apache-2.0",
"size": 19537
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; | import com.pivotal.gemfirexd.internal.iapi.error.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 1,194,064 |
public static MatrixAccumulator mkMaxAccumulator() {
return new MatrixAccumulator() {
private double result = Double.NEGATIVE_INFINITY; | static MatrixAccumulator function() { return new MatrixAccumulator() { private double result = Double.NEGATIVE_INFINITY; | /**
* Makes a maximum matrix accumulator that accumulates the maximum of matrix elements.
*
* @return a maximum vector accumulator
*/ | Makes a maximum matrix accumulator that accumulates the maximum of matrix elements | mkMaxAccumulator | {
"repo_name": "rabbanyk/CommunityEvaluation",
"path": "libs/la4j-0.5.0/src/main/java/org/la4j/matrix/Matrices.java",
"license": "mit",
"size": 26855
} | [
"org.la4j.matrix.functor.MatrixAccumulator"
] | import org.la4j.matrix.functor.MatrixAccumulator; | import org.la4j.matrix.functor.*; | [
"org.la4j.matrix"
] | org.la4j.matrix; | 2,907,018 |
public boolean onShowCustomView(View view); | boolean function(View view); | /**
* Called when the video view is ready to be shown. Must be implemented.
* @param view The view to show.
* @return whether the video is actually shown.
*/ | Called when the video view is ready to be shown. Must be implemented | onShowCustomView | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/chromium_org/content/public/android/java/src/org/chromium/content/browser/ContentVideoViewClient.java",
"license": "gpl-3.0",
"size": 1290
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,756,325 |
public String getSoapActionName(String soapAction) {
for (Map.Entry<String, String> entry : ACTIONS.entrySet()) {
if (entry.getValue().equals(soapAction)) {
return entry.getKey();
}
}
return null;
} | String function(String soapAction) { for (Map.Entry<String, String> entry : ACTIONS.entrySet()) { if (entry.getValue().equals(soapAction)) { return entry.getKey(); } } return null; } | /**
* return the "wsdl method name" from a soap action
* @param soapAction the soap action
* @return the associated "wsdl method name" or null if not found
*/ | return the "wsdl method name" from a soap action | getSoapActionName | {
"repo_name": "hizhangqi/jmeter-1",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java",
"license": "apache-2.0",
"size": 15395
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,155,979 |
public static net.iaeste.iws.ws.RejectOfferRequest map(final RejectOfferRequest api) {
net.iaeste.iws.ws.RejectOfferRequest ws = null;
if (api != null) {
ws = new net.iaeste.iws.ws.RejectOfferRequest();
ws.setOfferId(api.getOfferId());
}
return ws;
}
... | static net.iaeste.iws.ws.RejectOfferRequest function(final RejectOfferRequest api) { net.iaeste.iws.ws.RejectOfferRequest ws = null; if (api != null) { ws = new net.iaeste.iws.ws.RejectOfferRequest(); ws.setOfferId(api.getOfferId()); } return ws; } | /**
* Mapping an IWS API RejectOffer Request to the WebService SOAP Object.
*
* @param api API RejectOffer Request
* @return WS RejectOffer Request
*/ | Mapping an IWS API RejectOffer Request to the WebService SOAP Object | map | {
"repo_name": "IWSDevelopers/iws",
"path": "iws-ws-client/src/main/java/net/iaeste/iws/ws/client/mappers/ExchangeMapper.java",
"license": "apache-2.0",
"size": 33874
} | [
"net.iaeste.iws.api.requests.exchange.RejectOfferRequest"
] | import net.iaeste.iws.api.requests.exchange.RejectOfferRequest; | import net.iaeste.iws.api.requests.exchange.*; | [
"net.iaeste.iws"
] | net.iaeste.iws; | 1,845,058 |
public String getSortedXml(Document newDocument) {
try (XmlWriter writer = writerFactory.getWriter()) {
XMLOutputter xmlOutputter = new PatchedXMLOutputter(writer, indentBlankLines, indentSchemaLocation);
xmlOutputter.setFormat(createPrettyFormat());
xmlOutputter.output(... | String function(Document newDocument) { try (XmlWriter writer = writerFactory.getWriter()) { XMLOutputter xmlOutputter = new PatchedXMLOutputter(writer, indentBlankLines, indentSchemaLocation); xmlOutputter.setFormat(createPrettyFormat()); xmlOutputter.output(newDocument, writer); return writer.toString(); } catch (IOE... | /**
* Returns the sorted xml as an OutputStream.
*
* @return the sorted xml
*/ | Returns the sorted xml as an OutputStream | getSortedXml | {
"repo_name": "Ekryd/sortpom",
"path": "sorter/src/main/java/sortpom/XmlOutputGenerator.java",
"license": "bsd-3-clause",
"size": 4338
} | [
"java.io.IOException",
"org.jdom.Document",
"org.jdom.output.XMLOutputter"
] | import java.io.IOException; import org.jdom.Document; import org.jdom.output.XMLOutputter; | import java.io.*; import org.jdom.*; import org.jdom.output.*; | [
"java.io",
"org.jdom",
"org.jdom.output"
] | java.io; org.jdom; org.jdom.output; | 1,423,068 |
List<Action> findByActionTypeNameOrderByCreatedDateTimeDesc(String actionTypeName); | List<Action> findByActionTypeNameOrderByCreatedDateTimeDesc(String actionTypeName); | /**
* Return all actions for the specified actionTypeName.
*
* @param actionTypeName ActionTypeName filter criteria
* @return List<Action> returns all actions for actionTypeName
*/ | Return all actions for the specified actionTypeName | findByActionTypeNameOrderByCreatedDateTimeDesc | {
"repo_name": "ONSdigital/response-management-service",
"path": "actionsvc/src/main/java/uk/gov/ons/ctp/response/action/domain/repository/ActionRepository.java",
"license": "mit",
"size": 2589
} | [
"java.util.List",
"uk.gov.ons.ctp.response.action.domain.model.Action"
] | import java.util.List; import uk.gov.ons.ctp.response.action.domain.model.Action; | import java.util.*; import uk.gov.ons.ctp.response.action.domain.model.*; | [
"java.util",
"uk.gov.ons"
] | java.util; uk.gov.ons; | 2,207,281 |
public synchronized Object peek() throws NoSuchElementException {
return m_priorityQueue.peek();
}
| synchronized Object function() throws NoSuchElementException { return m_priorityQueue.peek(); } | /**
* Return element on top of heap but don't remove it.
*
* @return the element at top of heap
* @throws NoSuchElementException if isEmpty() == true
*/ | Return element on top of heap but don't remove it | peek | {
"repo_name": "leodmurillo/sonar",
"path": "plugins/sonar-squid-java-plugin/test-resources/commons-collections-3.2.1/src/org/apache/commons/collections/SynchronizedPriorityQueue.java",
"license": "lgpl-3.0",
"size": 3259
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 526,175 |
Flux<FeedResponse<Permission>> queryPermissions(String permissionLink, String query, CosmosQueryRequestOptions options); | Flux<FeedResponse<Permission>> queryPermissions(String permissionLink, String query, CosmosQueryRequestOptions options); | /**
* Query for permissions.
* <p>
* After subscription the operation will be performed.
* The {@link Flux} will contain one or several feed response pages of the obtained permissions.
* In case of failure the {@link Flux} will error.
*
* @param permissionLink the permission link.
... | Query for permissions. After subscription the operation will be performed. The <code>Flux</code> will contain one or several feed response pages of the obtained permissions. In case of failure the <code>Flux</code> will error | queryPermissions | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/AsyncDocumentClient.java",
"license": "mit",
"size": 65091
} | [
"com.azure.cosmos.models.CosmosQueryRequestOptions",
"com.azure.cosmos.models.FeedResponse"
] | import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.FeedResponse; | import com.azure.cosmos.models.*; | [
"com.azure.cosmos"
] | com.azure.cosmos; | 425,687 |
public final void setCircleLegends(final String circle1Legend, final String circle2Legend, final String circle3Legend) {
checkNotNull(circle1Legend);
checkNotNull(circle2Legend);
checkNotNull(circle3Legend);
this.circle1Legend = circle1Legend;
this.circle2Legend = circle2Lege... | final void function(final String circle1Legend, final String circle2Legend, final String circle3Legend) { checkNotNull(circle1Legend); checkNotNull(circle2Legend); checkNotNull(circle3Legend); this.circle1Legend = circle1Legend; this.circle2Legend = circle2Legend; this.circle3Legend = circle3Legend; } /** * {@inheritDo... | /**
* Set the legends of the circles.
*
* @param circle1Legend
* legend of circle 1. Cannot be null.
* @param circle2Legend
* legend of circle 2. Cannot be null.
* @param circle3Legend
* legend of circle 3. Cannot be null.
*/ | Set the legends of the circles | setCircleLegends | {
"repo_name": "unforgiven250/charts4j",
"path": "src/main/java/com/googlecode/charts4j/VennDiagram.java",
"license": "mit",
"size": 5253
} | [
"com.googlecode.charts4j.collect.Preconditions"
] | import com.googlecode.charts4j.collect.Preconditions; | import com.googlecode.charts4j.collect.*; | [
"com.googlecode.charts4j"
] | com.googlecode.charts4j; | 573,260 |
public static String encodeQueryParam(final String paramName, final String paramValue) {
String response = null;
try {
response = StringUtils.isEmpty(paramValue) ? null : (URLEncoder.encode(paramName, UTF_8) + "=" + URLEncoder.encode(
StringUtils.defaultString(paramVa... | static String function(final String paramName, final String paramValue) { String response = null; try { response = StringUtils.isEmpty(paramValue) ? null : (URLEncoder.encode(paramName, UTF_8) + "=" + URLEncoder.encode( StringUtils.defaultString(paramValue, StringUtils.EMPTY), UTF_8)); } catch (UnsupportedEncodingExcep... | /**
* Returns param/value pair in form "urlEncodedName=urlEncodedValue". It can be used for instance in HTTP get queries.
*
* @param paramName parameter name
* @param paramValue parameter value
* @return "[urlEncodedName]=[urlEncodedValue]" string
*/ | Returns param/value pair in form "urlEncodedName=urlEncodedValue". It can be used for instance in HTTP get queries | encodeQueryParam | {
"repo_name": "tomazzupan/wildfly",
"path": "testsuite/shared/src/main/java/org/jboss/as/test/integration/security/common/Utils.java",
"license": "lgpl-2.1",
"size": 52307
} | [
"java.io.UnsupportedEncodingException",
"java.net.URLEncoder",
"org.apache.commons.lang.StringUtils"
] | import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import org.apache.commons.lang.StringUtils; | import java.io.*; import java.net.*; import org.apache.commons.lang.*; | [
"java.io",
"java.net",
"org.apache.commons"
] | java.io; java.net; org.apache.commons; | 1,463,192 |
public static boolean isTouchEvent(MotionEvent e) {
return isTouchType(e.getToolType(0));
} | static boolean function(MotionEvent e) { return isTouchType(e.getToolType(0)); } | /**
* Returns true if event was triggered by a finger or stylus touch.
*/ | Returns true if event was triggered by a finger or stylus touch | isTouchEvent | {
"repo_name": "xorware/android_frameworks_base",
"path": "packages/DocumentsUI/src/com/android/documentsui/Events.java",
"license": "apache-2.0",
"size": 6647
} | [
"android.view.MotionEvent"
] | import android.view.MotionEvent; | import android.view.*; | [
"android.view"
] | android.view; | 1,772,367 |
HibBaseElement role(); | HibBaseElement role(); | /**
* Return the root for roles.
*
* @return
*/ | Return the root for roles | role | {
"repo_name": "gentics/mesh",
"path": "mdm/api/src/main/java/com/gentics/mesh/core/data/dao/PermissionRoots.java",
"license": "apache-2.0",
"size": 1164
} | [
"com.gentics.mesh.core.data.HibBaseElement"
] | import com.gentics.mesh.core.data.HibBaseElement; | import com.gentics.mesh.core.data.*; | [
"com.gentics.mesh"
] | com.gentics.mesh; | 2,292,569 |
public static AllClassesMatch newMatch(final EClass pCls) {
return new Immutable(pCls);
}
private static final class Mutable extends AllClassesMatch {
Mutable(final EClass pCls) {
super(pCls);
} | static AllClassesMatch function(final EClass pCls) { return new Immutable(pCls); } private static final class Mutable extends AllClassesMatch { Mutable(final EClass pCls) { super(pCls); } | /**
* Returns a new (partial) match.
* This can be used e.g. to call the matcher with a partial match.
* <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
* @param pCls the fixed value of pattern parameter cls, or null if not bound.
* @return the (par... | Returns a new (partial) match. This can be used e.g. to call the matcher with a partial match. The returned match will be immutable. Use <code>#newEmptyMatch()</code> to obtain a mutable match object | newMatch | {
"repo_name": "upohl/eloquent",
"path": "tests/org.muml.eloquent.ocl.vql.tests/src-gen/org_muml_eloquent_ocl_vql_tests_fixtures/AllClassesMatch.java",
"license": "epl-1.0",
"size": 5427
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,390,292 |
@Test
public void testGetFieldType () {
assertEquals(Short.class, wShortParser.getFieldType());
}
| void function () { assertEquals(Short.class, wShortParser.getFieldType()); } | /**
* Test method for {@link AbstractParser#getFieldType()}.
*/ | Test method for <code>AbstractParser#getFieldType()</code> | testGetFieldType | {
"repo_name": "AlexRNL/Commons",
"path": "src/test/java/com/alexrnl/commons/arguments/parsers/WShortParserTest.java",
"license": "bsd-3-clause",
"size": 1575
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 977,406 |
public ASTNode getAssociatedNode(); | ASTNode function(); | /**
* Every fragment maps to a node.
* Multiple fragments can map to the same node.
*
* @return ASTNode The node to which this fragment maps.
*/ | Every fragment maps to a node. Multiple fragments can map to the same node | getAssociatedNode | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/corext/dom/fragments/IASTFragment.java",
"license": "mit",
"size": 3162
} | [
"org.eclipse.jdt.core.dom.ASTNode"
] | import org.eclipse.jdt.core.dom.ASTNode; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 1,660,675 |
@Test
public void testTest() {
assertTrue(P1.test("v12", "v8", 1, "VX", "t", "u", "r", "b"));
assertFalse(P1.test(null, "v2", 1, "VX", "t", "u", "r", "b"));
}
| void function() { assertTrue(P1.test("v12", "v8", 1, "VX", "t", "u", "r", "b")); assertFalse(P1.test(null, "v2", 1, "VX", "t", "u", "r", "b")); } | /**
* Test method for
* {@link OctoPredicate#test(java.lang.Object, java.lang.Object)}.
*/ | Test method for <code>OctoPredicate#test(java.lang.Object, java.lang.Object)</code> | testTest | {
"repo_name": "Gilandel/utils-commons",
"path": "src/test/java/fr/landel/utils/commons/function/OctoPredicateTest.java",
"license": "apache-2.0",
"size": 4208
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 747,398 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.