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 static IMonitoringEDMAgent getMonitoringEDMAgent() throws Exception
{
IMonitoringEDMAgent edm = new MonitoringEDMAgent();
return edm;
} | static IMonitoringEDMAgent function() throws Exception { IMonitoringEDMAgent edm = new MonitoringEDMAgent(); return edm; } | /**
* Get a Monitoring EDM Agent interface, to get access to storing and retrieving
* monitoring data.
* Will set up the EDM DAO according to the EDM properties file on the class path.
* @return Instance of the light version of EDM monitoring.
* @throws Exception
*/ | Get a Monitoring EDM Agent interface, to get access to storing and retrieving monitoring data. Will set up the EDM DAO according to the EDM properties file on the class path | getMonitoringEDMAgent | {
"repo_name": "it-innovation/EXPERImonitor",
"path": "edm/factory/src/main/java/uk/ac/soton/itinnovation/experimedia/arch/ecc/edm/factory/EDMInterfaceFactory.java",
"license": "lgpl-2.1",
"size": 4163
} | [
"uk.ac.soton.itinnovation.experimedia.arch.ecc.edm.impl.metrics.MonitoringEDMAgent",
"uk.ac.soton.itinnovation.experimedia.arch.ecc.edm.spec.metrics.IMonitoringEDMAgent"
] | import uk.ac.soton.itinnovation.experimedia.arch.ecc.edm.impl.metrics.MonitoringEDMAgent; import uk.ac.soton.itinnovation.experimedia.arch.ecc.edm.spec.metrics.IMonitoringEDMAgent; | import uk.ac.soton.itinnovation.experimedia.arch.ecc.edm.impl.metrics.*; import uk.ac.soton.itinnovation.experimedia.arch.ecc.edm.spec.metrics.*; | [
"uk.ac.soton"
] | uk.ac.soton; | 28,435 |
public final NodeIdentifier routesContainerIdentifier() {
return this.routesContainerIdentifier;
} | final NodeIdentifier function() { return this.routesContainerIdentifier; } | /**
* Return the {@link NodeIdentifier} of the AFI/SAFI-specific container under
* the RIB routes.
*
* @return Container identifier, may not be null.
*/ | Return the <code>NodeIdentifier</code> of the AFI/SAFI-specific container under the RIB routes | routesContainerIdentifier | {
"repo_name": "opendaylight/bgpcep",
"path": "bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/AbstractRIBSupport.java",
"license": "epl-1.0",
"size": 29288
} | [
"org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier"
] | import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; | import org.opendaylight.yangtools.yang.data.api.*; | [
"org.opendaylight.yangtools"
] | org.opendaylight.yangtools; | 1,782,703 |
protected byte[] loadClassDataFromFile(String fileName) {
byte[] classBytes = null;
try {
InputStream in = getResourceAsStream(fileName);
if (in == null) {
return null;
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
... | byte[] function(String fileName) { byte[] classBytes = null; try { InputStream in = getResourceAsStream(fileName); if (in == null) { return null; } ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte buf[] = new byte[1024]; for (int i = 0;(i = in.read(buf)) != -1;) baos.write(buf, 0, i); in.close(); baos.clo... | /**
* Load JSP class data from file.
*/ | Load JSP class data from file | loadClassDataFromFile | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/webcontainerext/JSPExtensionClassLoader.java",
"license": "epl-1.0",
"size": 12599
} | [
"java.io.ByteArrayOutputStream",
"java.io.InputStream"
] | import java.io.ByteArrayOutputStream; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,728,109 |
@SuppressWarnings("unchecked")
public Type enrichRef(String resourceRef, String aggregationStrategyRef, boolean aggregateOnException, boolean shareUnitOfWork) {
EnrichDefinition answer = new EnrichDefinition();
answer.setExpression(new SimpleExpression("ref:" + resourceRef));
answer.setA... | @SuppressWarnings(STR) Type function(String resourceRef, String aggregationStrategyRef, boolean aggregateOnException, boolean shareUnitOfWork) { EnrichDefinition answer = new EnrichDefinition(); answer.setExpression(new SimpleExpression("ref:" + resourceRef)); answer.setAggregationStrategyRef(aggregationStrategyRef); a... | /**
* The <a href="http://camel.apache.org/content-enricher.html">Content Enricher EIP</a>
* enriches an exchange with additional data obtained from a <code>resourceUri</code>.
* <p/>
* The difference between this and {@link #pollEnrich(String)} is that this uses a producer
* to obtain the addi... | The Content Enricher EIP enriches an exchange with additional data obtained from a <code>resourceUri</code>. The difference between this and <code>#pollEnrich(String)</code> is that this uses a producer to obtain the additional data, where as pollEnrich uses a polling consumer | enrichRef | {
"repo_name": "grange74/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 152533
} | [
"org.apache.camel.model.language.SimpleExpression"
] | import org.apache.camel.model.language.SimpleExpression; | import org.apache.camel.model.language.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,797,767 |
public BigDecimal getActualAmt();
public static final String COLUMNNAME_ActualQty = "ActualQty"; | BigDecimal function(); public static final String COLUMNNAME_ActualQty = STR; | /** Get Actual Amount.
* The actual amount
*/ | Get Actual Amount. The actual amount | getActualAmt | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/I_C_CommissionDetail.java",
"license": "gpl-2.0",
"size": 7040
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 625,394 |
public void test5() {
Field[] fs = A.class.getFields();
assertNotNull("unexpected null", fs);
assertEquals("array length", 3, fs.length);
} | void function() { Field[] fs = A.class.getFields(); assertNotNull(STR, fs); assertEquals(STR, 3, fs.length); } | /**
* Only public fields should be reflected.
*/ | Only public fields should be reflected | test5 | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/java/drlvm/vm/tests/kernel/java/lang/ClassTestGetFields.java",
"license": "apache-2.0",
"size": 3114
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,184,067 |
private static String makeWordsCapitalized(String str, Pattern wordPattern) {
StringBuffer sb = new StringBuffer();
Matcher wordMatcher = wordPattern.matcher(str);
while (wordMatcher.find()) {
String oldWord = wordMatcher.group();
StringBuilder newWord = new StringBuilder();
... | static String function(String str, Pattern wordPattern) { StringBuffer sb = new StringBuffer(); Matcher wordMatcher = wordPattern.matcher(str); while (wordMatcher.find()) { String oldWord = wordMatcher.group(); StringBuilder newWord = new StringBuilder(); for (int i = 0, n = oldWord.length(); i < n; i++) { if (i == 0) ... | /**
* Makes all the words in the given string into capitalized format (first letter capital, rest
* lower case). Words are defined by the given regex pattern.
* @param str The string to process.
* @param wordPattern The regex pattern for matching a word.
* @return The resulting string with all ... | Makes all the words in the given string into capitalized format (first letter capital, rest lower case). Words are defined by the given regex pattern | makeWordsCapitalized | {
"repo_name": "atul-bhouraskar/closure-templates",
"path": "java/src/com/google/template/soy/parseinfo/passes/GenerateParseInfoVisitor.java",
"license": "apache-2.0",
"size": 37171
} | [
"com.google.common.collect.Maps",
"com.google.template.soy.base.internal.IndentedLinesBuilder",
"com.google.template.soy.soytree.SoyFileNode",
"com.google.template.soy.soytree.TemplateRegistry",
"java.util.LinkedHashMap",
"java.util.Map",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import com.google.common.collect.Maps; import com.google.template.soy.base.internal.IndentedLinesBuilder; import com.google.template.soy.soytree.SoyFileNode; import com.google.template.soy.soytree.TemplateRegistry; import java.util.LinkedHashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.re... | import com.google.common.collect.*; import com.google.template.soy.base.internal.*; import com.google.template.soy.soytree.*; import java.util.*; import java.util.regex.*; | [
"com.google.common",
"com.google.template",
"java.util"
] | com.google.common; com.google.template; java.util; | 72,356 |
@ApiModelProperty(name = ViewPermissionResourceProvider.RESOURCE_NAME_PROPERTY_ID)
public String getResourceName() {
return resourceName;
}
} | @ApiModelProperty(name = ViewPermissionResourceProvider.RESOURCE_NAME_PROPERTY_ID) String function() { return resourceName; } } | /**
* Returns resource name
* @return resource names
*/ | Returns resource name | getResourceName | {
"repo_name": "sekikn/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPermissionResponse.java",
"license": "apache-2.0",
"size": 3923
} | [
"io.swagger.annotations.ApiModelProperty",
"org.apache.ambari.server.controller.internal.ViewPermissionResourceProvider"
] | import io.swagger.annotations.ApiModelProperty; import org.apache.ambari.server.controller.internal.ViewPermissionResourceProvider; | import io.swagger.annotations.*; import org.apache.ambari.server.controller.internal.*; | [
"io.swagger.annotations",
"org.apache.ambari"
] | io.swagger.annotations; org.apache.ambari; | 1,749,802 |
@Transactional(propagation=Propagation.REQUIRED,isolation =Isolation.REPEATABLE_READ, rollbackFor = Exception.class)
public int insertSelective(List<Demo> list) throws Exception {
int insertCount = 0;
if (list == null || list.size() == 0) {
return insertCount;
}
for (... | @Transactional(propagation=Propagation.REQUIRED,isolation =Isolation.REPEATABLE_READ, rollbackFor = Exception.class) int function(List<Demo> list) throws Exception { int insertCount = 0; if (list == null list.size() == 0) { return insertCount; } for (Demo obj : list) { if (obj == null) { continue; } try { insertCount +... | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table demo
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table demo | insertSelective | {
"repo_name": "yuanmomo/maven-archetype",
"path": "framework-init/src/main/java/net/yuanmomo/framework/business/mybatis/DemoBusiness.java",
"license": "lgpl-2.1",
"size": 4449
} | [
"java.util.List",
"net.yuanmomo.framework.bean.Demo",
"org.springframework.transaction.annotation.Isolation",
"org.springframework.transaction.annotation.Propagation",
"org.springframework.transaction.annotation.Transactional"
] | import java.util.List; import net.yuanmomo.framework.bean.Demo; import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; | import java.util.*; import net.yuanmomo.framework.bean.*; import org.springframework.transaction.annotation.*; | [
"java.util",
"net.yuanmomo.framework",
"org.springframework.transaction"
] | java.util; net.yuanmomo.framework; org.springframework.transaction; | 2,448,584 |
public static String makeLoadProviderOffersCall(String username, String passwordHash) {
try {
HttpGet httpMethod = new HttpGet(URL + PATH + LOAD_PROVIDER_OFFERS);
httpMethod.addHeader("Content-Type", DEFAULT_CONTENT_TYPE);
httpMethod.addHeader("Accept-Encoding", ACCEPTED_... | static String function(String username, String passwordHash) { try { HttpGet httpMethod = new HttpGet(URL + PATH + LOAD_PROVIDER_OFFERS); httpMethod.addHeader(STR, DEFAULT_CONTENT_TYPE); httpMethod.addHeader(STR, ACCEPTED_ENCODING); String credentialsEncoded = Tools.encodeBase64(username, passwordHash); httpMethod.addH... | /**
* This method retrieves the offers of the provider that user belongs to.
*
* @param username The username of the user.
* @param passwordHash The password of the user hashed by {@link Tools#getHash(String)}.
* @return a json string.
*/ | This method retrieves the offers of the provider that user belongs to | makeLoadProviderOffersCall | {
"repo_name": "grnet/academic-id-merchant-android",
"path": "Main/src/gr/grnet/academicid/merchant/services/ServiceHandler.java",
"license": "gpl-3.0",
"size": 8242
} | [
"android.util.Log",
"gr.grnet.academicid.merchant.utilities.Constants",
"gr.grnet.academicid.merchant.utilities.Tools",
"java.io.IOException",
"org.apache.http.HttpEntity",
"org.apache.http.HttpResponse",
"org.apache.http.client.methods.HttpGet",
"org.apache.http.impl.client.DefaultHttpClient",
"org... | import android.util.Log; import gr.grnet.academicid.merchant.utilities.Constants; import gr.grnet.academicid.merchant.utilities.Tools; import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.Def... | import android.util.*; import gr.grnet.academicid.merchant.utilities.*; import java.io.*; import org.apache.http.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*; import org.apache.http.util.*; | [
"android.util",
"gr.grnet.academicid",
"java.io",
"org.apache.http"
] | android.util; gr.grnet.academicid; java.io; org.apache.http; | 1,104,031 |
public void setOneToMany(List oneToMany) {
this.oneToMany = oneToMany;
}
| void function(List oneToMany) { this.oneToMany = oneToMany; } | /**
* Sets the oneToMany.
* @param oneToMany The oneToMany to set
*/ | Sets the oneToMany | setOneToMany | {
"repo_name": "1fechner/FeatureExtractor",
"path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/test/java/org/hibernate/test/legacy/Container.java",
"license": "lgpl-2.1",
"size": 6060
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,640,836 |
public static Class<JSONPSerialization> jsonp() {
return JSONPSerialization.class;
} | static Class<JSONPSerialization> function() { return JSONPSerialization.class; } | /**
* Uses jsonp serialization.
*/ | Uses jsonp serialization | jsonp | {
"repo_name": "danilomunoz/vraptor4",
"path": "vraptor-core/src/main/java/br/com/caelum/vraptor/view/Results.java",
"license": "apache-2.0",
"size": 2996
} | [
"br.com.caelum.vraptor.serialization.JSONPSerialization"
] | import br.com.caelum.vraptor.serialization.JSONPSerialization; | import br.com.caelum.vraptor.serialization.*; | [
"br.com.caelum"
] | br.com.caelum; | 84,694 |
private static int getRandomBits(int numBits) {
// Sanity check.
assert numBits > 0;
assert numBits < 32;
FileInputStream input;
try {
// A naive implementation would read a 32-bit integer then use modulo, but
// this introduces a slight bias. Instead... | static int function(int numBits) { assert numBits > 0; assert numBits < 32; FileInputStream input; try { input = new FileInputStream(new File(STR)); } catch (Exception e) { Log.e(TAG, STR, e); return -1; } int result = 0; try { for (int n = 0; n < 4; n++) { result = (result << 8) (input.read() & 255); } } catch (Except... | /**
* Return a cryptographically-strong random number of numBits bits.
* @param numBits The number of bits in the result. Must be in 1..31 range.
* @return A random integer between 0 and (2^numBits - 1), inclusive, or -1
* in case of error (e.g. if /dev/urandom can't be opened or read).
*/ | Return a cryptographically-strong random number of numBits bits | getRandomBits | {
"repo_name": "TeamEOS/external_chromium_org",
"path": "base/android/java/src/org/chromium/base/library_loader/Linker.java",
"license": "bsd-3-clause",
"size": 44144
} | [
"android.util.Log",
"java.io.File",
"java.io.FileInputStream",
"java.util.Locale"
] | import android.util.Log; import java.io.File; import java.io.FileInputStream; import java.util.Locale; | import android.util.*; import java.io.*; import java.util.*; | [
"android.util",
"java.io",
"java.util"
] | android.util; java.io; java.util; | 2,886,758 |
private void renderAutocompleteHead(final IHeaderResponse response)
{
response.render(JavaScriptHeaderItem.forReference(AUTOCOMPLETE_JS));
final String id = getComponent().getMarkupId();
String indicatorId = findIndicatorId();
if (Strings.isEmpty(indicatorId))
{
indicatorId = "null";
}
else
{
... | void function(final IHeaderResponse response) { response.render(JavaScriptHeaderItem.forReference(AUTOCOMPLETE_JS)); final String id = getComponent().getMarkupId(); String indicatorId = findIndicatorId(); if (Strings.isEmpty(indicatorId)) { indicatorId = "null"; } else { indicatorId = "'" + indicatorId + "'"; } String ... | /**
* Render autocomplete init javascript and other head contributions
*
* @param response
*/ | Render autocomplete init javascript and other head contributions | renderAutocompleteHead | {
"repo_name": "zwsong/wicket",
"path": "wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteBehavior.java",
"license": "apache-2.0",
"size": 4991
} | [
"org.apache.wicket.markup.head.IHeaderResponse",
"org.apache.wicket.markup.head.JavaScriptHeaderItem",
"org.apache.wicket.markup.head.OnDomReadyHeaderItem",
"org.apache.wicket.util.string.Strings"
] | import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.head.JavaScriptHeaderItem; import org.apache.wicket.markup.head.OnDomReadyHeaderItem; import org.apache.wicket.util.string.Strings; | import org.apache.wicket.markup.head.*; import org.apache.wicket.util.string.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,680,661 |
void writeRecord(String[] record) throws IOException; | void writeRecord(String[] record) throws IOException; | /**
* Write the record to normalizer. The record parameter should not be encoded
* (i.e. length encoded) the implementation will appy the corrrect encoding.
*
* @param record Plain array of strings, implementors of this class should
* encode the record appropriately
* @throws... | Write the record to normalizer. The record parameter should not be encoded (i.e. length encoded) the implementation will appy the corrrect encoding | writeRecord | {
"repo_name": "gfyoung/elasticsearch",
"path": "x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/process/normalizer/NormalizerProcess.java",
"license": "apache-2.0",
"size": 1468
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,939,278 |
protected boolean restoreInputGroupSelectionForDatabaseEdits(CorrectionForm correctionForm) {
if (!CorrectionDocumentService.SYSTEM_DATABASE.equals(correctionForm.getChooseSystem())) {
return true;
}
if ("loadGroup".equals(correctionForm.getMethodToCall())) {
ret... | boolean function(CorrectionForm correctionForm) { if (!CorrectionDocumentService.SYSTEM_DATABASE.equals(correctionForm.getChooseSystem())) { return true; } if (STR.equals(correctionForm.getMethodToCall())) { return true; } GeneralLedgerCorrectionProcessDocument document = correctionForm.getCorrectionDocument(); if (cor... | /**
* For database-based edits, this method will determine if the input group has been changed since the last time the page was
* rendered.
*
* @param correctionForm
* @return false if the input group was inappropriately changed without using the selectSystemEditMethod method
*/ | For database-based edits, this method will determine if the input group has been changed since the last time the page was rendered | restoreInputGroupSelectionForDatabaseEdits | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/gl/document/web/struts/CorrectionAction.java",
"license": "agpl-3.0",
"size": 102157
} | [
"org.kuali.kfs.gl.document.GeneralLedgerCorrectionProcessDocument",
"org.kuali.kfs.gl.document.service.CorrectionDocumentService",
"org.kuali.kfs.sys.KFSKeyConstants",
"org.kuali.rice.krad.util.GlobalVariables"
] | import org.kuali.kfs.gl.document.GeneralLedgerCorrectionProcessDocument; import org.kuali.kfs.gl.document.service.CorrectionDocumentService; import org.kuali.kfs.sys.KFSKeyConstants; import org.kuali.rice.krad.util.GlobalVariables; | import org.kuali.kfs.gl.document.*; import org.kuali.kfs.gl.document.service.*; import org.kuali.kfs.sys.*; import org.kuali.rice.krad.util.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 1,754,839 |
void encodeVarBindValue(BerEncoder benc,
SnmpValue v)throws SnmpStatusException {
if (v == null) {
benc.putNull() ;
}
else if (v instanceof SnmpIpAddress) {
benc.putOctetString(((SnmpIpAddress)v).byteValue(), SnmpValue.IpAddressTag) ;
... | void encodeVarBindValue(BerEncoder benc, SnmpValue v)throws SnmpStatusException { if (v == null) { benc.putNull() ; } else if (v instanceof SnmpIpAddress) { benc.putOctetString(((SnmpIpAddress)v).byteValue(), SnmpValue.IpAddressTag) ; } else if (v instanceof SnmpCounter) { benc.putInteger(((SnmpCounter)v).longValue(), ... | /**
* For SNMP Runtime private use only.
*/ | For SNMP Runtime private use only | encodeVarBindValue | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/com/sun/jmx/snmp/SnmpMsg.java",
"license": "mit",
"size": 16647
} | [
"com.sun.jmx.snmp.SnmpStatusException"
] | import com.sun.jmx.snmp.SnmpStatusException; | import com.sun.jmx.snmp.*; | [
"com.sun.jmx"
] | com.sun.jmx; | 2,593,352 |
Locale getCurrentLocale(); | Locale getCurrentLocale(); | /**
* Gets the current locale setting
*
* @return the current locale, if not set it will return the default locale
*/ | Gets the current locale setting | getCurrentLocale | {
"repo_name": "Bssentials/Bssentials",
"path": "EssentialsBridge/src/main/java/com/earth2me/essentials/api/II18n.java",
"license": "gpl-3.0",
"size": 265
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,225,135 |
void setOtherSelection(IStructuredSelection otherSelection);
| void setOtherSelection(IStructuredSelection otherSelection); | /**
* Set a selection other than an asset selection or a collection selection
* @param otherSelection
*/ | Set a selection other than an asset selection or a collection selection | setOtherSelection | {
"repo_name": "bdaum/zoraPD",
"path": "com.bdaum.zoom.ui/src/com/bdaum/zoom/ui/INavigationHistory.java",
"license": "gpl-2.0",
"size": 6284
} | [
"org.eclipse.jface.viewers.IStructuredSelection"
] | import org.eclipse.jface.viewers.IStructuredSelection; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 996,064 |
@Test
public void terminateRequestDebugTargetConnectedThreads() {
final DebugTarget target = DebugPackage.eINSTANCE.getDebugFactory().createDebugTarget();
target.setContext(DebugPackage.eINSTANCE.getDebugFactory().createVariable());
target.setName("target");
target.setState(DebugTargetState.CONNECTED);
cr... | void function() { final DebugTarget target = DebugPackage.eINSTANCE.getDebugFactory().createDebugTarget(); target.setContext(DebugPackage.eINSTANCE.getDebugFactory().createVariable()); target.setName(STR); target.setState(DebugTargetState.CONNECTED); createThreads(target); DebugTargetUtils.terminateRequest(target); ass... | /**
* Tests {@link DebugTargetUtils#terminateRequest(DebugTarget)} in {@link DebugTargetState#CONNECTED}.
* With {@link Thread}.
*/ | Tests <code>DebugTargetUtils#terminateRequest(DebugTarget)</code> in <code>DebugTargetState#CONNECTED</code>. With <code>Thread</code> | terminateRequestDebugTargetConnectedThreads | {
"repo_name": "SiriusLab/SiriusAnimator",
"path": "simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/DebugTargetUtilsTests.java",
"license": "epl-1.0",
"size": 40694
} | [
"org.eclipse.gemoc.dsl.debug.DebugPackage",
"org.eclipse.gemoc.dsl.debug.DebugTarget",
"org.eclipse.gemoc.dsl.debug.DebugTargetState",
"org.eclipse.gemoc.dsl.debug.DebugTargetUtils",
"org.junit.Assert"
] | import org.eclipse.gemoc.dsl.debug.DebugPackage; import org.eclipse.gemoc.dsl.debug.DebugTarget; import org.eclipse.gemoc.dsl.debug.DebugTargetState; import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; import org.junit.Assert; | import org.eclipse.gemoc.dsl.debug.*; import org.junit.*; | [
"org.eclipse.gemoc",
"org.junit"
] | org.eclipse.gemoc; org.junit; | 1,911,298 |
public void setAllowedOrigins(List<String> allowedOrigins) {
this.allowedOrigins = allowedOrigins;
} | void function(List<String> allowedOrigins) { this.allowedOrigins = allowedOrigins; } | /**
* Sets allowedOrigins of Bucket CORS.
* @param allowedOrigins The allowedOrigins of Bucket CORS.
*/ | Sets allowedOrigins of Bucket CORS | setAllowedOrigins | {
"repo_name": "baidubce/bce-sdk-java",
"path": "src/main/java/com/baidubce/services/bos/model/CorsConfiguration.java",
"license": "apache-2.0",
"size": 6722
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,121,877 |
public void decreaseKey(int i, Key key) {
if (i < 0 || i >= n) throw new IndexOutOfBoundsException();
if (!contains(i)) throw new NoSuchElementException("Specified index is not in the queue");
if (greater(key, nodes[i].key)) throw new IllegalArgumentException("Calling with this argument would not decrease t... | void function(int i, Key key) { if (i < 0 i >= n) throw new IndexOutOfBoundsException(); if (!contains(i)) throw new NoSuchElementException(STR); if (greater(key, nodes[i].key)) throw new IllegalArgumentException(STR); Node<Key> x = nodes[i]; x.key = key; swim(i); } | /**
* Decreases the key associated with index i to the given key
* Worst case is O(log(n))
* @param i an index
* @param key the key to associate with i
* @throws java.lang.IndexOutOfBoundsException if the specified index is invalid
* @throws java.util.NoSuchElementException if the index has no key associate... | Decreases the key associated with index i to the given key Worst case is O(log(n)) | decreaseKey | {
"repo_name": "ahmedkhaled4d/php-pages",
"path": "Algorithms/src/IndexBinomialMinPQ.java",
"license": "gpl-2.0",
"size": 17668
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,263,416 |
public void onClickGPS(View view) {
if (gpsTrackingStarted) {
// stop tracking
gpsTrackingStarted = false;
((Button) findViewById(R.id.btn_start_gps))
.setText(R.string.key_btn_start_gps);
cleanUpCoordinates();
locationManager.removeUpdates(myLocationListener);
} else {
if (!isGPSEnabled()... | void function(View view) { if (gpsTrackingStarted) { gpsTrackingStarted = false; ((Button) findViewById(R.id.btn_start_gps)) .setText(R.string.key_btn_start_gps); cleanUpCoordinates(); locationManager.removeUpdates(myLocationListener); } else { if (!isGPSEnabled()) { showGPSDialog(); } else { startGPSTracking(); } } } | /**
* This method is called from layout button, id=btn_start_gps. Check if GPS
* tracking was started and change the button state and text.
*
* @param view
*/ | This method is called from layout button, id=btn_start_gps. Check if GPS tracking was started and change the button state and text | onClickGPS | {
"repo_name": "ksahlmann/spotdroid",
"path": "project/src/com/spotdroid/mobile/android/gui/LocationActivity.java",
"license": "mit",
"size": 10065
} | [
"android.view.View",
"android.widget.Button"
] | import android.view.View; import android.widget.Button; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 2,045,080 |
Set<ContentItemTO> getDependantItems(String site, String path); | Set<ContentItemTO> getDependantItems(String site, String path); | /**
* Get the content information of all dependant Items of the given path
* @param site Site of owner of the path.
* @param path Path of the content which will be check for dependant items.
* @return A unmodifiable Set of ContentItemTO with all dependant items.
*/ | Get the content information of all dependant Items of the given path | getDependantItems | {
"repo_name": "vestrada/studio",
"path": "src/main/java/org/craftercms/studio/api/v1/service/dependency/DmDependencyService.java",
"license": "gpl-3.0",
"size": 5641
} | [
"java.util.Set",
"org.craftercms.studio.api.v1.to.ContentItemTO"
] | import java.util.Set; import org.craftercms.studio.api.v1.to.ContentItemTO; | import java.util.*; import org.craftercms.studio.api.v1.to.*; | [
"java.util",
"org.craftercms.studio"
] | java.util; org.craftercms.studio; | 1,074,275 |
public void restart() {
if (isStandAlone() && isRestartable()) {
try {
Class wrapperClass = Class.forName(WRAPPER_CLASSNAME);
Method restartMethod = wrapperClass.getMethod("restart", (Class []) null);
restartMethod.invoke(null, (Object []) null);
... | void function() { if (isStandAlone() && isRestartable()) { try { Class wrapperClass = Class.forName(WRAPPER_CLASSNAME); Method restartMethod = wrapperClass.getMethod(STR, (Class []) null); restartMethod.invoke(null, (Object []) null); } catch (Exception e) { logger.error(STR, e); } } } | /**
* Restarts the server and all it's modules only if the server is restartable. Otherwise do
* nothing.
*/ | Restarts the server and all it's modules only if the server is restartable. Otherwise do nothing | restart | {
"repo_name": "trimnguye/JavaChatServer",
"path": "src/java/org/jivesoftware/openfire/XMPPServer.java",
"license": "apache-2.0",
"size": 59245
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 85,982 |
public static Method getDeclaredMethod(Class<?> type, String methodName, Class<?>... parameterTypes) {
Method method = null;
try {
method = type.getDeclaredMethod(methodName, parameterTypes);
if(method.isBridge()){
method = MethodProvider.getInstance().unbride... | static Method function(Class<?> type, String methodName, Class<?>... parameterTypes) { Method method = null; try { method = type.getDeclaredMethod(methodName, parameterTypes); if(method.isBridge()){ method = MethodProvider.getInstance().unbride(method, type); } } catch (NoSuchMethodException e) { Class<?> superclass = ... | /**
* Gets declared method from specified type by mame and parameters types.
*
* @param type the type
* @param methodName the name of the method
* @param parameterTypes the parameter array
* @return a {@link Method} object or null if method doesn't exist
*/ | Gets declared method from specified type by mame and parameters types | getDeclaredMethod | {
"repo_name": "robertroeser/Hystrix",
"path": "hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/utils/AopUtils.java",
"license": "apache-2.0",
"size": 3885
} | [
"com.google.common.base.Throwables",
"java.io.IOException",
"java.lang.reflect.Method"
] | import com.google.common.base.Throwables; import java.io.IOException; import java.lang.reflect.Method; | import com.google.common.base.*; import java.io.*; import java.lang.reflect.*; | [
"com.google.common",
"java.io",
"java.lang"
] | com.google.common; java.io; java.lang; | 2,018,644 |
public void truncate() throws IOException;
| void function() throws IOException; | /**
* Truncates all the clusters the class uses.
*
* @throws IOException
*/ | Truncates all the clusters the class uses | truncate | {
"repo_name": "MaDaPHaKa/Orient-object",
"path": "core/src/main/java/com/orientechnologies/orient/core/metadata/schema/OClass.java",
"license": "apache-2.0",
"size": 8639
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,280,590 |
public boolean isAppWidgetRestored(int appWidgetId) {
return !WidgetsModel.GO_DISABLE_WIDGETS && mAppWidgetManager.getAppWidgetOptions(
appWidgetId).getBoolean(WIDGET_OPTION_RESTORE_COMPLETED);
} | boolean function(int appWidgetId) { return !WidgetsModel.GO_DISABLE_WIDGETS && mAppWidgetManager.getAppWidgetOptions( appWidgetId).getBoolean(WIDGET_OPTION_RESTORE_COMPLETED); } | /**
* Returns if a AppWidgetProvider has marked a widget restored
*/ | Returns if a AppWidgetProvider has marked a widget restored | isAppWidgetRestored | {
"repo_name": "Deletescape-Media/Lawnchair",
"path": "src/com/android/launcher3/widget/WidgetManagerHelper.java",
"license": "gpl-3.0",
"size": 6139
} | [
"com.android.launcher3.model.WidgetsModel"
] | import com.android.launcher3.model.WidgetsModel; | import com.android.launcher3.model.*; | [
"com.android.launcher3"
] | com.android.launcher3; | 1,123,935 |
public void testUnregisterClientMembershipListener() throws Exception {
final boolean[] fired = new boolean[1];
final DistributedMember[] member = new DistributedMember[1];
final String[] memberId = new String[1];
final boolean[] isClient = new boolean[1]; | void function() throws Exception { final boolean[] fired = new boolean[1]; final DistributedMember[] member = new DistributedMember[1]; final String[] memberId = new String[1]; final boolean[] isClient = new boolean[1]; | /**
* Tests unregisterClientMembershipListener to ensure that no further events
* are delivered to unregistered listeners.
*/ | Tests unregisterClientMembershipListener to ensure that no further events are delivered to unregistered listeners | testUnregisterClientMembershipListener | {
"repo_name": "robertgeiger/incubator-geode",
"path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java",
"license": "apache-2.0",
"size": 61526
} | [
"com.gemstone.gemfire.distributed.DistributedMember"
] | import com.gemstone.gemfire.distributed.DistributedMember; | import com.gemstone.gemfire.distributed.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,932,353 |
public MTab[] getTabs (boolean reload, String trxName)
{
if (m_tabs != null && !reload)
return m_tabs;
String sql = "SELECT * FROM AD_Tab WHERE AD_Window_ID=? ORDER BY SeqNo";
ArrayList<MTab> list = new ArrayList<MTab>();
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prep... | MTab[] function (boolean reload, String trxName) { if (m_tabs != null && !reload) return m_tabs; String sql = STR; ArrayList<MTab> list = new ArrayList<MTab>(); PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement (sql, trxName); pstmt.setInt (1, getAD_Window_ID()); rs = pstmt.executeQ... | /**
* Get Fields
* @param reload reload data
* @return array of lines
* @param trxName transaction
*/ | Get Fields | getTabs | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-legacy/org/compiere/model/MWindow.java",
"license": "gpl-2.0",
"size": 6631
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.util.ArrayList",
"org.compiere.util.DB"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import org.compiere.util.DB; | import java.sql.*; import java.util.*; import org.compiere.util.*; | [
"java.sql",
"java.util",
"org.compiere.util"
] | java.sql; java.util; org.compiere.util; | 1,780,739 |
@Test
public void testWriteRandomBytes() throws IOException {
// Build a writer to write test records
SimpleDataWriter writer = buildSimpleDataWriter();
byte[] rec1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
byte[] rec2 = { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 };
byte[] rec3 = { 2... | void function() throws IOException { SimpleDataWriter writer = buildSimpleDataWriter(); byte[] rec1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }; byte[] rec2 = { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }; byte[] rec3 = { 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 }; writer.w... | /**
* Use the simple data writer to write random bytes to a file and ensure
* they are the same when read back.
*
* @throws IOException
*/ | Use the simple data writer to write random bytes to a file and ensure they are the same when read back | testWriteRandomBytes | {
"repo_name": "shirshanka/gobblin",
"path": "gobblin-core/src/test/java/org/apache/gobblin/writer/SimpleDataWriterTest.java",
"license": "apache-2.0",
"size": 14100
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"org.testng.Assert"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import org.testng.Assert; | import java.io.*; import org.testng.*; | [
"java.io",
"org.testng"
] | java.io; org.testng; | 2,756,031 |
public DistributedUserLayout getUserLayout (IPerson Person, IUserProfile profile); | DistributedUserLayout function (IPerson Person, IUserProfile profile); | /**
* Retrieve a user layout document.
*
* @param Person an <code>IPerson</code> object specifying the user
* @param profile a user profile
* @return a <code>Document</code> containing user layout (conforms to userLayout.dtd)
* @exception Exception if an error occurs
*/ | Retrieve a user layout document | getUserLayout | {
"repo_name": "vbonamy/esup-uportal",
"path": "uportal-war/src/main/java/org/jasig/portal/layout/IUserLayoutStore.java",
"license": "apache-2.0",
"size": 8980
} | [
"org.jasig.portal.IUserProfile",
"org.jasig.portal.layout.dlm.DistributedUserLayout",
"org.jasig.portal.security.IPerson"
] | import org.jasig.portal.IUserProfile; import org.jasig.portal.layout.dlm.DistributedUserLayout; import org.jasig.portal.security.IPerson; | import org.jasig.portal.*; import org.jasig.portal.layout.dlm.*; import org.jasig.portal.security.*; | [
"org.jasig.portal"
] | org.jasig.portal; | 1,461,966 |
public interface RowIdChangeListener extends Serializable {
public void rowIdChange(QueryDelegate.RowIdChangeEvent event);
} | interface RowIdChangeListener extends Serializable { public void function(QueryDelegate.RowIdChangeEvent event); } | /**
* Lets the listener know that a RowId has been changed.
*
* @param event
*/ | Lets the listener know that a RowId has been changed | rowIdChange | {
"repo_name": "geroshuihu/EducationWF",
"path": "src/com/vaadin/addon/sqlcontainer/query/QueryDelegate.java",
"license": "lgpl-3.0",
"size": 6868
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 681,070 |
public static String wrap(String in, int wrapAmount) {
String[] lines = in.split("\n");
StringBuilder result = new StringBuilder();
addWrappedLine(result, lines[0], wrapAmount);
for (int i = 1; i < lines.length; i++) {
if (!lines[i].trim().equals("")) {
... | static String function(String in, int wrapAmount) { String[] lines = in.split("\n"); StringBuilder result = new StringBuilder(); addWrappedLine(result, lines[0], wrapAmount); for (int i = 1; i < lines.length; i++) { if (!lines[i].trim().equals("")) { result.append(Globals.NEWLINE); result.append('\t'); result.append(Gl... | /**
* Formats field contents for output. Must be "symmetric" with the parse method above,
* so stored and reloaded fields are not mangled.
*
* @param in
* @param wrapAmount
* @return the wrapped String.
*/ | Formats field contents for output. Must be "symmetric" with the parse method above, so stored and reloaded fields are not mangled | wrap | {
"repo_name": "robymus/jabref",
"path": "src/main/java/net/sf/jabref/logic/util/strings/StringUtil.java",
"license": "gpl-2.0",
"size": 21429
} | [
"net.sf.jabref.Globals"
] | import net.sf.jabref.Globals; | import net.sf.jabref.*; | [
"net.sf.jabref"
] | net.sf.jabref; | 255,842 |
void put(String localPath, String remoteFile) throws IOException,
FileTransferException; | void put(String localPath, String remoteFile) throws IOException, FileTransferException; | /**
* Put a local file onto the FTP server.
*
* @param localPath path of the local file
* @param remoteFile name of remote file in current directory
* @throws FileTransferException if an FTP specific exception occurs
* @throws IOException if a comms error occurs
*/ | Put a local file onto the FTP server | put | {
"repo_name": "mcwarman/interlok",
"path": "adapter/src/main/java/com/adaptris/filetransfer/FileTransferClient.java",
"license": "apache-2.0",
"size": 10615
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,754,911 |
public void set(int index, NullableUInt4Holder holder) throws IllegalArgumentException {
if (holder.isSet < 0) {
throw new IllegalArgumentException();
} else if (holder.isSet > 0) {
BitVectorHelper.setBit(validityBuffer, index);
setValue(index, holder.value);
} else {
BitVectorHelp... | void function(int index, NullableUInt4Holder holder) throws IllegalArgumentException { if (holder.isSet < 0) { throw new IllegalArgumentException(); } else if (holder.isSet > 0) { BitVectorHelper.setBit(validityBuffer, index); setValue(index, holder.value); } else { BitVectorHelper.unsetBit(validityBuffer, index); } } | /**
* Set the element at the given index to the value set in data holder.
* If the value in holder is not indicated as set, element in the
* at the given index will be null.
*
* @param index position of element
* @param holder nullable data holder for value of element
*/ | Set the element at the given index to the value set in data holder. If the value in holder is not indicated as set, element in the at the given index will be null | set | {
"repo_name": "kou/arrow",
"path": "java/vector/src/main/java/org/apache/arrow/vector/UInt4Vector.java",
"license": "apache-2.0",
"size": 10360
} | [
"org.apache.arrow.vector.holders.NullableUInt4Holder"
] | import org.apache.arrow.vector.holders.NullableUInt4Holder; | import org.apache.arrow.vector.holders.*; | [
"org.apache.arrow"
] | org.apache.arrow; | 438,529 |
protected RestIdentity getDemoIdentity() throws SocialClientLibException {
if (demoIdentity == null) {
demoIdentity = identityService.getIdentity("organization", "demo");
}
return demoIdentity;
} | RestIdentity function() throws SocialClientLibException { if (demoIdentity == null) { demoIdentity = identityService.getIdentity(STR, "demo"); } return demoIdentity; } | /**
* Supports to gets Demo's identity.
*
* @return Demo's Identity.
*/ | Supports to gets Demo's identity | getDemoIdentity | {
"repo_name": "binhdv/exo.social.client",
"path": "src/test/java/org/exoplatform/social/client/core/AbstractClientTestV1Alpha3.java",
"license": "agpl-3.0",
"size": 1855
} | [
"org.exoplatform.social.client.api.SocialClientLibException",
"org.exoplatform.social.client.api.model.RestIdentity"
] | import org.exoplatform.social.client.api.SocialClientLibException; import org.exoplatform.social.client.api.model.RestIdentity; | import org.exoplatform.social.client.api.*; import org.exoplatform.social.client.api.model.*; | [
"org.exoplatform.social"
] | org.exoplatform.social; | 2,299,302 |
public void applyFeatureCountThreshold(int k) {
float[] counts = getFeatureCounts();
HashIndex<F> newFeatureIndex = new HashIndex<F>();
int[] featMap = new int[featureIndex.size()];
for (int i = 0; i < featMap.length; i++) {
F feat = featureIndex.get(i);
if (counts[i] >= k) {
int ... | void function(int k) { float[] counts = getFeatureCounts(); HashIndex<F> newFeatureIndex = new HashIndex<F>(); int[] featMap = new int[featureIndex.size()]; for (int i = 0; i < featMap.length; i++) { F feat = featureIndex.get(i); if (counts[i] >= k) { int newIndex = newFeatureIndex.size(); newFeatureIndex.add(feat); fe... | /**
* Applies a feature count threshold to the RVFDataset. All features that
* occur fewer than <i>k</i> times are expunged.
*/ | Applies a feature count threshold to the RVFDataset. All features that occur fewer than k times are expunged | applyFeatureCountThreshold | {
"repo_name": "tabladrum/CoreNLP",
"path": "src/edu/stanford/nlp/classify/RVFDataset.java",
"license": "gpl-2.0",
"size": 32420
} | [
"edu.stanford.nlp.util.HashIndex",
"java.util.ArrayList",
"java.util.List"
] | import edu.stanford.nlp.util.HashIndex; import java.util.ArrayList; import java.util.List; | import edu.stanford.nlp.util.*; import java.util.*; | [
"edu.stanford.nlp",
"java.util"
] | edu.stanford.nlp; java.util; | 2,871,553 |
public Set<String> testService2(String input) throws Exception {
Set<String> results = new HashSet<String>();
Class<?> cls = Class.forName("org.apache.aries.mytest.MySPI");
ServiceLoader<?> loader = ServiceLoader.load(cls);
for (Object obj : loader) {
results.add((... | Set<String> function(String input) throws Exception { Set<String> results = new HashSet<String>(); Class<?> cls = Class.forName(STR); ServiceLoader<?> loader = ServiceLoader.load(cls); for (Object obj : loader) { results.add(((MySPI) obj).someMethod(input)); } return results; } | /**
* Slightly different example where the class is loaded using Class.forName()
*/ | Slightly different example where the class is loaded using Class.forName() | testService2 | {
"repo_name": "apache/aries",
"path": "spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/TestClient.java",
"license": "apache-2.0",
"size": 2424
} | [
"java.util.HashSet",
"java.util.ServiceLoader",
"java.util.Set",
"org.apache.aries.mytest.MySPI"
] | import java.util.HashSet; import java.util.ServiceLoader; import java.util.Set; import org.apache.aries.mytest.MySPI; | import java.util.*; import org.apache.aries.mytest.*; | [
"java.util",
"org.apache.aries"
] | java.util; org.apache.aries; | 1,099,920 |
private static Attribute.Type parseArithmeticOperationResultType(ExpressionExecutor leftExpressionExecutor,
ExpressionExecutor rightExpressionExecutor) {
if (leftExpressionExecutor.getReturnType() == Attribute.Type.DOUBLE
|... | static Attribute.Type function(ExpressionExecutor leftExpressionExecutor, ExpressionExecutor rightExpressionExecutor) { if (leftExpressionExecutor.getReturnType() == Attribute.Type.DOUBLE rightExpressionExecutor.getReturnType() == Attribute.Type.DOUBLE) { return Attribute.Type.DOUBLE; } else if (leftExpressionExecutor.... | /**
* Calculate the return type of arithmetic operation executors.(Ex: add, subtract, etc)
*
* @param leftExpressionExecutor left ExpressionExecutor
* @param rightExpressionExecutor right ExpressionExecutor
* @return Attribute Type
*/ | Calculate the return type of arithmetic operation executors.(Ex: add, subtract, etc) | parseArithmeticOperationResultType | {
"repo_name": "suhothayan/siddhi",
"path": "modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/ExpressionParser.java",
"license": "apache-2.0",
"size": 106748
} | [
"io.siddhi.core.executor.ExpressionExecutor",
"io.siddhi.query.api.definition.Attribute"
] | import io.siddhi.core.executor.ExpressionExecutor; import io.siddhi.query.api.definition.Attribute; | import io.siddhi.core.executor.*; import io.siddhi.query.api.definition.*; | [
"io.siddhi.core",
"io.siddhi.query"
] | io.siddhi.core; io.siddhi.query; | 1,876,757 |
@Test
public void testMatchesType() {
System.out.println("matchesType");
Class type = Character.TYPE;
CharacterMatchCastAndValidate instance = new CharacterMatchCastAndValidate();
boolean expResult = true;
boolean result = instance.matchesType(type);
assertEquals(... | void function() { System.out.println(STR); Class type = Character.TYPE; CharacterMatchCastAndValidate instance = new CharacterMatchCastAndValidate(); boolean expResult = true; boolean result = instance.matchesType(type); assertEquals(expResult, result); } | /**
* Test of matchesType method, of class CharacterMatchCastAndValidate.
*/ | Test of matchesType method, of class CharacterMatchCastAndValidate | testMatchesType | {
"repo_name": "SirCasm/LdapApi",
"path": "src/test/java/com/thedarkfours/ldap/reflection/conversion/validator/CharacterMatchCastAndValidateTest.java",
"license": "mit",
"size": 3932
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,025,519 |
public static <I extends Info, S extends AbstractNode<I,S>> void sanityCheckRule(SyntacticRule<I,S> rule) throws EntailmentCompilationException
{
if (rule == null)
throw new EntailmentCompilationException("Sanity check failed: rule is null for some reason");
S rhs = rule.getRightHandSide();
S lhs = rule.... | static <I extends Info, S extends AbstractNode<I,S>> void function(SyntacticRule<I,S> rule) throws EntailmentCompilationException { if (rule == null) throw new EntailmentCompilationException(STR); S rhs = rule.getRightHandSide(); S lhs = rule.getLeftHandSide(); Set<S> lhsNodesSet = null; Set<S> rhsNodesSet = null; Set<... | /**
* Get an entailment rule and
* <li>check that the RHS has no unmapped variables
* <li>that each node has a relation and POS<br>
* <li>ensure all mappings are from left to right
*
* @param <I>
* @param <S>
* @param rule
* @throws EntailmentCompilationException
*/ | Get an entailment rule and check that the RHS has no unmapped variables that each node has a relation and POS ensure all mappings are from left to right | sanityCheckRule | {
"repo_name": "madhumita-git/Excitement-Open-Platform",
"path": "transformations/src/main/java/eu/excitementproject/eop/transformations/generic/rule_compiler/entailmentrules/EntailmentRuleBuildingUtils.java",
"license": "gpl-3.0",
"size": 5291
} | [
"eu.excitementproject.eop.common.component.syntacticknowledge.SyntacticRule",
"eu.excitementproject.eop.common.representation.parse.representation.basic.Info",
"eu.excitementproject.eop.common.representation.parse.tree.AbstractNode",
"eu.excitementproject.eop.common.representation.parse.tree.AbstractNodeUtils... | import eu.excitementproject.eop.common.component.syntacticknowledge.SyntacticRule; import eu.excitementproject.eop.common.representation.parse.representation.basic.Info; import eu.excitementproject.eop.common.representation.parse.tree.AbstractNode; import eu.excitementproject.eop.common.representation.parse.tree.Abstra... | import eu.excitementproject.eop.common.component.syntacticknowledge.*; import eu.excitementproject.eop.common.representation.parse.representation.basic.*; import eu.excitementproject.eop.common.representation.parse.tree.*; import eu.excitementproject.eop.transformations.generic.rule_compiler.*; import eu.excitementproj... | [
"eu.excitementproject.eop",
"java.util"
] | eu.excitementproject.eop; java.util; | 1,450,983 |
public final void update(Observation normalizedObservation, double delta) {
int numSubCoders=allCoders.size();
for (int i=0;i<numSubCoders;i++) {
allCoders.get(i).update(normalizedObservation, delta*coderWeights[i]);
}
} | final void function(Observation normalizedObservation, double delta) { int numSubCoders=allCoders.size(); for (int i=0;i<numSubCoders;i++) { allCoders.get(i).update(normalizedObservation, delta*coderWeights[i]); } } | /**
* This basically splits up the error and propagates it to all of the sub tile coders.
* @param normalizedObservation
* @param delta We assume that delta has been reduced by a step size already,
* but has not been split to consider how many tiles there are (because the
* tile coder is black ... | This basically splits up the error and propagates it to all of the sub tile coders | update | {
"repo_name": "chrahunt/bt-agentlib",
"path": "src/org/rlcommunity/btanner/agentLib/functionApproximators/CMAC/CombinatorialTileCoder.java",
"license": "apache-2.0",
"size": 8836
} | [
"org.rlcommunity.rlglue.codec.types.Observation"
] | import org.rlcommunity.rlglue.codec.types.Observation; | import org.rlcommunity.rlglue.codec.types.*; | [
"org.rlcommunity.rlglue"
] | org.rlcommunity.rlglue; | 743,079 |
public Closure<? super T> getClosure() {
return iClosure;
} | Closure<? super T> function() { return iClosure; } | /**
* Gets the closure.
*
* @return the closure
* @since 3.1
*/ | Gets the closure | getClosure | {
"repo_name": "AffogatoLang/Moka",
"path": "lib/Apache_Commons_Collections/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java",
"license": "bsd-3-clause",
"size": 2758
} | [
"org.apache.commons.collections4.Closure"
] | import org.apache.commons.collections4.Closure; | import org.apache.commons.collections4.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,286,159 |
public void testPop() {
ConcurrentLinkedDeque q = populatedDeque(SIZE);
for (int i = 0; i < SIZE; ++i) {
assertEquals(i, q.pop());
}
try {
q.pop();
shouldThrow();
} catch (NoSuchElementException success) {}
} | void function() { ConcurrentLinkedDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(i, q.pop()); } try { q.pop(); shouldThrow(); } catch (NoSuchElementException success) {} } | /**
* pop() removes first element, or throws NSEE if empty
*/ | pop() removes first element, or throws NSEE if empty | testPop | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/ConcurrentLinkedDequeTest.java",
"license": "apache-2.0",
"size": 26542
} | [
"java.util.NoSuchElementException",
"java.util.concurrent.ConcurrentLinkedDeque"
] | import java.util.NoSuchElementException; import java.util.concurrent.ConcurrentLinkedDeque; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,381,404 |
public int doEndTag()
throws JspException
{
return EVAL_PAGE;
} | int function() throws JspException { return EVAL_PAGE; } | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*
* @throws JspException DOCUMENT ME!
*/ | DOCUMENT ME | doEndTag | {
"repo_name": "hgschmie/EyeWiki",
"path": "src/java/de/softwareforge/eyewiki/tags/WikiTagBase.java",
"license": "lgpl-2.1",
"size": 3324
} | [
"javax.servlet.jsp.JspException"
] | import javax.servlet.jsp.JspException; | import javax.servlet.jsp.*; | [
"javax.servlet"
] | javax.servlet; | 2,320,781 |
private static ClassWriter beginLambdaClass(String lambdaClassName, Class<?> lambdaInterface) {
String baseClass = Type.getInternalName(Object.class);
int modifiers = ACC_PUBLIC | ACC_SUPER | ACC_FINAL | ACC_SYNTHETIC;
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
cw.v... | static ClassWriter function(String lambdaClassName, Class<?> lambdaInterface) { String baseClass = Type.getInternalName(Object.class); int modifiers = ACC_PUBLIC ACC_SUPER ACC_FINAL ACC_SYNTHETIC; ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); cw.visit(CLASS_VERSION, modifiers, lambdaClassName, null, baseC... | /**
* Creates the {@link ClassWriter} to be used for the lambda class generation.
*/ | Creates the <code>ClassWriter</code> to be used for the lambda class generation | beginLambdaClass | {
"repo_name": "gingerwizard/elasticsearch",
"path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/LambdaBootstrap.java",
"license": "apache-2.0",
"size": 23958
} | [
"org.objectweb.asm.ClassWriter",
"org.objectweb.asm.Type"
] | import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Type; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 1,029,258 |
super.setUp();
businessObjectService = SpringContext.getBean(BusinessObjectService.class);
lookupableHelperService = LookupableSpringContext.getLookupableHelperService(LaborConstants.CURRENT_FUNDS_LOOKUP_HELPER_SRVICE_NAME);
lookupableHelperService.setBusinessObjectClass(AccountStatusCurr... | super.setUp(); businessObjectService = SpringContext.getBean(BusinessObjectService.class); lookupableHelperService = LookupableSpringContext.getLookupableHelperService(LaborConstants.CURRENT_FUNDS_LOOKUP_HELPER_SRVICE_NAME); lookupableHelperService.setBusinessObjectClass(AccountStatusCurrentFunds.class); Map keys = new... | /**
* Get ready for the test
*/ | Get ready for the test | setUp | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "test/unit/src/org/kuali/kfs/module/ld/businessobject/lookup/CurrentFundsLookupableHelperServiceTest.java",
"license": "agpl-3.0",
"size": 11307
} | [
"java.util.HashMap",
"java.util.Map",
"org.kuali.kfs.module.ld.LaborConstants",
"org.kuali.kfs.module.ld.businessobject.AccountStatusCurrentFunds",
"org.kuali.kfs.module.ld.businessobject.LedgerBalance",
"org.kuali.kfs.sys.KFSPropertyConstants",
"org.kuali.kfs.sys.businessobject.lookup.LookupableSpringC... | import java.util.HashMap; import java.util.Map; import org.kuali.kfs.module.ld.LaborConstants; import org.kuali.kfs.module.ld.businessobject.AccountStatusCurrentFunds; import org.kuali.kfs.module.ld.businessobject.LedgerBalance; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.businessobject.look... | import java.util.*; import org.kuali.kfs.module.ld.*; import org.kuali.kfs.module.ld.businessobject.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.businessobject.lookup.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.krad.service.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 1,497,872 |
MT metaGetOperation(RequestDetails theRequestDetails); | MT metaGetOperation(RequestDetails theRequestDetails); | /**
* Not supported for DSTU1
* @param theRequestDetails TODO
*/ | Not supported for DSTU1 | metaGetOperation | {
"repo_name": "botunge/hapi-fhir",
"path": "hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirSystemDao.java",
"license": "apache-2.0",
"size": 1861
} | [
"ca.uhn.fhir.rest.method.RequestDetails"
] | import ca.uhn.fhir.rest.method.RequestDetails; | import ca.uhn.fhir.rest.method.*; | [
"ca.uhn.fhir"
] | ca.uhn.fhir; | 664,303 |
public void setID(String id) {
element.setAttributeNS(WSConstants.WSU_NS, WSConstants.WSU_PREFIX + ":Id", id);
} | void function(String id) { element.setAttributeNS(WSConstants.WSU_NS, WSConstants.WSU_PREFIX + ":Id", id); } | /**
* Set the id of this security context token.
*
* @param id the value for the <code>wsu:Id</code> attribute of this
* SecurityContextToken
*/ | Set the id of this security context token | setID | {
"repo_name": "clibois/wss4j",
"path": "ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/SecurityContextToken.java",
"license": "apache-2.0",
"size": 9251
} | [
"org.apache.wss4j.dom.WSConstants"
] | import org.apache.wss4j.dom.WSConstants; | import org.apache.wss4j.dom.*; | [
"org.apache.wss4j"
] | org.apache.wss4j; | 676,412 |
public static SimpleBigDecimal getInstance(BigInteger value, int scale)
{
return new SimpleBigDecimal(value.shiftLeft(scale), scale);
}
public SimpleBigDecimal(BigInteger bigInt, int scale)
{
if (scale < 0)
{
throw new IllegalArgumentException("scale may not... | static SimpleBigDecimal function(BigInteger value, int scale) { return new SimpleBigDecimal(value.shiftLeft(scale), scale); } public SimpleBigDecimal(BigInteger bigInt, int scale) { if (scale < 0) { throw new IllegalArgumentException(STR); } this.bigInt = bigInt; this.scale = scale; } private SimpleBigDecimal(SimpleBig... | /**
* Returns a <code>SimpleBigDecimal</code> representing the same numerical
* value as <code>value</code>.
* @param value The value of the <code>SimpleBigDecimal</code> to be
* created.
* @param scale The scale of the <code>SimpleBigDecimal</code> to be
* created.
* @return The su... | Returns a <code>SimpleBigDecimal</code> representing the same numerical value as <code>value</code> | getInstance | {
"repo_name": "bullda/DroidText",
"path": "src/bouncycastle/repack/org/bouncycastle/math/ec/SimpleBigDecimal.java",
"license": "lgpl-3.0",
"size": 6882
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 12,056 |
public boolean canElementBeDestination(IJavaElement javaElement) {
return true;
} | boolean function(IJavaElement javaElement) { return true; } | /**
* Is it possible, that sources can be reorged to this kind of javaElement?
*
* This is less strict then {@link #verifyDestination(IJavaElement)} where
* the java element itself is verified to be a valid destination.
*
* @param javaElement the java element to move to
* @return true if possible
... | Is it possible, that sources can be reorged to this kind of javaElement? This is less strict then <code>#verifyDestination(IJavaElement)</code> where the java element itself is verified to be a valid destination | canElementBeDestination | {
"repo_name": "trylimits/Eclipse-Postfix-Code-Completion-Juno38",
"path": "juno38/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java",
"license": "epl-1.0",
"size": 171916
} | [
"org.eclipse.jdt.core.IJavaElement"
] | import org.eclipse.jdt.core.IJavaElement; | import org.eclipse.jdt.core.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,399,773 |
public ClusterUpdateSettingsRequest persistentSettings(Map<String, ?> source) {
try {
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
builder.map(source);
persistentSettings(Strings.toString(builder), builder.contentType());
} catch (I... | ClusterUpdateSettingsRequest function(Map<String, ?> source) { try { XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON); builder.map(source); persistentSettings(Strings.toString(builder), builder.contentType()); } catch (IOException e) { throw new ElasticsearchGenerationException(STR + source +... | /**
* Sets the persistent settings to be updated. They will get applied cross restarts
*/ | Sets the persistent settings to be updated. They will get applied cross restarts | persistentSettings | {
"repo_name": "gfyoung/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/admin/cluster/settings/ClusterUpdateSettingsRequest.java",
"license": "apache-2.0",
"size": 7521
} | [
"java.io.IOException",
"java.util.Map",
"org.elasticsearch.ElasticsearchGenerationException",
"org.elasticsearch.common.Strings",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.elasticsearch.common.xcontent.XContentType"
] | import java.io.IOException; import java.util.Map; import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.common.Strings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; | import java.io.*; import java.util.*; import org.elasticsearch.*; import org.elasticsearch.common.*; import org.elasticsearch.common.xcontent.*; | [
"java.io",
"java.util",
"org.elasticsearch",
"org.elasticsearch.common"
] | java.io; java.util; org.elasticsearch; org.elasticsearch.common; | 2,315,207 |
@Test
public void testIsDetachedFalseAfterUpdate() {
final NodeKeyResolver<ImmutableNode> resolver = createResolver();
model.trackNode(selector, resolver);
model.clearProperty("tables.table(1).fields.field(1).name", resolver);
assertFalse("Node is detached", model.isTrackedNodeDe... | void function() { final NodeKeyResolver<ImmutableNode> resolver = createResolver(); model.trackNode(selector, resolver); model.clearProperty(STR, resolver); assertFalse(STR, model.isTrackedNodeDetached(selector)); } | /**
* Tests isDetached() for a life node.
*/ | Tests isDetached() for a life node | testIsDetachedFalseAfterUpdate | {
"repo_name": "apache/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/tree/TestInMemoryNodeModelTrackedNodes.java",
"license": "apache-2.0",
"size": 34423
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 832,436 |
final void merge(MergePolicy.OneMerge merge)
throws CorruptIndexException, IOException {
boolean success = false;
try {
try {
try {
mergeInit(merge);
if (infoStream != null)
message("now merge\n merge=" + merge.segString(directory) + "\n merge=" + merge +... | final void merge(MergePolicy.OneMerge merge) throws CorruptIndexException, IOException { boolean success = false; try { try { try { mergeInit(merge); if (infoStream != null) message(STR + merge.segString(directory) + STR + merge + STR + segString()); mergeMiddle(merge); mergeSuccess(merge); success = true; } catch (Thr... | /**
* Merges the indicated segments, replacing them in the stack with a
* single segment.
*/ | Merges the indicated segments, replacing them in the stack with a single segment | merge | {
"repo_name": "Photobucket/Solbase-Lucene",
"path": "src/java/org/apache/lucene/index/IndexWriter.java",
"license": "apache-2.0",
"size": 205989
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,832,507 |
public File getRootDir() {
File f = new File(project.getBuildDir(),getId());
f.mkdirs();
return f;
} | File function() { File f = new File(project.getBuildDir(),getId()); f.mkdirs(); return f; } | /**
* Root directory of this {@link Run} on the master.
*
* Files related to this {@link Run} should be stored below this directory.
*/ | Root directory of this <code>Run</code> on the master. Files related to this <code>Run</code> should be stored below this directory | getRootDir | {
"repo_name": "pantheon-systems/jenkins",
"path": "core/src/main/java/hudson/model/Run.java",
"license": "mit",
"size": 67304
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 812,837 |
public Collection<AuthorizingAnnotationMethodInterceptor> getMethodInterceptors() {
return methodInterceptors;
} | Collection<AuthorizingAnnotationMethodInterceptor> function() { return methodInterceptors; } | /**
* Returns the method interceptors to execute for the annotated method.
* <p/>
* Unless overridden by the {@link #setMethodInterceptors(java.util.Collection)} method, the default collection
* contains a
* {@link RoleAnnotationMethodInterceptor RoleAnnotationMethodInterceptor} and a
* {@... | Returns the method interceptors to execute for the annotated method. Unless overridden by the <code>#setMethodInterceptors(java.util.Collection)</code> method, the default collection contains a <code>RoleAnnotationMethodInterceptor RoleAnnotationMethodInterceptor</code> and a <code>PermissionAnnotationMethodInterceptor... | getMethodInterceptors | {
"repo_name": "xuegongzi/rabbitframework",
"path": "rabbitframework-security-pom/rabbitframework-security/src/main/java/org/apache/shiro/authz/aop/AnnotationsAuthorizingMethodInterceptor.java",
"license": "apache-2.0",
"size": 5030
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,859,497 |
public boolean matchesType(Type type) {
return getType().matches(type);
}
| boolean function(Type type) { return getType().matches(type); } | /**
* Test whether this data object matches the given type.
*/ | Test whether this data object matches the given type | matchesType | {
"repo_name": "martinisgroup/jlabrad",
"path": "JLabrad/src/org/labrad/data/Data.java",
"license": "gpl-2.0",
"size": 50443
} | [
"org.labrad.types.Type"
] | import org.labrad.types.Type; | import org.labrad.types.*; | [
"org.labrad.types"
] | org.labrad.types; | 2,572,507 |
public void test_java_util_Arrays_sort_char_array_NPE() {
char[] char_array_null = null;
try {
java.util.Arrays.sort(char_array_null);
fail("Should throw java.lang.NullPointerException");
} catch (NullPointerException e) {
// Expected
}
try... | void function() { char[] char_array_null = null; try { java.util.Arrays.sort(char_array_null); fail(STR); } catch (NullPointerException e) { } try { java.util.Arrays.sort(char_array_null, (int) -1, (int) 1); fail(STR); } catch (NullPointerException e) { } } | /**
* java.util.Arrays#sort(char[], int, int)
*/ | java.util.Arrays#sort(char[], int, int) | test_java_util_Arrays_sort_char_array_NPE | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java",
"license": "gpl-2.0",
"size": 207677
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 656,302 |
@Override
public void setFile(File file) throws IOException {
m_File = file.getPath();
setSource(file);
} | void function(File file) throws IOException { m_File = file.getPath(); setSource(file); } | /**
* sets the source File
*
* @param file the source file
* @throws IOException if an error occurs
*/ | sets the source File | setFile | {
"repo_name": "mydzigear/weka.kmeanspp.silhouette_score",
"path": "src/weka/core/converters/ArffLoader.java",
"license": "gpl-3.0",
"size": 41670
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,073,545 |
private boolean feasible(int n1, int n2)
{
UNode<L> node1 = g1.nodes().get(n1);
UNode<L> node2 = g2.nodes().get(n2);
// * check if the labels match
if(checkLabels && ! node1.label().equals(node2.label()))
return false;
Set<UNode<L>> neighbors1 = new HashSet<UNode<L>>(node1.neighbors()),
ne... | boolean function(int n1, int n2) { UNode<L> node1 = g1.nodes().get(n1); UNode<L> node2 = g2.nodes().get(n2); if(checkLabels && ! node1.label().equals(node2.label())) return false; Set<UNode<L>> neighbors1 = new HashSet<UNode<L>>(node1.neighbors()), neighbors2 = new HashSet<UNode<L>>(node2.neighbors()); if(neighbors1.si... | /**
* Feasibility function. Prunes illogical node matches from the search tree.
*
* @param n1
* @param n2
* @return
*/ | Feasibility function. Prunes illogical node matches from the search tree | feasible | {
"repo_name": "Data2Semantics/nodes",
"path": "nodes/src/main/java/org/nodes/algorithms/UVF2.java",
"license": "mit",
"size": 6976
} | [
"java.util.HashSet",
"java.util.Set",
"org.nodes.UNode"
] | import java.util.HashSet; import java.util.Set; import org.nodes.UNode; | import java.util.*; import org.nodes.*; | [
"java.util",
"org.nodes"
] | java.util; org.nodes; | 840,296 |
public MTSRollbackStatement rollback() throws SQLSyntaxErrorException {
//matchIdentifier("ROLLBACK"); // for performance issue, change to follow:
lexer.nextToken();
SpecialIdentifier siTemp = specialIdentifiers.get(lexer.stringValueUppercase());
if (siTemp == SpecialIdentifier.W... | MTSRollbackStatement function() throws SQLSyntaxErrorException { lexer.nextToken(); SpecialIdentifier siTemp = specialIdentifiers.get(lexer.stringValueUppercase()); if (siTemp == SpecialIdentifier.WORK) { lexer.nextToken(); } switch (lexer.token()) { case EOF: return new MTSRollbackStatement(MTSRollbackStatement.Comple... | /**
* first token <code>ROLLBACK</code> is scanned but not yet consumed
*
* <pre>
* ROLLBACK [WORK] TO [SAVEPOINT] identifier
* ROLLBACK [WORK] [AND [NO] CHAIN | [NO] RELEASE]
* </pre>
*/ | first token <code>ROLLBACK</code> is scanned but not yet consumed <code> ROLLBACK [WORK] TO [SAVEPOINT] identifier ROLLBACK [WORK] [AND [NO] CHAIN | [NO] RELEASE] </code> | rollback | {
"repo_name": "lostdragon/cobar",
"path": "cobar-parser/src/main/java/com/alibaba/cobar/parser/recognizer/syntax/MTSParser.java",
"license": "apache-2.0",
"size": 5174
} | [
"com.alibaba.cobar.parser.ast.expression.primary.Identifier",
"com.alibaba.cobar.parser.ast.stmt.mts.MTSRollbackStatement",
"java.sql.SQLSyntaxErrorException"
] | import com.alibaba.cobar.parser.ast.expression.primary.Identifier; import com.alibaba.cobar.parser.ast.stmt.mts.MTSRollbackStatement; import java.sql.SQLSyntaxErrorException; | import com.alibaba.cobar.parser.ast.expression.primary.*; import com.alibaba.cobar.parser.ast.stmt.mts.*; import java.sql.*; | [
"com.alibaba.cobar",
"java.sql"
] | com.alibaba.cobar; java.sql; | 771,903 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<StreamingJobsUpdateResponse> updateWithResponseAsync(
String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<StreamingJobsUpdateResponse> function( String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == n... | /**
* Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a
* streaming job without affecting the rest the job definition.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name ... | Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition | updateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/streamanalytics/azure-resourcemanager-streamanalytics/src/main/java/com/azure/resourcemanager/streamanalytics/implementation/StreamingJobsClientImpl.java",
"license": "mit",
"size": 136736
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.streamanalytics.fluent.models.StreamingJobInner",
"com.azure.resourcemanager.streamanalytics.models.StreamingJobsUpdateResponse"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.streamanalytics.fluent.models.StreamingJobInner; import com.azure.resourcemanager.streamanalytics.models.StreamingJobsUpdateResponse; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.streamanalytics.fluent.models.*; import com.azure.resourcemanager.streamanalytics.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,138,136 |
List<Report> getReportsByUid( List<String> uids );
| List<Report> getReportsByUid( List<String> uids ); | /**
* Retrieves Reports with the given uids.
*
* @param uids the list of uids.
* @return a list of ReportTables.
*/ | Retrieves Reports with the given uids | getReportsByUid | {
"repo_name": "steffeli/inf5750-tracker-capture",
"path": "dhis-api/src/main/java/org/hisp/dhis/report/ReportService.java",
"license": "bsd-3-clause",
"size": 6536
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,619,463 |
public static <T> List<T> addAll(int index, List<T> list, T... array)
{
for (T item : array)
{
list.add(index++, item);
}
return list;
}
| static <T> List<T> function(int index, List<T> list, T... array) { for (T item : array) { list.add(index++, item); } return list; } | /**
* Add arrays members to list starting at index.
* <p>
* If list contains a,b,c,d and array 1,2,3. After addAll(2, list, array)
* list contains a,b,1,2,3,c,d
* @param <T>
* @param index
* @param list
* @param array
*/ | Add arrays members to list starting at index. If list contains a,b,c,d and array 1,2,3. After addAll(2, list, array) list contains a,b,1,2,3,c,d | addAll | {
"repo_name": "tvesalainen/util",
"path": "util/src/main/java/org/vesalainen/util/Lists.java",
"license": "gpl-3.0",
"size": 12728
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,497,690 |
private void stageInFile2FileSystem(Job job) {
List<FileItem> fList = job.getFileList();
for (FileItem file : fList) {
switch (ReplicaCatalog.getFileSystem()) {
case LOCAL:
ReplicaCatalog.addFileToStorage(file.getName(), this.getName(... | void function(Job job) { List<FileItem> fList = job.getFileList(); for (FileItem file : fList) { switch (ReplicaCatalog.getFileSystem()) { case LOCAL: ReplicaCatalog.addFileToStorage(file.getName(), this.getName()); break; case SHARED: ReplicaCatalog.addFileToStorage(file.getName(), this.getName()); break; default: bre... | /**
* Stage in files for a stage-in job. For a local file system (such as
* condor-io) add files to the local storage; For a shared file system (such
* as NFS) add files to the shared storage
*
* @param cl, the job
* @pre $none
* @post $none
*/ | Stage in files for a stage-in job. For a local file system (such as condor-io) add files to the local storage; For a shared file system (such as NFS) add files to the shared storage | stageInFile2FileSystem | {
"repo_name": "Nishi-Inc/WorkflowSim-1.0",
"path": "sources/org/workflowsim/WorkflowDatacenter.java",
"license": "lgpl-3.0",
"size": 16085
} | [
"java.util.List",
"org.workflowsim.utils.ReplicaCatalog"
] | import java.util.List; import org.workflowsim.utils.ReplicaCatalog; | import java.util.*; import org.workflowsim.utils.*; | [
"java.util",
"org.workflowsim.utils"
] | java.util; org.workflowsim.utils; | 517,664 |
@SuppressWarnings({ "rawtypes", "unchecked" })
public Element marshal(Object object, String contextPath, QName qname) {
Element element = null;
StringWriter stringWriter = new StringWriter();
try {
JAXBContextHandler oHandler = new JAXBContextHandler();
JAXBConte... | @SuppressWarnings({ STR, STR }) Element function(Object object, String contextPath, QName qname) { Element element = null; StringWriter stringWriter = new StringWriter(); try { JAXBContextHandler oHandler = new JAXBContextHandler(); JAXBContext jc = oHandler.getJAXBContext(contextPath); javax.xml.bind.Marshaller marsha... | /**
* Marshalls the passed in XML Bean object into an XML Element.
*
* @param object - the XML bean to be marshalled
* @param contextPath - The name of the context. (i.e. "org.hl7.v3").
* @param qname - the qualified name of the XML (i.e. "urn:org:hl7:v3")
* @return the XML Element
... | Marshalls the passed in XML Bean object into an XML Element | marshal | {
"repo_name": "AurionProject/Aurion",
"path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/transform/marshallers/Marshaller.java",
"license": "bsd-3-clause",
"size": 7678
} | [
"gov.hhs.fha.nhinc.xmlCommon.XmlUtility",
"java.io.IOException",
"java.io.StringWriter",
"javax.xml.bind.JAXBContext",
"javax.xml.bind.JAXBElement",
"javax.xml.namespace.QName",
"org.w3c.dom.Element"
] | import gov.hhs.fha.nhinc.xmlCommon.XmlUtility; import java.io.IOException; import java.io.StringWriter; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; import org.w3c.dom.Element; | import gov.hhs.fha.nhinc.*; import java.io.*; import javax.xml.bind.*; import javax.xml.namespace.*; import org.w3c.dom.*; | [
"gov.hhs.fha",
"java.io",
"javax.xml",
"org.w3c.dom"
] | gov.hhs.fha; java.io; javax.xml; org.w3c.dom; | 330,442 |
@SuppressWarnings("rawtypes")
boolean isCollectionEmpty(Collection collection); | @SuppressWarnings(STR) boolean isCollectionEmpty(Collection collection); | /**
* Checks if the collection is null or empty
*
* @param collection to check
* @return TRUE if the collection is null or empty, FALSE otherwise
*/ | Checks if the collection is null or empty | isCollectionEmpty | {
"repo_name": "esig/dss",
"path": "dss-utils/src/main/java/eu/europa/esig/dss/utils/IUtils.java",
"license": "lgpl-2.1",
"size": 10597
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,252,376 |
Response<PolicyDescriptionCollection> listByServiceWithResponse(
String resourceGroupName, String serviceName, PolicyScopeContract scope, Context context); | Response<PolicyDescriptionCollection> listByServiceWithResponse( String resourceGroupName, String serviceName, PolicyScopeContract scope, Context context); | /**
* Lists all policy descriptions.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param scope Policy scope.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException... | Lists all policy descriptions | listByServiceWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/models/PolicyDescriptions.java",
"license": "mit",
"size": 1825
} | [
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.Response; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,225,319 |
@Override
public void internalWrite(Server server, Query query, ImmutableList<Result> results) throws Exception {
this.startOutput();
for (String resultString : messageFormatter.formatResults(results)){
log.debug("TCollectorUDP Message: {}", resultString);
this.sendOutput(resultString);
}
this.finishO... | void function(Server server, Query query, ImmutableList<Result> results) throws Exception { this.startOutput(); for (String resultString : messageFormatter.formatResults(results)){ log.debug(STR, resultString); this.sendOutput(resultString); } this.finishOutput(); } | /**
* Write the results of the query.
*
* @param server
* @param query - the query and its results.
* @param results
*/ | Write the results of the query | internalWrite | {
"repo_name": "kulcsartibor/jmxtrans",
"path": "jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/TCollectorUDPWriter.java",
"license": "mit",
"size": 7313
} | [
"com.google.common.collect.ImmutableList",
"com.googlecode.jmxtrans.model.Query",
"com.googlecode.jmxtrans.model.Result",
"com.googlecode.jmxtrans.model.Server"
] | import com.google.common.collect.ImmutableList; import com.googlecode.jmxtrans.model.Query; import com.googlecode.jmxtrans.model.Result; import com.googlecode.jmxtrans.model.Server; | import com.google.common.collect.*; import com.googlecode.jmxtrans.model.*; | [
"com.google.common",
"com.googlecode.jmxtrans"
] | com.google.common; com.googlecode.jmxtrans; | 2,329,439 |
public void linetoAbs(float x, float y) throws ParseException {
listHandler.item(new SVGPathSegMovetoLinetoItem
(SVGPathSeg.PATHSEG_LINETO_ABS,PATHSEG_LINETO_ABS_LETTER,
x,y));
lastAbs.setX(x);
lastAbs.setY(y);
lastA... | void function(float x, float y) throws ParseException { listHandler.item(new SVGPathSegMovetoLinetoItem (SVGPathSeg.PATHSEG_LINETO_ABS,PATHSEG_LINETO_ABS_LETTER, x,y)); lastAbs.setX(x); lastAbs.setY(y); lastAbs.setPathSegType(SVGPathSeg.PATHSEG_LINETO_ABS); } | /**
* Implements {@link org.apache.batik.parser.PathHandler#linetoAbs(float,float)}.
*/ | Implements <code>org.apache.batik.parser.PathHandler#linetoAbs(float,float)</code> | linetoAbs | {
"repo_name": "Uni-Sol/batik",
"path": "sources/org/apache/batik/dom/svg/AbstractSVGNormPathSegList.java",
"license": "apache-2.0",
"size": 13659
} | [
"org.apache.batik.parser.ParseException",
"org.w3c.dom.svg.SVGPathSeg"
] | import org.apache.batik.parser.ParseException; import org.w3c.dom.svg.SVGPathSeg; | import org.apache.batik.parser.*; import org.w3c.dom.svg.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 720,729 |
return (Iterator<? extends T>) EMPTY_ITERATOR;
} | return (Iterator<? extends T>) EMPTY_ITERATOR; } | /**
* Creates an empty iterator
* @param <T> the type of the iterator
* @return an empty iterator
* @since 1.0
*/ | Creates an empty iterator | emptyIterator | {
"repo_name": "Blahord/BetterCollections",
"path": "src/main/java/com/github/blahord/bettercollections/util/Iterators.java",
"license": "apache-2.0",
"size": 927
} | [
"com.github.blahord.bettercollections.iterator.Iterator"
] | import com.github.blahord.bettercollections.iterator.Iterator; | import com.github.blahord.bettercollections.iterator.*; | [
"com.github.blahord"
] | com.github.blahord; | 2,877,061 |
public Builder indices(Index... indices) {
return indices(ImmutableSet.copyOf(indices));
} | Builder function(Index... indices) { return indices(ImmutableSet.copyOf(indices)); } | /**
* Sets the {@code indices} property in the builder
* from an array of objects.
* @param indices the new value, not null
* @return this, for chaining, not null
*/ | Sets the indices property in the builder from an array of objects | indices | {
"repo_name": "OpenGamma/Strata",
"path": "modules/market/src/main/java/com/opengamma/strata/market/curve/RatesCurveGroupEntry.java",
"license": "apache-2.0",
"size": 16089
} | [
"com.google.common.collect.ImmutableSet",
"com.opengamma.strata.basics.index.Index"
] | import com.google.common.collect.ImmutableSet; import com.opengamma.strata.basics.index.Index; | import com.google.common.collect.*; import com.opengamma.strata.basics.index.*; | [
"com.google.common",
"com.opengamma.strata"
] | com.google.common; com.opengamma.strata; | 577,099 |
public PathMap.Entry getHolderEntry(String pathInContext)
{
if (_servletPathMap==null)
return null;
return _servletPathMap.getMatch(pathInContext);
}
| PathMap.Entry function(String pathInContext) { if (_servletPathMap==null) return null; return _servletPathMap.getMatch(pathInContext); } | /** ServletHolder matching path.
* @param pathInContext Path within _context.
* @return PathMap Entries pathspec to ServletHolder
*/ | ServletHolder matching path | getHolderEntry | {
"repo_name": "wang88/jetty",
"path": "jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java",
"license": "apache-2.0",
"size": 55387
} | [
"org.eclipse.jetty.http.PathMap"
] | import org.eclipse.jetty.http.PathMap; | import org.eclipse.jetty.http.*; | [
"org.eclipse.jetty"
] | org.eclipse.jetty; | 886,152 |
private void closeUCon(boolean pRecycle) {
if(pRecycle) {
mOptionalCachedUCon.closeForRecycle();
}
else {
mOptionalCachedUCon.closeNoRecycle();
}
mOptionalCachedUCon = null;
Track.timerPause(getConnectionID() + TRACK_TIMER_EVENT_SUFFIX);
} | void function(boolean pRecycle) { if(pRecycle) { mOptionalCachedUCon.closeForRecycle(); } else { mOptionalCachedUCon.closeNoRecycle(); } mOptionalCachedUCon = null; Track.timerPause(getConnectionID() + TRACK_TIMER_EVENT_SUFFIX); } | /**
* Closes the attached UCon and dereferences it from this Connection.
* @param pRecycle If true, the UCon will be recycled.
*/ | Closes the attached UCon and dereferences it from this Connection | closeUCon | {
"repo_name": "Fivium/FOXopen",
"path": "src/main/java/net/foxopen/fox/ContextUCon.java",
"license": "gpl-3.0",
"size": 24807
} | [
"net.foxopen.fox.track.Track"
] | import net.foxopen.fox.track.Track; | import net.foxopen.fox.track.*; | [
"net.foxopen.fox"
] | net.foxopen.fox; | 2,318,317 |
private static void writeToDCSchema(DublinCoreSchema dcSchema, BibEntry entry,
XmpPreferences xmpPreferences) {
DublinCoreExtractor dcExtractor = new DublinCoreExtractor(dcSchema, xmpPreferences, entry);
dcExtractor.fillDublinCoreSchema();
} | static void function(DublinCoreSchema dcSchema, BibEntry entry, XmpPreferences xmpPreferences) { DublinCoreExtractor dcExtractor = new DublinCoreExtractor(dcSchema, xmpPreferences, entry); dcExtractor.fillDublinCoreSchema(); } | /**
* Writes the information of the bib entry to the dublin core schema using
* a custom extractor.
*
* @param dcSchema Dublin core schema, which is filled with the bib entry.
* @param entry The entry, which is added to the dublin core metadata.
* @param xmpPreferences The user's x... | Writes the information of the bib entry to the dublin core schema using a custom extractor | writeToDCSchema | {
"repo_name": "tobiasdiez/jabref",
"path": "src/main/java/org/jabref/logic/xmp/XmpUtilWriter.java",
"license": "mit",
"size": 16620
} | [
"org.apache.xmpbox.schema.DublinCoreSchema",
"org.jabref.model.entry.BibEntry"
] | import org.apache.xmpbox.schema.DublinCoreSchema; import org.jabref.model.entry.BibEntry; | import org.apache.xmpbox.schema.*; import org.jabref.model.entry.*; | [
"org.apache.xmpbox",
"org.jabref.model"
] | org.apache.xmpbox; org.jabref.model; | 1,489,851 |
public static Date parseDate(String strdate) {
if (strdate == null || strdate.length() == 0) return null;
Date result = null;
strdate = strdate.trim();
if (strdate.length() > 10) {
if ((strdate.substring(strdate.length() - 5).indexOf("+") == 0 || strdate.substring(strdate.length() - 5).indexOf("... | static Date function(String strdate) { if (strdate == null strdate.length() == 0) return null; Date result = null; strdate = strdate.trim(); if (strdate.length() > 10) { if ((strdate.substring(strdate.length() - 5).indexOf("+") == 0 strdate.substring(strdate.length() - 5).indexOf("-") == 0) && strdate.substring(strdate... | /**
* Tries different date formats to parse against the given string
* representation to retrieve a valid Date object.
*
* @param strdate
* Date as String
* @return Date The parsed Date
*/ | Tries different date formats to parse against the given string representation to retrieve a valid Date object | parseDate | {
"repo_name": "zzsoszz/wyyf",
"path": "src/com/power/utils/DateUtils.java",
"license": "apache-2.0",
"size": 4371
} | [
"java.text.ParseException",
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.Locale"
] | import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 1,030,849 |
public synchronized void initScriptsFramework(String framework) {
Message msg = mJSHandler.obtainMessage();
msg.obj = framework;
msg.what = WXJSBridgeMsgType.INIT_FRAMEWORK;
msg.setTarget(mJSHandler);
msg.sendToTarget();
} | synchronized void function(String framework) { Message msg = mJSHandler.obtainMessage(); msg.obj = framework; msg.what = WXJSBridgeMsgType.INIT_FRAMEWORK; msg.setTarget(mJSHandler); msg.sendToTarget(); } | /**
* Initialize JavaScript framework
* @param framework String representation of the framework to be init.
*/ | Initialize JavaScript framework | initScriptsFramework | {
"repo_name": "leoward/incubator-weex",
"path": "android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java",
"license": "apache-2.0",
"size": 77660
} | [
"android.os.Message",
"com.taobao.weex.common.WXJSBridgeMsgType"
] | import android.os.Message; import com.taobao.weex.common.WXJSBridgeMsgType; | import android.os.*; import com.taobao.weex.common.*; | [
"android.os",
"com.taobao.weex"
] | android.os; com.taobao.weex; | 2,487,980 |
@POST
@Path("api")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response createApiConfigs(InputStream input) {
log.trace(String.format(MESSAGE_NODE, CREATE));
readApiConfigConfiguration(input).forEach(config -> {
K8sApiConfig existin... | @Path("api") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response function(InputStream input) { log.trace(String.format(MESSAGE_NODE, CREATE)); readApiConfigConfiguration(input).forEach(config -> { K8sApiConfig existing = configAdminService.apiConfig(endpoint(config)); if (existing == nu... | /**
* Creates a set of kubernetes API config from the JSON input stream.
*
* @param input kubernetes API configs JSON input stream
* @return 201 CREATED if the JSON is correct, 400 BAD_REQUEST if the JSON
* is malformed
* @onos.rsModel K8sApiConfig
*/ | Creates a set of kubernetes API config from the JSON input stream | createApiConfigs | {
"repo_name": "oplinkoms/onos",
"path": "apps/k8s-node/app/src/main/java/org/onosproject/k8snode/web/K8sNodeWebResource.java",
"license": "apache-2.0",
"size": 15274
} | [
"java.io.InputStream",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"javax.ws.rs.core.UriBuilder",
"org.onosproject.k8snode.api.K8sApiConfig"
] | import java.io.InputStream; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; import org.onosproject.k8snode.api.K8sApiConfig; | import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.k8snode.api.*; | [
"java.io",
"javax.ws",
"org.onosproject.k8snode"
] | java.io; javax.ws; org.onosproject.k8snode; | 93,005 |
public static Set<String> computeHashIndex(long docHash)
{
//band index
int bandIndex = 0;
//a band (window) used to store a part of the hash (represented in bits)
BitSet bitRange = new BitSet(BAND_WIDTH);
//pointer to each element in a single band (window)
int b... | static Set<String> function(long docHash) { int bandIndex = 0; BitSet bitRange = new BitSet(BAND_WIDTH); int bitsWidthCounter = 0; Set<String> bandBitset = new HashSet<>(); for (int i = 0; i < HASH_LENGTH; ++i) { bitRange.set(bitsWidthCounter, ((docHash >> i) & 1) == 1); if (bitsWidthCounter++ == BAND_WIDTH) { bandBits... | /**
* divide the 64-bit hash into 4 bit ranges of 16 bits. It will be used to
* get similar candidates.
*
* @param docHash hash
* @return ranges
*/ | divide the 64-bit hash into 4 bit ranges of 16 bits. It will be used to get similar candidates | computeHashIndex | {
"repo_name": "dkpro/dkpro-c4corpus",
"path": "dkpro-c4corpus-deduplication/src/main/java/de/tudarmstadt/ukp/dkpro/c4corpus/deduplication/impl/SimHashUtils.java",
"license": "apache-2.0",
"size": 5177
} | [
"java.util.BitSet",
"java.util.HashSet",
"java.util.Set"
] | import java.util.BitSet; import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 70,843 |
WebviewFragment fragment = new WebviewFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
} | WebviewFragment fragment = new WebviewFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } | /**
* Returns a new instance of this fragment for the given section number.
*/ | Returns a new instance of this fragment for the given section number | newInstance | {
"repo_name": "adamlofting/webmaker-android",
"path": "app/src/main/java/org/mozilla/webmaker/fragment/WebviewFragment.java",
"license": "mpl-2.0",
"size": 2201
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,810,814 |
CreatePactFragment fragment = new CreatePactFragment();
Bundle args = new Bundle();
args.putString(ARG_SENDER_EMAIL, senderEmail);
args.putString(ARG_RECEIVER_EMAIL, receiverEmail);
args.putSerializable(ARG_PACT_TYPES, pactTypes);
fragment.setArguments(args);
return fragm... | CreatePactFragment fragment = new CreatePactFragment(); Bundle args = new Bundle(); args.putString(ARG_SENDER_EMAIL, senderEmail); args.putString(ARG_RECEIVER_EMAIL, receiverEmail); args.putSerializable(ARG_PACT_TYPES, pactTypes); fragment.setArguments(args); return fragment; } public CreatePactFragment() { } | /**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param senderEmail the email of the pact request sender.
* @param receiverEmail the email of the receiver.
* @param pactTypes the pact types the user has created.
* @retu... | Use this factory method to create a new instance of this fragment using the provided parameters | newInstance | {
"repo_name": "potray/Pacts",
"path": "app/src/main/java/es/potrayarrick/pacts/CreatePactFragment.java",
"license": "gpl-2.0",
"size": 14784
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,438,316 |
protected void sequence_Prim0(ISerializationContext context, Val0 semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, SyntacticsequencertestPackage.Literals.VAL0__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(se... | void function(ISerializationContext context, Val0 semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, SyntacticsequencertestPackage.Literals.VAL0__NAME) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Syntacticseque... | /**
* Contexts:
* Exp0 returns Val0
* Addition0 returns Val0
* Addition0.Add0_1_0 returns Val0
* Prim0 returns Val0
*
* Constraint:
* name=ID
*/ | Contexts: Exp0 returns Val0 Addition0 returns Val0 Addition0.Add0_1_0 returns Val0 Prim0 returns Val0 Constraint: name=ID | sequence_Prim0 | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/serializer/serializer/AbstractSyntacticSequencerTestLanguageSemanticSequencer.java",
"license": "epl-1.0",
"size": 25300
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.eclipse.xtext.serializer.acceptor.SequenceFeeder",
"org.eclipse.xtext.serializer.sequencer.ITransientValueService",
"org.eclipse.xtext.serializer.syntacticsequencertest.SyntacticsequencertestPackage",
"org.eclipse.xtext.serializer.syntacticsequencer... | import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; import org.eclipse.xtext.serializer.syntacticsequencertest.SyntacticsequencertestPackage; import org.eclipse.xtext.serializer.synt... | import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; import org.eclipse.xtext.serializer.syntacticsequencertest.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 1,261,588 |
@Test
public void testReceiveRollback() throws Exception
{
Message[] outbound = new Message[]
{session.createTextMessage("First Message"),
session.createTextMessage("Second Message")};
// lets consume any outstanding messages from prev test runs
beginTx();
while (cons... | void function() throws Exception { Message[] outbound = new Message[] {session.createTextMessage(STR), session.createTextMessage(STR)}; beginTx(); while (consumer.receive(1000) != null) { } commitTx(); beginTx(); producer.send(outbound[0]); producer.send(outbound[1]); commitTx(); System.out.println(STR + outbound[0]); ... | /**
* Sends a batch of messages and validates that the rollbacked message was
* redelivered.
*
* @throws Exception
*/ | Sends a batch of messages and validates that the rollbacked message was redelivered | testReceiveRollback | {
"repo_name": "ryanemerson/activemq-artemis",
"path": "tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTransactionTestSupport.java",
"license": "apache-2.0",
"size": 22077
} | [
"java.util.ArrayList",
"javax.jms.Message"
] | import java.util.ArrayList; import javax.jms.Message; | import java.util.*; import javax.jms.*; | [
"java.util",
"javax.jms"
] | java.util; javax.jms; | 732,451 |
public static ChangeEntityEquipmentEvent.TargetLiving createChangeEntityEquipmentEventTargetLiving(Cause cause, Optional<ItemStackSnapshot> originalItemStack, Optional<Transaction<ItemStackSnapshot>> itemStack, Living targetEntity, Slot targetInventory) {
HashMap<String, Object> values = new HashMap<>();
... | static ChangeEntityEquipmentEvent.TargetLiving function(Cause cause, Optional<ItemStackSnapshot> originalItemStack, Optional<Transaction<ItemStackSnapshot>> itemStack, Living targetEntity, Slot targetInventory) { HashMap<String, Object> values = new HashMap<>(); values.put("cause", cause); values.put(STR, originalItemS... | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.entity.ChangeEntityEquipmentEvent.TargetLiving}.
*
* @param cause The cause
* @param originalItemStack The original item stack
* @param itemStack The item stack
* @param t... | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.entity.ChangeEntityEquipmentEvent.TargetLiving</code> | createChangeEntityEquipmentEventTargetLiving | {
"repo_name": "kashike/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 215110
} | [
"java.util.HashMap",
"java.util.Optional",
"org.spongepowered.api.data.Transaction",
"org.spongepowered.api.entity.living.Living",
"org.spongepowered.api.event.cause.Cause",
"org.spongepowered.api.event.entity.ChangeEntityEquipmentEvent",
"org.spongepowered.api.item.inventory.ItemStackSnapshot",
"org.... | import java.util.HashMap; import java.util.Optional; import org.spongepowered.api.data.Transaction; import org.spongepowered.api.entity.living.Living; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.event.entity.ChangeEntityEquipmentEvent; import org.spongepowered.api.item.inventory.ItemSta... | import java.util.*; import org.spongepowered.api.data.*; import org.spongepowered.api.entity.living.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.event.entity.*; import org.spongepowered.api.item.inventory.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,946,681 |
public String getNameLabel(Connection c) throws
Types.BadServerResponse,
XmlRpcException {
String method_call = "host.get_name_label";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map... | String function(Connection c) throws Types.BadServerResponse, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); if(response.get(STR).equals... | /**
* Get the name/label field of the given host.
*
* @return value of the field
*/ | Get the name/label field of the given host | getNameLabel | {
"repo_name": "cc14514/hq6",
"path": "hq-plugin/xen-plugin/src/main/java/com/xensource/xenapi/Host.java",
"license": "unlicense",
"size": 71202
} | [
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import java.util.*; import org.apache.xmlrpc.*; | [
"java.util",
"org.apache.xmlrpc"
] | java.util; org.apache.xmlrpc; | 1,299,804 |
private static SolarEquationVariables getSolarEquationVariables(final Calendar day, double longitude) {
longitude = -longitude;
// Get the given date as a Julian date.
final double julianDate = getJulianDate(day);
// Calculate current Julian cycle (number of days since 2000-01-01).
final double ... | static SolarEquationVariables function(final Calendar day, double longitude) { longitude = -longitude; final double julianDate = getJulianDate(day); final double nstar = julianDate - JULIAN_DATE_2000_01_01 - CONST_0009 - longitude / CONST_360; final double n = Math.round(nstar); final double jstar = JULIAN_DATE_2000_01... | /**
* Return intermediate variables used for calculating sunrise, sunset, and solar noon.
*
* @param day The day for which to calculate the ecliptic longitude and jtransit
* @param longitude the longitude of the location in degrees (West is negative)
* @return a 2-element array with the ecli... | Return intermediate variables used for calculating sunrise, sunset, and solar noon | getSolarEquationVariables | {
"repo_name": "caarmen/SunriseSunset",
"path": "library/src/main/java/ca/rmen/sunrisesunset/SunriseSunset.java",
"license": "lgpl-2.1",
"size": 29754
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 46,571 |
static double getLocalTimestamp() {
long ut1 = SystemClock.MONOTONIC.currentTimeInMicros();
return ((ut1 + OFFSET_1900) / MIO_AS_DOUBLE);
} | static double getLocalTimestamp() { long ut1 = SystemClock.MONOTONIC.currentTimeInMicros(); return ((ut1 + OFFSET_1900) / MIO_AS_DOUBLE); } | /**
* <p>Liefert den aktuellen lokalen NTP-Timestamp. </p>
*
* @return aktuelle Zeit im NTP-Format (Sekunden seit 1.1.1900)
*/ | Liefert den aktuellen lokalen NTP-Timestamp. | getLocalTimestamp | {
"repo_name": "MenoData/Time4J",
"path": "base/src/main/java/net/time4j/clock/SntpMessage.java",
"license": "lgpl-2.1",
"size": 28772
} | [
"net.time4j.SystemClock"
] | import net.time4j.SystemClock; | import net.time4j.*; | [
"net.time4j"
] | net.time4j; | 2,230,808 |
@Test
public void testNestedScriptsForMySQL() throws Exception {
String childTab1 = "childTab1";
String childTab2 = "childTab2";
String parentTab = "fooTab";
String childTestScript1[] = {
"",
"DROP TABLE IF EXISTS " + childTab1 + ";",
"CREATE TABLE " + childTab1 + "(id INTEGER);",... | void function() throws Exception { String childTab1 = STR; String childTab2 = STR; String parentTab = STR; String childTestScript1[] = { STRDROP TABLE IF EXISTS STR;STRCREATE TABLE STR(id INTEGER);STRDROP TABLE STR;STR;STRDROP TABLE IF EXISTS STR;STRCREATE TABLE STR(id INTEGER);STR-- this is a commentSTRDROP TABLE STR;... | /**
* Test nested script formatting
*/ | Test nested script formatting | testNestedScriptsForMySQL | {
"repo_name": "vineetgarg02/hive",
"path": "itests/hive-unit/src/test/java/org/apache/hive/beeline/schematool/TestSchemaTool.java",
"license": "apache-2.0",
"size": 12222
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,197,332 |
@Override
public String getDropColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc,
String pk, boolean semicolon ) {
return "ALTER TABLE " + tablename + " DROP COLUMN " + v.getName();
} | String function( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon ) { return STR + tablename + STR + v.getName(); } | /**
* Generates the SQL statement to drop a column from the specified table
*
* @param tablename
* The table to add
* @param v
* The column defined as a value
* @param tk
* the name of the technical key field
* @param use_autoinc
* whether or not this f... | Generates the SQL statement to drop a column from the specified table | getDropColumnStatement | {
"repo_name": "codek/pentaho-kettle",
"path": "core/src/org/pentaho/di/core/database/PostgreSQLDatabaseMeta.java",
"license": "apache-2.0",
"size": 22002
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,371,407 |
public static boolean deleteOrDie(@Nonnull final String file) throws IOException {
// this returns true if the file was actually deleted
// and false for 2 cases:
// 1. file did not exist to start with
// 2. File.delete() failed at some point for some reason
// so we disa... | static boolean function(@Nonnull final String file) throws IOException { final boolean fileWasDeleted = delete(file); if (fileWasDeleted) { return true; } else { final File fileObj = new File(file); if (fileObj.exists()) { throw new IOException( STR + file); } return false; } } | /**
* Deletes file or recursively deletes a directory
*
* @param file path to erase
* @return true if all deletions were successful, false if file did not exist
* @throws IOException if deletion fails and the file still exists at the end
*/ | Deletes file or recursively deletes a directory | deleteOrDie | {
"repo_name": "indeedeng/util",
"path": "io/src/main/java/com/indeed/util/io/Files.java",
"license": "apache-2.0",
"size": 35710
} | [
"java.io.File",
"java.io.IOException",
"javax.annotation.Nonnull"
] | import java.io.File; import java.io.IOException; import javax.annotation.Nonnull; | import java.io.*; import javax.annotation.*; | [
"java.io",
"javax.annotation"
] | java.io; javax.annotation; | 1,290,904 |
@LogMessageDoc(level = "ERROR",
message = "Failure sending LLDP out port {port} on switch {switch}",
explanation = "An I/O error occured while sending LLDP message "
+ "to the switch.",
recommendation = LogMessageDoc.CHECK_SWI... | @LogMessageDoc(level = "ERROR", message = STR, explanation = STR + STR, recommendation = LogMessageDoc.CHECK_SWITCH) void function(long sw, short port, boolean isStandard, boolean isReverse) { IOFSwitch iofSwitch = floodlightProvider.getSwitches().get(sw); if (iofSwitch == null) { return; } if (port == OFPort.OFPP_LOCA... | /**
* Send link discovery message out of a given switch port. The discovery
* message may be a standard LLDP or a modified LLDP, where the dst mac
* address is set to :ff. TODO: The modified LLDP will updated in the future
* and may use a different eth-type.
*
* @param sw
* @param po... | Send link discovery message out of a given switch port. The discovery message may be a standard LLDP or a modified LLDP, where the dst mac and may use a different eth-type | sendDiscoveryMessage | {
"repo_name": "yeasy/floodlight-lc",
"path": "src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java",
"license": "apache-2.0",
"size": 93540
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"net.floodlightcontroller.core.IOFSwitch",
"net.floodlightcontroller.core.annotations.LogMessageDoc",
"net.floodlightcontroller.packet.Ethernet",
"org.openflow.protocol.OFPacketOut",
"org.ope... | import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import net.floodlightcontroller.core.IOFSwitch; import net.floodlightcontroller.core.annotations.LogMessageDoc; import net.floodlightcontroller.packet.Ethernet; import org.openflow.protoco... | import java.io.*; import java.nio.*; import java.util.*; import net.floodlightcontroller.core.*; import net.floodlightcontroller.core.annotations.*; import net.floodlightcontroller.packet.*; import org.openflow.protocol.*; import org.openflow.protocol.action.*; import org.openflow.util.*; | [
"java.io",
"java.nio",
"java.util",
"net.floodlightcontroller.core",
"net.floodlightcontroller.packet",
"org.openflow.protocol",
"org.openflow.util"
] | java.io; java.nio; java.util; net.floodlightcontroller.core; net.floodlightcontroller.packet; org.openflow.protocol; org.openflow.util; | 287,106 |
@Test(expected = IllegalArgumentException.class)
public void checkPassword_emptyPassword() throws Exception {
reg.checkPassword("user", "");
} | @Test(expected = IllegalArgumentException.class) void function() throws Exception { reg.checkPassword("user", ""); } | /**
* Test method for {@link com.ibm.ws.security.registry.UserRegistry#checkPassword(java.lang.String, java.lang.String)}.
*/ | Test method for <code>com.ibm.ws.security.registry.UserRegistry#checkPassword(java.lang.String, java.lang.String)</code> | checkPassword_emptyPassword | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.registry/test/com/ibm/ws/security/registry/UserRegistryIllegalArgumentTemplate.java",
"license": "epl-1.0",
"size": 9316
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,274,831 |
@Override
public final void run() {
if (this.hstore_site == null) {
String msg = String.format("Trying to start %s for partition %d before its HStoreSite was initialized",
this.getClass().getSimpleName(), this.partitionId);
throw new Runtime... | final void function() { if (this.hstore_site == null) { String msg = String.format(STR, this.getClass().getSimpleName(), this.partitionId); throw new RuntimeException(msg); } else if (this.self != null) { String msg = String.format(STR, this.getClass().getSimpleName(), this.partitionId); throw new RuntimeException(msg)... | /**
* Primary run method that is invoked a single time when the thread is started.
* Has the opportunity to do startup config.
*/ | Primary run method that is invoked a single time when the thread is started. Has the opportunity to do startup config | run | {
"repo_name": "apavlo/h-store",
"path": "src/frontend/edu/brown/hstore/PartitionExecutor.java",
"license": "gpl-3.0",
"size": 278798
} | [
"edu.brown.hstore.internal.InternalMessage",
"edu.brown.hstore.internal.InternalTxnMessage",
"edu.brown.hstore.txns.AbstractTransaction",
"edu.brown.hstore.txns.LocalTransaction",
"edu.brown.utils.ThreadUtil",
"java.util.concurrent.Semaphore"
] | import edu.brown.hstore.internal.InternalMessage; import edu.brown.hstore.internal.InternalTxnMessage; import edu.brown.hstore.txns.AbstractTransaction; import edu.brown.hstore.txns.LocalTransaction; import edu.brown.utils.ThreadUtil; import java.util.concurrent.Semaphore; | import edu.brown.hstore.internal.*; import edu.brown.hstore.txns.*; import edu.brown.utils.*; import java.util.concurrent.*; | [
"edu.brown.hstore",
"edu.brown.utils",
"java.util"
] | edu.brown.hstore; edu.brown.utils; java.util; | 2,302,527 |
private DOM initialiseDOM() {
String lNewDocRootName = getWorkingStoreLocation().getStorageLocation().getNewDocRootElementName();
if(lNewDocRootName == null) {
throw new ExInternal("Storage Location " + getWorkingStoreLocation().getStorageLocationName() + " has no root element name, cannot initialise");... | DOM function() { String lNewDocRootName = getWorkingStoreLocation().getStorageLocation().getNewDocRootElementName(); if(lNewDocRootName == null) { throw new ExInternal(STR + getWorkingStoreLocation().getStorageLocationName() + STR); } DOM lDOM = DOM.createDocument(lNewDocRootName); return lDOM; } | /**
* Constructs a new DOM document based on the root element name specified in this WorkDoc's WSL.
* @return New document with correct root element name.
*/ | Constructs a new DOM document based on the root element name specified in this WorkDoc's WSL | initialiseDOM | {
"repo_name": "Fivium/FOXopen",
"path": "src/main/java/net/foxopen/fox/database/storage/dom/WriteableXMLWorkDoc.java",
"license": "gpl-3.0",
"size": 14101
} | [
"net.foxopen.fox.dom.DOM",
"net.foxopen.fox.ex.ExInternal"
] | import net.foxopen.fox.dom.DOM; import net.foxopen.fox.ex.ExInternal; | import net.foxopen.fox.dom.*; import net.foxopen.fox.ex.*; | [
"net.foxopen.fox"
] | net.foxopen.fox; | 2,752,528 |
@FIXVersion(introduced="4.4")
@TagNumRef(tagNum=TagNum.SecondaryTradeReportID)
public void setSecondaryTradeReportID(String secondaryTradeReportID) {
this.secondaryTradeReportID = secondaryTradeReportID;
} | @FIXVersion(introduced="4.4") @TagNumRef(tagNum=TagNum.SecondaryTradeReportID) void function(String secondaryTradeReportID) { this.secondaryTradeReportID = secondaryTradeReportID; } | /**
* Message field setter.
* @param secondaryTradeReportID field value
*/ | Message field setter | setSecondaryTradeReportID | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/TradeCaptureReportAckMsg.java",
"license": "gpl-3.0",
"size": 118717
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 544,494 |
protected void checkOrderBy(OpenInfraOrderBy column) {
// flag to determine if the orderBy type is supported
boolean wrongSortType = true;
// get the list of classes that fit to the orderBy column
List<String> orderByClasses =
OpenInfraOrderByEnum.valueOf(
... | void function(OpenInfraOrderBy column) { boolean wrongSortType = true; List<String> orderByClasses = OpenInfraOrderByEnum.valueOf( column.getColumn().name()).getList(); for (String cl : orderByClasses) { if (modelClass.getSimpleName().equals(cl)) { wrongSortType = false; break; } } if (wrongSortType) { throw new OpenIn... | /**
* This method retrieves the list of objects from the OpenInfraOrderByEnum
* for the passed orderBy column and compares it with the current object. If
* the current object is not part of the retrieved list, an
* OpenInfraEntityException is thrown.
*
* @param column
* @throws... | This method retrieves the list of objects from the OpenInfraOrderByEnum for the passed orderBy column and compares it with the current object. If the current object is not part of the retrieved list, an OpenInfraEntityException is thrown | checkOrderBy | {
"repo_name": "PhilippE11/core",
"path": "openinfra_core/src/main/java/de/btu/openinfra/backend/db/daos/OpenInfraDao.java",
"license": "gpl-3.0",
"size": 22554
} | [
"de.btu.openinfra.backend.db.OpenInfraOrderBy",
"de.btu.openinfra.backend.db.OpenInfraOrderByEnum",
"de.btu.openinfra.backend.exception.OpenInfraEntityException",
"de.btu.openinfra.backend.exception.OpenInfraExceptionTypes",
"java.util.List"
] | import de.btu.openinfra.backend.db.OpenInfraOrderBy; import de.btu.openinfra.backend.db.OpenInfraOrderByEnum; import de.btu.openinfra.backend.exception.OpenInfraEntityException; import de.btu.openinfra.backend.exception.OpenInfraExceptionTypes; import java.util.List; | import de.btu.openinfra.backend.db.*; import de.btu.openinfra.backend.exception.*; import java.util.*; | [
"de.btu.openinfra",
"java.util"
] | de.btu.openinfra; java.util; | 907,032 |
private void updateAffectedControllerServices(final Set<ControllerServiceEntity> serviceEntities, final VariableRegistryUpdateRequest updateRequest) {
// update the affected components
serviceEntities.stream()
.filter(entity -> updateRequest.getAffectedComponents().containsKey(entity... | void function(final Set<ControllerServiceEntity> serviceEntities, final VariableRegistryUpdateRequest updateRequest) { serviceEntities.stream() .filter(entity -> updateRequest.getAffectedComponents().containsKey(entity.getId())) .forEach(entity -> { final AffectedComponentEntity affectedComponentEntity = updateRequest.... | /**
* Updates the affected controller services in the specified updateRequest with the serviceEntities.
*
* @param serviceEntities service entities
* @param updateRequest update request
*/ | Updates the affected controller services in the specified updateRequest with the serviceEntities | updateAffectedControllerServices | {
"repo_name": "jskora/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java",
"license": "apache-2.0",
"size": 202757
} | [
"java.util.Set",
"org.apache.nifi.registry.variable.VariableRegistryUpdateRequest",
"org.apache.nifi.web.api.dto.AffectedComponentDTO",
"org.apache.nifi.web.api.entity.AffectedComponentEntity",
"org.apache.nifi.web.api.entity.ControllerServiceEntity"
] | import java.util.Set; import org.apache.nifi.registry.variable.VariableRegistryUpdateRequest; import org.apache.nifi.web.api.dto.AffectedComponentDTO; import org.apache.nifi.web.api.entity.AffectedComponentEntity; import org.apache.nifi.web.api.entity.ControllerServiceEntity; | import java.util.*; import org.apache.nifi.registry.variable.*; import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*; | [
"java.util",
"org.apache.nifi"
] | java.util; org.apache.nifi; | 815,242 |
private void runFullStateService()
{
if (debug)
{
// "Full State Sync Channel {0} external build running."
Ganymede.debug(ts.l("runFullStateService.running", this.name));
}
int resultCode = -999; // a resultCode of 0 is success
File file = new File(this.serviceProgram);
... | void function() { if (debug) { Ganymede.debug(ts.l(STR, this.name)); } int resultCode = -999; File file = new File(this.serviceProgram); if (file.exists()) { try { resultCode = FileOps.runProcess(this.serviceProgram); } catch (IOException ex) { Ganymede.debug(ts.l(STR, this.serviceProgram, this.name, Ganymede.stackTrac... | /**
* <p>This method executes the external build, feeding the external
* service script the name of the full state XML file that we dumped
* out.</p>
*/ | This method executes the external build, feeding the external service script the name of the full state XML file that we dumped out | runFullStateService | {
"repo_name": "jonabbey/Ganymede",
"path": "src/ganymede/arlut/csd/ganymede/server/SyncRunner.java",
"license": "gpl-2.0",
"size": 67960
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,108,012 |
public int read(byte b[],
int offset,
int maxBytes) throws IOException {
checkClosed();
if (logger.isLoggable(java.util.logging.Level.FINER))
logger.finer(toString() + " Reading " + maxBytes + " from stream offset " + streamPos + " payload length " + payloadLength... | int function(byte b[], int offset, int maxBytes) throws IOException { checkClosed(); if (logger.isLoggable(java.util.logging.Level.FINER)) logger.finer(toString() + STR + maxBytes + STR + streamPos + STR + payloadLength); if (offset < 0 maxBytes < 0 offset + maxBytes > b.length) throw new IndexOutOfBoundsException(); i... | /**
* Reads available data into supplied byte array.
*
* @param b
* array of bytes to fill.
* @param offset
* the offset into array b where to start writing.
* @param maxBytes
* the max number of bytes to write into b.
* @return the number o... | Reads available data into supplied byte array | read | {
"repo_name": "v-nisidh/mssql-jdbc",
"path": "src/main/java/com/microsoft/sqlserver/jdbc/SimpleInputStream.java",
"license": "mit",
"size": 11294
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,783,946 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.