method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private int getListID(List<PowerPlantProperties> plantListIn, String identifier) { for (int i = 0; i < plantListIn.size(); i++) { if (plantListIn.get(i).id.equals(identifier)) return i; } return -1; }
int function(List<PowerPlantProperties> plantListIn, String identifier) { for (int i = 0; i < plantListIn.size(); i++) { if (plantListIn.get(i).id.equals(identifier)) return i; } return -1; }
/** * Helper method for updatePlantList * @return int of the Plant inside the list */
Helper method for updatePlantList
getListID
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "projects/previousProjects/strategyNoHierarchy-V0.1/src/main/java/dems/behaviorModels/DEMS/DEMSPriorityControl.java", "license": "apache-2.0", "size": 12114 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
666,408
public boolean fileIsAlreadyDownloaded(String url) { File localFile = new File(getRemoteFileName(url)); return localFile.exists(); }
boolean function(String url) { File localFile = new File(getRemoteFileName(url)); return localFile.exists(); }
/** * Geeft of er op het lokale systeem, in de map van het programma, al een * bestand is dat dezelfde naam heeft als het bestand dat opgegeven wordt * door de url. * * @param url de HTTP URL naar het te checken bestand * @return true als er al een bestand bestaat met die naam; anders fals...
Geeft of er op het lokale systeem, in de map van het programma, al een bestand is dat dezelfde naam heeft als het bestand dat opgegeven wordt door de url
fileIsAlreadyDownloaded
{ "repo_name": "Omniscimus/Schedule-Changes", "path": "java/src/net/omniscimus/profielwerkstuk/text/FileFetcher.java", "license": "mit", "size": 8789 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,480,024
@SuppressWarnings("unused") private void setIndoorEnabled(final JSONArray args, final CallbackContext callbackContext) throws JSONException { Boolean isEnabled = args.getBoolean(1); map.setIndoorEnabled(isEnabled); this.sendNoResult(callbackContext); }
@SuppressWarnings(STR) void function(final JSONArray args, final CallbackContext callbackContext) throws JSONException { Boolean isEnabled = args.getBoolean(1); map.setIndoorEnabled(isEnabled); this.sendNoResult(callbackContext); }
/** * Enable Indoor map feature if set true * @param args * @param callbackContext * @throws JSONException */
Enable Indoor map feature if set true
setIndoorEnabled
{ "repo_name": "EmilianStankov/cordova-plugin-googlemaps", "path": "src/android/plugin/google/maps/PluginMap.java", "license": "apache-2.0", "size": 24152 }
[ "org.apache.cordova.CallbackContext", "org.json.JSONArray", "org.json.JSONException" ]
import org.apache.cordova.CallbackContext; import org.json.JSONArray; import org.json.JSONException;
import org.apache.cordova.*; import org.json.*;
[ "org.apache.cordova", "org.json" ]
org.apache.cordova; org.json;
1,389,567
public static DateTime calciteTimestampToJoda(final long timestamp, final DateTimeZone timeZone) { return new DateTime(timestamp, DateTimeZone.UTC).withZoneRetainFields(timeZone); }
static DateTime function(final long timestamp, final DateTimeZone timeZone) { return new DateTime(timestamp, DateTimeZone.UTC).withZoneRetainFields(timeZone); }
/** * The inverse of {@link #jodaToCalciteTimestamp(DateTime, DateTimeZone)}. * * @param timestamp Calcite style timestamp * @param timeZone session time zone * * @return joda timestamp, with time zone set to the session time zone */
The inverse of <code>#jodaToCalciteTimestamp(DateTime, DateTimeZone)</code>
calciteTimestampToJoda
{ "repo_name": "andy256/druid", "path": "sql/src/main/java/io/druid/sql/calcite/planner/Calcites.java", "license": "apache-2.0", "size": 11781 }
[ "org.joda.time.DateTime", "org.joda.time.DateTimeZone" ]
import org.joda.time.DateTime; import org.joda.time.DateTimeZone;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,938,078
public String genTestResult(TestBase testClass, String testElementName, String test, DiagnosticHandler d, boolean checkOnly, boolean keepTrailingWhiteSpace, boolean hasGeneratedOutput, TestTrait... traits) { Map<String, TestInfo> testMap = getTestMap(testElementName); TestInfo te...
String function(TestBase testClass, String testElementName, String test, DiagnosticHandler d, boolean checkOnly, boolean keepTrailingWhiteSpace, boolean hasGeneratedOutput, TestTrait... traits) { Map<String, TestInfo> testMap = getTestMap(testElementName); TestInfo testInfo = testMap.get(test); if (testInfo != null) { ...
/** * Generate a test result using GnuR. * * @param testElementName identification of the annotated test element, i.e., * {@code class.testmethod}. * @param test R test string * @param d handler for diagnostics * @param checkOnly if {@code true} do not invoke GnuR, just upd...
Generate a test result using GnuR
genTestResult
{ "repo_name": "graalvm/fastr", "path": "com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/TestOutputManager.java", "license": "gpl-2.0", "size": 20613 }
[ "com.oracle.truffle.r.runtime.RInternalError", "com.oracle.truffle.r.test.TestBase", "com.oracle.truffle.r.test.TestTrait", "java.util.Map" ]
import com.oracle.truffle.r.runtime.RInternalError; import com.oracle.truffle.r.test.TestBase; import com.oracle.truffle.r.test.TestTrait; import java.util.Map;
import com.oracle.truffle.r.runtime.*; import com.oracle.truffle.r.test.*; import java.util.*;
[ "com.oracle.truffle", "java.util" ]
com.oracle.truffle; java.util;
2,756,935
protected void processScheduleIfUnique(CrawlURI curi) { // assert Thread.currentThread() == managerThread; assert KeyedProperties.overridesActiveFrom(curi); // Canonicalization may set forceFetch flag. See // #canonicalization(CrawlURI) javadoc for circumstance. Str...
void function(CrawlURI curi) { assert KeyedProperties.overridesActiveFrom(curi); String canon = curi.getCanonicalString(); if (curi.forceFetch()) { uriUniqFilter.addForce(canon, curi); } else { uriUniqFilter.add(canon, curi); } }
/** * Arrange for the given CrawlURI to be visited, if it is not * already scheduled/completed. * * @see org.archive.crawler.framework.Frontier#schedule(org.archive.modules.CrawlURI) */
Arrange for the given CrawlURI to be visited, if it is not already scheduled/completed
processScheduleIfUnique
{ "repo_name": "searchtechnologies/heritrix-connector", "path": "engine-3.1.1/engine/src/main/java/org/archive/crawler/frontier/WorkQueueFrontier.java", "license": "apache-2.0", "size": 59217 }
[ "org.archive.modules.CrawlURI", "org.archive.spring.KeyedProperties" ]
import org.archive.modules.CrawlURI; import org.archive.spring.KeyedProperties;
import org.archive.modules.*; import org.archive.spring.*;
[ "org.archive.modules", "org.archive.spring" ]
org.archive.modules; org.archive.spring;
2,523,913
private void showSnackMessage(int messageResource) { Snackbar snackbar = Snackbar.make( getActivity().findViewById(android.R.id.content), messageResource, Snackbar.LENGTH_LONG ); snackbar.show(); }
void function(int messageResource) { Snackbar snackbar = Snackbar.make( getActivity().findViewById(android.R.id.content), messageResource, Snackbar.LENGTH_LONG ); snackbar.show(); }
/** * Show a temporary message in a Snackbar bound to the content view of the parent Activity * * @param messageResource Message to show. */
Show a temporary message in a Snackbar bound to the content view of the parent Activity
showSnackMessage
{ "repo_name": "jujojujoju/android", "path": "src/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java", "license": "gpl-2.0", "size": 5453 }
[ "android.support.design.widget.Snackbar" ]
import android.support.design.widget.Snackbar;
import android.support.design.widget.*;
[ "android.support" ]
android.support;
2,286,969
public Node getLastChild() { return last; }
Node function() { return last; }
/** * <b>DOM L1</b> * Returns the last child of this node, or null if there are none. */
DOM L1 Returns the last child of this node, or null if there are none
getLastChild
{ "repo_name": "rhuitl/uClinux", "path": "lib/classpath/gnu/xml/dom/DomNode.java", "license": "gpl-2.0", "size": 63148 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,200,088
private NamespaceService getNamespaceService() { return serviceRegistry.getNamespaceService(); }
NamespaceService function() { return serviceRegistry.getNamespaceService(); }
/** * Avoid injection issues: Look it up from the Service Registry as required */
Avoid injection issues: Look it up from the Service Registry as required
getNamespaceService
{ "repo_name": "Tybion/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/security/person/PersonServiceImpl.java", "license": "lgpl-3.0", "size": 83844 }
[ "org.alfresco.service.namespace.NamespaceService" ]
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
333,257
public io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleRequest> streamingFromClient( io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleResponse> responseObserver) { return asyncClientStreamingCall( getChannel().newCall(getStreamingFromClientMethod(), get...
io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleRequest> function( io.grpc.stub.StreamObserver<io.grpc.benchmarks.proto.Messages.SimpleResponse> responseObserver) { return asyncClientStreamingCall( getChannel().newCall(getStreamingFromClientMethod(), getCallOptions()), responseObserver); }
/** * <pre> * Single-sided unbounded streaming from client to server * The server returns the client payload as-is once the client does WritesDone * </pre> */
<code> Single-sided unbounded streaming from client to server The server returns the client payload as-is once the client does WritesDone </code>
streamingFromClient
{ "repo_name": "zhangkun83/grpc-java", "path": "benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java", "license": "apache-2.0", "size": 27241 }
[ "io.grpc.stub.ClientCalls", "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,224,600
public void closeAout() { Log.d(TAG, "Closing the java audio output"); mAout.release(); }
void function() { Log.d(TAG, STR); mAout.release(); }
/** * Close the Java audio output * This function is called by the native code */
Close the Java audio output This function is called by the native code
closeAout
{ "repo_name": "flx42/vlc-android", "path": "vlc-android/src/org/videolan/libvlc/LibVLC.java", "license": "gpl-2.0", "size": 20299 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,685,479
public OutOfProcessSeleniumServer start(String... extraFlags) throws IOException { log.info("Got a request to start a new selenium server"); if (command != null) { log.info("Server already started"); throw new RuntimeException("Server already started"); } String serverJar = buildServerAnd...
OutOfProcessSeleniumServer function(String... extraFlags) throws IOException { log.info(STR); if (command != null) { log.info(STR); throw new RuntimeException(STR); } String serverJar = buildServerAndClasspath(); int port = PortProber.findFreePort(); String localAddress = new NetworkUtils().getPrivateLocalAddress(); ba...
/** * Creates an out of process server with log capture enabled. * * @return The new server. */
Creates an out of process server with log capture enabled
start
{ "repo_name": "chrisblock/selenium", "path": "java/client/test/org/openqa/selenium/testing/drivers/OutOfProcessSeleniumServer.java", "license": "apache-2.0", "size": 4177 }
[ "java.io.IOException", "java.net.MalformedURLException", "org.openqa.selenium.net.NetworkUtils", "org.openqa.selenium.net.PortProber" ]
import java.io.IOException; import java.net.MalformedURLException; import org.openqa.selenium.net.NetworkUtils; import org.openqa.selenium.net.PortProber;
import java.io.*; import java.net.*; import org.openqa.selenium.net.*;
[ "java.io", "java.net", "org.openqa.selenium" ]
java.io; java.net; org.openqa.selenium;
524,239
public static void initTableMapperJob(byte[] table, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job) throws IOException { initTableMapperJob(Bytes.toString(table), scan, mapper, outputKeyClass, outputValueClass, job, ...
static void function(byte[] table, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job) throws IOException { initTableMapperJob(Bytes.toString(table), scan, mapper, outputKeyClass, outputValueClass, job, true); }
/** * Use this before submitting a TableMap job. It will appropriately set up * the job. * * @param table Binary representation of the table name to read from. * @param scan The scan instance with the columns, time range etc. * @param mapper The mapper class to use. * @param outputKeyClass The c...
Use this before submitting a TableMap job. It will appropriately set up the job
initTableMapperJob
{ "repo_name": "mahak/hbase", "path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java", "license": "apache-2.0", "size": 46796 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.util.Bytes", "org.apache.hadoop.mapreduce.Job" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.mapreduce.Job;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
394,904
public void setFileSystemMgtName(ObjectName fileSystemMgtName) { RIDSupport.fileSystemMgtName = fileSystemMgtName; }
void function(ObjectName fileSystemMgtName) { RIDSupport.fileSystemMgtName = fileSystemMgtName; }
/** * Set the name of the FileSystemMgtBean. * <p> * This bean is used to retrieve the DICOM object. * * @param fileSystemMgtName The fileSystemMgtName to set. */
Set the name of the FileSystemMgtBean. This bean is used to retrieve the DICOM object
setFileSystemMgtName
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4jboss-all/tags/DCM4JBOSS_2_7_3/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/RIDSupport.java", "license": "apache-2.0", "size": 33683 }
[ "javax.management.ObjectName" ]
import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
665,132
SessionStatistics getStatistics();
SessionStatistics getStatistics();
/** * Get the statistics for this session. * * @return The session statistics being collected for this session */
Get the statistics for this session
getStatistics
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/hibernate-core/org/hibernate/Session.java", "license": "gpl-2.0", "size": 43236 }
[ "org.hibernate.stat.SessionStatistics" ]
import org.hibernate.stat.SessionStatistics;
import org.hibernate.stat.*;
[ "org.hibernate.stat" ]
org.hibernate.stat;
786,002
EList<Variable> getLocals();
EList<Variable> getLocals();
/** * Returns the value of the '<em><b>Locals</b></em>' containment reference list. * The list contents are of type {@link org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.Variable}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Locals</em>' containment reference list isn't...
Returns the value of the 'Locals' containment reference list. The list contents are of type <code>org.gemoc.activitydiagram.sequential.xactivitydiagram.activitydiagram.Variable</code>. If the meaning of the 'Locals' containment reference list isn't clear, there really should be more of a description here...
getLocals
{ "repo_name": "gemoc/activitydiagram", "path": "dev/gemoc_sequential/language_workbench/org.gemoc.activitydiagram.sequential.xactivitydiagram/src/org/gemoc/activitydiagram/sequential/xactivitydiagram/activitydiagram/Activity.java", "license": "epl-1.0", "size": 6240 }
[ "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;
802,457
// XML source editor is opened by CDE when the source is "initially" invalid. // Called by DDE when the source becomes valid and it is DD. public XMLEditor getSourceEditor() { return sourceTextEditor; }
XMLEditor function() { return sourceTextEditor; }
/** * Gets the source editor. * * @return the source editor */
Gets the source editor
getSourceEditor
{ "repo_name": "apache/uima-uimaj", "path": "uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/MultiPageEditor.java", "license": "apache-2.0", "size": 143007 }
[ "org.apache.uima.taeconfigurator.editors.xml.XMLEditor" ]
import org.apache.uima.taeconfigurator.editors.xml.XMLEditor;
import org.apache.uima.taeconfigurator.editors.xml.*;
[ "org.apache.uima" ]
org.apache.uima;
459,817
public void setTimeNanos(long timeNanos) { setTime(TimeNanosUtil.getMillisFromNanos(timeNanos)); timeNanoPart = TimeNanosUtil.getNanoPartFromNanos(timeNanos); }
void function(long timeNanos) { setTime(TimeNanosUtil.getMillisFromNanos(timeNanos)); timeNanoPart = TimeNanosUtil.getNanoPartFromNanos(timeNanos); }
/** * Changes timestamp of event. * Time is measured in nanoseconds between the current time and midnight, January 1, 1970 UTC. * @param timeNanos timestamp in nanoseconds. */
Changes timestamp of event. Time is measured in nanoseconds between the current time and midnight, January 1, 1970 UTC
setTimeNanos
{ "repo_name": "Devexperts/QD", "path": "dxfeed-api/src/main/java/com/dxfeed/event/market/TimeAndSale.java", "license": "mpl-2.0", "size": 23803 }
[ "com.dxfeed.event.impl.TimeNanosUtil" ]
import com.dxfeed.event.impl.TimeNanosUtil;
import com.dxfeed.event.impl.*;
[ "com.dxfeed.event" ]
com.dxfeed.event;
1,249,730
@Reference( name = "keyManager.connector.service", service = KeyManagerConnectorConfiguration.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeKeyManagerConnectorConfiguration") protected void addKey...
@Reference( name = STR, service = KeyManagerConnectorConfiguration.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = STR) void function( KeyManagerConnectorConfiguration keyManagerConnectorConfiguration, Map<String, Object> properties) { if (properties.containsKey(APIConstan...
/** * Initialize the KeyManager Connector configuration Service Service dependency * * @param keyManagerConnectorConfiguration {@link KeyManagerConnectorConfiguration} service reference. */
Initialize the KeyManager Connector configuration Service Service dependency
addKeyManagerConnectorConfiguration
{ "repo_name": "nuwand/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/internal/APIManagerComponent.java", "license": "apache-2.0", "size": 51979 }
[ "java.util.Map", "org.osgi.service.component.annotations.Reference", "org.osgi.service.component.annotations.ReferenceCardinality", "org.osgi.service.component.annotations.ReferencePolicy", "org.wso2.carbon.apimgt.api.model.KeyManagerConnectorConfiguration", "org.wso2.carbon.apimgt.impl.APIConstants", "...
import java.util.Map; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; import org.wso2.carbon.apimgt.api.model.KeyManagerConnectorConfiguration; import org.wso2.carbon.apimgt.impl.A...
import java.util.*; import org.osgi.service.component.annotations.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.keymgt.*;
[ "java.util", "org.osgi.service", "org.wso2.carbon" ]
java.util; org.osgi.service; org.wso2.carbon;
641,459
private static boolean eq(Index pk, SearchRow r1, SearchRow r2) { return r1 == r2 || (r1 != null && r2 != null && pk.compareRows(r1, r2) == 0); }
static boolean function(Index pk, SearchRow r1, SearchRow r2) { return r1 == r2 (r1 != null && r2 != null && pk.compareRows(r1, r2) == 0); }
/** * Check row equality. * * @param pk Primary key index. * @param r1 First row. * @param r2 Second row. * @return {@code true} if rows are the same. */
Check row equality
eq
{ "repo_name": "agura/incubator-ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java", "license": "apache-2.0", "size": 28243 }
[ "org.h2.index.Index", "org.h2.result.SearchRow" ]
import org.h2.index.Index; import org.h2.result.SearchRow;
import org.h2.index.*; import org.h2.result.*;
[ "org.h2.index", "org.h2.result" ]
org.h2.index; org.h2.result;
728,607
public final NumberDataValue charLength(NumberDataValue result) throws StandardException { if (result == null) { result = new SQLInteger(); } if (this.isNull()) { result.setToNull(); return result; } result.setValue(getValue().length); return result; }
final NumberDataValue function(NumberDataValue result) throws StandardException { if (result == null) { result = new SQLInteger(); } if (this.isNull()) { result.setToNull(); return result; } result.setValue(getValue().length); return result; }
/** * * This method implements the char_length function for bit. * * @param result The result of a previous call to this method, null * if not called yet * * @return A SQLInteger containing the length of the char value * * @exception StandardException Thrown on error * * @see ConcatableDataVa...
This method implements the char_length function for bit
charLength
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/SQLBinary.java", "license": "apache-2.0", "size": 40696 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException;
import com.pivotal.gemfirexd.internal.iapi.error.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
2,127,589
private void setShowProblemByClass(Class<? extends ICompilerProblem> clazz, boolean enable) { if (enable) filter.remove(clazz); else filter.add(clazz); }
void function(Class<? extends ICompilerProblem> clazz, boolean enable) { if (enable) filter.remove(clazz); else filter.add(clazz); }
/** * Enable or disable a compiler problem class. * * @param clazz the class to enable the problem. * @param enable if true the problem is enabled and NOT filtered, otherwise * the problem is filtered. */
Enable or disable a compiler problem class
setShowProblemByClass
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/compiler/clients/problems/ProblemSettingsFilter.java", "license": "apache-2.0", "size": 8966 }
[ "org.apache.flex.compiler.problems.ICompilerProblem" ]
import org.apache.flex.compiler.problems.ICompilerProblem;
import org.apache.flex.compiler.problems.*;
[ "org.apache.flex" ]
org.apache.flex;
1,295,865
private VM mockVm() { VM vm = new VM(); vm.setStatus(VMStatus.Down); vm.setStoragePoolId(Guid.newGuid()); when(vmDao.get(command.getParameters().getVmId())).thenReturn(vm); return vm; }
VM function() { VM vm = new VM(); vm.setStatus(VMStatus.Down); vm.setStoragePoolId(Guid.newGuid()); when(vmDao.get(command.getParameters().getVmId())).thenReturn(vm); return vm; }
/** * Mock a VM. */
Mock a VM
mockVm
{ "repo_name": "yingyun001/ovirt-engine", "path": "backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddDiskCommandTest.java", "license": "apache-2.0", "size": 40788 }
[ "org.mockito.Mockito", "org.ovirt.engine.core.common.businessentities.VMStatus", "org.ovirt.engine.core.compat.Guid" ]
import org.mockito.Mockito; import org.ovirt.engine.core.common.businessentities.VMStatus; import org.ovirt.engine.core.compat.Guid;
import org.mockito.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*;
[ "org.mockito", "org.ovirt.engine" ]
org.mockito; org.ovirt.engine;
599,627
static File getTempDir() throws IOException { File jnatmp; String prop = System.getProperty("jna.tmpdir"); if (prop != null) { jnatmp = new File(prop); jnatmp.mkdirs(); } else { File tmp = new File(System.getProperty("java.io.tmpdir...
static File getTempDir() throws IOException { File jnatmp; String prop = System.getProperty(STR); if (prop != null) { jnatmp = new File(prop); jnatmp.mkdirs(); } else { File tmp = new File(System.getProperty(STR)); jnatmp = new File(tmp, "jna-" + System.getProperty(STR)); jnatmp.mkdirs(); if (!jnatmp.exists() !jnatmp.c...
/** Obtain a directory suitable for writing JNA-specific temporary files. Override with <code>jna.tmpdir</code> */
Obtain a directory suitable for writing JNA-specific temporary files
getTempDir
{ "repo_name": "deusprogrammer/jna", "path": "src/com/sun/jna/Native.java", "license": "lgpl-2.1", "size": 78784 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
142,127
public boolean isFrozen() { return getPercent() > 0 && getPercent() < 100 && (new Date()).getTime() - saved.getTime() > frozenTimeout; }
boolean function() { return getPercent() > 0 && getPercent() < 100 && (new Date()).getTime() - saved.getTime() > frozenTimeout; }
/** * Return true if has lasted a long since the last data received. * by the user. * * @return boolean */
Return true if has lasted a long since the last data received. by the user
isFrozen
{ "repo_name": "mwl/gwt-upload", "path": "core/src/main/java/gwtupload/server/AbstractUploadListener.java", "license": "apache-2.0", "size": 5908 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,223,852
@Test(expected=InterfaceNotOpenException.class) public void testSendMulticastDataAsyncConnectionClosed() throws TimeoutException, XBeeException { // Throw an Interface not open exception when sending and checking any Explicit Addressing packet. Mockito.doThrow(new InterfaceNotOpenException()).when(zigBeeDevice)...
@Test(expected=InterfaceNotOpenException.class) void function() throws TimeoutException, XBeeException { Mockito.doThrow(new InterfaceNotOpenException()).when(zigBeeDevice).sendAndCheckXBeePacket(Mockito.any(ExplicitAddressingPacket.class), Mockito.eq(true)); zigBeeDevice.sendMulticastDataAsync(XBEE_16BIT_ADDRESS, SOUR...
/** * Test method for {@link com.digi.xbee.api.ZigBeeDevice#sendMulticastDataAsync(XBee16BitAddress, int, int, int, int, byte[])}. * * <p>Verify that multicast data async cannot be sent if the device is not open.</p> * * @throws XBeeException * @throws TimeoutException */
Test method for <code>com.digi.xbee.api.ZigBeeDevice#sendMulticastDataAsync(XBee16BitAddress, int, int, int, int, byte[])</code>. Verify that multicast data async cannot be sent if the device is not open
testSendMulticastDataAsyncConnectionClosed
{ "repo_name": "brucetsao/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/SendMulticastDataAsyncTest.java", "license": "mpl-2.0", "size": 14288 }
[ "com.digi.xbee.api.exceptions.InterfaceNotOpenException", "com.digi.xbee.api.exceptions.TimeoutException", "com.digi.xbee.api.exceptions.XBeeException", "com.digi.xbee.api.packet.common.ExplicitAddressingPacket", "org.junit.Test", "org.mockito.Mockito" ]
import com.digi.xbee.api.exceptions.InterfaceNotOpenException; import com.digi.xbee.api.exceptions.TimeoutException; import com.digi.xbee.api.exceptions.XBeeException; import com.digi.xbee.api.packet.common.ExplicitAddressingPacket; import org.junit.Test; import org.mockito.Mockito;
import com.digi.xbee.api.exceptions.*; import com.digi.xbee.api.packet.common.*; import org.junit.*; import org.mockito.*;
[ "com.digi.xbee", "org.junit", "org.mockito" ]
com.digi.xbee; org.junit; org.mockito;
600,232
@SuppressWarnings({"unused", "PMD.UnusedPrivateMethod" }) private void setCharacteristics(final Set<AbstractCharacteristic> characteristicsVal) { this.characteristics = characteristicsVal; }
@SuppressWarnings({STR, STR }) void function(final Set<AbstractCharacteristic> characteristicsVal) { this.characteristics = characteristicsVal; }
/** * Sets the characteristics. * * @param characteristicsVal the characteristics */
Sets the characteristics
setCharacteristics
{ "repo_name": "NCIP/caarray", "path": "software/caarray-common.jar/src/main/java/gov/nih/nci/caarray/domain/sample/AbstractBioMaterial.java", "license": "bsd-3-clause", "size": 18188 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,636,977
public List<byte[]> sort(final byte[] key) { checkIsInMulti(); client.sort(key); return client.getBinaryMultiBulkReply(); }
List<byte[]> function(final byte[] key) { checkIsInMulti(); client.sort(key); return client.getBinaryMultiBulkReply(); }
/** * Sort a Set or a List. * <p> * Sort the elements contained in the List, Set, or Sorted Set value at key. * By default sorting is numeric with elements being compared as double * precision floating point numbers. This is the simplest form of SORT. * * @see #sort(byte[], byte[]) * @see #sort(byte[],...
Sort a Set or a List. Sort the elements contained in the List, Set, or Sorted Set value at key. By default sorting is numeric with elements being compared as double precision floating point numbers. This is the simplest form of SORT
sort
{ "repo_name": "EdwardLee03/jedis-sr", "path": "src/main/java/redis/clients/jedis/BinaryJedis.java", "license": "mit", "size": 118766 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,303,343
protected String normalizeUnicode(String str) { Normalizer.Form form = Normalizer.Form.NFD; if (!Normalizer.isNormalized(str, form)) { return Normalizer.normalize(str, form); } return str; }
String function(String str) { Normalizer.Form form = Normalizer.Form.NFD; if (!Normalizer.isNormalized(str, form)) { return Normalizer.normalize(str, form); } return str; }
/** * Normalize string into "Normalization Form Canonical Decomposition" (NFD). * * References: * http://stackoverflow.com/questions/3610013 * http://en.wikipedia.org/wiki/Unicode_equivalence * * @param str * @return string normalized into NFC form. */
Normalize string into "Normalization Form Canonical Decomposition" (NFD). References: HREF HREF
normalizeUnicode
{ "repo_name": "guptavishal/jets3t-aws-roles", "path": "src/org/jets3t/service/utils/FileComparer.java", "license": "apache-2.0", "size": 62213 }
[ "java.text.Normalizer" ]
import java.text.Normalizer;
import java.text.*;
[ "java.text" ]
java.text;
2,374,249
public boolean intersectsLineSegment(Vector2 pointA, Vector2 pointB);
boolean function(Vector2 pointA, Vector2 pointB);
/** * Returns if this {@link CollisionShape} intersects a line segment * * @param pointA * The first point in the line segment * @param pointB * The second point in the line segment * @return True if this {@link CollisionShape} intersects the line segment */
Returns if this <code>CollisionShape</code> intersects a line segment
intersectsLineSegment
{ "repo_name": "hyperverse/mini2Dx", "path": "core/src/main/java/org/mini2Dx/core/engine/geom/CollisionShape.java", "license": "bsd-3-clause", "size": 4322 }
[ "com.badlogic.gdx.math.Vector2" ]
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
922,445
void removeAllViewsUnfiltered() { mCallback.removeAllViews(); mBucket.reset(); mHiddenViews.clear(); if (DEBUG) { Log.d(TAG, "removeAllViewsUnfiltered"); } }
void removeAllViewsUnfiltered() { mCallback.removeAllViews(); mBucket.reset(); mHiddenViews.clear(); if (DEBUG) { Log.d(TAG, STR); } }
/** * Removes all views from the ViewGroup including the hidden ones. */
Removes all views from the ViewGroup including the hidden ones
removeAllViewsUnfiltered
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/support/v7/recyclerview/src/android/support/v7/widget/ChildHelper.java", "license": "gpl-3.0", "size": 15124 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
279,587
public static void make(String dataFilepath, String cdbFilepath, String tempFilepath, Cdb ignoreCdb) throws IOException { BufferedInputStream in = new BufferedInputStream( new FileInputStream(dataFilepath)); make(in, cdbFilepath, tempFilepath, ignoreCdb); try { in.close(); } catch (Excepti...
static void function(String dataFilepath, String cdbFilepath, String tempFilepath, Cdb ignoreCdb) throws IOException { BufferedInputStream in = new BufferedInputStream( new FileInputStream(dataFilepath)); make(in, cdbFilepath, tempFilepath, ignoreCdb); try { in.close(); } catch (Exception ignored) {} }
/** * Builds a CDB file from a CDB-format text file, excluding records * with data matching keys in `ignoreCdb'. * * @param dataFilepath The CDB data file to read. * @param cdbFilepath The CDB file to create. * @param tempFilepath The temporary file to use when creating the * CDB file. * @param ignoreC...
Builds a CDB file from a CDB-format text file, excluding records with data matching keys in `ignoreCdb'
make
{ "repo_name": "duckAsteroid/rat-xml", "path": "cdb/src/main/java/com/strangegizmo/cdb/CdbMake.java", "license": "apache-2.0", "size": 13184 }
[ "java.io.BufferedInputStream", "java.io.FileInputStream", "java.io.IOException" ]
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
784,540
@OneToMany(mappedBy="change") public List<EnrolmentChangePart> getParts() { return parts; }
@OneToMany(mappedBy=STR) List<EnrolmentChangePart> function() { return parts; }
/** * Gets the parts of this change set. * * @return the parts */
Gets the parts of this change set
getParts
{ "repo_name": "rnicoll/learn_syllabus_plus_sync", "path": "src/main/java/uk/ac/ed/learn9/bb/timetabling/data/EnrolmentChange.java", "license": "mit", "size": 6077 }
[ "java.util.List", "javax.persistence.OneToMany" ]
import java.util.List; import javax.persistence.OneToMany;
import java.util.*; import javax.persistence.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
1,373,905
public void setMethod(Method value) { m_Method = value; reset(); }
void function(Method value) { m_Method = value; reset(); }
/** * Sets the method for the request. * * @param value the method */
Sets the method for the request
setMethod
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-net/src/main/java/adams/flow/transformer/HttpRequest.java", "license": "gpl-3.0", "size": 10972 }
[ "com.github.fracpete.requests4j.request.Method" ]
import com.github.fracpete.requests4j.request.Method;
import com.github.fracpete.requests4j.request.*;
[ "com.github.fracpete" ]
com.github.fracpete;
726,993
@Nullable protected Result<DecoratedString> getCustomResult( @NotNull final Table<String, Attribute<String>, List<Attribute<String>>> table, @NotNull final CustomSqlProvider customSqlProvider, @NotNull final MetadataManager metadataManager, @NotNull final DecoratorFactory decorat...
Result<DecoratedString> function( @NotNull final Table<String, Attribute<String>, List<Attribute<String>>> table, @NotNull final CustomSqlProvider customSqlProvider, @NotNull final MetadataManager metadataManager, @NotNull final DecoratorFactory decoratorFactory) { return getCustomResult( table.getName(), customSqlProv...
/** * Retrieves the custom result. * @param table the {@link Table} instance. * @param customSqlProvider the {@link CustomSqlProvider} instance. * @param metadataManager the {@link MetadataManager} instance. * @param decoratorFactory the {@link DecoratorFactory} instance. * @return such {@...
Retrieves the custom result
getCustomResult
{ "repo_name": "rydnr/queryj-rt", "path": "queryj-core/src/main/java/org/acmsl/queryj/metadata/AbstractTableDecorator.java", "license": "gpl-2.0", "size": 74498 }
[ "java.util.List", "org.acmsl.queryj.customsql.CustomSqlProvider", "org.acmsl.queryj.customsql.Result", "org.acmsl.queryj.metadata.vo.Attribute", "org.acmsl.queryj.metadata.vo.Table", "org.jetbrains.annotations.NotNull" ]
import java.util.List; import org.acmsl.queryj.customsql.CustomSqlProvider; import org.acmsl.queryj.customsql.Result; import org.acmsl.queryj.metadata.vo.Attribute; import org.acmsl.queryj.metadata.vo.Table; import org.jetbrains.annotations.NotNull;
import java.util.*; import org.acmsl.queryj.customsql.*; import org.acmsl.queryj.metadata.vo.*; import org.jetbrains.annotations.*;
[ "java.util", "org.acmsl.queryj", "org.jetbrains.annotations" ]
java.util; org.acmsl.queryj; org.jetbrains.annotations;
488,350
private void onCallbackException(Exception e) { CronetException streamError = new CronetException("CalledByNative method has thrown an exception", e); Log.e(CronetUrlRequestContext.LOG_TAG, "Exception in CalledByNative method", e); failWithExceptionOnExecutor(streamError); ...
void function(Exception e) { CronetException streamError = new CronetException(STR, e); Log.e(CronetUrlRequestContext.LOG_TAG, STR, e); failWithExceptionOnExecutor(streamError); }
/** * If callback method throws an exception, stream gets canceled * and exception is reported via onFailed callback. * Only called on the Executor. */
If callback method throws an exception, stream gets canceled and exception is reported via onFailed callback. Only called on the Executor
onCallbackException
{ "repo_name": "danakj/chromium", "path": "components/cronet/android/java/src/org/chromium/net/impl/CronetBidirectionalStream.java", "license": "bsd-3-clause", "size": 30490 }
[ "org.chromium.base.Log", "org.chromium.net.CronetException" ]
import org.chromium.base.Log; import org.chromium.net.CronetException;
import org.chromium.base.*; import org.chromium.net.*;
[ "org.chromium.base", "org.chromium.net" ]
org.chromium.base; org.chromium.net;
1,516,936
public PutIndexTemplateRequest settings(String source) { this.settings = ImmutableSettings.settingsBuilder().loadFromSource(source).build(); return this; }
PutIndexTemplateRequest function(String source) { this.settings = ImmutableSettings.settingsBuilder().loadFromSource(source).build(); return this; }
/** * The settings to create the index template with (either json/yaml/properties format). */
The settings to create the index template with (either json/yaml/properties format)
settings
{ "repo_name": "speedplane/elasticsearch", "path": "src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java", "license": "apache-2.0", "size": 14262 }
[ "org.elasticsearch.common.settings.ImmutableSettings" ]
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,647,415
public void setSwfFile(String swfFile) { this.swfFile = GWT.getHostPageBaseURL() + swfFile; }
void function(String swfFile) { this.swfFile = GWT.getHostPageBaseURL() + swfFile; }
/** * Sets or resets the swfFile to load. * Takes no effect after the page has been populated (which is done on experiment start, * if on deferred mode). * @param swfFile Path to the swf file, relative to the gwt module base. */
Sets or resets the swfFile to load. Takes no effect after the page has been populated (which is done on experiment start, if on deferred mode)
setSwfFile
{ "repo_name": "zstars/weblabdeusto", "path": "client/src/es/deusto/weblab/client/lab/experiments/util/applets/flash/FlashExperiment.java", "license": "bsd-2-clause", "size": 18495 }
[ "com.google.gwt.core.client.GWT" ]
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.*;
[ "com.google.gwt" ]
com.google.gwt;
898,950
@Restricted(NoExternalUse.class) public static boolean isResourceRequest(HttpServletRequest req) { if (!isResourceDomainConfigured()) { return false; } String resourceRootUrl = get().getUrl(); try { URL url = new URL(resourceRootUrl); String r...
@Restricted(NoExternalUse.class) static boolean function(HttpServletRequest req) { if (!isResourceDomainConfigured()) { return false; } String resourceRootUrl = get().getUrl(); try { URL url = new URL(resourceRootUrl); String resourceRootHost = url.getHost(); if (!resourceRootHost.equalsIgnoreCase(req.getServerName()))...
/** * Returns true if and only if this is a request to URLs under the resource root URL. * * For this to be the case, the requested host and port (from the Host HTTP request header) must match what is * configured for the resource root URL. * * @param req the request to check * @retur...
Returns true if and only if this is a request to URLs under the resource root URL. For this to be the case, the requested host and port (from the Host HTTP request header) must match what is configured for the resource root URL
isResourceRequest
{ "repo_name": "MarkEWaite/jenkins", "path": "core/src/main/java/jenkins/security/ResourceDomainConfiguration.java", "license": "mit", "size": 11936 }
[ "java.net.MalformedURLException", "javax.servlet.http.HttpServletRequest", "org.kohsuke.accmod.Restricted", "org.kohsuke.accmod.restrictions.NoExternalUse" ]
import java.net.MalformedURLException; import javax.servlet.http.HttpServletRequest; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.NoExternalUse;
import java.net.*; import javax.servlet.http.*; import org.kohsuke.accmod.*; import org.kohsuke.accmod.restrictions.*;
[ "java.net", "javax.servlet", "org.kohsuke.accmod" ]
java.net; javax.servlet; org.kohsuke.accmod;
1,989,060
public void menu ( ){ try { actionListener = (ActionEvent e) -> { // if (e.getSource().equals(main_view.getAddPatient_menu())){ patient_view.setVisible(true); // patient_controller; System...
void function ( ){ try { actionListener = (ActionEvent e) -> { if (e.getSource().equals(main_view.getAddPatient_menu())){ patient_view.setVisible(true); System.out.println(STR); } if (e.getSource().equals(main_view.getPatientTable_menu())){ patient_table_view.setVisible(true); System.out.println(STR); } if (e.getSource...
/** * Method to get the actions of the main view menu */
Method to get the actions of the main view menu
menu
{ "repo_name": "fredrickabayie/SAFE", "path": "src/safe/controllers/Main_Controller.java", "license": "apache-2.0", "size": 3431 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,971,573
public int read(byte[] buf, int n) throws IOException { int wr = 0, wrOffset = 0; while (n > 0) { if (bufCount <= 0) { int ret = getBody(inputStream); if (ret < 0) throw new IOException("Ogg decoding error"); if ...
int function(byte[] buf, int n) throws IOException { int wr = 0, wrOffset = 0; while (n > 0) { if (bufCount <= 0) { int ret = getBody(inputStream); if (ret < 0) throw new IOException(STR); if (ret == 0) break; bufCount = ret; offset = 0; } int rd = (bufCount < n) ? bufCount : n; System.arraycopy(convBuf, offset, buf, w...
/** * Reads into the supplied buffer. * * @param buf The buffer to read to. * @param n The number of bytes to read. * @return Negative on error, zero on end of stream, otherwise the * number of bytes added to the buffer. * @throws IOException if JOrbis ...
Reads into the supplied buffer
read
{ "repo_name": "edijman/SOEN_6431_Colonization_Game", "path": "src/net/sf/freecol/common/sound/OggVorbisDecoderFactory.java", "license": "gpl-2.0", "size": 14852 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
993,821
final String databaseType = props.getString("database.type"); AzkabanDataSource dataSource = null; if (databaseType.equals("mysql")) { final int port = props.getInt("mysql.port"); final String host = props.getString("mysql.host"); final String database = props.getString("mysql.database"); ...
final String databaseType = props.getString(STR); AzkabanDataSource dataSource = null; if (databaseType.equals("mysql")) { final int port = props.getInt(STR); final String host = props.getString(STR); final String database = props.getString(STR); final String user = props.getString(STR); final String password = props.g...
/** * Create Datasource from parameters in the properties */
Create Datasource from parameters in the properties
getDataSource
{ "repo_name": "reallocf/azkaban", "path": "azkaban-common/src/main/java/azkaban/database/DataSourceUtils.java", "license": "apache-2.0", "size": 4321 }
[ "java.nio.file.Path", "java.nio.file.Paths" ]
import java.nio.file.Path; import java.nio.file.Paths;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
2,016,459
public void setMaxObservedStorageMB(final double maxObservedStorageMBValue) { this.maxObservedStorageMB = maxObservedStorageMBValue; } private ArrayList<RecommendedElasticPoolMetric> metrics;
void function(final double maxObservedStorageMBValue) { this.maxObservedStorageMB = maxObservedStorageMBValue; } private ArrayList<RecommendedElasticPoolMetric> metrics;
/** * Optional. Gets maximum observed storage in megabytes. * @param maxObservedStorageMBValue The MaxObservedStorageMB value. */
Optional. Gets maximum observed storage in megabytes
setMaxObservedStorageMB
{ "repo_name": "southworkscom/azure-sdk-for-java", "path": "resource-management/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/models/RecommendedElasticPoolProperties.java", "license": "apache-2.0", "size": 7287 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,079,995
@Override public Adapter createDataMapperDiagramAdapter() { if (dataMapperDiagramItemProvider == null) { dataMapperDiagramItemProvider = new DataMapperDiagramItemProvider(this); } return dataMapperDiagramItemProvider; } protected DataMapperRootItemProvider dataMapperRootItemProvider;
Adapter function() { if (dataMapperDiagramItemProvider == null) { dataMapperDiagramItemProvider = new DataMapperDiagramItemProvider(this); } return dataMapperDiagramItemProvider; } protected DataMapperRootItemProvider dataMapperRootItemProvider;
/** * This creates an adapter for a {@link dataMapper.DataMapperDiagram}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>dataMapper.DataMapperDiagram</code>.
createDataMapperDiagramAdapter
{ "repo_name": "splinter/developer-studio", "path": "data-mapper/org.wso2.developerstudio.visualdatamapper.edit/src/dataMapper/provider/DataMapperItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 20387 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
528,403
assertSupports(object); HealthcareSite site = (HealthcareSite) object; return ScopeType.SITE.getScopeCsmNamePrefix() + site.getPrimaryIdentifier(); }
assertSupports(object); HealthcareSite site = (HealthcareSite) object; return ScopeType.SITE.getScopeCsmNamePrefix() + site.getPrimaryIdentifier(); }
/** * Returns a CSM objectId, given an object. * * @param object * from which ID should be generated * @return CSM objectId */
Returns a CSM objectId, given an object
generateId
{ "repo_name": "NCIP/c3pr", "path": "codebase/projects/core/src/java/edu/duke/cabig/c3pr/security/SitePrivilegeAndObjectIdGenerator.java", "license": "bsd-3-clause", "size": 1645 }
[ "edu.duke.cabig.c3pr.domain.HealthcareSite", "gov.nih.nci.cabig.ctms.suite.authorization.ScopeType" ]
import edu.duke.cabig.c3pr.domain.HealthcareSite; import gov.nih.nci.cabig.ctms.suite.authorization.ScopeType;
import edu.duke.cabig.c3pr.domain.*; import gov.nih.nci.cabig.ctms.suite.authorization.*;
[ "edu.duke.cabig", "gov.nih.nci" ]
edu.duke.cabig; gov.nih.nci;
1,168,443
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; }
void function(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; }
/** * This sets the composed adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This sets the composed adapter factory that contains this factory.
setParentAdapterFactory
{ "repo_name": "imbur/EMF-IncQuery-Examples", "path": "query-driven-soft-interconnections/derivedModels.edit/src/process/provider/ProcessItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 8432 }
[ "org.eclipse.emf.edit.provider.ComposedAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
167,410
@Test(groups = "Hybrid", enabled = true) public void AONE_15632() throws Exception { String testName = getTestName() + System.currentTimeMillis(); String user1 = getUserNameForDomain(testName + "OP", testDomain); String cloudUser = getUserNameForDomain(testName + "CL", testDomai...
@Test(groups = STR, enabled = true) void function() throws Exception { String testName = getTestName() + System.currentTimeMillis(); String user1 = getUserNameForDomain(testName + "OP", testDomain); String cloudUser = getUserNameForDomain(testName + "CL", testDomain); String opSiteName = getSiteName(testName) + System....
/** * AONE-15632:Delete content on cloud and remove sync */
AONE-15632:Delete content on cloud and remove sync
AONE_15632
{ "repo_name": "Kast0rTr0y/community-edition", "path": "projects/qa-share/src/test/java/org/alfresco/share/workflow/WorkflowOptionsTests.java", "license": "lgpl-3.0", "size": 130598 }
[ "org.alfresco.po.share.site.SiteDashboardPage", "org.alfresco.po.share.site.document.DocumentLibraryPage", "org.alfresco.po.share.workflow.CloudTaskOrReviewPage", "org.alfresco.po.share.workflow.KeepContentStrategy", "org.alfresco.po.share.workflow.Priority", "org.alfresco.po.share.workflow.TaskType", "...
import org.alfresco.po.share.site.SiteDashboardPage; import org.alfresco.po.share.site.document.DocumentLibraryPage; import org.alfresco.po.share.workflow.CloudTaskOrReviewPage; import org.alfresco.po.share.workflow.KeepContentStrategy; import org.alfresco.po.share.workflow.Priority; import org.alfresco.po.share.workfl...
import org.alfresco.po.share.site.*; import org.alfresco.po.share.site.document.*; import org.alfresco.po.share.workflow.*; import org.alfresco.share.util.*; import org.testng.*; import org.testng.annotations.*;
[ "org.alfresco.po", "org.alfresco.share", "org.testng", "org.testng.annotations" ]
org.alfresco.po; org.alfresco.share; org.testng; org.testng.annotations;
414,249
@Implementation public String getBestProvider(Criteria criteria, boolean enabled) { lastBestProviderCriteria = criteria; lastBestProviderEnabled = enabled; if (criteria == null) { return getBestProviderWithNoCriteria(enabled); } return getBestProviderWithCriteria(criteria, enabled); }
String function(Criteria criteria, boolean enabled) { lastBestProviderCriteria = criteria; lastBestProviderEnabled = enabled; if (criteria == null) { return getBestProviderWithNoCriteria(enabled); } return getBestProviderWithCriteria(criteria, enabled); }
/** * Returns the best provider with respect to the passed criteria (if any) and its status. If no criteria are passed * * NB: Gps is considered the best provider for fine accuracy and high power consumption, network is considered the * best provider for coarse accuracy and low power consumption. * * ...
Returns the best provider with respect to the passed criteria (if any) and its status. If no criteria are passed best provider for coarse accuracy and low power consumption
getBestProvider
{ "repo_name": "qx/FullRobolectricTestSample", "path": "src/main/java/org/robolectric/shadows/ShadowLocationManager.java", "license": "mit", "size": 18337 }
[ "android.location.Criteria" ]
import android.location.Criteria;
import android.location.*;
[ "android.location" ]
android.location;
434,260
public void splitMetaLog(final Set<ServerName> serverNames) throws IOException { splitLog(serverNames, META_FILTER); }
void function(final Set<ServerName> serverNames) throws IOException { splitLog(serverNames, META_FILTER); }
/** * Specialized method to handle the splitting for meta WAL * @param serverNames logs belonging to these servers will be split */
Specialized method to handle the splitting for meta WAL
splitMetaLog
{ "repo_name": "Eshcar/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java", "license": "apache-2.0", "size": 15452 }
[ "java.io.IOException", "java.util.Set", "org.apache.hadoop.hbase.ServerName" ]
import java.io.IOException; import java.util.Set; import org.apache.hadoop.hbase.ServerName;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,624,191
public Map<String, Class<?>> getRewriteCalciteAggrFunctions() { return null; }
Map<String, Class<?>> function() { return null; }
/** * Returns a map from UDAF to Calcite aggregation function implementation class. * There can be zero or more UDAF defined on a measure type. */
Returns a map from UDAF to Calcite aggregation function implementation class. There can be zero or more UDAF defined on a measure type
getRewriteCalciteAggrFunctions
{ "repo_name": "apache/kylin", "path": "core-metadata/src/main/java/org/apache/kylin/measure/MeasureType.java", "license": "apache-2.0", "size": 7096 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,171,227
public String[] getTestCaseList() { // code borrowed from StringArray // it is a little wasteful to recalc everytime but saves space if (testCase == null) return null; Vector v = new Vector(); int start = -1; for (int i = 0...
String[] function() { if (testCase == null) return null; Vector v = new Vector(); int start = -1; for (int i = 0; i < testCase.length(); i++) { if (testCase.charAt(i) == ',') { if (start != -1) v.addElement(testCase.substring(start, i)); start = -1; } else if (start == -1) start = i; } if (start != -1) v.addElement(tes...
/** * Get the same data as getTestCases(), but split into many Strings * This method is costly, so use with care. * * @return The parsed comma list, or null if there are no test cases. */
Get the same data as getTestCases(), but split into many Strings This method is costly, so use with care
getTestCaseList
{ "repo_name": "Distrotech/icedtea7-2.3", "path": "test/jtreg/com/sun/javatest/ExcludeList.java", "license": "gpl-2.0", "size": 43636 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,936,650
CallableStatement newCallableStatement(Agent agent, org.apache.derby.client.am.Connection connection, String sql, int type,int concurrency,int holdability, ClientPooledConnection cpc) throws SqlException;
CallableStatement newCallableStatement(Agent agent, org.apache.derby.client.am.Connection connection, String sql, int type,int concurrency,int holdability, ClientPooledConnection cpc) throws SqlException;
/** * Returns an instance of org.apache.derby.client.am.CallableStatement. * or CallableStatement40 which implements java.sql.CallableStatement * * @param agent The instance of NetAgent associated with this * CallableStatement object. * @param connection The conne...
Returns an instance of org.apache.derby.client.am.CallableStatement. or CallableStatement40 which implements java.sql.CallableStatement
newCallableStatement
{ "repo_name": "kavin256/Derby", "path": "java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java", "license": "apache-2.0", "size": 16302 }
[ "org.apache.derby.client.ClientPooledConnection" ]
import org.apache.derby.client.ClientPooledConnection;
import org.apache.derby.client.*;
[ "org.apache.derby" ]
org.apache.derby;
625,443
@Test public void testIsSimplified() { assertTrue(new MixedNumber("2(3)/(4)").isSimplified()); assertTrue(new MixedNumber("1(1)/(2)").isSimplified()); assertTrue(new MixedNumber("8(3)/(16)").isSimplified()); assertFalse(new MixedNumber("8(4)/(16)").isSimplified()); assertFalse(new MixedNumber("3(-1)/(...
void function() { assertTrue(new MixedNumber(STR).isSimplified()); assertTrue(new MixedNumber(STR).isSimplified()); assertTrue(new MixedNumber(STR).isSimplified()); assertFalse(new MixedNumber(STR).isSimplified()); assertFalse(new MixedNumber(STR).isSimplified()); assertFalse(new MixedNumber(STR).isSimplified()); asser...
/** * Test method for {@link com.github.nateowami.solve4x.solver.MixedNumber#isSimplified()}. * @ */
Test method for <code>com.github.nateowami.solve4x.solver.MixedNumber#isSimplified()</code>
testIsSimplified
{ "repo_name": "Nateowami/Solve4x", "path": "tests/com/github/nateowami/solve4x/solver/MixedNumberTest.java", "license": "gpl-3.0", "size": 3562 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,734,230
public String download(String siteUrl, String language) throws IOException, ReCaptchaException { Map<String, String> requestProperties = new HashMap<>(); requestProperties.put("Accept-Language", language); return download(siteUrl, requestProperties); }
String function(String siteUrl, String language) throws IOException, ReCaptchaException { Map<String, String> requestProperties = new HashMap<>(); requestProperties.put(STR, language); return download(siteUrl, requestProperties); }
/**Download the text file at the supplied URL as in download(String), * but set the HTTP header field "Accept-Language" to the supplied string. * @param siteUrl the URL of the text file to return the contents of * @param language the language (usually a 2-character code) to set as the preferred language ...
Download the text file at the supplied URL as in download(String), but set the HTTP header field "Accept-Language" to the supplied string
download
{ "repo_name": "SpajicM/NewPipe", "path": "app/src/main/java/org/schabi/newpipe/Downloader.java", "license": "gpl-3.0", "size": 5694 }
[ "java.io.IOException", "java.util.HashMap", "java.util.Map", "org.schabi.newpipe.extractor.exceptions.ReCaptchaException" ]
import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import java.io.*; import java.util.*; import org.schabi.newpipe.extractor.exceptions.*;
[ "java.io", "java.util", "org.schabi.newpipe" ]
java.io; java.util; org.schabi.newpipe;
820,802
@Override public IModernDataObject getDataObject() { return dataObject; }
IModernDataObject function() { return dataObject; }
/** * Returns the data object of the current algorithm. * * @return the current algorithms data object */
Returns the data object of the current algorithm
getDataObject
{ "repo_name": "jcryptool/crypto", "path": "org.jcryptool.crypto.modern.stream.lfsr/src/org/jcryptool/crypto/modern/stream/lfsr/algorithm/LfsrAlgorithm.java", "license": "epl-1.0", "size": 4676 }
[ "org.jcryptool.core.operations.dataobject.modern.IModernDataObject" ]
import org.jcryptool.core.operations.dataobject.modern.IModernDataObject;
import org.jcryptool.core.operations.dataobject.modern.*;
[ "org.jcryptool.core" ]
org.jcryptool.core;
149,053
public void setDateFrom (Timestamp DateFrom) { set_Value (COLUMNNAME_DateFrom, DateFrom); }
void function (Timestamp DateFrom) { set_Value (COLUMNNAME_DateFrom, DateFrom); }
/** Set Date From. @param DateFrom Starting date for a range */
Set Date From
setDateFrom
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/X_PA_Goal.java", "license": "gpl-2.0", "size": 14825 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,831,011
private void checkType() { final DetailAST type = getMainAst().findFirstToken(TokenTypes.TYPE); final DetailAST ident = ExpressionHandler.getFirstToken(type); final int columnNo = expandedTabsColumnNo(ident); if (startsLine(ident) && !getLevel().accept(columnNo)) { lo...
void function() { final DetailAST type = getMainAst().findFirstToken(TokenTypes.TYPE); final DetailAST ident = ExpressionHandler.getFirstToken(type); final int columnNo = expandedTabsColumnNo(ident); if (startsLine(ident) && !getLevel().accept(columnNo)) { logError(ident, "type", columnNo); } }
/** * Check the indentation of the method type. */
Check the indentation of the method type
checkType
{ "repo_name": "pbaranchikov/checkstyle", "path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/indentation/MemberDefHandler.java", "license": "lgpl-2.1", "size": 2851 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
1,406,547
public void testConversions() throws NotExecutableException, RepositoryException { PropertyDefinition propDef = NodeTypeUtil.locatePropertyDef(session, PropertyType.PATH, false, false, false, false); if (propDef == null) { throw new NotExecutableException("N...
void function() throws NotExecutableException, RepositoryException { PropertyDefinition propDef = NodeTypeUtil.locatePropertyDef(session, PropertyType.PATH, false, false, false, false); if (propDef == null) { throw new NotExecutableException(STR + STR); } NodeType nodeType = propDef.getDeclaringNodeType(); Value pathSt...
/** * Tests if NodeType.canSetProperty(String propertyName, Value value) * returns true if value and its type are convertible to PathValue. */
Tests if NodeType.canSetProperty(String propertyName, Value value) returns true if value and its type are convertible to PathValue
testConversions
{ "repo_name": "Overseas-Student-Living/jackrabbit", "path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java", "license": "apache-2.0", "size": 14313 }
[ "javax.jcr.PropertyType", "javax.jcr.RepositoryException", "javax.jcr.Value", "javax.jcr.nodetype.NodeType", "javax.jcr.nodetype.PropertyDefinition", "org.apache.jackrabbit.test.NotExecutableException" ]
import javax.jcr.PropertyType; import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.nodetype.NodeType; import javax.jcr.nodetype.PropertyDefinition; import org.apache.jackrabbit.test.NotExecutableException;
import javax.jcr.*; import javax.jcr.nodetype.*; import org.apache.jackrabbit.test.*;
[ "javax.jcr", "org.apache.jackrabbit" ]
javax.jcr; org.apache.jackrabbit;
2,255,985
@Test public void testUIRepeatMapSupport() throws Exception { String contextRoot = "ImportConstantsTag"; try (WebClient webClient = new WebClient()) { String key; String value; // Construct the URL for the test URL url = JSFUtils.createHttpUrl(jsf...
void function() throws Exception { String contextRoot = STR; try (WebClient webClient = new WebClient()) { String key; String value; URL url = JSFUtils.createHttpUrl(jsf23Server, contextRoot, STR); HtmlPage testPage = (HtmlPage) webClient.getPage(url); Log.info(c, name.getMethodName(), testPage.asText()); Log.info(c, n...
/** * Test to ensure that <ui:repeat/> supports Maps. * * @throws Exception */
Test to ensure that supports Maps
testUIRepeatMapSupport
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.jsf.2.3_fat/fat/src/com/ibm/ws/jsf23/fat/tests/JSF23MapSupportTests.java", "license": "epl-1.0", "size": 5766 }
[ "com.gargoylesoftware.htmlunit.WebClient", "com.gargoylesoftware.htmlunit.html.HtmlPage", "com.ibm.websphere.simplicity.log.Log", "com.ibm.ws.jsf23.fat.JSFUtils", "org.junit.Assert" ]
import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.ibm.websphere.simplicity.log.Log; import com.ibm.ws.jsf23.fat.JSFUtils; import org.junit.Assert;
import com.gargoylesoftware.htmlunit.*; import com.gargoylesoftware.htmlunit.html.*; import com.ibm.websphere.simplicity.log.*; import com.ibm.ws.jsf23.fat.*; import org.junit.*;
[ "com.gargoylesoftware.htmlunit", "com.ibm.websphere", "com.ibm.ws", "org.junit" ]
com.gargoylesoftware.htmlunit; com.ibm.websphere; com.ibm.ws; org.junit;
1,069,864
public static void main(String[] args) throws UnknownHostException { SpringApplication app = new SpringApplication(Application.class); SimpleCommandLinePropertySource source = new SimpleCommandLinePropertySource(args); addDefaultProfile(app, source); Environment env = app.run(args).g...
static void function(String[] args) throws UnknownHostException { SpringApplication app = new SpringApplication(Application.class); SimpleCommandLinePropertySource source = new SimpleCommandLinePropertySource(args); addDefaultProfile(app, source); Environment env = app.run(args).getEnvironment(); log.info(STR + STRExte...
/** * Main method, used to run the application. */
Main method, used to run the application
main
{ "repo_name": "hubek/Refugees", "path": "src/main/java/de/zalando/refugees/Application.java", "license": "mit", "size": 4456 }
[ "java.net.InetAddress", "java.net.UnknownHostException", "org.springframework.boot.SpringApplication", "org.springframework.core.env.Environment", "org.springframework.core.env.SimpleCommandLinePropertySource" ]
import java.net.InetAddress; import java.net.UnknownHostException; import org.springframework.boot.SpringApplication; import org.springframework.core.env.Environment; import org.springframework.core.env.SimpleCommandLinePropertySource;
import java.net.*; import org.springframework.boot.*; import org.springframework.core.env.*;
[ "java.net", "org.springframework.boot", "org.springframework.core" ]
java.net; org.springframework.boot; org.springframework.core;
2,805,258
void drawIcon(PoseStack poseStack, int x, int y, IElementDrawer<ItemStack> itemDrawer, IElementDrawer<FluidStack> fluidDrawer);
void drawIcon(PoseStack poseStack, int x, int y, IElementDrawer<ItemStack> itemDrawer, IElementDrawer<FluidStack> fluidDrawer);
/** * Draws the icon. * * @param poseStack the pose stack * @param x the x position * @param y the y position */
Draws the icon
drawIcon
{ "repo_name": "raoulvdberge/refinedstorage", "path": "src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGridTab.java", "license": "mit", "size": 1177 }
[ "com.mojang.blaze3d.vertex.PoseStack", "com.refinedmods.refinedstorage.api.render.IElementDrawer", "net.minecraft.world.item.ItemStack", "net.minecraftforge.fluids.FluidStack" ]
import com.mojang.blaze3d.vertex.PoseStack; import com.refinedmods.refinedstorage.api.render.IElementDrawer; import net.minecraft.world.item.ItemStack; import net.minecraftforge.fluids.FluidStack;
import com.mojang.blaze3d.vertex.*; import com.refinedmods.refinedstorage.api.render.*; import net.minecraft.world.item.*; import net.minecraftforge.fluids.*;
[ "com.mojang.blaze3d", "com.refinedmods.refinedstorage", "net.minecraft.world", "net.minecraftforge.fluids" ]
com.mojang.blaze3d; com.refinedmods.refinedstorage; net.minecraft.world; net.minecraftforge.fluids;
1,032,339
public void scrollToEnd() { scrollToRow(escalator.getBody().getRowCount() - 1, ScrollDestination.END); }
void function() { scrollToRow(escalator.getBody().getRowCount() - 1, ScrollDestination.END); }
/** * Scrolls to the end of the very last row. */
Scrolls to the end of the very last row
scrollToEnd
{ "repo_name": "fireflyc/vaadin", "path": "client/src/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 285073 }
[ "com.vaadin.shared.ui.grid.ScrollDestination" ]
import com.vaadin.shared.ui.grid.ScrollDestination;
import com.vaadin.shared.ui.grid.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
2,125
public DataNode setDurationScalar(Double duration);
DataNode function(Double duration);
/** * Total time log was taken * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_ANY * </p> * * @param duration the duration */
Total time log was taken Type: NX_FLOAT Units: NX_ANY
setDurationScalar
{ "repo_name": "xen-0/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXlog.java", "license": "epl-1.0", "size": 9457 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode;
import org.eclipse.dawnsci.analysis.api.tree.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
1,698,434
@SimpleFunction(description = "Clear WebView caches.") public void ClearCaches() { webview.clearCache(true); }
@SimpleFunction(description = STR) void function() { webview.clearCache(true); }
/** * Clear the internal webview cache, both ram and disk. This is useful * when using the `WebViewer` to poll a page that may not be sending * appropriate cache control headers. */
Clear the internal webview cache, both ram and disk. This is useful when using the `WebViewer` to poll a page that may not be sending appropriate cache control headers
ClearCaches
{ "repo_name": "ewpatton/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/WebViewer.java", "license": "apache-2.0", "size": 23069 }
[ "com.google.appinventor.components.annotations.SimpleFunction" ]
import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
719,183
public ProjectExpectedStudyCrp getProjectExpectedStudyCrpById(long projectExpectedStudyCrpID);
ProjectExpectedStudyCrp function(long projectExpectedStudyCrpID);
/** * This method gets a projectExpectedStudyCrp object by a given projectExpectedStudyCrp identifier. * * @param projectExpectedStudyCrpID is the projectExpectedStudyCrp identifier. * @return a ProjectExpectedStudyCrp object. */
This method gets a projectExpectedStudyCrp object by a given projectExpectedStudyCrp identifier
getProjectExpectedStudyCrpById
{ "repo_name": "CCAFS/MARLO", "path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ProjectExpectedStudyCrpManager.java", "license": "gpl-3.0", "size": 3759 }
[ "org.cgiar.ccafs.marlo.data.model.ProjectExpectedStudyCrp" ]
import org.cgiar.ccafs.marlo.data.model.ProjectExpectedStudyCrp;
import org.cgiar.ccafs.marlo.data.model.*;
[ "org.cgiar.ccafs" ]
org.cgiar.ccafs;
62,235
void write(ActiveMQBuffer buffer, boolean flush, boolean batched);
void write(ActiveMQBuffer buffer, boolean flush, boolean batched);
/** * writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection. * * @param buffer the buffer to write * @param flush whether to flush the buffers onto the wire * @param batched whether the packet is allowed to batched for ...
writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection
write
{ "repo_name": "wildfly/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Connection.java", "license": "apache-2.0", "size": 4268 }
[ "org.apache.activemq.artemis.api.core.ActiveMQBuffer" ]
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.*;
[ "org.apache.activemq" ]
org.apache.activemq;
855,800
@VisibleForTesting public RpcMetrics getRpcMetrics() { return rpcMetrics; }
RpcMetrics function() { return rpcMetrics; }
/** * Returns a handle to the rpcMetrics (required in tests) * @return rpc metrics */
Returns a handle to the rpcMetrics (required in tests)
getRpcMetrics
{ "repo_name": "apurtell/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java", "license": "apache-2.0", "size": 146393 }
[ "org.apache.hadoop.ipc.metrics.RpcMetrics" ]
import org.apache.hadoop.ipc.metrics.RpcMetrics;
import org.apache.hadoop.ipc.metrics.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,596,744
protected void finalize() throws Throwable { try { RandomAccessFile accessor = getAccessor(); if (accessor != null) { accessor.close(); } } catch (IOException ioe) { System.err.println("Error closing file: " + ioe.getMessage()); ioe.printStackTrace(); } }
void function() throws Throwable { try { RandomAccessFile accessor = getAccessor(); if (accessor != null) { accessor.close(); } } catch (IOException ioe) { System.err.println(STR + ioe.getMessage()); ioe.printStackTrace(); } }
/** * Called by the garbage collector when it's about to reclaim the memory * associated with this object. * <br><p> * We use this opportunity to close the file that was being read; * otherwise the file would remain open until the JVM exited. */
Called by the garbage collector when it's about to reclaim the memory associated with this object. We use this opportunity to close the file that was being read; otherwise the file would remain open until the JVM exited
finalize
{ "repo_name": "jaytaylor/jaws", "path": "src/edu/smu/tspell/wordnet/impl/RandomAccessReader.java", "license": "bsd-2-clause", "size": 5211 }
[ "java.io.IOException", "java.io.RandomAccessFile" ]
import java.io.IOException; import java.io.RandomAccessFile;
import java.io.*;
[ "java.io" ]
java.io;
1,283,924
@Override public void close() throws IOException { input.channel.close(); }
void function() throws IOException { input.channel.close(); }
/** * Closes this reader. * * @throws IOException if an error occurred while closing this reader. */
Closes this reader
close
{ "repo_name": "apache/sis", "path": "storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java", "license": "apache-2.0", "size": 21295 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
431,629
public static ImageSource bitmap(Bitmap bitmap) { if (bitmap == null) { throw new NullPointerException("Bitmap must not be null"); } return new ImageSource(bitmap, false); }
static ImageSource function(Bitmap bitmap) { if (bitmap == null) { throw new NullPointerException(STR); } return new ImageSource(bitmap, false); }
/** * Provide a loaded bitmap for display. * @param bitmap bitmap to be displayed. */
Provide a loaded bitmap for display
bitmap
{ "repo_name": "jianlei/subsampling-scale-image-view", "path": "library/src/com/davemorrissey/labs/subscaleview/ImageSource.java", "license": "apache-2.0", "size": 6504 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
934,952
@DELETE @Path(ApiUrls.DOWNLOADS_PDF_SECTION) @Produces({ MediaType.APPLICATION_JSON }) @Operation(tags= {"downloads"}, summary="Delete a PDF download job from the database") @AuthorizationBinding public String deletePDFDownloadJob( @Parameter(description = "Persistent identifier of t...
@Path(ApiUrls.DOWNLOADS_PDF_SECTION) @Produces({ MediaType.APPLICATION_JSON }) @Operation(tags= {STR}, summary=STR) String function( @Parameter(description = STR) @PathParam("pi") String pi, @Parameter(description=STR)@PathParam("divId") String logId) throws DAOException, ContentLibException { if (StringUtils.isBlank(l...
/** * Remove a download job from the database * * @param type The jobtype, either pdf or epub * @param pi The PI of the underlying record * @param logId The logId of the underyling docStruct. Is ignored if it matches the regex [-(null)]/i * @return A json object containing the job identifi...
Remove a download job from the database
deletePDFDownloadJob
{ "repo_name": "intranda/goobi-viewer-core", "path": "goobi-viewer-core/src/main/java/io/goobi/viewer/api/rest/v1/downloads/DownloadResource.java", "license": "gpl-2.0", "size": 28838 }
[ "de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException", "de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException", "io.goobi.viewer.api.rest.v1.ApiUrls", "io.goobi.viewer.exceptions.DAOException", "io.swagger.v3.oas.annotations.Operation", "io.swagger.v3.oas.annotatio...
import de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException; import de.unigoettingen.sub.commons.contentlib.exceptions.ContentNotFoundException; import io.goobi.viewer.api.rest.v1.ApiUrls; import io.goobi.viewer.exceptions.DAOException; import io.swagger.v3.oas.annotations.Operation; import io.swagger...
import de.unigoettingen.sub.commons.contentlib.exceptions.*; import io.goobi.viewer.api.rest.v1.*; import io.goobi.viewer.exceptions.*; import io.swagger.v3.oas.annotations.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.commons.lang3.*;
[ "de.unigoettingen.sub", "io.goobi.viewer", "io.swagger.v3", "javax.ws", "org.apache.commons" ]
de.unigoettingen.sub; io.goobi.viewer; io.swagger.v3; javax.ws; org.apache.commons;
1,540,357
public void setDateNextRun (Timestamp DateNextRun);
void function (Timestamp DateNextRun);
/** Set Date next run. * Date the process will run next */
Set Date next run. Date the process will run next
setDateNextRun
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/I_C_AcctProcessor.java", "license": "gpl-2.0", "size": 7574 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
790,356
static @Nullable AssigningConstructor extractAssigningConstructor( Class<?> clazz, List<Field> fields) { AssigningConstructor foundConstructor = null; for (Constructor<?> constructor : clazz.getDeclaredConstructors()) { final boolean qualifyingConstructor = Modifier.isPublic(constructor.getModifiers()) ...
static @Nullable AssigningConstructor extractAssigningConstructor( Class<?> clazz, List<Field> fields) { AssigningConstructor foundConstructor = null; for (Constructor<?> constructor : clazz.getDeclaredConstructors()) { final boolean qualifyingConstructor = Modifier.isPublic(constructor.getModifiers()) && constructor.g...
/** * Checks whether the given constructor takes all of the given fields with matching (possibly * primitive) type and name. An assigning constructor can define the order of fields. */
Checks whether the given constructor takes all of the given fields with matching (possibly primitive) type and name. An assigning constructor can define the order of fields
extractAssigningConstructor
{ "repo_name": "jinglining/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/ExtractionUtils.java", "license": "apache-2.0", "size": 32145 }
[ "java.lang.reflect.Constructor", "java.lang.reflect.Field", "java.lang.reflect.Modifier", "java.util.List", "javax.annotation.Nullable" ]
import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.List; import javax.annotation.Nullable;
import java.lang.reflect.*; import java.util.*; import javax.annotation.*;
[ "java.lang", "java.util", "javax.annotation" ]
java.lang; java.util; javax.annotation;
2,492,356
public TStream<Number> numbers(Number... tuples) { return _source(new Constants<Number>(Arrays.asList(tuples)), Number.class); }
TStream<Number> function(Number... tuples) { return _source(new Constants<Number>(Arrays.asList(tuples)), Number.class); }
/** * Create a stream of {@code Number} tuples. * * @param tuples * @return Stream containing {@code tuples}. */
Create a stream of Number tuples
numbers
{ "repo_name": "dlaboss/streamsx.topology", "path": "java/src/com/ibm/streamsx/topology/Topology.java", "license": "apache-2.0", "size": 33000 }
[ "com.ibm.streamsx.topology.internal.logic.Constants", "java.util.Arrays" ]
import com.ibm.streamsx.topology.internal.logic.Constants; import java.util.Arrays;
import com.ibm.streamsx.topology.internal.logic.*; import java.util.*;
[ "com.ibm.streamsx", "java.util" ]
com.ibm.streamsx; java.util;
1,130,419
protected boolean isPersisted(Resource resource) { boolean result = false; try { InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); if (stream != null) { result = true; stream.close(); } } catch (IOE...
boolean function(Resource resource) { boolean result = false; try { InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); if (stream != null) { result = true; stream.close(); } } catch (IOException e) { } return result; }
/** * This returns whether something has been persisted to the URI of the specified resource. * The implementation uses the URI converter from the editor's resource set to try to open an input stream. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns whether something has been persisted to the URI of the specified resource. The implementation uses the URI converter from the editor's resource set to try to open an input stream.
isPersisted
{ "repo_name": "mdean77/Model-Driven-Decision-Support", "path": "edu.utah.dcc.e4.application.xcore.model/src/application/presentation/ApplicationEditor.java", "license": "epl-1.0", "size": 60148 }
[ "java.io.IOException", "java.io.InputStream", "org.eclipse.emf.ecore.resource.Resource" ]
import java.io.IOException; import java.io.InputStream; import org.eclipse.emf.ecore.resource.Resource;
import java.io.*; import org.eclipse.emf.ecore.resource.*;
[ "java.io", "org.eclipse.emf" ]
java.io; org.eclipse.emf;
2,698,992
@Test public void testMplsCriterionEquals() { new EqualsTester() .addEqualityGroup(matchMpls1, sameAsMatchMpls1) .addEqualityGroup(matchMpls2) .testEquals(); } // MplsTcCriterion class
void function() { new EqualsTester() .addEqualityGroup(matchMpls1, sameAsMatchMpls1) .addEqualityGroup(matchMpls2) .testEquals(); }
/** * Test the equals() method of the MplsCriterion class. */
Test the equals() method of the MplsCriterion class
testMplsCriterionEquals
{ "repo_name": "sonu283304/onos", "path": "core/api/src/test/java/org/onosproject/net/flow/criteria/CriteriaTest.java", "license": "apache-2.0", "size": 44713 }
[ "com.google.common.testing.EqualsTester" ]
import com.google.common.testing.EqualsTester;
import com.google.common.testing.*;
[ "com.google.common" ]
com.google.common;
2,223,899
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String accountName, String queueName);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String accountName, String queueName);
/** * Deletes the queue with the specified queue name, under the specified account if it exists. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case * insensitive. * @param accountName The name of the storage account within the specif...
Deletes the queue with the specified queue name, under the specified account if it exists
deleteWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/QueuesClient.java", "license": "mit", "size": 27242 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
2,461,590
private JPanel getJPanel_Checks() { if (jPanel_Checks == null) { jPanel_Checks = new JPanel(); jPanel_Checks.setLayout(null); jPanel_Checks.setBorder(BorderFactory.createTitledBorder(null, "Activate", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Franklin Gothic He...
JPanel function() { if (jPanel_Checks == null) { jPanel_Checks = new JPanel(); jPanel_Checks.setLayout(null); jPanel_Checks.setBorder(BorderFactory.createTitledBorder(null, STR, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font(STR, Font.BOLD, 12), new Color(102, 102, 102))); jPanel_Checks.add...
/** * This method initializes jPanel_Checks * * @return javax.swing.JPanel */
This method initializes jPanel_Checks
getJPanel_Checks
{ "repo_name": "ComputationalReflection/weaveJ", "path": "Benchmarks/Real Applications/Java + Invokedynamic/Hotdraw/src/main/MainWindow.java", "license": "mit", "size": 73568 }
[ "java.awt.Color", "java.awt.Font", "javax.swing.BorderFactory", "javax.swing.JPanel", "javax.swing.border.TitledBorder" ]
import java.awt.Color; import java.awt.Font; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.border.TitledBorder;
import java.awt.*; import javax.swing.*; import javax.swing.border.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,616,478
public static void example3() { String[] vars = { "v3", "v2", "v1" }; ModIntegerRing z2 = new ModIntegerRing(2); GenPolynomialRing<ModInteger> z2p = new GenPolynomialRing<ModInteger>(z2, vars.length, new TermOrder( TermOrder.INVLEX), vars); List<GenPolynomial...
static void function() { String[] vars = { "v3", "v2", "v1" }; ModIntegerRing z2 = new ModIntegerRing(2); GenPolynomialRing<ModInteger> z2p = new GenPolynomialRing<ModInteger>(z2, vars.length, new TermOrder( TermOrder.INVLEX), vars); List<GenPolynomial<ModInteger>> fieldPolynomials = new ArrayList<GenPolynomial<ModInte...
/** * example3. Coefficients in Boolean ring and additional idempotent * generators. * */
example3. Coefficients in Boolean ring and additional idempotent generators
example3
{ "repo_name": "breandan/java-algebra-system", "path": "src/edu/jas/gbufd/Examples.java", "license": "gpl-2.0", "size": 6531 }
[ "edu.jas.arith.ModInteger", "edu.jas.arith.ModIntegerRing", "edu.jas.gb.GroebnerBase", "edu.jas.poly.GenPolynomial", "edu.jas.poly.GenPolynomialRing", "edu.jas.poly.TermOrder", "java.util.ArrayList", "java.util.List" ]
import edu.jas.arith.ModInteger; import edu.jas.arith.ModIntegerRing; import edu.jas.gb.GroebnerBase; import edu.jas.poly.GenPolynomial; import edu.jas.poly.GenPolynomialRing; import edu.jas.poly.TermOrder; import java.util.ArrayList; import java.util.List;
import edu.jas.arith.*; import edu.jas.gb.*; import edu.jas.poly.*; import java.util.*;
[ "edu.jas.arith", "edu.jas.gb", "edu.jas.poly", "java.util" ]
edu.jas.arith; edu.jas.gb; edu.jas.poly; java.util;
919,406
@Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); ...
boolean function(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_undo) { if (deleted.isEmpty()) { Toast.makeText(MainActivity.this, STR, Toast.LENGTH_LONG).show(); } else { importedRecipes.add(deleted.pop()); rebuildSaves(); Toast.makeText(MainActivity.this, STR, Toast.LENGTH_LONG).show(); } } if (id ...
/** * Runs this method when the user selects an option on the menu * * @param item * @return */
Runs this method when the user selects an option on the menu
onOptionsItemSelected
{ "repo_name": "isaactsg/Nutrient-Calculator", "path": "app/src/main/java/ics4u/ics4u_final_project/MainActivity.java", "license": "agpl-3.0", "size": 11899 }
[ "android.content.Intent", "android.view.MenuItem", "android.widget.Toast" ]
import android.content.Intent; import android.view.MenuItem; import android.widget.Toast;
import android.content.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
2,022,701
@Test public void pinv() { // check wide matrix DenseMatrix64F A = new DenseMatrix64F(2,4,true,1,2,3,4,5,6,7,8); DenseMatrix64F A_inv = new DenseMatrix64F(4,2); DenseMatrix64F b = new DenseMatrix64F(2,1,true,3,4); DenseMatrix64F x = new DenseMatrix64F(4,1); DenseM...
void function() { DenseMatrix64F A = new DenseMatrix64F(2,4,true,1,2,3,4,5,6,7,8); DenseMatrix64F A_inv = new DenseMatrix64F(4,2); DenseMatrix64F b = new DenseMatrix64F(2,1,true,3,4); DenseMatrix64F x = new DenseMatrix64F(4,1); DenseMatrix64F found = new DenseMatrix64F(2,1); CommonOps.pinv(A,A_inv); CommonOps.mult(A_in...
/** * Checked against by computing a solution to the linear system then * seeing if the solution produces the expected output */
Checked against by computing a solution to the linear system then seeing if the solution produces the expected output
pinv
{ "repo_name": "raydtang/ejml", "path": "main/dense64/test/org/ejml/ops/TestCommonOps.java", "license": "apache-2.0", "size": 36565 }
[ "org.ejml.data.DenseMatrix64F", "org.junit.Assert" ]
import org.ejml.data.DenseMatrix64F; import org.junit.Assert;
import org.ejml.data.*; import org.junit.*;
[ "org.ejml.data", "org.junit" ]
org.ejml.data; org.junit;
2,562,913
public void unregisterForEcmTimerReset(Handler h);
void function(Handler h);
/** * Unregister for notification for Ecm timer reset * @param h Handler to be removed from the registrant list. */
Unregister for notification for Ecm timer reset
unregisterForEcmTimerReset
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/opt/telephony/src/java/com/android/internal/telephony/Phone.java", "license": "gpl-2.0", "size": 87022 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
1,805,918
@Test public void testHashCode() { StandardDialRange r1 = new StandardDialRange(); StandardDialRange r2 = new StandardDialRange(); assertEquals(r1, r2); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); }
void function() { StandardDialRange r1 = new StandardDialRange(); StandardDialRange r2 = new StandardDialRange(); assertEquals(r1, r2); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); }
/** * Two objects that are equal are required to return the same hashCode. */
Two objects that are equal are required to return the same hashCode
testHashCode
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/chart/plot/dial/StandardDialRangeTest.java", "license": "lgpl-2.1", "size": 5081 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
321,090
@Column(name = "kind", nullable = false, length = 255) @Override public String getKind() { return (String) get(3); }
@Column(name = "kind", nullable = false, length = 255) String function() { return (String) get(3); }
/** * Getter for <code>cattle.volume_template.kind</code>. */
Getter for <code>cattle.volume_template.kind</code>
getKind
{ "repo_name": "vincent99/cattle", "path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/tables/records/VolumeTemplateRecord.java", "license": "apache-2.0", "size": 17532 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
182,141
static public void saveDouble( final RandomAccessibleInterval< DoubleType > source, final File file, final String dataset, final int[] cellDimensions ) { final IHDF5Writer writer = HDF5Factory.open( file ); saveDouble( source, writer, dataset, cellDimensions ); writer.close(); }
static void function( final RandomAccessibleInterval< DoubleType > source, final File file, final String dataset, final int[] cellDimensions ) { final IHDF5Writer writer = HDF5Factory.open( file ); saveDouble( source, writer, dataset, cellDimensions ); writer.close(); }
/** * Save a {@link RandomAccessibleInterval} of {@link DoubleType} into an HDF5 * float64 dataset. * * @param source * @param file * @param dataset * @param cellDimensions */
Save a <code>RandomAccessibleInterval</code> of <code>DoubleType</code> into an HDF5 float64 dataset
saveDouble
{ "repo_name": "hanslovsky/bigcat", "path": "src/main/java/bdv/img/h5/H5Utils.java", "license": "gpl-2.0", "size": 51530 }
[ "ch.systemsx.cisd.hdf5.HDF5Factory", "ch.systemsx.cisd.hdf5.IHDF5Writer", "java.io.File", "net.imglib2.RandomAccessibleInterval", "net.imglib2.type.numeric.real.DoubleType" ]
import ch.systemsx.cisd.hdf5.HDF5Factory; import ch.systemsx.cisd.hdf5.IHDF5Writer; import java.io.File; import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.numeric.real.DoubleType;
import ch.systemsx.cisd.hdf5.*; import java.io.*; import net.imglib2.*; import net.imglib2.type.numeric.real.*;
[ "ch.systemsx.cisd", "java.io", "net.imglib2", "net.imglib2.type" ]
ch.systemsx.cisd; java.io; net.imglib2; net.imglib2.type;
2,574,957
public void testRefresh() { EntityManager em = createEntityManager(); beginTransaction(em); Order order = new Order(); try { order.orderedBy = "ACME"; order.address = new Address(); order.address.city = "Ottawa"; em.persist(order); ...
void function() { EntityManager em = createEntityManager(); beginTransaction(em); Order order = new Order(); try { order.orderedBy = "ACME"; order.address = new Address(); order.address.city = STR; em.persist(order); commitTransaction(em); } finally { closeEntityManagerAndTransaction(em); } clearCache(); em = createEnt...
/** * Test refresh. */
Test refresh
testRefresh
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "foundation/eclipselink.extension.nosql.test/src/org/eclipse/persistence/testing/tests/jpa/mongo/MongoTestSuite.java", "license": "epl-1.0", "size": 30664 }
[ "javax.persistence.EntityManager", "org.eclipse.persistence.testing.models.jpa.mongo.Address", "org.eclipse.persistence.testing.models.jpa.mongo.Order" ]
import javax.persistence.EntityManager; import org.eclipse.persistence.testing.models.jpa.mongo.Address; import org.eclipse.persistence.testing.models.jpa.mongo.Order;
import javax.persistence.*; import org.eclipse.persistence.testing.models.jpa.mongo.*;
[ "javax.persistence", "org.eclipse.persistence" ]
javax.persistence; org.eclipse.persistence;
2,096,736
boolean isRegistered(String username) throws InputOutputException;
boolean isRegistered(String username) throws InputOutputException;
/** * Checks whether the user with * the given user name is already registered * * @param username The username to check * * @return True, if not registered yet, false otherwise * * @throws InputOutputException If connecting to the storage layer fails */
Checks whether the user with the given user name is already registered
isRegistered
{ "repo_name": "p2p-sync/network", "path": "src/main/java/org/rmatil/sync/network/api/IUserManager.java", "license": "apache-2.0", "size": 1545 }
[ "org.rmatil.sync.persistence.exceptions.InputOutputException" ]
import org.rmatil.sync.persistence.exceptions.InputOutputException;
import org.rmatil.sync.persistence.exceptions.*;
[ "org.rmatil.sync" ]
org.rmatil.sync;
542,571
public void setDir(File dir) { this.dir = dir; }
void function(File dir) { this.dir = dir; }
/** * The directory to scan for files to validate. Use includes to only * validate js files and excludes to omit files such as compressed js * libraries from js validation */
The directory to scan for files to validate. Use includes to only validate js files and excludes to omit files such as compressed js libraries from js validation
setDir
{ "repo_name": "philmander/ant-jshint", "path": "src/main/java/com/philmander/jshint/JsHintAntTask.java", "license": "mit", "size": 8922 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,868,147
public void readFile(File inputFile) { if (!inputFile.exists()) { throw new RuntimeException("Input file '" + inputFile.getAbsolutePath() + "' does not exist."); } //read header. List<String> lines = AsciiFileUtils.readLines(inputFile); removeAndS...
void function(File inputFile) { if (!inputFile.exists()) { throw new RuntimeException(STR + inputFile.getAbsolutePath() + STR); } List<String> lines = AsciiFileUtils.readLines(inputFile); removeAndStoreFileHeader(lines); readTimeSeriesHeaderParameters(lines); }
/** * Reads the parameter values in the time series headers in the given inputFile. * * @param inputFile */
Reads the parameter values in the time series headers in the given inputFile
readFile
{ "repo_name": "OpenDA-Association/OpenDA", "path": "model_efdc/java/src/org/openda/model_efdc/timeseriesformat/EfdcAserTimeSeriesFormatter.java", "license": "lgpl-3.0", "size": 14436 }
[ "java.io.File", "java.util.List", "org.openda.utils.io.AsciiFileUtils" ]
import java.io.File; import java.util.List; import org.openda.utils.io.AsciiFileUtils;
import java.io.*; import java.util.*; import org.openda.utils.io.*;
[ "java.io", "java.util", "org.openda.utils" ]
java.io; java.util; org.openda.utils;
183,967
static ImmutableNodeInst newInstance(int nodeId, NodeProtoId protoId, Name name, TextDescriptor nameDescriptor, Orientation orient, EPoint anchor, EPoint size, int flags, byte techBits, TextDescriptor protoDescriptor, Variable[] vars, ImmutablePortInst[] ports, Variable[] params)...
static ImmutableNodeInst newInstance(int nodeId, NodeProtoId protoId, Name name, TextDescriptor nameDescriptor, Orientation orient, EPoint anchor, EPoint size, int flags, byte techBits, TextDescriptor protoDescriptor, Variable[] vars, ImmutablePortInst[] ports, Variable[] params) { if (protoId instanceof CellId && ((Ce...
/** * Returns new ImmutableNodeInst or ImmutableIconInst object. * @param nodeId id of this NodeInst in parent. * @param protoId the NodeProtoId of which this is an instance. * @param name name of new ImmutableNodeInst. * @param nameDescriptor TextDescriptor of name of this ImmutableNodeInst. ...
Returns new ImmutableNodeInst or ImmutableIconInst object
newInstance
{ "repo_name": "imr/Electric8", "path": "com/sun/electric/database/ImmutableNodeInst.java", "license": "gpl-3.0", "size": 51910 }
[ "com.sun.electric.database.geometry.EPoint", "com.sun.electric.database.geometry.Orientation", "com.sun.electric.database.id.CellId", "com.sun.electric.database.id.NodeProtoId", "com.sun.electric.database.text.Name", "com.sun.electric.database.variable.TextDescriptor", "com.sun.electric.database.variabl...
import com.sun.electric.database.geometry.EPoint; import com.sun.electric.database.geometry.Orientation; import com.sun.electric.database.id.CellId; import com.sun.electric.database.id.NodeProtoId; import com.sun.electric.database.text.Name; import com.sun.electric.database.variable.TextDescriptor; import com.sun.elect...
import com.sun.electric.database.geometry.*; import com.sun.electric.database.id.*; import com.sun.electric.database.text.*; import com.sun.electric.database.variable.*;
[ "com.sun.electric" ]
com.sun.electric;
1,128,198
private File checkFileForDuplicate(String archivePath) { return mAddedFiles.get(archivePath); }
File function(String archivePath) { return mAddedFiles.get(archivePath); }
/** * Checks if the given path in the APK archive has not already been used and if it has been, * then returns a {@link File} object for the source of the duplicate * @param archivePath the archive path to test. * @return A File object of either a file at the same location or an archive that contain...
Checks if the given path in the APK archive has not already been used and if it has been, then returns a <code>File</code> object for the source of the duplicate
checkFileForDuplicate
{ "repo_name": "iamthearm/bazel", "path": "third_party/java/apkbuilder/java/com/android/sdklib/build/ApkBuilder.java", "license": "apache-2.0", "size": 40236 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
741,255
protected void addMessagePathPropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_CorrelationPropertyRetrievalExpression_messagePath_fe...
void function(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString(STR), getString( STR, STR, STR), Bpmn2Package.Literals.CORRELATION_PROPERTY_RETRIEVAL_EXPRESSION__MESSAGE_PATH, true, false, tr...
/** * This adds a property descriptor for the Message Path feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Message Path feature.
addMessagePathPropertyDescriptor
{ "repo_name": "adbrucker/SecureBPMN", "path": "designer/src/org.activiti.designer.model.edit/src/org/eclipse/bpmn2/provider/CorrelationPropertyRetrievalExpressionItemProvider.java", "license": "apache-2.0", "size": 5692 }
[ "org.eclipse.bpmn2.Bpmn2Package", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import org.eclipse.bpmn2.Bpmn2Package; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.bpmn2.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.bpmn2", "org.eclipse.emf" ]
org.eclipse.bpmn2; org.eclipse.emf;
2,378,791
public static int getAvailableProcessors() { int result = getProperty(Constants.AVAILABLE_PROCESSORS_BASIC, int.class, ThreadUtils.getSuitableThreadCount(1)); return result > 0 ? result : 1; }
static int function() { int result = getProperty(Constants.AVAILABLE_PROCESSORS_BASIC, int.class, ThreadUtils.getSuitableThreadCount(1)); return result > 0 ? result : 1; }
/** * Get available processor numbers from environment. * * <p> * If there are setting of {@code nacos.core.sys.basic.processors} in config/JVM/system, use it. * If no setting, use the one time {@code ThreadUtils.getSuitableThreadCount()}. * </p> * * @return available pro...
Get available processor numbers from environment. If there are setting of nacos.core.sys.basic.processors in config/JVM/system, use it. If no setting, use the one time ThreadUtils.getSuitableThreadCount().
getAvailableProcessors
{ "repo_name": "alibaba/nacos", "path": "sys/src/main/java/com/alibaba/nacos/sys/env/EnvUtil.java", "license": "apache-2.0", "size": 16064 }
[ "com.alibaba.nacos.common.utils.ThreadUtils" ]
import com.alibaba.nacos.common.utils.ThreadUtils;
import com.alibaba.nacos.common.utils.*;
[ "com.alibaba.nacos" ]
com.alibaba.nacos;
1,883,181
public static SumoCommand getPhase(String tlsID){ return new SumoCommand(Constants.CMD_GET_TL_VARIABLE, Constants.TL_CURRENT_PHASE, tlsID, Constants.RESPONSE_GET_TL_VARIABLE, Constants.TYPE_INTEGER); }
static SumoCommand function(String tlsID){ return new SumoCommand(Constants.CMD_GET_TL_VARIABLE, Constants.TL_CURRENT_PHASE, tlsID, Constants.RESPONSE_GET_TL_VARIABLE, Constants.TYPE_INTEGER); }
/** * Returns the index of the current phase in the current program. * * @param tlsID a string identifying the traffic light * @return index of the current phase */
Returns the index of the current phase in the current program
getPhase
{ "repo_name": "baumfalk/TraaS", "path": "de/tudresden/sumo/cmd/Trafficlights.java", "license": "gpl-3.0", "size": 6760 }
[ "de.tudresden.sumo.config.Constants", "de.tudresden.sumo.util.SumoCommand" ]
import de.tudresden.sumo.config.Constants; import de.tudresden.sumo.util.SumoCommand;
import de.tudresden.sumo.config.*; import de.tudresden.sumo.util.*;
[ "de.tudresden.sumo" ]
de.tudresden.sumo;
1,577,290
public static List<TarEntryData> generateEventSources(List<EventFamilyMetadata> eventFamilies) { List<TarEntryData> eventSources = new ArrayList<>(); String eventFamilyFactoryImports = ""; String eventFamilyFactoryProperties = ""; String eventFamilyFactoryMethodsHeader = ""; String eventFamilyFac...
static List<TarEntryData> function(List<EventFamilyMetadata> eventFamilies) { List<TarEntryData> eventSources = new ArrayList<>(); String eventFamilyFactoryImports = STRSTRSTRSTRReceived {} event familiesSTRGenerating schemas for event family {}STR\nSTR\nSTRGot exception while generating event classes for event family:...
/** * Create new zip entry data for the event family metadata. * * @param eventFamilies the event family metadata * @return a new zip entry data */
Create new zip entry data for the event family metadata
generateEventSources
{ "repo_name": "vtkhir/kaa", "path": "server/node/src/main/java/org/kaaproject/kaa/server/control/service/sdk/event/ObjCEventClassesGenerator.java", "license": "apache-2.0", "size": 13893 }
[ "java.util.ArrayList", "java.util.List", "org.kaaproject.kaa.server.control.service.sdk.compress.TarEntryData" ]
import java.util.ArrayList; import java.util.List; import org.kaaproject.kaa.server.control.service.sdk.compress.TarEntryData;
import java.util.*; import org.kaaproject.kaa.server.control.service.sdk.compress.*;
[ "java.util", "org.kaaproject.kaa" ]
java.util; org.kaaproject.kaa;
2,884,464
public final String getCreatedBy() { return JsUtils.getNativePropertyString(this, "createdBy"); }
final String function() { return JsUtils.getNativePropertyString(this, STR); }
/** * Get CreatedBy (login of user who created this Thanks) * * @return createdBy */
Get CreatedBy (login of user who created this Thanks)
getCreatedBy
{ "repo_name": "ondrejvelisek/perun-wui", "path": "perun-wui-cabinet/src/main/java/cz/metacentrum/perun/wui/cabinet/model/Thanks.java", "license": "apache-2.0", "size": 2852 }
[ "cz.metacentrum.perun.wui.client.utils.JsUtils" ]
import cz.metacentrum.perun.wui.client.utils.JsUtils;
import cz.metacentrum.perun.wui.client.utils.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
1,089,695
public static Test suite() { return new TestSuite(SpreadSheetJoinColumnsTest.class); }
static Test function() { return new TestSuite(SpreadSheetJoinColumnsTest.class); }
/** * Returns the test suite. * * @return the suite */
Returns the test suite
suite
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-spreadsheet/src/test/java/adams/data/conversion/SpreadSheetJoinColumnsTest.java", "license": "gpl-3.0", "size": 3737 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
104,751
public static Matrix generateBasisNormal(int projectedVectorSize, int vectorSize) { Matrix basisMatrix = new DenseMatrix(projectedVectorSize, vectorSize); basisMatrix.assign(new Normal()); for (MatrixSlice row : basisMatrix) { row.vector().assign(row.normalize()); } return basisMatrix; }
static Matrix function(int projectedVectorSize, int vectorSize) { Matrix basisMatrix = new DenseMatrix(projectedVectorSize, vectorSize); basisMatrix.assign(new Normal()); for (MatrixSlice row : basisMatrix) { row.vector().assign(row.normalize()); } return basisMatrix; }
/** * Generates a basis matrix of size projectedVectorSize x vectorSize. Multiplying a a vector by * this matrix results in the projected vector. * * The rows of the matrix are sampled from a multi normal distribution. * * @param projectedVectorSize final projected size of a vector (number of projecti...
Generates a basis matrix of size projectedVectorSize x vectorSize. Multiplying a a vector by this matrix results in the projected vector. The rows of the matrix are sampled from a multi normal distribution
generateBasisNormal
{ "repo_name": "bharcode/Kaggle", "path": "CustomMahout/core/src/main/java/org/apache/mahout/math/random/RandomProjector.java", "license": "gpl-2.0", "size": 5289 }
[ "org.apache.mahout.math.DenseMatrix", "org.apache.mahout.math.Matrix", "org.apache.mahout.math.MatrixSlice" ]
import org.apache.mahout.math.DenseMatrix; import org.apache.mahout.math.Matrix; import org.apache.mahout.math.MatrixSlice;
import org.apache.mahout.math.*;
[ "org.apache.mahout" ]
org.apache.mahout;
31,911
public Object convertForProperty(Object value, String propertyName) throws TypeMismatchException { CachedIntrospectionResults cachedIntrospectionResults = getCachedIntrospectionResults(); PropertyDescriptor pd = cachedIntrospectionResults.getPropertyDescriptor(propertyName); if (pd == null) { throw new Inva...
Object function(Object value, String propertyName) throws TypeMismatchException { CachedIntrospectionResults cachedIntrospectionResults = getCachedIntrospectionResults(); PropertyDescriptor pd = cachedIntrospectionResults.getPropertyDescriptor(propertyName); if (pd == null) { throw new InvalidPropertyException(getRootC...
/** * Convert the given value for the specified property to the latter's type. * <p>This method is only intended for optimizations in a BeanFactory. * Use the {@code convertIfNecessary} methods for programmatic conversion. * @param value the value to convert * @param propertyName the target property * (note...
Convert the given value for the specified property to the latter's type. This method is only intended for optimizations in a BeanFactory. Use the convertIfNecessary methods for programmatic conversion
convertForProperty
{ "repo_name": "leogoing/spring_jeesite", "path": "spring-beans-4.0/org/springframework/beans/BeanWrapperImpl.java", "license": "apache-2.0", "size": 52348 }
[ "java.beans.PropertyDescriptor", "org.springframework.core.convert.TypeDescriptor" ]
import java.beans.PropertyDescriptor; import org.springframework.core.convert.TypeDescriptor;
import java.beans.*; import org.springframework.core.convert.*;
[ "java.beans", "org.springframework.core" ]
java.beans; org.springframework.core;
645,285
public boolean containsRow(byte[] row) { return Bytes.compareTo(row, startKey) >= 0 && (Bytes.compareTo(row, endKey) < 0 || Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY)); }
boolean function(byte[] row) { return Bytes.compareTo(row, startKey) >= 0 && (Bytes.compareTo(row, endKey) < 0 Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY)); }
/** * Return true if the given row falls in this region. */
Return true if the given row falls in this region
containsRow
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java", "license": "apache-2.0", "size": 37350 }
[ "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,283,143