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 void testExistenceCheckingSetting() { assertTrue("Employee existence checking was incorrect", getDescriptor("DynamicEmployee").getQueryManager().getDoesExistQuery().getExistencePolicy() == DoesExistQuery.CheckDatabase); assertTrue("Project existence checking was incorrect", getDescriptor("Dyn...
void function() { assertTrue(STR, getDescriptor(STR).getQueryManager().getDoesExistQuery().getExistencePolicy() == DoesExistQuery.CheckDatabase); assertTrue(STR, getDescriptor(STR).getQueryManager().getDoesExistQuery().getExistencePolicy() == DoesExistQuery.CheckCache); assertTrue(STR, getDescriptor(STR).getQueryManage...
/** * Verifies that existence-checking metadata is correctly processed. */
Verifies that existence-checking metadata is correctly processed
testExistenceCheckingSetting
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/xml/advanced/EntityMappingsDynamicAdvancedJUnitTestCase.java", "license": "epl-1.0", "size": 43156 }
[ "org.eclipse.persistence.queries.DoesExistQuery" ]
import org.eclipse.persistence.queries.DoesExistQuery;
import org.eclipse.persistence.queries.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,750,265
@PublicEvolving public void registerJobListener(JobListener jobListener) { checkNotNull(jobListener, "JobListener cannot be null"); jobListeners.add(jobListener); }
void function(JobListener jobListener) { checkNotNull(jobListener, STR); jobListeners.add(jobListener); }
/** * Register a {@link JobListener} in this environment. The {@link JobListener} will be * notified on specific job status changed. */
Register a <code>JobListener</code> in this environment. The <code>JobListener</code> will be notified on specific job status changed
registerJobListener
{ "repo_name": "bowenli86/flink", "path": "flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java", "license": "apache-2.0", "size": 60087 }
[ "org.apache.flink.core.execution.JobListener", "org.apache.flink.util.Preconditions" ]
import org.apache.flink.core.execution.JobListener; import org.apache.flink.util.Preconditions;
import org.apache.flink.core.execution.*; import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
1,116,157
public void setLastReference(Date lastReference) { this.lastReference = lastReference; }
void function(Date lastReference) { this.lastReference = lastReference; }
/** * Asigna el atributo lastreference * @param lastReference */
Asigna el atributo lastreference
setLastReference
{ "repo_name": "jencisopy/JavaBeanStack", "path": "business/src/main/java/org/javabeanstack/security/model/ServerAuth.java", "license": "lgpl-3.0", "size": 4352 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,163,083
public LeaseRenewer getLeaseRenewer() { return LeaseRenewer.getInstance(authority, ugi, this); }
LeaseRenewer function() { return LeaseRenewer.getInstance(authority, ugi, this); }
/** Return the lease renewer instance. The renewer thread won't start * until the first output stream is created. The same instance will * be returned until all output streams are closed. */
Return the lease renewer instance. The renewer thread won't start until the first output stream is created. The same instance will be returned until all output streams are closed
getLeaseRenewer
{ "repo_name": "aliyun-beta/aliyun-oss-hadoop-fs", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "apache-2.0", "size": 108503 }
[ "org.apache.hadoop.hdfs.client.impl.LeaseRenewer" ]
import org.apache.hadoop.hdfs.client.impl.LeaseRenewer;
import org.apache.hadoop.hdfs.client.impl.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,820,653
public void addEventListener(Handler handler, DrmSessionEventListener eventListener) { Assertions.checkNotNull(handler); Assertions.checkNotNull(eventListener); listenerAndHandlers.add(new ListenerAndHandler(handler, eventListener)); }
void function(Handler handler, DrmSessionEventListener eventListener) { Assertions.checkNotNull(handler); Assertions.checkNotNull(eventListener); listenerAndHandlers.add(new ListenerAndHandler(handler, eventListener)); }
/** * Adds a listener to the event dispatcher. * * @param handler A handler on the which listener events will be posted. * @param eventListener The listener to be added. */
Adds a listener to the event dispatcher
addEventListener
{ "repo_name": "androidx/media", "path": "libraries/exoplayer/src/main/java/androidx/media3/exoplayer/drm/DrmSessionEventListener.java", "license": "apache-2.0", "size": 9595 }
[ "android.os.Handler", "androidx.media3.common.util.Assertions" ]
import android.os.Handler; import androidx.media3.common.util.Assertions;
import android.os.*; import androidx.media3.common.util.*;
[ "android.os", "androidx.media3" ]
android.os; androidx.media3;
680,788
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.completePaint = SerialUtilities.readPaint(stream); this.incompletePaint = SerialUtilities.readPaint(stream); }
void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.completePaint = SerialUtilities.readPaint(stream); this.incompletePaint = SerialUtilities.readPaint(stream); }
/** * Provides serialization support. * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */
Provides serialization support
readObject
{ "repo_name": "fluidware/Eastwood-Charts", "path": "source/org/jfree/chart/renderer/category/GanttRenderer.java", "license": "lgpl-2.1", "size": 24193 }
[ "java.io.IOException", "java.io.ObjectInputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectInputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
389,886
public static HashMap importFromXML(InputStream in) throws IOException { SimpleNamedDestination names = new SimpleNamedDestination(); SimpleXMLParser.parse(names, in); return names.xmlNames; }
static HashMap function(InputStream in) throws IOException { SimpleNamedDestination names = new SimpleNamedDestination(); SimpleXMLParser.parse(names, in); return names.xmlNames; }
/** * Import the names from XML. * @param in the XML source. The stream is not closed * @throws IOException on error * @return the names */
Import the names from XML
importFromXML
{ "repo_name": "MesquiteProject/MesquiteArchive", "path": "trunk/Mesquite Project/LibrarySource/com/lowagie/text/pdf/SimpleNamedDestination.java", "license": "lgpl-3.0", "size": 12818 }
[ "java.io.IOException", "java.io.InputStream", "java.util.HashMap" ]
import java.io.IOException; import java.io.InputStream; import java.util.HashMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,235,172
protected void writeCashTransfersRecordsForSummaryReportOption(PdfPTable table, Font cellFont, TransactionSummaryReportDataHolder transactionSummaryReport) { String amount; BigDecimal totalIncomeAmounts = BigDecimal.ZERO; BigDecimal totalPrincipalAmounts = BigDecimal.ZERO; /...
void function(PdfPTable table, Font cellFont, TransactionSummaryReportDataHolder transactionSummaryReport) { String amount; BigDecimal totalIncomeAmounts = BigDecimal.ZERO; BigDecimal totalPrincipalAmounts = BigDecimal.ZERO; writeSubHeader(table, STR, EndowConstants.EndowmentReport.TOTAL); List<CashTransfersDataHolder>...
/** * Helper method to go through the expenses list and write the lines.. * @param table * @param cellFont * @param transactionSummaryReport */
Helper method to go through the expenses list and write the lines.
writeCashTransfersRecordsForSummaryReportOption
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/report/util/TransactionSummaryReportPrint.java", "license": "apache-2.0", "size": 46430 }
[ "com.lowagie.text.Element", "com.lowagie.text.Font", "com.lowagie.text.pdf.PdfPTable", "java.math.BigDecimal", "java.util.List", "org.kuali.kfs.module.endow.EndowConstants", "org.kuali.kfs.module.endow.report.util.TransactionSummaryReportDataHolder" ]
import com.lowagie.text.Element; import com.lowagie.text.Font; import com.lowagie.text.pdf.PdfPTable; import java.math.BigDecimal; import java.util.List; import org.kuali.kfs.module.endow.EndowConstants; import org.kuali.kfs.module.endow.report.util.TransactionSummaryReportDataHolder;
import com.lowagie.text.*; import com.lowagie.text.pdf.*; import java.math.*; import java.util.*; import org.kuali.kfs.module.endow.*; import org.kuali.kfs.module.endow.report.util.*;
[ "com.lowagie.text", "java.math", "java.util", "org.kuali.kfs" ]
com.lowagie.text; java.math; java.util; org.kuali.kfs;
124,954
public void handleRpc(UI ui, Reader reader, VaadinRequest request) throws IOException, InvalidUIDLSecurityKeyException { ui.getSession().setLastRequestTimestamp(System.currentTimeMillis()); String changeMessage = getMessage(reader); if (changeMessage == null || changeMessage.eq...
void function(UI ui, Reader reader, VaadinRequest request) throws IOException, InvalidUIDLSecurityKeyException { ui.getSession().setLastRequestTimestamp(System.currentTimeMillis()); String changeMessage = getMessage(reader); if (changeMessage == null changeMessage.equals(STRSTRIgnoring old message from the client. Expe...
/** * Reads JSON containing zero or more serialized RPC calls (including legacy * variable changes) and executes the calls. * * @param ui * The {@link UI} receiving the calls. Cannot be null. * @param reader * The {@link Reader} used to read the JSON. * @par...
Reads JSON containing zero or more serialized RPC calls (including legacy variable changes) and executes the calls
handleRpc
{ "repo_name": "shahrzadmn/vaadin", "path": "server/src/com/vaadin/server/communication/ServerRpcHandler.java", "license": "apache-2.0", "size": 26250 }
[ "com.vaadin.server.LegacyCommunicationManager", "com.vaadin.server.VaadinRequest", "java.io.IOException", "java.io.Reader" ]
import com.vaadin.server.LegacyCommunicationManager; import com.vaadin.server.VaadinRequest; import java.io.IOException; import java.io.Reader;
import com.vaadin.server.*; import java.io.*;
[ "com.vaadin.server", "java.io" ]
com.vaadin.server; java.io;
1,180,308
public static void printStats(ProcessTrace prT) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) { UIMAFramework.getLogger(Checkpoint.class).log(Level.FINEST, "\n\t\t\t----------------------------------------"); UIMAFramework.getLogger(Checkpoint.class).log(Level.FINEST, "\t\t\t...
static void function(ProcessTrace prT) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) { UIMAFramework.getLogger(Checkpoint.class).log(Level.FINEST, STR); UIMAFramework.getLogger(Checkpoint.class).log(Level.FINEST, STR); UIMAFramework.getLogger(Checkpoint.class).log(Level.FINEST, STR); } List eveList = prT.ge...
/** * Prints the stats. * * @param prT * the pr T */
Prints the stats
printStats
{ "repo_name": "apache/uima-uimaj", "path": "uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/Checkpoint.java", "license": "apache-2.0", "size": 14682 }
[ "java.util.List", "org.apache.uima.UIMAFramework", "org.apache.uima.util.Level", "org.apache.uima.util.ProcessTrace" ]
import java.util.List; import org.apache.uima.UIMAFramework; import org.apache.uima.util.Level; import org.apache.uima.util.ProcessTrace;
import java.util.*; import org.apache.uima.*; import org.apache.uima.util.*;
[ "java.util", "org.apache.uima" ]
java.util; org.apache.uima;
2,597,363
private static <T> List<File> sortInBatch(BufferedReader fbr, long blocksize, Comparator<T> cmp, Charset cs, File tmpdirectory, boolean distinct, int numHeader, boolean usegzip, Fun...
static <T> List<File> function(BufferedReader fbr, long blocksize, Comparator<T> cmp, Charset cs, File tmpdirectory, boolean distinct, int numHeader, boolean usegzip, Function<T, String> typeToString, Function<String, T> stringToType) throws IOException { List<File> files = new ArrayList<File>(); try { List<T> tmplist ...
/** * This will simply load the file by blocks of lines, then sort them in-memory, and write the * result to temporary files that have to be merged later. You can specify a bound on the number * of temporary files that will be created. * * * @param fbr * buffered read for ...
This will simply load the file by blocks of lines, then sort them in-memory, and write the result to temporary files that have to be merged later. You can specify a bound on the number of temporary files that will be created
sortInBatch
{ "repo_name": "anchela/jackrabbit-oak", "path": "oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java", "license": "apache-2.0", "size": 36058 }
[ "java.io.BufferedReader", "java.io.EOFException", "java.io.File", "java.io.IOException", "java.nio.charset.Charset", "java.util.ArrayList", "java.util.Comparator", "java.util.List", "java.util.function.Function" ]
import java.io.BufferedReader; import java.io.EOFException; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.function.Function;
import java.io.*; import java.nio.charset.*; import java.util.*; import java.util.function.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
57,521
public void setGeneratingDocumentHeader(DocumentHeader generatingDocumentHeader) { this.generatingDocumentHeader = generatingDocumentHeader; }
void function(DocumentHeader generatingDocumentHeader) { this.generatingDocumentHeader = generatingDocumentHeader; }
/** * Sets the generatingDocumentHeader attribute value. * @param generatingDocumentHeader The generatingDocumentHeader to set. * @deprecated */
Sets the generatingDocumentHeader attribute value
setGeneratingDocumentHeader
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/sys/businessobject/ElectronicPaymentClaim.java", "license": "agpl-3.0", "size": 11168 }
[ "org.kuali.rice.krad.bo.DocumentHeader" ]
import org.kuali.rice.krad.bo.DocumentHeader;
import org.kuali.rice.krad.bo.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,642,972
EList<CallQuery> getCallQuery();
EList<CallQuery> getCallQuery();
/** * Returns the value of the '<em><b>Call Query</b></em>' containment * reference list. * The list contents are of type * {@link org.wso2.developerstudio.eclipse.ds.CallQuery}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Call Query</em>' containment reference list * isn't clear, there...
Returns the value of the 'Call Query' containment reference list. The list contents are of type <code>org.wso2.developerstudio.eclipse.ds.CallQuery</code>. If the meaning of the 'Call Query' containment reference list isn't clear, there really should be more of a description here...
getCallQuery
{ "repo_name": "chanakaudaya/developer-studio", "path": "data-services/org.wso2.developerstudio.eclipse.ds/src/org/wso2/developerstudio/eclipse/ds/ResultMapping.java", "license": "apache-2.0", "size": 11407 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,123,081
private static List<Account> getAllEmailProviderAccounts(final Context context) { final Cursor c = context.getContentResolver().query(Account.CONTENT_URI, Account.CONTENT_PROJECTION, null, null, null); if (c == null) { return Collections.emptyList(); } fi...
static List<Account> function(final Context context) { final Cursor c = context.getContentResolver().query(Account.CONTENT_URI, Account.CONTENT_PROJECTION, null, null, null); if (c == null) { return Collections.emptyList(); } final ImmutableList.Builder<Account> builder = ImmutableList.builder(); try { while (c.moveToN...
/** * Get a all {@link Account} objects from the {@link EmailProvider}. * @param context Our {@link Context}. * @return A list of all {@link Account}s from the {@link EmailProvider}. */
Get a all <code>Account</code> objects from the <code>EmailProvider</code>
getAllEmailProviderAccounts
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Email/provider_src/com/android/email/provider/AccountReconciler.java", "license": "gpl-3.0", "size": 14727 }
[ "android.content.Context", "android.database.Cursor", "com.android.emailcommon.provider.Account", "com.google.common.collect.ImmutableList", "java.util.Collections", "java.util.List" ]
import android.content.Context; import android.database.Cursor; import com.android.emailcommon.provider.Account; import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List;
import android.content.*; import android.database.*; import com.android.emailcommon.provider.*; import com.google.common.collect.*; import java.util.*;
[ "android.content", "android.database", "com.android.emailcommon", "com.google.common", "java.util" ]
android.content; android.database; com.android.emailcommon; com.google.common; java.util;
1,800,027
//----------------------------------------------------------------------- public String print(ReadableInstant instant) { StringBuffer buf = new StringBuffer(requirePrinter().estimatePrintedLength()); printTo(buf, instant); return buf.toString(); }
String function(ReadableInstant instant) { StringBuffer buf = new StringBuffer(requirePrinter().estimatePrintedLength()); printTo(buf, instant); return buf.toString(); }
/** * Prints a ReadableInstant to a String. * <p> * This method will use the override zone and the override chronololgy if * they are set. Otherwise it will use the chronology and zone of the instant. * * @param instant instant to format, null means now * @return the printed result ...
Prints a ReadableInstant to a String. This method will use the override zone and the override chronololgy if they are set. Otherwise it will use the chronology and zone of the instant
print
{ "repo_name": "jorisdgff/Trade-Today", "path": "Third Party Libraries/joda-time-2.3/src/main/java/org/joda/time/format/DateTimeFormatter.java", "license": "unlicense", "size": 37627 }
[ "org.joda.time.ReadableInstant" ]
import org.joda.time.ReadableInstant;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,400,216
public String createContainer(String imageName, String containerName, String[] command) { CreateContainerResponse container = dockerClient .createContainerCmd(imageName).withCmd(command) .withName(containerName).exec(); LOG.info("Created container {}", container.toString()); return container.getId(); ...
String function(String imageName, String containerName, String[] command) { CreateContainerResponse container = dockerClient .createContainerCmd(imageName).withCmd(command) .withName(containerName).exec(); LOG.info(STR, container.toString()); return container.getId(); }
/** * Creates a Docker container object. * @param imageName docker image container will be created from * @param containerName container to be created * @param command String array of usable commands * @return container String id */
Creates a Docker container object
createContainer
{ "repo_name": "DePaul2015SEStudioTeam1/agent", "path": "src/main/java/edu/depaul/agent/LocalDockerService.java", "license": "mit", "size": 7064 }
[ "com.github.dockerjava.api.command.CreateContainerResponse" ]
import com.github.dockerjava.api.command.CreateContainerResponse;
import com.github.dockerjava.api.command.*;
[ "com.github.dockerjava" ]
com.github.dockerjava;
73,959
public static void initAnimation() throws SlickException { Image[] frames = new Image[2]; frames[0] = new Image(IMG_PATH + "bomb.png").getScaledCopy(SCALE_SIZE); frames[1] = new Image(IMG_PATH + "bomb2.png").getScaledCopy(SCALE_SIZE); animation = new Animation(frames, 500, true); }
static void function() throws SlickException { Image[] frames = new Image[2]; frames[0] = new Image(IMG_PATH + STR).getScaledCopy(SCALE_SIZE); frames[1] = new Image(IMG_PATH + STR).getScaledCopy(SCALE_SIZE); animation = new Animation(frames, 500, true); }
/** * Initializes the <code>Bomb</code>'s animations. * @throws SlickException */
Initializes the <code>Bomb</code>'s animations
initAnimation
{ "repo_name": "jtzeng/bfish", "path": "src/net/skyrealm/bfish/model/Bomb.java", "license": "gpl-3.0", "size": 2034 }
[ "org.newdawn.slick.Animation", "org.newdawn.slick.Image", "org.newdawn.slick.SlickException" ]
import org.newdawn.slick.Animation; import org.newdawn.slick.Image; import org.newdawn.slick.SlickException;
import org.newdawn.slick.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
559,032
@Test public void processListSubStatementReference() throws IOException, ParserException { YangNode node = manager.getDataModel("src/test/resources/ListSubStatementReference.yang"); assertThat((node instanceof YangModule), is(true)); // Check whether the node type is set properly to m...
void function() throws IOException, ParserException { YangNode node = manager.getDataModel(STR); assertThat((node instanceof YangModule), is(true)); assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE)); YangModule yangNode = (YangModule) node; assertThat(yangNode.getName(), is("Test")); YangList yangList = (Yan...
/** * Checks reference statement as sub-statement of list. */
Checks reference statement as sub-statement of list
processListSubStatementReference
{ "repo_name": "sonu283304/onos", "path": "utils/yangutils/src/test/java/org/onosproject/yangutils/parser/impl/listeners/ReferenceListenerTest.java", "license": "apache-2.0", "size": 10379 }
[ "java.io.IOException", "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.junit.Test", "org.onosproject.yangutils.datamodel.YangList", "org.onosproject.yangutils.datamodel.YangModule", "org.onosproject.yangutils.datamodel.YangNode", "org.onosproject.yangutils.datamodel.YangNodeType", "org.on...
import java.io.IOException; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.junit.Test; import org.onosproject.yangutils.datamodel.YangList; import org.onosproject.yangutils.datamodel.YangModule; import org.onosproject.yangutils.datamodel.YangNode; import org.onosproject.yangutils.datamodel.Y...
import java.io.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.junit.*; import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.parser.exceptions.*;
[ "java.io", "org.hamcrest", "org.hamcrest.core", "org.junit", "org.onosproject.yangutils" ]
java.io; org.hamcrest; org.hamcrest.core; org.junit; org.onosproject.yangutils;
731,737
public static void main(String[] args) { // try { InputStream input; compare = new StringNaturalCompare(); recordMap = new TreeMap<String, byte[]>(compare); int offset = 0; while (args[offset].startsWith("-") && args[offset].length() > 1) { if (...
static void function(String[] args) { InputStream input; compare = new StringNaturalCompare(); recordMap = new TreeMap<String, byte[]>(compare); int offset = 0; while (args[offset].startsWith("-") && args[offset].length() > 1) { if (args[offset].equals("-v")) { quiet = false; verbose = true; offset++; } if (args[offset...
/** * main program for sorting class. * @param args - the provided command line arguments */
main program for sorting class
main
{ "repo_name": "Dyrcona/marc4j", "path": "src/org/marc4j/util/MarcSorter.java", "license": "lgpl-2.1", "size": 5158 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.InputStream", "java.util.TreeMap" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; import java.util.TreeMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
595,638
public static NabuccoPropertyDescriptor getPropertyDescriptor(String propertyName) { return PropertyCache.getInstance().retrieve(TextColumnExtension.class).getProperty(propertyName); }
static NabuccoPropertyDescriptor function(String propertyName) { return PropertyCache.getInstance().retrieve(TextColumnExtension.class).getProperty(propertyName); }
/** * Getter for the PropertyDescriptor. * * @param propertyName the String. * @return the NabuccoPropertyDescriptor. */
Getter for the PropertyDescriptor
getPropertyDescriptor
{ "repo_name": "NABUCCO/org.nabucco.framework.base", "path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/extension/schema/ui/work/bulkeditor/columns/TextColumnExtension.java", "license": "epl-1.0", "size": 3689 }
[ "org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor", "org.nabucco.framework.base.facade.datatype.property.PropertyCache" ]
import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache;
import org.nabucco.framework.base.facade.datatype.property.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,970,636
JinxUtils.validateParams(photoId, degrees); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.transform.rotate"); params.put("photo_id", photoId); params.put("degrees", degrees.toString().replace("_", "")); // pull off the leading underscore return jinx.flickrPost(par...
JinxUtils.validateParams(photoId, degrees); Map<String, String> params = new TreeMap<>(); params.put(STR, STR); params.put(STR, photoId); params.put(STR, degrees.toString().replace("_", "")); return jinx.flickrPost(params, TransformResult.class); }
/** * Rotate a photo. * <br> * This method requires authentication with 'write' permission. * * @param photoId (Required) The id of the photo to rotate. * @param degrees (Required) The amount of degrees by which to rotate the photo (clockwise) from it's current orientation. * @return object with th...
Rotate a photo. This method requires authentication with 'write' permission
rotate
{ "repo_name": "jeremybrooks/jinx", "path": "src/main/java/net/jeremybrooks/jinx/api/PhotosTransformApi.java", "license": "gpl-3.0", "size": 2420 }
[ "java.util.Map", "java.util.TreeMap", "net.jeremybrooks.jinx.JinxUtils", "net.jeremybrooks.jinx.response.photos.transform.TransformResult" ]
import java.util.Map; import java.util.TreeMap; import net.jeremybrooks.jinx.JinxUtils; import net.jeremybrooks.jinx.response.photos.transform.TransformResult;
import java.util.*; import net.jeremybrooks.jinx.*; import net.jeremybrooks.jinx.response.photos.transform.*;
[ "java.util", "net.jeremybrooks.jinx" ]
java.util; net.jeremybrooks.jinx;
2,430,034
public void createModel() { URI resourceURI = EditUIUtil.getURI(getEditorInput()); Exception exception = null; Resource resource = null; try { // Load the resource through the editing domain. // resource = editingDomain.getResourceSet().getResource(resourceURI, true); } catch (Exception e) { ...
void function() { URI resourceURI = EditUIUtil.getURI(getEditorInput()); Exception exception = null; Resource resource = null; try { true); } catch (Exception e) { exception = e; resource = editingDomain.getResourceSet().getResource(resourceURI, false); } Diagnostic diagnostic = analyzeResourceProblems(resource, except...
/** * This is the method called to load a resource into the editing domain's resource set based on the editor's input. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This is the method called to load a resource into the editing domain's resource set based on the editor's input.
createModel
{ "repo_name": "adbrucker/SecureBPMN", "path": "designer/src/org.activiti.designer.model.editor/src/org/eclipse/dd/dc/presentation/DcEditor.java", "license": "apache-2.0", "size": 46094 }
[ "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.emf.ecore.resource.Resource", "org.eclipse.emf.edit.ui.util.EditUIUtil" ]
import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.ui.util.EditUIUtil;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.ui.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,053,983
public PDNumberTreeNode getParentTree() { COSDictionary parentTree = getCOSObject().getCOSDictionary(COSName.PARENT_TREE); return parentTree != null ? new PDNumberTreeNode(parentTree, PDParentTreeValue.class) : null; }
PDNumberTreeNode function() { COSDictionary parentTree = getCOSObject().getCOSDictionary(COSName.PARENT_TREE); return parentTree != null ? new PDNumberTreeNode(parentTree, PDParentTreeValue.class) : null; }
/** * Returns the parent tree. * * @return the parent tree */
Returns the parent tree
getParentTree
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java", "license": "apache-2.0", "size": 4952 }
[ "org.apache.pdfbox.cos.COSDictionary", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.pdmodel.common.PDNumberTreeNode" ]
import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.common.PDNumberTreeNode;
import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.common.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,281,596
int sourceSectionSize = getAccountingDocumentForValidation().getSourceAccountingLines().size(); int targetSectionSize = getAccountingDocumentForValidation().getTargetAccountingLines().size(); if ((sourceSectionSize == 0 && targetSectionSize < 2) || (targetSectionSize == 0 && sourceSectionSize < 2)) ...
int sourceSectionSize = getAccountingDocumentForValidation().getSourceAccountingLines().size(); int targetSectionSize = getAccountingDocumentForValidation().getTargetAccountingLines().size(); if ((sourceSectionSize == 0 && targetSectionSize < 2) (targetSectionSize == 0 && sourceSectionSize < 2)) { GlobalVariables.getMe...
/** * Some double-sided documents also allow for one sided entries for correcting - so if one side is empty, the other side must * have at least two lines in it. The balancing rules take care of validation of amounts. * * @see org.kuali.kfs.sys.document.validation.Validation#validate(org.kuali....
Some double-sided documents also allow for one sided entries for correcting - so if one side is empty, the other side must have at least two lines in it. The balancing rules take care of validation of amounts
validate
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/sys/document/validation/impl/OptionalOneSidedDocumentAccountingLinesCountValidation.java", "license": "agpl-3.0", "size": 3387 }
[ "org.kuali.rice.krad.util.GlobalVariables" ]
import org.kuali.rice.krad.util.GlobalVariables;
import org.kuali.rice.krad.util.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,029,983
public static File getPreferencesFile() { if( prefsFile == null ) { String userHome = System.getProperty("user.home"); if(userHome == null) { throw new IllegalStateException("user.home==null"); } File home = new File(userHome); prefsFile = new File(home, prefsFileName); if(!prefsFil...
static File function() { if( prefsFile == null ) { String userHome = System.getProperty(STR); if(userHome == null) { throw new IllegalStateException(STR); } File home = new File(userHome); prefsFile = new File(home, prefsFileName); if(!prefsFile.exists()) { try { if(!prefsFile.createNewFile()) { throw new IllegalStateE...
/** * get a reference to the config file in the user's home dir * on Windows this will be something like * "C:\Documents and Settings\User\.autodj * on unix-like systems it's going to be like * "/home/user/.autodj" * * @return File settings directory */
get a reference to the config file in the user's home dir on Windows this will be something like on unix-like systems it's going to be like "/home/user/.autodj"
getPreferencesFile
{ "repo_name": "Raven24/AutoDJ", "path": "src/AutoDJ/prefs/FilePreferencesFactory.java", "license": "gpl-3.0", "size": 2645 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
910,253
List<User> getLearnersAttemptedActivity(Activity activity);
List<User> getLearnersAttemptedActivity(Activity activity);
/** * Get all the users records where the user has attempted the given activity, but has not completed it yet. Uses the * progress records to determine the users. */
Get all the users records where the user has attempted the given activity, but has not completed it yet. Uses the progress records to determine the users
getLearnersAttemptedActivity
{ "repo_name": "lamsfoundation/lams", "path": "lams_common/src/java/org/lamsfoundation/lams/lesson/dao/ILearnerProgressDAO.java", "license": "gpl-2.0", "size": 7216 }
[ "java.util.List", "org.lamsfoundation.lams.learningdesign.Activity", "org.lamsfoundation.lams.usermanagement.User" ]
import java.util.List; import org.lamsfoundation.lams.learningdesign.Activity; import org.lamsfoundation.lams.usermanagement.User;
import java.util.*; import org.lamsfoundation.lams.learningdesign.*; import org.lamsfoundation.lams.usermanagement.*;
[ "java.util", "org.lamsfoundation.lams" ]
java.util; org.lamsfoundation.lams;
1,292,670
private void checkBasicAuthorization() { /// get the path to the root folder through WebDAV from the version server String webdav_path = AccountUtils.getWebdavPath(mDiscoveredVersion, mAuthTokenType); /// get basic credentials entered by user String username = mUsernameInput.ge...
void function() { String webdav_path = AccountUtils.getWebdavPath(mDiscoveredVersion, mAuthTokenType); String username = mUsernameInput.getText().toString(); String password = mPasswordInput.getText().toString(); showDialog(DIALOG_LOGIN_PROGRESS); mAuthCheckOperation = new ExistenceCheckOperation("", this, false); Webd...
/** * Tests the credentials entered by the user performing a check of existence on * the root folder of the ownCloud server. */
Tests the credentials entered by the user performing a check of existence on the root folder of the ownCloud server
checkBasicAuthorization
{ "repo_name": "cloudvega/vegadrive", "path": "src/com/owncloud/android/authentication/AuthenticatorActivity.java", "license": "gpl-2.0", "size": 68915 }
[ "android.net.Uri", "com.owncloud.android.network.OwnCloudClientUtils", "com.owncloud.android.operations.ExistenceCheckOperation", "eu.alefzero.webdav.WebdavClient" ]
import android.net.Uri; import com.owncloud.android.network.OwnCloudClientUtils; import com.owncloud.android.operations.ExistenceCheckOperation; import eu.alefzero.webdav.WebdavClient;
import android.net.*; import com.owncloud.android.network.*; import com.owncloud.android.operations.*; import eu.alefzero.webdav.*;
[ "android.net", "com.owncloud.android", "eu.alefzero.webdav" ]
android.net; com.owncloud.android; eu.alefzero.webdav;
1,453,938
public void setWindow(Window window) { this.window = window; }
void function(Window window) { this.window = window; }
/** * Set the window. * * @param window * the window. */
Set the window
setWindow
{ "repo_name": "Stratio/stratio-connector-decision", "path": "connector-decision/src/main/java/com/stratio/connector/decision/core/engine/query/ConnectorQueryData.java", "license": "apache-2.0", "size": 3695 }
[ "com.stratio.crossdata.common.logicalplan.Window" ]
import com.stratio.crossdata.common.logicalplan.Window;
import com.stratio.crossdata.common.logicalplan.*;
[ "com.stratio.crossdata" ]
com.stratio.crossdata;
1,119,602
protected IgniteInternalFuture<?> multithreadedAsync(Runnable r, int threadNum, String threadName) throws Exception { return GridTestUtils.runMultiThreadedAsync(r, threadNum, threadName); }
IgniteInternalFuture<?> function(Runnable r, int threadNum, String threadName) throws Exception { return GridTestUtils.runMultiThreadedAsync(r, threadNum, threadName); }
/** * Runs given code in multiple threads. Returns future that ends upon * threads completion. If any thread failed, exception will be thrown * out of this method. * * @param r Runnable. * @param threadNum Thread number. * @param threadName Thread name. * @throws Exception If fai...
Runs given code in multiple threads. Returns future that ends upon threads completion. If any thread failed, exception will be thrown out of this method
multithreadedAsync
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java", "license": "apache-2.0", "size": 84789 }
[ "org.apache.ignite.internal.IgniteInternalFuture", "org.apache.ignite.testframework.GridTestUtils" ]
import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.internal.*; import org.apache.ignite.testframework.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,309,780
@Test public void testGetNextLoadPositionUsReturnsEndOfSourceWhenAllLoaderLoadingLastChunk() { FakeSequenceableLoader loader1 = new FakeSequenceableLoader( 1000, C.TIME_END_OF_SOURCE); FakeSequenceableLoader loader2 = new FakeSequenceableLoader( 1001, C.TIME_END_O...
void function() { FakeSequenceableLoader loader1 = new FakeSequenceableLoader( 1000, C.TIME_END_OF_SOURCE); FakeSequenceableLoader loader2 = new FakeSequenceableLoader( 1001, C.TIME_END_OF_SOURCE); CompositeSequenceableLoader compositeSequenceableLoader = new CompositeSequenceableLoader( new SequenceableLoader[] {loade...
/** * Tests that {@link CompositeSequenceableLoader#getNextLoadPositionUs()} returns * {@link C#TIME_END_OF_SOURCE} when all sub-loaders have next load position at end-of-source. */
Tests that <code>CompositeSequenceableLoader#getNextLoadPositionUs()</code> returns <code>C#TIME_END_OF_SOURCE</code> when all sub-loaders have next load position at end-of-source
testGetNextLoadPositionUsReturnsEndOfSourceWhenAllLoaderLoadingLastChunk
{ "repo_name": "KiminRyu/ExoPlayer", "path": "library/core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java", "license": "apache-2.0", "size": 12343 }
[ "com.google.common.truth.Truth" ]
import com.google.common.truth.Truth;
import com.google.common.truth.*;
[ "com.google.common" ]
com.google.common;
1,288,609
public void writeTf(Font f) { String fontName = f.getFontName(); float fontSize = (float)f.getFontSize() / 1000f; boolean isMultiByte = isMultiByteFont(fontName); if (!isMultiByte && encoding != 0) { updateTf(fontName + "_" + Integer.toString(encoding), fontSize, isMultiB...
void function(Font f) { String fontName = f.getFontName(); float fontSize = (float)f.getFontSize() / 1000f; boolean isMultiByte = isMultiByteFont(fontName); if (!isMultiByte && encoding != 0) { updateTf(fontName + "_" + Integer.toString(encoding), fontSize, isMultiByte); } else { updateTf(fontName, fontSize, isMultiByt...
/** * Writes a "Tf" command, setting a new current font. * @param f the font to select */
Writes a "Tf" command, setting a new current font
writeTf
{ "repo_name": "Distrotech/fop", "path": "src/java/org/apache/fop/svg/PDFTextUtil.java", "license": "apache-2.0", "size": 4237 }
[ "org.apache.fop.fonts.Font" ]
import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.*;
[ "org.apache.fop" ]
org.apache.fop;
481,303
void getIMEISV(Message result);
void getIMEISV(Message result);
/** * returned message * retMsg.obj = AsyncResult ar * ar.exception carries exception on failure * ar.userObject contains the orignal value of result.obj * ar.result is String containing IMEISV on success */
returned message retMsg.obj = AsyncResult ar ar.exception carries exception on failure ar.userObject contains the orignal value of result.obj ar.result is String containing IMEISV on success
getIMEISV
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/frameworks/opt/telephony/src/java/com/android/internal/telephony/CommandsInterface.java", "license": "apache-2.0", "size": 60442 }
[ "android.os.Message" ]
import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
1,621,197
public ArrayList<Location> getGameLocationPoints() { try { List<HasID> locations = ClientDataWarehouse.getInstance().getList(GameLocation.class); if (locations == null || locations.size() == 0) { return gameLocationPoints; } gameLocationPoints = ((GameLocation) locations.get(0)).getLocationList...
ArrayList<Location> function() { try { List<HasID> locations = ClientDataWarehouse.getInstance().getList(GameLocation.class); if (locations == null locations.size() == 0) { return gameLocationPoints; } gameLocationPoints = ((GameLocation) locations.get(0)).getLocationList(); } catch (DataWarehouseException e) { e.print...
/** * Game Location points * @return List of locations */
Game Location points
getGameLocationPoints
{ "repo_name": "balazspete/crystal-game", "path": "crystal-game/src/com/example/crystalgame/location/ZoneTracker.java", "license": "mit", "size": 3502 }
[ "com.example.crystalgame.datawarehouse.ClientDataWarehouse", "com.example.crystalgame.library.data.GameLocation", "com.example.crystalgame.library.data.HasID", "com.example.crystalgame.library.data.Location", "com.example.crystalgame.library.datawarehouse.DataWarehouseException", "java.util.ArrayList", ...
import com.example.crystalgame.datawarehouse.ClientDataWarehouse; import com.example.crystalgame.library.data.GameLocation; import com.example.crystalgame.library.data.HasID; import com.example.crystalgame.library.data.Location; import com.example.crystalgame.library.datawarehouse.DataWarehouseException; import java.ut...
import com.example.crystalgame.datawarehouse.*; import com.example.crystalgame.library.data.*; import com.example.crystalgame.library.datawarehouse.*; import java.util.*;
[ "com.example.crystalgame", "java.util" ]
com.example.crystalgame; java.util;
296,030
UserRatingsManager ratingServiceFactory = (UserRatingsManager) CoreSpringFactory.getBean(UserRatingsManager.class); return ratingServiceFactory.createRatingsManager(ores, subpath); }
UserRatingsManager ratingServiceFactory = (UserRatingsManager) CoreSpringFactory.getBean(UserRatingsManager.class); return ratingServiceFactory.createRatingsManager(ores, subpath); }
/** * Use only inside commentAndRating package! Otherwise use CommentsAndRatingServiceFactory Factory method to create a ratings manager for the given OLATResourceable. * Note that this manager is statefully initialized with the OLATResourceable. * * @param ores The olat resourceable that provides a typename a...
Use only inside commentAndRating package! Otherwise use CommentsAndRatingServiceFactory Factory method to create a ratings manager for the given OLATResourceable. Note that this manager is statefully initialized with the OLATResourceable
getInstance
{ "repo_name": "RLDevOps/Scholastic", "path": "src/main/java/org/olat/core/commons/services/commentAndRating/UserRatingsManager.java", "license": "apache-2.0", "size": 5227 }
[ "org.olat.core.CoreSpringFactory" ]
import org.olat.core.CoreSpringFactory;
import org.olat.core.*;
[ "org.olat.core" ]
org.olat.core;
2,272,178
public Field<Integer> getUpdatesField() throws AccessPoemException { Column<Integer> c = _getContactTable().getUpdatesColumn(); return new Field<Integer>((Integer)c.getRaw(this), c); }
Field<Integer> function() throws AccessPoemException { Column<Integer> c = _getContactTable().getUpdatesColumn(); return new Field<Integer>((Integer)c.getRaw(this), c); }
/** * Retrieves the <code>Updates</code> value as a <code>Field</code> * from this <code>Contact</code> <code>Persistent</code>. * * see org.melati.poem.prepro.FieldDef#generateFieldCreator * @throws AccessPoemException * if the current <code>AccessToken</code> * does not confer write ...
Retrieves the <code>Updates</code> value as a <code>Field</code> from this <code>Contact</code> <code>Persistent</code>. see org.melati.poem.prepro.FieldDef#generateFieldCreator
getUpdatesField
{ "repo_name": "timp21337/melati-old", "path": "melati-example-contacts/src/main/java/org/melati/example/contacts/generated/ContactBase.java", "license": "gpl-2.0", "size": 24794 }
[ "org.melati.poem.AccessPoemException", "org.melati.poem.Column", "org.melati.poem.Field" ]
import org.melati.poem.AccessPoemException; import org.melati.poem.Column; import org.melati.poem.Field;
import org.melati.poem.*;
[ "org.melati.poem" ]
org.melati.poem;
2,342,327
private void sessionChangedEventHandler(Session session) { // Clear all scans if (View.isInitialised()) { this.getSpiderPanel().reset(); } if (session == null) { // Closedown return; } }
void function(Session session) { if (View.isInitialised()) { this.getSpiderPanel().reset(); } if (session == null) { return; } }
/** * Session changed event handler. * * @param session the session */
Session changed event handler
sessionChangedEventHandler
{ "repo_name": "UjuE/zaproxy", "path": "src/org/zaproxy/zap/extension/spider/ExtensionSpider.java", "license": "apache-2.0", "size": 21338 }
[ "org.parosproxy.paros.model.Session", "org.parosproxy.paros.view.View" ]
import org.parosproxy.paros.model.Session; import org.parosproxy.paros.view.View;
import org.parosproxy.paros.model.*; import org.parosproxy.paros.view.*;
[ "org.parosproxy.paros" ]
org.parosproxy.paros;
986,280
private void moveUnder( Element decl, Element target ) { Element realTarget = forest.logic.refineTarget(target); declExtensionNamespace( decl, target ); // copy in-scope namespace declarations of the decl node // to the decl node itself so that this move won't change // the...
void function( Element decl, Element target ) { Element realTarget = forest.logic.refineTarget(target); declExtensionNamespace( decl, target ); Element p = decl; Set<String> inscopes = new HashSet<String>(); while(true) { NamedNodeMap atts = p.getAttributes(); for( int i=0; i<atts.getLength(); i++ ) { Attr a = (Attr)at...
/** * Moves the "decl" node under the "target" node. * * @param decl * A JAXB customization element (e.g., &lt;jaxb:class>) * * @param target * XML Schema element under which the declaration should move. * For example, &lt;xs:element> */
Moves the "decl" node under the "target" node
moveUnder
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java", "license": "mit", "size": 24120 }
[ "com.sun.tools.internal.xjc.reader.Const", "java.util.HashSet", "java.util.Set", "org.w3c.dom.Attr", "org.w3c.dom.Element", "org.w3c.dom.NamedNodeMap" ]
import com.sun.tools.internal.xjc.reader.Const; import java.util.HashSet; import java.util.Set; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap;
import com.sun.tools.internal.xjc.reader.*; import java.util.*; import org.w3c.dom.*;
[ "com.sun.tools", "java.util", "org.w3c.dom" ]
com.sun.tools; java.util; org.w3c.dom;
1,138,399
public int getAppwizPostRate() throws IOException { return Integer.parseInt(getProperty(P_APPWIZ_POSTRATE)); }
int function() throws IOException { return Integer.parseInt(getProperty(P_APPWIZ_POSTRATE)); }
/** * Is this the Frames Per Second, or the image posting rate for ftp * upload??? * * @return the appwiz post rate * @throws IOException */
Is this the Frames Per Second, or the image posting rate for ftp upload??
getAppwizPostRate
{ "repo_name": "thrasher/jipcam", "path": "jipcam-axis/jipcam-axis-core/src/main/java/net/sf/jipcam/axis/CameraAPI.java", "license": "lgpl-2.1", "size": 25984 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,462,188
public boolean syncTextInElement(String text, int timeout, boolean returnError) { return PageLoaded.syncTextInElement(getWrappedDriver(), text, timeout, returnError, new ElementImpl(getWrappedElement())); }
boolean function(String text, int timeout, boolean returnError) { return PageLoaded.syncTextInElement(getWrappedDriver(), text, timeout, returnError, new ElementImpl(getWrappedElement())); }
/** * Used in conjunction with WebObjectText Present to determine if the * desired text is present in the desired element Will loop for the time out * passed in the variable timeout If text is not present within the time, * handle the error based on the boolean * * @author Justin * */
Used in conjunction with WebObjectText Present to determine if the desired text is present in the desired element Will loop for the time out passed in the variable timeout If text is not present within the time, handle the error based on the boolean
syncTextInElement
{ "repo_name": "Orasi/Xeeva", "path": "src/main/java/com/orasi/core/interfaces/impl/ElementImpl.java", "license": "bsd-3-clause", "size": 19153 }
[ "com.orasi.utils.PageLoaded" ]
import com.orasi.utils.PageLoaded;
import com.orasi.utils.*;
[ "com.orasi.utils" ]
com.orasi.utils;
1,886,199
public byte[] createFuzzyRowMask(List<DimensionValue> dimensionValues, @Nullable String measureName) { // See createRowKey for row format info byte[] mask = new byte[VERSION.length + (dimensionValues.size() + 2) * entityTable.getIdSize() + Bytes.SIZEOF_INT]; int offset = writeVersion(mask); // agg gr...
byte[] function(List<DimensionValue> dimensionValues, @Nullable String measureName) { byte[] mask = new byte[VERSION.length + (dimensionValues.size() + 2) * entityTable.getIdSize() + Bytes.SIZEOF_INT]; int offset = writeVersion(mask); offset = writeEncodedFixedMask(mask, offset); offset = writeFuzzyMask(mask, offset, B...
/** * create fuzzy row mask based on dimension values and measure name. * if dimension value/measure name is null it matches any dimension values / measures. * @param dimensionValues * @param measureName * @return fuzzy mask byte array */
create fuzzy row mask based on dimension values and measure name. if dimension value/measure name is null it matches any dimension values / measures
createFuzzyRowMask
{ "repo_name": "caskdata/cdap", "path": "cdap-data-fabric/src/main/java/co/cask/cdap/data2/dataset2/lib/timeseries/FactCodec.java", "license": "apache-2.0", "size": 14766 }
[ "co.cask.cdap.api.common.Bytes", "co.cask.cdap.api.dataset.lib.cube.DimensionValue", "java.util.List", "javax.annotation.Nullable" ]
import co.cask.cdap.api.common.Bytes; import co.cask.cdap.api.dataset.lib.cube.DimensionValue; import java.util.List; import javax.annotation.Nullable;
import co.cask.cdap.api.common.*; import co.cask.cdap.api.dataset.lib.cube.*; import java.util.*; import javax.annotation.*;
[ "co.cask.cdap", "java.util", "javax.annotation" ]
co.cask.cdap; java.util; javax.annotation;
787,371
private Object[] searchEvent(String name, ArrayList list) { for (int i = 0; i < list.size(); i++) { Object[] dataTemp = (Object[]) list.get(i); if (name.equals((String) dataTemp[0])) { return dataTemp; } } return null; }
Object[] function(String name, ArrayList list) { for (int i = 0; i < list.size(); i++) { Object[] dataTemp = (Object[]) list.get(i); if (name.equals((String) dataTemp[0])) { return dataTemp; } } return null; }
/** * When a request is sent from the user, this request is saved to a list. * And when a response is received from the Replica Catalogue this event has * to be found in this list. * * @param name of the file the event was all about. * @param list the list of event where it has to search...
When a request is sent from the user, this request is saved to a list. And when a response is received from the Replica Catalogue this event has to be found in this list
searchEvent
{ "repo_name": "mzuhri/salam", "path": "salam/salam-external-lib/src/main/java/gridsim/datagrid/SimpleReplicaManager.java", "license": "apache-2.0", "size": 35759 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
690,287
public int getDesiredMinimumWidth() { if (sGlobals.mService == null) { Log.w(TAG, "WallpaperService not running"); return 0; } try { return sGlobals.mService.getWidthHint(); } catch (RemoteException e) { // Shouldn't happen! ...
int function() { if (sGlobals.mService == null) { Log.w(TAG, STR); return 0; } try { return sGlobals.mService.getWidthHint(); } catch (RemoteException e) { return 0; } }
/** * Returns the desired minimum width for the wallpaper. Callers of * {@link #setBitmap(android.graphics.Bitmap)} or * {@link #setStream(java.io.InputStream)} should check this value * beforehand to make sure the supplied wallpaper respects the desired * minimum width. * * If the re...
Returns the desired minimum width for the wallpaper. Callers of <code>#setBitmap(android.graphics.Bitmap)</code> or <code>#setStream(java.io.InputStream)</code> should check this value beforehand to make sure the supplied wallpaper respects the desired minimum width. If the returned value is <= 0, the caller should use...
getDesiredMinimumWidth
{ "repo_name": "OmniEvo/android_frameworks_base", "path": "core/java/android/app/WallpaperManager.java", "license": "gpl-3.0", "size": 50806 }
[ "android.os.RemoteException", "android.util.Log" ]
import android.os.RemoteException; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
539,466
public int readAll(byte[] buf, int offset, int len) throws IOException { return readFully(this, buf, offset, len); }
int function(byte[] buf, int offset, int len) throws IOException { return readFully(this, buf, offset, len); }
/** kind of like readFully(). Only reads as much as possible. * And allows use of protected readFully(). */
kind of like readFully(). Only reads as much as possible. And allows use of protected readFully()
readAll
{ "repo_name": "shakamunyi/hadoop-20", "path": "src/hdfs/org/apache/hadoop/hdfs/BlockReader.java", "license": "apache-2.0", "size": 23042 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,239,728
@Test public void testGetCofactor() { final ImmutableMatrix3f matrix = new ImmutableMatrix3f( 1, 0, 1, 2, 4, 0, 3, 5, 6); ImmutableMatrix3f cofactor = matrix.getCofactor(); assertNotSame(matrix, cofactor); assertArrayEquals(new float[] { ...
void function() { final ImmutableMatrix3f matrix = new ImmutableMatrix3f( 1, 0, 1, 2, 4, 0, 3, 5, 6); ImmutableMatrix3f cofactor = matrix.getCofactor(); assertNotSame(matrix, cofactor); assertArrayEquals(new float[] { 24, -12, -2, 5, 3, -5, -4, 2, 4 }, cofactor.m, 0.001f); cofactor = matrix.getCofactor(); assertNotSame...
/** * Tests the getAdjoint() method. */
Tests the getAdjoint() method
testGetCofactor
{ "repo_name": "kayahr/gramath", "path": "src/test/java/de/ailis/gramath/ImmutableMatrix3fTest.java", "license": "mit", "size": 12327 }
[ "de.ailis.gramath.support.Assert", "org.junit.Assert" ]
import de.ailis.gramath.support.Assert; import org.junit.Assert;
import de.ailis.gramath.support.*; import org.junit.*;
[ "de.ailis.gramath", "org.junit" ]
de.ailis.gramath; org.junit;
1,622,667
public static String getCreateTableQuery(String tableName, ResultSetMetaData rsmd, Map<String, String> typeMap) throws SQLException { StringBuffer sb = new StringBuffer("create table "); sb.append(tableName); sb.append("(\n"); String typeName, realTypeName; for (int i = 1; i <= rsmd.getColumnCount();...
static String function(String tableName, ResultSetMetaData rsmd, Map<String, String> typeMap) throws SQLException { StringBuffer sb = new StringBuffer(STR); sb.append(tableName); sb.append("(\n"); String typeName, realTypeName; for (int i = 1; i <= rsmd.getColumnCount(); i++) { if (i > 1) sb.append(",\n"); sb.append("\...
/** * Creates a SQL query string for the creation of a table with the given * name and the schema given as a result set's metadata object. * * @param tableName the name of the table to be created. * @param rsmd the schema of the new table. * @param typeMap a map which maps the type names to type names whic...
Creates a SQL query string for the creation of a table with the given name and the schema given as a result set's metadata object
getCreateTableQuery
{ "repo_name": "hannoman/xxl", "path": "src/xxl/core/relational/resultSets/ResultSets.java", "license": "lgpl-3.0", "size": 13343 }
[ "java.sql.ResultSetMetaData", "java.sql.SQLException", "java.util.Map" ]
import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.Map;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,280,418
public void testOffsetFetchFirstReadOnlyScrollableRS() throws SQLException { Statement stm = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs; String[] variants; variants = makeVari...
void function() throws SQLException { Statement stm = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs; String[] variants; variants = makeVariants( STR, FIRST_ROWS_ONLY, "0", null ); for ( String variant : variants ) { rs = stm.executeQuery( variant ); rs.next(); rs.next(); a...
/** * Positive tests with scrollable read-only. * * @throws java.sql.SQLException */
Positive tests with scrollable read-only
testOffsetFetchFirstReadOnlyScrollableRS
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/OffsetFetchNextTest.java", "license": "apache-2.0", "size": 36955 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,911,181
protected double getRequiredParameterAsDouble(final HttpServletRequest request, final String parameterName) { return Double.parseDouble(getRequiredParameter(request, parameterName)); }
double function(final HttpServletRequest request, final String parameterName) { return Double.parseDouble(getRequiredParameter(request, parameterName)); }
/** * Attempts to extract the specified parameter from the provided request and convert it to a double value * * @param request The request instance containing the parameter * @param parameterName The name of the parameter to extract * @return The double value of the specified parameter ...
Attempts to extract the specified parameter from the provided request and convert it to a double value
getRequiredParameterAsDouble
{ "repo_name": "bings/lumify", "path": "web/web-base/src/main/java/io/lumify/web/MinimalRequestHandler.java", "license": "apache-2.0", "size": 7560 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,839,901
public Bound withSchema(TableSchema schema) { return new Bound(name, jsonTableRef, tableRefFunction, toJsonString(schema), createDisposition, writeDisposition, validate, testBigQueryServices); }
Bound function(TableSchema schema) { return new Bound(name, jsonTableRef, tableRefFunction, toJsonString(schema), createDisposition, writeDisposition, validate, testBigQueryServices); }
/** * Returns a copy of this write transformation, but using the specified schema for rows * to be written. * * <p>Does not modify this object. */
Returns a copy of this write transformation, but using the specified schema for rows to be written. Does not modify this object
withSchema
{ "repo_name": "tweise/beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/BigQueryIO.java", "license": "apache-2.0", "size": 95053 }
[ "com.google.api.services.bigquery.model.TableSchema" ]
import com.google.api.services.bigquery.model.TableSchema;
import com.google.api.services.bigquery.model.*;
[ "com.google.api" ]
com.google.api;
481,799
private void checkHasOriginal( List<Se3_F64> solutions , DenseMatrix64F R ,Vector3D_F64 T ) { int numMatches = 0; for( Se3_F64 se : solutions ) { if(MatrixFeatures.isIdentical(R,se.getR(),1e-4)) { if( T.distance(se.getT()) < 1e-4 ) numMatches++; } } assertEquals(1,numMatches); }
void function( List<Se3_F64> solutions , DenseMatrix64F R ,Vector3D_F64 T ) { int numMatches = 0; for( Se3_F64 se : solutions ) { if(MatrixFeatures.isIdentical(R,se.getR(),1e-4)) { if( T.distance(se.getT()) < 1e-4 ) numMatches++; } } assertEquals(1,numMatches); }
/** * See if an equivalent to the input matrix exists */
See if an equivalent to the input matrix exists
checkHasOriginal
{ "repo_name": "pacozaa/BoofCV", "path": "main/geo/test/boofcv/alg/geo/TestDecomposeEssential.java", "license": "apache-2.0", "size": 3308 }
[ "java.util.List", "org.ejml.data.DenseMatrix64F", "org.ejml.ops.MatrixFeatures", "org.junit.Assert" ]
import java.util.List; import org.ejml.data.DenseMatrix64F; import org.ejml.ops.MatrixFeatures; import org.junit.Assert;
import java.util.*; import org.ejml.data.*; import org.ejml.ops.*; import org.junit.*;
[ "java.util", "org.ejml.data", "org.ejml.ops", "org.junit" ]
java.util; org.ejml.data; org.ejml.ops; org.junit;
4,443
private void phraseBoostTestCase(String highlighterType) { ensureGreen(); StringBuilder text = new StringBuilder(); text.append("words words junk junk junk junk junk junk junk junk highlight junk junk junk junk together junk\n"); for (int i = 0; i < 10; i++) { text.append...
void function(String highlighterType) { ensureGreen(); StringBuilder text = new StringBuilder(); text.append(STR); for (int i = 0; i < 10; i++) { text.append(STR); } text.append(STR); for (int i = 0; i < 10; i++) { text.append(STR); } indexDoc("test", "1", STR, text.toString()); refresh(); phraseBoostTestCaseForClauses...
/** * Test phrase boosting over normal term matches. Note that this will never pass with the plain highlighter * because it doesn't support the concept of terms having a different weight based on position. * @param highlighterType highlighter to test */
Test phrase boosting over normal term matches. Note that this will never pass with the plain highlighter because it doesn't support the concept of terms having a different weight based on position
phraseBoostTestCase
{ "repo_name": "jmluy/elasticsearch", "path": "server/src/internalClusterTest/java/org/elasticsearch/search/fetch/subphase/highlight/HighlighterSearchIT.java", "license": "apache-2.0", "size": 167245 }
[ "org.elasticsearch.index.query.QueryBuilders" ]
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
472,852
public static boolean isAlarmBoot() { String bootReason = SystemProperties.get("sys.boot.reason"); boolean ret = (bootReason != null && bootReason.equals("1")) ? true : false; return ret; }
static boolean function() { String bootReason = SystemProperties.get(STR); boolean ret = (bootReason != null && bootReason.equals("1")) ? true : false; return ret; }
/** * to check if it is alarm boot * * @return */
to check if it is alarm boot
isAlarmBoot
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks-ext/base/services/java/com/android/server/am/PowerOffAlarmUtility.java", "license": "gpl-2.0", "size": 9244 }
[ "android.os.SystemProperties" ]
import android.os.SystemProperties;
import android.os.*;
[ "android.os" ]
android.os;
1,065,572
public Range getVisibleRowRange() { if (!body.visualRowOrder.isEmpty()) { return Range.withLength(body.getTopRowLogicalIndex(), body.visualRowOrder.size()); } else { return Range.withLength(0, 0); } }
Range function() { if (!body.visualRowOrder.isEmpty()) { return Range.withLength(body.getTopRowLogicalIndex(), body.visualRowOrder.size()); } else { return Range.withLength(0, 0); } }
/** * Gets the logical index range of currently visible rows. * * @return logical index range of visible rows */
Gets the logical index range of currently visible rows
getVisibleRowRange
{ "repo_name": "fireflyc/vaadin", "path": "client/src/com/vaadin/client/widgets/Escalator.java", "license": "apache-2.0", "size": 266904 }
[ "com.vaadin.shared.ui.grid.Range" ]
import com.vaadin.shared.ui.grid.Range;
import com.vaadin.shared.ui.grid.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
1,619,384
@Override public boolean supportsMultipleInstantiations(VTIEnvironment arg0) throws SQLException { // This is just a simple implementation - could be improved. return false; }
boolean function(VTIEnvironment arg0) throws SQLException { return false; }
/** * This method returns an estimate of the rows that would be fetched - used by the derby query * planner. * Currently returns a fixed value - false! * @return boolean - returns false. */
This method returns an estimate of the rows that would be fetched - used by the derby query planner. Currently returns a fixed value - false
supportsMultipleInstantiations
{ "repo_name": "gaiandb/gaiandb", "path": "java/Asset/VTIs/com/ibm/db2j/MongoDB.java", "license": "epl-1.0", "size": 30308 }
[ "java.sql.SQLException", "org.apache.derby.vti.VTIEnvironment" ]
import java.sql.SQLException; import org.apache.derby.vti.VTIEnvironment;
import java.sql.*; import org.apache.derby.vti.*;
[ "java.sql", "org.apache.derby" ]
java.sql; org.apache.derby;
2,339,952
return JSON.parseObject(json); }
return JSON.parseObject(json); }
/** * json string to JSONObject * @param json * @return */
json string to JSONObject
jsonToObject
{ "repo_name": "yangyining/JFinal-plus", "path": "src/main/java/com/janeluo/jfinalplus/kit/JsonExtKit.java", "license": "apache-2.0", "size": 2829 }
[ "com.alibaba.fastjson.JSON" ]
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.*;
[ "com.alibaba.fastjson" ]
com.alibaba.fastjson;
2,061,873
public void setSocketRepository( SocketRepository socketRepository ) { this.socketRepository = socketRepository; }
void function( SocketRepository socketRepository ) { this.socketRepository = socketRepository; }
/** * Sets the socket repository. * * @param socketRepository * the socketRepository to set */
Sets the socket repository
setSocketRepository
{ "repo_name": "denisprotopopov/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/step/BaseStep.java", "license": "apache-2.0", "size": 122961 }
[ "org.pentaho.di.www.SocketRepository" ]
import org.pentaho.di.www.SocketRepository;
import org.pentaho.di.www.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,876,582
public boolean areEntityCapsSupportedByServer() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return areEntityCapsSupported(connection().getXMPPServiceDomain()); }
boolean function() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return areEntityCapsSupported(connection().getXMPPServiceDomain()); }
/** * Returns true if Entity Caps are supported by the local service/server. * * @return true if the user's server supports Entity Capabilities. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */
Returns true if Entity Caps are supported by the local service/server
areEntityCapsSupportedByServer
{ "repo_name": "lovely3x/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java", "license": "apache-2.0", "size": 29000 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,093,039
private void drainQueueTo(Collection<Exchange> collection, int batchSize, String exchangeId) { for (int i = 0; i < batchSize; ++i) { Exchange e = queue.poll(); if (e != null) { try { collection.add(e); } ...
void function(Collection<Exchange> collection, int batchSize, String exchangeId) { for (int i = 0; i < batchSize; ++i) { Exchange e = queue.poll(); if (e != null) { try { collection.add(e); } catch (Exception t) { e.setException(t); } catch (Throwable t) { getExceptionHandler().handleException(t); } if (exchangeId != n...
/** * This method should be called with queueLock held */
This method should be called with queueLock held
drainQueueTo
{ "repo_name": "Fabryprog/camel", "path": "core/camel-base/src/main/java/org/apache/camel/processor/Resequencer.java", "license": "apache-2.0", "size": 19182 }
[ "java.util.Collection", "org.apache.camel.Exchange" ]
import java.util.Collection; import org.apache.camel.Exchange;
import java.util.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
792,848
public void testEquals() { TimeSeriesCollection c1 = new TimeSeriesCollection(); TimeSeriesCollection c2 = new TimeSeriesCollection(); TimeSeries s1 = new TimeSeries("Series 1"); TimeSeries s2 = new TimeSeries("Series 2"); // newly created collections should be equal ...
void function() { TimeSeriesCollection c1 = new TimeSeriesCollection(); TimeSeriesCollection c2 = new TimeSeriesCollection(); TimeSeries s1 = new TimeSeries(STR); TimeSeries s2 = new TimeSeries(STR); boolean b1 = c1.equals(c2); assertTrue("b1", b1); c1.addSeries(s1); c1.addSeries(s2); boolean b2 = c1.equals(c2); assert...
/** * Some tests for the equals() method. */
Some tests for the equals() method
testEquals
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/data/time/junit/TimeSeriesCollectionTests.java", "license": "lgpl-2.1", "size": 9030 }
[ "org.jfree.data.time.TimeSeries", "org.jfree.data.time.TimeSeriesCollection" ]
import org.jfree.data.time.TimeSeries; import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.data.time.*;
[ "org.jfree.data" ]
org.jfree.data;
390,691
public UncaughtExceptionHandler getUncaughtExceptionHandler() { return ueh; }
UncaughtExceptionHandler function() { return ueh; }
/** * Returns the handler for internal worker threads that terminate * due to unrecoverable errors encountered while executing tasks. * * @return the handler, or {@code null} if none */
Returns the handler for internal worker threads that terminate due to unrecoverable errors encountered while executing tasks
getUncaughtExceptionHandler
{ "repo_name": "streamsupport/streamsupport", "path": "src/main/java/java8/util/concurrent/ForkJoinPool.java", "license": "gpl-2.0", "size": 147821 }
[ "java.lang.Thread" ]
import java.lang.Thread;
import java.lang.*;
[ "java.lang" ]
java.lang;
998,015
@SuppressLint("NewApi") private static String getRealPathFromURI_API11to18(Context context, Uri contentUri) { String[] proj = {MediaStore.Images.Media.DATA}; String result = null; CursorLoader cursorLoader = new CursorLoader(context, contentUri, proj, null, null, null); Cursor cursor = cursorLoader.loadI...
@SuppressLint(STR) static String function(Context context, Uri contentUri) { String[] proj = {MediaStore.Images.Media.DATA}; String result = null; CursorLoader cursorLoader = new CursorLoader(context, contentUri, proj, null, null, null); Cursor cursor = cursorLoader.loadInBackground(); if (cursor != null) { int column_...
/** * Get the real path from API levels 11-18. No need for a callback listener here as no web-based * downloads can trigger in this API range * @param context * @param contentUri * @return */
Get the real path from API levels 11-18. No need for a callback listener here as no web-based downloads can trigger in this API range
getRealPathFromURI_API11to18
{ "repo_name": "PGMacDesign/PGMacUtilities", "path": "library/src/main/java/com/pgmacdesign/pgmactips/utilities/FileUtilities.java", "license": "apache-2.0", "size": 66064 }
[ "android.annotation.SuppressLint", "android.content.Context", "android.database.Cursor", "android.net.Uri", "android.provider.MediaStore", "androidx.loader.content.CursorLoader" ]
import android.annotation.SuppressLint; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.provider.MediaStore; import androidx.loader.content.CursorLoader;
import android.annotation.*; import android.content.*; import android.database.*; import android.net.*; import android.provider.*; import androidx.loader.content.*;
[ "android.annotation", "android.content", "android.database", "android.net", "android.provider", "androidx.loader" ]
android.annotation; android.content; android.database; android.net; android.provider; androidx.loader;
1,247,610
private void setIconSource(ReadableMap source, IconControllerListener controllerListener, DraweeHolder holder) { String uri = source != null ? source.getString(PROP_ICON_URI) : null; if (uri == null) { controllerListener.setIconImageInfo(null); controllerListener.setDrawable(null); } else if...
void function(ReadableMap source, IconControllerListener controllerListener, DraweeHolder holder) { String uri = source != null ? source.getString(PROP_ICON_URI) : null; if (uri == null) { controllerListener.setIconImageInfo(null); controllerListener.setDrawable(null); } else if (uri.startsWith("http: controllerListene...
/** * Sets an icon for a specific icon source. If the uri indicates an icon * to be somewhere remote (http/https) or on the local filesystem, it uses fresco to load it. * Otherwise it loads the Drawable from the Resources and directly returns it via a callback */
Sets an icon for a specific icon source. If the uri indicates an icon to be somewhere remote (http/https) or on the local filesystem, it uses fresco to load it. Otherwise it loads the Drawable from the Resources and directly returns it via a callback
setIconSource
{ "repo_name": "TrungSpy/React-Native-SampleProject", "path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/ReactToolbar.java", "license": "mit", "size": 10567 }
[ "android.net.Uri", "com.facebook.drawee.backends.pipeline.Fresco", "com.facebook.drawee.interfaces.DraweeController", "com.facebook.drawee.view.DraweeHolder", "com.facebook.react.bridge.ReadableMap" ]
import android.net.Uri; import com.facebook.drawee.backends.pipeline.Fresco; import com.facebook.drawee.interfaces.DraweeController; import com.facebook.drawee.view.DraweeHolder; import com.facebook.react.bridge.ReadableMap;
import android.net.*; import com.facebook.drawee.backends.pipeline.*; import com.facebook.drawee.interfaces.*; import com.facebook.drawee.view.*; import com.facebook.react.bridge.*;
[ "android.net", "com.facebook.drawee", "com.facebook.react" ]
android.net; com.facebook.drawee; com.facebook.react;
665,355
public Node setNamedItem(Node arg) { return setNamedItem(arg, false); }
Node function(Node arg) { return setNamedItem(arg, false); }
/** * <b>DOM L1</b> * Stores the named item into the map, optionally overwriting * any existing node with that name. The name used is just * the nodeName attribute. */
DOM L1 Stores the named item into the map, optionally overwriting any existing node with that name. The name used is just the nodeName attribute
setNamedItem
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/xml/dom/DomNamedNodeMap.java", "license": "bsd-3-clause", "size": 11403 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
959,574
protected void renderBlock(Block block) { assert block != null; List children = block.getChildAreas(); if (block instanceof BlockViewport) { if (children != null) { renderBlockViewport((BlockViewport) block, children); } else { handleBl...
void function(Block block) { assert block != null; List children = block.getChildAreas(); if (block instanceof BlockViewport) { if (children != null) { renderBlockViewport((BlockViewport) block, children); } else { handleBlockTraits(block); currentBPPosition += block.getAllocBPD(); } } else if (block.getTraitAsBoolean(...
/** * Renders a block area. * * @param block The block area */
Renders a block area
renderBlock
{ "repo_name": "spepping/fop-cs", "path": "src/java/org/apache/fop/render/AbstractRenderer.java", "license": "apache-2.0", "size": 31936 }
[ "java.util.List", "org.apache.fop.area.Block", "org.apache.fop.area.BlockViewport", "org.apache.fop.area.Trait" ]
import java.util.List; import org.apache.fop.area.Block; import org.apache.fop.area.BlockViewport; import org.apache.fop.area.Trait;
import java.util.*; import org.apache.fop.area.*;
[ "java.util", "org.apache.fop" ]
java.util; org.apache.fop;
753,851
public static boolean write( OutputStream stream, Serializable object) throws IOException { return XStreamSerializationHandler.write( new OutputStreamWriter(stream), object); }
static boolean function( OutputStream stream, Serializable object) throws IOException { return XStreamSerializationHandler.write( new OutputStreamWriter(stream), object); }
/** * Writes the given object to the given OutputStream * * @param stream OutputStream to write the object to * @param object Object to write to the OutputStream * @return true on success, false otherwise * @throws java.io.IOException * If there's a problem writing */
Writes the given object to the given OutputStream
write
{ "repo_name": "codeaudit/Foundry", "path": "Components/CommonCore/Source/gov/sandia/cognition/io/XStreamSerializationHandler.java", "license": "bsd-3-clause", "size": 11538 }
[ "java.io.IOException", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.io.Serializable" ]
import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,528,251
public ArrayList<Coordinate> getCoordinates() { return this.rawCoordinates; }
ArrayList<Coordinate> function() { return this.rawCoordinates; }
/** * Returns the raw coordinates without any * transformation to fit into the sketch. In this * case you can manipulate the underlying SimpleFeatures * to perform other operations. * @return ArrayList<Coordinate> */
Returns the raw coordinates without any transformation to fit into the sketch. In this case you can manipulate the underlying SimpleFeatures to perform other operations
getCoordinates
{ "repo_name": "phiLangley/openPHD", "path": "[CODE]/processing/libraries/MapThing/src/com/reades/mapthing/Points.java", "license": "gpl-2.0", "size": 18950 }
[ "com.vividsolutions.jts.geom.Coordinate", "java.util.ArrayList" ]
import com.vividsolutions.jts.geom.Coordinate; import java.util.ArrayList;
import com.vividsolutions.jts.geom.*; import java.util.*;
[ "com.vividsolutions.jts", "java.util" ]
com.vividsolutions.jts; java.util;
2,487,251
public static List<Biosample> applyTemplate(Template tpl, List<List<Biosample>> groups, BarcodeMemo barcodePrefixMemo, String userName, StringBuilder htmlMsgs) throws Exception { List<Biosample> res = new ArrayList<>(); ContainerType containerType = barcodePrefixMemo.getContainerType(); int total = 0; ...
static List<Biosample> function(Template tpl, List<List<Biosample>> groups, BarcodeMemo barcodePrefixMemo, String userName, StringBuilder htmlMsgs) throws Exception { List<Biosample> res = new ArrayList<>(); ContainerType containerType = barcodePrefixMemo.getContainerType(); int total = 0; htmlMsgs.append(STR); for (Li...
/** * Apply a SlideTemplate to the given groups of biosamples. * * The size of each group must not be higher that the number of animals used in the template. * * * * @param tpl * @param groups * @param barcodePrefixMemo * @param userName * @param htmlMsgs * @return * @throws Exception */
Apply a SlideTemplate to the given groups of biosamples. The size of each group must not be higher that the number of animals used in the template
applyTemplate
{ "repo_name": "jfreyss/spirit", "path": "src/com/actelion/research/spiritcore/services/helper/TemplateHelper.java", "license": "gpl-3.0", "size": 12955 }
[ "com.actelion.research.spiritcore.business.biosample.Biosample", "com.actelion.research.spiritcore.business.biosample.ContainerType", "com.actelion.research.spiritcore.business.slide.ContainerTemplate", "com.actelion.research.spiritcore.business.slide.Template", "java.util.ArrayList", "java.util.List" ]
import com.actelion.research.spiritcore.business.biosample.Biosample; import com.actelion.research.spiritcore.business.biosample.ContainerType; import com.actelion.research.spiritcore.business.slide.ContainerTemplate; import com.actelion.research.spiritcore.business.slide.Template; import java.util.ArrayList; import ja...
import com.actelion.research.spiritcore.business.biosample.*; import com.actelion.research.spiritcore.business.slide.*; import java.util.*;
[ "com.actelion.research", "java.util" ]
com.actelion.research; java.util;
1,668,308
@SuppressWarnings("NullableProblems") @Override public Iterator<E> iterator() { return new RealmCollectionIterator(); }
@SuppressWarnings(STR) Iterator<E> function() { return new RealmCollectionIterator(); }
/** * Returns an iterator for the results of a query. Any change to Realm while iterating will cause this iterator to * throw a {@link ConcurrentModificationException} if accessed. * * @return an iterator on the elements of this list. * @see Iterator */
Returns an iterator for the results of a query. Any change to Realm while iterating will cause this iterator to throw a <code>ConcurrentModificationException</code> if accessed
iterator
{ "repo_name": "weiwenqiang/GitHub", "path": "expert/realm-java/realm/realm-library/src/main/java/io/realm/OrderedRealmCollectionImpl.java", "license": "apache-2.0", "size": 18953 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,300,046
public FacesConfigApplicationType<T> removeAllActionListener() { childNode.removeChildren("action-listener"); return this; } // --------------------------------------------------------------------------------------------------------|| // ClassName: FacesConfigApplicationType ElementName: x...
FacesConfigApplicationType<T> function() { childNode.removeChildren(STR); return this; }
/** * Removes the <code>action-listener</code> element * @return the current instance of <code>FacesConfigApplicationType<T></code> */
Removes the <code>action-listener</code> element
removeAllActionListener
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig20/FacesConfigApplicationTypeImpl.java", "license": "epl-1.0", "size": 32125 }
[ "org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigApplicationType" ]
import org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigApplicationType;
import org.jboss.shrinkwrap.descriptor.api.facesconfig20.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
498,017
public void openHistoryPage() { if (mIsDestroyed) return; HistoryManagerUtils.showHistoryManager(mTab.getActivity(), mTab); StartupMetrics.getInstance().recordOpenedHistory(); }
void function() { if (mIsDestroyed) return; HistoryManagerUtils.showHistoryManager(mTab.getActivity(), mTab); StartupMetrics.getInstance().recordOpenedHistory(); }
/** * Opens the history page. */
Opens the history page
openHistoryPage
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/ntp/RecentTabsManager.java", "license": "apache-2.0", "size": 13298 }
[ "org.chromium.chrome.browser.history.HistoryManagerUtils", "org.chromium.chrome.browser.metrics.StartupMetrics" ]
import org.chromium.chrome.browser.history.HistoryManagerUtils; import org.chromium.chrome.browser.metrics.StartupMetrics;
import org.chromium.chrome.browser.history.*; import org.chromium.chrome.browser.metrics.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
2,820,370
public static ims.core.resource.people.domain.objects.MemberOfStaff extractMemberOfStaff(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.MemberOfStaffMappingsLiteVo valueObject) { return extractMemberOfStaff(domainFactory, valueObject, new HashMap()); }
static ims.core.resource.people.domain.objects.MemberOfStaff function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.MemberOfStaffMappingsLiteVo valueObject) { return extractMemberOfStaff(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractMemberOfStaff
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/MemberOfStaffMappingsLiteVoAssembler.java", "license": "agpl-3.0", "size": 17607 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,102,716
public List<String> getTokens();
List<String> function();
/** * Fetch string representations of the tokens for this node. * * @return a collection of tokens formatted as strings */
Fetch string representations of the tokens for this node
getTokens
{ "repo_name": "strapdata/cassandra", "path": "src/java/org/apache/cassandra/service/StorageServiceMBean.java", "license": "apache-2.0", "size": 29049 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,282,916
public AccountInfo getCachedAccountInfo() { synchronized (cachedDataSynchronizationObject) { if (cachedAccountInfo == null) { throw new ExchangeException("getBalances method has not been called yet, or balance data has not been recieved!"); } return cachedAccountInfo; } }
AccountInfo function() { synchronized (cachedDataSynchronizationObject) { if (cachedAccountInfo == null) { throw new ExchangeException(STR); } return cachedAccountInfo; } }
/** * Experimental: USE WITH CAUTION. Adapters take every "BalancesUpdated" event, update local AccountInfo object with said new balance. This method * will return that cached AccountInfo object. * * @return Trades object representing all OrdersMatched trades recieved. * @throws ExchangeException if getB...
Experimental: USE WITH CAUTION. Adapters take every "BalancesUpdated" event, update local AccountInfo object with said new balance. This method will return that cached AccountInfo object
getCachedAccountInfo
{ "repo_name": "codeck/XChange", "path": "xchange-coinfloor/src/main/java/com/xeiam/xchange/coinfloor/CoinfloorAdapters.java", "license": "mit", "size": 19419 }
[ "com.xeiam.xchange.dto.account.AccountInfo", "com.xeiam.xchange.exceptions.ExchangeException" ]
import com.xeiam.xchange.dto.account.AccountInfo; import com.xeiam.xchange.exceptions.ExchangeException;
import com.xeiam.xchange.dto.account.*; import com.xeiam.xchange.exceptions.*;
[ "com.xeiam.xchange" ]
com.xeiam.xchange;
249,187
public Node lookupNode(String nodeUrl, long timeout) throws Exception { Future<Node> futureNode = threadPoolHolder.submit(INTERNAL_POOL, new NodeLocator(nodeUrl)); return futureNode.get(timeout, TimeUnit.MILLISECONDS); }
Node function(String nodeUrl, long timeout) throws Exception { Future<Node> futureNode = threadPoolHolder.submit(INTERNAL_POOL, new NodeLocator(nodeUrl)); return futureNode.get(timeout, TimeUnit.MILLISECONDS); }
/** * Lookups a node with specified timeout. * * @param nodeUrl a url of the node * @param timeout to wait in ms * @return node if it was successfully obtained, null otherwise * @throws Exception if node was not looked up */
Lookups a node with specified timeout
lookupNode
{ "repo_name": "tobwiens/scheduling", "path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/nodesource/NodeSource.java", "license": "agpl-3.0", "size": 37652 }
[ "java.util.concurrent.Future", "java.util.concurrent.TimeUnit", "org.objectweb.proactive.core.node.Node" ]
import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import org.objectweb.proactive.core.node.Node;
import java.util.concurrent.*; import org.objectweb.proactive.core.node.*;
[ "java.util", "org.objectweb.proactive" ]
java.util; org.objectweb.proactive;
1,901,527
private void createApplicationRoot() { String[] path = applicationRoot.split("/"); if (path.length < 2) { return; } ObjectId parent = session.getRootFolder(); StringBuilder sb = new StringBuilder(); for (int i = 1; i < path.length; i++) { sb.append('/'); sb.append(path[i]); try { pare...
void function() { String[] path = applicationRoot.split("/"); if (path.length < 2) { return; } ObjectId parent = session.getRootFolder(); StringBuilder sb = new StringBuilder(); for (int i = 1; i < path.length; i++) { sb.append('/'); sb.append(path[i]); try { parent = session.getObjectByPath(sb.toString(), IMPORT_OPERA...
/** * Creates the application root folder. */
Creates the application root folder
createApplicationRoot
{ "repo_name": "fmui/ApacheChemistryInAction", "path": "the-blend/src/main/java/com/manning/cmis/theblend/install/CMISImporter.java", "license": "apache-2.0", "size": 13802 }
[ "java.util.HashMap", "java.util.Map", "org.apache.chemistry.opencmis.client.api.ObjectId", "org.apache.chemistry.opencmis.commons.PropertyIds", "org.apache.chemistry.opencmis.commons.enums.BaseTypeId", "org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException" ]
import java.util.HashMap; import java.util.Map; import org.apache.chemistry.opencmis.client.api.ObjectId; import org.apache.chemistry.opencmis.commons.PropertyIds; import org.apache.chemistry.opencmis.commons.enums.BaseTypeId; import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
import java.util.*; import org.apache.chemistry.opencmis.client.api.*; import org.apache.chemistry.opencmis.commons.*; import org.apache.chemistry.opencmis.commons.enums.*; import org.apache.chemistry.opencmis.commons.exceptions.*;
[ "java.util", "org.apache.chemistry" ]
java.util; org.apache.chemistry;
1,643,631
public V add(K key, V value) { synchronized (this) { cleanOrphaned(); backing.computeIfAbsent(key, k -> new HashSet<>()) .add(new ValueReference(key, value)); return value; } }
V function(K key, V value) { synchronized (this) { cleanOrphaned(); backing.computeIfAbsent(key, k -> new HashSet<>()) .add(new ValueReference(key, value)); return value; } }
/** * Adds the value to the pool of values associated with the key. * * @param key the key * @param value the value * @return the v */
Adds the value to the pool of values associated with the key
add
{ "repo_name": "mnlipp/jgrapes", "path": "org.jgrapes.core/src/org/jgrapes/core/Components.java", "license": "agpl-3.0", "size": 34209 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
1,351,164
@Test public void testBuildChunkSuccessfullTwoDimData() { instance = new SimpleDataExplanationChunkBuilder(); DataExplanationChunk dc = (DataExplanationChunk) (instance.buildChunk(context, group, rule, tags, twdata)); //Assert that the chunk holds correct data a...
void function() { instance = new SimpleDataExplanationChunkBuilder(); DataExplanationChunk dc = (DataExplanationChunk) (instance.buildChunk(context, group, rule, tags, twdata)); assertEquals(context, dc.getContext()); assertEquals(group, dc.getGroup()); assertEquals(rule, dc.getRule()); assertEquals(tags, dc.getTags())...
/** * Test of buildChunk method, of class SimpleDataExplanationChunkBuilder. * Test case: successfull execution - TwoDimData content */
Test of buildChunk method, of class SimpleDataExplanationChunkBuilder. Test case: successfull execution - TwoDimData content
testBuildChunkSuccessfullTwoDimData
{ "repo_name": "bojantomic/jeff", "path": "src/test/java/org/goodoldai/jeff/explanation/builder/SimpleDataExplanationChunkBuilderTest.java", "license": "lgpl-3.0", "size": 8701 }
[ "org.goodoldai.jeff.explanation.DataExplanationChunk", "org.goodoldai.jeff.explanation.data.TwoDimData", "org.junit.Assert" ]
import org.goodoldai.jeff.explanation.DataExplanationChunk; import org.goodoldai.jeff.explanation.data.TwoDimData; import org.junit.Assert;
import org.goodoldai.jeff.explanation.*; import org.goodoldai.jeff.explanation.data.*; import org.junit.*;
[ "org.goodoldai.jeff", "org.junit" ]
org.goodoldai.jeff; org.junit;
1,813,740
@NotNull public static TokenSet andNot(@NotNull TokenSet a, @NotNull TokenSet b) { final TokenSet newSet = new TokenSet((short)Math.min(a.myShift, b.myShift), (short)Math.max(a.myMax, b.myMax)); for (int i = 0; i < newSet.myWords.length; i++) { final int ai = newSet.myShift - a.myShift + i; fina...
static TokenSet function(@NotNull TokenSet a, @NotNull TokenSet b) { final TokenSet newSet = new TokenSet((short)Math.min(a.myShift, b.myShift), (short)Math.max(a.myMax, b.myMax)); for (int i = 0; i < newSet.myWords.length; i++) { final int ai = newSet.myShift - a.myShift + i; final int bi = newSet.myShift - b.myShift ...
/** * Returns a token set containing a result of "set subtraction" of set B from set A. * * @param a the basic token set. * @param b the token set to subtract. * @return the new token set. */
Returns a token set containing a result of "set subtraction" of set B from set A
andNot
{ "repo_name": "youdonghai/intellij-community", "path": "platform/core-api/src/com/intellij/psi/tree/TokenSet.java", "license": "apache-2.0", "size": 6296 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,641,033
private void handleConsoleStartup(InternalDistributedMember theId) { for (MembershipListener listener : allMembershipListeners) { listener.memberJoined(this, theId); } logger.info("DMMembership: Admitting new administration member < {} >.", theId); }
void function(InternalDistributedMember theId) { for (MembershipListener listener : allMembershipListeners) { listener.memberJoined(this, theId); } logger.info(STR, theId); }
/** * Makes note of a new console that has started up in the distributed cache. * */
Makes note of a new console that has started up in the distributed cache
handleConsoleStartup
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java", "license": "apache-2.0", "size": 93878 }
[ "org.apache.geode.distributed.internal.membership.InternalDistributedMember" ]
import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import org.apache.geode.distributed.internal.membership.*;
[ "org.apache.geode" ]
org.apache.geode;
2,724,664
public byte[] readFirmwareSignature( int hw ) { TDLog.v("APP FW read signature - HW " + hw ); // FIXME ASYNC_FIRMWARE_TASK // if ( mComm == null || TDInstance.getDeviceA() == null ) return; // if ( ! (mComm instanceof DistoX310Comm) ) return; // (new FirmwareTask( (DistoX310Comm)mComm, FirmwareT...
byte[] function( int hw ) { TDLog.v(STR + hw ); if ( mComm == null TDInstance.getDeviceA() == null ) return null; if ( ! (mComm instanceof DistoX310Comm) ) return null; return ((DistoX310Comm)mComm).readFirmwareSignature( TDInstance.deviceAddress(), hw ); }
/** read the firmware signature - only X310 * @param hw expected device hardware * @return firmware signtaure (or null if failure) */
read the firmware signature - only X310
readFirmwareSignature
{ "repo_name": "marcocorvi/topodroid", "path": "src/com/topodroid/DistoX/TopoDroidApp.java", "license": "gpl-3.0", "size": 106607 }
[ "com.topodroid.dev.distox2.DistoX310Comm", "com.topodroid.utils.TDLog" ]
import com.topodroid.dev.distox2.DistoX310Comm; import com.topodroid.utils.TDLog;
import com.topodroid.dev.distox2.*; import com.topodroid.utils.*;
[ "com.topodroid.dev", "com.topodroid.utils" ]
com.topodroid.dev; com.topodroid.utils;
2,521,141
public String getUuid(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "VIF.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; ...
String function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = ...
/** * Get the uuid field of the given VIF. * * @return value of the field */
Get the uuid field of the given VIF
getUuid
{ "repo_name": "cinderella/incubator-cloudstack", "path": "deps/XenServerJava/com/xensource/xenapi/VIF.java", "license": "apache-2.0", "size": 30752 }
[ "com.xensource.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.xensource.xenapi", "java.util", "org.apache.xmlrpc" ]
com.xensource.xenapi; java.util; org.apache.xmlrpc;
54,521
public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) { return new PdfPrinterGraphics2D(this, width, height, null, true, convertImagesToJPEG, quality, printerJob); }
java.awt.Graphics2D function(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) { return new PdfPrinterGraphics2D(this, width, height, null, true, convertImagesToJPEG, quality, printerJob); }
/** Gets a <CODE>Graphics2D</CODE> to print on. The graphics * are translated to PDF commands. * @param width * @param height * @param convertImagesToJPEG * @param quality * @param printerJob * @return a Graphics2D object */
Gets a <code>Graphics2D</code> to print on. The graphics are translated to PDF commands
createPrinterGraphicsShapes
{ "repo_name": "yogthos/itext", "path": "src/com/lowagie/text/pdf/PdfContentByte.java", "license": "lgpl-3.0", "size": 116364 }
[ "java.awt.print.PrinterJob" ]
import java.awt.print.PrinterJob;
import java.awt.print.*;
[ "java.awt" ]
java.awt;
567,768
EAttribute getElementRule_Name();
EAttribute getElementRule_Name();
/** * Returns the meta object for the attribute '{@link nexcore.tool.mda.model.developer.reverseTransformation.ElementRule#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see nexcore.tool.mda.model.d...
Returns the meta object for the attribute '<code>nexcore.tool.mda.model.developer.reverseTransformation.ElementRule#getName Name</code>'.
getElementRule_Name
{ "repo_name": "SK-HOLDINGS-CC/NEXCORE-UML-Modeler", "path": "nexcore.tool.mda.model/src/java/nexcore/tool/mda/model/developer/reverseTransformation/ReverseTransformationPackage.java", "license": "epl-1.0", "size": 46728 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,726,369
public SelectionKey getKey() { return _conKey; }
public SelectionKey getKey() { return _conKey; }
/** * Valid for inbound; valid for outbound shortly after creation */
Valid for inbound; valid for outbound shortly after creation
getChannel
{ "repo_name": "oakes/Nightweb", "path": "common/java/router/net/i2p/router/transport/ntcp/NTCPConnection.java", "license": "unlicense", "size": 64646 }
[ "java.nio.channels.SelectionKey" ]
import java.nio.channels.SelectionKey;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
1,062,207
public String getSubStringText() { if (subStringText != null) return subStringText; subStringText = text; int widthShrink = getPreferredSize().width - getSize().width; if (widthShrink <= 0) return subStringText; Dimension effectiveSize = getTextSize().getExpanded(-widthShrink, 0); Font ...
String function() { if (subStringText != null) return subStringText; subStringText = text; int widthShrink = getPreferredSize().width - getSize().width; if (widthShrink <= 0) return subStringText; Dimension effectiveSize = getTextSize().getExpanded(-widthShrink, 0); Font currentFont = getFont(); int dotsWidth = getText...
/** * Calculates the amount of the Label's current text will fit in the Label, * including an elipsis "..." if truncation is required. * * @return the substring * @since 2.0 */
Calculates the amount of the Label's current text will fit in the Label, including an elipsis "..." if truncation is required
getSubStringText
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.draw2d/src/org/eclipse/draw2d/Label.java", "license": "lgpl-2.1", "size": 19122 }
[ "org.eclipse.draw2d.geometry.Dimension", "org.eclipse.swt.graphics.Font" ]
import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.swt.graphics.Font;
import org.eclipse.draw2d.geometry.*; import org.eclipse.swt.graphics.*;
[ "org.eclipse.draw2d", "org.eclipse.swt" ]
org.eclipse.draw2d; org.eclipse.swt;
2,205,602
@Override public KerberosNameShim getKerberosNameShim(String name) throws IOException { return new KerberosNameShim(name); }
KerberosNameShim function(String name) throws IOException { return new KerberosNameShim(name); }
/** * Returns a shim to wrap KerberosName */
Returns a shim to wrap KerberosName
getKerberosNameShim
{ "repo_name": "wisgood/hive", "path": "shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java", "license": "apache-2.0", "size": 40854 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,374,843
public void repaint(mxRectangle region) { fireEvent(new mxEventObject(mxEvent.REPAINT, "region", region)); }
void function(mxRectangle region) { fireEvent(new mxEventObject(mxEvent.REPAINT, STR, region)); }
/** * Fires a repaint event. The optional region is the rectangle that needs * to be repainted. */
Fires a repaint event. The optional region is the rectangle that needs to be repainted
repaint
{ "repo_name": "JasonEX/scxmlgui", "path": "jgraphx/src/com/mxgraph/view/mxGraph.java", "license": "apache-2.0", "size": 196835 }
[ "com.mxgraph.util.mxEventObject" ]
import com.mxgraph.util.mxEventObject;
import com.mxgraph.util.*;
[ "com.mxgraph.util" ]
com.mxgraph.util;
2,635,966
public static GlobalSecondaryIndexDescription getSharedGlobalIndex() { try { DescribeTableResponse t = getClient().describeTable(b -> b.tableName(getTableNameForAppid(SHARED_TABLE))); return t.table().globalSecondaryIndexes().stream(). filter(gsi -> gsi.indexName().equals(getSharedIndexName())).findFirs...
static GlobalSecondaryIndexDescription function() { try { DescribeTableResponse t = getClient().describeTable(b -> b.tableName(getTableNameForAppid(SHARED_TABLE))); return t.table().globalSecondaryIndexes().stream(). filter(gsi -> gsi.indexName().equals(getSharedIndexName())).findFirst().orElse(null); } catch (Exceptio...
/** * Returns the Index object for the shared table. * @return the Index object or null */
Returns the Index object for the shared table
getSharedGlobalIndex
{ "repo_name": "Erudika/para", "path": "para-server/src/main/java/com/erudika/para/server/persistence/AWSDynamoUtils.java", "license": "apache-2.0", "size": 34182 }
[ "software.amazon.awssdk.services.dynamodb.model.DescribeTableResponse", "software.amazon.awssdk.services.dynamodb.model.GlobalSecondaryIndexDescription" ]
import software.amazon.awssdk.services.dynamodb.model.DescribeTableResponse; import software.amazon.awssdk.services.dynamodb.model.GlobalSecondaryIndexDescription;
import software.amazon.awssdk.services.dynamodb.model.*;
[ "software.amazon.awssdk" ]
software.amazon.awssdk;
1,163,144
public void stopStream() { //remove all callbacks from handler if (libTorrentHandler != null) libTorrentHandler.removeCallbacksAndMessages(null); if (streamingHandler != null) streamingHandler.removeCallbacksAndMessages(null); isCanceled = true; isStr...
void function() { if (libTorrentHandler != null) libTorrentHandler.removeCallbacksAndMessages(null); if (streamingHandler != null) streamingHandler.removeCallbacksAndMessages(null); isCanceled = true; isStreaming = false; if (currentTorrent != null) { final File saveLocation = currentTorrent.getSaveLocation(); currentT...
/** * Stop current torrent stream */
Stop current torrent stream
stopStream
{ "repo_name": "se-bastiaan/TorrentStream-Android", "path": "library/src/main/java/com/github/se_bastiaan/torrentstream/TorrentStream.java", "license": "apache-2.0", "size": 19465 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,704,631
@Override public void run() { isRunning = true; while (isRunning) { OutboundMessage nextMessage = null; synchronized (messageQueue) { if (!messageQueue.isEmpty()) { ...
void function() { isRunning = true; while (isRunning) { OutboundMessage nextMessage = null; synchronized (messageQueue) { if (!messageQueue.isEmpty()) { nextMessage = messageQueue.remove(); } } if (nextMessage != null) { switch (nextMessage.action()) { case FORWARD: try { busServices.sendFeedMessage(nextMessage.node(),...
/** * Entry point for the thread responsible for sending queued messages. */
Entry point for the thread responsible for sending queued messages
run
{ "repo_name": "acshea/edgware", "path": "fabric.lib/src/fabric/services/messageforwarding/MessageForwardingService.java", "license": "epl-1.0", "size": 6352 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,789,066
protected void createdHandler(AbstractBrokerHandler handler) { handlers.add(handler); subscriber.forEach((receiver, multiConnection) -> multiConnection.add(handler)); }
void function(AbstractBrokerHandler handler) { handlers.add(handler); subscriber.forEach((receiver, multiConnection) -> multiConnection.add(handler)); }
/** * Add the given broker connection to all listeners. */
Add the given broker connection to all listeners
createdHandler
{ "repo_name": "theoweiss/openhab2", "path": "bundles/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/internal/MqttBrokerHandlerFactory.java", "license": "epl-1.0", "size": 5720 }
[ "org.openhab.binding.mqtt.handler.AbstractBrokerHandler" ]
import org.openhab.binding.mqtt.handler.AbstractBrokerHandler;
import org.openhab.binding.mqtt.handler.*;
[ "org.openhab.binding" ]
org.openhab.binding;
927,502
ArtifactResolutionResult execute();
ArtifactResolutionResult execute();
/** * Actually execute the query, returning a query result. * Note that {@link #withArtifacts(Class, Class[])} must be called before executing the query. */
Actually execute the query, returning a query result. Note that <code>#withArtifacts(Class, Class[])</code> must be called before executing the query
execute
{ "repo_name": "gstevey/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/api/artifacts/query/ArtifactResolutionQuery.java", "license": "apache-2.0", "size": 3049 }
[ "org.gradle.api.artifacts.result.ArtifactResolutionResult" ]
import org.gradle.api.artifacts.result.ArtifactResolutionResult;
import org.gradle.api.artifacts.result.*;
[ "org.gradle.api" ]
org.gradle.api;
2,580,904
private void _deleteSelectedLists(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user) throws PortalException, SystemException, DotHibernateException { String mailingListIds = req.getParameter("mailinglists"); if ((mailingListIds == null) || (mailingListIds.trim()....
void function(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user) throws PortalException, SystemException, DotHibernateException { String mailingListIds = req.getParameter(STR); if ((mailingListIds == null) (mailingListIds.trim().equals(STR,STRmessageSTRmessage.mailinglist.deleteSTR...
/** * Delete one or more mailing lists * * @param req * @param res * @param config * @param form * @param user * @throws SystemException * @throws PortalException * @throws DotHibernateException */
Delete one or more mailing lists
_deleteSelectedLists
{ "repo_name": "dotCMS/core-2.x", "path": "src/com/dotmarketing/portlets/mailinglists/action/EditMailingListAction.java", "license": "gpl-3.0", "size": 7609 }
[ "com.dotmarketing.exception.DotHibernateException", "com.liferay.portal.PortalException", "com.liferay.portal.SystemException", "com.liferay.portal.model.User", "javax.portlet.ActionRequest", "javax.portlet.ActionResponse", "javax.portlet.PortletConfig", "org.apache.struts.action.ActionForm" ]
import com.dotmarketing.exception.DotHibernateException; import com.liferay.portal.PortalException; import com.liferay.portal.SystemException; import com.liferay.portal.model.User; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.PortletConfig; import org.apache.struts.actio...
import com.dotmarketing.exception.*; import com.liferay.portal.*; import com.liferay.portal.model.*; import javax.portlet.*; import org.apache.struts.action.*;
[ "com.dotmarketing.exception", "com.liferay.portal", "javax.portlet", "org.apache.struts" ]
com.dotmarketing.exception; com.liferay.portal; javax.portlet; org.apache.struts;
2,636,737
public List<ErrorEntity> innerErrors() { return this.innerErrors; }
List<ErrorEntity> function() { return this.innerErrors; }
/** * Get the innerErrors property: Inner errors. * * @return the innerErrors value. */
Get the innerErrors property: Inner errors
innerErrors
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/ErrorEntity.java", "license": "mit", "size": 5788 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,408,703
public static Element getUniqueInnerTag(Element element, String tagName) throws XMLException { return getUniqueInnerTag(element, tagName, true); }
static Element function(Element element, String tagName) throws XMLException { return getUniqueInnerTag(element, tagName, true); }
/** * This will return the inner tag of the given element with the given tagName. If no such element can be found, or * if there are more than one, an {@link XMLException} is thrown. */
This will return the inner tag of the given element with the given tagName. If no such element can be found, or if there are more than one, an <code>XMLException</code> is thrown
getUniqueInnerTag
{ "repo_name": "aborg0/RapidMiner-Unuk", "path": "src/com/rapidminer/io/process/XMLTools.java", "license": "agpl-3.0", "size": 29144 }
[ "com.rapidminer.tools.XMLException", "org.w3c.dom.Element" ]
import com.rapidminer.tools.XMLException; import org.w3c.dom.Element;
import com.rapidminer.tools.*; import org.w3c.dom.*;
[ "com.rapidminer.tools", "org.w3c.dom" ]
com.rapidminer.tools; org.w3c.dom;
1,198,933
public static DataResult<Map<String, Object>> packagesFromChannel(Long sid, Long cid) { SelectMode m = ModeFactory.getMode("Package_queries", "system_packages_from_channel", Map.class); Map<String, Object> params = new HashMap<String, Object>(); params.put("sid", sid); ...
static DataResult<Map<String, Object>> function(Long sid, Long cid) { SelectMode m = ModeFactory.getMode(STR, STR, Map.class); Map<String, Object> params = new HashMap<String, Object>(); params.put("sid", sid); params.put("cid", cid); return m.execute(params); }
/** * Gets packages from a channel for a system * @param sid server id * @param cid channel id * @return list of packages installed on a system from a channel */
Gets packages from a channel for a system
packagesFromChannel
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/system/SystemManager.java", "license": "gpl-2.0", "size": 134651 }
[ "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.common.db.datasource.ModeFactory", "com.redhat.rhn.common.db.datasource.SelectMode", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.common.db.datasource.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,043,578
@CheckReturnValue public String getSlaveVersion() throws IOException, InterruptedException { if (channel == null) { return "Unknown (agent is offline)"; } return channel.call(new SlaveVersion()); }
String function() throws IOException, InterruptedException { if (channel == null) { return STR; } return channel.call(new SlaveVersion()); }
/** * Get the agent version */
Get the agent version
getSlaveVersion
{ "repo_name": "patbos/jenkins", "path": "core/src/main/java/hudson/slaves/SlaveComputer.java", "license": "mit", "size": 42495 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,850,638
@Test(dependsOnMethods = "setters") public void serialization() throws Exception { byte[] bytes; try ( ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream) ...
@Test(dependsOnMethods = STR) void function() throws Exception { byte[] bytes; try ( ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream) ) { objectOutputStream.writeObject(instance); objectOutputStream.close(); ...
/** * Verifies that Java serialization and deserialization works and gives equal results. */
Verifies that Java serialization and deserialization works and gives equal results
serialization
{ "repo_name": "priimak/cloudkeeper", "path": "cloudkeeper-core/cloudkeeper-model/src/test/java/com/svbio/cloudkeeper/model/beans/MutableLocatableContract.java", "license": "apache-2.0", "size": 25445 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.ObjectInputStream", "java.io.ObjectOutputStream", "org.testng.Assert", "org.testng.annotations.Test" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.testng.Assert; import org.testng.annotations.Test;
import java.io.*; import org.testng.*; import org.testng.annotations.*;
[ "java.io", "org.testng", "org.testng.annotations" ]
java.io; org.testng; org.testng.annotations;
1,252,843
int getCurrentRowNumber() throws SQLException;
int getCurrentRowNumber() throws SQLException;
/** * Returns the current position in the result set as * a row number. * * @return the current row number * @throws SQLException if a database error occurs */
Returns the current position in the result set as a row number
getCurrentRowNumber
{ "repo_name": "GunioRobot/ntnu-prosjekt1", "path": "mysql-connector-java-3.0.17-ga/com/mysql/jdbc/RowData.java", "license": "gpl-2.0", "size": 5677 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
22,647
public static float dotProduct(Gesture a, Gesture b) { float dotProduct = 0f; List<Vector2f> as = a.getPoints(); List<Vector2f> bs = b.getPoints(); if (as.size() != bs.size()) { return -1f; } for (int i = 0; i < as.size(); i++) { dotProduct += as.get(i).dot(bs.get(i)); } return dotProd...
static float function(Gesture a, Gesture b) { float dotProduct = 0f; List<Vector2f> as = a.getPoints(); List<Vector2f> bs = b.getPoints(); if (as.size() != bs.size()) { return -1f; } for (int i = 0; i < as.size(); i++) { dotProduct += as.get(i).dot(bs.get(i)); } return dotProduct; }
/** * Dot product. * * @param a * the a * @param b * the b * @return the float */
Dot product
dotProduct
{ "repo_name": "synergynet/synergynet3.1", "path": "synergynet3.1-parent/multiplicity3-contentsystem/src/main/java/multiplicity3/csys/behaviours/gesture/Gesture.java", "license": "bsd-3-clause", "size": 7494 }
[ "com.jme3.math.Vector2f", "java.util.List" ]
import com.jme3.math.Vector2f; import java.util.List;
import com.jme3.math.*; import java.util.*;
[ "com.jme3.math", "java.util" ]
com.jme3.math; java.util;
2,483,621
LockResponse checkLock(long lockid) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, TException; /** * Unlock a set of locks. This can only be called when the locks are not * assocaited with a transaction. * @param lockid lock id returned by * {@link #lock(org.apache.hado...
LockResponse checkLock(long lockid) throws NoSuchTxnException, TxnAbortedException, NoSuchLockException, TException; /** * Unlock a set of locks. This can only be called when the locks are not * assocaited with a transaction. * @param lockid lock id returned by * {@link #lock(org.apache.hadoop.hive.metastore.api.LockRe...
/** * Check the status of a set of locks requested via a * {@link #lock(org.apache.hadoop.hive.metastore.api.LockRequest)} call. * Once a lock is acquired, {@link #heartbeat(long, long)} must be called * on a regular basis to avoid the lock being timed out by the system. * @param lockid lock id returned ...
Check the status of a set of locks requested via a <code>#lock(org.apache.hadoop.hive.metastore.api.LockRequest)</code> call. Once a lock is acquired, <code>#heartbeat(long, long)</code> must be called on a regular basis to avoid the lock being timed out by the system
checkLock
{ "repo_name": "vergilchiu/hive", "path": "metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java", "license": "apache-2.0", "size": 64398 }
[ "org.apache.hadoop.hive.metastore.api.LockRequest", "org.apache.hadoop.hive.metastore.api.LockResponse", "org.apache.hadoop.hive.metastore.api.NoSuchLockException", "org.apache.hadoop.hive.metastore.api.NoSuchTxnException", "org.apache.hadoop.hive.metastore.api.TxnAbortedException", "org.apache.thrift.TEx...
import org.apache.hadoop.hive.metastore.api.LockRequest; import org.apache.hadoop.hive.metastore.api.LockResponse; import org.apache.hadoop.hive.metastore.api.NoSuchLockException; import org.apache.hadoop.hive.metastore.api.NoSuchTxnException; import org.apache.hadoop.hive.metastore.api.TxnAbortedException; import org....
import org.apache.hadoop.hive.metastore.api.*; import org.apache.thrift.*;
[ "org.apache.hadoop", "org.apache.thrift" ]
org.apache.hadoop; org.apache.thrift;
930,506