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
@Nullable public Uri getOpTosUri() { return get(OP_TOS_URI); }
Uri function() { return get(OP_TOS_URI); }
/** * A page articulating the terms of service for the provider. */
A page articulating the terms of service for the provider
getOpTosUri
{ "repo_name": "StudienprojektUniTrier/Client", "path": "library/java/net/openid/appauth/AuthorizationServiceDiscovery.java", "license": "apache-2.0", "size": 21556 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
1,091,604
public EditText getEditText();
EditText function();
/** * Gets the EditText being operated. * * @return */
Gets the EditText being operated
getEditText
{ "repo_name": "chinalwb/are", "path": "ARE/are/src/main/java/com/chinalwb/are/styles/IARE_Style.java", "license": "apache-2.0", "size": 1150 }
[ "android.widget.EditText" ]
import android.widget.EditText;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,552,838
public void setContent(Widget w) { content.clear(); content.add(w); }
void function(Widget w) { content.clear(); content.add(w); }
/** * Sets the content. * * @param w * the new content */
Sets the content
setContent
{ "repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint", "path": "mat/src/mat/client/shared/ContentWithHeadingWidget.java", "license": "apache-2.0", "size": 4219 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
994,873
private CubicMultSol fillUpNExchange(ArrayList<Integer> x, ArrayList<Integer> r) { CubicMultSol current = new CubicMultSol(x,r); boolean done = false; double curObj = current.getObj(); while (!done) { boolean swap = false; // Perform an operation (50/50 swap or shift) if (rnd.nextDouble() < 0.5) { ...
CubicMultSol function(ArrayList<Integer> x, ArrayList<Integer> r) { CubicMultSol current = new CubicMultSol(x,r); boolean done = false; double curObj = current.getObj(); while (!done) { boolean swap = false; if (rnd.nextDouble() < 0.5) { bestImprovingSwap(current); swap = true; } else { tryAdd(current); } if (curObj ==...
/** * Complete bestImprovingSwaps or additions until no more items can be * either swapped or added * * @param x - solution list * @param r - list of items not in the solution * @return solution generated */
Complete bestImprovingSwaps or additions until no more items can be either swapped or added
fillUpNExchange
{ "repo_name": "midkiffj/knapsacks", "path": "src/Constructive/CubicMultFillUp.java", "license": "gpl-3.0", "size": 3696 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,329,984
public MemScanController openScan(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator...
MemScanController function(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier[][] qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator, Activation activation) throws S...
/** * DOCUMENT ME! * * @param conglomId * DOCUMENT ME! * @param hold * DOCUMENT ME! * @param open_mode * DOCUMENT ME! * @param lock_level * DOCUMENT ME! * @param isolation_level * DOCUMENT ME! * @param scanColumnList * DOCU...
DOCUMENT ME
openScan
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/access/GemFireTransaction.java", "license": "apache-2.0", "size": 148971 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.services.io.FormatableBitSet", "com.pivotal.gemfirexd.internal.iapi.sql.Activation", "com.pivotal.gemfirexd.internal.iapi.store.access.Qualifier", "com.pivotal.gemfirexd.internal.iapi.types.DataValueDescripto...
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.services.io.FormatableBitSet; import com.pivotal.gemfirexd.internal.iapi.sql.Activation; import com.pivotal.gemfirexd.internal.iapi.store.access.Qualifier; import com.pivotal.gemfirexd.internal.iapi.types.Data...
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.services.io.*; import com.pivotal.gemfirexd.internal.iapi.sql.*; import com.pivotal.gemfirexd.internal.iapi.store.access.*; import com.pivotal.gemfirexd.internal.iapi.types.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
472,030
public void testIdentityOverrideOn() throws Exception { if (!getPlatformInfo().isIdentityOverrideAllowed()) { // TODO: for testing these platforms, we need deleteRows return; } // Sybase does not like INTEGER auto-increment columns boolea...
void function() throws Exception { if (!getPlatformInfo().isIdentityOverrideAllowed()) { return; } boolean isSybase = SybasePlatform.DATABASENAME.equals(getPlatform().getName()); final String modelXml; if (isSybase) { modelXml = STR+ STR + DatabaseIO.DDLUTILS_NAMESPACE + STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR...
/** * Tests the backup and restore of a table with an identity column and a foreign key to * it when identity override is turned on. */
Tests the backup and restore of a table with an identity column and a foreign key to it when identity override is turned on
testIdentityOverrideOn
{ "repo_name": "jpcb/ddlutils", "path": "src/test/java/org/apache/ddlutils/io/TestMisc.java", "license": "apache-2.0", "size": 59549 }
[ "java.io.Reader", "java.io.StringReader", "java.io.StringWriter", "java.math.BigDecimal", "java.util.List", "org.apache.ddlutils.platform.sybase.SybasePlatform", "org.dom4j.Document", "org.dom4j.Element", "org.dom4j.io.SAXReader", "org.xml.sax.InputSource" ]
import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.math.BigDecimal; import java.util.List; import org.apache.ddlutils.platform.sybase.SybasePlatform; import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.io.SAXReader; import org.xml.sax.InputSource;
import java.io.*; import java.math.*; import java.util.*; import org.apache.ddlutils.platform.sybase.*; import org.dom4j.*; import org.dom4j.io.*; import org.xml.sax.*;
[ "java.io", "java.math", "java.util", "org.apache.ddlutils", "org.dom4j", "org.dom4j.io", "org.xml.sax" ]
java.io; java.math; java.util; org.apache.ddlutils; org.dom4j; org.dom4j.io; org.xml.sax;
2,500,937
public void bind () { Gdx.gl.glBindTexture(glTarget, glHandle); }
void function () { Gdx.gl.glBindTexture(glTarget, glHandle); }
/** Binds this texture. The texture will be bound to the currently active texture unit specified via * {@link GL20#glActiveTexture(int)}. */
Binds this texture. The texture will be bound to the currently active texture unit specified via
bind
{ "repo_name": "czyzby/libgdx", "path": "gdx/src/com/badlogic/gdx/graphics/GLTexture.java", "license": "apache-2.0", "size": 8423 }
[ "com.badlogic.gdx.Gdx" ]
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
2,131,289
public UrlStringBuilder addPath(String element) { Validate.notNull(element, "element cannot be null"); this.path.add(element); return this; }
UrlStringBuilder function(String element) { Validate.notNull(element, STR); this.path.add(element); return this; }
/** * Adds a single element to the path. * * @param element The element to add * @return this */
Adds a single element to the path
addPath
{ "repo_name": "ASU-Capstone/uPortal-Forked", "path": "uportal-war/src/main/java/org/jasig/portal/url/UrlStringBuilder.java", "license": "apache-2.0", "size": 12519 }
[ "org.apache.commons.lang.Validate" ]
import org.apache.commons.lang.Validate;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
2,630,578
public void preHoneycombGetContactInfo(Cursor contactCursor, Uri contactUri) { if (contactCursor.moveToFirst()) { contactName = guardCursorGetString(contactCursor, NAME_INDEX); String emailId = guardCursorGetString(contactCursor, EMAIL_INDEX); emailAddress = getEmailAddress(emailId); conta...
void function(Cursor contactCursor, Uri contactUri) { if (contactCursor.moveToFirst()) { contactName = guardCursorGetString(contactCursor, NAME_INDEX); String emailId = guardCursorGetString(contactCursor, EMAIL_INDEX); emailAddress = getEmailAddress(emailId); contactPictureUri = contactUri.toString(); emailAddressList ...
/** * For versions before Honeycomb, we get all the contact info from the same table. */
For versions before Honeycomb, we get all the contact info from the same table
preHoneycombGetContactInfo
{ "repo_name": "satgod/appinventor", "path": "appinventor/components/src/com/google/appinventor/components/runtime/ContactPicker.java", "license": "mit", "size": 16295 }
[ "android.database.Cursor", "android.net.Uri", "java.util.ArrayList", "java.util.Arrays" ]
import android.database.Cursor; import android.net.Uri; import java.util.ArrayList; import java.util.Arrays;
import android.database.*; import android.net.*; import java.util.*;
[ "android.database", "android.net", "java.util" ]
android.database; android.net; java.util;
694,753
public void testArriveAndDeregister3() { Phaser parent = new Phaser(); Phaser child = new Phaser(parent); assertState(child, 0, 0, 0); assertState(parent, 0, 0, 0); assertEquals(0, child.register()); assertState(child, 0, 1, 1); assertState(parent, 0, 1, 1); ...
void function() { Phaser parent = new Phaser(); Phaser child = new Phaser(parent); assertState(child, 0, 0, 0); assertState(parent, 0, 0, 0); assertEquals(0, child.register()); assertState(child, 0, 1, 1); assertState(parent, 0, 1, 1); assertEquals(0, child.arriveAndDeregister()); assertTerminated(child, 1); assertTerm...
/** * arriveAndDeregister arrives at the barrier on a phaser with a parent and * when a deregistration occurs and causes the phaser to have zero parties * its parent will be deregistered as well */
arriveAndDeregister arrives at the barrier on a phaser with a parent and when a deregistration occurs and causes the phaser to have zero parties its parent will be deregistered as well
testArriveAndDeregister3
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/PhaserTest.java", "license": "apache-2.0", "size": 28802 }
[ "java.util.concurrent.Phaser" ]
import java.util.concurrent.Phaser;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
442,913
ruleRegistry.removeRegistryChangeListener(this); ruleRegistry.addRegistryChangeListener(this); for (Rule item : ruleRegistry.getAll()) { added(item); } }
ruleRegistry.removeRegistryChangeListener(this); ruleRegistry.addRegistryChangeListener(this); for (Rule item : ruleRegistry.getAll()) { added(item); } }
/** * Registers to the {@link RuleRegistry} and enumerates currently existing rules. */
Registers to the <code>RuleRegistry</code> and enumerates currently existing rules
activate
{ "repo_name": "theoweiss/openhab2", "path": "bundles/org.openhab.io.hueemulation/src/main/java/org/openhab/io/hueemulation/internal/rest/Schedules.java", "license": "epl-1.0", "size": 14401 }
[ "org.openhab.core.automation.Rule" ]
import org.openhab.core.automation.Rule;
import org.openhab.core.automation.*;
[ "org.openhab.core" ]
org.openhab.core;
565,364
@NotAuditable WebDavService getWebDavService();
WebDavService getWebDavService();
/** * Get the webdav service / helper bean. * @return the webdav service / helper bean */
Get the webdav service / helper bean
getWebDavService
{ "repo_name": "thumx/community-edition", "path": "projects/repository/source/java/org/alfresco/service/ServiceRegistry.java", "license": "lgpl-3.0", "size": 20716 }
[ "org.alfresco.service.cmr.webdav.WebDavService" ]
import org.alfresco.service.cmr.webdav.WebDavService;
import org.alfresco.service.cmr.webdav.*;
[ "org.alfresco.service" ]
org.alfresco.service;
548,213
private void statusChange(int status) { statusPay = status; switch (status){ case 0: keyboardView.setVisibility(View.VISIBLE); progressBar.setVisibility(View.GONE); payEdit.setVisibility(View.VISIBLE); statusTv.setText(""); ...
void function(int status) { statusPay = status; switch (status){ case 0: keyboardView.setVisibility(View.VISIBLE); progressBar.setVisibility(View.GONE); payEdit.setVisibility(View.VISIBLE); statusTv.setText(""); break; case 1: statusTv.setText(R.string.Wallet_Enter_4_Digits); titleTv.setText(R.string.Set_Set_Payment_Pa...
/** * Modify the View display according to the status * @param status */
Modify the View display according to the status
statusChange
{ "repo_name": "connectim/Android", "path": "app/src/main/java/connect/view/payment/PaymentPwd.java", "license": "mit", "size": 17902 }
[ "android.view.View", "android.view.animation.TranslateAnimation" ]
import android.view.View; import android.view.animation.TranslateAnimation;
import android.view.*; import android.view.animation.*;
[ "android.view" ]
android.view;
1,798,264
public void askSubscribers( Actor sender, String topic, Object message, Callback cb ) { List<ReceiverActor> subscriber = topic2Subscriber.get(topic); if ( subscriber != null ) { List<IPromise> results = subscriber.stream() .filter(subs -> !subs.equals(sender)) ...
void function( Actor sender, String topic, Object message, Callback cb ) { List<ReceiverActor> subscriber = topic2Subscriber.get(topic); if ( subscriber != null ) { List<IPromise> results = subscriber.stream() .filter(subs -> !subs.equals(sender)) .map(subs -> subs.receiveAsk(topic, message)) .collect(Collectors.toList...
/** * send a message to all and stream the result of each receiver back to sender * * @param sender * @param topic * @param message * @param cb */
send a message to all and stream the result of each receiver back to sender
askSubscribers
{ "repo_name": "RuedigerMoeller/kontraktor", "path": "examples/misc/pub-sub/tcp-based/src/main/java/pubsub/point2point/MediatorActor.java", "license": "lgpl-3.0", "size": 3816 }
[ "java.util.List", "java.util.stream.Collectors", "org.nustaq.kontraktor.Actor", "org.nustaq.kontraktor.Callback", "org.nustaq.kontraktor.IPromise", "org.nustaq.kontraktor.util.Log" ]
import java.util.List; import java.util.stream.Collectors; import org.nustaq.kontraktor.Actor; import org.nustaq.kontraktor.Callback; import org.nustaq.kontraktor.IPromise; import org.nustaq.kontraktor.util.Log;
import java.util.*; import java.util.stream.*; import org.nustaq.kontraktor.*; import org.nustaq.kontraktor.util.*;
[ "java.util", "org.nustaq.kontraktor" ]
java.util; org.nustaq.kontraktor;
1,806,348
public int findListData(int index, char[] chunk) { int elementIndex = 0; // if the list exists at all, there always must be at least one element, so // always check the first element. // Find the start and the length of the first element and compare int length = Utils.twoChars2Int(theList.get...
int function(int index, char[] chunk) { int elementIndex = 0; int length = Utils.twoChars2Int(theList.get(index), theList.get(index+1)); int chunkIndex = index+6; if(isChunkEqual(chunkIndex,length-4,chunk)) { return elementIndex; } int nextBlockIndex = getNextElementIndex4First(index); while(nextBlockIndex != 0) { elem...
/** * Find the chunk among all the list elements stored at index and * return the index of the element (>= 0) if found or -1 if not found. * * @param index index of the list in the store * @param chunk the chunk to find * @return the index of the chunk in the list or -1 if not found */
Find the chunk among all the list elements stored at index and return the index of the element (>= 0) if found or -1 if not found
findListData
{ "repo_name": "johann-petrak/gateplugin-StringAnnotation", "path": "src/com/jpetrak/gate/stringannotation/utils/StoreArrayOfCharArrays.java", "license": "lgpl-2.1", "size": 15071 }
[ "com.jpetrak.gate.stringannotation.extendedgazetteer.trie.Utils" ]
import com.jpetrak.gate.stringannotation.extendedgazetteer.trie.Utils;
import com.jpetrak.gate.stringannotation.extendedgazetteer.trie.*;
[ "com.jpetrak.gate" ]
com.jpetrak.gate;
1,275,862
public void setUnsetFields(Map fieldValues) { String text = setUnsetFields(fieldValues, getText()); setText(text); store(); }
void function(Map fieldValues) { String text = setUnsetFields(fieldValues, getText()); setText(text); store(); }
/** * Gives value to xml-fields in the contract text. The xml field is substituted with the text value. * If no value is given in the fieldValues parameter, the xml field is left unchanged. */
Gives value to xml-fields in the contract text. The xml field is substituted with the text value. If no value is given in the fieldValues parameter, the xml field is left unchanged
setUnsetFields
{ "repo_name": "idega/com.idega.block.contract", "path": "src/java/com/idega/block/contract/data/ContractBMPBean.java", "license": "gpl-3.0", "size": 13538 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
366,847
protected String renderCheckbox(FacesContext facesContext, UIComponent uiComponent, String value, boolean disabled, boolean checked, boolean renderId, Integer itemNum) throws IOException { String clientId = uiComponent.getClientId(facesContext); String itemId = (itemNum...
String function(FacesContext facesContext, UIComponent uiComponent, String value, boolean disabled, boolean checked, boolean renderId, Integer itemNum) throws IOException { String clientId = uiComponent.getClientId(facesContext); String itemId = (itemNum == null)? null : clientId + facesContext.getNamingContainerSepara...
/** * Renders the input item * @return the 'id' value of the rendered element */
Renders the input item
renderCheckbox
{ "repo_name": "kulinski/myfaces", "path": "shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java", "license": "apache-2.0", "size": 22129 }
[ "java.io.IOException", "java.util.List", "java.util.Map", "javax.faces.component.UIComponent", "javax.faces.component.UISelectBoolean", "javax.faces.component.behavior.ClientBehavior", "javax.faces.component.behavior.ClientBehaviorHolder", "javax.faces.context.FacesContext", "javax.faces.context.Res...
import java.io.IOException; import java.util.List; import java.util.Map; import javax.faces.component.UIComponent; import javax.faces.component.UISelectBoolean; import javax.faces.component.behavior.ClientBehavior; import javax.faces.component.behavior.ClientBehaviorHolder; import javax.faces.context.FacesContext; impo...
import java.io.*; import java.util.*; import javax.faces.component.*; import javax.faces.component.behavior.*; import javax.faces.context.*;
[ "java.io", "java.util", "javax.faces" ]
java.io; java.util; javax.faces;
174,594
public HashMap<String, String> getTextProperties() { HashMap<String, String> textprops = new HashMap<>(); textprops.putAll( attrs ); if( latin != null ) { textprops.put( "latin_typeface", latin ); } if( ea != null ) { textprops.put( "ea_typeface", ea ); } if( cs != null ) { textprops.pu...
HashMap<String, String> function() { HashMap<String, String> textprops = new HashMap<>(); textprops.putAll( attrs ); if( latin != null ) { textprops.put( STR, latin ); } if( ea != null ) { textprops.put( STR, ea ); } if( cs != null ) { textprops.put( STR, cs ); } return textprops; }
/** * return the text properties for this text run * * @return */
return the text properties for this text run
getTextProperties
{ "repo_name": "Maxels88/openxls", "path": "src/main/java/org/openxls/formats/OOXML/TextRun.java", "license": "gpl-3.0", "size": 14923 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,952,020
private void serveClient(Socket socket) throws IOException, NoSuchAlgorithmException{ OutputStream rout = socket.getOutputStream(); InputStream rin = socket.getInputStream(); Kryo kryo = new Kryo(null); kryo.setAutoReset(true); try (Output kryo_out = new Output(rout);...
void function(Socket socket) throws IOException, NoSuchAlgorithmException{ OutputStream rout = socket.getOutputStream(); InputStream rin = socket.getInputStream(); Kryo kryo = new Kryo(null); kryo.setAutoReset(true); try (Output kryo_out = new Output(rout); Input kryo_in = new Input(rin)) { Vnejsi: while(true){ try { R...
/** * Serves the client connected with "socket" * @param socket * @throws IOException */
Serves the client connected with "socket"
serveClient
{ "repo_name": "filipekt/save-the-world", "path": "src/main/java/cz/filipekt/Server.java", "license": "mit", "size": 53612 }
[ "com.esotericsoftware.kryo.Kryo", "com.esotericsoftware.kryo.io.Input", "com.esotericsoftware.kryo.io.Output", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.net.Socket", "java.security.NoSuchAlgorithmException", "java.util.ArrayList", "java.util.Arrays", "java.util....
import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import jav...
import com.esotericsoftware.kryo.*; import com.esotericsoftware.kryo.io.*; import java.io.*; import java.net.*; import java.security.*; import java.util.*; import java.util.logging.*;
[ "com.esotericsoftware.kryo", "java.io", "java.net", "java.security", "java.util" ]
com.esotericsoftware.kryo; java.io; java.net; java.security; java.util;
1,123,569
// open test file,this file has only one byte data 0xff final File file = new File("src/test/resources/test-data/0xff_file.txt"); // read test data,first data should be 0xFF instead of -1. Will read -1 finally (EOF) try (InputStream in = new LocalFileRandomAccessContent(file, RandomAccessMode.R...
final File file = new File(STR); try (InputStream in = new LocalFileRandomAccessContent(file, RandomAccessMode.READ).getInputStream()) { final int read = in.read(); Assert.assertNotEquals(EOF, read); Assert.assertEquals(0xFF, read); Assert.assertEquals(EOF, in.read()); } }
/** * test LocalFileRandomAccessContent InputStream read one byte 0xff; see VFS-624 **/
test LocalFileRandomAccessContent InputStream read one byte 0xff; see VFS-624
testInputStreamRead0xff
{ "repo_name": "apache/commons-vfs", "path": "commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContentTest.java", "license": "apache-2.0", "size": 1934 }
[ "java.io.File", "java.io.InputStream", "org.apache.commons.vfs2.util.RandomAccessMode", "org.junit.Assert" ]
import java.io.File; import java.io.InputStream; import org.apache.commons.vfs2.util.RandomAccessMode; import org.junit.Assert;
import java.io.*; import org.apache.commons.vfs2.util.*; import org.junit.*;
[ "java.io", "org.apache.commons", "org.junit" ]
java.io; org.apache.commons; org.junit;
729,472
private static synchronized void initKeychainAuthenticatedVault(Context context) throws GeneralSecurityException { if (SharedPreferenceVaultFactory.canUseKeychainAuthentication(context) && SharedPreferenceVaultRegistry.getInstance().getVault(KEYCHAIN_AUTHENTICATED_KEY_INDEX) == null) { SharedPre...
static synchronized void function(Context context) throws GeneralSecurityException { if (SharedPreferenceVaultFactory.canUseKeychainAuthentication(context) && SharedPreferenceVaultRegistry.getInstance().getVault(KEYCHAIN_AUTHENTICATED_KEY_INDEX) == null) { SharedPreferenceVault sharedPreferenceVault = SharedPreferenceV...
/** * Create a vault that requires recent user authentication. */
Create a vault that requires recent user authentication
initKeychainAuthenticatedVault
{ "repo_name": "BottleRocketStudios/Android-Vault", "path": "SampleApplication/app/src/main/java/com/bottlerocketstudios/vaultsampleapplication/vault/VaultLocator.java", "license": "apache-2.0", "size": 8531 }
[ "android.content.Context", "com.bottlerocketstudios.vault.SharedPreferenceVault", "com.bottlerocketstudios.vault.SharedPreferenceVaultFactory", "com.bottlerocketstudios.vault.SharedPreferenceVaultRegistry", "java.security.GeneralSecurityException" ]
import android.content.Context; import com.bottlerocketstudios.vault.SharedPreferenceVault; import com.bottlerocketstudios.vault.SharedPreferenceVaultFactory; import com.bottlerocketstudios.vault.SharedPreferenceVaultRegistry; import java.security.GeneralSecurityException;
import android.content.*; import com.bottlerocketstudios.vault.*; import java.security.*;
[ "android.content", "com.bottlerocketstudios.vault", "java.security" ]
android.content; com.bottlerocketstudios.vault; java.security;
1,995,008
public SSOUser findUserInSession(String sessionId) throws SSOException { try { if (sessionId == null || sessionId.equals("")) { throw new NoSuchSessionException("Session ID is empty!"); } SecurityDomain domain = Lookup.getInstance().lookupSecurityDomain()...
SSOUser function(String sessionId) throws SSOException { try { if (sessionId == null sessionId.equals(STRSession ID is empty!"); } SecurityDomain domain = Lookup.getInstance().lookupSecurityDomain(); SSOIdentityManager im = domain.getIdentityManager(); return im.findUserInSession(sessionId); } catch (NoSuchSessionExcep...
/** * Finds a user associated to the given session. * * @param sessionId * @throws SSOException */
Finds a user associated to the given session
findUserInSession
{ "repo_name": "atricore/josso1", "path": "core/josso-core/src/main/java/org/josso/gateway/SSOGatewayImpl.java", "license": "lgpl-2.1", "size": 23921 }
[ "org.josso.Lookup", "org.josso.SecurityDomain", "org.josso.gateway.identity.SSOUser", "org.josso.gateway.identity.exceptions.SSOIdentityException", "org.josso.gateway.identity.service.SSOIdentityManager", "org.josso.gateway.session.exceptions.NoSuchSessionException" ]
import org.josso.Lookup; import org.josso.SecurityDomain; import org.josso.gateway.identity.SSOUser; import org.josso.gateway.identity.exceptions.SSOIdentityException; import org.josso.gateway.identity.service.SSOIdentityManager; import org.josso.gateway.session.exceptions.NoSuchSessionException;
import org.josso.*; import org.josso.gateway.identity.*; import org.josso.gateway.identity.exceptions.*; import org.josso.gateway.identity.service.*; import org.josso.gateway.session.exceptions.*;
[ "org.josso", "org.josso.gateway" ]
org.josso; org.josso.gateway;
1,795,224
@Test public void run_sagaModuleStopsDispatching_invokeShallNotBeCalled() throws InvocationTargetException, IllegalAccessException { // given doAnswer(invocationOnMock -> { ((ExecutionContext) invocationOnMock.getArguments()[0]).stopDispatchingCurrentMessageToHandlers(); ...
void function() throws InvocationTargetException, IllegalAccessException { doAnswer(invocationOnMock -> { ((ExecutionContext) invocationOnMock.getArguments()[0]).stopDispatchingCurrentMessageToHandlers(); return null; }).when(module).onStart(any()); sut.run(); verify(invoker, never()).invoke(isA(InvocationContext.class...
/** * <pre> * Given => SagaModule stops dispatching * When => saga task is executed * Then => invoke shall not be called * </pre> */
<code> Given => SagaModule stops dispatching When => saga task is executed Then => invoke shall not be called </code>
run_sagaModuleStopsDispatching_invokeShallNotBeCalled
{ "repo_name": "Domo42/saga-lib", "path": "saga-lib/src/test/java/com/codebullets/sagalib/processing/SagaExecutionTaskTest.java", "license": "apache-2.0", "size": 26140 }
[ "com.codebullets.sagalib.ExecutionContext", "com.codebullets.sagalib.processing.invocation.InvocationContext", "java.lang.reflect.InvocationTargetException", "org.mockito.Mockito" ]
import com.codebullets.sagalib.ExecutionContext; import com.codebullets.sagalib.processing.invocation.InvocationContext; import java.lang.reflect.InvocationTargetException; import org.mockito.Mockito;
import com.codebullets.sagalib.*; import com.codebullets.sagalib.processing.invocation.*; import java.lang.reflect.*; import org.mockito.*;
[ "com.codebullets.sagalib", "java.lang", "org.mockito" ]
com.codebullets.sagalib; java.lang; org.mockito;
781,646
public Format createFormat(Class type, Map<String,Format> newFormats) { String className = type.getName(); Format format = newFormats.get(className); if (format != null) { return format; } format = formatMap.get(className); if (format != null) { ...
Format function(Class type, Map<String,Format> newFormats) { String className = type.getName(); Format format = newFormats.get(className); if (format != null) { return format; } format = formatMap.get(className); if (format != null) { return format; } assert !SimpleCatalog.isSimpleType(type) : className; ClassMetadata ...
/** * If the given class format is not already present in the given map and * a format for this class name does not already exist, creates an * uninitialized format, adds it to the map, and also collects related * formats in the map. */
If the given class format is not already present in the given map and a format for this class name does not already exist, creates an uninitialized format, adds it to the map, and also collects related formats in the map
createFormat
{ "repo_name": "racker/omnibus", "path": "source/db-5.0.26.NC/java/src/com/sleepycat/persist/impl/PersistCatalog.java", "license": "apache-2.0", "size": 37547 }
[ "com.sleepycat.persist.model.ClassMetadata", "com.sleepycat.persist.model.EntityMetadata", "java.lang.reflect.Modifier", "java.util.Map" ]
import com.sleepycat.persist.model.ClassMetadata; import com.sleepycat.persist.model.EntityMetadata; import java.lang.reflect.Modifier; import java.util.Map;
import com.sleepycat.persist.model.*; import java.lang.reflect.*; import java.util.*;
[ "com.sleepycat.persist", "java.lang", "java.util" ]
com.sleepycat.persist; java.lang; java.util;
1,062,035
public File getFileForKey(String key) { return new File(mRootDirectory, getFilenameForKey(key)); }
File function(String key) { return new File(mRootDirectory, getFilenameForKey(key)); }
/** * Returns a file object for the given cache key. */
Returns a file object for the given cache key
getFileForKey
{ "repo_name": "Ocypode/ocypode", "path": "volley-rest-client/src/main/java/com/ocypode/volleyrestclient/infrastructure/cache/BufferedDiskBasedCache.java", "license": "apache-2.0", "size": 18119 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
358,330
@Column(name = "removed") @Override public Date getRemoved() { return (Date) get(7); }
@Column(name = STR) Date function() { return (Date) get(7); }
/** * Getter for <code>cattle.service_expose_map.removed</code>. */
Getter for <code>cattle.service_expose_map.removed</code>
getRemoved
{ "repo_name": "vincent99/cattle", "path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/tables/records/ServiceExposeMapRecord.java", "license": "apache-2.0", "size": 21690 }
[ "java.util.Date", "javax.persistence.Column" ]
import java.util.Date; import javax.persistence.Column;
import java.util.*; import javax.persistence.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
2,473,778
public ProductInner beginPutNonRetry400() throws CloudException, IOException { return beginPutNonRetry400WithServiceResponseAsync().toBlocking().single().getBody(); }
ProductInner function() throws CloudException, IOException { return beginPutNonRetry400WithServiceResponseAsync().toBlocking().single().getBody(); }
/** * Long running put request, service returns a 400 to the initial request. * * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the ProductInner object if successful. */
Long running put request, service returns a 400 to the initial request
beginPutNonRetry400
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROSADsInner.java", "license": "mit", "size": 293065 }
[ "com.microsoft.azure.CloudException", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import java.io.IOException;
import com.microsoft.azure.*; import java.io.*;
[ "com.microsoft.azure", "java.io" ]
com.microsoft.azure; java.io;
2,083,022
public void export(Document doc, OutputStream out) throws IOException { export(doc, out, Factory.newFeatureMap()); }
void function(Document doc, OutputStream out) throws IOException { export(doc, out, Factory.newFeatureMap()); }
/** * Equivalent to {@link #export(Document,OutputStream)} with an empty * map of options. */
Equivalent to <code>#export(Document,OutputStream)</code> with an empty map of options
export
{ "repo_name": "masterucm1617/botzzaroni", "path": "BotzzaroniDev/GATE_Developer_8.4/src/main/gate/DocumentExporter.java", "license": "gpl-3.0", "size": 4180 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
230,161
AttestationInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithPolicyAssignmentId, DefinitionStages.WithCreate { } interface DefinitionStages { interface ...
AttestationInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithPolicyAssignmentId, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithResourceGroup { }
/** * Gets the inner com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner object. * * @return the inner object. */
Gets the inner com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner object
innerModel
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/Attestation.java", "license": "mit", "size": 15636 }
[ "com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner" ]
import com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner;
import com.azure.resourcemanager.policyinsights.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,903,357
public static void write(OutputStream output, DynEnum value) { throw new MARSHAL(DynAnyFactoryHelper.not_applicable(id())); }
static void function(OutputStream output, DynEnum value) { throw new MARSHAL(DynAnyFactoryHelper.not_applicable(id())); }
/** * This should read DynEnum from the CDR input stream, but (following the JDK * 1.5 API) it does not. * * @param output a org.omg.CORBA.portable stream to write into. * * @specenote Sun throws the same exception. * * @throws MARSHAL always. */
This should read DynEnum from the CDR input stream, but (following the JDK 1.5 API) it does not
write
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/org/omg/DynamicAny/DynEnumHelper.java", "license": "gpl-2.0", "size": 5181 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
2,486,850
private void twoRegisterOperation() throws AssemblerException { String instruction = currentToken.getValue(); expectedNextToken("two register normal instruction"); String destinationRegister = currentToken.getValue(); ensureTokenEquality("(" + instruction + ") Expected a destination register, found: ...
void function() throws AssemblerException { String instruction = currentToken.getValue(); expectedNextToken(STR); String destinationRegister = currentToken.getValue(); ensureTokenEquality("(" + instruction + STR, PLPTokenType.ADDRESS); expectedNextToken(STR); ensureTokenEquality("(" + instruction + STR + destinationReg...
/** * xxx $rd, $rs * * @throws AssemblerException */
xxx $rd, $rs
twoRegisterOperation
{ "repo_name": "dhawal9035/WebPLP", "path": "src/main/java/edu/asu/plp/tool/backend/plpisa/assembler/DisposablePLPAssembler.java", "license": "apache-2.0", "size": 57769 }
[ "edu.asu.plp.tool.backend.isa.exceptions.AssemblerException" ]
import edu.asu.plp.tool.backend.isa.exceptions.AssemblerException;
import edu.asu.plp.tool.backend.isa.exceptions.*;
[ "edu.asu.plp" ]
edu.asu.plp;
1,198,561
@Deprecated public static void printArray(int[] array, PrintStream out) { for (int i = 0; i < array.length; i++) { out.print(array[i]+", "); } }
static void function(int[] array, PrintStream out) { for (int i = 0; i < array.length; i++) { out.print(array[i]+STR); } }
/** * Prints all array elements in one line. * @deprecated Functionality moved to {@link ArrayUtils} class. * @param array array to print elements of. * @param out printstream to print to. */
Prints all array elements in one line
printArray
{ "repo_name": "Chmiel123/ProjectEuler", "path": "src/chmiel/utils/NumberUtils.java", "license": "unlicense", "size": 8636 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
419,109
protected void addLinkInfoIntoAttributes(String link, long expirationInMinutes, Map<String, Object> attributes) throws EmailException { attributes.put("link", link); attributes.put("linkExpiration", expirationInMinutes); KeycloakUriInfo uriInfo = session.getContext().getUri(); URI ba...
void function(String link, long expirationInMinutes, Map<String, Object> attributes) throws EmailException { attributes.put("link", link); attributes.put(STR, expirationInMinutes); KeycloakUriInfo uriInfo = session.getContext().getUri(); URI baseUri = uriInfo.getBaseUri(); try { Locale locale = session.getContext().res...
/** * Add link info into template attributes. * * @param link to add * @param expirationInMinutes to add * @param attributes to add link info into */
Add link info into template attributes
addLinkInfoIntoAttributes
{ "repo_name": "brat000012001/keycloak", "path": "services/src/main/java/org/keycloak/email/freemarker/FreeMarkerEmailTemplateProvider.java", "license": "apache-2.0", "size": 11625 }
[ "java.io.IOException", "java.util.Locale", "java.util.Map", "org.keycloak.email.EmailException", "org.keycloak.forms.login.freemarker.model.UrlBean", "org.keycloak.models.KeycloakUriInfo", "org.keycloak.theme.beans.LinkExpirationFormatterMethod" ]
import java.io.IOException; import java.util.Locale; import java.util.Map; import org.keycloak.email.EmailException; import org.keycloak.forms.login.freemarker.model.UrlBean; import org.keycloak.models.KeycloakUriInfo; import org.keycloak.theme.beans.LinkExpirationFormatterMethod;
import java.io.*; import java.util.*; import org.keycloak.email.*; import org.keycloak.forms.login.freemarker.model.*; import org.keycloak.models.*; import org.keycloak.theme.beans.*;
[ "java.io", "java.util", "org.keycloak.email", "org.keycloak.forms", "org.keycloak.models", "org.keycloak.theme" ]
java.io; java.util; org.keycloak.email; org.keycloak.forms; org.keycloak.models; org.keycloak.theme;
812,313
@Test public void testDimmerColorAnimationMin() { String message = "PKT:SID=12;PC=9417;MT=10;MGID=60;MID=11;MD=0000000000000000000000000000000000;1c733ace"; SHCMessage shcMessage = new SHCMessage(message, packet); List<Type> values = shcMessage.getData().getOpenHABTypes(); a...
void function() { String message = STR; SHCMessage shcMessage = new SHCMessage(message, packet); List<Type> values = shcMessage.getData().getOpenHABTypes(); assertEquals(STR, 0, ((DecimalType) values.get(0)).intValue()); assertEquals(STR, OnOffType.OFF, (values.get(1))); assertEquals("Time0", 0, ((DecimalType) values.g...
/** * test data is: Dimmer Color Animation: (min) */
test data is: Dimmer Color Animation: (min)
testDimmerColorAnimationMin
{ "repo_name": "sedstef/openhab", "path": "bundles/binding/org.openhab.binding.smarthomatic/src/test/java/org/openhab/binding/smarthomatic/TestSHCMessage.java", "license": "epl-1.0", "size": 24815 }
[ "java.util.List", "org.junit.Assert", "org.openhab.binding.smarthomatic.internal.SHCMessage", "org.openhab.core.library.types.DecimalType", "org.openhab.core.library.types.OnOffType", "org.openhab.core.types.Type" ]
import java.util.List; import org.junit.Assert; import org.openhab.binding.smarthomatic.internal.SHCMessage; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.OnOffType; import org.openhab.core.types.Type;
import java.util.*; import org.junit.*; import org.openhab.binding.smarthomatic.internal.*; import org.openhab.core.library.types.*; import org.openhab.core.types.*;
[ "java.util", "org.junit", "org.openhab.binding", "org.openhab.core" ]
java.util; org.junit; org.openhab.binding; org.openhab.core;
1,819,939
public static void showAndFocus(Context context, View view) { show(context); if (view != null) { view.requestFocus(); } }
static void function(Context context, View view) { show(context); if (view != null) { view.requestFocus(); } }
/** * Shows the keyboard and attempts to set the focus on the given view. * @param context * @param view */
Shows the keyboard and attempts to set the focus on the given view
showAndFocus
{ "repo_name": "Dato0011/btb-sms", "path": "QKSMS/src/main/java/com/bitblocker/messenger/common/utils/KeyboardUtils.java", "license": "gpl-3.0", "size": 1878 }
[ "android.content.Context", "android.view.View" ]
import android.content.Context; import android.view.View;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
504,741
public static void removeDuplicates(TopicMapIF topicmap) throws SQLException { RDBMSTopicMapStore store = (RDBMSTopicMapStore)topicmap.getStore(); // flush local changes store.flush(); // get database connection Connection conn = store.getConnection(); // get string representation of topic ...
static void function(TopicMapIF topicmap) throws SQLException { RDBMSTopicMapStore store = (RDBMSTopicMapStore)topicmap.getStore(); store.flush(); Connection conn = store.getConnection(); long id = store.getLongId(); String sql_dupl_names = STR; PreparedStatement stm_names = conn.prepareStatement(sql_dupl_names); try {...
/** * INTERNAL: Helper function that effectively finds duplicate * characteristics and suppresses them. */
characteristics and suppresses them
removeDuplicates
{ "repo_name": "ontopia/ontopia", "path": "ontopia-engine/src/main/java/net/ontopia/topicmaps/impl/rdbms/Utils.java", "license": "apache-2.0", "size": 11391 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.Collection", "java.util.HashSet", "net.ontopia.topicmaps.core.TMObjectIF", "net.ontopia.topicmaps.core.TopicMapIF", "net.ontopia.topicmaps.utils.DuplicateSuppressionUtils" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.HashSet; import net.ontopia.topicmaps.core.TMObjectIF; import net.ontopia.topicmaps.core.TopicMapIF; import net.ontopia.topicmaps.utils.DuplicateSuppressi...
import java.sql.*; import java.util.*; import net.ontopia.topicmaps.core.*; import net.ontopia.topicmaps.utils.*;
[ "java.sql", "java.util", "net.ontopia.topicmaps" ]
java.sql; java.util; net.ontopia.topicmaps;
1,887,970
public JobStatus getJobStatus(JobID jobid) throws IOException, InterruptedException;
JobStatus function(JobID jobid) throws IOException, InterruptedException;
/** * Grab a handle to a job that is already known to the JobTracker. * @return Status of the job, or null if not found. */
Grab a handle to a job that is already known to the JobTracker
getJobStatus
{ "repo_name": "Reidddddd/mo-hadoop2.6.0", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 14483 }
[ "java.io.IOException", "org.apache.hadoop.mapreduce.JobID", "org.apache.hadoop.mapreduce.JobStatus" ]
import java.io.IOException; import org.apache.hadoop.mapreduce.JobID; import org.apache.hadoop.mapreduce.JobStatus;
import java.io.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,901,005
public Entity updateEntity(Entity toUpdate, Long userId) throws Exception { MockHttpServletRequest request = ServletTestHelperUtils.initRequest( HTTPMODE.PUT, UrlHelpers.ENTITY + "/" + toUpdate.getId(), userId, token(userId), toUpdate); MockHttpServletResponse response = ServletTestHelperUtils ...
Entity function(Entity toUpdate, Long userId) throws Exception { MockHttpServletRequest request = ServletTestHelperUtils.initRequest( HTTPMODE.PUT, UrlHelpers.ENTITY + "/" + toUpdate.getId(), userId, token(userId), toUpdate); MockHttpServletResponse response = ServletTestHelperUtils .dispatchRequest(dispatcherServlet, ...
/** * Update an entity. */
Update an entity
updateEntity
{ "repo_name": "Sage-Bionetworks/Synapse-Repository-Services", "path": "services/repository/src/test/java/org/sagebionetworks/repo/web/controller/EntityServletTestHelper.java", "license": "apache-2.0", "size": 50576 }
[ "org.sagebionetworks.repo.model.Entity", "org.sagebionetworks.repo.web.UrlHelpers", "org.springframework.http.HttpStatus", "org.springframework.mock.web.MockHttpServletRequest", "org.springframework.mock.web.MockHttpServletResponse" ]
import org.sagebionetworks.repo.model.Entity; import org.sagebionetworks.repo.web.UrlHelpers; import org.springframework.http.HttpStatus; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse;
import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.web.*; import org.springframework.http.*; import org.springframework.mock.web.*;
[ "org.sagebionetworks.repo", "org.springframework.http", "org.springframework.mock" ]
org.sagebionetworks.repo; org.springframework.http; org.springframework.mock;
26,753
private Object readResolve() { // Initialize listeners networkListeners = new ArrayList<NetworkListener>(); neuronListeners = new ArrayList<NeuronListener>(); synapseListeners = new ArrayList<SynapseListener>(); textListeners = new ArrayList<TextListener>(); groupLi...
Object function() { networkListeners = new ArrayList<NetworkListener>(); neuronListeners = new ArrayList<NeuronListener>(); synapseListeners = new ArrayList<SynapseListener>(); textListeners = new ArrayList<TextListener>(); groupListeners = new ArrayList<GroupListener>(); for (SpikingNeuron neuron : this.getFlatNeuronL...
/** * Standard method call made to objects after they are deserialized. See: * http://java.sun.com/developer/JDCTechTips/2002/tt0205.html#tip2 * http://xstream.codehaus.org/faq.html * * @return Initialized object. */
Standard method call made to objects after they are deserialized. See: HREF HREF
readResolve
{ "repo_name": "automenta/java_dann", "path": "src/syncleus/dann/neural/spiking/SpikingNeuralNetwork.java", "license": "agpl-3.0", "size": 46623 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
784,159
public List<Device> getDevices() { if (mConfig == null) return new ArrayList<>(); try { return getDevices(mConfig.getJSONArray("Devices")); } catch (JSONException e) { Log.w(TAG, "Failed to read devices", e); return null; } }
List<Device> function() { if (mConfig == null) return new ArrayList<>(); try { return getDevices(mConfig.getJSONArray(STR)); } catch (JSONException e) { Log.w(TAG, STR, e); return null; } }
/** * Returns a list of all existing devices. */
Returns a list of all existing devices
getDevices
{ "repo_name": "0359xiaodong/syncthing-android", "path": "src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java", "license": "mit", "size": 34646 }
[ "android.util.Log", "java.util.ArrayList", "java.util.List", "org.json.JSONException" ]
import android.util.Log; import java.util.ArrayList; import java.util.List; import org.json.JSONException;
import android.util.*; import java.util.*; import org.json.*;
[ "android.util", "java.util", "org.json" ]
android.util; java.util; org.json;
1,211,329
public Rectangle getUpdateRect() { return updateRect; }
Rectangle function() { return updateRect; }
/** * Returns the rectange to be updated for this event. * * @return the rectangle to update */
Returns the rectange to be updated for this event
getUpdateRect
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/awt/event/PaintEvent.java", "license": "gpl-2.0", "size": 4174 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,396,965
private String getDefaultArgument() { CommandLineOptionProcessor processor = Lookup.getDefault().lookup(CommandLineOptionProcessor.class); if(processor != null) { return processor.getDefaultArgument(); } return null; }
String function() { CommandLineOptionProcessor processor = Lookup.getDefault().lookup(CommandLineOptionProcessor.class); if(processor != null) { return processor.getDefaultArgument(); } return null; }
/** * Get the default argument from the CommandLineOptionProcessor. * * @return If set, the default argument otherwise null. */
Get the default argument from the CommandLineOptionProcessor
getDefaultArgument
{ "repo_name": "eugene7646/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/StartupWindowProvider.java", "license": "apache-2.0", "size": 7868 }
[ "org.openide.util.Lookup", "org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor" ]
import org.openide.util.Lookup; import org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor;
import org.openide.util.*; import org.sleuthkit.autopsy.commandlineingest.*;
[ "org.openide.util", "org.sleuthkit.autopsy" ]
org.openide.util; org.sleuthkit.autopsy;
1,578,873
@FIXVersion(introduced = "4.4") public void clearFinancingDetails() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
@FIXVersion(introduced = "4.4") void function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
/** * Sets the FinancingDetails component to null. */
Sets the FinancingDetails component to null
clearFinancingDetails
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/ConfirmationMsg.java", "license": "gpl-3.0", "size": 94557 }
[ "net.hades.fix.message.anno.FIXVersion" ]
import net.hades.fix.message.anno.FIXVersion;
import net.hades.fix.message.anno.*;
[ "net.hades.fix" ]
net.hades.fix;
502,501
public void paintTileLoading(Graphics g) { if (tileLoadingImage == null) { paintLoadingText(g); } else { paintLoadingImage(g); } }
void function(Graphics g) { if (tileLoadingImage == null) { paintLoadingText(g); } else { paintLoadingImage(g); } }
/** * This method paints a "tile loading" on the Graphics if * boolean paint(Graphics g) returned false. * @param g Graphics object to paint on. */
This method paints a "tile loading" on the Graphics if boolean paint(Graphics g) returned false
paintTileLoading
{ "repo_name": "saeder/CodenameOne", "path": "CodenameOne/src/com/codename1/maps/Tile.java", "license": "gpl-2.0", "size": 8000 }
[ "com.codename1.ui.Graphics" ]
import com.codename1.ui.Graphics;
import com.codename1.ui.*;
[ "com.codename1.ui" ]
com.codename1.ui;
354,852
protected CookieManager getCookieManager() { return cookieManager; }
CookieManager function() { return cookieManager; }
/** * Gets the cookie manager. * * @return the cookie manager */
Gets the cookie manager
getCookieManager
{ "repo_name": "profjrr/zaproxy", "path": "src/org/zaproxy/zap/spider/Spider.java", "license": "apache-2.0", "size": 20698 }
[ "java.net.CookieManager" ]
import java.net.CookieManager;
import java.net.*;
[ "java.net" ]
java.net;
431,856
public void setZoomThresholds(float down, float up) { mLevelDownThreshold = clamp(down, 1, 2); mLevelUpThreshold = clamp(up, 1, 2); }
void function(float down, float up) { mLevelDownThreshold = clamp(down, 1, 2); mLevelUpThreshold = clamp(up, 1, 2); }
/** * TESTING: avoid flickering when switching zoom-levels: * 1.85, 1.15 seems to work well */
1.85, 1.15 seems to work well
setZoomThresholds
{ "repo_name": "mapsforge/vtm", "path": "vtm/src/org/oscim/layers/tile/TileManager.java", "license": "lgpl-3.0", "size": 23379 }
[ "org.oscim.utils.FastMath" ]
import org.oscim.utils.FastMath;
import org.oscim.utils.*;
[ "org.oscim.utils" ]
org.oscim.utils;
1,895,366
protected void addFixed(final Boolean fixed, final Vector args) { }
void function(final Boolean fixed, final Vector args) { }
/** * Add fixed parameter. * @param fixed Boolean true if fixed * @param args Vector command line arguments */
Add fixed parameter
addFixed
{ "repo_name": "cniweb/ant-contrib", "path": "cpptasks/src/main/java/net/sf/antcontrib/cpptasks/openwatcom/OpenWatcomLibrarian.java", "license": "apache-2.0", "size": 7381 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,894,684
private static boolean isFillingAction(final Action candidate, final Action action) { return !Collections.disjoint(candidate.getPostConditions().getFilledProperties(), action.getPreConditions().getFilledProperties()); }
static boolean function(final Action candidate, final Action action) { return !Collections.disjoint(candidate.getPostConditions().getFilledProperties(), action.getPreConditions().getFilledProperties()); }
/** * Test if an action fills any property required filled by an action. * * @param candidate a candidate action to test * @param action an action requiring filled properties * * @return true when the candidate fills required properties, false otherwise */
Test if an action fills any property required filled by an action
isFillingAction
{ "repo_name": "ewie/cobalt", "path": "planner/src/main/java/vsr/cobalt/planner/extenders/providers/ComposingExtendedPrecursorActionProvider.java", "license": "bsd-3-clause", "size": 5039 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
893,965
public QueryOutputTreeAttributeMetadata getAttributeMetadata(AttributeInterface attribute) { for (QueryOutputTreeAttributeMetadata attributeMetadata: attributes) { if (attributeMetadata.getAttribute().equals(attribute)) return attributeMetadata; } return null; }
QueryOutputTreeAttributeMetadata function(AttributeInterface attribute) { for (QueryOutputTreeAttributeMetadata attributeMetadata: attributes) { if (attributeMetadata.getAttribute().equals(attribute)) return attributeMetadata; } return null; }
/** * TO get the metadata object for the given attribute. * @param attribute The reference to the attribute, this attribute must be part of this outputTreeDataNode. * @return The reference to the QueryOutputTreeAttributeMetadata. */
TO get the metadata object for the given attribute
getAttributeMetadata
{ "repo_name": "NCIP/wustl-common-package", "path": "src/edu/wustl/common/querysuite/queryobject/impl/OutputTreeDataNode.java", "license": "bsd-3-clause", "size": 5887 }
[ "edu.common.dynamicextensions.domaininterface.AttributeInterface", "edu.wustl.common.querysuite.queryobject.impl.metadata.QueryOutputTreeAttributeMetadata" ]
import edu.common.dynamicextensions.domaininterface.AttributeInterface; import edu.wustl.common.querysuite.queryobject.impl.metadata.QueryOutputTreeAttributeMetadata;
import edu.common.dynamicextensions.domaininterface.*; import edu.wustl.common.querysuite.queryobject.impl.metadata.*;
[ "edu.common.dynamicextensions", "edu.wustl.common" ]
edu.common.dynamicextensions; edu.wustl.common;
401,639
protected boolean runCommand() { // Prepare command line arguments ArrayList<String> args = new ArrayList<String>(); StringBuilder cmdsb = new StringBuilder(); for (String arg : defaultCmdArgs) { args.add(arg); cmdsb.append(" " + arg); } // Execute command cmdExecResult = Exec.exec(args, true); ...
boolean function() { ArrayList<String> args = new ArrayList<String>(); StringBuilder cmdsb = new StringBuilder(); for (String arg : defaultCmdArgs) { args.add(arg); cmdsb.append(" " + arg); } cmdExecResult = Exec.exec(args, true); if (debug) Timer.showStdErr(STR + STR + cmdExecResult.exitValue + STR + cmdExecResult.std...
/** * Run a command to find running processes PIDs * @return true if OK, false on failure */
Run a command to find running processes PIDs
runCommand
{ "repo_name": "leepc12/BigDataScript", "path": "src/org/bds/executioner/CheckTasksRunning.java", "license": "apache-2.0", "size": 10537 }
[ "java.util.ArrayList", "org.bds.osCmd.Exec", "org.bds.util.Timer" ]
import java.util.ArrayList; import org.bds.osCmd.Exec; import org.bds.util.Timer;
import java.util.*; import org.bds.*; import org.bds.util.*;
[ "java.util", "org.bds", "org.bds.util" ]
java.util; org.bds; org.bds.util;
1,056,375
public void setEncryptionPropRefId(String encryptionPropRefId) { this.actionList[this.currentAction].put( WSHandlerConstants.ENC_PROP_REF_ID, encryptionPropRefId); }
void function(String encryptionPropRefId) { this.actionList[this.currentAction].put( WSHandlerConstants.ENC_PROP_REF_ID, encryptionPropRefId); }
/** * Sets the encryption property ref key of the current action. * * @param encryptionPropRefId */
Sets the encryption property ref key of the current action
setEncryptionPropRefId
{ "repo_name": "wso2/wso2-rampart", "path": "modules/rampart-core/src/main/java/org/apache/rampart/handler/config/OutflowConfiguration.java", "license": "apache-2.0", "size": 17383 }
[ "org.apache.ws.security.handler.WSHandlerConstants" ]
import org.apache.ws.security.handler.WSHandlerConstants;
import org.apache.ws.security.handler.*;
[ "org.apache.ws" ]
org.apache.ws;
2,495,480
public com.mozu.api.contracts.customer.CustomerPurchaseOrderAccount getCustomerPurchaseOrderAccount(Integer accountId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerPurchaseOrderAccount> client = com.mozu.api.clients.commerce.customer.accounts.CustomerPurchaseOrderAc...
com.mozu.api.contracts.customer.CustomerPurchaseOrderAccount function(Integer accountId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerPurchaseOrderAccount> client = com.mozu.api.clients.commerce.customer.accounts.CustomerPurchaseOrderAccountClient.getCustomerPurchaseOrder...
/** * accounts-purchaseOrder Get GetCustomerPurchaseOrderAccount description DOCUMENT_HERE * <p><pre><code> * CustomerPurchaseOrderAccount customerpurchaseorderaccount = new CustomerPurchaseOrderAccount(); * CustomerPurchaseOrderAccount customerPurchaseOrderAccount = customerpurchaseorderaccount.getCustomerPur...
accounts-purchaseOrder Get GetCustomerPurchaseOrderAccount description DOCUMENT_HERE <code><code> CustomerPurchaseOrderAccount customerpurchaseorderaccount = new CustomerPurchaseOrderAccount(); CustomerPurchaseOrderAccount customerPurchaseOrderAccount = customerpurchaseorderaccount.getCustomerPurchaseOrderAccount( acco...
getCustomerPurchaseOrderAccount
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/customer/accounts/CustomerPurchaseOrderAccountResource.java", "license": "mit", "size": 15518 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
502,175
public void addEdge(final GraphComponent v, final GraphComponent w) { this.neighbourMap.computeIfAbsent(v, x -> new HashSet<>()).add(w); this.neighbourMap.computeIfAbsent(w, x -> new HashSet<>()).add(v); }
void function(final GraphComponent v, final GraphComponent w) { this.neighbourMap.computeIfAbsent(v, x -> new HashSet<>()).add(w); this.neighbourMap.computeIfAbsent(w, x -> new HashSet<>()).add(v); }
/** * Adds an edge between v and w * * @param v * node to connect to w * @param w * node to connect to v */
Adds an edge between v and w
addEdge
{ "repo_name": "RWTH-i5-IDSG/jamocha", "path": "src/main/java/org/jamocha/filter/optimizer/PathFilterOrderOptimizer.java", "license": "apache-2.0", "size": 15373 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
2,825,032
private void initRecyclerView() { uploadMediaDetailAdapter = new UploadMediaDetailAdapter(defaultKvStore.getString(Prefs.DESCRIPTION_LANGUAGE, "")); uploadMediaDetailAdapter.setCallback(this::showInfoAlert); uploadMediaDetailAdapter.setEventListener(this); rvDescriptions.setLayoutMan...
void function() { uploadMediaDetailAdapter = new UploadMediaDetailAdapter(defaultKvStore.getString(Prefs.DESCRIPTION_LANGUAGE, "")); uploadMediaDetailAdapter.setCallback(this::showInfoAlert); uploadMediaDetailAdapter.setEventListener(this); rvDescriptions.setLayoutManager(new LinearLayoutManager(getContext())); rvDescr...
/** * init the description recycler veiw and caption recyclerview */
init the description recycler veiw and caption recyclerview
initRecyclerView
{ "repo_name": "neslihanturan/apps-android-commons", "path": "app/src/main/java/fr/free/nrw/commons/upload/mediaDetails/UploadMediaDetailFragment.java", "license": "apache-2.0", "size": 22975 }
[ "androidx.recyclerview.widget.LinearLayoutManager", "fr.free.nrw.commons.settings.Prefs", "fr.free.nrw.commons.upload.UploadMediaDetailAdapter" ]
import androidx.recyclerview.widget.LinearLayoutManager; import fr.free.nrw.commons.settings.Prefs; import fr.free.nrw.commons.upload.UploadMediaDetailAdapter;
import androidx.recyclerview.widget.*; import fr.free.nrw.commons.settings.*; import fr.free.nrw.commons.upload.*;
[ "androidx.recyclerview", "fr.free.nrw" ]
androidx.recyclerview; fr.free.nrw;
385,366
public OriginateAction buildOriginateAction() throws AsteriskOriginatorException { final OriginateAction action = new OriginateAction(); action.setCallerId(m_callerId); setLegAChannel(expandPattern(m_legAChannelPattern)); action.setChannel(getLegAChannel()); action.setTimeout...
OriginateAction function() throws AsteriskOriginatorException { final OriginateAction action = new OriginateAction(); action.setCallerId(m_callerId); setLegAChannel(expandPattern(m_legAChannelPattern)); action.setChannel(getLegAChannel()); action.setTimeout(m_dialTimeout); action.setCallerId(m_callerId); if (m_legBIsAp...
/** * Build a complete OriginateAction ready for dispatching. * * @return completed OriginateAction, ready to be passed to ManagerConnection.sendAction * @throws org.opennms.netmgt.asterisk.utils.AsteriskOriginatorException if any of the underlying operations fail */
Build a complete OriginateAction ready for dispatching
buildOriginateAction
{ "repo_name": "tdefilip/opennms", "path": "opennms-asterisk/src/main/java/org/opennms/netmgt/asterisk/utils/AsteriskOriginator.java", "license": "agpl-3.0", "size": 17575 }
[ "org.asteriskjava.manager.action.OriginateAction" ]
import org.asteriskjava.manager.action.OriginateAction;
import org.asteriskjava.manager.action.*;
[ "org.asteriskjava.manager" ]
org.asteriskjava.manager;
2,324,473
public Bound to(String tableSpec) { return toTableRef(NestedValueProvider.of( StaticValueProvider.of(tableSpec), new TableSpecToTableRef())); }
Bound function(String tableSpec) { return toTableRef(NestedValueProvider.of( StaticValueProvider.of(tableSpec), new TableSpecToTableRef())); }
/** * Returns a copy of this write transformation, but writing to the specified table. Refer to * {@link #parseTableSpec(String)} for the specification format. * * <p>Does not modify this object. */
Returns a copy of this write transformation, but writing to the specified table. Refer to <code>#parseTableSpec(String)</code> for the specification format. Does not modify this object
to
{ "repo_name": "jasonkuster/beam", "path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java", "license": "apache-2.0", "size": 122807 }
[ "org.apache.beam.sdk.options.ValueProvider" ]
import org.apache.beam.sdk.options.ValueProvider;
import org.apache.beam.sdk.options.*;
[ "org.apache.beam" ]
org.apache.beam;
1,750,081
public void setInterface(InetAddress addr) throws SocketException { checkClosedAndBind(false); if (addr == null) { throw new NullPointerException(); } if (addr.isAnyLocalAddress()) { impl.setOption(SocketOptions.IP_MULTICAST_IF, InetAddress.ANY); ...
void function(InetAddress addr) throws SocketException { checkClosedAndBind(false); if (addr == null) { throw new NullPointerException(); } if (addr.isAnyLocalAddress()) { impl.setOption(SocketOptions.IP_MULTICAST_IF, InetAddress.ANY); } else if (addr instanceof Inet4Address) { impl.setOption(SocketOptions.IP_MULTICAST...
/** * Sets the interface address used by this socket. This allows to send * multicast packets on a different interface than the default interface of * the local system. This is useful on multihomed machines. * * @param addr * the multicast interface network address to set...
Sets the interface address used by this socket. This allows to send multicast packets on a different interface than the default interface of the local system. This is useful on multihomed machines
setInterface
{ "repo_name": "shannah/cn1", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/luni/src/main/java/java/net/MulticastSocket.java", "license": "gpl-2.0", "size": 24144 }
[ "org.apache.harmony.luni.internal.nls.Messages" ]
import org.apache.harmony.luni.internal.nls.Messages;
import org.apache.harmony.luni.internal.nls.*;
[ "org.apache.harmony" ]
org.apache.harmony;
1,843,007
public void clickOnWebElement(By by, int match, boolean scroll, boolean useJavaScriptToClick){ WebElement webElement = null; if(useJavaScriptToClick){ webElement = waiter.waitForWebElement(by, match, Timeout.getSmallTimeout(), false); if(webElement == null){ Assert.fail("WebElement with " + webUtils...
void function(By by, int match, boolean scroll, boolean useJavaScriptToClick){ WebElement webElement = null; if(useJavaScriptToClick){ webElement = waiter.waitForWebElement(by, match, Timeout.getSmallTimeout(), false); if(webElement == null){ Assert.fail(STR + webUtils.splitNameByUpperCase(by.getClass().getSimpleName()...
/** * Clicks on a web element using the given By method. * * @param by the By object e.g. By.id("id"); * @param match if multiple objects match, this determines which one will be clicked * @param scroll true if scrolling should be performed * @param useJavaScriptToClick true if click should be perfomed thro...
Clicks on a web element using the given By method
clickOnWebElement
{ "repo_name": "RobotiumTech/robotium", "path": "robotium-solo/src/main/java/com/robotium/solo/Clicker.java", "license": "apache-2.0", "size": 21594 }
[ "junit.framework.Assert" ]
import junit.framework.Assert;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,423,709
return context; } public LeadImageAdapter(Context context, Collection<LeadImage> items) { super(context); this.context = context; this.items = new ArrayList<LeadImage>(items); } //=============================================================================================...
return context; } public LeadImageAdapter(Context context, Collection<LeadImage> items) { super(context); this.context = context; this.items = new ArrayList<LeadImage>(items); }
/** * Get the main context * * @return The context in which the adapter was created */
Get the main context
getContext
{ "repo_name": "trujunzhang/IEATTA-ANDROID", "path": "app/src/main/java/com/marvinlabs/widget/slideshow/adapter/LeadImageAdapter.java", "license": "mit", "size": 3528 }
[ "android.content.Context", "java.util.ArrayList", "java.util.Collection", "org.ieatta.activity.LeadImage" ]
import android.content.Context; import java.util.ArrayList; import java.util.Collection; import org.ieatta.activity.LeadImage;
import android.content.*; import java.util.*; import org.ieatta.activity.*;
[ "android.content", "java.util", "org.ieatta.activity" ]
android.content; java.util; org.ieatta.activity;
2,672,559
public User getUser() { return user; }
User function() { return user; }
/** * Get the user that is creating this Process. */
Get the user that is creating this Process
getUser
{ "repo_name": "workplacesystems/queuj", "path": "src/main/java/com/workplacesystems/queuj/ProcessBuilder.java", "license": "apache-2.0", "size": 12013 }
[ "com.workplacesystems.queuj.utils.User" ]
import com.workplacesystems.queuj.utils.User;
import com.workplacesystems.queuj.utils.*;
[ "com.workplacesystems.queuj" ]
com.workplacesystems.queuj;
138,681
@Override public Object clone() { try { AtomicPreprocessingCommand result = new AtomicPreprocessingCommand(command, getGPConfiguration()); return result; } catch (Throwable t) { throw new CloneException(t); } }
Object function() { try { AtomicPreprocessingCommand result = new AtomicPreprocessingCommand(command, getGPConfiguration()); return result; } catch (Throwable t) { throw new CloneException(t); } }
/** * Clones the object. * * @return cloned instance of this object */
Clones the object
clone
{ "repo_name": "AKSW/LIMES-dev", "path": "limes-core/src/main/java/org/aksw/limes/core/ml/algorithm/eagle/genes/AtomicPreprocessingCommand.java", "license": "gpl-3.0", "size": 3535 }
[ "org.jgap.util.CloneException" ]
import org.jgap.util.CloneException;
import org.jgap.util.*;
[ "org.jgap.util" ]
org.jgap.util;
1,687,789
@Override public void enterDay(@NotNull DateParser.DayContext ctx) { }
@Override public void enterDay(@NotNull DateParser.DayContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitYear
{ "repo_name": "cestella/analytics_util", "path": "components/syntactic_analysis/src/main/java/com/caseystella/parser/DateBaseListener.java", "license": "apache-2.0", "size": 3771 }
[ "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,594,231
private ClientUpdateMessageImpl initializeMessage(EnumListenerEvent operation, CacheEvent event) throws Exception { if (!supportsOperation(operation)) { throw new Exception(LocalizedStrings.CacheClientNotifier_THE_CACHE_CLIENT_NOTIFIER_DOES_NOT_SUPPORT_OPERATIONS_OF_TYPE_0.toLocalizedString(operatio...
ClientUpdateMessageImpl function(EnumListenerEvent operation, CacheEvent event) throws Exception { if (!supportsOperation(operation)) { throw new Exception(LocalizedStrings.CacheClientNotifier_THE_CACHE_CLIENT_NOTIFIER_DOES_NOT_SUPPORT_OPERATIONS_OF_TYPE_0.toLocalizedString(operation)); } Object keyOfInterest = null; f...
/** * Initializes a <code>ClientUpdateMessage</code> from an operation and * event * * @param operation * The operation that occurred (e.g. AFTER_CREATE) * @param event * The event containing the data to be updated * @return a <code>ClientUpdateMessage</code> * @throws Excep...
Initializes a <code>ClientUpdateMessage</code> from an operation and event
initializeMessage
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java", "license": "apache-2.0", "size": 101839 }
[ "com.gemstone.gemfire.cache.CacheEvent", "com.gemstone.gemfire.internal.cache.BridgeRegionEventImpl", "com.gemstone.gemfire.internal.cache.EntryEventImpl", "com.gemstone.gemfire.internal.cache.EnumListenerEvent", "com.gemstone.gemfire.internal.cache.EventID", "com.gemstone.gemfire.internal.cache.LocalRegi...
import com.gemstone.gemfire.cache.CacheEvent; import com.gemstone.gemfire.internal.cache.BridgeRegionEventImpl; import com.gemstone.gemfire.internal.cache.EntryEventImpl; import com.gemstone.gemfire.internal.cache.EnumListenerEvent; import com.gemstone.gemfire.internal.cache.EventID; import com.gemstone.gemfire.interna...
import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.cache.versions.*; import com.gemstone.gemfire.internal.i18n.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
1,165,686
private void getCommentCommand(Commandline cmd) { if (getComment() == null) { return; } else { cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue(getComment()); } }
void function(Commandline cmd) { if (getComment() == null) { return; } else { cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue(getComment()); } }
/** * Get the 'comment' command * * @param cmd containing the command line string with or without the * comment flag and value appended */
Get the 'comment' command
getCommentCommand
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java", "license": "mit", "size": 7421 }
[ "org.apache.tools.ant.types.Commandline" ]
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
2,011,082
public static boolean isEmpty(@Nullable DocIdSet set) { return set == null || set == DocIdSet.EMPTY; } /** * Given a {@link Scorer}, return a {@link Bits} instance that will match * all documents contained in the set. Note that the returned {@link Bits}
static boolean function(@Nullable DocIdSet set) { return set == null set == DocIdSet.EMPTY; } /** * Given a {@link Scorer}, return a {@link Bits} instance that will match * all documents contained in the set. Note that the returned {@link Bits}
/** * Is it an empty {@link DocIdSet}? */
Is it an empty <code>DocIdSet</code>
isEmpty
{ "repo_name": "sarwarbhuiyan/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/lucene/Lucene.java", "license": "apache-2.0", "size": 37676 }
[ "org.apache.lucene.search.DocIdSet", "org.apache.lucene.search.Scorer", "org.apache.lucene.util.Bits", "org.elasticsearch.common.Nullable" ]
import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.Scorer; import org.apache.lucene.util.Bits; import org.elasticsearch.common.Nullable;
import org.apache.lucene.search.*; import org.apache.lucene.util.*; import org.elasticsearch.common.*;
[ "org.apache.lucene", "org.elasticsearch.common" ]
org.apache.lucene; org.elasticsearch.common;
2,764,233
void acquireMergePolicyReadLock(LockList locks, String mergePolicyName) throws AlgebricksException;
void acquireMergePolicyReadLock(LockList locks, String mergePolicyName) throws AlgebricksException;
/** * Acquire read lock on the merge policy * * @param locks * the lock list to add the new lock to * @param mergePolicyName * the name of the merge policy in the given dataverse * @throws AlgebricksException * if lock couldn't be acquired *...
Acquire read lock on the merge policy
acquireMergePolicyReadLock
{ "repo_name": "apache/incubator-asterixdb", "path": "asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/IMetadataLockManager.java", "license": "apache-2.0", "size": 18427 }
[ "org.apache.asterix.common.metadata.LockList", "org.apache.hyracks.algebricks.common.exceptions.AlgebricksException" ]
import org.apache.asterix.common.metadata.LockList; import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import org.apache.asterix.common.metadata.*; import org.apache.hyracks.algebricks.common.exceptions.*;
[ "org.apache.asterix", "org.apache.hyracks" ]
org.apache.asterix; org.apache.hyracks;
2,848,151
void injectRequest(Request request);
void injectRequest(Request request);
/** * Injects a request to be immediately processed. The request is not added to the {@link RequestQueue}. * * @param request the request to be processed. */
Injects a request to be immediately processed. The request is not added to the <code>RequestQueue</code>
injectRequest
{ "repo_name": "fanjunwei/openfireSSO", "path": "src/plugins/fastpath/src/java/org/jivesoftware/xmpp/workgroup/dispatcher/Dispatcher.java", "license": "apache-2.0", "size": 3697 }
[ "org.jivesoftware.xmpp.workgroup.request.Request" ]
import org.jivesoftware.xmpp.workgroup.request.Request;
import org.jivesoftware.xmpp.workgroup.request.*;
[ "org.jivesoftware.xmpp" ]
org.jivesoftware.xmpp;
1,364,932
@Test public void testParsingUnsupportedApiKey() { MetadataRecordSerde serde = new MetadataRecordSerde(); ByteBuffer buffer = ByteBuffer.allocate(64); buffer.put((byte) 0x01); // frame version buffer.put((byte) 0xff); // apiKey buffer.put((byte) 0x7f); // apiKey b...
void function() { MetadataRecordSerde serde = new MetadataRecordSerde(); ByteBuffer buffer = ByteBuffer.allocate(64); buffer.put((byte) 0x01); buffer.put((byte) 0xff); buffer.put((byte) 0x7f); buffer.put((byte) 0x00); buffer.put((byte) 0x80); buffer.position(0); buffer.limit(64); assertStartsWith(STR, assertThrows(Meta...
/** * Test attempting to parse an event which has a unsupported version */
Test attempting to parse an event which has a unsupported version
testParsingUnsupportedApiKey
{ "repo_name": "guozhangwang/kafka", "path": "metadata/src/test/java/org/apache/kafka/metadata/MetadataRecordSerdeTest.java", "license": "apache-2.0", "size": 9196 }
[ "java.nio.ByteBuffer", "org.apache.kafka.common.protocol.ByteBufferAccessor", "org.apache.kafka.server.common.serialization.MetadataParseException", "org.junit.jupiter.api.Assertions" ]
import java.nio.ByteBuffer; import org.apache.kafka.common.protocol.ByteBufferAccessor; import org.apache.kafka.server.common.serialization.MetadataParseException; import org.junit.jupiter.api.Assertions;
import java.nio.*; import org.apache.kafka.common.protocol.*; import org.apache.kafka.server.common.serialization.*; import org.junit.jupiter.api.*;
[ "java.nio", "org.apache.kafka", "org.junit.jupiter" ]
java.nio; org.apache.kafka; org.junit.jupiter;
2,094,198
void downloadMapTiles(MapDownloader mapDownloader, DPMap.VisibleMapArea mapRegion, int minimumZ, int maximumZ);
void downloadMapTiles(MapDownloader mapDownloader, DPMap.VisibleMapArea mapRegion, int minimumZ, int maximumZ);
/** * Download the map tiles if supported * @param mapDownloader * @param mapRegion * @param minimumZ * @param maximumZ */
Download the map tiles if supported
downloadMapTiles
{ "repo_name": "giorgioDonnie91/AndroidAgriPerizia", "path": "Android/src/org/droidplanner/android/maps/DPMap.java", "license": "gpl-3.0", "size": 11606 }
[ "org.droidplanner.android.maps.providers.google_map.tiles.mapbox.offline.MapDownloader" ]
import org.droidplanner.android.maps.providers.google_map.tiles.mapbox.offline.MapDownloader;
import org.droidplanner.android.maps.providers.google_map.tiles.mapbox.offline.*;
[ "org.droidplanner.android" ]
org.droidplanner.android;
2,285,000
protected FileItemHeadersImpl newFileItemHeaders() { return new FileItemHeadersImpl(); } /** * <p> Parses the <code>header-part</code> and returns as key/value * pairs. * * <p> If there are multiple headers of the same names, the name * will map to a comma-separated list co...
FileItemHeadersImpl function() { return new FileItemHeadersImpl(); } /** * <p> Parses the <code>header-part</code> and returns as key/value * pairs. * * <p> If there are multiple headers of the same names, the name * will map to a comma-separated list containing the values. * * @param headerPart The <code>header-part</...
/** * Creates a new instance of {@link FileItemHeaders}. * @return The new instance. */
Creates a new instance of <code>FileItemHeaders</code>
newFileItemHeaders
{ "repo_name": "sabob/ratel", "path": "ratel/src/com/google/ratel/deps/fileupload/FileUploadBase.java", "license": "apache-2.0", "size": 51158 }
[ "com.google.ratel.deps.fileupload.util.FileItemHeadersImpl", "java.util.Map" ]
import com.google.ratel.deps.fileupload.util.FileItemHeadersImpl; import java.util.Map;
import com.google.ratel.deps.fileupload.util.*; import java.util.*;
[ "com.google.ratel", "java.util" ]
com.google.ratel; java.util;
1,999,702
protected Displayable getCurrentScreen() { return Display.getDisplay(midlet).getCurrent(); }
Displayable function() { return Display.getDisplay(midlet).getCurrent(); }
/** * [EF] RENAMED in Scenario 04: remove "Name". Purpose: avoid method name conflict * Get the current screen name that is displayed */
[EF] RENAMED in Scenario 04: remove "Name". Purpose: avoid method name conflict Get the current screen name that is displayed
getCurrentScreen
{ "repo_name": "leotizzei/MobileMedia-Cosmos-VP-v6", "path": "src/br/unicamp/ic/sed/mobilemedia/music/impl/AbstractController.java", "license": "mit", "size": 5003 }
[ "javax.microedition.lcdui.Display", "javax.microedition.lcdui.Displayable" ]
import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.*;
[ "javax.microedition" ]
javax.microedition;
1,438,129
public static String removeSlashDotDot(String url) { if (url == null || (url = url.trim()).length() < 4 || !url.contains(SLASHDOTDOT)) { return url; } // get to 'path' part of the URL, preserving schema, auth, host if // present // find inde...
static String function(String url) { if (url == null (url = url.trim()).length() < 4 !url.contains(SLASHDOTDOT)) { return url; } int dotSlashSlashIndex = url.indexOf(COLONSLASHSLASH); final int pathStartIndex; if (dotSlashSlashIndex >= 0) { pathStartIndex = url.indexOf(SLASH, dotSlashSlashIndex + COLONSLASHSLASH.length...
/** * collapses absolute or relative URLs containing '/..' converting * <code>http://host/path1/../path2</code> to <code>http://host/path2</code> * or <code>/one/two/../three</code> to * <code>/one/three</code> * * @param url in which the '/..'s should be removed * @return collapsed ...
collapses absolute or relative URLs containing '/..' converting <code>HREF> to <code>HREF> or <code>/one/two/../three</code> to <code>/one/three</code>
removeSlashDotDot
{ "repo_name": "d0k1/jmeter", "path": "src/protocol/http/org/apache/jmeter/protocol/http/util/ConversionUtils.java", "license": "apache-2.0", "size": 10004 }
[ "java.util.ArrayList", "java.util.List", "java.util.StringTokenizer" ]
import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
1,316,833
public void runScript(String language, String scriptCode, Map<String, Object> params) { scriptHistory.add(new ScriptHistoryEntry(language, scriptCode, params)); }
void function(String language, String scriptCode, Map<String, Object> params) { scriptHistory.add(new ScriptHistoryEntry(language, scriptCode, params)); }
/** * Pretend to run script on the resource. * The script is actually not executed, it is only recorded in the script history * and can be fetched by getScriptHistory(). * * @param scriptCode code of the script */
Pretend to run script on the resource. The script is actually not executed, it is only recorded in the script history and can be fetched by getScriptHistory()
runScript
{ "repo_name": "PetrGasparik/midpoint", "path": "icf-connectors/dummy-resource/src/main/java/com/evolveum/icf/dummy/resource/DummyResource.java", "license": "apache-2.0", "size": 43596 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,484,365
public ServiceFuture<Void> updateAsync(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParameters parameters, String ifMatch, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, service...
ServiceFuture<Void> function(String resourceGroupName, String serviceName, TemplateName templateName, EmailTemplateUpdateParameters parameters, String ifMatch, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, templateName, pa...
/** * Updates the specific Email Template. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param templateName Email Template Name Identifier. Possible values include: 'applicationApprovedNotificationMessage', 'accountC...
Updates the specific Email Template
updateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2019_01_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_01_01/implementation/EmailTemplatesInner.java", "license": "mit", "size": 79976 }
[ "com.microsoft.azure.management.apimanagement.v2019_01_01.EmailTemplateUpdateParameters", "com.microsoft.azure.management.apimanagement.v2019_01_01.TemplateName", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.apimanagement.v2019_01_01.EmailTemplateUpdateParameters; import com.microsoft.azure.management.apimanagement.v2019_01_01.TemplateName; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.apimanagement.v2019_01_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,910,674
public interface TupleValueDragPointHandler extends ValueEditorDragPointHandler { boolean dragTupleItem(DragGestureEvent dge, TupleValueEditor parentEditor, int tupleElementIndex); } public static class TupleValueEditorProvider extends...
interface TupleValueDragPointHandler extends ValueEditorDragPointHandler { boolean function(DragGestureEvent dge, TupleValueEditor parentEditor, int tupleElementIndex); } public static class TupleValueEditorProvider extends ValueEditorProvider<TupleValueEditor> { public TupleValueEditorProvider(ValueEditorManager value...
/** * This method defines the behaviour when the user attempts to drag a portion * of a tuple from the <code>TupleValueEditor</code>. By default, this * method is empty and subclasses are encouraged to override this class to * specify their own drag handling code. * @param dge * @pa...
This method defines the behaviour when the user attempts to drag a portion of a tuple from the <code>TupleValueEditor</code>. By default, this method is empty and subclasses are encouraged to override this class to specify their own drag handling code
dragTupleItem
{ "repo_name": "levans/Open-Quark", "path": "src/Quark_Gems/src/org/openquark/gems/client/valueentry/TupleValueEditor.java", "license": "bsd-3-clause", "size": 14047 }
[ "java.awt.dnd.DragGestureEvent" ]
import java.awt.dnd.DragGestureEvent;
import java.awt.dnd.*;
[ "java.awt" ]
java.awt;
1,239,110
public void testAlerColumnLength() throws SQLException { Statement s = createStatement(); s.executeUpdate("CREATE TABLE TestAlterTable( " + "element_id INTEGER NOT NULL, "+ "altered_id VARCHAR(30) NOT NULL, "+ "counter SMALLINT NOT NULL DEFAULT 0, "+ "time...
void function() throws SQLException { Statement s = createStatement(); s.executeUpdate(STR + STR+ STR+ STR+ STR); s.executeUpdate(STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR + STR+ STR); s.executeUpdate(STR+ STR); s.executeUpdate(STR+ STR+ STR); ResultSet rs = s.executeQuery(STR+ STR); JDBC.assertFullResultSet(rs, new ...
/** * Altering the column length should regenerate the trigger * action plan which is saved in SYSSTATEMENTS. DERBY-4874 * * @throws SQLException * */
Altering the column length should regenerate the trigger action plan which is saved in SYSSTATEMENTS. DERBY-4874
testAlerColumnLength
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/TriggerTest.java", "license": "agpl-3.0", "size": 61557 }
[ "com.splicemachine.dbTesting.junit.JDBC", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import com.splicemachine.dbTesting.junit.JDBC; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import com.splicemachine.*; import java.sql.*;
[ "com.splicemachine", "java.sql" ]
com.splicemachine; java.sql;
1,806,206
private static int blendColors(int color1, int color2, float ratio) { final float inverseRation = 1f - ratio; float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); float b = (Color...
static int function(int color1, int color2, float ratio) { final float inverseRation = 1f - ratio; float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * ...
/** * Blend {@code color1} and {@code color2} using the given ratio. * * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend, * 0.0 will return {@code color2}. */
Blend color1 and color2 using the given ratio
blendColors
{ "repo_name": "Abooc/Doodles", "path": "app/src/main/java/android/support/common/view/SlidingTabStrip.java", "license": "apache-2.0", "size": 8014 }
[ "android.graphics.Color" ]
import android.graphics.Color;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,684,444
public RayCast.RayCastResult rayCast(int x, int y, int dirX, int dirY, float distance) { return new RayCast(this).doRayCast(x, y, dirX, dirY, distance); }
RayCast.RayCastResult function(int x, int y, int dirX, int dirY, float distance) { return new RayCast(this).doRayCast(x, y, dirX, dirY, distance); }
/** * Perform a ray cast from (originX, originY) in the direction of (dirX, dirY) for the given distance. */
Perform a ray cast from (originX, originY) in the direction of (dirX, dirY) for the given distance
rayCast
{ "repo_name": "Vrekt/Lunar", "path": "src/main/java/com/lunar/world/World.java", "license": "mit", "size": 8653 }
[ "com.lunar.raycast.RayCast" ]
import com.lunar.raycast.RayCast;
import com.lunar.raycast.*;
[ "com.lunar.raycast" ]
com.lunar.raycast;
957,694
public long getLong(String key, long defaultValue) { String value = this.values.get(key); if (StringUtils.isBlank(value)) { return defaultValue; } return Long.valueOf(value); }
long function(String key, long defaultValue) { String value = this.values.get(key); if (StringUtils.isBlank(value)) { return defaultValue; } return Long.valueOf(value); }
/** * Retrieves a configuration value with the given key * * @param key The key of the configuration value (e.g. application.name) * @param defaultValue The default value to return of no key is found * @return The configured value as int or the passed defautlValue if the key is not configured ...
Retrieves a configuration value with the given key
getLong
{ "repo_name": "dmarko484/mangooio", "path": "mangooio-core/src/main/java/io/mangoo/configuration/Config.java", "license": "apache-2.0", "size": 11917 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
10,124
public List<Release> getReleases(Integer repositoryId) { URLBuilder url = new URLBuilder(host, "/api/" + repositoryId + "/releases.xml"); InputStream httpStream = httpConnection.doGet(url.toURL()); return resourceFactory.buildReleases(httpStream); }
List<Release> function(Integer repositoryId) { URLBuilder url = new URLBuilder(host, "/api/" + repositoryId + STR); InputStream httpStream = httpConnection.doGet(url.toURL()); return resourceFactory.buildReleases(httpStream); }
/** * Find all releases for repository * * @param repositoryId * @return */
Find all releases for repository
getReleases
{ "repo_name": "raupachz/raupach-me.com", "path": "src/main/java/org/beanstalk4j/BeanstalkApi.java", "license": "apache-2.0", "size": 38736 }
[ "java.io.InputStream", "java.util.List", "org.beanstalk4j.http.URLBuilder", "org.beanstalk4j.model.Release" ]
import java.io.InputStream; import java.util.List; import org.beanstalk4j.http.URLBuilder; import org.beanstalk4j.model.Release;
import java.io.*; import java.util.*; import org.beanstalk4j.http.*; import org.beanstalk4j.model.*;
[ "java.io", "java.util", "org.beanstalk4j.http", "org.beanstalk4j.model" ]
java.io; java.util; org.beanstalk4j.http; org.beanstalk4j.model;
1,105,870
public void startDataNodes(Configuration conf, int numDataNodes, boolean manageDfsDirs, StartupOption operation, String[] racks ) throws IOException { startDataNodes(conf, numDataNodes, manageDfsDirs, operation, racks, null, null, false); }
void function(Configuration conf, int numDataNodes, boolean manageDfsDirs, StartupOption operation, String[] racks ) throws IOException { startDataNodes(conf, numDataNodes, manageDfsDirs, operation, racks, null, null, false); }
/** * Modify the config and start up the DataNodes. The info port for * DataNodes is guaranteed to use a free port. * * @param conf the base configuration to use in starting the DataNodes. This * will be modified as necessary. * @param numDataNodes Number of DataNodes to start; may be zero ...
Modify the config and start up the DataNodes. The info port for DataNodes is guaranteed to use a free port
startDataNodes
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java", "license": "apache-2.0", "size": 113960 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hdfs.server.common.HdfsServerConstants" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.common.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
350,462
public Object[] toArray(Object[] arry) { synchronized(children) { return children.keySet().toArray(arry); } } protected static final class BCSIterator implements Iterator { BCSIterator(Iterator i) { super(); src = i; } public boolean hasNext() { retur...
Object[] function(Object[] arry) { synchronized(children) { return children.keySet().toArray(arry); } } protected static final class BCSIterator implements Iterator { BCSIterator(Iterator i) { super(); src = i; } public boolean hasNext() { return src.hasNext(); }
/** * Gets an array containing all children of * this <tt>BeanContext</tt> that match * the types contained in arry. * @param arry The array of object * types that are of interest. * @return an array of children */
Gets an array containing all children of this BeanContext that match the types contained in arry
toArray
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java", "license": "mit", "size": 47296 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,217,106
void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException;
void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException;
/** * Updates the designated column with a <code>java.sql.BigDecimal</code> * value. * The updater methods are used to update column values in the * current row or the insert row. The updater methods do not * update the underlying database; instead the <code>updateRow</code> or * <code>in...
Updates the designated column with a <code>java.sql.BigDecimal</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are called to update the...
updateBigDecimal
{ "repo_name": "workarounds/auto-value-result-set", "path": "processor/src/test/java/java/sql/ResultSet.java", "license": "apache-2.0", "size": 200453 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
585,985
public static String formatFieldName(ValuesSourceAggregationBuilder<?> source, String extra) { return source.field() + "." + source.getType() + "." + extra; }
static String function(ValuesSourceAggregationBuilder<?> source, String extra) { return source.field() + "." + source.getType() + "." + extra; }
/** * Format to the appropriate Rollup field name convention * * @param source Source aggregation to get type and name from * @param extra The type of value this field is (VALUE, INTERVAL, etc) * @return formatted field name */
Format to the appropriate Rollup field name convention
formatFieldName
{ "repo_name": "robin13/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/rollup/RollupField.java", "license": "apache-2.0", "size": 5548 }
[ "org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder" ]
import org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder;
import org.elasticsearch.search.aggregations.support.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
2,372,837
public static X9ECParameters getByOID( ASN1ObjectIdentifier oid) { X9ECParametersHolder holder = (X9ECParametersHolder)curves.get(oid); if (holder != null) { return holder.getParameters(); } return null; }
static X9ECParameters function( ASN1ObjectIdentifier oid) { X9ECParametersHolder holder = (X9ECParametersHolder)curves.get(oid); if (holder != null) { return holder.getParameters(); } return null; }
/** * return the X9ECParameters object for the named curve represented by * the passed in object identifier. Null if the curve isn't present. * * @param oid an object identifier representing a named curve, if present. */
return the X9ECParameters object for the named curve represented by the passed in object identifier. Null if the curve isn't present
getByOID
{ "repo_name": "xdv/ripple-lib-java", "path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/asn1/teletrust/TeleTrusTNamedCurves.java", "license": "isc", "size": 18989 }
[ "org.ripple.bouncycastle.asn1.ASN1ObjectIdentifier", "org.ripple.bouncycastle.asn1.x9.X9ECParameters", "org.ripple.bouncycastle.asn1.x9.X9ECParametersHolder" ]
import org.ripple.bouncycastle.asn1.ASN1ObjectIdentifier; import org.ripple.bouncycastle.asn1.x9.X9ECParameters; import org.ripple.bouncycastle.asn1.x9.X9ECParametersHolder;
import org.ripple.bouncycastle.asn1.*; import org.ripple.bouncycastle.asn1.x9.*;
[ "org.ripple.bouncycastle" ]
org.ripple.bouncycastle;
2,856,007
public static void initTableMapperJob(TableName table, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job) throws IOException { initTableMapperJob(table.getNameAsString(), scan, mapper, outputKeyClass, ...
static void function(TableName table, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job) throws IOException { initTableMapperJob(table.getNameAsString(), scan, mapper, outputKeyClass, outputValueClass, job, true); }
/** * Use this before submitting a TableMap job. It will appropriately set up * the job. * * @param table The table name to read from. * @param scan The scan instance with the columns, time range etc. * @param mapper The mapper class to use. * @param outputKeyClass The class of the output key. ...
Use this before submitting a TableMap job. It will appropriately set up the job
initTableMapperJob
{ "repo_name": "mahak/hbase", "path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java", "license": "apache-2.0", "size": 46796 }
[ "java.io.IOException", "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.mapreduce.Job" ]
import java.io.IOException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.mapreduce.Job;
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
394,903
private void setMaxRetries(String maxRetries) { Long lMaxRetries; try { lMaxRetries = Long.parseLong(maxRetries); } catch (NumberFormatException e) { // No response or not parsable, expire immediately Log.w(TAG, "Licence retry count (GR) missing, grace period disabled"); maxRetries = "0"; lMaxRe...
void function(String maxRetries) { Long lMaxRetries; try { lMaxRetries = Long.parseLong(maxRetries); } catch (NumberFormatException e) { Log.w(TAG, STR); maxRetries = "0"; lMaxRetries = 0l; } mMaxRetries = lMaxRetries; mPreferences.putString(PREF_MAX_RETRIES, maxRetries); }
/** * Set the max retries value (GR) as received from the server and add to * preferences. You must manually call PreferenceObfuscator.commit() to * commit these changes to disk. * * @param maxRetries the GR string received */
Set the max retries value (GR) as received from the server and add to preferences. You must manually call PreferenceObfuscator.commit() to commit these changes to disk
setMaxRetries
{ "repo_name": "MaChristmann/mobile-trial", "path": "library/src/org/mobiletrial/license/ServerManagedPolicy.java", "license": "apache-2.0", "size": 11169 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
855,762
public Deposit getDeposit(int index) { extendDeposits(index + 1); return (Deposit) deposits.get(index); }
Deposit function(int index) { extendDeposits(index + 1); return (Deposit) deposits.get(index); }
/** * Implementation creates empty Deposits as a side-effect, so that Struts' efforts to set fields of lines which haven't been * created will succeed rather than causing a NullPointerException. * * @return Deposit at the given index */
Implementation creates empty Deposits as a side-effect, so that Struts' efforts to set fields of lines which haven't been created will succeed rather than causing a NullPointerException
getDeposit
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/CashManagementDocument.java", "license": "agpl-3.0", "size": 30903 }
[ "org.kuali.kfs.fp.businessobject.Deposit" ]
import org.kuali.kfs.fp.businessobject.Deposit;
import org.kuali.kfs.fp.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
638,191
@Beta public static Predicate<File> isDirectory() { return FilePredicate.IS_DIRECTORY; }
static Predicate<File> function() { return FilePredicate.IS_DIRECTORY; }
/** * Returns a predicate that returns the result of {@link File#isDirectory} on input files. * * @since 15.0 */
Returns a predicate that returns the result of <code>File#isDirectory</code> on input files
isDirectory
{ "repo_name": "EdwardLee03/guava", "path": "guava/src/com/google/common/io/Files.java", "license": "apache-2.0", "size": 33222 }
[ "com.google.common.base.Predicate", "java.io.File" ]
import com.google.common.base.Predicate; import java.io.File;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
653,335
public static ext1Type fromPerAligned(byte[] encodedBytes) { ext1Type result = new ext1Type(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static ext1Type function(byte[] encodedBytes) { ext1Type result = new ext1Type(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new ext1Type from encoded stream. */
Creates a new ext1Type from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/lpp/ResponseTime.java", "license": "apache-2.0", "size": 17232 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
119,127
protected void renderMergedOutputModel(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) throws Exception { // this is the business model data (typically a POJO) that was set and returned by the controller Object model = map.get("model"); ServiceSess...
void function(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) throws Exception { Object model = map.get("model"); ServiceSession sSession = (ServiceSession)model; String json = STRtext/plain; charset=UTF-8STRUTF-8")); }
/** * Renders the view by marshalling the model data (set in the controller) * into XML and writing the XML to the response output stream. */
Renders the view by marshalling the model data (set in the controller) into XML and writing the XML to the response output stream
renderMergedOutputModel
{ "repo_name": "chooli/com.jumkid.base", "path": "src/com/jumkid/base/view/JsonView.java", "license": "gpl-2.0", "size": 2274 }
[ "com.jumkid.base.model.ServiceSession", "java.util.Map", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import com.jumkid.base.model.ServiceSession; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.jumkid.base.model.*; import java.util.*; import javax.servlet.http.*;
[ "com.jumkid.base", "java.util", "javax.servlet" ]
com.jumkid.base; java.util; javax.servlet;
2,395,335
public Call<ResponseBody> putFloatValidAsync(List<Double> arrayBody, final ServiceCallback<Void> serviceCallback) { if (arrayBody == null) { serviceCallback.failure(new ServiceException( new IllegalArgumentException("Parameter arrayBody is required and cannot be null."))); ...
Call<ResponseBody> function(List<Double> arrayBody, final ServiceCallback<Void> serviceCallback) { if (arrayBody == null) { serviceCallback.failure(new ServiceException( new IllegalArgumentException(STR))); }
/** * Set array value [0, -0.01, 1.2e20] * * @param arrayBody the List&lt;Double&gt; value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. */
Set array value [0, -0.01, 1.2e20]
putFloatValidAsync
{ "repo_name": "BretJohnson/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayImpl.java", "license": "mit", "size": 128720 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceException", "com.squareup.okhttp.ResponseBody", "java.util.List" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceException; import com.squareup.okhttp.ResponseBody; import java.util.List;
import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.util.*;
[ "com.microsoft.rest", "com.squareup.okhttp", "java.util" ]
com.microsoft.rest; com.squareup.okhttp; java.util;
1,406,147
public DataSetBuilder sequence(String column, Date initial, int step) { ensureArgNotNull(initial); return sequence(column, initial, d -> new Date(d.getTime() + step * MILLIS_PER_DAY)); }
DataSetBuilder function(String column, Date initial, int step) { ensureArgNotNull(initial); return sequence(column, initial, d -> new Date(d.getTime() + step * MILLIS_PER_DAY)); }
/** * Set {@link Date} sequence filler for column * with a specified step in days. * * <p> * A call to this method is shorthand for * <code>sequence(column, initial, d -&gt; new Date(x.getTime() + step * MILLIS_PER_DAY))</code>. * </p> * * @param column Column day. * @param initial Init...
Set <code>Date</code> sequence filler for column with a specified step in days. A call to this method is shorthand for <code>sequence(column, initial, d -&gt; new Date(x.getTime() + step * MILLIS_PER_DAY))</code>.
sequence
{ "repo_name": "edrdo/jdbdt", "path": "src/main/java/org/jdbdt/DataSetBuilder.java", "license": "mit", "size": 32912 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,840,195
static void releaseBuffer(ByteBuffer bb, DMStats stats, boolean send) { if (TCPConduit.useDirectBuffers) { BBSoftReference bbRef = new BBSoftReference(bb, send); bufferQueue.offer(bbRef); } else { if(send) { stats.incSenderBufferSize(-bb.capacity(), false); } else { sta...
static void releaseBuffer(ByteBuffer bb, DMStats stats, boolean send) { if (TCPConduit.useDirectBuffers) { BBSoftReference bbRef = new BBSoftReference(bb, send); bufferQueue.offer(bbRef); } else { if(send) { stats.incSenderBufferSize(-bb.capacity(), false); } else { stats.incReceiverBufferSize(-bb.capacity(), false); }...
/** * Releases a previously acquired buffer. */
Releases a previously acquired buffer
releaseBuffer
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Buffers.java", "license": "apache-2.0", "size": 5265 }
[ "com.gemstone.gemfire.distributed.internal.DMStats", "java.nio.ByteBuffer" ]
import com.gemstone.gemfire.distributed.internal.DMStats; import java.nio.ByteBuffer;
import com.gemstone.gemfire.distributed.internal.*; import java.nio.*;
[ "com.gemstone.gemfire", "java.nio" ]
com.gemstone.gemfire; java.nio;
127,979
public void writeText(Text text) throws XMLStreamException { consumer.add(createCharacters(text)); }
void function(Text text) throws XMLStreamException { consumer.add(createCharacters(text)); }
/** * Writes a DOM4J {@link Text}to the stream. * * @param text * The {@link Text}to write to the stream. * * @throws XMLStreamException * If an error occurs writing to the stream. */
Writes a DOM4J <code>Text</code>to the stream
writeText
{ "repo_name": "teslaworksumn/lightshow-visualizer", "path": "lib/dom4j-1.6.1/src/java/org/dom4j/io/STAXEventWriter.java", "license": "mit", "size": 22138 }
[ "javax.xml.stream.XMLStreamException", "org.dom4j.Text" ]
import javax.xml.stream.XMLStreamException; import org.dom4j.Text;
import javax.xml.stream.*; import org.dom4j.*;
[ "javax.xml", "org.dom4j" ]
javax.xml; org.dom4j;
1,532,652
public long lastLongKey() { if ( size == 0 ) throw new NoSuchElementException(); return key[ last ]; } public LongComparator comparator() { return null; }
long function() { if ( size == 0 ) throw new NoSuchElementException(); return key[ last ]; } public LongComparator comparator() { return null; }
/** Returns the last key of this map in iteration order. * * @return the last key in iteration order. */
Returns the last key of this map in iteration order
lastLongKey
{ "repo_name": "karussell/fastutil", "path": "src/it/unimi/dsi/fastutil/longs/Long2IntLinkedOpenHashMap.java", "license": "apache-2.0", "size": 48241 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,547,780
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "lamaken/visualk", "path": "src/java/visualk/art/Arab.java", "license": "gpl-3.0", "size": 5786 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
92,305
public static <T> ValueBuilder bodyAs(Class<T> type) { return Builder.bodyAs(type); }
static <T> ValueBuilder function(Class<T> type) { return Builder.bodyAs(type); }
/** * Returns a predicate and value builder for the inbound message body as a * specific type */
Returns a predicate and value builder for the inbound message body as a specific type
bodyAs
{ "repo_name": "logzio/camel", "path": "camel-core/src/test/java/org/apache/camel/TestSupport.java", "license": "apache-2.0", "size": 18340 }
[ "org.apache.camel.builder.Builder", "org.apache.camel.builder.ValueBuilder" ]
import org.apache.camel.builder.Builder; import org.apache.camel.builder.ValueBuilder;
import org.apache.camel.builder.*;
[ "org.apache.camel" ]
org.apache.camel;
570,280
protected void addOutput__oYawBrakeCommandPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CtrlUnit122_Output__oYawBrakeCommand_feature"), ...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), WTSpecPackage.eINSTANCE.getCtrlUnit122_Output__oYawBrakeCommand(), true, false, true, null, null,...
/** * This adds a property descriptor for the Output oYaw Brake Command feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Output oYaw Brake Command feature.
addOutput__oYawBrakeCommandPropertyDescriptor
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/ikerlanEMF.edit/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/provider/CtrlUnit122ItemProvider.java", "license": "epl-1.0", "size": 10672 }
[ "eu.mondo.collaboration.operationtracemodel.example.WTSpec", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import eu.mondo.collaboration.operationtracemodel.example.WTSpec; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import eu.mondo.collaboration.operationtracemodel.example.*; import org.eclipse.emf.edit.provider.*;
[ "eu.mondo.collaboration", "org.eclipse.emf" ]
eu.mondo.collaboration; org.eclipse.emf;
840,440
private Fragment getCurrentFragment() { return movieDetailsSlideAdapter.getRegisteredFragment(mViewPager.getCurrentItem()); }
Fragment function() { return movieDetailsSlideAdapter.getRegisteredFragment(mViewPager.getCurrentItem()); }
/** * Returns the current active fragment for the given position */
Returns the current active fragment for the given position
getCurrentFragment
{ "repo_name": "Bulforce/moviedb-android", "path": "app/src/main/java/de/sourcestream/movieDB/controller/MovieDetails.java", "license": "apache-2.0", "size": 82182 }
[ "android.app.Fragment" ]
import android.app.Fragment;
import android.app.*;
[ "android.app" ]
android.app;
264,608