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 CharSequence getMessageText(Context context);
CharSequence function(Context context);
/** * Returns the message indicating what the InfoBar is informing or asking the user about. * @param context Context to pull the string from. * @return The string to display. */
Returns the message indicating what the InfoBar is informing or asking the user about
getMessageText
{ "repo_name": "mogoweb/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarView.java", "license": "bsd-3-clause", "size": 2239 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,255,257
public static boolean isNodeName(Node n, String name) { return n.getNodeName().compareTo(name) == 0; }
static boolean function(Node n, String name) { return n.getNodeName().compareTo(name) == 0; }
/** * Checks if the name of a node matches with a given string * * @param n node whose name has to be checked * @param name supposed name for the node * @return {@literal true} if the name of the node matches the name passed * as a parameter */
Checks if the name of a node matches with a given string
isNodeName
{ "repo_name": "flordan/final", "path": "code/programmingModel/parallelizer/src/main/java/es/bsc/mobile/parallelizer/utils/XMLUtils.java", "license": "apache-2.0", "size": 3512 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,749,246
public static void main(String[] args) { // ****************************************************************** // More than 150 demo applications are included with the JFreeChart // Developer Guide...for more information, see: // // > http://www.object-refinery.com/jfreechart/guide.html // // ********...
static void function(String[] args) { PieChartDemo1 demo = new PieChartDemo1(STR); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */
Starting point for the demonstration application
main
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-chart/jfreechat.src/org/jfree/chart/demo/PieChartDemo1.java", "license": "lgpl-3.0", "size": 7049 }
[ "org.jfree.ui.RefineryUtilities" ]
import org.jfree.ui.RefineryUtilities;
import org.jfree.ui.*;
[ "org.jfree.ui" ]
org.jfree.ui;
1,392,834
private Field[] internalGetFields() { LinkedHashSet<Field> set = new LinkedHashSet<Field>(); set.addAll(Arrays.asList(getDeclaredFields(true))); Class[] interfaces = getInterfaces(); for (int i = 0; i < interfaces.length; i++) set.addAll(Arrays.asList(interfaces[i].internalGetFields())); Class superClas...
Field[] function() { LinkedHashSet<Field> set = new LinkedHashSet<Field>(); set.addAll(Arrays.asList(getDeclaredFields(true))); Class[] interfaces = getInterfaces(); for (int i = 0; i < interfaces.length; i++) set.addAll(Arrays.asList(interfaces[i].internalGetFields())); Class superClass = getSuperclass(); if (superCla...
/** * Like <code>getFields()</code> but without the security checks. */
Like <code>getFields()</code> but without the security checks
internalGetFields
{ "repo_name": "webos21/xi", "path": "java/jcl/src/java/java/lang/Class.java", "license": "apache-2.0", "size": 59769 }
[ "java.lang.reflect.Field", "java.util.Arrays", "java.util.LinkedHashSet" ]
import java.lang.reflect.Field; import java.util.Arrays; import java.util.LinkedHashSet;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
675,801
public static <N, E extends N, T extends N> E insertLine(final MutableDocument<N, E, T> doc, Rounding rounding, Point<N> location, Attributes attributes) { Preconditions.checkNotNull(rounding, "rounding must not be null"); location = roundLocation(doc, rounding, location, RoundDirection.RIGHT); Pr...
static <N, E extends N, T extends N> E function(final MutableDocument<N, E, T> doc, Rounding rounding, Point<N> location, Attributes attributes) { Preconditions.checkNotNull(rounding, STR); location = roundLocation(doc, rounding, location, RoundDirection.RIGHT); Preconditions.checkArgument(location != null, STR); check...
/** * Inserts a line at the given location * * @param doc * @param rounding rightwards rounding to apply to the given location * @param location * @param attributes * @return the new line element * * Temporarily supports paragraphs as well */
Inserts a line at the given location
insertLine
{ "repo_name": "gburd/wave", "path": "src/org/waveprotocol/wave/model/document/util/LineContainers.java", "license": "apache-2.0", "size": 23149 }
[ "org.waveprotocol.wave.model.document.MutableDocument", "org.waveprotocol.wave.model.document.operation.Attributes", "org.waveprotocol.wave.model.util.Preconditions" ]
import org.waveprotocol.wave.model.document.MutableDocument; import org.waveprotocol.wave.model.document.operation.Attributes; import org.waveprotocol.wave.model.util.Preconditions;
import org.waveprotocol.wave.model.document.*; import org.waveprotocol.wave.model.document.operation.*; import org.waveprotocol.wave.model.util.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
2,586
@FIXVersion(introduced="4.2", retired="4.3") @TagNumRef(tagNum=TagNum.UnderlyingSecurityType) public String getUnderlyingSecurityType() { return underlyingSecurityType; }
@FIXVersion(introduced="4.2", retired="4.3") @TagNumRef(tagNum=TagNum.UnderlyingSecurityType) String function() { return underlyingSecurityType; }
/** * Message field getter. * @return field value */
Message field getter
getUnderlyingSecurityType
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/group/UndlySecurityGroup.java", "license": "gpl-3.0", "size": 31369 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,066,207
public void extractRegional(final int regionId) { final Game scenario = GameManager.getInstance().getByID(-1); final Region region = RegionManager.getInstance().getByID(regionId); final List<Sector> sectorList = SectorManager.getInstance().listByGameRegion(scenario, region); final St...
void function(final int regionId) { final Game scenario = GameManager.getInstance().getByID(-1); final Region region = RegionManager.getInstance().getByID(regionId); final List<Sector> sectorList = SectorManager.getInstance().listByGameRegion(scenario, region); final StringBuffer sbuf = new StringBuffer(); int position...
/** * Convert the sector data into the static table used by the sector initializer. * * @param regionId the region to extract. */
Convert the sector data into the static table used by the sector initializer
extractRegional
{ "repo_name": "EaW1805/engine", "path": "src/test/java/com/eaw1805/core/initializers/test/SectorTester.java", "license": "mit", "size": 6274 }
[ "com.eaw1805.data.managers.GameManager", "com.eaw1805.data.managers.map.RegionManager", "com.eaw1805.data.managers.map.SectorManager", "com.eaw1805.data.model.Game", "com.eaw1805.data.model.map.Region", "com.eaw1805.data.model.map.Sector", "java.util.List" ]
import com.eaw1805.data.managers.GameManager; import com.eaw1805.data.managers.map.RegionManager; import com.eaw1805.data.managers.map.SectorManager; import com.eaw1805.data.model.Game; import com.eaw1805.data.model.map.Region; import com.eaw1805.data.model.map.Sector; import java.util.List;
import com.eaw1805.data.managers.*; import com.eaw1805.data.managers.map.*; import com.eaw1805.data.model.*; import com.eaw1805.data.model.map.*; import java.util.*;
[ "com.eaw1805.data", "java.util" ]
com.eaw1805.data; java.util;
1,967,797
protected void updatedCurrentConfig(InterviewParameters ip) { }
void function(InterviewParameters ip) { }
/** * Invoked when the value of the current configuration has been modified. * This implementation does nothing. Subclasses might implement * some reaction on configuration change. * * @param ip - InterviewParameters object with new values */
Invoked when the value of the current configuration has been modified. This implementation does nothing. Subclasses might implement some reaction on configuration change
updatedCurrentConfig
{ "repo_name": "otmarjr/jtreg-fork", "path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/exec/ContextManager.java", "license": "gpl-2.0", "size": 27023 }
[ "com.sun.javatest.InterviewParameters" ]
import com.sun.javatest.InterviewParameters;
import com.sun.javatest.*;
[ "com.sun.javatest" ]
com.sun.javatest;
2,233,283
public void setType(String typeString) throws NavigatorRuntimeException { if (typeString.equals(TYPE_NAME_INTERNAL)) type = TYPE_INTERNAL; else if (typeString.equals(TYPE_NAME_EXTERNAL)) type = TYPE_EXTERNAL; else if (typeString.equals(TYPE_NAME_ALL)) type = TYPE_ALL; else thro...
void function(String typeString) throws NavigatorRuntimeException { if (typeString.equals(TYPE_NAME_INTERNAL)) type = TYPE_INTERNAL; else if (typeString.equals(TYPE_NAME_EXTERNAL)) type = TYPE_EXTERNAL; else if (typeString.equals(TYPE_NAME_ALL)) type = TYPE_ALL; else throw new NavigatorRuntimeException(STR + typeString...
/** * Sets type of wanted occurrences: The following values are * allowed: * <ul> * <li><code>internal</code>, * <li><code>external</code>, * <li><code>all</code> (default). * </ul> */
Sets type of wanted occurrences: The following values are allowed: <code>internal</code>, <code>external</code>, <code>all</code> (default).
setType
{ "repo_name": "ontopia/ontopia", "path": "ontopia-navigator/src/main/java/net/ontopia/topicmaps/nav2/taglibs/TMvalue/OccurrencesTag.java", "license": "apache-2.0", "size": 5364 }
[ "net.ontopia.topicmaps.nav2.core.NavigatorRuntimeException" ]
import net.ontopia.topicmaps.nav2.core.NavigatorRuntimeException;
import net.ontopia.topicmaps.nav2.core.*;
[ "net.ontopia.topicmaps" ]
net.ontopia.topicmaps;
70,412
@Test(expected = NoSuchElementException.class) public void whenWeIterateNotExistingValuesThenReturnException() { SimpleArrayList list = new SimpleArrayList(); list.add("1"); list.add("2"); list.add("3"); Iterator iterator = list.iterator(); Assert.assertThat(iter...
@Test(expected = NoSuchElementException.class) void function() { SimpleArrayList list = new SimpleArrayList(); list.add("1"); list.add("2"); list.add("3"); Iterator iterator = list.iterator(); Assert.assertThat(iterator.next(), is("1")); Assert.assertThat(iterator.next(), is("2")); Assert.assertThat(iterator.next(), is...
/** * Test of iterator exception. */
Test of iterator exception
whenWeIterateNotExistingValuesThenReturnException
{ "repo_name": "Kilanov/java-a-to-z", "path": "chapter_005/src/test/java/ru/skilanov/io/list/SimpleArrayListTest.java", "license": "apache-2.0", "size": 2351 }
[ "java.util.Iterator", "java.util.NoSuchElementException", "org.hamcrest.Matchers", "org.junit.Assert", "org.junit.Test" ]
import java.util.Iterator; import java.util.NoSuchElementException; import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test;
import java.util.*; import org.hamcrest.*; import org.junit.*;
[ "java.util", "org.hamcrest", "org.junit" ]
java.util; org.hamcrest; org.junit;
903,700
protected final void addAttributeComparisonChecker() { // The last check, when requested, consists in verifying the element // content is not identical to another attribute. if (textElementBuilderToCompareWith != null) { addChecker(new TextNotIdenticalToAttributeChecker( ...
final void function() { if (textElementBuilderToCompareWith != null) { addChecker(new TextNotIdenticalToAttributeChecker( getTextElementBuilder(), textElementBuilderToCompareWith, new ImmutablePair<>(getFailureSolution(),notPertinentMessageCode), new ImmutablePair<>(TestSolution.PASSED,""), getEeAttributeNames())); } }
/** * Add a {@link TextNotIdenticalToAttributeChecker} to the checker collection */
Add a <code>TextNotIdenticalToAttributeChecker</code> to the checker collection
addAttributeComparisonChecker
{ "repo_name": "Asqatasun/Asqatasun", "path": "rules/rules-commons/src/main/java/org/asqatasun/rules/elementchecker/pertinence/TextPertinenceChecker.java", "license": "agpl-3.0", "size": 9861 }
[ "org.apache.commons.lang3.tuple.ImmutablePair", "org.asqatasun.entity.audit.TestSolution", "org.asqatasun.rules.elementchecker.text.TextNotIdenticalToAttributeChecker" ]
import org.apache.commons.lang3.tuple.ImmutablePair; import org.asqatasun.entity.audit.TestSolution; import org.asqatasun.rules.elementchecker.text.TextNotIdenticalToAttributeChecker;
import org.apache.commons.lang3.tuple.*; import org.asqatasun.entity.audit.*; import org.asqatasun.rules.elementchecker.text.*;
[ "org.apache.commons", "org.asqatasun.entity", "org.asqatasun.rules" ]
org.apache.commons; org.asqatasun.entity; org.asqatasun.rules;
55,765
public int read(byte[] b, int off, int len) throws IOException { if (len == 0) return 0; for (;;) { int count; try { count = inf.inflate(b, off, len); } catch (DataFormatException dfe) { throw new ZipException(dfe.getMessage()); } if (count > 0) return count; ...
int function(byte[] b, int off, int len) throws IOException { if (len == 0) return 0; for (;;) { int count; try { count = inf.inflate(b, off, len); } catch (DataFormatException dfe) { throw new ZipException(dfe.getMessage()); } if (count > 0) return count; if (inf.needsDictionary() inf.finished()) return -1; else if (i...
/** * Decompresses data into the byte array * * @param b the array to read and decompress data into * @param off the offset indicating where the data should be placed * @param len the number of bytes to decompress */
Decompresses data into the byte array
read
{ "repo_name": "MiguelSMendoza/Kunagi", "path": "WEB-INF/classes/ilarkesto/io/zip/InflaterInputStream.java", "license": "agpl-3.0", "size": 7260 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,800,992
public final ArrayList<MCRMetaHistoryDateText> getTexts() { return texts; }
final ArrayList<MCRMetaHistoryDateText> function() { return texts; }
/** * This method read the ArryList texts * * @return an ArrayList of MCRMetaHistoryDateTexts instances */
This method read the ArryList texts
getTexts
{ "repo_name": "MyCoRe-Org/mycore", "path": "mycore-base/src/main/java/org/mycore/datamodel/metadata/MCRMetaHistoryDate.java", "license": "gpl-3.0", "size": 20999 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
99,095
private void writeObject(ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); s.writeObject(toString()); }
void function(ObjectOutputStream s) throws java.io.IOException { s.defaultWriteObject(); s.writeObject(toString()); }
/** * Serializes only the unparsed DN, for compactness and to avoid * any implementation dependency. * * @serialData The DN string */
Serializes only the unparsed DN, for compactness and to avoid any implementation dependency
writeObject
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/javax/naming/ldap/LdapName.java", "license": "apache-2.0", "size": 28018 }
[ "java.io.IOException", "java.io.ObjectOutputStream" ]
import java.io.IOException; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,478,319
private static byte[] transform(final InputStream body) throws IOException { final ByteArrayOutputStream res = new ByteArrayOutputStream(); final JsonReader rdr = Json.createReader(body); try { final JsonObject obj = rdr.readObject(); final JsonWriter wrt = Json.creat...
static byte[] function(final InputStream body) throws IOException { final ByteArrayOutputStream res = new ByteArrayOutputStream(); final JsonReader rdr = Json.createReader(body); try { final JsonObject obj = rdr.readObject(); final JsonWriter wrt = Json.createWriterFactory( Collections.singletonMap( JsonGenerator.PRETT...
/** * Format body with proper indents. * @param body Response body * @return New properly formatted body * @throws IOException If fails */
Format body with proper indents
transform
{ "repo_name": "essobedo/takes", "path": "src/main/java/org/takes/rs/RsPrettyJSON.java", "license": "mit", "size": 4107 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream", "java.util.Collections", "javax.json.Json", "javax.json.JsonException", "javax.json.JsonObject", "javax.json.JsonReader", "javax.json.JsonWriter", "javax.json.stream.JsonGenerator" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Collections; import javax.json.Json; import javax.json.JsonException; import javax.json.JsonObject; import javax.json.JsonReader; import javax.json.JsonWriter; import javax.json.stream.JsonGenerator;
import java.io.*; import java.util.*; import javax.json.*; import javax.json.stream.*;
[ "java.io", "java.util", "javax.json" ]
java.io; java.util; javax.json;
2,094,650
XMultiServiceFactory xMSF = tParam.getMSF(); Object oPersObj = null; // test first if object is already registered try { oPersObj = xMSF.createInstance("com.sun.star.cmp.PersistObject"); } catch( com.sun.star.uno.Exception e ) { log.println("Could not crea...
XMultiServiceFactory xMSF = tParam.getMSF(); Object oPersObj = null; try { oPersObj = xMSF.createInstance(STR); } catch( com.sun.star.uno.Exception e ) { log.println(STR); e.printStackTrace(log); log.println(STR); } if ( oPersObj == null ) { String url = util.utils.getFullTestURL (STR); XImplementationRegistration xir;...
/** * Register the implementation of service * <code>com.sun.star.cmp.PersistObject</code> if not yet registered. * @see com.sun.star.cmp.PersistObject */
Register the implementation of service <code>com.sun.star.cmp.PersistObject</code> if not yet registered
initialize
{ "repo_name": "jvanz/core", "path": "qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java", "license": "gpl-3.0", "size": 11053 }
[ "com.sun.star.io.XActiveDataSource", "com.sun.star.io.XOutputStream", "com.sun.star.lang.XMultiServiceFactory", "com.sun.star.registry.XImplementationRegistration", "com.sun.star.registry.XSimpleRegistry", "com.sun.star.uno.UnoRuntime" ]
import com.sun.star.io.XActiveDataSource; import com.sun.star.io.XOutputStream; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.registry.XImplementationRegistration; import com.sun.star.registry.XSimpleRegistry; import com.sun.star.uno.UnoRuntime;
import com.sun.star.io.*; import com.sun.star.lang.*; import com.sun.star.registry.*; import com.sun.star.uno.*;
[ "com.sun.star" ]
com.sun.star;
1,277,220
private void loadToolOrder(InputStream in) { Document doc = Xml.readDocumentFromStream(in); Element root = doc.getDocumentElement(); if (!root.getTagName().equals("toolOrder")) { M_log.info("loadToolOrder: invalid root element (expecting \"toolOrder\"): " + root.getTa...
void function(InputStream in) { Document doc = Xml.readDocumentFromStream(in); Element root = doc.getDocumentElement(); if (!root.getTagName().equals(STR)) { M_log.info(STRtoolOrder\STR + root.getTagName()); return; } NodeList rootNodes = root.getChildNodes(); final int rootNodesLength = rootNodes.getLength(); for (int...
/** * Load this single file as a registration file, loading tools and locks. * * @param in * The Stream to load */
Load this single file as a registration file, loading tools and locks
loadToolOrder
{ "repo_name": "harfalm/Sakai-10.1", "path": "kernel/kernel-impl/src/main/java/org/sakaiproject/component/impl/BasicConfigurationService.java", "license": "apache-2.0", "size": 56935 }
[ "java.io.InputStream", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Vector", "org.apache.commons.lang.StringUtils", "org.sakaiproject.util.Xml", "org.w3c.dom.Document", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import java.io.InputStream; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Vector; import org.apache.commons.lang.StringUtils; import org.sakaiproject.util.Xml; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import java.io.*; import java.util.*; import org.apache.commons.lang.*; import org.sakaiproject.util.*; import org.w3c.dom.*;
[ "java.io", "java.util", "org.apache.commons", "org.sakaiproject.util", "org.w3c.dom" ]
java.io; java.util; org.apache.commons; org.sakaiproject.util; org.w3c.dom;
2,259,707
public CountDownLatch getAddressSchemaAsync( AsyncCallback<com.mozu.api.contracts.reference.AddressSchema> callback) throws Exception { return getAddressSchemaAsync( null, null, callback); }
CountDownLatch function( AsyncCallback<com.mozu.api.contracts.reference.AddressSchema> callback) throws Exception { return getAddressSchemaAsync( null, null, callback); }
/** * Retrieves a specific address schema based on the country code provided. This operation allows the creation of custom shipping and billing address fields. * <p><pre><code> * ReferenceData referencedata = new ReferenceData(); * CountDownLatch latch = referencedata.getAddressSchema( callback ); * latch.awa...
Retrieves a specific address schema based on the country code provided. This operation allows the creation of custom shipping and billing address fields. <code><code> ReferenceData referencedata = new ReferenceData(); CountDownLatch latch = referencedata.getAddressSchema( callback ); latch.await() * </code></code>
getAddressSchemaAsync
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/platform/ReferenceDataResource.java", "license": "mit", "size": 43935 }
[ "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;
1,522,459
public boolean isViewUnder(View view, int x, int y) { if (view == null) { return false; } return x >= view.getLeft() && x < view.getRight() && y >= view.getTop() && y < view.getBottom(); } /** * Find the topmost child under the given point within the...
boolean function(View view, int x, int y) { if (view == null) { return false; } return x >= view.getLeft() && x < view.getRight() && y >= view.getTop() && y < view.getBottom(); } /** * Find the topmost child under the given point within the parent view's * coordinate system. The child order is determined using * {@link...
/** * Determine if the supplied view is under the given point in the parent * view's coordinate system. * * @param view Child view of the parent to hit test * @param x X position to test in the parent's coordinate system * @param y Y position to test in the parent's coordinate system...
Determine if the supplied view is under the given point in the parent view's coordinate system
isViewUnder
{ "repo_name": "YiuChoi/MicroReader", "path": "swipebackactivity/src/main/java/com/example/swipebackactivity/ViewDragHelper.java", "license": "mit", "size": 62390 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,672,507
public Bitmap getCircularBitmap(Bitmap square) { if (square == null) return null; Bitmap output = Bitmap.createBitmap(square.getWidth(), square.getHeight(), Bitmap.Config.ARGB_8888); final Rect rect = new Rect(0, 0, square.getWidth(), square.getHeight()); Canvas canv...
Bitmap function(Bitmap square) { if (square == null) return null; Bitmap output = Bitmap.createBitmap(square.getWidth(), square.getHeight(), Bitmap.Config.ARGB_8888); final Rect rect = new Rect(0, 0, square.getWidth(), square.getHeight()); Canvas canvas = new Canvas(output); int halfWidth = square.getWidth() / 2; int h...
/** * Crop the square image in a circular * @param square image bitmap * @return circular image bitmap */
Crop the square image in a circular
getCircularBitmap
{ "repo_name": "honeyflyfish/SimpleCropView", "path": "simplecropview/src/main/java/com/isseiaoki/simplecropview/CropImageView.java", "license": "mit", "size": 47019 }
[ "android.graphics.Bitmap", "android.graphics.Canvas", "android.graphics.Paint", "android.graphics.PorterDuff", "android.graphics.PorterDuffXfermode", "android.graphics.Rect" ]
import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Rect;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
719,388
public static Mappings.TargetMapping permutation( List<RexNode> nodes, RelDataType inputRowType) { final Mappings.TargetMapping mapping = Mappings.create( MappingType.PARTIAL_FUNCTION, nodes.size(), inputRowType.getFieldCount()); for (Ord<RexNode> node :...
static Mappings.TargetMapping function( List<RexNode> nodes, RelDataType inputRowType) { final Mappings.TargetMapping mapping = Mappings.create( MappingType.PARTIAL_FUNCTION, nodes.size(), inputRowType.getFieldCount()); for (Ord<RexNode> node : Ord.zip(nodes)) { if (node.e instanceof RexInputRef) { mapping.set( node.i,...
/** * Returns a permutation describing where output fields come from. In * the returned map, value of {@code map.getTargetOpt(i)} is {@code n} if * field {@code i} projects input field {@code n}, -1 if it is an * expression. */
Returns a permutation describing where output fields come from. In the returned map, value of map.getTargetOpt(i) is n if field i projects input field n, -1 if it is an expression
permutation
{ "repo_name": "YrAuYong/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java", "license": "apache-2.0", "size": 119673 }
[ "java.util.List", "org.apache.calcite.linq4j.Ord", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rex.RexCall", "org.apache.calcite.rex.RexInputRef", "org.apache.calcite.rex.RexNode", "org.apache.calcite.sql.SqlKind", "org.apache.calcite.util.mapping.MappingType", "org.apache.calcite...
import java.util.List; import org.apache.calcite.linq4j.Ord; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rex.RexCall; import org.apache.calcite.rex.RexInputRef; import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.SqlKind; import org.apache.calcite.util.mapping.MappingType;...
import java.util.*; import org.apache.calcite.linq4j.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.sql.*; import org.apache.calcite.util.mapping.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,007,783
@Override public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.about); TextView tv = (TextView) findViewById(R.id.legal_text); tv.setText(readRawTextFile(R.raw.legal)); tv = (TextView) findViewById(R.id.info_text); tv.setText(Html.fromHtml(readRawTextFile(R.raw.info))); Linkify.addL...
void function(Bundle savedInstanceState) { setContentView(R.layout.about); TextView tv = (TextView) findViewById(R.id.legal_text); tv.setText(readRawTextFile(R.raw.legal)); tv = (TextView) findViewById(R.id.info_text); tv.setText(Html.fromHtml(readRawTextFile(R.raw.info))); Linkify.addLinks(tv, Linkify.ALL); }
/** * This is the standard Android on create method that gets called when the activity initialized. */
This is the standard Android on create method that gets called when the activity initialized
onCreate
{ "repo_name": "tharvey/BlocklyBot", "path": "blocklybot/src/main/java/com/tharvey/blocklybot/AboutDialog.java", "license": "apache-2.0", "size": 2011 }
[ "android.os.Bundle", "android.text.Html", "android.text.util.Linkify", "android.widget.TextView" ]
import android.os.Bundle; import android.text.Html; import android.text.util.Linkify; import android.widget.TextView;
import android.os.*; import android.text.*; import android.text.util.*; import android.widget.*;
[ "android.os", "android.text", "android.widget" ]
android.os; android.text; android.widget;
471,956
public ServiceResponse<Map<String, String>> getNullValue() throws ErrorException, IOException { return getNullValueAsync().toBlocking().single(); }
ServiceResponse<Map<String, String>> function() throws ErrorException, IOException { return getNullValueAsync().toBlocking().single(); }
/** * Get Dictionary with null value. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the Map&lt;String, String&gt; object wrapped in {@link ServiceResponse} if successful. */
Get Dictionary with null value
getNullValue
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 176746 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException", "java.util.Map" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.Map;
import com.microsoft.rest.*; import java.io.*; import java.util.*;
[ "com.microsoft.rest", "java.io", "java.util" ]
com.microsoft.rest; java.io; java.util;
1,873,430
public void removeDatatransferProgressListener (OnDatatransferProgressListener listener, Account account, OCFile file) { if (account == null || file == null || listener == null) return; String targetKey = buildRemoteName(account, file); if (mBoundListeners.get(targetKey) == l...
void function (OnDatatransferProgressListener listener, Account account, OCFile file) { if (account == null file == null listener == null) return; String targetKey = buildRemoteName(account, file); if (mBoundListeners.get(targetKey) == listener) { mBoundListeners.remove(targetKey); } }
/** * Removes a listener interested in the progress of the upload for a concrete file. * * @param listener Object to notify about progress of transfer. * @param account ownCloud account holding the file of interest. * @param file {@link OCFile} of in...
Removes a listener interested in the progress of the upload for a concrete file
removeDatatransferProgressListener
{ "repo_name": "huemer/android", "path": "src/com/owncloud/android/files/services/FileUploader.java", "license": "gpl-2.0", "size": 38868 }
[ "android.accounts.Account", "com.owncloud.android.datamodel.OCFile", "com.owncloud.android.lib.common.network.OnDatatransferProgressListener" ]
import android.accounts.Account; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
import android.accounts.*; import com.owncloud.android.datamodel.*; import com.owncloud.android.lib.common.network.*;
[ "android.accounts", "com.owncloud.android" ]
android.accounts; com.owncloud.android;
238,001
public final static int getInt(Map map, Object key, int defaultValue) { if (!map.containsKey(key)) return defaultValue; return (new Integer(map.get(key).toString())).intValue(); }
final static int function(Map map, Object key, int defaultValue) { if (!map.containsKey(key)) return defaultValue; return (new Integer(map.get(key).toString())).intValue(); }
/** * * Return the integer value of the element referenced by "key". * * @param map * The hashmap to search in. * @param key * The key of the hashmap. * @param defaultValue * The default value, should "map" contain no element referenced by * "key". ...
Return the integer value of the element referenced by "key"
getInt
{ "repo_name": "PatMartin/Dex", "path": "src/com/dexvis/util/MapUtil.java", "license": "apache-2.0", "size": 15010 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,564,101
StandardSQLTypeName sqlType = BEAM_TO_BIGQUERY_TYPE_MAPPING.get(fieldType.getTypeName()); if (sqlType == StandardSQLTypeName.TIMESTAMP && fieldType.getMetadata() != null) { sqlType = BEAM_TO_BIGQUERY_METADATA_MAPPING.get( new String(fieldType.getMetadata(), StandardCharsets.UTF_8)); ...
StandardSQLTypeName sqlType = BEAM_TO_BIGQUERY_TYPE_MAPPING.get(fieldType.getTypeName()); if (sqlType == StandardSQLTypeName.TIMESTAMP && fieldType.getMetadata() != null) { sqlType = BEAM_TO_BIGQUERY_METADATA_MAPPING.get( new String(fieldType.getMetadata(), StandardCharsets.UTF_8)); } return sqlType; }
/** * Get the corresponding BigQuery {@link StandardSQLTypeName} for supported Beam {@link * FieldType}. */
Get the corresponding BigQuery <code>StandardSQLTypeName</code> for supported Beam <code>FieldType</code>
toStandardSQLTypeName
{ "repo_name": "rangadi/incubator-beam", "path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java", "license": "apache-2.0", "size": 11434 }
[ "java.nio.charset.StandardCharsets" ]
import java.nio.charset.StandardCharsets;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
1,464,110
public void setCamelContext(CamelContext camelContext) { if (this.camelContext == null) { this.camelContext = camelContext; try { camelContext.addService(this); } catch (Exception e) { throw ObjectHelper.wrapRuntimeCamelException(e); ...
void function(CamelContext camelContext) { if (this.camelContext == null) { this.camelContext = camelContext; try { camelContext.addService(this); } catch (Exception e) { throw ObjectHelper.wrapRuntimeCamelException(e); } } }
/** * Sets the {@link CamelContext} <b>and also</b> initializes this loader. * <p/> * The reason why {@link #init(org.apache.camel.CamelContext, com.github.dozermapper.core.Mapper)} is also called * is because making using Dozer in Spring XML files easier, as no need to use the init-method attribute...
Sets the <code>CamelContext</code> and also initializes this loader. The reason why <code>#init(org.apache.camel.CamelContext, com.github.dozermapper.core.Mapper)</code> is also called is because making using Dozer in Spring XML files easier, as no need to use the init-method attribute
setCamelContext
{ "repo_name": "onders86/camel", "path": "components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java", "license": "apache-2.0", "size": 11434 }
[ "org.apache.camel.CamelContext", "org.apache.camel.util.ObjectHelper" ]
import org.apache.camel.CamelContext; import org.apache.camel.util.ObjectHelper;
import org.apache.camel.*; import org.apache.camel.util.*;
[ "org.apache.camel" ]
org.apache.camel;
2,877,602
private void checkForBracket() { //String of the last typed character char c = content.charAt(pos); String s = String.valueOf(c); for (int i = 0; i < brackets.size(); i++) { if (brackets.get(i).equals(s)) { isKeyword = false; SwingUtilitie...
void function() { char c = content.charAt(pos); String s = String.valueOf(c); for (int i = 0; i < brackets.size(); i++) { if (brackets.get(i).equals(s)) { isKeyword = false; SwingUtilities.invokeLater( new CompletionTask(bracketCompletions.get(i), pos + 1)); } } }
/** * Performs a check to see if the last * key typed was one of the supported * bracket characters */
Performs a check to see if the last key typed was one of the supported bracket characters
checkForBracket
{ "repo_name": "ramakellio/maven", "path": "src/main/java/com/github/AutoComplete.java", "license": "mit", "size": 8101 }
[ "javax.swing.SwingUtilities" ]
import javax.swing.SwingUtilities;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,679,380
public void setRecordType(final RecordTypeEnum recordType) { this.recordType = recordType; }
void function(final RecordTypeEnum recordType) { this.recordType = recordType; }
/** * Set the value related to the column: recordType. * @param funderList the recordType value you wish to set */
Set the value related to the column: recordType
setRecordType
{ "repo_name": "servinglynk/servinglynk-hmis", "path": "hmis-model-v2020/src/main/java/com/servinglynk/hmis/warehouse/model/v2020/ServiceFaReferral.java", "license": "mpl-2.0", "size": 15631 }
[ "com.servinglynk.hmis.warehouse.enums.RecordTypeEnum" ]
import com.servinglynk.hmis.warehouse.enums.RecordTypeEnum;
import com.servinglynk.hmis.warehouse.enums.*;
[ "com.servinglynk.hmis" ]
com.servinglynk.hmis;
1,477,232
public void testSerialization() { XYImageAnnotation a1 = new XYImageAnnotation(10.0, 20.0, JFreeChart.INFO.getLogo()); XYImageAnnotation a2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); ...
void function() { XYImageAnnotation a1 = new XYImageAnnotation(10.0, 20.0, JFreeChart.INFO.getLogo()); XYImageAnnotation a2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(a1); out.close(); ObjectInput in = new ObjectInputStrea...
/** * Serialize an instance, restore it, and check for equality. */
Serialize an instance, restore it, and check for equality
testSerialization
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart0921/source/org/jfree/chart/annotations/junit/XYImageAnnotationTests.java", "license": "lgpl-3.0", "size": 4158 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "org.jfree.chart.JFreeChart", "org.jfree.chart.annotations.XYImageAnnotation" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.jfree.chart.JFreeChart; import org.jfree.chart.annotations.XYImageAnnotation;
import java.io.*; import org.jfree.chart.*; import org.jfree.chart.annotations.*;
[ "java.io", "org.jfree.chart" ]
java.io; org.jfree.chart;
581,796
@Override public synchronized boolean removeRequestInterceptor( Interceptor<Request> interceptor) { int ndx = requestInterceptors.indexOf(interceptor); if (ndx != -1) { requestInterceptors.remove(ndx); } hasRequestInterceptors = requestInterceptors.size() ...
synchronized boolean function( Interceptor<Request> interceptor) { int ndx = requestInterceptors.indexOf(interceptor); if (ndx != -1) { requestInterceptors.remove(ndx); } hasRequestInterceptors = requestInterceptors.size() > 0; return ndx != -1; }
/** * This method removes interceptor, which is invoked before passing request * is passed to handler * * @param interceptor */
This method removes interceptor, which is invoked before passing request is passed to handler
removeRequestInterceptor
{ "repo_name": "bhatti/PlexServices", "path": "plexsvc-framework/src/main/java/com/plexobject/service/impl/InterceptorLifecycleImpl.java", "license": "mit", "size": 6829 }
[ "com.plexobject.handler.Request", "com.plexobject.service.Interceptor" ]
import com.plexobject.handler.Request; import com.plexobject.service.Interceptor;
import com.plexobject.handler.*; import com.plexobject.service.*;
[ "com.plexobject.handler", "com.plexobject.service" ]
com.plexobject.handler; com.plexobject.service;
1,292,380
private void setInterface() { if (mScrimInsetsFrameLayout != null) { mScrimInsetsFrameLayout.setLayoutParams(getDrawerParams()); if (Utils.DARKTHEME) mScrimInsetsFrameLayout.setBackgroundColor(getResources().getColor(R.color.navigationdrawer_background_dark)); ...
void function() { if (mScrimInsetsFrameLayout != null) { mScrimInsetsFrameLayout.setLayoutParams(getDrawerParams()); if (Utils.DARKTHEME) mScrimInsetsFrameLayout.setBackgroundColor(getResources().getColor(R.color.navigationdrawer_background_dark)); } setItems(null); if (mDrawerLayout != null) { mDrawerToggle = new Acti...
/** * Setup the views */
Setup the views
setInterface
{ "repo_name": "LiquidSmooth/android_packages_apps_KernelAdiutor", "path": "app/src/main/java/com/grarak/kerneladiutor/MainActivity.java", "license": "apache-2.0", "size": 22568 }
[ "android.support.v7.app.ActionBarDrawerToggle", "com.grarak.kerneladiutor.utils.Utils" ]
import android.support.v7.app.ActionBarDrawerToggle; import com.grarak.kerneladiutor.utils.Utils;
import android.support.v7.app.*; import com.grarak.kerneladiutor.utils.*;
[ "android.support", "com.grarak.kerneladiutor" ]
android.support; com.grarak.kerneladiutor;
2,808,218
@XmlTransient @JsonIgnore @org.codehaus.jackson.annotate.JsonIgnore public URI getSystem() { return getCollection(); }
@org.codehaus.jackson.annotate.JsonIgnore URI function() { return getCollection(); }
/** * The system in which this match was found. * * @return The system in which this match was found. * @deprecated Use get/setCollection */
The system in which this match was found
getSystem
{ "repo_name": "brenthale/gedcomx-java", "path": "extensions/familysearch/familysearch-api-model/src/main/java/org/familysearch/platform/ct/MatchInfo.java", "license": "apache-2.0", "size": 4109 }
[ "org.codehaus.enunciate.json.JsonIgnore" ]
import org.codehaus.enunciate.json.JsonIgnore;
import org.codehaus.enunciate.json.*;
[ "org.codehaus.enunciate" ]
org.codehaus.enunciate;
2,455,963
public void startShaking(int shakeTime) { // the class that animates the shimmying Animator animator = super.getAnimator(); // stop any previous animation if(animator != null) { animator.stop(); } // the distance left and right that it shimmies int shimmyDistance = 2; // This k...
void function(int shakeTime) { Animator animator = super.getAnimator(); if(animator != null) { animator.stop(); } int shimmyDistance = 2; PropertySetter setter = new PropertySetter(this, STR, 0, -shimmyDistance, 0, shimmyDistance, 0, -shimmyDistance, 0, shimmyDistance, 0, -shimmyDistance, 0, shimmyDistance, 0, -shimmyD...
/** * Makes the icon start shimmying. * * @param shakeTime * The number of milliseconds for the entire animation. */
Makes the icon start shimmying
startShaking
{ "repo_name": "KEOpenSource/CAExplorer", "path": "cellularAutomata/util/graphics/ShimmyingTenTimesIconJButton.java", "license": "apache-2.0", "size": 2984 }
[ "org.jdesktop.animation.timing.Animator", "org.jdesktop.animation.timing.interpolation.PropertySetter" ]
import org.jdesktop.animation.timing.Animator; import org.jdesktop.animation.timing.interpolation.PropertySetter;
import org.jdesktop.animation.timing.*; import org.jdesktop.animation.timing.interpolation.*;
[ "org.jdesktop.animation" ]
org.jdesktop.animation;
1,054,108
private String stateToString(int state) { switch (state) { case BluetoothAdapter.STATE_DISCONNECTED: return "DISCONNECTED"; case BluetoothAdapter.STATE_CONNECTED: return "CONNECTED"; case BluetoothAdapter.STATE_CONNECTING: r...
String function(int state) { switch (state) { case BluetoothAdapter.STATE_DISCONNECTED: return STR; case BluetoothAdapter.STATE_CONNECTED: return STR; case BluetoothAdapter.STATE_CONNECTING: return STR; case BluetoothAdapter.STATE_DISCONNECTING: return STR; case BluetoothAdapter.STATE_OFF: return "OFF"; case BluetoothA...
/** * Converts BluetoothAdapter states into local string representations. */
Converts BluetoothAdapter states into local string representations
stateToString
{ "repo_name": "gamefreak/Conversations", "path": "src/main/java/eu/siacs/conversations/services/AppRTCBluetoothManager.java", "license": "gpl-3.0", "size": 25148 }
[ "android.bluetooth.BluetoothAdapter" ]
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.*;
[ "android.bluetooth" ]
android.bluetooth;
1,436,544
public void addMarkerFromMySqlServerToMap(MyMarkerObject _m) { MarkerOptions m = new MarkerOptions(); m.title(_m.getM_address().toString()); m.position(_m.getM_latLng()); m.icon(_m.getM_icon()); m.draggable(false); m_saved_marker_objects.add(_m); m_googlemap.addMarker(m); } // Background task to del...
void function(MyMarkerObject _m) { MarkerOptions m = new MarkerOptions(); m.title(_m.getM_address().toString()); m.position(_m.getM_latLng()); m.icon(_m.getM_icon()); m.draggable(false); m_saved_marker_objects.add(_m); m_googlemap.addMarker(m); } private class DeleteTask extends AsyncTask<MyMarkerObject, Void, Void> { ...
/** * Add the generated MarkerObject to the SavedMarkerArray and to the map, * displayed on the phone * * @param _m */
Add the generated MarkerObject to the SavedMarkerArray and to the map, displayed on the phone
addMarkerFromMySqlServerToMap
{ "repo_name": "b4um1/wasserapp", "path": "Wasser-App/src/at/fhhgb/mc/wasserapp/mapactivity/MapActivity.java", "license": "gpl-2.0", "size": 38661 }
[ "android.os.AsyncTask", "com.google.android.gms.maps.model.MarkerOptions" ]
import android.os.AsyncTask; import com.google.android.gms.maps.model.MarkerOptions;
import android.os.*; import com.google.android.gms.maps.model.*;
[ "android.os", "com.google.android" ]
android.os; com.google.android;
2,169,474
public AccessStatus hasReadPermission(NodeRef nodeRef) { AccessStatus status = AccessStatus.DENIED; // If the node ref is null there is no sensible test to do - and there // must be no permissions // - so we allow it if (nodeRef == null) { re...
AccessStatus function(NodeRef nodeRef) { AccessStatus status = AccessStatus.DENIED; if (nodeRef == null) { return AccessStatus.ALLOWED; } if (!nodeService.exists(nodeRef)) { return AccessStatus.ALLOWED; } String runAsUser = AuthenticationUtil.getRunAsUser(); if (runAsUser == null) { return AccessStatus.DENIED; } if (Au...
/** * Optimised read permission evaluation * caveats: * doesn't take into account dynamic authorities/groups * doesn't take into account node types/aspects for permissions * */
Optimised read permission evaluation caveats: doesn't take into account dynamic authorities/groups doesn't take into account node types/aspects for permissions
hasReadPermission
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java", "license": "lgpl-3.0", "size": 96076 }
[ "java.util.Set", "org.alfresco.repo.security.authentication.AuthenticationUtil", "org.alfresco.repo.security.permissions.DynamicAuthority", "org.alfresco.repo.security.permissions.PermissionReference", "org.alfresco.repo.transaction.AlfrescoTransactionSupport", "org.alfresco.service.cmr.repository.NodeRef...
import java.util.Set; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.repo.security.permissions.DynamicAuthority; import org.alfresco.repo.security.permissions.PermissionReference; import org.alfresco.repo.transaction.AlfrescoTransactionSupport; import org.alfresco.service.cmr.r...
import java.util.*; import org.alfresco.repo.security.authentication.*; import org.alfresco.repo.security.permissions.*; import org.alfresco.repo.transaction.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.cmr.security.*;
[ "java.util", "org.alfresco.repo", "org.alfresco.service" ]
java.util; org.alfresco.repo; org.alfresco.service;
2,872,013
Document doc = XML.createDocument(); Element methodCallElement = doc.createElement("methodCall"); doc.appendChild(methodCallElement); XML.add(methodCallElement, "methodName", name); if (params != null && !params.isEmpty()) { Element paramsElement = doc.createElement("params"); methodCallElement.appendCh...
Document doc = XML.createDocument(); Element methodCallElement = doc.createElement(STR); doc.appendChild(methodCallElement); XML.add(methodCallElement, STR, name); if (params != null && !params.isEmpty()) { Element paramsElement = doc.createElement(STR); methodCallElement.appendChild(paramsElement); for (Object param :...
/** Build an XML-RPC method call. * * This may throw {@link IllegalArgumentException} if the <var>params</var> * contains an object that's incompatible with XML-RPC. * * @param name Name of the method to call. * @param params Parameters to pass to the call. * @return An XML string encapsulationg the call....
Build an XML-RPC method call. This may throw <code>IllegalArgumentException</code> if the params contains an object that's incompatible with XML-RPC
createMethodCall
{ "repo_name": "lewismc/oodt", "path": "commons/src/main/java/org/apache/oodt/commons/util/XMLRPC.java", "license": "apache-2.0", "size": 9796 }
[ "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,103,773
Set<String> findResourceNames(String location, URL locationUrl) throws IOException;
Set<String> findResourceNames(String location, URL locationUrl) throws IOException;
/** * Finds the resource names below this location on the classpath under this locationUrl. * * @param location The system-independent location on the classpath. * @param locationUrl The system-specific physical location URL. * @return The system-independent names of the resources on the cla...
Finds the resource names below this location on the classpath under this locationUrl
findResourceNames
{ "repo_name": "mpage23/flyway", "path": "flyway-core/src/main/java/org/flywaydb/core/internal/util/scanner/classpath/ClassPathLocationScanner.java", "license": "apache-2.0", "size": 1325 }
[ "java.io.IOException", "java.util.Set" ]
import java.io.IOException; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
648,857
public Iterator<WellXMLBigDecimal> iterator() { return this.wells.iterator(); }
Iterator<WellXMLBigDecimal> function() { return this.wells.iterator(); }
/** * Returns an iterator for the list of XML wells. * @return the iterator */
Returns an iterator for the list of XML wells
iterator
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/bigdecimalflex/io/WellListXMLBigDecimal.java", "license": "apache-2.0", "size": 4055 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
56,645
void symm(char Order, char Side, char Uplo, double alpha, INDArray A, INDArray B, double beta, INDArray C);
void symm(char Order, char Side, char Uplo, double alpha, INDArray A, INDArray B, double beta, INDArray C);
/** * her2k performs a rank-2k update of an n-by-n Hermitian matrix c, that is, one of the following operations: c := alpha*a*conjg(b') + conjg(alpha)*b*conjg(a') + beta*c, for trans = 'N'or'n' c := alpha*conjg(b')*a + conjg(alpha)*conjg(a')*b + beta*c, for trans = 'C'or'c' where c is an n-by-n He...
her2k performs a rank-2k update of an n-by-n Hermitian matrix c, that is, one of the following operations: a*conjg(b') + conjg(alpha)*b*conjg(a') + beta*c, for trans = 'N'or'n' conjg(b')*a + conjg(alpha)*conjg(a')*b + beta*c, for trans = 'C'or'c'
symm
{ "repo_name": "smarthi/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/Level3.java", "license": "apache-2.0", "size": 10742 }
[ "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
1,605,526
public final HttpAsyncClientBuilder setSchemePortResolver(final SchemePortResolver schemePortResolver) { this.schemePortResolver = schemePortResolver; return this; }
final HttpAsyncClientBuilder function(final SchemePortResolver schemePortResolver) { this.schemePortResolver = schemePortResolver; return this; }
/** * Assigns {@link SchemePortResolver} instance. */
Assigns <code>SchemePortResolver</code> instance
setSchemePortResolver
{ "repo_name": "UlrichColby/httpcomponents-client", "path": "httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java", "license": "apache-2.0", "size": 40087 }
[ "org.apache.hc.client5.http.SchemePortResolver" ]
import org.apache.hc.client5.http.SchemePortResolver;
import org.apache.hc.client5.http.*;
[ "org.apache.hc" ]
org.apache.hc;
574,216
void update(CollaborationEvent event) { lastUpdateTime = Instant.now(); Map<Long, Task> remoteTasks = event.getCurrentTasks(); remoteTasks.values().stream().forEach((task) -> { ProgressHandle progress = ta...
void update(CollaborationEvent event) { lastUpdateTime = Instant.now(); Map<Long, Task> remoteTasks = event.getCurrentTasks(); remoteTasks.values().stream().forEach((task) -> { ProgressHandle progress = taskIdsToProgressBars.get(task.getId()); if (null != progress) { progress.progress(task.getStatus()); } else { progre...
/** * Updates this remote tasks collection. * * @param event A collaboration event from the collaborating node * associated with these tasks. */
Updates this remote tasks collection
update
{ "repo_name": "narfindustries/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/CollaborationMonitor.java", "license": "apache-2.0", "size": 25212 }
[ "java.time.Instant", "java.util.Iterator", "java.util.Map", "org.netbeans.api.progress.ProgressHandle" ]
import java.time.Instant; import java.util.Iterator; import java.util.Map; import org.netbeans.api.progress.ProgressHandle;
import java.time.*; import java.util.*; import org.netbeans.api.progress.*;
[ "java.time", "java.util", "org.netbeans.api" ]
java.time; java.util; org.netbeans.api;
2,757,750
private void clipViewOnTheLeft(Rect curViewBound, float curViewWidth, int left) { curViewBound.left = (int) (left + mClipPadding); curViewBound.right = (int) (mClipPadding + curViewWidth); }
void function(Rect curViewBound, float curViewWidth, int left) { curViewBound.left = (int) (left + mClipPadding); curViewBound.right = (int) (mClipPadding + curViewWidth); }
/** * Set bounds for the left textView including clip padding. * * @param curViewBound * current bounds. * @param curViewWidth * width of the view. */
Set bounds for the left textView including clip padding
clipViewOnTheLeft
{ "repo_name": "prasannata/StackX", "path": "stackx-app/src/com/viewpagerindicator/TitlePageIndicator.java", "license": "gpl-3.0", "size": 30014 }
[ "android.graphics.Rect" ]
import android.graphics.Rect;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
932,625
private void signalNextAvailable() { lock.lock(); try { assert cctx.kernalContext().invalid() || written == lastFsyncPos || mode != WALMode.FSYNC : "fsync [written=" + written + ", lastFsync=" + lastFsyncPos + ", idx=" + idx + ']';...
void function() { lock.lock(); try { assert cctx.kernalContext().invalid() written == lastFsyncPos mode != WALMode.FSYNC : STR + written + STR + lastFsyncPos + STR + idx + ']'; fileIO = null; nextSegment.signalAll(); } finally { lock.unlock(); } }
/** * Signals next segment available to wake up other worker threads waiting for WAL to write */
Signals next segment available to wake up other worker threads waiting for WAL to write
signalNextAvailable
{ "repo_name": "sk0x50/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java", "license": "apache-2.0", "size": 125828 }
[ "org.apache.ignite.configuration.WALMode" ]
import org.apache.ignite.configuration.WALMode;
import org.apache.ignite.configuration.*;
[ "org.apache.ignite" ]
org.apache.ignite;
72,733
@Test(expectedExceptions = { LDAPException.class }) public void testReadPasswordWithNoConsoleOrAlternative() throws Exception { assertNull(System.console()); PasswordReader.readPassword(); fail("Expected an exception when trying to read a password when no " + "console is available an...
@Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { assertNull(System.console()); PasswordReader.readPassword(); fail(STR + STR); }
/** * Tests the behavior when trying to read a password when no console is * available and no alternate method is specified. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior when trying to read a password when no console is available and no alternate method is specified
testReadPasswordWithNoConsoleOrAlternative
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/util/PasswordReaderTestCase.java", "license": "gpl-2.0", "size": 7152 }
[ "com.unboundid.ldap.sdk.LDAPException", "org.testng.annotations.Test" ]
import com.unboundid.ldap.sdk.LDAPException; import org.testng.annotations.Test;
import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.ldap; org.testng.annotations;
656,448
private static String resolveLocalHostname() { String localhost; try { localhost = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { LOG.warn("Unable to determine local hostname -falling back to '{}'", LOCALHOST, e); localhost = LOCALHOST; ...
static String function() { String localhost; try { localhost = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { LOG.warn(STR, LOCALHOST, e); localhost = LOCALHOST; } return localhost; }
/** * Determine the local hostname; retrieving it from cache if it is known * If we cannot determine our host name, return "localhost" * @return the local hostname or "localhost" */
Determine the local hostname; retrieving it from cache if it is known If we cannot determine our host name, return "localhost"
resolveLocalHostname
{ "repo_name": "nandakumar131/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/DNS.java", "license": "apache-2.0", "size": 16887 }
[ "java.net.InetAddress", "java.net.UnknownHostException" ]
import java.net.InetAddress; import java.net.UnknownHostException;
import java.net.*;
[ "java.net" ]
java.net;
1,695,043
public static String[] parseDbName(String wholeName, DatabaseNamer namer) { String[] result = new String[2]; if (DbCompat.SEPARATE_DATABASE_FILES) { String[] splitName = wholeName.split(NAME_SEPARATOR); assert splitName.length == 3 || splitName.length == 4 : wholeName; ...
static String[] function(String wholeName, DatabaseNamer namer) { String[] result = new String[2]; if (DbCompat.SEPARATE_DATABASE_FILES) { String[] splitName = wholeName.split(NAME_SEPARATOR); assert splitName.length == 3 splitName.length == 4 : wholeName; assert splitName[0].equals(STR) : wholeName; String storeName =...
/** * Allows passing a namer to a static method for testing. */
Allows passing a namer to a static method for testing
parseDbName
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/src/com/sleepycat/persist/impl/Store.java", "license": "mit", "size": 76785 }
[ "com.sleepycat.compat.DbCompat", "com.sleepycat.persist.DatabaseNamer" ]
import com.sleepycat.compat.DbCompat; import com.sleepycat.persist.DatabaseNamer;
import com.sleepycat.compat.*; import com.sleepycat.persist.*;
[ "com.sleepycat.compat", "com.sleepycat.persist" ]
com.sleepycat.compat; com.sleepycat.persist;
1,117,127
ActClassObservation getClassCode();
ActClassObservation getClassCode();
/** * Returns the value of the '<em><b>Class Code</b></em>' attribute. * The default value is <code>"OBS"</code>. * The literals are from the enumeration {@link org.openhealthtools.mdht.uml.hl7.vocab.ActClassObservation}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Class Code</em>' at...
Returns the value of the 'Class Code' attribute. The default value is <code>"OBS"</code>. The literals are from the enumeration <code>org.openhealthtools.mdht.uml.hl7.vocab.ActClassObservation</code>. If the meaning of the 'Class Code' attribute isn't clear, there really should be more of a description here...
getClassCode
{ "repo_name": "drbgfc/mdht", "path": "cda/plugins/org.openhealthtools.mdht.uml.cda/src/org/openhealthtools/mdht/uml/cda/ObservationRange.java", "license": "epl-1.0", "size": 16004 }
[ "org.openhealthtools.mdht.uml.hl7.vocab.ActClassObservation" ]
import org.openhealthtools.mdht.uml.hl7.vocab.ActClassObservation;
import org.openhealthtools.mdht.uml.hl7.vocab.*;
[ "org.openhealthtools.mdht" ]
org.openhealthtools.mdht;
2,389,682
public void loadToolboxContents(@RawRes int toolboxResId) throws BlockLoadingException { InputStream is = mContext.getResources().openRawResource(toolboxResId); loadToolboxContents(is); }
void function(@RawRes int toolboxResId) throws BlockLoadingException { InputStream is = mContext.getResources().openRawResource(toolboxResId); loadToolboxContents(is); }
/** * Loads the toolbox category, blocks, and buttons from the {@code /raw/} resources directory. * * @param toolboxResId The resource id of the set of blocks or block groups to show in the * @throws BlockLoadingException If toolbox was not loaded. May wrap an IOException or another * ...
Loads the toolbox category, blocks, and buttons from the /raw/ resources directory
loadToolboxContents
{ "repo_name": "Axe-Ishmael/Blockly", "path": "src/blocklylib-core/src/main/java/com/google/blockly/model/Workspace.java", "license": "apache-2.0", "size": 13689 }
[ "android.support.annotation.RawRes", "com.google.blockly.utils.BlockLoadingException", "java.io.InputStream" ]
import android.support.annotation.RawRes; import com.google.blockly.utils.BlockLoadingException; import java.io.InputStream;
import android.support.annotation.*; import com.google.blockly.utils.*; import java.io.*;
[ "android.support", "com.google.blockly", "java.io" ]
android.support; com.google.blockly; java.io;
913,918
public void testTimedPollLast0() throws InterruptedException { LinkedBlockingDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(SIZE - i - 1, q.pollLast(0, MILLISECONDS)); } assertNull(q.pollLast(0, MILLISECONDS)); }
void function() throws InterruptedException { LinkedBlockingDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(SIZE - i - 1, q.pollLast(0, MILLISECONDS)); } assertNull(q.pollLast(0, MILLISECONDS)); }
/** * timed pollLast with zero timeout succeeds when non-empty, else times out */
timed pollLast with zero timeout succeeds when non-empty, else times out
testTimedPollLast0
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "jsr166-tests/src/test/java/jsr166/LinkedBlockingDequeTest.java", "license": "gpl-2.0", "size": 60349 }
[ "java.util.concurrent.LinkedBlockingDeque" ]
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,288,776
EClass getSarlEnumeration();
EClass getSarlEnumeration();
/** * Returns the meta object for class '{@link io.sarl.lang.sarl.SarlEnumeration <em>Enumeration</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Enumeration</em>'. * @see io.sarl.lang.sarl.SarlEnumeration * @generated */
Returns the meta object for class '<code>io.sarl.lang.sarl.SarlEnumeration Enumeration</code>'.
getSarlEnumeration
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/sarl/SarlPackage.java", "license": "apache-2.0", "size": 83913 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,695,057
public static int indexOfIgnoreCase(int startingPosition, String searchIn, String searchFor, String openingMarkers, String closingMarkers, Set<SearchMode> searchMode) { if (searchIn == null || searchFor == null) { return -1; } int searchInLength = searchIn.length(); ...
static int function(int startingPosition, String searchIn, String searchFor, String openingMarkers, String closingMarkers, Set<SearchMode> searchMode) { if (searchIn == null searchFor == null) { return -1; } int searchInLength = searchIn.length(); int searchForLength = searchFor.length(); int stopSearchingAt = searchIn...
/** * Finds the position of a substring within a string, ignoring case, with the option to skip text delimited by given markers or within comments. * * @param startingPosition * the position to start the search from * @param searchIn * the string to search in * ...
Finds the position of a substring within a string, ignoring case, with the option to skip text delimited by given markers or within comments
indexOfIgnoreCase
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/mysql-connector-java-5.1.38/src/com/mysql/jdbc/StringUtils.java", "license": "lgpl-2.1", "size": 87237 }
[ "java.util.EnumSet", "java.util.Set" ]
import java.util.EnumSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,522,203
public void decode(Decoder dec) throws ASN1Exception, IOException { dec.readCollectionOf(this); checkConstraints(); }
void function(Decoder dec) throws ASN1Exception, IOException { dec.readCollectionOf(this); checkConstraints(); }
/** * Reads this collection from the given {@link Decoder Decoder}. * * @param dec * The decoder to read from. */
Reads this collection from the given <code>Decoder Decoder</code>
decode
{ "repo_name": "sharebookproject/AndroidPQCrypto", "path": "MCElieceProject/Flexiprovider/src/main/java/codec/asn1/ASN1SequenceOf.java", "license": "gpl-3.0", "size": 8621 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,715,203
public void populateTiles(int plane) { if (mapTiles.isEmpty()) { System.err.println("Error: mapTiles is empty."); } for (MapTile mt : getMapTiles().values()) { if (mt.getPosition().getHeight() == plane && (mt.getFlags() & MapTile.TILE_FLAGS_CLIPPING_BIT) ...
void function(int plane) { if (mapTiles.isEmpty()) { System.err.println(STR); } for (MapTile mt : getMapTiles().values()) { if (mt.getPosition().getHeight() == plane && (mt.getFlags() & MapTile.TILE_FLAGS_CLIPPING_BIT) != 0) { if ((getMapTile(new Position(mt.getPosition().getX(), mt.getPosition().getY(), 1)).getFlags()...
/** * Populates the tile map on a specified plane. * @param plane The plane. */
Populates the tile map on a specified plane
populateTiles
{ "repo_name": "AWildridge/ProtoScape", "path": "src/org/apollo/game/model/region/Region.java", "license": "isc", "size": 9633 }
[ "org.apollo.game.model.Position", "org.apollo.game.model.Tile", "org.apollo.game.model.def.MapTile", "org.apollo.game.model.obj.StaticObject" ]
import org.apollo.game.model.Position; import org.apollo.game.model.Tile; import org.apollo.game.model.def.MapTile; import org.apollo.game.model.obj.StaticObject;
import org.apollo.game.model.*; import org.apollo.game.model.def.*; import org.apollo.game.model.obj.*;
[ "org.apollo.game" ]
org.apollo.game;
1,239,937
public void createRootDirRecursively(String path) throws Exception { String[] pathParts = path.split("/"); Preconditions.checkArgument( pathParts.length >= 1 && pathParts[0].isEmpty(), "Invalid path: %s", path); StringBuilder sb = new StringBuilder(); for (int i = 1; i < pathParts.len...
void function(String path) throws Exception { String[] pathParts = path.split("/"); Preconditions.checkArgument( pathParts.length >= 1 && pathParts[0].isEmpty(), STR, path); StringBuilder sb = new StringBuilder(); for (int i = 1; i < pathParts.length; i++) { sb.append("/").append(pathParts[i]); create(sb.toString()); }...
/** * Utility function to ensure that the configured base znode exists. * This recursively creates the znode as well as all of its parents. * @param path Path of the znode to create. * @throws Exception If it cannot create the file. */
Utility function to ensure that the configured base znode exists. This recursively creates the znode as well as all of its parents
createRootDirRecursively
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/curator/ZKCuratorManager.java", "license": "apache-2.0", "size": 13644 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,098,320
public ChannelFuture connect(SocketAddress remoteAddress) { if (remoteAddress == null) { throw new NullPointerException("remoteAddress"); } validate(); return doConnect(remoteAddress, localAddress()); }
ChannelFuture function(SocketAddress remoteAddress) { if (remoteAddress == null) { throw new NullPointerException(STR); } validate(); return doConnect(remoteAddress, localAddress()); }
/** * Connect a {@link Channel} to the remote peer. */
Connect a <code>Channel</code> to the remote peer
connect
{ "repo_name": "beforeeight/cpush-apns", "path": "src/main/java/io/netty/bootstrap/SSLBootstrap.java", "license": "apache-2.0", "size": 8680 }
[ "io.netty.channel.ChannelFuture", "java.net.SocketAddress" ]
import io.netty.channel.ChannelFuture; import java.net.SocketAddress;
import io.netty.channel.*; import java.net.*;
[ "io.netty.channel", "java.net" ]
io.netty.channel; java.net;
1,597,782
public RecyclerView getRecyclerView() { return mDrawerBuilder.mRecyclerView; }
RecyclerView function() { return mDrawerBuilder.mRecyclerView; }
/** * get the listView of the current drawer * * @return */
get the listView of the current drawer
getRecyclerView
{ "repo_name": "FreedomZZQ/YouJoin-Android", "path": "material-drawer-library/src/main/java/com/mikepenz/materialdrawer/Drawer.java", "license": "mit", "size": 33812 }
[ "android.support.v7.widget.RecyclerView" ]
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.*;
[ "android.support" ]
android.support;
1,028,801
private WALPointer readPointer(File cpMarkerFile, ByteBuffer buf) throws IgniteCheckedException { buf.position(0); try (FileChannel ch = FileChannel.open(cpMarkerFile.toPath(), READ)) { ch.read(buf); buf.flip(); return new FileWALPointer(buf.getLong(), buf.getI...
WALPointer function(File cpMarkerFile, ByteBuffer buf) throws IgniteCheckedException { buf.position(0); try (FileChannel ch = FileChannel.open(cpMarkerFile.toPath(), READ)) { ch.read(buf); buf.flip(); return new FileWALPointer(buf.getLong(), buf.getInt(), buf.getInt()); } catch (IOException e) { throw new IgniteChecked...
/** * Loads WAL pointer from CP file * * @param cpMarkerFile Checkpoint mark file. * @return WAL pointer. * @throws IgniteCheckedException If failed to read mark file. */
Loads WAL pointer from CP file
readPointer
{ "repo_name": "ntikhonov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java", "license": "apache-2.0", "size": 114957 }
[ "java.io.File", "java.io.IOException", "java.nio.ByteBuffer", "java.nio.channels.FileChannel", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.pagemem.wal.WALPointer", "org.apache.ignite.internal.processors.cache.persistence.wal.FileWALPointer" ]
import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.pagemem.wal.WALPointer; import org.apache.ignite.internal.processors.cache.persistence.wal.FileWALPointer;
import java.io.*; import java.nio.*; import java.nio.channels.*; import org.apache.ignite.*; import org.apache.ignite.internal.pagemem.wal.*; import org.apache.ignite.internal.processors.cache.persistence.wal.*;
[ "java.io", "java.nio", "org.apache.ignite" ]
java.io; java.nio; org.apache.ignite;
2,859,196
private PropertyChangeListener getManagerListener() { if (managerListener == null) { managerListener = new PropertyChangeListener() {
PropertyChangeListener function() { if (managerListener == null) { managerListener = new PropertyChangeListener() {
/** * Lazily creates and returns a property change listener to be registered on the * KeyboardFocusManager. * * @return a property change listener to be registered on the KeyboardFocusManager. */
Lazily creates and returns a property change listener to be registered on the KeyboardFocusManager
getManagerListener
{ "repo_name": "syncer/swingx", "path": "swingx-core/src/main/java/org/jdesktop/swingx/event/CompoundFocusListener.java", "license": "lgpl-2.1", "size": 6202 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
116,092
public void testValidateInitTabReferenceNumbers_WithPOIDNoPREQIDNoVendorNum() throws Exception { // Get the poID of a PO that is validly in the database. GlobalVariables.getUserSession().setBackdoorUser( "parke" ); Integer poID = prepareAndSavePO(); GlobalVariables.getUserSession...
void function() throws Exception { GlobalVariables.getUserSession().setBackdoorUser( "parke" ); Integer poID = prepareAndSavePO(); GlobalVariables.getUserSession().clearBackdoorUser(); creditMemo.setPurchaseOrderIdentifier(poID); VendorCreditMemoInitTabReferenceNumberValidation validation = (VendorCreditMemoInitTabRefe...
/** * First happy path: CM is derived from Purchase Order. * @throws Exception */
First happy path: CM is derived from Purchase Order
testValidateInitTabReferenceNumbers_WithPOIDNoPREQIDNoVendorNum
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "test/unit/src/org/kuali/kfs/module/purap/document/validation/impl/CreditMemoDocumentRuleTest.java", "license": "agpl-3.0", "size": 37115 }
[ "org.kuali.kfs.sys.document.validation.event.AttributedDocumentEventBase", "org.kuali.rice.krad.util.GlobalVariables" ]
import org.kuali.kfs.sys.document.validation.event.AttributedDocumentEventBase; import org.kuali.rice.krad.util.GlobalVariables;
import org.kuali.kfs.sys.document.validation.event.*; import org.kuali.rice.krad.util.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
2,475,597
public void setUp() throws SQLException { CallableStatement cs = prepareCall("CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)"); cs.close(); object_ = cs; } } private static class ConnectionObjectDecorator extends ObjectDecorator { ...
void function() throws SQLException { CallableStatement cs = prepareCall(STR); cs.close(); object_ = cs; } } private static class ConnectionObjectDecorator extends ObjectDecorator { public ConnectionObjectDecorator(Test test, DataSourceDecorator decorator) { super(test, decorator); }
/** * Sets up the test. Prepares a call and closes the statement. * * @exception SQLException if an error occurs */
Sets up the test. Prepares a call and closes the statement
setUp
{ "repo_name": "trejkaz/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ClosedObjectTest.java", "license": "apache-2.0", "size": 31420 }
[ "java.sql.CallableStatement", "java.sql.SQLException", "junit.framework.Test" ]
import java.sql.CallableStatement; import java.sql.SQLException; import junit.framework.Test;
import java.sql.*; import junit.framework.*;
[ "java.sql", "junit.framework" ]
java.sql; junit.framework;
1,983,649
StringBuilder targetAddress = new StringBuilder(TELEMETRY_ENDPOINT_NAME).append(Objects.requireNonNull(tenantId)); if (deviceId != null && deviceId.length() > 0) { targetAddress.append("/").append(deviceId); } return targetAddress.toString(); }
StringBuilder targetAddress = new StringBuilder(TELEMETRY_ENDPOINT_NAME).append(Objects.requireNonNull(tenantId)); if (deviceId != null && deviceId.length() > 0) { targetAddress.append("/").append(deviceId); } return targetAddress.toString(); }
/** * Gets the AMQP <em>target</em> address to use for uploading data to Hono's telemetry endpoint. * * @param tenantId The tenant to upload data for. * @param deviceId The device to upload data for. If {@code null}, the target address can be used * to upload data for arbitrary...
Gets the AMQP target address to use for uploading data to Hono's telemetry endpoint
getTargetAddress
{ "repo_name": "kinbod/hono", "path": "client/src/main/java/org/eclipse/hono/client/impl/TelemetrySenderImpl.java", "license": "epl-1.0", "size": 4110 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,112,515
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<VirtualMachineInner>, VirtualMachineInner> beginUpdate( String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, Context context) { return beginUpdateAsync(resourceGroupName, vmName, pa...
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<VirtualMachineInner>, VirtualMachineInner> function( String resourceGroupName, String vmName, VirtualMachineUpdateInner parameters, Context context) { return beginUpdateAsync(resourceGroupName, vmName, parameters, context).getSyncPoller()...
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @param context The context to associate with thi...
The operation to update a virtual machine
beginUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java", "license": "mit", "size": 333925 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineInner", "com.azure.resourcemanager.co...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineInner; import com.azur...
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
902,586
private void trySyncUp(int numberChanges, MergeMode mergeMode) throws JSONException { trySyncUp(new SyncUpTarget(), numberChanges, mergeMode); }
void function(int numberChanges, MergeMode mergeMode) throws JSONException { trySyncUp(new SyncUpTarget(), numberChanges, mergeMode); }
/** * Sync up helper * @param numberChanges * @param mergeMode * @throws JSONException */
Sync up helper
trySyncUp
{ "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.SyncState", "com.salesforce.androidsdk.smartsync.util.SyncUpTarget", "org.json.JSONException" ]
import com.salesforce.androidsdk.smartsync.util.SyncState; import com.salesforce.androidsdk.smartsync.util.SyncUpTarget; import org.json.JSONException;
import com.salesforce.androidsdk.smartsync.util.*; import org.json.*;
[ "com.salesforce.androidsdk", "org.json" ]
com.salesforce.androidsdk; org.json;
2,502,202
@Test public void testBasicCounterMapOperations() throws Throwable { AtomixAtomicCounterMap map = createAtomixClient().getResource("testBasicCounterMapOperationMap", AtomixAtomicCounterMap.class).join(); map.isEmpty().thenAccept(isEmpty -> { assertTrue(isEmpty); ...
void function() throws Throwable { AtomixAtomicCounterMap map = createAtomixClient().getResource(STR, AtomixAtomicCounterMap.class).join(); map.isEmpty().thenAccept(isEmpty -> { assertTrue(isEmpty); }).join(); map.size().thenAccept(size -> { assertTrue(size == 0); }).join(); map.put("foo", 2).thenAccept(value -> { asse...
/** * Tests basic counter map operations. */
Tests basic counter map operations
testBasicCounterMapOperations
{ "repo_name": "donNewtonAlpha/onos", "path": "core/store/primitives/src/test/java/org/onosproject/store/primitives/resources/impl/AtomixAtomicCounterMapTest.java", "license": "apache-2.0", "size": 4826 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
581,454
public void addBusinessFilterToOwnedServiceInvocations(ViewerFilter filter);
void function(ViewerFilter filter);
/** * Adds the given filter to the ownedServiceInvocations edition editor. * * @param filter * a viewer filter * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter) * */
Adds the given filter to the ownedServiceInvocations edition editor
addBusinessFilterToOwnedServiceInvocations
{ "repo_name": "lbroudoux/eip-designer", "path": "plugins/com.github.lbroudoux.dsl.eip.edit/src-eef/com/github/lbroudoux/dsl/eip/parts/ServiceActivatorPropertiesEditionPart.java", "license": "apache-2.0", "size": 3979 }
[ "org.eclipse.jface.viewers.ViewerFilter" ]
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,871,946
public List<JobInstance> getJobInstances(String jobName, int start, int count)throws NoSuchJobException, JobSecurityException;
List<JobInstance> function(String jobName, int start, int count)throws NoSuchJobException, JobSecurityException;
/** * Returns all JobInstances belonging to a job with a particular name * in reverse chronological order. * * @param jobName * specifies the job name. * @param start * specifies the relative starting number (zero based) to * return from the * m...
Returns all JobInstances belonging to a job with a particular name in reverse chronological order
getJobInstances
{ "repo_name": "sidgoyal/standards.jsr352.jbatch", "path": "javax.batch/src/main/java/javax/batch/operations/JobOperator.java", "license": "apache-2.0", "size": 13915 }
[ "java.util.List", "javax.batch.runtime.JobInstance" ]
import java.util.List; import javax.batch.runtime.JobInstance;
import java.util.*; import javax.batch.runtime.*;
[ "java.util", "javax.batch" ]
java.util; javax.batch;
346,472
private void focusNext() { final Element current = Elements.getDocument().getActiveElement(); if (current.getParentElement().isEqualNode(listElement)) { final Element next = current.getNextElementSibling(); if (next != null) { select(next); next.focus(); } else { focu...
void function() { final Element current = Elements.getDocument().getActiveElement(); if (current.getParentElement().isEqualNode(listElement)) { final Element next = current.getNextElementSibling(); if (next != null) { select(next); next.focus(); } else { focusFirst(); } } else { focusFirst(); } }
/** * Focus the next item in the list, or the first item if we are already at the last. In the case * the list doesn't currently have focus, focus the first element. */
Focus the next item in the list, or the first item if we are already at the last. In the case the list doesn't currently have focus, focus the first element
focusNext
{ "repo_name": "TypeFox/che", "path": "ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/popup/PopupKeyDownListener.java", "license": "epl-1.0", "size": 5124 }
[ "org.eclipse.che.ide.util.dom.Elements" ]
import org.eclipse.che.ide.util.dom.Elements;
import org.eclipse.che.ide.util.dom.*;
[ "org.eclipse.che" ]
org.eclipse.che;
397,271
@RequestProcessing(value = "/blog/symphony/user", method = HTTPRequestMethod.GET) public void syncUser(final HTTPRequestContext context) throws Exception { final JSONRenderer renderer = new JSONRenderer(); context.setRenderer(renderer); final JSONObject jsonObject = new JSONObject(); ...
@RequestProcessing(value = STR, method = HTTPRequestMethod.GET) void function(final HTTPRequestContext context) throws Exception { final JSONRenderer renderer = new JSONRenderer(); context.setRenderer(renderer); final JSONObject jsonObject = new JSONObject(); renderer.setJSONObject(jsonObject); if (Latkes.getServePath(...
/** * Sync user to https://hacpai.com. * * @param context the specified context * @throws Exception exception */
Sync user to HREF
syncUser
{ "repo_name": "fengjx/solo", "path": "src/main/java/org/b3log/solo/processor/BlogProcessor.java", "license": "apache-2.0", "size": 10890 }
[ "org.b3log.latke.Latkes", "org.b3log.latke.model.User", "org.b3log.latke.servlet.HTTPRequestContext", "org.b3log.latke.servlet.HTTPRequestMethod", "org.b3log.latke.servlet.annotation.RequestProcessing", "org.b3log.latke.servlet.renderer.JSONRenderer", "org.b3log.latke.urlfetch.HTTPRequest", "org.b3log...
import org.b3log.latke.Latkes; import org.b3log.latke.model.User; import org.b3log.latke.servlet.HTTPRequestContext; import org.b3log.latke.servlet.HTTPRequestMethod; import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.renderer.JSONRenderer; import org.b3log.latke.urlfetch.HTTPRe...
import org.b3log.latke.*; import org.b3log.latke.model.*; import org.b3log.latke.servlet.*; import org.b3log.latke.servlet.annotation.*; import org.b3log.latke.servlet.renderer.*; import org.b3log.latke.urlfetch.*; import org.b3log.solo.*; import org.b3log.solo.model.*; import org.json.*;
[ "org.b3log.latke", "org.b3log.solo", "org.json" ]
org.b3log.latke; org.b3log.solo; org.json;
1,627,379
protected ManagementMBeanAssembler createManagementMBeanAssembler() { return new DefaultManagementMBeanAssembler(this); }
ManagementMBeanAssembler function() { return new DefaultManagementMBeanAssembler(this); }
/** * Lazily create a default implementation */
Lazily create a default implementation
createManagementMBeanAssembler
{ "repo_name": "sabre1041/camel", "path": "camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java", "license": "apache-2.0", "size": 175745 }
[ "org.apache.camel.management.DefaultManagementMBeanAssembler", "org.apache.camel.spi.ManagementMBeanAssembler" ]
import org.apache.camel.management.DefaultManagementMBeanAssembler; import org.apache.camel.spi.ManagementMBeanAssembler;
import org.apache.camel.management.*; import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
692,865
String getText(ParserRuleContext ctx) { return ctx.start.getInputStream().getText(new Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex())); }
String getText(ParserRuleContext ctx) { return ctx.start.getInputStream().getText(new Interval(ctx.start.getStartIndex(), ctx.stop.getStopIndex())); }
/** * Get node text including spaces */
Get node text including spaces
getText
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "hplsql/src/main/java/org/apache/hive/hplsql/Select.java", "license": "apache-2.0", "size": 14791 }
[ "org.antlr.v4.runtime.ParserRuleContext", "org.antlr.v4.runtime.misc.Interval" ]
import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.misc.Interval;
import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,793,249
@Override public void addParameterDefinition( String key, String defValue, String description ) throws DuplicateParamException { namedParams.addParameterDefinition( key, defValue, description ); }
void function( String key, String defValue, String description ) throws DuplicateParamException { namedParams.addParameterDefinition( key, defValue, description ); }
/** * Adds a parameter definition to this transformation. * * @param key * the name of the parameter * @param defValue * the default value for the parameter * @param description * the description of the parameter * @throws DuplicateParamException * the ...
Adds a parameter definition to this transformation
addParameterDefinition
{ "repo_name": "mdamour1976/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 199226 }
[ "org.pentaho.di.core.parameters.DuplicateParamException" ]
import org.pentaho.di.core.parameters.DuplicateParamException;
import org.pentaho.di.core.parameters.*;
[ "org.pentaho.di" ]
org.pentaho.di;
384,310
@RequirePOST public void doSafeRestart(StaplerRequest request, StaplerResponse response) throws IOException, ServletException { synchronized (jobs) { if (!isRestartScheduled()) { addJob(new RestartJenkinsJob(getCoreSource())); LOGGER.info("Scheduling Jenkins r...
void function(StaplerRequest request, StaplerResponse response) throws IOException, ServletException { synchronized (jobs) { if (!isRestartScheduled()) { addJob(new RestartJenkinsJob(getCoreSource())); LOGGER.info(STR); } } response.sendRedirect2("."); }
/** * Schedules a Jenkins restart. */
Schedules a Jenkins restart
doSafeRestart
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/model/UpdateCenter.java", "license": "mit", "size": 94384 }
[ "java.io.IOException", "javax.servlet.ServletException", "org.kohsuke.stapler.StaplerRequest", "org.kohsuke.stapler.StaplerResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse;
import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*;
[ "java.io", "javax.servlet", "org.kohsuke.stapler" ]
java.io; javax.servlet; org.kohsuke.stapler;
1,150,055
@Test public void testReplication0Root3() throws Exception { int replicationFactor = 3; Number160 key = new Number160("0xa"); int[][] expectedA = // as first node, node a has to replicate key a { { 1, 0, 0 }, // node b joins, node b is in replica set of key a, node a // remains responsible, node a h...
void function() throws Exception { int replicationFactor = 3; Number160 key = new Number160("0xa"); int[][] expectedA = { { 1, 0, 0 }, { 0, 1, 0 }, { 0, 1, 0 }, { 0, 0, 0 }}; int[][] leaveA = { { 1, 0, 0 }, { 1, 0, 0 }, { 1, 0, 0 }}; testReplication(key, replicationFactor, false, expectedA, leaveA); key = new Number160...
/** * Test the responsibility and the notifications for the 0-root replication * approach with replication factor 3. * * @throws Exception */
Test the responsibility and the notifications for the 0-root replication approach with replication factor 3
testReplication0Root3
{ "repo_name": "tomp2p/TomP2P", "path": "replication/src/test/java/net/tomp2p/replication/TestStoreReplication.java", "license": "apache-2.0", "size": 42588 }
[ "net.tomp2p.peers.Number160" ]
import net.tomp2p.peers.Number160;
import net.tomp2p.peers.*;
[ "net.tomp2p.peers" ]
net.tomp2p.peers;
1,550,285
public void storeAsURL( final String _url ) throws IOException { m_storeDoc.storeAsURL( _url, new PropertyValue[] { } ); } private DataSource m_dataSource; private XOfficeDatabaseDocument m_databaseDocument; private XModel m_model; private XStorable ...
void function( final String _url ) throws IOException { m_storeDoc.storeAsURL( _url, new PropertyValue[] { } ); } private DataSource m_dataSource; private XOfficeDatabaseDocument m_databaseDocument; private XModel m_model; private XStorable m_storeDoc;
/** * simplified version (taking no arguments except the target URL) of XStorage.storeAsURL * @param _url * specifies the location to where to store the document */
simplified version (taking no arguments except the target URL) of XStorage.storeAsURL
storeAsURL
{ "repo_name": "qt-haiku/LibreOffice", "path": "qadevOOo/runner/util/db/DatabaseDocument.java", "license": "gpl-3.0", "size": 2693 }
[ "com.sun.star.beans.PropertyValue", "com.sun.star.frame.XModel", "com.sun.star.frame.XStorable", "com.sun.star.io.IOException", "com.sun.star.sdb.XOfficeDatabaseDocument" ]
import com.sun.star.beans.PropertyValue; import com.sun.star.frame.XModel; import com.sun.star.frame.XStorable; import com.sun.star.io.IOException; import com.sun.star.sdb.XOfficeDatabaseDocument;
import com.sun.star.beans.*; import com.sun.star.frame.*; import com.sun.star.io.*; import com.sun.star.sdb.*;
[ "com.sun.star" ]
com.sun.star;
784,101
@NonNull public Builder setOnSTDOUTLineListener(@Nullable OnLineListener onLineListener) { this.onSTDOUTLineListener = onLineListener; return this; }
Builder function(@Nullable OnLineListener onLineListener) { this.onSTDOUTLineListener = onLineListener; return this; }
/** * <p> * Set a callback called for every line output to STDOUT by the shell * </p> * <p> * The thread on which the callback executes is dependent on various * factors, see {@link Interactive} for further details * </p> * * @param onLine...
Set a callback called for every line output to STDOUT by the shell The thread on which the callback executes is dependent on various factors, see <code>Interactive</code> for further details
setOnSTDOUTLineListener
{ "repo_name": "Chainfire/libsuperuser", "path": "libsuperuser/src/eu/chainfire/libsuperuser/Shell.java", "license": "apache-2.0", "size": 145938 }
[ "androidx.annotation.Nullable", "eu.chainfire.libsuperuser.StreamGobbler" ]
import androidx.annotation.Nullable; import eu.chainfire.libsuperuser.StreamGobbler;
import androidx.annotation.*; import eu.chainfire.libsuperuser.*;
[ "androidx.annotation", "eu.chainfire.libsuperuser" ]
androidx.annotation; eu.chainfire.libsuperuser;
2,264,255
private void modified(final ModifiedEnum modified) { byte b = flags; if (modified == null) { throw new IllegalArgumentException(); } else { switch(modified) { case NONE: b = Bits.set(Bits.set(b, MODIFIED_BIT, false), (MODIFIED_BIT+1), false); break; case INSERTED: b = Bits.set(B...
void function(final ModifiedEnum modified) { byte b = flags; if (modified == null) { throw new IllegalArgumentException(); } else { switch(modified) { case NONE: b = Bits.set(Bits.set(b, MODIFIED_BIT, false), (MODIFIED_BIT+1), false); break; case INSERTED: b = Bits.set(Bits.set(b, MODIFIED_BIT, true), (MODIFIED_BIT+1),...
/** * Modified enum is hiding in the 3 and 4 bits of the flags. */
Modified enum is hiding in the 3 and 4 bits of the flags
modified
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata-rdf/src/java/com/bigdata/rdf/spo/SPO.java", "license": "gpl-2.0", "size": 23463 }
[ "com.bigdata.util.Bits" ]
import com.bigdata.util.Bits;
import com.bigdata.util.*;
[ "com.bigdata.util" ]
com.bigdata.util;
1,898,884
public native void extractVars(Set<String> vars);
native void function(Set<String> vars);
/** * void extractVars(std::set<std::string>& vars) const; */
void extractVars(std::set& vars) const
extractVars
{ "repo_name": "bgabbasov/menta-0.3", "path": "jni_pln/src/main/scala/fi/neter/opencog/reasoning/pln/Atom.java", "license": "gpl-3.0", "size": 7216 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,030,435
public void setHideNativeVideoControls(boolean hideNativeControls) { this.hideNativeVideoControls = hideNativeControls; if (video != null) { video.setVariable(Media.VARIABLE_NATIVE_CONTRLOLS_EMBEDDED, !hideNativeControls && showControls); } }
void function(boolean hideNativeControls) { this.hideNativeVideoControls = hideNativeControls; if (video != null) { video.setVariable(Media.VARIABLE_NATIVE_CONTRLOLS_EMBEDDED, !hideNativeControls && showControls); } }
/** * On platforms that include native video player controls (Android and iOS), this allows you * to hide those controls. * @param hideNativeControls Set {@literal true} to hide the native video controls for this player. * @see Display#isNativeVideoPlayerControlsIncluded() * @see #setHideNativ...
On platforms that include native video player controls (Android and iOS), this allows you to hide those controls
setHideNativeVideoControls
{ "repo_name": "codenameone/CodenameOne", "path": "CodenameOne/src/com/codename1/components/MediaPlayer.java", "license": "gpl-2.0", "size": 28152 }
[ "com.codename1.media.Media" ]
import com.codename1.media.Media;
import com.codename1.media.*;
[ "com.codename1.media" ]
com.codename1.media;
831,012
@SuppressWarnings("unchecked") private static Class<? extends Activity> getRestartActivityClassWithIntentFilter(Context context) { List<ResolveInfo> resolveInfos = context.getPackageManager().queryIntentActivities( new Intent().setAction(INTENT_ACTION_RESTART_ACTIVITY), ...
@SuppressWarnings(STR) static Class<? extends Activity> function(Context context) { List<ResolveInfo> resolveInfos = context.getPackageManager().queryIntentActivities( new Intent().setAction(INTENT_ACTION_RESTART_ACTIVITY), PackageManager.GET_RESOLVED_FILTER); for (ResolveInfo info : resolveInfos) { if (info.activityIn...
/** * INTERNAL method used to get the first activity with an intent-filter <action android:name="cat.ereza.customactivityoncrash.RESTART" />, * If there is no activity with that intent filter, this returns null. * * @param context A valid context. Must not be null. * @return A valid activi...
INTERNAL method used to get the first activity with an intent-filter , If there is no activity with that intent filter, this returns null
getRestartActivityClassWithIntentFilter
{ "repo_name": "angcyo/RLibrary", "path": "uiview/src/main/java/com/angcyo/uiview/RCrashHandler.java", "license": "apache-2.0", "size": 29021 }
[ "android.app.Activity", "android.content.Context", "android.content.Intent", "android.content.pm.PackageManager", "android.content.pm.ResolveInfo", "android.util.Log", "java.util.List" ]
import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.util.Log; import java.util.List;
import android.app.*; import android.content.*; import android.content.pm.*; import android.util.*; import java.util.*;
[ "android.app", "android.content", "android.util", "java.util" ]
android.app; android.content; android.util; java.util;
1,384,275
default TemporalUnitOffset byLessThan(long value, TemporalUnit unit) { return Assertions.byLessThan(value, unit); } /** * A syntax sugar to write fluent assertion using {@link ObjectAssert#returns(Object, Function)}. * <p> * Example: * <pre><code class="java"> Jedi yoda = new Jedi("Yoda", "Green"...
default TemporalUnitOffset byLessThan(long value, TemporalUnit unit) { return Assertions.byLessThan(value, unit); } /** * A syntax sugar to write fluent assertion using {@link ObjectAssert#returns(Object, Function)}. * <p> * Example: * <pre><code class="java"> Jedi yoda = new Jedi("Yoda", "Green"); * assertThat(yoda).r...
/** * Assertions entry point for {@link TemporalUnitOffset} with strict less than condition * to use with {@code isCloseTo} temporal assertions. * <p> * Typical usage : * <pre><code class='java'> LocalTime _07_10 = LocalTime.of(7, 10); * LocalTime _07_12 = LocalTime.of(7, 12); * assertThat(_07_10)...
Assertions entry point for <code>TemporalUnitOffset</code> with strict less than condition to use with isCloseTo temporal assertions. Typical usage : <code> LocalTime _07_10 = LocalTime.of(7, 10); LocalTime _07_12 = LocalTime.of(7, 12); assertThat(_07_10).isCloseTo(_07_12, byLessThan(5, ChronoUnit.MINUTES));</code></co...
byLessThan
{ "repo_name": "ChrisA89/assertj-core", "path": "src/main/java/org/assertj/core/api/WithAssertions.java", "license": "apache-2.0", "size": 102131 }
[ "java.time.temporal.TemporalUnit", "java.util.function.Function", "org.assertj.core.data.TemporalUnitOffset" ]
import java.time.temporal.TemporalUnit; import java.util.function.Function; import org.assertj.core.data.TemporalUnitOffset;
import java.time.temporal.*; import java.util.function.*; import org.assertj.core.data.*;
[ "java.time", "java.util", "org.assertj.core" ]
java.time; java.util; org.assertj.core;
242,333
socket = new Socket(SERVER_IP, PUERTO); //IP y PORT del Server. in = socket.getInputStream(); out = socket.getOutputStream(); oos = new ObjectOutputStream(out); ois = new ObjectInputStream(in); }
socket = new Socket(SERVER_IP, PUERTO); in = socket.getInputStream(); out = socket.getOutputStream(); oos = new ObjectOutputStream(out); ois = new ObjectInputStream(in); }
/** * Pasos necesarios a realizar antes de ejecutar cualquier accion. * Al final habra que usar la cabecera de fin para cerrar estas conexiones. * @throws IOException Posible excepcion lanzada por las conexiones al abrirse. */
Pasos necesarios a realizar antes de ejecutar cualquier accion. Al final habra que usar la cabecera de fin para cerrar estas conexiones
cabeceraComienzoConexion
{ "repo_name": "MarioCodes/Desarrollo_Proyectos_Clase", "path": "java/Encryption/SignedSymmetricFileServer/src/cliente/controlador/Red.java", "license": "apache-2.0", "size": 10334 }
[ "java.io.ObjectInputStream", "java.io.ObjectOutputStream", "java.net.Socket" ]
import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.Socket;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,607,862
public boolean isTransformable(String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options); /** * Sub component of {@link #isTransformable(String, long, String, TransformationOptions)}
boolean function(String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options); /** * Sub component of {@link #isTransformable(String, long, String, TransformationOptions)}
/** * Indicates whether the provided source mimetype can be transformed into the target mimetype with * the options specified by this content transformer. * * @param sourceMimetype the source mimetype * @param sourceSize the size (bytes) of the source. If negati...
Indicates whether the provided source mimetype can be transformed into the target mimetype with the options specified by this content transformer
isTransformable
{ "repo_name": "deas/alfresco-community-edition", "path": "projects/repository/source/java/org/alfresco/repo/content/transform/ContentTransformer.java", "license": "lgpl-3.0", "size": 9592 }
[ "org.alfresco.service.cmr.repository.TransformationOptions" ]
import org.alfresco.service.cmr.repository.TransformationOptions;
import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.service" ]
org.alfresco.service;
693,048
if(e==null){ throw new IllegalArgumentException("Edges cannot be null"); } Vertex origin = e.getOrigin(); Vertex dest = e.getDest(); if(!vertices.contains(origin)){ throw new IllegalArgumentException("Edge origin vertex "+origin+" is not in set of vertices"); } ...
if(e==null){ throw new IllegalArgumentException(STR); } Vertex origin = e.getOrigin(); Vertex dest = e.getDest(); if(!vertices.contains(origin)){ throw new IllegalArgumentException(STR+origin+STR); } if(!vertices.contains(dest)){ throw new IllegalArgumentException(STR+dest+STR); } return edges.add(e); }
/** * Adds an Edge e to this graph * @param e The <CODE>Edge</CODE> to add to this Graph.<br> * <CODE>e</CODE> must not be null, and <CODE>e.getOrigin()</CODE> and <CODE>e.getDest()</CODE> must both be <CODE>Vertex</CODE>es in this Graph. * @return <CODE>false</CODE> if <CODE>e</CODE> is already...
Adds an Edge e to this graph
addEdge
{ "repo_name": "jffry/olin-directions", "path": "edu/olin/maps/graph/weighted/space/SpaceGraph.java", "license": "gpl-2.0", "size": 9358 }
[ "edu.olin.maps.graph.Vertex" ]
import edu.olin.maps.graph.Vertex;
import edu.olin.maps.graph.*;
[ "edu.olin.maps" ]
edu.olin.maps;
2,645,529
public Demographics randomCity(RandomNumberGenerator random) { if (city != null) { // if we're only generating one city at a time, just use the largest entry for that one city if (fixedCity == null) { fixedCity = demographics.values().stream() .filter(d -> d.city.equalsIgnoreCase(cit...
Demographics function(RandomNumberGenerator random) { if (city != null) { if (fixedCity == null) { fixedCity = demographics.values().stream() .filter(d -> d.city.equalsIgnoreCase(city)) .sorted().findFirst().get(); } return fixedCity; } return demographics.get(randomCityId(random)); }
/** * Pick the name of a random city from the current "world". * If only one city was selected, this will return that one city. * * @param random The source of randomness. * @return Demographics of a random city. */
Pick the name of a random city from the current "world". If only one city was selected, this will return that one city
randomCity
{ "repo_name": "synthetichealth/synthea", "path": "src/main/java/org/mitre/synthea/world/geography/Location.java", "license": "apache-2.0", "size": 21101 }
[ "org.mitre.synthea.helpers.RandomNumberGenerator" ]
import org.mitre.synthea.helpers.RandomNumberGenerator;
import org.mitre.synthea.helpers.*;
[ "org.mitre.synthea" ]
org.mitre.synthea;
237,017
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == ODK_COLLECT_TAG_ACTIVITY_CODE) { if (resultCode == RESULT_OK) { String osmXmlFileFullPath = ODKCollectHandler.getODKCollectData().getOSMFileFullPath(); ...
void function(int requestCode, int resultCode, Intent data) { if (requestCode == ODK_COLLECT_TAG_ACTIVITY_CODE) { if (resultCode == RESULT_OK) { String osmXmlFileFullPath = ODKCollectHandler.getODKCollectData().getOSMFileFullPath(); String osmXmlFileName = ODKCollectHandler.getODKCollectData().getOSMFileName(); Intent ...
/** * For sending results from the 'create tag' or 'edit tag' activities back to a third party app (e.g. ODK Collect) * * @param requestCode * @param resultCode * @param data */
For sending results from the 'create tag' or 'edit tag' activities back to a third party app (e.g. ODK Collect)
onActivityResult
{ "repo_name": "mikelmaron/OpenMapKit", "path": "app/src/main/java/org/redcross/openmapkit/MapActivity.java", "license": "gpl-3.0", "size": 18065 }
[ "android.app.Activity", "android.content.Intent", "org.redcross.openmapkit.odkcollect.ODKCollectHandler" ]
import android.app.Activity; import android.content.Intent; import org.redcross.openmapkit.odkcollect.ODKCollectHandler;
import android.app.*; import android.content.*; import org.redcross.openmapkit.odkcollect.*;
[ "android.app", "android.content", "org.redcross.openmapkit" ]
android.app; android.content; org.redcross.openmapkit;
1,095,856
public WindowDeclarationDescr windowDeclaration(DeclareDescrBuilder ddb) throws RecognitionException { WindowDeclarationDescrBuilder declare = null; try { declare = helper.start(ddb, WindowDeclarationDescrBuilder.class, null); setAnnot...
WindowDeclarationDescr function(DeclareDescrBuilder ddb) throws RecognitionException { WindowDeclarationDescrBuilder declare = null; try { declare = helper.start(ddb, WindowDeclarationDescrBuilder.class, null); setAnnotationsOn(declare); String window = ""; match(input, DRL6Lexer.ID, DroolsSoftKeywords.WINDOW, null, Dr...
/** * windowDeclaration := annotation* WINDOW ID lhsPatternBind END * * @return * @throws org.antlr.runtime.RecognitionException */
windowDeclaration := annotation* WINDOW ID lhsPatternBind END
windowDeclaration
{ "repo_name": "wmedvede/drools", "path": "drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java", "license": "apache-2.0", "size": 172960 }
[ "org.antlr.runtime.RecognitionException", "org.antlr.runtime.Token", "org.drools.compiler.lang.api.DeclareDescrBuilder", "org.drools.compiler.lang.api.WindowDeclarationDescrBuilder", "org.drools.compiler.lang.descr.WindowDeclarationDescr" ]
import org.antlr.runtime.RecognitionException; import org.antlr.runtime.Token; import org.drools.compiler.lang.api.DeclareDescrBuilder; import org.drools.compiler.lang.api.WindowDeclarationDescrBuilder; import org.drools.compiler.lang.descr.WindowDeclarationDescr;
import org.antlr.runtime.*; import org.drools.compiler.lang.api.*; import org.drools.compiler.lang.descr.*;
[ "org.antlr.runtime", "org.drools.compiler" ]
org.antlr.runtime; org.drools.compiler;
2,362,075
public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> fullDuplexCall( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) { return asyncUnimplementedStreamingCall(getFullDuplexCallMethod(), respon...
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> function( io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) { return asyncUnimplementedStreamingCall(getFullDuplexCallMethod(), responseObserver); }
/** * <pre> * A sequence of requests with each request served by the server immediately. * As one request could lead to multiple responses, this interface * demonstrates the idea of full duplexing. * </pre> */
<code> A sequence of requests with each request served by the server immediately. As one request could lead to multiple responses, this interface demonstrates the idea of full duplexing. </code>
fullDuplexCall
{ "repo_name": "rmichela/grpc-java", "path": "interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java", "license": "apache-2.0", "size": 43307 }
[ "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,641,808
@Nullable public byte[] remove(@Nullable String spaceName, int part, KeyCacheObject key, byte[] keyBytes) throws IgniteCheckedException { GridOffHeapPartitionedMap m = offheap(spaceName); return m == null ? null : m.remove(part, U.hash(key), keyBytes(key, keyBytes)); }
@Nullable byte[] function(@Nullable String spaceName, int part, KeyCacheObject key, byte[] keyBytes) throws IgniteCheckedException { GridOffHeapPartitionedMap m = offheap(spaceName); return m == null ? null : m.remove(part, U.hash(key), keyBytes(key, keyBytes)); }
/** * Removes value from offheap space for the given key. * * @param spaceName Space name. * @param part Partition. * @param key Key. * @param keyBytes Key bytes. * @return Value bytes. * @throws IgniteCheckedException If failed. */
Removes value from offheap space for the given key
remove
{ "repo_name": "dlnufox/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/offheap/GridOffHeapProcessor.java", "license": "apache-2.0", "size": 13435 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.KeyCacheObject", "org.apache.ignite.internal.util.offheap.GridOffHeapPartitionedMap", "org.apache.ignite.internal.util.typedef.internal.U", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.KeyCacheObject; import org.apache.ignite.internal.util.offheap.GridOffHeapPartitionedMap; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.util.offheap.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
2,310,298
public TimesheetObject revertTimesheet(String accessToken, String xeroTenantId, UUID timesheetID) throws IOException { try { TypeReference<TimesheetObject> typeRef = new TypeReference<TimesheetObject>() {}; HttpResponse response = revertTimesheetForHttpResponse(accessToken, xeroTenantI...
TimesheetObject function(String accessToken, String xeroTenantId, UUID timesheetID) throws IOException { try { TypeReference<TimesheetObject> typeRef = new TypeReference<TimesheetObject>() {}; HttpResponse response = revertTimesheetForHttpResponse(accessToken, xeroTenantId, timesheetID); return apiClient.getObjectMappe...
/** * revert a timesheet to draft * * <p><b>200</b> - search results matching criteria * * <p><b>400</b> - validation error for a bad request * * @param xeroTenantId Xero identifier for Tenant * @param timesheetID Identifier for the timesheet * @param accessToken Authorization token for user ...
revert a timesheet to draft 200 - search results matching criteria 400 - validation error for a bad request
revertTimesheet
{ "repo_name": "SidneyAllen/Xero-Java", "path": "src/main/java/com/xero/api/client/PayrollUkApi.java", "license": "mit", "size": 285506 }
[ "com.fasterxml.jackson.core.type.TypeReference", "com.google.api.client.http.HttpResponse", "com.google.api.client.http.HttpResponseException", "com.xero.api.XeroApiExceptionHandler", "com.xero.models.payrolluk.TimesheetObject", "java.io.IOException" ]
import com.fasterxml.jackson.core.type.TypeReference; import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpResponseException; import com.xero.api.XeroApiExceptionHandler; import com.xero.models.payrolluk.TimesheetObject; import java.io.IOException;
import com.fasterxml.jackson.core.type.*; import com.google.api.client.http.*; import com.xero.api.*; import com.xero.models.payrolluk.*; import java.io.*;
[ "com.fasterxml.jackson", "com.google.api", "com.xero.api", "com.xero.models", "java.io" ]
com.fasterxml.jackson; com.google.api; com.xero.api; com.xero.models; java.io;
1,843,984
protected void installProvider(WorkQueue wq) { SimplePrecedenceProvider precedenceProvider = new SimplePrecedenceProvider(calculatePrecedence(wq)); wq.setPrecedenceProvider(precedenceProvider); }
void function(WorkQueue wq) { SimplePrecedenceProvider precedenceProvider = new SimplePrecedenceProvider(calculatePrecedence(wq)); wq.setPrecedenceProvider(precedenceProvider); }
/** * Install the appropriate provider helper object into the WorkQueue, * if necessary. * * @param wq target WorkQueue this policy will operate on */
Install the appropriate provider helper object into the WorkQueue, if necessary
installProvider
{ "repo_name": "searchtechnologies/heritrix-connector", "path": "engine-3.1.1/engine/src/main/java/org/archive/crawler/frontier/precedence/BaseQueuePrecedencePolicy.java", "license": "apache-2.0", "size": 3575 }
[ "org.archive.crawler.frontier.WorkQueue" ]
import org.archive.crawler.frontier.WorkQueue;
import org.archive.crawler.frontier.*;
[ "org.archive.crawler" ]
org.archive.crawler;
1,187,638
@Override public void sawOpcode(int seen) { try { stack.precomputation(this); Integer pc = Integer.valueOf(getPC()); nullGuards.remove(pc); switch (seen) { case IFNULL: { if (stack.getStackDepth() > 0) { Op...
void function(int seen) { try { stack.precomputation(this); Integer pc = Integer.valueOf(getPC()); nullGuards.remove(pc); switch (seen) { case IFNULL: { if (stack.getStackDepth() > 0) { OpcodeStack.Item item = stack.getStackItem(0); int reg = item.getRegisterNumber(); Integer target = Integer.valueOf(getBranchTarget())...
/** * overrides the visitor to look for bad null guards * * @param seen * the opcode of the currently visited instruction */
overrides the visitor to look for bad null guards
sawOpcode
{ "repo_name": "crow-misia/fb-contrib", "path": "src/com/mebigfatguy/fbcontrib/detect/SuspiciousNullGuard.java", "license": "lgpl-2.1", "size": 8909 }
[ "com.mebigfatguy.fbcontrib.utils.BugType", "com.mebigfatguy.fbcontrib.utils.RegisterUtils", "edu.umd.cs.findbugs.BugInstance", "edu.umd.cs.findbugs.OpcodeStack", "edu.umd.cs.findbugs.ba.XField" ]
import com.mebigfatguy.fbcontrib.utils.BugType; import com.mebigfatguy.fbcontrib.utils.RegisterUtils; import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.OpcodeStack; import edu.umd.cs.findbugs.ba.XField;
import com.mebigfatguy.fbcontrib.utils.*; import edu.umd.cs.findbugs.*; import edu.umd.cs.findbugs.ba.*;
[ "com.mebigfatguy.fbcontrib", "edu.umd.cs" ]
com.mebigfatguy.fbcontrib; edu.umd.cs;
2,796,142
//----------------------------------------------------------------------- public Currency getBaseCurrency() { return _baseCurrency; }
Currency function() { return _baseCurrency; }
/** * Gets the base currency. * @return the value of the property, not null */
Gets the base currency
getBaseCurrency
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial-types/src/main/java/com/opengamma/financial/security/fx/FXVolatilitySwapSecurity.java", "license": "apache-2.0", "size": 16178 }
[ "com.opengamma.util.money.Currency" ]
import com.opengamma.util.money.Currency;
import com.opengamma.util.money.*;
[ "com.opengamma.util" ]
com.opengamma.util;
2,383,557
protected static String convertStringPropertyValue(CmsObject cms, String propValue, String type, boolean toClient) { if (propValue == null) { return null; } if (toClient) { return CmsXmlContentPropertyHelper.getPropValuePaths(cms, type, propValue); } else { ...
static String function(CmsObject cms, String propValue, String type, boolean toClient) { if (propValue == null) { return null; } if (toClient) { return CmsXmlContentPropertyHelper.getPropValuePaths(cms, type, propValue); } else { return CmsXmlContentPropertyHelper.getPropValueIds(cms, type, propValue); } }
/** * Converts a property value given as a string between server format and client format.<p> * * @param cms the current CMS context * @param propValue the property value to convert * @param type the type of the property * @param toClient if true, convert to client format, else convert ...
Converts a property value given as a string between server format and client format
convertStringPropertyValue
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java", "license": "lgpl-2.1", "size": 34363 }
[ "org.opencms.file.CmsObject" ]
import org.opencms.file.CmsObject;
import org.opencms.file.*;
[ "org.opencms.file" ]
org.opencms.file;
2,384,252
@Nullable static SkylarkAspect loadSkylarkAspect( Environment env, Label extensionLabel, String skylarkValueName) throws AspectCreationException, InterruptedException { SkyKey importFileKey = SkylarkImportLookupValue.key(extensionLabel, false); try { SkylarkImportLookupValue skylarkImportL...
static SkylarkAspect loadSkylarkAspect( Environment env, Label extensionLabel, String skylarkValueName) throws AspectCreationException, InterruptedException { SkyKey importFileKey = SkylarkImportLookupValue.key(extensionLabel, false); try { SkylarkImportLookupValue skylarkImportLookupValue = (SkylarkImportLookupValue) ...
/** * Load Skylark aspect from an extension file. Is to be called from a SkyFunction. * * @return {@code null} if dependencies cannot be satisfied. */
Load Skylark aspect from an extension file. Is to be called from a SkyFunction
loadSkylarkAspect
{ "repo_name": "variac/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java", "license": "apache-2.0", "size": 24116 }
[ "com.google.devtools.build.lib.cmdline.Label", "com.google.devtools.build.lib.events.Event", "com.google.devtools.build.lib.packages.SkylarkAspect", "com.google.devtools.build.lib.skyframe.SkylarkImportLookupFunction", "com.google.devtools.build.lib.syntax.Type", "com.google.devtools.build.skyframe.SkyKey...
import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.packages.SkylarkAspect; import com.google.devtools.build.lib.skyframe.SkylarkImportLookupFunction; import com.google.devtools.build.lib.syntax.Type; import com.google.devtools.buil...
import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.skyframe.*; import com.google.devtools.build.lib.syntax.*; import com.google.devtools.build.skyframe.*;
[ "com.google.devtools" ]
com.google.devtools;
2,294,761
Point getNavigationPoint(IFigure figure) { return figure.getBounds().getCenter(); }
Point getNavigationPoint(IFigure figure) { return figure.getBounds().getCenter(); }
/** * Figures' navigation points are used to determine their direction compared * to one another, and the distance between them. * * @return the center of the given figure */
Figures' navigation points are used to determine their direction compared to one another, and the distance between them
getNavigationPoint
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/gef/ui/parts/GraphicalViewerKeyHandler.java", "license": "epl-1.0", "size": 16778 }
[ "org.eclipse.draw2d.IFigure", "org.eclipse.draw2d.geometry.Point" ]
import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
66,618
@Test public void verifyOffsetListIterator() { int startIndex = 1; Iterator<E> iter = seq.listIterator(startIndex); for (int n = 0; (n < getMaxTests()) && iter.hasNext(); n++) { Assert.assertEquals(seq.get(startIndex + n), iter.next()); } }
void function() { int startIndex = 1; Iterator<E> iter = seq.listIterator(startIndex); for (int n = 0; (n < getMaxTests()) && iter.hasNext(); n++) { Assert.assertEquals(seq.get(startIndex + n), iter.next()); } }
/** * Verify that get() and the offset iterator return identical values. */
Verify that get() and the offset iterator return identical values
verifyOffsetListIterator
{ "repo_name": "beargiles/projecteuler", "path": "src/test/java/com/invariantproperties/projecteuler/AbstractSequenceTest.java", "license": "apache-2.0", "size": 9284 }
[ "java.util.Iterator", "org.junit.Assert" ]
import java.util.Iterator; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,183,244
private void setHttpEntity(SyncScheme.SyncDataFormat format) throws Exception { RequestBody body; switch (format) { case JSON: body = RequestBody.create(JSON, DataFormatUtil.makeJSONString(getParams())); log("setHttpEntity format JSON"); mF...
void function(SyncScheme.SyncDataFormat format) throws Exception { RequestBody body; switch (format) { case JSON: body = RequestBody.create(JSON, DataFormatUtil.makeJSONString(getParams())); log(STR); mFileManager.appendAndClose(STR); break; case XML: body = RequestBody.create(XML, DataFormatUtil.makeXMLString(getParam...
/** * Get HTTP Entity populated with data in a format specified by the current sync scheme */
Get HTTP Entity populated with data in a format specified by the current sync scheme
setHttpEntity
{ "repo_name": "kigsmtua/SMSSync", "path": "smssync/src/main/java/org/addhen/smssync/data/net/MessageHttpClient.java", "license": "lgpl-3.0", "size": 8230 }
[ "com.squareup.okhttp.FormEncodingBuilder", "com.squareup.okhttp.RequestBody", "java.util.List", "org.addhen.smssync.data.entity.SyncScheme", "org.addhen.smssync.domain.entity.HttpNameValuePair", "org.addhen.smssync.domain.util.DataFormatUtil" ]
import com.squareup.okhttp.FormEncodingBuilder; import com.squareup.okhttp.RequestBody; import java.util.List; import org.addhen.smssync.data.entity.SyncScheme; import org.addhen.smssync.domain.entity.HttpNameValuePair; import org.addhen.smssync.domain.util.DataFormatUtil;
import com.squareup.okhttp.*; import java.util.*; import org.addhen.smssync.data.entity.*; import org.addhen.smssync.domain.entity.*; import org.addhen.smssync.domain.util.*;
[ "com.squareup.okhttp", "java.util", "org.addhen.smssync" ]
com.squareup.okhttp; java.util; org.addhen.smssync;
577,712
public Timestamp getAssetDisposalDate () { return (Timestamp)get_Value(COLUMNNAME_AssetDisposalDate); }
Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_AssetDisposalDate); }
/** Get Asset Disposal Date. @return Date when the asset is/was disposed */
Get Asset Disposal Date
getAssetDisposalDate
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/X_A_Asset_Change.java", "license": "gpl-2.0", "size": 44348 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,951,103