method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static CreateIndexClause create(String indexName, String windowName, String... properties) { return new CreateIndexClause(indexName, windowName, properties); } public CreateIndexClause(String indexName, String windowName, List<CreateIndexColumn> columns) { this.indexNa...
static CreateIndexClause function(String indexName, String windowName, String... properties) { return new CreateIndexClause(indexName, windowName, properties); } public CreateIndexClause(String indexName, String windowName, List<CreateIndexColumn> columns) { this.indexName = indexName; this.windowName = windowName; thi...
/** * Creates a clause to create a named window. * @param windowName is the name of the named window * @param properties properties to index * @param indexName name of index * @return create variable clause */
Creates a clause to create a named window
create
{ "repo_name": "intelie/esper", "path": "esper/src/main/java/com/espertech/esper/client/soda/CreateIndexClause.java", "license": "gpl-2.0", "size": 4114 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
268,160
public static BigInteger getUnsignedLong(ByteBuffer bb, int offset) { byte[] v = new byte[8]; for (int i = 0; i < 8; ++i) { v[i] = bb.get(offset+i); } return new BigInteger(1, v); }
static BigInteger function(ByteBuffer bb, int offset) { byte[] v = new byte[8]; for (int i = 0; i < 8; ++i) { v[i] = bb.get(offset+i); } return new BigInteger(1, v); }
/** * Get an unsigned long from the specified offset in the ByteBuffer * * @param bb ByteBuffer to get the long from * @param offset the offset to get the long from * @return an unsigned long contained in a BigInteger */
Get an unsigned long from the specified offset in the ByteBuffer
getUnsignedLong
{ "repo_name": "phisolani/floodlight", "path": "src/main/java/org/openflow/util/Unsigned.java", "license": "apache-2.0", "size": 6885 }
[ "java.math.BigInteger", "java.nio.ByteBuffer" ]
import java.math.BigInteger; import java.nio.ByteBuffer;
import java.math.*; import java.nio.*;
[ "java.math", "java.nio" ]
java.math; java.nio;
2,192,235
String getLocalePath(Locale locale);
String getLocalePath(Locale locale);
/** * Get the path name of another version of the resource. * * @param locale the Locale for the new version. * @return the path including localization. */
Get the path name of another version of the resource
getLocalePath
{ "repo_name": "apache/tiles-request", "path": "tiles-request-api/src/main/java/org/apache/tiles/request/ApplicationResource.java", "license": "apache-2.0", "size": 2567 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
461,771
public static Drawable getDrawable(Activity activity, String imageName) throws InvalidFileException{ try { if(imageName == null || imageName.isEmpty()) return null; Drawable ret = null; EMobcApplication app = (EMobcApplication)activity.getApplication(); String imageToFetchFromCache ...
static Drawable function(Activity activity, String imageName) throws InvalidFileException{ try { if(imageName == null imageName.isEmpty()) return null; Drawable ret = null; EMobcApplication app = (EMobcApplication)activity.getApplication(); String imageToFetchFromCache = null; if(Utils.isUrl(imageName)){ imageToFetchFr...
/** * Returns a Drawable object from an image name in drawable/images folder. * @param context * @param imageName * @return * @throws InvalidFileException */
Returns a Drawable object from an image name in drawable/images folder
getDrawable
{ "repo_name": "debiasej/emobc-calculator", "path": "src/com/emobc/android/utils/ImagesUtils.java", "license": "agpl-3.0", "size": 12799 }
[ "android.app.Activity", "android.graphics.drawable.Drawable", "android.util.Log", "com.emobc.android.activities.EMobcApplication" ]
import android.app.Activity; import android.graphics.drawable.Drawable; import android.util.Log; import com.emobc.android.activities.EMobcApplication;
import android.app.*; import android.graphics.drawable.*; import android.util.*; import com.emobc.android.activities.*;
[ "android.app", "android.graphics", "android.util", "com.emobc.android" ]
android.app; android.graphics; android.util; com.emobc.android;
1,193,377
public Object[] setProperties( ArrayList<String> properties, ArrayList<String> propertiesValues ) throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception { Object[] result = null; if ( m_content != null && !properties.isEmpty() && !propertiesValues.isEmpty()...
Object[] function( ArrayList<String> properties, ArrayList<String> propertiesValues ) throws com.sun.star.ucb.CommandAbortedException, com.sun.star.uno.Exception { Object[] result = null; if ( m_content != null && !properties.isEmpty() && !propertiesValues.isEmpty() && properties.size() == propertiesValues.size() ) { i...
/** * Set values of the properties. * *@return Object[] Returns null or instance object of com.sun.star.uno.Any * if values successfully seted, properties otherwise */
Set values of the properties
setProperties
{ "repo_name": "beppec56/core", "path": "odk/examples/DevelopersGuide/UCB/PropertiesComposer.java", "license": "gpl-3.0", "size": 11138 }
[ "com.sun.star.beans.PropertyValue", "java.util.ArrayList" ]
import com.sun.star.beans.PropertyValue; import java.util.ArrayList;
import com.sun.star.beans.*; import java.util.*;
[ "com.sun.star", "java.util" ]
com.sun.star; java.util;
2,211,484
private VdsNetworkInterface createInterface(ResultSet rs) throws SQLException { VdsNetworkInterface iface; String macAddress = rs.getString("mac_addr"); Integer vlanId = (Integer) rs.getObject("vlan_id"); Integer bondType =...
VdsNetworkInterface function(ResultSet rs) throws SQLException { VdsNetworkInterface iface; String macAddress = rs.getString(STR); Integer vlanId = (Integer) rs.getObject(STR); Integer bondType = (Integer) rs.getObject(STR); String bondName = rs.getString(STR); Boolean isBond = (Boolean) rs.getObject(STR); String bondO...
/** * Create the correct type according to the row. If the type can't be determined for whatever reason, * {@link VdsNetworkInterface} instance is created & initialized. * * @param rs * The row representing the entity. ...
Create the correct type according to the row. If the type can't be determined for whatever reason, <code>VdsNetworkInterface</code> instance is created & initialized
createInterface
{ "repo_name": "jbeecham/ovirt-engine", "path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/InterfaceDAODbFacadeImpl.java", "license": "apache-2.0", "size": 11485 }
[ "java.sql.ResultSet", "java.sql.SQLException", "org.ovirt.engine.core.common.businessentities.VdsNetworkInterface", "org.ovirt.engine.core.common.businessentities.network.Bond", "org.ovirt.engine.core.common.businessentities.network.Nic", "org.ovirt.engine.core.common.businessentities.network.Vlan" ]
import java.sql.ResultSet; import java.sql.SQLException; import org.ovirt.engine.core.common.businessentities.VdsNetworkInterface; import org.ovirt.engine.core.common.businessentities.network.Bond; import org.ovirt.engine.core.common.businessentities.network.Nic; import org.ovirt.engine.core.common.businessentities.net...
import java.sql.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.common.businessentities.network.*;
[ "java.sql", "org.ovirt.engine" ]
java.sql; org.ovirt.engine;
1,742,124
@Test(expected=IllegalArgumentException.class) public void of_Strings_toFile() throws IOException { // given String f = "src/test/resources/Thumbnailator/grid.png"; File outFile = new File("src/test/resources/Thumbnailator/grid.tmp.png"); outFile.deleteOnExit(); // when Thumbnails.of(f, f...
@Test(expected=IllegalArgumentException.class) void function() throws IOException { String f = STR; File outFile = new File(STR); outFile.deleteOnExit(); Thumbnails.of(f, f) .size(50, 50) .toFile(outFile); }
/** * Test for the {@link Thumbnails.Builder} class where, * <ol> * <li>Thumbnails.of(String, String)</li> * <li>toFile(File)</li> * </ol> * and the expected outcome is, * <ol> * <li>An IllegalArgumentException is thrown.</li> * </ol> * @throws IOException */
Test for the <code>Thumbnails.Builder</code> class where, Thumbnails.of(String, String) toFile(File) and the expected outcome is, An IllegalArgumentException is thrown.
of_Strings_toFile
{ "repo_name": "passerby4j/thumbnailator", "path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java", "license": "mit", "size": 303967 }
[ "java.io.File", "java.io.IOException", "org.junit.Test" ]
import java.io.File; import java.io.IOException; import org.junit.Test;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
272,289
ModelToXMLDumper getModelToXMLDumper();
ModelToXMLDumper getModelToXMLDumper();
/** * Gets the {@link ModelToXMLDumper} to be used. */
Gets the <code>ModelToXMLDumper</code> to be used
getModelToXMLDumper
{ "repo_name": "gnodet/camel", "path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java", "license": "apache-2.0", "size": 24074 }
[ "org.apache.camel.spi.ModelToXMLDumper" ]
import org.apache.camel.spi.ModelToXMLDumper;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
877,072
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> restoreBlobRangesWithResponseAsync( String resourceGroupName, String accountName, OffsetDateTime timeToRestore, List<BlobRestoreRange> blobRanges, Context context) { if (this.clie...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String accountName, OffsetDateTime timeToRestore, List<BlobRestoreRange> blobRanges, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if ...
/** * Restore blobs in the specified blob ranges. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case * insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names ...
Restore blobs in the specified blob ranges
restoreBlobRangesWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java", "license": "mit", "size": 168198 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.storage.models.BlobRestoreParameters", "com.azure.resourcemanager.storage.models.BlobRestoreRange", "java.nio.ByteBuffer", "...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.storage.models.BlobRestoreParameters; import com.azure.resourcemanager.storage.models.BlobRestoreRange; import java....
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.models.*; import java.nio.*; import java.time.*; import java.util.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio", "java.time", "java.util" ]
com.azure.core; com.azure.resourcemanager; java.nio; java.time; java.util;
1,805,456
public void lerp(float x, float y, float z, float amt) { this.x = PApplet.lerp(this.x,x,amt); this.y = PApplet.lerp(this.y,y,amt); this.z = PApplet.lerp(this.z,z,amt); }
void function(float x, float y, float z, float amt) { this.x = PApplet.lerp(this.x,x,amt); this.y = PApplet.lerp(this.y,y,amt); this.z = PApplet.lerp(this.z,z,amt); }
/** * Linear interpolate the vector to x,y,z values * @param x the x component to lerp to * @param y the y component to lerp to * @param z the z component to lerp to */
Linear interpolate the vector to x,y,z values
lerp
{ "repo_name": "danthemellowman/Processing-Android-Eclipse-Demos", "path": "processing-android/core/src/com/processing/core/PVector.java", "license": "mit", "size": 27366 }
[ "com.processing.core.PApplet" ]
import com.processing.core.PApplet;
import com.processing.core.*;
[ "com.processing.core" ]
com.processing.core;
1,816,106
private Double getMin(HashMap<DirectedNode, Double> neighbors1, HashMap<DirectedNode, Double> neighbors2) { if (getMapValueSum(neighbors1) <= getMapValueSum(neighbors2)) return getMapValueSum(neighbors1); else return getMapValueSum(neighbors2); }
Double function(HashMap<DirectedNode, Double> neighbors1, HashMap<DirectedNode, Double> neighbors2) { if (getMapValueSum(neighbors1) <= getMapValueSum(neighbors2)) return getMapValueSum(neighbors1); else return getMapValueSum(neighbors2); }
/** * Computes the minimum of two {@link Map}'s */
Computes the minimum of two <code>Map</code>'s
getMin
{ "repo_name": "marcel-stud/DNA", "path": "src/dna/metrics/similarityMeasures/overlap/OverlapDirectedDoubleWeighted.java", "license": "gpl-3.0", "size": 5840 }
[ "dna.graph.nodes.DirectedNode", "java.util.HashMap" ]
import dna.graph.nodes.DirectedNode; import java.util.HashMap;
import dna.graph.nodes.*; import java.util.*;
[ "dna.graph.nodes", "java.util" ]
dna.graph.nodes; java.util;
511,663
public Builder setMinimumOsVersion(DottedVersion minimumOsVersion) { this.minimumOsVersion = minimumOsVersion; return this; }
Builder function(DottedVersion minimumOsVersion) { this.minimumOsVersion = minimumOsVersion; return this; }
/** * Sets the minimum OS version for this bundle which will be used when constructing the bundle's * plist. */
Sets the minimum OS version for this bundle which will be used when constructing the bundle's plist
setMinimumOsVersion
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/Bundling.java", "license": "apache-2.0", "size": 19706 }
[ "com.google.devtools.build.lib.rules.apple.DottedVersion" ]
import com.google.devtools.build.lib.rules.apple.DottedVersion;
import com.google.devtools.build.lib.rules.apple.*;
[ "com.google.devtools" ]
com.google.devtools;
2,486,422
public Entity getEntity(Class cl, Object key) { Entity []entities = _entities; for (int i = _entitiesTop - 1; i >= 0; i--) { Entity entity = entities[i]; if (entity.__caucho_match(cl, key)) { return entity; } } return null; }
Entity function(Class cl, Object key) { Entity []entities = _entities; for (int i = _entitiesTop - 1; i >= 0; i--) { Entity entity = entities[i]; if (entity.__caucho_match(cl, key)) { return entity; } } return null; }
/** * Matches the entity. */
Matches the entity
getEntity
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/amber/manager/AmberConnection.java", "license": "gpl-2.0", "size": 89822 }
[ "com.caucho.amber.entity.Entity" ]
import com.caucho.amber.entity.Entity;
import com.caucho.amber.entity.*;
[ "com.caucho.amber" ]
com.caucho.amber;
2,569,529
@Element(required = false) public User getVoidedBy() { return voidedBy; }
@Element(required = false) User function() { return voidedBy; }
/** * Returns the User who voided this ConceptName. * * @return the User who voided this ConceptName, or null if not set */
Returns the User who voided this ConceptName
getVoidedBy
{ "repo_name": "kabariyamilind/openMRSDEV", "path": "api/src/main/java/org/openmrs/ConceptNameTag.java", "license": "mpl-2.0", "size": 5960 }
[ "org.simpleframework.xml.Element" ]
import org.simpleframework.xml.Element;
import org.simpleframework.xml.*;
[ "org.simpleframework.xml" ]
org.simpleframework.xml;
1,517,801
private static String buildMessage(final Locale locale, final Localizable specifier, final Object ... parts) { return (specifier == null) ? "" : new MessageFormat(specifier.getLocalizedString(locale), locale).format(parts); } /** Create an {@link java.lang.IllegalArgumentException} with localized m...
static String function(final Locale locale, final Localizable specifier, final Object ... parts) { return (specifier == null) ? "" : new MessageFormat(specifier.getLocalizedString(locale), locale).format(parts); } /** Create an {@link java.lang.IllegalArgumentException} with localized message. * @param specifier format...
/** * Builds a message string by from a pattern and its arguments. * @param locale Locale in which the message should be translated * @param specifier format specifier (to be translated) * @param parts parts to insert in the format (no translation) * @return a message string */
Builds a message string by from a pattern and its arguments
buildMessage
{ "repo_name": "ProjectPersephone/Orekit", "path": "src/main/java/org/orekit/errors/OrekitException.java", "license": "apache-2.0", "size": 8295 }
[ "java.text.MessageFormat", "java.util.Locale", "org.apache.commons.math3.exception.util.Localizable" ]
import java.text.MessageFormat; import java.util.Locale; import org.apache.commons.math3.exception.util.Localizable;
import java.text.*; import java.util.*; import org.apache.commons.math3.exception.util.*;
[ "java.text", "java.util", "org.apache.commons" ]
java.text; java.util; org.apache.commons;
1,875,142
public void setWritingModeTraits(WritingModeTraitsGetter wmtg) { for (Span s : getSpans()) { s.setWritingModeTraits(wmtg); } }
void function(WritingModeTraitsGetter wmtg) { for (Span s : getSpans()) { s.setWritingModeTraits(wmtg); } }
/** * Sets the writing mode traits for the spans of this main * reference area. * @param wmtg a WM traits getter */
Sets the writing mode traits for the spans of this main reference area
setWritingModeTraits
{ "repo_name": "StrategyObject/fop", "path": "src/java/org/apache/fop/area/MainReference.java", "license": "apache-2.0", "size": 4298 }
[ "org.apache.fop.traits.WritingModeTraitsGetter" ]
import org.apache.fop.traits.WritingModeTraitsGetter;
import org.apache.fop.traits.*;
[ "org.apache.fop" ]
org.apache.fop;
702,228
public void addDomainMarker(int index, Marker marker, Layer layer) { addDomainMarker(index, marker, layer, true); }
void function(int index, Marker marker, Layer layer) { addDomainMarker(index, marker, layer, true); }
/** * Adds a marker for a specific dataset/renderer and sends a * {@link PlotChangeEvent} to all registered listeners. * <P> * Typically a marker will be drawn by the renderer as a line perpendicular * to the domain axis (that the renderer is mapped to), however this is * entirely up to th...
Adds a marker for a specific dataset/renderer and sends a <code>PlotChangeEvent</code> to all registered listeners. Typically a marker will be drawn by the renderer as a line perpendicular to the domain axis (that the renderer is mapped to), however this is entirely up to the renderer
addDomainMarker
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/chart/plot/XYPlot.java", "license": "gpl-3.0", "size": 198838 }
[ "org.jfree.chart.ui.Layer" ]
import org.jfree.chart.ui.Layer;
import org.jfree.chart.ui.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,289,476
public int doStartTag() throws JspException { JspWriter out = this.pageContext.getOut(); boolean selected = false; if (key.indexOf(",") > -1) { StringTokenizer st = new StringTokenizer(key, ","); while (st.hasMoreTokens()) { if (value.toLowerCase().startsWith(st.nextToken().toLowerCase...
int function() throws JspException { JspWriter out = this.pageContext.getOut(); boolean selected = false; if (key.indexOf(",") > -1) { StringTokenizer st = new StringTokenizer(key, ","); while (st.hasMoreTokens()) { if (value.toLowerCase().startsWith(st.nextToken().toLowerCase())) { selected = true; break; } } } else i...
/** * Description of the Method * * @return Description of the Return Value * @throws JspException Description of the Exception */
Description of the Method
doStartTag
{ "repo_name": "yukoff/concourse-connect", "path": "src/main/java/com/concursive/connect/web/taglibs/TabbedMenuHandler.java", "license": "agpl-3.0", "size": 7105 }
[ "com.concursive.commons.text.StringUtils", "com.concursive.connect.Constants", "com.concursive.connect.config.ApplicationPrefs", "com.concursive.connect.web.modules.login.dao.User", "com.concursive.connect.web.modules.profile.dao.Project", "java.util.StringTokenizer", "javax.servlet.jsp.JspException", ...
import com.concursive.commons.text.StringUtils; import com.concursive.connect.Constants; import com.concursive.connect.config.ApplicationPrefs; import com.concursive.connect.web.modules.login.dao.User; import com.concursive.connect.web.modules.profile.dao.Project; import java.util.StringTokenizer; import javax.servlet....
import com.concursive.commons.text.*; import com.concursive.connect.*; import com.concursive.connect.config.*; import com.concursive.connect.web.modules.login.dao.*; import com.concursive.connect.web.modules.profile.dao.*; import java.util.*; import javax.servlet.jsp.*;
[ "com.concursive.commons", "com.concursive.connect", "java.util", "javax.servlet" ]
com.concursive.commons; com.concursive.connect; java.util; javax.servlet;
1,945,838
@Test public void testGetRangeBounds2() { DefaultStatisticalCategoryDataset d1 = new DefaultStatisticalCategoryDataset(); d1.add(1.0, 2.0, "R1", "C1"); assertEquals(new Range(1.0, 1.0), d1.getRangeBounds(false)); assertEquals(new Range(-1.0, 3.0), d1.getRang...
void function() { DefaultStatisticalCategoryDataset d1 = new DefaultStatisticalCategoryDataset(); d1.add(1.0, 2.0, "R1", "C1"); assertEquals(new Range(1.0, 1.0), d1.getRangeBounds(false)); assertEquals(new Range(-1.0, 3.0), d1.getRangeBounds(true)); d1.add(10.0, 20.0, "R1", "C1"); assertEquals(new Range(10.0, 10.0), d1...
/** * Some checks for the getRangeBounds() method. */
Some checks for the getRangeBounds() method
testGetRangeBounds2
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/data/statistics/DefaultStatisticalCategoryDatasetTest.java", "license": "lgpl-2.1", "size": 11182 }
[ "org.jfree.data.Range", "org.junit.Assert" ]
import org.jfree.data.Range; import org.junit.Assert;
import org.jfree.data.*; import org.junit.*;
[ "org.jfree.data", "org.junit" ]
org.jfree.data; org.junit;
2,435,967
public static <T extends CalculusFieldElement<T>> T min(final T a, final double b) { final double aR = a.getReal(); if (aR < b) { return a; } else if (b < aR) { return a.getField().getZero().add(b); } else { // either the numbers are equal, or one ...
static <T extends CalculusFieldElement<T>> T function(final T a, final double b) { final double aR = a.getReal(); if (aR < b) { return a; } else if (b < aR) { return a.getField().getZero().add(b); } else { return Double.isNaN(aR) ? a : a.getField().getZero().add(b); } }
/** Compute the minimum of two values * @param a first value * @param b second value * @param <T> the type of the field element * @return a if a is lesser or equal to b, b otherwise * @since 1.3 */
Compute the minimum of two values
min
{ "repo_name": "sdinot/hipparchus", "path": "hipparchus-core/src/main/java/org/hipparchus/util/FastMath.java", "license": "apache-2.0", "size": 173587 }
[ "org.hipparchus.CalculusFieldElement" ]
import org.hipparchus.CalculusFieldElement;
import org.hipparchus.*;
[ "org.hipparchus" ]
org.hipparchus;
1,221,328
public static BufferedImage loadImage(String url) { BufferedImage img = null; if (url != null) { // Parses data URIs of the form data:image/format;base64,xxx if (url.startsWith("data:image/")) { try { int comma = url.indexOf(','); byte[] data = mxBase64.decode(url.substring(comma +...
static BufferedImage function(String url) { BufferedImage img = null; if (url != null) { if (url.startsWith(STR)) { try { int comma = url.indexOf(','); byte[] data = mxBase64.decode(url.substring(comma + 1)); ByteArrayInputStream is = new ByteArrayInputStream(data); img = ImageIO.read(is); } catch (Exception e1) { } } ...
/** * Loads an image from the local filesystem, a data URI or any other URL. */
Loads an image from the local filesystem, a data URI or any other URL
loadImage
{ "repo_name": "3w3rt0n/AmeacasInternas", "path": "src/com/mxgraph/util/mxUtils.java", "license": "apache-2.0", "size": 67056 }
[ "java.awt.image.BufferedImage", "java.io.ByteArrayInputStream", "javax.imageio.ImageIO" ]
import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import javax.imageio.ImageIO;
import java.awt.image.*; import java.io.*; import javax.imageio.*;
[ "java.awt", "java.io", "javax.imageio" ]
java.awt; java.io; javax.imageio;
2,632,704
@Test public void testLegalityCheck() { Assert.assertTrue(fpts.isLegalFsFile(new FsFile("a/b/c"))); Assert.assertFalse(fpts.isLegalFsFile(new FsFile("a/*/c"))); Assert.assertFalse(fpts.isLegalFsFile(new FsFile("a/b/lpt1"))); }
void function() { Assert.assertTrue(fpts.isLegalFsFile(new FsFile("a/b/c"))); Assert.assertFalse(fpts.isLegalFsFile(new FsFile("a/*/c"))); Assert.assertFalse(fpts.isLegalFsFile(new FsFile(STR))); }
/** * Test the ability to check if a given repository path is legal. */
Test the ability to check if a given repository path is legal
testLegalityCheck
{ "repo_name": "knabar/openmicroscopy", "path": "components/blitz/test/ome/services/blitz/test/utests/ServerFilePathTransformerTest.java", "license": "gpl-2.0", "size": 6002 }
[ "org.testng.Assert" ]
import org.testng.Assert;
import org.testng.*;
[ "org.testng" ]
org.testng;
2,447,825
@Override public IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, int offset) { return new ComplexNDArray(Nd4j.createBuffer(data),shape,stride,offset); }
IComplexNDArray function(double[] data, int[] shape, int[] stride, int offset) { return new ComplexNDArray(Nd4j.createBuffer(data),shape,stride,offset); }
/** * Creates a complex ndarray with the specified shape * * @param data * @param shape the shape of the ndarray * @param stride the stride for the ndarray * @param offset the offset of the ndarray * @return the instance */
Creates a complex ndarray with the specified shape
createComplex
{ "repo_name": "wlin12/JNN", "path": "src/org/nd4j/linalg/jblas/JblasNDArrayFactory.java", "license": "apache-2.0", "size": 12934 }
[ "org.nd4j.linalg.api.complex.IComplexNDArray", "org.nd4j.linalg.factory.Nd4j", "org.nd4j.linalg.jblas.complex.ComplexNDArray" ]
import org.nd4j.linalg.api.complex.IComplexNDArray; import org.nd4j.linalg.factory.Nd4j; import org.nd4j.linalg.jblas.complex.ComplexNDArray;
import org.nd4j.linalg.api.complex.*; import org.nd4j.linalg.factory.*; import org.nd4j.linalg.jblas.complex.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,241,054
public static String getValue(String xpath, Document document) throws XPathExpressionException { XPath xPathProcessor = XPathFactory.newInstance().newXPath(); return xPathProcessor.compile(xpath).evaluate(document); }
static String function(String xpath, Document document) throws XPathExpressionException { XPath xPathProcessor = XPathFactory.newInstance().newXPath(); return xPathProcessor.compile(xpath).evaluate(document); }
/** * The a "value" from an XML file using XPath. * @param xpath The XPath expression to select the value. * @param document The document from which the value is to be extracted. * @return The data value. An empty {@link String} is returned when the expression does not evaluate * to anything in...
The a "value" from an XML file using XPath
getValue
{ "repo_name": "aldaris/jenkins", "path": "core/src/main/java/jenkins/util/xml/XMLUtils.java", "license": "mit", "size": 11553 }
[ "javax.xml.xpath.XPath", "javax.xml.xpath.XPathExpressionException", "javax.xml.xpath.XPathFactory", "org.w3c.dom.Document" ]
import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.w3c.dom.Document;
import javax.xml.xpath.*; import org.w3c.dom.*;
[ "javax.xml", "org.w3c.dom" ]
javax.xml; org.w3c.dom;
1,855,021
private void addJarResource(File file) throws IOException { JarFile jarFile = new JarFile(file); addURL(file.toURI().toURL()); analyzeFile(file); Enumeration<JarEntry> jarEntries = jarFile.entries(); while (jarEntries.hasMoreElements()) { JarEntry jarEntry = jarEntries.nextElement(); if (!ja...
void function(File file) throws IOException { JarFile jarFile = new JarFile(file); addURL(file.toURI().toURL()); analyzeFile(file); Enumeration<JarEntry> jarEntries = jarFile.entries(); while (jarEntries.hasMoreElements()) { JarEntry jarEntry = jarEntries.nextElement(); if (!jarEntry.isDirectory() && isJar(jarEntry.get...
/** * Analyze this jar file for containing jar files and classes to be used in our own * classloader. * * @param file * the file to analyze * @throws IOException * if something happens on file access. */
Analyze this jar file for containing jar files and classes to be used in our own classloader
addJarResource
{ "repo_name": "andy32323/inspectIT", "path": "Agent/src/info/novatec/inspectit/agent/javaagent/JavaAgent.java", "license": "agpl-3.0", "size": 18483 }
[ "java.io.File", "java.io.IOException", "java.util.Enumeration", "java.util.jar.JarEntry", "java.util.jar.JarFile" ]
import java.io.File; import java.io.IOException; import java.util.Enumeration; import java.util.jar.JarEntry; import java.util.jar.JarFile;
import java.io.*; import java.util.*; import java.util.jar.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,787,037
public AccountingPeriod getPayrollEndDateFiscalPeriod() { return payrollEndDateFiscalPeriod; }
AccountingPeriod function() { return payrollEndDateFiscalPeriod; }
/** * Gets the payrollEndDateFiscalPeriod. * * @return Returns the payrollEndDateFiscalPeriod. */
Gets the payrollEndDateFiscalPeriod
getPayrollEndDateFiscalPeriod
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/ld/businessobject/LaborLedgerPendingEntry.java", "license": "agpl-3.0", "size": 16220 }
[ "org.kuali.kfs.coa.businessobject.AccountingPeriod" ]
import org.kuali.kfs.coa.businessobject.AccountingPeriod;
import org.kuali.kfs.coa.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,191,043
static public InputStream getAssetFileInputStream(String filePath) throws IOException { AssetManager am = DataSingleton.getInstance().getAssetManager(); return am.open(filePath); }
static InputStream function(String filePath) throws IOException { AssetManager am = DataSingleton.getInstance().getAssetManager(); return am.open(filePath); }
/** * Return asset file input stream. */
Return asset file input stream
getAssetFileInputStream
{ "repo_name": "perpetumobile/bit-android", "path": "src/com/perpetumobile/bit/android/util/FileUtil.java", "license": "mit", "size": 6758 }
[ "android.content.res.AssetManager", "com.perpetumobile.bit.android.DataSingleton", "java.io.IOException", "java.io.InputStream" ]
import android.content.res.AssetManager; import com.perpetumobile.bit.android.DataSingleton; import java.io.IOException; import java.io.InputStream;
import android.content.res.*; import com.perpetumobile.bit.android.*; import java.io.*;
[ "android.content", "com.perpetumobile.bit", "java.io" ]
android.content; com.perpetumobile.bit; java.io;
2,581,970
public UpdateRequest upsert(XContentBuilder source) { safeUpsertRequest().source(source); return this; }
UpdateRequest function(XContentBuilder source) { safeUpsertRequest().source(source); return this; }
/** * Sets the doc source of the update request to be used when the document does not exists. */
Sets the doc source of the update request to be used when the document does not exists
upsert
{ "repo_name": "Asimov4/elasticsearch", "path": "src/main/java/org/elasticsearch/action/update/UpdateRequest.java", "license": "apache-2.0", "size": 22760 }
[ "org.elasticsearch.common.xcontent.XContentBuilder" ]
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
242,212
public FormatParser clone() throws CloneNotSupportedException { final FormatParser p = (FormatParser) super.clone(); if ( datasource != null ) { p.datasource = datasource.clone(); } if ( format != null ) { p.format = (Format) format.clone(); } return p; }
FormatParser function() throws CloneNotSupportedException { final FormatParser p = (FormatParser) super.clone(); if ( datasource != null ) { p.datasource = datasource.clone(); } if ( format != null ) { p.format = (Format) format.clone(); } return p; }
/** * Clones the parser. * * @return a clone. * @throws CloneNotSupportedException * this should never happen. */
Clones the parser
clone
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/filter/FormatParser.java", "license": "lgpl-2.1", "size": 5752 }
[ "java.text.Format" ]
import java.text.Format;
import java.text.*;
[ "java.text" ]
java.text;
2,600,602
private void completeFileInternal(RpcContext rpcContext, LockedInodePath inodePath, CompleteFileOptions options) throws InvalidPathException, FileDoesNotExistException, BlockInfoException, FileAlreadyCompletedException, InvalidFileSizeException, UnavailableException { InodeView inode = inodePath...
void function(RpcContext rpcContext, LockedInodePath inodePath, CompleteFileOptions options) throws InvalidPathException, FileDoesNotExistException, BlockInfoException, FileAlreadyCompletedException, InvalidFileSizeException, UnavailableException { InodeView inode = inodePath.getInode(); if (!inode.isFile()) { throw ne...
/** * Completes a file. After a file is completed, it cannot be written to. * * @param rpcContext the rpc context * @param inodePath the {@link LockedInodePath} to complete * @param options the method options */
Completes a file. After a file is completed, it cannot be written to
completeFileInternal
{ "repo_name": "Reidddddd/alluxio", "path": "core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java", "license": "apache-2.0", "size": 188561 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,332,623
public void testRenameFileForbiddenChars() { RemoteOperationResult result = mActivity.renameFile( OLD_FILE_NAME, mFullPath2OldFile, "\\" + NEW_FILE_NAME, false); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); result = mActivity.renameFile( OLD_FILE_NAME, m...
void function() { RemoteOperationResult result = mActivity.renameFile( OLD_FILE_NAME, mFullPath2OldFile, "\\STR<STR>STR:STR\"STR STR?STR*" + NEW_FILE_NAME, false); assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME); }
/** * Test Rename Folder with forbidden characters: \ < > : " | ? * */
Test Rename Folder with forbidden characters: \ : " | ?
testRenameFileForbiddenChars
{ "repo_name": "cloudcopy/owncloud-android-library", "path": "test_client/tests/src/com/owncloud/android/lib/test_project/test/RenameFileTest.java", "license": "mit", "size": 7855 }
[ "com.owncloud.android.lib.common.operations.RemoteOperationResult" ]
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.operations.*;
[ "com.owncloud.android" ]
com.owncloud.android;
2,644,693
@Timed @GET public List<Book> query(@QueryParam("isbn") String isbn){ final List<Book> books = bookRepository.getBooksByIsbn(isbn); return books; }
List<Book> function(@QueryParam("isbn") String isbn){ final List<Book> books = bookRepository.getBooksByIsbn(isbn); return books; }
/** * Get the item by it's id * @param id * @return book */
Get the item by it's id
query
{ "repo_name": "shagwood/micro-genie", "path": "examples/dropwizard-example/src/main/java/io/microgenie/example/resources/BookResource.java", "license": "apache-2.0", "size": 2367 }
[ "io.microgenie.example.models.Book", "java.util.List", "javax.ws.rs.QueryParam" ]
import io.microgenie.example.models.Book; import java.util.List; import javax.ws.rs.QueryParam;
import io.microgenie.example.models.*; import java.util.*; import javax.ws.rs.*;
[ "io.microgenie.example", "java.util", "javax.ws" ]
io.microgenie.example; java.util; javax.ws;
2,720,780
public static void toggle(HTMLElement element, boolean condition) { if (new Visible().test(element)) { Elements.toggle(element, rbacHidden, condition); } }
static void function(HTMLElement element, boolean condition) { if (new Visible().test(element)) { Elements.toggle(element, rbacHidden, condition); } }
/** * Adds the {@link org.jboss.hal.resources.CSS#rbacHidden} CSS class if {@code condition == true}, removes it otherwise. */
Adds the <code>org.jboss.hal.resources.CSS#rbacHidden</code> CSS class if condition == true, removes it otherwise
toggle
{ "repo_name": "michpetrov/hal.next", "path": "meta/src/main/java/org/jboss/hal/meta/security/ElementGuard.java", "license": "apache-2.0", "size": 3897 }
[ "org.jboss.gwt.elemento.core.Elements" ]
import org.jboss.gwt.elemento.core.Elements;
import org.jboss.gwt.elemento.core.*;
[ "org.jboss.gwt" ]
org.jboss.gwt;
1,906,925
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = false) private void onFire(EntityShootBowEvent event) { if (event.getEntity() instanceof Player) { final ItemStack bow = (event.getBow() != null ? event.getBow().clone() : event.getBow()); this.runCommands((Player)event.getEntity(), null, bow, "ON_...
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = false) void function(EntityShootBowEvent event) { if (event.getEntity() instanceof Player) { final ItemStack bow = (event.getBow() != null ? event.getBow().clone() : event.getBow()); this.runCommands((Player)event.getEntity(), null, bow, STR, "FIRE", String....
/** * Runs the on_fire commands for the custom item upon the player shooting a bow. * * @param event - EntityShootBowEvent. */
Runs the on_fire commands for the custom item upon the player shooting a bow
onFire
{ "repo_name": "RockinChaos/ItemJoin", "path": "src/me/RockinChaos/itemjoin/listeners/Commands.java", "license": "lgpl-3.0", "size": 22325 }
[ "org.bukkit.entity.Player", "org.bukkit.event.EventHandler", "org.bukkit.event.EventPriority", "org.bukkit.event.entity.EntityShootBowEvent", "org.bukkit.inventory.ItemStack" ]
import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityShootBowEvent; import org.bukkit.inventory.ItemStack;
import org.bukkit.entity.*; import org.bukkit.event.*; import org.bukkit.event.entity.*; import org.bukkit.inventory.*;
[ "org.bukkit.entity", "org.bukkit.event", "org.bukkit.inventory" ]
org.bukkit.entity; org.bukkit.event; org.bukkit.inventory;
1,650,007
public Destination getDestination(String destinationName) throws JmsException, NamingException { return getJmsMessagingSource().lookupDestination(destinationName); }
Destination function(String destinationName) throws JmsException, NamingException { return getJmsMessagingSource().lookupDestination(destinationName); }
/** * Utilitiy function to retrieve a Destination from a jndi. * @param destinationName * @return javax.jms.Destination * @throws javax.naming.NamingException */
Utilitiy function to retrieve a Destination from a jndi
getDestination
{ "repo_name": "smhoekstra/iaf", "path": "JavaSource/nl/nn/adapterframework/jms/JMSFacade.java", "license": "apache-2.0", "size": 37152 }
[ "javax.jms.Destination", "javax.naming.NamingException" ]
import javax.jms.Destination; import javax.naming.NamingException;
import javax.jms.*; import javax.naming.*;
[ "javax.jms", "javax.naming" ]
javax.jms; javax.naming;
2,262,060
public CharacterClassesPasswordStrengthPolicy withMinLowerCaseLetters(int minLowerCaseLetters) { Contract.checkArgument(minLowerCaseLetters >= 0, "Minimum number of lower-case letters must not be negative: {0}", minLowerCaseLetters); this.minLowerCaseLetters = minLowerCaseLetters; return this; }
CharacterClassesPasswordStrengthPolicy function(int minLowerCaseLetters) { Contract.checkArgument(minLowerCaseLetters >= 0, STR, minLowerCaseLetters); this.minLowerCaseLetters = minLowerCaseLetters; return this; }
/** * Sets the minimum number of lower-case letters of this policy. * * @throws IllegalArgumentException if {@code minLowerCaseLetters} is negative * * @since 1.0 */
Sets the minimum number of lower-case letters of this policy
withMinLowerCaseLetters
{ "repo_name": "petrzelenka/sellcom-java", "path": "src/main/java/org/sellcom/core/security/password/CharacterClassesPasswordStrengthPolicy.java", "license": "apache-2.0", "size": 5761 }
[ "org.sellcom.core.Contract" ]
import org.sellcom.core.Contract;
import org.sellcom.core.*;
[ "org.sellcom.core" ]
org.sellcom.core;
2,120,643
if (entity != null) { InputStream instream = entity.getContent(); InputStreamReader inputStreamReader = null; if (instream != null) { try { SAXParserFactory sfactory = SAXParserFactory.newInstance(); SAXParser sparser = sfactory...
if (entity != null) { InputStream instream = entity.getContent(); InputStreamReader inputStreamReader = null; if (instream != null) { try { SAXParserFactory sfactory = SAXParserFactory.newInstance(); SAXParser sparser = sfactory.newSAXParser(); XMLReader rssReader = sparser.getXMLReader(); rssReader.setContentHandler(h...
/** * Deconstructs response into given content handler * * @param entity returned HttpEntity * @return deconstructed response * @throws IOException if there is problem assembling SAX response from stream * @see org.apache.http.HttpEntity */
Deconstructs response into given content handler
getResponseData
{ "repo_name": "wapalxj/Android_C3_4_Thread_AsyncTask", "path": "C3_4_Thread_AsyncTask/c4_hm_09_async_http_client/src/main/java/http/SaxAsyncHttpResponseHandler.java", "license": "apache-2.0", "size": 5409 }
[ "android.util.Log", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "javax.xml.parsers.ParserConfigurationException", "javax.xml.parsers.SAXParser", "javax.xml.parsers.SAXParserFactory", "org.xml.sax.InputSource", "org.xml.sax.SAXException", "org.xml.sax.XMLReader" ]
import android.util.Log; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import...
import android.util.*; import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*;
[ "android.util", "java.io", "javax.xml", "org.xml.sax" ]
android.util; java.io; javax.xml; org.xml.sax;
2,125,673
private void assertGlobMatches( List<String> result, List<String> includes, List<String> excludes, boolean excludeDirs) throws Exception { // If the glob doesn't match the expected result, BUILD execution calls fail() which // posts an ERROR to the fail-fast handler, throwing AssertionError. P...
void function( List<String> result, List<String> includes, List<String> excludes, boolean excludeDirs) throws Exception { Package pkg = evaluateGlob( includes, excludes, excludeDirs, Starlark.format( STR + STR, result, result)); assertThat(pkg.containsErrors()).isFalse(); }
/** * Test globbing in the context of a package, using the build language. We use the specially setup * "globs" test package and the files beneath it. * * @param result the expected list of filenames that match the glob * @param includes an include pattern for the glob * @param excludes an exclude pat...
Test globbing in the context of a package, using the build language. We use the specially setup "globs" test package and the files beneath it
assertGlobMatches
{ "repo_name": "bazelbuild/bazel", "path": "src/test/java/com/google/devtools/build/lib/packages/PackageFactoryTest.java", "license": "apache-2.0", "size": 51835 }
[ "com.google.common.truth.Truth", "java.util.List", "net.starlark.java.eval.Starlark" ]
import com.google.common.truth.Truth; import java.util.List; import net.starlark.java.eval.Starlark;
import com.google.common.truth.*; import java.util.*; import net.starlark.java.eval.*;
[ "com.google.common", "java.util", "net.starlark.java" ]
com.google.common; java.util; net.starlark.java;
2,072,574
@Override public String[] getHostedZone(String zoneID) throws ErrorResponse { String[] result = new String[4]; result[0] = zoneID; try { String query = "SELECT * FROM msi.zones WHERE ID = \'" + zoneID + "\';"; Statement stmt = this.sqlConnectio...
String[] function(String zoneID) throws ErrorResponse { String[] result = new String[4]; result[0] = zoneID; try { String query = STR + zoneID + "\';"; Statement stmt = this.sqlConnection.createStatement(); ResultSet rs = stmt.executeQuery(query); if (rs.next()) { result[1] = rs.getString("name"); result[2] = rs.getStr...
/** * Returns ID, name, caller reference, and comment for the target hosted * zone * * @param zoneID * ID of the target hosted zone * @return String[] with ID, name, caller reference, and comment of the * target hosted zone * @throws InternalErrorException ...
Returns ID, name, caller reference, and comment for the target hosted zone
getHostedZone
{ "repo_name": "TranscendComputing/TopStackDNS53", "path": "src/com/msi/dns53/server/AccessMySQL.java", "license": "apache-2.0", "size": 39048 }
[ "com.msi.tough.query.ErrorResponse", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import com.msi.tough.query.ErrorResponse; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import com.msi.tough.query.*; import java.sql.*;
[ "com.msi.tough", "java.sql" ]
com.msi.tough; java.sql;
2,336,563
public Map getPrivateProperties( ) { if ( privateProps == null ) privateProps = new HashMap(); return privateProps; }
Map function( ) { if ( privateProps == null ) privateProps = new HashMap(); return privateProps; }
/** * Gets the private properties for the data source. * @return private properties as a map. Null if no public property * is defined for the data source */
Gets the private properties for the data source
getPrivateProperties
{ "repo_name": "sguan-actuate/birt", "path": "data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/api/querydefn/OdaDataSourceDesign.java", "license": "epl-1.0", "size": 3680 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,943,704
static public int busyStatusFromAttendeeStatus(int selfAttendeeStatus) { int busyStatus; switch (selfAttendeeStatus) { case Attendees.ATTENDEE_STATUS_DECLINED: case Attendees.ATTENDEE_STATUS_NONE: case Attendees.ATTENDEE_STATUS_INVITED: busyStatus ...
static int function(int selfAttendeeStatus) { int busyStatus; switch (selfAttendeeStatus) { case Attendees.ATTENDEE_STATUS_DECLINED: case Attendees.ATTENDEE_STATUS_NONE: case Attendees.ATTENDEE_STATUS_INVITED: busyStatus = BUSY_STATUS_FREE; break; case Attendees.ATTENDEE_STATUS_TENTATIVE: busyStatus = BUSY_STATUS_TENTA...
/** Get a busy status from a selfAttendeeStatus * The default here is BUSY * @param selfAttendeeStatus from CalendarProvider2 * @return the corresponding value of busy status */
Get a busy status from a selfAttendeeStatus The default here is BUSY
busyStatusFromAttendeeStatus
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Exchange/exchange2/src/com/android/exchange/utility/CalendarUtilities.java", "license": "gpl-2.0", "size": 91569 }
[ "android.provider.CalendarContract" ]
import android.provider.CalendarContract;
import android.provider.*;
[ "android.provider" ]
android.provider;
381,605
public void add(AnnotationMirror annotation, ExecutableElement methodElement, OperatorProcessor processor) { Precondition.checkMustNotBeNull(annotation, "annotation"); //$NON-NLS-1$ Precondition.checkMustNotBeNull(methodElement, "methodElement"); //$NON-NLS-1$ Precondition.checkMustNotBeNull...
void function(AnnotationMirror annotation, ExecutableElement methodElement, OperatorProcessor processor) { Precondition.checkMustNotBeNull(annotation, STR); Precondition.checkMustNotBeNull(methodElement, STR); Precondition.checkMustNotBeNull(processor, STR); if (element.equals(methodElement.getEnclosingElement()) == fa...
/** * Registers an operator method into this class. * @param annotation the operator annotation * @param methodElement the operator method * @param processor corresponded operator method */
Registers an operator method into this class
add
{ "repo_name": "cocoatomo/asakusafw", "path": "mapreduce/compiler/core/src/main/java/com/asakusafw/compiler/operator/OperatorClass.java", "license": "apache-2.0", "size": 3586 }
[ "com.asakusafw.compiler.common.Precondition", "javax.lang.model.element.AnnotationMirror", "javax.lang.model.element.ExecutableElement" ]
import com.asakusafw.compiler.common.Precondition; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.ExecutableElement;
import com.asakusafw.compiler.common.*; import javax.lang.model.element.*;
[ "com.asakusafw.compiler", "javax.lang" ]
com.asakusafw.compiler; javax.lang;
891,443
@Test public void searchIndicesGETTest() throws ApiException { Object response = api.searchIndicesGET(); // TODO: test validations }
void function() throws ApiException { Object response = api.searchIndicesGET(); }
/** * Get indices * * This is a 1 to 1 mapping of a ElasticSearch call to _cat/indices for indices. Further information can be found at their &lt;a href&#x3D;&#39;https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html&#39;&gt;API guide&lt;/a&gt;. &lt;br&gt;&lt;br&gt;&lt...
Get indices This is a 1 to 1 mapping of a ElasticSearch call to _cat/indices for indices. Further information can be found at their &lt;a href&#x3D;&#39;HREF guide&lt;/a&gt;. &lt;br&gt;&lt;br&gt;&lt;b&gt;Permissions Needed:&lt;/b&gt; SEARCH_ADMIN
searchIndicesGETTest
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/test/java/com/knetikcloud/api/SearchApiTest.java", "license": "apache-2.0", "size": 15531 }
[ "com.knetikcloud.client.ApiException" ]
import com.knetikcloud.client.ApiException;
import com.knetikcloud.client.*;
[ "com.knetikcloud.client" ]
com.knetikcloud.client;
480,798
Writer writer = null; try { if (encoding == null) { writer = new FileWriter(this); } else { writer = new OutputStreamWriter(new FileOutputStream(this), encoding); } writer.write(body); writer.flush(); } catch (IO...
Writer writer = null; try { if (encoding == null) { writer = new FileWriter(this); } else { writer = new OutputStreamWriter(new FileOutputStream(this), encoding); } writer.write(body); writer.flush(); } catch (IOException ioe) { log.error("", ioe); } finally { JOrphanUtils.closeQuietly(writer); } }
/** * Create the file with the given string as content -- or replace it's * content with the given string if the file already existed. * * @param body * New content for the file. */
Create the file with the given string as content -- or replace it's content with the given string if the file already existed
setText
{ "repo_name": "czxxing/jmeter_self_use", "path": "src/jorphan/org/apache/jorphan/io/TextFile.java", "license": "apache-2.0", "size": 6096 }
[ "java.io.FileOutputStream", "java.io.FileWriter", "java.io.IOException", "java.io.OutputStreamWriter", "java.io.Writer", "org.apache.jorphan.util.JOrphanUtils" ]
import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import org.apache.jorphan.util.JOrphanUtils;
import java.io.*; import org.apache.jorphan.util.*;
[ "java.io", "org.apache.jorphan" ]
java.io; org.apache.jorphan;
1,750,098
public static FastHashMap getMappedPropertyDescriptors(Object bean) { return PropertyUtilsBean.getInstance().getMappedPropertyDescriptors(bean); }
static FastHashMap function(Object bean) { return PropertyUtilsBean.getInstance().getMappedPropertyDescriptors(bean); }
/** * <p>Return the mapped property descriptors for this bean.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @see PropertyUtilsBean#getMappedPropertyDescriptors(Object) * @deprecated This method should not be exposed */
Return the mapped property descriptors for this bean. For more details see <code>PropertyUtilsBean</code>
getMappedPropertyDescriptors
{ "repo_name": "ProfilingLabs/Usemon2", "path": "usemon-agent-commons-java/src/main/java/com/usemon/lib/org/apache/commons/beanutils/PropertyUtils.java", "license": "mpl-2.0", "size": 18359 }
[ "com.usemon.lib.org.apache.commons.collections.FastHashMap" ]
import com.usemon.lib.org.apache.commons.collections.FastHashMap;
import com.usemon.lib.org.apache.commons.collections.*;
[ "com.usemon.lib" ]
com.usemon.lib;
1,397,547
public void testNullsAllowed() { try { // Create the necessary table and create a few objects PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx=pm.currentTransaction(); Object oid=null; try { ...
void function() { try { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx=pm.currentTransaction(); Object oid=null; try { tx.begin(); Person p = new Person(101, null, STR, STR); pm.makePersistent(p); tx.commit(); fail(STR); oid = pm.getObjectId(p); } catch (Exception e) { } finally { if (tx.isActive()...
/** * Test of the allows-null facility in MetaData. * Tests the capability for basic field type only. */
Test of the allows-null facility in MetaData. Tests the capability for basic field type only
testNullsAllowed
{ "repo_name": "datanucleus/tests", "path": "jdo/rdbms/src/test/org/datanucleus/tests/application/SchemaTest.java", "license": "apache-2.0", "size": 89063 }
[ "javax.jdo.PersistenceManager", "javax.jdo.Transaction", "org.datanucleus.samples.models.company.Person" ]
import javax.jdo.PersistenceManager; import javax.jdo.Transaction; import org.datanucleus.samples.models.company.Person;
import javax.jdo.*; import org.datanucleus.samples.models.company.*;
[ "javax.jdo", "org.datanucleus.samples" ]
javax.jdo; org.datanucleus.samples;
2,544,095
static String encodeList(ArrayList<String> sa, char delim) { StringBuilder ns = new StringBuilder(); Iterator<String> si = sa.iterator(); if (si.hasNext()) { ns.append(encodeListItem(si.next(), delim)); while (si.hasNext()) { ns.append(delim); ns.append(encodeListItem(si.next(), delim)); ...
static String encodeList(ArrayList<String> sa, char delim) { StringBuilder ns = new StringBuilder(); Iterator<String> si = sa.iterator(); if (si.hasNext()) { ns.append(encodeListItem(si.next(), delim)); while (si.hasNext()) { ns.append(delim); ns.append(encodeListItem(si.next(), delim)); } } return ns.toString(); }
/** * Encode a list of strings by 'escaping' all instances of: delim, '\', \r, \n. The * escape char is '\'. * * This is used to build text lists separated by 'delim'. * * @param sa String array to convert * @return Converted string */
Encode a list of strings by 'escaping' all instances of: delim, '\', \r, \n. The escape char is '\'. This is used to build text lists separated by 'delim'
encodeList
{ "repo_name": "Grunthos/Book-Catalogue", "path": "src/com/eleybourn/bookcatalogue/utils/Utils.java", "license": "gpl-3.0", "size": 70195 }
[ "java.util.ArrayList", "java.util.Iterator" ]
import java.util.ArrayList; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,883,132
public static <E> ImmutableSortedSet<E> copyOf( Iterator<? extends E> elements) { // Hack around K not being a subtype of Comparable. // Unsafe, see ImmutableSortedSetFauxverideShim. @SuppressWarnings("unchecked") Ordering<E> naturalOrder = (Ordering) Ordering.<Comparable>natural(); return c...
static <E> ImmutableSortedSet<E> function( Iterator<? extends E> elements) { @SuppressWarnings(STR) Ordering<E> naturalOrder = (Ordering) Ordering.<Comparable>natural(); return copyOfInternal(naturalOrder, elements); } /** * Returns an immutable sorted set containing the given elements sorted by * the given {@code Comp...
/** * Returns an immutable sorted set containing the given elements sorted by * their natural ordering. When multiple elements are equivalent according to * {@code compareTo()}, only the first one specified is included. * * <p>This method is not type-safe, as it may be called on elements that are * no...
Returns an immutable sorted set containing the given elements sorted by their natural ordering. When multiple elements are equivalent according to compareTo(), only the first one specified is included. This method is not type-safe, as it may be called on elements that are not mutually comparable
copyOf
{ "repo_name": "tracylihui/google-collections", "path": "src/com/google/common/collect/ImmutableSortedSet.java", "license": "apache-2.0", "size": 25920 }
[ "java.util.Comparator", "java.util.Iterator" ]
import java.util.Comparator; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,083,493
public CountDownLatch getCurrenciesAsync( AsyncCallback<com.mozu.api.contracts.reference.CurrencyCollection> callback) throws Exception { return getCurrenciesAsync( null, callback); }
CountDownLatch function( AsyncCallback<com.mozu.api.contracts.reference.CurrencyCollection> callback) throws Exception { return getCurrenciesAsync( null, callback); }
/** * Retrieves the entire list of currencies that the system supports. * <p><pre><code> * ReferenceData referencedata = new ReferenceData(); * CountDownLatch latch = referencedata.getCurrencies( callback ); * latch.await() * </code></pre></p> * @param callback callback handler for asynchronous oper...
Retrieves the entire list of currencies that the system supports. <code><code> ReferenceData referencedata = new ReferenceData(); CountDownLatch latch = referencedata.getCurrencies( callback ); latch.await() * </code></code>
getCurrenciesAsync
{ "repo_name": "johngatti/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/platform/ReferenceDataResource.java", "license": "mit", "size": 44850 }
[ "com.mozu.api.AsyncCallback", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
2,591,098
DataBuffer readChunk() throws IOException;
DataBuffer readChunk() throws IOException;
/** * Reads a chunk. The caller needs to release the chunk. * * @return the data buffer or null if EOF is reached */
Reads a chunk. The caller needs to release the chunk
readChunk
{ "repo_name": "wwjiang007/alluxio", "path": "core/client/fs/src/main/java/alluxio/client/block/stream/DataReader.java", "license": "apache-2.0", "size": 1373 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
378,411
public FeatureCursor queryFeaturesForChunk(boolean distinct, BoundingBox boundingBox, String orderBy, int limit) { return queryFeaturesForChunk(distinct, boundingBox.buildEnvelope(), orderBy, limit); }
FeatureCursor function(boolean distinct, BoundingBox boundingBox, String orderBy, int limit) { return queryFeaturesForChunk(distinct, boundingBox.buildEnvelope(), orderBy, limit); }
/** * Query for features within the bounding box, starting at the offset and * returning no more than the limit * * @param distinct distinct rows * @param boundingBox bounding box * @param orderBy order by * @param limit chunk limit * @return feature cursor * @s...
Query for features within the bounding box, starting at the offset and returning no more than the limit
queryFeaturesForChunk
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java", "license": "mit", "size": 276322 }
[ "mil.nga.geopackage.BoundingBox", "mil.nga.geopackage.features.user.FeatureCursor" ]
import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureCursor;
import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
347,202
private TagConnection findTagConnection(Relation relation) { for (TagConnection con : conf.getPattern()) { if (con.getRelation().equals(relation)) return con; } return null; }
TagConnection function(Relation relation) { for (TagConnection con : conf.getPattern()) { if (con.getRelation().equals(relation)) return con; } return null; }
/** * Finds the corresponding pattern in the configuration that has the given relation. * @param relation * @return */
Finds the corresponding pattern in the configuration that has the given relation
findTagConnection
{ "repo_name": "FitLayout/patterns", "path": "src/main/java/org/fit/layout/patterns/HintedRelationProbabilitySource.java", "license": "lgpl-3.0", "size": 3526 }
[ "org.fit.layout.patterns.model.TagConnection" ]
import org.fit.layout.patterns.model.TagConnection;
import org.fit.layout.patterns.model.*;
[ "org.fit.layout" ]
org.fit.layout;
384,145
protected Authentication buildFinalAuthentication(final AuthenticationResult authenticationResult) { return authenticationResult.getAuthentication(); }
Authentication function(final AuthenticationResult authenticationResult) { return authenticationResult.getAuthentication(); }
/** * Build final authentication authentication. * * @param authenticationResult the authentication result * @return the authentication */
Build final authentication authentication
buildFinalAuthentication
{ "repo_name": "rrenomeron/cas", "path": "support/cas-server-support-actions/src/main/java/org/apereo/cas/web/flow/login/CreateTicketGrantingTicketAction.java", "license": "apache-2.0", "size": 9062 }
[ "org.apereo.cas.authentication.Authentication", "org.apereo.cas.authentication.AuthenticationResult" ]
import org.apereo.cas.authentication.Authentication; import org.apereo.cas.authentication.AuthenticationResult;
import org.apereo.cas.authentication.*;
[ "org.apereo.cas" ]
org.apereo.cas;
1,574,112
public static final SourceModel.Expr buildFieldNameToStringList(SourceModel.Expr jIterator) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.buildFieldNameToStringList), jIterator}); } public static final QualifiedName buildFieldName...
static final SourceModel.Expr function(SourceModel.Expr jIterator) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.buildFieldNameToStringList), jIterator}); } static final QualifiedName function = QualifiedName.make( CAL_Optimizer_Expression_internal.MODULE_NAME, ...
/** * Helper functions for converting an iterator over FieldName's to a list of CAL field names. * @param jIterator (CAL type: <code>Cal.Internal.Optimizer_Expression.JIterator</code>) * @return (CAL type: <code>[(Cal.Internal.Optimizer_Expression.FieldName, Cal.Core.Prelude.String)]</code>) */
Helper functions for converting an iterator over FieldName's to a list of CAL field names
buildFieldNameToStringList
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/internal/module/Cal/Internal/CAL_Optimizer_Expression_internal.java", "license": "bsd-3-clause", "size": 265925 }
[ "org.openquark.cal.compiler.QualifiedName", "org.openquark.cal.compiler.SourceModel" ]
import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
1,092,232
// Set the line thickness for the crop window border. final float lineThicknessPx = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, DEFAULT_LINE_THICKNESS_DP, context.ge...
final float lineThicknessPx = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, DEFAULT_LINE_THICKNESS_DP, context.getResources().getDisplayMetrics()); final Paint borderPaint = new Paint(); borderPaint.setColor(Color.parseColor(SEMI_TRANSPARENT)); borderPaint.setStrokeWidth(lineThicknessPx); borderPaint.setStyle(...
/** * Creates the Paint object for drawing the crop window border. * * @param context the Context * @return new Paint object */
Creates the Paint object for drawing the crop window border
newBorderPaint
{ "repo_name": "voltazor/cropper", "path": "cropper/src/main/java/com/edmodo/cropper/util/PaintUtil.java", "license": "apache-2.0", "size": 4403 }
[ "android.graphics.Color", "android.graphics.Paint", "android.util.TypedValue" ]
import android.graphics.Color; import android.graphics.Paint; import android.util.TypedValue;
import android.graphics.*; import android.util.*;
[ "android.graphics", "android.util" ]
android.graphics; android.util;
930,843
public void testGetByVersion() throws Exception { String text = "diddo\r\n"; engine.saveText(NAME1, text); WikiPage page = engine.getPage(NAME1, 1); assertEquals("name", NAME1, page.getName()); assertEquals("version", 1, page.getVersion()); }
void function() throws Exception { String text = STR; engine.saveText(NAME1, text); WikiPage page = engine.getPage(NAME1, 1); assertEquals("name", NAME1, page.getName()); assertEquals(STR, 1, page.getVersion()); }
/** * DOCUMENT ME! * * @throws Exception DOCUMENT ME! */
DOCUMENT ME
testGetByVersion
{ "repo_name": "hgschmie/EyeWiki", "path": "src/test/de/softwareforge/eyewiki/providers/RCSFileProviderTest.java", "license": "lgpl-2.1", "size": 7696 }
[ "de.softwareforge.eyewiki.WikiPage" ]
import de.softwareforge.eyewiki.WikiPage;
import de.softwareforge.eyewiki.*;
[ "de.softwareforge.eyewiki" ]
de.softwareforge.eyewiki;
1,252,363
public static void logThreadInfo(Log log, String title, long minInterval) { boolean dumpStack = false; if (log.isInfoEnabled()) { synchronized (ReflectionUtils.class) { long now = Time.now(); if (now - previousLogTime ...
static void function(Log log, String title, long minInterval) { boolean dumpStack = false; if (log.isInfoEnabled()) { synchronized (ReflectionUtils.class) { long now = Time.now(); if (now - previousLogTime >= minInterval * 1000) { previousLogTime = now; dumpStack = true; } } if (dumpStack) { ByteArrayOutputStream buffe...
/** * Log the current thread stacks at INFO level. * @param log the logger that logs the stack trace * @param title a descriptive title for the call stacks * @param minInterval the minimum time from the last */
Log the current thread stacks at INFO level
logThreadInfo
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ReflectionUtils.java", "license": "apache-2.0", "size": 11460 }
[ "java.io.ByteArrayOutputStream", "java.io.PrintWriter", "org.apache.commons.logging.Log" ]
import java.io.ByteArrayOutputStream; import java.io.PrintWriter; import org.apache.commons.logging.Log;
import java.io.*; import org.apache.commons.logging.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,691,854
@Nullable T apply(@Nullable F input);
T apply(@Nullable F input);
/** * Returns the result of applying this function to {@code input}. This method is <i>generally * expected</i>, but not absolutely required, to have the following properties: * <p> * <ul> * <li>Its execution does not cause any observable side effects. * <li>The computation is <i>consisten...
Returns the result of applying this function to input. This method is generally expected, but not absolutely required, to have the following properties: Its execution does not cause any observable side effects. The computation is consistent with equals
apply
{ "repo_name": "Sloy/gallego", "path": "src/main/java/com/sloydev/gallego/Function.java", "license": "apache-2.0", "size": 3188 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
266,664
Locator<Object> locator = null; try { locator = new Locator<Object>(); LogLogisticsProviderSessionEJBRemote logisticsProviderHome = (LogLogisticsProviderSessionEJBRemote) locator .lookup(LogLogisticsProviderSessionEJBRemote.class, "LogLogisticsProviderSessionEJBBean"); LogProviderAgreementSessionEJB...
Locator<Object> locator = null; try { locator = new Locator<Object>(); LogLogisticsProviderSessionEJBRemote logisticsProviderHome = (LogLogisticsProviderSessionEJBRemote) locator .lookup(LogLogisticsProviderSessionEJBRemote.class, STR); LogProviderAgreementSessionEJBRemote providerAgreementHome = (LogProviderAgreementS...
/** * Finds the problem pickup order items by looking at the time they are * created and the current status based on teh pickup time commitment of the * logistics provider and sets their status to PP thus triggering the * publish. * * @return true if the method succeeds else false */
Finds the problem pickup order items by looking at the time they are created and the current status based on teh pickup time commitment of the logistics provider and sets their status to PP thus triggering the publish
findAndTriggerPPStatusOrderItems
{ "repo_name": "yauritux/venice-legacy", "path": "Venice/Venice-Batch/src/main/java/com/gdn/venice/logistics/batch/ProblemPickupBatchJob.java", "license": "apache-2.0", "size": 8916 }
[ "com.djarum.raf.utilities.Locator", "com.gdn.venice.bpmenablement.BPMAdapter", "com.gdn.venice.facade.LogLogisticsProviderSessionEJBRemote", "com.gdn.venice.facade.LogProviderAgreementSessionEJBRemote", "com.gdn.venice.facade.VenOrderItemSessionEJBRemote", "com.gdn.venice.facade.VenOrderItemStatusHistoryS...
import com.djarum.raf.utilities.Locator; import com.gdn.venice.bpmenablement.BPMAdapter; import com.gdn.venice.facade.LogLogisticsProviderSessionEJBRemote; import com.gdn.venice.facade.LogProviderAgreementSessionEJBRemote; import com.gdn.venice.facade.VenOrderItemSessionEJBRemote; import com.gdn.venice.facade.VenOrderI...
import com.djarum.raf.utilities.*; import com.gdn.venice.bpmenablement.*; import com.gdn.venice.facade.*; import com.gdn.venice.facade.util.*; import com.gdn.venice.persistence.*; import com.gdn.venice.util.*; import java.io.*; import java.text.*; import java.util.*;
[ "com.djarum.raf", "com.gdn.venice", "java.io", "java.text", "java.util" ]
com.djarum.raf; com.gdn.venice; java.io; java.text; java.util;
857,594
private void initProductPreview() { initProductPreviewImages(); int maxX = 0; int maxY = 0; for (final ImageIcon ii : productPreviewImages.values()) { if (ii.getIconWidth() > maxX) { maxX = ii.getIconWidth(); } if (ii.getIconHeight(...
void function() { initProductPreviewImages(); int maxX = 0; int maxY = 0; for (final ImageIcon ii : productPreviewImages.values()) { if (ii.getIconWidth() > maxX) { maxX = ii.getIconWidth(); } if (ii.getIconHeight() > maxY) { maxY = ii.getIconHeight(); } } final Dimension previewDim = new Dimension(maxX + 20, maxY + 40...
/** * DOCUMENT ME! */
DOCUMENT ME
initProductPreview
{ "repo_name": "cismet/cids-custom-wuppertal", "path": "src/main/java/de/cismet/cids/custom/objectrenderer/wunda_blau/AlkisPointRenderer.java", "license": "lgpl-3.0", "size": 118383 }
[ "de.cismet.cids.custom.objectrenderer.utils.ObjectRendererUtils", "java.awt.Dimension", "javax.swing.ImageIcon" ]
import de.cismet.cids.custom.objectrenderer.utils.ObjectRendererUtils; import java.awt.Dimension; import javax.swing.ImageIcon;
import de.cismet.cids.custom.objectrenderer.utils.*; import java.awt.*; import javax.swing.*;
[ "de.cismet.cids", "java.awt", "javax.swing" ]
de.cismet.cids; java.awt; javax.swing;
509,262
public void addListener(INotifyChangedListener notifyChangedListener) { changeNotifier.addListener(notifyChangedListener); }
void function(INotifyChangedListener notifyChangedListener) { changeNotifier.addListener(notifyChangedListener); }
/** * This adds a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a listener.
addListener
{ "repo_name": "lunifera/lunifera-dsl", "path": "org.lunifera.dsl.semantic.entity.edit/src/org/lunifera/dsl/semantic/entity/provider/LunEntityItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 23313 }
[ "org.eclipse.emf.edit.provider.INotifyChangedListener" ]
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
539,277
public List getComponents() { return components; }
List function() { return components; }
/** * Returns the components. * @return List */
Returns the components
getComponents
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/test/java/org/hibernate/test/legacy/Container.java", "license": "lgpl-2.1", "size": 6060 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,640,831
@Test public void testTransactionalWriterCommitFail() throws Exception { final TestablePravegaTransactionWriter<Integer> writer = new TestablePravegaTransactionWriter<>( new IntegerSerializationSchema()); final TestablePravegaCommitter<Integer> committer = new TestablePravegaComm...
void function() throws Exception { final TestablePravegaTransactionWriter<Integer> writer = new TestablePravegaTransactionWriter<>( new IntegerSerializationSchema()); final TestablePravegaCommitter<Integer> committer = new TestablePravegaCommitter<>( new IntegerSerializationSchema()); Mockito.doAnswer(ans -> { final Tr...
/** * Tests the error handling. */
Tests the error handling
testTransactionalWriterCommitFail
{ "repo_name": "pravega/flink-connectors", "path": "src/test/java/io/pravega/connectors/flink/sink/PravegaTransactionWriterTest.java", "license": "apache-2.0", "size": 17334 }
[ "io.grpc.Status", "io.pravega.client.stream.Transaction", "io.pravega.client.stream.TxnFailedException", "io.pravega.connectors.flink.utils.IntegerSerializationSchema", "org.apache.flink.streaming.runtime.streamrecord.StreamRecord", "org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness", "o...
import io.grpc.Status; import io.pravega.client.stream.Transaction; import io.pravega.client.stream.TxnFailedException; import io.pravega.connectors.flink.utils.IntegerSerializationSchema; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.apache.flink.streaming.util.OneInputStreamOperatorT...
import io.grpc.*; import io.pravega.client.stream.*; import io.pravega.connectors.flink.utils.*; import org.apache.flink.streaming.runtime.streamrecord.*; import org.apache.flink.streaming.util.*; import org.mockito.*;
[ "io.grpc", "io.pravega.client", "io.pravega.connectors", "org.apache.flink", "org.mockito" ]
io.grpc; io.pravega.client; io.pravega.connectors; org.apache.flink; org.mockito;
1,347,315
public static JobExecutionResult execute(Plan plan) throws Exception { return new LocalExecutor().executePlan(plan); }
static JobExecutionResult function(Plan plan) throws Exception { return new LocalExecutor().executePlan(plan); }
/** * Executes the given dataflow plan. * * @param plan The dataflow plan. * @return The execution result. * * @throws Exception Thrown, if either the startup of the local execution context, or the execution * caused an exception. */
Executes the given dataflow plan
execute
{ "repo_name": "zimmermatt/flink", "path": "flink-clients/src/main/java/org/apache/flink/client/LocalExecutor.java", "license": "apache-2.0", "size": 10233 }
[ "org.apache.flink.api.common.JobExecutionResult", "org.apache.flink.api.common.Plan" ]
import org.apache.flink.api.common.JobExecutionResult; import org.apache.flink.api.common.Plan;
import org.apache.flink.api.common.*;
[ "org.apache.flink" ]
org.apache.flink;
705,596
public static com.netxforge.oss2.config.collectd.Filter unmarshal( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (com.netxforge.oss2.config.collectd.Filter) Unmarshaller.unmarshal(com.netxforge.oss2.config.colle...
static com.netxforge.oss2.config.collectd.Filter function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (com.netxforge.oss2.config.collectd.Filter) Unmarshaller.unmarshal(com.netxforge.oss2.config.collectd.Filter.class, reader); }
/** * Method unmarshal. * * @param reader * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema *...
Method unmarshal
unmarshal
{ "repo_name": "dzonekl/oss2nms", "path": "plugins/com.netxforge.oss2.config.model/src/com/netxforge/oss2/config/collectd/Filter.java", "license": "gpl-3.0", "size": 5462 }
[ "org.exolab.castor.xml.Unmarshaller" ]
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.*;
[ "org.exolab.castor" ]
org.exolab.castor;
2,550,415
public final synchronized Representation exec() throws OperationException { return doExec(this.timeout, this.resourceID, this.mimeTypes, this.caching); }
final synchronized Representation function() throws OperationException { return doExec(this.timeout, this.resourceID, this.mimeTypes, this.caching); }
/** * Executes the operation, returning the requested representation or null, if it does not * exist. Note that returned representations MUST be closed after use. * * @return the requested representation, or null if it does not exist * @throws OperationException * ...
Executes the operation, returning the requested representation or null, if it does not exist. Note that returned representations MUST be closed after use
exec
{ "repo_name": "sara-nl/knowledgestore", "path": "ks-core/src/main/java/eu/fbk/knowledgestore/Operation.java", "license": "apache-2.0", "size": 48321 }
[ "eu.fbk.knowledgestore.data.Representation" ]
import eu.fbk.knowledgestore.data.Representation;
import eu.fbk.knowledgestore.data.*;
[ "eu.fbk.knowledgestore" ]
eu.fbk.knowledgestore;
1,320,606
void doMove(ScoreDirector scoreDirector); // ************************************************************************ // Introspection methods // ************************************************************************
void doMove(ScoreDirector scoreDirector);
/** * Does the Move and updates the {@link Solution} and its {@link ScoreDirector} accordingly. * When the {@link Solution} is modified, the {@link ScoreDirector} should be correctly notified, * otherwise later calculated {@link Score}s can be corrupted. * <p> * This method must end with callin...
Does the Move and updates the <code>Solution</code> and its <code>ScoreDirector</code> accordingly. When the <code>Solution</code> is modified, the <code>ScoreDirector</code> should be correctly notified, otherwise later calculated <code>Score</code>s can be corrupted. This method must end with calling <code>ScoreDirec...
doMove
{ "repo_name": "bernardator/optaplanner", "path": "optaplanner-core/src/main/java/org/optaplanner/core/impl/heuristic/move/Move.java", "license": "apache-2.0", "size": 5390 }
[ "org.optaplanner.core.impl.score.director.ScoreDirector" ]
import org.optaplanner.core.impl.score.director.ScoreDirector;
import org.optaplanner.core.impl.score.director.*;
[ "org.optaplanner.core" ]
org.optaplanner.core;
801,798
public ResultSetFuture executeAsyncDelete ( Object userid, Object devicetoken) throws Exception { return this.getQuery(kDeleteName).executeAsync( userid, devicetoken); }
ResultSetFuture function ( Object userid, Object devicetoken) throws Exception { return this.getQuery(kDeleteName).executeAsync( userid, devicetoken); }
/** * executeAsyncDelete * executes Delete Query asynchronously * @param userid * @param devicetoken * @return ResultSetFuture * @throws Exception */
executeAsyncDelete executes Delete Query asynchronously
executeAsyncDelete
{ "repo_name": "vangav/vos_instagram", "path": "app/com/vangav/vos_instagram/cassandra_keyspaces/ig_auth/AuthCodes.java", "license": "mit", "size": 18072 }
[ "com.datastax.driver.core.ResultSetFuture" ]
import com.datastax.driver.core.ResultSetFuture;
import com.datastax.driver.core.*;
[ "com.datastax.driver" ]
com.datastax.driver;
2,202,652
public static XMLStreamWriter createEventStreamWriter(XMLEventWriter eventWriter, XMLEventFactory eventFactory) { return new XMLEventStreamWriter(eventWriter, eventFactory); }
static XMLStreamWriter function(XMLEventWriter eventWriter, XMLEventFactory eventFactory) { return new XMLEventStreamWriter(eventWriter, eventFactory); }
/** * Return a {@link XMLStreamWriter} that writes to a {@link XMLEventWriter}. * * @param eventWriter eventWriter * @param eventFactory eventFactory * @return a stream writer that writes to an event writer * @since 3.0.5 */
Return a <code>XMLStreamWriter</code> that writes to a <code>XMLEventWriter</code>
createEventStreamWriter
{ "repo_name": "jimmyblylee/ESH", "path": "src/framework/util/src/main/java/com/lee/util/xml/StaxUtils.java", "license": "mit", "size": 11247 }
[ "javax.xml.stream.XMLEventFactory", "javax.xml.stream.XMLEventWriter", "javax.xml.stream.XMLStreamWriter" ]
import javax.xml.stream.XMLEventFactory; import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.*;
[ "javax.xml" ]
javax.xml;
1,677,039
private void setDirection(Direction direction, C context) { if (direction == Direction.OUTBOUND) { context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, true); } else { context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, false); } }
void function(Direction direction, C context) { if (direction == Direction.OUTBOUND) { context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, true); } else { context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, false); } }
/** * Sets the Message Direction. * MessageContext.MESSAGE_OUTBOUND_PROPERTY is changed. */
Sets the Message Direction. MessageContext.MESSAGE_OUTBOUND_PROPERTY is changed
setDirection
{ "repo_name": "samskivert/ikvm-openjdk", "path": "build/linux-amd64/impsrc/com/sun/xml/internal/ws/handler/HandlerProcessor.java", "license": "gpl-2.0", "size": 14217 }
[ "javax.xml.ws.handler.MessageContext" ]
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.*;
[ "javax.xml" ]
javax.xml;
1,523,748
@Test @RequireAssertEnabled public void testMergerRun_whenMergeOperationThrowsException_thenMergerFinishesNormally() { TestMergeOperation operation = new TestMergeOperation(THROWS_EXCEPTION); TestContainerMerger merger = new TestContainerMerger(collector, nodeEngine, operation); mer...
void function() { TestMergeOperation operation = new TestMergeOperation(THROWS_EXCEPTION); TestContainerMerger merger = new TestContainerMerger(collector, nodeEngine, operation); merger.run(); assertTrue(STR, operation.hasBeenInvoked); assertTrue(STR, collector.onDestroyHasBeenCalled); }
/** * Tests that the merger finishes, even if the merge operation throws an exception. */
Tests that the merger finishes, even if the merge operation throws an exception
testMergerRun_whenMergeOperationThrowsException_thenMergerFinishesNormally
{ "repo_name": "mdogan/hazelcast", "path": "hazelcast/src/test/java/com/hazelcast/spi/impl/merge/AbstractContainerMergerTest.java", "license": "apache-2.0", "size": 6150 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,083,024
public static void captureMovieResult(String r) { dropEvents = false; capturePictureResult(r); } private static EventDispatcher captureCallback;
static void function(String r) { dropEvents = false; capturePictureResult(r); } private static EventDispatcher captureCallback;
/** * Callback for the native layer */
Callback for the native layer
captureMovieResult
{ "repo_name": "JrmyDev/CodenameOne", "path": "Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java", "license": "gpl-2.0", "size": 274683 }
[ "com.codename1.ui.util.EventDispatcher" ]
import com.codename1.ui.util.EventDispatcher;
import com.codename1.ui.util.*;
[ "com.codename1.ui" ]
com.codename1.ui;
858,970
public Collection<KeyVal> data();
Collection<KeyVal> function();
/** * Get all of the request's data parameters * * @return collection of keyvals */
Get all of the request's data parameters
data
{ "repo_name": "donsunsoft/donsun-framework", "path": "donsun-jwebsoup/src/main/java/info/donsun/jwebsoup/Connection.java", "license": "apache-2.0", "size": 27428 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,260,011
@Test public void testOptimitsticRepeatableReadUpdatesValue() throws Exception { try (Ignite ignored = Ignition.start(Config.getServerConfiguration()); IgniteClient client = Ignition.startClient(getClientConfiguration()) ) { ClientCache<Integer, String> cache = client.cr...
void function() throws Exception { try (Ignite ignored = Ignition.start(Config.getServerConfiguration()); IgniteClient client = Ignition.startClient(getClientConfiguration()) ) { ClientCache<Integer, String> cache = client.createCache(new ClientCacheConfiguration() .setName("cache") .setAtomicityMode(CacheAtomicityMode...
/** * Test OPTIMISTIC REPEATABLE_READ tx doesn't conflict with a regular cache put. */
Test OPTIMISTIC REPEATABLE_READ tx doesn't conflict with a regular cache put
testOptimitsticRepeatableReadUpdatesValue
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/test/java/org/apache/ignite/client/FunctionalTest.java", "license": "apache-2.0", "size": 54991 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.Ignition", "org.apache.ignite.cache.CacheAtomicityMode", "org.apache.ignite.testframework.GridTestUtils" ]
import org.apache.ignite.Ignite; import org.apache.ignite.Ignition; import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.testframework.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,064,735
public Environment clone(CaliType Cur) { Environment ret = new Environment(this.eng); ret.setEnvironment(this.ci, this.locals, this.st); ret.setCurObj(Cur); return ret; }
Environment function(CaliType Cur) { Environment ret = new Environment(this.eng); ret.setEnvironment(this.ci, this.locals, this.st); ret.setCurObj(Cur); return ret; }
/** * Clones the environment using the provided current object * for the new environment and returns the cloned environment object. * @param Cur is an object with the current object reference. * @return The cloned Environment object. */
Clones the environment using the provided current object for the new environment and returns the cloned environment object
clone
{ "repo_name": "cali-lang/cali.lang.base", "path": "cali.lang.base/src/com/cali/Environment.java", "license": "apache-2.0", "size": 4408 }
[ "com.cali.types.CaliType" ]
import com.cali.types.CaliType;
import com.cali.types.*;
[ "com.cali.types" ]
com.cali.types;
1,629,434
public CppLinkActionBuilder setRuntimeSolibDir(PathFragment runtimeSolibDir) { this.runtimeSolibDir = runtimeSolibDir; return this; }
CppLinkActionBuilder function(PathFragment runtimeSolibDir) { this.runtimeSolibDir = runtimeSolibDir; return this; }
/** * Sets the name of the directory where the solib symlinks for the dynamic runtime libraries live. * This is usually automatically set from the cc_toolchain. */
Sets the name of the directory where the solib symlinks for the dynamic runtime libraries live. This is usually automatically set from the cc_toolchain
setRuntimeSolibDir
{ "repo_name": "mrdomino/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java", "license": "apache-2.0", "size": 63537 }
[ "com.google.devtools.build.lib.vfs.PathFragment" ]
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
2,577,991
public Map<K,V> getMap () { return map; }
Map<K,V> function () { return map; }
/** * Do not call this method unless you know exactly what you are doing. * @return The wrapped map * @aribaapi private */
Do not call this method unless you know exactly what you are doing
getMap
{ "repo_name": "pascalrobert/aribaweb", "path": "src/util/src/main/java/ariba/util/core/WriteResistantMap.java", "license": "apache-2.0", "size": 1316 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
222,326
private String serializeKeywords() throws IOException { MetadataObjectXMLSerializer serializer = new MetadataObjectXMLSerializer(); return serializer.serializeCollection(keywords); }
String function() throws IOException { MetadataObjectXMLSerializer serializer = new MetadataObjectXMLSerializer(); return serializer.serializeCollection(keywords); }
/** * Serializes the keywords associated with the service using the xml representation * * @return the serialized keywords as a string * @throws IOException */
Serializes the keywords associated with the service using the xml representation
serializeKeywords
{ "repo_name": "diogo-andrade/DataHubSystem", "path": "petascope/src/main/java/petascope/wms2/metadata/Service.java", "license": "agpl-3.0", "size": 8719 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
329,228
public static XSingleServiceFactory __getServiceFactory( String implName, XMultiServiceFactory multiFactory, XRegistryKey regKey) { return implName.equals(pipeConnector.class.getName()) ? FactoryHelper.getServiceFactory(pipeConnector.class, ...
static XSingleServiceFactory function( String implName, XMultiServiceFactory multiFactory, XRegistryKey regKey) { return implName.equals(pipeConnector.class.getName()) ? FactoryHelper.getServiceFactory(pipeConnector.class, __serviceName, multiFactory, regKey) : null; }
/** * Returns a factory for creating the service. * * <p>This method is called by the <code>JavaLoader</code>.</p> * * @param implName the name of the implementation for which a service is * requested. * @param multiFactory the service manager to be used (if needed). * @param...
Returns a factory for creating the service. This method is called by the <code>JavaLoader</code>
__getServiceFactory
{ "repo_name": "Limezero/libreoffice", "path": "jurt/com/sun/star/lib/connections/pipe/pipeConnector.java", "license": "gpl-3.0", "size": 4554 }
[ "com.sun.star.comp.loader.FactoryHelper", "com.sun.star.lang.XMultiServiceFactory", "com.sun.star.lang.XSingleServiceFactory", "com.sun.star.registry.XRegistryKey" ]
import com.sun.star.comp.loader.FactoryHelper; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.registry.XRegistryKey;
import com.sun.star.comp.loader.*; import com.sun.star.lang.*; import com.sun.star.registry.*;
[ "com.sun.star" ]
com.sun.star;
1,781,761
private void scaleImagesToCanvasSize() { // The following code calculates the side ratios of the image // to fit perfectly in the canvas ImageData imageData; // Attributes of the original image. float imageWidth, imageHeight, imageRatio; // A factor to calculate the width/height of the scaled image. ...
void function() { ImageData imageData; float imageWidth, imageHeight, imageRatio; float resizeFactor; float canvasWidth = cnvs.getClientArea().width; float canvasHeight = cnvs.getClientArea().height; float canvasRatio = canvasWidth / canvasHeight; for (int i = 0; i < original_imgs.length; i++) { imageData = original_im...
/** * Scales the image to available size of the canvas. */
Scales the image to available size of the canvas
scaleImagesToCanvasSize
{ "repo_name": "jcryptool/core", "path": "org.jcryptool.core.introduction/src/org/jcryptool/core/introduction/views/AlgorithmInstruction.java", "license": "epl-1.0", "size": 23018 }
[ "org.eclipse.swt.graphics.ImageData", "org.jcryptool.core.introduction.utils.ImageScaler" ]
import org.eclipse.swt.graphics.ImageData; import org.jcryptool.core.introduction.utils.ImageScaler;
import org.eclipse.swt.graphics.*; import org.jcryptool.core.introduction.utils.*;
[ "org.eclipse.swt", "org.jcryptool.core" ]
org.eclipse.swt; org.jcryptool.core;
746,635
Object execute(JpaCallback callback);
Object execute(JpaCallback callback);
/** * Executes in a transaction. * * @param callback the callback * @return the result */
Executes in a transaction
execute
{ "repo_name": "everttigchelaar/camel-svn", "path": "components/camel-jpa/src/main/java/org/apache/camel/component/jpa/TransactionStrategy.java", "license": "apache-2.0", "size": 1151 }
[ "org.springframework.orm.jpa.JpaCallback" ]
import org.springframework.orm.jpa.JpaCallback;
import org.springframework.orm.jpa.*;
[ "org.springframework.orm" ]
org.springframework.orm;
886,226
azure .eventHubs() .manager() .serviceClient() .getConsumerGroups() .getWithResponse( "ArunMonocle", "sdk-Namespace-2661", "sdk-EventHub-6681", "sdk-ConsumerGroup-5563", Context.NONE); }
azure .eventHubs() .manager() .serviceClient() .getConsumerGroups() .getWithResponse( STR, STR, STR, STR, Context.NONE); }
/** * Sample code: ConsumerGroupGet. * * @param azure The entry point for accessing resource management APIs in Azure. */
Sample code: ConsumerGroupGet
consumerGroupGet
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/eventhubs/generated/ConsumerGroupsGetSamples.java", "license": "mit", "size": 1020 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
1,889,578
public void testCustomSyncUpWithLocallyCreatedRecords() throws Exception { // Create a few entries locally String[] names = new String[]{createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT)}; createAccou...
void function() throws Exception { String[] names = new String[]{createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT)}; createAccountsLocally(names); TestSyncUpTarget.ActionCollector collector = new TestSyncUpTarget.ActionCollector(); TestSyncUpTarget target = ne...
/** * Create accounts locally, sync up using TestSyncUpTarget, check smartstore */
Create accounts locally, sync up using TestSyncUpTarget, check smartstore
testCustomSyncUpWithLocallyCreatedRecords
{ "repo_name": "huminzhi/SalesforceMobileSDK-Android", "path": "libs/test/SmartSyncTest/src/com/salesforce/androidsdk/smartsync/manager/SyncManagerTest.java", "license": "apache-2.0", "size": 57743 }
[ "com.salesforce.androidsdk.smartsync.util.Constants", "com.salesforce.androidsdk.smartsync.util.SyncState", "java.util.List", "java.util.Map" ]
import com.salesforce.androidsdk.smartsync.util.Constants; import com.salesforce.androidsdk.smartsync.util.SyncState; import java.util.List; import java.util.Map;
import com.salesforce.androidsdk.smartsync.util.*; import java.util.*;
[ "com.salesforce.androidsdk", "java.util" ]
com.salesforce.androidsdk; java.util;
2,502,183
public void endCDATA() throws org.xml.sax.SAXException { if (m_cdataTagOpen) closeCDATA(); m_cdataStartCalled = false; }
void function() throws org.xml.sax.SAXException { if (m_cdataTagOpen) closeCDATA(); m_cdataStartCalled = false; }
/** * Report the end of a CDATA section. * @throws org.xml.sax.SAXException The application may raise an exception. * * @see #startCDATA */
Report the end of a CDATA section
endCDATA
{ "repo_name": "karianna/jdk8_tl", "path": "jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java", "license": "gpl-2.0", "size": 110211 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,719,836
protected void writeScalarBytes (int codePoint, byte[] buf, int start, int length) { if (SanityManager.DEBUG) { if (buf == null && length > start) SanityManager.THROWASSERT("Buf is null"); if (length - start > buf.length) SanityManager.THROWASSERT("Not enough bytes in buffer"); } int numByt...
void function (int codePoint, byte[] buf, int start, int length) { if (SanityManager.DEBUG) { if (buf == null && length > start) SanityManager.THROWASSERT(STR); if (length - start > buf.length) SanityManager.THROWASSERT(STR); } int numBytes = length - start; ensureLength (numBytes + 4); buffer.putShort((short) (numByte...
/** * Write scalar byte array object includes length, codepoint and value * * @param codePoint - code point to write * @param buf - byte array to be written * @param start - starting point * @param length - length to write */
Write scalar byte array object includes length, codepoint and value
writeScalarBytes
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/drda/java/com/pivotal/gemfirexd/internal/impl/drda/DDMWriter.java", "license": "apache-2.0", "size": 58867 }
[ "com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager" ]
import com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager;
import com.pivotal.gemfirexd.internal.iapi.services.sanity.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
2,484,230
default Resources.Single inspect(Resource resource) throws EntityNotFoundException { Environments.Single env = tenants().get(resource.getTenantId()).environments().get(resource.getEnvironmentId()); if (resource.getFeedId() == null) { return env.feedlessResources().get(resource.getId());...
default Resources.Single inspect(Resource resource) throws EntityNotFoundException { Environments.Single env = tenants().get(resource.getTenantId()).environments().get(resource.getEnvironmentId()); if (resource.getFeedId() == null) { return env.feedlessResources().get(resource.getId()); } else { return env.feeds().get(...
/** * Provides an access interface for inspecting given resource. * * @param resource the resource to steer to. * @return the access interface to the resource */
Provides an access interface for inspecting given resource
inspect
{ "repo_name": "pilhuhn/hawkular-inventory", "path": "api/src/main/java/org/hawkular/inventory/api/Inventory.java", "license": "apache-2.0", "size": 11779 }
[ "org.hawkular.inventory.api.model.Resource" ]
import org.hawkular.inventory.api.model.Resource;
import org.hawkular.inventory.api.model.*;
[ "org.hawkular.inventory" ]
org.hawkular.inventory;
807,922
@ServiceMethod(returns = ReturnType.SINGLE) public RegistryUsageListResultInner listUsages(String resourceGroupName, String registryName) { return listUsagesAsync(resourceGroupName, registryName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) RegistryUsageListResultInner function(String resourceGroupName, String registryName) { return listUsagesAsync(resourceGroupName, registryName).block(); }
/** * Gets the quota usages for the specified container registry. * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @throws IllegalArgumentException thrown if parameters fail the valid...
Gets the quota usages for the specified container registry
listUsages
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java", "license": "mit", "size": 175049 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.containerregistry.fluent.models.RegistryUsageListResultInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.containerregistry.fluent.models.RegistryUsageListResultInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.containerregistry.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,624,503
public void addCompletionListener(ICompletionListener listener) { if (fContentAssistant == null) throw new IllegalStateException(); ((IContentAssistantExtension2)fContentAssistant).addCompletionListener(listener); }
void function(ICompletionListener listener) { if (fContentAssistant == null) throw new IllegalStateException(); ((IContentAssistantExtension2)fContentAssistant).addCompletionListener(listener); }
/** * Adds a completion listener that will be informed before proposals are * computed. * * @param listener the listener * @throws IllegalStateException if called when the content assistant is * uninstalled */
Adds a completion listener that will be informed before proposals are computed
addCompletionListener
{ "repo_name": "neelance/jface4ruby", "path": "jface4ruby/src/org/eclipse/jface/text/source/ContentAssistantFacade.java", "license": "epl-1.0", "size": 3156 }
[ "org.eclipse.jface.text.contentassist.ICompletionListener", "org.eclipse.jface.text.contentassist.IContentAssistantExtension2" ]
import org.eclipse.jface.text.contentassist.ICompletionListener; import org.eclipse.jface.text.contentassist.IContentAssistantExtension2;
import org.eclipse.jface.text.contentassist.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,191,350
public void setMetadata(final Map metadata) { this.metadata = metadata; }
void function(final Map metadata) { this.metadata = metadata; }
/** * Sets the metadata. * * @param metadata the new metadata */
Sets the metadata
setMetadata
{ "repo_name": "supunucsc/java-sdk", "path": "conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/Workspace.java", "license": "apache-2.0", "size": 3561 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
197,868
@Query(value = "select distinct e.owner from #{#entityName} e " + " where" + " (e.formAttribute.id = :formAttributeId)" + " and" + " (e.longValue = :persistentValue)") Page<O> findOwnersByLongValue(@Param("formAttributeId") UUID attributeId, @Param("persistentValue") Long persistentValue, Pageable page...
@Query(value = STR + STR + STR + STR + STR) Page<O> findOwnersByLongValue(@Param(STR) UUID attributeId, @Param(STR) Long persistentValue, Pageable pageable);
/** * Finds owners by given attribute and value * * @param attribute * @param persistentValue * @return */
Finds owners by given attribute and value
findOwnersByLongValue
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/eav/repository/AbstractFormValueRepository.java", "license": "mit", "size": 4816 }
[ "org.springframework.data.domain.Page", "org.springframework.data.domain.Pageable", "org.springframework.data.jpa.repository.Query", "org.springframework.data.repository.query.Param" ]
import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param;
import org.springframework.data.domain.*; import org.springframework.data.jpa.repository.*; import org.springframework.data.repository.query.*;
[ "org.springframework.data" ]
org.springframework.data;
1,472,108
protected ArrayList getNodeListForParent(ArrayList potentialChildren, Node parentNode) { ArrayList children = new ArrayList(); int n = potentialChildren.size(); for (int i = 0; i < n; i++) { Node node = (Node) potentialChildren.get(i);...
ArrayList function(ArrayList potentialChildren, Node parentNode) { ArrayList children = new ArrayList(); int n = potentialChildren.size(); for (int i = 0; i < n; i++) { Node node = (Node) potentialChildren.get(i); if (DOMUtilities.canAppend(node, parentNode)) { children.add(node); } } return children; }
/** * Finds and returns a group of nodes that can be appended to the given * parent node. * * @param potentialChildren * The given potential children * @param parentNode * The given parent node * @return list of nodes that can be appended to the given parent...
Finds and returns a group of nodes that can be appended to the given parent node
getNodeListForParent
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/apps/svgbrowser/DOMDocumentTree.java", "license": "apache-2.0", "size": 33941 }
[ "java.util.ArrayList", "org.apache.batik.dom.util.DOMUtilities", "org.w3c.dom.Node" ]
import java.util.ArrayList; import org.apache.batik.dom.util.DOMUtilities; import org.w3c.dom.Node;
import java.util.*; import org.apache.batik.dom.util.*; import org.w3c.dom.*;
[ "java.util", "org.apache.batik", "org.w3c.dom" ]
java.util; org.apache.batik; org.w3c.dom;
1,418,918
private static Set<String> getSysFsPath(String file) throws IOException { Set<String> retval = new HashSet<String>(); File netlink = new File(file); if (!netlink.canRead()) { return retval; } Scanner scanner = null; try { scanner = new Scanner(...
static Set<String> function(String file) throws IOException { Set<String> retval = new HashSet<String>(); File netlink = new File(file); if (!netlink.canRead()) { return retval; } Scanner scanner = null; try { scanner = new Scanner(netlink); while(scanner.hasNextLine()) { String line = scanner.nextLine().trim(); if (!l...
/** * Parse the fstab.vold file, and extract out the "sysfs_path" field. */
Parse the fstab.vold file, and extract out the "sysfs_path" field
getSysFsPath
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/cts/tests/tests/security/src/android/security/cts/VoldExploitTest.java", "license": "apache-2.0", "size": 10044 }
[ "java.io.File", "java.io.IOException", "java.util.Arrays", "java.util.HashSet", "java.util.Scanner", "java.util.Set" ]
import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.HashSet; import java.util.Scanner; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,679,863
private Node rewriteCallExpression(Node call, DecompositionState state) { Preconditions.checkArgument(call.isCall()); Node first = call.getFirstChild(); Preconditions.checkArgument(NodeUtil.isGet(first)); // Extracts the expression representing the function to call. For example: // "a['b'].c" f...
Node function(Node call, DecompositionState state) { Preconditions.checkArgument(call.isCall()); Node first = call.getFirstChild(); Preconditions.checkArgument(NodeUtil.isGet(first)); Node getVarNode = extractExpression( first, state.extractBeforeStatement); state.extractBeforeStatement = getVarNode; Node getExprNode =...
/** * Rewrite the call so "this" is preserved. * a.b(c); * becomes: * var temp1 = a; * var temp0 = temp1.b; * temp0.call(temp1,c); * * @return The replacement node. */
Rewrite the call so "this" is preserved. a.b(c); becomes: var temp1 = a; var temp0 = temp1.b; temp0.call(temp1,c)
rewriteCallExpression
{ "repo_name": "Pimm/closure-compiler", "path": "src/com/google/javascript/jscomp/ExpressionDecomposer.java", "license": "apache-2.0", "size": 31942 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
1,660,528
protected Node unaryNumericPromotion(Node node) { // For unary numeric promotion, see JLS 5.6.1 node = unbox(node); switch (node.getType().getKind()) { case BYTE: case CHAR: case SHORT: { ...
Node function(Node node) { node = unbox(node); switch (node.getType().getKind()) { case BYTE: case CHAR: case SHORT: { TypeMirror intType = types.getPrimitiveType(TypeKind.INT); Node widened = new WideningConversionNode(node.getTree(), node, intType); addToConvertedLookupMap(widened); insertNodeAfter(widened, node); re...
/** * Perform unary numeric promotion on the input node. * * @param node a node producing a value of numeric primitive or boxed type * @return a Node with the value promoted to the int, long float or double, which may be the * input node */
Perform unary numeric promotion on the input node
unaryNumericPromotion
{ "repo_name": "CharlesZ-Chen/checker-framework", "path": "dataflow/src/org/checkerframework/dataflow/cfg/CFGBuilder.java", "license": "gpl-2.0", "size": 203798 }
[ "javax.lang.model.type.TypeKind", "javax.lang.model.type.TypeMirror", "org.checkerframework.dataflow.cfg.node.Node", "org.checkerframework.dataflow.cfg.node.WideningConversionNode" ]
import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; import org.checkerframework.dataflow.cfg.node.Node; import org.checkerframework.dataflow.cfg.node.WideningConversionNode;
import javax.lang.model.type.*; import org.checkerframework.dataflow.cfg.node.*;
[ "javax.lang", "org.checkerframework.dataflow" ]
javax.lang; org.checkerframework.dataflow;
863,887
EventRegistration[] getRegistrationsAsArray(@Nonnull String serviceName, @Nonnull String topic);
EventRegistration[] getRegistrationsAsArray(@Nonnull String serviceName, @Nonnull String topic);
/** * Returns all registrations belonging to the given service and topic as an array. * * @param serviceName service name * @param topic topic name * @return registrations array */
Returns all registrations belonging to the given service and topic as an array
getRegistrationsAsArray
{ "repo_name": "emre-aydin/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/EventService.java", "license": "apache-2.0", "size": 11793 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
922,998
public void imprt(BasicLibrary other, String luid, Progress pg) throws IOException { Progress pgGetStory = new Progress(); Progress pgSave = new Progress(); if (pg == null) { pg = new Progress(); } pg.setMinMax(0, 2); pg.addProgress(pgGetStory, 1); pg.addProgress(pgSave, 1); Story story = oth...
void function(BasicLibrary other, String luid, Progress pg) throws IOException { Progress pgGetStory = new Progress(); Progress pgSave = new Progress(); if (pg == null) { pg = new Progress(); } pg.setMinMax(0, 2); pg.addProgress(pgGetStory, 1); pg.addProgress(pgSave, 1); Story story = other.getStory(luid, pgGetStory); ...
/** * Import the story from one library to another, and keep the same LUID. * * @param other * the other library to import from * @param luid * the Library UID * @param pg * the optional progress reporter * * @throws IOException * in case of I/O error...
Import the story from one library to another, and keep the same LUID
imprt
{ "repo_name": "nikiroo/fanfix", "path": "src/be/nikiroo/fanfix/library/BasicLibrary.java", "license": "gpl-3.0", "size": 25523 }
[ "be.nikiroo.fanfix.data.Story", "be.nikiroo.utils.Progress", "java.io.IOException" ]
import be.nikiroo.fanfix.data.Story; import be.nikiroo.utils.Progress; import java.io.IOException;
import be.nikiroo.fanfix.data.*; import be.nikiroo.utils.*; import java.io.*;
[ "be.nikiroo.fanfix", "be.nikiroo.utils", "java.io" ]
be.nikiroo.fanfix; be.nikiroo.utils; java.io;
2,270,504
public static void createIndexFileFromScratch(String alignmentFilename, File indexFile) throws IOException { String indexFilePath = indexFile.getAbsolutePath(); if (isBamFile(alignmentFilename)) { // Only bother with local indexes logger.debug("Creating BAM index file from scratch: " + ind...
static void function(String alignmentFilename, File indexFile) throws IOException { String indexFilePath = indexFile.getAbsolutePath(); if (isBamFile(alignmentFilename)) { logger.debug(STR + indexFilePath); final SamReaderFactory factory = SamReaderFactory.makeDefault(); factory.disable(Option.EAGERLY_DECODE); factory....
/** * Create a local index file for the given alignment file. * NOTE: Index file sizes will vary across tools dependent on compression level * used, amongst other things. * @param alignmentFilename String * @param indexFile File to create * @throws IOException */
Create a local index file for the given alignment file. used, amongst other things
createIndexFileFromScratch
{ "repo_name": "sanger-pathogens/Artemis", "path": "src/main/java/uk/ac/sanger/artemis/components/alignment/BamUtils.java", "license": "gpl-3.0", "size": 25083 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "uk.ac.sanger.artemis.util.FTPSeekableStream" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import uk.ac.sanger.artemis.util.FTPSeekableStream;
import java.io.*; import uk.ac.sanger.artemis.util.*;
[ "java.io", "uk.ac.sanger" ]
java.io; uk.ac.sanger;
2,194,016
void nominate(String deploymentId, Long taskId, String userId, List<OrganizationalEntity> potentialOwners); // user task attributes operations
void nominate(String deploymentId, Long taskId, String userId, List<OrganizationalEntity> potentialOwners);
/** * Nominate a task to be handled by potentialOwners * * @param deploymentId * @param taskId * @param userId * @param potentialOwners * @throws TaskNotFoundException in case task with given id was not found or is not associated with given deployment id */
Nominate a task to be handled by potentialOwners
nominate
{ "repo_name": "jomarko/jbpm", "path": "jbpm-services/jbpm-services-api/src/main/java/org/jbpm/services/api/UserTaskService.java", "license": "apache-2.0", "size": 25878 }
[ "java.util.List", "org.kie.api.task.model.OrganizationalEntity" ]
import java.util.List; import org.kie.api.task.model.OrganizationalEntity;
import java.util.*; import org.kie.api.task.model.*;
[ "java.util", "org.kie.api" ]
java.util; org.kie.api;
2,307,204
public CoapObserveRelation observe(CoapHandler handler) { Request request = Request.newGet().setURI(uri).setObserve(); return observe(request, handler); }
CoapObserveRelation function(CoapHandler handler) { Request request = Request.newGet().setURI(uri).setObserve(); return observe(request, handler); }
/** * Sends an observe request and invokes the specified handler each time * a notification arrives. * * @param handler the Response handler * @return the CoAP observe relation */
Sends an observe request and invokes the specified handler each time a notification arrives
observe
{ "repo_name": "iotoasis/SI", "path": "si-onem2m-src/IITP_IoT_2_7/src/extlib/java/org/eclipse/californium/core/CoapClient.java", "license": "bsd-2-clause", "size": 33098 }
[ "org.eclipse.californium.core.coap.Request" ]
import org.eclipse.californium.core.coap.Request;
import org.eclipse.californium.core.coap.*;
[ "org.eclipse.californium" ]
org.eclipse.californium;
694,676
private void createNewGroup() { groupEditor.clearSelection(); newGroupName.setText(""); selectedGroupFriendlyName = null; populateGroupMembershipList(); populatePrincipalsList(); membersToAdd = new ArrayList<Link>(); membersToRemove = new ArrayList<Link>(); createNewGroupView(); }
void function() { groupEditor.clearSelection(); newGroupName.setText(""); selectedGroupFriendlyName = null; populateGroupMembershipList(); populatePrincipalsList(); membersToAdd = new ArrayList<Link>(); membersToRemove = new ArrayList<Link>(); createNewGroupView(); }
/** * Create a new group */
Create a new group
createNewGroup
{ "repo_name": "MobileCloudNetworking/icnaas", "path": "mcn-ccn-router/ccnx-0.8.2/javasrc/src/main/org/ccnx/ccn/utils/explorer/GroupManagerGUI.java", "license": "apache-2.0", "size": 17914 }
[ "java.util.ArrayList", "org.ccnx.ccn.io.content.Link" ]
import java.util.ArrayList; import org.ccnx.ccn.io.content.Link;
import java.util.*; import org.ccnx.ccn.io.content.*;
[ "java.util", "org.ccnx.ccn" ]
java.util; org.ccnx.ccn;
2,683,241