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 String getProperty(String property) { Project currentProject = getProject(); if (currentProject != null) { return currentProject.getProperty(property); } else { return properties.getProperty(property); } }
String function(String property) { Project currentProject = getProject(); if (currentProject != null) { return currentProject.getProperty(property); } else { return properties.getProperty(property); } }
/** * Get Property * @param property name * @return The property value */
Get Property
getProperty
{ "repo_name": "SourceStudyNotes/Tomcat8", "path": "src/main/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java", "license": "apache-2.0", "size": 22357 }
[ "org.apache.tools.ant.Project" ]
import org.apache.tools.ant.Project;
import org.apache.tools.ant.*;
[ "org.apache.tools" ]
org.apache.tools;
1,051,643
@Validate private void start() throws ServletException, NamespaceException, Exception { httpService.registerServlet(SERVLET_ALIAS, this, null, null); LOG.info(getClass().getName() + "::Start"); }
void function() throws ServletException, NamespaceException, Exception { httpService.registerServlet(SERVLET_ALIAS, this, null, null); LOG.info(getClass().getName() + STR); }
/** * Called on bundle startup. * * @throws NamespaceException * if the registration fails because the alias is already in use * @throws ServletException * if the servlet's init method throws an exception, * or the given servlet object has already been...
Called on bundle startup
start
{ "repo_name": "hnunner/osgi-servlet", "path": "ipojo/instantiate/src/main/java/com/adviser/osgi/servlet/ipojo/instantiate/IpojoServletInstantiate.java", "license": "apache-2.0", "size": 2345 }
[ "javax.servlet.ServletException", "org.osgi.service.http.NamespaceException" ]
import javax.servlet.ServletException; import org.osgi.service.http.NamespaceException;
import javax.servlet.*; import org.osgi.service.http.*;
[ "javax.servlet", "org.osgi.service" ]
javax.servlet; org.osgi.service;
1,704,141
public void addTags(Connection c, String value) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "network.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(t...
void function(Connection c, String value) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; Map response = c.dispatch(meth...
/** * Add the given value to the tags field of the given network. If the value is already in that Set, then do nothing. * * @param value New value to add */
Add the given value to the tags field of the given network. If the value is already in that Set, then do nothing
addTags
{ "repo_name": "mufaddalq/cloudstack-datera-driver", "path": "deps/XenServerJava/src/com/xensource/xenapi/Network.java", "license": "apache-2.0", "size": 30009 }
[ "com.xensource.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.xensource.xenapi", "java.util", "org.apache.xmlrpc" ]
com.xensource.xenapi; java.util; org.apache.xmlrpc;
2,336,341
@Indexable(type = IndexableType.REINDEX) public Entitlement updateEntitlement(Entitlement entitlement, boolean merge) throws SystemException { entitlement.setNew(false); return entitlementPersistence.update(entitlement, merge); }
@Indexable(type = IndexableType.REINDEX) Entitlement function(Entitlement entitlement, boolean merge) throws SystemException { entitlement.setNew(false); return entitlementPersistence.update(entitlement, merge); }
/** * Updates the entitlement in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * * @param entitlement the entitlement * @param merge whether to merge the entitlement with the current session. See {@link com.liferay.portal.service.persistence.BatchSe...
Updates the entitlement in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners
updateEntitlement
{ "repo_name": "fraunhoferfokus/govapps", "path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/EntitlementLocalServiceBaseImpl.java", "license": "bsd-3-clause", "size": 42460 }
[ "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.search.Indexable", "com.liferay.portal.kernel.search.IndexableType", "de.fraunhofer.fokus.movepla.model.Entitlement" ]
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.search.Indexable; import com.liferay.portal.kernel.search.IndexableType; import de.fraunhofer.fokus.movepla.model.Entitlement;
import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.search.*; import de.fraunhofer.fokus.movepla.model.*;
[ "com.liferay.portal", "de.fraunhofer.fokus" ]
com.liferay.portal; de.fraunhofer.fokus;
2,476,669
private static void copyPerSnippetInfo(SnippetSheet snippetSheet, SpdxDocument analysis, Map<String, SpdxFile> fileIdToFile) throws InvalidSPDXAnalysisException, SpreadsheetException { int i = snippetSheet.getFirstDataRow(); SpdxSnippet snippet = snippetSheet.getSnippet(i, analysis.getDocumentContainer()); ...
static void function(SnippetSheet snippetSheet, SpdxDocument analysis, Map<String, SpdxFile> fileIdToFile) throws InvalidSPDXAnalysisException, SpreadsheetException { int i = snippetSheet.getFirstDataRow(); SpdxSnippet snippet = snippetSheet.getSnippet(i, analysis.getDocumentContainer()); while (snippet != null) { anal...
/** * Copy snippet information from the spreadsheet to the analysis document * @param snippetSheet * @param analysis * @param fileIdToFile * @throws InvalidSPDXAnalysisException * @throws SpreadsheetException */
Copy snippet information from the spreadsheet to the analysis document
copyPerSnippetInfo
{ "repo_name": "spdx/tools", "path": "src/org/spdx/tools/SpreadsheetToRDF.java", "license": "apache-2.0", "size": 15840 }
[ "java.util.Map", "org.spdx.rdfparser.InvalidSPDXAnalysisException", "org.spdx.rdfparser.model.SpdxDocument", "org.spdx.rdfparser.model.SpdxFile", "org.spdx.rdfparser.model.SpdxSnippet", "org.spdx.spdxspreadsheet.SnippetSheet", "org.spdx.spdxspreadsheet.SpreadsheetException" ]
import java.util.Map; import org.spdx.rdfparser.InvalidSPDXAnalysisException; import org.spdx.rdfparser.model.SpdxDocument; import org.spdx.rdfparser.model.SpdxFile; import org.spdx.rdfparser.model.SpdxSnippet; import org.spdx.spdxspreadsheet.SnippetSheet; import org.spdx.spdxspreadsheet.SpreadsheetException;
import java.util.*; import org.spdx.rdfparser.*; import org.spdx.rdfparser.model.*; import org.spdx.spdxspreadsheet.*;
[ "java.util", "org.spdx.rdfparser", "org.spdx.spdxspreadsheet" ]
java.util; org.spdx.rdfparser; org.spdx.spdxspreadsheet;
2,421,463
public double checkMark(File stegoFile, File origSigFile) throws OpenStegoException { if(!this.plugin.getPurposes().contains(OpenStegoPlugin.Purpose.WATERMARKING)) { throw new OpenStegoException(null, OpenStego.NAMESPACE, OpenStegoException.PLUGIN_DOES_NOT_SUPPORT_WM); }...
double function(File stegoFile, File origSigFile) throws OpenStegoException { if(!this.plugin.getPurposes().contains(OpenStegoPlugin.Purpose.WATERMARKING)) { throw new OpenStegoException(null, OpenStego.NAMESPACE, OpenStegoException.PLUGIN_DOES_NOT_SUPPORT_WM); } double correl = checkMark(CommonUtil.getFileBytes(stegoF...
/** * Method to check the correlation for the given image and the original signature (alternate API) * * @param stegoFile Stego file from which watermark needs to be extracted * @param origSigFile Original signature file * @return Correlation * @throws OpenStegoException */
Method to check the correlation for the given image and the original signature (alternate API)
checkMark
{ "repo_name": "seglo/openstego", "path": "src/net/sourceforge/openstego/OpenStego.java", "license": "gpl-2.0", "size": 18801 }
[ "java.io.File", "net.sourceforge.openstego.util.CommonUtil" ]
import java.io.File; import net.sourceforge.openstego.util.CommonUtil;
import java.io.*; import net.sourceforge.openstego.util.*;
[ "java.io", "net.sourceforge.openstego" ]
java.io; net.sourceforge.openstego;
1,763,484
void setZ(INDArray z);
void setZ(INDArray z);
/** * set z (the solution ndarray) * @param z */
set z (the solution ndarray)
setZ
{ "repo_name": "smarthi/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/Op.java", "license": "apache-2.0", "size": 4862 }
[ "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
1,559,537
private void handleSearchedWeatherData(List<WeatherData> results) { if ((null == results) || results.size() == 0 || null == results.get(0)) { displayInformation("No Result Found"); return; } // retrieve the result and cache it. WeatherData weatherData = results.get(0); cacheWeatherData(weath...
void function(List<WeatherData> results) { if ((null == results) results.size() == 0 null == results.get(0)) { displayInformation(STR); return; } WeatherData weatherData = results.get(0); cacheWeatherData(weatherData); displayWeatherData(weatherData); }
/** * Handle searched Weather Data from Sync / Async Service * * @param results */
Handle searched Weather Data from Sync / Async Service
handleSearchedWeatherData
{ "repo_name": "marastu/Weather-Service-", "path": "src/com/weatherservice/operations/WeatherOpImp.java", "license": "mit", "size": 11514 }
[ "com.weather.aidl.WeatherData", "java.util.List" ]
import com.weather.aidl.WeatherData; import java.util.List;
import com.weather.aidl.*; import java.util.*;
[ "com.weather.aidl", "java.util" ]
com.weather.aidl; java.util;
388,062
void checkStatementEligibleForBatching(String sql) throws SQLException { SqlCommand nativeCmd = null; if (isEligibleForNativeParsing(sql)) nativeCmd = tryParseNative(sql); if (nativeCmd != null) { assert nativeCmd instanceof SqlSetStreamingCommand; thro...
void checkStatementEligibleForBatching(String sql) throws SQLException { SqlCommand nativeCmd = null; if (isEligibleForNativeParsing(sql)) nativeCmd = tryParseNative(sql); if (nativeCmd != null) { assert nativeCmd instanceof SqlSetStreamingCommand; throw new SQLException(STR + STR, SqlStateCode.UNSUPPORTED_OPERATION); ...
/** * Check that we're not trying to add to connection's batch a native command (it should be executed explicitly). * @param sql SQL command. * @throws SQLException if there's an attempt to add a native command to JDBC batch. */
Check that we're not trying to add to connection's batch a native command (it should be executed explicitly)
checkStatementEligibleForBatching
{ "repo_name": "amirakhmedov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinStatement.java", "license": "apache-2.0", "size": 26957 }
[ "java.sql.SQLException", "org.apache.ignite.internal.processors.odbc.SqlStateCode", "org.apache.ignite.internal.sql.command.SqlCommand", "org.apache.ignite.internal.sql.command.SqlSetStreamingCommand" ]
import java.sql.SQLException; import org.apache.ignite.internal.processors.odbc.SqlStateCode; import org.apache.ignite.internal.sql.command.SqlCommand; import org.apache.ignite.internal.sql.command.SqlSetStreamingCommand;
import java.sql.*; import org.apache.ignite.internal.processors.odbc.*; import org.apache.ignite.internal.sql.command.*;
[ "java.sql", "org.apache.ignite" ]
java.sql; org.apache.ignite;
2,386,539
public Set<GedcomIndividual> getChildrenOfIndividual(GedcomIndividual individual) { return getChildrenOfIndividual(individual.getId()); }
Set<GedcomIndividual> function(GedcomIndividual individual) { return getChildrenOfIndividual(individual.getId()); }
/** * * * <b>Note:</b> Depends on the collection of information through {@link #buildFamilyRelations()}. * Calls {@link #buildFamilyRelations()} before returning the * result if any structures have been added or removed after the last call * to {@link #buildFamilyRelations()}, thus calling this method ...
Note: Depends on the collection of information through <code>#buildFamilyRelations()</code>. Calls <code>#buildFamilyRelations()</code> before returning the result if any structures have been added or removed after the last call to <code>#buildFamilyRelations()</code>, thus calling this method repeatedly after adding/r...
getChildrenOfIndividual
{ "repo_name": "thnaeff/GedcomCreator", "path": "src/main/java/ch/thn/gedcom/creator/GedcomCreatorStructureStorage.java", "license": "apache-2.0", "size": 30388 }
[ "ch.thn.gedcom.creator.structures.GedcomIndividual", "java.util.Set" ]
import ch.thn.gedcom.creator.structures.GedcomIndividual; import java.util.Set;
import ch.thn.gedcom.creator.structures.*; import java.util.*;
[ "ch.thn.gedcom", "java.util" ]
ch.thn.gedcom; java.util;
514,772
protected void addComponent(XMLComponent component) { // don't add a component more than once if (fComponents.contains(component)) { return; } fComponents.add(component); addRecognizedParamsAndSetDefaults(component); } // addComponent(XMLComponent)
void function(XMLComponent component) { if (fComponents.contains(component)) { return; } fComponents.add(component); addRecognizedParamsAndSetDefaults(component); }
/** * Adds a component to the parser configuration. This method will * also add all of the component's recognized features and properties * to the list of default recognized features and properties. * * @param component The component to add. */
Adds a component to the parser configuration. This method will also add all of the component's recognized features and properties to the list of default recognized features and properties
addComponent
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java", "license": "apache-2.0", "size": 48061 }
[ "com.sun.org.apache.xerces.internal.xni.parser.XMLComponent" ]
import com.sun.org.apache.xerces.internal.xni.parser.XMLComponent;
import com.sun.org.apache.xerces.internal.xni.parser.*;
[ "com.sun.org" ]
com.sun.org;
2,712,933
@Override public void endPrefixMapping(String prefix) throws SAXException { println("endPrefixMapping...\n" + "prefix: " + prefix); }
void function(String prefix) throws SAXException { println(STR + STR + prefix); }
/** * Write endPrefixMapping tag along with prefix to the file when meet * endPrefixMapping event. * @throws IOException error happen when writing file. */
Write endPrefixMapping tag along with prefix to the file when meet endPrefixMapping event
endPrefixMapping
{ "repo_name": "lostdj/Jaklin-OpenJDK-JAXP", "path": "test/javax/xml/jaxp/functional/org/xml/sax/ptests/ContentHandlerTest.java", "license": "gpl-2.0", "size": 8901 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,246,381
public ServiceSpecification serviceSpecification() { return this.serviceSpecification; }
ServiceSpecification function() { return this.serviceSpecification; }
/** * Get the serviceSpecification property: Service specification. * * @return the serviceSpecification value. */
Get the serviceSpecification property: Service specification
serviceSpecification
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/fluent/models/OperationInner.java", "license": "mit", "size": 3702 }
[ "com.azure.resourcemanager.databoxedge.models.ServiceSpecification" ]
import com.azure.resourcemanager.databoxedge.models.ServiceSpecification;
import com.azure.resourcemanager.databoxedge.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,211,278
public boolean hasPanelAccess(Panel panel, User user, DelfoiActionName actionName) { if (panel == null) { logger.warn("Panel was null when checking panel access"); return false; } if (user == null) { logger.warn("User was null when checking panel access"); return false; } ...
boolean function(Panel panel, User user, DelfoiActionName actionName) { if (panel == null) { logger.warn(STR); return false; } if (user == null) { logger.warn(STR); return false; } if (isSuperUser(user)) { return true; } UserRole userRole = getPanelRole(user, panel); if (userRole == null) { return false; } DelfoiAction...
/** * Returns whether user has required panel action access * * @param panel panel * @param user user * @param actionName action * @return whether user role required action access */
Returns whether user has required panel action access
hasPanelAccess
{ "repo_name": "Metatavu/edelphi", "path": "rest/src/main/java/fi/metatavu/edelphi/permissions/PermissionController.java", "license": "gpl-3.0", "size": 5541 }
[ "fi.metatavu.edelphi.domainmodel.actions.DelfoiAction", "fi.metatavu.edelphi.domainmodel.panels.Panel", "fi.metatavu.edelphi.domainmodel.users.User", "fi.metatavu.edelphi.domainmodel.users.UserRole" ]
import fi.metatavu.edelphi.domainmodel.actions.DelfoiAction; import fi.metatavu.edelphi.domainmodel.panels.Panel; import fi.metatavu.edelphi.domainmodel.users.User; import fi.metatavu.edelphi.domainmodel.users.UserRole;
import fi.metatavu.edelphi.domainmodel.actions.*; import fi.metatavu.edelphi.domainmodel.panels.*; import fi.metatavu.edelphi.domainmodel.users.*;
[ "fi.metatavu.edelphi" ]
fi.metatavu.edelphi;
1,912,397
public AccessibleRole getAccessibleRole() { return AccessibleRole.LABEL; } } // inner class AccessibleAWTLabel
AccessibleRole function() { return AccessibleRole.LABEL; } }
/** * Get the role of this object. * * @return an instance of AccessibleRole describing the role of the object * @see AccessibleRole */
Get the role of this object
getAccessibleRole
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/java/awt/Label.java", "license": "apache-2.0", "size": 11881 }
[ "javax.accessibility.AccessibleRole" ]
import javax.accessibility.AccessibleRole;
import javax.accessibility.*;
[ "javax.accessibility" ]
javax.accessibility;
2,433,848
@Authorized( { PrivilegeConstants.PURGE_PERSONS }) public void purgePerson(Person person) throws APIException;
@Authorized( { PrivilegeConstants.PURGE_PERSONS }) void function(Person person) throws APIException;
/** * Purges a person from the database (cannot be undone) * * @param person person to be purged from the database * @throws APIException * @should delete person from the database */
Purges a person from the database (cannot be undone)
purgePerson
{ "repo_name": "Bhamni/openmrs-core", "path": "api/src/main/java/org/openmrs/api/PersonService.java", "license": "mpl-2.0", "size": 41991 }
[ "org.openmrs.Person", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import org.openmrs.Person; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "org.openmrs", "org.openmrs.annotation", "org.openmrs.util" ]
org.openmrs; org.openmrs.annotation; org.openmrs.util;
1,998,986
public UUID getCommandId() { return Preconditions.checkNotNull(commandId); }
UUID function() { return Preconditions.checkNotNull(commandId); }
/** * Returns the UUID that Blaze uses to identify everything logged from the current build command. * It's also used to invalidate Skyframe nodes that are specific to a certain invocation, such as * the build info. */
Returns the UUID that Blaze uses to identify everything logged from the current build command. It's also used to invalidate Skyframe nodes that are specific to a certain invocation, such as the build info
getCommandId
{ "repo_name": "spxtr/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java", "license": "apache-2.0", "size": 23235 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
452,380
public String getOutputFormatClassName() { return getClass( PAMapReduceFrameworkProperties .getPropertyAsString(PAMapReduceFrameworkProperties.HADOOP_OUTPUT_FORMAT_CLASS_PROPERTY_NAME .getKey()), TextOutputFormat.class).getName(); }
String function() { return getClass( PAMapReduceFrameworkProperties .getPropertyAsString(PAMapReduceFrameworkProperties.HADOOP_OUTPUT_FORMAT_CLASS_PROPERTY_NAME .getKey()), TextOutputFormat.class).getName(); }
/** * Retrieve the {@link OutputFormat} class for the Hadoop job * * @return the {@link OutputFormat} class */
Retrieve the <code>OutputFormat</code> class for the Hadoop job
getOutputFormatClassName
{ "repo_name": "acontes/scheduling", "path": "src/scheduler/src/org/ow2/proactive/scheduler/ext/mapreduce/PAHadoopJobConfiguration.java", "license": "agpl-3.0", "size": 16286 }
[ "org.apache.hadoop.mapreduce.lib.output.TextOutputFormat" ]
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
243,453
public String getDefaultString(JaamSimModel simModel) { if (defValue == null) return ""; return defValue.toString(); }
String function(JaamSimModel simModel) { if (defValue == null) return ""; return defValue.toString(); }
/** * Returns a string representing the default value for the input using the preferred units * specified for the simulation model. * @param simModel - simulation model * @return string representing the default value */
Returns a string representing the default value for the input using the preferred units specified for the simulation model
getDefaultString
{ "repo_name": "jaamsim/jaamsim", "path": "src/main/java/com/jaamsim/input/Input.java", "license": "apache-2.0", "size": 63708 }
[ "com.jaamsim.basicsim.JaamSimModel" ]
import com.jaamsim.basicsim.JaamSimModel;
import com.jaamsim.basicsim.*;
[ "com.jaamsim.basicsim" ]
com.jaamsim.basicsim;
334,841
public static <PROMISE extends ScriptObject> PROMISE IfAbruptRejectPromise(ExecutionContext cx, ScriptException e, PromiseCapability<PROMISE> capability) { capability.getReject().call(cx, UNDEFINED, e.getValue()); return capability.getPromise(); }
static <PROMISE extends ScriptObject> PROMISE function(ExecutionContext cx, ScriptException e, PromiseCapability<PROMISE> capability) { capability.getReject().call(cx, UNDEFINED, e.getValue()); return capability.getPromise(); }
/** * 25.4.1.1.1 IfAbruptRejectPromise (value, capability) * * @param <PROMISE> * the promise type * @param cx * the execution context * @param e * the script exception * @param capability * the promise capability record ...
25.4.1.1.1 IfAbruptRejectPromise (value, capability)
IfAbruptRejectPromise
{ "repo_name": "jugglinmike/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/objects/promise/PromiseCapability.java", "license": "mit", "size": 2784 }
[ "com.github.anba.es6draft.runtime.ExecutionContext", "com.github.anba.es6draft.runtime.internal.ScriptException", "com.github.anba.es6draft.runtime.types.ScriptObject" ]
import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.internal.ScriptException; import com.github.anba.es6draft.runtime.types.ScriptObject;
import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*; import com.github.anba.es6draft.runtime.types.*;
[ "com.github.anba" ]
com.github.anba;
724,065
private Context getURLContext(String name) throws NamingException { int schemeIndex = name.indexOf(":"); if (schemeIndex != -1) { String scheme = name.substring(0, schemeIndex); return NamingManager.getURLContext(scheme, env); } return null; }
Context function(String name) throws NamingException { int schemeIndex = name.indexOf(":"); if (schemeIndex != -1) { String scheme = name.substring(0, schemeIndex); return NamingManager.getURLContext(scheme, env); } return null; }
/** * Get the URL context given a name based on the scheme of the URL. * * @param name The name to get the URL context for * @return The URL context for the name * @throws NamingException */
Get the URL context given a name based on the scheme of the URL
getURLContext
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.kernel.service/src/com/ibm/ws/kernel/pseudo/internal/PseudoContext.java", "license": "epl-1.0", "size": 7318 }
[ "javax.naming.Context", "javax.naming.NamingException", "javax.naming.spi.NamingManager" ]
import javax.naming.Context; import javax.naming.NamingException; import javax.naming.spi.NamingManager;
import javax.naming.*; import javax.naming.spi.*;
[ "javax.naming" ]
javax.naming;
979,751
public static <T> T findByType(CamelContext camelContext, Class<T> type) { Set<T> set = camelContext.getRegistry().findByType(type); if (set.size() == 1) { return set.iterator().next(); } return null; }
static <T> T function(CamelContext camelContext, Class<T> type) { Set<T> set = camelContext.getRegistry().findByType(type); if (set.size() == 1) { return set.iterator().next(); } return null; }
/** * Look up a bean of the give type in the {@link org.apache.camel.spi.Registry} on the * {@link CamelContext} returning an instance if only one bean is present, */
Look up a bean of the give type in the <code>org.apache.camel.spi.Registry</code> on the <code>CamelContext</code> returning an instance if only one bean is present
findByType
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-support/src/main/java/org/apache/camel/support/CamelContextHelper.java", "license": "apache-2.0", "size": 30027 }
[ "java.util.Set", "org.apache.camel.CamelContext" ]
import java.util.Set; import org.apache.camel.CamelContext;
import java.util.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,477,833
private long handleResults(LocalReasoner reasoner, Context context) throws IOException, InterruptedException { long numOutput = 0; if (reasoner.hasNewFacts()) { for (Fact fact : reasoner.getFacts()) { mout.write(getOutputName(fact), fac...
long function(LocalReasoner reasoner, Context context) throws IOException, InterruptedException { long numOutput = 0; if (reasoner.hasNewFacts()) { for (Fact fact : reasoner.getFacts()) { mout.write(getOutputName(fact), fact, NullWritable.get()); numOutput++; if (debug) { debugK.set(STR + reasoner.getNode().stringValue...
/** * Process any new results from a reasoner. */
Process any new results from a reasoner
handleResults
{ "repo_name": "kchilton2/incubator-rya", "path": "extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/mr/ForwardChain.java", "license": "apache-2.0", "size": 11560 }
[ "java.io.IOException", "org.apache.hadoop.io.NullWritable", "org.apache.rya.reasoning.Derivation", "org.apache.rya.reasoning.Fact", "org.apache.rya.reasoning.LocalReasoner" ]
import java.io.IOException; import org.apache.hadoop.io.NullWritable; import org.apache.rya.reasoning.Derivation; import org.apache.rya.reasoning.Fact; import org.apache.rya.reasoning.LocalReasoner;
import java.io.*; import org.apache.hadoop.io.*; import org.apache.rya.reasoning.*;
[ "java.io", "org.apache.hadoop", "org.apache.rya" ]
java.io; org.apache.hadoop; org.apache.rya;
1,127,463
public void setSpotUnderlyingIdentifier(ExternalIdBean spotUnderlyingIdentifier) { this._spotUnderlyingIdentifier = spotUnderlyingIdentifier; }
void function(ExternalIdBean spotUnderlyingIdentifier) { this._spotUnderlyingIdentifier = spotUnderlyingIdentifier; }
/** * Sets the spotUnderlyingIdentifier. * @param spotUnderlyingIdentifier the new value of the property */
Sets the spotUnderlyingIdentifier
setSpotUnderlyingIdentifier
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/equity/EquityVarianceSwapSecurityBean.java", "license": "apache-2.0", "size": 23690 }
[ "com.opengamma.masterdb.security.hibernate.ExternalIdBean" ]
import com.opengamma.masterdb.security.hibernate.ExternalIdBean;
import com.opengamma.masterdb.security.hibernate.*;
[ "com.opengamma.masterdb" ]
com.opengamma.masterdb;
747,288
public void operateOnCreateNewMeetingWorkspace(Ldtp l, String sharePointPath, String siteName, String location, String userName, String password, boolean withSubject, boolean clickRemove) { logger.info("Start creating new meeting workspace"); Ldtp security = new Ldtp("Windows Security"); ...
void function(Ldtp l, String sharePointPath, String siteName, String location, String userName, String password, boolean withSubject, boolean clickRemove) { logger.info(STR); Ldtp security = new Ldtp(STR); l.click(STR); String windowNameUntitled = waitForWindow(STR); Ldtp l1 = new Ldtp(windowNameUntitled); l.activateWi...
/** * This method creates a new meeting workspace in Outlook 2010 * * @param sharePointPath - path for SharePoint * @param siteName - name of the site * @param location - location for the meeting * @param userName * @param password */
This method creates a new meeting workspace in Outlook 2010
operateOnCreateNewMeetingWorkspace
{ "repo_name": "Alfresco/community-edition", "path": "projects/office-application/src/main/java/org/alfresco/office/application/MicorsoftOffice2010.java", "license": "lgpl-3.0", "size": 24894 }
[ "com.cobra.ldtp.Ldtp" ]
import com.cobra.ldtp.Ldtp;
import com.cobra.ldtp.*;
[ "com.cobra.ldtp" ]
com.cobra.ldtp;
2,272,297
LOG.debug("Security request made"); ServletConfig config = servlet.getServletConfig(); ServletContext context = config.getServletContext(); // Application wide preferences ApplicationPrefs prefs = (ApplicationPrefs) context.getAttribute(Constants.APPLICATION_PREFS); // Get the intended action, if go...
LOG.debug(STR); ServletConfig config = servlet.getServletConfig(); ServletContext context = config.getServletContext(); ApplicationPrefs prefs = (ApplicationPrefs) context.getAttribute(Constants.APPLICATION_PREFS); String s = request.getServletPath(); int slash = s.lastIndexOf("/"); s = s.substring(slash + 1); if (!s.s...
/** * Checks to see if a User session object exists, if not then the security * check fails. * * @param servlet Description of the Parameter * @param request Description of the Parameter * @param response Description of the Parameter * @return Description of the Return Value */
Checks to see if a User session object exists, if not then the security check fails
beginRequest
{ "repo_name": "yukoff/concourse-connect", "path": "src/main/java/com/concursive/connect/web/controller/hooks/SecurityHook.java", "license": "agpl-3.0", "size": 21792 }
[ "com.concursive.commons.http.RequestUtils", "com.concursive.commons.web.URLFactory", "com.concursive.connect.Constants", "com.concursive.connect.config.ApplicationPrefs", "com.concursive.connect.web.modules.members.dao.InvitationList", "com.concursive.connect.web.modules.messages.dao.PrivateMessageList", ...
import com.concursive.commons.http.RequestUtils; import com.concursive.commons.web.URLFactory; import com.concursive.connect.Constants; import com.concursive.connect.config.ApplicationPrefs; import com.concursive.connect.web.modules.members.dao.InvitationList; import com.concursive.connect.web.modules.messages.dao.Priv...
import com.concursive.commons.http.*; import com.concursive.commons.web.*; import com.concursive.connect.*; import com.concursive.connect.config.*; import com.concursive.connect.web.modules.members.dao.*; import com.concursive.connect.web.modules.messages.dao.*; import com.concursive.connect.web.modules.profile.dao.*; ...
[ "com.concursive.commons", "com.concursive.connect", "java.sql", "javax.servlet" ]
com.concursive.commons; com.concursive.connect; java.sql; javax.servlet;
1,877,003
@Override public int hashCode() { return Arrays.hashCode(this.key) ^ Arrays.hashCode(this.value); }
int function() { return Arrays.hashCode(this.key) ^ Arrays.hashCode(this.value); }
/** * Calculate hash code. * * <p> * The hash code of a {@link KVPair} is the exclusive-OR of the hash codes of the key * and the value, each according to {@link Arrays#hashCode(byte[])}. * * @return hash value for this instance */
Calculate hash code. The hash code of a <code>KVPair</code> is the exclusive-OR of the hash codes of the key and the value, each according to <code>Arrays#hashCode(byte[])</code>
hashCode
{ "repo_name": "permazen/permazen", "path": "permazen-kv/src/main/java/io/permazen/kv/KVPair.java", "license": "apache-2.0", "size": 3496 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,133,818
public TreeSet<String> getMessagePublishedNodes() throws AndesException;
TreeSet<String> function() throws AndesException;
/** * Get all message published nodes from NodeToLastPublishedId table * * @return set of message published nodes */
Get all message published nodes from NodeToLastPublishedId table
getMessagePublishedNodes
{ "repo_name": "chanakaudaya/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/server/cluster/coordination/SlotAgent.java", "license": "apache-2.0", "size": 6489 }
[ "java.util.TreeSet", "org.wso2.andes.kernel.AndesException" ]
import java.util.TreeSet; import org.wso2.andes.kernel.AndesException;
import java.util.*; import org.wso2.andes.kernel.*;
[ "java.util", "org.wso2.andes" ]
java.util; org.wso2.andes;
613,896
@Override public Iterator<E> iterator() { // override to go 75% faster return listIterator(0); }
Iterator<E> function() { return listIterator(0); }
/** * Gets an iterator over the list. * * @return an iterator over the list */
Gets an iterator over the list
iterator
{ "repo_name": "gonmarques/commons-collections", "path": "src/main/java/org/apache/commons/collections4/list/TreeList.java", "license": "apache-2.0", "size": 39099 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
996,452
@Test public void testClear() throws MalformedURLException, DownloadFailedException, IOException { String id = "key"; //use a local file as this test will load the result and check the timestamp File f = new File("target/test-classes/nvdcve-2.0-2012.xml"); String url = "file:///"...
void function() throws MalformedURLException, DownloadFailedException, IOException { String id = "key"; File f = new File(STR); String url = "file: UpdateableNvdCve instance = new UpdateableNvdCve(); instance.add(id, url, url, false); assertFalse(instance.getCollection().isEmpty()); instance.clear(); assertTrue(instanc...
/** * Test of clear method, of class UpdateableNvdCve. */
Test of clear method, of class UpdateableNvdCve
testClear
{ "repo_name": "wmaintw/DependencyCheck", "path": "dependency-check-core/src/test/java/org/owasp/dependencycheck/data/update/nvd/UpdateableNvdCveTest.java", "license": "apache-2.0", "size": 5182 }
[ "java.io.File", "java.io.IOException", "java.net.MalformedURLException", "org.junit.Assert", "org.owasp.dependencycheck.data.update.nvd.UpdateableNvdCve", "org.owasp.dependencycheck.utils.DownloadFailedException" ]
import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import org.junit.Assert; import org.owasp.dependencycheck.data.update.nvd.UpdateableNvdCve; import org.owasp.dependencycheck.utils.DownloadFailedException;
import java.io.*; import java.net.*; import org.junit.*; import org.owasp.dependencycheck.data.update.nvd.*; import org.owasp.dependencycheck.utils.*;
[ "java.io", "java.net", "org.junit", "org.owasp.dependencycheck" ]
java.io; java.net; org.junit; org.owasp.dependencycheck;
2,597,566
private void printSpace() throws IOException { writer.append(' '); }
void function() throws IOException { writer.append(' '); }
/** * Prints out a space. * * @throws IOException */
Prints out a space
printSpace
{ "repo_name": "Bilal84/rdf-commons", "path": "sesame-adapter/src/main/java/org/sindice/rdfcommons/adapter/sesame/nquads/NQuadsWriter.java", "license": "apache-2.0", "size": 7251 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
965,130
public int getAcceleration() throws TimeoutException, NotConnectedException { byte options = 0; boolean isResponseExpected = getResponseExpected(FUNCTION_GET_ACCELERATION); if(isResponseExpected) { options = 8; } ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)8, FUNCTION_GET_ACCELERATION, options,...
int function() throws TimeoutException, NotConnectedException { byte options = 0; boolean isResponseExpected = getResponseExpected(FUNCTION_GET_ACCELERATION); if(isResponseExpected) { options = 8; } ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)8, FUNCTION_GET_ACCELERATION, options, (byte)(0)); byte[] response =...
/** * Returns the acceleration as set by {@link com.tinkerforge.BrickDC.setAcceleration}. */
Returns the acceleration as set by <code>com.tinkerforge.BrickDC.setAcceleration</code>
getAcceleration
{ "repo_name": "ezeeb/pipes-tinkerforge", "path": "src/main/java/com/tinkerforge/BrickDC.java", "license": "apache-2.0", "size": 34074 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
26,402
protected void notifyListeners(ChartChangeEvent event) { if (this.notify) { Object[] listeners = this.changeListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartChangeListener.class) { ((ChartCh...
void function(ChartChangeEvent event) { if (this.notify) { Object[] listeners = this.changeListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartChangeListener.class) { ((ChartChangeListener) listeners[i + 1]).chartChanged( event); } } } }
/** * Sends a {@link ChartChangeEvent} to all registered listeners. * * @param event information about the event that triggered the * notification. */
Sends a <code>ChartChangeEvent</code> to all registered listeners
notifyListeners
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart-1.0.5/source/org/jfree/chart/JFreeChart.java", "license": "lgpl-3.0", "size": 64355 }
[ "org.jfree.chart.event.ChartChangeEvent", "org.jfree.chart.event.ChartChangeListener" ]
import org.jfree.chart.event.ChartChangeEvent; import org.jfree.chart.event.ChartChangeListener;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,510,152
@Test() public void testRequestHandlerMethods() throws Exception { final InMemoryDirectoryServerConfig cfg = new InMemoryDirectoryServerConfig("dc=example,dc=com", "o=example.com"); cfg.addAdditionalBindCredentials("cn=Directory Manager", "password"); cfg.addAdditionalB...
@Test() void function() throws Exception { final InMemoryDirectoryServerConfig cfg = new InMemoryDirectoryServerConfig(STR, STR); cfg.addAdditionalBindCredentials(STR, STR); cfg.addAdditionalBindCredentials(STR, STR); cfg.setSchema(Schema.getDefaultStandardSchema()); cfg.setListenerExceptionHandler( new StandardErrorLi...
/** * Tests methods that are available only in the in-memory request handler. * * @throws Exception If an unexpected problem occurs. */
Tests methods that are available only in the in-memory request handler
testRequestHandlerMethods
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/listener/InMemoryDirectoryServerTestCase.java", "license": "gpl-2.0", "size": 211674 }
[ "com.unboundid.ldap.sdk.schema.Schema", "org.testng.annotations.Test" ]
import com.unboundid.ldap.sdk.schema.Schema; import org.testng.annotations.Test;
import com.unboundid.ldap.sdk.schema.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.ldap; org.testng.annotations;
2,003,466
@Transactional(readOnly = true) public ToDo getToDoById (long toDoId) { ToDo toDo = (ToDo) getSession().get(ToDo.class, toDoId); return toDo; }
@Transactional(readOnly = true) ToDo function (long toDoId) { ToDo toDo = (ToDo) getSession().get(ToDo.class, toDoId); return toDo; }
/** * gets ToDo data from DataBase * @param toDoId * @return */
gets ToDo data from DataBase
getToDoById
{ "repo_name": "pxai/struts2-spring-hibernate", "path": "ToDoRemoteWS/src/main/java/info/pello/spring/todo/ws/ToDoDAO.java", "license": "gpl-2.0", "size": 2485 }
[ "org.springframework.transaction.annotation.Transactional" ]
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.*;
[ "org.springframework.transaction" ]
org.springframework.transaction;
2,277,977
public void removeIngestModuleEventListener(final PropertyChangeListener listener) { moduleEventPublisher.removeSubscriber(INGEST_MODULE_EVENT_NAMES, listener); }
void function(final PropertyChangeListener listener) { moduleEventPublisher.removeSubscriber(INGEST_MODULE_EVENT_NAMES, listener); }
/** * Removes an ingest module event property change listener. * * @param listener The PropertyChangeListener to be removed. */
Removes an ingest module event property change listener
removeIngestModuleEventListener
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java", "license": "apache-2.0", "size": 63582 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
609,810
@Beta protected ListIterator<E> standardListIterator(int start) { return Lists.listIteratorImpl(this, start); }
@Beta ListIterator<E> function(int start) { return Lists.listIteratorImpl(this, start); }
/** * A sensible default implementation of {@link #listIterator(int)}, in terms * of {@link #size}, {@link #get(int)}, {@link #set(int, Object)}, {@link * #add(int, Object)}, and {@link #remove(int)}. If you override any of these * methods, you may wish to override {@link #listIterator(int)} to forward to ...
A sensible default implementation of <code>#listIterator(int)</code>, in terms of <code>#size</code>, <code>#get(int)</code>, <code>#set(int, Object)</code>, <code>#add(int, Object)</code>, and <code>#remove(int)</code>. If you override any of these methods, you may wish to override <code>#listIterator(int)</code> to f...
standardListIterator
{ "repo_name": "newrelic/guava-libraries", "path": "guava/src/com/google/common/collect/ForwardingList.java", "license": "apache-2.0", "size": 7503 }
[ "com.google.common.annotations.Beta", "java.util.ListIterator" ]
import com.google.common.annotations.Beta; import java.util.ListIterator;
import com.google.common.annotations.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,396,864
public void putBooleanTfft(Map<String, Boolean> arrayBody) { putBooleanTfftWithServiceResponseAsync(arrayBody).toBlocking().single().body(); }
void function(Map<String, Boolean> arrayBody) { putBooleanTfftWithServiceResponseAsync(arrayBody).toBlocking().single().body(); }
/** * Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }. * * @param arrayBody the Map&lt;String, Boolean&gt; value */
Set dictionary value empty {"0": true, "1": false, "2": false, "3": true }
putBooleanTfft
{ "repo_name": "matthchr/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 210563 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,119,844
public void setInvoice(ReferenceInvoice invoice) { this.invoice = invoice; }
void function(ReferenceInvoice invoice) { this.invoice = invoice; }
/** * Sets the refund invoice * * @param invoice the invoice to refund */
Sets the refund invoice
setInvoice
{ "repo_name": "Zooz/Zooz-Java", "path": "src/main/java/com/zooz/common/client/ecomm/beans/requests/RefundRequest.java", "license": "apache-2.0", "size": 8582 }
[ "com.zooz.common.client.ecomm.beans.ReferenceInvoice" ]
import com.zooz.common.client.ecomm.beans.ReferenceInvoice;
import com.zooz.common.client.ecomm.beans.*;
[ "com.zooz.common" ]
com.zooz.common;
2,786,703
@Nullable private static Module getModuleOfOutermostStarlarkFunction(StarlarkThread thread) { for (Debug.Frame fr : Debug.getCallStack(thread)) { if (fr.getFunction() instanceof StarlarkFunction) { return ((StarlarkFunction) fr.getFunction()).getModule(); } } return null; }
static Module function(StarlarkThread thread) { for (Debug.Frame fr : Debug.getCallStack(thread)) { if (fr.getFunction() instanceof StarlarkFunction) { return ((StarlarkFunction) fr.getFunction()).getModule(); } } return null; }
/** * Returns the module (file) of the outermost enclosing Starlark function on the call stack or * null if none of the active calls are functions defined in Starlark. */
Returns the module (file) of the outermost enclosing Starlark function on the call stack or null if none of the active calls are functions defined in Starlark
getModuleOfOutermostStarlarkFunction
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleClassFunctions.java", "license": "apache-2.0", "size": 49594 }
[ "net.starlark.java.eval.Debug", "net.starlark.java.eval.Module", "net.starlark.java.eval.StarlarkFunction", "net.starlark.java.eval.StarlarkThread" ]
import net.starlark.java.eval.Debug; import net.starlark.java.eval.Module; import net.starlark.java.eval.StarlarkFunction; import net.starlark.java.eval.StarlarkThread;
import net.starlark.java.eval.*;
[ "net.starlark.java" ]
net.starlark.java;
519,430
public static Pair<RelNode, RelNode> getTopLevelSelect(final RelNode rootRel) { RelNode tmpRel = rootRel; RelNode parentOforiginalProjRel = rootRel; HiveProject originalProjRel = null; while (tmpRel != null) { if (tmpRel instanceof HiveProject) { originalProjRel = (HiveProject) tmpRel; ...
static Pair<RelNode, RelNode> function(final RelNode rootRel) { RelNode tmpRel = rootRel; RelNode parentOforiginalProjRel = rootRel; HiveProject originalProjRel = null; while (tmpRel != null) { if (tmpRel instanceof HiveProject) { originalProjRel = (HiveProject) tmpRel; break; } parentOforiginalProjRel = tmpRel; tmpRel...
/** * Get top level select starting from root. Assumption here is root can only * be Sort & Project. Also the top project should be at most 2 levels below * Sort; i.e Sort(Limit)-Sort(OB)-Select * * @param rootRel * @return */
Get top level select starting from root. Assumption here is root can only be Sort & Project. Also the top project should be at most 2 levels below Sort; i.e Sort(Limit)-Sort(OB)-Select
getTopLevelSelect
{ "repo_name": "vergilchiu/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java", "license": "apache-2.0", "size": 42761 }
[ "org.apache.calcite.rel.RelNode", "org.apache.calcite.util.Pair", "org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject" ]
import org.apache.calcite.rel.RelNode; import org.apache.calcite.util.Pair; import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject;
import org.apache.calcite.rel.*; import org.apache.calcite.util.*; import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.*;
[ "org.apache.calcite", "org.apache.hadoop" ]
org.apache.calcite; org.apache.hadoop;
1,082,425
static private void writeNoDST(SimpleIcsWriter writer, TimeZone tz, String offsetString) throws IOException { writer.writeTag("BEGIN", "STANDARD"); writer.writeTag("TZOFFSETFROM", offsetString); writer.writeTag("TZOFFSETTO", offsetString); // Might as well use start of ep...
static void function(SimpleIcsWriter writer, TimeZone tz, String offsetString) throws IOException { writer.writeTag("BEGIN", STR); writer.writeTag(STR, offsetString); writer.writeTag(STR, offsetString); writer.writeTag(STR, millisToEasDateTime(0L)); writer.writeTag("END", STR); writer.writeTag("END", STR); }
/** * Write out the STANDARD block of VTIMEZONE and end the VTIMEZONE * @param writer the SimpleIcsWriter we're using * @param tz the time zone * @param offsetString the offset string in VTIMEZONE format (e.g. +0800) * @throws IOException */
Write out the STANDARD block of VTIMEZONE and end the VTIMEZONE
writeNoDST
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Exchange/src/com/android/exchange/utility/CalendarUtilities.java", "license": "gpl-3.0", "size": 93299 }
[ "java.io.IOException", "java.util.TimeZone" ]
import java.io.IOException; import java.util.TimeZone;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,676,198
void writeClusterJob(ClusterJob clusterJob) throws IOException;
void writeClusterJob(ClusterJob clusterJob) throws IOException;
/** * Write a cluster job to the store. * @param clusterJob The cluster job to write. * @throws IOException if there was a problem writing the cluster job. */
Write a cluster job to the store
writeClusterJob
{ "repo_name": "quantiply-fork/coopr", "path": "coopr-server/src/main/java/co/cask/coopr/store/cluster/ClusterStore.java", "license": "apache-2.0", "size": 3814 }
[ "co.cask.coopr.scheduler.task.ClusterJob", "java.io.IOException" ]
import co.cask.coopr.scheduler.task.ClusterJob; import java.io.IOException;
import co.cask.coopr.scheduler.task.*; import java.io.*;
[ "co.cask.coopr", "java.io" ]
co.cask.coopr; java.io;
2,020,118
public boolean courseExists(CourseDbModel course) throws SQLException { this.courseDbModel = DaoManager.createDao(connectionSource, CourseDbModel.class); List<CourseDbModel> result; result = this.courseDbModel.queryForMatching(course); if (result.size() == 1) { return tru...
boolean function(CourseDbModel course) throws SQLException { this.courseDbModel = DaoManager.createDao(connectionSource, CourseDbModel.class); List<CourseDbModel> result; result = this.courseDbModel.queryForMatching(course); if (result.size() == 1) { return true; } else { return false; } }
/** * Checks if given cource exists in Kurki databse. * @param course Database model which is to be checked. * @return true or false if exists. * @throws SQLException */
Checks if given cource exists in Kurki databse
courseExists
{ "repo_name": "ohtuprojekti/OKKoPa_all", "path": "OKKoPa_shared/src/main/java/fi/helsinki/cs/okkopa/shared/database/OracleConnector.java", "license": "mit", "size": 5094 }
[ "com.j256.ormlite.dao.DaoManager", "fi.helsinki.cs.okkopa.shared.database.model.CourseDbModel", "java.sql.SQLException", "java.util.List" ]
import com.j256.ormlite.dao.DaoManager; import fi.helsinki.cs.okkopa.shared.database.model.CourseDbModel; import java.sql.SQLException; import java.util.List;
import com.j256.ormlite.dao.*; import fi.helsinki.cs.okkopa.shared.database.model.*; import java.sql.*; import java.util.*;
[ "com.j256.ormlite", "fi.helsinki.cs", "java.sql", "java.util" ]
com.j256.ormlite; fi.helsinki.cs; java.sql; java.util;
2,766,470
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //设置编码方式 request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); SensorDataType_functionDAO SensorDataType_functionDAOImpl = SensorDataType_functionDAO...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); response.setContentType(STR); SensorDataType_functionDAO SensorDataType_functionDAOImpl = SensorDataType_functionDAOFactory.createSensorDataType_functionDAOImplm(); Strin...
/** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to post. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @...
The doPost method of the servlet. This method is called when a form has its tag value method equals to post
doPost
{ "repo_name": "htzy/te", "path": "envirMonitor/src/com/monitor/servlet/SearchSensorDataTypeServlet.java", "license": "apache-2.0", "size": 2845 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
631,580
@Nonnull @Convert(MappingJarConverter.class) GenericAttributeValue<PsiFile> getJar();
@Convert(MappingJarConverter.class) GenericAttributeValue<PsiFile> getJar();
/** * Returns the value of the jar child. * Attribute jar * @return the value of the jar child. */
Returns the value of the jar child. Attribute jar
getJar
{ "repo_name": "consulo-trash/consulo-hibernate", "path": "plugin/src/main/java/com/intellij/hibernate/model/xml/config/Mapping.java", "license": "apache-2.0", "size": 2093 }
[ "com.intellij.hibernate.model.converters.MappingJarConverter", "com.intellij.psi.PsiFile", "com.intellij.util.xml.Convert", "com.intellij.util.xml.GenericAttributeValue" ]
import com.intellij.hibernate.model.converters.MappingJarConverter; import com.intellij.psi.PsiFile; import com.intellij.util.xml.Convert; import com.intellij.util.xml.GenericAttributeValue;
import com.intellij.hibernate.model.converters.*; import com.intellij.psi.*; import com.intellij.util.xml.*;
[ "com.intellij.hibernate", "com.intellij.psi", "com.intellij.util" ]
com.intellij.hibernate; com.intellij.psi; com.intellij.util;
1,184,983
public double[] getParameterEstimates() { if (this.parameters == null) { return null; } return MathArrays.copyOf(parameters); }
double[] function() { if (this.parameters == null) { return null; } return MathArrays.copyOf(parameters); }
/** * <p>Returns a copy of the regression parameters estimates.</p> * * <p>The parameter estimates are returned in the natural order of the data.</p> * * <p>A redundant regressor will have its redundancy flag set, as will * a parameter estimate equal to {@code Double.NaN}.</p> * ...
Returns a copy of the regression parameters estimates. The parameter estimates are returned in the natural order of the data. A redundant regressor will have its redundancy flag set, as will a parameter estimate equal to Double.NaN
getParameterEstimates
{ "repo_name": "happyjack27/autoredistrict", "path": "src/org/apache/commons/math3/stat/regression/RegressionResults.java", "license": "gpl-3.0", "size": 15908 }
[ "org.apache.commons.math3.util.MathArrays" ]
import org.apache.commons.math3.util.MathArrays;
import org.apache.commons.math3.util.*;
[ "org.apache.commons" ]
org.apache.commons;
737,705
public void run() throws InvalidRegisterException{ HashMap<Integer, IInstruction> mapping = generateInstructionMapping(); int ip = 2; while(ip<this.intcode.length){ IInstruction i = mapping.get(intcode[ip]).getInstance(ip, intcode); i.execute(); ip += i.getSize(); } }
void function() throws InvalidRegisterException{ HashMap<Integer, IInstruction> mapping = generateInstructionMapping(); int ip = 2; while(ip<this.intcode.length){ IInstruction i = mapping.get(intcode[ip]).getInstance(ip, intcode); i.execute(); ip += i.getSize(); } }
/*** * run loop goes here... ip=0 look at intcode[ip], look up instruction, * execute instruction, ip+=sizeof(instruction[ip]), repeat while * ip<sizeof(intcode) * @throws InvalidRegisterException */
run loop goes here... ip=0 look at intcode[ip], look up instruction, execute instruction, ip+=sizeof(instruction[ip]), repeat while ip<sizeof(intcode)
run
{ "repo_name": "JosephRedfern/JvmVm", "path": "src/me/redfern/jvmvm/JvmVm.java", "license": "bsd-3-clause", "size": 1812 }
[ "java.util.HashMap", "me.redfern.jvmvm.exceptions.InvalidRegisterException", "me.redfern.jvmvm.vm.instructions.IInstruction" ]
import java.util.HashMap; import me.redfern.jvmvm.exceptions.InvalidRegisterException; import me.redfern.jvmvm.vm.instructions.IInstruction;
import java.util.*; import me.redfern.jvmvm.exceptions.*; import me.redfern.jvmvm.vm.instructions.*;
[ "java.util", "me.redfern.jvmvm" ]
java.util; me.redfern.jvmvm;
709,772
public String getTabColorClass() { return m_tabColorClass; } } protected class TabPanel extends TabLayoutPanel { private DeckLayoutPanel m_contentPanel; private FlowPanel m_tabBar; public TabPanel(double barHeight, Unit bar...
String function() { return m_tabColorClass; } } protected class TabPanel extends TabLayoutPanel { private DeckLayoutPanel m_contentPanel; private FlowPanel m_tabBar; public TabPanel(double barHeight, Unit barUnit) { super(barHeight, barUnit); LayoutPanel tabLayout = (LayoutPanel)getWidget(); for (int i = 0; i < tabLayo...
/** * Returns the tabColorClass.<p> * * @return the tabColorClass */
Returns the tabColorClass
getTabColorClass
{ "repo_name": "sbonoc/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/CmsTabbedPanel.java", "license": "lgpl-2.1", "size": 22895 }
[ "com.google.gwt.dom.client.Style", "com.google.gwt.user.client.ui.DeckLayoutPanel", "com.google.gwt.user.client.ui.FlowPanel", "com.google.gwt.user.client.ui.LayoutPanel", "com.google.gwt.user.client.ui.TabLayoutPanel", "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.dom.client.Style; import com.google.gwt.user.client.ui.DeckLayoutPanel; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.LayoutPanel; import com.google.gwt.user.client.ui.TabLayoutPanel; import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.dom.client.*; import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,306,422
@ApiModelProperty(value = "") public String getLogEntryId() { return logEntryId; }
@ApiModelProperty(value = "") String function() { return logEntryId; }
/** * Get logEntryId * @return logEntryId **/
Get logEntryId
getLogEntryId
{ "repo_name": "LogSentinel/logsentinel-java-client", "path": "src/main/java/com/logsentinel/model/LogResponse.java", "license": "mit", "size": 4473 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
333,719
@Test public final void testInsertX1Y0() { final AreaL area = AreaL.of(0L, 100L, 0L, 100L); final QuadTreeConfigurationL.Builder cb = QuadTreeConfigurationL.builder(); cb.setArea(area); final QuadTreeConfigurationL c = cb.build(); final QuadTreeLType<Object> tree = this.create(c); ...
final void function() { final AreaL area = AreaL.of(0L, 100L, 0L, 100L); final QuadTreeConfigurationL.Builder cb = QuadTreeConfigurationL.builder(); cb.setArea(area); final QuadTreeConfigurationL c = cb.build(); final QuadTreeLType<Object> tree = this.create(c); final Integer item = Integer.valueOf(0); final AreaL item...
/** * Inserting an object into the X1Y0 quadrant works. */
Inserting an object into the X1Y0 quadrant works
testInsertX1Y0
{ "repo_name": "io7m/jspatial", "path": "com.io7m.jspatial.tests/src/test/java/com/io7m/jspatial/tests/api/quadtrees/QuadTreeLContract.java", "license": "isc", "size": 40901 }
[ "com.io7m.jregions.core.unparameterized.areas.AreaL", "com.io7m.jspatial.api.quadtrees.QuadTreeConfigurationL", "com.io7m.jspatial.api.quadtrees.QuadTreeLType", "org.junit.Assert" ]
import com.io7m.jregions.core.unparameterized.areas.AreaL; import com.io7m.jspatial.api.quadtrees.QuadTreeConfigurationL; import com.io7m.jspatial.api.quadtrees.QuadTreeLType; import org.junit.Assert;
import com.io7m.jregions.core.unparameterized.areas.*; import com.io7m.jspatial.api.quadtrees.*; import org.junit.*;
[ "com.io7m.jregions", "com.io7m.jspatial", "org.junit" ]
com.io7m.jregions; com.io7m.jspatial; org.junit;
637,298
public T secureXML(String secureTag, boolean secureTagContents, byte[] passPhraseByte) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(); xsdf.setSecureTag(secureTag); xsdf.setSecureTagContents(secureTagContents); xsdf.setPassPhraseByte(passPhraseByte); return dataFo...
T function(String secureTag, boolean secureTagContents, byte[] passPhraseByte) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(); xsdf.setSecureTag(secureTag); xsdf.setSecureTagContents(secureTagContents); xsdf.setPassPhraseByte(passPhraseByte); return dataFormat(xsdf); }
/** * Uses the XML Security data format */
Uses the XML Security data format
secureXML
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 46443 }
[ "org.apache.camel.model.dataformat.XMLSecurityDataFormat" ]
import org.apache.camel.model.dataformat.XMLSecurityDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
1,128,483
private Cursor queryNotesSearchQueried(SQLiteDatabase db, String query, String sortOrder) { SearchQuery searchQuery = new SearchQuery(query); StringBuilder selection = new StringBuilder(); List<String> selectionArgs = new ArrayList<>(); selection.append(DatabaseUtils.WHERE...
Cursor function(SQLiteDatabase db, String query, String sortOrder) { SearchQuery searchQuery = new SearchQuery(query); StringBuilder selection = new StringBuilder(); List<String> selectionArgs = new ArrayList<>(); selection.append(DatabaseUtils.WHERE_EXISTING_NOTES); for (String tag: searchQuery.getTags()) { selection....
/** * Builds query parameters from {@link SearchQuery}. */
Builds query parameters from <code>SearchQuery</code>
queryNotesSearchQueried
{ "repo_name": "MackieLoeffel/orgzly-android", "path": "app/src/main/java/com/orgzly/android/provider/Provider.java", "license": "gpl-3.0", "size": 70159 }
[ "android.database.Cursor", "android.database.sqlite.SQLiteDatabase", "com.orgzly.BuildConfig", "com.orgzly.android.SearchQuery", "com.orgzly.android.prefs.AppPreferences", "com.orgzly.android.provider.views.NotesView", "com.orgzly.android.util.LogUtils", "java.util.ArrayList", "java.util.List" ]
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import com.orgzly.BuildConfig; import com.orgzly.android.SearchQuery; import com.orgzly.android.prefs.AppPreferences; import com.orgzly.android.provider.views.NotesView; import com.orgzly.android.util.LogUtils; import java.util.ArrayList; im...
import android.database.*; import android.database.sqlite.*; import com.orgzly.*; import com.orgzly.android.*; import com.orgzly.android.prefs.*; import com.orgzly.android.provider.views.*; import com.orgzly.android.util.*; import java.util.*;
[ "android.database", "com.orgzly", "com.orgzly.android", "java.util" ]
android.database; com.orgzly; com.orgzly.android; java.util;
2,090,399
public String host() { try { if (!config.isBindOnLocalhost()) { return InetAddress.getLocalHost().getHostName(); } else { return "localhost"; } } catch (Exception e) { LOG.error(e.getMessage(), e); throw new ...
String function() { try { if (!config.isBindOnLocalhost()) { return InetAddress.getLocalHost().getHostName(); } else { return STR; } } catch (Exception e) { LOG.error(e.getMessage(), e); throw new IllegalStateException(STR, e); } }
/** * Derive the host * * @param isBindOnLocalhost * @return */
Derive the host
host
{ "repo_name": "bradtm/pulsar", "path": "pulsar-discovery-service/src/main/java/org/apache/pulsar/discovery/service/DiscoveryService.java", "license": "apache-2.0", "size": 9216 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,328,533
//----------------------------------------------------------------------- public MetaProperty<ResolvedTrade> trade() { return trade; }
MetaProperty<ResolvedTrade> function() { return trade; }
/** * The meta-property for the {@code trade} property. * @return the meta-property, not null */
The meta-property for the trade property
trade
{ "repo_name": "OpenGamma/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/param/ResolvedTradeParameterMetadata.java", "license": "apache-2.0", "size": 10687 }
[ "com.opengamma.strata.product.ResolvedTrade", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.product.ResolvedTrade; import org.joda.beans.MetaProperty;
import com.opengamma.strata.product.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
278,086
public void createEDG(Program p, AnswerSetList asl) throws NotValidProgramException{ if (isProgramValid(p)){ edgs = new HashMap<AnswerSet,ExtendedDependencyGraph>(); positiveNodes = new HashMap<String, List<EDGVertex>>(); negativeNodes = new HashMap<String, List<EDGVertex>>(); ExtendedD...
void function(Program p, AnswerSetList asl) throws NotValidProgramException{ if (isProgramValid(p)){ edgs = new HashMap<AnswerSet,ExtendedDependencyGraph>(); positiveNodes = new HashMap<String, List<EDGVertex>>(); negativeNodes = new HashMap<String, List<EDGVertex>>(); ExtendedDependencyGraph edg = new ExtendedDependen...
/** * Creates an Extended Dependency Graph to a logic program * @param p Logic program * @throws NotValidProgramException Exception is thrown when program is not suitable for being represented * as an Extended Dependency Graph */
Creates an Extended Dependency Graph to a logic program
createEDG
{ "repo_name": "Angerona/angerona-framework", "path": "aspgraph/src/main/java/com/github/angerona/fw/aspgraph/controller/EDGController.java", "license": "gpl-3.0", "size": 10301 }
[ "java.io.IOException", "java.util.HashMap", "java.util.HashSet", "java.util.Iterator", "java.util.LinkedList", "java.util.List", "net.sf.tweety.logicprogramming.asplibrary.syntax.Literal", "net.sf.tweety.logicprogramming.asplibrary.syntax.Neg", "net.sf.tweety.logicprogramming.asplibrary.syntax.Progr...
import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import net.sf.tweety.logicprogramming.asplibrary.syntax.Literal; import net.sf.tweety.logicprogramming.asplibrary.syntax.Neg; import net.sf.tweety.logicprogrammi...
import java.io.*; import java.util.*; import net.sf.tweety.logicprogramming.asplibrary.syntax.*; import net.sf.tweety.logicprogramming.asplibrary.util.*;
[ "java.io", "java.util", "net.sf.tweety" ]
java.io; java.util; net.sf.tweety;
16,359
public CollectionOfLinksOfDirectoryObjectAutoGenerated withAdditionalProperties( Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; }
CollectionOfLinksOfDirectoryObjectAutoGenerated function( Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; }
/** * Set the additionalProperties property: Collection of links of directoryObject. * * @param additionalProperties the additionalProperties value to set. * @return the CollectionOfLinksOfDirectoryObjectAutoGenerated object itself. */
Set the additionalProperties property: Collection of links of directoryObject
withAdditionalProperties
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/CollectionOfLinksOfDirectoryObjectAutoGenerated.java", "license": "mit", "size": 3537 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,848,986
String outputDirectory = Utils.getOutputDirectoryPath("RenderDocumentWithNotes"); String pageFilePathFormat = new File(outputDirectory, "page_{0}.html").getPath(); HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(pageFilePathFormat); viewOptions.setRenderNotes(true); ...
String outputDirectory = Utils.getOutputDirectoryPath(STR); String pageFilePathFormat = new File(outputDirectory, STR).getPath(); HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(pageFilePathFormat); viewOptions.setRenderNotes(true); try (Viewer viewer = new Viewer(TestFiles.PPTX_WITH_NOTES)) { viewer...
/** * This example demonstrates how to render presentation with notes. */
This example demonstrates how to render presentation with notes
run
{ "repo_name": "groupdocs-viewer/GroupDocs.Viewer-for-Java", "path": "Examples/src/main/java/com/groupdocs/viewer/examples/advanced_usage/rendering/common_rendering_options/RenderDocumentWithNotes.java", "license": "mit", "size": 1025 }
[ "com.groupdocs.viewer.Viewer", "com.groupdocs.viewer.examples.TestFiles", "com.groupdocs.viewer.examples.Utils", "com.groupdocs.viewer.options.HtmlViewOptions", "java.io.File" ]
import com.groupdocs.viewer.Viewer; import com.groupdocs.viewer.examples.TestFiles; import com.groupdocs.viewer.examples.Utils; import com.groupdocs.viewer.options.HtmlViewOptions; import java.io.File;
import com.groupdocs.viewer.*; import com.groupdocs.viewer.examples.*; import com.groupdocs.viewer.options.*; import java.io.*;
[ "com.groupdocs.viewer", "java.io" ]
com.groupdocs.viewer; java.io;
2,191,258
public StatementHelper generateUpdateQuery(String tableName, RowItem item);
StatementHelper function(String tableName, RowItem item);
/** * Generates an UPDATE query with the provided parameters. * * @param tableName * Name of the table queried * @param item * RowItem containing the updated values update. * @return StatementHelper instance containing the query string for a * Prepa...
Generates an UPDATE query with the provided parameters
generateUpdateQuery
{ "repo_name": "jdahlstrom/vaadin.react", "path": "server/src/main/java/com/vaadin/data/util/sqlcontainer/query/generator/SQLGenerator.java", "license": "apache-2.0", "size": 4049 }
[ "com.vaadin.data.util.sqlcontainer.RowItem" ]
import com.vaadin.data.util.sqlcontainer.RowItem;
import com.vaadin.data.util.sqlcontainer.*;
[ "com.vaadin.data" ]
com.vaadin.data;
267,834
private Response addSpaceACLsToResponse(ResponseBuilder response, String spaceID, String storeID) throws ResourceException { Map<String, String> aclProps = new HashMap<String, String>(); Map<String, AclTy...
Response function(ResponseBuilder response, String spaceID, String storeID) throws ResourceException { Map<String, String> aclProps = new HashMap<String, String>(); Map<String, AclType> acls = spaceResource.getSpaceACLs(spaceID, storeID); for (String key : acls.keySet()) { aclProps.put(key, acls.get(key).name()); } ret...
/** * Adds the ACLs of a space as header values to the response. */
Adds the ACLs of a space as header values to the response
addSpaceACLsToResponse
{ "repo_name": "duracloud/duracloud", "path": "durastore/src/main/java/org/duracloud/durastore/rest/SpaceRest.java", "license": "apache-2.0", "size": 13135 }
[ "java.util.HashMap", "java.util.Map", "javax.ws.rs.core.Response", "org.duracloud.common.model.AclType", "org.duracloud.durastore.error.ResourceException" ]
import java.util.HashMap; import java.util.Map; import javax.ws.rs.core.Response; import org.duracloud.common.model.AclType; import org.duracloud.durastore.error.ResourceException;
import java.util.*; import javax.ws.rs.core.*; import org.duracloud.common.model.*; import org.duracloud.durastore.error.*;
[ "java.util", "javax.ws", "org.duracloud.common", "org.duracloud.durastore" ]
java.util; javax.ws; org.duracloud.common; org.duracloud.durastore;
805,780
private void resumeConnectingToDevice() { // Is the Bluetooth adapter enabled? if (!mBluetoothAdapter.isEnabled()) { attemptEnableBluetooth(); return; } // Are we bound to the device management service? if (mDeviceManagementBinder == null) { ...
void function() { if (!mBluetoothAdapter.isEnabled()) { attemptEnableBluetooth(); return; } if (mDeviceManagementBinder == null) { attemptBindService(); return; } final BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(mTargetAddress); final Set<BluetoothDevice> bondedDevices = mBluetoothAdapter.getBondedDevic...
/** * Attempts to connect to the device with the specified address, handling * failure cases where possible. * <p/> * If necessary, this method will attempt to: * <ul> * <li>Prompt the user to enable Bluetooth</li> * <li>Initiate bonding with the requested device</li> * </ul> ...
Attempts to connect to the device with the specified address, handling failure cases where possible. If necessary, this method will attempt to: Prompt the user to enable Bluetooth Initiate bonding with the requested device
resumeConnectingToDevice
{ "repo_name": "aviverette/a2dpswitcher", "path": "app/src/main/java/com/googamaphone/a2dpswitcher/ReadTagActivity.java", "license": "apache-2.0", "size": 14922 }
[ "android.bluetooth.BluetoothDevice", "java.util.Set" ]
import android.bluetooth.BluetoothDevice; import java.util.Set;
import android.bluetooth.*; import java.util.*;
[ "android.bluetooth", "java.util" ]
android.bluetooth; java.util;
2,334,627
boolean onContextClick(@NonNull MotionEvent e);
boolean onContextClick(@NonNull MotionEvent e);
/** * Called when user performs a context click, usually via mouse pointer * right-click. * * @param e the event associated with the click. * @return true if the event was handled. */
Called when user performs a context click, usually via mouse pointer right-click
onContextClick
{ "repo_name": "AndroidX/androidx", "path": "recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/OnContextClickListener.java", "license": "apache-2.0", "size": 1249 }
[ "android.view.MotionEvent", "androidx.annotation.NonNull" ]
import android.view.MotionEvent; import androidx.annotation.NonNull;
import android.view.*; import androidx.annotation.*;
[ "android.view", "androidx.annotation" ]
android.view; androidx.annotation;
2,192,923
@CheckForNull Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException;
Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException;
/** * Validate a deleted node * @param name The name of the deleted node. * @param before the original node * @return a {@code Validator} for the removed subtree or * {@code null} if validation should not decent into the subtree * @throws CommitFailedException if validation fails. */
Validate a deleted node
childNodeDeleted
{ "repo_name": "tteofili/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Validator.java", "license": "apache-2.0", "size": 3447 }
[ "org.apache.jackrabbit.oak.api.CommitFailedException", "org.apache.jackrabbit.oak.spi.state.NodeState" ]
import org.apache.jackrabbit.oak.api.CommitFailedException; import org.apache.jackrabbit.oak.spi.state.NodeState;
import org.apache.jackrabbit.oak.api.*; import org.apache.jackrabbit.oak.spi.state.*;
[ "org.apache.jackrabbit" ]
org.apache.jackrabbit;
1,614,138
HttpPipeline getHttpPipeline();
HttpPipeline getHttpPipeline();
/** * Gets The HTTP pipeline to send requests through. * * @return the httpPipeline value. */
Gets The HTTP pipeline to send requests through
getHttpPipeline
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java", "license": "mit", "size": 3846 }
[ "com.azure.core.http.HttpPipeline" ]
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.*;
[ "com.azure.core" ]
com.azure.core;
2,628,690
public AliasedField nextIdValue(TableReference sourceTable, TableReference sourceReference, Table autoNumberTable, String nameColumn, String valueColumn) { String autoNumberName = getAutoNumberName(sourceTable.getName()); if (sourceReference == null) { return new FieldFromSelect(new SelectSt...
AliasedField function(TableReference sourceTable, TableReference sourceReference, Table autoNumberTable, String nameColumn, String valueColumn) { String autoNumberName = getAutoNumberName(sourceTable.getName()); if (sourceReference == null) { return new FieldFromSelect(new SelectStatement(Function.isnull(new FieldRefer...
/** * Creates a field reference to provide id column values. * * @param sourceTable the source table. * @param sourceReference a reference lookup to add the ID to. * @param autoNumberTable the name of the table to query over. * @param nameColumn the name of the column holding the Autonumber name...
Creates a field reference to provide id column values
nextIdValue
{ "repo_name": "badgerwithagun/morf", "path": "morf-core/src/main/java/org/alfasoftware/morf/jdbc/SqlDialect.java", "license": "apache-2.0", "size": 128834 }
[ "org.alfasoftware.morf.metadata.Table", "org.alfasoftware.morf.sql.SelectStatement", "org.alfasoftware.morf.sql.element.AliasedField", "org.alfasoftware.morf.sql.element.Criterion", "org.alfasoftware.morf.sql.element.FieldFromSelect", "org.alfasoftware.morf.sql.element.FieldLiteral", "org.alfasoftware.m...
import org.alfasoftware.morf.metadata.Table; import org.alfasoftware.morf.sql.SelectStatement; import org.alfasoftware.morf.sql.element.AliasedField; import org.alfasoftware.morf.sql.element.Criterion; import org.alfasoftware.morf.sql.element.FieldFromSelect; import org.alfasoftware.morf.sql.element.FieldLiteral; impor...
import org.alfasoftware.morf.metadata.*; import org.alfasoftware.morf.sql.*; import org.alfasoftware.morf.sql.element.*;
[ "org.alfasoftware.morf" ]
org.alfasoftware.morf;
75,081
public void generateBackground() throws ContentTypeNotBoundException { MultiplicityClient.get().getViewPort().setBackgroundColor(MuseumAppPreferences.getBackgroundColour()); File imageFile = MuseumAppPreferences.getBackgroundImage(); if (imageFile != null) { if (imageFile.exists()) { I...
void function() throws ContentTypeNotBoundException { MultiplicityClient.get().getViewPort().setBackgroundColor(MuseumAppPreferences.getBackgroundColour()); File imageFile = MuseumAppPreferences.getBackgroundImage(); if (imageFile != null) { if (imageFile.exists()) { IImage background = stage.getContentFactory().create...
/** * Generate background. * * @throws ContentTypeNotBoundException * the content type not bound exception */
Generate background
generateBackground
{ "repo_name": "synergynet/synergynet3.1", "path": "synergynet3-museum/synergynet3-museum-table/src/main/java/synergynet3/museum/table/mainapp/POIManager.java", "license": "bsd-3-clause", "size": 11234 }
[ "com.jme3.math.Vector2f", "java.io.File", "java.util.UUID" ]
import com.jme3.math.Vector2f; import java.io.File; import java.util.UUID;
import com.jme3.math.*; import java.io.*; import java.util.*;
[ "com.jme3.math", "java.io", "java.util" ]
com.jme3.math; java.io; java.util;
2,816,387
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String azureFirewallName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, azureFirewallName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String azureFirewallName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, azureFirewallName), serviceCallback); }
/** * Deletes the specified Azure Firewall. * * @param resourceGroupName The name of the resource group. * @param azureFirewallName The name of the Azure Firewall. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentExcepti...
Deletes the specified Azure Firewall
beginDeleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/AzureFirewallsInner.java", "license": "mit", "size": 60332 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
284,799
public void addChildResource(SimulatorResource resource) throws InvalidArgsException, SimulatorException { nativeAddChildResource(resource); }
void function(SimulatorResource resource) throws InvalidArgsException, SimulatorException { nativeAddChildResource(resource); }
/** * API to add child resource to collection. * * @param resource * Child resource to be added to collection. * * @throws InvalidArgsException * This exception will be thrown on invalid input. * @throws SimulatorException * This exception ...
API to add child resource to collection
addChildResource
{ "repo_name": "rzr/iotivity", "path": "service/simulator/java/sdk/src/org/oic/simulator/server/SimulatorCollectionResource.java", "license": "apache-2.0", "size": 3649 }
[ "org.oic.simulator.InvalidArgsException", "org.oic.simulator.SimulatorException" ]
import org.oic.simulator.InvalidArgsException; import org.oic.simulator.SimulatorException;
import org.oic.simulator.*;
[ "org.oic.simulator" ]
org.oic.simulator;
2,422,921
static public void printNotice(TextOutputStream stream) { // stream.println("\n******************************* NOTICE ************************************"); stream.println("jModelTest " + CURRENT_VERSION); stream.println("Copyright (C) 2011 D. Darriba, G.L. Taboada, R. Doallo and D. Posada"); stream.println...
static void function(TextOutputStream stream) { stream.println(STR + CURRENT_VERSION); stream.println(STR); stream.println(STR); stream.println(STR); stream.println(STR); stream.println(" "); stream.println(STR); stream.println(" "); }
/**************************** * printNotice ****************************** * Prints notice information at * start up * * * ***********************************************************************/
printNotice ****************************** * Prints notice information at start up * *
printNotice
{ "repo_name": "ddarriba/jmodeltest2", "path": "src/main/java/es/uvigo/darwin/jmodeltest/ModelTest.java", "license": "gpl-3.0", "size": 60537 }
[ "es.uvigo.darwin.jmodeltest.io.TextOutputStream" ]
import es.uvigo.darwin.jmodeltest.io.TextOutputStream;
import es.uvigo.darwin.jmodeltest.io.*;
[ "es.uvigo.darwin" ]
es.uvigo.darwin;
1,240,446
private void error() { org.hibernate.Transaction txn = session.getTransaction(); if (txn != null && txn.getStatus().equals(TransactionStatus.ACTIVE)) { txn.rollback(); } } /** * Closes and unbinds the current session. <br/> * If {@link ManagedSessionContext} ha...
void function() { org.hibernate.Transaction txn = session.getTransaction(); if (txn != null && txn.getStatus().equals(TransactionStatus.ACTIVE)) { txn.rollback(); } } /** * Closes and unbinds the current session. <br/> * If {@link ManagedSessionContext} had a session before the current session, re-binds it to {@link Ma...
/** * If transaction is present and active then rollback. */
If transaction is present and active then rollback
error
{ "repo_name": "robeio/robe", "path": "robe-hibernate/src/main/java/io/robe/hibernate/transaction/Transaction.java", "license": "lgpl-3.0", "size": 6571 }
[ "org.hibernate.context.internal.ManagedSessionContext", "org.hibernate.resource.transaction.spi.TransactionStatus" ]
import org.hibernate.context.internal.ManagedSessionContext; import org.hibernate.resource.transaction.spi.TransactionStatus;
import org.hibernate.context.internal.*; import org.hibernate.resource.transaction.spi.*;
[ "org.hibernate.context", "org.hibernate.resource" ]
org.hibernate.context; org.hibernate.resource;
551,875
@Override public boolean isRecognizedFormat(InputStream stream) throws IOException { // Our strategy is to look for the "PY <year>" line. BufferedReader in = new BufferedReader(ImportFormatReader.getReaderDefaultEncoding(stream)); //Pattern pat1 = Pattern.comp...
boolean function(InputStream stream) throws IOException { BufferedReader in = new BufferedReader(ImportFormatReader.getReaderDefaultEncoding(stream)); Pattern pat1 = Pattern.compile(STR); String str; while ((str = in.readLine()) != null) { if (pat1.matcher(str).find()) { return true; } } return false; }
/** * Check whether the source is in the correct format for this importer. */
Check whether the source is in the correct format for this importer
isRecognizedFormat
{ "repo_name": "robymus/jabref", "path": "src/main/java/net/sf/jabref/importer/fileformat/InspecImporter.java", "license": "gpl-2.0", "size": 6332 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStream", "java.util.regex.Pattern", "net.sf.jabref.importer.ImportFormatReader" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.util.regex.Pattern; import net.sf.jabref.importer.ImportFormatReader;
import java.io.*; import java.util.regex.*; import net.sf.jabref.importer.*;
[ "java.io", "java.util", "net.sf.jabref" ]
java.io; java.util; net.sf.jabref;
1,804,539
@Deprecated public ReferenceList getWorkflowsEnabled( AdminUser user, Locale locale ) { return getWorkflowsEnabled( (User) user, locale ); }
ReferenceList function( AdminUser user, Locale locale ) { return getWorkflowsEnabled( (User) user, locale ); }
/** * return a reference list which contains a list enabled workflow * * @param user * the User * @param locale * the locale * @return a reference list which contains a list enabled workflow * @deprecated use getWorkflowsEnabled( User, Locale ) */
return a reference list which contains a list enabled workflow
getWorkflowsEnabled
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/workflow/WorkflowService.java", "license": "bsd-3-clause", "size": 36553 }
[ "fr.paris.lutece.api.user.User", "fr.paris.lutece.portal.business.user.AdminUser", "fr.paris.lutece.util.ReferenceList", "java.util.Locale" ]
import fr.paris.lutece.api.user.User; import fr.paris.lutece.portal.business.user.AdminUser; import fr.paris.lutece.util.ReferenceList; import java.util.Locale;
import fr.paris.lutece.api.user.*; import fr.paris.lutece.portal.business.user.*; import fr.paris.lutece.util.*; import java.util.*;
[ "fr.paris.lutece", "java.util" ]
fr.paris.lutece; java.util;
117,202
@Nonnull public static ItemStack loadItemStackFromTag(@Nonnull NBTTagCompound tag) { ItemStack stack = new ItemStack(tag); if (tag.hasKey("ActualCount", Constants.NBT.TAG_INT)) { stack.setCount(tag.getInteger("ActualCount")); } return stack.isEmpty() ? I...
static ItemStack function(@Nonnull NBTTagCompound tag) { ItemStack stack = new ItemStack(tag); if (tag.hasKey(STR, Constants.NBT.TAG_INT)) { stack.setCount(tag.getInteger(STR)); } return stack.isEmpty() ? ItemStack.EMPTY : stack; }
/** * Reads an ItemStack from the given compound tag, including the Ender Utilities-specific custom stackSize. * @param tag * @return */
Reads an ItemStack from the given compound tag, including the Ender Utilities-specific custom stackSize
loadItemStackFromTag
{ "repo_name": "maruohon/autoverse", "path": "src/main/java/fi/dy/masa/autoverse/util/NBTUtils.java", "license": "gpl-3.0", "size": 17670 }
[ "javax.annotation.Nonnull", "net.minecraft.item.ItemStack", "net.minecraft.nbt.NBTTagCompound", "net.minecraftforge.common.util.Constants" ]
import javax.annotation.Nonnull; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.Constants;
import javax.annotation.*; import net.minecraft.item.*; import net.minecraft.nbt.*; import net.minecraftforge.common.util.*;
[ "javax.annotation", "net.minecraft.item", "net.minecraft.nbt", "net.minecraftforge.common" ]
javax.annotation; net.minecraft.item; net.minecraft.nbt; net.minecraftforge.common;
1,919,667
@SuppressLint("NewApi") public static boolean isExternalStorageRemovable() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { return Environment.isExternalStorageRemovable(); } return true; }
@SuppressLint(STR) static boolean function() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { return Environment.isExternalStorageRemovable(); } return true; }
/** * Check if external storage is built-in or removable. * * @return True if external storage is removable (like an SD card), false * otherwise. */
Check if external storage is built-in or removable
isExternalStorageRemovable
{ "repo_name": "Ajapaik/ajapaik-android", "path": "app/src/ee/ajapaik/android/external/bitmaputil/Utils.java", "license": "mit", "size": 4502 }
[ "android.annotation.SuppressLint", "android.os.Build", "android.os.Environment" ]
import android.annotation.SuppressLint; import android.os.Build; import android.os.Environment;
import android.annotation.*; import android.os.*;
[ "android.annotation", "android.os" ]
android.annotation; android.os;
1,674,637
public Path lookupNative(String name, Map<String,Object> attributes) { return lookup(name, attributes); }
Path function(String name, Map<String,Object> attributes) { return lookup(name, attributes); }
/** * Looks up a native path, adding attributes. */
Looks up a native path, adding attributes
lookupNative
{ "repo_name": "christianchristensen/resin", "path": "modules/kernel/src/com/caucho/vfs/Path.java", "license": "gpl-2.0", "size": 35240 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,692,318
public BlockBuilder closeEntryStrict() throws DuplicateMapKeyException, NotSupportedException { if (!currentEntryOpened) { throw new IllegalStateException("Expected entry to be opened but was closed"); } entryAdded(false); currentEntryOpened = false; ...
BlockBuilder function() throws DuplicateMapKeyException, NotSupportedException { if (!currentEntryOpened) { throw new IllegalStateException(STR); } entryAdded(false); currentEntryOpened = false; ensureHashTableSize(); int previousAggregatedEntryCount = offsets[positionCount - 1]; int aggregatedEntryCount = offsets[posi...
/** * This method will check duplicate keys and close entry. * <p> * When duplicate keys are discovered, the block is guaranteed to be in * a consistent state before {@link DuplicateMapKeyException} is thrown. * In other words, one can continue to use this BlockBuilder. */
This method will check duplicate keys and close entry. When duplicate keys are discovered, the block is guaranteed to be in a consistent state before <code>DuplicateMapKeyException</code> is thrown. In other words, one can continue to use this BlockBuilder
closeEntryStrict
{ "repo_name": "twitter-forks/presto", "path": "presto-common/src/main/java/com/facebook/presto/common/block/MapBlockBuilder.java", "license": "apache-2.0", "size": 21041 }
[ "com.facebook.presto.common.NotSupportedException" ]
import com.facebook.presto.common.NotSupportedException;
import com.facebook.presto.common.*;
[ "com.facebook.presto" ]
com.facebook.presto;
736,207
@RequiredScope({view,download}) @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = UrlHelpers.DOWNLOAD_ORDER_HISTORY, method = RequestMethod.POST) public @ResponseBody DownloadOrderSummaryResponse getDownloadOrderHistory( @RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId, @Req...
@RequiredScope({view,download}) @ResponseStatus(HttpStatus.CREATED) @RequestMapping(value = UrlHelpers.DOWNLOAD_ORDER_HISTORY, method = RequestMethod.POST) @ResponseBody DownloadOrderSummaryResponse function( @RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId, @RequestBody DownloadOrderSummaryReque...
/** * Get the caller's download order history in reverse chronological order. This * is a paginated call. * * @param userId * @return A single page of download order summaries. * @throws Throwable */
Get the caller's download order history in reverse chronological order. This is a paginated call
getDownloadOrderHistory
{ "repo_name": "Sage-Bionetworks/Synapse-Repository-Services", "path": "services/repository/src/main/java/org/sagebionetworks/file/controller/UploadController.java", "license": "apache-2.0", "size": 47138 }
[ "org.sagebionetworks.repo.model.AuthorizationConstants", "org.sagebionetworks.repo.model.file.DownloadOrderSummaryRequest", "org.sagebionetworks.repo.model.file.DownloadOrderSummaryResponse", "org.sagebionetworks.repo.web.RequiredScope", "org.sagebionetworks.repo.web.UrlHelpers", "org.springframework.http...
import org.sagebionetworks.repo.model.AuthorizationConstants; import org.sagebionetworks.repo.model.file.DownloadOrderSummaryRequest; import org.sagebionetworks.repo.model.file.DownloadOrderSummaryResponse; import org.sagebionetworks.repo.web.RequiredScope; import org.sagebionetworks.repo.web.UrlHelpers; import org.spr...
import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.file.*; import org.sagebionetworks.repo.web.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "org.sagebionetworks.repo", "org.springframework.http", "org.springframework.web" ]
org.sagebionetworks.repo; org.springframework.http; org.springframework.web;
2,383,766
public static DataNode instantiateDataNode(String args[], Configuration conf, SecureResources resources) throws IOException { if (conf == null) conf = new Configuration(); if (!parseArguments(args, conf)) { printUsage(); ...
static DataNode function(String args[], Configuration conf, SecureResources resources) throws IOException { if (conf == null) conf = new Configuration(); if (!parseArguments(args, conf)) { printUsage(); System.exit(-2); } if (conf.get(STR) != null) { LOG.error(STR + STR); System.exit(-1); } String[] dataDirs = conf.get...
/** Instantiate a single datanode object. This must be run by invoking * {@link DataNode#runDatanodeDaemon(DataNode)} subsequently. * @param resources Secure resources needed to run under Kerberos */
Instantiate a single datanode object. This must be run by invoking <code>DataNode#runDatanodeDaemon(DataNode)</code> subsequently
instantiateDataNode
{ "repo_name": "gndpig/hadoop", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 86689 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter", "org.apache.hadoop.metrics2.lib.DefaultMetricsSystem", "org.apache.hadoop.util.StringUtils" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter; import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; import org.apache.hadoop.util.StringUtils;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.metrics2.lib.*; import org.apache.hadoop.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,793,724
protected boolean verifyEnvironMarkerData(Map<String, String> markerData, Environment env, Iterable<String> keys) throws InterruptedException { Map<String, String> environ = ActionEnvironmentFunction.getEnvironmentView(env, keys); if (env.valuesMissing()) { return false; // Returns false so caller...
boolean function(Map<String, String> markerData, Environment env, Iterable<String> keys) throws InterruptedException { Map<String, String> environ = ActionEnvironmentFunction.getEnvironmentView(env, keys); if (env.valuesMissing()) { return false; } Map<String, String> repoEnvOverride = PrecomputedValue.REPO_ENV.get(env...
/** * Verify marker data previously saved by * {@link #declareEnvironmentDependencies(Map, Environment, Iterable)}. This function is to be * called from a {@link #verifyMarkerData(Rule, Map, Environment)} function to verify the values * for environment variables. */
Verify marker data previously saved by <code>#declareEnvironmentDependencies(Map, Environment, Iterable)</code>. This function is to be called from a <code>#verifyMarkerData(Rule, Map, Environment)</code> function to verify the values for environment variables
verifyEnvironMarkerData
{ "repo_name": "cushon/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java", "license": "apache-2.0", "size": 27637 }
[ "com.google.devtools.build.lib.skyframe.ActionEnvironmentFunction", "com.google.devtools.build.lib.skyframe.PrecomputedValue", "com.google.devtools.build.skyframe.SkyFunction", "java.util.LinkedHashMap", "java.util.Map", "java.util.Objects" ]
import com.google.devtools.build.lib.skyframe.ActionEnvironmentFunction; import com.google.devtools.build.lib.skyframe.PrecomputedValue; import com.google.devtools.build.skyframe.SkyFunction; import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects;
import com.google.devtools.build.lib.skyframe.*; import com.google.devtools.build.skyframe.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
2,165,819
CloseableHttpClient httpclient = HttpClients.createDefault(); try { AndroReceiptParam param = new AndroReceiptParam(); param.setSignature("iqXB0Gn4saVtmURy+J7d28E0HvoAzNyIiIoKig6TyGbz" + "Y6AwHtWFsx+IRj5RsbsmFWBF6OQssjuVbnIMBsB3IZ/q" + "POnmCbM1E24NVPSrZPB4To5b1Nw/VpvA4...
CloseableHttpClient httpclient = HttpClients.createDefault(); try { AndroReceiptParam param = new AndroReceiptParam(); param.setSignature(STR + STR + STR + STR + STR + STR + STR + STR); param.setSignedData( "{\"orderId\":\"12999763169054705758.1325922859268362\",STR\"packageName\":\"com.Devnom.PuzzleSaga\",STR\"product...
/** * Unit Test Method. * * @throws Exception Exception */
Unit Test Method
test
{ "repo_name": "myc0058/PayPushServer", "path": "PayPushServer/src/com/myc0058/paypush/Tests/SendAndroReceipt.java", "license": "apache-2.0", "size": 4016 }
[ "com.google.gson.Gson", "com.google.gson.GsonBuilder", "com.myc0058.paypush.Params", "com.myc0058.paypush.Strings", "com.myc0058.paypush.settings.PayPushGlobalConsts", "java.net.URLEncoder", "org.apache.http.client.methods.HttpGet", "org.apache.http.impl.client.CloseableHttpClient", "org.apache.http...
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.myc0058.paypush.Params; import com.myc0058.paypush.Strings; import com.myc0058.paypush.settings.PayPushGlobalConsts; import java.net.URLEncoder; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClie...
import com.google.gson.*; import com.myc0058.paypush.*; import com.myc0058.paypush.settings.*; import java.net.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*;
[ "com.google.gson", "com.myc0058.paypush", "java.net", "org.apache.http" ]
com.google.gson; com.myc0058.paypush; java.net; org.apache.http;
1,417,733
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (mespswpPackage.Literals.MINSTANTIABLE_RESOURCE_DEMAND__PARAMETER_VALUE_ASSIGNMENTS, ...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (mespswpPackage.Literals.MINSTANTIABLE_RESOURCE_DEMAND__PARAMETER_VALUE_ASSIGNMENTS, mespswpFactory.eINSTANCE.createMSwPackageProvidedInterf...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object
collectNewChildDescriptors
{ "repo_name": "parraman/micobs", "path": "mesp/es.uah.aut.srg.micobs.mesp/src/es/uah/aut/srg/micobs/mesp/mespswp/provider/MInstantiableResourceDemandItemProvider.java", "license": "epl-1.0", "size": 8598 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,477,721
public static void init( ) { CacheService.registerCacheableService( new XmlTransformerCacheService( ) ); } /** * {@inheritDoc }
static void function( ) { CacheService.registerCacheableService( new XmlTransformerCacheService( ) ); } /** * {@inheritDoc }
/** * Inits the. */
Inits the
init
{ "repo_name": "rzara/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/html/XmlTransformerCacheService.java", "license": "bsd-3-clause", "size": 3966 }
[ "fr.paris.lutece.portal.service.cache.CacheService" ]
import fr.paris.lutece.portal.service.cache.CacheService;
import fr.paris.lutece.portal.service.cache.*;
[ "fr.paris.lutece" ]
fr.paris.lutece;
2,082,042
T getType(Map<String, Object> raw) { return supplier.get(); } } private static class HeadingResolver extends BlockResolver<CMARichHeading> { final int level; HeadingResolver(int level) { super(() -> new CMARichHeading(level)); this.level = level; } }
T getType(Map<String, Object> raw) { return supplier.get(); } } private static class HeadingResolver extends BlockResolver<CMARichHeading> { final int level; HeadingResolver(int level) { super(() -> new CMARichHeading(level)); this.level = level; } }
/** * Convenience method to try and find out the type of the given raw map representation. * * @param raw a map coming from Contentful, parsed from the json response. * @return a new node based on the type of T. */
Convenience method to try and find out the type of the given raw map representation
getType
{ "repo_name": "contentful/contentful-management.java", "path": "src/main/java/com/contentful/java/cma/model/rich/RichTextFactory.java", "license": "apache-2.0", "size": 9844 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,069,266
public static final boolean setSelectedValue(ListBox list, String value, boolean addMissingValues) { if (value == null) { list.setSelectedIndex(0); return false; } else { int index = findValueInListBox(list, value); if (index >= 0) { list.setSelectedIndex(index); return true; } ...
static final boolean function(ListBox list, String value, boolean addMissingValues) { if (value == null) { list.setSelectedIndex(0); return false; } else { int index = findValueInListBox(list, value); if (index >= 0) { list.setSelectedIndex(index); return true; } if (addMissingValues) { list.addItem(value, value); inde...
/** * Utility function to set the current value in a ListBox. * * @return returns true if the option corresponding to the value * was successfully selected in the ListBox */
Utility function to set the current value in a ListBox
setSelectedValue
{ "repo_name": "tractionsoftware/gwt-traction", "path": "src/main/java/com/tractionsoftware/gwt/user/client/ui/SingleListBox.java", "license": "apache-2.0", "size": 5809 }
[ "com.google.gwt.user.client.ui.ListBox" ]
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,746,769
public void setDueDt(LocalDate dueDt) { this.dueDt = dueDt; }
void function(LocalDate dueDt) { this.dueDt = dueDt; }
/** * This method was generated by MyBatis Generator. * This method sets the value of the database column TODO.DUE_DT * * @param dueDt the value for TODO.DUE_DT * * @mbggenerated */
This method was generated by MyBatis Generator. This method sets the value of the database column TODO.DUE_DT
setDueDt
{ "repo_name": "agwlvssainokuni/springapp", "path": "querytutorial/src/generated/java/cherry/querytutorial/db/gen/dto/Todo.java", "license": "apache-2.0", "size": 13451 }
[ "org.joda.time.LocalDate" ]
import org.joda.time.LocalDate;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,252,795
@Test public void test_getClaimNumber() { String value = "new_value"; instance.setClaimNumber(value); assertEquals("'getClaimNumber' should be correct.", value, instance.getClaimNumber()); }
void function() { String value = STR; instance.setClaimNumber(value); assertEquals(STR, value, instance.getClaimNumber()); }
/** * <p> * Accuracy test for the method <code>getClaimNumber()</code>.<br> * The value should be properly retrieved. * </p> */
Accuracy test for the method <code>getClaimNumber()</code>. The value should be properly retrieved.
test_getClaimNumber
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/entities/application/AnnuitantListUnitTests.java", "license": "apache-2.0", "size": 2873 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,036,535
void importActivityStatement(InputStream f, List<Exception> errors) { try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(f); ...
void importActivityStatement(InputStream f, List<Exception> errors) { try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(f); doc.getDocumentElement().normalize(); importModelObjects(doc, "Trade", errors)...
/** * Import an Interactive Broker ActivityStatement from an XML file. It * currently only imports Trades, Corporate Transactions and Cash * Transactions. */
Import an Interactive Broker ActivityStatement from an XML file. It currently only imports Trades, Corporate Transactions and Cash Transactions
importActivityStatement
{ "repo_name": "simpsus/portfolio", "path": "name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/IBFlexStatementExtractor.java", "license": "epl-1.0", "size": 17103 }
[ "java.io.IOException", "java.io.InputStream", "java.util.List", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.io.InputStream; import java.util.List; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.xml.sax.SAXException;
import java.io.*; import java.util.*; import javax.xml.parsers.*; 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;
356,450
private ResultFilterVO initSearchFilter(HttpServletRequest request, PdcSearchSessionController pdcSC) { String userId = request.getParameter("authorFilter"); String instanceId = request.getParameter("componentFilter"); String datatype = request.getParameter("datatypeFilter"); ResultFilterVO fil...
ResultFilterVO function(HttpServletRequest request, PdcSearchSessionController pdcSC) { String userId = request.getParameter(STR); String instanceId = request.getParameter(STR); String datatype = request.getParameter(STR); ResultFilterVO filter = new ResultFilterVO(); if (StringUtil.isDefined(userId)) { filter.setAutho...
/** * Initialize search result filter object from request * * @param request the HTTPServletRequest * @param pdcSC the pdcSearchSessionController * @return a new ResultFilterVO which contains data information */
Initialize search result filter object from request
initSearchFilter
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "war-core/src/main/java/com/stratelia/silverpeas/pdcPeas/servlets/PdcSearchRequestRouter.java", "license": "agpl-3.0", "size": 84410 }
[ "com.silverpeas.util.StringUtil", "com.stratelia.silverpeas.pdcPeas.control.PdcSearchSessionController", "com.stratelia.silverpeas.pdcPeas.vo.ResultFilterVO", "javax.servlet.http.HttpServletRequest" ]
import com.silverpeas.util.StringUtil; import com.stratelia.silverpeas.pdcPeas.control.PdcSearchSessionController; import com.stratelia.silverpeas.pdcPeas.vo.ResultFilterVO; import javax.servlet.http.HttpServletRequest;
import com.silverpeas.util.*; import com.stratelia.silverpeas.*; import javax.servlet.http.*;
[ "com.silverpeas.util", "com.stratelia.silverpeas", "javax.servlet" ]
com.silverpeas.util; com.stratelia.silverpeas; javax.servlet;
1,638,421
private List<FileStatus> listDirectory(SwiftObjectPath path, boolean listDeep, boolean newest) throws IOException { final byte[] bytes; final ArrayList<FileStatus> files = new ArrayList<FileStatus>(); final Path correctSwift...
List<FileStatus> function(SwiftObjectPath path, boolean listDeep, boolean newest) throws IOException { final byte[] bytes; final ArrayList<FileStatus> files = new ArrayList<FileStatus>(); final Path correctSwiftPath = getCorrectSwiftPath(path); try { bytes = swiftRestClient.listDeepObjectsInDirectory(path, listDeep); }...
/** * List a directory. * This is O(n) for the number of objects in this path. * * * * @param path working path * @param listDeep ask for all the data * @param newest ask for the newest data * @return Collection of file statuses * @throws IOException IO problems * @throws FileNotFoundEx...
List a directory. This is O(n) for the number of objects in this path
listDirectory
{ "repo_name": "legend-hua/hadoop", "path": "hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeFileSystemStore.java", "license": "apache-2.0", "size": 35041 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.swift.util.SwiftObjectPath" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.swift.util.SwiftObjectPath;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.swift.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,341,473
public void startExperiment(){ if(this.completedExperiment){ System.out.println("Experiment was already run and has completed. If you want to run a new experiment create a new Experiment object."); return; } if(this.plotter == null){ TrialMode trialMode = TrialMode.MOSTRECENTANDAVERAGE; if(...
void function(){ if(this.completedExperiment){ System.out.println(STR); return; } if(this.plotter == null){ TrialMode trialMode = TrialMode.MOSTRECENTANDAVERAGE; if(this.nTrials == 1){ trialMode = TrialMode.MOSTRECENTTTRIALONLY; } this.plotter = new PerformancePlotter(this.agentFactories[0].getAgentName(), rf, 500, 250...
/** * Starts the experiment and runs all trails for all agents. */
Starts the experiment and runs all trails for all agents
startExperiment
{ "repo_name": "ryanlinnane/burlap", "path": "src/burlap/behavior/singleagent/auxiliary/performance/LearningAlgorithmExperimenter.java", "license": "lgpl-3.0", "size": 12984 }
[ "burlap.debugtools.DPrint" ]
import burlap.debugtools.DPrint;
import burlap.debugtools.*;
[ "burlap.debugtools" ]
burlap.debugtools;
330,239
@Idempotent BlockStoragePolicy getStoragePolicy(String path) throws IOException;
BlockStoragePolicy getStoragePolicy(String path) throws IOException;
/** * Get the storage policy for a file/directory. * @param path * Path of an existing file/directory. * @throws AccessControlException * If access is denied * @throws org.apache.hadoop.fs.UnresolvedLinkException * if <code>src</code> contains a symlink * @throws jav...
Get the storage policy for a file/directory
getStoragePolicy
{ "repo_name": "Ethanlm/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 63582 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,460,609
@Override public boolean requestInfo(final Configuration output, final String command) throws ManifoldCFException { if (command.startsWith("folders/")) { final String parentFolder = command.substring("folders/".length()); try { final String[] folders = getChildFolderNames(parentFolder); ...
boolean function(final Configuration output, final String command) throws ManifoldCFException { if (command.startsWith(STR)) { final String parentFolder = command.substring(STR.length()); try { final String[] folders = getChildFolderNames(parentFolder); int i = 0; while (i < folders.length) { final String folder = fold...
/** * Request arbitrary connector information. This method is called directly from the API in order to allow API users to perform any one of several connector-specific queries. * * @param output is the response object, to be filled in by this method. * @param command is the command, which is taken directly...
Request arbitrary connector information. This method is called directly from the API in order to allow API users to perform any one of several connector-specific queries
requestInfo
{ "repo_name": "francelabs/datafari", "path": "datafari-share-connector/src/main/java/com/francelabs/datafari/connectors/share/SharedDriveConnector.java", "license": "apache-2.0", "size": 233737 }
[ "org.apache.manifoldcf.core.interfaces.Configuration", "org.apache.manifoldcf.core.interfaces.ConfigurationNode", "org.apache.manifoldcf.core.interfaces.ManifoldCFException", "org.apache.manifoldcf.crawler.system.ManifoldCF" ]
import org.apache.manifoldcf.core.interfaces.Configuration; import org.apache.manifoldcf.core.interfaces.ConfigurationNode; import org.apache.manifoldcf.core.interfaces.ManifoldCFException; import org.apache.manifoldcf.crawler.system.ManifoldCF;
import org.apache.manifoldcf.core.interfaces.*; import org.apache.manifoldcf.crawler.system.*;
[ "org.apache.manifoldcf" ]
org.apache.manifoldcf;
2,557,859
public static Map<String, Object> fromAMQPTable( byte[] reply ) { try { return fixAMQPTable( new MethodArgumentReader( new ValueReader( new DataInputStream( new ByteArrayInputStream( reply ) ) ) ) .readTable() ); } catch( IO...
static Map<String, Object> function( byte[] reply ) { try { return fixAMQPTable( new MethodArgumentReader( new ValueReader( new DataInputStream( new ByteArrayInputStream( reply ) ) ) ) .readTable() ); } catch( IOException ex ) { throw new UncheckedIOException( ex ); } }
/** * Convert an AMQP table to a map * * @param reply * * @return */
Convert an AMQP table to a map
fromAMQPTable
{ "repo_name": "peter-mount/opendata-common", "path": "brokers/rabbitmq/src/main/java/uk/trainwatch/rabbitmq/RabbitMQ.java", "license": "apache-2.0", "size": 29777 }
[ "com.rabbitmq.client.impl.MethodArgumentReader", "com.rabbitmq.client.impl.ValueReader", "java.io.ByteArrayInputStream", "java.io.DataInputStream", "java.io.IOException", "java.io.UncheckedIOException", "java.util.Map" ]
import com.rabbitmq.client.impl.MethodArgumentReader; import com.rabbitmq.client.impl.ValueReader; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.UncheckedIOException; import java.util.Map;
import com.rabbitmq.client.impl.*; import java.io.*; import java.util.*;
[ "com.rabbitmq.client", "java.io", "java.util" ]
com.rabbitmq.client; java.io; java.util;
1,264,965
protected Coordinate inversePointRaw (double x, double y, Coordinate storage) { double yy = 2.0 * y / StrictMath.PI / _a; double phid = yy * 90.0; double p2 = StrictMath.abs(phid / 5.0); int ip1 = (int)StrictMath.floor(p2 - EPSLN); if (ip1 >= 18) { storage.x = Dou...
Coordinate function (double x, double y, Coordinate storage) { double yy = 2.0 * y / StrictMath.PI / _a; double phid = yy * 90.0; double p2 = StrictMath.abs(phid / 5.0); int ip1 = (int)StrictMath.floor(p2 - EPSLN); if (ip1 >= 18) { storage.x = Double.NaN; storage.y = Double.NaN; return storage; } if (ip1 == 0) ip1 = 1;...
/** * Inverse projects a point. * @param x the x coordinate of the point to be inverse projected * @param y the y coordinate of the point to be inverse projected * @param storage a place to store the result * @return The inverse of <code>pt</code>. Same object as <code>storage</code>. */
Inverse projects a point
inversePointRaw
{ "repo_name": "reuven/modelingcommons", "path": "public/extensions/gis/src/org/myworldgis/projection/Robinson.java", "license": "agpl-3.0", "size": 7908 }
[ "com.vividsolutions.jts.geom.Coordinate", "org.myworldgis.util.GeometryUtils" ]
import com.vividsolutions.jts.geom.Coordinate; import org.myworldgis.util.GeometryUtils;
import com.vividsolutions.jts.geom.*; import org.myworldgis.util.*;
[ "com.vividsolutions.jts", "org.myworldgis.util" ]
com.vividsolutions.jts; org.myworldgis.util;
2,334,226
public Builder loadFromSource(String source) { SettingsLoader settingsLoader = SettingsLoaderFactory.loaderFromSource(source); try { Map<String, String> loadedSettings = settingsLoader.load(source); put(loadedSettings); } catch (Exception e) { ...
Builder function(String source) { SettingsLoader settingsLoader = SettingsLoaderFactory.loaderFromSource(source); try { Map<String, String> loadedSettings = settingsLoader.load(source); put(loadedSettings); } catch (Exception e) { throw new SettingsException(STR + source + "]", e); } return this; }
/** * Loads settings from the actual string content that represents them using the * {@link SettingsLoaderFactory#loaderFromSource(String)}. */
Loads settings from the actual string content that represents them using the <code>SettingsLoaderFactory#loaderFromSource(String)</code>
loadFromSource
{ "repo_name": "strapdata/elassandra-test", "path": "core/src/main/java/org/elasticsearch/common/settings/Settings.java", "license": "apache-2.0", "size": 49155 }
[ "java.util.Map", "org.elasticsearch.common.settings.loader.SettingsLoader", "org.elasticsearch.common.settings.loader.SettingsLoaderFactory" ]
import java.util.Map; import org.elasticsearch.common.settings.loader.SettingsLoader; import org.elasticsearch.common.settings.loader.SettingsLoaderFactory;
import java.util.*; import org.elasticsearch.common.settings.loader.*;
[ "java.util", "org.elasticsearch.common" ]
java.util; org.elasticsearch.common;
998,604
public Timestamp getMemberSince() { return (Timestamp) getValue(5); } // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- /** * {@inheritDoc}
Timestamp function() { return (Timestamp) getValue(5); } /** * {@inheritDoc}
/** * Getter for <code>collect.ofc_user_usergroup.member_since</code>. */
Getter for <code>collect.ofc_user_usergroup.member_since</code>
getMemberSince
{ "repo_name": "openforis/collect", "path": "collect-core/src/generated/java/org/openforis/collect/persistence/jooq/tables/records/OfcUserUsergroupRecord.java", "license": "mit", "size": 6709 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
59,357
private static int closest(int of, List<Integer> in) { int min = Integer.MAX_VALUE; int closest = of; for (int v : in) { final int diff = Math.abs(v - of); if (diff < min) { min = diff; closest = v; } } re...
static int function(int of, List<Integer> in) { int min = Integer.MAX_VALUE; int closest = of; for (int v : in) { final int diff = Math.abs(v - of); if (diff < min) { min = diff; closest = v; } } return closest; }
/** * find the forecast time for a given time * * @param of look for this int * @param in in this list * @return the int the closest to of */
find the forecast time for a given time
closest
{ "repo_name": "Nbzh/TsenTest", "path": "appli_tsen/src/fr/esir/oep/Weather.java", "license": "apache-2.0", "size": 2553 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,892,377
private void computeUpperBound(PrimSig sig) throws Err { // Sig's upperbound is fully computed. We recursively compute the upperbound for children... TupleSet x = ub.get(sig).clone(); // We remove atoms that MUST be in a subsig for(PrimSig c: sig.children()) x.removeAll(lb.get(c)); ...
void function(PrimSig sig) throws Err { TupleSet x = ub.get(sig).clone(); for(PrimSig c: sig.children()) x.removeAll(lb.get(c)); for(PrimSig c: sig.children()) { if (sc.sig2scope(c) > lb.get(c).size()) ub.get(c).addAll(x); computeUpperBound(c); } }
/** Computes the upperbound from top-down, then allocate a relation for it. * Precondition: sig is not a builtin sig */
Computes the upperbound from top-down, then allocate a relation for it. Precondition: sig is not a builtin sig
computeUpperBound
{ "repo_name": "ModelWriter/WP3", "path": "Source/eu.modelwriter.alloyanalyzer/src/edu/mit/csail/sdg/alloy4compiler/translator/BoundsComputer.java", "license": "epl-1.0", "size": 17004 }
[ "edu.mit.csail.sdg.alloy4.Err", "edu.mit.csail.sdg.alloy4compiler.ast.Sig" ]
import edu.mit.csail.sdg.alloy4.Err; import edu.mit.csail.sdg.alloy4compiler.ast.Sig;
import edu.mit.csail.sdg.alloy4.*; import edu.mit.csail.sdg.alloy4compiler.ast.*;
[ "edu.mit.csail" ]
edu.mit.csail;
389,351
public Set<PosTaggedToken> getYield() { if (yield == null) { yield = new TreeSet<PosTaggedToken>(new PosTaggedTokenLeftToRightComparator()); this.getAllNodes(yield); } return yield; }
Set<PosTaggedToken> function() { if (yield == null) { yield = new TreeSet<PosTaggedToken>(new PosTaggedTokenLeftToRightComparator()); this.getAllNodes(yield); } return yield; }
/** * The current node's yield, an ordered set of the current node and all of its * descendants, that have actually been added. * * @return */
The current node's yield, an ordered set of the current node and all of its descendants, that have actually been added
getYield
{ "repo_name": "urieli/talismane", "path": "talismane_core/src/main/java/com/joliciel/talismane/parser/DependencyNode.java", "license": "agpl-3.0", "size": 9940 }
[ "com.joliciel.talismane.posTagger.PosTaggedToken", "com.joliciel.talismane.posTagger.PosTaggedTokenLeftToRightComparator", "java.util.Set", "java.util.TreeSet" ]
import com.joliciel.talismane.posTagger.PosTaggedToken; import com.joliciel.talismane.posTagger.PosTaggedTokenLeftToRightComparator; import java.util.Set; import java.util.TreeSet;
import com.joliciel.talismane.*; import java.util.*;
[ "com.joliciel.talismane", "java.util" ]
com.joliciel.talismane; java.util;
1,571,513
public boolean getIsActive() { if ( isActive == null ) { isActive = (SFBool)getField( "isActive" ); } return( isActive.getValue( ) ); }
boolean function() { if ( isActive == null ) { isActive = (SFBool)getField( STR ); } return( isActive.getValue( ) ); }
/** Return the isActive boolean value. * @return The isActive boolean value. */
Return the isActive boolean value
getIsActive
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/external/node/pointingdevicesensor/SAIPlaneSensor.java", "license": "gpl-2.0", "size": 6199 }
[ "org.web3d.x3d.sai.SFBool" ]
import org.web3d.x3d.sai.SFBool;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
2,461,901