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
Filter matches( Pattern regex );
Filter matches( Pattern regex );
/** * Create a filter that is satisfied only for documents that have a field with the given name or path and the value * satisfies a regular expression. * * @param regex the regular expression that must match the documents' field value; may not be null * @return a filter th...
Create a filter that is satisfied only for documents that have a field with the given name or path and the value satisfies a regular expression
matches
{ "repo_name": "rhauch/schematica", "path": "schematica-db-api/src/main/java/org/schematica/db/task/FilterBuilder.java", "license": "apache-2.0", "size": 18554 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,097,380
public SessionReadRequest readFitnessSession() { Log.i(TAG_SESSION, "Reading History API results for session: " + SAMPLE_SESSION_NAME); // [START build_read_session_request] // Set a start and end time for our query, using a start time of 1 week // before this moment. Calendar cal = Calendar.getInstanc...
SessionReadRequest function() { Log.i(TAG_SESSION, STR + SAMPLE_SESSION_NAME); Calendar cal = Calendar.getInstance(); Date now = new Date(); cal.setTime(now); long endTime = cal.getTimeInMillis(); cal.add(Calendar.WEEK_OF_YEAR, -1); long startTime = cal.getTimeInMillis(); SessionReadRequest readRequest = new SessionRea...
/** * Return a {@link SessionReadRequest} for all speed data in the past week. */
Return a <code>SessionReadRequest</code> for all speed data in the past week
readFitnessSession
{ "repo_name": "ThaiSulution/HealthCarePro", "path": "src/app/healthcare/GoogleFitService.java", "license": "gpl-2.0", "size": 48778 }
[ "android.util.Log", "com.google.android.gms.fitness.data.DataType", "com.google.android.gms.fitness.request.SessionReadRequest", "java.util.Calendar", "java.util.Date", "java.util.concurrent.TimeUnit" ]
import android.util.Log; import com.google.android.gms.fitness.data.DataType; import com.google.android.gms.fitness.request.SessionReadRequest; import java.util.Calendar; import java.util.Date; import java.util.concurrent.TimeUnit;
import android.util.*; import com.google.android.gms.fitness.data.*; import com.google.android.gms.fitness.request.*; import java.util.*; import java.util.concurrent.*;
[ "android.util", "com.google.android", "java.util" ]
android.util; com.google.android; java.util;
880,996
static void setWidgetBackgroundImage(Widget widget, String image) { if (image.isEmpty()) { DOM.setStyleAttribute(widget.getElement(), "backgroundImage", "none"); } else { DOM.setStyleAttribute(widget.getElement(), "backgroundImage", "url(" + image + ')'); } DOM.setStyleAttribute(widget.get...
static void setWidgetBackgroundImage(Widget widget, String image) { if (image.isEmpty()) { DOM.setStyleAttribute(widget.getElement(), STR, "none"); } else { DOM.setStyleAttribute(widget.getElement(), STR, "url(" + image + ')'); } DOM.setStyleAttribute(widget.getElement(), STR, STR); DOM.setStyleAttribute(widget.getElem...
/** * Sets the background image for the given widget. * * @param widget widget to change background image for * @param image URL */
Sets the background image for the given widget
setWidgetBackgroundImage
{ "repo_name": "josmas/app-inventor", "path": "appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockComponentsUtil.java", "license": "apache-2.0", "size": 13448 }
[ "com.google.gwt.user.client.DOM", "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.*; import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,477,236
protected void sequence_Type(ISerializationContext context, SarlSpace semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(ISerializationContext context, SarlSpace semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Contexts: * Type returns SarlSpace * * Constraint: * (annotationInfo=Type_SarlSpace_2_5_0 modifiers+=CommonModifier* name=ValidID) */
Contexts: Type returns SarlSpace Constraint: (annotationInfo=Type_SarlSpace_2_5_0 modifiers+=CommonModifier* name=ValidID)
sequence_Type
{ "repo_name": "jgfoster/sarl", "path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/serializer/SARLSemanticSequencer.java", "license": "apache-2.0", "size": 77560 }
[ "io.sarl.lang.sarl.SarlSpace", "org.eclipse.xtext.serializer.ISerializationContext" ]
import io.sarl.lang.sarl.SarlSpace; import org.eclipse.xtext.serializer.ISerializationContext;
import io.sarl.lang.sarl.*; import org.eclipse.xtext.serializer.*;
[ "io.sarl.lang", "org.eclipse.xtext" ]
io.sarl.lang; org.eclipse.xtext;
579,120
public void read(TrueTypeFont ttf, TTFDataStream data) throws IOException { HorizontalHeaderTable hHeader = ttf.getHorizontalHeader(); numHMetrics = hHeader.getNumberOfHMetrics(); int numGlyphs = ttf.getNumberOfGlyphs(); int bytesRead = 0; advanceWidth = new int[ numHMetrics ]; leftSideBearing ...
void function(TrueTypeFont ttf, TTFDataStream data) throws IOException { HorizontalHeaderTable hHeader = ttf.getHorizontalHeader(); numHMetrics = hHeader.getNumberOfHMetrics(); int numGlyphs = ttf.getNumberOfGlyphs(); int bytesRead = 0; advanceWidth = new int[ numHMetrics ]; leftSideBearing = new short[ numHMetrics ]; ...
/** * This will read the required data from the stream. * * @param ttf The font that is being read. * @param data The stream to read the data from. * @throws IOException If there is an error reading the data. */
This will read the required data from the stream
read
{ "repo_name": "mdamt/PdfBox-Android", "path": "library/src/main/java/org/apache/fontbox/ttf/HorizontalMetricsTable.java", "license": "apache-2.0", "size": 2906 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
558,067
public void testTimezoneMinus2andAHalf() { String utc = "-2.5"; ClientProperties props = new ClientProperties(); props.setUtcOffset(utc); assertEquals(TimeZone.getTimeZone("GMT-2:30"), props.getTimeZone()); }
void function() { String utc = "-2.5"; ClientProperties props = new ClientProperties(); props.setUtcOffset(utc); assertEquals(TimeZone.getTimeZone(STR), props.getTimeZone()); }
/** * Tests GMT-2:30 */
Tests GMT-2:30
testTimezoneMinus2andAHalf
{ "repo_name": "Servoy/wicket", "path": "wicket/src/test/java/org/apache/wicket/protocol/http/ClientPropertiesTest.java", "license": "apache-2.0", "size": 2782 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
2,188,561
public void setClassPath(Path classpath) { pathComponents.removeAllElements(); if (classpath != null) { Path actualClasspath = classpath.concatSystemClasspath("ignore"); String[] pathElements = actualClasspath.list(); for (int i = 0; i < pathElements.length; ++i) ...
void function(Path classpath) { pathComponents.removeAllElements(); if (classpath != null) { Path actualClasspath = classpath.concatSystemClasspath(STR); String[] pathElements = actualClasspath.list(); for (int i = 0; i < pathElements.length; ++i) { try { addPathElement(pathElements[i]); } catch (BuildException e) { } ...
/** * Set the classpath to search for classes to load. This should not be * changed once the classloader starts to server classes * * @param classpath the search classpath consisting of directories and * jar/zip files. */
Set the classpath to search for classes to load. This should not be changed once the classloader starts to server classes
setClassPath
{ "repo_name": "bkmeneguello/jenkins", "path": "core/src/main/java/jenkins/util/AntClassLoader.java", "license": "mit", "size": 58552 }
[ "org.apache.tools.ant.BuildException", "org.apache.tools.ant.types.Path" ]
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.*; import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
2,658,693
public boolean onNewRecord(String dataNode, byte[] rowData) { NodeRowDataPacket nodePacket = this.result.get(dataNode); RowDataPacket rowDataPkg = new RowDataPacket(fieldCount); rowDataPkg.read(rowData); if (grouper != null) { grouper.addRow(rowDataPkg); } else { ...
boolean function(String dataNode, byte[] rowData) { NodeRowDataPacket nodePacket = this.result.get(dataNode); RowDataPacket rowDataPkg = new RowDataPacket(fieldCount); rowDataPkg.read(rowData); if (grouper != null) { grouper.addRow(rowDataPkg); } else { nodePacket.addPacket(rowDataPkg); this.dataController.newRecord(da...
/** * process new record (mysql binary data),if data can output to client * ,return true * * @param dataNode * DN's name (data from this dataNode) * @param rowData * raw data */
process new record (mysql binary data),if data can output to client ,return true
onNewRecord
{ "repo_name": "wenerme/Mycat-Server", "path": "src/main/java/org/opencloudb/mpp/MutiDataMergeService.java", "license": "apache-2.0", "size": 10646 }
[ "org.opencloudb.mpp.model.NodeRowDataPacket", "org.opencloudb.net.mysql.RowDataPacket" ]
import org.opencloudb.mpp.model.NodeRowDataPacket; import org.opencloudb.net.mysql.RowDataPacket;
import org.opencloudb.mpp.model.*; import org.opencloudb.net.mysql.*;
[ "org.opencloudb.mpp", "org.opencloudb.net" ]
org.opencloudb.mpp; org.opencloudb.net;
438,436
public void initializeFinished() { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_SYSTEM_CONFIG_FINISHED_0)); } }
void function() { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_SYSTEM_CONFIG_FINISHED_0)); } }
/** * Will be called when configuration of this object is finished.<p> */
Will be called when configuration of this object is finished
initializeFinished
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/configuration/CmsSystemConfiguration.java", "license": "lgpl-2.1", "size": 119837 }
[ "org.opencms.main.CmsLog" ]
import org.opencms.main.CmsLog;
import org.opencms.main.*;
[ "org.opencms.main" ]
org.opencms.main;
1,225,990
public static double calcularP(List<Double> listadoValoresIzq, List<Double> listadoValoresDer, double esperanza) { double b0; double b1; b0 = calcularB0(listadoValoresIzq, listadoValoresDer); b1 = calcularB1(listadoValoresIzq, listadoValoresDer); return b0 + b1 * esperanza;...
static double function(List<Double> listadoValoresIzq, List<Double> listadoValoresDer, double esperanza) { double b0; double b1; b0 = calcularB0(listadoValoresIzq, listadoValoresDer); b1 = calcularB1(listadoValoresIzq, listadoValoresDer); return b0 + b1 * esperanza; }
/** * Metodo: Calcula P de la tarea 04 * * @param listadoValoresIzq * @param listadoValoresDer * @param esperanza * @return El valor de P */
Metodo: Calcula P de la tarea 04
calcularP
{ "repo_name": "ditoaforero/psp07", "path": "src/main/java/Estadistica.java", "license": "mit", "size": 25547 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
858,687
public static MozuClient<com.mozu.api.contracts.customer.CustomerSegment> getSegmentClient(Integer id, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.customer.CustomerSegmentUrl.getSegmentUrl(id, responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.cu...
static MozuClient<com.mozu.api.contracts.customer.CustomerSegment> function(Integer id, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.customer.CustomerSegmentUrl.getSegmentUrl(id, responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.customer.CustomerSegment.cl...
/** * Retrieves the details of the customer segment specified in the request. This operation does not return a list of the customer accounts associated with the segment. * <p><pre><code> * MozuClient<com.mozu.api.contracts.customer.CustomerSegment> mozuClient=GetSegmentClient( id, responseFields); * client.set...
Retrieves the details of the customer segment specified in the request. This operation does not return a list of the customer accounts associated with the segment. <code><code> MozuClient mozuClient=GetSegmentClient( id, responseFields); client.setBaseAddress(url); client.executeRequest(); CustomerSegment customerSegme...
getSegmentClient
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/customer/CustomerSegmentClient.java", "license": "mit", "size": 13701 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
2,452,537
protected void parentResized() { if (hasLayout()) { layout.layout(this, LayoutUpdatePhase.FROM_PARENT); handleParentResized(); updateChildren(); } }
void function() { if (hasLayout()) { layout.layout(this, LayoutUpdatePhase.FROM_PARENT); handleParentResized(); updateChildren(); } }
/** * Called when the parent component has changed size and believes this component wishes to be informed. */
Called when the parent component has changed size and believes this component wishes to be informed
parentResized
{ "repo_name": "sacooper/ECSE-429-Project-Group1", "path": "ca.mcgill.sel.ram.gui/src/ca/mcgill/sel/ram/ui/components/RamRectangleComponent.java", "license": "gpl-2.0", "size": 28284 }
[ "ca.mcgill.sel.ram.ui.layouts.Layout" ]
import ca.mcgill.sel.ram.ui.layouts.Layout;
import ca.mcgill.sel.ram.ui.layouts.*;
[ "ca.mcgill.sel" ]
ca.mcgill.sel;
15,023
public void ClearLog(String logName, String location){ try { PrintWriter writer = new PrintWriter(location.concat(logName)); writer.flush(); writer.close(); } catch (Exception ex) { WriteToLog("ErrorLog.txt", "", true, "["+ GetCurrentTime() +"] Exception Message: " + ex.getMessage() + " Class: " + ex...
void function(String logName, String location){ try { PrintWriter writer = new PrintWriter(location.concat(logName)); writer.flush(); writer.close(); } catch (Exception ex) { WriteToLog(STR, STR[STR] Exception Message: STR Class: " + ex.getClass()); } }
/** <p> * Deletes the specified log files contents. * * @param logName The name of the log file you want to clear. * @param location The location in which the log file is to be cleared. */
Deletes the specified log files contents
ClearLog
{ "repo_name": "TripCreighton/EasyLib2", "path": "EasyLib2.java", "license": "apache-2.0", "size": 14123 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,725,109
public static String resolveEjbVersion( MavenProject project ) { String version = findEjbVersionInDependencies( project ); if ( version == null ) { // No ejb dependency detected. Try to resolve the ejb // version from J2EE/JEE. JeeDescriptor descripto...
static String function( MavenProject project ) { String version = findEjbVersionInDependencies( project ); if ( version == null ) { JeeDescriptor descriptor = getJeeDescriptorFromJeeVersion( findJeeVersionInDependencies( project ) ); if ( descriptor != null ) version = descriptor.getEjbVersion(); } return version == nu...
/** * Search in dependencies a version of EJB APIs (or of JEE APIs). * * @param artifacts The list of dependencies where we search the information * @return An EJB version as defined by constants JeeDescriptor.EJB_x_x. By default, if nothing is found, returns * JeeDescriptor.EJB_2_1. ...
Search in dependencies a version of EJB APIs (or of JEE APIs)
resolveEjbVersion
{ "repo_name": "dmlloyd/maven-plugins", "path": "maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/JeeUtils.java", "license": "apache-2.0", "size": 13819 }
[ "org.apache.maven.project.MavenProject" ]
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.*;
[ "org.apache.maven" ]
org.apache.maven;
2,320,946
private long createOutLinks(Random rng, Link link, ArrayList<Link> loadBuffer, ArrayList<LinkCount> countLoadBuffer, long id1, boolean singleAssoc, boolean bulkLoad, int bulkLoadBatchSize) { Map<Long, LinkCount> linkTypeCounts = null; if (bulkLoad) { linkTypeCounts = new HashMap<...
long function(Random rng, Link link, ArrayList<Link> loadBuffer, ArrayList<LinkCount> countLoadBuffer, long id1, boolean singleAssoc, boolean bulkLoad, int bulkLoadBatchSize) { Map<Long, LinkCount> linkTypeCounts = null; if (bulkLoad) { linkTypeCounts = new HashMap<Long, LinkCount>(); } long nlinks_total = 0; for (long...
/** * Create the out links for a given id1 * @param link * @param loadBuffer * @param id1 * @param singleAssoc * @param bulkLoad * @param bulkLoadBatchSize * @return total number of links added */
Create the out links for a given id1
createOutLinks
{ "repo_name": "charily/LinkBench-driver", "path": "src/main/java/com/facebook/LinkBench/LinkBenchLoad.java", "license": "apache-2.0", "size": 20746 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.Map", "java.util.Random", "org.apache.log4j.Level" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Random; import org.apache.log4j.Level;
import java.util.*; import org.apache.log4j.*;
[ "java.util", "org.apache.log4j" ]
java.util; org.apache.log4j;
1,172,961
protected Query newRegexpQuery(Term regexp) { RegexpQuery query = new RegexpQuery(regexp); SchemaField sf = schema.getField(regexp.field()); query.setRewriteMethod(sf.getType().getRewriteMethod(parser, sf)); return query; }
Query function(Term regexp) { RegexpQuery query = new RegexpQuery(regexp); SchemaField sf = schema.getField(regexp.field()); query.setRewriteMethod(sf.getType().getRewriteMethod(parser, sf)); return query; }
/** * Builds a new RegexpQuery instance * @param regexp Regexp term * @return new RegexpQuery instance */
Builds a new RegexpQuery instance
newRegexpQuery
{ "repo_name": "williamchengit/TestRepo", "path": "solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java", "license": "apache-2.0", "size": 28804 }
[ "org.apache.lucene.index.Term", "org.apache.lucene.search.Query", "org.apache.lucene.search.RegexpQuery", "org.apache.solr.schema.SchemaField" ]
import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.search.RegexpQuery; import org.apache.solr.schema.SchemaField;
import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.apache.solr.schema.*;
[ "org.apache.lucene", "org.apache.solr" ]
org.apache.lucene; org.apache.solr;
396,963
private Contact getFirstContact(Integer customerId) throws Exception { assert customerId != null; Contact firstContact = null; beginTx(); try { final Customer customer = (Customer) getEnvironment().getSessionFactory().getCurrentSession().load(Customer.class, cust...
Contact function(Integer customerId) throws Exception { assert customerId != null; Contact firstContact = null; beginTx(); try { final Customer customer = (Customer) getEnvironment().getSessionFactory().getCurrentSession().load(Customer.class, customerId); Set<Contact> contacts = customer.getContacts(); firstContact = ...
/** * -load existing Customer * -get customer's contacts; return 1st one * * @param customerId * @return first Contact or null if customer has none */
-load existing Customer -get customer's contacts; return 1st one
getFirstContact
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-jbosscache/src/test/java/org/hibernate/test/cache/jbc/functional/MVCCConcurrentWriteTest.java", "license": "unlicense", "size": 21045 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
469,065
// ----------------------------------------------------------------------- public static void forceDelete(File file) throws IOException { if (file.isDirectory()) { deleteDirectory(file); } else { boolean filePresent = file.exists(); if (!file.delete()) { if (!filePresent) { ...
static void function(File file) throws IOException { if (file.isDirectory()) { deleteDirectory(file); } else { boolean filePresent = file.exists(); if (!file.delete()) { if (!filePresent) { throw new FileNotFoundException( STR + file); } String message = STR + file; throw new IOException(message); } } }
/** * Deletes a file. If file is a directory, delete net and all sub-directories. * <p> * The difference between File.delete() and this method are: * <ul> * <li>A directory to be deleted does not have to be empty.</li> * <li>You get exceptions when a file or directory cannot be deleted. * (java.io.File methods r...
Deletes a file. If file is a directory, delete net and all sub-directories. The difference between File.delete() and this method are: A directory to be deleted does not have to be empty. You get exceptions when a file or directory cannot be deleted. (java.io.File methods returns a boolean)
forceDelete
{ "repo_name": "Odyno/icaro-rca", "path": "swing/src/main/java/net/staniscia/rca/swing/common/SomeFileUtils.java", "license": "gpl-2.0", "size": 69011 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.IOException" ]
import java.io.File; import java.io.FileNotFoundException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,252,015
@Override public void saveImpl(OutputStream outputStream) { // Check that the document was open in write mode throwExceptionIfReadOnly(); ZipOutputStream zos = null; try { if (!(outputStream instanceof ZipOutputStream)) zos = new ZipOutputStream(outputStream); else zos = (ZipOutputStream) out...
void function(OutputStream outputStream) { throwExceptionIfReadOnly(); ZipOutputStream zos = null; try { if (!(outputStream instanceof ZipOutputStream)) zos = new ZipOutputStream(outputStream); else zos = (ZipOutputStream) outputStream; if (this.getPartsByRelationshipType( PackageRelationshipTypes.CORE_PROPERTIES).size...
/** * Save this package into the specified stream * * * @param outputStream * The stream use to save this package. * * @see #save(OutputStream) */
Save this package into the specified stream
saveImpl
{ "repo_name": "tobyclemson/msci-project", "path": "vendor/poi-3.6/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java", "license": "mit", "size": 14301 }
[ "java.io.OutputStream", "java.util.zip.ZipOutputStream", "org.apache.poi.openxml4j.exceptions.OpenXML4JException", "org.apache.poi.openxml4j.opc.internal.PartMarshaller", "org.apache.poi.openxml4j.opc.internal.ZipHelper", "org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller", ...
import java.io.OutputStream; import java.util.zip.ZipOutputStream; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.internal.PartMarshaller; import org.apache.poi.openxml4j.opc.internal.ZipHelper; import org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackageProper...
import java.io.*; import java.util.zip.*; import org.apache.poi.openxml4j.exceptions.*; import org.apache.poi.openxml4j.opc.internal.*; import org.apache.poi.openxml4j.opc.internal.marshallers.*; import org.apache.poi.util.*;
[ "java.io", "java.util", "org.apache.poi" ]
java.io; java.util; org.apache.poi;
2,773,389
public ResourceProxy getResource(ParameterList query){ if(query != null && query.getSize() > 0) { String queryString = ""; for (final Iterator<String> i = query.getAllKeys().iterator(); i.hasNext();) { String name = i.next(); String value = query.getFirstParameter(name); querySt...
ResourceProxy function(ParameterList query){ if(query != null && query.getSize() > 0) { String queryString = STR&STR?STRCould not create resourceUrl.", e); return new ResourceProxy(url, transceiver); } } else return new ResourceProxy(url,transceiver); }
/** * Returns the resource associated with the <code>Node</code>. * * @return the resource associated with the <code>Node</code> * @see de.fhg.fokus.rest2.resource.common.Node#getResource(java.util.Map) */
Returns the resource associated with the <code>Node</code>
getResource
{ "repo_name": "BackupTheBerlios/restac-svn", "path": "trunk/src/de/fhg/fokus/restac/resource/core/client/NodeProxy.java", "license": "lgpl-3.0", "size": 6332 }
[ "de.fhg.fokus.restac.httpx.core.common.ParameterList" ]
import de.fhg.fokus.restac.httpx.core.common.ParameterList;
import de.fhg.fokus.restac.httpx.core.common.*;
[ "de.fhg.fokus" ]
de.fhg.fokus;
1,010,415
public void testGroupEncodingDecoding() { // all doTestGroup(GridClientCacheFlag.values()); // none doTestGroup(); }
void function() { doTestGroup(GridClientCacheFlag.values()); doTestGroup(); }
/** * Tests that groups of client flags can be correctly converted to corresponding server flag groups. */
Tests that groups of client flags can be correctly converted to corresponding server flag groups
testGroupEncodingDecoding
{ "repo_name": "pperalta/ignite", "path": "modules/clients/src/test/java/org/apache/ignite/internal/client/impl/ClientCacheFlagsCodecTest.java", "license": "apache-2.0", "size": 2842 }
[ "org.apache.ignite.internal.client.GridClientCacheFlag" ]
import org.apache.ignite.internal.client.GridClientCacheFlag;
import org.apache.ignite.internal.client.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,660,821
public void propertyChange(PropertyChangeEvent evt) { String name = evt.getPropertyName(); if (FileSelectionTable.ADD_PROPERTY.equals(name)) { //addFiles(); showLocationDialog(); } else if (FileSelectionTable.REMOVE_PROPERTY.equals(name)) { int n = handleFilesSelection(chooser.getSelectedFiles()); ...
void function(PropertyChangeEvent evt) { String name = evt.getPropertyName(); if (FileSelectionTable.ADD_PROPERTY.equals(name)) { showLocationDialog(); } else if (FileSelectionTable.REMOVE_PROPERTY.equals(name)) { int n = handleFilesSelection(chooser.getSelectedFiles()); table.allowAddition(n > 0); importButton.setEnab...
/** * Reacts to property fired by the table. * @see PropertyChangeListener#propertyChange(PropertyChangeEvent) */
Reacts to property fired by the table
propertyChange
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/ImportDialog.java", "license": "gpl-2.0", "size": 72220 }
[ "java.beans.PropertyChangeEvent", "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.Set", "javax.swing.JFileChooser", "org.openmicroscopy.shoola.agents.util.SelectionWizard", "org.openmicroscopy.shoola.agents.util.ui.EditorDialog", ...
import java.beans.PropertyChangeEvent; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.swing.JFileChooser; import org.openmicroscopy.shoola.agents.util.SelectionWizard; import org.openmicroscopy.shoola.ag...
import java.beans.*; import java.util.*; import javax.swing.*; import org.openmicroscopy.shoola.agents.util.*; import org.openmicroscopy.shoola.agents.util.ui.*; import org.openmicroscopy.shoola.util.ui.*;
[ "java.beans", "java.util", "javax.swing", "org.openmicroscopy.shoola" ]
java.beans; java.util; javax.swing; org.openmicroscopy.shoola;
1,701,023
public void writeCurrentMessageBytes( ExtendedDataOutput dataOutput) { try { dataOutput.write(getByteArray(), messageOffset, messageBytes); } catch (IOException e) { throw new IllegalStateException("writeCurrentMessageBytes: Got " + "IOException", e); } } ...
void function( ExtendedDataOutput dataOutput) { try { dataOutput.write(getByteArray(), messageOffset, messageBytes); } catch (IOException e) { throw new IllegalStateException(STR + STR, e); } } }
/** * Write the current message to an ExtendedDataOutput object * * @param dataOutput Where the current message will be written to */
Write the current message to an ExtendedDataOutput object
writeCurrentMessageBytes
{ "repo_name": "zfighter/giraph-research", "path": "giraph-core/target/munged/munged/main/org/apache/giraph/utils/ByteArrayVertexIdMessages.java", "license": "apache-2.0", "size": 6146 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,128,794
public Date setMinSelectableDate(Date min) { Date minSelectableDate = minMaxDateEvaluator.setMinSelectableDate(min); drawDays(); return minSelectableDate; }
Date function(Date min) { Date minSelectableDate = minMaxDateEvaluator.setMinSelectableDate(min); drawDays(); return minSelectableDate; }
/** * Sets the minimum selectable date. If null, the date 01\01\0001 will be * set instead. * * @param min * the minimum selectable date * * @return the minimum selectable date */
Sets the minimum selectable date. If null, the date 01\01\0001 will be set instead
setMinSelectableDate
{ "repo_name": "aitortarazaga/Programacion", "path": "t8p1p123/jcalendar-1.4/src/com/toedter/calendar/JDayChooser.java", "license": "apache-2.0", "size": 25967 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,382,430
protected static Pair<PasswordAuthenticator, List<String>> getConnectionObjectsFromHost(URI host) { List<String> nodes = Collections.emptyList(); try { nodes = Arrays.asList(new URI(host.getScheme(), null, host.getHost(), host.getPort(), null, null...
static Pair<PasswordAuthenticator, List<String>> function(URI host) { List<String> nodes = Collections.emptyList(); try { nodes = Arrays.asList(new URI(host.getScheme(), null, host.getHost(), host.getPort(), null, null, null).toString()); } catch (URISyntaxException e) { } String[] credentials = host.getUserInfo().spli...
/** * Creates a {@link Pair} containing a {@link PasswordAuthenticator} and a {@link List} of (cluster) nodes from a URI * * @param host a URI representing the connection to a single instance, for example couchbase://username:password@hostname:port * @return a tuple2, the connections objects that we...
Creates a <code>Pair</code> containing a <code>PasswordAuthenticator</code> and a <code>List</code> of (cluster) nodes from a URI
getConnectionObjectsFromHost
{ "repo_name": "neo4j-contrib/neo4j-apoc-procedures", "path": "full/src/main/java/apoc/couchbase/CouchbaseManager.java", "license": "apache-2.0", "size": 7422 }
[ "com.couchbase.client.core.env.PasswordAuthenticator", "java.net.URISyntaxException", "java.util.Arrays", "java.util.Collections", "java.util.List", "org.neo4j.internal.helpers.collection.Pair" ]
import com.couchbase.client.core.env.PasswordAuthenticator; import java.net.URISyntaxException; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.neo4j.internal.helpers.collection.Pair;
import com.couchbase.client.core.env.*; import java.net.*; import java.util.*; import org.neo4j.internal.helpers.collection.*;
[ "com.couchbase.client", "java.net", "java.util", "org.neo4j.internal" ]
com.couchbase.client; java.net; java.util; org.neo4j.internal;
1,823,202
@Override public Adapter createHTTPEndpointAdapter() { if (httpEndpointItemProvider == null) { httpEndpointItemProvider = new HTTPEndpointItemProvider(this); } return httpEndpointItemProvider; } protected HTTPEndPointInputConnectorItemProvider httpEndPointInput...
Adapter function() { if (httpEndpointItemProvider == null) { httpEndpointItemProvider = new HTTPEndpointItemProvider(this); } return httpEndpointItemProvider; } protected HTTPEndPointInputConnectorItemProvider httpEndPointInputConnectorItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.HTTPEndpoint}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.HTTPEndpoint</code>.
createHTTPEndpointAdapter
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 339597 }
[ "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;
2,300,303
@Override public Set<Integer> getDeletedIDs() { return Collections.unmodifiableSet(delete); }
Set<Integer> function() { return Collections.unmodifiableSet(delete); }
/** * Returns an unmodifiable view of the set of IDs removed from the selection when applying * this move to a subset solution. The returned set may be empty. * * @return set of removed IDs */
Returns an unmodifiable view of the set of IDs removed from the selection when applying this move to a subset solution. The returned set may be empty
getDeletedIDs
{ "repo_name": "hdbeukel/james-core", "path": "src/main/java/org/jamesframework/core/subset/neigh/moves/GeneralSubsetMove.java", "license": "apache-2.0", "size": 4953 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,971,587
public static void showErrorDialog(String title, String message) { IWorkbenchWindow activeWindow = null; Shell parentShell = null; if (!CoreUtil.IsRunningHeadless) { activeWindow = CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow(); } if (activeWindow != null...
static void function(String title, String message) { IWorkbenchWindow activeWindow = null; Shell parentShell = null; if (!CoreUtil.IsRunningHeadless) { activeWindow = CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow(); } if (activeWindow != null) { parentShell = activeWindow.getShell(); } openError(paren...
/** * Shows an error dialog with the given title and message. */
Shows an error dialog with the given title and message
showErrorDialog
{ "repo_name": "HebaKhaled/bposs", "path": "src/com.mentor.nucleus.bp.core/src/com/mentor/nucleus/bp/core/util/UIUtil.java", "license": "apache-2.0", "size": 28469 }
[ "com.mentor.nucleus.bp.core.CorePlugin", "org.eclipse.swt.widgets.Shell", "org.eclipse.ui.IWorkbenchWindow" ]
import com.mentor.nucleus.bp.core.CorePlugin; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow;
import com.mentor.nucleus.bp.core.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.*;
[ "com.mentor.nucleus", "org.eclipse.swt", "org.eclipse.ui" ]
com.mentor.nucleus; org.eclipse.swt; org.eclipse.ui;
579,583
ServerName waitForRoot(final long timeout) throws InterruptedException, NotAllMetaRegionsOnlineException { ServerName sn = rootRegionTracker.waitRootRegionLocation(timeout); if (sn == null) { throw new NotAllMetaRegionsOnlineException("Timed out; " + timeout + "ms"); } return sn; }
ServerName waitForRoot(final long timeout) throws InterruptedException, NotAllMetaRegionsOnlineException { ServerName sn = rootRegionTracker.waitRootRegionLocation(timeout); if (sn == null) { throw new NotAllMetaRegionsOnlineException(STR + timeout + "ms"); } return sn; }
/** * Gets the current location for <code>-ROOT-</code> if available and waits * for up to the specified timeout if not immediately available. Returns null * if the timeout elapses before root is available. * @param timeout maximum time to wait for root availability, in milliseconds * @return {@link Ser...
Gets the current location for <code>-ROOT-</code> if available and waits for up to the specified timeout if not immediately available. Returns null if the timeout elapses before root is available
waitForRoot
{ "repo_name": "xiaofu/apache-hbase-0.94.10-read", "path": "src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java", "license": "apache-2.0", "size": 26072 }
[ "org.apache.hadoop.hbase.NotAllMetaRegionsOnlineException", "org.apache.hadoop.hbase.ServerName" ]
import org.apache.hadoop.hbase.NotAllMetaRegionsOnlineException; import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,304,814
public List<PickingDetail> findAll() throws PickingDetailDaoException;
List<PickingDetail> function() throws PickingDetailDaoException;
/** * Returns all rows from the PickingDetail table that match the criteria ''. */
Returns all rows from the PickingDetail table that match the criteria ''
findAll
{ "repo_name": "rmage/gnvc-ims", "path": "src/java/com/app/wms/engine/db/dao/PickingDetailDao.java", "license": "lgpl-3.0", "size": 2078 }
[ "com.app.wms.engine.db.dto.PickingDetail", "com.app.wms.engine.db.exceptions.PickingDetailDaoException", "java.util.List" ]
import com.app.wms.engine.db.dto.PickingDetail; import com.app.wms.engine.db.exceptions.PickingDetailDaoException; import java.util.List;
import com.app.wms.engine.db.dto.*; import com.app.wms.engine.db.exceptions.*; import java.util.*;
[ "com.app.wms", "java.util" ]
com.app.wms; java.util;
1,200,102
String getName();
String getName();
/** * Returns the value of the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Name</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Name</em>' attribute. * ...
Returns the value of the 'Name' attribute. If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here...
getName
{ "repo_name": "pedromateo/tug_qt_unit_testing_fw", "path": "qt48_model/src/org/casa/dsltesting/Qt48Xmlschema/Widget.java", "license": "gpl-3.0", "size": 15687 }
[ "java.lang.String" ]
import java.lang.String;
import java.lang.*;
[ "java.lang" ]
java.lang;
1,973,620
public void asBulkhead(WarningSet warnings) { Bulkhead result = new Bulkhead(); copyValues(result); if (isCompatible(parent, Bulkhead.class, warnings)) { parent.addChild(result); } }
void function(WarningSet warnings) { Bulkhead result = new Bulkhead(); copyValues(result); if (isCompatible(parent, Bulkhead.class, warnings)) { parent.addChild(result); } }
/** * Convert the parsed Rocksim data values in this object to an instance of OpenRocket's Bulkhead. * <p/> * Side Effect Warning: This method adds the resulting Bulkhead as a child of the parent rocket component! * * @param warnings the warning set */
Convert the parsed Rocksim data values in this object to an instance of OpenRocket's Bulkhead. Side Effect Warning: This method adds the resulting Bulkhead as a child of the parent rocket component
asBulkhead
{ "repo_name": "joebowen/landing_zone_project", "path": "openrocket-release-15.03/core/src/net/sf/openrocket/file/rocksim/importt/RingHandler.java", "license": "gpl-2.0", "size": 7368 }
[ "net.sf.openrocket.aerodynamics.WarningSet", "net.sf.openrocket.rocketcomponent.Bulkhead" ]
import net.sf.openrocket.aerodynamics.WarningSet; import net.sf.openrocket.rocketcomponent.Bulkhead;
import net.sf.openrocket.aerodynamics.*; import net.sf.openrocket.rocketcomponent.*;
[ "net.sf.openrocket" ]
net.sf.openrocket;
1,424,822
public void mapDatasetToDomainAxis(int index, int axisIndex) { this.datasetToDomainAxisMap.put( new Integer(index), new Integer(axisIndex) ); // fake a dataset change event to update axes... datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
void function(int index, int axisIndex) { this.datasetToDomainAxisMap.put( new Integer(index), new Integer(axisIndex) ); datasetChanged(new DatasetChangeEvent(this, getDataset(index))); }
/** * Maps a dataset to a particular domain axis. All data will be plotted * against axis zero by default, no mapping is required for this case. * * @param index the dataset index (zero-based). * @param axisIndex the axis index. */
Maps a dataset to a particular domain axis. All data will be plotted against axis zero by default, no mapping is required for this case
mapDatasetToDomainAxis
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/plot/XYPlot.java", "license": "lgpl-2.1", "size": 137931 }
[ "org.jfree.data.general.DatasetChangeEvent" ]
import org.jfree.data.general.DatasetChangeEvent;
import org.jfree.data.general.*;
[ "org.jfree.data" ]
org.jfree.data;
2,480,553
public void addInterestingTransformations(Model model) { // If there is no result, return ARXResult result = model.getResult(); if (model == null || result == null || !result.isResultAvailable()) { return; }
void function(Model model) { ARXResult result = model.getResult(); if (model == null result == null !result.isResultAvailable()) { return; }
/** * Extracts interesting transformations from the given result * @param model */
Extracts interesting transformations from the given result
addInterestingTransformations
{ "repo_name": "fstahnke/arx", "path": "src/gui/org/deidentifier/arx/gui/model/ModelClipboard.java", "license": "apache-2.0", "size": 10616 }
[ "org.deidentifier.arx.ARXResult" ]
import org.deidentifier.arx.ARXResult;
import org.deidentifier.arx.*;
[ "org.deidentifier.arx" ]
org.deidentifier.arx;
1,245,792
public final void setPresenterSelector(PresenterSelector presenterSelector) { mPresenterSelector = presenterSelector; updateAdapter(); }
final void function(PresenterSelector presenterSelector) { mPresenterSelector = presenterSelector; updateAdapter(); }
/** * Set the presenter selector used to create and bind views. */
Set the presenter selector used to create and bind views
setPresenterSelector
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/support/v17/leanback/app/BaseRowSupportFragment.java", "license": "gpl-3.0", "size": 7448 }
[ "android.support.v17.leanback.widget.PresenterSelector" ]
import android.support.v17.leanback.widget.PresenterSelector;
import android.support.v17.leanback.widget.*;
[ "android.support" ]
android.support;
2,078,374
public static byte[] streamOut(Object object, boolean compressed) throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); streamOut(bytes, object, compressed); bytes.flush(); bytes.close(); return bytes.toByteArray(); }
static byte[] function(Object object, boolean compressed) throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); streamOut(bytes, object, compressed); bytes.flush(); bytes.close(); return bytes.toByteArray(); }
/** * This routine would stream out the give object, uncompressed or compressed depending on the given flag, * and store the streamed contents in the return byte array. The output contents could only be read by * the corresponding "streamIn" method of this class. * @param object * @param compre...
This routine would stream out the give object, uncompressed or compressed depending on the given flag, and store the streamed contents in the return byte array. The output contents could only be read by the corresponding "streamIn" method of this class
streamOut
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/drools-master/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java", "license": "mit", "size": 7834 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException" ]
import java.io.ByteArrayOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,272,581
public GQuery prev() { JsNodeArray result = JsNodeArray.create(); for (Element e : elements) { Element next = getPreviousSiblingElement(e); if (next != null) { result.addNode(next); } } return new GQuery(unique(result)); }
GQuery function() { JsNodeArray result = JsNodeArray.create(); for (Element e : elements) { Element next = getPreviousSiblingElement(e); if (next != null) { result.addNode(next); } } return new GQuery(unique(result)); }
/** * Get a set of elements containing the unique previous siblings of each of the matched set of * elements. Only the immediately previous sibling is returned, not all previous siblings. */
Get a set of elements containing the unique previous siblings of each of the matched set of elements. Only the immediately previous sibling is returned, not all previous siblings
prev
{ "repo_name": "stori-es/stori_es", "path": "dashboard/src/main/java/com/google/gwt/query/client/GQuery.java", "license": "apache-2.0", "size": 177285 }
[ "com.google.gwt.dom.client.Element", "com.google.gwt.query.client.js.JsNodeArray" ]
import com.google.gwt.dom.client.Element; import com.google.gwt.query.client.js.JsNodeArray;
import com.google.gwt.dom.client.*; import com.google.gwt.query.client.js.*;
[ "com.google.gwt" ]
com.google.gwt;
2,364,330
public static void displayNetworkMessage(Context context, String infoMsg) { if (DBG) log("displayInfoRecord: infoMsg=" + infoMsg); String title = (String)context.getText(R.string.network_info_message); displayMessage(context, title, infoMsg); }
static void function(Context context, String infoMsg) { if (DBG) log(STR + infoMsg); String title = (String)context.getText(R.string.network_info_message); displayMessage(context, title, infoMsg); }
/** * Display the alert dialog with the network message. * * @param context context to get strings. * @param infoMsg Text message from Network. */
Display the alert dialog with the network message
displayNetworkMessage
{ "repo_name": "md5555/android_packages_services_Telephony", "path": "src/com/android/phone/PhoneDisplayMessage.java", "license": "apache-2.0", "size": 3550 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
93,630
public static String readAsString(String location) throws IOException { return readAsString(streamFromString(location)); } // ------------------------------------------------------------------------
static String function(String location) throws IOException { return readAsString(streamFromString(location)); }
/** * Reads data pulled from the given location string into a single String * result. The method attempts to retrieve an InputStream using the * {@link #streamFromString(String)} method, then read the input stream * into a String result. * @param location the location String * @retur...
Reads data pulled from the given location string into a single String result. The method attempts to retrieve an InputStream using the <code>#streamFromString(String)</code> method, then read the input stream into a String result
readAsString
{ "repo_name": "giacomovagni/Prefuse", "path": "src/prefuse/util/io/IOLib.java", "license": "bsd-3-clause", "size": 12856 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,791,448
protected Control createContents(Composite cell) { defaultLabel = new Label(cell, SWT.LEFT); defaultLabel.setFont(cell.getFont()); defaultLabel.setBackground(cell.getBackground()); return defaultLabel; }
Control function(Composite cell) { defaultLabel = new Label(cell, SWT.LEFT); defaultLabel.setFont(cell.getFont()); defaultLabel.setBackground(cell.getBackground()); return defaultLabel; }
/** * Creates the controls used to show the value of this cell editor. * <p> * The default implementation of this framework method creates a label * widget, using the same font and background color as the parent control. * </p> * <p> * Subclasses may reimplement. If you reimplement this method, you should...
Creates the controls used to show the value of this cell editor. The default implementation of this framework method creates a label widget, using the same font and background color as the parent control. Subclasses may reimplement. If you reimplement this method, you should also reimplement <code>updateContents</code>...
createContents
{ "repo_name": "GreenDelta/olca-app", "path": "olca-app/src/org/openlca/app/components/DialogCellEditor.java", "license": "mpl-2.0", "size": 11551 }
[ "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Control", "org.eclipse.swt.widgets.Label" ]
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,478,062
public void setCustomPropsFile(File value) { m_CustomPropsFile = value; initialize(m_CustomPropsFile); }
void function(File value) { m_CustomPropsFile = value; initialize(m_CustomPropsFile); }
/** * Sets the custom properties file to use. * * @param value the custom props file to load database parameters from, use * null or directory to disable custom properties. * @see #initialize(File) */
Sets the custom properties file to use
setCustomPropsFile
{ "repo_name": "mydzigear/weka.kmeanspp.silhouette_score", "path": "src/weka/experiment/InstanceQuery.java", "license": "gpl-3.0", "size": 21013 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
589,119
public ServiceFuture<ConnectionMonitorResultInner> updateTagsAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback<ConnectionMonitorResultInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName,...
ServiceFuture<ConnectionMonitorResultInner> function(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback<ConnectionMonitorResultInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, conne...
/** * Update tags of the specified connection monitor. * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @param connectionMonitorName The name of the connection monitor. * @param serviceCallback the async ServiceCall...
Update tags of the specified connection monitor
updateTagsAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/implementation/ConnectionMonitorsInner.java", "license": "mit", "size": 85637 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
572,223
@SuppressWarnings("unchecked") @Test(expected = CommandInitializationFailedException.class) public void testCommandFailsIfSessionKeyIsUndefinedInContext() throws Exception { // complete mock execution result setup EasyMock.replay(executionResult); // setup context context.put(ScheduleOperationComma...
@SuppressWarnings(STR) @Test(expected = CommandInitializationFailedException.class) void function() throws Exception { EasyMock.replay(executionResult); context.put(ScheduleOperationCommand.DESCRIPTION_KEY, randomValue); context.put(ScheduleOperationCommand.ENVIRONMENT_KEY, randomEnvironment); context.put(ScheduleOpera...
/** * Test that command fails if session property is undefined. */
Test that command fails if session property is undefined
testCommandFailsIfSessionKeyIsUndefinedInContext
{ "repo_name": "athrane/pineapple", "path": "plugins/pineapple-agent-plugin/src/test/java/com/alpha/pineapple/plugin/agent/command/ScheduleOperationCommandTest.java", "license": "gpl-3.0", "size": 11290 }
[ "com.alpha.pineapple.command.initialization.CommandInitializationFailedException", "org.easymock.EasyMock", "org.junit.Test" ]
import com.alpha.pineapple.command.initialization.CommandInitializationFailedException; import org.easymock.EasyMock; import org.junit.Test;
import com.alpha.pineapple.command.initialization.*; import org.easymock.*; import org.junit.*;
[ "com.alpha.pineapple", "org.easymock", "org.junit" ]
com.alpha.pineapple; org.easymock; org.junit;
2,518,969
private static ArrayList<String> leerNecesidades(String juiciosP) throws FileNotFoundException { Scanner lector = new Scanner(new File(juiciosP)); ArrayList<String> arr = new ArrayList<String>(); while (lector.hasNextLine()) { String[] linea = lector.nextLine().split("\t"); if (!arr.contains(linea[0]...
static ArrayList<String> function(String juiciosP) throws FileNotFoundException { Scanner lector = new Scanner(new File(juiciosP)); ArrayList<String> arr = new ArrayList<String>(); while (lector.hasNextLine()) { String[] linea = lector.nextLine().split("\t"); if (!arr.contains(linea[0])) { arr.add(linea[0]); } } lector...
/** * Devuelve una lista con todas las necesidades (sin repetir) * a evaluar en el sistema. */
Devuelve una lista con todas las necesidades (sin repetir) a evaluar en el sistema
leerNecesidades
{ "repo_name": "MrJavo94/MiniTREC3", "path": "src/evaluacion/Evaluacion.java", "license": "mit", "size": 7921 }
[ "java.io.File", "java.io.FileNotFoundException", "java.util.ArrayList", "java.util.Scanner" ]
import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Scanner;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,551,357
@Cacheable(value= GroupMember.Cache.NAME, key="'{KPME|isMemberOfSystemViewOnlyGroup}' + 'principal=' + #p0 + '|' + 'asOfDate=' + #p1") boolean isMemberOfSystemViewOnlyGroup(String principalId, DateTime asOfDate);
@Cacheable(value= GroupMember.Cache.NAME, key=STR) boolean isMemberOfSystemViewOnlyGroup(String principalId, DateTime asOfDate);
/** * Checks whether the given {@code principalId} is a system view only user. * * @param principalId The person to check the group membership for * @param asOfDate The effective date of the group membership * * @return true if {@code principalId} is a system view only user, false otherwise */
Checks whether the given principalId is a system view only user
isMemberOfSystemViewOnlyGroup
{ "repo_name": "kuali/kpme", "path": "core/impl/src/main/java/org/kuali/kpme/core/service/group/KPMEGroupService.java", "license": "apache-2.0", "size": 2841 }
[ "org.joda.time.DateTime", "org.kuali.rice.kim.api.group.GroupMember", "org.springframework.cache.annotation.Cacheable" ]
import org.joda.time.DateTime; import org.kuali.rice.kim.api.group.GroupMember; import org.springframework.cache.annotation.Cacheable;
import org.joda.time.*; import org.kuali.rice.kim.api.group.*; import org.springframework.cache.annotation.*;
[ "org.joda.time", "org.kuali.rice", "org.springframework.cache" ]
org.joda.time; org.kuali.rice; org.springframework.cache;
492,370
@Override public final void setEnabled(final boolean enabled) { if (isEnabled() != enabled) { toggleDisabled(); super.setEnabled(enabled); if (!enabled) { cleanupCaptureState(); Roles.getButtonRole().removeAriaPressedState(getElement())...
final void function(final boolean enabled) { if (isEnabled() != enabled) { toggleDisabled(); super.setEnabled(enabled); if (!enabled) { cleanupCaptureState(); Roles.getButtonRole().removeAriaPressedState(getElement()); } else { setAriaPressed(getCurrentFace()); } } }
/** * Sets whether this button is enabled. * * @param enabled <code>true</code> to enable the button, <code>false</code> to * disable it */
Sets whether this button is enabled
setEnabled
{ "repo_name": "gchq/stroom", "path": "stroom-core-client-widget/src/main/java/com/google/gwt/user/client/ui/MyCustomButton.java", "license": "apache-2.0", "size": 26399 }
[ "com.google.gwt.aria.client.Roles" ]
import com.google.gwt.aria.client.Roles;
import com.google.gwt.aria.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,426,172
@Test public void testNullStatementError() { try { SelectStatement stmt = null; testDialect.convertStatementToSQL(stmt); fail("Should not be able to get SQL from a null statement"); } catch (IllegalArgumentException e) { // Expected exception } }
void function() { try { SelectStatement stmt = null; testDialect.convertStatementToSQL(stmt); fail(STR); } catch (IllegalArgumentException e) { } }
/** * Tests that a null statement causes an error. */
Tests that a null statement causes an error
testNullStatementError
{ "repo_name": "badgerwithagun/morf", "path": "morf-testsupport/src/main/java/org/alfasoftware/morf/jdbc/AbstractSqlDialectTest.java", "license": "apache-2.0", "size": 201465 }
[ "org.alfasoftware.morf.sql.SelectStatement", "org.junit.Assert" ]
import org.alfasoftware.morf.sql.SelectStatement; import org.junit.Assert;
import org.alfasoftware.morf.sql.*; import org.junit.*;
[ "org.alfasoftware.morf", "org.junit" ]
org.alfasoftware.morf; org.junit;
2,713,318
public void write(InputStream inputStream) { ContentService contentService = services.getContentService(); ContentWriter writer = contentService.getWriter(nodeRef, this.property, true); writer.putContent(inputStream); // update cached variables afte...
void function(InputStream inputStream) { ContentService contentService = services.getContentService(); ContentWriter writer = contentService.getWriter(nodeRef, this.property, true); writer.putContent(inputStream); updateContentData(true); }
/** * Set the content stream from another input stream. * * @param inputStream InputStream */
Set the content stream from another input stream
write
{ "repo_name": "loftuxab/alfresco-community-loftux", "path": "projects/repository/source/java/org/alfresco/repo/jscript/ScriptNode.java", "license": "lgpl-3.0", "size": 164696 }
[ "java.io.InputStream", "org.alfresco.service.cmr.repository.ContentService", "org.alfresco.service.cmr.repository.ContentWriter" ]
import java.io.InputStream; import org.alfresco.service.cmr.repository.ContentService; import org.alfresco.service.cmr.repository.ContentWriter;
import java.io.*; import org.alfresco.service.cmr.repository.*;
[ "java.io", "org.alfresco.service" ]
java.io; org.alfresco.service;
1,460,794
public void writePacket(final byte[] data, final int offset, final int len) throws IOException { if (len <= 0) { // nothing to write return; } if (packetCount > PACKETS_PER_OGG_PAGE) { flush(false); } System.arraycop...
void function(final byte[] data, final int offset, final int len) throws IOException { if (len <= 0) { return; } if (packetCount > PACKETS_PER_OGG_PAGE) { flush(false); } System.arraycopy(data, offset, dataBuffer, dataBufferPtr, len); dataBufferPtr += len; headerBuffer[headerBufferPtr++]=(byte)len; packetCount++; granu...
/** * Writes a packet of audio. * @param data - audio data. * @param offset - the offset from which to start reading the data. * @param len - the length of data to read. * @exception IOException */
Writes a packet of audio
writePacket
{ "repo_name": "srnsw/xena", "path": "plugins/audio/ext/src/jspeex/src/java/org/xiph/speex/OggSpeexWriter.java", "license": "gpl-3.0", "size": 9936 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,414,217
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(ResourceParameterBinding.class)) { case Bpmn2Package.RESOURCE_PARAMETER_BINDING__EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(ResourceParameterBinding.class)) { case Bpmn2Package.RESOURCE_PARAMETER_BINDING__EXPRESSION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notify...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "adbrucker/SecureBPMN", "path": "designer/src/org.activiti.designer.model.edit/src/org/eclipse/bpmn2/provider/ResourceParameterBindingItemProvider.java", "license": "apache-2.0", "size": 6668 }
[ "org.eclipse.bpmn2.Bpmn2Package", "org.eclipse.bpmn2.ResourceParameterBinding", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import org.eclipse.bpmn2.Bpmn2Package; import org.eclipse.bpmn2.ResourceParameterBinding; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.bpmn2.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.bpmn2", "org.eclipse.emf" ]
org.eclipse.bpmn2; org.eclipse.emf;
264,778
public static Map<String, String> notifyEvent(List<? extends MetaStoreEventListener> listeners, EventType eventType, ListenerEvent event, EnvironmentContext environmentContex...
static Map<String, String> function(List<? extends MetaStoreEventListener> listeners, EventType eventType, ListenerEvent event, EnvironmentContext environmentContext) throws MetaException { Preconditions.checkNotNull(event, STR); event.setEnvironmentContext(environmentContext); return notifyEvent(listeners, eventType, ...
/** * Notify a list of listeners about a specific metastore event. Each listener notified might update * the (ListenerEvent) event by setting a parameter key/value pair. These updated parameters will * be returned to the caller. * * @param listeners List of MetaStoreEventListener listeners. * @param e...
Notify a list of listeners about a specific metastore event. Each listener notified might update the (ListenerEvent) event by setting a parameter key/value pair. These updated parameters will be returned to the caller
notifyEvent
{ "repo_name": "vineetgarg02/hive", "path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreListenerNotifier.java", "license": "apache-2.0", "size": 20416 }
[ "com.google.common.base.Preconditions", "java.util.List", "java.util.Map", "org.apache.hadoop.hive.metastore.api.EnvironmentContext", "org.apache.hadoop.hive.metastore.api.MetaException", "org.apache.hadoop.hive.metastore.events.ListenerEvent", "org.apache.hadoop.hive.metastore.messaging.EventMessage" ]
import com.google.common.base.Preconditions; import java.util.List; import java.util.Map; import org.apache.hadoop.hive.metastore.api.EnvironmentContext; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.events.ListenerEvent; import org.apache.hadoop.hive.metastore.messa...
import com.google.common.base.*; import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.events.*; import org.apache.hadoop.hive.metastore.messaging.*;
[ "com.google.common", "java.util", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.hadoop;
911,926
public SimpleDocument retrieveSimpleDocument(WAPrimaryKey resourcePk, String contributionLanguage) { // Contribution language String lang = I18NHelper.checkLanguage(contributionLanguage); // Title and description String title = defaultStringIfNotDefined(getTitle()); String description = de...
SimpleDocument function(WAPrimaryKey resourcePk, String contributionLanguage) { String lang = I18NHelper.checkLanguage(contributionLanguage); String title = defaultStringIfNotDefined(getTitle()); String description = defaultStringIfNotDefined(getDescription()); if (AttachmentSettings.isUseFileMetadataForAttachmentDataE...
/** * Retrieve the SimpleDocument in relation with uploaded file. For now, as this method is * exclusively used for contribution creations, the treatment doesn't search for existing * attachments. In the future and if updates will be handled, the treatment must evolve to search * for existing attachments .....
Retrieve the SimpleDocument in relation with uploaded file. For now, as this method is exclusively used for contribution creations, the treatment doesn't search for existing attachments. In the future and if updates will be handled, the treatment must evolve to search for existing attachments ..
retrieveSimpleDocument
{ "repo_name": "ebonnet/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/io/upload/UploadedFile.java", "license": "agpl-3.0", "size": 8306 }
[ "org.silverpeas.core.WAPrimaryKey", "org.silverpeas.core.contribution.attachment.model.SimpleAttachment", "org.silverpeas.core.contribution.attachment.model.SimpleDocument", "org.silverpeas.core.contribution.attachment.model.SimpleDocumentPK", "org.silverpeas.core.contribution.attachment.util.AttachmentSett...
import org.silverpeas.core.WAPrimaryKey; import org.silverpeas.core.contribution.attachment.model.SimpleAttachment; import org.silverpeas.core.contribution.attachment.model.SimpleDocument; import org.silverpeas.core.contribution.attachment.model.SimpleDocumentPK; import org.silverpeas.core.contribution.attachment.util....
import org.silverpeas.core.*; import org.silverpeas.core.contribution.attachment.model.*; import org.silverpeas.core.contribution.attachment.util.*; import org.silverpeas.core.i18n.*; import org.silverpeas.core.io.media.*; import org.silverpeas.core.util.*; import org.silverpeas.core.util.file.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
2,735,989
public static URI uriSearch(URI baseUri) { UriBuilder bld = UriBuilder.fromUri(baseUri).path("legalentitiesearches"); return bld.build(); }
static URI function(URI baseUri) { UriBuilder bld = UriBuilder.fromUri(baseUri).path(STR); return bld.build(); }
/** * Builds a URI. * * @param baseUri the base URI, not null * @return the URI, not null */
Builds a URI
uriSearch
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Master/src/main/java/com/opengamma/master/legalentity/impl/DataLegalEntityMasterResource.java", "license": "apache-2.0", "size": 4641 }
[ "javax.ws.rs.core.UriBuilder" ]
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,260,785
@Restricted(DoNotUse.class) public Categories doItemCategories(StaplerRequest req, StaplerResponse rsp, @QueryParameter String iconStyle) throws IOException, ServletException { getOwner().checkPermission(Item.CREATE); rsp.addHeader("Cache-Control", "no-cache, no-store, must-revalidate"); ...
@Restricted(DoNotUse.class) Categories function(StaplerRequest req, StaplerResponse rsp, @QueryParameter String iconStyle) throws IOException, ServletException { getOwner().checkPermission(Item.CREATE); rsp.addHeader(STR, STR); rsp.addHeader(STR, STR); rsp.addHeader(STR, "0"); Categories categories = new Categories(); ...
/** * An API REST method to get the allowed {$link TopLevelItem}s and its categories. * * @return A {@link Categories} entity that is shown as JSON file. */
An API REST method to get the allowed {$link TopLevelItem}s and its categories
doItemCategories
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/model/View.java", "license": "mit", "size": 51740 }
[ "java.io.IOException", "java.io.Serializable", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "javax.servlet.ServletException", "org.apache.commons.jelly.JellyContext", "org.apache.commons.lang.StringUtils", "org.jenkins.ui.icon.Icon", "org.jenkins.ui.icon.IconSet...
import java.io.IOException; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import org.apache.commons.jelly.JellyContext; import org.apache.commons.lang.StringUtils; import org.jenkins.ui.icon.Icon; im...
import java.io.*; import java.util.*; import javax.servlet.*; import org.apache.commons.jelly.*; import org.apache.commons.lang.*; import org.jenkins.ui.icon.*; import org.kohsuke.accmod.*; import org.kohsuke.accmod.restrictions.*; import org.kohsuke.stapler.*;
[ "java.io", "java.util", "javax.servlet", "org.apache.commons", "org.jenkins.ui", "org.kohsuke.accmod", "org.kohsuke.stapler" ]
java.io; java.util; javax.servlet; org.apache.commons; org.jenkins.ui; org.kohsuke.accmod; org.kohsuke.stapler;
1,996,349
User user = TestUtils.createRandomUser(false); AuthenticationTestUtils.setSecurityContext(user); String originalToken = authenticationTokenManagement.getAuthenticationToken(user.getId()); String originalToken2 = authenticationTokenManagement.getAuthenticationToken(user.getId()); Asse...
User user = TestUtils.createRandomUser(false); AuthenticationTestUtils.setSecurityContext(user); String originalToken = authenticationTokenManagement.getAuthenticationToken(user.getId()); String originalToken2 = authenticationTokenManagement.getAuthenticationToken(user.getId()); Assert.assertNotNull(originalToken); Ass...
/** * Test for {@link AuthenticationTokenManagement#getAuthenticationToken(Long)} * * @throws NotFoundException * The test should fail, if this exception is thrown. */
Test for <code>AuthenticationTokenManagement#getAuthenticationToken(Long)</code>
testGetAuthenticationToken
{ "repo_name": "Communote/communote-server", "path": "communote/tests/all-versions/integration/src/test/java/com/communote/server/core/security/AuthenticationTokenManagementTest.java", "license": "apache-2.0", "size": 2089 }
[ "com.communote.server.model.user.User", "com.communote.server.test.util.AuthenticationTestUtils", "com.communote.server.test.util.TestUtils", "org.testng.Assert" ]
import com.communote.server.model.user.User; import com.communote.server.test.util.AuthenticationTestUtils; import com.communote.server.test.util.TestUtils; import org.testng.Assert;
import com.communote.server.model.user.*; import com.communote.server.test.util.*; import org.testng.*;
[ "com.communote.server", "org.testng" ]
com.communote.server; org.testng;
2,409,597
public boolean hasData(Context context) { final String BASE_SELECTION = RawContacts.ACCOUNT_TYPE + " = ?" + " AND " + RawContacts.ACCOUNT_NAME + " = ?"; final String selection; final String[] args; if (TextUtils.isEmpty(dataSet)) { selection = BASE_SELECTI...
boolean function(Context context) { final String BASE_SELECTION = RawContacts.ACCOUNT_TYPE + STR + STR + RawContacts.ACCOUNT_NAME + STR; final String selection; final String[] args; if (TextUtils.isEmpty(dataSet)) { selection = BASE_SELECTION + STR + RawContacts.DATA_SET + STR; args = new String[] {type, name}; } else ...
/** * Return {@code true} if this account has any contacts in the database. * Touches DB. Don't use in the UI thread. */
Return true if this account has any contacts in the database. Touches DB. Don't use in the UI thread
hasData
{ "repo_name": "GuillaumeDelente/contact-picker", "path": "library/src/main/java/com/guillaumedelente/android/contacts/common/model/account/AccountWithDataSet.java", "license": "apache-2.0", "size": 6663 }
[ "android.content.Context", "android.database.Cursor", "android.provider.ContactsContract", "android.text.TextUtils" ]
import android.content.Context; import android.database.Cursor; import android.provider.ContactsContract; import android.text.TextUtils;
import android.content.*; import android.database.*; import android.provider.*; import android.text.*;
[ "android.content", "android.database", "android.provider", "android.text" ]
android.content; android.database; android.provider; android.text;
1,684,667
public Environment getEnvironment() { return store.getEnvironment(); }
Environment function() { return store.getEnvironment(); }
/** * Returns the environment associated with this store. */
Returns the environment associated with this store
getEnvironment
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.44/src/com/sleepycat/persist/raw/RawStore.java", "license": "gpl-2.0", "size": 4136 }
[ "com.sleepycat.je.Environment" ]
import com.sleepycat.je.Environment;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
1,022,859
public Date getInstructionEndDate() { return instructionEndDate; }
Date function() { return instructionEndDate; }
/** * Gets the instructionEndDate. * * @return instructionEndDate */
Gets the instructionEndDate
getInstructionEndDate
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/endow/businessobject/KemidSpecialInstruction.java", "license": "agpl-3.0", "size": 5521 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,482,963
protected static IProblemLocation[] filter(IProblemLocation[] problems, int[] problemIds) { ArrayList<IProblemLocation> result= new ArrayList<>(); for (int i= 0; i < problems.length; i++) { IProblemLocation problem= problems[i]; if (contains(problemIds, problem.getProblemId()) && !contains(result, problem...
static IProblemLocation[] function(IProblemLocation[] problems, int[] problemIds) { ArrayList<IProblemLocation> result= new ArrayList<>(); for (int i= 0; i < problems.length; i++) { IProblemLocation problem= problems[i]; if (contains(problemIds, problem.getProblemId()) && !contains(result, problem)) { result.add(proble...
/** * Returns unique problem locations. All locations in result * have an id element <code>problemIds</code>. * * @param problems the problems to filter * @param problemIds the ids of the resulting problem locations * @return problem locations */
Returns unique problem locations. All locations in result have an id element <code>problemIds</code>
filter
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/fix/AbstractMultiFix.java", "license": "epl-1.0", "size": 3947 }
[ "java.util.ArrayList", "org.eclipse.jdt.ui.text.java.IProblemLocation" ]
import java.util.ArrayList; import org.eclipse.jdt.ui.text.java.IProblemLocation;
import java.util.*; import org.eclipse.jdt.ui.text.java.*;
[ "java.util", "org.eclipse.jdt" ]
java.util; org.eclipse.jdt;
1,088,970
public Boolean execute(String query) { try { getConnection().createStatement().execute(query); return true; } catch (SQLException ex) { log.severe(ex.getMessage()); return false; } }
Boolean function(String query) { try { getConnection().createStatement().execute(query); return true; } catch (SQLException ex) { log.severe(ex.getMessage()); return false; } }
/** * Execute a statement * * @param query * @return */
Execute a statement
execute
{ "repo_name": "Obrekr/MinecartRouting", "path": "src/MinecartRouting/SQLiteCore.java", "license": "lgpl-2.1", "size": 5778 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,311,223
private void writeConstraintLogicForNestedElement(Variable variable, String name, boolean isDerivedType) { String patternToAdd; patternToAdd = "isDefined( $" + variable.getVariable().getParent().getName() + "." + name + ")"; pattern.add(patternToAdd); String parent = variable.getVari...
void function(Variable variable, String name, boolean isDerivedType) { String patternToAdd; patternToAdd = STR + variable.getVariable().getParent().getName() + ".STR)"; pattern.add(patternToAdd); String parent = variable.getVariable().getParent().getName(); if (!compoundPlaceHolders.contains(parent)) { compoundPlaceHol...
/** * Method to write the constraint logic in drools for a nested element. * @param variable variable. * @param name Name of the variable. * @param isDerivedType <b>True</b> if the variable is a derived type. */
Method to write the constraint logic in drools for a nested element
writeConstraintLogicForNestedElement
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Reasoner/Drools/de.uni_hildesheim.sse.reasoning.drools/src/net/ssehub/easy/reasoning/drools/DroolsConstraintVisitor.java", "license": "apache-2.0", "size": 62780 }
[ "java.util.List", "net.ssehub.easy.varModel.cst.Variable" ]
import java.util.List; import net.ssehub.easy.varModel.cst.Variable;
import java.util.*; import net.ssehub.easy.*;
[ "java.util", "net.ssehub.easy" ]
java.util; net.ssehub.easy;
571,765
public synchronized void start() { if (log.isInfoEnabled()) { log.info("Starting EsperIO Socket Adapter for engine URI '" + engineURI + "'"); } EPServiceProviderSPI engineSPI = (EPServiceProviderSPI) EPServiceProviderManager.getExistingProvider(engineURI); /...
synchronized void function() { if (log.isInfoEnabled()) { log.info(STR + engineURI + "'"); } EPServiceProviderSPI engineSPI = (EPServiceProviderSPI) EPServiceProviderManager.getExistingProvider(engineURI); Set<Integer> ports = new HashSet<Integer>(); for (Map.Entry<String, SocketConfig> entry : config.getSockets().entr...
/** * Start the socket endpoint. */
Start the socket endpoint
start
{ "repo_name": "b-cuts/esper", "path": "esperio-socket/src/main/java/com/espertech/esperio/socket/EsperIOSocketAdapter.java", "license": "gpl-2.0", "size": 4350 }
[ "com.espertech.esper.client.ConfigurationException", "com.espertech.esper.client.EPException", "com.espertech.esper.client.EPServiceProviderManager", "com.espertech.esper.core.service.EPServiceProviderSPI", "com.espertech.esperio.socket.config.SocketConfig", "com.espertech.esperio.socket.core.EsperSocketS...
import com.espertech.esper.client.ConfigurationException; import com.espertech.esper.client.EPException; import com.espertech.esper.client.EPServiceProviderManager; import com.espertech.esper.core.service.EPServiceProviderSPI; import com.espertech.esperio.socket.config.SocketConfig; import com.espertech.esperio.socket....
import com.espertech.esper.client.*; import com.espertech.esper.core.service.*; import com.espertech.esperio.socket.config.*; import com.espertech.esperio.socket.core.*; import java.io.*; import java.util.*;
[ "com.espertech.esper", "com.espertech.esperio", "java.io", "java.util" ]
com.espertech.esper; com.espertech.esperio; java.io; java.util;
609,909
public static void assertFilesAreReadable(final List<File> files) { for (final File file : files) assertFileIsReadable(file); }
static void function(final List<File> files) { for (final File file : files) assertFileIsReadable(file); }
/** * Checks that each file is non-null, exists, is not a directory and is readable. If any * condition is false then a runtime exception is thrown. * * @param files the list of files to check for readability */
Checks that each file is non-null, exists, is not a directory and is readable. If any condition is false then a runtime exception is thrown
assertFilesAreReadable
{ "repo_name": "eugenegardner/tenXMEIPolisher", "path": "src/htsjdk/samtools/util/IOUtil.java", "license": "gpl-3.0", "size": 35486 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,924,313
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<PolicySetDefinitionInner>> createOrUpdateAtManagementGroupWithResponseAsync( String policySetDefinitionName, String managementGroupId, PolicySetDefinitionInner parameters) { if (this.client.getEndpoint() == null) { retu...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<PolicySetDefinitionInner>> function( String policySetDefinitionName, String managementGroupId, PolicySetDefinitionInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (policySetDefinitionName ...
/** * This operation creates or updates a policy set definition in the given management group with the given name. * * @param policySetDefinitionName The name of the policy set definition to create. * @param managementGroupId The ID of the management group. * @param parameters The policy set de...
This operation creates or updates a policy set definition in the given management group with the given name
createOrUpdateAtManagementGroupWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicySetDefinitionsClientImpl.java", "license": "mit", "size": 122213 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.resources.fluent.models.PolicySetDefinitionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.resources.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,686,232
public Map<String, Object> getReverseAliases() { return Collections.unmodifiableMap(reverseAliases); }
Map<String, Object> function() { return Collections.unmodifiableMap(reverseAliases); }
/** * Returns the map of String aliases to QuerySelectables and FromElements * * @return the map */
Returns the map of String aliases to QuerySelectables and FromElements
getReverseAliases
{ "repo_name": "elsiklab/intermine", "path": "intermine/objectstore/main/src/org/intermine/objectstore/query/Query.java", "license": "lgpl-2.1", "size": 12937 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
400,023
public JoystickButton getStart() { return new JoystickButton(this, 8); }
JoystickButton function() { return new JoystickButton(this, 8); }
/** * This method returns the Start button from the XBox Controller * @return JoystickButton Mapped to button start on Xbox Controller */
This method returns the Start button from the XBox Controller
getStart
{ "repo_name": "portpiratech/frc2015", "path": "src/DeadTool/src/com/portpiratech/xbox360/XboxController.java", "license": "mit", "size": 5456 }
[ "edu.wpi.first.wpilibj.buttons.JoystickButton" ]
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.buttons.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,235,610
@GetMapping("/dish-categories/my") @Timed @Secured({ AuthoritiesConstants.ADMIN, AuthoritiesConstants.MANAGER, }) public ResponseEntity<List<DishCategory>> getMyDishes(@ApiParam Pageable pageable) { log.debug("REST request to get my DishCategories"); Page<DishCategory> page...
@GetMapping(STR) @Secured({ AuthoritiesConstants.ADMIN, AuthoritiesConstants.MANAGER, }) ResponseEntity<List<DishCategory>> function(@ApiParam Pageable pageable) { log.debug(STR); Page<DishCategory> page = dishCategoryRepository.findByUserIsCurrentUser(pageable); HttpHeaders headers = PaginationUtil.generatePaginationH...
/** * GET /dish-categories/my : get all my dish categories. * * @param pageable the pagination information * @return the ResponseEntity with status 200 (OK) and the list of restaurants in body */
GET /dish-categories/my : get all my dish categories
getMyDishes
{ "repo_name": "goxhaj/gastronomee", "path": "src/main/java/com/gastronomee/web/rest/DishCategoryResource.java", "license": "apache-2.0", "size": 10556 }
[ "com.gastronomee.domain.DishCategory", "com.gastronomee.security.AuthoritiesConstants", "com.gastronomee.web.rest.util.PaginationUtil", "io.swagger.annotations.ApiParam", "java.util.List", "org.springframework.data.domain.Page", "org.springframework.data.domain.Pageable", "org.springframework.http.Htt...
import com.gastronomee.domain.DishCategory; import com.gastronomee.security.AuthoritiesConstants; import com.gastronomee.web.rest.util.PaginationUtil; import io.swagger.annotations.ApiParam; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.s...
import com.gastronomee.domain.*; import com.gastronomee.security.*; import com.gastronomee.web.rest.util.*; import io.swagger.annotations.*; import java.util.*; import org.springframework.data.domain.*; import org.springframework.http.*; import org.springframework.security.access.annotation.*; import org.springframewor...
[ "com.gastronomee.domain", "com.gastronomee.security", "com.gastronomee.web", "io.swagger.annotations", "java.util", "org.springframework.data", "org.springframework.http", "org.springframework.security", "org.springframework.web" ]
com.gastronomee.domain; com.gastronomee.security; com.gastronomee.web; io.swagger.annotations; java.util; org.springframework.data; org.springframework.http; org.springframework.security; org.springframework.web;
2,215,805
@Inline public static Object moveObject(Object fromObj, Object toObj, int numBytes, boolean noGCHeader, RVMClass type) { // We copy arrays and scalars the same way return moveObject(Address.zero(), fromObj, toObj, numBytes, noGCHeader); }
static Object function(Object fromObj, Object toObj, int numBytes, boolean noGCHeader, RVMClass type) { return moveObject(Address.zero(), fromObj, toObj, numBytes, noGCHeader); }
/** * Copy an array to the given location. */
Copy an array to the given location
moveObject
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/objectmodel/JavaHeader.java", "license": "bsd-3-clause", "size": 33287 }
[ "org.jikesrvm.classloader.RVMClass", "org.vmmagic.unboxed.Address" ]
import org.jikesrvm.classloader.RVMClass; import org.vmmagic.unboxed.Address;
import org.jikesrvm.classloader.*; import org.vmmagic.unboxed.*;
[ "org.jikesrvm.classloader", "org.vmmagic.unboxed" ]
org.jikesrvm.classloader; org.vmmagic.unboxed;
928,890
public void clusterRefMeans () { // Initializing auxiliary variables ArrayList<Integer> clusterEvents = clusters.get(refrigeratorCluster); refMeans = new double[3]; for (Integer index: clusterEvents) { refMeans[0] += isolated.get(index).getMeanValues()[0]; refMeans[1] += isolated.get(i...
void function () { ArrayList<Integer> clusterEvents = clusters.get(refrigeratorCluster); refMeans = new double[3]; for (Integer index: clusterEvents) { refMeans[0] += isolated.get(index).getMeanValues()[0]; refMeans[1] += isolated.get(index).getMeanValues()[1]; refMeans[2] += isolated.get(index).getDuration(); } for (i...
/** * This function is used for filling an array with the mean values of active * and reactive power of the refrigerator cluster events. */
This function is used for filling an array with the mean values of active and reactive power of the refrigerator cluster events
clusterRefMeans
{ "repo_name": "cassandra-project/disaggregation", "path": "src/eu/cassandra/appliance/IsolatedEventsExtractor.java", "license": "apache-2.0", "size": 13790 }
[ "java.util.ArrayList", "java.util.Arrays" ]
import java.util.ArrayList; import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,352,102
public int searchChild(INode inode) { INode child = getChild(inode.getLocalNameBytes(), Snapshot.CURRENT_STATE_ID); if (child != inode) { // inode is not in parent's children list, thus inode must be in // snapshot. identify the snapshot id and later add it into the path DirectoryDiffList di...
int function(INode inode) { INode child = getChild(inode.getLocalNameBytes(), Snapshot.CURRENT_STATE_ID); if (child != inode) { DirectoryDiffList diffs = getDiffs(); if (diffs == null) { return Snapshot.NO_SNAPSHOT_ID; } return diffs.findSnapshotDeleted(inode); } else { return Snapshot.CURRENT_STATE_ID; } }
/** * Search for the given INode in the children list and the deleted lists of * snapshots. * @return {@link Snapshot#CURRENT_STATE_ID} if the inode is in the children * list; {@link Snapshot#NO_SNAPSHOT_ID} if the inode is neither in the * children list nor in any snapshot; otherwise the snapshot id of ...
Search for the given INode in the children list and the deleted lists of snapshots
searchChild
{ "repo_name": "jingjidejuren/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java", "license": "apache-2.0", "size": 33171 }
[ "org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature", "org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot" ]
import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature; import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot;
import org.apache.hadoop.hdfs.server.namenode.snapshot.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,469,422
Favicon loadFavicon(InputStream in) throws IOException;
Favicon loadFavicon(InputStream in) throws IOException;
/** * Loads a favicon from a specified {@link InputStream}. * * @param in The favicon input stream * @return The loaded favicon from the input stream * @throws IOException If the favicon couldn't be loaded */
Loads a favicon from a specified <code>InputStream</code>
loadFavicon
{ "repo_name": "Kiskae/SpongeAPI", "path": "src/main/java/org/spongepowered/api/GameRegistry.java", "license": "mit", "size": 20281 }
[ "java.io.IOException", "java.io.InputStream", "org.spongepowered.api.status.Favicon" ]
import java.io.IOException; import java.io.InputStream; import org.spongepowered.api.status.Favicon;
import java.io.*; import org.spongepowered.api.status.*;
[ "java.io", "org.spongepowered.api" ]
java.io; org.spongepowered.api;
346,200
public Document parseText(String text) throws SAXException, IOException, ParserConfigurationException { return parse(new StringReader(text)); } public DOMBuilder(Document document) { this.document = document; } public DOMBuilder(DocumentBuilder documentBuilder) { this.docum...
Document function(String text) throws SAXException, IOException, ParserConfigurationException { return parse(new StringReader(text)); } public DOMBuilder(Document document) { this.document = document; } public DOMBuilder(DocumentBuilder documentBuilder) { this.documentBuilder = documentBuilder; }
/** * A helper method to parse the given text as XML. * * @param text the XML text to parse * @return the root node of the parsed tree of Nodes * @throws SAXException Any SAX exception, possibly wrapping another exception. * @throws IOException An IO except...
A helper method to parse the given text as XML
parseText
{ "repo_name": "antoaravinth/incubator-groovy", "path": "subprojects/groovy-xml/src/main/java/groovy/xml/DOMBuilder.java", "license": "apache-2.0", "size": 10946 }
[ "java.io.IOException", "java.io.StringReader", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.io.StringReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; javax.xml; org.w3c.dom; org.xml.sax;
2,640,036
Class clazz = Reflections.getUserClass(root); return toXml(root, clazz, null); }
Class clazz = Reflections.getUserClass(root); return toXml(root, clazz, null); }
/** * Java Object->Xml without encoding. */
Java Object->Xml without encoding
toXml
{ "repo_name": "zhangmengzhi/pickles", "path": "src/main/java/org/zhangmz/pickles/modules/convert/JaxbMapper.java", "license": "apache-2.0", "size": 4776 }
[ "org.zhangmz.pickles.modules.utils.Reflections" ]
import org.zhangmz.pickles.modules.utils.Reflections;
import org.zhangmz.pickles.modules.utils.*;
[ "org.zhangmz.pickles" ]
org.zhangmz.pickles;
2,706,080
protected void appendFieldsIn(final Class<?> clazz) { if (clazz.isArray()) { this.reflectionAppendArray(this.getObject()); return; } final Field[] fields = clazz.getDeclaredFields(); AccessibleObject.setAccessible(fields, true); for (final Field field ...
void function(final Class<?> clazz) { if (clazz.isArray()) { this.reflectionAppendArray(this.getObject()); return; } final Field[] fields = clazz.getDeclaredFields(); AccessibleObject.setAccessible(fields, true); for (final Field field : fields) { final String fieldName = field.getName(); if (this.accept(field)) { try ...
/** * <p> * Appends the fields and values defined by the given object of the given Class. * </p> * * <p> * If a cycle is detected as an object is &quot;toString()'ed&quot;, such an object is rendered as if * <code>Object.toString()</code> had been called and not implemented by the obj...
Appends the fields and values defined by the given object of the given Class. If a cycle is detected as an object is &quot;toString()'ed&quot;, such an object is rendered as if <code>Object.toString()</code> had been called and not implemented by the object.
appendFieldsIn
{ "repo_name": "hsjawanda/gae-objectify-utils", "path": "src/main/java/com/hsjawanda/gaeobjectify/repackaged/commons/lang3/builder/ReflectionToStringBuilder.java", "license": "apache-2.0", "size": 29723 }
[ "java.lang.reflect.AccessibleObject", "java.lang.reflect.Field" ]
import java.lang.reflect.AccessibleObject; import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,157,474
protected FilterMap getFilterMap() { return _requestEnvironment.getFilterMap(); }
FilterMap function() { return _requestEnvironment.getFilterMap(); }
/** * returns filter set associated with specified object. */
returns filter set associated with specified object
getFilterMap
{ "repo_name": "mozartframework/cms", "path": "src/com/mozartframework/db/app/request/Instruction.java", "license": "gpl-3.0", "size": 6441 }
[ "com.mozartframework.db.filter.FilterMap" ]
import com.mozartframework.db.filter.FilterMap;
import com.mozartframework.db.filter.*;
[ "com.mozartframework.db" ]
com.mozartframework.db;
275,566
protected void injectAdapter() { if(mAdapter.getItemCount() > 0) { mAdapter.setClickListener(this); if (recyclerView.getAdapter() == null) { if (getActionMode() != null) mAdapter.setActionModeCallback(getActionMode()); recyclerView....
void function() { if(mAdapter.getItemCount() > 0) { mAdapter.setClickListener(this); if (recyclerView.getAdapter() == null) { if (getActionMode() != null) mAdapter.setActionModeCallback(getActionMode()); recyclerView.setAdapter(mAdapter); } else { if (swipeRefreshLayout.isRefreshing()) swipeRefreshLayout.setRefreshing(...
/** * Set your adapter and call this method when you are done to the current * parents data, then call this method after */
Set your adapter and call this method when you are done to the current parents data, then call this method after
injectAdapter
{ "repo_name": "wax911/AniTrendApp", "path": "app/src/main/java/com/mxt/anitrend/base/custom/fragment/FragmentBaseComment.java", "license": "lgpl-3.0", "size": 13481 }
[ "android.text.TextUtils" ]
import android.text.TextUtils;
import android.text.*;
[ "android.text" ]
android.text;
334,446
void createTopic(String key, String newTopic, int queueNum, int topicSysFlag) throws MQClientException;
void createTopic(String key, String newTopic, int queueNum, int topicSysFlag) throws MQClientException;
/** * Creates an topic * * @param key accesskey * @param newTopic topic name * @param queueNum topic's queue number * @param topicSysFlag topic system flag */
Creates an topic
createTopic
{ "repo_name": "Vansee/RocketMQ", "path": "client/src/main/java/org/apache/rocketmq/client/MQAdmin.java", "license": "apache-2.0", "size": 3711 }
[ "org.apache.rocketmq.client.exception.MQClientException" ]
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.client.exception.*;
[ "org.apache.rocketmq" ]
org.apache.rocketmq;
2,269,536
@Generated @Selector("setWidgetControlType:") public native void setWidgetControlType(@NInt long value);
@Selector(STR) native void function(@NInt long value);
/** * The type of button widget control type (radio button, push button, or checkbox). * Used by annotations type(s): /Widget (field type(s): /Btn). */
The type of button widget control type (radio button, push button, or checkbox). Used by annotations type(s): /Widget (field type(s): /Btn)
setWidgetControlType
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/pdfkit/PDFAnnotation.java", "license": "apache-2.0", "size": 36415 }
[ "org.moe.natj.general.ann.NInt", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.NInt; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
574,368
void dump(SortedSet<byte[]> splits, Multimap<byte[], HbckInfo> regions) { // we display this way because the last end key should be displayed as well. StringBuilder sb = new StringBuilder(); for (byte[] k : splits) { sb.setLength(0); // clear out existing buffer, if any. sb.append(...
void dump(SortedSet<byte[]> splits, Multimap<byte[], HbckInfo> regions) { StringBuilder sb = new StringBuilder(); for (byte[] k : splits) { sb.setLength(0); sb.append(Bytes.toStringBinary(k) + ":\t"); for (HbckInfo r : regions.get(k)) { sb.append(STR+ r.toString() + STR + Bytes.toStringBinary(r.getEndKey())+ "]\t"); } ...
/** * This dumps data in a visually reasonable way for visual debugging * * @param splits * @param regions */
This dumps data in a visually reasonable way for visual debugging
dump
{ "repo_name": "Guavus/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java", "license": "apache-2.0", "size": 175295 }
[ "com.google.common.collect.Multimap", "java.util.SortedSet" ]
import com.google.common.collect.Multimap; import java.util.SortedSet;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,855,447
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mId = getArguments() != null ? getArguments().getInt(EXTRA_DATA_IMAGE_ID) : -1; mImageUrl = getArguments() != null ? getArguments().getString(EXTRA_DATA_IMAGE_URL) : null; }
void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mId = getArguments() != null ? getArguments().getInt(EXTRA_DATA_IMAGE_ID) : -1; mImageUrl = getArguments() != null ? getArguments().getString(EXTRA_DATA_IMAGE_URL) : null; }
/** * Populate image using a url from extras, use the convenience factory method * {@link ImageDetailFragment#newInstance(String)} to create this fragment. */
Populate image using a url from extras, use the convenience factory method <code>ImageDetailFragment#newInstance(String)</code> to create this fragment
onCreate
{ "repo_name": "snailee/QGallery", "path": "src/kr/qgallery/ui/ImageViewFragment.java", "license": "apache-2.0", "size": 2567 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
635,976
protected IFigure setupContentPane(IFigure nodeShape) { return nodeShape; // use nodeShape itself as contentPane }
IFigure function(IFigure nodeShape) { return nodeShape; }
/** * Default implementation treats passed figure as content pane. * Respects layout one may have set for generated figure. * @param nodeShape instance of generated figure class * @generated */
Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure
setupContentPane
{ "repo_name": "chanakaudaya/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/parts/CloudConnectorOperationInputConnectorEditPart.java", "license": "apache-2.0", "size": 12177 }
[ "org.eclipse.draw2d.IFigure" ]
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
1,199,478
public static boolean isCase(Number caseValue, Number switchValue) { return NumberMath.compareTo(caseValue, switchValue) == 0; }
static boolean function(Number caseValue, Number switchValue) { return NumberMath.compareTo(caseValue, switchValue) == 0; }
/** * Special 'case' implementation for all numbers, which delegates to the * <code>compareTo()</code> method for comparing numbers of different * types. * * @param caseValue the case value * @param switchValue the switch value * @return true if the numbers are deemed equal * @...
Special 'case' implementation for all numbers, which delegates to the <code>compareTo()</code> method for comparing numbers of different types
isCase
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 703151 }
[ "org.codehaus.groovy.runtime.typehandling.NumberMath" ]
import org.codehaus.groovy.runtime.typehandling.NumberMath;
import org.codehaus.groovy.runtime.typehandling.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
2,620,467
@Override public String getFilterStringAllRecords() { // This is a bit of a hack - unfortunately the NamespaceContext class is // unsuitable here // as it contains no methods to iterate the contained list of // Namespaces HashMap<String, String> namespaces = new HashMap<>...
String function() { HashMap<String, String> namespaces = new HashMap<>(); namespaces.put(STR, "http: return this.generateFilter(this.generateFilterFragment(), namespaces); }
/** * Returns an ogc:filter fragment that will fetch all WFS, WMS and WCS records from a CSW. * * @return the filter string all records */
Returns an ogc:filter fragment that will fetch all WFS, WMS and WCS records from a CSW
getFilterStringAllRecords
{ "repo_name": "joshvote/portal-core", "path": "src/main/java/org/auscope/portal/core/services/methodmakers/filter/csw/CSWGetDataRecordsFilter.java", "license": "gpl-3.0", "size": 20971 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
623,916
LOG.info("Initializing Akka system..."); akka = ActorSystem.create(EPS, context.getConfig()); LOG.info("Initializing Akka EPS actor..."); opsActor = akka.actorOf(Props.create(new OperationsServerActor.ActorCreator(context)).withDispatcher(CORE_DISPATCHER_NAME), EPS); LOG.info("Lookup pla...
LOG.info(STR); akka = ActorSystem.create(EPS, context.getConfig()); LOG.info(STR); opsActor = akka.actorOf(Props.create(new OperationsServerActor.ActorCreator(context)).withDispatcher(CORE_DISPATCHER_NAME), EPS); LOG.info(STR); Set<String> platformProtocols = PlatformLookup.lookupPlatformProtocols(PlatformLookup.DEFAUL...
/** * Inits the actor system. */
Inits the actor system
initActorSystem
{ "repo_name": "Deepnekroz/kaa", "path": "server/node/src/main/java/org/kaaproject/kaa/server/operations/service/akka/DefaultAkkaService.java", "license": "apache-2.0", "size": 8360 }
[ "java.util.Set", "org.kaaproject.kaa.server.operations.service.akka.actors.core.OperationsServerActor", "org.kaaproject.kaa.server.operations.service.akka.actors.io.EncDecActor", "org.kaaproject.kaa.server.operations.service.akka.actors.supervision.SupervisionStrategyFactory", "org.kaaproject.kaa.server.syn...
import java.util.Set; import org.kaaproject.kaa.server.operations.service.akka.actors.core.OperationsServerActor; import org.kaaproject.kaa.server.operations.service.akka.actors.io.EncDecActor; import org.kaaproject.kaa.server.operations.service.akka.actors.supervision.SupervisionStrategyFactory; import org.kaaproject....
import java.util.*; import org.kaaproject.kaa.server.operations.service.akka.actors.core.*; import org.kaaproject.kaa.server.operations.service.akka.actors.io.*; import org.kaaproject.kaa.server.operations.service.akka.actors.supervision.*; import org.kaaproject.kaa.server.sync.platform.*;
[ "java.util", "org.kaaproject.kaa" ]
java.util; org.kaaproject.kaa;
999,395
@Lock(CapacityScheduler.class) private void validateExistingQueues( Map<String, CSQueue> queues, Map<String, CSQueue> newQueues) throws IOException { // check that all static queues are included in the newQueues list for (Map.Entry<String, CSQueue> e : queues.entrySet()) { if (!(e.getValue() ...
@Lock(CapacityScheduler.class) void function( Map<String, CSQueue> queues, Map<String, CSQueue> newQueues) throws IOException { for (Map.Entry<String, CSQueue> e : queues.entrySet()) { if (!(e.getValue() instanceof ReservationQueue)) { String queueName = e.getKey(); CSQueue oldQueue = e.getValue(); CSQueue newQueue = n...
/** * Ensure all existing queues are present. Queues cannot be deleted * @param queues existing queues * @param newQueues new queues */
Ensure all existing queues are present. Queues cannot be deleted
validateExistingQueues
{ "repo_name": "pkdevbox/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java", "license": "apache-2.0", "size": 71541 }
[ "java.io.IOException", "java.util.Map", "org.apache.hadoop.yarn.server.utils.Lock" ]
import java.io.IOException; import java.util.Map; import org.apache.hadoop.yarn.server.utils.Lock;
import java.io.*; import java.util.*; import org.apache.hadoop.yarn.server.utils.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,081,330
@ApiModelProperty(value = "") public Boolean isConfirmed() { return confirmed; }
@ApiModelProperty(value = "") Boolean function() { return confirmed; }
/** * Get confirmed * @return confirmed **/
Get confirmed
isConfirmed
{ "repo_name": "LogSentinel/logsentinel-java-client", "path": "src/main/java/com/logsentinel/model/UserDetails.java", "license": "mit", "size": 23771 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,731,225
public GroupedQuartetSystem execute(File[] inputFiles, Optimiser optimiser) throws IOException, OptimiserException { return this.execute(new QuartetSystemList(inputFiles), optimiser); }
GroupedQuartetSystem function(File[] inputFiles, Optimiser optimiser) throws IOException, OptimiserException { return this.execute(new QuartetSystemList(inputFiles), optimiser); }
/** * Loads Quartet Networks from file, scales them, then combines them * * @param inputFiles The files containing the data to convert to quartet networks * @param optimiser The optimiser to use for scaling the quartet networks. * @return A combination of quartet networks * @throws IOExce...
Loads Quartet Networks from file, scales them, then combines them
execute
{ "repo_name": "maplesond/spectre", "path": "qtools/src/main/java/uk/ac/uea/cmp/spectre/qtools/qmaker/QMaker.java", "license": "gpl-3.0", "size": 9190 }
[ "java.io.File", "java.io.IOException", "uk.ac.earlham.metaopt.Optimiser", "uk.ac.earlham.metaopt.OptimiserException", "uk.ac.uea.cmp.spectre.core.ds.quad.quartet.GroupedQuartetSystem", "uk.ac.uea.cmp.spectre.core.ds.quad.quartet.QuartetSystemList" ]
import java.io.File; import java.io.IOException; import uk.ac.earlham.metaopt.Optimiser; import uk.ac.earlham.metaopt.OptimiserException; import uk.ac.uea.cmp.spectre.core.ds.quad.quartet.GroupedQuartetSystem; import uk.ac.uea.cmp.spectre.core.ds.quad.quartet.QuartetSystemList;
import java.io.*; import uk.ac.earlham.metaopt.*; import uk.ac.uea.cmp.spectre.core.ds.quad.quartet.*;
[ "java.io", "uk.ac.earlham", "uk.ac.uea" ]
java.io; uk.ac.earlham; uk.ac.uea;
798
public void makeCurrent(EGLSurface drawSurface, EGLSurface readSurface) { if (mEGLDisplay == EGL14.EGL_NO_DISPLAY) { // called makeCurrent() before create? Log.d(TAG, "NOTE: makeCurrent w/o display"); } if (!EGL14.eglMakeCurrent(mEGLDisplay, drawSurface, readSurface, ...
void function(EGLSurface drawSurface, EGLSurface readSurface) { if (mEGLDisplay == EGL14.EGL_NO_DISPLAY) { Log.d(TAG, STR); } if (!EGL14.eglMakeCurrent(mEGLDisplay, drawSurface, readSurface, mEGLContext)) { throw new RuntimeException(STR); } }
/** * Makes our EGL context current, using the supplied "draw" and "read" surfaces. */
Makes our EGL context current, using the supplied "draw" and "read" surfaces
makeCurrent
{ "repo_name": "Kickflip/kickflip-android-sdk", "path": "sdk/src/main/java/io/kickflip/sdk/av/EglCore.java", "license": "apache-2.0", "size": 12802 }
[ "android.opengl.EGLSurface", "android.util.Log" ]
import android.opengl.EGLSurface; import android.util.Log;
import android.opengl.*; import android.util.*;
[ "android.opengl", "android.util" ]
android.opengl; android.util;
2,844,281
protected boolean isDone(Exchange exchange) { ExtendedExchange ee = (ExtendedExchange) exchange; if (ee.isInterrupted()) { // mark the exchange to stop continue routing when interrupted // as we do not want to continue routing (for example a task has been cancelled) ...
boolean function(Exchange exchange) { ExtendedExchange ee = (ExtendedExchange) exchange; if (ee.isInterrupted()) { if (LOG.isTraceEnabled()) { LOG.trace(STR, exchange.getExchangeId()); } exchange.setRouteStop(true); return true; } boolean answer = exchange.getException() == null ExchangeHelper.isFailureHandled(exchange...
/** * Strategy to determine if the exchange is done so we can continue */
Strategy to determine if the exchange is done so we can continue
isDone
{ "repo_name": "christophd/camel", "path": "core/camel-core-processor/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java", "license": "apache-2.0", "size": 77071 }
[ "org.apache.camel.Exchange", "org.apache.camel.ExtendedExchange", "org.apache.camel.support.ExchangeHelper" ]
import org.apache.camel.Exchange; import org.apache.camel.ExtendedExchange; import org.apache.camel.support.ExchangeHelper;
import org.apache.camel.*; import org.apache.camel.support.*;
[ "org.apache.camel" ]
org.apache.camel;
1,183,001
private ProvisioningAttributeDto getProvisioningAttribute(String name) { // load attribute mapping is not needed now - name is the same on both (tree) sides return new ProvisioningAttributeDto(getHelper().getSchemaColumnName(name), AttributeMappingStrategyType.SET); }
ProvisioningAttributeDto function(String name) { return new ProvisioningAttributeDto(getHelper().getSchemaColumnName(name), AttributeMappingStrategyType.SET); }
/** * Return provisioning attribute by default mapping and strategy * * @return */
Return provisioning attribute by default mapping and strategy
getProvisioningAttribute
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/acc/src/test/java/eu/bcvsolutions/idm/acc/service/impl/DefaultProvisioningExecutorIntegrationTest.java", "license": "mit", "size": 53906 }
[ "eu.bcvsolutions.idm.acc.domain.AttributeMappingStrategyType", "eu.bcvsolutions.idm.acc.dto.ProvisioningAttributeDto" ]
import eu.bcvsolutions.idm.acc.domain.AttributeMappingStrategyType; import eu.bcvsolutions.idm.acc.dto.ProvisioningAttributeDto;
import eu.bcvsolutions.idm.acc.domain.*; import eu.bcvsolutions.idm.acc.dto.*;
[ "eu.bcvsolutions.idm" ]
eu.bcvsolutions.idm;
2,484,704
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN, defaultValue = "False") @SimpleProperty(userVisible = false) public void HTMLFormat(boolean fmt) { htmlFormat = fmt; if (htmlFormat) { String txt = TextViewUtil.getText(view); TextViewUtil.setTextHTML(view, txt);...
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN, defaultValue = "False") @SimpleProperty(userVisible = false) void function(boolean fmt) { htmlFormat = fmt; if (htmlFormat) { String txt = TextViewUtil.getText(view); TextViewUtil.setTextHTML(view, txt); } else { String txt = TextViewUtil.getTe...
/** * Specifies the label's text's format * * @return {@code true} indicates that the label format is html text * {@code false} lines that the label format is plain text */
Specifies the label's text's format
HTMLFormat
{ "repo_name": "themadrobot/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Label.java", "license": "apache-2.0", "size": 13724 }
[ "com.google.appinventor.components.annotations.DesignerProperty", "com.google.appinventor.components.annotations.SimpleProperty", "com.google.appinventor.components.common.PropertyTypeConstants", "com.google.appinventor.components.runtime.util.TextViewUtil" ]
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.annotations.SimpleProperty; import com.google.appinventor.components.common.PropertyTypeConstants; import com.google.appinventor.components.runtime.util.TextViewUtil;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*; import com.google.appinventor.components.runtime.util.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,764,164
if(user == null) return Response.noContent().build(); User u = adapter.getUser(user.getUsername()); if( u !=null && u.getUsername().equals(user.getUsername()) && u.getPassword() != null && u.getPassword().equals(user.getPassword()) ){ long as = new SecureRandom().nextLong(); u.setAccessToken(u.g...
if(user == null) return Response.noContent().build(); User u = adapter.getUser(user.getUsername()); if( u !=null && u.getUsername().equals(user.getUsername()) && u.getPassword() != null && u.getPassword().equals(user.getPassword()) ){ long as = new SecureRandom().nextLong(); u.setAccessToken(u.getUsername()+":"+as+":"+...
/** * get access token to access applications' api, as a session token * * @param user * @return */
get access token to access applications' api, as a session token
login
{ "repo_name": "keme686/LifeCoachService", "path": "it.unitn.lifecoach.service.process.authentication/src/it/unitn/lifecoach/service/process/authentication/UserAuthenticationResource.java", "license": "gpl-2.0", "size": 2878 }
[ "it.unitn.lifecoach.model.User", "java.security.SecureRandom", "java.util.Date", "javax.ws.rs.core.Response" ]
import it.unitn.lifecoach.model.User; import java.security.SecureRandom; import java.util.Date; import javax.ws.rs.core.Response;
import it.unitn.lifecoach.model.*; import java.security.*; import java.util.*; import javax.ws.rs.core.*;
[ "it.unitn.lifecoach", "java.security", "java.util", "javax.ws" ]
it.unitn.lifecoach; java.security; java.util; javax.ws;
1,155,313
// TODO: derive options from annotations (per-class or per-method) // options: read parameter type mapping (long/native long), // method name, library name, call conv public static void register(Class cls, NativeLibrary lib) { Method[] methods = cls.getDeclaredMethods(); List mlist = new...
static void function(Class cls, NativeLibrary lib) { Method[] methods = cls.getDeclaredMethods(); List mlist = new ArrayList(); TypeMapper mapper = (TypeMapper) lib.getOptions().get(Library.OPTION_TYPE_MAPPER); for (int i=0;i < methods.length;i++) { if ((methods[i].getModifiers() & Modifier.NATIVE) != 0) { mlist.add(me...
/** When called from a class static initializer, maps all native methods * found within that class to native libraries via the JNA raw calling * interface. * @param lib library to which functions should be bound */
When called from a class static initializer, maps all native methods found within that class to native libraries via the JNA raw calling interface
register
{ "repo_name": "jenkinsci/jna", "path": "src/com/sun/jna/Native.java", "license": "lgpl-2.1", "size": 67817 }
[ "com.sun.jna.Structure", "java.lang.reflect.Method", "java.lang.reflect.Modifier", "java.util.ArrayList", "java.util.List" ]
import com.sun.jna.Structure; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List;
import com.sun.jna.*; import java.lang.reflect.*; import java.util.*;
[ "com.sun.jna", "java.lang", "java.util" ]
com.sun.jna; java.lang; java.util;
2,327,638
@Test public void execGetGroupCommand() throws Exception { String result = ShellUtils.execCommand(ShellUtils.getGroupsForUserCommand("root")); // On Linux user "root" will be a part of the group "root". On OSX it will be a part of "admin". assertTrue(result.contains("root") || result.contains("admin"));...
void function() throws Exception { String result = ShellUtils.execCommand(ShellUtils.getGroupsForUserCommand("root")); assertTrue(result.contains("root") result.contains("admin")); }
/** * Tests the {@link ShellUtils#execCommand(String...)} method for a group of commands. * * @throws Throwable when the execution of the commands fails */
Tests the <code>ShellUtils#execCommand(String...)</code> method for a group of commands
execGetGroupCommand
{ "repo_name": "wwjiang007/alluxio", "path": "core/common/src/test/java/alluxio/util/ShellUtilsTest.java", "license": "apache-2.0", "size": 4779 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,401,173
public synchronized boolean removeAll(RangeSet that) { boolean modified = false; List<Range> sub = new ArrayList<>(); int lhs=0,rhs=0; while(lhs<this.ranges.size() && rhs<that.ranges.size()) { Range lr = this.ranges.get(lhs); Range...
synchronized boolean function(RangeSet that) { boolean modified = false; List<Range> sub = new ArrayList<>(); int lhs=0,rhs=0; while(lhs<this.ranges.size() && rhs<that.ranges.size()) { Range lr = this.ranges.get(lhs); Range rr = that.ranges.get(rhs); if(lr.end<=rr.start) { sub.add(lr); lhs++; continue; } if(rr.end<=lr....
/** * Updates this range set by removing all the values in the given range set. * * @return true if this range set was modified as a result. */
Updates this range set by removing all the values in the given range set
removeAll
{ "repo_name": "DanielWeber/jenkins", "path": "core/src/main/java/hudson/model/Fingerprint.java", "license": "mit", "size": 51963 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
717,411
public static String toLanguageTag(Locale locale) { return locale.getLanguage() + (hasText(locale.getCountry()) ? "-" + locale.getCountry() : ""); } //--------------------------------------------------------------------- // Convenience methods for working with String arrays //--------------------------------...
static String function(Locale locale) { return locale.getLanguage() + (hasText(locale.getCountry()) ? "-" + locale.getCountry() : ""); }
/** * Determine the RFC 3066 compliant language tag, * as used for the HTTP "Accept-Language" header. * @param locale the Locale to transform to a language tag * @return the RFC 3066 compliant language tag as String */
Determine the RFC 3066 compliant language tag, as used for the HTTP "Accept-Language" header
toLanguageTag
{ "repo_name": "jivesoftware/robot-intellij-plugin", "path": "src/main/java/org/robotframework/javalib/util/StringUtils.java", "license": "apache-2.0", "size": 27892 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
373,797
@NonNull IFuzzyValue<?> apply( @NonNull final String p_name, @NonNull final Number p_number );
IFuzzyValue<?> apply( @NonNull final String p_name, @NonNull final Number p_number );
/** * returns a fuzzy value by name and value * * @param p_name name * @param p_number value * @return fuzzy value */
returns a fuzzy value by name and value
apply
{ "repo_name": "flashpixx/Light-Jason", "path": "src/main/java/org/lightjason/agentspeak/language/fuzzy/set/IFuzzySet.java", "license": "lgpl-3.0", "size": 2744 }
[ "edu.umd.cs.findbugs.annotations.NonNull", "org.lightjason.agentspeak.language.fuzzy.IFuzzyValue" ]
import edu.umd.cs.findbugs.annotations.NonNull; import org.lightjason.agentspeak.language.fuzzy.IFuzzyValue;
import edu.umd.cs.findbugs.annotations.*; import org.lightjason.agentspeak.language.fuzzy.*;
[ "edu.umd.cs", "org.lightjason.agentspeak" ]
edu.umd.cs; org.lightjason.agentspeak;
236,905
@Test public void testPostWithAppId() { mockFlowService.applyFlowRules(anyObject()); expectLastCall(); replay(mockFlowService); WebTarget wt = target(); InputStream jsonStream = FlowsResourceTest.class .getResourceAsStream("post-flow.json"); Resp...
void function() { mockFlowService.applyFlowRules(anyObject()); expectLastCall(); replay(mockFlowService); WebTarget wt = target(); InputStream jsonStream = FlowsResourceTest.class .getResourceAsStream(STR); Response response = wt.path(STR) .queryParam("appId", STR) .request(MediaType.APPLICATION_JSON_TYPE) .post(Entity...
/** * Tests creating a flow with POST while specifying application identifier. */
Tests creating a flow with POST while specifying application identifier
testPostWithAppId
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "web/api/src/test/java/org/onosproject/rest/resources/FlowsResourceTest.java", "license": "apache-2.0", "size": 30627 }
[ "java.io.InputStream", "java.net.HttpURLConnection", "javax.ws.rs.client.Entity", "javax.ws.rs.client.WebTarget", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.easymock.EasyMock", "org.hamcrest.Matchers", "org.junit.Assert" ]
import java.io.InputStream; import java.net.HttpURLConnection; import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.easymock.EasyMock; import org.hamcrest.Matchers; import org.junit.Assert;
import java.io.*; import java.net.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; import org.easymock.*; import org.hamcrest.*; import org.junit.*;
[ "java.io", "java.net", "javax.ws", "org.easymock", "org.hamcrest", "org.junit" ]
java.io; java.net; javax.ws; org.easymock; org.hamcrest; org.junit;
2,715,887
public static Object invokeExactMethod(Object object, String methodName, Object[] args, Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (args == null) { args = ArrayUtils.EMPTY_OBJECT_ARRAY; ...
static Object function(Object object, String methodName, Object[] args, Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (args == null) { args = ArrayUtils.EMPTY_OBJECT_ARRAY; } if (parameterTypes == null) { parameterTypes = ArrayUtils.EMPTY_CLASS_ARRAY; } ...
/** * <p>Invokes a method whose parameter types match exactly the parameter * types given.</p> * * <p>This uses reflection to invoke the method obtained from a call to * <code>getAccessibleMethod()</code>.</p> * * @param object invoke method on this object * @param methodName get...
Invokes a method whose parameter types match exactly the parameter types given. This uses reflection to invoke the method obtained from a call to <code>getAccessibleMethod()</code>
invokeExactMethod
{ "repo_name": "dpisarewski/gka_wise12", "path": "src/org/apache/commons/lang3/reflect/MethodUtils.java", "license": "lgpl-2.1", "size": 23082 }
[ "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "org.apache.commons.lang3.ArrayUtils" ]
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.apache.commons.lang3.ArrayUtils;
import java.lang.reflect.*; import org.apache.commons.lang3.*;
[ "java.lang", "org.apache.commons" ]
java.lang; org.apache.commons;
538,670
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<RedisResourceInner> createAsync( String resourceGroupName, String name, RedisCreateParameters parameters) { return beginCreateAsync(resourceGroupName, name, parameters) .last() .flatMap(this.client::getLroFinalResult...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<RedisResourceInner> function( String resourceGroupName, String name, RedisCreateParameters parameters) { return beginCreateAsync(resourceGroupName, name, parameters) .last() .flatMap(this.client::getLroFinalResultOrError); }
/** * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param parameters Parameters supplied to the Create Redis operation. * @throws IllegalArg...
Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache
createAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisClientImpl.java", "license": "mit", "size": 145842 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.redis.fluent.models.RedisResourceInner", "com.azure.resourcemanager.redis.models.RedisCreateParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.redis.fluent.models.RedisResourceInner; import com.azure.resourcemanager.redis.models.RedisCreateParameters;
import com.azure.core.annotation.*; import com.azure.resourcemanager.redis.fluent.models.*; import com.azure.resourcemanager.redis.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,445,547