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 NodeIndicesStats stats(boolean includePrevious) {
return stats(includePrevious, new CommonStatsFlags().all());
} | NodeIndicesStats function(boolean includePrevious) { return stats(includePrevious, new CommonStatsFlags().all()); } | /**
* Returns the node stats indices stats. The <tt>includePrevious</tt> flag controls
* if old shards stats will be aggregated as well (only for relevant stats, such as
* refresh and indexing, not for docs/store).
*/ | Returns the node stats indices stats. The includePrevious flag controls if old shards stats will be aggregated as well (only for relevant stats, such as refresh and indexing, not for docs/store) | stats | {
"repo_name": "fred84/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/indices/IndicesService.java",
"license": "apache-2.0",
"size": 64647
} | [
"org.elasticsearch.action.admin.indices.stats.CommonStatsFlags"
] | import org.elasticsearch.action.admin.indices.stats.CommonStatsFlags; | import org.elasticsearch.action.admin.indices.stats.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,175,096 |
private ITypedRegion[] computeDocumentPartitioning(IDocument iDoc)
{
ITypedRegion[] regions = null;
try
{
regions = iDoc.computePartitioning(0, iDoc.getLength());
}
catch (BadLocationException e1)
{
// e1.printStackTrace();
}
return regions;
}
| ITypedRegion[] function(IDocument iDoc) { ITypedRegion[] regions = null; try { regions = iDoc.computePartitioning(0, iDoc.getLength()); } catch (BadLocationException e1) { } return regions; } | /**
* Computes the document partitions.
*
* @param iDoc
* the document
* @return an array regions
*/ | Computes the document partitions | computeDocumentPartitioning | {
"repo_name": "matthias-wolff/dLabPro-Plugin",
"path": "Plugin/src/de/tudresden/ias/eclipse/dlabpro/properties/XtpFileProperties.java",
"license": "lgpl-3.0",
"size": 17637
} | [
"org.eclipse.jface.text.BadLocationException",
"org.eclipse.jface.text.IDocument",
"org.eclipse.jface.text.ITypedRegion"
] | import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITypedRegion; | import org.eclipse.jface.text.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,115,279 |
private String scanTagDirectiveHandle(Mark startMark) {
// See the specification for details.
String value = scanTagHandle("directive", startMark);
char ch = reader.peek();
if (ch != ' ') {
throw new ScannerException("while scanning a directive", startMark,
... | String function(Mark startMark) { String value = scanTagHandle(STR, startMark); char ch = reader.peek(); if (ch != ' ') { throw new ScannerException(STR, startMark, STR + reader.peek() + "(" + ch + ")", reader.getMark()); } return value; } | /**
* Scan a %TAG directive's handle. This is YAML's c-tag-handle.
*
* @see http://www.yaml.org/spec/1.1/#id896876
* @param startMark
* @return
*/ | Scan a %TAG directive's handle. This is YAML's c-tag-handle | scanTagDirectiveHandle | {
"repo_name": "PRECISE/ROSLab",
"path": "lib/snakeyaml-src/src/main/java/org/yaml/snakeyaml/scanner/ScannerImpl.java",
"license": "apache-2.0",
"size": 82647
} | [
"org.yaml.snakeyaml.error.Mark"
] | import org.yaml.snakeyaml.error.Mark; | import org.yaml.snakeyaml.error.*; | [
"org.yaml.snakeyaml"
] | org.yaml.snakeyaml; | 1,356,480 |
private static boolean createAccount(Context context) {
Account account = getAccount();
AccountManager accountManager = (AccountManager) context.getSystemService(ACCOUNT_SERVICE);
if (accountManager.addAccountExplicitly(account, null, null)) {
// Enable automatic sync for the acc... | static boolean function(Context context) { Account account = getAccount(); AccountManager accountManager = (AccountManager) context.getSystemService(ACCOUNT_SERVICE); if (accountManager.addAccountExplicitly(account, null, null)) { ContentResolver.setIsSyncable(account, Contracts.CONTENT_AUTHORITY, 1); ContentResolver.s... | /**
* Creates the sync account for this app if it doesn't already exist.
* @return true if a new account was created
*/ | Creates the sync account for this app if it doesn't already exist | createAccount | {
"repo_name": "jvanz/client",
"path": "app/src/main/java/org/projectbuendia/client/sync/SyncAccountService.java",
"license": "apache-2.0",
"size": 7282
} | [
"android.accounts.Account",
"android.accounts.AccountManager",
"android.content.ContentResolver",
"android.content.Context",
"android.os.Bundle",
"org.projectbuendia.client.sync.SyncAdapter",
"org.projectbuendia.client.sync.providers.Contracts"
] | import android.accounts.Account; import android.accounts.AccountManager; import android.content.ContentResolver; import android.content.Context; import android.os.Bundle; import org.projectbuendia.client.sync.SyncAdapter; import org.projectbuendia.client.sync.providers.Contracts; | import android.accounts.*; import android.content.*; import android.os.*; import org.projectbuendia.client.sync.*; import org.projectbuendia.client.sync.providers.*; | [
"android.accounts",
"android.content",
"android.os",
"org.projectbuendia.client"
] | android.accounts; android.content; android.os; org.projectbuendia.client; | 2,659,202 |
public static java.sql.Date asSqlDate( Date date )
{
return new java.sql.Date( date.getTime() );
}
| static java.sql.Date function( Date date ) { return new java.sql.Date( date.getTime() ); } | /**
* Converts the given {@link Date} to a {@link java.sql.Date}.
*
* @param date the date to convert.
* @return a date.
*/ | Converts the given <code>Date</code> to a <code>java.sql.Date</code> | asSqlDate | {
"repo_name": "troyel/dhis2-core",
"path": "dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java",
"license": "bsd-3-clause",
"size": 24563
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,371,257 |
public static void main(String... args)
{
final Map<String,String> mappings = new HashMap<>();
mappings.put("Fred Flintstone", "Flintstone, F.");
mappings.put("Barney Rubble", "Rubble, B.");
mappings.put("Road Runner", "Runner, R.");
mappings.put("Yosemite Sam", ... | static void function(String... args) { final Map<String,String> mappings = new HashMap<>(); mappings.put(STR, STR); mappings.put(STR, STR); mappings.put(STR, STR); mappings.put(STR, STR); mappings.put(STR, STR); mappings.put(STR, STR); mappings.put(STR, STR); new NamingSolver().solve(mappings); } | /**
* Entry point.
*/ | Entry point | main | {
"repo_name": "iamsrp/genecode",
"path": "src/example/NamingSolver.java",
"license": "apache-2.0",
"size": 784
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,169,959 |
public static void setClassLoader(ClassLoader classLoader,
Configuration conf) {
if (classLoader != null) {
LOG.info("Setting classloader " + classLoader.getClass().getName() +
" on the configuration and as the thread context classloader");
conf.setClassLoader(classLoader);
Threa... | static void function(ClassLoader classLoader, Configuration conf) { if (classLoader != null) { LOG.info(STR + classLoader.getClass().getName() + STR); conf.setClassLoader(classLoader); Thread.currentThread().setContextClassLoader(classLoader); } } | /**
* Sets the provided classloader on the given configuration and as the thread
* context classloader if the classloader is not null.
* @param classLoader
* @param conf
*/ | Sets the provided classloader on the given configuration and as the thread context classloader if the classloader is not null | setClassLoader | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java",
"license": "apache-2.0",
"size": 28739
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 750,103 |
public static NetworkInterface getNetworkInterface(Config config, String path) {
NetworkInterface value = getNetworkInterfaceByName(config, path);
if (value == null)
value = getNetworkInterfaceByInetAddress(config, path);
if (value == null)
throw badValue("No network... | static NetworkInterface function(Config config, String path) { NetworkInterface value = getNetworkInterfaceByName(config, path); if (value == null) value = getNetworkInterfaceByInetAddress(config, path); if (value == null) throw badValue(STR + config.getString(path) + "'", config, path); return value; } | /**
* Get a network interface. The network interface can be identified by its
* name or its IP address.
*
* @param config a configuration object
* @param path the path expression
* @return a network interface
* @throws ConfigException.Missing if the value is absent or null
* @thr... | Get a network interface. The network interface can be identified by its name or its IP address | getNetworkInterface | {
"repo_name": "jvirtanen/config-extras",
"path": "src/main/java/org/jvirtanen/config/Configs.java",
"license": "apache-2.0",
"size": 3777
} | [
"com.typesafe.config.Config",
"java.net.NetworkInterface"
] | import com.typesafe.config.Config; import java.net.NetworkInterface; | import com.typesafe.config.*; import java.net.*; | [
"com.typesafe.config",
"java.net"
] | com.typesafe.config; java.net; | 390,767 |
@Begin(join=true)
public void loadMetadata(){
log.info("init metadataSet...");
LinkedList<UIMetadata> res = new LinkedList<UIMetadata>();
List<String> disabledProperties = Arrays.asList(new String[] {
Constants.NS_KIWI_CORE+"hasTextContent",
Constants.NS_KIWI_CORE+"id"
});
for(KiWiTr... | @Begin(join=true) void function(){ log.info(STR); LinkedList<UIMetadata> res = new LinkedList<UIMetadata>(); List<String> disabledProperties = Arrays.asList(new String[] { Constants.NS_KIWI_CORE+STR, Constants.NS_KIWI_CORE+"id" }); for(KiWiTriple triple : currentContentItem.getResource().listOutgoing()) { if(triple.get... | /**
* initializes the metadataSet variable from the tripleStore.
*/ | initializes the metadataSet variable from the tripleStore | loadMetadata | {
"repo_name": "StexX/KiWi-OSE",
"path": "extensions/wiki/src/kiwi/wiki/action/MetadataAction.java",
"license": "bsd-3-clause",
"size": 11033
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.Comparator",
"java.util.LinkedList",
"java.util.List",
"kiwi.model.Constants",
"kiwi.model.kbase.KiWiLiteral",
"kiwi.model.kbase.KiWiTriple",
"org.jboss.seam.annotations.Begin"
] | import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.List; import kiwi.model.Constants; import kiwi.model.kbase.KiWiLiteral; import kiwi.model.kbase.KiWiTriple; import org.jboss.seam.annotations.Begin; | import java.util.*; import kiwi.model.*; import kiwi.model.kbase.*; import org.jboss.seam.annotations.*; | [
"java.util",
"kiwi.model",
"kiwi.model.kbase",
"org.jboss.seam"
] | java.util; kiwi.model; kiwi.model.kbase; org.jboss.seam; | 714,696 |
public void doChangePassword(){
AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());
LinearLayout layout = new LinearLayout(getActivity().getBaseContext());
layout.setOrientation(LinearLayout.VERTICAL);
alert.setTitle(getString(R.string.app_name));
alert.set... | void function(){ AlertDialog.Builder alert = new AlertDialog.Builder(getActivity()); LinearLayout layout = new LinearLayout(getActivity().getBaseContext()); layout.setOrientation(LinearLayout.VERTICAL); alert.setTitle(getString(R.string.app_name)); alert.setMessage(getString(R.string.text_change_pass)); final EditText ... | /**
* Change Password
*/ | Change Password | doChangePassword | {
"repo_name": "Notificare/notificare-android-hybrid",
"path": "app/src/main/java/re/notifica/demo/ProfileFragment.java",
"license": "mit",
"size": 28042
} | [
"android.text.InputType",
"android.widget.EditText",
"android.widget.LinearLayout",
"androidx.appcompat.app.AlertDialog"
] | import android.text.InputType; import android.widget.EditText; import android.widget.LinearLayout; import androidx.appcompat.app.AlertDialog; | import android.text.*; import android.widget.*; import androidx.appcompat.app.*; | [
"android.text",
"android.widget",
"androidx.appcompat"
] | android.text; android.widget; androidx.appcompat; | 2,869,001 |
@Transactional
public List<SurveyResult> getIncompleteVolunteerSurveys(int volunteerId);
| List<SurveyResult> function(int volunteerId); | /**
* a List of completed volunteer Survey results for a volunteer
* @param volunteerId
* @return A List of SurveyResult objects
*/ | a List of completed volunteer Survey results for a volunteer | getIncompleteVolunteerSurveys | {
"repo_name": "raiedsiddiqui/TAP-HCDM",
"path": "src/main/java/org/tapestry/service/SurveyManager.java",
"license": "agpl-3.0",
"size": 9923
} | [
"java.util.List",
"org.tapestry.objects.SurveyResult"
] | import java.util.List; import org.tapestry.objects.SurveyResult; | import java.util.*; import org.tapestry.objects.*; | [
"java.util",
"org.tapestry.objects"
] | java.util; org.tapestry.objects; | 480,569 |
private void addLeavesAttributes() {
List<YangLeaf> leaves = getListOfLeaf();
if (leaves != null) {
for (YangLeaf leaf : leaves) {
getFileHandle().addAttributeInfo(leaf.getDataType(), leaf.getLeafName(), false);
}
}
} | void function() { List<YangLeaf> leaves = getListOfLeaf(); if (leaves != null) { for (YangLeaf leaf : leaves) { getFileHandle().addAttributeInfo(leaf.getDataType(), leaf.getLeafName(), false); } } } | /**
* Adds leaf attributes in generated files.
*/ | Adds leaf attributes in generated files | addLeavesAttributes | {
"repo_name": "sonu283304/onos",
"path": "utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java",
"license": "apache-2.0",
"size": 21148
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,680,040 |
@Schema(description = "Protocol to connect to syslog server")
public ProtocolEnum getProtocol() {
return protocol;
} | @Schema(description = STR) ProtocolEnum function() { return protocol; } | /**
* Protocol to connect to syslog server
* @return protocol
**/ | Protocol to connect to syslog server | getProtocol | {
"repo_name": "iterate-ch/cyberduck",
"path": "dracoon/src/main/java/ch/cyberduck/core/sds/io/swagger/client/model/UpdateSyslogConfig.java",
"license": "gpl-3.0",
"size": 5748
} | [
"io.swagger.v3.oas.annotations.media.Schema"
] | import io.swagger.v3.oas.annotations.media.Schema; | import io.swagger.v3.oas.annotations.media.*; | [
"io.swagger.v3"
] | io.swagger.v3; | 868,197 |
public String getAddColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
{
return "ALTER TABLE "+tablename+" ADD ( "+getFieldDefinition(v, tk, pk, use_autoinc, true, false)+" ) ";
}
| String function(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon) { return STR+tablename+STR+getFieldDefinition(v, tk, pk, use_autoinc, true, false)+STR; } | /**
* Generates the SQL statement to add a column to the specified table
* @param tablename The table to add
* @param v The column defined as a value
* @param tk the name of the technical key field
* @param use_autoinc whether or not this field uses auto increment
* @param pk the name of the primary k... | Generates the SQL statement to add a column to the specified table | getAddColumnStatement | {
"repo_name": "icholy/geokettle-2.0",
"path": "src-db/org/pentaho/di/core/database/NeoviewDatabaseMeta.java",
"license": "lgpl-2.1",
"size": 14819
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,198,257 |
@CalledByNative
private static int getMinOutputFrameSize(int sampleRate, int channels) {
int channelConfig;
if (channels == 1) {
channelConfig = AudioFormat.CHANNEL_OUT_MONO;
} else if (channels == 2) {
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
} els... | static int function(int sampleRate, int channels) { int channelConfig; if (channels == 1) { channelConfig = AudioFormat.CHANNEL_OUT_MONO; } else if (channels == 2) { channelConfig = AudioFormat.CHANNEL_OUT_STEREO; } else { return -1; } return AudioTrack.getMinBufferSize( sampleRate, channelConfig, AudioFormat.ENCODING_... | /**
* Returns the minimum frame size required for audio output.
*
* @param sampleRate sampling rate
* @param channels number of channels
*/ | Returns the minimum frame size required for audio output | getMinOutputFrameSize | {
"repo_name": "chromium2014/src",
"path": "media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java",
"license": "bsd-3-clause",
"size": 43534
} | [
"android.media.AudioFormat",
"android.media.AudioTrack"
] | import android.media.AudioFormat; import android.media.AudioTrack; | import android.media.*; | [
"android.media"
] | android.media; | 769,831 |
public static void copy(File from, Charset charset, Appendable to) throws IOException {
asCharSource(from, charset).copyTo(to);
} | static void function(File from, Charset charset, Appendable to) throws IOException { asCharSource(from, charset).copyTo(to); } | /**
* Copies all characters from a file to an appendable object, using the given character set.
*
* @param from the source file
* @param charset the charset used to decode the input stream; see {@link StandardCharsets} for
* helpful predefined constants
* @param to the appendable object
* @thro... | Copies all characters from a file to an appendable object, using the given character set | copy | {
"repo_name": "antlr/codebuff",
"path": "output/java_guava/1.4.19/Files.java",
"license": "bsd-2-clause",
"size": 30549
} | [
"java.io.File",
"java.io.IOException",
"java.nio.charset.Charset"
] | import java.io.File; import java.io.IOException; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,553,521 |
public static int[] parseLayoutPath(final String attrLayoutPath) {
if (TextUtils.isEmpty(attrLayoutPath)) {
return null;
}
final String[] strIndices = attrLayoutPath.split(":");
final int[] indices = new int[strIndices.length];
for (int i = 0; i < strIndices.leng... | static int[] function(final String attrLayoutPath) { if (TextUtils.isEmpty(attrLayoutPath)) { return null; } final String[] strIndices = attrLayoutPath.split(":"); final int[] indices = new int[strIndices.length]; for (int i = 0; i < strIndices.length; ++i) { final String str = strIndices[i]; try { indices[i] = Integer... | /**
* Get an array of int indices from the :-separated string.
* See buildLayoutPath().
*
* @param attrLayoutPath
* @return The array of indices of the layout items.
*/ | Get an array of int indices from the :-separated string. See buildLayoutPath() | parseLayoutPath | {
"repo_name": "murraycu/android-glom",
"path": "app/src/main/java/org/glom/app/Utils.java",
"license": "gpl-3.0",
"size": 11625
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 2,088,092 |
public void markup(String str) throws IOException
{
xmlOut.markup(str);
} | void function(String str) throws IOException { xmlOut.markup(str); } | /**
* <p>Writes markup.</p>
*
* <p>The characters in the string will be written as is
* without being escaped (except for any escaping enabled by
* <code>startReplacementText</code>).</p>
*/ | Writes markup. The characters in the string will be written as is without being escaped (except for any escaping enabled by <code>startReplacementText</code>) | markup | {
"repo_name": "jonabbey/Ganymede",
"path": "src/ganymede/arlut/csd/ganymede/server/XMLDumpContext.java",
"license": "gpl-2.0",
"size": 22698
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,149,529 |
EReference getCreateView_Mapping(); | EReference getCreateView_Mapping(); | /**
* Returns the meta object for the reference '
* {@link org.eclipse.sirius.diagram.description.tool.CreateView#getMapping
* <em>Mapping</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the meta object for the reference '<em>Mapping</em>'.
* @see org.eclipse.sirius.diag... | Returns the meta object for the reference ' <code>org.eclipse.sirius.diagram.description.tool.CreateView#getMapping Mapping</code>'. | getCreateView_Mapping | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/tool/ToolPackage.java",
"license": "epl-1.0",
"size": 180886
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,445,896 |
public TreeImageDisplay getLoggedExperimenterNode()
{
SecurityContext ctx = model.getSecurityContext(null);
long id = ctx.getGroupID();
if (model.isSingleGroup()) id = -1;
ExperimenterVisitor visitor = new ExperimenterVisitor(this,
model.getUserID(), id);
accept(visitor, TreeImageDisplayVisitor.TREEI... | TreeImageDisplay function() { SecurityContext ctx = model.getSecurityContext(null); long id = ctx.getGroupID(); if (model.isSingleGroup()) id = -1; ExperimenterVisitor visitor = new ExperimenterVisitor(this, model.getUserID(), id); accept(visitor, TreeImageDisplayVisitor.TREEIMAGE_SET_ONLY); List<TreeImageDisplay> node... | /**
* Implemented as specified by the {@link Browser} interface.
* @see Browser#getLoggedExperimenterNode()
*/ | Implemented as specified by the <code>Browser</code> interface | getLoggedExperimenterNode | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java",
"license": "gpl-2.0",
"size": 78014
} | [
"java.util.List",
"org.openmicroscopy.shoola.agents.treeviewer.cmd.ExperimenterVisitor",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplayVisitor",
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import java.util.List; import org.openmicroscopy.shoola.agents.treeviewer.cmd.ExperimenterVisitor; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplayVisitor; import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.cmd.*; import org.openmicroscopy.shoola.agents.util.browser.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,437,740 |
boolean rollback(BusinessActionContext actionContext, @BusinessActionContextParameter("tccParam") TccParam param); | boolean rollback(BusinessActionContext actionContext, @BusinessActionContextParameter(STR) TccParam param); | /**
* Rollback boolean.
*
* @param actionContext the action context
* @return the boolean
*/ | Rollback boolean | rollback | {
"repo_name": "seata/seata",
"path": "tcc/src/test/java/io/seata/rm/tcc/TccAction.java",
"license": "apache-2.0",
"size": 2134
} | [
"io.seata.rm.tcc.api.BusinessActionContext",
"io.seata.rm.tcc.api.BusinessActionContextParameter"
] | import io.seata.rm.tcc.api.BusinessActionContext; import io.seata.rm.tcc.api.BusinessActionContextParameter; | import io.seata.rm.tcc.api.*; | [
"io.seata.rm"
] | io.seata.rm; | 2,646,561 |
public Bundle getExtras() {
if (mExtras == null) {
mExtras = new Bundle();
}
return mExtras;
} | Bundle function() { if (mExtras == null) { mExtras = new Bundle(); } return mExtras; } | /**
* Get the current metadata Bundle used by this notification Builder.
*
* <p>The returned Bundle is shared with this Builder.
*
* <p>The current contents of this Bundle are copied into the Notification each time
* {@link #build()} is called.
*
*... | Get the current metadata Bundle used by this notification Builder. The returned Bundle is shared with this Builder. The current contents of this Bundle are copied into the Notification each time <code>#build()</code> is called | getExtras | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/android/support/v4/app/NotificationCompat.java",
"license": "apache-2.0",
"size": 97653
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 235,985 |
@Override
protected void itemRemoved(IContributionItem item) {
Assert.isNotNull(item);
super.itemRemoved(item);
CoolItem coolItem = findCoolItem(item);
if (coolItem != null) {
coolItem.setData(null);
}
} | void function(IContributionItem item) { Assert.isNotNull(item); super.itemRemoved(item); CoolItem coolItem = findCoolItem(item); if (coolItem != null) { coolItem.setData(null); } } | /**
* Subclasses may extend this <code>ContributionManager</code> method,
* but must call <code>super.itemRemoved</code>.
*
* @see org.eclipse.jface.action.ContributionManager#itemRemoved(org.eclipse.jface.action.IContributionItem)
*/ | Subclasses may extend this <code>ContributionManager</code> method, but must call <code>super.itemRemoved</code> | itemRemoved | {
"repo_name": "AntoineDelacroix/NewSuperProject-",
"path": "org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java",
"license": "gpl-2.0",
"size": 35985
} | [
"org.eclipse.core.runtime.Assert",
"org.eclipse.swt.widgets.CoolItem"
] | import org.eclipse.core.runtime.Assert; import org.eclipse.swt.widgets.CoolItem; | import org.eclipse.core.runtime.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.core",
"org.eclipse.swt"
] | org.eclipse.core; org.eclipse.swt; | 101,904 |
public void clear() {
setName( null );
setFilename( null );
jobcopies = new ArrayList<JobEntryCopy>();
jobhops = new ArrayList<JobHopMeta>();
notes = new ArrayList<NotePadMeta>();
databases = new ArrayList<DatabaseMeta>();
slaveServers = new ArrayList<SlaveServer>();
jobLogTable = JobLogT... | void function() { setName( null ); setFilename( null ); jobcopies = new ArrayList<JobEntryCopy>(); jobhops = new ArrayList<JobHopMeta>(); notes = new ArrayList<NotePadMeta>(); databases = new ArrayList<DatabaseMeta>(); slaveServers = new ArrayList<SlaveServer>(); jobLogTable = JobLogTable.getDefault(this, this); channe... | /**
* Clears or reinitializes many of the JobMeta properties.
*/ | Clears or reinitializes many of the JobMeta properties | clear | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 103745
} | [
"java.util.ArrayList",
"java.util.Date",
"org.pentaho.di.cluster.SlaveServer",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.NotePadMeta",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.core.logging.ChannelLogTable",
"org.pentaho.di.core.logging.JobEntryLogTable",
"org.pentaho.di.c... | import java.util.ArrayList; import java.util.Date; import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.Const; import org.pentaho.di.core.NotePadMeta; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.logging.ChannelLogTable; import org.pentaho.di.core.logging.JobEntryLogTabl... | import java.util.*; import org.pentaho.di.cluster.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.core.undo.*; import org.pentaho.di.job.entry.*; import org.pentaho.di.repository.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 797,067 |
public DcmElement putCS(int tag) {
return put(StringElement.createCS(tag));
} | DcmElement function(int tag) { return put(StringElement.createCS(tag)); } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putCS | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/trunk/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 86569
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 2,405,918 |
final CreateColumnFamilyStatement statement =
(CreateColumnFamilyStatement) QueryProcessor.parseStatement(cql).prepare().statement;
final CFMetaData cfm =
new CFMetaData("assess", "kvs_strict", ColumnFamilyType.Standard, statement.comparator, null);
statement.applyPrope... | final CreateColumnFamilyStatement statement = (CreateColumnFamilyStatement) QueryProcessor.parseStatement(cql).prepare().statement; final CFMetaData cfm = new CFMetaData(STR, STR, ColumnFamilyType.Standard, statement.comparator, null); statement.applyPropertiesTo(cfm); return cfm; } private CQLUtil() {} | /**
* Parses a CQL CREATE statement into its CFMetaData object
*
* @param cql
* @return CFMetaData
* @throws RequestValidationException if CQL is invalid
*/ | Parses a CQL CREATE statement into its CFMetaData object | parseCreateStatement | {
"repo_name": "fullcontact/hadoop-sstable",
"path": "sstable-core/src/main/java/com/fullcontact/sstable/util/CQLUtil.java",
"license": "apache-2.0",
"size": 1153
} | [
"org.apache.cassandra.config.CFMetaData",
"org.apache.cassandra.cql3.QueryProcessor",
"org.apache.cassandra.cql3.statements.CreateColumnFamilyStatement",
"org.apache.cassandra.db.ColumnFamilyType"
] | import org.apache.cassandra.config.CFMetaData; import org.apache.cassandra.cql3.QueryProcessor; import org.apache.cassandra.cql3.statements.CreateColumnFamilyStatement; import org.apache.cassandra.db.ColumnFamilyType; | import org.apache.cassandra.config.*; import org.apache.cassandra.cql3.*; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 2,305,311 |
@Nonnull
public BookingCustomerBaseRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
return new com.microsoft.graph.requests.BookingCustomerBaseRequest(getRequestUrl(), getClient(), requestOptions);
} | BookingCustomerBaseRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { return new com.microsoft.graph.requests.BookingCustomerBaseRequest(getRequestUrl(), getClient(), requestOptions); } | /**
* Creates the request with specific requestOptions instead of the existing requestOptions
*
* @param requestOptions the options for this request
* @return the BookingCustomerBaseRequest instance
*/ | Creates the request with specific requestOptions instead of the existing requestOptions | buildRequest | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/BookingCustomerBaseRequestBuilder.java",
"license": "mit",
"size": 2412
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,681,815 |
protected FixtureClock getFixtureClock() {
return ((FixtureClock)FixtureClock.getInstance());
}
// ////////////////////////////////////// | FixtureClock function() { return ((FixtureClock)FixtureClock.getInstance()); } | /**
* If just require the current time, use {@link ClockService}.
*/ | If just require the current time, use <code>ClockService</code> | getFixtureClock | {
"repo_name": "incodehq/isis",
"path": "core/integtestsupport/src/main/java/org/apache/isis/core/integtestsupport/IntegrationTestAbstract.java",
"license": "apache-2.0",
"size": 10889
} | [
"org.apache.isis.applib.fixtures.FixtureClock"
] | import org.apache.isis.applib.fixtures.FixtureClock; | import org.apache.isis.applib.fixtures.*; | [
"org.apache.isis"
] | org.apache.isis; | 970,870 |
@Override
protected AWSApplicationAutoScalingAsync build(AwsAsyncClientParams params) {
return new AWSApplicationAutoScalingAsyncClient(params);
} | AWSApplicationAutoScalingAsync function(AwsAsyncClientParams params) { return new AWSApplicationAutoScalingAsyncClient(params); } | /**
* Construct an asynchronous implementation of AWSApplicationAutoScalingAsync using the current builder
* configuration.
*
* @param params
* Current builder configuration represented as a parameter object.
* @return Fully configured implementation of AWSApplicationAutoScalingAsyn... | Construct an asynchronous implementation of AWSApplicationAutoScalingAsync using the current builder configuration | build | {
"repo_name": "dagnir/aws-sdk-java",
"path": "aws-java-sdk-applicationautoscaling/src/main/java/com/amazonaws/services/applicationautoscaling/AWSApplicationAutoScalingAsyncClientBuilder.java",
"license": "apache-2.0",
"size": 2601
} | [
"com.amazonaws.client.AwsAsyncClientParams"
] | import com.amazonaws.client.AwsAsyncClientParams; | import com.amazonaws.client.*; | [
"com.amazonaws.client"
] | com.amazonaws.client; | 364,965 |
public static Socket getSocket(String ip_addr, int port) throws IOException {
Socket sock = new Socket();
sock.setSoTimeout(ClientGlobal.g_network_timeout);
sock.connect(new InetSocketAddress(ip_addr, port), ClientGlobal.g_connect_timeout);
return sock;
} | static Socket function(String ip_addr, int port) throws IOException { Socket sock = new Socket(); sock.setSoTimeout(ClientGlobal.g_network_timeout); sock.connect(new InetSocketAddress(ip_addr, port), ClientGlobal.g_connect_timeout); return sock; } | /**
* construct Socket object
*
* @param ip_addr ip address or hostname
* @param port port number
* @return connected Socket object
*/ | construct Socket object | getSocket | {
"repo_name": "chen1457789/iBase4J",
"path": "iBase4J-Common/src/main/java/org/csource/fastdfs/ClientGlobal.java",
"license": "apache-2.0",
"size": 5725
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.Socket"
] | import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 599,696 |
public static RenderableOp createRenderable(RenderableImage source0,
RenderableImage source1,
RenderingHints hints) {
ParameterBlockJAI pb =
new ParameterBlockJAI("PolarToComplex",
... | static RenderableOp function(RenderableImage source0, RenderableImage source1, RenderingHints hints) { ParameterBlockJAI pb = new ParameterBlockJAI(STR, RenderableRegistryMode.MODE_NAME); pb.setSource(STR, source0); pb.setSource(STR, source1); return JAI.createRenderable(STR, pb, hints); } | /**
* Computes a complex image from a magnitude and a phase image.
*
* <p>Creates a <code>ParameterBlockJAI</code> from all
* supplied arguments except <code>hints</code> and invokes
* {@link JAI#createRenderable(String,ParameterBlock,RenderingHints)}.
*
* @see JAI
* @see... | Computes a complex image from a magnitude and a phase image. Creates a <code>ParameterBlockJAI</code> from all supplied arguments except <code>hints</code> and invokes <code>JAI#createRenderable(String,ParameterBlock,RenderingHints)</code> | createRenderable | {
"repo_name": "RoProducts/rastertheque",
"path": "JAILibrary/src/javax/media/jai/operator/PolarToComplexDescriptor.java",
"license": "gpl-2.0",
"size": 8196
} | [
"java.awt.RenderingHints",
"java.awt.image.renderable.RenderableImage",
"javax.media.jai.JAI",
"javax.media.jai.ParameterBlockJAI",
"javax.media.jai.RenderableOp",
"javax.media.jai.registry.RenderableRegistryMode"
] | import java.awt.RenderingHints; import java.awt.image.renderable.RenderableImage; import javax.media.jai.JAI; import javax.media.jai.ParameterBlockJAI; import javax.media.jai.RenderableOp; import javax.media.jai.registry.RenderableRegistryMode; | import java.awt.*; import java.awt.image.renderable.*; import javax.media.jai.*; import javax.media.jai.registry.*; | [
"java.awt",
"javax.media"
] | java.awt; javax.media; | 2,655,429 |
public List<Author> getBookAuthors()
{
List<Author> immutableAuthors = ImmutableList.copyOf(bookAuthors);
return immutableAuthors;
} | List<Author> function() { List<Author> immutableAuthors = ImmutableList.copyOf(bookAuthors); return immutableAuthors; } | /**
* <p>Getter for the field <code>bookAuthors</code>.</p>
*
* @return a {@link java.util.List} object.
*/ | Getter for the field <code>bookAuthors</code> | getBookAuthors | {
"repo_name": "andyglick/cucumber-spring-eclipselink",
"path": "src/main/java/info/cukes/Book.java",
"license": "apache-2.0",
"size": 5008
} | [
"com.google.common.collect.ImmutableList",
"java.util.List"
] | import com.google.common.collect.ImmutableList; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,757,993 |
final File file = new File(ALLUXIO_TEST_DIRECTORY, prefix + "-" + UUID.randomUUID());
if (!file.mkdir()) {
throw new RuntimeException("Failed to create directory " + file.getAbsolutePath());
} | final File file = new File(ALLUXIO_TEST_DIRECTORY, prefix + "-" + UUID.randomUUID()); if (!file.mkdir()) { throw new RuntimeException(STR + file.getAbsolutePath()); } | /**
* Creates a directory with the given prefix inside the Alluxio temporary directory.
*
* @param prefix a prefix to use in naming the temporary directory
* @return the created directory
*/ | Creates a directory with the given prefix inside the Alluxio temporary directory | createTemporaryDirectory | {
"repo_name": "bit-zyl/Alluxio-Nvdimm",
"path": "core/common/src/test/java/alluxio/AlluxioTestDirectory.java",
"license": "apache-2.0",
"size": 3451
} | [
"java.io.File",
"java.util.UUID"
] | import java.io.File; import java.util.UUID; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,002,356 |
public static HSSFRow getRow( int rowCounter, HSSFSheet sheet )
{
HSSFRow row = sheet.getRow( rowCounter );
if ( row == null )
{
row = sheet.createRow( rowCounter );
}
return row;
} | static HSSFRow function( int rowCounter, HSSFSheet sheet ) { HSSFRow row = sheet.getRow( rowCounter ); if ( row == null ) { row = sheet.createRow( rowCounter ); } return row; } | /**
* Get a row from the spreadsheet, and create it if it doesn't exist.
*
*@param rowCounter The 0 based row number
*@param sheet The sheet that the row is part of.
*@return The row indicated by the rowCounter
*/ | Get a row from the spreadsheet, and create it if it doesn't exist | getRow | {
"repo_name": "srnsw/xena",
"path": "plugins/project/ext/src/poi-3.2-FINAL/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java",
"license": "gpl-3.0",
"size": 15996
} | [
"org.apache.poi.hssf.usermodel.HSSFRow",
"org.apache.poi.hssf.usermodel.HSSFSheet"
] | import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; | import org.apache.poi.hssf.usermodel.*; | [
"org.apache.poi"
] | org.apache.poi; | 472,606 |
private void stopExecutors0(IgniteLogger log) {
assert log != null;
U.shutdownNow(getClass(), snpExecSvc, log);
snpExecSvc = null;
U.shutdownNow(getClass(), execSvc, log);
execSvc = null;
U.shutdownNow(getClass(), svcExecSvc, log);
svcExecSvc = null;
... | void function(IgniteLogger log) { assert log != null; U.shutdownNow(getClass(), snpExecSvc, log); snpExecSvc = null; U.shutdownNow(getClass(), execSvc, log); execSvc = null; U.shutdownNow(getClass(), svcExecSvc, log); svcExecSvc = null; U.shutdownNow(getClass(), sysExecSvc, log); sysExecSvc = null; U.shutdownNow(getCla... | /**
* Stops executor services if they has been started.
*
* @param log Grid logger.
*/ | Stops executor services if they has been started | stopExecutors0 | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java",
"license": "apache-2.0",
"size": 48314
} | [
"java.util.concurrent.ThreadPoolExecutor",
"org.apache.ignite.IgniteLogger",
"org.apache.ignite.internal.util.typedef.F",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import java.util.concurrent.ThreadPoolExecutor; import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; | import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 598,170 |
@Test
public void testeCompareMitNull() {
assertEquals(
"Ungültiges Ergebnis beim Vergleich eines Wahlkreises mit null.",
0, wk.compareTo(null));
} | void function() { assertEquals( STR, 0, wk.compareTo(null)); } | /**
* Vergleicht den Wahlkreis mit {@code null}.
*/ | Vergleicht den Wahlkreis mit null | testeCompareMitNull | {
"repo_name": "Bundeswahlrechner/Bundeswahlrechner",
"path": "mandatsverteilung/src/test/java/edu/kit/iti/formal/mandatsverteilung/datenhaltung/WahlkreisTest.java",
"license": "gpl-3.0",
"size": 2971
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,278,073 |
protected PageMemory createPageMemory(
DirectMemoryProvider memProvider,
MemoryConfiguration memCfg,
MemoryPolicyConfiguration memPlcCfg,
MemoryMetricsImpl memMetrics
) {
memMetrics.persistenceEnabled(false);
return new PageMemoryNoStoreImpl(
log,
... | PageMemory function( DirectMemoryProvider memProvider, MemoryConfiguration memCfg, MemoryPolicyConfiguration memPlcCfg, MemoryMetricsImpl memMetrics ) { memMetrics.persistenceEnabled(false); return new PageMemoryNoStoreImpl( log, memProvider, cctx, memCfg.getPageSize(), memPlcCfg, memMetrics, false ); } | /**
* Creates PageMemory with given size and memory provider.
*
* @param memProvider Memory provider.
* @param memCfg Memory configuartion.
* @param memPlcCfg Memory policy configuration.
* @param memMetrics MemoryMetrics to collect memory usage metrics.
* @return PageMemory instance.... | Creates PageMemory with given size and memory provider | createPageMemory | {
"repo_name": "vadopolski/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java",
"license": "apache-2.0",
"size": 36969
} | [
"org.apache.ignite.configuration.MemoryConfiguration",
"org.apache.ignite.configuration.MemoryPolicyConfiguration",
"org.apache.ignite.internal.mem.DirectMemoryProvider",
"org.apache.ignite.internal.pagemem.PageMemory",
"org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl"
] | import org.apache.ignite.configuration.MemoryConfiguration; import org.apache.ignite.configuration.MemoryPolicyConfiguration; import org.apache.ignite.internal.mem.DirectMemoryProvider; import org.apache.ignite.internal.pagemem.PageMemory; import org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl; | import org.apache.ignite.configuration.*; import org.apache.ignite.internal.mem.*; import org.apache.ignite.internal.pagemem.*; import org.apache.ignite.internal.pagemem.impl.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 108,013 |
public void pushEntry(long dpid, OFFlowMod fm) {
IOFSwitch sw = this.beaconProvider.getSwitches().get(dpid);
if (sw != null) {
this.pushEntry(sw, fm);
}
else {
log.error("pushEntry: No such switch:", dpid);
}
} | void function(long dpid, OFFlowMod fm) { IOFSwitch sw = this.beaconProvider.getSwitches().get(dpid); if (sw != null) { this.pushEntry(sw, fm); } else { log.error(STR, dpid); } } | /**
* Pushes a flow-mod to this switch as a one-time push
* (alternate form)
*/ | Pushes a flow-mod to this switch as a one-time push (alternate form) | pushEntry | {
"repo_name": "bigswitch/BeaconMirror",
"path": "net.beaconcontroller.staticflowentry/src/main/java/net/beaconcontroller/staticflowentry/StaticFlowEntryPusher.java",
"license": "apache-2.0",
"size": 21863
} | [
"net.beaconcontroller.core.IOFSwitch",
"org.openflow.protocol.OFFlowMod"
] | import net.beaconcontroller.core.IOFSwitch; import org.openflow.protocol.OFFlowMod; | import net.beaconcontroller.core.*; import org.openflow.protocol.*; | [
"net.beaconcontroller.core",
"org.openflow.protocol"
] | net.beaconcontroller.core; org.openflow.protocol; | 2,536,922 |
public java_cup.runtime.Symbol next_token() throws java.io.IOException, LexicalException
{
int zzInput;
int zzAction;
// cached fields:
int zzCurrentPosL;
int zzMarkedPosL;
int zzEndReadL = zzEndRead;
char [] zzBufferL = zzBuffer;
char [] zzCMapL = ZZ_CMAP;
int [] zzTransL = ZZ... | java_cup.runtime.Symbol function() throws java.io.IOException, LexicalException { int zzInput; int zzAction; int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; ... | /**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
*
* @return the next token
* @exception java.io.IOException if any I/O-Error occurs
*/ | Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs | next_token | {
"repo_name": "Debaerdm/L3-MIAGE",
"path": "AS/TP-AS/MICROCOBOL-TP/microcobol/src/Yylex.java",
"license": "mit",
"size": 27330
} | [
"java_cup.runtime.Symbol"
] | import java_cup.runtime.Symbol; | import java_cup.runtime.*; | [
"java_cup.runtime"
] | java_cup.runtime; | 1,171,875 |
public synchronized void add(Relationship relationship)
{
LOG.debug("add {}",relationship);
ObjectName parent = _beans.get(relationship.getParent());
if (parent == null)
{
addBean(relationship.getParent());
parent = _beans.get(relationship.getParent());
... | synchronized void function(Relationship relationship) { LOG.debug(STR,relationship); ObjectName parent = _beans.get(relationship.getParent()); if (parent == null) { addBean(relationship.getParent()); parent = _beans.get(relationship.getParent()); } ObjectName child = _beans.get(relationship.getChild()); if (child == nu... | /**
* Implementation of Container.Listener interface
*
* @see org.eclipse.jetty.util.component.Container.Listener#add(org.eclipse.jetty.util.component.Container.Relationship)
*/ | Implementation of Container.Listener interface | add | {
"repo_name": "hekonsek/fabric8",
"path": "sandbox/insight/insight-jetty/src/main/java/io/fabric8/insight/jetty/MBeanContainerWrapper.java",
"license": "apache-2.0",
"size": 14382
} | [
"java.util.ArrayList",
"java.util.List",
"javax.management.ObjectName",
"org.eclipse.jetty.util.component.Container"
] | import java.util.ArrayList; import java.util.List; import javax.management.ObjectName; import org.eclipse.jetty.util.component.Container; | import java.util.*; import javax.management.*; import org.eclipse.jetty.util.component.*; | [
"java.util",
"javax.management",
"org.eclipse.jetty"
] | java.util; javax.management; org.eclipse.jetty; | 2,853,609 |
// ----------------------------------------------------------------------------------------------------
// PCA Properties
public int getPrincipalModesOfVariation(double[] ev){
double sum = 0;
for(int i = 0; i < ev.length; i++){
sum += ev[i];
}
double[] var = new double[ev.length];
var[0] = ev[0] / ... | int function(double[] ev){ double sum = 0; for(int i = 0; i < ev.length; i++){ sum += ev[i]; } double[] var = new double[ev.length]; var[0] = ev[0] / sum; for(int i = 1; i < ev.length; i++){ var[i] = var[i-1] + ev[i] / sum; } int i = 0; while(var[i] < variationThreshold && i<ev.length-1){ i++; } i++; if(SHOW_EIGEN_VALU... | /**
* Calculates the principal components that are necessary to reach the threshold of variation set in the class member.
* If the plot flag has been set to true, the variation analysis will be plotted as function of the principal components.
* @param ev The eigenvalues of the covariance matrix.
* @return The t... | Calculates the principal components that are necessary to reach the threshold of variation set in the class member. If the plot flag has been set to true, the variation analysis will be plotted as function of the principal components | getPrincipalModesOfVariation | {
"repo_name": "ichichich22/CONRAD",
"path": "src/edu/stanford/rsl/conrad/geometry/shapes/activeshapemodels/LightPCA.java",
"license": "gpl-3.0",
"size": 18326
} | [
"edu.stanford.rsl.conrad.utils.VisualizationUtil"
] | import edu.stanford.rsl.conrad.utils.VisualizationUtil; | import edu.stanford.rsl.conrad.utils.*; | [
"edu.stanford.rsl"
] | edu.stanford.rsl; | 1,442,870 |
public Set<K> keySet() {
processQueue();
return keys;
} | Set<K> function() { processQueue(); return keys; } | /**
* The key Set returned, is encapsulated by ReferenceSet, which encapsulates
* it's objects using the same Ref type as ReferenceMap
*
* @see Ref
* @see ReferenceSet
* @return
*/ | The key Set returned, is encapsulated by ReferenceSet, which encapsulates it's objects using the same Ref type as ReferenceMap | keySet | {
"repo_name": "pfirmstone/JGDMS",
"path": "JGDMS/jgdms-collections/src/main/java/org/apache/river/concurrent/ReferenceMap.java",
"license": "apache-2.0",
"size": 8512
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 785,082 |
protected static double doubleValue(
final ParameterDescriptor<?> param, final ParameterValueGroup group)
throws ParameterNotFoundException {
final Unit<?> unit = param.getUnit();
final ParameterValue<?> value = getParameter(param, group);
return (value == null)
... | static double function( final ParameterDescriptor<?> param, final ParameterValueGroup group) throws ParameterNotFoundException { final Unit<?> unit = param.getUnit(); final ParameterValue<?> value = getParameter(param, group); return (value == null) ? Double.NaN : (unit != null) ? value.doubleValue(unit) : value.double... | /**
* Returns the parameter value for the specified operation parameter. Values are automatically
* converted into the standard units specified by the supplied {@code param} argument. This
* convenience method is used by subclasses for initializing {@linkplain MathTransform math
* transform} from a ... | Returns the parameter value for the specified operation parameter. Values are automatically converted into the standard units specified by the supplied param argument. This convenience method is used by subclasses for initializing MathTransform math transform from a set of parameters | doubleValue | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/operation/MathTransformProvider.java",
"license": "lgpl-2.1",
"size": 27404
} | [
"javax.measure.Unit",
"org.opengis.parameter.ParameterDescriptor",
"org.opengis.parameter.ParameterNotFoundException",
"org.opengis.parameter.ParameterValue",
"org.opengis.parameter.ParameterValueGroup"
] | import javax.measure.Unit; import org.opengis.parameter.ParameterDescriptor; import org.opengis.parameter.ParameterNotFoundException; import org.opengis.parameter.ParameterValue; import org.opengis.parameter.ParameterValueGroup; | import javax.measure.*; import org.opengis.parameter.*; | [
"javax.measure",
"org.opengis.parameter"
] | javax.measure; org.opengis.parameter; | 1,542,787 |
public Collection cluster(ArchetypeGraph g, int num_clusters)
{
return cluster_internal(g, null, num_clusters,-1,num_candidates);
}
| Collection function(ArchetypeGraph g, int num_clusters) { return cluster_internal(g, null, num_clusters,-1,num_candidates); } | /**
* Clusters the vertices of <code>g</code> into
* <code>num_clusters</code> clusters, based on their connectivity.
* @param g the graph whose vertices are to be clustered
* @param num_clusters the number of clusters to identify
*/ | Clusters the vertices of <code>g</code> into <code>num_clusters</code> clusters, based on their connectivity | cluster | {
"repo_name": "carvalhomb/tsmells",
"path": "guess/guess-src/edu/uci/ics/jung/algorithms/cluster/VoltageClustererL.java",
"license": "gpl-2.0",
"size": 27905
} | [
"edu.uci.ics.jung.graph.ArchetypeGraph",
"java.util.Collection"
] | import edu.uci.ics.jung.graph.ArchetypeGraph; import java.util.Collection; | import edu.uci.ics.jung.graph.*; import java.util.*; | [
"edu.uci.ics",
"java.util"
] | edu.uci.ics; java.util; | 1,561,228 |
public static void runWithAllOptimizationLevels(final ContextFactory contextFactory, final ContextAction action)
{
runWithOptimizationLevel(contextFactory, action, -1);
runWithOptimizationLevel(contextFactory, action, 0);
runWithOptimizationLevel(contextFactory, action, 1);
} | static void function(final ContextFactory contextFactory, final ContextAction action) { runWithOptimizationLevel(contextFactory, action, -1); runWithOptimizationLevel(contextFactory, action, 0); runWithOptimizationLevel(contextFactory, action, 1); } | /**
* Runs the action successively with all available optimization levels
*/ | Runs the action successively with all available optimization levels | runWithAllOptimizationLevels | {
"repo_name": "bramstein/closure-compiler-inline",
"path": "lib/rhino/testsrc/org/mozilla/javascript/tests/Utils.java",
"license": "apache-2.0",
"size": 2094
} | [
"org.mozilla.javascript.ContextAction",
"org.mozilla.javascript.ContextFactory"
] | import org.mozilla.javascript.ContextAction; import org.mozilla.javascript.ContextFactory; | import org.mozilla.javascript.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 2,647,332 |
public void setDefaultResponseHeaders() {
this.status = "HTTP/1.1 200 Ok";
add("server", "FHIR Proxy");
setDate(new Date());
} | void function() { this.status = STR; add(STR, STR); setDate(new Date()); } | /**
* Sets the default response headers (status, server, and date)
*/ | Sets the default response headers (status, server, and date) | setDefaultResponseHeaders | {
"repo_name": "sparseware/ccp-bellavista",
"path": "shared/com/sparseware/bellavista/service/HttpHeaders.java",
"license": "apache-2.0",
"size": 5375
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 437,730 |
@Override public void validate(Object target, Errors errors) {
TagEditCommand command = (TagEditCommand) target;
if (!validateCommon(command, errors)) {
return;
}
Long id = command.getId();
if (id == null) {
errors.rejectValue("id", ERROR_TAG_ID_REQUIRED, "id required");
}
} | @Override void function(Object target, Errors errors) { TagEditCommand command = (TagEditCommand) target; if (!validateCommon(command, errors)) { return; } Long id = command.getId(); if (id == null) { errors.rejectValue("id", ERROR_TAG_ID_REQUIRED, STR); } } | /**
* Validates the given object.
*
* @param target object to validate
* @param errors error object to hold validation errors
*/ | Validates the given object | validate | {
"repo_name": "insideo/randomcoder-website",
"path": "src/main/java/org/randomcoder/mvc/validator/TagEditValidator.java",
"license": "bsd-2-clause",
"size": 1180
} | [
"org.randomcoder.mvc.command.TagEditCommand",
"org.springframework.validation.Errors"
] | import org.randomcoder.mvc.command.TagEditCommand; import org.springframework.validation.Errors; | import org.randomcoder.mvc.command.*; import org.springframework.validation.*; | [
"org.randomcoder.mvc",
"org.springframework.validation"
] | org.randomcoder.mvc; org.springframework.validation; | 426,807 |
@ApiModelProperty(example = "null", value = "")
public String getName() {
return name;
} | @ApiModelProperty(example = "null", value = "") String function() { return name; } | /**
* Get name
* @return name
**/ | Get name | getName | {
"repo_name": "leanix/leanix-sdk-java",
"path": "src/main/java/net/leanix/api/models/MetaSubsection.java",
"license": "mit",
"size": 8779
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 778,534 |
private static FontRenderContext getFontRenderContext(Component c, FontMetrics fm) {
assert fm != null || c!= null;
return (fm != null) ? fm.getFontRenderContext()
: getFontRenderContext(c);
} | static FontRenderContext function(Component c, FontMetrics fm) { assert fm != null c!= null; return (fm != null) ? fm.getFontRenderContext() : getFontRenderContext(c); } | /**
* A convenience method to get FontRenderContext.
* Returns the FontRenderContext for the passed in FontMetrics or
* for the passed in Component if FontMetrics is null
*/ | A convenience method to get FontRenderContext. Returns the FontRenderContext for the passed in FontMetrics or for the passed in Component if FontMetrics is null | getFontRenderContext | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/sun/swing/SwingUtilities2.java",
"license": "apache-2.0",
"size": 89457
} | [
"java.awt.Component",
"java.awt.FontMetrics",
"java.awt.font.FontRenderContext"
] | import java.awt.Component; import java.awt.FontMetrics; import java.awt.font.FontRenderContext; | import java.awt.*; import java.awt.font.*; | [
"java.awt"
] | java.awt; | 2,537,571 |
public static IAST Unequal(final IExpr lhs, final IExpr rhs) {
return new AST2(Unequal, lhs, rhs);
} | static IAST function(final IExpr lhs, final IExpr rhs) { return new AST2(Unequal, lhs, rhs); } | /**
* Yields {@link S#False} if <code>lhs</code> and <code>rhs</code> are known to be equal, or
* {@link S#True} if <code>lhs</code> and <code>rhs</code> are known to be unequal.
*
* <p>
* See: <a href=
* "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/fu... | Yields <code>S#False</code> if <code>lhs</code> and <code>rhs</code> are known to be equal, or <code>S#True</code> if <code>lhs</code> and <code>rhs</code> are known to be unequal. See: Unequal | Unequal | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java",
"license": "gpl-3.0",
"size": 283472
} | [
"org.matheclipse.core.interfaces.IExpr"
] | import org.matheclipse.core.interfaces.IExpr; | import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 140,955 |
public Object getPreviousValue() {
Sail s1 = (Sail)this.getValue();
if (s1.getNumber() == 1)
return null;
Sail s2 = new Sail(s1.toString());
s2.add(-1);
return s2;
} | Object function() { Sail s1 = (Sail)this.getValue(); if (s1.getNumber() == 1) return null; Sail s2 = new Sail(s1.toString()); s2.add(-1); return s2; } | /**
* Get previous sail value, if numeric. Figure out what the value is
* from the spinner first.
*
*/ | Get previous sail value, if numeric. Figure out what the value is from the spinner first | getPreviousValue | {
"repo_name": "RandomWidgets/TechScore",
"path": "src/edu/mit/techscore/tscore/SailSpinner.java",
"license": "gpl-3.0",
"size": 5115
} | [
"edu.mit.techscore.regatta.Sail"
] | import edu.mit.techscore.regatta.Sail; | import edu.mit.techscore.regatta.*; | [
"edu.mit.techscore"
] | edu.mit.techscore; | 1,631,615 |
private static void throwAsMalformedURLException( final String message, final Exception cause )
throws MalformedURLException
{
final MalformedURLException exception = new MalformedURLException( message );
exception.initCause( cause );
throw exception;
} | static void function( final String message, final Exception cause ) throws MalformedURLException { final MalformedURLException exception = new MalformedURLException( message ); exception.initCause( cause ); throw exception; } | /**
* Creates an MalformedURLException with a message and a cause.
*
* @param message exception message
* @param cause exception cause
*
* @throws MalformedURLException the created MalformedURLException
*/ | Creates an MalformedURLException with a message and a cause | throwAsMalformedURLException | {
"repo_name": "janstey/fabric8",
"path": "fabric8-maven-plugin/src/main/java/io/fabric8/maven/WrapUrlParser.java",
"license": "apache-2.0",
"size": 6997
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 2,281,409 |
@Test
public void testReadLargeString4() throws ConnectionException,
UnknownException, AbortException, NotFoundException, IOException {
testReadLargeString(4, "_testReadLargeString4");
}
/**
* Tests how long it takes to read a large string with different compression
* sche... | void function() throws ConnectionException, UnknownException, AbortException, NotFoundException, IOException { testReadLargeString(4, STR); } /** * Tests how long it takes to read a large string with different compression * schemes. * * @param compressed * how to compress * @param key * the key to append to the {@link ... | /**
* Tests how long it takes to read a large string with manual compression,
* then encoding the string in base64 and then using automatic compression.
*
* @throws ConnectionException
* @throws UnknownException
* @throws AbortException
* @throws NotFoundException
* @throws IOExc... | Tests how long it takes to read a large string with manual compression, then encoding the string in base64 and then using automatic compression | testReadLargeString4 | {
"repo_name": "tectronics/scalaris",
"path": "java-api/test/de/zib/scalaris/TransactionSingleOpTest.java",
"license": "apache-2.0",
"size": 46244
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 109,131 |
public static List<UserCustomColumn> createSimpleUserColumns() {
return createSimpleUserColumns(true);
} | static List<UserCustomColumn> function() { return createSimpleUserColumns(true); } | /**
* Create simple user columns
*
* @return columns
*/ | Create simple user columns | createSimpleUserColumns | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/test/java/mil/nga/geopackage/extension/related/RelatedTablesUtils.java",
"license": "mit",
"size": 9165
} | [
"java.util.List",
"mil.nga.geopackage.user.custom.UserCustomColumn"
] | import java.util.List; import mil.nga.geopackage.user.custom.UserCustomColumn; | import java.util.*; import mil.nga.geopackage.user.custom.*; | [
"java.util",
"mil.nga.geopackage"
] | java.util; mil.nga.geopackage; | 1,186,176 |
@Override
public int hashCode() {
return Objects.hash(action, actionStatus, batchId, batchName, batchSize, bulkErrors, envelopeIdOrTemplateId, envelopesInfo, envelopesUri, failed, mailingListId, mailingListName, ownerUserId, queued, senderUserId, sent, submittedDate);
} | int function() { return Objects.hash(action, actionStatus, batchId, batchName, batchSize, bulkErrors, envelopeIdOrTemplateId, envelopesInfo, envelopesUri, failed, mailingListId, mailingListName, ownerUserId, queued, senderUserId, sent, submittedDate); } | /**
* Returns the HashCode.
*/ | Returns the HashCode | hashCode | {
"repo_name": "docusign/docusign-java-client",
"path": "src/main/java/com/docusign/esign/model/BulkSendBatchStatus.java",
"license": "mit",
"size": 13859
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,836,504 |
public static Map createOptions(Map user) {
final Map map= JavaScriptCore.getOptions();
if (user != null) {
for (final Iterator iterator= user.keySet().iterator(); iterator.hasNext();) {
Object key= iterator.next();
Object value = user.get(key);
map.put(key, value);
}
}
return map;
} | static Map function(Map user) { final Map map= JavaScriptCore.getOptions(); if (user != null) { for (final Iterator iterator= user.keySet().iterator(); iterator.hasNext();) { Object key= iterator.next(); Object value = user.get(key); map.put(key, value); } } return map; } | /**
* Creates a formatting options with all default options and the given custom user options.
*
* @param user the custom user options
* @return the formatting options
* @since 3.1
*/ | Creates a formatting options with all default options and the given custom user options | createOptions | {
"repo_name": "echoes-tech/eclipse.jsdt.core",
"path": "org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/formatter/comment/CommentFormatterUtil.java",
"license": "epl-1.0",
"size": 6329
} | [
"java.util.Iterator",
"java.util.Map",
"org.eclipse.wst.jsdt.core.JavaScriptCore"
] | import java.util.Iterator; import java.util.Map; import org.eclipse.wst.jsdt.core.JavaScriptCore; | import java.util.*; import org.eclipse.wst.jsdt.core.*; | [
"java.util",
"org.eclipse.wst"
] | java.util; org.eclipse.wst; | 2,133,814 |
ImmutableList<BuildRule> getCompilationDatabaseRules(); | ImmutableList<BuildRule> getCompilationDatabaseRules(); | /**
* Defines a list of rules which produce additional entries in the compilation database. Each
* rule must produce a standalone compilation database. The databases produces by the rules will
* be merged into a single database.
*/ | Defines a list of rules which produce additional entries in the compilation database. Each rule must produce a standalone compilation database. The databases produces by the rules will be merged into a single database | getCompilationDatabaseRules | {
"repo_name": "JoelMarcey/buck",
"path": "src/com/facebook/buck/cxx/CxxLibraryDescriptionDelegate.java",
"license": "apache-2.0",
"size": 4274
} | [
"com.facebook.buck.core.rules.BuildRule",
"com.google.common.collect.ImmutableList"
] | import com.facebook.buck.core.rules.BuildRule; import com.google.common.collect.ImmutableList; | import com.facebook.buck.core.rules.*; import com.google.common.collect.*; | [
"com.facebook.buck",
"com.google.common"
] | com.facebook.buck; com.google.common; | 2,421,899 |
public static BigInteger[] convertListToArray(List<BigInteger> list) {
BigInteger[] result = new BigInteger[list.size()];
for (int i = 0; i < list.size(); i++) {
result[i] = list.get(i);
}
return result;
} | static BigInteger[] function(List<BigInteger> list) { BigInteger[] result = new BigInteger[list.size()]; for (int i = 0; i < list.size(); i++) { result[i] = list.get(i); } return result; } | /**
* Converts a list of BigIntegers to an array
*
* @param list
* @return
*/ | Converts a list of BigIntegers to an array | convertListToArray | {
"repo_name": "RUB-NDS/SocketProxy",
"path": "src/main/java/de/rub/nds/socketproxy/util/ArrayConverter.java",
"license": "apache-2.0",
"size": 7180
} | [
"java.math.BigInteger",
"java.util.List"
] | import java.math.BigInteger; import java.util.List; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 831,944 |
private void recontest(String path) {
leadershipService.runForLeadership(path);
}
private final class InternalLeadershipListener implements LeadershipEventListener { | void function(String path) { leadershipService.runForLeadership(path); } private final class InternalLeadershipListener implements LeadershipEventListener { | /**
* Try and recontest for leadership of a partition.
*
* @param path topic name to recontest
*/ | Try and recontest for leadership of a partition | recontest | {
"repo_name": "Shashikanth-Huawei/bmp",
"path": "core/store/dist/src/main/java/org/onosproject/store/intent/impl/IntentPartitionManager.java",
"license": "apache-2.0",
"size": 9499
} | [
"org.onosproject.cluster.LeadershipEventListener"
] | import org.onosproject.cluster.LeadershipEventListener; | import org.onosproject.cluster.*; | [
"org.onosproject.cluster"
] | org.onosproject.cluster; | 758,010 |
// //////////////////////////////////////////////////////////////////////////////
private void initSummary(Preference _Preference)
{
if (_Preference instanceof PreferenceGroup)
{
PreferenceGroup PreferenceGroup = (PreferenceGroup) _Preference;
for (int Index = 0; Ind... | void function(Preference _Preference) { if (_Preference instanceof PreferenceGroup) { PreferenceGroup PreferenceGroup = (PreferenceGroup) _Preference; for (int Index = 0; Index < PreferenceGroup.getPreferenceCount(); Index++) { initSummary(PreferenceGroup.getPreference(Index)); } } else { updatePrefSummary(_Preference)... | /**
* Init the summary text
* Example: with the current settings -> getPreferenceScreen()
* @param _Preference
*/ | Init the summary text Example: with the current settings -> getPreferenceScreen() | initSummary | {
"repo_name": "ThiemerR/SIP_Client",
"path": "src/com/sip_client/ui/Settings_Fragment.java",
"license": "gpl-3.0",
"size": 27200
} | [
"android.preference.Preference",
"android.preference.PreferenceGroup"
] | import android.preference.Preference; import android.preference.PreferenceGroup; | import android.preference.*; | [
"android.preference"
] | android.preference; | 547,049 |
public static String read(File file) throws IOException {
InputStreamReader inputReader = null;
BufferedReader bufferReader = null;
InputStream inputStream = null;
StringBuffer strBuffer = new StringBuffer();
try {
inputStream = new FileInputStream(file);
... | static String function(File file) throws IOException { InputStreamReader inputReader = null; BufferedReader bufferReader = null; InputStream inputStream = null; StringBuffer strBuffer = new StringBuffer(); try { inputStream = new FileInputStream(file); inputReader = new InputStreamReader(inputStream); bufferReader = ne... | /**
* According to the specified encoding, read a text file
*
* @param file file
* @return file content
* @throws IOException read failure
*/ | According to the specified encoding, read a text file | read | {
"repo_name": "ChinaSunHZ/ProjectUtils",
"path": "app/src/main/java/com/sunhz/projectutils/fileutils/FileUtils.java",
"license": "apache-2.0",
"size": 24009
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 2,165,693 |
public IPath getLibraryContainerPath(IPath projectPath); | IPath function(IPath projectPath); | /**
* Returns the absolute location of the folder that contains the primary library contents for the project type.
*
* @param projectPath
* @return
*/ | Returns the absolute location of the folder that contains the primary library contents for the project type | getLibraryContainerPath | {
"repo_name": "HossainKhademian/Studio3",
"path": "plugins/com.aptana.core.epl/src/com/aptana/projects/primary/natures/IPrimaryNatureContributor.java",
"license": "gpl-3.0",
"size": 1523
} | [
"org.eclipse.core.runtime.IPath"
] | import org.eclipse.core.runtime.IPath; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,487,166 |
@Message(id = 20251, value = "URI syntax error")
IllegalArgumentException uriSyntaxException(@Cause Throwable cause); | @Message(id = 20251, value = STR) IllegalArgumentException uriSyntaxException(@Cause Throwable cause); | /**
* URI format is incorrect, which results in a syntax error
*
* @return an {@link IllegalArgumentException} for the error.
*/ | URI format is incorrect, which results in a syntax error | uriSyntaxException | {
"repo_name": "tomazzupan/wildfly",
"path": "jpa/spi/src/main/java/org/jipijapa/JipiLogger.java",
"license": "lgpl-2.1",
"size": 4457
} | [
"org.jboss.logging.annotations.Cause",
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 2,396,434 |
BeanManager getBeanManager(); | BeanManager getBeanManager(); | /**
* Returns a BeanManager used by this container. If the container uses multiple BeanManager instances it is not defined which of them is returned.
*
* @return beanManager
*/ | Returns a BeanManager used by this container. If the container uses multiple BeanManager instances it is not defined which of them is returned | getBeanManager | {
"repo_name": "antoinesd/weld-core",
"path": "environments/common/src/main/java/org/jboss/weld/environment/ContainerInstance.java",
"license": "apache-2.0",
"size": 1488
} | [
"javax.enterprise.inject.spi.BeanManager"
] | import javax.enterprise.inject.spi.BeanManager; | import javax.enterprise.inject.spi.*; | [
"javax.enterprise"
] | javax.enterprise; | 285,013 |
private org.omg.CORBA.Object resolveCorbaloc(
CorbalocURL theCorbaLocObject )
{
org.omg.CORBA.Object result = null;
// If RIR flag is true use the Bootstrap protocol
if( theCorbaLocObject.getRIRFlag( ) ) {
result = bootstrapResolver.resolve(theCorbaLocObject.getKeySt... | org.omg.CORBA.Object function( CorbalocURL theCorbaLocObject ) { org.omg.CORBA.Object result = null; if( theCorbaLocObject.getRIRFlag( ) ) { result = bootstrapResolver.resolve(theCorbaLocObject.getKeyString()); } else { result = getIORUsingCorbaloc( theCorbaLocObject ); } return result; } | /**
* resolves a corbaloc: url that is encapsulated in a CorbalocURL object.
*
* @return the CORBA.Object if resolution is successful
*/ | resolves a corbaloc: url that is encapsulated in a CorbalocURL object | resolveCorbaloc | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java",
"license": "gpl-2.0",
"size": 13039
} | [
"com.sun.corba.se.impl.naming.namingutil.CorbalocURL"
] | import com.sun.corba.se.impl.naming.namingutil.CorbalocURL; | import com.sun.corba.se.impl.naming.namingutil.*; | [
"com.sun.corba"
] | com.sun.corba; | 2,167,198 |
//------------------------- AUTOGENERATED START -------------------------
///CLOVER:OFF
public static CashFlowDetailsProvider.Meta meta() {
return CashFlowDetailsProvider.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(CashFlowDetailsProvider.Meta.INSTANCE);
} | static CashFlowDetailsProvider.Meta function() { return CashFlowDetailsProvider.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(CashFlowDetailsProvider.Meta.INSTANCE); } | /**
* The meta-bean for {@code CashFlowDetailsProvider}.
* @return the meta-bean, not null
*/ | The meta-bean for CashFlowDetailsProvider | meta | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/analytics/model/fixedincome/CashFlowDetailsProvider.java",
"license": "apache-2.0",
"size": 20264
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,516,625 |
public Cookie[] parse(String host, int port, String path, boolean secure, String header)
throws MalformedCookieException {
return new Cookie[0];
} | Cookie[] function(String host, int port, String path, boolean secure, String header) throws MalformedCookieException { return new Cookie[0]; } | /**
* Returns an empty {@link Cookie cookie} array. All parameters are ignored.
*/ | Returns an empty <code>Cookie cookie</code> array. All parameters are ignored | parse | {
"repo_name": "fmassart/commons-httpclient",
"path": "src/java/org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.java",
"license": "apache-2.0",
"size": 4538
} | [
"org.apache.commons.httpclient.Cookie"
] | import org.apache.commons.httpclient.Cookie; | import org.apache.commons.httpclient.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,606,614 |
public static void launchInviteFriendIntent(Activity activity) {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT,
activity.getString(R.string.share_your_prox... | static void function(Activity activity) { Intent intent = new Intent(Intent.ACTION_SEND); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setType(STR); intent.putExtra(Intent.EXTRA_SUBJECT, activity.getString(R.string.share_your_proxy)); intent.putExtra(Intent.EXTRA_TEXT, activity.getString(R.string.invite_frien... | /**
* View Invite friends
*
* @param activity context
*/ | View Invite friends | launchInviteFriendIntent | {
"repo_name": "ProxyApp/Proxy",
"path": "Application/src/main/java/com/shareyourproxy/IntentLauncher.java",
"license": "apache-2.0",
"size": 29407
} | [
"android.app.Activity",
"android.content.Intent"
] | import android.app.Activity; import android.content.Intent; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 2,701,868 |
public static BigDecimal computeCardinality(DataType dataType, Datum start, Datum end,
boolean inclusive, boolean isAscending) {
BigDecimal columnCard;
switch (dataType.getType()) {
case BOOLEAN:
columnCard = new BigDecimal(2);
break;
... | static BigDecimal function(DataType dataType, Datum start, Datum end, boolean inclusive, boolean isAscending) { BigDecimal columnCard; switch (dataType.getType()) { case BOOLEAN: columnCard = new BigDecimal(2); break; case CHAR: if (isAscending) { columnCard = new BigDecimal(end.asChar() - start.asChar()); } else { col... | /**
* It computes the value cardinality of a tuple range.
*
* @param dataType
* @param start
* @param end
* @return
*/ | It computes the value cardinality of a tuple range | computeCardinality | {
"repo_name": "gruter/tajo-cdh",
"path": "tajo-core/src/main/java/org/apache/tajo/engine/planner/RangePartitionAlgorithm.java",
"license": "apache-2.0",
"size": 6363
} | [
"java.math.BigDecimal",
"org.apache.tajo.common.TajoDataTypes",
"org.apache.tajo.datum.Datum",
"org.apache.tajo.datum.NullDatum"
] | import java.math.BigDecimal; import org.apache.tajo.common.TajoDataTypes; import org.apache.tajo.datum.Datum; import org.apache.tajo.datum.NullDatum; | import java.math.*; import org.apache.tajo.common.*; import org.apache.tajo.datum.*; | [
"java.math",
"org.apache.tajo"
] | java.math; org.apache.tajo; | 1,570,192 |
protected void onHideFragment() {
if (currentMainFragment != null)
Log.d(ViewFragmentBroadcastReciever.class.getName(), String.format(HIDE_FRAGMENT, currentMainFragment));
currentMainFragment = null;
} | void function() { if (currentMainFragment != null) Log.d(ViewFragmentBroadcastReciever.class.getName(), String.format(HIDE_FRAGMENT, currentMainFragment)); currentMainFragment = null; } | /**
* Will be called if the hide fragment intent was received.
*/ | Will be called if the hide fragment intent was received | onHideFragment | {
"repo_name": "Zelldon/Zell-Android-Util",
"path": "Zell-Android-Util/src/de/zell/android/util/activities/ViewFragmentBroadcastReciever.java",
"license": "gpl-3.0",
"size": 2645
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,647,960 |
@Test()
public void testNewPasswordGeneratedWithEmptyCharacterSet()
throws Exception
{
final InMemoryDirectoryServer ds = getTestDS(true, true);
ldapPasswordModify(ResultCode.PARAM_ERROR,
"--hostname", "localhost",
"--port", String.valueOf(ds.getListenPort()),
"--bindDN... | @Test() void function() throws Exception { final InMemoryDirectoryServer ds = getTestDS(true, true); ldapPasswordModify(ResultCode.PARAM_ERROR, STR, STR, STR, String.valueOf(ds.getListenPort()), STR, STR, STR, STR, STR, STR, "8", STR, STR, STR, STR--passwordChangeMethodSTRpassword-modify-extended-operationSTR--verbose"... | /**
* Tests the behavior when the new password will be generated by the client,
* but when using custom character sets when one of them is empty.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior when the new password will be generated by the client, but when using custom character sets when one of them is empty | testNewPasswordGeneratedWithEmptyCharacterSet | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/tools/LDAPPasswordModifyTestCase.java",
"license": "gpl-2.0",
"size": 58733
} | [
"com.unboundid.ldap.listener.InMemoryDirectoryServer",
"com.unboundid.ldap.sdk.ResultCode",
"org.testng.annotations.Test"
] | import com.unboundid.ldap.listener.InMemoryDirectoryServer; import com.unboundid.ldap.sdk.ResultCode; import org.testng.annotations.Test; | import com.unboundid.ldap.listener.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*; | [
"com.unboundid.ldap",
"org.testng.annotations"
] | com.unboundid.ldap; org.testng.annotations; | 1,367,584 |
private XpathHolder getHolder() {
boolean allow = false;
XpathHolder result = null;
result = DB.getXpathHolderDAO().getById(xpathHolderId, false);
if( result == null ) {
json.element( "error", "No such xpath." );
return null;
}
XmlObject xo = result.getXmlObject();
if( getUser().hasRight(Us... | XpathHolder function() { boolean allow = false; XpathHolder result = null; result = DB.getXpathHolderDAO().getById(xpathHolderId, false); if( result == null ) { json.element( "error", STR ); return null; } XmlObject xo = result.getXmlObject(); if( getUser().hasRight(User.SUPER_USER)) allow=true; else { Organization own... | /**
* Get the holder and check the read permission of the user.
* @return
*/ | Get the holder and check the read permission of the user | getHolder | {
"repo_name": "mint-ntua/Mint",
"path": "src/main/java/gr/ntua/ivml/mint/actions/ValueList.java",
"license": "agpl-3.0",
"size": 3688
} | [
"gr.ntua.ivml.mint.db.DB",
"gr.ntua.ivml.mint.persistent.Organization",
"gr.ntua.ivml.mint.persistent.User",
"gr.ntua.ivml.mint.persistent.XmlObject",
"gr.ntua.ivml.mint.persistent.XpathHolder"
] | import gr.ntua.ivml.mint.db.DB; import gr.ntua.ivml.mint.persistent.Organization; import gr.ntua.ivml.mint.persistent.User; import gr.ntua.ivml.mint.persistent.XmlObject; import gr.ntua.ivml.mint.persistent.XpathHolder; | import gr.ntua.ivml.mint.db.*; import gr.ntua.ivml.mint.persistent.*; | [
"gr.ntua.ivml"
] | gr.ntua.ivml; | 945,807 |
public void writeTimePosition(XMLStreamWriter writer, TimePosition bean) throws XMLStreamException
{
writer.writeStartElement(NS_URI, "TimePosition");
this.writeNamespaces(writer);
this.writeTimePositionType(writer, bean);
writer.writeEndElement();
}
| void function(XMLStreamWriter writer, TimePosition bean) throws XMLStreamException { writer.writeStartElement(NS_URI, STR); this.writeNamespaces(writer); this.writeTimePositionType(writer, bean); writer.writeEndElement(); } | /**
* Write method for TimePosition element
*/ | Write method for TimePosition element | writeTimePosition | {
"repo_name": "sensiasoft/lib-swe-common",
"path": "swe-common-om/src/main/java/net/opengis/gml/v32/bind/XMLStreamBindings.java",
"license": "mpl-2.0",
"size": 77403
} | [
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamWriter",
"net.opengis.gml.v32.TimePosition"
] | import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import net.opengis.gml.v32.TimePosition; | import javax.xml.stream.*; import net.opengis.gml.v32.*; | [
"javax.xml",
"net.opengis.gml"
] | javax.xml; net.opengis.gml; | 563,977 |
private void process(){
// Execute each line of script
for (String line : script){
if (stop){
break;
}
try {
command.execute(line, auto1, auto2);
} catch (Exception exception) {
// Ignore error and continue
exception.printStackTrace();
}
}
}
private boolean stop = false;
... | void function(){ for (String line : script){ if (stop){ break; } try { command.execute(line, auto1, auto2); } catch (Exception exception) { exception.printStackTrace(); } } } private boolean stop = false; private final PlainEvent closeEvent; private final Command command = new Command(); private final String loop; priv... | /**
* Execute the entire script.
* @since 1.0.0
*/ | Execute the entire script | process | {
"repo_name": "pomeryt/AutoPerson",
"path": "src/application/ScriptThread.java",
"license": "mit",
"size": 1999
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 303,645 |
@Override
public void visitMethod(MethodTree tree) {
if (tree.simpleName().name().toUpperCase().contains(COMPANY_NAME.toUpperCase())) {
// Adds an issue by attaching it with the tree and the rule
context.reportIssue(this, tree, "Avoid using Brand in method name");
}
// The call to the super... | void function(MethodTree tree) { if (tree.simpleName().name().toUpperCase().contains(COMPANY_NAME.toUpperCase())) { context.reportIssue(this, tree, STR); } super.visitMethod(tree); } | /**
* Overriding the visitor method to implement the logic of the rule.
* @param tree AST of the visited method.
*/ | Overriding the visitor method to implement the logic of the rule | visitMethod | {
"repo_name": "devwebcl/sonarqube-plugins",
"path": "src/main/java/org/sonar/samples/java/checks/AvoidBrandInMethodNamesRule.java",
"license": "apache-2.0",
"size": 2525
} | [
"org.sonar.plugins.java.api.tree.MethodTree"
] | import org.sonar.plugins.java.api.tree.MethodTree; | import org.sonar.plugins.java.api.tree.*; | [
"org.sonar.plugins"
] | org.sonar.plugins; | 1,931,775 |
if (key == null)
return null;
String value = null;
if (Platform.getProduct()!=null)
value = Platform.getProduct().getProperty(key);
if (value == null) {
if (key.equals(IProductConstants.PERSPECTIVE_EXPLORER_VIEW))
return ID_PERSPECTIVE_EXPLORER_VIEW;
}
return value;
} | if (key == null) return null; String value = null; if (Platform.getProduct()!=null) value = Platform.getProduct().getProperty(key); if (value == null) { if (key.equals(IProductConstants.PERSPECTIVE_EXPLORER_VIEW)) return ID_PERSPECTIVE_EXPLORER_VIEW; } return value; } | /**
* Return the value for the associated key from the Platform Product registry or return the
* WTP default.
*
* @param key
* @return String value of product's property
*/ | Return the value for the associated key from the Platform Product registry or return the WTP default | getProperty | {
"repo_name": "ttimbul/eclipse.wst",
"path": "bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/ProductProperties.java",
"license": "epl-1.0",
"size": 1358
} | [
"org.eclipse.core.runtime.Platform"
] | import org.eclipse.core.runtime.Platform; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 840,544 |
@Override
public GenericRecordBuilder set(Field field, Object value) {
set(field.getIndex(), value);
return this;
} | GenericRecordBuilder function(Field field, Object value) { set(field.getIndex(), value); return this; } | /**
* Sets the value of a field.
*
* @param field the field to set.
* @param value the value to set.
* @return a reference to the RecordBuilder.
*/ | Sets the value of a field | set | {
"repo_name": "massakam/pulsar",
"path": "pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/AvroRecordBuilderImpl.java",
"license": "apache-2.0",
"size": 4675
} | [
"org.apache.pulsar.client.api.schema.Field",
"org.apache.pulsar.client.api.schema.GenericRecordBuilder"
] | import org.apache.pulsar.client.api.schema.Field; import org.apache.pulsar.client.api.schema.GenericRecordBuilder; | import org.apache.pulsar.client.api.schema.*; | [
"org.apache.pulsar"
] | org.apache.pulsar; | 1,156,463 |
public RightJoin rightJoin(String table) {
if (from != null) {
return from.rightJoin(table);
} else {
throw new IllegalQueryFormedException("SQl Join can only be added to and existing from clause. Check you've added from SQL clause on Query.");
}
} | RightJoin function(String table) { if (from != null) { return from.rightJoin(table); } else { throw new IllegalQueryFormedException(STR); } } | /**
* Add an right join to query.
*
* @return right join SQL clause added to query.
*/ | Add an right join to query | rightJoin | {
"repo_name": "svandecappelle/qmaker",
"path": "src/main/java/com/mizore/sql/qmaker/query/Query.java",
"license": "lgpl-3.0",
"size": 10697
} | [
"com.mizore.sql.qmaker.query.exceptions.IllegalQueryFormedException",
"com.mizore.sql.qmaker.query.joins.RightJoin"
] | import com.mizore.sql.qmaker.query.exceptions.IllegalQueryFormedException; import com.mizore.sql.qmaker.query.joins.RightJoin; | import com.mizore.sql.qmaker.query.exceptions.*; import com.mizore.sql.qmaker.query.joins.*; | [
"com.mizore.sql"
] | com.mizore.sql; | 2,212,459 |
public String getReference() {
if ( reference == null ) {
reference = (SFString)getField( "reference" );
}
return( reference.getValue( ) );
} | String function() { if ( reference == null ) { reference = (SFString)getField( STR ); } return( reference.getValue( ) ); } | /** Return the reference String value.
* @return The reference String value. */ | Return the reference String value | getReference | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/internal/node/core/SAIMetadataSet.java",
"license": "gpl-2.0",
"size": 3263
} | [
"org.web3d.x3d.sai.SFString"
] | import org.web3d.x3d.sai.SFString; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 1,374,284 |
private void loadRoot(DataInput in, Counter counter)
throws IOException {
// load root
if (in.readShort() != 0) {
throw new IOException("First node is not root");
}
final INodeDirectory root = loadINode(null, false, in, counter)
.asDirectory();
// update the roo... | void function(DataInput in, Counter counter) throws IOException { if (in.readShort() != 0) { throw new IOException(STR); } final INodeDirectory root = loadINode(null, false, in, counter) .asDirectory(); updateRootAttr(root); } | /**
* Load information about root, and use the information to update the root
* directory of NameSystem.
* @param in The {@link DataInput} instance to read.
* @param counter Counter to increment for namenode startup progress
*/ | Load information about root, and use the information to update the root directory of NameSystem | loadRoot | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java",
"license": "apache-2.0",
"size": 54276
} | [
"java.io.DataInput",
"java.io.IOException",
"org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress"
] | import java.io.DataInput; import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress; | import java.io.*; import org.apache.hadoop.hdfs.server.namenode.startupprogress.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 769,990 |
private boolean doSSLShutdown() {
if (SSL.isInInit(ssl) != 0) {
// Only try to call SSL_shutdown if we are not in the init state anymore.
// Otherwise we will see 'error:140E0197:SSL routines:SSL_shutdown:shutdown while in init' in our logs.
//
// See also htt... | boolean function() { if (SSL.isInInit(ssl) != 0) { return false; } int err = SSL.shutdownSSL(ssl); if (err < 0) { int sslErr = SSL.getError(ssl, err); if (sslErr == SSL.SSL_ERROR_SYSCALL sslErr == SSL.SSL_ERROR_SSL) { if (logger.isDebugEnabled()) { logger.debug(STR, SSL.getLastError()); } shutdown(); return false; } SS... | /**
* Attempt to call {@link SSL#shutdownSSL(long)}.
* @return {@code false} if the call to {@link SSL#shutdownSSL(long)} was not attempted or returned an error.
*/ | Attempt to call <code>SSL#shutdownSSL(long)</code> | doSSLShutdown | {
"repo_name": "louxiu/netty",
"path": "handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java",
"license": "apache-2.0",
"size": 93428
} | [
"io.netty.internal.tcnative.SSL"
] | import io.netty.internal.tcnative.SSL; | import io.netty.internal.tcnative.*; | [
"io.netty.internal"
] | io.netty.internal; | 618,587 |
protected InspectionRequest createNewInspectionRequest(String requestName,
File spreadsheetFile) throws Exception {
// Create request.
InspectionRequest inspectionRequest = new InspectionRequest();
stateOfCurrenInspectionRequest = InspectionStateEnum.INITIAL;
inspectionRequest.setName(requestName);
... | InspectionRequest function(String requestName, File spreadsheetFile) throws Exception { InspectionRequest inspectionRequest = new InspectionRequest(); stateOfCurrenInspectionRequest = InspectionStateEnum.INITIAL; inspectionRequest.setName(requestName); inspectionRequest.setSpreadsheetFile(spreadsheetFile); SpreadsheetI... | /***
* Creates a new inspection request for the given spreadsheet file with the
* given request name.
*
* @param requestName
* The given name for the request.
* @param spreadsheetFile
* The given spreadsheet file.
* @return The newly created inspection request.
* @throw... | Creates a new inspection request for the given spreadsheet file with the given request name | createNewInspectionRequest | {
"repo_name": "SZitzelsberger/Spreadsheet-Inspection-Framework",
"path": "src/sif/frontOffice/InspectionManager.java",
"license": "gpl-3.0",
"size": 5899
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,457,534 |
public Point<ContentNode> deactivate(
LocalDocument<ContentNode, ContentElement, ContentTextNode> doc) {
Point.El<ContentNode> ret = Point.<ContentNode>inElement(
doc.getParentElement(wrapper), doc.getNextSibling(wrapper));
clearWrapper(doc);
return ret;
} | Point<ContentNode> function( LocalDocument<ContentNode, ContentElement, ContentTextNode> doc) { Point.El<ContentNode> ret = Point.<ContentNode>inElement( doc.getParentElement(wrapper), doc.getNextSibling(wrapper)); clearWrapper(doc); return ret; } | /**
* Removes the IME extractor node.
* @param doc
* @return the location where the node resided
*/ | Removes the IME extractor node | deactivate | {
"repo_name": "nelsonsilva/wave-protocol",
"path": "src/org/waveprotocol/wave/client/editor/extract/ImeExtractor.java",
"license": "apache-2.0",
"size": 6202
} | [
"org.waveprotocol.wave.client.editor.content.ContentElement",
"org.waveprotocol.wave.client.editor.content.ContentNode",
"org.waveprotocol.wave.client.editor.content.ContentTextNode",
"org.waveprotocol.wave.model.document.util.LocalDocument",
"org.waveprotocol.wave.model.document.util.Point"
] | import org.waveprotocol.wave.client.editor.content.ContentElement; import org.waveprotocol.wave.client.editor.content.ContentNode; import org.waveprotocol.wave.client.editor.content.ContentTextNode; import org.waveprotocol.wave.model.document.util.LocalDocument; import org.waveprotocol.wave.model.document.util.Point; | import org.waveprotocol.wave.client.editor.content.*; import org.waveprotocol.wave.model.document.util.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 1,662,491 |
@Override
public Iterator<String> getAllChunkIds(long maxLastModifiedTime) throws Exception {
HashMap<BlockId, byte[]> combinedMap = Maps.newHashMap();
combinedMap.putAll(map);
combinedMap.putAll(old);
final Iterator<BlockId> iter = combinedMap.keySet().iterator(); | Iterator<String> function(long maxLastModifiedTime) throws Exception { HashMap<BlockId, byte[]> combinedMap = Maps.newHashMap(); combinedMap.putAll(map); combinedMap.putAll(old); final Iterator<BlockId> iter = combinedMap.keySet().iterator(); | /**
* Ignores the maxlastModifiedTime
*/ | Ignores the maxlastModifiedTime | getAllChunkIds | {
"repo_name": "rombert/jackrabbit-oak",
"path": "oak-blob/src/main/java/org/apache/jackrabbit/oak/spi/blob/MemoryBlobStore.java",
"license": "apache-2.0",
"size": 3766
} | [
"com.google.common.collect.Maps",
"java.util.HashMap",
"java.util.Iterator"
] | import com.google.common.collect.Maps; import java.util.HashMap; import java.util.Iterator; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,841,169 |
Intent intent =
Intent.makeMainActivity(
new ComponentName(
getInstrumentation().getTargetContext(), TruncatedViewHierarchyActivity.class));
intent.putExtra(TruncatedViewHierarchyActivity.LEVEL_INTENT_KEY, 2);
try (ActivityScenario<Activity> scenario = ActivityScenario.launch... | Intent intent = Intent.makeMainActivity( new ComponentName( getInstrumentation().getTargetContext(), TruncatedViewHierarchyActivity.class)); intent.putExtra(TruncatedViewHierarchyActivity.LEVEL_INTENT_KEY, 2); try (ActivityScenario<Activity> scenario = ActivityScenario.launch(intent)) { assertNotNull(scenario); onView(... | /**
* Creates an activity with 2 levels of views such that the view hierarchy dump is fairly long yet
* does not get truncated.
*
* <p>This fails with NoMatchingViewException and dumps the view hierarchy as well as the stack
* trace of where the view matcher failed.
*/ | Creates an activity with 2 levels of views such that the view hierarchy dump is fairly long yet does not get truncated. This fails with NoMatchingViewException and dumps the view hierarchy as well as the stack trace of where the view matcher failed | testViewHierarchyNotTruncated | {
"repo_name": "android/android-test",
"path": "testapps/ui_testapp/javatests/androidx/test/ui/app/TruncatedViewHierarchyActivityTest.java",
"license": "apache-2.0",
"size": 3398
} | [
"android.app.Activity",
"android.content.ComponentName",
"android.content.Intent",
"androidx.test.core.app.ActivityScenario",
"androidx.test.espresso.Espresso",
"androidx.test.platform.app.InstrumentationRegistry",
"org.junit.Assert"
] | import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import androidx.test.core.app.ActivityScenario; import androidx.test.espresso.Espresso; import androidx.test.platform.app.InstrumentationRegistry; import org.junit.Assert; | import android.app.*; import android.content.*; import androidx.test.core.app.*; import androidx.test.espresso.*; import androidx.test.platform.app.*; import org.junit.*; | [
"android.app",
"android.content",
"androidx.test",
"org.junit"
] | android.app; android.content; androidx.test; org.junit; | 2,362,244 |
public Object get(DataManager data, Bundle bundle) {
if (mAccessor == null) {
return bundle.get(mKey);
} else {
return mAccessor.get(data, this, bundle);
}
}
| Object function(DataManager data, Bundle bundle) { if (mAccessor == null) { return bundle.get(mKey); } else { return mAccessor.get(data, this, bundle); } } | /**
* Get the raw Object for this Datum
*
* @param data Parent DataManager
* @param bundle Raw data bundle
*
* @return The object data
*/ | Get the raw Object for this Datum | get | {
"repo_name": "Grunthos/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/datamanager/Datum.java",
"license": "gpl-3.0",
"size": 10870
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,295,933 |
public static File createTempDir(String prefix, String suffix)
throws IOException {
return createTempDir(prefix, suffix, null);
} | static File function(String prefix, String suffix) throws IOException { return createTempDir(prefix, suffix, null); } | /**
* Create a temp directory with given <i>prefix</i> and <i>suffix</i>.
*
* @param prefix
* prefix of the directory name
* @param suffix
* suffix of the directory name
* @return directory created
* @throws IOException
*/ | Create a temp directory with given prefix and suffix | createTempDir | {
"repo_name": "ivankelly/bookkeeper",
"path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/util/IOUtils.java",
"license": "apache-2.0",
"size": 5408
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,865,651 |
public static void writeShape(Shape shape, ObjectOutputStream stream)
throws IOException {
if (stream == null) {
throw new IllegalArgumentException("Null 'stream' argument.");
}
if (shape != null) {
stream.writeBoolean(false);
if (shape instan... | static void function(Shape shape, ObjectOutputStream stream) throws IOException { if (stream == null) { throw new IllegalArgumentException(STR); } if (shape != null) { stream.writeBoolean(false); if (shape instanceof Line2D) { Line2D line = (Line2D) shape; stream.writeObject(Line2D.class); stream.writeDouble(line.getX1... | /**
* Serialises a <code>Shape</code> object.
*
* @param shape the shape object (<code>null</code> permitted).
* @param stream the output stream (<code>null</code> not permitted).
*
* @throws IOException if there is an I/O error.
*/ | Serialises a <code>Shape</code> object | writeShape | {
"repo_name": "linuxuser586/jfreechart",
"path": "source/org/jfree/chart/util/SerialUtilities.java",
"license": "lgpl-2.1",
"size": 23483
} | [
"java.awt.Shape",
"java.awt.geom.Arc2D",
"java.awt.geom.Ellipse2D",
"java.awt.geom.GeneralPath",
"java.awt.geom.Line2D",
"java.awt.geom.PathIterator",
"java.awt.geom.Rectangle2D",
"java.io.IOException",
"java.io.ObjectOutputStream"
] | import java.awt.Shape; import java.awt.geom.Arc2D; import java.awt.geom.Ellipse2D; import java.awt.geom.GeneralPath; import java.awt.geom.Line2D; import java.awt.geom.PathIterator; import java.awt.geom.Rectangle2D; import java.io.IOException; import java.io.ObjectOutputStream; | import java.awt.*; import java.awt.geom.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 2,121,837 |
private void newExperiment() {
if (model.getRoot() != null) {
int choice = JOptionPane
.showOptionDialog(this, getLocalized("TREE.POPUP.CONFIRM.NEW_EXPERIMENT"),
getLocalized("TREE.POPUP.NEW_EXPERIMENT"), JOptionPane.OK_CANCEL_OPTION,
... | void function() { if (model.getRoot() != null) { int choice = JOptionPane .showOptionDialog(this, getLocalized(STR), getLocalized(STR), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); if (choice != JOptionPane.OK_OPTION) { return; } } String name = JOptionPane.showInputDialog(this, getLoca... | /**
* Replaces the current experiment with a new one.
*/ | Replaces the current experiment with a new one | newExperiment | {
"repo_name": "feigensp/Prophet",
"path": "src/de/uni_passau/fim/infosun/prophet/experimentEditor/qTree/QTree.java",
"license": "gpl-3.0",
"size": 19229
} | [
"de.uni_passau.fim.infosun.prophet.util.language.UIElementNames",
"de.uni_passau.fim.infosun.prophet.util.qTree.QTreeNode",
"javax.swing.JOptionPane"
] | import de.uni_passau.fim.infosun.prophet.util.language.UIElementNames; import de.uni_passau.fim.infosun.prophet.util.qTree.QTreeNode; import javax.swing.JOptionPane; | import de.uni_passau.fim.infosun.prophet.util.*; import de.uni_passau.fim.infosun.prophet.util.language.*; import javax.swing.*; | [
"de.uni_passau.fim",
"javax.swing"
] | de.uni_passau.fim; javax.swing; | 1,506,983 |
public void setRangeAxis(int index, ValueAxis axis, boolean notify) {
ValueAxis existing = this.rangeAxes.get(index);
if (existing != null) {
existing.removeChangeListener(this);
}
if (axis != null) {
axis.setPlot(this);
}
this.rangeAxes.put(in... | void function(int index, ValueAxis axis, boolean notify) { ValueAxis existing = this.rangeAxes.get(index); if (existing != null) { existing.removeChangeListener(this); } if (axis != null) { axis.setPlot(this); } this.rangeAxes.put(index, axis); if (axis != null) { axis.configure(); axis.addChangeListener(this); } if (n... | /**
* Sets a range axis and, if requested, sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param index the axis index.
* @param axis the axis.
* @param notify notify listeners?
*/ | Sets a range axis and, if requested, sends a <code>PlotChangeEvent</code> to all registered listeners | setRangeAxis | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/plot/CategoryPlot.java",
"license": "lgpl-2.1",
"size": 170549
} | [
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.event.PlotChangeEvent"
] | import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.event.PlotChangeEvent; | import org.jfree.chart.axis.*; import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,686,800 |
public static TableDesc getTableDesc(
Class<? extends Deserializer> serdeClass, String separatorCode,
String columns) {
return getTableDesc(serdeClass, separatorCode, columns, false);
} | static TableDesc function( Class<? extends Deserializer> serdeClass, String separatorCode, String columns) { return getTableDesc(serdeClass, separatorCode, columns, false); } | /**
* Generate the table descriptor of given serde with the separatorCode and
* column names (comma separated string).
*/ | Generate the table descriptor of given serde with the separatorCode and column names (comma separated string) | getTableDesc | {
"repo_name": "nishantmonu51/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java",
"license": "apache-2.0",
"size": 50292
} | [
"org.apache.hadoop.hive.serde2.Deserializer"
] | import org.apache.hadoop.hive.serde2.Deserializer; | import org.apache.hadoop.hive.serde2.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,205,888 |
@Nonnull
public StreamSource<T> build() {
return buildFn.apply(config.toProperties());
}
} | StreamSource<T> function() { return buildFn.apply(config.toProperties()); } } | /**
* Returns the CDC source based on the properties set.
*/ | Returns the CDC source based on the properties set | build | {
"repo_name": "gurbuzali/hazelcast-jet",
"path": "extensions/cdc-debezium/src/main/java/com/hazelcast/jet/cdc/DebeziumCdcSources.java",
"license": "apache-2.0",
"size": 4540
} | [
"com.hazelcast.jet.pipeline.StreamSource"
] | import com.hazelcast.jet.pipeline.StreamSource; | import com.hazelcast.jet.pipeline.*; | [
"com.hazelcast.jet"
] | com.hazelcast.jet; | 370,339 |
public void addDragPanel(DragPanel dragPanel) {
frame.getLayeredPane().add(dragPanel, JLayeredPane.DRAG_LAYER);
} | void function(DragPanel dragPanel) { frame.getLayeredPane().add(dragPanel, JLayeredPane.DRAG_LAYER); } | /**
* Adds the specified drag panel to the frame's
* layered pane.
*
* @param the drag panel
*/ | Adds the specified drag panel to the frame's layered pane | addDragPanel | {
"repo_name": "toxeh/ExecuteQuery",
"path": "java/src/org/executequery/base/DesktopMediator.java",
"license": "gpl-3.0",
"size": 36328
} | [
"javax.swing.JLayeredPane"
] | import javax.swing.JLayeredPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,336,757 |
public static void main(String[] args) throws ParseException, MalformedURLException {
Options options = buildOptions();
CommandLineParser parser = new DefaultParser();
CommandLine commandLine = parser.parse(options, args);
if (!commandLine.hasOption(OPTION_ARTIFACTS_LONG)) {
... | static void function(String[] args) throws ParseException, MalformedURLException { Options options = buildOptions(); CommandLineParser parser = new DefaultParser(); CommandLine commandLine = parser.parse(options, args); if (!commandLine.hasOption(OPTION_ARTIFACTS_LONG)) { throw new IllegalArgumentException(STR); } Stri... | /**
* Main entry of dependency resolver.
*
* @param args console arguments
* @throws ParseException If there's parsing error on option parse.
* @throws MalformedURLException If proxy URL is malformed.
*/ | Main entry of dependency resolver | main | {
"repo_name": "kamleshbhatt/storm",
"path": "storm-submit-tools/src/main/java/org/apache/storm/submit/command/DependencyResolverMain.java",
"license": "apache-2.0",
"size": 9569
} | [
"java.io.File",
"java.net.MalformedURLException",
"java.nio.file.Files",
"java.util.Collections",
"java.util.List",
"org.apache.commons.cli.CommandLine",
"org.apache.commons.cli.CommandLineParser",
"org.apache.commons.cli.DefaultParser",
"org.apache.commons.cli.Options",
"org.apache.commons.cli.Pa... | import java.io.File; import java.net.MalformedURLException; import java.nio.file.Files; import java.util.Collections; import java.util.List; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.Options; imp... | import java.io.*; import java.net.*; import java.nio.file.*; import java.util.*; import org.apache.commons.cli.*; import org.apache.storm.submit.dependency.*; import org.eclipse.aether.graph.*; import org.eclipse.aether.repository.*; import org.eclipse.aether.resolution.*; import org.json.simple.*; | [
"java.io",
"java.net",
"java.nio",
"java.util",
"org.apache.commons",
"org.apache.storm",
"org.eclipse.aether",
"org.json.simple"
] | java.io; java.net; java.nio; java.util; org.apache.commons; org.apache.storm; org.eclipse.aether; org.json.simple; | 1,492,078 |
@Test
public void testFindDomainBounds() {
XYBlockRenderer renderer = new XYBlockRenderer();
assertNull(renderer.findRangeBounds(null));
XYSeriesCollection dataset = new XYSeriesCollection();
XYSeries series = new XYSeries("S1");
series.add(1.0, null);
dataset.ad... | void function() { XYBlockRenderer renderer = new XYBlockRenderer(); assertNull(renderer.findRangeBounds(null)); XYSeriesCollection dataset = new XYSeriesCollection(); XYSeries series = new XYSeries("S1"); series.add(1.0, null); dataset.addSeries(series); Range r = renderer.findDomainBounds(dataset); assertEquals(0.5, r... | /**
* Some tests for the findDomainBounds() method.
*/ | Some tests for the findDomainBounds() method | testFindDomainBounds | {
"repo_name": "aaronc/jfreechart",
"path": "tests/org/jfree/chart/renderer/xy/XYBlockRendererTest.java",
"license": "lgpl-2.1",
"size": 6911
} | [
"org.jfree.data.Range",
"org.jfree.data.xy.XYSeries",
"org.jfree.data.xy.XYSeriesCollection",
"org.junit.Assert"
] | import org.jfree.data.Range; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; import org.junit.Assert; | import org.jfree.data.*; import org.jfree.data.xy.*; import org.junit.*; | [
"org.jfree.data",
"org.junit"
] | org.jfree.data; org.junit; | 1,898,505 |
// TODO change type of rootElementName to QName to support namespaces
Document elementsIntoDocument(List<Element> elements, String rootElementName); | Document elementsIntoDocument(List<Element> elements, String rootElementName); | /**
* This method puts a given list of DOM Elements into a proper DOM Document structure. The original elements are
* copied and the new elements are put into a new root element with the name depending on the second parameter.
*
* @param elements list of elements which provide the content of ... | This method puts a given list of DOM Elements into a proper DOM Document structure. The original elements are copied and the new elements are put into a new root element with the name depending on the second parameter | elementsIntoDocument | {
"repo_name": "OpenTOSCA/container",
"path": "org.opentosca.container.core/src/main/java/org/opentosca/container/core/engine/xml/IXMLSerializer.java",
"license": "apache-2.0",
"size": 5601
} | [
"java.util.List",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import java.util.List; import org.w3c.dom.Document; import org.w3c.dom.Element; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 2,603,445 |
private void addFilterQueryParameters(Query query, String filterText){
if(filterText != null && !filterText.isEmpty()){
query.setParameter("filterText", "%"+filterText+"%");
}
} | void function(Query query, String filterText){ if(filterText != null && !filterText.isEmpty()){ query.setParameter(STR, "%"+filterText+"%"); } } | /**
* Add the filter query parameters to the query.
*
* @param query The query.
* @param filterText The filter text.
*/ | Add the filter query parameters to the query | addFilterQueryParameters | {
"repo_name": "HoldInArms/RestauRate",
"path": "api/src/main/java/hu/holdinarms/dao/RestaurantDao.java",
"license": "gpl-3.0",
"size": 9655
} | [
"org.hibernate.Query"
] | import org.hibernate.Query; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 2,525,328 |
@SuppressWarnings("removal")
private static String getTempDir() {
GetPropertyAction a = new GetPropertyAction("java.io.tmpdir");
return AccessController.doPrivileged(a);
} | @SuppressWarnings(STR) static String function() { GetPropertyAction a = new GetPropertyAction(STR); return AccessController.doPrivileged(a); } | /**
* Returns the default temporary (cache) directory as defined by the
* java.io.tmpdir system property.
*/ | Returns the default temporary (cache) directory as defined by the java.io.tmpdir system property | getTempDir | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/imageio/ImageIO.java",
"license": "apache-2.0",
"size": 58515
} | [
"java.security.AccessController"
] | import java.security.AccessController; | import java.security.*; | [
"java.security"
] | java.security; | 2,781,815 |
public static PdfAnnotation createPopup(PdfWriter writer, Rectangle rect, String contents, boolean open) {
PdfAnnotation annot = new PdfAnnotation(writer, rect);
annot.put(PdfName.SUBTYPE, PdfName.POPUP);
if (contents != null)
annot.put(PdfName.CONTENTS, new PdfString(contents, P... | static PdfAnnotation function(PdfWriter writer, Rectangle rect, String contents, boolean open) { PdfAnnotation annot = new PdfAnnotation(writer, rect); annot.put(PdfName.SUBTYPE, PdfName.POPUP); if (contents != null) annot.put(PdfName.CONTENTS, new PdfString(contents, PdfObject.TEXT_UNICODE)); if (open) annot.put(PdfNa... | /**
* Adds a popup to your document.
* @param writer
* @param rect
* @param contents
* @param open
* @return A PdfAnnotation
*/ | Adds a popup to your document | createPopup | {
"repo_name": "shitalm/jsignpdf2",
"path": "src/main/java/com/lowagie/text/pdf/PdfAnnotation.java",
"license": "gpl-2.0",
"size": 32838
} | [
"com.lowagie.text.Rectangle"
] | import com.lowagie.text.Rectangle; | import com.lowagie.text.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 468,763 |
void receiveResponseEntity(HttpResponse response)
throws HttpException, IOException; | void receiveResponseEntity(HttpResponse response) throws HttpException, IOException; | /**
* Receives the next response entity available from this connection and
* attaches it to an existing HttpResponse object.
*
* @param response the response to attach the entity to
* @throws HttpException in case of HTTP protocol violation
* @throws IOException in case of an I/O error
... | Receives the next response entity available from this connection and attaches it to an existing HttpResponse object | receiveResponseEntity | {
"repo_name": "cictourgune/MDP-Airbnb",
"path": "httpcomponents-core-4.4/httpcore/src/main/java/org/apache/http/HttpClientConnection.java",
"license": "apache-2.0",
"size": 3888
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 517,337 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.