method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public URLConnection getConnection() { return connection; }
URLConnection function() { return connection; }
/** * Returns connection. * * @return connection. */
Returns connection
getConnection
{ "repo_name": "pitosalas/blogbridge", "path": "src/com/salas/bb/utils/net/URLConnectionHolder.java", "license": "gpl-2.0", "size": 2428 }
[ "java.net.URLConnection" ]
import java.net.URLConnection;
import java.net.*;
[ "java.net" ]
java.net;
1,436,385
public static void checkHasNoNullElements (final Object[] array, final String arrayName) { if (array != null && Arrays.asList (array).contains (null)) { illegalArgument (arrayName, ArgumentStatus.NULL_ELEMENTS); } }
static void function (final Object[] array, final String arrayName) { if (array != null && Arrays.asList (array).contains (null)) { illegalArgument (arrayName, ArgumentStatus.NULL_ELEMENTS); } }
/** * Checks if the specified Object array has any null elements. The check will pass if the Object array itself is null. * * @param array * The Object array to check, may be null. * @param arrayName * The name of the array to check, must not be null. * * @throws IllegalArgumen...
Checks if the specified Object array has any null elements. The check will pass if the Object array itself is null
checkHasNoNullElements
{ "repo_name": "forerunnergames/fg-tools", "path": "common/src/main/java/com/forerunnergames/tools/common/Arguments.java", "license": "mit", "size": 54025 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
575,934
protected void initializeEditingDomain() { // Create an adapter factory that yields item providers. // adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); adapterFactory.addAdapterFact...
void function() { adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new DimensiontypesItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new IdentifierItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new NamedelementItemProviderAdapt...
/** * This sets up the editing domain for the model editor. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This sets up the editing domain for the model editor.
initializeEditingDomain
{ "repo_name": "KAMP-Research/KAMP", "path": "bundles/Toometa/de.uka.ipd.sdq.dsexplore.qml.dimensiontypes.editor/src/de/uka/ipd/sdq/dsexplore/qml/dimensiontypes/presentation/DimensiontypesEditor.java", "license": "apache-2.0", "size": 54663 }
[ "de.uka.ipd.sdq.dsexplore.qml.dimensiontypes.provider.DimensiontypesItemProviderAdapterFactory", "de.uka.ipd.sdq.identifier.provider.IdentifierItemProviderAdapterFactory", "org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory", "org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterF...
import de.uka.ipd.sdq.dsexplore.qml.dimensiontypes.provider.DimensiontypesItemProviderAdapterFactory; import de.uka.ipd.sdq.identifier.provider.IdentifierItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.resource.ResourceItemProvi...
import de.uka.ipd.sdq.dsexplore.qml.dimensiontypes.provider.*; import de.uka.ipd.sdq.identifier.provider.*; import org.eclipse.emf.edit.provider.*; import org.eclipse.emf.edit.provider.resource.*;
[ "de.uka.ipd", "org.eclipse.emf" ]
de.uka.ipd; org.eclipse.emf;
476,802
public void warn(String msg, Throwable t) { log(Log.WARN, msg, t); }
void function(String msg, Throwable t) { log(Log.WARN, msg, t); }
/** * Log an exception (throwable) at the WARN level with an accompanying * message. * * @param msg * the message accompanying the exception * @param t * the exception (throwable) to log */
Log an exception (throwable) at the WARN level with an accompanying message
warn
{ "repo_name": "tjth/bitcoinj-lotterycoin", "path": "slf4j-1.7.16/slf4j-android/src/main/java/org/slf4j/impl/AndroidLoggerAdapter.java", "license": "apache-2.0", "size": 16947 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,343,061
private static BufferedImage[] getCategory(ResourceLocator rl, String name) { return new BufferedImage[] { rl.getImage(name), rl.getImage(name + "_selected") }; }
static BufferedImage[] function(ResourceLocator rl, String name) { return new BufferedImage[] { rl.getImage(name), rl.getImage(name + STR) }; }
/** * Get a two phase button image (with and without _selected). * @param rl the resource locator * @param name the button name * @return the array cointaining the normal and the pressed state */
Get a two phase button image (with and without _selected)
getCategory
{ "repo_name": "p-smith/open-ig", "path": "src/hu/openig/gfx/GFXLoader.java", "license": "lgpl-3.0", "size": 3740 }
[ "hu.openig.model.ResourceLocator", "java.awt.image.BufferedImage" ]
import hu.openig.model.ResourceLocator; import java.awt.image.BufferedImage;
import hu.openig.model.*; import java.awt.image.*;
[ "hu.openig.model", "java.awt" ]
hu.openig.model; java.awt;
67,140
public void handleException(Throwable exc) { viewer.setStatus(false); String s = "Data Retrieval Failure: "; LogMessage msg = new LogMessage(); msg.print(s); msg.print(exc); registry.getLogger().error(this, msg); registry.getUserNotifier().notifyError("Data Ret...
void function(Throwable exc) { viewer.setStatus(false); String s = STR; LogMessage msg = new LogMessage(); msg.print(s); msg.print(exc); registry.getLogger().error(this, msg); registry.getUserNotifier().notifyError(STR, s, exc); }
/** * Notifies the user that an error has occurred and discards the * {@link #viewer}. * @see DSCallAdapter#handleException(Throwable) */
Notifies the user that an error has occurred and discards the <code>#viewer</code>
handleException
{ "repo_name": "hflynn/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/EditorLoader.java", "license": "gpl-2.0", "size": 6114 }
[ "org.openmicroscopy.shoola.env.log.LogMessage" ]
import org.openmicroscopy.shoola.env.log.LogMessage;
import org.openmicroscopy.shoola.env.log.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
1,506,139
public void testUniqueLevelName( ) throws Exception { openLibrary( "ReportDesignHandleTest_UniqueLevelName.xml" );//$NON-NLS-1$ // hierarchy is in tree. // in this case name change in level CubeHandle cubeHandle = (CubeHandle) libraryHandle.getCubes( ).get( 0 ); DimensionHandle dimensionHandle = cubeHa...
void function( ) throws Exception { openLibrary( STR ); CubeHandle cubeHandle = (CubeHandle) libraryHandle.getCubes( ).get( 0 ); DimensionHandle dimensionHandle = cubeHandle.getDimension( "Group" ); HierarchyHandle hierarchyHandle = (HierarchyHandle) dimensionHandle .getListProperty( DimensionHandle.HIERARCHIES_PROP )....
/** * Test rename( Object , DesignElementHandle ) method Test cases: * * <ul> * <li>level in hierarchy * </ul> * * @throws Exception */
Test rename( Object , DesignElementHandle ) method Test cases: level in hierarchy
testUniqueLevelName
{ "repo_name": "Charling-Huang/birt", "path": "model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/ReportDesignHandleTest.java", "license": "epl-1.0", "size": 48401 }
[ "org.eclipse.birt.report.model.api.olap.CubeHandle", "org.eclipse.birt.report.model.api.olap.DimensionHandle", "org.eclipse.birt.report.model.api.olap.HierarchyHandle", "org.eclipse.birt.report.model.api.olap.LevelHandle", "org.eclipse.birt.report.model.core.ContainerSlot", "org.eclipse.birt.report.model....
import org.eclipse.birt.report.model.api.olap.CubeHandle; import org.eclipse.birt.report.model.api.olap.DimensionHandle; import org.eclipse.birt.report.model.api.olap.HierarchyHandle; import org.eclipse.birt.report.model.api.olap.LevelHandle; import org.eclipse.birt.report.model.core.ContainerSlot; import org.eclipse.b...
import org.eclipse.birt.report.model.api.olap.*; import org.eclipse.birt.report.model.core.*; import org.eclipse.birt.report.model.elements.*; import org.eclipse.birt.report.model.elements.olap.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
1,260,699
private static SearchResults doUnfilteredSearch(SearchTarget target, SearchRepository userRepo) { LOG.info("unfiltered search"); Map<String, WebSearchable> wsMap = new HashMap<String, WebSearchable>(); Map<WebSearchable, Float> hitMap = new HashMap<WebSearchable, Float>(); Map<We...
static SearchResults function(SearchTarget target, SearchRepository userRepo) { LOG.info(STR); Map<String, WebSearchable> wsMap = new HashMap<String, WebSearchable>(); Map<WebSearchable, Float> hitMap = new HashMap<WebSearchable, Float>(); Map<WebSearchable, String> descs = new HashMap<WebSearchable, String>(); Map<Web...
/** * Return all the available objects in the requested scope in a set of search results. * @param target a parameter object containing information about the scope of the search. * @param userRepo The current user's search repository. * @return A set of search results. */
Return all the available objects in the requested scope in a set of search results
doUnfilteredSearch
{ "repo_name": "joshkh/intermine", "path": "intermine/api/main/src/org/intermine/api/search/SearchResults.java", "license": "lgpl-2.1", "size": 15662 }
[ "java.util.HashMap", "java.util.HashSet", "java.util.Map", "java.util.Set", "org.intermine.api.profile.TagManager", "org.intermine.api.profile.TagManagerFactory" ]
import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.intermine.api.profile.TagManager; import org.intermine.api.profile.TagManagerFactory;
import java.util.*; import org.intermine.api.profile.*;
[ "java.util", "org.intermine.api" ]
java.util; org.intermine.api;
892,452
public static Date max(Date d1, Date d2) { if (d1 == null && d2 == null) return null; if (d1 == null) return d2; if (d2 == null) return d1; return (d1.after(d2)) ? d1 : d2; }
static Date function(Date d1, Date d2) { if (d1 == null && d2 == null) return null; if (d1 == null) return d2; if (d2 == null) return d1; return (d1.after(d2)) ? d1 : d2; }
/** * Returns the maximum of two dates. A null date is treated as being less * than any non-null date. */
Returns the maximum of two dates. A null date is treated as being less than any non-null date
max
{ "repo_name": "XueBaoPeng/ningxiaVideo", "path": "app/src/main/java/org/sunger/net/util/DateUtils.java", "license": "apache-2.0", "size": 11746 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,514,397
public void executeDeleteEventsCommand(List<Event> events) { CompoundCommand cc = new CompoundCommand(); for (Event e : events) { Command c = new DeleteWidgetEventCommand(widget, e); cc.add(c); } CommandStack cs = getCommandStack(); cs.execute(cc); }
void function(List<Event> events) { CompoundCommand cc = new CompoundCommand(); for (Event e : events) { Command c = new DeleteWidgetEventCommand(widget, e); cc.add(c); } CommandStack cs = getCommandStack(); cs.execute(cc); }
/** * Executes the delete widget event command. * * @param events * The events to delete */
Executes the delete widget event command
executeDeleteEventsCommand
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/page/ui/com.odcgroup.page.ui/src/main/java/com/odcgroup/page/ui/properties/sections/EventSection.java", "license": "epl-1.0", "size": 18159 }
[ "com.odcgroup.page.model.Event", "com.odcgroup.page.ui.command.DeleteWidgetEventCommand", "java.util.List", "org.eclipse.gef.commands.Command", "org.eclipse.gef.commands.CommandStack", "org.eclipse.gef.commands.CompoundCommand" ]
import com.odcgroup.page.model.Event; import com.odcgroup.page.ui.command.DeleteWidgetEventCommand; import java.util.List; import org.eclipse.gef.commands.Command; import org.eclipse.gef.commands.CommandStack; import org.eclipse.gef.commands.CompoundCommand;
import com.odcgroup.page.model.*; import com.odcgroup.page.ui.command.*; import java.util.*; import org.eclipse.gef.commands.*;
[ "com.odcgroup.page", "java.util", "org.eclipse.gef" ]
com.odcgroup.page; java.util; org.eclipse.gef;
2,487,182
String url; RESTResponse restResponse; url= GeneralSettings.getXCodeBaseURL()+"bots"; try { HashMap<String,String> headers=new HashMap<String,String>(); headers.put("Authorization",TokenDAO.buildHttpAuthString(login,password)); restResponse = RESTClient.send...
String url; RESTResponse restResponse; url= GeneralSettings.getXCodeBaseURL()+"bots"; try { HashMap<String,String> headers=new HashMap<String,String>(); headers.put(STR,TokenDAO.buildHttpAuthString(login,password)); restResponse = RESTClient.sendHttpRequest(HTTPMethod.GET, url, headers, null); return (1==restResponse.g...
/** * Check if login/password are valid * @param login User login * @param password user password * @return true if login/password is valid, otherwise false. */
Check if login/password are valid
checkAuth
{ "repo_name": "DLTAStudio/xwebic", "path": "src/ServerWS/src/main/java/com/dltastudio/ws/TokenWS.java", "license": "apache-2.0", "size": 4815 }
[ "com.dltastudio.model.TokenDAO", "com.dltastudio.services.GeneralSettings", "com.dltastudio.services.HTTPMethod", "com.dltastudio.services.RESTClient", "com.dltastudio.services.RESTResponse", "java.util.HashMap" ]
import com.dltastudio.model.TokenDAO; import com.dltastudio.services.GeneralSettings; import com.dltastudio.services.HTTPMethod; import com.dltastudio.services.RESTClient; import com.dltastudio.services.RESTResponse; import java.util.HashMap;
import com.dltastudio.model.*; import com.dltastudio.services.*; import java.util.*;
[ "com.dltastudio.model", "com.dltastudio.services", "java.util" ]
com.dltastudio.model; com.dltastudio.services; java.util;
2,071,796
EAttribute getPlugin_Version();
EAttribute getPlugin_Version();
/** * Returns the meta object for the attribute '{@link org.dresdenocl.examples.pml.Plugin#getVersion <em>Version</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Version</em>'. * @see org.dresdenocl.examples.pml.Plugin#getVersion() * @see #get...
Returns the meta object for the attribute '<code>org.dresdenocl.examples.pml.Plugin#getVersion Version</code>'.
getPlugin_Version
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.examples.pml/src/org/dresdenocl/examples/pml/PmlPackage.java", "license": "lgpl-3.0", "size": 38372 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,463,988
public void report(String msg, Entity attachment, OperatorStack scope, ReportPoster poster) { String logOut = msg; if (poster == null){ throw new IllegalArgumentException("poster must not be null"); } if(scope == null) { throw new IllegalArgumentException("scope must not be null"); } logOut += ...
void function(String msg, Entity attachment, OperatorStack scope, ReportPoster poster) { String logOut = msg; if (poster == null){ throw new IllegalArgumentException(STR); } if(scope == null) { throw new IllegalArgumentException(STR); } logOut += STR + poster.getPosterName(); LOG.info(STR + logOut); ReportEntry entry =...
/** * Writes a report entry with the given message and attachment of the given poster * to the Angerona Report-System. A copy of the attachment is saved in the report * system. * @param msg String representing the message. * @param attachment A reference to the attachment which has to be an entity like * ...
Writes a report entry with the given message and attachment of the given poster to the Angerona Report-System. A copy of the attachment is saved in the report system
report
{ "repo_name": "Angerona/angerona-framework", "path": "fw/src/main/java/com/github/angerona/fw/Angerona.java", "license": "gpl-3.0", "size": 11310 }
[ "com.github.angerona.fw.internal.Entity", "com.github.angerona.fw.operators.OperatorStack", "com.github.angerona.fw.report.ReportEntry", "com.github.angerona.fw.report.ReportListener", "com.github.angerona.fw.report.ReportPoster" ]
import com.github.angerona.fw.internal.Entity; import com.github.angerona.fw.operators.OperatorStack; import com.github.angerona.fw.report.ReportEntry; import com.github.angerona.fw.report.ReportListener; import com.github.angerona.fw.report.ReportPoster;
import com.github.angerona.fw.internal.*; import com.github.angerona.fw.operators.*; import com.github.angerona.fw.report.*;
[ "com.github.angerona" ]
com.github.angerona;
1,400,050
public Adapter createBusinessComponentAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link iso20022.BusinessComponent <em>Business Component</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- ...
Creates a new adapter for an object of class '<code>iso20022.BusinessComponent Business Component</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createBusinessComponentAdapter
{ "repo_name": "ISO20022ArchitectForum/sample-code-public", "path": "DLT/Corda/ISO20022Generated/src/iso20022/util/Iso20022AdapterFactory.java", "license": "apache-2.0", "size": 55827 }
[ "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;
781,700
public Vector getSchemaLocations(String oaiIdentifier) throws IdDoesNotExistException, NoMetadataFormatsException, OAIInternalServerError { Vector result = new Vector(); NodeList nodeList = null; try { nodeList = getIdentifierRecords(sruURL, oaiIdentifier, (String...
Vector function(String oaiIdentifier) throws IdDoesNotExistException, NoMetadataFormatsException, OAIInternalServerError { Vector result = new Vector(); NodeList nodeList = null; try { nodeList = getIdentifierRecords(sruURL, oaiIdentifier, (String) null); } catch (Throwable e) { throw new OAIInternalServerError(STR); }...
/** * get an Iterator containing Map.Entrys where key=metadataPrefix * and value=schema. */
get an Iterator containing Map.Entrys where key=metadataPrefix and value=schema
getSchemaLocations
{ "repo_name": "openpreserve/oaicat", "path": "src/main/java/ORG/oclc/oai/server/catalog/XerSRUOAICatalog.java", "license": "apache-2.0", "size": 35096 }
[ "java.io.IOException", "java.util.Vector", "javax.xml.parsers.ParserConfigurationException", "javax.xml.transform.TransformerException", "org.w3c.dom.NodeList", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.util.Vector; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import org.w3c.dom.NodeList; import org.xml.sax.SAXException;
import java.io.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.transform.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "java.util", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; java.util; javax.xml; org.w3c.dom; org.xml.sax;
727,695
public Map<String, String> getZuulRequestHeaders() { if (get("zuulRequestHeaders") == null) { HashMap<String, String> zuulRequestHeaders = new HashMap<String, String>(); putIfAbsent("zuulRequestHeaders", zuulRequestHeaders); } return (Map<String, String>) get("zuulReq...
Map<String, String> function() { if (get(STR) == null) { HashMap<String, String> zuulRequestHeaders = new HashMap<String, String>(); putIfAbsent(STR, zuulRequestHeaders); } return (Map<String, String>) get(STR); }
/** * return the list of requestHeaders to be sent to the origin * * @return the list of requestHeaders to be sent to the origin */
return the list of requestHeaders to be sent to the origin
getZuulRequestHeaders
{ "repo_name": "jaume-pinyol/zuul", "path": "zuul-core/src/main/java/com/netflix/zuul/context/RequestContext.java", "license": "apache-2.0", "size": 19433 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,929,983
public void testSControlTemplate() { final TemplateRegistry templateRegistry = IdeTestUtil.getTemplateRegistry(); // There should be 1 scontrol templates. assertEquals(Constants.SCONTROL+ " template count should be " + NUM_OF_SCONTROL_TEMPLATES, NUM_OF_SCONTROL_TEMPLATES, templat...
void function() { final TemplateRegistry templateRegistry = IdeTestUtil.getTemplateRegistry(); assertEquals(Constants.SCONTROL+ STR + NUM_OF_SCONTROL_TEMPLATES, NUM_OF_SCONTROL_TEMPLATES, templateRegistry.componentTemplateCount(Constants.SCONTROL)); final String sControlStartsWith = STR; final String sControlTemplate =...
/** * Test for all the apex scontrol templates. starting prefix. number of scontrol templates etc. */
Test for all the apex scontrol templates. starting prefix. number of scontrol templates etc
testSControlTemplate
{ "repo_name": "PatrickSHYee/idecore", "path": "com.salesforce.ide.core.test/src/com/salesforce/ide/core/internal/templates/TemplateRegistryTest_unit.java", "license": "epl-1.0", "size": 6629 }
[ "com.salesforce.ide.core.internal.utils.Constants", "com.salesforce.ide.test.common.utils.IdeTestUtil" ]
import com.salesforce.ide.core.internal.utils.Constants; import com.salesforce.ide.test.common.utils.IdeTestUtil;
import com.salesforce.ide.core.internal.utils.*; import com.salesforce.ide.test.common.utils.*;
[ "com.salesforce.ide" ]
com.salesforce.ide;
116,063
@Nullable public Rational divide(@Nullable BigInteger value) { if (value == null) { return null; } if (isNaN()) { return NaN; } if (value.signum() == 0) { if (signum() == 0) { return NaN; } return signum() > 0 ? POSITIVE_INFINITY : NEGATIVE_INFINITY; } if (signum() == 0 || isInfin...
Rational function(@Nullable BigInteger value) { if (value == null) { return null; } if (isNaN()) { return NaN; } if (value.signum() == 0) { if (signum() == 0) { return NaN; } return signum() > 0 ? POSITIVE_INFINITY : NEGATIVE_INFINITY; } if (signum() == 0 isInfinite() BigInteger.ONE.equals(value.abs())) { return value....
/** * Returns a {@link Rational} whose value is {@code (this / value)}. * * @param value the value by which this {@link Rational} is to be divided. * @return The division result. */
Returns a <code>Rational</code> whose value is (this / value)
divide
{ "repo_name": "UniversalMediaServer/UniversalMediaServer", "path": "src/main/java/net/pms/util/Rational.java", "license": "gpl-2.0", "size": 72265 }
[ "java.math.BigInteger", "javax.annotation.Nullable" ]
import java.math.BigInteger; import javax.annotation.Nullable;
import java.math.*; import javax.annotation.*;
[ "java.math", "javax.annotation" ]
java.math; javax.annotation;
1,369,428
public static String joinPath(String... components) { StringBuilder buf = new StringBuilder(); for (String s : components) { if (s.length()==0) continue; if (buf.length()>0) { if (buf.charAt(buf.length()-1)!='/') buf.append('/'); ...
static String function(String... components) { StringBuilder buf = new StringBuilder(); for (String s : components) { if (s.length()==0) continue; if (buf.length()>0) { if (buf.charAt(buf.length()-1)!='/') buf.append('/'); if (s.charAt(0)=='/') s=s.substring(1); } buf.append(s); } return buf.toString(); } /** * Compute...
/** * Combine path components via '/' while handling leading/trailing '/' to avoid duplicates. */
Combine path components via '/' while handling leading/trailing '/' to avoid duplicates
joinPath
{ "repo_name": "petermarcoen/jenkins", "path": "core/src/main/java/hudson/Functions.java", "license": "mit", "size": 69687 }
[ "hudson.model.Action" ]
import hudson.model.Action;
import hudson.model.*;
[ "hudson.model" ]
hudson.model;
2,909,294
protected String labelNode(KamNode node) throws KAMStoreException { List<BelTerm> terms = kAMStore.getSupportingTerms(node); if (!terms.isEmpty()) { BelTerm bt = terms.get(0); Term parsed; try { parsed = BELParser.parseTerm(bt.getLabel()); ...
String function(KamNode node) throws KAMStoreException { List<BelTerm> terms = kAMStore.getSupportingTerms(node); if (!terms.isEmpty()) { BelTerm bt = terms.get(0); Term parsed; try { parsed = BELParser.parseTerm(bt.getLabel()); } catch (Exception e) { return null; } Term converted = convert(parsed); return displayLong...
/** * Internal method to obtain a label for a node. Grabs the first * {@link BelTerm} that supports the node, parses it, and converts it to the * preferred namespaces to obtain a label. * * @param node * @return * @throws KAMStoreException */
Internal method to obtain a label for a node. Grabs the first <code>BelTerm</code> that supports the node, parses it, and converts it to the preferred namespaces to obtain a label
labelNode
{ "repo_name": "OpenBEL/openbel-framework", "path": "org.openbel.framework.ws/src/main/java/org/openbel/framework/ws/dialect/CustomDialect.java", "license": "apache-2.0", "size": 14389 }
[ "java.util.List", "org.openbel.framework.api.KAMStoreException", "org.openbel.framework.api.Kam", "org.openbel.framework.api.internal.KAMStoreDaoImpl", "org.openbel.framework.common.bel.parser.BELParser", "org.openbel.framework.common.model.Term" ]
import java.util.List; import org.openbel.framework.api.KAMStoreException; import org.openbel.framework.api.Kam; import org.openbel.framework.api.internal.KAMStoreDaoImpl; import org.openbel.framework.common.bel.parser.BELParser; import org.openbel.framework.common.model.Term;
import java.util.*; import org.openbel.framework.api.*; import org.openbel.framework.api.internal.*; import org.openbel.framework.common.bel.parser.*; import org.openbel.framework.common.model.*;
[ "java.util", "org.openbel.framework" ]
java.util; org.openbel.framework;
2,748,440
public void addDataType(long offset, DataType dt) { if (dt == null || dt instanceof VoidDataType) { computeMax(offset, 1); return; } if (dt instanceof Pointer) { DataType baseType = ((Pointer) dt).getDataType(); if (baseType != null && baseType.equals(structDT)) { // Be careful of taking a poin...
void function(long offset, DataType dt) { if (dt == null dt instanceof VoidDataType) { computeMax(offset, 1); return; } if (dt instanceof Pointer) { DataType baseType = ((Pointer) dt).getDataType(); if (baseType != null && baseType.equals(structDT)) { DataTypeManager manager = dt.getDataTypeManager(); dt = manager.getP...
/** * Add data-type information about a specific field * @param offset of the field within the structure * @param dt is the data-type of field if known (null otherwise) */
Add data-type information about a specific field
addDataType
{ "repo_name": "NationalSecurityAgency/ghidra", "path": "Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/NoisyStructureBuilder.java", "license": "apache-2.0", "size": 6060 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,064,333
@Override public void handleRequest(final HttpServerExchange exchange) throws Exception { // get the path and method to construct the endpoint for the operation of tracing. Map<String, Object> auditInfo = exchange.getAttachment(AttachmentConstants.AUDIT_INFO); String endpoint = null; ...
void function(final HttpServerExchange exchange) throws Exception { Map<String, Object> auditInfo = exchange.getAttachment(AttachmentConstants.AUDIT_INFO); String endpoint = null; if(auditInfo != null) { endpoint = (String)auditInfo.get(Constants.ENDPOINT_STRING); } else { endpoint = exchange.getRequestPath() + "@" + e...
/** * Extract the context, start and stop the span here. * * @param exchange HttpServerExchange * @throws Exception Exception */
Extract the context, start and stop the span here
handleRequest
{ "repo_name": "networknt/light-java", "path": "jaeger-tracing/src/main/java/com/networknt/jaeger/tracing/JaegerHandler.java", "license": "apache-2.0", "size": 5302 }
[ "com.networknt.handler.Handler", "com.networknt.httpstring.AttachmentConstants", "com.networknt.server.Server", "com.networknt.utility.Constants", "com.networknt.utility.NetUtils", "io.opentracing.Span", "io.opentracing.SpanContext", "io.opentracing.Tracer", "io.opentracing.propagation.Format", "i...
import com.networknt.handler.Handler; import com.networknt.httpstring.AttachmentConstants; import com.networknt.server.Server; import com.networknt.utility.Constants; import com.networknt.utility.NetUtils; import io.opentracing.Span; import io.opentracing.SpanContext; import io.opentracing.Tracer; import io.opentracing...
import com.networknt.handler.*; import com.networknt.httpstring.*; import com.networknt.server.*; import com.networknt.utility.*; import io.opentracing.*; import io.opentracing.propagation.*; import io.opentracing.tag.*; import io.undertow.server.*; import io.undertow.util.*; import java.util.*;
[ "com.networknt.handler", "com.networknt.httpstring", "com.networknt.server", "com.networknt.utility", "io.opentracing", "io.opentracing.propagation", "io.opentracing.tag", "io.undertow.server", "io.undertow.util", "java.util" ]
com.networknt.handler; com.networknt.httpstring; com.networknt.server; com.networknt.utility; io.opentracing; io.opentracing.propagation; io.opentracing.tag; io.undertow.server; io.undertow.util; java.util;
1,655,055
private IUserAgent[] getUserAgentsByID(String... ids) { List<IUserAgent> result = new ArrayList<IUserAgent>(); if (ids != null && ids.length > 0) { for (String id : ids) { IUserAgent userAgent = getUserAgentById(id); if (userAgent != null) { result.add(userAgent); } } } ret...
IUserAgent[] function(String... ids) { List<IUserAgent> result = new ArrayList<IUserAgent>(); if (ids != null && ids.length > 0) { for (String id : ids) { IUserAgent userAgent = getUserAgentById(id); if (userAgent != null) { result.add(userAgent); } } } return result.toArray(new IUserAgent[result.size()]); }
/** * Return an array of UserAgents, one for each recognized user agent ID * * @param ids * An array of user agent ids * @return Returns an array of UserAgent instances */
Return an array of UserAgents, one for each recognized user agent ID
getUserAgentsByID
{ "repo_name": "HossainKhademian/Studio3", "path": "plugins/com.aptana.editor.common/src/com/aptana/editor/common/contentassist/UserAgentManager.java", "license": "gpl-3.0", "size": 16888 }
[ "com.aptana.core.IUserAgent", "java.util.ArrayList", "java.util.List" ]
import com.aptana.core.IUserAgent; import java.util.ArrayList; import java.util.List;
import com.aptana.core.*; import java.util.*;
[ "com.aptana.core", "java.util" ]
com.aptana.core; java.util;
2,379,971
// ! Finds echo breakpoints set in a code node. public static List<Address> getEchoBreakpoints(final Debugger debugger, final CodeNode node) { return getBreakpoints(debugger, node, BreakpointType.ECHO); }
static List<Address> function(final Debugger debugger, final CodeNode node) { return getBreakpoints(debugger, node, BreakpointType.ECHO); }
/** * Returns the addresses of all echo breakpoints set in a given code node. * * This function is guaranteed to run in O(n) where n is the number of instructions in the * breakpoint. * * @param debugger Debugger that is checked for set echo breakpoints. * @param node The code node that is checked...
Returns the addresses of all echo breakpoints set in a given code node. This function is guaranteed to run in O(n) where n is the number of instructions in the breakpoint
getEchoBreakpoints
{ "repo_name": "mayl8822/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/API/debug/BreakpointHelpers.java", "license": "apache-2.0", "size": 7420 }
[ "com.google.security.zynamics.binnavi.API", "com.google.security.zynamics.binnavi.debug.models.breakpoints.enums.BreakpointType", "java.util.List" ]
import com.google.security.zynamics.binnavi.API; import com.google.security.zynamics.binnavi.debug.models.breakpoints.enums.BreakpointType; import java.util.List;
import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.debug.models.breakpoints.enums.*; import java.util.*;
[ "com.google.security", "java.util" ]
com.google.security; java.util;
810,877
private void drawGameObjects(Canvas canvas) { for(GameObject item: gameObjects) { if (item.getSprite().isHasFrames()) { item.getSprite().nextFrame(); } item.draw(canvas); } }
void function(Canvas canvas) { for(GameObject item: gameObjects) { if (item.getSprite().isHasFrames()) { item.getSprite().nextFrame(); } item.draw(canvas); } }
/** * Function to draw the current state of each game object. * @param canvas canvas on which we paint the game objects. */
Function to draw the current state of each game object
drawGameObjects
{ "repo_name": "aedrish/Game-Engine-android", "path": "app/src/main/java/nl/bram_arts/projects/game_test/GameEngine/GameView.java", "license": "mit", "size": 3629 }
[ "android.graphics.Canvas" ]
import android.graphics.Canvas;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
43,717
public static Artifact getLinuxLinkedArtifact( RuleContext ruleContext, BuildConfiguration config, LinkTargetType linkType) { return getLinuxLinkedArtifact(ruleContext, config, linkType, ""); }
static Artifact function( RuleContext ruleContext, BuildConfiguration config, LinkTargetType linkType) { return getLinuxLinkedArtifact(ruleContext, config, linkType, ""); }
/** * Returns the linked artifact for linux. * * @param ruleContext the ruleContext to be used to scope the artifact * @param config the configuration to be used to scope the artifact * @param linkType the type of artifact, used to determine extension */
Returns the linked artifact for linux
getLinuxLinkedArtifact
{ "repo_name": "juhalindfors/bazel-patches", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java", "license": "apache-2.0", "size": 29659 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.RuleContext", "com.google.devtools.build.lib.analysis.config.BuildConfiguration", "com.google.devtools.build.lib.rules.cpp.Link" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.rules.cpp.Link;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.rules.cpp.*;
[ "com.google.devtools" ]
com.google.devtools;
722,946
boolean isPaymentFederalOwned(AssetPayment assetPayment);
boolean isPaymentFederalOwned(AssetPayment assetPayment);
/** * Checks if asset payment is federally funder or not * * @param assetPayment * Payment record * @return True if financial object sub type code indicates federal * contribution */
Checks if asset payment is federally funder or not
isPaymentFederalOwned
{ "repo_name": "bhutchinson/kfs", "path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/service/AssetPaymentService.java", "license": "agpl-3.0", "size": 5534 }
[ "org.kuali.kfs.module.cam.businessobject.AssetPayment" ]
import org.kuali.kfs.module.cam.businessobject.AssetPayment;
import org.kuali.kfs.module.cam.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
385,602
void spoutAck(SpoutAckInfo info);
void spoutAck(SpoutAckInfo info);
/** * Called in spout everytime a tuple gets acked */
Called in spout everytime a tuple gets acked
spoutAck
{ "repo_name": "twitter/heron", "path": "heron/api/src/java/org/apache/heron/api/hooks/ITaskHook.java", "license": "apache-2.0", "size": 2167 }
[ "org.apache.heron.api.hooks.info.SpoutAckInfo" ]
import org.apache.heron.api.hooks.info.SpoutAckInfo;
import org.apache.heron.api.hooks.info.*;
[ "org.apache.heron" ]
org.apache.heron;
2,126,694
Optional<PortNumber> tunnelPort(DeviceId intBridgeId);
Optional<PortNumber> tunnelPort(DeviceId intBridgeId);
/** * Returns tunnel port number of a given integration bridge device. * * @param intBridgeId integration bridge device id * @return port number; or empty value */
Returns tunnel port number of a given integration bridge device
tunnelPort
{ "repo_name": "Shashikanth-Huawei/bmp", "path": "apps/openstacknode/src/main/java/org/onosproject/openstacknode/OpenstackNodeService.java", "license": "apache-2.0", "size": 3541 }
[ "java.util.Optional", "org.onosproject.net.DeviceId", "org.onosproject.net.PortNumber" ]
import java.util.Optional; import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber;
import java.util.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
2,348,766
public Iterable<Notification> skip( final Iterable<Notification> notifications, final String startId, final boolean inclusive, final int limitSize) { Objects.requireNonNull(notifications, "notifications == null"); final int position = indexOf(notifications, startId); if (position...
Iterable<Notification> function( final Iterable<Notification> notifications, final String startId, final boolean inclusive, final int limitSize) { Objects.requireNonNull(notifications, STR); final int position = indexOf(notifications, startId); if (position == -1) { return Iterables.limit(notifications, limitSize); } i...
/** * Returns an iterable that skips forward to a given notification ID then only returns count more * notifications. If the given notification ID is not found * * @param notifications Iterable of notifications * @param startId notification ID to start at * @param inclusive Whether to include the star...
Returns an iterable that skips forward to a given notification ID then only returns count more notifications. If the given notification ID is not found
skip
{ "repo_name": "smoketurner/notification", "path": "notification-application/src/main/java/com/smoketurner/notification/application/store/NotificationStore.java", "license": "apache-2.0", "size": 19446 }
[ "com.google.common.collect.Iterables", "com.smoketurner.notification.api.Notification", "java.util.Objects" ]
import com.google.common.collect.Iterables; import com.smoketurner.notification.api.Notification; import java.util.Objects;
import com.google.common.collect.*; import com.smoketurner.notification.api.*; import java.util.*;
[ "com.google.common", "com.smoketurner.notification", "java.util" ]
com.google.common; com.smoketurner.notification; java.util;
716,232
@Override public String createUpdateString(final String inTableName, final DomainObject inDomainObject) { // NOPMD return null; }
String function(final String inTableName, final DomainObject inDomainObject) { return null; }
/** No implementation provided. * * @see org.hip.kernel.bom.DomainObjectHome#createUpdateString(java.lang.String, org.hip.kernel.bom.DomainObject) */
No implementation provided
createUpdateString
{ "repo_name": "aktion-hip/viffw", "path": "org.hip.viffw/src/org/hip/kernel/bom/directory/LDAPObjectHome.java", "license": "lgpl-2.1", "size": 27664 }
[ "org.hip.kernel.bom.DomainObject" ]
import org.hip.kernel.bom.DomainObject;
import org.hip.kernel.bom.*;
[ "org.hip.kernel" ]
org.hip.kernel;
2,614,855
public boolean isAutoExpandNode(final NodeDescriptor descriptor){ final Object element=descriptor.getElement(); return element==myRootElement || element==myEditor.getRootContainer(); } public void commit(){}
boolean function(final NodeDescriptor descriptor){ final Object element=descriptor.getElement(); return element==myRootElement element==myEditor.getRootContainer(); } public void commit(){}
/** * Only tree root (it's invisible) node and RadRootContainer are auto-expanded */
Only tree root (it's invisible) node and RadRootContainer are auto-expanded
isAutoExpandNode
{ "repo_name": "android-ia/platform_tools_idea", "path": "plugins/ui-designer/src/com/intellij/uiDesigner/componentTree/ComponentTreeStructure.java", "license": "apache-2.0", "size": 7115 }
[ "com.intellij.ide.util.treeView.NodeDescriptor" ]
import com.intellij.ide.util.treeView.NodeDescriptor;
import com.intellij.ide.util.*;
[ "com.intellij.ide" ]
com.intellij.ide;
2,204,861
public void testUnknownType() throws Exception { // isXxx assertFalse(UNKNOWN_TYPE.isArrayType()); assertFalse(UNKNOWN_TYPE.isBooleanObjectType()); assertFalse(UNKNOWN_TYPE.isBooleanValueType()); assertFalse(UNKNOWN_TYPE.isDateType()); assertFalse(UNKNOWN_TYPE.isEnumElementType()); assertF...
void function() throws Exception { assertFalse(UNKNOWN_TYPE.isArrayType()); assertFalse(UNKNOWN_TYPE.isBooleanObjectType()); assertFalse(UNKNOWN_TYPE.isBooleanValueType()); assertFalse(UNKNOWN_TYPE.isDateType()); assertFalse(UNKNOWN_TYPE.isEnumElementType()); assertFalse(UNKNOWN_TYPE.isNamedType()); assertFalse(UNKNOWN...
/** * Tests the behavior of the unknown type. */
Tests the behavior of the unknown type
testUnknownType
{ "repo_name": "LorenzoDV/closure-compiler", "path": "test/com/google/javascript/rhino/jstype/JSTypeTest.java", "license": "apache-2.0", "size": 273520 }
[ "com.google.javascript.rhino.testing.Asserts" ]
import com.google.javascript.rhino.testing.Asserts;
import com.google.javascript.rhino.testing.*;
[ "com.google.javascript" ]
com.google.javascript;
377,553
if (primary) { AsyncShardFetch<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> fetch = asyncFetchStarted.get(shardId); if (fetch != null) { return fetch.getNumberOfInFlightFetches() > 0; } } else { AsyncShardFetch<TransportNodesLis...
if (primary) { AsyncShardFetch<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> fetch = asyncFetchStarted.get(shardId); if (fetch != null) { return fetch.getNumberOfInFlightFetches() > 0; } } else { AsyncShardFetch<TransportNodesListShardStoreMetaData.NodeStoreFilesMetaData> fetch = asyncFetchStore.get(...
/** * Returns true if the given shard has an async fetch pending */
Returns true if the given shard has an async fetch pending
hasFetchPending
{ "repo_name": "girirajsharma/elasticsearch", "path": "core/src/main/java/org/elasticsearch/gateway/GatewayAllocator.java", "license": "apache-2.0", "size": 9489 }
[ "org.elasticsearch.indices.store.TransportNodesListShardStoreMetaData" ]
import org.elasticsearch.indices.store.TransportNodesListShardStoreMetaData;
import org.elasticsearch.indices.store.*;
[ "org.elasticsearch.indices" ]
org.elasticsearch.indices;
530,582
void processDhcpPacket(PacketContext context, BasePacket dhcpPayload);
void processDhcpPacket(PacketContext context, BasePacket dhcpPayload);
/** * Process the DHCP packet before sending to server or client. * * @param context the packet context * @param dhcpPayload the DHCP payload */
Process the DHCP packet before sending to server or client
processDhcpPacket
{ "repo_name": "osinstom/onos", "path": "apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/api/DhcpHandler.java", "license": "apache-2.0", "size": 5534 }
[ "org.onlab.packet.BasePacket", "org.onosproject.net.packet.PacketContext" ]
import org.onlab.packet.BasePacket; import org.onosproject.net.packet.PacketContext;
import org.onlab.packet.*; import org.onosproject.net.packet.*;
[ "org.onlab.packet", "org.onosproject.net" ]
org.onlab.packet; org.onosproject.net;
2,086,673
public String getProcessInstanceId() { Execution execution = associationManager.getExecution(); return execution != null ? execution.getProcessInstanceId() : null; }
String function() { Execution execution = associationManager.getExecution(); return execution != null ? execution.getProcessInstanceId() : null; }
/** * Returns the id of the currently associated process instance or 'null' */
Returns the id of the currently associated process instance or 'null'
getProcessInstanceId
{ "repo_name": "clintmanning/new-empty", "path": "engine-cdi/src/main/java/org/camunda/bpm/engine/cdi/BusinessProcess.java", "license": "apache-2.0", "size": 18693 }
[ "org.camunda.bpm.engine.runtime.Execution" ]
import org.camunda.bpm.engine.runtime.Execution;
import org.camunda.bpm.engine.runtime.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
1,084,899
protected Map<String, List<Double>> getMipsMap() { return mipsMap; }
Map<String, List<Double>> function() { return mipsMap; }
/** * Gets the mips map. * * @return the mips map */
Gets the mips map
getMipsMap
{ "repo_name": "swethapts/cloudsim", "path": "sources/org/cloudbus/cloudsim/VmSchedulerSteady.java", "license": "lgpl-3.0", "size": 6311 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
372,575
public void setCache(int size) { cacheSize = size; if (size == 0) cache = null; else cache = new HashMap<String, List<Word>>((size + 2) / 3 * 4); }
void function(int size) { cacheSize = size; if (size == 0) cache = null; else cache = new HashMap<String, List<Word>>((size + 2) / 3 * 4); }
/** * Activates a cache with specified size * @param size - max. number of cache entries (0 to disable cache) */
Activates a cache with specified size
setCache
{ "repo_name": "Thecarisma/powertext", "path": "Power Text Spell Checker/src/com/power/text/spell/event/SpellChecker.java", "license": "gpl-3.0", "size": 20364 }
[ "com.power.text.spell.engine.Word", "java.util.HashMap", "java.util.List" ]
import com.power.text.spell.engine.Word; import java.util.HashMap; import java.util.List;
import com.power.text.spell.engine.*; import java.util.*;
[ "com.power.text", "java.util" ]
com.power.text; java.util;
1,611,090
public void sendMsg(Messenger toMsgr, int what, Messenger plyToMsgr) { final String METHOD = "::sendMsg() "; // Logger.Log(TAG + METHOD, "Sending message to client. What = " + Integer.toString(what)); LOGGER.info(TAG + METHOD + "Sending message to client. What = " + Integer.toString(what)); Message msg = ...
void function(Messenger toMsgr, int what, Messenger plyToMsgr) { final String METHOD = STR; LOGGER.info(TAG + METHOD + STR + Integer.toString(what)); Message msg = Message.obtain(null, what, 0, 0); if(plyToMsgr != null) { msg.replyTo = plyToMsgr; } try { toMsgr.send(msg); LOGGER.info(TAG + METHOD + STR); } catch (Remot...
/** * Sends a message to the RemoteService or the DialingService. * Includes a reply-to Messenger that the RemoteService / DialingService shall use * to communicate with this activity. * * @param what * @param messenger */
Sends a message to the RemoteService or the DialingService. Includes a reply-to Messenger that the RemoteService / DialingService shall use to communicate with this activity
sendMsg
{ "repo_name": "Spinlogic/VoLTE_Dialer", "path": "VoLTE_Dialer/src/at/a1/volte_dialer/VDMainActivity.java", "license": "gpl-3.0", "size": 20672 }
[ "android.os.Message", "android.os.Messenger", "android.os.RemoteException" ]
import android.os.Message; import android.os.Messenger; import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
1,504,826
protected java.sql.NClob getNativeNClob(int columnIndex) throws SQLException { String stringVal = getStringForNClob(columnIndex); if (stringVal == null) { return null; } return getNClobFromString(stringVal, columnIndex); }
java.sql.NClob function(int columnIndex) throws SQLException { String stringVal = getStringForNClob(columnIndex); if (stringVal == null) { return null; } return getNClobFromString(stringVal, columnIndex); }
/** * JDBC 4.0 Get a NCLOB column. * * @param columnIndex * the first column is 1, the second is 2, ... * * @return an object representing a NCLOB * * @throws SQLException * if an error occurs */
JDBC 4.0 Get a NCLOB column
getNativeNClob
{ "repo_name": "google-code/blufeedme", "path": "material/BDs/mysql-connector-java-5.1.13/src/com/mysql/jdbc/JDBC4ResultSet.java", "license": "gpl-3.0", "size": 17141 }
[ "java.sql.NClob", "java.sql.SQLException" ]
import java.sql.NClob; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,810,199
@SuppressWarnings("unchecked") public T sharedElementReturnTransition(@Nullable Transition transition) { this.setHasTransition(TRANSITION_SHARED_ELEMENT_RETURN, true); this.mSharedElementReturnTransition = transition; return (T) this; } /** * @return Transition for shared element specified via {@link #sh...
@SuppressWarnings(STR) T function(@Nullable Transition transition) { this.setHasTransition(TRANSITION_SHARED_ELEMENT_RETURN, true); this.mSharedElementReturnTransition = transition; return (T) this; } /** * @return Transition for shared element specified via {@link #sharedElementReturnTransition(Transition)}
/** * Specifies a transition for shared element to be attached to a window of the caller activity * whenever {@link #start(Activity)} is invoked. * * @return This transition to allow methods chaining. * @see Window#setSharedElementReturnTransition(Transition) */
Specifies a transition for shared element to be attached to a window of the caller activity whenever <code>#start(Activity)</code> is invoked
sharedElementReturnTransition
{ "repo_name": "android-libraries/android_ui", "path": "library/src/transition/java/com/albedinsky/android/ui/transition/BaseNavigationalTransition.java", "license": "apache-2.0", "size": 35973 }
[ "android.support.annotation.Nullable", "android.transition.Transition" ]
import android.support.annotation.Nullable; import android.transition.Transition;
import android.support.annotation.*; import android.transition.*;
[ "android.support", "android.transition" ]
android.support; android.transition;
1,752,636
public static String[] readLines(File source, String encoding) throws IOException { if (source.exists() == false) { throw new FileNotFoundException("Source '" + source + "' doesn't exist."); } if (source.isFile() == false) { throw new IOException("Source '" + source + "' is not a file."); } F...
static String[] function(File source, String encoding) throws IOException { if (source.exists() == false) { throw new FileNotFoundException(STR + source + STR); } if (source.isFile() == false) { throw new IOException(STR + source + STR); } FileInputStream in = null; in = new FileInputStream(source); return readLines(in...
/** * Reads lines from source files. */
Reads lines from source files
readLines
{ "repo_name": "allanfish/facetime-demo", "path": "oatos_project/oatos_dto/src/main/java/com/conlect/oatos/utils/FileUtils.java", "license": "mit", "size": 35545 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,415,200
@Deprecated public void commitAndDumpHUs(List<I_M_HU> hus) { Services.get(ITrxManager.class).commit(trxName); System.out.println(HUXmlConverter.toString(HUXmlConverter.toXml("HUs", hus))); }
void function(List<I_M_HU> hus) { Services.get(ITrxManager.class).commit(trxName); System.out.println(HUXmlConverter.toString(HUXmlConverter.toXml("HUs", hus))); }
/** * Similar to {@link #commitAndDumpHU(I_M_HU)}. * * @param hus */
Similar to <code>#commitAndDumpHU(I_M_HU)</code>
commitAndDumpHUs
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.handlingunits.base/src/test/java/de/metas/handlingunits/HUTestHelper.java", "license": "gpl-2.0", "size": 74946 }
[ "java.util.List", "org.adempiere.ad.trx.api.ITrxManager", "org.adempiere.util.Services" ]
import java.util.List; import org.adempiere.ad.trx.api.ITrxManager; import org.adempiere.util.Services;
import java.util.*; import org.adempiere.ad.trx.api.*; import org.adempiere.util.*;
[ "java.util", "org.adempiere.ad", "org.adempiere.util" ]
java.util; org.adempiere.ad; org.adempiere.util;
2,247,197
protected boolean loadFirstCalibration() { for ( int t = 0; t < timepointNameList.size(); ++t ) for ( int c = 0; c < channelNameList.size(); ++c ) for ( int i = 0; i < illuminationsNameList.size(); ++i ) for ( int a = 0; a < angleNameList.size(); ++a ) { if ( exceptionIds.size() > 0 && ...
boolean function() { for ( int t = 0; t < timepointNameList.size(); ++t ) for ( int c = 0; c < channelNameList.size(); ++c ) for ( int i = 0; i < illuminationsNameList.size(); ++i ) for ( int a = 0; a < angleNameList.size(); ++a ) { if ( exceptionIds.size() > 0 && exceptionIds.get( 0 )[ 0 ] == t && exceptionIds.get( 0 ...
/** * populates the fields calX, calY, calZ from the first file of the series * * @return - true if successful */
populates the fields calX, calY, calZ from the first file of the series
loadFirstCalibration
{ "repo_name": "bigdataviewer/SPIM_Registration", "path": "src/main/java/spim/fiji/datasetmanager/StackList.java", "license": "gpl-2.0", "size": 37350 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
667,395
private void transferQueues(String rsZnode) { NodeFailoverWorker transfer = new NodeFailoverWorker(rsZnode, this.replicationQueues, this.replicationPeers, this.clusterId); try { this.executor.execute(transfer); } catch (RejectedExecutionException ex) { LOG.info("Cancelling ...
void function(String rsZnode) { NodeFailoverWorker transfer = new NodeFailoverWorker(rsZnode, this.replicationQueues, this.replicationPeers, this.clusterId); try { this.executor.execute(transfer); } catch (RejectedExecutionException ex) { LOG.info(STR + rsZnode + STR + ex.getMessage()); } }
/** * Transfer all the queues of the specified to this region server. * First it tries to grab a lock and if it works it will move the * znodes and finally will delete the old znodes. * * It creates one old source for any type of source of the old rs. * @param rsZnode */
Transfer all the queues of the specified to this region server. First it tries to grab a lock and if it works it will move the znodes and finally will delete the old znodes. It creates one old source for any type of source of the old rs
transferQueues
{ "repo_name": "tobegit3hub/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java", "license": "apache-2.0", "size": 20382 }
[ "java.util.concurrent.RejectedExecutionException" ]
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,137,504
@Override public void write(int integerValue) throws IOException { // write buffered booleans writeBooleans(); _buffer[0] = (byte)(integerValue >> 24 & 0xFF); _buffer[1] = (byte)(integerValue >> 16 & 0xFF); _buffer[2] = (byte)(integerValue >> 8 & 0xFF); _buffer[...
void function(int integerValue) throws IOException { writeBooleans(); _buffer[0] = (byte)(integerValue >> 24 & 0xFF); _buffer[1] = (byte)(integerValue >> 16 & 0xFF); _buffer[2] = (byte)(integerValue >> 8 & 0xFF); _buffer[3] = (byte)(integerValue & 0xFF); _stream.write(_buffer, 0, 4); _bytesWritten+=4; }
/** * Write a 32-bit number (4 bytes). * * @param integerValue The integer. * * @throws IOException */
Write a 32-bit number (4 bytes)
write
{ "repo_name": "JCThePants/NucleusFramework", "path": "src/com/jcwhatever/nucleus/utils/file/BasicByteWriter.java", "license": "mit", "size": 19445 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
59,482
public String toString() { return this.generateElement(Generator.DEFAULT_GENERATOR); }
String function() { return this.generateElement(Generator.DEFAULT_GENERATOR); }
/** * Implicit markup serialization. * * @return String representaiton. */
Implicit markup serialization
toString
{ "repo_name": "chilloutdevelopment/pl.chilldev.web", "path": "web-core/src/main/java/pl/chilldev/web/core/link/Element.java", "license": "mit", "size": 3791 }
[ "pl.chilldev.web.core.markup.Generator" ]
import pl.chilldev.web.core.markup.Generator;
import pl.chilldev.web.core.markup.*;
[ "pl.chilldev.web" ]
pl.chilldev.web;
1,989,641
public String getApiVersion() { return this.apiVersion; } private final HttpPipeline httpPipeline;
String function() { return this.apiVersion; } private final HttpPipeline httpPipeline;
/** * Gets Api Version. * * @return the apiVersion value. */
Gets Api Version
getApiVersion
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/implementation/LogicManagementClientImpl.java", "license": "mit", "size": 26950 }
[ "com.azure.core.http.HttpPipeline" ]
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.*;
[ "com.azure.core" ]
com.azure.core;
2,441,107
public boolean getOptionalKeyword(String keyword) throws IOException;
boolean function(String keyword) throws IOException;
/** * Get an optional keyword */
Get an optional keyword
getOptionalKeyword
{ "repo_name": "moegyver/mJeliot", "path": "Jeliot/src/avinteraction/parser/ParserInterface.java", "license": "mit", "size": 1927 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
374,431
@Test (timeout = 900000) public void testLargeBlockSize() throws IOException { final long blockSize = 2L * 1024L * 1024L * 1024L + 512L; // 2GB + 512B runTest(blockSize); }
@Test (timeout = 900000) void function() throws IOException { final long blockSize = 2L * 1024L * 1024L * 1024L + 512L; runTest(blockSize); }
/** * Test for block size of 2GB + 512B. This test can take a rather long time to * complete on Windows (reading the file back can be slow) so we use a larger * timeout here. * @throws IOException in case of errors */
Test for block size of 2GB + 512B. This test can take a rather long time to complete on Windows (reading the file back can be slow) so we use a larger timeout here
testLargeBlockSize
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLargeBlock.java", "license": "apache-2.0", "size": 7166 }
[ "java.io.IOException", "org.junit.Test" ]
import java.io.IOException; import org.junit.Test;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
2,200,279
@Override public boolean retainAll(Collection<?> c) { throw LOGGER.logExceptionAsError(new UnsupportedOperationException(NO_MUTATION_MESSAGE)); }
boolean function(Collection<?> c) { throw LOGGER.logExceptionAsError(new UnsupportedOperationException(NO_MUTATION_MESSAGE)); }
/** * Throws {@link UnsupportedOperationException} as GeoArray doesn't support mutation. * * @param c The collection of elements that would be retained. * @return Throws an exception. * @throws UnsupportedOperationException GeoArray doesn't support mutation. */
Throws <code>UnsupportedOperationException</code> as GeoArray doesn't support mutation
retainAll
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/core/azure-core/src/main/java/com/azure/core/models/GeoArray.java", "license": "mit", "size": 6311 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,132,172
@Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true) public E get(PK pk) throws ServiceException;
@Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true) E function(PK pk) throws ServiceException;
/** * Get e. * * @param pk the pk * @return the e * @throws ServiceException the service exception */
Get e
get
{ "repo_name": "forsrc/MyStudy", "path": "src/main/java/com/forsrc/springmvc/restful/base/service/RestfulService.java", "license": "apache-2.0", "size": 2258 }
[ "com.forsrc.exception.ServiceException", "org.springframework.transaction.annotation.Propagation", "org.springframework.transaction.annotation.Transactional" ]
import com.forsrc.exception.ServiceException; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional;
import com.forsrc.exception.*; import org.springframework.transaction.annotation.*;
[ "com.forsrc.exception", "org.springframework.transaction" ]
com.forsrc.exception; org.springframework.transaction;
2,165,912
public void setShadowPaint(Paint paint) { this.shadowPaint = paint; }
void function(Paint paint) { this.shadowPaint = paint; }
/** * Sets the shadow paint. * * @param paint the paint. */
Sets the shadow paint
setShadowPaint
{ "repo_name": "SpoonLabs/astor", "path": "examples/chart_11/source/org/jfree/chart/text/TextBox.java", "license": "gpl-2.0", "size": 11651 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,562,715
@FunctionalInterface public interface ArbitraryDescriptorValidator { String validate(ModelNode currentNode, String descriptor); }
interface ArbitraryDescriptorValidator { String function(ModelNode currentNode, String descriptor); }
/** * Validate a resource or operation arbitrary descriptor * * @param currentNode the current attribute or parameter * @param descriptor the current descriptor being validated * @return {@code null} if it passed validation, or an error message describing the problem ...
Validate a resource or operation arbitrary descriptor
validate
{ "repo_name": "JiriOndrusek/wildfly-core", "path": "model-test/src/main/java/org/jboss/as/model/test/ModelTestModelDescriptionValidator.java", "license": "lgpl-2.1", "size": 59671 }
[ "org.jboss.dmr.ModelNode" ]
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.*;
[ "org.jboss.dmr" ]
org.jboss.dmr;
958,189
public static LocalDateTime parse(String dateString, String dateFormat) throws ParseException { DateTimeFormatter formatter = new DateTimeFormatterBuilder() .parseCaseInsensitive() .appendPattern(dateFormat) .parseDefaulting(ChronoField.YEAR_OF_ERA, 1).parseDefaulting(ChronoField.MONTH_OF_YEAR, 1) ...
static LocalDateTime function(String dateString, String dateFormat) throws ParseException { DateTimeFormatter formatter = new DateTimeFormatterBuilder() .parseCaseInsensitive() .appendPattern(dateFormat) .parseDefaulting(ChronoField.YEAR_OF_ERA, 1).parseDefaulting(ChronoField.MONTH_OF_YEAR, 1) .parseDefaulting(ChronoFi...
/** * Validate the actual date of the given date string based on the given date * format pattern and return a date instance based on the given date string. * * @param dateString * The date string. * @param dateFormat * The date format pattern which should respect the * ...
Validate the actual date of the given date string based on the given date format pattern and return a date instance based on the given date string
parse
{ "repo_name": "olehmberg/winter", "path": "winter-framework/src/main/java/de/uni_mannheim/informatik/dws/winter/preprocessing/datatypes/DateJavaTime.java", "license": "apache-2.0", "size": 14998 }
[ "java.text.ParseException", "java.time.LocalDateTime", "java.time.format.DateTimeFormatter", "java.time.format.DateTimeFormatterBuilder", "java.time.temporal.ChronoField", "java.util.Locale" ]
import java.text.ParseException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.time.temporal.ChronoField; import java.util.Locale;
import java.text.*; import java.time.*; import java.time.format.*; import java.time.temporal.*; import java.util.*;
[ "java.text", "java.time", "java.util" ]
java.text; java.time; java.util;
2,793,322
public void testNextLineOnlyDefaultEncoding() throws Exception { File testFile = new File(getTestDirectory(), "LineIterator-nextOnly.txt"); List<String> lines = createLinesFile(testFile, 3); LineIterator iterator = FileUtils.lineIterator(testFile); assertLines(lines, iterator); ...
void function() throws Exception { File testFile = new File(getTestDirectory(), STR); List<String> lines = createLinesFile(testFile, 3); LineIterator iterator = FileUtils.lineIterator(testFile); assertLines(lines, iterator); }
/** * Test the iterator using only the nextLine() method. */
Test the iterator using only the nextLine() method
testNextLineOnlyDefaultEncoding
{ "repo_name": "sebastiansemmle/acio", "path": "src/test/java/org/apache/commons/io/LineIteratorTestCase.java", "license": "apache-2.0", "size": 14612 }
[ "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;
962,701
@Deprecated public static InetSocketAddress createSocketAddr(String target ) throws IOException { return NetUtils.createSocketAddr(target); } public DatanodeProtocol namenode = null; public FSDatasetInterface data = null; public DatanodeRegistration ...
static InetSocketAddress function(String target ) throws IOException { return NetUtils.createSocketAddr(target); } public DatanodeProtocol namenode = null; public FSDatasetInterface data = null; public DatanodeRegistration dnRegistration = null; volatile boolean shouldRun = true; private LinkedList<Block> receivedBlock...
/** * Use {@link NetUtils#createSocketAddr(String)} instead. */
Use <code>NetUtils#createSocketAddr(String)</code> instead
createSocketAddr
{ "repo_name": "sbyoun/i-mapreduce", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 57854 }
[ "java.io.IOException", "java.net.InetSocketAddress", "java.util.HashMap", "java.util.LinkedList", "java.util.Map", "java.util.Random", "java.util.concurrent.atomic.AtomicInteger", "org.apache.hadoop.hdfs.protocol.Block", "org.apache.hadoop.hdfs.server.datanode.metrics.DataNodeMetrics", "org.apache...
import java.io.IOException; import java.net.InetSocketAddress; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.datanode.metrics.DataN...
import java.io.*; import java.net.*; import java.util.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.metrics.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.http.*; import org.apache.hadoop.ipc.*; import org.a...
[ "java.io", "java.net", "java.util", "org.apache.hadoop" ]
java.io; java.net; java.util; org.apache.hadoop;
2,899,766
@Test public void parse01() throws Exception { try (FileInputStream fis = new FileInputStream(XML_DIR + "namespace1.xml")) { XMLReader xmlReader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); if (!xmlReader.getFeature(NM_PREFIXES_PROPERTY)) { xmlR...
void function() throws Exception { try (FileInputStream fis = new FileInputStream(XML_DIR + STR)) { XMLReader xmlReader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); if (!xmlReader.getFeature(NM_PREFIXES_PROPERTY)) { xmlReader.setFeature(NM_PREFIXES_PROPERTY, true); } XMLReaderAdapter xmlRA = new XMLR...
/** * To test the parse method. The specification says that this method * will throw an exception if the embedded XMLReader does not support * the http://xml.org/sax/features/namespace-prefixes property. * * @throws Exception If any errors occur. */
To test the parse method. The specification says that this method will throw an exception if the embedded XMLReader does not support the HREF property
parse01
{ "repo_name": "md-5/jdk10", "path": "test/jaxp/javax/xml/jaxp/functional/org/xml/sax/ptests/XMLReaderAdapterTest.java", "license": "gpl-2.0", "size": 4288 }
[ "java.io.FileInputStream", "javax.xml.parsers.SAXParserFactory", "org.xml.sax.HandlerBase", "org.xml.sax.InputSource", "org.xml.sax.XMLReader", "org.xml.sax.helpers.XMLReaderAdapter" ]
import java.io.FileInputStream; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.HandlerBase; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.xml.sax.helpers.XMLReaderAdapter;
import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*; import org.xml.sax.helpers.*;
[ "java.io", "javax.xml", "org.xml.sax" ]
java.io; javax.xml; org.xml.sax;
1,057,912
default AdvancedPlatformHttpEndpointBuilder headerFilterStrategy( HeaderFilterStrategy headerFilterStrategy) { doSetProperty("headerFilterStrategy", headerFilterStrategy); return this; }
default AdvancedPlatformHttpEndpointBuilder headerFilterStrategy( HeaderFilterStrategy headerFilterStrategy) { doSetProperty(STR, headerFilterStrategy); return this; }
/** * To use a custom HeaderFilterStrategy to filter headers to and from * Camel message. * * The option is a: * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. * * Group: advanced */
To use a custom HeaderFilterStrategy to filter headers to and from Camel message. The option is a: <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: advanced
headerFilterStrategy
{ "repo_name": "objectiser/camel", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PlatformHttpEndpointBuilderFactory.java", "license": "apache-2.0", "size": 13000 }
[ "org.apache.camel.spi.HeaderFilterStrategy" ]
import org.apache.camel.spi.HeaderFilterStrategy;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
604,067
public MavenPreferencePage setDownloadRepoIndexOnStartup(boolean check) { new CheckBox(this, MavenPreferencePage.DOWNLOAD_REPO_INDEX_UPDATES_ON_STARTUP).toggle(check); return this; }
MavenPreferencePage function(boolean check) { new CheckBox(this, MavenPreferencePage.DOWNLOAD_REPO_INDEX_UPDATES_ON_STARTUP).toggle(check); return this; }
/** * Sets Download repository index updates on startup checkbox . * * @param check the new download repo index on startup */
Sets Download repository index updates on startup checkbox
setDownloadRepoIndexOnStartup
{ "repo_name": "djelinek/reddeer", "path": "plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/m2e/core/ui/preferences/MavenPreferencePage.java", "license": "epl-1.0", "size": 6503 }
[ "org.eclipse.reddeer.swt.impl.button.CheckBox" ]
import org.eclipse.reddeer.swt.impl.button.CheckBox;
import org.eclipse.reddeer.swt.impl.button.*;
[ "org.eclipse.reddeer" ]
org.eclipse.reddeer;
1,251,918
public String getColumnName(int columnIndex) throws RemoteException { ColumnDesc columnDesc = columnList.get(columnIndex); String alias = columnDesc.getAlias(); String name = columnDesc.getName(); return (alias.equals("") ? name : alias); }
String function(int columnIndex) throws RemoteException { ColumnDesc columnDesc = columnList.get(columnIndex); String alias = columnDesc.getAlias(); String name = columnDesc.getName(); return (alias.equals("") ? name : alias); }
/** * Get the designated column's name. * * @param columnIndex - the first column is 1, the second is 2, ... * @return */
Get the designated column's name
getColumnName
{ "repo_name": "andyhehk/SecureDB", "path": "proxy/src/main/java/edu/hku/sdb/connect/SDBResultSetMetaData.java", "license": "apache-2.0", "size": 2262 }
[ "edu.hku.sdb.exec.ColumnDesc", "java.rmi.RemoteException" ]
import edu.hku.sdb.exec.ColumnDesc; import java.rmi.RemoteException;
import edu.hku.sdb.exec.*; import java.rmi.*;
[ "edu.hku.sdb", "java.rmi" ]
edu.hku.sdb; java.rmi;
561,992
public final static Function<Long, Long> module(Integer module) { return new Module(BigInteger.valueOf(module.longValue())); }
final static Function<Long, Long> function(Integer module) { return new Module(BigInteger.valueOf(module.longValue())); }
/** * <p> * It performs a module operation and returns the value * of (input mod module) which is always positive * (whereas remainder is not) * </p> * * @param module the module * @return the result of (input mod module) */
It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
module
{ "repo_name": "op4j/op4j", "path": "src/main/java/org/op4j/functions/FnLong.java", "license": "apache-2.0", "size": 77962 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,516,309
public boolean isForceTimeValid() { if (proxyAssignmentWindow.getActionType() == ActionType.TIMEFORCED && proxyAssignmentWindow.getForcedTime() == null) { notification.displayValidationError(i18n.getMessage("message.forcedTime.missing")); return false; } ...
boolean function() { if (proxyAssignmentWindow.getActionType() == ActionType.TIMEFORCED && proxyAssignmentWindow.getForcedTime() == null) { notification.displayValidationError(i18n.getMessage(STR)); return false; } return true; }
/** * Check if the time-forced date is valid * * @return boolean if time-forced date is valid or not */
Check if the time-forced date is valid
isForceTimeValid
{ "repo_name": "eclipse/hawkbit", "path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/miscs/DeploymentAssignmentWindowController.java", "license": "epl-1.0", "size": 8612 }
[ "org.eclipse.hawkbit.repository.model.Action" ]
import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.*;
[ "org.eclipse.hawkbit" ]
org.eclipse.hawkbit;
1,007,475
void initialise(MessagingEngine messagingEngine, InboundEventManager inboundEventManager, AndesContextInformationManager contextInformationManager, AndesSubscriptionManager subscriptionManager, DtxRegistry dtxRegistry ) { this....
void initialise(MessagingEngine messagingEngine, InboundEventManager inboundEventManager, AndesContextInformationManager contextInformationManager, AndesSubscriptionManager subscriptionManager, DtxRegistry dtxRegistry ) { this.contextInformationManager = contextInformationManager; this.messagingEngine = messagingEngine...
/** * Initialise is package specific. We don't need outsiders initialising the API */
Initialise is package specific. We don't need outsiders initialising the API
initialise
{ "repo_name": "ramith/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/Andes.java", "license": "apache-2.0", "size": 35104 }
[ "org.wso2.andes.kernel.disruptor.inbound.InboundEventManager", "org.wso2.andes.kernel.dtx.DtxRegistry", "org.wso2.andes.kernel.subscription.AndesSubscriptionManager" ]
import org.wso2.andes.kernel.disruptor.inbound.InboundEventManager; import org.wso2.andes.kernel.dtx.DtxRegistry; import org.wso2.andes.kernel.subscription.AndesSubscriptionManager;
import org.wso2.andes.kernel.disruptor.inbound.*; import org.wso2.andes.kernel.dtx.*; import org.wso2.andes.kernel.subscription.*;
[ "org.wso2.andes" ]
org.wso2.andes;
2,776,893
public default <A> TraversalSource withSideEffect(final String key, final Supplier<A> initialValue, final BinaryOperator<A> reducer) { final TraversalSource clone = this.clone(); SideEffectStrategy.addSideEffect(clone.getStrategies(), key, (A) initialValue, reducer); clone.getBytecode().addS...
default <A> TraversalSource function(final String key, final Supplier<A> initialValue, final BinaryOperator<A> reducer) { final TraversalSource clone = this.clone(); SideEffectStrategy.addSideEffect(clone.getStrategies(), key, (A) initialValue, reducer); clone.getBytecode().addSource(TraversalSource.Symbols.withSideEff...
/** * Add a sideEffect to be used throughout the life of a spawned {@link Traversal}. * This adds a {@link SideEffectStrategy} to the strategies. * * @param key the key of the sideEffect * @param initialValue a supplier that produces the initial value of the sideEffect * @param re...
Add a sideEffect to be used throughout the life of a spawned <code>Traversal</code>. This adds a <code>SideEffectStrategy</code> to the strategies
withSideEffect
{ "repo_name": "robertdale/tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalSource.java", "license": "apache-2.0", "size": 18985 }
[ "java.util.function.BinaryOperator", "java.util.function.Supplier", "org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SideEffectStrategy" ]
import java.util.function.BinaryOperator; import java.util.function.Supplier; import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SideEffectStrategy;
import java.util.function.*; import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.*;
[ "java.util", "org.apache.tinkerpop" ]
java.util; org.apache.tinkerpop;
2,870,512
public void registerElementDataset(JRFillElementDataset elementDataset) { List<JRFillElementDataset> elementDatasetsList; JRDatasetRun datasetRun = elementDataset.getDatasetRun(); if (datasetRun == null) { elementDatasetsList = elementDatasets; } else { String datasetName = datasetRun.getDataset...
void function(JRFillElementDataset elementDataset) { List<JRFillElementDataset> elementDatasetsList; JRDatasetRun datasetRun = elementDataset.getDatasetRun(); if (datasetRun == null) { elementDatasetsList = elementDatasets; } else { String datasetName = datasetRun.getDatasetName(); elementDatasetsList = elementDatasetM...
/** * Register an element dataset with the report filler. * * <p> * Registration of element datasets is required in order for the filler * to increment the datasets when iterating through the datasource. * * @param elementDataset the dataset to register */
Register an element dataset with the report filler. Registration of element datasets is required in order for the filler to increment the datasets when iterating through the datasource
registerElementDataset
{ "repo_name": "sikachu/jasperreports", "path": "src/net/sf/jasperreports/engine/fill/JRFillObjectFactory.java", "license": "lgpl-3.0", "size": 39222 }
[ "java.util.ArrayList", "java.util.List", "net.sf.jasperreports.engine.JRDatasetRun" ]
import java.util.ArrayList; import java.util.List; import net.sf.jasperreports.engine.JRDatasetRun;
import java.util.*; import net.sf.jasperreports.engine.*;
[ "java.util", "net.sf.jasperreports" ]
java.util; net.sf.jasperreports;
506,929
@Override public void execute(Job job, Meter meter, ServiceDirectory serviceDir) throws Exception { assert(job != null); Object inputGraph = job.getInputGraph(); Map<String,Object> params = job.getParameters(); this.execute(inputGraph, params, job, meter, serviceDir); }
void function(Job job, Meter meter, ServiceDirectory serviceDir) throws Exception { assert(job != null); Object inputGraph = job.getInputGraph(); Map<String,Object> params = job.getParameters(); this.execute(inputGraph, params, job, meter, serviceDir); }
/** * Entry point for the execution of the evolutionary algorithm */
Entry point for the execution of the evolutionary algorithm
execute
{ "repo_name": "saep/MONET-bundles", "path": "ea/src/com/github/monet/algorithms/ea/main/Evolution.java", "license": "agpl-3.0", "size": 5174 }
[ "com.github.monet.interfaces.Meter", "com.github.monet.worker.Job", "com.github.monet.worker.ServiceDirectory", "java.util.Map" ]
import com.github.monet.interfaces.Meter; import com.github.monet.worker.Job; import com.github.monet.worker.ServiceDirectory; import java.util.Map;
import com.github.monet.interfaces.*; import com.github.monet.worker.*; import java.util.*;
[ "com.github.monet", "java.util" ]
com.github.monet; java.util;
2,679,693
@Deprecated public ReadableDateTime getDate() { deprecated("getDate is no longer necessary on date fields as the value is now a date."); return getValue(); }
ReadableDateTime function() { deprecated(STR); return getValue(); }
/** * Fetch the first value. Added for backwards compatibility with 5.x when date fields were {@link Longs}. */
Fetch the first value. Added for backwards compatibility with 5.x when date fields were <code>Longs</code>
getDate
{ "repo_name": "s1monw/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/fielddata/ScriptDocValues.java", "license": "apache-2.0", "size": 21805 }
[ "org.joda.time.ReadableDateTime" ]
import org.joda.time.ReadableDateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,601,909
public IdentifyType identify() { IdentifyType identifyType = new IdentifyType(); //TODO fill actual info identifyType.setRepositoryName("The Repository"); identifyType.getAdminEmails().add("admin@example.com"); identifyType.setEarliestDatestamp("INSTALL_DATE"); //find earl...
IdentifyType function() { IdentifyType identifyType = new IdentifyType(); identifyType.setRepositoryName(STR); identifyType.getAdminEmails().add(STR); identifyType.setEarliestDatestamp(STR); identifyType.setDeletedRecord(DeletedRecordType.NO); identifyType.setGranularity(GranularityType.YYYY_MM_DD); identifyType.setPro...
/** * Provides basic info about the repository when identify verb is requested */
Provides basic info about the repository when identify verb is requested
identify
{ "repo_name": "FrozenOne/OAI-PMH-Provider-for-Dummies", "path": "src/main/java/com/inqool/oai/provider/OaiPmhConfiguration.java", "license": "apache-2.0", "size": 2989 }
[ "org.openarchives.oai._2.DeletedRecordType", "org.openarchives.oai._2.GranularityType", "org.openarchives.oai._2.IdentifyType" ]
import org.openarchives.oai._2.DeletedRecordType; import org.openarchives.oai._2.GranularityType; import org.openarchives.oai._2.IdentifyType;
import org.openarchives.oai.*;
[ "org.openarchives.oai" ]
org.openarchives.oai;
131,164
public static Image createImage(ImageData data) { return new Image(Display.getDefault(), data); }
static Image function(ImageData data) { return new Image(Display.getDefault(), data); }
/** * Create an image from the specified image data. * * @param data * the image data. * * @return an instance of an image. */
Create an image from the specified image data
createImage
{ "repo_name": "mbykovskyy/spritey", "path": "spritey.ui/src/spritey/ui/ImageFactory.java", "license": "gpl-3.0", "size": 9078 }
[ "org.eclipse.swt.graphics.Image", "org.eclipse.swt.graphics.ImageData", "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,703,784
@Generated @Selector("willSelectMessage:conversation:") public native void willSelectMessageConversation(MSMessage message, MSConversation conversation);
@Selector(STR) native void function(MSMessage message, MSConversation conversation);
/** * willSelectMessage:conversation: * <p> * Informs the extension that a new message will be selected in the conversation. * <p> * This method will not be called when the `presentationStyle` is `MSMessagesAppPresentationStyleTranscript` or the `presentationContext` is `MSMessagesAppPresentati...
willSelectMessage:conversation: Informs the extension that a new message will be selected in the conversation. This method will not be called when the `presentationStyle` is `MSMessagesAppPresentationStyleTranscript` or the `presentationContext` is `MSMessagesAppPresentationContextMedia`
willSelectMessageConversation
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/messages/MSMessagesAppViewController.java", "license": "apache-2.0", "size": 13145 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
974,965
public void endCDATA(Augmentations augs) throws XNIException { if (!isChildFragmentResolved()) { return; } super.endCDATA(augs); }
void function(Augmentations augs) throws XNIException { if (!isChildFragmentResolved()) { return; } super.endCDATA(augs); }
/** * The end of a CDATA section. * * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */
The end of a CDATA section
endCDATA
{ "repo_name": "openjdk/jdk8u", "path": "jaxp/src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java", "license": "gpl-2.0", "size": 46927 }
[ "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.XNIException" ]
import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.*;
[ "com.sun.org" ]
com.sun.org;
329,011
public static Bigquery.Builder newBigQueryClient(BigQueryOptions options) { return new Bigquery.Builder(getTransport(), getJsonFactory(), chainHttpRequestInitializer( options.getGcpCredential(), // Do not log 404. It clutters the output and is possibly even required by the ca...
static Bigquery.Builder function(BigQueryOptions options) { return new Bigquery.Builder(getTransport(), getJsonFactory(), chainHttpRequestInitializer( options.getGcpCredential(), new RetryHttpRequestInitializer(ImmutableList.of(404)))) .setApplicationName(options.getAppName()) .setGoogleClientRequestInitializer(options...
/** * Returns a BigQuery client builder. * * <p>Note: this client's endpoint is <b>not</b> modified by the * {@link DataflowPipelineDebugOptions#getApiRootUrl()} option. */
Returns a BigQuery client builder. Note: this client's endpoint is not modified by the <code>DataflowPipelineDebugOptions#getApiRootUrl()</code> option
newBigQueryClient
{ "repo_name": "Test-Betta-Inc/musical-umbrella", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/util/Transport.java", "license": "apache-2.0", "size": 7546 }
[ "com.google.api.services.bigquery.Bigquery", "com.google.cloud.dataflow.sdk.options.BigQueryOptions", "com.google.common.collect.ImmutableList" ]
import com.google.api.services.bigquery.Bigquery; import com.google.cloud.dataflow.sdk.options.BigQueryOptions; import com.google.common.collect.ImmutableList;
import com.google.api.services.bigquery.*; import com.google.cloud.dataflow.sdk.options.*; import com.google.common.collect.*;
[ "com.google.api", "com.google.cloud", "com.google.common" ]
com.google.api; com.google.cloud; com.google.common;
2,403,291
public void skip(K key) throws IOException, MessageException, ServiceException { ArrayList<ComposableRecordReader<K,?>> tmp = new ArrayList<ComposableRecordReader<K,?>>(); while (!q.isEmpty() && cmp.compare(q.peek().key(), key) <= 0) { tmp.add(q.poll()); } for (ComposableRecordReader<K,?> ...
void function(K key) throws IOException, MessageException, ServiceException { ArrayList<ComposableRecordReader<K,?>> tmp = new ArrayList<ComposableRecordReader<K,?>>(); while (!q.isEmpty() && cmp.compare(q.peek().key(), key) <= 0) { tmp.add(q.poll()); } for (ComposableRecordReader<K,?> rr : tmp) { rr.skip(key); if (rr....
/** * Pass skip key to child RRs. * @throws ServiceException * @throws MessageException */
Pass skip key to child RRs
skip
{ "repo_name": "hanhlh/hadoop-0.20.2_FatBTree", "path": "src/mapred/org/apache/hadoop/mapred/join/CompositeRecordReader.java", "license": "apache-2.0", "size": 13267 }
[ "java.io.IOException", "java.util.ArrayList", "org.apache.hadoop.hdfs.server.namenodeFBT.msg.MessageException", "org.apache.hadoop.hdfs.server.namenodeFBT.service.ServiceException" ]
import java.io.IOException; import java.util.ArrayList; import org.apache.hadoop.hdfs.server.namenodeFBT.msg.MessageException; import org.apache.hadoop.hdfs.server.namenodeFBT.service.ServiceException;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,618,001
protected static Session getSession(final Context context, final RequestMessage msg) { final String sessionId = (String) msg.getArgs().get(Tokens.ARGS_SESSION); logger.debug("In-session request {} for eval for session {} in thread {}", msg.getRequestId(), sessionId, Thread.currentTh...
static Session function(final Context context, final RequestMessage msg) { final String sessionId = (String) msg.getArgs().get(Tokens.ARGS_SESSION); logger.debug(STR, msg.getRequestId(), sessionId, Thread.currentThread().getName()); final Session session = sessions.computeIfAbsent(sessionId, k -> new Session(k, context...
/** * Examines the {@link RequestMessage} and extracts the session token. The session is then either found or a new * one is created. */
Examines the <code>RequestMessage</code> and extracts the session token. The session is then either found or a new one is created
getSession
{ "repo_name": "samiunn/incubator-tinkerpop", "path": "gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java", "license": "apache-2.0", "size": 12424 }
[ "java.util.function.Supplier", "org.apache.tinkerpop.gremlin.driver.Tokens", "org.apache.tinkerpop.gremlin.driver.message.RequestMessage", "org.apache.tinkerpop.gremlin.server.Context", "org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor" ]
import java.util.function.Supplier; import org.apache.tinkerpop.gremlin.driver.Tokens; import org.apache.tinkerpop.gremlin.driver.message.RequestMessage; import org.apache.tinkerpop.gremlin.server.Context; import org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor;
import java.util.function.*; import org.apache.tinkerpop.gremlin.driver.*; import org.apache.tinkerpop.gremlin.driver.message.*; import org.apache.tinkerpop.gremlin.server.*; import org.apache.tinkerpop.gremlin.server.op.*;
[ "java.util", "org.apache.tinkerpop" ]
java.util; org.apache.tinkerpop;
734,907
private boolean useTabHeading(SettingsItem parent) { // Do not add tab name, if the is a sub-group with a better title // The heading should only be added one time // Only use tab name, if no other sub-groups are used return parent.getType() != Type.SUB_GROUP && !subGroupTabNameUsed && !useSubGroups; }...
boolean function(SettingsItem parent) { return parent.getType() != Type.SUB_GROUP && !subGroupTabNameUsed && !useSubGroups; }
/** * Checks, if a heading with the tab name should be added. * * @param parent * The parent settings item * @return if the tab name should be added as heading */
Checks, if a heading with the tab name should be added
useTabHeading
{ "repo_name": "aborg0/rapidminer-studio", "path": "src/main/java/com/rapidminer/gui/properties/SettingsPropertyPanel.java", "license": "agpl-3.0", "size": 13104 }
[ "com.rapidminer.gui.properties.SettingsItem" ]
import com.rapidminer.gui.properties.SettingsItem;
import com.rapidminer.gui.properties.*;
[ "com.rapidminer.gui" ]
com.rapidminer.gui;
2,668,361
Page<WebDriver> confirmSignOut(boolean confirm);
Page<WebDriver> confirmSignOut(boolean confirm);
/** * Clicks OK or Cancel in sign-out confirmation dialog. * @param confirm * @return */
Clicks OK or Cancel in sign-out confirmation dialog
confirmSignOut
{ "repo_name": "Nasdanika/examples-bank-ui-driver", "path": "org.nasdanika.examples.bank.ui.driver.pages/src/org/nasdanika/examples/bank/ui/driver/pages/customer/CustomerPage.java", "license": "epl-1.0", "size": 563 }
[ "org.nasdanika.webtest.Page", "org.openqa.selenium.WebDriver" ]
import org.nasdanika.webtest.Page; import org.openqa.selenium.WebDriver;
import org.nasdanika.webtest.*; import org.openqa.selenium.*;
[ "org.nasdanika.webtest", "org.openqa.selenium" ]
org.nasdanika.webtest; org.openqa.selenium;
842,837
private static void _export(OutputStream os) throws BackingStoreException, IOException { String[] values = get(args()); OutputStreamWriter osw = new OutputStreamWriter(os); for (String string : values) { osw.write(string); osw.write("\n"); } ...
static void function(OutputStream os) throws BackingStoreException, IOException { String[] values = get(args()); OutputStreamWriter osw = new OutputStreamWriter(os); for (String string : values) { osw.write(string); osw.write("\n"); } osw.flush(); }
/** * Prints all properties as returned by {@link #get(String[])} to the * {@link OutputStream}. */
Prints all properties as returned by <code>#get(String[])</code> to the <code>OutputStream</code>
_export
{ "repo_name": "tp81/openmicroscopy", "path": "components/common/src/prefs.java", "license": "gpl-2.0", "size": 23701 }
[ "java.io.IOException", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.util.prefs.BackingStoreException" ]
import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.util.prefs.BackingStoreException;
import java.io.*; import java.util.prefs.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,364,845
List<PersonalMessageDbObjWithBLOBs> selectByExampleWithBLOBs( PersonalMessageDbObjExample example);
List<PersonalMessageDbObjWithBLOBs> selectByExampleWithBLOBs( PersonalMessageDbObjExample example);
/** * This method was generated by MyBatis Generator. This method corresponds to the database table PERSONAL_MESSAGE * @mbggenerated Wed Sep 06 19:27:46 EDT 2017 */
This method was generated by MyBatis Generator. This method corresponds to the database table PERSONAL_MESSAGE
selectByExampleWithBLOBs
{ "repo_name": "ZFGCCP/ZFGC3", "path": "src/main/java/com/zfgc/mappers/PersonalMessageDbObjMapper.java", "license": "mit", "size": 3894 }
[ "com.zfgc.dbobj.PersonalMessageDbObjExample", "com.zfgc.dbobj.PersonalMessageDbObjWithBLOBs", "java.util.List" ]
import com.zfgc.dbobj.PersonalMessageDbObjExample; import com.zfgc.dbobj.PersonalMessageDbObjWithBLOBs; import java.util.List;
import com.zfgc.dbobj.*; import java.util.*;
[ "com.zfgc.dbobj", "java.util" ]
com.zfgc.dbobj; java.util;
849,431
EventQueue.invokeLater(new Runnable() {
EventQueue.invokeLater(new Runnable() {
/** * Launch the application. */
Launch the application
main
{ "repo_name": "kiarnold/RiskSimlutator", "path": "src/gui/BoardFrame.java", "license": "mit", "size": 6279 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
969,215
protected void generateModelImpl(ClassRepository aRepository) throws IOException { for(ClassInfo curInfo : aRepository.getAllClassInfosIter()) { generateModelClass( curInfo); } }
void function(ClassRepository aRepository) throws IOException { for(ClassInfo curInfo : aRepository.getAllClassInfosIter()) { generateModelClass( curInfo); } }
/** * Create for all ClassInfo in the Repository the Files for the Model Classes * @param aRepository * @throws IOException */
Create for all ClassInfo in the Repository the Files for the Model Classes
generateModelImpl
{ "repo_name": "schnurlei/jdynameta", "path": "jdy/jdy.model.metadata/src/main/java/de/jdynameta/metamodel/application/ApplicationRepositoryClassFileGenerator.java", "license": "apache-2.0", "size": 15311 }
[ "de.jdynameta.base.metainfo.ClassInfo", "de.jdynameta.base.metainfo.ClassRepository", "java.io.IOException" ]
import de.jdynameta.base.metainfo.ClassInfo; import de.jdynameta.base.metainfo.ClassRepository; import java.io.IOException;
import de.jdynameta.base.metainfo.*; import java.io.*;
[ "de.jdynameta.base", "java.io" ]
de.jdynameta.base; java.io;
2,388,904
public static SplineSegment deserializePathPoint(StringTokenizer tokenizer) { SplineSegment point = new SplineSegment(); try { point.mLeftSidePosition = Double.parseDouble(tokenizer.nextToken()); point.mLeftSideVelocity = Double.parseDouble(tokenizer.nextToken())...
static SplineSegment function(StringTokenizer tokenizer) { SplineSegment point = new SplineSegment(); try { point.mLeftSidePosition = Double.parseDouble(tokenizer.nextToken()); point.mLeftSideVelocity = Double.parseDouble(tokenizer.nextToken()); point.mRightSidePosition = Double.parseDouble(tokenizer.nextToken()); poin...
/** * De-serializes a spline point from the given string * * @param tokenizer * The tokenizer containing the point to parse * * @return The de-serialized point */
De-serializes a spline point from the given string
deserializePathPoint
{ "repo_name": "ArcticWarriors/snobot-2017", "path": "SmartDashboardExtensions/2017SmartDashboardExtensions/src/com/snobot/sd/spline_plotter/IdealSplineSerializer.java", "license": "mit", "size": 3153 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
1,438,067
@Override public Service findService(String name) { if (name == null) { return (null); } synchronized (services) { for (int i = 0; i < services.length; i++) { if (name.equals(services[i].getName())) { return (services[...
Service function(String name) { if (name == null) { return (null); } synchronized (services) { for (int i = 0; i < services.length; i++) { if (name.equals(services[i].getName())) { return (services[i]); } } } return (null); }
/** * Return the specified Service (if it exists); otherwise return * <code>null</code>. * * @param name Name of the Service to be returned */
Return the specified Service (if it exists); otherwise return <code>null</code>
findService
{ "repo_name": "pistolove/sourcecode4junit", "path": "Source4Tomcat/src/org/apache/catalina/core/StandardServer.java", "license": "apache-2.0", "size": 26865 }
[ "org.apache.catalina.Service" ]
import org.apache.catalina.Service;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,727,405
public synchronized void setRecoveryCheckpointByName(String selectedCheckpoint) { if(isRunning) { throw new RuntimeException("may not set recovery Checkpoint after launch"); } Checkpoint recoveryCheckpoint = new Checkpoint(); recoveryCheckpoint.getCheckpointDir().setBase(...
synchronized void function(String selectedCheckpoint) { if(isRunning) { throw new RuntimeException(STR); } Checkpoint recoveryCheckpoint = new Checkpoint(); recoveryCheckpoint.getCheckpointDir().setBase(getCheckpointsDir()); recoveryCheckpoint.getCheckpointDir().setPath(selectedCheckpoint); recoveryCheckpoint.getCheckp...
/** * Given the name of a valid checkpoint subdirectory in the checkpoints * directory, create a Checkpoint instance, and insert it into all * Checkpointable beans. * * @param selectedCheckpoint */
Given the name of a valid checkpoint subdirectory in the checkpoints directory, create a Checkpoint instance, and insert it into all Checkpointable beans
setRecoveryCheckpointByName
{ "repo_name": "searchtechnologies/heritrix-connector", "path": "engine-3.1.1/engine/src/main/java/org/archive/crawler/framework/CheckpointService.java", "license": "apache-2.0", "size": 13022 }
[ "java.util.Map", "org.archive.checkpointing.Checkpoint", "org.archive.checkpointing.Checkpointable", "org.archive.spring.ConfigPathConfigurer" ]
import java.util.Map; import org.archive.checkpointing.Checkpoint; import org.archive.checkpointing.Checkpointable; import org.archive.spring.ConfigPathConfigurer;
import java.util.*; import org.archive.checkpointing.*; import org.archive.spring.*;
[ "java.util", "org.archive.checkpointing", "org.archive.spring" ]
java.util; org.archive.checkpointing; org.archive.spring;
1,087,653
public static <T> void forEachRemaining( final BulkFormat.Reader<T> reader, final Consumer<? super T> action) throws IOException { BulkFormat.RecordIterator<T> batch; RecordAndPosition<T> record; try { while ((batch = reader.readBatch()) != null) { while ((record = batch.next()) != null) { a...
static <T> void function( final BulkFormat.Reader<T> reader, final Consumer<? super T> action) throws IOException { BulkFormat.RecordIterator<T> batch; RecordAndPosition<T> record; try { while ((batch = reader.readBatch()) != null) { while ((record = batch.next()) != null) { action.accept(record.getRecord()); } batch.r...
/** * Performs the given action for each remaining element in {@link BulkFormat.Reader} until all * elements have been processed or the action throws an exception. */
Performs the given action for each remaining element in <code>BulkFormat.Reader</code> until all elements have been processed or the action throws an exception
forEachRemaining
{ "repo_name": "greghogan/flink", "path": "flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/src/util/Utils.java", "license": "apache-2.0", "size": 3029 }
[ "java.io.IOException", "java.util.function.Consumer", "org.apache.flink.connector.file.src.reader.BulkFormat" ]
import java.io.IOException; import java.util.function.Consumer; import org.apache.flink.connector.file.src.reader.BulkFormat;
import java.io.*; import java.util.function.*; import org.apache.flink.connector.file.src.reader.*;
[ "java.io", "java.util", "org.apache.flink" ]
java.io; java.util; org.apache.flink;
2,340,490
public final void setAnimation(AnimationHandler animation) { anim = animation; }
final void function(AnimationHandler animation) { anim = animation; }
/** * Sets the animation handler for this sprite. Once set, the animation will be played on this * sprite automatically, until set to {@code null}. * * @param animation The animation handler, or {@code null} to remove animation */
Sets the animation handler for this sprite. Once set, the animation will be played on this sprite automatically, until set to null
setAnimation
{ "repo_name": "hessan/artenus", "path": "src/main/java/com/annahid/libs/artenus/graphics/sprites/SpriteEntity.java", "license": "gpl-3.0", "size": 8518 }
[ "com.annahid.libs.artenus.graphics.animation.AnimationHandler" ]
import com.annahid.libs.artenus.graphics.animation.AnimationHandler;
import com.annahid.libs.artenus.graphics.animation.*;
[ "com.annahid.libs" ]
com.annahid.libs;
1,812,296
public BlobAuditingPolicyState state() { return this.state; }
BlobAuditingPolicyState function() { return this.state; }
/** * Get specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled'. * * @return the state value */
Get specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled'
state
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPolicyInner.java", "license": "mit", "size": 19971 }
[ "com.microsoft.azure.management.synapse.v2019_06_01_preview.BlobAuditingPolicyState" ]
import com.microsoft.azure.management.synapse.v2019_06_01_preview.BlobAuditingPolicyState;
import com.microsoft.azure.management.synapse.v2019_06_01_preview.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,849,146
private boolean allowAddToQueue(List<FileElement> queue, FileObject f, long gID, long userID) { if (f == null) return false; if (queue == null) return true; Object o = f.getFile(); if (f.isNewImage()) { return true; } File file = f.getTrueFile(); //check if file ...
boolean function(List<FileElement> queue, FileObject f, long gID, long userID) { if (f == null) return false; if (queue == null) return true; Object o = f.getFile(); if (f.isNewImage()) { return true; } File file = f.getTrueFile(); if (file == null) return false; Iterator<FileElement> i = queue.iterator(); FileElement ...
/** * Returns <code>true</code> if the file can be added to the queue again, * <code>false</code> otherwise. * * @param queue The list of files already in the queue. * @param f The file to check. * @param gID The id of the group to import the image into. * @param userID The id of the user. * @return Se...
Returns <code>true</code> if the file can be added to the queue again, <code>false</code> otherwise
allowAddToQueue
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/FileSelectionTable.java", "license": "gpl-2.0", "size": 24159 }
[ "java.io.File", "java.util.Iterator", "java.util.List", "org.openmicroscopy.shoola.env.data.model.FileObject" ]
import java.io.File; import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.env.data.model.FileObject;
import java.io.*; import java.util.*; import org.openmicroscopy.shoola.env.data.model.*;
[ "java.io", "java.util", "org.openmicroscopy.shoola" ]
java.io; java.util; org.openmicroscopy.shoola;
279,475
@Bean public CamelContext camelContext() throws Exception { CamelContext camelContext = createCamelContext(); setupCamelContext(camelContext); camelContext.build(); return camelContext; }
CamelContext function() throws Exception { CamelContext camelContext = createCamelContext(); setupCamelContext(camelContext); camelContext.build(); return camelContext; }
/** * Get's the {@link CamelContext} to be used. */
Get's the <code>CamelContext</code> to be used
camelContext
{ "repo_name": "adessaigne/camel", "path": "components/camel-spring-javaconfig/src/main/java/org/apache/camel/spring/javaconfig/CamelConfiguration.java", "license": "apache-2.0", "size": 7931 }
[ "org.apache.camel.CamelContext" ]
import org.apache.camel.CamelContext;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
240,416
public File getModelInstanceFile() { File result; IPath modelInstanceFilePath; String modelInstanceFileName; result = null; modelInstanceFileName = decodePath(getModelInstanceFileName()); if (modelInstanceFileName != null) { modelInstanceFilePath = new Path(modelInstanceFileName);...
File function() { File result; IPath modelInstanceFilePath; String modelInstanceFileName; result = null; modelInstanceFileName = decodePath(getModelInstanceFileName()); if (modelInstanceFileName != null) { modelInstanceFilePath = new Path(modelInstanceFileName); if (modelInstanceFilePath.getFileExtension().equalsIgnore...
/** * <p> * Returns a {@link File} representing the currently selected * {@link IModelInstance} file. * </p> * * @return The selected {@link IModelInstance} file or <code>null</code> if no * model instance is selected. */
Returns a <code>File</code> representing the currently selected <code>IModelInstance</code> file.
getModelInstanceFile
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.modelbus.ui/src/org/dresdenocl/modelbus/ui/internal/wizards/LoadModelInstancePage.java", "license": "lgpl-3.0", "size": 21850 }
[ "java.io.File", "org.dresdenocl.modelbus.util.ModelLoaderUtility", "org.dresdenocl.modelinstance.IModelInstance", "org.eclipse.core.runtime.IPath", "org.eclipse.core.runtime.Path" ]
import java.io.File; import org.dresdenocl.modelbus.util.ModelLoaderUtility; import org.dresdenocl.modelinstance.IModelInstance; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path;
import java.io.*; import org.dresdenocl.modelbus.util.*; import org.dresdenocl.modelinstance.*; import org.eclipse.core.runtime.*;
[ "java.io", "org.dresdenocl.modelbus", "org.dresdenocl.modelinstance", "org.eclipse.core" ]
java.io; org.dresdenocl.modelbus; org.dresdenocl.modelinstance; org.eclipse.core;
832,283
public TcpConnectionMXBean findConnectionByThreadId(long threadId) { TcpSocketLink conn = _server.findConnectionByThreadId(threadId); if (conn != null) return conn.getAdmin(); else return null; }
TcpConnectionMXBean function(long threadId) { TcpSocketLink conn = _server.findConnectionByThreadId(threadId); if (conn != null) return conn.getAdmin(); else return null; }
/** * Finds the ConnectionMXBean for a given thread id */
Finds the ConnectionMXBean for a given thread id
findConnectionByThreadId
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/server/cluster/ServerAdmin.java", "license": "gpl-2.0", "size": 9421 }
[ "com.caucho.management.server.TcpConnectionMXBean", "com.caucho.network.listen.TcpSocketLink" ]
import com.caucho.management.server.TcpConnectionMXBean; import com.caucho.network.listen.TcpSocketLink;
import com.caucho.management.server.*; import com.caucho.network.listen.*;
[ "com.caucho.management", "com.caucho.network" ]
com.caucho.management; com.caucho.network;
724,330
@SuppressWarnings("unchecked") public <T extends PolicyTO> T getPolicyTO(final Policy policy) { final PolicyTO policyTO; final boolean isGlobal = isGlobalPolicy(policy.getType()); switch (policy.getType()) { case GLOBAL_PASSWORD: case PASSWORD: i...
@SuppressWarnings(STR) <T extends PolicyTO> T function(final Policy policy) { final PolicyTO policyTO; final boolean isGlobal = isGlobalPolicy(policy.getType()); switch (policy.getType()) { case GLOBAL_PASSWORD: case PASSWORD: if (!(policy.getSpecification() instanceof PasswordPolicySpec)) { throw new ClassCastExceptio...
/** * Get policy TO from policy bean. * * @param policy bean. * @return policy TO. */
Get policy TO from policy bean
getPolicyTO
{ "repo_name": "brianchen2012/syncope", "path": "core/src/main/java/org/apache/syncope/core/rest/data/PolicyDataBinder.java", "license": "apache-2.0", "size": 6478 }
[ "org.apache.syncope.common.to.AccountPolicyTO", "org.apache.syncope.common.to.PasswordPolicyTO", "org.apache.syncope.common.to.PolicyTO", "org.apache.syncope.common.to.SyncPolicyTO", "org.apache.syncope.common.types.AccountPolicySpec", "org.apache.syncope.common.types.PasswordPolicySpec", "org.apache.sy...
import org.apache.syncope.common.to.AccountPolicyTO; import org.apache.syncope.common.to.PasswordPolicyTO; import org.apache.syncope.common.to.PolicyTO; import org.apache.syncope.common.to.SyncPolicyTO; import org.apache.syncope.common.types.AccountPolicySpec; import org.apache.syncope.common.types.PasswordPolicySpec; ...
import org.apache.syncope.common.to.*; import org.apache.syncope.common.types.*; import org.apache.syncope.core.persistence.beans.*;
[ "org.apache.syncope" ]
org.apache.syncope;
356,192
protected static SanitizedContent asAttributes(SanitizedContent content) { checkArgument( content.getContentKind() == SanitizedContent.ContentKind.ATTRIBUTES, "expected %s but got %s", SanitizedContent.ContentKind.ATTRIBUTES, content.getContentKind()); return cont...
static SanitizedContent function(SanitizedContent content) { checkArgument( content.getContentKind() == SanitizedContent.ContentKind.ATTRIBUTES, STR, SanitizedContent.ContentKind.ATTRIBUTES, content.getContentKind()); return content; }
/** * Validates that {@code content} is of type ATTRIBUTES. * * @throws NullPointerException if content is null. */
Validates that content is of type ATTRIBUTES
asAttributes
{ "repo_name": "google/closure-templates", "path": "java/src/com/google/template/soy/data/BaseSoyTemplateImpl.java", "license": "apache-2.0", "size": 19121 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,641,569
protected void writeCharacters( TextPosition text ) throws IOException { output.write( text.getCharacter() ); }
void function( TextPosition text ) throws IOException { output.write( text.getCharacter() ); }
/** * Write the string in TextPosition to the output stream. * * @param text The text to write to the stream. * @throws IOException If there is an error when writing the text. */
Write the string in TextPosition to the output stream
writeCharacters
{ "repo_name": "phatn/lapdftext", "path": "src/main/java/edu/isi/bmkeg/lapdf/extraction/LAPDFTextStripper.java", "license": "gpl-3.0", "size": 74251 }
[ "java.io.IOException", "org.apache.pdfbox.util.TextPosition" ]
import java.io.IOException; import org.apache.pdfbox.util.TextPosition;
import java.io.*; import org.apache.pdfbox.util.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
1,492,836
public static BoxBrowseFolderActivity.IntentBuilder createIntentBuilder(final Context context, final BoxSession session){ return new IntentBuilder(context, session); } public static class IntentBuilder extends BoxBrowseActivity.IntentBuilder<IntentBuilder>{ protected IntentBuilder(fi...
static BoxBrowseFolderActivity.IntentBuilder function(final Context context, final BoxSession session){ return new IntentBuilder(context, session); } public static class IntentBuilder extends BoxBrowseActivity.IntentBuilder<IntentBuilder>{ protected IntentBuilder(final Context context, final BoxSession session){ super(...
/** * Create a builder object that can be used to construct an intent to launch an instance of this activity. * @param context current context. * @param session a session, should be already authenticated. * @return a builder object to use to construct an instance of this class. */
Create a builder object that can be used to construct an intent to launch an instance of this activity
createIntentBuilder
{ "repo_name": "triveous/box-android-browse-sdk", "path": "box-browse-sdk/src/main/java/com/box/androidsdk/browse/activities/BoxBrowseFolderActivity.java", "license": "apache-2.0", "size": 8730 }
[ "android.content.Context", "com.box.androidsdk.content.models.BoxSession" ]
import android.content.Context; import com.box.androidsdk.content.models.BoxSession;
import android.content.*; import com.box.androidsdk.content.models.*;
[ "android.content", "com.box.androidsdk" ]
android.content; com.box.androidsdk;
2,799,195
private static Point getIntersection(Shape shape, Line2D.Double line) { if (shape instanceof Ellipse2D) { return getEllipseIntersection(shape, line); } else if (shape instanceof Rectangle2D || shape instanceof Path2D) { return getShapeIntersection(shape, line); } else...
static Point function(Shape shape, Line2D.Double line) { if (shape instanceof Ellipse2D) { return getEllipseIntersection(shape, line); } else if (shape instanceof Rectangle2D shape instanceof Path2D) { return getShapeIntersection(shape, line); } else { return null; } }
/** * This method returns intersection point of shape border and line. * * @param shape * @param line * @return Point */
This method returns intersection point of shape border and line
getIntersection
{ "repo_name": "ms123s/simpl4-src", "path": "bundles/process/src/main/java/org/ms123/common/process/image/impl/DefaultProcessDiagramCanvas.java", "license": "apache-2.0", "size": 57624 }
[ "java.awt.Point", "java.awt.Shape", "java.awt.geom.Ellipse2D", "java.awt.geom.Line2D", "java.awt.geom.Path2D", "java.awt.geom.Rectangle2D" ]
import java.awt.Point; import java.awt.Shape; import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import java.awt.geom.Path2D; import java.awt.geom.Rectangle2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
974,732
public static void dumpDictToBuffer(Map<String, Integer> strToInt, FastStringBuffer buf2) { Iterator<Entry<String, Integer>> it = strToInt.entrySet().iterator(); buf2.append("-- START DICTIONARY\n"); buf2.append(strToInt.size()); buf2.append('\n'); while (it.hasNext()) { ...
static void function(Map<String, Integer> strToInt, FastStringBuffer buf2) { Iterator<Entry<String, Integer>> it = strToInt.entrySet().iterator(); buf2.append(STR); buf2.append(strToInt.size()); buf2.append('\n'); while (it.hasNext()) { Entry<String, Integer> next = it.next(); buf2.append(next.getValue()); buf2.append(...
/** * Dict format is the following: * -- START DICTIONARY * dictionary size * name=integer */
Dict format is the following: -- START DICTIONARY dictionary size name=integer
dumpDictToBuffer
{ "repo_name": "RandallDW/Aruba_plugin", "path": "plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/additionalinfo/TreeIO.java", "license": "epl-1.0", "size": 11754 }
[ "java.util.HashSet", "java.util.Iterator", "java.util.Map", "org.python.pydev.shared_core.string.FastStringBuffer" ]
import java.util.HashSet; import java.util.Iterator; import java.util.Map; import org.python.pydev.shared_core.string.FastStringBuffer;
import java.util.*; import org.python.pydev.shared_core.string.*;
[ "java.util", "org.python.pydev" ]
java.util; org.python.pydev;
2,063,851
public void onEvent( SelectMessageEvent e ) { openFloatButtons(); } //------------------------------------------------ /** * Show single instance of {@link com.hpush.app.activities.MainActivity}
void function( SelectMessageEvent e ) { openFloatButtons(); } /** * Show single instance of {@link com.hpush.app.activities.MainActivity}
/** * Handler for {@link SelectMessageEvent}. * * @param e * Event {@link SelectMessageEvent}. */
Handler for <code>SelectMessageEvent</code>
onEvent
{ "repo_name": "XinyueZ/hpush", "path": "app/src/main/java/com/hpush/app/activities/MainActivity.java", "license": "mit", "size": 23053 }
[ "com.hpush.bus.SelectMessageEvent" ]
import com.hpush.bus.SelectMessageEvent;
import com.hpush.bus.*;
[ "com.hpush.bus" ]
com.hpush.bus;
227,278
protected void encode(final byte[] buffer, final int length, final long presentationTimeUs) { if (!mIsCapturing) return; int ix = 0, sz; final ByteBuffer[] inputBuffers = mMediaCodec.getInputBuffers(); while (mIsCapturing && ix < length) { final int inputBufferIndex = mMediaCodec....
void function(final byte[] buffer, final int length, final long presentationTimeUs) { if (!mIsCapturing) return; int ix = 0, sz; final ByteBuffer[] inputBuffers = mMediaCodec.getInputBuffers(); while (mIsCapturing && ix < length) { final int inputBufferIndex = mMediaCodec.dequeueInputBuffer(TIMEOUT_USEC); if (inputBuff...
/** * Method to set byte array to the MediaCodec encoder * @param buffer * @param length length of byte array, zero means EOS. * @param presentationTimeUs */
Method to set byte array to the MediaCodec encoder
encode
{ "repo_name": "smarani/InfraShareMobile", "path": "InfraShare Mobile/app/src/main/java/stephmarani/infragram/video/Encoder.java", "license": "apache-2.0", "size": 14750 }
[ "android.media.MediaCodec", "android.util.Log", "java.nio.ByteBuffer" ]
import android.media.MediaCodec; import android.util.Log; import java.nio.ByteBuffer;
import android.media.*; import android.util.*; import java.nio.*;
[ "android.media", "android.util", "java.nio" ]
android.media; android.util; java.nio;
766,564
Set addMembershipListenerAndGetDistributionManagerIds(MembershipListener l);
Set addMembershipListenerAndGetDistributionManagerIds(MembershipListener l);
/** * Add a membership listener and return other DistribtionManagerIds as an atomic operation */
Add a membership listener and return other DistribtionManagerIds as an atomic operation
addMembershipListenerAndGetDistributionManagerIds
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionManager.java", "license": "apache-2.0", "size": 15635 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,473,683