method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static void requestLocation(final Activity parent) { if (LocationHelper.isLocationEnabled(parent)) { return; } // Shamelessly borrowed from http://stackoverflow.com/a/10311877/868533
static void function(final Activity parent) { if (LocationHelper.isLocationEnabled(parent)) { return; }
/** * Prompt the user to enable location if it isn't already on. * * @param parent The currently visible activity. */
Prompt the user to enable location if it isn't already on
requestLocation
{ "repo_name": "TecMunky/xDrip", "path": "app/src/main/java/com/eveningoutpost/dexdrip/utils/LocationHelper.java", "license": "gpl-3.0", "size": 7833 }
[ "android.app.Activity" ]
import android.app.Activity;
import android.app.*;
[ "android.app" ]
android.app;
2,446,122
@Test public void addressChange() throws Exception { final DeviceObjectPropertyReferences refs = new DeviceObjectPropertyReferences() // .add(6, ObjectType.device, 6, PropertyIdentifier.objectName); final DeviceObjectPropertyValues expectedValues = new DeviceObjectPropertyValues...
void function() throws Exception { final DeviceObjectPropertyReferences refs = new DeviceObjectPropertyReferences() final DeviceObjectPropertyValues expectedValues = new DeviceObjectPropertyValues() DeviceObjectPropertyValues actualValues = PropertyUtils.readProperties(d1, refs, null, 3000); assertEquals(expectedValues...
/** * A device changes its address, but doesn't send an IAm. Check that we can adapt. */
A device changes its address, but doesn't send an IAm. Check that we can adapt
addressChange
{ "repo_name": "infiniteautomation/BACnet4J", "path": "src/test/java/com/serotonin/bacnet4j/util/PropertyUtilsTest.java", "license": "gpl-3.0", "size": 24785 }
[ "com.serotonin.bacnet4j.LocalDevice", "com.serotonin.bacnet4j.RemoteDevice", "com.serotonin.bacnet4j.npdu.test.TestNetwork", "com.serotonin.bacnet4j.transport.DefaultTransport", "com.serotonin.bacnet4j.type.constructed.SequenceOf", "com.serotonin.bacnet4j.type.enumerated.ObjectType", "com.serotonin.bacn...
import com.serotonin.bacnet4j.LocalDevice; import com.serotonin.bacnet4j.RemoteDevice; import com.serotonin.bacnet4j.npdu.test.TestNetwork; import com.serotonin.bacnet4j.transport.DefaultTransport; import com.serotonin.bacnet4j.type.constructed.SequenceOf; import com.serotonin.bacnet4j.type.enumerated.ObjectType; impor...
import com.serotonin.bacnet4j.*; import com.serotonin.bacnet4j.npdu.test.*; import com.serotonin.bacnet4j.transport.*; import com.serotonin.bacnet4j.type.constructed.*; import com.serotonin.bacnet4j.type.enumerated.*; import com.serotonin.bacnet4j.type.primitive.*; import org.junit.*;
[ "com.serotonin.bacnet4j", "org.junit" ]
com.serotonin.bacnet4j; org.junit;
2,881,081
private void setBufferSize(int size) { buf = new byte[size + 3]; buf_length = size; count = 0; } public SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; setBufferSize(1024); }
void function(int size) { buf = new byte[size + 3]; buf_length = size; count = 0; } SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; function(1024); }
/** * Creates or replaces the internal buffer, and makes sure it has a few * extra bytes slight overflow of the last UTF8 encoded character. * @param size */
Creates or replaces the internal buffer, and makes sure it has a few extra bytes slight overflow of the last UTF8 encoded character
setBufferSize
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerTraceWriter.java", "license": "gpl-2.0", "size": 10312 }
[ "java.io.Writer" ]
import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
2,403,896
public ResultSet select(String columns) throws Exception{ return doSelect(false, columns, getTableName(), null); }
ResultSet function(String columns) throws Exception{ return doSelect(false, columns, getTableName(), null); }
/** * Do a select on given columns for all data in table. * * @param columns comma separated column list * @return resulset of data * @throws Exception if something goes wrong */
Do a select on given columns for all data in table
select
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/db/AbstractIndexedTable.java", "license": "gpl-3.0", "size": 11569 }
[ "java.sql.ResultSet" ]
import java.sql.ResultSet;
import java.sql.*;
[ "java.sql" ]
java.sql;
700,507
public static Matcher<? super HttpResponse> isForbidden() { return responsesWith(HttpStatus.SC_FORBIDDEN); }
static Matcher<? super HttpResponse> function() { return responsesWith(HttpStatus.SC_FORBIDDEN); }
/** * Status code matcher. */
Status code matcher
isForbidden
{ "repo_name": "joroKr21/incubator-zeppelin", "path": "zeppelin-server/src/test/java/org/apache/zeppelin/rest/AbstractTestRestApi.java", "license": "apache-2.0", "size": 23533 }
[ "org.apache.http.HttpResponse", "org.apache.http.HttpStatus", "org.hamcrest.Matcher" ]
import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.hamcrest.Matcher;
import org.apache.http.*; import org.hamcrest.*;
[ "org.apache.http", "org.hamcrest" ]
org.apache.http; org.hamcrest;
809,119
@Override public void analyze(Dependency dependency, Engine engine) throws AnalysisException { removeJreEntries(dependency); removeBadMatches(dependency); removeBadSpringMatches(dependency); removeWrongVersionMatches(dependency); removeSpuriousCPE(dependency); rem...
void function(Dependency dependency, Engine engine) throws AnalysisException { removeJreEntries(dependency); removeBadMatches(dependency); removeBadSpringMatches(dependency); removeWrongVersionMatches(dependency); removeSpuriousCPE(dependency); removeDuplicativeEntriesFromJar(dependency, engine); addFalseNegativeCPEs(d...
/** * Analyzes the dependencies and removes bad/incorrect CPE associations based on various heuristics. * * @param dependency the dependency to analyze. * @param engine the engine that is scanning the dependencies * @throws AnalysisException is thrown if there is an error reading the JAR file. ...
Analyzes the dependencies and removes bad/incorrect CPE associations based on various heuristics
analyze
{ "repo_name": "sirkkalap/DependencyCheck", "path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/FalsePositiveAnalyzer.java", "license": "apache-2.0", "size": 22246 }
[ "org.owasp.dependencycheck.Engine", "org.owasp.dependencycheck.analyzer.exception.AnalysisException", "org.owasp.dependencycheck.dependency.Dependency" ]
import org.owasp.dependencycheck.Engine; import org.owasp.dependencycheck.analyzer.exception.AnalysisException; import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.*; import org.owasp.dependencycheck.analyzer.exception.*; import org.owasp.dependencycheck.dependency.*;
[ "org.owasp.dependencycheck" ]
org.owasp.dependencycheck;
1,042,640
private void processSymbolicName(String line) { if (line.startsWith("\t")) { line = line.trim(); int idx = line.lastIndexOf(':'); if(idx<0) { // ??? return; } String symbol = line.substring(0,idx); Match...
void function(String line) { if (line.startsWith("\t")) { line = line.trim(); int idx = line.lastIndexOf(':'); if(idx<0) { return; } String symbol = line.substring(0,idx); Matcher m = DOT_PATTERN.matcher(line.substring(idx + 2)); if(!m.matches()) return; branches.put(m.group(1)+m.group(3)+'.',symbol); } else if (line.s...
/** * Obtains the revision name list */
Obtains the revision name list
processSymbolicName
{ "repo_name": "fujibee/hudson", "path": "core/src/main/java/hudson/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java", "license": "mit", "size": 12173 }
[ "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;
2,681,410
public Builder calls(List<CallGraph> calls) { JodaBeanUtils.notNull(calls, "calls"); this._calls = calls; return this; }
Builder function(List<CallGraph> calls) { JodaBeanUtils.notNull(calls, "calls"); this._calls = calls; return this; }
/** * Sets the {@code calls} property in the builder. * @param calls the new value, not null * @return this, for chaining, not null */
Sets the calls property in the builder
calls
{ "repo_name": "jeorme/OG-Platform", "path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/trace/CallGraph.java", "license": "apache-2.0", "size": 29050 }
[ "java.util.List", "org.joda.beans.JodaBeanUtils" ]
import java.util.List; import org.joda.beans.JodaBeanUtils;
import java.util.*; import org.joda.beans.*;
[ "java.util", "org.joda.beans" ]
java.util; org.joda.beans;
721,685
protected void init(final Executor listenerExecutor) { // Now begin the "real" initialization. // Corner case: List is empty. if (futures.isEmpty()) { set(combiner.combine(ImmutableList.<Optional<V>>of())); return; } // Populate the results list with null initially. ...
void function(final Executor listenerExecutor) { if (futures.isEmpty()) { set(combiner.combine(ImmutableList.<Optional<V>>of())); return; } for (int i = 0; i < futures.size(); ++i) { values.add(null); }
/** * Must be called at the end of the constructor. */
Must be called at the end of the constructor
init
{ "repo_name": "danielnorberg/guava-libraries", "path": "guava/src/com/google/common/util/concurrent/Futures.java", "license": "apache-2.0", "size": 82612 }
[ "com.google.common.base.Optional", "com.google.common.collect.ImmutableList", "java.util.concurrent.Executor" ]
import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import java.util.concurrent.Executor;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.concurrent.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,168,185
private void pushScope(Scope s, boolean quietly) { Preconditions.checkState(curNode != null); compiler.setScope(s.getRootNode()); scopes.push(s); if (NodeUtil.isValidCfgRoot(s.getRootNode())) { cfgs.push(null); } if (!quietly && scopeCallback != null) { scopeCallback.enterScope(thi...
void function(Scope s, boolean quietly) { Preconditions.checkState(curNode != null); compiler.setScope(s.getRootNode()); scopes.push(s); if (NodeUtil.isValidCfgRoot(s.getRootNode())) { cfgs.push(null); } if (!quietly && scopeCallback != null) { scopeCallback.enterScope(this); } }
/** * Creates a new scope (e.g. when entering a function). * @param quietly Don't fire an enterScope callback. */
Creates a new scope (e.g. when entering a function)
pushScope
{ "repo_name": "mbebenita/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeTraversal.java", "license": "apache-2.0", "size": 25109 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,107,018
public static ArrayList unZip(String baseDir, InputStream is) throws IOException { ArrayList files = new ArrayList(); ZipInputStream zis = new ZipInputStream(is); while (true) { // Get the next zip entry. Break out of the loop if there are // no more. ...
static ArrayList function(String baseDir, InputStream is) throws IOException { ArrayList files = new ArrayList(); ZipInputStream zis = new ZipInputStream(is); while (true) { ZipEntry zipEntry = zis.getNextEntry(); if (zipEntry == null) break; String entryName = zipEntry.getName(); if (FILE_SEPARATOR.equalsIgnoreCase("\...
/** * * Extracts Zip file contents relative to baseDir * @return An ArrayList containing the File instances for each unzipped file */
Extracts Zip file contents relative to baseDir
unZip
{ "repo_name": "jembi/openxds", "path": "openxds-repository/src/main/java/org/openhealthtools/openxds/repository/Utility.java", "license": "apache-2.0", "size": 20498 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.util.ArrayList", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream;
import java.io.*; import java.util.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
729,676
@Test public void testAddLotsOfAttachments() throws ClientProtocolException, IOException, InvalidJsonAssetException { int numAttachments = 100; Asset testAsset = AssetUtils.getTestAsset(); Asset returnedAsset = repository.addAssetNoAttachments(testAsset); ArrayList<Attachment> ...
void function() throws ClientProtocolException, IOException, InvalidJsonAssetException { int numAttachments = 100; Asset testAsset = AssetUtils.getTestAsset(); Asset returnedAsset = repository.addAssetNoAttachments(testAsset); ArrayList<Attachment> attachments = new ArrayList<>(); ArrayList<String> names = new ArrayLis...
/** * Creates an asset with multiple attachments and then verify that these attachments can be * retrieved correctly and with the same content that we uploaded. */
Creates an asset with multiple attachments and then verify that these attachments can be retrieved correctly and with the same content that we uploaded
testAddLotsOfAttachments
{ "repo_name": "ashleyrobertson/tool.lars", "path": "server/src/fat/java/com/ibm/ws/lars/rest/ApiTest.java", "license": "apache-2.0", "size": 60868 }
[ "com.ibm.ws.lars.rest.exceptions.InvalidJsonAssetException", "com.ibm.ws.lars.rest.model.Asset", "com.ibm.ws.lars.rest.model.Attachment", "com.ibm.ws.lars.rest.model.AttachmentList", "java.io.IOException", "java.util.ArrayList", "java.util.HashMap", "java.util.Map", "org.apache.http.client.ClientPro...
import com.ibm.ws.lars.rest.exceptions.InvalidJsonAssetException; import com.ibm.ws.lars.rest.model.Asset; import com.ibm.ws.lars.rest.model.Attachment; import com.ibm.ws.lars.rest.model.AttachmentList; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import org.ap...
import com.ibm.ws.lars.rest.exceptions.*; import com.ibm.ws.lars.rest.model.*; import java.io.*; import java.util.*; import org.apache.http.client.*; import org.apache.http.entity.*; import org.junit.*;
[ "com.ibm.ws", "java.io", "java.util", "org.apache.http", "org.junit" ]
com.ibm.ws; java.io; java.util; org.apache.http; org.junit;
509,489
public static void assertListStatusFinds(FileSystem fs, Path dir, Path subdir) throws IOException { FileStatus[] stats = fs.listStatus(dir); boolean found = false; StringBuilder builder = new StringBuilder(); for (Fi...
static void function(FileSystem fs, Path dir, Path subdir) throws IOException { FileStatus[] stats = fs.listStatus(dir); boolean found = false; StringBuilder builder = new StringBuilder(); for (FileStatus stat : stats) { builder.append(stat.toString()).append(System.lineSeparator()); if (stat.getPath().equals(subdir)) ...
/** * Assert that a FileSystem.listStatus on a dir finds the subdir/child entry. * @param fs filesystem * @param dir directory to scan * @param subdir full path to look for * @throws IOException IO probles */
Assert that a FileSystem.listStatus on a dir finds the subdir/child entry
assertListStatusFinds
{ "repo_name": "littlezhou/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/ContractTestUtils.java", "license": "apache-2.0", "size": 59278 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
686,381
public void disable(int what) { try { final IStatusBarService svc = getService(); if (svc != null) { svc.disable(what, mToken, mContext.getPackageName()); } } catch (RemoteException ex) { // system process is dead anyway. th...
void function(int what) { try { final IStatusBarService svc = getService(); if (svc != null) { svc.disable(what, mToken, mContext.getPackageName()); } } catch (RemoteException ex) { throw new RuntimeException(ex); } }
/** * Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags. * To re-enable everything, pass {@link #DISABLE_NONE}. */
Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags. To re-enable everything, pass <code>#DISABLE_NONE</code>
disable
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/app/StatusBarManager.java", "license": "apache-2.0", "size": 6572 }
[ "android.os.RemoteException", "com.android.internal.statusbar.IStatusBarService" ]
import android.os.RemoteException; import com.android.internal.statusbar.IStatusBarService;
import android.os.*; import com.android.internal.statusbar.*;
[ "android.os", "com.android.internal" ]
android.os; com.android.internal;
1,730,895
@Override public void onNeutral(String callerTag) { ComponentsGetter cg = (ComponentsGetter)getSherlockActivity(); cg.getFileOperationsHelper().removeFile(mTargetFile, true); FileDataStorageManager storageManager = cg.getStorageManager(); boolean containsKeepInS...
void function(String callerTag) { ComponentsGetter cg = (ComponentsGetter)getSherlockActivity(); cg.getFileOperationsHelper().removeFile(mTargetFile, true); FileDataStorageManager storageManager = cg.getStorageManager(); boolean containsKeepInSync = false; if (mTargetFile.isFolder()) { Vector<OCFile> files = storageMan...
/** * Performs the removal of the local copy of the target file * @author Mohammadreza.Meysami */
Performs the removal of the local copy of the target file
onNeutral
{ "repo_name": "Maysami/elenoon-drive", "path": "src/com/elenoondrive/android/ui/dialog/RemoveFileDialogFragment.java", "license": "gpl-2.0", "size": 5236 }
[ "com.elenoondrive.android.datamodel.FileDataStorageManager", "com.elenoondrive.android.datamodel.OCFile", "com.elenoondrive.android.ui.activity.ComponentsGetter", "java.util.Vector" ]
import com.elenoondrive.android.datamodel.FileDataStorageManager; import com.elenoondrive.android.datamodel.OCFile; import com.elenoondrive.android.ui.activity.ComponentsGetter; import java.util.Vector;
import com.elenoondrive.android.datamodel.*; import com.elenoondrive.android.ui.activity.*; import java.util.*;
[ "com.elenoondrive.android", "java.util" ]
com.elenoondrive.android; java.util;
950,891
@SuppressWarnings("unused") private void copyHeapDefs(IR ir, HashMap<Instruction, HeapOperand<?>[]> store) { SSADictionary dictionary = ir.HIRInfo.dictionary; for (Enumeration<BasicBlock> be = ir.forwardBlockEnumerator(); be.hasMoreElements();) { BasicBlock bb = be.nextElement(); for (Enumeratio...
@SuppressWarnings(STR) void function(IR ir, HashMap<Instruction, HeapOperand<?>[]> store) { SSADictionary dictionary = ir.HIRInfo.dictionary; for (Enumeration<BasicBlock> be = ir.forwardBlockEnumerator(); be.hasMoreElements();) { BasicBlock bb = be.nextElement(); for (Enumeration<Instruction> e = dictionary.getAllInstr...
/** * Store a copy of the Heap variables each instruction defs. * * @param ir governing IR * @param store place to store copies */
Store a copy of the Heap variables each instruction defs
copyHeapDefs
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/ssa/EnterSSA.java", "license": "epl-1.0", "size": 44804 }
[ "java.util.Enumeration", "java.util.HashMap", "org.jikesrvm.compilers.opt.ir.BasicBlock", "org.jikesrvm.compilers.opt.ir.Instruction", "org.jikesrvm.compilers.opt.ir.operand.HeapOperand" ]
import java.util.Enumeration; import java.util.HashMap; import org.jikesrvm.compilers.opt.ir.BasicBlock; import org.jikesrvm.compilers.opt.ir.Instruction; import org.jikesrvm.compilers.opt.ir.operand.HeapOperand;
import java.util.*; import org.jikesrvm.compilers.opt.ir.*; import org.jikesrvm.compilers.opt.ir.operand.*;
[ "java.util", "org.jikesrvm.compilers" ]
java.util; org.jikesrvm.compilers;
1,513,584
@MBeanAttribute(name="Queues",description = "All queue names") String[] getAllQueueNames();
@MBeanAttribute(name=STR,description = STR) String[] getAllQueueNames();
/*** * Retrieve all destination queue names. * @return List of queue names. */
Retrieve all destination queue names
getAllQueueNames
{ "repo_name": "AnujaLK/andes", "path": "modules/andes-core/management/common/src/main/java/org/wso2/andes/management/common/mbeans/QueueManagementInformation.java", "license": "apache-2.0", "size": 8540 }
[ "org.wso2.andes.management.common.mbeans.annotations.MBeanAttribute" ]
import org.wso2.andes.management.common.mbeans.annotations.MBeanAttribute;
import org.wso2.andes.management.common.mbeans.annotations.*;
[ "org.wso2.andes" ]
org.wso2.andes;
2,212,544
@Override public void truncate(long len) throws SQLException { throw unsupported("LOB update"); }
void function(long len) throws SQLException { throw unsupported(STR); }
/** * [Not supported] Truncates the object. * * @param len the new length */
[Not supported] Truncates the object
truncate
{ "repo_name": "wizardofos/Protozoo", "path": "extra/h2/src/main/java/org/h2/jdbc/JdbcBlob.java", "license": "mit", "size": 10418 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
135,239
@Override public String toPNML() { //id 0 //idref 0 //attributes 0 //sons 2 Boolean prettyPrintStatus = ModelRepository.getInstance().isPrettyPrintActive(); String retline = ""; String headline = ""; PrettyPrintData prpd = null; if (prettyPrintStatus) { retline = "\n"; prpd = ModelRepositor...
String function() { Boolean prettyPrintStatus = ModelRepository.getInstance().isPrettyPrintActive(); String retline = STRSTR\nSTR<makelistSTR>STR<STRsubtermSTR>STR</STRsubtermSTR>STRSTR</makelist>STR>STR/>"); } return sb.toString(); }
/** * Return the string containing the pnml output */
Return the string containing the pnml output
toPNML
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/impl/MakeListImpl.java", "license": "epl-1.0", "size": 30157 }
[ "fr.lip6.move.pnml.framework.utils.ModelRepository" ]
import fr.lip6.move.pnml.framework.utils.ModelRepository;
import fr.lip6.move.pnml.framework.utils.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,551,424
@Override protected boolean beforeSave(boolean newRecord) { // Client/Org Check if (getAD_Org_ID() == 0) { int context_AD_Org_ID = Env.getAD_Org_ID(getCtx()); if (context_AD_Org_ID != 0) { setAD_Org_ID(context_AD_Org_ID); log.warn("Changed Org to Context=" + context_AD_Org_ID); } } if...
boolean function(boolean newRecord) { if (getAD_Org_ID() == 0) { int context_AD_Org_ID = Env.getAD_Org_ID(getCtx()); if (context_AD_Org_ID != 0) { setAD_Org_ID(context_AD_Org_ID); log.warn(STR + context_AD_Org_ID); } } if (getAD_Client_ID() == 0) { m_processMsg = STR; return false; } if (newRecord && getC_DocType_ID() ...
/************************************************************************** * Before Save * * @param newRecord new * @return save */
Before Save
beforeSave
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.business/src/main/java-legacy/org/compiere/model/MOrder.java", "license": "gpl-2.0", "size": 76411 }
[ "de.metas.adempiere.service.IOrderBL", "org.adempiere.util.Services", "org.compiere.util.DB", "org.compiere.util.Env" ]
import de.metas.adempiere.service.IOrderBL; import org.adempiere.util.Services; import org.compiere.util.DB; import org.compiere.util.Env;
import de.metas.adempiere.service.*; import org.adempiere.util.*; import org.compiere.util.*;
[ "de.metas.adempiere", "org.adempiere.util", "org.compiere.util" ]
de.metas.adempiere; org.adempiere.util; org.compiere.util;
731,057
public ReportSynthesisFlagshipProgressInnovation saveReportSynthesisFlagshipProgressInnovation( ReportSynthesisFlagshipProgressInnovation reportSynthesisFlagshipProgressInnovation);
ReportSynthesisFlagshipProgressInnovation function( ReportSynthesisFlagshipProgressInnovation reportSynthesisFlagshipProgressInnovation);
/** * This method saves the information of the given reportSynthesisFlagshipProgressInnovation * * @param reportSynthesisFlagshipProgressInnovation - is the reportSynthesisFlagshipProgressInnovation object with the * new information to be added/updated. * @return a number greater than 0 represent...
This method saves the information of the given reportSynthesisFlagshipProgressInnovation
saveReportSynthesisFlagshipProgressInnovation
{ "repo_name": "CCAFS/MARLO", "path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ReportSynthesisFlagshipProgressInnovationManager.java", "license": "gpl-3.0", "size": 5690 }
[ "org.cgiar.ccafs.marlo.data.model.ReportSynthesisFlagshipProgressInnovation" ]
import org.cgiar.ccafs.marlo.data.model.ReportSynthesisFlagshipProgressInnovation;
import org.cgiar.ccafs.marlo.data.model.*;
[ "org.cgiar.ccafs" ]
org.cgiar.ccafs;
1,701,233
@Test public void testBinNumber() throws Exception { result = defaultIsisLspBin.binNumber(); assertThat(result, is(1)); }
void function() throws Exception { result = defaultIsisLspBin.binNumber(); assertThat(result, is(1)); }
/** * Tests binNumber() method. */
Tests binNumber() method
testBinNumber
{ "repo_name": "kuujo/onos", "path": "protocols/isis/ctl/src/test/java/org/onosproject/isis/controller/impl/lsdb/DefaultIsisLspBinTest.java", "license": "apache-2.0", "size": 2974 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
2,700,717
public MailMessageConverter getMessageConverter() { return messageConverter; }
MailMessageConverter function() { return messageConverter; }
/** * Gets the mail message converter. * @return */
Gets the mail message converter
getMessageConverter
{ "repo_name": "hmmlopez/citrus", "path": "modules/citrus-mail/src/main/java/com/consol/citrus/mail/client/MailEndpointConfiguration.java", "license": "apache-2.0", "size": 5664 }
[ "com.consol.citrus.mail.message.MailMessageConverter" ]
import com.consol.citrus.mail.message.MailMessageConverter;
import com.consol.citrus.mail.message.*;
[ "com.consol.citrus" ]
com.consol.citrus;
2,546,885
List<String[]> getSamplerParameterList();
List<String[]> getSamplerParameterList();
/** * return parameter,value pairs for use with Logger etc * @return */
return parameter,value pairs for use with Logger etc
getSamplerParameterList
{ "repo_name": "hxnx-sam/DiscreteSpatialPhyloSimulator", "path": "src/individualBasedModel/Sampler.java", "license": "gpl-3.0", "size": 941 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
877,752
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> beginDeleteAsync( String resourceGroupName, String serverName, String elasticPoolName);
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> beginDeleteAsync( String resourceGroupName, String serverName, String elasticPoolName);
/** * Deletes an elastic pool. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param elasticPoolName The name of the ela...
Deletes an elastic pool
beginDeleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java", "license": "mit", "size": 39632 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.PollerFlux" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*;
[ "com.azure.core" ]
com.azure.core;
2,758,276
// Don't delete this method. It's called from runtime.scm. public static void unregisterEventForDelegation(HandlesEventDispatching dispatchDelegate, String componentId, String eventName) { EventRegistry er = getEventRegistry(dispatchDelegate); Set<EventClosu...
static void function(HandlesEventDispatching dispatchDelegate, String componentId, String eventName) { EventRegistry er = getEventRegistry(dispatchDelegate); Set<EventClosure> eventClosures = er.eventClosuresMap.get(eventName); if (eventClosures == null eventClosures.isEmpty()) { return; } Set<EventClosure> toDelete = ...
/** * Unregisters a dispatchDelegate for handling event dispatching for the event with the specified * component id and event name. * * @param dispatchDelegate object responsible for dispatching the event * @param componentId id of component associated with event handler * @param eventName name of ...
Unregisters a dispatchDelegate for handling event dispatching for the event with the specified component id and event name
unregisterEventForDelegation
{ "repo_name": "Mateopato/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/EventDispatcher.java", "license": "apache-2.0", "size": 8800 }
[ "android.util.Log", "java.util.HashSet", "java.util.Set" ]
import android.util.Log; import java.util.HashSet; import java.util.Set;
import android.util.*; import java.util.*;
[ "android.util", "java.util" ]
android.util; java.util;
804,247
@RequestMapping(value = "/{type}/{name}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK) public void unregister(@PathVariable("type") ArtifactType type, @PathVariable("name") String name) { Assert.isTrue(type != ArtifactType.library, "Only modules are supported by this endpoint"); registry.delet...
@RequestMapping(value = STR, method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK) void function(@PathVariable("type") ArtifactType type, @PathVariable("name") String name) { Assert.isTrue(type != ArtifactType.library, STR); registry.delete(name, type); } class Assembler extends ResourceAssemblerSupport<Artifac...
/** * Unregister a module name and type. * @param type the module type * @param name the module name */
Unregister a module name and type
unregister
{ "repo_name": "pperalta/spring-cloud-dataflow", "path": "spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/ModuleController.java", "license": "apache-2.0", "size": 8001 }
[ "org.springframework.cloud.dataflow.artifact.registry.ArtifactRegistration", "org.springframework.cloud.dataflow.core.ArtifactType", "org.springframework.cloud.dataflow.rest.resource.ModuleRegistrationResource", "org.springframework.hateoas.mvc.ResourceAssemblerSupport", "org.springframework.http.HttpStatus...
import org.springframework.cloud.dataflow.artifact.registry.ArtifactRegistration; import org.springframework.cloud.dataflow.core.ArtifactType; import org.springframework.cloud.dataflow.rest.resource.ModuleRegistrationResource; import org.springframework.hateoas.mvc.ResourceAssemblerSupport; import org.springframework.h...
import org.springframework.cloud.dataflow.artifact.registry.*; import org.springframework.cloud.dataflow.core.*; import org.springframework.cloud.dataflow.rest.resource.*; import org.springframework.hateoas.mvc.*; import org.springframework.http.*; import org.springframework.util.*; import org.springframework.web.bind....
[ "org.springframework.cloud", "org.springframework.hateoas", "org.springframework.http", "org.springframework.util", "org.springframework.web" ]
org.springframework.cloud; org.springframework.hateoas; org.springframework.http; org.springframework.util; org.springframework.web;
704,726
protected final void bindDefaultScriptingLanguageType(Class<? extends LanguageDriver> defaultScriptingLanguageType) { checkArgument(defaultScriptingLanguageType != null, "Parameter 'defaultScriptingLanguageType' must be not null"); this.defaultScriptingLanguageType = defaultScriptingLanguageType; ...
final void function(Class<? extends LanguageDriver> defaultScriptingLanguageType) { checkArgument(defaultScriptingLanguageType != null, STR); this.defaultScriptingLanguageType = defaultScriptingLanguageType; }
/** * Sets the default LanguageDriver class. * <p> * Due to current limitations in MyBatis, &#64;Inject cannot be used in LanguageDriver class. * </p> * * @param defaultScriptingLanguageType the default LanguageDriver type */
Sets the default LanguageDriver class. Due to current limitations in MyBatis, &#64;Inject cannot be used in LanguageDriver class.
bindDefaultScriptingLanguageType
{ "repo_name": "johnzeringue/guice", "path": "src/main/java/org/mybatis/guice/MyBatisModule.java", "license": "apache-2.0", "size": 24419 }
[ "org.apache.ibatis.scripting.LanguageDriver", "org.mybatis.guice.Preconditions" ]
import org.apache.ibatis.scripting.LanguageDriver; import org.mybatis.guice.Preconditions;
import org.apache.ibatis.scripting.*; import org.mybatis.guice.*;
[ "org.apache.ibatis", "org.mybatis.guice" ]
org.apache.ibatis; org.mybatis.guice;
330,277
public GridTaskSessionProcessor session();
GridTaskSessionProcessor function();
/** * Gets task session processor. * * @return Session processor. */
Gets task session processor
session
{ "repo_name": "vladisav/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 18966 }
[ "org.apache.ignite.internal.processors.session.GridTaskSessionProcessor" ]
import org.apache.ignite.internal.processors.session.GridTaskSessionProcessor;
import org.apache.ignite.internal.processors.session.*;
[ "org.apache.ignite" ]
org.apache.ignite;
284,296
@Mapping(method = Http.POST, path = "/{updateName}") public String postName(@Param(name = "updateName", source = ParamSource.PATH) final String updateName) { Objects.nonNull(updateName); return updateName; }
@Mapping(method = Http.POST, path = STR) String function(@Param(name = STR, source = ParamSource.PATH) final String updateName) { Objects.nonNull(updateName); return updateName; }
/** * Update name. * * @param updateName the name * @return updated name */
Update name
postName
{ "repo_name": "elasticjob/elastic-job", "path": "elasticjob-ecosystem/elasticjob-executor/elasticjob-executor-type/elasticjob-http-executor/src/test/java/org/apache/shardingsphere/elasticjob/http/executor/fixture/InternalController.java", "license": "apache-2.0", "size": 2645 }
[ "java.util.Objects", "org.apache.shardingsphere.elasticjob.restful.Http", "org.apache.shardingsphere.elasticjob.restful.annotation.Mapping", "org.apache.shardingsphere.elasticjob.restful.annotation.Param", "org.apache.shardingsphere.elasticjob.restful.annotation.ParamSource" ]
import java.util.Objects; import org.apache.shardingsphere.elasticjob.restful.Http; import org.apache.shardingsphere.elasticjob.restful.annotation.Mapping; import org.apache.shardingsphere.elasticjob.restful.annotation.Param; import org.apache.shardingsphere.elasticjob.restful.annotation.ParamSource;
import java.util.*; import org.apache.shardingsphere.elasticjob.restful.*; import org.apache.shardingsphere.elasticjob.restful.annotation.*;
[ "java.util", "org.apache.shardingsphere" ]
java.util; org.apache.shardingsphere;
1,140,378
public void renameMailbox(Mailbox source, String dest);
void function(Mailbox source, String dest);
/** * Rename the mailbox. * * @param source * the mailbox to rename * @param dest * new name for the mailbox */
Rename the mailbox
renameMailbox
{ "repo_name": "gtrak/hedwig", "path": "hedwig-api/src/main/java/com/hs/mail/imap/dao/MailboxDao.java", "license": "apache-2.0", "size": 6997 }
[ "com.hs.mail.imap.mailbox.Mailbox" ]
import com.hs.mail.imap.mailbox.Mailbox;
import com.hs.mail.imap.mailbox.*;
[ "com.hs.mail" ]
com.hs.mail;
2,247,723
@JsonProperty("phone_number") public String getPhoneNumber() { return phoneNumber; }
@JsonProperty(STR) String function() { return phoneNumber; }
/** * Gets the phone number the code was sent to. * * @return the phone number the code was sent to. */
Gets the phone number the code was sent to
getPhoneNumber
{ "repo_name": "auth0/auth0-api-java", "path": "src/main/java/com/auth0/json/auth/PasswordlessSmsResponse.java", "license": "mit", "size": 1707 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,064,238
public static boolean hasAccessibilityDelegate(@NonNull View view) { return getAccessibilityDelegateInternal(view) != null; }
static boolean function(@NonNull View view) { return getAccessibilityDelegateInternal(view) != null; }
/** * Checks whether provided View has an accessibility delegate attached to it. * * @param view The View instance to check * @return True if the View has an accessibility delegate */
Checks whether provided View has an accessibility delegate attached to it
hasAccessibilityDelegate
{ "repo_name": "AndroidX/androidx", "path": "core/core/src/main/java/androidx/core/view/ViewCompat.java", "license": "apache-2.0", "size": 224652 }
[ "android.view.View", "androidx.annotation.NonNull" ]
import android.view.View; import androidx.annotation.NonNull;
import android.view.*; import androidx.annotation.*;
[ "android.view", "androidx.annotation" ]
android.view; androidx.annotation;
605,197
public boolean readBoundary() throws MalformedStreamException { byte[] marker = new byte[2]; boolean nextChunk = false; head += boundaryLength; try { marker[0] = readByte(); if (marker[0] == LF) { // Work around IE5 Mac bug with in...
boolean function() throws MalformedStreamException { byte[] marker = new byte[2]; boolean nextChunk = false; head += boundaryLength; try { marker[0] = readByte(); if (marker[0] == LF) { return true; } marker[1] = readByte(); if (arrayequals(marker, STREAM_TERMINATOR, 2)) { nextChunk = false; } else if (arrayequals(mark...
/** * Skips a <code>boundary</code> token, and checks whether more * <code>encapsulations</code> are contained in the stream. * * @return <code>true</code> if there are more encapsulations in * this stream; <code>false</code> otherwise. * * @throws MalformedStreamException if ...
Skips a <code>boundary</code> token, and checks whether more <code>encapsulations</code> are contained in the stream
readBoundary
{ "repo_name": "sakai-mirror/k2", "path": "sdata/commons-fileupload-sdata/src/java/org/apache/commons/fileupload/sdata/MultipartStream.java", "license": "apache-2.0", "size": 33435 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
832,044
@Test public void testOpenWorksMultipleTypesOfNumberObjects() throws Exception { JmsSpout spout = new JmsSpout(); try { spout.setJmsProvider(new MockJmsProvider()); spout.setJmsTupleProducer(new MockTupleProducer()); Map<String, Object> configuration = new Has...
void function() throws Exception { JmsSpout spout = new JmsSpout(); try { spout.setJmsProvider(new MockJmsProvider()); spout.setJmsTupleProducer(new MockTupleProducer()); Map<String, Object> configuration = new HashMap<String, Object>(); MockSpoutOutputCollector delegateCollector = new MockSpoutOutputCollector(); Spout...
/** * Make sure that {@link JmsSpout#open} returns correctly regardless of the type of {@link Number} that is the value of {@link * Config#TOPOLOGY_MESSAGE_TIMEOUT_SECS}. */
Make sure that <code>JmsSpout#open</code> returns correctly regardless of the type of <code>Number</code> that is the value of <code>Config#TOPOLOGY_MESSAGE_TIMEOUT_SECS</code>
testOpenWorksMultipleTypesOfNumberObjects
{ "repo_name": "srdo/storm", "path": "external/storm-jms/src/test/java/org/apache/storm/jms/spout/JmsSpoutTest.java", "license": "apache-2.0", "size": 5135 }
[ "java.util.HashMap", "java.util.Map", "org.apache.storm.Config", "org.apache.storm.spout.SpoutOutputCollector" ]
import java.util.HashMap; import java.util.Map; import org.apache.storm.Config; import org.apache.storm.spout.SpoutOutputCollector;
import java.util.*; import org.apache.storm.*; import org.apache.storm.spout.*;
[ "java.util", "org.apache.storm" ]
java.util; org.apache.storm;
2,394,755
private ArrayList<Pin> deserializePins(ArrayNode pinsNode, HashMap<String, ThermalInstance> heaterInstances) { ArrayList<Pin> pins = new ArrayList<Pin>(); for (JsonNode pin : pinsNode) { ThermalInstance instance = heaterInstances.get(pin.get("instance").asText()); pins.add(...
ArrayList<Pin> function(ArrayNode pinsNode, HashMap<String, ThermalInstance> heaterInstances) { ArrayList<Pin> pins = new ArrayList<Pin>(); for (JsonNode pin : pinsNode) { ThermalInstance instance = heaterInstances.get(pin.get(STR).asText()); pins.add(new Pin(pin.get(STR).asBoolean(), pin.get("name").asText(), instance...
/** * Method supports main deserialization method. It deserializes * the pins which are members of Net object. * * @param pinsNode JSON ArrayNode object * @param heaterInstances Reference to heaterInstance * @return ArrayList of Pins objects */
Method supports main deserialization method. It deserializes the pins which are members of Net object
deserializePins
{ "repo_name": "ComputerArchitectureGroupPWr/JGenerilo", "path": "src/main/java/pl/edu/pwr/iiar/zak/thermalKit/deserializers/HeaterUnitDeserializer.java", "license": "mit", "size": 7622 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.node.ArrayNode", "edu.byu.ece.rapidSmith.design.Pin", "java.util.ArrayList", "java.util.HashMap", "pl.edu.pwr.iiar.zak.thermalKit.ThermalDesign" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import edu.byu.ece.rapidSmith.design.Pin; import java.util.ArrayList; import java.util.HashMap; import pl.edu.pwr.iiar.zak.thermalKit.ThermalDesign;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import edu.byu.ece.*; import java.util.*; import pl.edu.pwr.iiar.zak.*;
[ "com.fasterxml.jackson", "edu.byu.ece", "java.util", "pl.edu.pwr" ]
com.fasterxml.jackson; edu.byu.ece; java.util; pl.edu.pwr;
1,873,324
public void makeFights(List<Fight> fights, String name, String filename) throws FileNotFoundException, IOException { Document doc = XmlHelper.createDocument(null); Node fightGroupNode; if (zip) { XMLFightGroup xmlFightGroup = new XMLFightGroup(doc, fights, name, ""); ...
void function(List<Fight> fights, String name, String filename) throws FileNotFoundException, IOException { Document doc = XmlHelper.createDocument(null); Node fightGroupNode; if (zip) { XMLFightGroup xmlFightGroup = new XMLFightGroup(doc, fights, name, ""); xmlFightGroup.setFileNumberIndex(index); fightGroupNode = xml...
/** * Make a boss fights XML group. * Already made boss fights must be passed into this method because of dependency issues. * @param fights The fights to write * @param name The name to be set in the index file * @param filename The filename to use for the index file */
Make a boss fights XML group. Already made boss fights must be passed into this method because of dependency issues
makeFights
{ "repo_name": "setjmp2013/WowLogParser", "path": "src/wowlogparserbase/xml/XMLReport.java", "license": "gpl-2.0", "size": 5440 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.util.List", "org.w3c.dom.Document", "org.w3c.dom.Node" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import org.w3c.dom.Document; import org.w3c.dom.Node;
import java.io.*; import java.util.*; import org.w3c.dom.*;
[ "java.io", "java.util", "org.w3c.dom" ]
java.io; java.util; org.w3c.dom;
270,289
private void stopRouteListInfoRetrievalTask() { if (m_routeListAsyncTask != null) { m_routeListAsyncTask.cancel(false); m_routeListAsyncTask = null; } } ///////////////////////////////////////////////////////////////////////// private static class RouteListAdapter extends BaseAdapter { ...
void function() { if (m_routeListAsyncTask != null) { m_routeListAsyncTask.cancel(false); m_routeListAsyncTask = null; } } private static class RouteListAdapter extends BaseAdapter { RouteListAdapter(Context context) { m_layoutInflater = LayoutInflater.from(context); }
/** * Stops a previously started AsyncTask. */
Stops a previously started AsyncTask
stopRouteListInfoRetrievalTask
{ "repo_name": "almgong/NFD-android", "path": "app/src/main/java/net/named_data/nfd/RouteListFragment.java", "license": "gpl-3.0", "size": 17524 }
[ "android.content.Context", "android.view.LayoutInflater", "android.widget.BaseAdapter" ]
import android.content.Context; import android.view.LayoutInflater; import android.widget.BaseAdapter;
import android.content.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
2,342,423
public PDColor getStrokingColor() { return strokingColor; }
PDColor function() { return strokingColor; }
/** * Returns the stroking color. * * @return stroking color */
Returns the stroking color
getStrokingColor
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/PDGraphicsState.java", "license": "apache-2.0", "size": 16193 }
[ "org.apache.pdfbox.pdmodel.graphics.color.PDColor" ]
import org.apache.pdfbox.pdmodel.graphics.color.PDColor;
import org.apache.pdfbox.pdmodel.graphics.color.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
771,701
public void update() { if (this.world != null && !this.world.isRemote && this.world.getTotalWorldTime() % 20L == 0L) { this.blockType = this.getBlockType(); if (this.blockType instanceof BlockDaylightDetector) { ((BlockDaylightDetector...
void function() { if (this.world != null && !this.world.isRemote && this.world.getTotalWorldTime() % 20L == 0L) { this.blockType = this.getBlockType(); if (this.blockType instanceof BlockDaylightDetector) { ((BlockDaylightDetector)this.blockType).updatePower(this.world, this.pos); } } }
/** * Like the old updateEntity(), except more generic. */
Like the old updateEntity(), except more generic
update
{ "repo_name": "lucemans/ShapeClient-SRC", "path": "net/minecraft/tileentity/TileEntityDaylightDetector.java", "license": "mpl-2.0", "size": 697 }
[ "net.minecraft.block.BlockDaylightDetector" ]
import net.minecraft.block.BlockDaylightDetector;
import net.minecraft.block.*;
[ "net.minecraft.block" ]
net.minecraft.block;
535,132
@Override public void configure(TestElement el) { super.configure(el); CoAPResponseAssertion model = (CoAPResponseAssertion) el; if (model.isContainsType()) { containsBox.setSelected(true); matchesBox.setSelected(false); equalsBox.setSelected(false); } else if (model.isEqualsType...
void function(TestElement el) { super.configure(el); CoAPResponseAssertion model = (CoAPResponseAssertion) el; if (model.isContainsType()) { containsBox.setSelected(true); matchesBox.setSelected(false); equalsBox.setSelected(false); } else if (model.isEqualsType()) { containsBox.setSelected(false); matchesBox.setSelect...
/** * A newly created component can be initialized with the contents of a Test * Element object by calling this method. The component is responsible for * querying the Test Element object for the relevant information to display * in its GUI. * * @param el * the TestElement to configure */
A newly created component can be initialized with the contents of a Test Element object by calling this method. The component is responsible for querying the Test Element object for the relevant information to display in its GUI
configure
{ "repo_name": "Tanganelli/jmeter-coap", "path": "src/it/unipi/jmeter/assertion/coap/gui/CoAPResponseAssertionGui.java", "license": "gpl-2.0", "size": 12686 }
[ "it.unipi.jmeter.assertion.coap.CoAPResponseAssertion", "org.apache.jmeter.testelement.TestElement", "org.apache.jmeter.testelement.property.PropertyIterator" ]
import it.unipi.jmeter.assertion.coap.CoAPResponseAssertion; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.property.PropertyIterator;
import it.unipi.jmeter.assertion.coap.*; import org.apache.jmeter.testelement.*; import org.apache.jmeter.testelement.property.*;
[ "it.unipi.jmeter", "org.apache.jmeter" ]
it.unipi.jmeter; org.apache.jmeter;
2,496,141
public static String getSHA1Hash(String plainText) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA1"); md.update(plainText.getBytes()); byte[] mdbytes = md.digest(); StringBuffer hexString = new StringBuffer(); for (int i = 0; i < mdbytes.length; i++) { Stri...
static String function(String plainText) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA1"); md.update(plainText.getBytes()); byte[] mdbytes = md.digest(); StringBuffer hexString = new StringBuffer(); for (int i = 0; i < mdbytes.length; i++) { String hex = Integer.toHexString(0xFF & ...
/** * Gets the hash of a plaintext String using * the SHA1 algorithm * * @param plainText the plain text * @return the hash * @throws NoSuchAlgorithmException */
Gets the hash of a plaintext String using the SHA1 algorithm
getSHA1Hash
{ "repo_name": "bobbrady/tpteam", "path": "tpmanager/src/edu/harvard/fas/rbrady/tpteam/tpmanager/http/ServletUtil.java", "license": "mit", "size": 20300 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.security.*;
[ "java.security" ]
java.security;
2,158,657
public static SaslResponseWithNegotiatedCipherOption readSaslMessageAndNegotiatedCipherOption(InputStream in) throws IOException { return readSaslMessage(in, proto -> { byte[] response = proto.getPayload().toByteArray(); List<CipherOption> options = PBHelperClient.convertCipherOptionProtos...
static SaslResponseWithNegotiatedCipherOption function(InputStream in) throws IOException { return readSaslMessage(in, proto -> { byte[] response = proto.getPayload().toByteArray(); List<CipherOption> options = PBHelperClient.convertCipherOptionProtos( proto.getCipherOptionList()); CipherOption option = null; if (optio...
/** * Read SASL message and negotiated cipher option from server. * * @param in stream to read * @return SaslResponseWithNegotiatedCipherOption SASL message and * negotiated cipher option * @throws IOException for any error */
Read SASL message and negotiated cipher option from server
readSaslMessageAndNegotiatedCipherOption
{ "repo_name": "mapr/hadoop-common", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java", "license": "apache-2.0", "size": 22893 }
[ "java.io.IOException", "java.io.InputStream", "java.util.List", "org.apache.hadoop.crypto.CipherOption", "org.apache.hadoop.hdfs.protocolPB.PBHelperClient" ]
import java.io.IOException; import java.io.InputStream; import java.util.List; import org.apache.hadoop.crypto.CipherOption; import org.apache.hadoop.hdfs.protocolPB.PBHelperClient;
import java.io.*; import java.util.*; import org.apache.hadoop.crypto.*; import org.apache.hadoop.hdfs.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
91,665
public DataNode setBend_angle_yScalar(double bend_angle_y);
DataNode function(double bend_angle_y);
/** * TODO: documentation needed * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_ANGLE * </p> * * @param bend_angle_y the bend_angle_y */
Type: NX_FLOAT Units: NX_ANGLE
setBend_angle_yScalar
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXguide.java", "license": "epl-1.0", "size": 16534 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode;
import org.eclipse.dawnsci.analysis.api.tree.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
104,454
private static void computeDependentRoutesIteration( List<VirtualRouter> vrs, String iterationLabel, Map<String, Node> allNodes, NetworkConfigurations networkConfigurations, DataPlaneTrackMethodEvaluatorProvider provider, int iteration) { Span overallSpan = GlobalTracer...
static void function( List<VirtualRouter> vrs, String iterationLabel, Map<String, Node> allNodes, NetworkConfigurations networkConfigurations, DataPlaneTrackMethodEvaluatorProvider provider, int iteration) { Span overallSpan = GlobalTracer.get().buildSpan(iterationLabel + STR).start(); LOGGER.info(STR, iterationLabel);...
/** * Perform one iteration of the "dependent routes" dataplane computation. Dependent routes refers * to routes that could change because other routes have changed. For example, this includes: * * <ul> * <li>static routes with next hop IP * <li>aggregate routes * <li>EGP routes (various prot...
Perform one iteration of the "dependent routes" dataplane computation. Dependent routes refers to routes that could change because other routes have changed. For example, this includes: static routes with next hop IP aggregate routes EGP routes (various protocols)
computeDependentRoutesIteration
{ "repo_name": "dhalperi/batfish", "path": "projects/batfish/src/main/java/org/batfish/dataplane/ibdp/IncrementalBdpEngine.java", "license": "apache-2.0", "size": 55724 }
[ "io.opentracing.Scope", "io.opentracing.Span", "io.opentracing.util.GlobalTracer", "java.util.List", "java.util.Map", "java.util.concurrent.atomic.AtomicBoolean", "org.batfish.datamodel.IsisRoute", "org.batfish.datamodel.NetworkConfigurations", "org.batfish.dataplane.ibdp.DataplaneTrackEvaluator", ...
import io.opentracing.Scope; import io.opentracing.Span; import io.opentracing.util.GlobalTracer; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import org.batfish.datamodel.IsisRoute; import org.batfish.datamodel.NetworkConfigurations; import org.batfish.dataplane.ibdp.D...
import io.opentracing.*; import io.opentracing.util.*; import java.util.*; import java.util.concurrent.atomic.*; import org.batfish.datamodel.*; import org.batfish.dataplane.ibdp.*; import org.batfish.dataplane.rib.*;
[ "io.opentracing", "io.opentracing.util", "java.util", "org.batfish.datamodel", "org.batfish.dataplane" ]
io.opentracing; io.opentracing.util; java.util; org.batfish.datamodel; org.batfish.dataplane;
691,982
static void makeBlockPoolDataDir(Collection<File> dataDirs, Configuration conf) throws IOException { if (conf == null) conf = new HdfsConfiguration(); LocalFileSystem localFS = FileSystem.getLocal(conf); FsPermission permission = new FsPermission(conf.get( DFSConfigKeys.DFS_DATANODE_D...
static void makeBlockPoolDataDir(Collection<File> dataDirs, Configuration conf) throws IOException { if (conf == null) conf = new HdfsConfiguration(); LocalFileSystem localFS = FileSystem.getLocal(conf); FsPermission permission = new FsPermission(conf.get( DFSConfigKeys.DFS_DATANODE_DATA_DIR_PERMISSION_KEY, DFSConfigKe...
/** * Create physical directory for block pools on the data node * * @param dataDirs * List of data directories * @param conf * Configuration instance to use. * @throws IOException on errors */
Create physical directory for block pools on the data node
makeBlockPoolDataDir
{ "repo_name": "xuchenCN/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java", "license": "apache-2.0", "size": 41680 }
[ "java.io.File", "java.io.IOException", "java.util.Collection", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.LocalFileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.permission.FsPermission", "org.apache.hadoop.hdfs.DFSConfigKeys", "or...
import java.io.File; import java.io.IOException; import java.util.Collection; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop....
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,497,506
@Test public void testRemove() { map.remove(KEY2); assertEquals("Check element 1", ELEMENT1, map.get(KEY1)); assertEquals("Check element 2", null, map.get(KEY2)); assertEquals("Check element 3", ELEMENT3, map.get(KEY3)); assertTrue("Check the number of values", map.size()...
void function() { map.remove(KEY2); assertEquals(STR, ELEMENT1, map.get(KEY1)); assertEquals(STR, null, map.get(KEY2)); assertEquals(STR, ELEMENT3, map.get(KEY3)); assertTrue(STR, map.size()==2); }
/** * Test the remove method removes the correct values. */
Test the remove method removes the correct values
testRemove
{ "repo_name": "NickCharsley/zoodb", "path": "tst/org/zoodb/test/util/PrimLongMapTest.java", "license": "gpl-3.0", "size": 7306 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,303,928
for (final Entry<String, List<String>> entry : DUPLICATE_KEY_MAP.entrySet()) { final String key = entry.getKey(); final List<String> duplicateKeys = entry.getValue(); final String value = config.get(key); if (value != null) { for (final String duplicateKey...
for (final Entry<String, List<String>> entry : DUPLICATE_KEY_MAP.entrySet()) { final String key = entry.getKey(); final List<String> duplicateKeys = entry.getValue(); final String value = config.get(key); if (value != null) { for (final String duplicateKey : duplicateKeys) { config.set(duplicateKey, value); } } } }
/** * Sets duplicate keys in the config. * @param config the {@link Configuration}. */
Sets duplicate keys in the config
setDuplicateKeys
{ "repo_name": "kchilton2/incubator-rya", "path": "extras/rya.export/export.accumulo/src/main/java/org/apache/rya/export/accumulo/conf/AccumuloExportConstants.java", "license": "apache-2.0", "size": 5564 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,081,080
EList<GlobalDomainInstanceExample> getDomainInstanceExample();
EList<GlobalDomainInstanceExample> getDomainInstanceExample();
/** * Returns the value of the '<em><b>Domain Instance Example</b></em>' containment reference list. * The list contents are of type {@link org.openhealthtools.mdht.emf.hl7.mif2.GlobalDomainInstanceExample}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * A set of abstra...
Returns the value of the 'Domain Instance Example' containment reference list. The list contents are of type <code>org.openhealthtools.mdht.emf.hl7.mif2.GlobalDomainInstanceExample</code>. A set of abstract examples identifying the types of data that might be exchanged
getDomainInstanceExample
{ "repo_name": "drbgfc/mdht", "path": "hl7/plugins/org.openhealthtools.mdht.emf.hl7.mif2/src/org/openhealthtools/mdht/emf/hl7/mif2/PackageContent.java", "license": "epl-1.0", "size": 21082 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,186,578
EList<Variable> getVariables();
EList<Variable> getVariables();
/** * Returns the value of the '<em><b>Variables</b></em>' containment reference list. * The list contents are of type {@link dart.Variable}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Variables</em>' containment reference list isn't clear, * there really should be more of a description he...
Returns the value of the 'Variables' containment reference list. The list contents are of type <code>dart.Variable</code>. If the meaning of the 'Variables' containment reference list isn't clear, there really should be more of a description here...
getVariables
{ "repo_name": "jesusc/bento", "path": "tests/bento.sirius.tests.metamodels/src/dart/Library.java", "license": "epl-1.0", "size": 3572 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,518,537
private static Field getField(String[] split, Class root) { Object instance = getInstance(split, root); if (instance == null) { return null; } return getField(split, instance); }
static Field function(String[] split, Class root) { Object instance = getInstance(split, root); if (instance == null) { return null; } return getField(split, instance); }
/** * Get the field for a specific config node. * @param split the node (split by period) * @param root * @return */
Get the field for a specific config node
getField
{ "repo_name": "manuelgu/PlotSquared", "path": "Core/src/main/java/com/intellectualcrafters/plot/config/Config.java", "license": "gpl-3.0", "size": 15453 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,418,031
private void leavePolyListVcount() { this.chunkIntReader.finish(); this.chunkIntReader = null; final int size = this.intArrayBuilder.size(); final IntList data = new IntList(size); data.setValues(this.intArrayBuilder); this.polyListBuilder.setVcount(data); ...
void function() { this.chunkIntReader.finish(); this.chunkIntReader = null; final int size = this.intArrayBuilder.size(); final IntList data = new IntList(size); data.setValues(this.intArrayBuilder); this.polyListBuilder.setVcount(data); this.intArrayBuilder = null; leaveElement(); }
/** * Leaves a polylist vcount element. */
Leaves a polylist vcount element
leavePolyListVcount
{ "repo_name": "kayahr/jollada", "path": "src/main/java/de/ailis/jollada/reader/ColladaHandler.java", "license": "mit", "size": 102287 }
[ "de.ailis.jollada.model.IntList" ]
import de.ailis.jollada.model.IntList;
import de.ailis.jollada.model.*;
[ "de.ailis.jollada" ]
de.ailis.jollada;
402,565
public final double get(int i) { return longBitsToDouble(longs.get(i)); }
final double function(int i) { return longBitsToDouble(longs.get(i)); }
/** * Gets the current value at position {@code i}. * * @param i the index * @return the current value */
Gets the current value at position i
get
{ "repo_name": "google/guava", "path": "android/guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java", "license": "apache-2.0", "size": 8133 }
[ "java.lang.Double" ]
import java.lang.Double;
import java.lang.*;
[ "java.lang" ]
java.lang;
1,638,820
@Test public void testWebHdfsCreateSnapshot() throws Exception { MiniDFSCluster cluster = null; final Configuration conf = WebHdfsTestUtil.createConf(); try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build(); cluster.waitActive(); final DistributedFileSystem dfs = clu...
void function() throws Exception { MiniDFSCluster cluster = null; final Configuration conf = WebHdfsTestUtil.createConf(); try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build(); cluster.waitActive(); final DistributedFileSystem dfs = cluster.getFileSystem(); final FileSystem webHdfs = WebHdfsTestUtil...
/** * Test snapshot creation through WebHdfs */
Test snapshot creation through WebHdfs
testWebHdfsCreateSnapshot
{ "repo_name": "jonathangizmo/HadoopDistJ", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java", "license": "mit", "size": 17158 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.DistributedFileSystem", "org.apache.hadoop.hdfs.MiniDFSCluster", "org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotTestHelper", "org.apache.hadoop.test.GenericTestUtils"...
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotTestHelper; import org.apache.hadoop.te...
import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*; import org.apache.hadoop.test.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
2,281,482
@Nonnull public static <T> Observable<T> invokeAsync( @Nonnull final Runnable run, final T defaultValue) { return invokeAsync(run, defaultValue, scheduler()); }
static <T> Observable<T> function( @Nonnull final Runnable run, final T defaultValue) { return invokeAsync(run, defaultValue, scheduler()); }
/** * Invoke the given callable on the given pool and observe its result via the returned observable. * Any exception thrown by the callable is relayed via the error() message. * @param <T> the return type * @param run the runnable * @param defaultValue the value to return when the Runnable com...
Invoke the given callable on the given pool and observe its result via the returned observable. Any exception thrown by the callable is relayed via the error() message
invokeAsync
{ "repo_name": "akarnokd/reactive4java", "path": "src/main/java/hu/akarnokd/reactive4java/reactive/Reactive.java", "license": "apache-2.0", "size": 367224 }
[ "hu.akarnokd.reactive4java.base.Observable", "javax.annotation.Nonnull" ]
import hu.akarnokd.reactive4java.base.Observable; import javax.annotation.Nonnull;
import hu.akarnokd.reactive4java.base.*; import javax.annotation.*;
[ "hu.akarnokd.reactive4java", "javax.annotation" ]
hu.akarnokd.reactive4java; javax.annotation;
1,803,403
public static Test suite() { return new TestSuite(CastTest.class); }
static Test function() { return new TestSuite(CastTest.class); }
/** * * Returns a test suite. * * @return the test suite */
Returns a test suite
suite
{ "repo_name": "automenta/adams-core", "path": "src/test/java/adams/flow/control/CastTest.java", "license": "gpl-3.0", "size": 4274 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,928,957
public void apply(Mat image, Mat fgmask) { apply_1(nativeObj, image.nativeObj, fgmask.nativeObj); return; }
void function(Mat image, Mat fgmask) { apply_1(nativeObj, image.nativeObj, fgmask.nativeObj); return; }
/** * <p>Computes a foreground mask.</p> * * @param image Next video frame. * @param fgmask The output foreground mask as an 8-bit binary image. * * @see <a href="http://docs.opencv.org/modules/video/doc/motion_analysis_and_object_tracking.html#backgroundsubtractor-operator">org.opencv.video.BackgroundSubtractor....
Computes a foreground mask
apply
{ "repo_name": "kazuto1011/rcnn-server", "path": "tms_ss_android/openCVLibrary2411/src/main/java/org/opencv/video/BackgroundSubtractor.java", "license": "mit", "size": 2747 }
[ "org.opencv.core.Mat" ]
import org.opencv.core.Mat;
import org.opencv.core.*;
[ "org.opencv.core" ]
org.opencv.core;
2,884,848
public static AllDisjointClasses getInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { return Base.getInstance(model, instanceResource, AllDisjointClasses.class); }
static AllDisjointClasses function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { return Base.getInstance(model, instanceResource, AllDisjointClasses.class); }
/** * Return an existing instance of this class in the model. No statements are written. * @param model an RDF2Go model * @param instanceResource an RDF2Go resource * @return an instance of AllDisjointClasses or null if none existst * * [Generated from RDFReactor template rule #class0] */
Return an existing instance of this class in the model. No statements are written
getInstance
{ "repo_name": "alexgarciac/biotea", "path": "src/ws/biotea/ld2rdf/rdf/model/doco/AllDisjointClasses.java", "license": "apache-2.0", "size": 7414 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
1,190,215
return BundleUtilities.parseDate( getResult() ); }
return BundleUtilities.parseDate( getResult() ); }
/** * Returns the object for this element. * * @return the object. */
Returns the object for this element
getObject
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "libraries/libdocbundle/src/main/java/org/pentaho/reporting/libraries/docbundle/metadata/parser/DateMetaDataEntryReadHandler.java", "license": "lgpl-2.1", "size": 1258 }
[ "org.pentaho.reporting.libraries.docbundle.BundleUtilities" ]
import org.pentaho.reporting.libraries.docbundle.BundleUtilities;
import org.pentaho.reporting.libraries.docbundle.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
2,862,992
protected void setCurrentScreen(Alert a, Displayable d) { System.out.println("midlet = "+midlet); Display.getDisplay(midlet).setCurrent(a, d); }
void function(Alert a, Displayable d) { System.out.println(STR+midlet); Display.getDisplay(midlet).setCurrent(a, d); }
/** * Set the current screen for display, after alert */
Set the current screen for display, after alert
setCurrentScreen
{ "repo_name": "leotizzei/MobileMedia-Cosmos-v7", "path": "src/br/unicamp/ic/sed/mobilemedia/media/impl/AbstractController.java", "license": "mit", "size": 5634 }
[ "javax.microedition.lcdui.Alert", "javax.microedition.lcdui.Display", "javax.microedition.lcdui.Displayable" ]
import javax.microedition.lcdui.Alert; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.*;
[ "javax.microedition" ]
javax.microedition;
2,787,401
public Number getRefreshInterval() { return this.refreshInterval; }
Number function() { return this.refreshInterval; }
/** * The time interval to refresh the TestResult in seconds * * @return the Number. */
The time interval to refresh the TestResult in seconds
getRefreshInterval
{ "repo_name": "NABUCCO/org.nabucco.testautomation.result", "path": "org.nabucco.testautomation.result.facade.datatype/src/main/gen/org/nabucco/testautomation/result/facade/datatype/extension/TestResultExtension.java", "license": "epl-1.0", "size": 6756 }
[ "org.nabucco.framework.base.facade.datatype.Number" ]
import org.nabucco.framework.base.facade.datatype.Number;
import org.nabucco.framework.base.facade.datatype.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,355,602
@Override public void enterFunction_argument(@NotNull FunctionParser.Function_argumentContext ctx) { }
@Override public void enterFunction_argument(@NotNull FunctionParser.Function_argumentContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitFunction_argument_list
{ "repo_name": "octopus-platform/joern", "path": "projects/extensions/joern-fuzzyc/src/main/java/antlr/FunctionBaseListener.java", "license": "lgpl-3.0", "size": 42232 }
[ "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;
647,344
@Trivial private static int getPriority(Converter<?> converter) { int value = ConfigConstants.DEFAULT_CONVERTER_PRIORITY; //get Priority annotations from class only, not from the super-class Priority[] priorities = converter.getClass().getDeclaredAnnotationsByType(Priority.class); ...
static int function(Converter<?> converter) { int value = ConfigConstants.DEFAULT_CONVERTER_PRIORITY; Priority[] priorities = converter.getClass().getDeclaredAnnotationsByType(Priority.class); if ((priorities != null) && (priorities.length > 0)) { Priority priority = priorities[0]; value = priority.value(); } return va...
/** * Reflectively get the priority from the @Priority annotation * * @param converter * @return */
Reflectively get the priority from the @Priority annotation
getPriority
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/converters/UserConverter.java", "license": "epl-1.0", "size": 4434 }
[ "com.ibm.ws.microprofile.config.interfaces.ConfigConstants", "javax.annotation.Priority", "org.eclipse.microprofile.config.spi.Converter" ]
import com.ibm.ws.microprofile.config.interfaces.ConfigConstants; import javax.annotation.Priority; import org.eclipse.microprofile.config.spi.Converter;
import com.ibm.ws.microprofile.config.interfaces.*; import javax.annotation.*; import org.eclipse.microprofile.config.spi.*;
[ "com.ibm.ws", "javax.annotation", "org.eclipse.microprofile" ]
com.ibm.ws; javax.annotation; org.eclipse.microprofile;
1,646,189
public QueryResult printQuery( Session session, String jcrSql2, long expectedNumberOfResults, Variable... variables ) throws RepositoryException { Map<String, String> keyValuePairs = new HashMap<String, ...
QueryResult function( Session session, String jcrSql2, long expectedNumberOfResults, Variable... variables ) throws RepositoryException { Map<String, String> keyValuePairs = new HashMap<String, String>(); for (Variable var : variables) { keyValuePairs.put(var.key, var.value); } return printQuery(session, jcrSql2, Query...
/** * Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results. * * @param session the session * @param jcrSql2 the JCR-SQL2 query * @param expectedNumberOfResults the expected number of rows in the results, or -1 if this is not to be checked * @param variabl...
Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results
printQuery
{ "repo_name": "rhauch/modeshape", "path": "modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java", "license": "apache-2.0", "size": 40232 }
[ "java.util.HashMap", "java.util.Map", "javax.jcr.RepositoryException", "javax.jcr.Session", "javax.jcr.query.Query", "javax.jcr.query.QueryResult" ]
import java.util.HashMap; import java.util.Map; import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.query.Query; import javax.jcr.query.QueryResult;
import java.util.*; import javax.jcr.*; import javax.jcr.query.*;
[ "java.util", "javax.jcr" ]
java.util; javax.jcr;
1,391,588
@Override public Adapter createCloneMediatorAdapter() { if (cloneMediatorItemProvider == null) { cloneMediatorItemProvider = new CloneMediatorItemProvider(this); } return cloneMediatorItemProvider; } protected CloneTargetItemProvider cloneTargetItemProvider;
Adapter function() { if (cloneMediatorItemProvider == null) { cloneMediatorItemProvider = new CloneMediatorItemProvider(this); } return cloneMediatorItemProvider; } protected CloneTargetItemProvider cloneTargetItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.CloneMediator}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.CloneMediator</code>.
createCloneMediatorAdapter
{ "repo_name": "nwnpallewela/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 304469 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,044,814
public static HashMap<String, ConfigAccessor> getConversations() { return instance.conversationsMap; }
static HashMap<String, ConfigAccessor> function() { return instance.conversationsMap; }
/** * Retrieves map containing all conversation accessors. * * @return HashMap containing conversation accessors */
Retrieves map containing all conversation accessors
getConversations
{ "repo_name": "fastlockel/BetonQuest", "path": "src/main/java/pl/betoncraft/betonquest/config/ConfigHandler.java", "license": "gpl-3.0", "size": 15148 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,483,568
public MeterIdPrefix withTags(Iterable<Tag> tags) { return new MeterIdPrefix(name, sortedImmutableTags(tags)); }
MeterIdPrefix function(Iterable<Tag> tags) { return new MeterIdPrefix(name, sortedImmutableTags(tags)); }
/** * Returns a newly-created instance whose name is concatenated by the specified {@code tags}. */
Returns a newly-created instance whose name is concatenated by the specified tags
withTags
{ "repo_name": "anuraaga/armeria", "path": "core/src/main/java/com/linecorp/armeria/common/metric/MeterIdPrefix.java", "license": "apache-2.0", "size": 6814 }
[ "io.micrometer.core.instrument.Tag" ]
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.*;
[ "io.micrometer.core" ]
io.micrometer.core;
1,943,656
EClass getSignalDeclaration();
EClass getSignalDeclaration();
/** * Returns the meta object for class '{@link net.mlanoe.language.vhdl.declaration.SignalDeclaration <em>Signal Declaration</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Signal Declaration</em>'. * @see net.mlanoe.language.vhdl.declaration.SignalDeclarati...
Returns the meta object for class '<code>net.mlanoe.language.vhdl.declaration.SignalDeclaration Signal Declaration</code>'.
getSignalDeclaration
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl/src-gen/net/mlanoe/language/vhdl/declaration/DeclarationPackage.java", "license": "gpl-3.0", "size": 102415 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
343,085
public void fillFields() throws Exception { try { opencon(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } res = stmt.executeQuery("SELECT * FROM Invite WHERE Tuser = " + FunctionsForMainScreen.getStudentID() + " AND Declined = 0"); while (res...
void function() throws Exception { try { opencon(); } catch (Exception e) { e.printStackTrace(); } res = stmt.executeQuery(STR + FunctionsForMainScreen.getStudentID() + STR); while (res.next()) { rowNumForReceiving++; } fUser = new int[rowNumForReceiving]; res = stmt.executeQuery(STR + FunctionsForMainScreen.getStudent...
/** * Method is used to get the invites which the logged in user has received * and the status for the sent invitations. * * @throws Exception */
Method is used to get the invites which the logged in user has received and the status for the sent invitations
fillFields
{ "repo_name": "IguanaMeow/UniMeet-gu.se", "path": "src/beta/Invitation.java", "license": "gpl-2.0", "size": 7389 }
[ "java.awt.GridLayout", "javax.swing.JButton", "javax.swing.JLabel", "javax.swing.JPanel", "javax.swing.JTextField" ]
import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,851,015
protected void bufferIndexNodes() throws IOException { if(!lock.isHeldByCurrentThread()) { throw new IllegalMonitorStateException(); } if (buf_nodes != null) { // already buffered. return; } ...
void function() throws IOException { if(!lock.isHeldByCurrentThread()) { throw new IllegalMonitorStateException(); } if (buf_nodes != null) { return; } if(checkpoint.nnodes == 0) { throw new IllegalStateException(); } if(checkpoint.offsetNodes == 0L) { throw new IllegalStateException(); } if(checkpoint.extentNodes > Di...
/** * Attempts to read the index nodes into {@link #buf_nodes}. * <p> * Note: If the nodes could not be buffered then reads against the nodes * will read through to the backing file. */
Attempts to read the index nodes into <code>#buf_nodes</code>. Note: If the nodes could not be buffered then reads against the nodes will read through to the backing file
bufferIndexNodes
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata/src/java/com/bigdata/btree/IndexSegmentStore.java", "license": "gpl-2.0", "size": 50456 }
[ "com.bigdata.io.DirectBufferPool", "com.bigdata.io.FileChannelUtility", "java.io.IOException", "java.nio.ByteBuffer", "java.util.concurrent.TimeUnit" ]
import com.bigdata.io.DirectBufferPool; import com.bigdata.io.FileChannelUtility; import java.io.IOException; import java.nio.ByteBuffer; import java.util.concurrent.TimeUnit;
import com.bigdata.io.*; import java.io.*; import java.nio.*; import java.util.concurrent.*;
[ "com.bigdata.io", "java.io", "java.nio", "java.util" ]
com.bigdata.io; java.io; java.nio; java.util;
2,808,708
public boolean contentsEqual(ScruTable other) { TableStepper myStepper; Heaper otherValue; if (other.count() != count()) { return false; } if ( ! (other.coordinateSpace().isEqual(coordinateSpace()))) { return false; } myStepper = stepper(); while (myStepper.hasValue()) { otherValue = other.fetch(myStepper...
boolean function(ScruTable other) { TableStepper myStepper; Heaper otherValue; if (other.count() != count()) { return false; } if ( ! (other.coordinateSpace().isEqual(coordinateSpace()))) { return false; } myStepper = stepper(); while (myStepper.hasValue()) { otherValue = other.fetch(myStepper.position()); if (otherVal...
/** * Returns whether the two ScruTables have exactly the same mapping from * keys to values at the moment. 'a->contentsEqual(b)' is equivalent to * 'a->asImmuTable()->isEqual(b->asImmuTable())'. See ScruTable::contentsEqual */
Returns whether the two ScruTables have exactly the same mapping from keys to values at the moment. 'a->contentsEqual(b)' is equivalent to 'a->asImmuTable()->isEqual(b->asImmuTable())'. See ScruTable::contentsEqual
contentsEqual
{ "repo_name": "jonesd/udanax-gold2java", "path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/collection/tables/ScruTable.java", "license": "mit", "size": 30731 }
[ "info.dgjones.abora.gold.collection.steppers.TableStepper", "info.dgjones.abora.gold.collection.tables.ScruTable", "info.dgjones.abora.gold.xpp.basic.Heaper" ]
import info.dgjones.abora.gold.collection.steppers.TableStepper; import info.dgjones.abora.gold.collection.tables.ScruTable; import info.dgjones.abora.gold.xpp.basic.Heaper;
import info.dgjones.abora.gold.collection.steppers.*; import info.dgjones.abora.gold.collection.tables.*; import info.dgjones.abora.gold.xpp.basic.*;
[ "info.dgjones.abora" ]
info.dgjones.abora;
1,195,362
List<Executor> fetchActiveExecutors() throws ExecutorManagerException;
List<Executor> fetchActiveExecutors() throws ExecutorManagerException;
/** * <pre> * Fetch all executors from executors table with active = true * Note:- * 1 throws an Exception in case of a SQL issue * 2 returns an empty list in case of no active executor * </pre> * * @return List<Executor> */
<code> Fetch all executors from executors table with active = true Note:- 1 throws an Exception in case of a SQL issue 2 returns an empty list in case of no active executor </code>
fetchActiveExecutors
{ "repo_name": "chengren311/azkaban", "path": "azkaban-common/src/main/java/azkaban/executor/ExecutorLoader.java", "license": "apache-2.0", "size": 9123 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
302,310
@Override public Collection<QuickTriggerable> initializeTriggerables(FormInstance mainInstance, EvaluationContext evalContext, TreeReference rootRef, boolean midSurvey) { return initializeTriggerables(mainInstance, evalContext, rootRef, midSurvey, new HashSet<QuickTriggerable>(1)); }
Collection<QuickTriggerable> function(FormInstance mainInstance, EvaluationContext evalContext, TreeReference rootRef, boolean midSurvey) { return initializeTriggerables(mainInstance, evalContext, rootRef, midSurvey, new HashSet<QuickTriggerable>(1)); }
/** * Walks the current set of conditions, and evaluates each of them with the * current context. */
Walks the current set of conditions, and evaluates each of them with the current context
initializeTriggerables
{ "repo_name": "medic/javarosa", "path": "core/src/org/javarosa/core/model/Fast2014DagImpl.java", "license": "apache-2.0", "size": 17338 }
[ "java.util.Collection", "java.util.HashSet", "org.javarosa.core.model.condition.EvaluationContext", "org.javarosa.core.model.instance.FormInstance", "org.javarosa.core.model.instance.TreeReference" ]
import java.util.Collection; import java.util.HashSet; import org.javarosa.core.model.condition.EvaluationContext; import org.javarosa.core.model.instance.FormInstance; import org.javarosa.core.model.instance.TreeReference;
import java.util.*; import org.javarosa.core.model.condition.*; import org.javarosa.core.model.instance.*;
[ "java.util", "org.javarosa.core" ]
java.util; org.javarosa.core;
2,819,087
public static Order aggregation(String aggregationName, String valueName, boolean asc) { return new InternalOrder.Aggregation(aggregationName, valueName, asc); }
static Order function(String aggregationName, String valueName, boolean asc) { return new InternalOrder.Aggregation(aggregationName, valueName, asc); }
/** * Creates a bucket ordering strategy that sorts buckets based on a multi-valued calc sug-aggregation * * @param aggregationName the name of the aggregation * @param valueName The name of the value of the multi-value get by which the sorting will be applied * @param...
Creates a bucket ordering strategy that sorts buckets based on a multi-valued calc sug-aggregation
aggregation
{ "repo_name": "alexksikes/elasticsearch", "path": "src/main/java/org/elasticsearch/search/aggregations/bucket/histogram/Histogram.java", "license": "apache-2.0", "size": 5301 }
[ "org.elasticsearch.search.aggregations.Aggregation" ]
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
237,895
public long update() throws StandardException { long counterVal; if (initialized == false) { // The first time around, counter simply gets the start // value. initialized = true; if (start == null) { throw StandardException.newException( SQLState.LANG_AI_COUNTER_ERROR); ...
long function() throws StandardException { long counterVal; if (initialized == false) { initialized = true; if (start == null) { throw StandardException.newException( SQLState.LANG_AI_COUNTER_ERROR); } counter = start.longValue(); } else { counter = counter + increment; } return counter; }
/** * update the counter to its next value. * * @exception StandardException if the counter has not yet been * initialized and the Start value is NULL. */
update the counter to its next value
update
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/sql/execute/AutoincrementCounter.java", "license": "apache-2.0", "size": 6227 }
[ "org.apache.derby.shared.common.error.StandardException", "org.apache.derby.shared.common.reference.SQLState" ]
import org.apache.derby.shared.common.error.StandardException; import org.apache.derby.shared.common.reference.SQLState;
import org.apache.derby.shared.common.error.*; import org.apache.derby.shared.common.reference.*;
[ "org.apache.derby" ]
org.apache.derby;
552,798
public void login(String user, String pass) throws AuthenticationException, DocumentListException { if (user == null || pass == null) { throw new DocumentListException("null login credentials"); } service.setUserCredentials(user, pass); spreadsheetsService.setUserCredentials(user, pass); ...
void function(String user, String pass) throws AuthenticationException, DocumentListException { if (user == null pass == null) { throw new DocumentListException(STR); } service.setUserCredentials(user, pass); spreadsheetsService.setUserCredentials(user, pass); }
/** * Set user credentials based on a username and password. * * @param user username to log in with. * @param pass password for the user logging in. * * @throws AuthenticationException * @throws DocumentListException */
Set user credentials based on a username and password
login
{ "repo_name": "simonrrr/gdata-java-client", "path": "java/sample/docs/DocumentList.java", "license": "apache-2.0", "size": 33689 }
[ "com.google.gdata.util.AuthenticationException" ]
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.*;
[ "com.google.gdata" ]
com.google.gdata;
1,560,947
public void checkRead(String file) { checkPermission(new FilePermission(file, "read")); //$NON-NLS-1$ }
void function(String file) { checkPermission(new FilePermission(file, "read")); }
/** * Checks whether the calling thread is allowed to read from the file with * the specified name, which should be passed in canonical form. * * @param file * the name of the file or directory to read from. * @throws SecurityException * if the calling thread i...
Checks whether the calling thread is allowed to read from the file with the specified name, which should be passed in canonical form
checkRead
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/src/xmlvm2c/lib/proxies/java/lang/SecurityManager.java", "license": "gpl-2.0", "size": 32450 }
[ "java.io.FilePermission" ]
import java.io.FilePermission;
import java.io.*;
[ "java.io" ]
java.io;
1,997,547
public void registerKeyWords( List<String> keyWords ) { registeredKeyWords.addAll(keyWords); }
void function( List<String> keyWords ) { registeredKeyWords.addAll(keyWords); }
/** * Register an {@link List} of key words. * * @param keyWords */
Register an <code>List</code> of key words
registerKeyWords
{ "repo_name": "flownclouds/modeshape", "path": "sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlTokenStream.java", "license": "apache-2.0", "size": 21050 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,055,978
CuratorCacheListenerBuilder forTreeCache(CuratorFramework client, TreeCacheListener listener);
CuratorCacheListenerBuilder forTreeCache(CuratorFramework client, TreeCacheListener listener);
/** * Bridge listener. You can reuse old-style {@link org.apache.curator.framework.recipes.cache.TreeCacheListener}s * with CuratorCache. IMPORTANT: the connection state methods in the listener will never be called as CuratorCache * does not register the listener with the connection state listener contai...
Bridge listener. You can reuse old-style <code>org.apache.curator.framework.recipes.cache.TreeCacheListener</code>s does not register the listener with the connection state listener container. Also note that CuratorCache behaves differently than <code>org.apache.curator.framework.recipes.cache.TreeCache</code> so thing...
forTreeCache
{ "repo_name": "apache/curator", "path": "curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheListenerBuilder.java", "license": "apache-2.0", "size": 5102 }
[ "org.apache.curator.framework.CuratorFramework" ]
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.*;
[ "org.apache.curator" ]
org.apache.curator;
422,525
@FIXVersion(introduced="5.0SP2") @TagNumRef(tagNum=TagNum.OrderID) public void setOrderID(String orderID) { this.orderID = orderID; }
@FIXVersion(introduced=STR) @TagNumRef(tagNum=TagNum.OrderID) void function(String orderID) { this.orderID = orderID; }
/** * Message field setter. * @param orderID field value */
Message field setter
setOrderID
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/TradeReportOrderDetail.java", "license": "gpl-3.0", "size": 31528 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,893,382
ResultToXContentBuilder finishRows() throws IOException { builder.endArray(); return this; }
ResultToXContentBuilder finishRows() throws IOException { builder.endArray(); return this; }
/** * finishRows() must be called after last setNextRow() */
finishRows() must be called after last setNextRow()
finishRows
{ "repo_name": "EvilMcJerkface/crate", "path": "server/src/main/java/io/crate/rest/action/ResultToXContentBuilder.java", "license": "apache-2.0", "size": 5107 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,890,284
protected Integer runRemoteTaskAgainstState( IMap<String, ClusterFileState> stateCache, ClusterFileState fState) throws Exception { // DEBUG if ( hasDebug()) Debug.println( "ReleaseFileAccessTask: Release token=" + m_token + " path " + fState); // Get the current file open count int openCount...
Integer function( IMap<String, ClusterFileState> stateCache, ClusterFileState fState) throws Exception { if ( hasDebug()) Debug.println( STR + m_token + STR + fState); int openCount = fState.getOpenCount(); if ( m_token instanceof HazelCastAccessToken) { HazelCastAccessToken hcToken = (HazelCastAccessToken) m_token; if...
/** * Run a remote task against a file state * * @param stateCache IMap<String, ClusterFileState> * @param fState ClusterFileState * @return Integer * @exception Exception */
Run a remote task against a file state
runRemoteTaskAgainstState
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/server/filesys/cache/hazelcast/ReleaseFileAccessTask.java", "license": "lgpl-3.0", "size": 4115 }
[ "com.hazelcast.core.IMap", "com.hazelcast.core.ITopic", "org.alfresco.jlan.debug.Debug", "org.alfresco.jlan.server.filesys.cache.cluster.ClusterFileState", "org.alfresco.jlan.smb.OpLock", "org.alfresco.jlan.smb.SharingMode" ]
import com.hazelcast.core.IMap; import com.hazelcast.core.ITopic; import org.alfresco.jlan.debug.Debug; import org.alfresco.jlan.server.filesys.cache.cluster.ClusterFileState; import org.alfresco.jlan.smb.OpLock; import org.alfresco.jlan.smb.SharingMode;
import com.hazelcast.core.*; import org.alfresco.jlan.debug.*; import org.alfresco.jlan.server.filesys.cache.cluster.*; import org.alfresco.jlan.smb.*;
[ "com.hazelcast.core", "org.alfresco.jlan" ]
com.hazelcast.core; org.alfresco.jlan;
1,956,190
@Test public void testRepeated() { TupleMetadata schema = new SchemaBuilder() .addArray("a", MinorType.VARCHAR) .buildSchema(); SingleRowSet rowSet1 = fixture.rowSetBuilder(schema) .addSingleCol(strArray("sixth", "6.1", "6.2")) .addSingleCol(strArray("second", "2.1", "2.2", ...
void function() { TupleMetadata schema = new SchemaBuilder() .addArray("a", MinorType.VARCHAR) .buildSchema(); SingleRowSet rowSet1 = fixture.rowSetBuilder(schema) .addSingleCol(strArray("sixth", "6.1", "6.2")) .addSingleCol(strArray(STR, "2.1", "2.2", "2.3")) .addSingleCol(strArray(STR, "4.1")) .build(); SingleRowSet ...
/** * Test an array to test the indirection from the repeated vector * to the array offsets vector and the array values vector. (Uses * varchar to add another level of indirection to the data offset * and data values vectors.) */
Test an array to test the indirection from the repeated vector to the array offsets vector and the array values vector. (Uses varchar to add another level of indirection to the data offset and data values vectors.)
testRepeated
{ "repo_name": "kkhatua/drill", "path": "exec/java-exec/src/test/java/org/apache/drill/test/rowSet/test/TestHyperVectorReaders.java", "license": "apache-2.0", "size": 16346 }
[ "org.apache.drill.common.types.TypeProtos", "org.apache.drill.exec.physical.rowSet.HyperRowSetImpl", "org.apache.drill.exec.physical.rowSet.RowSet", "org.apache.drill.exec.record.metadata.SchemaBuilder", "org.apache.drill.exec.record.metadata.TupleMetadata", "org.apache.drill.exec.record.selection.Selecti...
import org.apache.drill.common.types.TypeProtos; import org.apache.drill.exec.physical.rowSet.HyperRowSetImpl; import org.apache.drill.exec.physical.rowSet.RowSet; import org.apache.drill.exec.record.metadata.SchemaBuilder; import org.apache.drill.exec.record.metadata.TupleMetadata; import org.apache.drill.exec.record....
import org.apache.drill.common.types.*; import org.apache.drill.exec.physical.*; import org.apache.drill.exec.record.metadata.*; import org.apache.drill.exec.record.selection.*; import org.apache.drill.test.*; import org.junit.*;
[ "org.apache.drill", "org.junit" ]
org.apache.drill; org.junit;
2,793,466
Objects.requireNonNull(fallbackProfile); if (profile == null) { return fallbackProfile; } else if (profile.getConnectTimeout() != null && profile.getHandshakeTimeout() != null && profile.getPingInterval() != null && profile.getCompressionEnabled() != null) { return pr...
Objects.requireNonNull(fallbackProfile); if (profile == null) { return fallbackProfile; } else if (profile.getConnectTimeout() != null && profile.getHandshakeTimeout() != null && profile.getPingInterval() != null && profile.getCompressionEnabled() != null) { return profile; } else { ConnectionProfile.Builder builder = ...
/** * takes a {@link ConnectionProfile} resolves it to a fully specified (i.e., no nulls) profile */
takes a <code>ConnectionProfile</code> resolves it to a fully specified (i.e., no nulls) profile
resolveConnectionProfile
{ "repo_name": "EvilMcJerkface/crate", "path": "server/src/main/java/org/elasticsearch/transport/ConnectionProfile.java", "license": "apache-2.0", "size": 14669 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
836,166
private void respondWithFile(ChannelHandlerContext ctx, HttpRequest request, String requestPath) throws IOException, ParseException, RestHandlerException { // make sure we request the "index.html" in case there is a directory request if (requestPath.endsWith("/")) { requestPath = requestPath + "index.html"...
void function(ChannelHandlerContext ctx, HttpRequest request, String requestPath) throws IOException, ParseException, RestHandlerException { if (requestPath.endsWith("/")) { requestPath = requestPath + STR; } if (!requestPath.contains(".")) { requestPath = requestPath + ".json"; } final File file = new File(rootPath, r...
/** * Response when running with leading JobManager. */
Response when running with leading JobManager
respondWithFile
{ "repo_name": "jinglining/flink", "path": "flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerStaticFileServerHandler.java", "license": "apache-2.0", "size": 10992 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream", "java.io.RandomAccessFile", "java.nio.file.Files", "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Collections", "java.util.Date", "java.util.Locale", "org.apache.flink.runtime.r...
import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.RandomAccessFile; import java.nio.file.Files; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Collections; import java.util.Date; import java.util.Locale...
import java.io.*; import java.nio.file.*; import java.text.*; import java.util.*; import org.apache.flink.runtime.rest.*; import org.apache.flink.runtime.rest.handler.*; import org.apache.flink.runtime.rest.handler.legacy.files.*; import org.apache.flink.runtime.rest.handler.util.*; import org.apache.flink.runtime.rest...
[ "java.io", "java.nio", "java.text", "java.util", "org.apache.flink" ]
java.io; java.nio; java.text; java.util; org.apache.flink;
1,020,154
@ApiModelProperty(value = "This is the SKU for this chassis.") @JsonProperty("SKU") public String getSKU() { return SKU; }
@ApiModelProperty(value = STR) @JsonProperty("SKU") String function() { return SKU; }
/** * This is the SKU for this chassis. **/
This is the SKU for this chassis
getSKU
{ "repo_name": "jlongever/redfish-client-java", "path": "src/main/java/io/swagger/client/model/Chassis100Chassis.java", "license": "apache-2.0", "size": 13932 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "io.swagger.annotations.ApiModelProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.*; import io.swagger.annotations.*;
[ "com.fasterxml.jackson", "io.swagger.annotations" ]
com.fasterxml.jackson; io.swagger.annotations;
898,327
@Override public java.util.Date getCreateDate() { return _appRole2JobPos.getCreateDate(); }
java.util.Date function() { return _appRole2JobPos.getCreateDate(); }
/** * Returns the create date of this app role2 job pos. * * @return the create date of this app role2 job pos */
Returns the create date of this app role2 job pos
getCreateDate
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-core-ssomgt-portlet/docroot/WEB-INF/service/org/oep/core/ssomgt/model/AppRole2JobPosWrapper.java", "license": "apache-2.0", "size": 10006 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,400,237
java.util.List<InetSocketAddress> getServers();
java.util.List<InetSocketAddress> getServers();
/** * Returns an unmodifiable list of {@link java.net.InetSocketAddress} of the servers this pool is * using. These servers where either {@link PoolFactory#addServer added explicitly} when the pool * was created or were discovered using this pools {@link #getLocators locators}. */
Returns an unmodifiable list of <code>java.net.InetSocketAddress</code> of the servers this pool is using. These servers where either <code>PoolFactory#addServer added explicitly</code> when the pool was created or were discovered using this pools <code>#getLocators locators</code>
getServers
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/client/Pool.java", "license": "apache-2.0", "size": 9508 }
[ "java.net.InetSocketAddress" ]
import java.net.InetSocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,607,892
private KieFileSystem createKieFileSystemWithKProject(String kbaseName, String ksessionName) { KieModuleModel kproj = config.getKieProject(); KieFileSystem kfs = config.getKieServicesInstance().newKieFileSystem(); kfs.writeKModuleXML(kproj.toXML()); return kfs; }
KieFileSystem function(String kbaseName, String ksessionName) { KieModuleModel kproj = config.getKieProject(); KieFileSystem kfs = config.getKieServicesInstance().newKieFileSystem(); kfs.writeKModuleXML(kproj.toXML()); return kfs; }
/** * Create the {@link KieFileSystem} instance to store the content going into the KJar. * * @param kbaseName * @param ksessionName * @return */
Create the <code>KieFileSystem</code> instance to store the content going into the KJar
createKieFileSystemWithKProject
{ "repo_name": "romartin/drools", "path": "kie-ci/src/main/java/org/kie/api/builder/helper/KieModuleDeploymentHelperImpl.java", "license": "apache-2.0", "size": 25092 }
[ "org.kie.api.builder.KieFileSystem", "org.kie.api.builder.model.KieModuleModel" ]
import org.kie.api.builder.KieFileSystem; import org.kie.api.builder.model.KieModuleModel;
import org.kie.api.builder.*; import org.kie.api.builder.model.*;
[ "org.kie.api" ]
org.kie.api;
1,491,847
default WritablePointMask pointMask(final RealLocalizable point) { return GeomMasks.pointMask(point); } // ---- Polygon2D ----
default WritablePointMask pointMask(final RealLocalizable point) { return GeomMasks.pointMask(point); }
/** * Creates a {@link WritablePointMask} at the given location. * * @param point location of the point * @return a point at the given location */
Creates a <code>WritablePointMask</code> at the given location
pointMask
{ "repo_name": "imagej/imagej-common", "path": "src/main/java/net/imagej/roi/ROIService.java", "license": "bsd-2-clause", "size": 19993 }
[ "net.imglib2.RealLocalizable", "net.imglib2.roi.geom.GeomMasks", "net.imglib2.roi.geom.real.WritablePointMask" ]
import net.imglib2.RealLocalizable; import net.imglib2.roi.geom.GeomMasks; import net.imglib2.roi.geom.real.WritablePointMask;
import net.imglib2.*; import net.imglib2.roi.geom.*; import net.imglib2.roi.geom.real.*;
[ "net.imglib2", "net.imglib2.roi" ]
net.imglib2; net.imglib2.roi;
341,527
private void checkParameters(DetailAST aAST, String aName) { final DetailAST parametersAST = aAST.findFirstToken(TokenTypes.PARAMETERS); if (parametersAST.getChildCount() != 0) { log(aAST, "junit.method.parameters", aName); } }
void function(DetailAST aAST, String aName) { final DetailAST parametersAST = aAST.findFirstToken(TokenTypes.PARAMETERS); if (parametersAST.getChildCount() != 0) { log(aAST, STR, aName); } }
/** * Checks return value of given method. * @param aAST method definition node * @param aName method name */
Checks return value of given method
checkParameters
{ "repo_name": "jdoyle65/checkstyle", "path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheck.java", "license": "lgpl-2.1", "size": 7837 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
812,996
public void setDataElements(int x, int y, Raster inRaster) { int dstOffX = inRaster.getMinX() + x; int dstOffY = inRaster.getMinY() + y; int width = inRaster.getWidth(); int height = inRaster.getHeight(); if ((dstOffX < this.minX) || (dstOffY < this.minY) || (dst...
void function(int x, int y, Raster inRaster) { int dstOffX = inRaster.getMinX() + x; int dstOffY = inRaster.getMinY() + y; int width = inRaster.getWidth(); int height = inRaster.getHeight(); if ((dstOffX < this.minX) (dstOffY < this.minY) (dstOffX + width > this.maxX) (dstOffY + height > this.maxY)) { throw new ArrayIn...
/** * Stores the Raster data at the specified location. * An ArrayIndexOutOfBounds exception will be thrown at runtime * if the pixel coordinates are out of bounds. * @param x The X coordinate of the pixel location. * @param y The Y coordinate of the pixel location. * @pa...
Stores the Raster data at the specified location. An ArrayIndexOutOfBounds exception will be thrown at runtime if the pixel coordinates are out of bounds
setDataElements
{ "repo_name": "greghaskins/openjdk-jdk7u-jdk", "path": "src/share/classes/sun/awt/image/ByteComponentRaster.java", "license": "gpl-2.0", "size": 38858 }
[ "java.awt.image.Raster" ]
import java.awt.image.Raster;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
2,072,819
@Override public GroupDetails loadGroupByGroupname(String groupname) throws UsernameNotFoundException, DataAccessException { throw new UsernameNotFoundException(groupname); }
GroupDetails function(String groupname) throws UsernameNotFoundException, DataAccessException { throw new UsernameNotFoundException(groupname); }
/** * This implementation doesn't support groups. */
This implementation doesn't support groups
loadGroupByGroupname
{ "repo_name": "msrb/jenkins", "path": "core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java", "license": "mit", "size": 27821 }
[ "org.acegisecurity.userdetails.UsernameNotFoundException", "org.springframework.dao.DataAccessException" ]
import org.acegisecurity.userdetails.UsernameNotFoundException; import org.springframework.dao.DataAccessException;
import org.acegisecurity.userdetails.*; import org.springframework.dao.*;
[ "org.acegisecurity.userdetails", "org.springframework.dao" ]
org.acegisecurity.userdetails; org.springframework.dao;
1,865,909
public static String getHostAddressFromJava() { String ip; try { InetAddress addr = InetAddress.getLocalHost(); ip = addr.getHostAddress(); } catch (UnknownHostException e) { ip = "unknown"; String msg = e.getMessage...
static String function() { String ip; try { InetAddress addr = InetAddress.getLocalHost(); ip = addr.getHostAddress(); } catch (UnknownHostException e) { ip = STR; String msg = e.getMessage(); if (msg != null) { String[] parts = msg.split(":"); if (parts != null && parts.length>0) ip = parts[0]; } } return ip; }
/** * Tries to find a host address using InetAddress. * @return A string representation of an IP address. */
Tries to find a host address using InetAddress
getHostAddressFromJava
{ "repo_name": "jvanderhyde/worlds-tiniest-rpg", "path": "java/TiniestRPG/src/us/vanderhyde/IPAddress.java", "license": "mit", "size": 2501 }
[ "java.net.InetAddress", "java.net.UnknownHostException" ]
import java.net.InetAddress; import java.net.UnknownHostException;
import java.net.*;
[ "java.net" ]
java.net;
804,280
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); doReadObject(in); }
void function(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); doReadObject(in); }
/** * Deserializes the data held in this object to the stream specified. */
Deserializes the data held in this object to the stream specified
readObject
{ "repo_name": "megamattron/collections-generic", "path": "src/java/org/apache/commons/collections15/list/NodeCachingLinkedList.java", "license": "apache-2.0", "size": 7815 }
[ "java.io.IOException", "java.io.ObjectInputStream" ]
import java.io.IOException; import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
91,253
public Paint getBackgroundPaint() { return this.backgroundPaint; }
Paint function() { return this.backgroundPaint; }
/** * Returns the background paint. * * @return The background paint (never {@code null}). * * @see #setBackgroundPaint(Paint) */
Returns the background paint
getBackgroundPaint
{ "repo_name": "simon04/jfreechart", "path": "src/main/java/org/jfree/chart/plot/dial/StandardDialFrame.java", "license": "lgpl-2.1", "size": 10926 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,211,097
Assert.fail( "Test 'UserService_setPasswordTest.testSuccessPath()}' not implemented." ); }
Assert.fail( STR ); }
/** * Test succes path for service method <code>setPassword</code> * * Tests expected behaviour of service method. */
Test succes path for service method <code>setPassword</code> Tests expected behaviour of service method
testSuccessPath
{ "repo_name": "phoenixctms/ctsms", "path": "core/src/test/java/org/phoenixctms/ctsms/service/user/test/UserService_setPasswordTest.java", "license": "lgpl-2.1", "size": 1241 }
[ "org.testng.Assert" ]
import org.testng.Assert;
import org.testng.*;
[ "org.testng" ]
org.testng;
1,585,637
public ServiceCall<Void> getMethodPathValidAsync(String unencodedPathParam, final ServiceCallback<Void> serviceCallback) { if (unencodedPathParam == null) { throw new IllegalArgumentException("Parameter unencodedPathParam is required and cannot be null."); }
ServiceCall<Void> function(String unencodedPathParam, final ServiceCallback<Void> serviceCallback) { if (unencodedPathParam == null) { throw new IllegalArgumentException(STR); }
/** * Get method with unencoded path parameter with value 'path1/path2/path3'. * * @param unencodedPathParam Unencoded path parameter with value 'path1/path2/path3' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link Call} object ...
Get method with unencoded path parameter with value 'path1/path2/path3'
getMethodPathValidAsync
{ "repo_name": "yaqiyang/autorest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/azurespecials/implementation/SkipUrlEncodingsInner.java", "license": "mit", "size": 26038 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
29,305
public void returnCNAB(HashMap<Integer,String[]> occurType, String FilePath, String[] linhas, String trx) throws IOException{ FileWriter fw = ReturnCNABUtil.createFile(FilePath); for (int i = 1;i<((linhas.length)-1);i++) { try{ if(linhas[i].substring(0, 1).equals("7")) fw = returnCNAB7Pos(occ...
void function(HashMap<Integer,String[]> occurType, String FilePath, String[] linhas, String trx) throws IOException{ FileWriter fw = ReturnCNABUtil.createFile(FilePath); for (int i = 1;i<((linhas.length)-1);i++) { try{ if(linhas[i].substring(0, 1).equals("7")) fw = returnCNAB7Pos(occurType, FilePath, linhas, trx, i, fw...
/** * Processar Retorno do CNAB */
Processar Retorno do CNAB
returnCNAB
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempierelbr/boleto/src/org/adempierelbr/boleto/bank/MBancoBrasil.java", "license": "gpl-2.0", "size": 38841 }
[ "java.io.FileWriter", "java.io.IOException", "java.util.HashMap", "org.adempierelbr.util.ReturnCNABUtil", "org.adempierelbr.util.TextUtil" ]
import java.io.FileWriter; import java.io.IOException; import java.util.HashMap; import org.adempierelbr.util.ReturnCNABUtil; import org.adempierelbr.util.TextUtil;
import java.io.*; import java.util.*; import org.adempierelbr.util.*;
[ "java.io", "java.util", "org.adempierelbr.util" ]
java.io; java.util; org.adempierelbr.util;
1,465,241
private boolean isSingleton(Class type) { return type.isAnnotationPresent(Singleton.class) || singletonClasses.contains(type); }
boolean function(Class type) { return type.isAnnotationPresent(Singleton.class) singletonClasses.contains(type); }
/** * Check if the given class type is marked as singleton. */
Check if the given class type is marked as singleton
isSingleton
{ "repo_name": "lestard/EasyDI", "path": "src/main/java/eu/lestard/easydi/EasyDI.java", "license": "apache-2.0", "size": 16882 }
[ "javax.inject.Singleton" ]
import javax.inject.Singleton;
import javax.inject.*;
[ "javax.inject" ]
javax.inject;
2,215,256