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 PublicKey getOwnPublicKey() { return usersKeyPair.getPublic(); }
PublicKey function() { return usersKeyPair.getPublic(); }
/** * Helper method that returns the public key of the currently logged in user. */
Helper method that returns the public key of the currently logged in user
getOwnPublicKey
{ "repo_name": "gfneto/Hive2Hive", "path": "org.hive2hive.core/src/main/java/org/hive2hive/core/network/data/PublicKeyManager.java", "license": "mit", "size": 4672 }
[ "java.security.PublicKey" ]
import java.security.PublicKey;
import java.security.*;
[ "java.security" ]
java.security;
169,980
public Set<String> getFolders() { return m_folders; }
Set<String> function() { return m_folders; }
/** * Returns the list of selected VFS folders.<p> * * @return the list of selected VFS folders */
Returns the list of selected VFS folders
getFolders
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/ade/galleries/shared/CmsGallerySearchBean.java", "license": "lgpl-2.1", "size": 21658 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
926,707
public boolean containsHosts(long pk) throws SystemException { if (getHostsSize(pk) > 0) { return true; } else { return false; } }
boolean function(long pk) throws SystemException { if (getHostsSize(pk) > 0) { return true; } else { return false; } }
/** * Determines if the site has any hosts associated with it. * * @param pk the primary key of the site to check for associations with hosts * @return <code>true</code> if the site has any hosts associated with it; <code>false</code> otherwise * @throws SystemException if a system exception occurred */
Determines if the site has any hosts associated with it
containsHosts
{ "repo_name": "RamkumarChandran/My-Courses-Portlet", "path": "docroot/WEB-INF/src/org/gnenc/internet/mycourses/service/persistence/SitePersistenceImpl.java", "license": "gpl-3.0", "size": 74617 }
[ "com.liferay.portal.kernel.exception.SystemException" ]
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.exception.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,582,413
public List<PrivateLinkServiceConnection> privateLinkServiceConnections() { return this.privateLinkServiceConnections; }
List<PrivateLinkServiceConnection> function() { return this.privateLinkServiceConnections; }
/** * Get a grouping of information about the connection to the remote resource. * * @return the privateLinkServiceConnections value */
Get a grouping of information about the connection to the remote resource
privateLinkServiceConnections
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/PrivateEndpointInner.java", "license": "mit", "size": 6617 }
[ "com.microsoft.azure.management.network.v2019_06_01.PrivateLinkServiceConnection", "java.util.List" ]
import com.microsoft.azure.management.network.v2019_06_01.PrivateLinkServiceConnection; import java.util.List;
import com.microsoft.azure.management.network.v2019_06_01.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,443,776
private int getItemIndex(TableItem item) { int index = -1; for (int i = 0; i < table.getItemCount(); i++) { if (table.getItem(i) == item) { index = i; break; } } return index; }
int function(TableItem item) { int index = -1; for (int i = 0; i < table.getItemCount(); i++) { if (table.getItem(i) == item) { index = i; break; } } return index; }
/** * Returns the index of the given item. * * @param item * @return */
Returns the index of the given item
getItemIndex
{ "repo_name": "jgaupp/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/explore/ViewClipboard.java", "license": "apache-2.0", "size": 18508 }
[ "org.eclipse.swt.widgets.TableItem" ]
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
386,712
public static HELM2Notation generatePeptidePolymersFromFASTAFormatHELM1(String fasta) throws FastaFormatException, ChemistryException { helm2notation = new HELM2Notation(); if (null == fasta) { LOG.error("Peptide Sequence must be specified"); throw new FastaFormatException("Peptide Sequence must be...
static HELM2Notation function(String fasta) throws FastaFormatException, ChemistryException { helm2notation = new HELM2Notation(); if (null == fasta) { LOG.error(STR); throw new FastaFormatException(STR); } initMapAminoAcid(); StringBuilder elements = new StringBuilder(); int counter = 0; PolymerNotation polymer; try {...
/** * method to read the information from a FastaFile-Format + generate peptide * polymers, be careful, it produces only polymers in the HELM1 standard, no * ambiguity * * @param fasta * FastaFile in string format * @return HELM2Notation generated HELM2Notation * @throws FastaFormatEx...
method to read the information from a FastaFile-Format + generate peptide polymers, be careful, it produces only polymers in the HELM1 standard, no ambiguity
generatePeptidePolymersFromFASTAFormatHELM1
{ "repo_name": "PistoiaHELM/HELM2NotationToolkit", "path": "src/main/java/org/helm/notation2/tools/FastaFormat.java", "license": "mit", "size": 29777 }
[ "org.helm.notation2.exception.ChemistryException", "org.helm.notation2.exception.FastaFormatException", "org.helm.notation2.parser.exceptionparser.NotationException", "org.helm.notation2.parser.notation.HELM2Notation", "org.helm.notation2.parser.notation.polymer.PolymerNotation" ]
import org.helm.notation2.exception.ChemistryException; import org.helm.notation2.exception.FastaFormatException; import org.helm.notation2.parser.exceptionparser.NotationException; import org.helm.notation2.parser.notation.HELM2Notation; import org.helm.notation2.parser.notation.polymer.PolymerNotation;
import org.helm.notation2.exception.*; import org.helm.notation2.parser.exceptionparser.*; import org.helm.notation2.parser.notation.*; import org.helm.notation2.parser.notation.polymer.*;
[ "org.helm.notation2" ]
org.helm.notation2;
2,450,350
InputStream formStream = this.getClass().getClassLoader().getResourceAsStream("startFormFrame.html"); InputRepresentation formResultRepresentation = new InputRepresentation(formStream); formResultRepresentation.setMediaType(MediaType.APPLICATION_XHTML); return formResultRepresentation; }
InputStream formStream = this.getClass().getClassLoader().getResourceAsStream(STR); InputRepresentation formResultRepresentation = new InputRepresentation(formStream); formResultRepresentation.setMediaType(MediaType.APPLICATION_XHTML); return formResultRepresentation; }
/** * The formFrame * */
The formFrame
getTaskFormPage
{ "repo_name": "gdharley/activiti-alpaca", "path": "src/main/java/org/activiti/rest/alpaca/services/StartFormFrameResource.java", "license": "apache-2.0", "size": 1296 }
[ "java.io.InputStream", "org.restlet.data.MediaType", "org.restlet.representation.InputRepresentation" ]
import java.io.InputStream; import org.restlet.data.MediaType; import org.restlet.representation.InputRepresentation;
import java.io.*; import org.restlet.data.*; import org.restlet.representation.*;
[ "java.io", "org.restlet.data", "org.restlet.representation" ]
java.io; org.restlet.data; org.restlet.representation;
1,278,349
public Version pluginVersion() { return pluginVersion; }
Version function() { return pluginVersion; }
/** * Return the plugin's version. * * @return the version of the plugin */
Return the plugin's version
pluginVersion
{ "repo_name": "kylycht/concourse", "path": "concourse-plugin-core/src/main/java/com/cinchapi/concourse/server/plugin/PluginContext.java", "license": "apache-2.0", "size": 2554 }
[ "com.github.zafarkhaja.semver.Version" ]
import com.github.zafarkhaja.semver.Version;
import com.github.zafarkhaja.semver.*;
[ "com.github.zafarkhaja" ]
com.github.zafarkhaja;
2,378,805
@Test(expected = AssertionError.class) public void testInvokeScriptCausesException() throws Exception { final TestRunner runner = TestRunners.newTestRunner(new InvokeScriptedProcessor()); runner.setValidateExpressionUsage(false); runner.setProperty(scriptingComponent.getScriptingComponen...
@Test(expected = AssertionError.class) void function() throws Exception { final TestRunner runner = TestRunners.newTestRunner(new InvokeScriptedProcessor()); runner.setValidateExpressionUsage(false); runner.setProperty(scriptingComponent.getScriptingComponentHelper().SCRIPT_ENGINE, STR); runner.setProperty(ScriptingCom...
/** * Tests a script that throws a ProcessException within. * The expected result is that the exception will be propagated. * * @throws Exception Any error encountered while testing */
Tests a script that throws a ProcessException within. The expected result is that the exception will be propagated
testInvokeScriptCausesException
{ "repo_name": "tequalsme/nifi", "path": "nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/java/org/apache/nifi/processors/script/TestInvokeJavascript.java", "license": "apache-2.0", "size": 7964 }
[ "java.nio.charset.StandardCharsets", "org.apache.nifi.util.TestRunner", "org.apache.nifi.util.TestRunners", "org.junit.Test" ]
import java.nio.charset.StandardCharsets; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; import org.junit.Test;
import java.nio.charset.*; import org.apache.nifi.util.*; import org.junit.*;
[ "java.nio", "org.apache.nifi", "org.junit" ]
java.nio; org.apache.nifi; org.junit;
1,164,219
@Deprecated public void setFontWeight(Expression fontWeight) { this.fontWeight = fontWeight; }
void function(Expression fontWeight) { this.fontWeight = fontWeight; }
/** * Setter for property fontWeight. * * @param fontWeight New value of property fontWeight. */
Setter for property fontWeight
setFontWeight
{ "repo_name": "FUNCATE/TerraMobile", "path": "sldparser/src/main/geotools/styling/FontImpl.java", "license": "apache-2.0", "size": 7134 }
[ "org.opengis.filter.expression.Expression" ]
import org.opengis.filter.expression.Expression;
import org.opengis.filter.expression.*;
[ "org.opengis.filter" ]
org.opengis.filter;
472,465
public Set<String> nodes() { return nodes; }
Set<String> function() { return nodes; }
/** * Set of all nodes that can participate in disruptions */
Set of all nodes that can participate in disruptions
nodes
{ "repo_name": "crate/crate", "path": "server/src/testFixtures/java/org/elasticsearch/test/disruption/NetworkDisruption.java", "license": "apache-2.0", "size": 19033 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
779,419
private long createRoleDefinition(TechnicalProduct technicalProduct, String roleID) throws Exception { ArrayList<PricedProductRole> pricedRoles = new ArrayList<PricedProductRole>(); RoleDefinition roleDefinition = new RoleDefinition(); roleDefinition.setTechnicalProduct(techni...
long function(TechnicalProduct technicalProduct, String roleID) throws Exception { ArrayList<PricedProductRole> pricedRoles = new ArrayList<PricedProductRole>(); RoleDefinition roleDefinition = new RoleDefinition(); roleDefinition.setTechnicalProduct(technicalProduct); roleDefinition.setRoleId(roleID); roleDefinition.s...
/** * Helper method for discount creating. * * @param value * @return * @throws Exception */
Helper method for discount creating
createRoleDefinition
{ "repo_name": "opetrovski/development", "path": "oscm-dataservice-unittests/javasrc-it/org/oscm/domobjects/RoleDefinitionIT.java", "license": "apache-2.0", "size": 4684 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
891,221
@UiThread @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) void showProgress(final boolean show) { // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow // for very easy animations. If available, use these APIs to fade-in // the progress spinner. if (Build.VERSION.SDK_INT >= Build.VERSION_CO...
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) void showProgress(final boolean show) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { int shortAnimTime = getResources().getInteger( android.R.integer.config_shortAnimTime);
/** * Shows the progress UI and hides the login form. */
Shows the progress UI and hides the login form
showProgress
{ "repo_name": "luiseduardobrito/android-boilerplate", "path": "src/io/github/luiseduardobrito/androidboilerplate/activity/LoginActivity.java", "license": "mit", "size": 4661 }
[ "android.annotation.TargetApi", "android.os.Build" ]
import android.annotation.TargetApi; import android.os.Build;
import android.annotation.*; import android.os.*;
[ "android.annotation", "android.os" ]
android.annotation; android.os;
445,716
private static String md5(String string) throws Exception { MessageDigest messageDigest = MessageDigest.getInstance("MD5"); messageDigest.update(string.getBytes(Charset.forName("UTF-8"))); byte digest[] = messageDigest.digest(); StringBuilder result = new StringBuilder(); for (byte dig : digest) ...
static String function(String string) throws Exception { MessageDigest messageDigest = MessageDigest.getInstance("MD5"); messageDigest.update(string.getBytes(Charset.forName("UTF-8"))); byte digest[] = messageDigest.digest(); StringBuilder result = new StringBuilder(); for (byte dig : digest) { result.append(String.for...
/** * Gets MD5 hash of given string. * * @param string String for which want to have MD5 hash. * @return String with MD5 hash of given string. */
Gets MD5 hash of given string
md5
{ "repo_name": "Leanplum/Leanplum-Android-SDK", "path": "AndroidSDKCore/src/main/java/com/leanplum/internal/Util.java", "license": "apache-2.0", "size": 23436 }
[ "java.nio.charset.Charset", "java.security.MessageDigest" ]
import java.nio.charset.Charset; import java.security.MessageDigest;
import java.nio.charset.*; import java.security.*;
[ "java.nio", "java.security" ]
java.nio; java.security;
814,639
// TODO alias to closeDrawer before 3.0 and deprecate this method. public static ViewAction close() { return close(GravityCompat.START); }
static ViewAction function() { return close(GravityCompat.START); }
/** * Creates an action which closes the {@link DrawerLayout} with gravity START. This method blocks * until the drawer is fully closed. No operation if the drawer is already closed. */
Creates an action which closes the <code>DrawerLayout</code> with gravity START. This method blocks until the drawer is fully closed. No operation if the drawer is already closed
close
{ "repo_name": "android/android-test", "path": "espresso/contrib/java/androidx/test/espresso/contrib/DrawerActions.java", "license": "apache-2.0", "size": 7971 }
[ "androidx.core.view.GravityCompat", "androidx.test.espresso.ViewAction" ]
import androidx.core.view.GravityCompat; import androidx.test.espresso.ViewAction;
import androidx.core.view.*; import androidx.test.espresso.*;
[ "androidx.core", "androidx.test" ]
androidx.core; androidx.test;
1,133,209
public boolean isSameNode(Node other) { return this == other; }
boolean function(Node other) { return this == other; }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#isSameNode(Node)}. */
DOM: Implements <code>org.w3c.dom.Node#isSameNode(Node)</code>
isSameNode
{ "repo_name": "Groostav/CMPT880-term-project", "path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/AbstractNode.java", "license": "apache-2.0", "size": 44954 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
343,514
@Test public void testRenameRdnExistIsReferralCoreAPIWithManageDsaIt() throws Exception { CoreSession session = getService().getAdminSession(); Dn dn = new Dn( "ou=Roles,o=MNN,c=WW,ou=system" ); Rdn newRdn = new Rdn( "ou=People" ); try { session.rename( d...
void function() throws Exception { CoreSession session = getService().getAdminSession(); Dn dn = new Dn( STR ); Rdn newRdn = new Rdn( STR ); try { session.rename( dn, newRdn, false, true ); fail(); } catch ( LdapEntryAlreadyExistsException leaee ) { assertTrue( true ); } }
/** * Test a rename a referral using an already existing Rdn (the new entry already exists and is a referral), * using the Core API, with the ManageDsaIt flag */
Test a rename a referral using an already existing Rdn (the new entry already exists and is a referral), using the Core API, with the ManageDsaIt flag
testRenameRdnExistIsReferralCoreAPIWithManageDsaIt
{ "repo_name": "apache/directory-server", "path": "core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIgnoreIT.java", "license": "apache-2.0", "size": 10115 }
[ "org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException", "org.apache.directory.api.ldap.model.name.Dn", "org.apache.directory.api.ldap.model.name.Rdn", "org.apache.directory.server.core.api.CoreSession", "org.junit.jupiter.api.Assertions" ]
import org.apache.directory.api.ldap.model.exception.LdapEntryAlreadyExistsException; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.api.ldap.model.name.Rdn; import org.apache.directory.server.core.api.CoreSession; import org.junit.jupiter.api.Assertions;
import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.server.core.api.*; import org.junit.jupiter.api.*;
[ "org.apache.directory", "org.junit.jupiter" ]
org.apache.directory; org.junit.jupiter;
1,581,987
SlidingMenu getSlidingMenu();
SlidingMenu getSlidingMenu();
/** * Gets the SlidingMenu associated with this activity. * * @return the SlidingMenu associated with this activity. */
Gets the SlidingMenu associated with this activity
getSlidingMenu
{ "repo_name": "efrozaq/DailyQuotes", "path": "app/src/main/java/com/dreamcodes/dcquotes/lib/slidingmenu/app/SlidingActivityBase.java", "license": "apache-2.0", "size": 2380 }
[ "com.dreamcodes.dcquotes.lib.slidingmenu.SlidingMenu" ]
import com.dreamcodes.dcquotes.lib.slidingmenu.SlidingMenu;
import com.dreamcodes.dcquotes.lib.slidingmenu.*;
[ "com.dreamcodes.dcquotes" ]
com.dreamcodes.dcquotes;
2,530,173
public void saveTrack(Track track) { if (track != null) { db = new DataBaseHandler(context.getApplicationContext()); track.finishTrack(); db.updateGPSTrack(track); Log.d(TAG, "Finish and update track in database with id: " ...
void function(Track track) { if (track != null) { db = new DataBaseHandler(context.getApplicationContext()); track.finishTrack(); db.updateGPSTrack(track); Log.d(TAG, STR + track.getID()); db.close(); } }
/** * Saves and closes a track in the database By closing a track it is not * possible to add new trackpoints. * * @param track * The track */
Saves and closes a track in the database By closing a track it is not possible to add new trackpoints
saveTrack
{ "repo_name": "Data4All/Data4All", "path": "src/main/java/io/github/data4all/util/TrackUtil.java", "license": "apache-2.0", "size": 6145 }
[ "io.github.data4all.handler.DataBaseHandler", "io.github.data4all.logger.Log", "io.github.data4all.model.data.Track" ]
import io.github.data4all.handler.DataBaseHandler; import io.github.data4all.logger.Log; import io.github.data4all.model.data.Track;
import io.github.data4all.handler.*; import io.github.data4all.logger.*; import io.github.data4all.model.data.*;
[ "io.github.data4all" ]
io.github.data4all;
854,953
public void setRegisterValueValue(YangString registerValueValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "register-value", registerValueValue, childrenNames()); }
void function(YangString registerValueValue) throws JNCException { setLeafValue(Epc.NAMESPACE, STR, registerValueValue, childrenNames()); }
/** * Sets the value for child leaf "register-value", * using instance of generated typedef class. * @param registerValueValue The value to set. * @param registerValueValue used during instantiation. */
Sets the value for child leaf "register-value", using instance of generated typedef class
setRegisterValueValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/statistics/gprsMm/General.java", "license": "apache-2.0", "size": 11341 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
583,336
void setPollingConsumerServicePool(ServicePool<Endpoint, PollingConsumer> servicePool);
void setPollingConsumerServicePool(ServicePool<Endpoint, PollingConsumer> servicePool);
/** * Sets a pluggable service pool to use for {@link PollingConsumer} pooling. * * @param servicePool the pool */
Sets a pluggable service pool to use for <code>PollingConsumer</code> pooling
setPollingConsumerServicePool
{ "repo_name": "borcsokj/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 68766 }
[ "org.apache.camel.spi.ServicePool" ]
import org.apache.camel.spi.ServicePool;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
2,456,482
public static void centerOnScreen(Window win) { win.setLocationRelativeTo(null); }
static void function(Window win) { win.setLocationRelativeTo(null); }
/** * Move the specified window to the center of the screen. It is the * programmer's responsibility to ensure that the window fits on the screen. * * @param win * The window to be moved */
Move the specified window to the center of the screen. It is the programmer's responsibility to ensure that the window fits on the screen
centerOnScreen
{ "repo_name": "truhanen/JSana", "path": "JSana/src_others/org/crosswire/common/swing/GuiUtil.java", "license": "gpl-2.0", "size": 20415 }
[ "java.awt.Window" ]
import java.awt.Window;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,131,789
@Override public SerialMessage getValueMessage() { // TODO: Why does this return!!!???!!! for (Map.Entry<AlarmType, Alarm> entry : this.alarms.entrySet()) { return getMessage(entry.getValue().getAlarmType()); } // in case there are no supported alarms, get them. ...
SerialMessage function() { for (Map.Entry<AlarmType, Alarm> entry : this.alarms.entrySet()) { return getMessage(entry.getValue().getAlarmType()); } return this.getSupportedMessage(); }
/** * Gets a SerialMessage with the SENSOR_ALARM_GET command * * @return the serial message */
Gets a SerialMessage with the SENSOR_ALARM_GET command
getValueMessage
{ "repo_name": "talltechdude/openhab2-addons", "path": "addons/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveAlarmSensorCommandClass.java", "license": "epl-1.0", "size": 16737 }
[ "java.util.Map", "org.openhab.binding.zwave.internal.protocol.SerialMessage" ]
import java.util.Map; import org.openhab.binding.zwave.internal.protocol.SerialMessage;
import java.util.*; import org.openhab.binding.zwave.internal.protocol.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
508,872
public GfxColor getClassRelationBackgroundColor() { return classRelationBackgroundColor; }
GfxColor function() { return classRelationBackgroundColor; }
/** * Getter for the classClassRelationBackgroundColor * * @return the classClassRelationBackgroundColor */
Getter for the classClassRelationBackgroundColor
getClassRelationBackgroundColor
{ "repo_name": "RaphaelBrugier/gwtuml", "path": "GWTUMLAPI/src/com/objetdirect/gwt/umlapi/client/helpers/ThemeManager.java", "license": "gpl-3.0", "size": 23588 }
[ "com.objetdirect.gwt.umlapi.client.gfx.GfxColor" ]
import com.objetdirect.gwt.umlapi.client.gfx.GfxColor;
import com.objetdirect.gwt.umlapi.client.gfx.*;
[ "com.objetdirect.gwt" ]
com.objetdirect.gwt;
1,477,198
public String[] getNames(){ String[] retval = new String[registry.size()]; int i = 0; for(Enumeration e = registry.keys(); e.hasMoreElements(); i++){ retval[i] = (String) e.nextElement(); } return retval; }
String[] function(){ String[] retval = new String[registry.size()]; int i = 0; for(Enumeration e = registry.keys(); e.hasMoreElements(); i++){ retval[i] = (String) e.nextElement(); } return retval; }
/** * Gets a list of all the Global Extractors available by name * */
Gets a list of all the Global Extractors available by name
getNames
{ "repo_name": "fracpete/tclass-weka-package", "path": "src/main/java/tclass/GlobalExtrMgr.java", "license": "gpl-3.0", "size": 5439 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,642,899
public static boolean visitNeededAttributeParts(final Attribute node, VisitorBase base) throws Exception { exprType value = node.value; boolean valueVisited = false; boolean doReturn = false; if (value instanceof Subscript) { Subscript subs = (Subscript) value; ...
static boolean function(final Attribute node, VisitorBase base) throws Exception { exprType value = node.value; boolean valueVisited = false; boolean doReturn = false; if (value instanceof Subscript) { Subscript subs = (Subscript) value; base.traverse(subs.slice); if (subs.value instanceof Name) { base.visitName((Name)...
/** * In this function, the visitor will traverse the value of the attribute as needed, * if it is a subscript, call, etc, as those things are not actually a part of the attribute, * but are rather 'in' the attribute. * * @param node the attribute to visit * @param base the visitor that sh...
In this function, the visitor will traverse the value of the attribute as needed, if it is a subscript, call, etc, as those things are not actually a part of the attribute, but are rather 'in' the attribute
visitNeededAttributeParts
{ "repo_name": "fabioz/Pydev", "path": "plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/scopeanalysis/AbstractScopeAnalyzerVisitor.java", "license": "epl-1.0", "size": 55266 }
[ "org.python.pydev.parser.jython.ast.Attribute", "org.python.pydev.parser.jython.ast.Call", "org.python.pydev.parser.jython.ast.Dict", "org.python.pydev.parser.jython.ast.Name", "org.python.pydev.parser.jython.ast.Subscript", "org.python.pydev.parser.jython.ast.Tuple", "org.python.pydev.parser.jython.ast...
import org.python.pydev.parser.jython.ast.Attribute; import org.python.pydev.parser.jython.ast.Call; import org.python.pydev.parser.jython.ast.Dict; import org.python.pydev.parser.jython.ast.Name; import org.python.pydev.parser.jython.ast.Subscript; import org.python.pydev.parser.jython.ast.Tuple; import org.python.pyd...
import org.python.pydev.parser.jython.ast.*;
[ "org.python.pydev" ]
org.python.pydev;
3,225
@RequiresPermission(MANAGE_FINGERPRINT) public void remove(Fingerprint fp, int userId, RemovalCallback callback) { if (mService != null) try { mRemovalCallback = callback; mRemovalFingerprint = fp; mService.remove(mToken, fp.getFingerId(), fp.getGroupId(), userId, mSe...
@RequiresPermission(MANAGE_FINGERPRINT) void function(Fingerprint fp, int userId, RemovalCallback callback) { if (mService != null) try { mRemovalCallback = callback; mRemovalFingerprint = fp; mService.remove(mToken, fp.getFingerId(), fp.getGroupId(), userId, mServiceReceiver); } catch (RemoteException e) { Log.w(TAG, ...
/** * Remove given fingerprint template from fingerprint hardware and/or protected storage. * @param fp the fingerprint item to remove * @param userId the user who this fingerprint belongs to * @param callback an optional callback to verify that fingerprint templates have been * successfully re...
Remove given fingerprint template from fingerprint hardware and/or protected storage
remove
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/hardware/fingerprint/FingerprintManager.java", "license": "apache-2.0", "size": 39147 }
[ "android.annotation.RequiresPermission", "android.os.RemoteException", "android.util.Log" ]
import android.annotation.RequiresPermission; import android.os.RemoteException; import android.util.Log;
import android.annotation.*; import android.os.*; import android.util.*;
[ "android.annotation", "android.os", "android.util" ]
android.annotation; android.os; android.util;
2,170,570
public Scroll scroll() { return scroll; }
Scroll function() { return scroll; }
/** * If set, will enable scrolling of the search request. */
If set, will enable scrolling of the search request
scroll
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/search/SearchRequest.java", "license": "apache-2.0", "size": 27745 }
[ "org.elasticsearch.search.Scroll" ]
import org.elasticsearch.search.Scroll;
import org.elasticsearch.search.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
2,150,398
public Chart getOrganizationChartOfAccounts() { return organizationChartOfAccounts; }
Chart function() { return organizationChartOfAccounts; }
/** * Gets the organizationChartOfAccounts attribute. * * @return Returns the organizationChartOfAccounts */
Gets the organizationChartOfAccounts attribute
getOrganizationChartOfAccounts
{ "repo_name": "bhutchinson/kfs", "path": "kfs-bc/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionSalaryTotal.java", "license": "agpl-3.0", "size": 7347 }
[ "org.kuali.kfs.coa.businessobject.Chart" ]
import org.kuali.kfs.coa.businessobject.Chart;
import org.kuali.kfs.coa.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,190,542
protected void getProperBaseMatrix2(final Drawable bitmap, final Matrix matrix) { final float viewWidth = getWidth(); final float viewHeight = getHeight(); final float w = bitmap.getIntrinsicWidth(); final float h = bitmap.getIntrinsicHeight(); matrix.reset(); final float widthScale = Math.min(viewWidth ...
void function(final Drawable bitmap, final Matrix matrix) { final float viewWidth = getWidth(); final float viewHeight = getHeight(); final float w = bitmap.getIntrinsicWidth(); final float h = bitmap.getIntrinsicHeight(); matrix.reset(); final float widthScale = Math.min(viewWidth / w, MAX_ZOOM); final float heightSca...
/** * Setup the base matrix so that the image is centered and scaled properly. * * @param bitmap * @param matrix */
Setup the base matrix so that the image is centered and scaled properly
getProperBaseMatrix2
{ "repo_name": "gen4young/twidere", "path": "src/it/sephiroth/android/library/imagezoom/ImageViewTouchBase.java", "license": "gpl-3.0", "size": 14397 }
[ "android.graphics.Matrix", "android.graphics.drawable.Drawable" ]
import android.graphics.Matrix; import android.graphics.drawable.Drawable;
import android.graphics.*; import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
2,604,725
ILanguage getLanguage(); // -- Pages --
ILanguage getLanguage();
/** Returns the language of the Wiktionary edition, which is equivalent * to the entry language of the contained entries. */
Returns the language of the Wiktionary edition, which is equivalent
getLanguage
{ "repo_name": "dkpro/dkpro-jwktl", "path": "src/main/java/de/tudarmstadt/ukp/jwktl/api/IWiktionaryEdition.java", "license": "apache-2.0", "size": 5229 }
[ "de.tudarmstadt.ukp.jwktl.api.util.ILanguage" ]
import de.tudarmstadt.ukp.jwktl.api.util.ILanguage;
import de.tudarmstadt.ukp.jwktl.api.util.*;
[ "de.tudarmstadt.ukp" ]
de.tudarmstadt.ukp;
26,706
public WSCurationTagHistory[] getCurationTagHistory(String id) throws RemoteException { return getCurationTagHistory(id, null); }
WSCurationTagHistory[] function(String id) throws RemoteException { return getCurationTagHistory(id, null); }
/** * Get the curation tag history for the given pathway * @param id The pathway identifier * @return An array with the history items * @throws RemoteException */
Get the curation tag history for the given pathway
getCurationTagHistory
{ "repo_name": "wikipathways/org.wikipathways.client", "path": "wp-client/src/org/wikipathways/client/WikiPathwaysClient.java", "license": "apache-2.0", "size": 13662 }
[ "java.rmi.RemoteException", "org.pathvisio.wikipathways.webservice.WSCurationTagHistory" ]
import java.rmi.RemoteException; import org.pathvisio.wikipathways.webservice.WSCurationTagHistory;
import java.rmi.*; import org.pathvisio.wikipathways.webservice.*;
[ "java.rmi", "org.pathvisio.wikipathways" ]
java.rmi; org.pathvisio.wikipathways;
1,293,468
private Map<KeyCacheObject, List<CacheDataRow>> allVersions(IgniteCache cache) throws IgniteCheckedException { IgniteCacheProxy cache0 = (IgniteCacheProxy)cache; GridCacheContext cctx = cache0.context(); assert cctx.mvccEnabled(); Map<KeyCacheObject, List<CacheDataRow>> vers = new ...
Map<KeyCacheObject, List<CacheDataRow>> function(IgniteCache cache) throws IgniteCheckedException { IgniteCacheProxy cache0 = (IgniteCacheProxy)cache; GridCacheContext cctx = cache0.context(); assert cctx.mvccEnabled(); Map<KeyCacheObject, List<CacheDataRow>> vers = new HashMap<>(); for (Object e : cache) { IgniteBiTup...
/** * Retrieves all versions of all keys from cache. * * @param cache Cache. * @return {@link Map} of keys to its versions. * @throws IgniteCheckedException If failed. */
Retrieves all versions of all keys from cache
allVersions
{ "repo_name": "amirakhmedov/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccBackupsAbstractTest.java", "license": "apache-2.0", "size": 25853 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.ignite.IgniteCache", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.GridCacheContext", "org.apache.ignite.internal.processors.cache.IgniteCacheProxy", "org.apache.igni...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.IgniteCachePro...
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.persistence.*; import org.apache.ignite.internal.util.lang.*; import org.apache.ignite.lang.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,500,072
public void setHideDetail( boolean hideDetail ) throws SemanticException { setProperty( IGroupElementModel.HIDE_DETAIL_PROP, Boolean .valueOf( hideDetail ) ); }
void function( boolean hideDetail ) throws SemanticException { setProperty( IGroupElementModel.HIDE_DETAIL_PROP, Boolean .valueOf( hideDetail ) ); }
/** * Sets hide detail * * @param hideDetail * hide detail * @throws SemanticException * if the property is locked. */
Sets hide detail
setHideDetail
{ "repo_name": "rrimmana/birt-1", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/simpleapi/Group.java", "license": "epl-1.0", "size": 5569 }
[ "org.eclipse.birt.report.model.api.activity.SemanticException", "org.eclipse.birt.report.model.elements.interfaces.IGroupElementModel" ]
import org.eclipse.birt.report.model.api.activity.SemanticException; import org.eclipse.birt.report.model.elements.interfaces.IGroupElementModel;
import org.eclipse.birt.report.model.api.activity.*; import org.eclipse.birt.report.model.elements.interfaces.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
2,758,671
private static double getResponseTimeDeviation(List<Long> responseTimes) { // Cannot calculate a deviation with less than // two response time values if (responseTimes.size() < 2) { return -1; } double avg = getResponseTimeAverage(responseTimes); double r...
static double function(List<Long> responseTimes) { if (responseTimes.size() < 2) { return -1; } double avg = getResponseTimeAverage(responseTimes); double result = 0; for (long value : responseTimes) { result += Math.pow(value - avg, 2); } result = Math.sqrt(result / (responseTimes.size() - 1)); if (result > WARN_TIME_...
/** * Computes standard deviation of the responseTimes Reference: * http://www.goldb.org/corestats.html * * @return the current responseTimes deviation */
Computes standard deviation of the responseTimes Reference: HREF
getResponseTimeDeviation
{ "repo_name": "denniskniep/zap-extensions", "path": "addOns/ascanrules/src/main/java/org/zaproxy/zap/extension/ascanrules/CommandInjectionScanRule.java", "license": "apache-2.0", "size": 30791 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
439,778
@Override public void enterFunctionCallExpression(@NotNull BramsprParser.FunctionCallExpressionContext ctx) { }
@Override public void enterFunctionCallExpression(@NotNull BramsprParser.FunctionCallExpressionContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
exitUniversalNotEqualsToExpression
{ "repo_name": "bcleenders/Bramspr", "path": "src/bramspr/BramsprBaseListener.java", "license": "mit", "size": 21948 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,277,648
public void setOutlierIgnoreRatio (double ratio) { if (ratio < 0.0) { LOGGER.warn("Illegal outlier ignore ratio {}: Must be >= 0.0", ratio); return; } if (ratio >= 1.0) { LOGGER.warn("Illegal outlier ignore ratio {}: Must be < 1.0", ratio); ...
void function (double ratio) { if (ratio < 0.0) { LOGGER.warn(STR, ratio); return; } if (ratio >= 1.0) { LOGGER.warn(STR, ratio); return; } if (Math.abs(_outlierIgnoreRatio-ratio) < EPSILON) return; _outlierIgnoreRatio = ratio; int toKeep = (int) Math.ceil(_tracks.size()*(1.0-_outlierIgnoreRatio)); _practicalMean = nul...
/** * Causes the given proportion of tracks farthest from the true mean to be * ignored when calculating the practical mean. * * @param ratio * A number in the range [0.0, 1.0). Floor(proportion times * number of tracks) will be ignored, so that at least one tr...
Causes the given proportion of tracks farthest from the true mean to be ignored when calculating the practical mean
setOutlierIgnoreRatio
{ "repo_name": "unchartedsoftware/ensemble-clustering", "path": "ensemble-clustering/src/main/java/com/oculusinfo/ml/stats/TrackClusterWrapper.java", "license": "mit", "size": 9733 }
[ "com.oculusinfo.geometry.geodesic.Track", "java.util.HashMap" ]
import com.oculusinfo.geometry.geodesic.Track; import java.util.HashMap;
import com.oculusinfo.geometry.geodesic.*; import java.util.*;
[ "com.oculusinfo.geometry", "java.util" ]
com.oculusinfo.geometry; java.util;
688,029
public final TransactionService getTransactionService() { return m_transactionService; }
final TransactionService function() { return m_transactionService; }
/** * Return the transaction service * * @return TransactionService */
Return the transaction service
getTransactionService
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/filesys/AlfrescoConfigSection.java", "license": "lgpl-3.0", "size": 5255 }
[ "org.alfresco.service.transaction.TransactionService" ]
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.service.transaction.*;
[ "org.alfresco.service" ]
org.alfresco.service;
593,790
private void createInitialTab() { Log.i(TAG, "#createInitialTab executed."); mPendingInitialTabCreation = false; // If the start surface or grid tab switcher will be shown on start, do not create a new // tab. if (!shouldShowOverviewPageOnStart()) { String url = ...
void function() { Log.i(TAG, STR); mPendingInitialTabCreation = false; if (!shouldShowOverviewPageOnStart()) { String url = HomepageManager.getHomepageUri(); if (TextUtils.isEmpty(url)) { url = UrlConstants.NTP_URL; } else { if (UrlUtilities.isNTPUrl(url)) { url = UrlConstants.NTP_URL; } } getTabCreator(false).launchUr...
/** * Create an initial tab for cold start without restored tabs. */
Create an initial tab for cold start without restored tabs
createInitialTab
{ "repo_name": "chromium/chromium", "path": "chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java", "license": "bsd-3-clause", "size": 135297 }
[ "android.text.TextUtils", "org.chromium.base.Log", "org.chromium.chrome.browser.homepage.HomepageManager", "org.chromium.chrome.browser.tab.TabLaunchType", "org.chromium.components.embedder_support.util.UrlConstants", "org.chromium.components.embedder_support.util.UrlUtilities" ]
import android.text.TextUtils; import org.chromium.base.Log; import org.chromium.chrome.browser.homepage.HomepageManager; import org.chromium.chrome.browser.tab.TabLaunchType; import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.embedder_support.util.UrlUtilities;
import android.text.*; import org.chromium.base.*; import org.chromium.chrome.browser.homepage.*; import org.chromium.chrome.browser.tab.*; import org.chromium.components.embedder_support.util.*;
[ "android.text", "org.chromium.base", "org.chromium.chrome", "org.chromium.components" ]
android.text; org.chromium.base; org.chromium.chrome; org.chromium.components;
272,056
public static List<Path> getFamilyDirs(final FileSystem fs, final Path regionDir) throws IOException { // assumes we are in a region dir. FileStatus[] fds = fs.listStatus(regionDir, new FamilyDirFilter(fs)); List<Path> familyDirs = new ArrayList<Path>(fds.length); for (FileStatus fdfs: fds) { Pa...
static List<Path> function(final FileSystem fs, final Path regionDir) throws IOException { FileStatus[] fds = fs.listStatus(regionDir, new FamilyDirFilter(fs)); List<Path> familyDirs = new ArrayList<Path>(fds.length); for (FileStatus fdfs: fds) { Path fdPath = fdfs.getPath(); familyDirs.add(fdPath); } return familyDirs...
/** * Given a particular region dir, return all the familydirs inside it * * @param fs A file system for the Path * @param regionDir Path to a specific region directory * @return List of paths to valid family directories in region dir. * @throws IOException */
Given a particular region dir, return all the familydirs inside it
getFamilyDirs
{ "repo_name": "intel-hadoop/hbase-rhino", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java", "license": "apache-2.0", "size": 69381 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.regex.Pattern", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.PathFilter" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathFilter;
import java.io.*; import java.util.*; import java.util.regex.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,491,005
public void createDefaultAuthenticationSeq(DefaultAuthenticationSequence authenticationSequence) throws DefaultAuthSeqMgtException { try { authenticationSeqMgtService = DefaultAuthSeqMgtServiceImpl.getInstance(); authenticationSeqMgtService.createDefaultAuthenticationSeq...
void function(DefaultAuthenticationSequence authenticationSequence) throws DefaultAuthSeqMgtException { try { authenticationSeqMgtService = DefaultAuthSeqMgtServiceImpl.getInstance(); authenticationSeqMgtService.createDefaultAuthenticationSeq(authenticationSequence, getTenantDomain()); } catch (DefaultAuthSeqMgtServerE...
/** * Create default authentication sequence. * * @param authenticationSequence default authentication sequence * @throws DefaultAuthSeqMgtException */
Create default authentication sequence
createDefaultAuthenticationSeq
{ "repo_name": "omindu/carbon-identity-framework", "path": "components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/defaultsequence/DefaultAuthSeqMgtAdminService.java", "license": "apache-2.0", "size": 7176 }
[ "org.wso2.carbon.identity.application.common.model.DefaultAuthenticationSequence" ]
import org.wso2.carbon.identity.application.common.model.DefaultAuthenticationSequence;
import org.wso2.carbon.identity.application.common.model.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,474,320
public String verifyEnvInjection(int testpoint) { String envName = null; // Assert that none of the injection methods were called assertEquals(testpoint + (testpoint > 9 ? " --> " : " ---> ") + "No Injection Methods called : 0 : " + ivInjectCount, 0...
String function(int testpoint) { String envName = null; assertEquals(testpoint + (testpoint > 9 ? STR : STR) + STR + ivInjectCount, 0, ivInjectCount); ++testpoint; assertEquals(testpoint + (testpoint > 9 ? STR : STR) + STR + ivString, I_STRING, ivString); ++testpoint; assertEquals(testpoint + (testpoint > 9 ? STR : STR...
/** * Verify Environment Injection (field or method) occurred properly. **/
Verify Environment Injection (field or method) occurred properly
verifyEnvInjection
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.injection_fat/test-applications/EJB3INJSABean.jar/src/com/ibm/ws/ejbcontainer/injection/ann/ejb/CompSFEnvInjectObjMthdBean.java", "license": "epl-1.0", "size": 32567 }
[ "javax.naming.Context", "javax.naming.InitialContext", "javax.naming.NameNotFoundException", "org.junit.Assert" ]
import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NameNotFoundException; import org.junit.Assert;
import javax.naming.*; import org.junit.*;
[ "javax.naming", "org.junit" ]
javax.naming; org.junit;
1,959,169
public byte[] convertLetterOfCreditReviewToCSV(ContractsGrantsLetterOfCreditReviewDocument contractsGrantsLOCReviewDocument);
byte[] function(ContractsGrantsLetterOfCreditReviewDocument contractsGrantsLOCReviewDocument);
/** * This method is used to generate CSV file for Contracts & Grants LOC review document. * * @param contractsGrantsLOCReviewDocument * @return Byte array is returned so a file is not created on the server. */
This method is used to generate CSV file for Contracts & Grants LOC review document
convertLetterOfCreditReviewToCSV
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/report/service/ContractsGrantsInvoiceReportService.java", "license": "agpl-3.0", "size": 4091 }
[ "org.kuali.kfs.module.ar.document.ContractsGrantsLetterOfCreditReviewDocument" ]
import org.kuali.kfs.module.ar.document.ContractsGrantsLetterOfCreditReviewDocument;
import org.kuali.kfs.module.ar.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
589,959
@ServiceMethod(returns = ReturnType.SINGLE) void regenerateAuthToken(String resourceGroupName, String accountName, NotebookWorkspaceName notebookWorkspaceName);
@ServiceMethod(returns = ReturnType.SINGLE) void regenerateAuthToken(String resourceGroupName, String accountName, NotebookWorkspaceName notebookWorkspaceName);
/** * Regenerates the auth token for the notebook workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param notebookWorkspaceName The name of the notebook workspace resource. * @throw...
Regenerates the auth token for the notebook workspace
regenerateAuthToken
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/NotebookWorkspacesClient.java", "license": "mit", "size": 36953 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.cosmos.models.NotebookWorkspaceName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.cosmos.models.NotebookWorkspaceName;
import com.azure.core.annotation.*; import com.azure.resourcemanager.cosmos.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,200,439
public static ContextDefinition to(ContextBo bo) { if (bo == null) { return null; } return ContextDefinition.Builder.create(bo).build(); }
static ContextDefinition function(ContextBo bo) { if (bo == null) { return null; } return ContextDefinition.Builder.create(bo).build(); }
/** * Converts a mutable bo to it's immutable counterpart * * @param bo the mutable business object * @return the immutable object */
Converts a mutable bo to it's immutable counterpart
to
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/krms/impl/src/main/java/org/kuali/rice/krms/impl/repository/ContextBo.java", "license": "apache-2.0", "size": 8188 }
[ "org.kuali.rice.krms.api.repository.context.ContextDefinition" ]
import org.kuali.rice.krms.api.repository.context.ContextDefinition;
import org.kuali.rice.krms.api.repository.context.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,186,448
public void readFrameBufferWithFormat(FrameBuffer fb, ByteBuffer byteBuf, Image.Format format);
void function(FrameBuffer fb, ByteBuffer byteBuf, Image.Format format);
/** * Reads the pixels currently stored in the specified framebuffer * into the given ByteBuffer object. * Only color pixels are transferred, witht hte given format. * The given byte buffer should have at least * fb.getWidth() * fb.getHeight() * 4 bytes remaining. * * @param fb The...
Reads the pixels currently stored in the specified framebuffer into the given ByteBuffer object. Only color pixels are transferred, witht hte given format. The given byte buffer should have at least fb.getWidth() * fb.getHeight() * 4 bytes remaining
readFrameBufferWithFormat
{ "repo_name": "phr00t/jmonkeyengine", "path": "jme3-core/src/main/java/com/jme3/renderer/Renderer.java", "license": "bsd-3-clause", "size": 14223 }
[ "com.jme3.texture.FrameBuffer", "com.jme3.texture.Image", "java.nio.ByteBuffer" ]
import com.jme3.texture.FrameBuffer; import com.jme3.texture.Image; import java.nio.ByteBuffer;
import com.jme3.texture.*; import java.nio.*;
[ "com.jme3.texture", "java.nio" ]
com.jme3.texture; java.nio;
216,426
SetupWizard getWizard();
SetupWizard getWizard();
/** * returns the setup wizard * * @return setup wizard */
returns the setup wizard
getWizard
{ "repo_name": "madoar/POL-POM-5", "path": "phoenicis-engines/src/main/java/org/phoenicis/engines/Engine.java", "license": "lgpl-3.0", "size": 3134 }
[ "org.phoenicis.scripts.wizard.SetupWizard" ]
import org.phoenicis.scripts.wizard.SetupWizard;
import org.phoenicis.scripts.wizard.*;
[ "org.phoenicis.scripts" ]
org.phoenicis.scripts;
881,386
@Override public boolean authenticate(final String username, final String password) { //importDemoData(); Subject currentUser = SecurityUtils.getSubject(); UsernamePasswordToken token = new UsernamePasswordToken(username, password); try { currentUser.login(token); // if we come this fa...
boolean function(final String username, final String password) { Subject currentUser = SecurityUtils.getSubject(); UsernamePasswordToken token = new UsernamePasswordToken(username, password); try { currentUser.login(token); DataContainer dc = new DataContainer(); SubjectDataTable dt = new SubjectDataTable(dc); SubjectD...
/** * Authenticates this session using the given username and password * * @param username * The username * @param password * The password * @return True if the user was authenticated successfully */
Authenticates this session using the given username and password
authenticate
{ "repo_name": "swordlordcodingcrew/gozer", "path": "src/main/java/com/swordlord/gozer/session/SecuredWebSession.java", "license": "agpl-3.0", "size": 9122 }
[ "com.swordlord.jalapeno.datacontainer.DataContainer", "java.text.MessageFormat", "java.util.Date", "org.apache.shiro.SecurityUtils", "org.apache.shiro.authc.AuthenticationException", "org.apache.shiro.authc.IncorrectCredentialsException", "org.apache.shiro.authc.UnknownAccountException", "org.apache.s...
import com.swordlord.jalapeno.datacontainer.DataContainer; import java.text.MessageFormat; import java.util.Date; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.UnknownAccountExcepti...
import com.swordlord.jalapeno.datacontainer.*; import java.text.*; import java.util.*; import org.apache.shiro.*; import org.apache.shiro.authc.*; import org.apache.shiro.subject.*;
[ "com.swordlord.jalapeno", "java.text", "java.util", "org.apache.shiro" ]
com.swordlord.jalapeno; java.text; java.util; org.apache.shiro;
1,113,213
public boolean isFieldTypeLong(Field field);
boolean function(Field field);
/** * Use to determine if if the field value is a Long value withing the contentlet object * @param field * @return */
Use to determine if if the field value is a Long value withing the contentlet object
isFieldTypeLong
{ "repo_name": "jtesser/core-2.x", "path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPreHook.java", "license": "gpl-3.0", "size": 46259 }
[ "com.dotmarketing.portlets.structure.model.Field" ]
import com.dotmarketing.portlets.structure.model.Field;
import com.dotmarketing.portlets.structure.model.*;
[ "com.dotmarketing.portlets" ]
com.dotmarketing.portlets;
2,427,080
void verifyImportProcessGroup(VersionControlInformationDTO versionControlInfo, final VersionedProcessGroup versionedProcessGroup, String groupId);
void verifyImportProcessGroup(VersionControlInformationDTO versionControlInfo, final VersionedProcessGroup versionedProcessGroup, String groupId);
/** * Verifies that the flow identified by the given Version Control Information can be imported into the Process Group * with the given id * * @param versionControlInfo the information about the versioned flow * @param versionedProcessGroup the contents to be imported * @param groupId the...
Verifies that the flow identified by the given Version Control Information can be imported into the Process Group with the given id
verifyImportProcessGroup
{ "repo_name": "InspurUSA/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 75521 }
[ "org.apache.nifi.registry.flow.VersionedProcessGroup", "org.apache.nifi.web.api.dto.VersionControlInformationDTO" ]
import org.apache.nifi.registry.flow.VersionedProcessGroup; import org.apache.nifi.web.api.dto.VersionControlInformationDTO;
import org.apache.nifi.registry.flow.*; import org.apache.nifi.web.api.dto.*;
[ "org.apache.nifi" ]
org.apache.nifi;
1,815,771
private JSDocInfo.Marker assertDocumentationInMarker(JSDocInfo.Marker marker, String description, int startCharno, int endLineno, ...
JSDocInfo.Marker function(JSDocInfo.Marker marker, String description, int startCharno, int endLineno, int endCharno) { assertTrue(marker.getDescription() != null); assertEquals(description, marker.getDescription().getItem()); assertEquals(marker.getAnnotation().getStartLine(), marker.getDescription().getStartLine()); ...
/** * Asserts that a documentation field exists on the given marker. * * @param description The text of the documentation field expected. * @param startCharno The starting character of the text. * @param endLineno The ending line of the text. * @param endCharno The ending character of the text. * @...
Asserts that a documentation field exists on the given marker
assertDocumentationInMarker
{ "repo_name": "nicupavel/google-closure-compiler", "path": "test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java", "license": "apache-2.0", "size": 105264 }
[ "com.google.javascript.rhino.JSDocInfo" ]
import com.google.javascript.rhino.JSDocInfo;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,551,342
private static String mapToCurrentInstance(TruncateBoundary trunc, int yr, int month, int day, int hr, int min) { Calendar nominalInstanceCal = CoordELFunctions.getEffectiveNominalTime(); if (nominalInstanceCal == null) { XLog.getLog(OozieELExtensions.class).warn( "If...
static String function(TruncateBoundary trunc, int yr, int month, int day, int hr, int min) { Calendar nominalInstanceCal = CoordELFunctions.getEffectiveNominalTime(); if (nominalInstanceCal == null) { XLog.getLog(OozieELExtensions.class).warn( STR + STR + STR + STR); return STRSTRSTR(STR)"; } }
/** * Maps the dataset time to coord:current(n) with respect to action's * nominal time dataset time = truncate(nominal time) + yr + day + month + * hr + min. * * @param trunc * : Truncate resolution * @param yr * : Year to add (can be -ve) * @param mon...
Maps the dataset time to coord:current(n) with respect to action's nominal time dataset time = truncate(nominal time) + yr + day + month + hr + min
mapToCurrentInstance
{ "repo_name": "InMobi/falcon", "path": "oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java", "license": "apache-2.0", "size": 20220 }
[ "java.util.Calendar", "org.apache.oozie.coord.CoordELFunctions", "org.apache.oozie.util.XLog" ]
import java.util.Calendar; import org.apache.oozie.coord.CoordELFunctions; import org.apache.oozie.util.XLog;
import java.util.*; import org.apache.oozie.coord.*; import org.apache.oozie.util.*;
[ "java.util", "org.apache.oozie" ]
java.util; org.apache.oozie;
1,867,947
public Collection getVoices() { return m_voices; }
Collection function() { return m_voices; }
/** * Returns a Collection of {@link Voice}. */
Returns a Collection of <code>Voice</code>
getVoices
{ "repo_name": "Sciss/abc4j", "path": "abc/src/main/java/abc/notation/Music.java", "license": "lgpl-3.0", "size": 12130 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,017,406
public static int process(final String[] args, final InputStream in, final PrintStream out, final PrintStream err) { // parse args Options options = new Options(); options.addOption("h", "help", false, ...
static int function(final String[] args, final InputStream in, final PrintStream out, final PrintStream err) { Options options = new Options(); options.addOption("h", "help", false, STR); options.addOption(OptionBuilder.withLongOpt(STR) .withDescription(STR) .create()); options.addOption("v", STR, false, STR); options....
/** * process request based on incoming arguments. * @param args command line arguments * @param in where to read input from * @param out where to send output to * @param err where to send logging and errors * @return exit code indicating result of processing */
process request based on incoming arguments
process
{ "repo_name": "bjpop/biotool", "path": "java/biotool/src/main/java/org/supernifty/biotool/App.java", "license": "mit", "size": 6540 }
[ "java.io.InputStream", "java.io.PrintStream", "org.apache.commons.cli.CommandLine", "org.apache.commons.cli.CommandLineParser", "org.apache.commons.cli.DefaultParser", "org.apache.commons.cli.OptionBuilder", "org.apache.commons.cli.Options", "org.apache.commons.cli.ParseException" ]
import java.io.InputStream; import java.io.PrintStream; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseExceptio...
import java.io.*; import org.apache.commons.cli.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
787,997
public void addColumn(byte[] columnFamily) { this.addColumn(columnFamily, Constants.EMPTY_COLUMN_QUALIFIER); }
void function(byte[] columnFamily) { this.addColumn(columnFamily, Constants.EMPTY_COLUMN_QUALIFIER); }
/** * Get all the column qualifiers under the specified column family * @param columnFamily */
Get all the column qualifiers under the specified column family
addColumn
{ "repo_name": "booz-allen-hamilton/culvert", "path": "culvert-main/src/main/java/com/bah/culvert/transactions/Get.java", "license": "apache-2.0", "size": 4594 }
[ "com.bah.culvert.util.Constants" ]
import com.bah.culvert.util.Constants;
import com.bah.culvert.util.*;
[ "com.bah.culvert" ]
com.bah.culvert;
1,422,751
public PostReplyBuilder postReplyBuilder() { return database.newPostReplyBuilder(); } /** * {@inheritDoc}
PostReplyBuilder function() { return database.newPostReplyBuilder(); } /** * {@inheritDoc}
/** * Returns a post reply builder. * * @return A new post reply builder */
Returns a post reply builder
postReplyBuilder
{ "repo_name": "ArneBab/Sone", "path": "src/main/java/net/pterodactylus/sone/core/Core.java", "license": "gpl-3.0", "size": 56664 }
[ "net.pterodactylus.sone.database.PostReplyBuilder" ]
import net.pterodactylus.sone.database.PostReplyBuilder;
import net.pterodactylus.sone.database.*;
[ "net.pterodactylus.sone" ]
net.pterodactylus.sone;
1,560,274
IntegerLiteral getVal();
IntegerLiteral getVal();
/** * Returns the value of the '<em><b>Val</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Val</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '...
Returns the value of the 'Val' containment reference. If the meaning of the 'Val' containment reference isn't clear, there really should be more of a description here...
getVal
{ "repo_name": "smaccm/smaccm", "path": "fm-workbench/resolute/com.rockwellcollins.atc.resolute/src-gen/com/rockwellcollins/atc/resolute/resolute/IntExpr.java", "license": "bsd-3-clause", "size": 1463 }
[ "org.osate.aadl2.IntegerLiteral" ]
import org.osate.aadl2.IntegerLiteral;
import org.osate.aadl2.*;
[ "org.osate.aadl2" ]
org.osate.aadl2;
707,362
@Test(expectedExceptions = { LDAPException.class }) public void testConstructor3ValueEmptySequence() throws Exception { Control c = new Control( GetEffectiveRightsRequestControl.GET_EFFECTIVE_RIGHTS_REQUEST_OID, true, new ASN1OctetString(new ASN1Sequence().encode())); new GetEff...
@Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { Control c = new Control( GetEffectiveRightsRequestControl.GET_EFFECTIVE_RIGHTS_REQUEST_OID, true, new ASN1OctetString(new ASN1Sequence().encode())); new GetEffectiveRightsRequestControl(c); }
/** * Tests the third constructor with a generic control whose value is an empty * sequence. * * @throws Exception If an unexpected problem occurs. */
Tests the third constructor with a generic control whose value is an empty sequence
testConstructor3ValueEmptySequence
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/controls/GetEffectiveRightsRequestControlTestCase.java", "license": "gpl-2.0", "size": 10736 }
[ "com.unboundid.asn1.ASN1OctetString", "com.unboundid.asn1.ASN1Sequence", "com.unboundid.ldap.sdk.Control", "com.unboundid.ldap.sdk.LDAPException", "org.testng.annotations.Test" ]
import com.unboundid.asn1.ASN1OctetString; import com.unboundid.asn1.ASN1Sequence; import com.unboundid.ldap.sdk.Control; import com.unboundid.ldap.sdk.LDAPException; import org.testng.annotations.Test;
import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.asn1", "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.asn1; com.unboundid.ldap; org.testng.annotations;
1,978,332
private void processPluginOnObserver(String pluginName, JSONObject object) throws JSONException { int zkId = object.getInt("zkId"); ZooKeeperCluster cluster = null; if (clusters.containsKey(zkId)) { cluster = clusters.get(zkId); } else { logger.error("Wrong zkId! " + zkId); return; } if (!con...
void function(String pluginName, JSONObject object) throws JSONException { int zkId = object.getInt("zkId"); ZooKeeperCluster cluster = null; if (clusters.containsKey(zkId)) { cluster = clusters.get(zkId); } else { logger.error(STR + zkId); return; } if (!contexts.get(pluginName).containsKey(zkId)) { contexts.get(plugi...
/** * Process plugin on the observer client. * @param pluginName * @param object * @throws JSONException */
Process plugin on the observer client
processPluginOnObserver
{ "repo_name": "ZheYuan/Mario", "path": "Wario/src/main/java/com/renren/Wario/WarioMain.java", "license": "apache-2.0", "size": 10761 }
[ "com.renren.Wario", "java.util.Arrays", "org.json.JSONException", "org.json.JSONObject" ]
import com.renren.Wario; import java.util.Arrays; import org.json.JSONException; import org.json.JSONObject;
import com.renren.*; import java.util.*; import org.json.*;
[ "com.renren", "java.util", "org.json" ]
com.renren; java.util; org.json;
284,522
CompletableFuture<Versioned<V>> get(String tableName, K key);
CompletableFuture<Versioned<V>> get(String tableName, K key);
/** * Gets a value from the table. * * @param tableName table name * @param key The key to get. * @return A completable future to be completed with the result once complete. */
Gets a value from the table
get
{ "repo_name": "ravikumaran2015/ravikumaran201504", "path": "core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DatabaseProxy.java", "license": "apache-2.0", "size": 8350 }
[ "java.util.concurrent.CompletableFuture", "org.onosproject.store.service.Versioned" ]
import java.util.concurrent.CompletableFuture; import org.onosproject.store.service.Versioned;
import java.util.concurrent.*; import org.onosproject.store.service.*;
[ "java.util", "org.onosproject.store" ]
java.util; org.onosproject.store;
574,251
public static void generateGnuplotScripts(GAM gam, Instances instances, String dirPath, Terminal outputTerminal) throws IOException { List<Attribute> attributes = instances.getAttributes(); List<int[]> terms = gam.getTerms(); List<Regressor> regressors = gam.getRegressors(); File dir = new File(dirPath);...
static void function(GAM gam, Instances instances, String dirPath, Terminal outputTerminal) throws IOException { List<Attribute> attributes = instances.getAttributes(); List<int[]> terms = gam.getTerms(); List<Regressor> regressors = gam.getRegressors(); File dir = new File(dirPath); if (!dir.exists()) { dir.mkdirs(); ...
/** * Generates a set of Gnuplot scripts for visualizing low dimensional components in a GAM. * * @param gam the GAM model. * @param instances the training set. * @param dirPath the directory path to write to. * @param outputTerminal output plot format (png or pdf). * @throws IOException */
Generates a set of Gnuplot scripts for visualizing low dimensional components in a GAM
generateGnuplotScripts
{ "repo_name": "ardydedase/mltk", "path": "src/mltk/predictor/gam/tool/Visualizer.java", "license": "bsd-3-clause", "size": 10432 }
[ "java.io.File", "java.io.IOException", "java.io.PrintWriter", "java.util.List" ]
import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,370,379
private TaskData doInBackgroundRemoveTemplate(TaskData... params) { Timber.d("doInBackgroundRemoveTemplate"); Object [] args = params[0].getObjArray(); Collection col = (Collection ) args[0]; JSONObject model = (JSONObject) args[1]; JSONObject template = (JSONObject) args[2];...
TaskData function(TaskData... params) { Timber.d(STR); Object [] args = params[0].getObjArray(); Collection col = (Collection ) args[0]; JSONObject model = (JSONObject) args[1]; JSONObject template = (JSONObject) args[2]; try { boolean success = col.getModels().remTemplate(model, template); if (! success) { return new ...
/** * Add a new card template * @param params * @return */
Add a new card template
doInBackgroundRemoveTemplate
{ "repo_name": "federvieh/Anki-Android", "path": "AnkiDroid/src/main/java/com/ichi2/async/DeckTask.java", "license": "gpl-3.0", "size": 57340 }
[ "com.ichi2.anki.exception.ConfirmModSchemaException", "com.ichi2.libanki.Collection", "org.json.JSONObject" ]
import com.ichi2.anki.exception.ConfirmModSchemaException; import com.ichi2.libanki.Collection; import org.json.JSONObject;
import com.ichi2.anki.exception.*; import com.ichi2.libanki.*; import org.json.*;
[ "com.ichi2.anki", "com.ichi2.libanki", "org.json" ]
com.ichi2.anki; com.ichi2.libanki; org.json;
1,628,178
@Test public void testScriptTimeout() throws Exception { LOG.info("running testScriptTimeout"); TTClient client = cluster.getTTClient(); Configuration tConf= client.getProxy().getDaemonConf(); int defaultTimeout = tConf.getInt("mapred.healthChecker.script.timeout", 0); tConf.set("mapred.task.tra...
void function() throws Exception { LOG.info(STR); TTClient client = cluster.getTTClient(); Configuration tConf= client.getProxy().getDaemonConf(); int defaultTimeout = tConf.getInt(STR, 0); tConf.set(STR, cluster.getConf().get(STR)); Assert.assertTrue(STR,defaultTimeout != 0); tConf.set(STR, remotePath+File.separator+ ...
/** * In this case the test times out the task tracker will get blacklisted . * @throws Exception in case of test errors */
In this case the test times out the task tracker will get blacklisted
testScriptTimeout
{ "repo_name": "gndpig/hadoop", "path": "src/test/system/java/org/apache/hadoop/mapred/TestHealthScriptTimeout.java", "license": "apache-2.0", "size": 3471 }
[ "java.io.File", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapreduce.test.system.MRCluster", "org.apache.hadoop.mapreduce.test.system.TTClient", "org.junit.Assert" ]
import java.io.File; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.test.system.MRCluster; import org.apache.hadoop.mapreduce.test.system.TTClient; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.test.system.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
1,533,329
public static VoiceMail[] getAllVoiceMails() throws SkypeException { try { String command = "SEARCH VOICEMAILS"; String responseHeader = "VOICEMAILS "; String response = getConnectorInstance().execute(command, responseHeader); String data = response.substring(...
static VoiceMail[] function() throws SkypeException { try { String command = STR; String responseHeader = STR; String response = getConnectorInstance().execute(command, responseHeader); String data = response.substring(responseHeader.length()); String[] ids = Utils.convertToArray(data); VoiceMail[] voiceMails = new Voi...
/** * Gets the all voice mails. * @return The all voice mails * @throws SkypeException If there is a problem with the connection or state at the Skype client. */
Gets the all voice mails
getAllVoiceMails
{ "repo_name": "AManuev/Skype4OSGi", "path": "src/main/java/com/skype/Skype.java", "license": "apache-2.0", "size": 45830 }
[ "com.skype.connector.ConnectorException" ]
import com.skype.connector.ConnectorException;
import com.skype.connector.*;
[ "com.skype.connector" ]
com.skype.connector;
1,552,465
public boolean connect() { if (mService != null) Log.e(TAG, "Already connected."); Intent intent = new Intent(GSA_SERVICE).setPackage(GSAState.SEARCH_INTENT_PACKAGE); return mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE); }
boolean function() { if (mService != null) Log.e(TAG, STR); Intent intent = new Intent(GSA_SERVICE).setPackage(GSAState.SEARCH_INTENT_PACKAGE); return mContext.bindService(intent, mConnection, Context.BIND_AUTO_CREATE); }
/** * Establishes a connection to the service. Call this method once the callback passed here is * ready to handle calls. * If you pass in an GSA context, it will be sent up the service as soon as the connection is * established. * @return Whether or not the connection to the service was establ...
Establishes a connection to the service. Call this method once the callback passed here is ready to handle calls. If you pass in an GSA context, it will be sent up the service as soon as the connection is established
connect
{ "repo_name": "SaschaMester/delicium", "path": "chrome/android/java/src/org/chromium/chrome/browser/gsa/GSAServiceClient.java", "license": "bsd-3-clause", "size": 5092 }
[ "android.content.Context", "android.content.Intent", "android.util.Log" ]
import android.content.Context; import android.content.Intent; import android.util.Log;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
2,687,564
public static ParquetTableMetadata_v3 getParquetTableMetadata(FileSystem fs, List<FileStatus> fileStatuses, ParquetFormatConfig formatConfig) throws IOException { Metadata metadata = new Metadata(fs, formatConfig); return metadata.getParquetTableMetadata(fileStatuses); }
static ParquetTableMetadata_v3 function(FileSystem fs, List<FileStatus> fileStatuses, ParquetFormatConfig formatConfig) throws IOException { Metadata metadata = new Metadata(fs, formatConfig); return metadata.getParquetTableMetadata(fileStatuses); }
/** * Get the parquet metadata for a list of parquet files * * @param fs * @param fileStatuses * @return * @throws IOException */
Get the parquet metadata for a list of parquet files
getParquetTableMetadata
{ "repo_name": "shakamunyi/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java", "license": "apache-2.0", "size": 71648 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,816,821
public void get(int index, NullableTimeStampMicroHolder holder) { if (isSet(index) == 0) { holder.isSet = 0; return; } holder.isSet = 1; holder.value = valueBuffer.getLong(index * TYPE_WIDTH); }
void function(int index, NullableTimeStampMicroHolder holder) { if (isSet(index) == 0) { holder.isSet = 0; return; } holder.isSet = 1; holder.value = valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Get the element at the given index from the vector and * sets the state in holder. If element at given index * is null, holder.isSet will be zero. * * @param index position of element */
Get the element at the given index from the vector and sets the state in holder. If element at given index is null, holder.isSet will be zero
get
{ "repo_name": "renesugar/arrow", "path": "java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroVector.java", "license": "apache-2.0", "size": 8069 }
[ "org.apache.arrow.vector.holders.NullableTimeStampMicroHolder" ]
import org.apache.arrow.vector.holders.NullableTimeStampMicroHolder;
import org.apache.arrow.vector.holders.*;
[ "org.apache.arrow" ]
org.apache.arrow;
814,865
@Test public void testGetBooksHttpContent() throws Exception { HttpGet httpGet = new HttpGet("http://localhost:9080" + ContainerConstants.EXAM_CONTEXT_ROOT + "/books.html"); try (CloseableHttpClient httpclient = HttpClients.createDefault(); CloseableHttpResponse response = httpclie...
void function() throws Exception { HttpGet httpGet = new HttpGet(STRStatus code must be 200 - OKSTRSteinbeck"), is(true)); } }
/** * Gets books.html which contains the list of books in a library. * <p> * The html content is based on the defined books.jsp in the sample web module. */
Gets books.html which contains the list of books in a library. The html content is based on the defined books.jsp in the sample web module
testGetBooksHttpContent
{ "repo_name": "bimargulies/org.ops4j.pax.exam2", "path": "itest/web/src/it/regression-web-spring-userprobe/src/test/java/org/ops4j/pax/exam/regression/web/spring/UserProbeTest.java", "license": "apache-2.0", "size": 3841 }
[ "org.apache.http.client.methods.HttpGet", "org.hamcrest.CoreMatchers" ]
import org.apache.http.client.methods.HttpGet; import org.hamcrest.CoreMatchers;
import org.apache.http.client.methods.*; import org.hamcrest.*;
[ "org.apache.http", "org.hamcrest" ]
org.apache.http; org.hamcrest;
2,467,477
@Override public void initGUI() { try { SwingEngine swingEngine = new SwingEngine(this); swingEngine.setClassLoader(UserLoginFailurePane.class.getClassLoader()); JPanel panel = (JPanel) swingEngine.render(getClass().getResource("/swixml/UserLoginFailurePane.xml")); int failure = ((Integer) getDi...
void function() { try { SwingEngine swingEngine = new SwingEngine(this); swingEngine.setClassLoader(UserLoginFailurePane.class.getClassLoader()); JPanel panel = (JPanel) swingEngine.render(getClass().getResource(STR)); int failure = ((Integer) getDisplay().getProperties().get(STR)).intValue(); String msg; if (failure =...
/** * Initialize the gui. */
Initialize the gui
initGUI
{ "repo_name": "iritgo/iritgo-aktario", "path": "aktario-client/src/main/java/de/iritgo/aktario/client/gui/UserLoginFailurePane.java", "license": "apache-2.0", "size": 4120 }
[ "de.iritgo.aktario.core.Engine", "de.iritgo.aktario.framework.user.action.UserLoginFailureAction", "javax.swing.JPanel", "org.swixml.SwingEngine" ]
import de.iritgo.aktario.core.Engine; import de.iritgo.aktario.framework.user.action.UserLoginFailureAction; import javax.swing.JPanel; import org.swixml.SwingEngine;
import de.iritgo.aktario.core.*; import de.iritgo.aktario.framework.user.action.*; import javax.swing.*; import org.swixml.*;
[ "de.iritgo.aktario", "javax.swing", "org.swixml" ]
de.iritgo.aktario; javax.swing; org.swixml;
2,055,031
public void testAddressingMetadataDisabled() { Map<String, List<Annotation>> map = new HashMap(); ArrayList<Annotation> wsFeatures = new ArrayList<Annotation>(); AddressingAnnot addressingFeature = new AddressingAnnot(); addressingFeature.setEnabled(false); addressingFea...
void function() { Map<String, List<Annotation>> map = new HashMap(); ArrayList<Annotation> wsFeatures = new ArrayList<Annotation>(); AddressingAnnot addressingFeature = new AddressingAnnot(); addressingFeature.setEnabled(false); addressingFeature.setRequired(true); addressingFeature.setResponses(Responses.NON_ANONYMOUS...
/** * Validate correct behavior when addressing is disabled via addressing-related metadata specified in a sparse composite, such as * would be used to represent configuration via a Deployment Descriptor. */
Validate correct behavior when addressing is disabled via addressing-related metadata specified in a sparse composite, such as would be used to represent configuration via a Deployment Descriptor
testAddressingMetadataDisabled
{ "repo_name": "arunasujith/wso2-axis2", "path": "modules/jaxws/test/org/apache/axis2/jaxws/client/proxy/ProxyAddressingMetadataTest.java", "license": "apache-2.0", "size": 8503 }
[ "java.lang.annotation.Annotation", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "javax.jws.WebService", "javax.xml.namespace.QName", "javax.xml.ws.Service", "javax.xml.ws.soap.AddressingFeature", "org.apache.axis2.addressing.AddressingConstants", "org.apache.axi...
import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.jws.WebService; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.soap.AddressingFeature; import org.apache.axis2.addressing.Addressing...
import java.lang.annotation.*; import java.util.*; import javax.jws.*; import javax.xml.namespace.*; import javax.xml.ws.*; import javax.xml.ws.soap.*; import org.apache.axis2.addressing.*; import org.apache.axis2.jaxws.description.builder.*; import org.apache.axis2.jaxws.spi.*;
[ "java.lang", "java.util", "javax.jws", "javax.xml", "org.apache.axis2" ]
java.lang; java.util; javax.jws; javax.xml; org.apache.axis2;
468,404
@XmlElementRef public DefaultCitation getElement() { return DefaultCitation.castOrCopy(metadata); }
DefaultCitation function() { return DefaultCitation.castOrCopy(metadata); }
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <gmd:CI_Citation>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return The metadata to be marshalled. */
Invoked by JAXB at marshalling time for getting the actual metadata to write inside the XML element. This is the value or a copy of the value given in argument to the wrap method
getElement
{ "repo_name": "desruisseaux/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Citation.java", "license": "apache-2.0", "size": 3137 }
[ "org.apache.sis.metadata.iso.citation.DefaultCitation" ]
import org.apache.sis.metadata.iso.citation.DefaultCitation;
import org.apache.sis.metadata.iso.citation.*;
[ "org.apache.sis" ]
org.apache.sis;
1,339,525
public synchronized void clear(Handler handler, Runnable onCompletionAction) { removeMediaSourceRange(0, getSize(), handler, onCompletionAction); }
synchronized void function(Handler handler, Runnable onCompletionAction) { removeMediaSourceRange(0, getSize(), handler, onCompletionAction); }
/** * Clears the playlist and executes a custom action on completion. * * @param handler The {@link Handler} to run {@code onCompletionAction}. * @param onCompletionAction A {@link Runnable} which is executed immediately after the playlist * has been cleared. */
Clears the playlist and executes a custom action on completion
clear
{ "repo_name": "androidx/media", "path": "libraries/exoplayer/src/main/java/androidx/media3/exoplayer/source/ConcatenatingMediaSource.java", "license": "apache-2.0", "size": 42634 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
1,064,179
public void init(S subject, String key, ObjectNode node, ObjectMapper mapper, ConfigApplyDelegate delegate) { this.subject = checkNotNull(subject); this.key = key; this.node = checkNotNull(node); this.mapper = checkNotNull(mapper); this.delegate = checkNo...
void function(S subject, String key, ObjectNode node, ObjectMapper mapper, ConfigApplyDelegate delegate) { this.subject = checkNotNull(subject); this.key = key; this.node = checkNotNull(node); this.mapper = checkNotNull(mapper); this.delegate = checkNotNull(delegate); }
/** * Initializes the configuration behaviour with necessary context. * * @param subject configuration subject * @param key configuration key * @param node JSON object node where configuration data is stored * @param mapper JSON object mapper * @param delegate delegate con...
Initializes the configuration behaviour with necessary context
init
{ "repo_name": "rvhub/onos", "path": "core/api/src/main/java/org/onosproject/net/config/Config.java", "license": "apache-2.0", "size": 9237 }
[ "com.fasterxml.jackson.databind.ObjectMapper", "com.fasterxml.jackson.databind.node.ObjectNode", "com.google.common.base.Preconditions" ]
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.base.Preconditions;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import com.google.common.base.*;
[ "com.fasterxml.jackson", "com.google.common" ]
com.fasterxml.jackson; com.google.common;
741,486
public static void save(String filename, double[] samples) { // assumes 44,100 samples per second // use 16-bit audio, mono, signed PCM, little Endian AudioFormat format = new AudioFormat(SAMPLE_RATE, 16, 1, true, false); byte[] data = new byte[2 * samples.length]; for...
static void function(String filename, double[] samples) { AudioFormat format = new AudioFormat(SAMPLE_RATE, 16, 1, true, false); byte[] data = new byte[2 * samples.length]; for (int i = 0; i < samples.length; i++) { int temp = (short) (samples[i] * MAX_16_BIT); data[2*i + 0] = (byte) temp; data[2*i + 1] = (byte) (temp ...
/** * Saves the double array as an audio file (using .wav or .au format). * * @param filename the name of the audio file * @param samples the array of samples */
Saves the double array as an audio file (using .wav or .au format)
save
{ "repo_name": "SATL/AlgorithmsJava", "path": "src/fundamentals/programming_model/StdAudio.java", "license": "apache-2.0", "size": 11451 }
[ "java.io.ByteArrayInputStream", "java.io.File", "java.io.IOException", "javax.sound.sampled.AudioFileFormat", "javax.sound.sampled.AudioFormat", "javax.sound.sampled.AudioInputStream", "javax.sound.sampled.AudioSystem" ]
import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem;
import java.io.*; import javax.sound.sampled.*;
[ "java.io", "javax.sound" ]
java.io; javax.sound;
1,935,271
public void processIncludes(VFile currentDir) { List<PartialUISuite> partialSuites = findIncludes(currentDir); if(includes != null) includes.clear(); partialSuites.forEach(this::importEnums); partialSuites.forEach(this::importResources); partialSuites.forEach(this::impor...
void function(VFile currentDir) { List<PartialUISuite> partialSuites = findIncludes(currentDir); if(includes != null) includes.clear(); partialSuites.forEach(this::importEnums); partialSuites.forEach(this::importResources); partialSuites.forEach(this::importFtlIncludes); partialSuites.forEach(this::importFtlMacros); pa...
/** * Proccess the partial UI suites includes for this object. * * @param currentDir The current dir for the includes. */
Proccess the partial UI suites includes for this object
processIncludes
{ "repo_name": "bridje/bridje-framework", "path": "bridje-web-srcgen/src/main/java/org/bridje/web/srcgen/uisuite/UISuiteBase.java", "license": "apache-2.0", "size": 15472 }
[ "java.util.List", "org.bridje.vfs.VFile" ]
import java.util.List; import org.bridje.vfs.VFile;
import java.util.*; import org.bridje.vfs.*;
[ "java.util", "org.bridje.vfs" ]
java.util; org.bridje.vfs;
189,568
public ActionForward deleteFinancialEntityAttachment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { FinancialEntityForm financialEntityForm = (FinancialEntityForm) form; int selectedLine = getSelectedLine(request); ...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { FinancialEntityForm financialEntityForm = (FinancialEntityForm) form; int selectedLine = getSelectedLine(request); financialEntityForm.getFinancialEntityHelper().removeNewFinancial...
/** * Method called when deleting an attachment from a Financial Entity. * * @param mapping * @param form * @param request * @param response= * @return * @throws Exception */
Method called when deleting an attachment from a Financial Entity
deleteFinancialEntityAttachment
{ "repo_name": "blackcathacker/kc.preclean", "path": "coeus-code/src/main/java/org/kuali/kra/coi/personfinancialentity/FinancialEntityEditNewAction.java", "license": "apache-2.0", "size": 7667 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kra.infrastructure.Constants" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kra.infrastructure.Constants;
import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kra.infrastructure.*;
[ "javax.servlet", "org.apache.struts", "org.kuali.kra" ]
javax.servlet; org.apache.struts; org.kuali.kra;
2,050,548
void shutdown() throws InterruptedException { channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); }
void shutdown() throws InterruptedException { channel.shutdown().awaitTermination(5, TimeUnit.SECONDS); }
/** * Safely terminate the connection to the server. */
Safely terminate the connection to the server
shutdown
{ "repo_name": "graphflow/graphflow", "path": "src/main/java/ca/waterloo/dsg/graphflow/client/cli/GraphflowCli.java", "license": "apache-2.0", "size": 4081 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,788,203
public void sendWorkflowNotification(WorkflowDocument workflowDocument, String annotation, List<AdHocRouteRecipient> adHocRecipients, String notificationLabel) throws WorkflowException;
void function(WorkflowDocument workflowDocument, String annotation, List<AdHocRouteRecipient> adHocRecipients, String notificationLabel) throws WorkflowException;
/** * Sends workflow notification to the list of ad hoc recipients. This method is usually used to * notify users of a note that has been added to a document. The notificationLabel parameter is * used to give the request a custom label in the user's Action List * * @param workflowDocument ...
Sends workflow notification to the list of ad hoc recipients. This method is usually used to notify users of a note that has been added to a document. The notificationLabel parameter is used to give the request a custom label in the user's Action List
sendWorkflowNotification
{ "repo_name": "ua-eas/ua-rice-2.1.9", "path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/workflow/service/WorkflowDocumentService.java", "license": "apache-2.0", "size": 10974 }
[ "java.util.List", "org.kuali.rice.kew.api.WorkflowDocument", "org.kuali.rice.kew.api.exception.WorkflowException", "org.kuali.rice.krad.bo.AdHocRouteRecipient" ]
import java.util.List; import org.kuali.rice.kew.api.WorkflowDocument; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.krad.bo.AdHocRouteRecipient;
import java.util.*; import org.kuali.rice.kew.api.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.krad.bo.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,473,985
@Override public ValuedAction actionSelection(AgentModel am) { Intention i = null; ActiveEmotion fear; ActiveEmotion hope; IPlanningOperator copingAction; _selectedActionEmotion = null; _selectedAction = null; _selectedPlan = null; _options.clear(); //forget old intentions th...
ValuedAction function(AgentModel am) { Intention i = null; ActiveEmotion fear; ActiveEmotion hope; IPlanningOperator copingAction; _selectedActionEmotion = null; _selectedAction = null; _selectedPlan = null; _options.clear(); for(Intention intention : _intentions.values()) { if(intention.isForgotten()) { AgentLogger.Ge...
/** * Deliberative Coping process. Gets the most relevant intention, thinks * about it for one reasoning cycle (planning) and if possible selects an * action for execution. */
Deliberative Coping process. Gets the most relevant intention, thinks about it for one reasoning cycle (planning) and if possible selects an action for execution
actionSelection
{ "repo_name": "nurv/lirec", "path": "AgentMind/branches/FAtiMA-Modular/FAtiMA.DeliberativeComponent/src/FAtiMA/DeliberativeComponent/DeliberativeComponent.java", "license": "gpl-3.0", "size": 49208 }
[ "java.util.ListIterator" ]
import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
722,425
List<T> getDependencies();
List<T> getDependencies();
/** * Returns the list of nodes on which this node * depends. * * @return List of dependency nodes. */
Returns the list of nodes on which this node depends
getDependencies
{ "repo_name": "jarney/snackbot", "path": "src/main/java/org/ensor/algorithms/toposort/INode.java", "license": "mit", "size": 1828 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,610,652
public void run(String[] args) throws BadArgs, Fault, IOException { File testSuite = null; String finder = null; String[] finderArgs = null; File outFile = null; File initialFile = null; for (int i = 0; i < args.length; i++) { if (args[i].equalsIgnoreCase...
void function(String[] args) throws BadArgs, Fault, IOException { File testSuite = null; String finder = null; String[] finderArgs = null; File outFile = null; File initialFile = null; for (int i = 0; i < args.length; i++) { if (args[i].equalsIgnoreCase(STR) && (i + 1 < args.length)) { finder = args[++i]; int j = ++i; ...
/** * Main work method. * Reads all the arguments on the command line, makes sure a valid * testFinder is available, and then calls methods to create the tree of tests * and then write the binary file. * * @param args An array of strings, typically provided via the command line *...
Main work method. Reads all the arguments on the command line, makes sure a valid testFinder is available, and then calls methods to create the tree of tests and then write the binary file
run
{ "repo_name": "Distrotech/icedtea7", "path": "test/jtreg/com/sun/javatest/finder/ShowTests.java", "license": "gpl-2.0", "size": 10755 }
[ "java.io.BufferedOutputStream", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.PrintStream" ]
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
1,401,494
RowMetaInterface getIncomingFields();
RowMetaInterface getIncomingFields();
/** * Get the incoming fields * * @return the incoming fields */
Get the incoming fields
getIncomingFields
{ "repo_name": "akhayrutdinov/big-data-plugin", "path": "src/org/pentaho/hbase/mapping/FieldProducer.java", "license": "apache-2.0", "size": 1301 }
[ "org.pentaho.di.core.row.RowMetaInterface" ]
import org.pentaho.di.core.row.RowMetaInterface;
import org.pentaho.di.core.row.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,269,471
@Override public void hasBeenUnpublished(String connectionIdentifier) { Log.Info(this,"bye "+name); }
void function(String connectionIdentifier) { Log.Info(this,STR+name); }
/** * interface RemotedActor, session time out notification callback * @param connectionIdentifier * */
interface RemotedActor, session time out notification callback
hasBeenUnpublished
{ "repo_name": "RuedigerMoeller/kontraktor", "path": "examples/webapp-spa/misc/servlet/react-intrinsic-minimal-servlet/src/main/java/reactinstrinsic/servlet/ReactServletSession.java", "license": "lgpl-3.0", "size": 797 }
[ "org.nustaq.kontraktor.util.Log" ]
import org.nustaq.kontraktor.util.Log;
import org.nustaq.kontraktor.util.*;
[ "org.nustaq.kontraktor" ]
org.nustaq.kontraktor;
626,599
public static ComponentUI createUI(JComponent c) { if (sharedUI == null) sharedUI = new MetalButtonUI(); return sharedUI; } public MetalButtonUI() { super(); }
static ComponentUI function(JComponent c) { if (sharedUI == null) sharedUI = new MetalButtonUI(); return sharedUI; } public MetalButtonUI() { super(); }
/** * Returns a UI delegate for the specified component. * * @param c the component (should be a subclass of {@link AbstractButton}). * * @return A new instance of <code>MetalButtonUI</code>. */
Returns a UI delegate for the specified component
createUI
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/javax/swing/plaf/metal/MetalButtonUI.java", "license": "gpl-2.0", "size": 8643 }
[ "javax.swing.JComponent", "javax.swing.plaf.ComponentUI" ]
import javax.swing.JComponent; import javax.swing.plaf.ComponentUI;
import javax.swing.*; import javax.swing.plaf.*;
[ "javax.swing" ]
javax.swing;
201,131
if (vertex.property(Schema.VertexProperty.THING_TYPE_LABEL_ID.name()).isPresent()) { return LabelId.of(vertex.value(Schema.VertexProperty.THING_TYPE_LABEL_ID.name())); } return LabelId.invalid(); }
if (vertex.property(Schema.VertexProperty.THING_TYPE_LABEL_ID.name()).isPresent()) { return LabelId.of(vertex.value(Schema.VertexProperty.THING_TYPE_LABEL_ID.name())); } return LabelId.invalid(); }
/** * The Grakn type property on a given Tinkerpop vertex. * If the vertex is a {@link SchemaConcept}, return invalid {@link Label}. * * @param vertex the Tinkerpop vertex * @return the type */
The Grakn type property on a given Tinkerpop vertex. If the vertex is a <code>SchemaConcept</code>, return invalid <code>Label</code>
getVertexTypeId
{ "repo_name": "burukuru/grakn", "path": "grakn-graql/src/main/java/ai/grakn/graql/internal/analytics/Utility.java", "license": "gpl-3.0", "size": 5357 }
[ "ai.grakn.concept.LabelId", "ai.grakn.util.Schema" ]
import ai.grakn.concept.LabelId; import ai.grakn.util.Schema;
import ai.grakn.concept.*; import ai.grakn.util.*;
[ "ai.grakn.concept", "ai.grakn.util" ]
ai.grakn.concept; ai.grakn.util;
46,300
protected boolean needTagInQuery(I queryInstance) { boolean needed = StringUtils.isNotBlank(queryInstance.getTagPrefix()) || !queryInstance.getUserTagIds().isEmpty(); return needed; }
boolean function(I queryInstance) { boolean needed = StringUtils.isNotBlank(queryInstance.getTagPrefix()) !queryInstance.getUserTagIds().isEmpty(); return needed; }
/** * Whether the tag entity is needed in the query. * * @param queryInstance * the current query instance * @return true if the query returns tags or the result is filtered by a tag prefix or a single * tag */
Whether the tag entity is needed in the query
needTagInQuery
{ "repo_name": "Communote/communote-server", "path": "communote/persistence/src/main/java/com/communote/server/core/vo/query/user/AbstractUserQuery.java", "license": "apache-2.0", "size": 23638 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
1,297,600
public boolean getColision(Rectangle colision) { return this.colision.intersects(colision); }
boolean function(Rectangle colision) { return this.colision.intersects(colision); }
/** * Test if square colide with another square * * @param colision rectangle to be tested * @return */
Test if square colide with another square
getColision
{ "repo_name": "aenniw/TetrominGenerator", "path": "src/cz/fi/muni/pv097/CoreComponents/TetroSquare.java", "license": "gpl-2.0", "size": 6571 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,100,489
@Override public StreamObserver<Point> recordRoute(final StreamObserver<RouteSummary> responseObserver) { return new StreamObserver<Point>() { int pointCount; int featureCount; int distance; Point previous; long startTime = System.nanoTime();
StreamObserver<Point> function(final StreamObserver<RouteSummary> responseObserver) { return new StreamObserver<Point>() { int pointCount; int featureCount; int distance; Point previous; long startTime = System.nanoTime();
/** * Gets a stream of points, and responds with statistics about the "trip": number of points, * number of known features visited, total distance traveled, and total time spent. * * @param responseObserver an observer to receive the response summary. * @return an observer to receive the reques...
Gets a stream of points, and responds with statistics about the "trip": number of points, number of known features visited, total distance traveled, and total time spent
recordRoute
{ "repo_name": "jiakuan/grpc-sample", "path": "src/main/java/io/grpc/sample/routeguide/RouteGuideServer.java", "license": "apache-2.0", "size": 11458 }
[ "io.grpc.stub.StreamObserver" ]
import io.grpc.stub.StreamObserver;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
2,156,935
public void dataNodeChildAdded(ArbilNode destination, ArbilNode newNode) { // Nothing to do }
void function(ArbilNode destination, ArbilNode newNode) { }
/** * A new child node has been added to the destination node * * @param destination Node to which a node has been added * @param newNode The newly added node */
A new child node has been added to the destination node
dataNodeChildAdded
{ "repo_name": "TheLanguageArchive/Arbil", "path": "arbil/src/main/java/nl/mpi/arbil/ui/ArbilTableModel.java", "license": "agpl-3.0", "size": 20549 }
[ "nl.mpi.arbil.data.ArbilNode" ]
import nl.mpi.arbil.data.ArbilNode;
import nl.mpi.arbil.data.*;
[ "nl.mpi.arbil" ]
nl.mpi.arbil;
569,136
String url = this.eventsUrl + collection; String eventJSON = event.getEventJSON(); Request request = this.generatePostRequest(url, eventJSON); Response response = null; try { response = client.newCall(request).execute(); } catch (IOException e) { throw ne...
String url = this.eventsUrl + collection; String eventJSON = event.getEventJSON(); Request request = this.generatePostRequest(url, eventJSON); Response response = null; try { response = client.newCall(request).execute(); } catch (IOException e) { throw new ConnectException(e); } if (!response.isSuccessful()) { throw Co...
/** * Pushes a single event to the Connect API synchronously. * @param collection The name of the collection to push to. * @param event The {@link Event} to send. * @throws ConnectException When an error occurs. * Will be {@link InvalidEventException}, {@Link ServerException}...
Pushes a single event to the Connect API synchronously
pushEvent
{ "repo_name": "getconnect/connect-java", "path": "core/src/main/java/io/getconnect/client/ConnectAPI.java", "license": "mit", "size": 10481 }
[ "com.squareup.okhttp.Request", "com.squareup.okhttp.Response", "io.getconnect.client.exceptions.ConnectException", "java.io.IOException" ]
import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import io.getconnect.client.exceptions.ConnectException; import java.io.IOException;
import com.squareup.okhttp.*; import io.getconnect.client.exceptions.*; import java.io.*;
[ "com.squareup.okhttp", "io.getconnect.client", "java.io" ]
com.squareup.okhttp; io.getconnect.client; java.io;
1,885,019
@javax.annotation.Nullable @ApiModelProperty( value = "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.") public Boolean getReadOnly() { return readOnly; }
@javax.annotation.Nullable @ApiModelProperty( value = STR) Boolean function() { return readOnly; }
/** * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. * * @return readOnly */
Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts
getReadOnly
{ "repo_name": "kubernetes-client/java", "path": "client-java-contrib/prometheus-operator/src/main/java/com/coreos/monitoring/models/V1ThanosRulerSpecScaleIO.java", "license": "apache-2.0", "size": 10770 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
146,387
protected void removeFeedbackVersionElements(Document doc) throws XPathExpressionException { final String xpath = "/io:openimmo_feedback/io:version"; XmlUtils.xPathElementsProcess(XmlUtils.xPath(xpath, doc, "io"), doc, (element) -> element.getParentNode().removeChild(element)); ...
void function(Document doc) throws XPathExpressionException { final String xpath = STR; XmlUtils.xPathElementsProcess(XmlUtils.xPath(xpath, doc, "io"), doc, (element) -> element.getParentNode().removeChild(element)); }
/** * Remove &lt;version&gt; elements in feedback XML. * <p> * OpenImmo 1.2.3 does not support &lt;version&gt; elements in feedback XML. * * @param doc OpenImmo document in version 1.2.4 * @throws XPathExpressionException if xpath evaluation failed */
Remove &lt;version&gt; elements in feedback XML. OpenImmo 1.2.3 does not support &lt;version&gt; elements in feedback XML
removeFeedbackVersionElements
{ "repo_name": "OpenEstate/OpenEstate-IO", "path": "OpenImmo/src/main/java/org/openestate/io/openimmo/converters/OpenImmo_1_2_4.java", "license": "apache-2.0", "size": 22636 }
[ "javax.xml.xpath.XPathExpressionException", "org.openestate.io.core.XmlUtils", "org.w3c.dom.Document" ]
import javax.xml.xpath.XPathExpressionException; import org.openestate.io.core.XmlUtils; import org.w3c.dom.Document;
import javax.xml.xpath.*; import org.openestate.io.core.*; import org.w3c.dom.*;
[ "javax.xml", "org.openestate.io", "org.w3c.dom" ]
javax.xml; org.openestate.io; org.w3c.dom;
2,421,641
boolean restartVpc(long id, boolean cleanUp) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
boolean restartVpc(long id, boolean cleanUp) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
/** * Restarts the VPC. VPC gets shutdown and started as a part of it * * @param id * @param cleanUp * @return * @throws InsufficientCapacityException */
Restarts the VPC. VPC gets shutdown and started as a part of it
restartVpc
{ "repo_name": "MissionCriticalCloud/cosmic", "path": "cosmic-core/api/src/main/java/com/cloud/network/vpc/VpcService.java", "license": "apache-2.0", "size": 8625 }
[ "com.cloud.legacymodel.exceptions.ConcurrentOperationException", "com.cloud.legacymodel.exceptions.InsufficientCapacityException", "com.cloud.legacymodel.exceptions.ResourceUnavailableException" ]
import com.cloud.legacymodel.exceptions.ConcurrentOperationException; import com.cloud.legacymodel.exceptions.InsufficientCapacityException; import com.cloud.legacymodel.exceptions.ResourceUnavailableException;
import com.cloud.legacymodel.exceptions.*;
[ "com.cloud.legacymodel" ]
com.cloud.legacymodel;
2,636,242
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "b...
void function(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, STR, "(" + OBJECT_SIG + ")Z"); il.append(new INVOKESTATIC(index)); }
/** * Translates a reference to an object of internal type <code>type</code>. * * @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo */
Translates a reference to an object of internal type <code>type</code>
translateTo
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java", "license": "mit", "size": 15093 }
[ "com.sun.org.apache.bcel.internal.generic.ConstantPoolGen", "com.sun.org.apache.bcel.internal.generic.InstructionList" ]
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.InstructionList;
import com.sun.org.apache.bcel.internal.generic.*;
[ "com.sun.org" ]
com.sun.org;
2,595,599
public void setSelectedStockHistory(List<HistoricalQuote> selectedStockHistory){ List<HistoricalQuote> oldValue = null; synchronized(this){ oldValue = this.selectedStockHistory; this.selectedStockHistory = selectedStockHistory; } firePropertyChange(SELECTED_STOCK_HISTORY_PROPERTY, oldValue, selected...
void function(List<HistoricalQuote> selectedStockHistory){ List<HistoricalQuote> oldValue = null; synchronized(this){ oldValue = this.selectedStockHistory; this.selectedStockHistory = selectedStockHistory; } firePropertyChange(SELECTED_STOCK_HISTORY_PROPERTY, oldValue, selectedStockHistory); }
/** * Sets the history of the selected and displayed stock. This is a bound * property, and a <tt>PropertyChangeEvent</tt> is fired when it is * changed. * * @param selectedStockHistory the history of the selected and displayed stock. */
Sets the history of the selected and displayed stock. This is a bound property, and a PropertyChangeEvent is fired when it is changed
setSelectedStockHistory
{ "repo_name": "craigmiller160/StockMarket-2.0", "path": "src/main/java/io/craigmiller160/stockmarket/model/StockDisplayModel.java", "license": "apache-2.0", "size": 3585 }
[ "io.craigmiller160.stockmarket.stock.HistoricalQuote", "java.util.List" ]
import io.craigmiller160.stockmarket.stock.HistoricalQuote; import java.util.List;
import io.craigmiller160.stockmarket.stock.*; import java.util.*;
[ "io.craigmiller160.stockmarket", "java.util" ]
io.craigmiller160.stockmarket; java.util;
601,555
@Test public void testGetName() { assertEquals("Termek", products.getName()); }
void function() { assertEquals(STR, products.getName()); }
/** * Test getter of product's name. */
Test getter of product's name
testGetName
{ "repo_name": "firstvan/OrderTaker", "path": "model/src/test/java/hu/firstvan/model/ProductsTest.java", "license": "gpl-3.0", "size": 5768 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,071,469
@Override public ElementGrouping getChild() { return null; }
ElementGrouping function() { return null; }
/** * TODO summary sentence for getChild ... * * @see org.geotools.xml.schema.ComplexType#getChild() */
TODO summary sentence for getChild ..
getChild
{ "repo_name": "geotools/geotools", "path": "modules/library/xml/src/main/java/org/geotools/xml/xsi/XSISimpleTypes.java", "license": "lgpl-2.1", "size": 82167 }
[ "org.geotools.xml.schema.ElementGrouping" ]
import org.geotools.xml.schema.ElementGrouping;
import org.geotools.xml.schema.*;
[ "org.geotools.xml" ]
org.geotools.xml;
220,756
@SuppressWarnings("rawtypes") private void calculateWidthsForGlue(List figures, int availableWidth, int[] widths) { int glueIndex = -1; int totalUsedWidths = 0; for (int i = 0; i < figures.size(); ++i) { IWidgetFigure wf = (IWidgetFigure) figures.get(i); // glueIndex == -1 is used to ensure that, in the...
@SuppressWarnings(STR) void function(List figures, int availableWidth, int[] widths) { int glueIndex = -1; int totalUsedWidths = 0; for (int i = 0; i < figures.size(); ++i) { IWidgetFigure wf = (IWidgetFigure) figures.get(i); if (wf instanceof Glue && glueIndex == -1) { glueIndex = i; } else { int w = wf.getMinWidth();...
/** * Calculate the widths when the widgets contains a Glue. * * @param figures * The List of figures to allocate the widths to * @param availableWidth * The amount of width which is available to the Widgets (in other words the total width minus the * spacings) * @param...
Calculate the widths when the widgets contains a Glue
calculateWidthsForGlue
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/page/ui/com.odcgroup.page.ui/src/main/java/com/odcgroup/page/ui/figure/HorizontalLayout.java", "license": "epl-1.0", "size": 25434 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
621,458
public static java.util.Set extractNursingClinicalNotesSet(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.NursingClinicalNotesListVoCollection voCollection) { return extractNursingClinicalNotesSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.NursingClinicalNotesListVoCollection voCollection) { return extractNursingClinicalNotesSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.nursing.domain.objects.NursingClinicalNotes set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.nursing.domain.objects.NursingClinicalNotes set from the value object collection
extractNursingClinicalNotesSet
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/NursingClinicalNotesListVoAssembler.java", "license": "agpl-3.0", "size": 17972 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,087,482
@Override public void runTest(Test test, TestResult result) { if (test instanceof DeviceTest) { DeviceTest deviceTest = (DeviceTest)test; deviceTest.setDevice(mDevice); deviceTest.setTestAppPath(mTestDataPath); } test.run(result); } /** *...
void function(Test test, TestResult result) { if (test instanceof DeviceTest) { DeviceTest deviceTest = (DeviceTest)test; deviceTest.setDevice(mDevice); deviceTest.setTestAppPath(mTestDataPath); } test.run(result); } /** * {@inheritDoc}
/** * Overrides parent method to pass in device and test app path to included test */
Overrides parent method to pass in device and test app path to included test
runTest
{ "repo_name": "rex-xxx/mt6572_x201", "path": "development/tools/hosttestlib/src/com/android/hosttest/DeviceTestSuite.java", "license": "gpl-2.0", "size": 2207 }
[ "junit.framework.Test", "junit.framework.TestResult" ]
import junit.framework.Test; import junit.framework.TestResult;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
287,335