method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private static Map<URI, NavigableMap<Date, ModuleBuilder>> orderModules(final List<ModuleBuilder> modules) {
final Map<URI, NavigableMap<Date, ModuleBuilder>> result = new LinkedHashMap<>();
for (final ModuleBuilder builder : modules) {
if (builder == null) {
continue;
... | static Map<URI, NavigableMap<Date, ModuleBuilder>> function(final List<ModuleBuilder> modules) { final Map<URI, NavigableMap<Date, ModuleBuilder>> result = new LinkedHashMap<>(); for (final ModuleBuilder builder : modules) { if (builder == null) { continue; } URI ns = builder.getNamespace(); Date rev = builder.getRevis... | /**
* Order modules by namespace and revision.
*
* @param modules
* topologically sorted modules
* @return modules ordered by namespace and revision
*/ | Order modules by namespace and revision | orderModules | {
"repo_name": "NovusTheory/yangtools",
"path": "yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/YangParserImpl.java",
"license": "epl-1.0",
"size": 59151
} | [
"java.util.Date",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"java.util.NavigableMap",
"java.util.TreeMap",
"org.opendaylight.yangtools.yang.parser.builder.impl.ModuleBuilder"
] | import java.util.Date; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.NavigableMap; import java.util.TreeMap; import org.opendaylight.yangtools.yang.parser.builder.impl.ModuleBuilder; | import java.util.*; import org.opendaylight.yangtools.yang.parser.builder.impl.*; | [
"java.util",
"org.opendaylight.yangtools"
] | java.util; org.opendaylight.yangtools; | 819,433 |
public int removeRelation(SQLiteDatabase db, long from){
return db.delete(mJoinTable,
ManyToManyColumns.FROM_ID + "=?",
new String[]{Long.toString(from)});
} | int function(SQLiteDatabase db, long from){ return db.delete(mJoinTable, ManyToManyColumns.FROM_ID + "=?", new String[]{Long.toString(from)}); } | /**
* Removes all relations from a given item.
*
* @param db
* @param from
* @return the count of deleted relations
*/ | Removes all relations from a given item | removeRelation | {
"repo_name": "mitmel/Locast-Android",
"path": "src/edu/mit/mobile/android/content/ManyToMany.java",
"license": "gpl-2.0",
"size": 12976
} | [
"android.database.sqlite.SQLiteDatabase"
] | import android.database.sqlite.SQLiteDatabase; | import android.database.sqlite.*; | [
"android.database"
] | android.database; | 1,517,550 |
@Test
public void testBoth() {
final ICodePage cp = CharMappings.getCodePage("278");
final CCSID278 cpex = new CCSID278();
cpex.init();
assertNotNull("At least an ASCII Codepage should be available.", cpex);
for (int i=0; i<256; i++) {
final byte beginvalue = (byte)i;
assertEquals("Testing... | void function() { final ICodePage cp = CharMappings.getCodePage("278"); final CCSID278 cpex = new CCSID278(); cpex.init(); assertNotNull(STR, cpex); for (int i=0; i<256; i++) { final byte beginvalue = (byte)i; assertEquals(STR + i, cp.ebcdic2uni(beginvalue), cpex.ebcdic2uni(beginvalue)); final char converted = cp.ebcdi... | /**
* Testing for Correctness both implementations ...
* Testing byte -> Unicode -> byte
*/ | Testing for Correctness both implementations ... Testing byte -> Unicode -> byte | testBoth | {
"repo_name": "zenovalle/tn5250j",
"path": "tests/org/tn5250j/encoding/builtin/CCSID278Test.java",
"license": "gpl-2.0",
"size": 3180
} | [
"org.junit.Assert",
"org.tn5250j.encoding.CharMappings",
"org.tn5250j.encoding.ICodePage"
] | import org.junit.Assert; import org.tn5250j.encoding.CharMappings; import org.tn5250j.encoding.ICodePage; | import org.junit.*; import org.tn5250j.encoding.*; | [
"org.junit",
"org.tn5250j.encoding"
] | org.junit; org.tn5250j.encoding; | 1,917,402 |
public static void assertSameMembers(ThrowableSet s,
RefLikeType[] included,
AnySubType[] excluded) {
assertTrue(ExceptionTestUtility.sameMembers(
new ExceptionHashSet<RefLikeType>(Arrays.asList(included)),
new ExceptionHashSet<AnySubType>(Arrays.asList(excluded)),
s));
} | static void function(ThrowableSet s, RefLikeType[] included, AnySubType[] excluded) { assertTrue(ExceptionTestUtility.sameMembers( new ExceptionHashSet<RefLikeType>(Arrays.asList(included)), new ExceptionHashSet<AnySubType>(Arrays.asList(excluded)), s)); } | /**
* Asserts that the membership in the component sets of a
* ThrowableSet correspond to expectations.
*
* @param s The set to be checked.
*
* @param included an array containing the RefLikeTypes
* expected to be in included in <code>s</code>.
*
* @param excluded an array containing the RefLikeTypes
... | Asserts that the membership in the component sets of a ThrowableSet correspond to expectations | assertSameMembers | {
"repo_name": "plast-lab/soot",
"path": "src/test/java/soot/toolkits/exceptions/ThrowableSetTest.java",
"license": "lgpl-2.1",
"size": 56058
} | [
"java.util.Arrays",
"org.junit.Assert"
] | import java.util.Arrays; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 275,668 |
void getSearchProviderLogo(LogoObserver logoObserver); | void getSearchProviderLogo(LogoObserver logoObserver); | /**
* Gets the default search provider's logo and calls logoObserver with the result.
* @param logoObserver The callback to notify when the logo is available.
*/ | Gets the default search provider's logo and calls logoObserver with the result | getSearchProviderLogo | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java",
"license": "bsd-3-clause",
"size": 53531
} | [
"org.chromium.chrome.browser.ntp.LogoBridge"
] | import org.chromium.chrome.browser.ntp.LogoBridge; | import org.chromium.chrome.browser.ntp.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 352,338 |
public static void assertParallelFilesAreIdentical(List<File> dirs,
Set<String> ignoredFileNames) throws Exception {
HashMap<String, List<File>> groupedByName = new HashMap<String, List<File>>();
for (File dir : dirs) {
for (File f : dir.listFiles()) {
if (ignoredFileNames.contains(f.getNa... | static void function(List<File> dirs, Set<String> ignoredFileNames) throws Exception { HashMap<String, List<File>> groupedByName = new HashMap<String, List<File>>(); for (File dir : dirs) { for (File f : dir.listFiles()) { if (ignoredFileNames.contains(f.getName())) { continue; } List<File> fileList = groupedByName.get... | /**
* Given a list of directories, assert that any files that are named
* the same thing have the same contents. For example, if a file
* named "fsimage_1" shows up in more than one directory, then it must
* be the same.
* @throws Exception
*/ | Given a list of directories, assert that any files that are named the same thing have the same contents. For example, if a file named "fsimage_1" shows up in more than one directory, then it must be the same | assertParallelFilesAreIdentical | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSImageTestUtil.java",
"license": "apache-2.0",
"size": 20947
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 886,975 |
private static Map<String, String> createInfoFieldKeyToAttrNameMap(
VcfMeta vcfMeta, String entityTypeId) {
Map<String, String> infoFieldIdToAttrNameMap =
newHashMapWithExpectedSize(size(vcfMeta.getInfoMeta()));
for (VcfMetaInfo info : vcfMeta.getInfoMeta()) {
// according to the VCF stand... | static Map<String, String> function( VcfMeta vcfMeta, String entityTypeId) { Map<String, String> infoFieldIdToAttrNameMap = newHashMapWithExpectedSize(size(vcfMeta.getInfoMeta())); for (VcfMetaInfo info : vcfMeta.getInfoMeta()) { String postFix = ""; switch (info.getId()) { case INTERNAL_ID: case CHROM: case ALT: case ... | /**
* Returns a mapping of VCF info field keys to MOLGENIS attribute names
*
* @param vcfMeta VCF metadata
* @param entityTypeId entity name (that could be used to create a MOLGENIS attribute name)
* @return map of VCF info field keys to MOLGENIS attribute names
*/ | Returns a mapping of VCF info field keys to MOLGENIS attribute names | createInfoFieldKeyToAttrNameMap | {
"repo_name": "sidohaakma/molgenis",
"path": "molgenis-data-vcf/src/main/java/org/molgenis/data/vcf/format/VcfToEntity.java",
"license": "lgpl-3.0",
"size": 17776
} | [
"com.google.common.collect.Maps",
"java.util.Map",
"org.molgenis.data.validation.meta.NameValidator",
"org.molgenis.vcf.meta.VcfMeta",
"org.molgenis.vcf.meta.VcfMetaInfo"
] | import com.google.common.collect.Maps; import java.util.Map; import org.molgenis.data.validation.meta.NameValidator; import org.molgenis.vcf.meta.VcfMeta; import org.molgenis.vcf.meta.VcfMetaInfo; | import com.google.common.collect.*; import java.util.*; import org.molgenis.data.validation.meta.*; import org.molgenis.vcf.meta.*; | [
"com.google.common",
"java.util",
"org.molgenis.data",
"org.molgenis.vcf"
] | com.google.common; java.util; org.molgenis.data; org.molgenis.vcf; | 465,239 |
protected ActionForward performBalanceInquiryForAccountingLine(ActionMapping mapping, ActionForm form, HttpServletRequest request, AccountingLine line) {
// build out base path for return location
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort... | ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, AccountingLine line) { String basePath = request.getScheme() + STR.doSTRreferenceOriginCodeSTRreferenceNumberSTRreferenceTypeCodeSTRdebitCreditCodeSTRchartOfAccountsCodeSTRaccountNumberSTRfinancialObjectCodeSTRsubAccountNumberSTR... | /**
* This method handles preparing all of the accounting line data so that it
* can be pushed up to the balance inquiries for populating the search
* criteria of each.
*
* @param mapping
* @param form
* @param request
* @param line
* @return ActionForward
*/ | This method handles preparing all of the accounting line data so that it can be pushed up to the balance inquiries for populating the search criteria of each | performBalanceInquiryForAccountingLine | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/web/struts/KualiAccountingDocumentActionBase.java",
"license": "apache-2.0",
"size": 50945
} | [
"javax.servlet.http.HttpServletRequest",
"org.apache.struts.action.ActionForm",
"org.apache.struts.action.ActionForward",
"org.apache.struts.action.ActionMapping",
"org.kuali.kfs.sys.KFSConstants",
"org.kuali.kfs.sys.businessobject.AccountingLine",
"org.kuali.rice.krad.util.KRADConstants"
] | import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kfs.sys.KFSConstants; import org.kuali.kfs.sys.businessobject.AccountingLine; import org.kuali.rice.krad.util.KRADConst... | import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.businessobject.*; import org.kuali.rice.krad.util.*; | [
"javax.servlet",
"org.apache.struts",
"org.kuali.kfs",
"org.kuali.rice"
] | javax.servlet; org.apache.struts; org.kuali.kfs; org.kuali.rice; | 2,894,330 |
public Map<String, Object> getKafkaProps() {
return kafkaProps;
} | Map<String, Object> function() { return kafkaProps; } | /**
* Gets the properties that will be passed to the KafkaConsumer.
*
* @return The Kafka properties map
*/ | Gets the properties that will be passed to the KafkaConsumer | getKafkaProps | {
"repo_name": "knusbaum/incubator-storm",
"path": "external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpoutConfig.java",
"license": "apache-2.0",
"size": 18592
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 450,587 |
public AutofitHelper addOnTextSizeChangeListener(OnTextSizeChangeListener listener) {
if (mListeners == null) {
mListeners = new ArrayList<OnTextSizeChangeListener>();
}
mListeners.add(listener);
return this;
} | AutofitHelper function(OnTextSizeChangeListener listener) { if (mListeners == null) { mListeners = new ArrayList<OnTextSizeChangeListener>(); } mListeners.add(listener); return this; } | /**
* Adds an {@link OnTextSizeChangeListener} to the list of those whose methods are called
* whenever the {@link TextView}'s {@code textSize} changes.
*/ | Adds an <code>OnTextSizeChangeListener</code> to the list of those whose methods are called whenever the <code>TextView</code>'s textSize changes | addOnTextSizeChangeListener | {
"repo_name": "mianli/Dobelity",
"path": "dobe/src/main/java/com/study/mli/dobe/customview/AutofitHelper.java",
"license": "bsd-2-clause",
"size": 17846
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,728 |
public void write(byte[] buffer) {
try {
mmOutStream.write(buffer);
// Share the sent message back to the UI Activity
mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1,
buffer).sendToTarget();
} catch (IOException e) {
Log.e(TAG, "Exception during write", e);
}
} | void function(byte[] buffer) { try { mmOutStream.write(buffer); mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); } catch (IOException e) { Log.e(TAG, STR, e); } } | /**
* Write to the connected OutStream.
*
* @param buffer
* The bytes to write
*/ | Write to the connected OutStream | write | {
"repo_name": "filipe1309/Codes",
"path": "android/BluetoothChat-master/src/com/example/android/BluetoothChat/BluetoothChatService.java",
"license": "gpl-2.0",
"size": 14176
} | [
"android.util.Log",
"java.io.IOException"
] | import android.util.Log; import java.io.IOException; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 1,247,044 |
public Component getPopupForModel(final java.lang.Object obj) {
if (obj instanceof ConnectorModel) {
final ConnectorModel link = (ConnectorModel) obj;
final Box arrowLinkPopup = Box.createVerticalBox();
arrowLinkPopup.setName(TextUtils.getText("connector"));
createArrowLinkPopup(link, arrowLinkPopup);
... | Component function(final java.lang.Object obj) { if (obj instanceof ConnectorModel) { final ConnectorModel link = (ConnectorModel) obj; final Box arrowLinkPopup = Box.createVerticalBox(); arrowLinkPopup.setName(TextUtils.getText(STR)); createArrowLinkPopup(link, arrowLinkPopup); return arrowLinkPopup; } return null; } ... | /**
* Link implementation: If this is a link, we want to make a popup with at
* least removelink available.
*/ | Link implementation: If this is a link, we want to make a popup with at least removelink available | getPopupForModel | {
"repo_name": "systemovich/freeplane",
"path": "freeplane/src/main/java/org/freeplane/features/link/LinkController.java",
"license": "gpl-2.0",
"size": 33192
} | [
"java.awt.Component",
"javax.swing.Box",
"org.freeplane.core.util.TextUtils"
] | import java.awt.Component; import javax.swing.Box; import org.freeplane.core.util.TextUtils; | import java.awt.*; import javax.swing.*; import org.freeplane.core.util.*; | [
"java.awt",
"javax.swing",
"org.freeplane.core"
] | java.awt; javax.swing; org.freeplane.core; | 21,158 |
protected String loadTemplate(String name) {
StringBuilder result;
InputStream stream;
byte[] buffer;
int read;
result = new StringBuilder();
try {
buffer = new byte[1024];
stream = new BufferedInputStream(ClassLoader.getSystemResourceAsStream(name));
while ((re... | String function(String name) { StringBuilder result; InputStream stream; byte[] buffer; int read; result = new StringBuilder(); try { buffer = new byte[1024]; stream = new BufferedInputStream(ClassLoader.getSystemResourceAsStream(name)); while ((read = stream.read(buffer)) >= 0) result.append(new String(buffer, 0, read... | /**
* Loads the template.
*
* @param name the resource name
* @return the template content, null in case of error
*/ | Loads the template | loadTemplate | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/goe/AbstractSimpleScriptEditorWithTemplates.java",
"license": "gpl-3.0",
"size": 4447
} | [
"java.io.BufferedInputStream",
"java.io.InputStream"
] | import java.io.BufferedInputStream; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 673,078 |
@ApiModelProperty(value = "Fine metric division, for example process group and process ID for some process-related metric.")
public List<String> getDimensions() {
return dimensions;
} | @ApiModelProperty(value = STR) List<String> function() { return dimensions; } | /**
* Fine metric division, for example process group and process ID for some process-related metric.
*
* @return dimensions
**/ | Fine metric division, for example process group and process ID for some process-related metric | getDimensions | {
"repo_name": "T-Systems-MMS/perfsig-jenkins",
"path": "dynatrace/src/main/java/de/tsystems/mms/apm/performancesignature/dynatracesaas/rest/model/TimeseriesDefinition.java",
"license": "apache-2.0",
"size": 8223
} | [
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import io.swagger.annotations.ApiModelProperty; import java.util.List; | import io.swagger.annotations.*; import java.util.*; | [
"io.swagger.annotations",
"java.util"
] | io.swagger.annotations; java.util; | 816,621 |
public synchronized void store() throws Exception {
// Calculate file objects for the old and new configuration files.
String configFile = "conf/server.xml"; // FIXME - configurable?
File configOld = new File(configFile);
if (!configOld.isAbsolute()) {
configOld = new File(System.getProperty("c... | synchronized void function() throws Exception { String configFile = STR; File configOld = new File(configFile); if (!configOld.isAbsolute()) { configOld = new File(System.getProperty(STR), configFile); } File configNew = new File(configFile + ".new"); if (!configNew.isAbsolute()) { configNew = new File(System.getProper... | /**
* Write the configuration information for this entire <code>Server</code>
* out to the server.xml configuration file.
*
* @throws InstanceNotFoundException if the managed resource object
* cannot be found
* @throws MBeanException if the initializer o... | Write the configuration information for this entire <code>Server</code> out to the server.xml configuration file | store | {
"repo_name": "NorthFacing/step-by-Java",
"path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/core/StandardServer.java",
"license": "gpl-2.0",
"size": 64233
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter",
"java.io.PrintWriter",
"java.sql.Timestamp"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.sql.Timestamp; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 2,182,624 |
public void removeListener(Listener<ReusableFloatBuffer> listener)
{
mMixerReader.removeBufferListener();
} | void function(Listener<ReusableFloatBuffer> listener) { mMixerReader.removeBufferListener(); } | /**
* Removes the listener from receiving sample data.
* @param listener
*/ | Removes the listener from receiving sample data | removeListener | {
"repo_name": "ImagoTrigger/sdrtrunk",
"path": "src/main/java/io/github/dsheirer/source/mixer/RealMixerSource.java",
"license": "gpl-3.0",
"size": 4307
} | [
"io.github.dsheirer.sample.Listener",
"io.github.dsheirer.sample.buffer.ReusableFloatBuffer"
] | import io.github.dsheirer.sample.Listener; import io.github.dsheirer.sample.buffer.ReusableFloatBuffer; | import io.github.dsheirer.sample.*; import io.github.dsheirer.sample.buffer.*; | [
"io.github.dsheirer"
] | io.github.dsheirer; | 2,757,114 |
void reset(Set<Attribute> attributesToDel) {
Set<String> ptsToDel = new HashSet<>();
for (Attribute attr : attributesToDel) {
ptsToDel.add(attr.getProjectType());
}
Set<String> attrNamesToDel = new HashSet<>();
for (String pt : ptsToDel) {
ProjectTypeDef typeDef = all.get(pt);
... | void reset(Set<Attribute> attributesToDel) { Set<String> ptsToDel = new HashSet<>(); for (Attribute attr : attributesToDel) { ptsToDel.add(attr.getProjectType()); } Set<String> attrNamesToDel = new HashSet<>(); for (String pt : ptsToDel) { ProjectTypeDef typeDef = all.get(pt); for (Attribute attrDef : typeDef.getAttrib... | /**
* Reset project types and atrributes after initialization in case when some attributes are not
* valid (for instance required attributes are not initialized)
*
* @param attributesToDel - invalid attributes
*/ | Reset project types and atrributes after initialization in case when some attributes are not valid (for instance required attributes are not initialized) | reset | {
"repo_name": "sudaraka94/che",
"path": "wsagent/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ProjectTypes.java",
"license": "epl-1.0",
"size": 7941
} | [
"java.util.HashSet",
"java.util.Set",
"org.eclipse.che.api.core.model.project.type.Attribute",
"org.eclipse.che.api.project.server.type.ProjectTypeDef",
"org.eclipse.che.api.project.server.type.ProjectTypeRegistry"
] | import java.util.HashSet; import java.util.Set; import org.eclipse.che.api.core.model.project.type.Attribute; import org.eclipse.che.api.project.server.type.ProjectTypeDef; import org.eclipse.che.api.project.server.type.ProjectTypeRegistry; | import java.util.*; import org.eclipse.che.api.core.model.project.type.*; import org.eclipse.che.api.project.server.type.*; | [
"java.util",
"org.eclipse.che"
] | java.util; org.eclipse.che; | 449,036 |
void enterKeyword(@NotNull ClojureParser.KeywordContext ctx);
void exitKeyword(@NotNull ClojureParser.KeywordContext ctx); | void enterKeyword(@NotNull ClojureParser.KeywordContext ctx); void exitKeyword(@NotNull ClojureParser.KeywordContext ctx); | /**
* Exit a parse tree produced by {@link ClojureParser#keyword}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>ClojureParser#keyword</code> | exitKeyword | {
"repo_name": "IsThisThePayneResidence/intellidots",
"path": "src/main/java/ua/edu/hneu/ast/parsers/ClojureListener.java",
"license": "gpl-3.0",
"size": 13898
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 109,924 |
@Override
public String toString() {
return modules().stream()
.map(ResolvedModule::name)
.collect(Collectors.joining(", "));
} | String function() { return modules().stream() .map(ResolvedModule::name) .collect(Collectors.joining(STR)); } | /**
* Returns a string describing this configuration.
*
* @return A string describing this configuration
*/ | Returns a string describing this configuration | toString | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "src/java.base/share/classes/java/lang/module/Configuration.java",
"license": "gpl-2.0",
"size": 18239
} | [
"java.util.stream.Collectors"
] | import java.util.stream.Collectors; | import java.util.stream.*; | [
"java.util"
] | java.util; | 527,487 |
private boolean do_CheckStore(Operand ref, Operand elem, TypeReference elemType) {
if (gc.options.NO_CHECKSTORE) {
return false; // Unsafely eliminate all store checks
}
if (CF_CHECKSTORE) {
// NOTE: BE WARY OF ADDITIONAL OPTIMZATIONS.
// ARRAY SUBTYPING IS SUBTLE (see JLS 10.10) --d... | boolean function(Operand ref, Operand elem, TypeReference elemType) { if (gc.options.NO_CHECKSTORE) { return false; } if (CF_CHECKSTORE) { if (elem.isDefinitelyNull()) { if (DBG_TYPE) db(STR); return false; } if (elemType.isArrayType()) { TypeReference elemType2 = elemType; do { elemType2 = elemType2.getArrayElementTyp... | /**
* Generate a storecheck for the given array and elem
* @param ref the array reference
* @param elem the element to be written to the array
* @param elemType the type of the array references elements
* @return true if an unconditional throw is generated, false otherwise
*/ | Generate a storecheck for the given array and elem | do_CheckStore | {
"repo_name": "ut-osa/laminar",
"path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java",
"license": "bsd-3-clause",
"size": 233116
} | [
"org.jikesrvm.classloader.RVMClass",
"org.jikesrvm.classloader.RVMType",
"org.jikesrvm.classloader.TypeReference",
"org.jikesrvm.compilers.opt.ir.Binary",
"org.jikesrvm.compilers.opt.ir.StoreCheck",
"org.jikesrvm.compilers.opt.ir.operand.Operand",
"org.jikesrvm.compilers.opt.ir.operand.RegisterOperand"
... | import org.jikesrvm.classloader.RVMClass; import org.jikesrvm.classloader.RVMType; import org.jikesrvm.classloader.TypeReference; import org.jikesrvm.compilers.opt.ir.Binary; import org.jikesrvm.compilers.opt.ir.StoreCheck; import org.jikesrvm.compilers.opt.ir.operand.Operand; import org.jikesrvm.compilers.opt.ir.opera... | import org.jikesrvm.classloader.*; import org.jikesrvm.compilers.opt.ir.*; import org.jikesrvm.compilers.opt.ir.operand.*; | [
"org.jikesrvm.classloader",
"org.jikesrvm.compilers"
] | org.jikesrvm.classloader; org.jikesrvm.compilers; | 1,813,272 |
void onNewScale() {
setTitle();
if (!common.isWritable()) {
String msg = common.isDefault() ?
getResources().getString(R.string.scaleIsDefault) :
getResources().getString(R.string.scaleInUse);
Toast.makeText(ScaleActivity.this,
String.format(msg, common.getScale().getName()),
Toa... | void onNewScale() { setTitle(); if (!common.isWritable()) { String msg = common.isDefault() ? getResources().getString(R.string.scaleIsDefault) : getResources().getString(R.string.scaleInUse); Toast.makeText(ScaleActivity.this, String.format(msg, common.getScale().getName()), Toast.LENGTH_SHORT).show(); } invalidateOpt... | /**
* handle the load of a new scale
*/ | handle the load of a new scale | onNewScale | {
"repo_name": "wordsaretoys/quencher",
"path": "app/src/main/java/com/wordsaretoys/quencher/scales/ScaleActivity.java",
"license": "mit",
"size": 10205
} | [
"android.widget.Toast"
] | import android.widget.Toast; | import android.widget.*; | [
"android.widget"
] | android.widget; | 225,022 |
@Override
public List<Tuple2<String, WrExprAnyLiteral>> getFeatureList() {
final Prototype pu = compiler.getCurrentPrototype();
if ( pu != null ) {
return pu.getFeatureList();
}
else
return null;
} | List<Tuple2<String, WrExprAnyLiteral>> function() { final Prototype pu = compiler.getCurrentPrototype(); if ( pu != null ) { return pu.getFeatureList(); } else return null; } | /**
* return the feature list of the current prototype, if there is one. Otherwise return null
*/ | return the feature list of the current prototype, if there is one. Otherwise return null | getFeatureList | {
"repo_name": "joseoliv/Cyan",
"path": "metaRealClasses/CompilerAction_parsing.java",
"license": "gpl-3.0",
"size": 13419
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 416,686 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<RoleInstanceViewInner> getInstanceViewAsync(
String roleInstanceName, String resourceGroupName, String cloudServiceName) {
return getInstanceViewWithResponseAsync(roleInstanceName, resourceGroupName, cloudServiceName)
.flatMap(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<RoleInstanceViewInner> function( String roleInstanceName, String resourceGroupName, String cloudServiceName) { return getInstanceViewWithResponseAsync(roleInstanceName, resourceGroupName, cloudServiceName) .flatMap( (Response<RoleInstanceViewInner> res) -> { if (res.getV... | /**
* Retrieves information about the run-time state of a role instance in a cloud service.
*
* @param roleInstanceName Name of the role instance.
* @param resourceGroupName The resourceGroupName parameter.
* @param cloudServiceName The cloudServiceName parameter.
* @throws IllegalArgument... | Retrieves information about the run-time state of a role instance in a cloud service | getInstanceViewAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CloudServiceRoleInstancesClientImpl.java",
"license": "mit",
"size": 109969
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.compute.fluent.models.RoleInstanceViewInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.compute.fluent.models.RoleInstanceViewInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 430,116 |
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class)
public void activation(Integer user, LikeCommentsEntity entity) {
activation(user, entity.getNo());
} | @Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) void function(Integer user, LikeCommentsEntity entity) { activation(user, entity.getNo()); } | /**
* Ativation.
* if delete flag is exists and delete flag is true, delete flug is false to activate.
* set saved user id.
* @param user saved userid
* @param entity entity
*/ | Ativation. if delete flag is exists and delete flag is true, delete flug is false to activate. set saved user id | activation | {
"repo_name": "support-project/knowledge",
"path": "src/main/java/org/support/project/knowledge/dao/gen/GenLikeCommentsDao.java",
"license": "apache-2.0",
"size": 16777
} | [
"org.support.project.aop.Aspect",
"org.support.project.knowledge.entity.LikeCommentsEntity"
] | import org.support.project.aop.Aspect; import org.support.project.knowledge.entity.LikeCommentsEntity; | import org.support.project.aop.*; import org.support.project.knowledge.entity.*; | [
"org.support.project"
] | org.support.project; | 1,450,166 |
public boolean intersect(final AbstractListPoint2D listPoints) {
if (listPoints == null)
return false;
if (!(listPoints instanceof ArrayListPackedPoint2D))
return super.intersect(listPoints);
final ArrayListPackedPoint2D list = (ArrayListPackedPoint2D) listPoints;
final ArrayList<Long>... | boolean function(final AbstractListPoint2D listPoints) { if (listPoints == null) return false; if (!(listPoints instanceof ArrayListPackedPoint2D)) return super.intersect(listPoints); final ArrayListPackedPoint2D list = (ArrayListPackedPoint2D) listPoints; final ArrayList<Long> l1 = this.values; final ArrayList<Long> l... | /**
* Test if two list of point contains one or more points in common.
* @param listPoints List to test
* @return true if the two list of point contains one or more points in common
*/ | Test if two list of point contains one or more points in common | intersect | {
"repo_name": "GenomicParisCentre/corsen",
"path": "src/main/java/fr/ens/transcriptome/corsen/model/ArrayListPackedPoint2D.java",
"license": "gpl-2.0",
"size": 11269
} | [
"fr.ens.transcriptome.corsen.util.Util",
"java.util.ArrayList"
] | import fr.ens.transcriptome.corsen.util.Util; import java.util.ArrayList; | import fr.ens.transcriptome.corsen.util.*; import java.util.*; | [
"fr.ens.transcriptome",
"java.util"
] | fr.ens.transcriptome; java.util; | 735,584 |
private List<String> getArtifactRow(Entry<BlackboardArtifact, List<BlackboardAttribute>> entry, TableReportModule module) throws TskCoreException {
Map<Integer, String> attributes = getMappedAttributes(entry.getValue(), module);
BlackboardArtifact.ARTIFACT_TYPE type = BlackboardArtifact.ART... | List<String> function(Entry<BlackboardArtifact, List<BlackboardAttribute>> entry, TableReportModule module) throws TskCoreException { Map<Integer, String> attributes = getMappedAttributes(entry.getValue(), module); BlackboardArtifact.ARTIFACT_TYPE type = BlackboardArtifact.ARTIFACT_TYPE.fromID(entry.getKey().getArtifac... | /**
* Get a list of Strings with all the row values for a given BlackboardArtifact and
* list of BlackboardAttributes Entry, basing the date/time field on the given TableReportModule.
*
* @param entry BlackboardArtifact and list of BlackboardAttributes
* @param module TableReportModule for wh... | Get a list of Strings with all the row values for a given BlackboardArtifact and list of BlackboardAttributes Entry, basing the date/time field on the given TableReportModule | getArtifactRow | {
"repo_name": "kefir-/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java",
"license": "apache-2.0",
"size": 63757
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.sleuthkit.datamodel.AbstractFile",
"org.sleuthkit.datamodel.BlackboardArtifact",
"org.sleuthkit.datamodel.BlackboardAttribute",
"org.sleuthkit.datamodel.TskCoreException"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.TskCoreException; | import java.util.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.datamodel; | 1,109,675 |
public synchronized OutputStream open() throws IOException {
logger.debug("attempting to transition from " + state + " -> OPEN for "
+ this);
switch (state) {
case NEW:
state = State.OPEN;
return fileSystem.create(openPath);
default:
state = State.INVALID;
throw ne... | synchronized OutputStream function() throws IOException { logger.debug(STR + state + STR + this); switch (state) { case NEW: state = State.OPEN; return fileSystem.create(openPath); default: state = State.INVALID; throw new IllegalStateException(STR + state + STR); } } | /**
* Opens a file for write.
*
* @return An {@link OutputStream} for writing data.
* @throws IOException
*/ | Opens a file for write | open | {
"repo_name": "cloudera/flume",
"path": "flume-core/src/main/java/com/cloudera/util/PathManager.java",
"license": "apache-2.0",
"size": 6017
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 98,359 |
//-------------------------------------------------------------------------
protected long extractRowId(final UniqueId id) {
try {
return Long.parseLong(id.getValue()) + Long.parseLong(id.getVersion());
} catch (NumberFormatException ex) {
throw new IllegalArgumentException("UniqueId is not fro... | long function(final UniqueId id) { try { return Long.parseLong(id.getValue()) + Long.parseLong(id.getVersion()); } catch (NumberFormatException ex) { throw new IllegalArgumentException(STR + id, ex); } } | /**
* Extracts the security row id.
* @param id the identifier to extract from, not null
* @return the extracted row id
*/ | Extracts the security row id | extractRowId | {
"repo_name": "DevStreet/FinanceAnalytics",
"path": "projects/OG-MasterDB/src/main/java/com/opengamma/masterdb/security/hibernate/HibernateSecurityMasterSession.java",
"license": "apache-2.0",
"size": 28703
} | [
"com.opengamma.id.UniqueId"
] | import com.opengamma.id.UniqueId; | import com.opengamma.id.*; | [
"com.opengamma.id"
] | com.opengamma.id; | 2,034,381 |
CompletableFuture<SchemaVersion> deleteSchema(); | CompletableFuture<SchemaVersion> deleteSchema(); | /**
* Delete the schema if this topic has a schema defined for it.
*/ | Delete the schema if this topic has a schema defined for it | deleteSchema | {
"repo_name": "yahoo/pulsar",
"path": "pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Topic.java",
"license": "apache-2.0",
"size": 9115
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.pulsar.common.protocol.schema.SchemaVersion"
] | import java.util.concurrent.CompletableFuture; import org.apache.pulsar.common.protocol.schema.SchemaVersion; | import java.util.concurrent.*; import org.apache.pulsar.common.protocol.schema.*; | [
"java.util",
"org.apache.pulsar"
] | java.util; org.apache.pulsar; | 2,273,423 |
@Test
public void testAppendFileAfterRenameInSnapshot() throws Exception {
final Path test = new Path("/test");
final Path foo = new Path(test, "foo");
final Path bar = new Path(foo, "bar");
DFSTestUtil.createFile(hdfs, bar, BLOCKSIZE, REPL, SEED);
SnapshotTestHelper.createSnapshot(hdfs, test, "... | void function() throws Exception { final Path test = new Path("/test"); final Path foo = new Path(test, "foo"); final Path bar = new Path(foo, "bar"); DFSTestUtil.createFile(hdfs, bar, BLOCKSIZE, REPL, SEED); SnapshotTestHelper.createSnapshot(hdfs, test, "s0"); final Path bar2 = new Path(foo, "bar2"); hdfs.rename(bar, ... | /**
* Similar with testRenameUCFileInSnapshot, but do renaming first and then
* append file without closing it. Unit test for HDFS-5425.
*/ | Similar with testRenameUCFileInSnapshot, but do renaming first and then append file without closing it. Unit test for HDFS-5425 | testAppendFileAfterRenameInSnapshot | {
"repo_name": "dilaver/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestRenameWithSnapshots.java",
"license": "apache-2.0",
"size": 96673
} | [
"java.util.EnumSet",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.DFSOutputStream",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apache.hadoop.hdfs.client.HdfsDataOutputStream"
] | import java.util.EnumSet; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSOutputStream; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.client.HdfsDataOutputStream; | import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.client.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,244,545 |
public boolean login() throws LoginException {
// prompt for a user name and password
if (callbackHandler == null)
{throw new LoginException("Error: no CallbackHandler available "
+ "to garner authentication information from the user");}
final Callback[] callbacks = new Callback[2];
callbacks[0] = ... | boolean function() throws LoginException { if (callbackHandler == null) {throw new LoginException(STR + STR);} final Callback[] callbacks = new Callback[2]; callbacks[0] = new NameCallback(STR); callbacks[1] = new PasswordCallback(STR, false); String username; char[] password; try { callbackHandler.handle(callbacks); u... | /**
* Authenticate the user by prompting for a user name and password.
*
* <p>
*
* @return true in all cases since this <code>LoginModule</code> should not
* be ignored.
*
* @exception FailedLoginException
* if the authentication fails.
* <p>
*
* @except... | Authenticate the user by prompting for a user name and password. | login | {
"repo_name": "shabanovd/exist",
"path": "src/org/exist/security/internal/EXistDBLoginModule.java",
"license": "lgpl-2.1",
"size": 8284
} | [
"javax.security.auth.callback.Callback",
"javax.security.auth.callback.NameCallback",
"javax.security.auth.callback.PasswordCallback",
"javax.security.auth.callback.UnsupportedCallbackException",
"javax.security.auth.login.FailedLoginException",
"javax.security.auth.login.LoginException",
"org.exist.EXi... | import javax.security.auth.callback.Callback; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.FailedLoginException; import javax.security.auth.login.LoginException; ... | import javax.security.auth.callback.*; import javax.security.auth.login.*; import org.exist.*; import org.exist.security.*; import org.exist.storage.*; | [
"javax.security",
"org.exist",
"org.exist.security",
"org.exist.storage"
] | javax.security; org.exist; org.exist.security; org.exist.storage; | 1,502,789 |
private void sortAlbumsByLastUpdate() {
Collections.sort(this.albums, new AlbumComparator(AlbumField.LAST_UPDATE));
this.setAlbums(this.albums, true);
} | void function() { Collections.sort(this.albums, new AlbumComparator(AlbumField.LAST_UPDATE)); this.setAlbums(this.albums, true); } | /**
* Sort albums by the date of last update.
*/ | Sort albums by the date of last update | sortAlbumsByLastUpdate | {
"repo_name": "abraao/FastPicasaBrowser",
"path": "src/com/guaranacode/android/fastpicasabrowser/activities/FastPicasaBrowserActivity.java",
"license": "gpl-3.0",
"size": 10828
} | [
"com.guaranacode.android.fastpicasabrowser.util.AlbumComparator",
"java.util.Collections"
] | import com.guaranacode.android.fastpicasabrowser.util.AlbumComparator; import java.util.Collections; | import com.guaranacode.android.fastpicasabrowser.util.*; import java.util.*; | [
"com.guaranacode.android",
"java.util"
] | com.guaranacode.android; java.util; | 1,039,681 |
public static ImageReader getImageReader() {
try {
return get(BOOT_MODULES_JIMAGE);
} catch (IOException ioe) {
throw new UncheckedIOException(ioe);
}
} | static ImageReader function() { try { return get(BOOT_MODULES_JIMAGE); } catch (IOException ioe) { throw new UncheckedIOException(ioe); } } | /**
* Returns the {@code ImageReader} to read the image file in this
* run-time image.
*
* @throws UncheckedIOException if an I/O error occurs
*/ | Returns the ImageReader to read the image file in this run-time image | getImageReader | {
"repo_name": "universsky/openjdk",
"path": "jdk/src/java.base/share/classes/jdk/internal/jimage/ImageReaderFactory.java",
"license": "gpl-2.0",
"size": 2799
} | [
"java.io.IOException",
"java.io.UncheckedIOException"
] | import java.io.IOException; import java.io.UncheckedIOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,534,829 |
private List<SingleTaskOrder> getSingleTaskOrderQueueRaw() {
return this.singleTaskOrderQueue;
}
| List<SingleTaskOrder> function() { return this.singleTaskOrderQueue; } | /**
* Return the internal singleTaskOrderQueue of this SchedulerContext;
*
* @return the internal singleTaskOrderQueue of this SchedulerContext
*/ | Return the internal singleTaskOrderQueue of this SchedulerContext | getSingleTaskOrderQueueRaw | {
"repo_name": "BeardedPlatypus/SWOP-Groep17",
"path": "src/domain/production_schedule/SchedulerContext.java",
"license": "lgpl-3.0",
"size": 16807
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 388,533 |
public interface Interceptor {
public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException; | interface Interceptor { public boolean function(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException; | /**
* Called just before an object is initialized. The interceptor may change the <tt>state</tt>, which will
* be propagated to the persistent object. Note that when this method is called, <tt>entity</tt> will be
* an empty uninitialized instance of the class.
* <p/>
* NOTE: The indexes across the <tt>state</... | Called just before an object is initialized. The interceptor may change the state, which will be propagated to the persistent object. Note that when this method is called, entity will be an empty uninitialized instance of the class. | onLoad | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/Interceptor.java",
"license": "lgpl-2.1",
"size": 11893
} | [
"java.io.Serializable",
"org.hibernate.type.Type"
] | import java.io.Serializable; import org.hibernate.type.Type; | import java.io.*; import org.hibernate.type.*; | [
"java.io",
"org.hibernate.type"
] | java.io; org.hibernate.type; | 819,887 |
@Test
public void testNotificationDelay() throws InterruptedException {
ExecutorService tp1 = Executors.newFixedThreadPool(1);
ExecutorService tp2 = Executors.newFixedThreadPool(1);
try {
int n = 10;
for (int i = 0; i < n; i++) {
final CountDownLat... | void function() throws InterruptedException { ExecutorService tp1 = Executors.newFixedThreadPool(1); ExecutorService tp2 = Executors.newFixedThreadPool(1); try { int n = 10; for (int i = 0; i < n; i++) { final CountDownLatch firstOnNext = new CountDownLatch(1); final CountDownLatch onNextCount = new CountDownLatch(2); ... | /**
* Test that a notification does not get delayed in the queue waiting for the next event to push it through.
*
* @throws InterruptedException
*/ | Test that a notification does not get delayed in the queue waiting for the next event to push it through | testNotificationDelay | {
"repo_name": "srvaroa/RxJava",
"path": "rxjava-core/src/test/java/rx/observers/SerializedObserverTest.java",
"license": "apache-2.0",
"size": 32448
} | [
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Executors"
] | import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,033,715 |
EReference getComplexBehaviorDefinition_Event(); | EReference getComplexBehaviorDefinition_Event(); | /**
* Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.ComplexBehaviorDefinition#getEvent <em>Event</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Event</em>'.
* @see org.eclipse.bpmn2.ComplexBehaviorDefinit... | Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.ComplexBehaviorDefinition#getEvent Event</code>'. | getComplexBehaviorDefinition_Event | {
"repo_name": "Rikkola/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 929298
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,124,153 |
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("data/{identifier : .+}")
public Response handlePostRequest(@PathParam("identifier") String uriString,
InputStream stream) {
log.debug("handlePostRequest: {}", uriSt... | @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Path(STR) Response function(@PathParam(STR) String uriString, InputStream stream) { log.debug(STR, uriString); try { ObjectNode rootNode = (ObjectNode) mapper().readTree(stream); service.runPostOperationOnDataResource(uriString, rootNode); ret... | /**
* Handles a RESTCONF POST operation against a data resource. If the
* operation is successful, HTTP status code "201 Created" is returned
* and there is no response message-body. If the data resource already
* exists, then the HTTP status code "409 Conflict" is returned.
*
* @param uri... | Handles a RESTCONF POST operation against a data resource. If the operation is successful, HTTP status code "201 Created" is returned and there is no response message-body. If the data resource already exists, then the HTTP status code "409 Conflict" is returned | handlePostRequest | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/restconf/server/rpp/src/main/java/org/onosproject/protocol/restconf/server/rpp/RestconfWebResource.java",
"license": "apache-2.0",
"size": 10479
} | [
"com.fasterxml.jackson.core.JsonProcessingException",
"com.fasterxml.jackson.databind.node.ObjectNode",
"java.io.IOException",
"java.io.InputStream",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Respons... | import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.IOException; import java.io.InputStream; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; im... | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.node.*; import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.protocol.restconf.server.api.*; | [
"com.fasterxml.jackson",
"java.io",
"javax.ws",
"org.onosproject.protocol"
] | com.fasterxml.jackson; java.io; javax.ws; org.onosproject.protocol; | 1,298,510 |
public static String getEnclosedDN(String dnValue) {
if (dnValue == null || dnValue.equals("")) {
return dnValue;
}
if (dnPattern == null) {
dnPattern = Pattern.compile("([^\\\\]=)([^\"]*?[^\\\\])(,|$)");
}
Matcher matcher = dnPattern.matcher(dnValue... | static String function(String dnValue) { if (dnValue == null dnValue.equals(STR([^\\\\]=)([^\STR); } Matcher matcher = dnPattern.matcher(dnValue); dnValue = matcher.replaceAll("$1\"$2\"$3"); dnValue = dnValue.replace("\\,", ","); return dnValue; } private static Pattern dnPattern; | /**
* Encloses DN values with "
*
* @param dnValue the unenclosed value of a DN (e.g. ou=Jive Software\, Inc,dc=support,dc=jive,dc=com)
* @return String the enclosed value of the DN (e.g. ou="Jive Software\, Inc",dc="support",dc="jive",dc="com")
*/ | Encloses DN values with " | getEnclosedDN | {
"repo_name": "wudingli/openfire",
"path": "src/java/org/jivesoftware/openfire/ldap/LdapManager.java",
"license": "apache-2.0",
"size": 89962
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,073,583 |
public static int calculateScrollableHeightDependOnChildren(@NonNull final Context context, int amount, int dimenResId)
{
int height =0;
Resources resources= context.getResources();
double densityFactor = GuiUtils.getDeviceDensityFactor(context);
height += (int) (amount + 0.2) *... | static int function(@NonNull final Context context, int amount, int dimenResId) { int height =0; Resources resources= context.getResources(); double densityFactor = GuiUtils.getDeviceDensityFactor(context); height += (int) (amount + 0.2) * (resources.getDimension(dimenResId) + densityFactor + 1); return height; } | /**
* calculate the needed height of a listview (or any other view), which is need to display all the children
*
* @param amount of the shown views
* @param context of the listview
* @param dimenResId of the height of one list item
*
* @return listview/RecyclerView height as int
... | calculate the needed height of a listview (or any other view), which is need to display all the children | calculateScrollableHeightDependOnChildren | {
"repo_name": "flowolf86/AndroidSwipeToDelete",
"path": "app/src/main/java/com/flowolf86/androidswipetodelete/util/GuiUtils.java",
"license": "apache-2.0",
"size": 3300
} | [
"android.content.Context",
"android.content.res.Resources",
"android.support.annotation.NonNull"
] | import android.content.Context; import android.content.res.Resources; import android.support.annotation.NonNull; | import android.content.*; import android.content.res.*; import android.support.annotation.*; | [
"android.content",
"android.support"
] | android.content; android.support; | 1,351,542 |
public List<Arc> getOutArcs(){
return item.getOutArcs();
}
| List<Arc> function(){ return item.getOutArcs(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getOutArcs | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/hlcorestructure/hlapi/RefPlaceHLAPI.java",
"license": "epl-1.0",
"size": 12993
} | [
"fr.lip6.move.pnml.symmetricnet.hlcorestructure.Arc",
"java.util.List"
] | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.Arc; import java.util.List; | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 763,654 |
private void initializeServices() {
ServiceLoader<CacheService> loader = ServiceLoader.load(CacheService.class);
for (CacheService service : loader) {
service.init(this);
this.services.put(service.getInterface(), service);
this.system.handleResourceEvent(ResourceEvent.CACHE_SERVICE_CREATE, s... | void function() { ServiceLoader<CacheService> loader = ServiceLoader.load(CacheService.class); for (CacheService service : loader) { service.init(this); this.services.put(service.getInterface(), service); this.system.handleResourceEvent(ResourceEvent.CACHE_SERVICE_CREATE, service); logger.info(STR, service.getClass().g... | /**
* Initialize any services that provided as extensions to the cache using the service loader
* mechanism.
*/ | Initialize any services that provided as extensions to the cache using the service loader mechanism | initializeServices | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java",
"license": "apache-2.0",
"size": 187237
} | [
"java.util.ServiceLoader",
"org.apache.geode.distributed.internal.ResourceEvent"
] | import java.util.ServiceLoader; import org.apache.geode.distributed.internal.ResourceEvent; | import java.util.*; import org.apache.geode.distributed.internal.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 1,349,488 |
public boolean check(Logger logger, Document doc) {
logger.fine("checking " + doc.getId());
boolean result = true;
for (Entity entity : doc.getEntities())
result = check(logger, entity) && result;
for (Event event : doc.getEvents())
result = check(logger, event) && result;
return result;
}
| boolean function(Logger logger, Document doc) { logger.fine(STR + doc.getId()); boolean result = true; for (Entity entity : doc.getEntities()) result = check(logger, entity) && result; for (Event event : doc.getEvents()) result = check(logger, event) && result; return result; } | /**
* Checks the validity of the specified document.
* @param logger
* @param doc
*/ | Checks the validity of the specified document | check | {
"repo_name": "Bibliome/bibliome-java-utils",
"path": "src/main/java/fr/inra/maiage/bibliome/util/genia/Schema.java",
"license": "apache-2.0",
"size": 4600
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,350,211 |
protected void createContainedModelElement(FigGroup fg, InputEvent me) {
// must be overridden to make sense
// (I didn't want to make it abstract because it might not be required)
}
| void function(FigGroup fg, InputEvent me) { } | /**
* Create a new model element contained in the fig owner.
* Used by subclasses to, for example, create an attribute
* within a class.
*
* @param fg The fig group to which this applies
* @param me The input event that triggered us. In the current
* implementation a... | Create a new model element contained in the fig owner. Used by subclasses to, for example, create an attribute within a class | createContainedModelElement | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/argouml_diagrams/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java",
"license": "gpl-3.0",
"size": 92897
} | [
"java.awt.event.InputEvent",
"org.tigris.gef.presentation.FigGroup"
] | import java.awt.event.InputEvent; import org.tigris.gef.presentation.FigGroup; | import java.awt.event.*; import org.tigris.gef.presentation.*; | [
"java.awt",
"org.tigris.gef"
] | java.awt; org.tigris.gef; | 2,059,427 |
@SuppressWarnings("unchecked")
protected <T> T getValue(Object object, Class<T> retClass) throws QuickFixException {
return (T) object;
} | @SuppressWarnings(STR) <T> T function(Object object, Class<T> retClass) throws QuickFixException { return (T) object; } | /**
* Read a value. Usually, this will be returned by an Answer and/or may
* contain nested Answers.
*
* @param object
* the parsed json representation
* @param retClass
* the expected type of the value
* @return the value
* @throws QuickFixException
... | Read a value. Usually, this will be returned by an Answer and/or may contain nested Answers | getValue | {
"repo_name": "lcnbala/aura",
"path": "aura-impl/src/main/java/org/auraframework/impl/javascript/testsuite/JavascriptMockHandler.java",
"license": "apache-2.0",
"size": 11901
} | [
"org.auraframework.throwable.quickfix.QuickFixException"
] | import org.auraframework.throwable.quickfix.QuickFixException; | import org.auraframework.throwable.quickfix.*; | [
"org.auraframework.throwable"
] | org.auraframework.throwable; | 448,423 |
public void addListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.addListener(notifyChangedListener);
} | void function(INotifyChangedListener notifyChangedListener) { changeNotifier.addListener(notifyChangedListener); } | /**
* This adds a listener.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | This adds a listener. | addListener | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/operations/semantic/provider/SemanticItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 5816
} | [
"org.eclipse.emf.edit.provider.INotifyChangedListener"
] | import org.eclipse.emf.edit.provider.INotifyChangedListener; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,421,950 |
private boolean isPageRestorable(HttpServletRequest request)
{
if (TITLE_PANEL.equals(request.getParameter(PANEL))) return false;
String pathInfo = request.getPathInfo();
if (pathInfo != null)
{
if (request.getPathInfo().endsWith(".gif"))
{
return false;
}
if (request.getPathInfo().endsWith... | boolean function(HttpServletRequest request) { if (TITLE_PANEL.equals(request.getParameter(PANEL))) return false; String pathInfo = request.getPathInfo(); if (pathInfo != null) { if (request.getPathInfo().endsWith(".gif")) { return false; } if (request.getPathInfo().endsWith(".src")) { return false; } } if ("GET".equal... | /**
* Check to see if the request represents a page that can act as a restor
* point.
*
* @param request
* @return true if it is possible to restore to this point.
*/ | Check to see if the request represents a page that can act as a restor point | isPageRestorable | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "search/search-tool/tool/src/java/org/sakaiproject/search/tool/ControllerServlet2.java",
"license": "apache-2.0",
"size": 12373
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,340,821 |
@Override
public boolean open(ColumnsSchemaNegotiator schemaNegotiator) {
final OperatorContext context = schemaNegotiator.context();
dfs = schemaNegotiator.fileSystem();
split = schemaNegotiator.split();
// Note: DO NOT use managed buffers here. They remain in existence
// until the fragment i... | boolean function(ColumnsSchemaNegotiator schemaNegotiator) { final OperatorContext context = schemaNegotiator.context(); dfs = schemaNegotiator.fileSystem(); split = schemaNegotiator.split(); readBuffer = context.getAllocator().buffer(READ_BUFFER); whitespaceBuffer = context.getAllocator().buffer(WHITE_SPACE_BUFFER); s... | /**
* Performs the initial setup required for the record reader.
* Initializes the input stream, handling of the output record batch
* and the actual reader to be used.
* @param errorContext operator context from which buffer's will be allocated and managed
* @param outputMutator Used to create the sch... | Performs the initial setup required for the record reader. Initializes the input stream, handling of the output record batch and the actual reader to be used | open | {
"repo_name": "Ben-Zvi/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/reader/CompliantTextBatchReader.java",
"license": "apache-2.0",
"size": 9518
} | [
"java.io.IOException",
"org.apache.drill.common.exceptions.UserException",
"org.apache.drill.exec.ops.OperatorContext",
"org.apache.drill.exec.physical.impl.scan.columns.ColumnsSchemaNegotiator"
] | import java.io.IOException; import org.apache.drill.common.exceptions.UserException; import org.apache.drill.exec.ops.OperatorContext; import org.apache.drill.exec.physical.impl.scan.columns.ColumnsSchemaNegotiator; | import java.io.*; import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.ops.*; import org.apache.drill.exec.physical.impl.scan.columns.*; | [
"java.io",
"org.apache.drill"
] | java.io; org.apache.drill; | 1,357,350 |
public IplImage getInputImage() {
return getImage(inputFilterName);
} | IplImage function() { return getImage(inputFilterName); } | /**
* get the original "camera" image - or the image which started the pipeline
*
* @return
*/ | get the original "camera" image - or the image which started the pipeline | getInputImage | {
"repo_name": "DarkRebel/myrobotlab",
"path": "src/org/myrobotlab/opencv/OpenCVData.java",
"license": "apache-2.0",
"size": 17818
} | [
"com.googlecode.javacv.cpp.opencv_core.IplImage"
] | import com.googlecode.javacv.cpp.opencv_core.IplImage; | import com.googlecode.javacv.cpp.opencv_core.*; | [
"com.googlecode.javacv"
] | com.googlecode.javacv; | 1,507,708 |
public void addDeclaration(final DeclarationCollector declarationCollector) {
Reference reference = declarationCollector.getReference();
Identifier identifier = reference.getId();
if (singularImportedSymbols_map.containsKey(identifier.getName())) {
Module tempModule = singularImportedSymbols_map.get(identif... | void function(final DeclarationCollector declarationCollector) { Reference reference = declarationCollector.getReference(); Identifier identifier = reference.getId(); if (singularImportedSymbols_map.containsKey(identifier.getName())) { Module tempModule = singularImportedSymbols_map.get(identifier.getName()); tempModul... | /**
* Searches for elements that could be referred to be the provided
* reference, and if found, they are added to the declaration collector.
* <p>
*
* @see DeclarationCollector
* @param declarationCollector
* the declaration collector folding the reference and
* collectin... | Searches for elements that could be referred to be the provided reference, and if found, they are added to the declaration collector. | addDeclaration | {
"repo_name": "eroslevi/titan.EclipsePlug-ins",
"path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/ASN1/definitions/Imports.java",
"license": "epl-1.0",
"size": 12481
} | [
"org.eclipse.titan.designer.AST",
"org.eclipse.titan.designer.editors.actions.DeclarationCollector"
] | import org.eclipse.titan.designer.AST; import org.eclipse.titan.designer.editors.actions.DeclarationCollector; | import org.eclipse.titan.designer.*; import org.eclipse.titan.designer.editors.actions.*; | [
"org.eclipse.titan"
] | org.eclipse.titan; | 2,366,198 |
public Self withResponseInterceptors(final Collection<GenericResponseInterceptor<Input, Output>> responseInterceptors) {
this.responseInterceptors = responseInterceptors;
return (Self) this;
} | Self function(final Collection<GenericResponseInterceptor<Input, Output>> responseInterceptors) { this.responseInterceptors = responseInterceptors; return (Self) this; } | /**
* Add multiple response interceptors to BaseRequestDispatcher.
* @param responseInterceptors collection of response interceptors.
* @return {@link Builder}.
*/ | Add multiple response interceptors to BaseRequestDispatcher | withResponseInterceptors | {
"repo_name": "amzn/alexa-skills-kit-java",
"path": "ask-sdk-runtime/src/com/amazon/ask/request/dispatcher/impl/BaseRequestDispatcher.java",
"license": "apache-2.0",
"size": 16647
} | [
"com.amazon.ask.request.interceptor.GenericResponseInterceptor",
"java.util.Collection"
] | import com.amazon.ask.request.interceptor.GenericResponseInterceptor; import java.util.Collection; | import com.amazon.ask.request.interceptor.*; import java.util.*; | [
"com.amazon.ask",
"java.util"
] | com.amazon.ask; java.util; | 2,243,581 |
public void testPartialKeyInPRSingleHop() throws CacheException, InterruptedException {
final String title = "testPartialKeyInPRSingleHop_";
final int cacheWriterAllowedKeyNum = 16;
int client1Size;
int client2Size;
int server1Size;
int server2Size;
// disconnectAllFromDS();
final Hos... | void function() throws CacheException, InterruptedException { final String title = STR; final int cacheWriterAllowedKeyNum = 16; int client1Size; int client2Size; int server1Size; int server2Size; final Host host = Host.getHost(0); final VM server1 = host.getVM(0); final VM server2 = host.getVM(1); final VM client1 = h... | /**
* Tests partial key putAll to 2 PR servers, because putting data at server
* side is different between PR and LR. PR does it in postPutAll.
* This is a singlehop putAll test.
*/ | Tests partial key putAll to 2 PR servers, because putting data at server side is different between PR and LR. PR does it in postPutAll. This is a singlehop putAll test | testPartialKeyInPRSingleHop | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java",
"license": "apache-2.0",
"size": 119637
} | [
"com.gemstone.gemfire.cache.CacheException",
"com.gemstone.gemfire.internal.AvailablePort"
] | import com.gemstone.gemfire.cache.CacheException; import com.gemstone.gemfire.internal.AvailablePort; | import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 120,113 |
@CLIResolver
public static AbstractItem resolveForCLI(
@Argument(required=true,metaVar="NAME",usage="Job name") String name) throws CmdLineException {
// TODO can this (and its pseudo-override in AbstractProject) share code with GenericItemOptionHandler, used for explicit CLICommand’s rather... | static AbstractItem function( @Argument(required=true,metaVar="NAME",usage=STR) String name) throws CmdLineException { AbstractItem item = Jenkins.getInstance().getItemByFullName(name, AbstractItem.class); if (item==null) { AbstractProject project = AbstractProject.findNearest(name); throw new CmdLineException(null, pr... | /**
* Used for CLI binding.
*/ | Used for CLI binding | resolveForCLI | {
"repo_name": "FarmGeek4Life/jenkins",
"path": "core/src/main/java/hudson/model/AbstractItem.java",
"license": "mit",
"size": 28649
} | [
"hudson.util.AlternativeUiTextProvider",
"org.kohsuke.args4j.Argument",
"org.kohsuke.args4j.CmdLineException"
] | import hudson.util.AlternativeUiTextProvider; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException; | import hudson.util.*; import org.kohsuke.args4j.*; | [
"hudson.util",
"org.kohsuke.args4j"
] | hudson.util; org.kohsuke.args4j; | 409,051 |
///////////////////////////////////////////////////////////////
//
// UTILITIES
//
///////////////////////////////////////////////////////////////
private ResultColumn getColumnReference(ResultColumn targetRC,
DataDictionary dd)
throws StandardException
{
ColumnReference tmpColumnRef;
ResultCol... | ResultColumn function(ResultColumn targetRC, DataDictionary dd) throws StandardException { ColumnReference tmpColumnRef; ResultColumn newRC; tmpColumnRef = new ColumnReference(targetRC.getName(), null, getContextManager()); tmpColumnRef.setSource(targetRC); tmpColumnRef.setNestingLevel(this.getLevel()); tmpColumnRef.se... | /**
* Method for creating a new result column referencing
* the one passed in.
*
* @param targetRC the source
* @param dd
*
* @return the new result column
*
* @exception StandardException on error
*/ | Method for creating a new result column referencing the one passed in | getColumnReference | {
"repo_name": "trejkaz/derby",
"path": "java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java",
"license": "apache-2.0",
"size": 43659
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.sql.dictionary.DataDictionary"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.sql.dictionary.DataDictionary; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.sql.dictionary.*; | [
"org.apache.derby"
] | org.apache.derby; | 2,796,230 |
private final boolean testPattern(String expression, String sampleContentType, boolean expectedToMatch) {
if(expression != null && expression.length() > 0) {
if(log.isDebugEnabled()) {
log.debug("Testing Expression : " + expression + " on sampleContentType:"+sampleContentType+", ... | final boolean function(String expression, String sampleContentType, boolean expectedToMatch) { if(expression != null && expression.length() > 0) { if(log.isDebugEnabled()) { log.debug(STR + expression + STR+sampleContentType+STR+expectedToMatch); } Pattern pattern = null; try { pattern = JMeterUtils.getPatternCache().g... | /**
* Returns true if matching pattern was different from expectedToMatch
* @param expression Expression to match
* @param sampleContentType
* @return boolean true if Matching expression
*/ | Returns true if matching pattern was different from expectedToMatch | testPattern | {
"repo_name": "ThiagoGarciaAlves/jmeter",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java",
"license": "apache-2.0",
"size": 64785
} | [
"org.apache.jmeter.gui.tree.JMeterTreeModel",
"org.apache.jmeter.gui.tree.JMeterTreeNode",
"org.apache.jmeter.protocol.http.control.AuthManager",
"org.apache.jmeter.protocol.http.control.Authorization",
"org.apache.jmeter.util.JMeterUtils",
"org.apache.oro.text.MalformedCachePatternException",
"org.apac... | import org.apache.jmeter.gui.tree.JMeterTreeModel; import org.apache.jmeter.gui.tree.JMeterTreeNode; import org.apache.jmeter.protocol.http.control.AuthManager; import org.apache.jmeter.protocol.http.control.Authorization; import org.apache.jmeter.util.JMeterUtils; import org.apache.oro.text.MalformedCachePatternExcept... | import org.apache.jmeter.gui.tree.*; import org.apache.jmeter.protocol.http.control.*; import org.apache.jmeter.util.*; import org.apache.oro.text.*; import org.apache.oro.text.regex.*; | [
"org.apache.jmeter",
"org.apache.oro"
] | org.apache.jmeter; org.apache.oro; | 196,473 |
protected static List<Statistics> getFsStatistics(Path path, Configuration conf) throws IOException {
List<Statistics> matchedStats = new ArrayList<FileSystem.Statistics>();
path = path.getFileSystem(conf).makeQualified(path);
String scheme = path.toUri().getScheme();
for (Statistics stats : FileSyste... | static List<Statistics> function(Path path, Configuration conf) throws IOException { List<Statistics> matchedStats = new ArrayList<FileSystem.Statistics>(); path = path.getFileSystem(conf).makeQualified(path); String scheme = path.toUri().getScheme(); for (Statistics stats : FileSystem.getAllStatistics()) { if (stats.g... | /**
* Gets a handle to the Statistics instance based on the scheme associated
* with path.
*
* @param path the path.
* @param conf the configuration to extract the scheme from if not part of
* the path.
* @return a Statistics instance, or null if none is found for the scheme.
*/ | Gets a handle to the Statistics instance based on the scheme associated with path | getFsStatistics | {
"repo_name": "NJUJYB/disYarn",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java",
"license": "apache-2.0",
"size": 61372
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,370,851 |
public void waitForLocallyCompleted() throws ForeignException, InterruptedException {
Procedure.waitForLatch(releasedLocalBarrier, monitor, wakeFrequency,
barrierName + ":completed");
}
public static class SubprocedureImpl extends Subprocedure {
public SubprocedureImpl(ProcedureMember member,... | void function() throws ForeignException, InterruptedException { Procedure.waitForLatch(releasedLocalBarrier, monitor, wakeFrequency, barrierName + STR); } public static class SubprocedureImpl extends Subprocedure { public SubprocedureImpl(ProcedureMember member, String opName, ForeignExceptionDispatcher monitor, long w... | /**
* Waits until the entire procedure has globally completed, or has been aborted.
* @throws ForeignException
* @throws InterruptedException
*/ | Waits until the entire procedure has globally completed, or has been aborted | waitForLocallyCompleted | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java",
"license": "apache-2.0",
"size": 12949
} | [
"org.apache.hadoop.hbase.errorhandling.ForeignException",
"org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher"
] | import org.apache.hadoop.hbase.errorhandling.ForeignException; import org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher; | import org.apache.hadoop.hbase.errorhandling.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,880,089 |
public ArrayList<Vec4d> clipPolygon(ArrayList<Vec4d> verts) {
updateFrustum();
ArrayList<Vec4d> input = verts;
ArrayList<Vec4d> output = null;
assert(_frustum.length == 4);
for (Plane p : _frustum) {
output = new ArrayList<>();
for (int i = 0; i < input.size(); ++i) {
Vec4d start = input.get(i);
Vec4d e... | ArrayList<Vec4d> function(ArrayList<Vec4d> verts) { updateFrustum(); ArrayList<Vec4d> input = verts; ArrayList<Vec4d> output = null; assert(_frustum.length == 4); for (Plane p : _frustum) { output = new ArrayList<>(); for (int i = 0; i < input.size(); ++i) { Vec4d start = input.get(i); Vec4d end = input.get((i+1)%input... | /**
* Clip the polygon against the view frustum, returns a new polygon that is entirely inside the view
* area. This is an implementation of the Sutherland-Hodgman_algorithm.
* @param verts - A list of vertices defining a polygon, with edges being defined by adjacent points
* @return - A list of vertices defining a... | Clip the polygon against the view frustum, returns a new polygon that is entirely inside the view area. This is an implementation of the Sutherland-Hodgman_algorithm | clipPolygon | {
"repo_name": "jaamsim/jaamsim",
"path": "src/main/java/com/jaamsim/render/Camera.java",
"license": "apache-2.0",
"size": 9157
} | [
"com.jaamsim.math.Plane",
"com.jaamsim.math.Ray",
"com.jaamsim.math.Vec4d",
"java.util.ArrayList"
] | import com.jaamsim.math.Plane; import com.jaamsim.math.Ray; import com.jaamsim.math.Vec4d; import java.util.ArrayList; | import com.jaamsim.math.*; import java.util.*; | [
"com.jaamsim.math",
"java.util"
] | com.jaamsim.math; java.util; | 1,682,694 |
private ListIterator<String> getImmutableListIterator() {
final List<String> list = new ArrayList<String>();
list.add("a");
list.add("b");
list.add("c");
list.add("d");
return IteratorUtils.unmodifiableListIterator(list.listIterator());
} | ListIterator<String> function() { final List<String> list = new ArrayList<String>(); list.add("a"); list.add("b"); list.add("c"); list.add("d"); return IteratorUtils.unmodifiableListIterator(list.listIterator()); } | /**
* Gets an immutable ListIterator operating on the elements ["a", "b", "c", "d"].
*/ | Gets an immutable ListIterator operating on the elements ["a", "b", "c", "d"] | getImmutableListIterator | {
"repo_name": "gonmarques/commons-collections",
"path": "src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java",
"license": "apache-2.0",
"size": 32460
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.ListIterator"
] | import java.util.ArrayList; import java.util.List; import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,283,314 |
public void close() throws IOException {
try {
file.close();
tmp = null;
} catch (SmbException se) {
throw seToIoe(se);
}
} | void function() throws IOException { try { file.close(); tmp = null; } catch (SmbException se) { throw seToIoe(se); } } | /**
* Closes this input stream and releases any system resources associated with the stream.
*
* @throws IOException if a network error occurs
*/ | Closes this input stream and releases any system resources associated with the stream | close | {
"repo_name": "javonhe/jcifs",
"path": "src/jcifs/smb/SmbFileInputStream.java",
"license": "lgpl-2.1",
"size": 8439
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,529,598 |
boolean bindAttribute(String ns, String wildcard, AttributeActionSet actions) {
NamespaceSpecification nss = new NamespaceSpecification(ns, wildcard);
if (nssAttributeMap.get(nss) != null)
return false;
for (Enumeration e = nssAttributeMap.keys(); e.hasMoreElements();) {
NamespaceSpecification... | boolean bindAttribute(String ns, String wildcard, AttributeActionSet actions) { NamespaceSpecification nss = new NamespaceSpecification(ns, wildcard); if (nssAttributeMap.get(nss) != null) return false; for (Enumeration e = nssAttributeMap.keys(); e.hasMoreElements();) { NamespaceSpecification nssI = (NamespaceSpecific... | /**
* Adds a set of attribute actions to be performed in this mode
* for attributes in a specified namespace.
*
* @param ns The namespace pattern.
* @param wildcard The wildcard character.
* @param actions The set of attribute actions.
* @return true if successfully added, that is the namespace w... | Adds a set of attribute actions to be performed in this mode for attributes in a specified namespace | bindAttribute | {
"repo_name": "vandenoever/jing",
"path": "mod/nvdl/src/main/com/thaiopensource/validate/nvdl/Mode.java",
"license": "bsd-3-clause",
"size": 12348
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,970,236 |
public void setDirectory(String directory) {
setProperty(DIRECTORY, directory, FileServer.getDefaultBase());
} | void function(String directory) { setProperty(DIRECTORY, directory, FileServer.getDefaultBase()); } | /**
* Set the working directory to use for system commands
*
* @param directory
* working directory to use for system commands
*/ | Set the working directory to use for system commands | setDirectory | {
"repo_name": "hizhangqi/jmeter-1",
"path": "src/protocol/native/org/apache/jmeter/protocol/system/SystemSampler.java",
"license": "apache-2.0",
"size": 11069
} | [
"org.apache.jmeter.services.FileServer"
] | import org.apache.jmeter.services.FileServer; | import org.apache.jmeter.services.*; | [
"org.apache.jmeter"
] | org.apache.jmeter; | 219,948 |
public int getPVGoodStrength() {
// FIXME: Change this to 21 to match Harvard's requirements or implement a way to disable the rule (0 or -1) and have the default be disabled.
int goodStrengthLength = 20;
//String _goodStrengthLength = System.getProperty("pv.goodstrength", settingsService.ge... | int function() { int goodStrengthLength = 20; String _goodStrengthLength = settingsService.get(SettingsServiceBean.Key.PVGoodStrength.toString()); try { goodStrengthLength = Integer.parseInt(_goodStrengthLength); } catch (NumberFormatException nfe) { logger.fine(STR + _goodStrengthLength); } return goodStrengthLength; ... | /**
* getPVGoodStrength
*
* Get the minimum length of a valid password to apply an expiration rule.
* Defaults to 20.
*
* @return The length.
*/ | getPVGoodStrength Get the minimum length of a valid password to apply an expiration rule. Defaults to 20 | getPVGoodStrength | {
"repo_name": "JayanthyChengan/dataverse",
"path": "src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java",
"license": "apache-2.0",
"size": 41856
} | [
"edu.harvard.iq.dataverse.settings.SettingsServiceBean"
] | import edu.harvard.iq.dataverse.settings.SettingsServiceBean; | import edu.harvard.iq.dataverse.settings.*; | [
"edu.harvard.iq"
] | edu.harvard.iq; | 1,604,650 |
public List<Expression> getBody() {
return body;
}
| List<Expression> function() { return body; } | /**
* Returns the body expressions.
*
* @return the body expressions
*/ | Returns the body expressions | getBody | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/Instantiation/de.uni_hildesheim.sse.easy.instantiatorCore/src/net/ssehub/easy/instantiation/core/model/expressions/InPlaceForCommand.java",
"license": "apache-2.0",
"size": 3576
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,239,245 |
private ImmutableMap<ShardId, SnapshotsInProgress.ShardSnapshotStatus> shards(ClusterState clusterState, List<String> indices) {
ImmutableMap.Builder<ShardId, SnapshotsInProgress.ShardSnapshotStatus> builder = ImmutableMap.builder();
MetaData metaData = clusterState.metaData();
for (String i... | ImmutableMap<ShardId, SnapshotsInProgress.ShardSnapshotStatus> function(ClusterState clusterState, List<String> indices) { ImmutableMap.Builder<ShardId, SnapshotsInProgress.ShardSnapshotStatus> builder = ImmutableMap.builder(); MetaData metaData = clusterState.metaData(); for (String index : indices) { IndexMetaData in... | /**
* Calculates the list of shards that should be included into the current snapshot
*
* @param clusterState cluster state
* @param indices list of indices to be snapshotted
* @return list of shard to be included into current snapshot
*/ | Calculates the list of shards that should be included into the current snapshot | shards | {
"repo_name": "strapdata/elassandra-test",
"path": "core/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java",
"license": "apache-2.0",
"size": 62046
} | [
"com.google.common.collect.ImmutableMap",
"java.util.List",
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.cluster.SnapshotsInProgress",
"org.elasticsearch.cluster.metadata.IndexMetaData",
"org.elasticsearch.cluster.metadata.MetaData",
"org.elasticsearch.cluster.routing.IndexRoutingTable",... | import com.google.common.collect.ImmutableMap; import java.util.List; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.SnapshotsInProgress; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.routing... | import com.google.common.collect.*; import java.util.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.index.shard.*; | [
"com.google.common",
"java.util",
"org.elasticsearch.cluster",
"org.elasticsearch.index"
] | com.google.common; java.util; org.elasticsearch.cluster; org.elasticsearch.index; | 484,125 |
@Test
public void testAssertTupleSequentialMode() throws Exception {
RuleBaseConfiguration conf = new RuleBaseConfiguration();
conf.setSequential( true );
ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase();
BuildContext buildContext = new BuildContext( rule... | void function() throws Exception { RuleBaseConfiguration conf = new RuleBaseConfiguration(); conf.setSequential( true ); ReteooRuleBase ruleBase = (ReteooRuleBase) RuleBaseFactory.newRuleBase(); BuildContext buildContext = new BuildContext( ruleBase, ruleBase.getReteooBuilder().getIdGenerator() ); buildContext.setTuple... | /**
* Test just tuple assertions
*
* @throws AssertionException
*/ | Test just tuple assertions | testAssertTupleSequentialMode | {
"repo_name": "psiroky/drools",
"path": "drools-core/src/test/java/org/drools/reteoo/AccumulateNodeTest.java",
"license": "apache-2.0",
"size": 21389
} | [
"org.drools.RuleBaseConfiguration",
"org.drools.RuleBaseFactory",
"org.drools.common.DefaultFactHandle",
"org.drools.common.EmptyBetaConstraints",
"org.drools.common.PropagationContextImpl",
"org.drools.reteoo.AccumulateNode",
"org.drools.reteoo.builder.BuildContext",
"org.drools.spi.AlphaNodeFieldCon... | import org.drools.RuleBaseConfiguration; import org.drools.RuleBaseFactory; import org.drools.common.DefaultFactHandle; import org.drools.common.EmptyBetaConstraints; import org.drools.common.PropagationContextImpl; import org.drools.reteoo.AccumulateNode; import org.drools.reteoo.builder.BuildContext; import org.drool... | import org.drools.*; import org.drools.common.*; import org.drools.reteoo.*; import org.drools.reteoo.builder.*; import org.drools.spi.*; import org.junit.*; | [
"org.drools",
"org.drools.common",
"org.drools.reteoo",
"org.drools.spi",
"org.junit"
] | org.drools; org.drools.common; org.drools.reteoo; org.drools.spi; org.junit; | 2,528,657 |
public CompletableFuture<JobStatus> getTerminationFuture() {
return terminationFuture;
} | CompletableFuture<JobStatus> function() { return terminationFuture; } | /**
* Returns the termination future of this {@link ExecutionGraph}. The termination future
* is completed with the terminal {@link JobStatus} once the ExecutionGraph reaches this
* terminal state and all {@link Execution} have been terminated.
*
* @return Termination future of this {@link ExecutionGraph}.
... | Returns the termination future of this <code>ExecutionGraph</code>. The termination future is completed with the terminal <code>JobStatus</code> once the ExecutionGraph reaches this terminal state and all <code>Execution</code> have been terminated | getTerminationFuture | {
"repo_name": "mbode/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java",
"license": "apache-2.0",
"size": 66001
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.flink.runtime.jobgraph.JobStatus"
] | import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.jobgraph.JobStatus; | import java.util.concurrent.*; import org.apache.flink.runtime.jobgraph.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 831,784 |
private boolean mkdir(Path f) throws IOException {
try {
FileStatus fileStatus = getFileStatus(f);
if (fileStatus.isFile()) {
throw new FileAlreadyExistsException(String.format("Can't make directory for path '%s' since it is a file.", f));
}
} catch (FileNotFoundException e) {
... | boolean function(Path f) throws IOException { try { FileStatus fileStatus = getFileStatus(f); if (fileStatus.isFile()) { throw new FileAlreadyExistsException(String.format(STR, f)); } } catch (FileNotFoundException e) { if (LOG.isDebugEnabled()) LOG.debug(STR + f + STR); String key = pathToKey(f) + FOLDER_SUFFIX; store... | /**
* Creates a single directory.
*
* @param f path
* @return true iff the directory exists, or was created
*/ | Creates a single directory | mkdir | {
"repo_name": "quixey/dragon-oss",
"path": "src/main/java/com/quixey/hadoop/fs/oss/OSSFileSystem.java",
"license": "apache-2.0",
"size": 26867
} | [
"com.google.common.base.Optional",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.InputStream",
"org.apache.hadoop.fs.FSInputStream",
"org.apache.hadoop.fs.FileAlreadyExistsException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.Path"
] | import com.google.common.base.Optional; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import org.apache.hadoop.fs.FSInputStream; import org.apache.hadoop.fs.FileAlreadyExistsException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; | import com.google.common.base.*; import java.io.*; import org.apache.hadoop.fs.*; | [
"com.google.common",
"java.io",
"org.apache.hadoop"
] | com.google.common; java.io; org.apache.hadoop; | 1,056,692 |
private void assertOrdering(Comparator<StoreFile> comparator, StoreFile ... sfs) {
ArrayList<StoreFile> sorted = Lists.newArrayList(sfs);
Collections.shuffle(sorted);
Collections.sort(sorted, comparator);
LOG.debug("sfs: " + Joiner.on(",").join(sfs));
LOG.debug("sorted: " + Joiner.on(",").join(sor... | void function(Comparator<StoreFile> comparator, StoreFile ... sfs) { ArrayList<StoreFile> sorted = Lists.newArrayList(sfs); Collections.shuffle(sorted); Collections.sort(sorted, comparator); LOG.debug(STR + Joiner.on(",").join(sfs)); LOG.debug(STR + Joiner.on(",").join(sorted)); assertTrue(Iterables.elementsEqual(Array... | /**
* Assert that the given comparator orders the given storefiles in the
* same way that they're passed.
*/ | Assert that the given comparator orders the given storefiles in the same way that they're passed | assertOrdering | {
"repo_name": "daidong/DominoHBase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java",
"license": "apache-2.0",
"size": 37001
} | [
"com.google.common.base.Joiner",
"com.google.common.collect.Iterables",
"com.google.common.collect.Lists",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collections",
"java.util.Comparator"
] | import com.google.common.base.Joiner; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 58,393 |
public Observable<String> geohashManyObservable(String key, List<String> members) {
io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture();
geohashMany(key, members, handler.toHandler());
return handler;
} | Observable<String> function(String key, List<String> members) { io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture(); geohashMany(key, members, handler.toHandler()); return handler; } | /**
* Return valid Geohash strings representing the position of one or more elements in a sorted set value representing
* a geospatial index (where elements were added using GEOADD).
* @param key Key string
* @param members list of members
* @return
*/ | Return valid Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index (where elements were added using GEOADD) | geohashManyObservable | {
"repo_name": "brianjcj/vertx-redis-client",
"path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java",
"license": "apache-2.0",
"size": 184983
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 638,758 |
public static ModelForm getFormFromLocation(String resourceName, String formName, ModelReader entityModelReader, DispatchContext dispatchContext)
throws IOException, SAXException, ParserConfigurationException {
ModelForm modelForm = getFormFromLocationOrNull(resourceName, formName, entityModelRe... | static ModelForm function(String resourceName, String formName, ModelReader entityModelReader, DispatchContext dispatchContext) throws IOException, SAXException, ParserConfigurationException { ModelForm modelForm = getFormFromLocationOrNull(resourceName, formName, entityModelReader, dispatchContext); if (modelForm == n... | /**
* Gets widget from location or exception.
* <p>
* SCIPIO: now delegating.
*/ | Gets widget from location or exception. | getFormFromLocation | {
"repo_name": "ilscipio/scipio-erp",
"path": "framework/widget/src/org/ofbiz/widget/model/FormFactory.java",
"license": "apache-2.0",
"size": 18090
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"javax.xml.parsers.ParserConfigurationException",
"org.ofbiz.entity.model.ModelReader",
"org.ofbiz.service.DispatchContext",
"org.w3c.dom.Document",
"org.xml.sax.SAXException"
] | import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import org.ofbiz.entity.model.ModelReader; import org.ofbiz.service.DispatchContext; import org.w3c.dom.Document; import org.xml.sax.SAXException; | import java.io.*; import java.util.*; import javax.xml.parsers.*; import org.ofbiz.entity.model.*; import org.ofbiz.service.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"javax.xml",
"org.ofbiz.entity",
"org.ofbiz.service",
"org.w3c.dom",
"org.xml.sax"
] | java.io; java.util; javax.xml; org.ofbiz.entity; org.ofbiz.service; org.w3c.dom; org.xml.sax; | 2,257,653 |
private Link getCategoryLink(Image image) {
Link L = getCategoryLink();
L.setImage(image);
return L;
} | Link function(Image image) { Link L = getCategoryLink(); L.setImage(image); return L; } | /**
* Gets the categoryLink of the NewsLetter object
*
* @param image
* Description of the Parameter
* @return The category link value
*/ | Gets the categoryLink of the NewsLetter object | getCategoryLink | {
"repo_name": "idega/platform2",
"path": "src/com/idega/block/email/presentation/NewsLetter.java",
"license": "gpl-3.0",
"size": 18183
} | [
"com.idega.presentation.Image",
"com.idega.presentation.text.Link"
] | import com.idega.presentation.Image; import com.idega.presentation.text.Link; | import com.idega.presentation.*; import com.idega.presentation.text.*; | [
"com.idega.presentation"
] | com.idega.presentation; | 1,427,381 |
public StructDefinition getTracePacketHeaderDefinition(@NonNull BitBuffer input) throws CTFReaderException {
return fTracePacketHeaderDecl.createDefinition(this, LexicalScope.TRACE_PACKET_HEADER.getName(), input);
} | StructDefinition function(@NonNull BitBuffer input) throws CTFReaderException { return fTracePacketHeaderDecl.createDefinition(this, LexicalScope.TRACE_PACKET_HEADER.getName(), input); } | /**
* Get the event header defintiion
*
* @param input
* the bitbuffer to read from
* @return an header definition, can be null
* @throws CTFReaderException
* out of bounds exception or such
*/ | Get the event header defintiion | getTracePacketHeaderDefinition | {
"repo_name": "soctrace-inria/framesoc.importers",
"path": "fr.inria.soctrace.tools.importer.ctf/fr.inria.linuxtools.ctf.core/src/fr/inria/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java",
"license": "epl-1.0",
"size": 18844
} | [
"fr.inria.linuxtools.ctf.core.event.io.BitBuffer",
"fr.inria.linuxtools.ctf.core.event.scope.LexicalScope",
"fr.inria.linuxtools.ctf.core.event.types.StructDefinition",
"org.eclipse.jdt.annotation.NonNull"
] | import fr.inria.linuxtools.ctf.core.event.io.BitBuffer; import fr.inria.linuxtools.ctf.core.event.scope.LexicalScope; import fr.inria.linuxtools.ctf.core.event.types.StructDefinition; import org.eclipse.jdt.annotation.NonNull; | import fr.inria.linuxtools.ctf.core.event.io.*; import fr.inria.linuxtools.ctf.core.event.scope.*; import fr.inria.linuxtools.ctf.core.event.types.*; import org.eclipse.jdt.annotation.*; | [
"fr.inria.linuxtools",
"org.eclipse.jdt"
] | fr.inria.linuxtools; org.eclipse.jdt; | 1,729,269 |
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
| InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setPrefix(STR); resolver.setSuffix(".jsp"); return resolver; } | /**
* Informa ao Servlet Dispatcher que o diretorio WEB-INF/views contem as paginas da aplicacao
* @return devolve o resolver para o Servlet Dispatcher
*/ | Informa ao Servlet Dispatcher que o diretorio WEB-INF/views contem as paginas da aplicacao | internalResourceViewResolver | {
"repo_name": "luizmgms/WebCamService",
"path": "src/main/java/br/ufpi/webcamservice/configuracoes/AppWebConfiguration.java",
"license": "unlicense",
"size": 3181
} | [
"org.springframework.web.servlet.view.InternalResourceViewResolver"
] | import org.springframework.web.servlet.view.InternalResourceViewResolver; | import org.springframework.web.servlet.view.*; | [
"org.springframework.web"
] | org.springframework.web; | 2,883,377 |
public static java.util.Set extractPatientJourneyTargetSet(ims.domain.ILightweightDomainFactory domainFactory, ims.pathways.vo.PatientJourneyTargetInterfaceVoCollection voCollection)
{
return extractPatientJourneyTargetSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.pathways.vo.PatientJourneyTargetInterfaceVoCollection voCollection) { return extractPatientJourneyTargetSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.pathways.domain.objects.PatientJourneyTarget set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.pathways.domain.objects.PatientJourneyTarget set from the value object collection | extractPatientJourneyTargetSet | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/pathways/vo/domain/PatientJourneyTargetInterfaceVoAssembler.java",
"license": "agpl-3.0",
"size": 19910
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,059,962 |
public GroupsIsMemberQueryWithUserIds isMember(UserActor actor, String groupId, List<Integer> userIds) {
return new GroupsIsMemberQueryWithUserIds(getClient(), actor, groupId, userIds);
} | GroupsIsMemberQueryWithUserIds function(UserActor actor, String groupId, List<Integer> userIds) { return new GroupsIsMemberQueryWithUserIds(getClient(), actor, groupId, userIds); } | /**
* Returns information specifying whether a user is a member of a community.
*/ | Returns information specifying whether a user is a member of a community | isMember | {
"repo_name": "kokorin/vk-java-sdk",
"path": "sdk/src/main/java/com/vk/api/sdk/actions/Groups.java",
"license": "mit",
"size": 16597
} | [
"com.vk.api.sdk.client.actors.UserActor",
"com.vk.api.sdk.queries.groups.GroupsIsMemberQueryWithUserIds",
"java.util.List"
] | import com.vk.api.sdk.client.actors.UserActor; import com.vk.api.sdk.queries.groups.GroupsIsMemberQueryWithUserIds; import java.util.List; | import com.vk.api.sdk.client.actors.*; import com.vk.api.sdk.queries.groups.*; import java.util.*; | [
"com.vk.api",
"java.util"
] | com.vk.api; java.util; | 2,510,664 |
protected Object executeBasic(MailAdapter mail, Arguments arguments,
Block block, SieveContext context) throws SieveException {
// Just cancels the implicit keep
// See http://tools.ietf.org/html/rfc5228#section-4.4
context.getCommandStateManager().setImplicitKeep(false);
... | Object function(MailAdapter mail, Arguments arguments, Block block, SieveContext context) throws SieveException { context.getCommandStateManager().setImplicitKeep(false); mail.addAction(new ActionDiscard()); return null; } | /**
* <p>
* Discard silently discards a Mail by cancelling the implicit keep as
* specified in RFC 3028, Section 4.5.
* </p>
* <p>
*
* @see org.apache.jsieve.commands.AbstractCommand#executeBasic(MailAdapter,
* Arguments, Block, SieveContext)
* </p>
*/ | Discard silently discards a Mail by cancelling the implicit keep as specified in RFC 3028, Section 4.5. | executeBasic | {
"repo_name": "apache/james-jsieve",
"path": "core/src/main/java/org/apache/jsieve/commands/Discard.java",
"license": "apache-2.0",
"size": 2427
} | [
"org.apache.jsieve.Arguments",
"org.apache.jsieve.Block",
"org.apache.jsieve.SieveContext",
"org.apache.jsieve.exception.SieveException",
"org.apache.jsieve.mail.ActionDiscard",
"org.apache.jsieve.mail.MailAdapter"
] | import org.apache.jsieve.Arguments; import org.apache.jsieve.Block; import org.apache.jsieve.SieveContext; import org.apache.jsieve.exception.SieveException; import org.apache.jsieve.mail.ActionDiscard; import org.apache.jsieve.mail.MailAdapter; | import org.apache.jsieve.*; import org.apache.jsieve.exception.*; import org.apache.jsieve.mail.*; | [
"org.apache.jsieve"
] | org.apache.jsieve; | 82,104 |
@Override
public int getMaxItemUseDuration(ItemStack stack) {
return 72000;
} | int function(ItemStack stack) { return 72000; } | /**
* How long it takes to use or consume an item
*/ | How long it takes to use or consume an item | getMaxItemUseDuration | {
"repo_name": "CuriousSkeptic/ElementalEssences",
"path": "src/main/java/com/elementalessence/common/items/tool/SwordBase.java",
"license": "cc0-1.0",
"size": 4349
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 939,941 |
public void addbiboDateargued(java.lang.String value) {
Base.add(this.model, this.getResource(), DATEARGUED, value);
}
| void function(java.lang.String value) { Base.add(this.model, this.getResource(), DATEARGUED, value); } | /**
* Adds a value to property Dateargued from an instance of java.lang.String
*
* [Generated from RDFReactor template rule #add4dynamic]
*/ | Adds a value to property Dateargued from an instance of java.lang.String [Generated from RDFReactor template rule #add4dynamic] | addbiboDateargued | {
"repo_name": "oeg-upm/biotea",
"path": "src/ws/biotea/ld2rdf/rdf/model/bibo/LegalDocument.java",
"license": "apache-2.0",
"size": 31487
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 2,812,202 |
public List<DatabaseQuery> getAllQueries() {
Vector allQueries = new Vector();
for (Iterator vectors = getQueries().values().iterator(); vectors.hasNext();) {
allQueries.addAll((Vector)vectors.next());
}
return allQueries;
} | List<DatabaseQuery> function() { Vector allQueries = new Vector(); for (Iterator vectors = getQueries().values().iterator(); vectors.hasNext();) { allQueries.addAll((Vector)vectors.next()); } return allQueries; } | /**
* INTERNAL:
* Return the pre-defined queries in this session.
* A single vector containing all the queries is returned.
*
* @see #getQueries()
*/ | Return the pre-defined queries in this session. A single vector containing all the queries is returned | getAllQueries | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AbstractSession.java",
"license": "epl-1.0",
"size": 198170
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Vector",
"org.eclipse.persistence.queries.DatabaseQuery"
] | import java.util.Iterator; import java.util.List; import java.util.Vector; import org.eclipse.persistence.queries.DatabaseQuery; | import java.util.*; import org.eclipse.persistence.queries.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 1,015,718 |
ImplementationSnapshot getImplementation(); | ImplementationSnapshot getImplementation(); | /**
* The main implementation snapshots.
*/ | The main implementation snapshots | getImplementation | {
"repo_name": "robinverduijn/gradle",
"path": "subprojects/execution/src/main/java/org/gradle/internal/execution/history/ExecutionState.java",
"license": "apache-2.0",
"size": 1626
} | [
"org.gradle.internal.snapshot.impl.ImplementationSnapshot"
] | import org.gradle.internal.snapshot.impl.ImplementationSnapshot; | import org.gradle.internal.snapshot.impl.*; | [
"org.gradle.internal"
] | org.gradle.internal; | 1,212,174 |
public MessageDrivenBeanType<EnterpriseBeansType<T>> createMessageDriven()
{
return new MessageDrivenBeanTypeImpl<EnterpriseBeansType<T>>(this, "message-driven", childNode);
} | MessageDrivenBeanType<EnterpriseBeansType<T>> function() { return new MessageDrivenBeanTypeImpl<EnterpriseBeansType<T>>(this, STR, childNode); } | /**
* Creates a new <code>message-driven</code> element
* @return the new created instance of <code>MessageDrivenBeanType<EnterpriseBeansType<T>></code>
*/ | Creates a new <code>message-driven</code> element | createMessageDriven | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar30/EnterpriseBeansTypeImpl.java",
"license": "epl-1.0",
"size": 9620
} | [
"org.jboss.shrinkwrap.descriptor.api.ejbjar30.EnterpriseBeansType",
"org.jboss.shrinkwrap.descriptor.api.ejbjar30.MessageDrivenBeanType"
] | import org.jboss.shrinkwrap.descriptor.api.ejbjar30.EnterpriseBeansType; import org.jboss.shrinkwrap.descriptor.api.ejbjar30.MessageDrivenBeanType; | import org.jboss.shrinkwrap.descriptor.api.ejbjar30.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,353,753 |
public static GaugeAssert assertThat(Gauge gauge) {
return new GaugeAssert(gauge);
} | static GaugeAssert function(Gauge gauge) { return new GaugeAssert(gauge); } | /**
* Creates an assertion to evaluate the given gauge.
*
* @param gauge the gauge to evaluate
* @return the created assertion object
*/ | Creates an assertion to evaluate the given gauge | assertThat | {
"repo_name": "masaki-yamakawa/geode",
"path": "geode-junit/src/main/java/org/apache/geode/test/micrometer/MicrometerAssertions.java",
"license": "apache-2.0",
"size": 2135
} | [
"io.micrometer.core.instrument.Gauge"
] | import io.micrometer.core.instrument.Gauge; | import io.micrometer.core.instrument.*; | [
"io.micrometer.core"
] | io.micrometer.core; | 1,292,195 |
@Test
public void testConnectionEvents() throws SQLException {
assumeTrue(!DBConnection.isSqlAzure(DriverManager.getConnection(connectionString)), "Skipping test case on Azure SQL.");
SQLServerConnectionPoolDataSource mds = new SQLServerConnectionPoolDataSource();
mds.setURL(connectionS... | void function() throws SQLException { assumeTrue(!DBConnection.isSqlAzure(DriverManager.getConnection(connectionString)), STR); SQLServerConnectionPoolDataSource mds = new SQLServerConnectionPoolDataSource(); mds.setURL(connectionString); PooledConnection pooledConnection = mds.getPooledConnection(); MyEventListener my... | /**
* Attach the Event listener and listen for connection events, fatal errors should not close the pooled connection objects
*
* @throws SQLException
*/ | Attach the Event listener and listen for connection events, fatal errors should not close the pooled connection objects | testConnectionEvents | {
"repo_name": "pierresouchay/mssql-jdbc",
"path": "src/test/java/com/microsoft/sqlserver/jdbc/connection/ConnectionDriverTest.java",
"license": "mit",
"size": 22452
} | [
"com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource",
"com.microsoft.sqlserver.testframework.DBConnection",
"java.sql.Connection",
"java.sql.DriverManager",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"javax.sql.PooledConnection",
"org.junit.jupiter.api.Assertion... | import com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource; import com.microsoft.sqlserver.testframework.DBConnection; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.sql.PooledConnection; import org.j... | import com.microsoft.sqlserver.jdbc.*; import com.microsoft.sqlserver.testframework.*; import java.sql.*; import javax.sql.*; import org.junit.jupiter.api.*; | [
"com.microsoft.sqlserver",
"java.sql",
"javax.sql",
"org.junit.jupiter"
] | com.microsoft.sqlserver; java.sql; javax.sql; org.junit.jupiter; | 2,840,262 |
public boolean isRatingDone() {
return isRatingDone;
}
private RaterRatingEntity(RaterRating raterRating) {
this.componentId = raterRating.getRating().getInstanceId();
this.ratingAverage = raterRating.getRating().getRatingAverage();
this.numberOfRaterRatings = raterRating.getRating().getRaterR... | boolean function() { return isRatingDone; } private RaterRatingEntity(RaterRating raterRating) { this.componentId = raterRating.getRating().getInstanceId(); this.ratingAverage = raterRating.getRating().getRatingAverage(); this.numberOfRaterRatings = raterRating.getRating().getRaterRatings().size(); this.contributionId ... | /**
* Indicates if the current user made a rating on the contribution.
* @return true if the user made a rating, false otherwise.
*/ | Indicates if the current user made a rating on the contribution | isRatingDone | {
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-web/src/main/java/org/silverpeas/core/webapi/rating/RaterRatingEntity.java",
"license": "agpl-3.0",
"size": 7728
} | [
"org.silverpeas.core.contribution.rating.model.RaterRating"
] | import org.silverpeas.core.contribution.rating.model.RaterRating; | import org.silverpeas.core.contribution.rating.model.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 1,313,491 |
public WebAppContext getJettyWebAppContext() {
return jettyWebAppContext;
} | WebAppContext function() { return jettyWebAppContext; } | /**
* Returns the Jetty webapp context
*
* @return the Jetty webapp context
*/ | Returns the Jetty webapp context | getJettyWebAppContext | {
"repo_name": "diorcety/jawr",
"path": "jawr-integration-test-utils/src/main/java/net/jawr/web/test/JawrIntegrationServer.java",
"license": "apache-2.0",
"size": 7052
} | [
"org.eclipse.jetty.webapp.WebAppContext"
] | import org.eclipse.jetty.webapp.WebAppContext; | import org.eclipse.jetty.webapp.*; | [
"org.eclipse.jetty"
] | org.eclipse.jetty; | 1,040,288 |
private void addAuthoritativeContainer(Class<? extends IObject> klass,
String lsid,
IObjectContainer container)
{
Map<String, IObjectContainer> lsidContainerMap =
authoritativeContainerCache.get(klass);
if (lsidContainerMap == null)
{
lsidContainerMap = new ... | void function(Class<? extends IObject> klass, String lsid, IObjectContainer container) { Map<String, IObjectContainer> lsidContainerMap = authoritativeContainerCache.get(klass); if (lsidContainerMap == null) { lsidContainerMap = new HashMap<String, IObjectContainer>(); authoritativeContainerCache.put(klass, lsidContain... | /**
* Adds a container to the authoritative LSID cache.
* @param klass Type of container we're adding.
* @param lsid String LSID of the container.
* @param container Container to add.
*/ | Adds a container to the authoritative LSID cache | addAuthoritativeContainer | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/blitz/src/ome/formats/OMEROMetadataStoreClient.java",
"license": "gpl-2.0",
"size": 308373
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,495,084 |
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
} | void function (BigDecimal ProcessedOn) { set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); } | /** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/ | Set Processed On | setProcessedOn | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_C_BankStatement.java",
"license": "gpl-2.0",
"size": 14636
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,181,460 |
private static CompoundNBT checkForCompound(final ItemStack clipboard)
{
if (!clipboard.hasTag()) clipboard.setTag(new CompoundNBT());
return clipboard.getTag();
} | static CompoundNBT function(final ItemStack clipboard) { if (!clipboard.hasTag()) clipboard.setTag(new CompoundNBT()); return clipboard.getTag(); } | /**
* Check for the compound and return it. If not available create and return it.
*
* @param clipboard the clipboard to check for.
* @return the compound of the clipboard.
*/ | Check for the compound and return it. If not available create and return it | checkForCompound | {
"repo_name": "Minecolonies/minecolonies",
"path": "src/main/java/com/minecolonies/coremod/items/ItemClipboard.java",
"license": "gpl-3.0",
"size": 4447
} | [
"net.minecraft.item.ItemStack",
"net.minecraft.nbt.CompoundNBT"
] | import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; | import net.minecraft.item.*; import net.minecraft.nbt.*; | [
"net.minecraft.item",
"net.minecraft.nbt"
] | net.minecraft.item; net.minecraft.nbt; | 726,985 |
public String createNavigation() {
StringBuffer buffer = new StringBuffer(2048);
int endlevel = calculateEndLevel();
String spaces = getSpaces((endlevel - m_depth) * 2);
if (m_navRootPath != null) {
buffer.append("\n").append(spaces).append("<p>\n");
b... | String function() { StringBuffer buffer = new StringBuffer(2048); int endlevel = calculateEndLevel(); String spaces = getSpaces((endlevel - m_depth) * 2); if (m_navRootPath != null) { buffer.append("\n").append(spaces).append("<p>\n"); buffer.append(spaces).append(STR); List navElements = m_jsp.getNavigation().getSiteN... | /**
* Returns a string containing the navigation created by using the internal members.<p>
*
* The navigation is a nested html list. <p>
*
* @return a string containing the navigation created by using the internal members
*/ | Returns a string containing the navigation created by using the internal members. The navigation is a nested html list. | createNavigation | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/workplace/help/CmsHelpNavigationListView.java",
"license": "lgpl-2.1",
"size": 8885
} | [
"java.util.List",
"org.opencms.main.CmsIllegalArgumentException"
] | import java.util.List; import org.opencms.main.CmsIllegalArgumentException; | import java.util.*; import org.opencms.main.*; | [
"java.util",
"org.opencms.main"
] | java.util; org.opencms.main; | 1,369,703 |
public static void loadRoomAvatar(Context context, MXSession session, ImageView imageView, Room room) {
if (null != room) {
VectorUtils.loadUserAvatar(context, session, imageView, room.getAvatarUrl(), room.getRoomId(), VectorUtils.getRoomDisplayName(context, session, room));
}
} | static void function(Context context, MXSession session, ImageView imageView, Room room) { if (null != room) { VectorUtils.loadUserAvatar(context, session, imageView, room.getAvatarUrl(), room.getRoomId(), VectorUtils.getRoomDisplayName(context, session, room)); } } | /**
* Set the room avatar in an imageView.
*
* @param context the context
* @param session the session
* @param imageView the image view
* @param room the room
*/ | Set the room avatar in an imageView | loadRoomAvatar | {
"repo_name": "noepitome/neon-android",
"path": "neon/src/main/java/im/neon/util/VectorUtils.java",
"license": "apache-2.0",
"size": 43597
} | [
"android.content.Context",
"android.widget.ImageView",
"org.matrix.androidsdk.MXSession",
"org.matrix.androidsdk.data.Room"
] | import android.content.Context; import android.widget.ImageView; import org.matrix.androidsdk.MXSession; import org.matrix.androidsdk.data.Room; | import android.content.*; import android.widget.*; import org.matrix.androidsdk.*; import org.matrix.androidsdk.data.*; | [
"android.content",
"android.widget",
"org.matrix.androidsdk"
] | android.content; android.widget; org.matrix.androidsdk; | 6,221 |
@Test
public void testHashcode() {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer();
assertEquals(r1, r2);
int h1 = r1.hashCode();
int h2 = r2.hashCode();
assertEquals(h1, h2);
} | void function() { MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer(); MinMaxCategoryRenderer r2 = new MinMaxCategoryRenderer(); assertEquals(r1, r2); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); } | /**
* Two objects that are equal are required to return the same hashCode.
*/ | Two objects that are equal are required to return the same hashCode | testHashcode | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/test/java/org/jfree/chart/renderer/category/MinMaxCategoryRendererTest.java",
"license": "gpl-3.0",
"size": 5923
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,824,519 |
protected Object getComponentStateToSave(FacesContext context)
{
return null;
} | Object function(FacesContext context) { return null; } | /**
* Return data that can be applied to a component tree created using the "getTreeStructureToSave" method.
* <p>
* Deprecated; use saveView instead.
*
* @deprecated
*/ | Return data that can be applied to a component tree created using the "getTreeStructureToSave" method. Deprecated; use saveView instead | getComponentStateToSave | {
"repo_name": "kulinski/myfaces",
"path": "api/src/main/java/javax/faces/application/StateManager.java",
"license": "apache-2.0",
"size": 13826
} | [
"javax.faces.context.FacesContext"
] | import javax.faces.context.FacesContext; | import javax.faces.context.*; | [
"javax.faces"
] | javax.faces; | 2,297,457 |
public void showActionButton(boolean fadeIn, int fadeInDuration) {
mActionButtonView.setVisibility(View.VISIBLE);
if (fadeIn && mActionButtonView.getAlpha() < 1f) {
mActionButtonView.animate()
.alpha(1f)
.scaleX(1f)
.scaleY(1f)... | void function(boolean fadeIn, int fadeInDuration) { mActionButtonView.setVisibility(View.VISIBLE); if (fadeIn && mActionButtonView.getAlpha() < 1f) { mActionButtonView.animate() .alpha(1f) .scaleX(1f) .scaleY(1f) .setDuration(fadeInDuration) .setInterpolator(Interpolators.ALPHA_IN) .start(); } else { mActionButtonView.... | /**
* Shows the action button.
* @param fadeIn whether or not to animate the action button in.
* @param fadeInDuration the duration of the action button animation, only used if
* {@param fadeIn} is true.
*/ | Shows the action button | showActionButton | {
"repo_name": "xorware/android_frameworks_base",
"path": "packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java",
"license": "apache-2.0",
"size": 27345
} | [
"android.view.View",
"com.android.systemui.Interpolators"
] | import android.view.View; import com.android.systemui.Interpolators; | import android.view.*; import com.android.systemui.*; | [
"android.view",
"com.android.systemui"
] | android.view; com.android.systemui; | 550,577 |
public void setUp(int fragmentId, DrawerLayout drawerLayout) {
mFragmentContainerView = getActivity().findViewById(fragmentId);
mDrawerLayout = drawerLayout;
// set a custom shadow that overlays the main content when the drawer opens
mDrawerLayout.setDrawerShadow(R.drawable.drawer_s... | void function(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionB... | /**
* Users of this fragment must call this method to set up the navigation drawer interactions.
*
* @param fragmentId The android:id of this fragment in its activity's layout.
* @param drawerLayout The DrawerLayout containing this fragment's UI.
*/ | Users of this fragment must call this method to set up the navigation drawer interactions | setUp | {
"repo_name": "ArtemMy/CallRec",
"path": "app/src/main/java/com/artem/callrec/NavigationDrawerFragment.java",
"license": "gpl-3.0",
"size": 11967
} | [
"android.support.v4.view.GravityCompat",
"android.support.v4.widget.DrawerLayout",
"android.support.v7.app.ActionBar"
] | import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; | import android.support.v4.view.*; import android.support.v4.widget.*; import android.support.v7.app.*; | [
"android.support"
] | android.support; | 348,027 |
Query query = em.createQuery(
String.format("SELECT e FROM %s e", entityType.getSimpleName()));
return query.getResultList();
} | Query query = em.createQuery( String.format(STR, entityType.getSimpleName())); return query.getResultList(); } | /**
* Returns all instances of the type.
*
* @return all entities
*/ | Returns all instances of the type | findAll | {
"repo_name": "TwilioDevEd/marketing-notifications-servlets",
"path": "src/main/java/org/twilio/smsmarketing/repositories/Repository.java",
"license": "mit",
"size": 2987
} | [
"javax.persistence.Query"
] | import javax.persistence.Query; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 770,435 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ClusterInner> updateWithResponse(
String resourceGroupName,
String workspaceName,
String clusterName,
ClusterUpdateParameters parameters,
Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<ClusterInner> updateWithResponse( String resourceGroupName, String workspaceName, String clusterName, ClusterUpdateParameters parameters, Context context); | /**
* Updates properties of a Cluster.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
* characters along with dash (-) and underscore (_).... | Updates properties of a Cluster | updateWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/fluent/ClustersClient.java",
"license": "mit",
"size": 20819
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.batchai.fluent.models.ClusterInner",
"com.azure.resourcemanager.batchai.models.ClusterUpdateParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.batchai.fluent.models.ClusterInner; import com.azure.resourcemanager.batchai.models.ClusterUpdateParameters; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.batchai.fluent.models.*; import com.azure.resourcemanager.batchai.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,631,149 |
public void eachBehavior(final EachApplicable<Behavior> applier);
| void function(final EachApplicable<Behavior> applier); | /**
* Applies the given code to each behavior on this object
* @param applier code to execute against each object
*/ | Applies the given code to each behavior on this object | eachBehavior | {
"repo_name": "bozimmerman/CoffeeMud",
"path": "com/planet_ink/coffee_mud/core/interfaces/Behavable.java",
"license": "apache-2.0",
"size": 4922
} | [
"com.planet_ink.coffee_mud.Behaviors"
] | import com.planet_ink.coffee_mud.Behaviors; | import com.planet_ink.coffee_mud.*; | [
"com.planet_ink.coffee_mud"
] | com.planet_ink.coffee_mud; | 2,488,041 |
public void executeTest(String type) throws Exception {
if (results.get(type) instanceof Failure) {
try {
Results res = os.execute((Query) queries.get(type), 2, true, true, true);
Iterator iter = res.iterator();
while (iter.hasNext()) {
... | void function(String type) throws Exception { if (results.get(type) instanceof Failure) { try { Results res = os.execute((Query) queries.get(type), 2, true, true, true); Iterator iter = res.iterator(); while (iter.hasNext()) { iter.next(); } fail(type + STR); } catch (Exception e) { assertEquals(type + STR, results.get... | /**
* Execute a test for a query. This should run the query and
* contain an assert call to assert that the returned results are
* those expected.
*
* @param type the type of query we are testing (ie. the key in the queries Map)
* @throws Exception if type does not appear in the queries ma... | Execute a test for a query. This should run the query and contain an assert call to assert that the returned results are those expected | executeTest | {
"repo_name": "zebrafishmine/intermine",
"path": "intermine/objectstore/test/src/org/intermine/objectstore/ObjectStoreTestCase.java",
"license": "lgpl-2.1",
"size": 60739
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"org.intermine.objectstore.query.Query",
"org.intermine.objectstore.query.Results"
] | import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.intermine.objectstore.query.Query; import org.intermine.objectstore.query.Results; | import java.util.*; import org.intermine.objectstore.query.*; | [
"java.util",
"org.intermine.objectstore"
] | java.util; org.intermine.objectstore; | 2,454,288 |
protected int mapDragOperationFromModifiers(MouseEvent e) {
int mods = e.getModifiersEx();
int btns = mods & ButtonMask;
// Prohibit multi-button drags.
if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
btns == InputEvent.BUTTON2_DOWN_MASK ||
btns == InputEve... | int function(MouseEvent e) { int mods = e.getModifiersEx(); int btns = mods & ButtonMask; if (!(btns == InputEvent.BUTTON1_DOWN_MASK btns == InputEvent.BUTTON2_DOWN_MASK btns == InputEvent.BUTTON3_DOWN_MASK)) { return DnDConstants.ACTION_NONE; } return SunDragSourceContextPeer.convertModifiersToDropAction(mods, getSour... | /**
* determine the drop action from the event
*/ | determine the drop action from the event | mapDragOperationFromModifiers | {
"repo_name": "stain/jdk8u",
"path": "src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java",
"license": "gpl-2.0",
"size": 6733
} | [
"java.awt.dnd.DnDConstants",
"java.awt.event.InputEvent",
"java.awt.event.MouseEvent"
] | import java.awt.dnd.DnDConstants; import java.awt.event.InputEvent; import java.awt.event.MouseEvent; | import java.awt.dnd.*; import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,077,838 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.