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
void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
/** * Adds a new {@code PropertyChangeListener} on a specific property. * * @param propertyName * The listened property. * @param listener * The added listener. * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(String, * PropertyChangeListener) */
Adds a new PropertyChangeListener on a specific property
addPropertyChangeListener
{ "repo_name": "jspresso/jspresso-ce", "path": "util/src/main/java/org/jspresso/framework/util/bean/IPropertyChangeCapable.java", "license": "lgpl-3.0", "size": 5389 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
2,089,183
public void showSelectionDialog(Activity activity, CharSequence title, TrackInfo trackInfo, int rendererIndex) { this.trackInfo = trackInfo; this.rendererIndex = rendererIndex; trackGroups = trackInfo.getTrackGroups(rendererIndex); trackGroupsAdaptive = new boolean[trackGroups.length]; for ...
void function(Activity activity, CharSequence title, TrackInfo trackInfo, int rendererIndex) { this.trackInfo = trackInfo; this.rendererIndex = rendererIndex; trackGroups = trackInfo.getTrackGroups(rendererIndex); trackGroupsAdaptive = new boolean[trackGroups.length]; for (int i = 0; i < trackGroups.length; i++) { trac...
/** * Shows the selection dialog for a given renderer. * * @param activity The parent activity. * @param title The dialog's title. * @param trackInfo The current track information. * @param rendererIndex The index of the renderer. */
Shows the selection dialog for a given renderer
showSelectionDialog
{ "repo_name": "Ood-Tsen/ExoPlayer", "path": "demo/src/main/java/com/google/android/exoplayer2/demo/TrackSelectionHelper.java", "license": "apache-2.0", "size": 13507 }
[ "android.app.Activity", "android.app.AlertDialog", "android.view.LayoutInflater", "com.google.android.exoplayer2.RendererCapabilities", "com.google.android.exoplayer2.trackselection.MappingTrackSelector" ]
import android.app.Activity; import android.app.AlertDialog; import android.view.LayoutInflater; import com.google.android.exoplayer2.RendererCapabilities; import com.google.android.exoplayer2.trackselection.MappingTrackSelector;
import android.app.*; import android.view.*; import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.trackselection.*;
[ "android.app", "android.view", "com.google.android" ]
android.app; android.view; com.google.android;
698,447
public static Matcher<Rectangle2D> is(Rectangle2D expectedRectangle) { return new TypeSafeMatcher<Rectangle2D>() { private final static double EPSILON = 0.0000001;
static Matcher<Rectangle2D> function(Rectangle2D expectedRectangle) { return new TypeSafeMatcher<Rectangle2D>() { private final static double EPSILON = 0.0000001;
/** * Creates a matcher for Rectangle2D which correctly compares floating point values. */
Creates a matcher for Rectangle2D which correctly compares floating point values
is
{ "repo_name": "Strachu/VirtualSlideViewer", "path": "test/virtualslideviewer/testutils/TestUtil.java", "license": "gpl-3.0", "size": 3772 }
[ "java.awt.geom.Rectangle2D", "org.hamcrest.Matcher", "org.hamcrest.TypeSafeMatcher" ]
import java.awt.geom.Rectangle2D; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher;
import java.awt.geom.*; import org.hamcrest.*;
[ "java.awt", "org.hamcrest" ]
java.awt; org.hamcrest;
2,090,502
public boolean isUnbounded() { return constraints.isEmpty(); } private static class EntityPredicate<E> implements Predicate<E> { private final List<Map.Entry<Schema.Field, Predicate>> predicatesByField; private final EntityAccessor<E> accessor; @SuppressWarnings("unchecked") public Entity...
boolean function() { return constraints.isEmpty(); } private static class EntityPredicate<E> implements Predicate<E> { private final List<Map.Entry<Schema.Field, Predicate>> predicatesByField; private final EntityAccessor<E> accessor; @SuppressWarnings(STR) public EntityPredicate(Map<String, Predicate> predicates, Sche...
/** * Returns true if there are no constraints. * * @return {@code true} if there are no constraints, {@code false} otherwise */
Returns true if there are no constraints
isUnbounded
{ "repo_name": "EdwardSkoviak/kite", "path": "kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/Constraints.java", "license": "apache-2.0", "size": 28300 }
[ "com.google.common.base.Predicate", "com.google.common.collect.ImmutableList", "com.google.common.collect.Maps", "java.util.List", "java.util.Map", "org.apache.avro.Schema", "org.kitesdk.data.PartitionStrategy", "org.kitesdk.data.impl.Accessor", "org.kitesdk.data.spi.partition.ProvidedFieldPartition...
import com.google.common.base.Predicate; import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; import java.util.List; import java.util.Map; import org.apache.avro.Schema; import org.kitesdk.data.PartitionStrategy; import org.kitesdk.data.impl.Accessor; import org.kitesdk.data.spi.partit...
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.avro.*; import org.kitesdk.data.*; import org.kitesdk.data.impl.*; import org.kitesdk.data.spi.partition.*;
[ "com.google.common", "java.util", "org.apache.avro", "org.kitesdk.data" ]
com.google.common; java.util; org.apache.avro; org.kitesdk.data;
1,487,237
public static String decipher( final String cipherText, final Cipher cipher, final int saltSize, final byte[] key ) { // Base64 decode final byte[] cipherdata = decode( cipherText ); if ( ( key != null ) && ( key.length > 0 ) ) { cipher.init( key ); } else { // use the default ke...
static String function( final String cipherText, final Cipher cipher, final int saltSize, final byte[] key ) { final byte[] cipherdata = decode( cipherText ); if ( ( key != null ) && ( key.length > 0 ) ) { cipher.init( key ); } else { cipher.init( DEFAULT_IV ); } final byte[] saltedData = cipher.decrypt( cipherdata ); ...
/** * Decipher the given text using the given cipher, key and assume the data is * prepended with the given number of bytes of random data. * * @param cipherText the text to decipher * @param cipher the cipher to use * @param saltSize number of bytes (of salt) to remove from the front of the c...
Decipher the given text using the given cipher, key and assume the data is prepended with the given number of bytes of random data
decipher
{ "repo_name": "sdcote/loader", "path": "src/main/java/coyote/commons/CipherUtil.java", "license": "mit", "size": 26258 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
178,735
String prepareReloadSitemap(CmsUUID rootId, EditorMode mode) throws CmsRpcException;
String prepareReloadSitemap(CmsUUID rootId, EditorMode mode) throws CmsRpcException;
/** * Prepares sitemap reloading for the given sitemap root.<p> * * This method may change the currently set site root. If the given root id is not in a valid site, * null will be returned, otherwise the URL which the client should use to reload the sitemap will be returned. * * @param roo...
Prepares sitemap reloading for the given sitemap root. This method may change the currently set site root. If the given root id is not in a valid site, null will be returned, otherwise the URL which the client should use to reload the sitemap will be returned
prepareReloadSitemap
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ade/sitemap/shared/rpc/I_CmsSitemapService.java", "license": "lgpl-2.1", "size": 14007 }
[ "org.opencms.ade.sitemap.shared.CmsSitemapData", "org.opencms.gwt.CmsRpcException", "org.opencms.util.CmsUUID" ]
import org.opencms.ade.sitemap.shared.CmsSitemapData; import org.opencms.gwt.CmsRpcException; import org.opencms.util.CmsUUID;
import org.opencms.ade.sitemap.shared.*; import org.opencms.gwt.*; import org.opencms.util.*;
[ "org.opencms.ade", "org.opencms.gwt", "org.opencms.util" ]
org.opencms.ade; org.opencms.gwt; org.opencms.util;
1,032,861
public static void writeToFile(String string, boolean isAppend) { String path = Environment.getExternalStorageDirectory() + File.separator + MYTRACKS_TEST_INFO_FILE; try { FileOutputStream fileOutputStream = new FileOutputStream(new File(path), isAppend); OutputStreamWriter osw = new Outpu...
static void function(String string, boolean isAppend) { String path = Environment.getExternalStorageDirectory() + File.separator + MYTRACKS_TEST_INFO_FILE; try { FileOutputStream fileOutputStream = new FileOutputStream(new File(path), isAppend); OutputStreamWriter osw = new OutputStreamWriter(fileOutputStream); try { o...
/** * Writes a string to battery info file. This method would add a time string * before the given value. * * @param string string to write * @param isAppend true means append to file */
Writes a string to battery info file. This method would add a time string before the given value
writeToFile
{ "repo_name": "Plonk42/mytracks", "path": "myTracks/src/androidTest/java/com/google/android/apps/mytracks/endtoendtest/others/BigTestUtils.java", "license": "apache-2.0", "size": 5627 }
[ "android.os.Environment", "android.util.Log", "java.io.File", "java.io.FileOutputStream", "java.io.OutputStreamWriter" ]
import android.os.Environment; import android.util.Log; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter;
import android.os.*; import android.util.*; import java.io.*;
[ "android.os", "android.util", "java.io" ]
android.os; android.util; java.io;
2,678,521
public void deleteRow () throws SQLException { validateResultSet(); resultSet_.deleteRow(); }
void function () throws SQLException { validateResultSet(); resultSet_.deleteRow(); }
/** * Deletes the current row from the result set and the database. * After deleting a row, the cursor position is no longer valid, * so it must be explicitly repositioned. * * @exception SQLException If the result set is not open, * the result set is not updatable, ...
Deletes the current row from the result set and the database. After deleting a row, the cursor position is no longer valid, so it must be explicitly repositioned
deleteRow
{ "repo_name": "piguangming/jt400", "path": "cvsroot/src/com/ibm/as400/access/AS400JDBCRowSet.java", "license": "epl-1.0", "size": 311708 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,810,326
static public void displayError( final String title, final String prefix, final Exception exception ) { Toolkit.getDefaultToolkit().beep(); String message = prefix + "\n" + "Exception: " + exception.getClass().getName() + "\n" + exception.getMessage(); JOptionPane.showMessageDialog( getActiv...
static void function( final String title, final String prefix, final Exception exception ) { Toolkit.getDefaultToolkit().beep(); String message = prefix + "\n" + STR + exception.getClass().getName() + "\n" + exception.getMessage(); JOptionPane.showMessageDialog( getActiveWindow(), message, title, JOptionPane.ERROR_MESS...
/** * Display an error dialog box with information about the exception. This method allows * clarification about the consequences of the exception (e.g. "Save Failed:"). * @param title Title of the warning dialog box. * @param prefix Text that should appear in the dialog box before the exception me...
Display an error dialog box with information about the exception. This method allows clarification about the consequences of the exception (e.g. "Save Failed:")
displayError
{ "repo_name": "openxal/openxal", "path": "core/src/xal/tools/apputils/ApplicationSupport.java", "license": "bsd-3-clause", "size": 5359 }
[ "java.awt.Toolkit", "javax.swing.JOptionPane" ]
import java.awt.Toolkit; import javax.swing.JOptionPane;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
149,521
T[] getServices() { List<T> serv = new ArrayList<>(getServiceList()); @SuppressWarnings("unchecked") T[] array = (T[]) Array.newInstance(trackedClass, serv.size()); return serv.toArray(array); }
T[] getServices() { List<T> serv = new ArrayList<>(getServiceList()); @SuppressWarnings(STR) T[] array = (T[]) Array.newInstance(trackedClass, serv.size()); return serv.toArray(array); }
/** * Get the service as a snapshot array. * * @return An array with services. Note that this is, in contrast to the other * variants, a snapshot taking state of the status of the available services. */
Get the service as a snapshot array
getServices
{ "repo_name": "arievanwi/osgi.ee", "path": "osgi.ee.extender.cdi/src/osgi/extender/cdi/extension/Tracker.java", "license": "apache-2.0", "size": 8578 }
[ "java.lang.reflect.Array", "java.util.ArrayList", "java.util.List" ]
import java.lang.reflect.Array; import java.util.ArrayList; import java.util.List;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
370,251
static ColumnPage newDecimalColumnPage(byte[] lvEncodedBytes, int scale, int precision) throws MemoryException { DecimalConverterFactory.DecimalConverter decimalConverter = DecimalConverterFactory.INSTANCE.getDecimalConverter(precision, scale); int size = decimalConverter.getSize(); if (size...
static ColumnPage newDecimalColumnPage(byte[] lvEncodedBytes, int scale, int precision) throws MemoryException { DecimalConverterFactory.DecimalConverter decimalConverter = DecimalConverterFactory.INSTANCE.getDecimalConverter(precision, scale); int size = decimalConverter.getSize(); if (size < 0) { return getLVBytesCol...
/** * Create a new column page based on the LV (Length Value) encoded bytes */
Create a new column page based on the LV (Length Value) encoded bytes
newDecimalColumnPage
{ "repo_name": "shivangi1015/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java", "license": "apache-2.0", "size": 10316 }
[ "org.apache.carbondata.core.memory.MemoryException", "org.apache.carbondata.core.metadata.datatype.DataType", "org.apache.carbondata.core.metadata.datatype.DecimalConverterFactory" ]
import org.apache.carbondata.core.memory.MemoryException; import org.apache.carbondata.core.metadata.datatype.DataType; import org.apache.carbondata.core.metadata.datatype.DecimalConverterFactory;
import org.apache.carbondata.core.memory.*; import org.apache.carbondata.core.metadata.datatype.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
2,673,277
public long durationInSeconds() { return ChronoUnit.SECONDS.between(from, to); }
long function() { return ChronoUnit.SECONDS.between(from, to); }
/** * Duration between {@code from} and {@code to} in seconds. * * @return duration in seconds */
Duration between from and to in seconds
durationInSeconds
{ "repo_name": "biggis-project/path-optimizer", "path": "src/main/java/joachimrussig/heatstressrouting/util/TimeRange.java", "license": "mit", "size": 3397 }
[ "java.time.temporal.ChronoUnit" ]
import java.time.temporal.ChronoUnit;
import java.time.temporal.*;
[ "java.time" ]
java.time;
1,877,895
@Message(id = 276, value = "EJBComponent has not been set in the current invocation context %s") IllegalStateException failToGetEjbComponent(InterceptorContext currentInvocationContext);
@Message(id = 276, value = STR) IllegalStateException failToGetEjbComponent(InterceptorContext currentInvocationContext);
/** * Creates an exception indicating EJBComponent has not been set in the current invocation context * * @return an {@link IllegalStateException} for the error. */
Creates an exception indicating EJBComponent has not been set in the current invocation context
failToGetEjbComponent
{ "repo_name": "xasx/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 147231 }
[ "org.jboss.invocation.InterceptorContext", "org.jboss.logging.annotations.Message" ]
import org.jboss.invocation.InterceptorContext; import org.jboss.logging.annotations.Message;
import org.jboss.invocation.*; import org.jboss.logging.annotations.*;
[ "org.jboss.invocation", "org.jboss.logging" ]
org.jboss.invocation; org.jboss.logging;
49,826
public void sendCaptcha(Player player, ChatConfig cc, ChatData data);
void function(Player player, ChatConfig cc, ChatData data);
/** * Just send the current captcha to the player. * @param player * @param cc * @param data */
Just send the current captcha to the player
sendCaptcha
{ "repo_name": "NoCheatPlus/NoCheatPlus", "path": "NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/chat/ICaptcha.java", "license": "gpl-3.0", "size": 3040 }
[ "org.bukkit.entity.Player" ]
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
1,597,345
public CustomModeISBuilder add(PartitionId partitionId) { if (partitionId != null) { add(partitionId.stringify()); } return this; }
CustomModeISBuilder function(PartitionId partitionId) { if (partitionId != null) { add(partitionId.stringify()); } return this; }
/** * Add a sub-resource * @param partitionId partition to add * @return CustomModeISBuilder */
Add a sub-resource
add
{ "repo_name": "Teino1978-Corp/Teino1978-Corp-helix", "path": "helix-core/src/main/java/org/apache/helix/model/builder/CustomModeISBuilder.java", "license": "apache-2.0", "size": 3334 }
[ "org.apache.helix.api.id.PartitionId" ]
import org.apache.helix.api.id.PartitionId;
import org.apache.helix.api.id.*;
[ "org.apache.helix" ]
org.apache.helix;
648,778
byte readByte() throws IOException { mDexFile.readFully(tmpBuf, 0, 1); return tmpBuf[0]; }
byte readByte() throws IOException { mDexFile.readFully(tmpBuf, 0, 1); return tmpBuf[0]; }
/** * Reads a single signed byte value. */
Reads a single signed byte value
readByte
{ "repo_name": "RyanTech/DexHunter", "path": "dalvik/tools/dexdeps/src/com/android/dexdeps/DexData.java", "license": "apache-2.0", "size": 19834 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
109,416
super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); if (ApplicationState.isFirstLaunch()) { ApplicationState.startup(this); } Log.i("HomeActivity", "Startup done"); loggedIn = ApplicationState.isLoggedIn(); if (loggedIn) { account = ApplicationState.getAccount(); ...
super.onCreate(savedInstanceState); setContentView(R.layout.activity_home); if (ApplicationState.isFirstLaunch()) { ApplicationState.startup(this); } Log.i(STR, STR); loggedIn = ApplicationState.isLoggedIn(); if (loggedIn) { account = ApplicationState.getAccount(); } Log.i(STR, STR); homeListView = (ListView) findViewB...
/** * Initializes the listview, ArrayList that holds the questions, the adapter * and an instance of an account. Also has a listener that opens a question * when a question is clicked. * * @see android.app.Activity#onCreate(android.os.Bundle) */
Initializes the listview, ArrayList that holds the questions, the adapter and an instance of an account. Also has a listener that opens a question when a question is clicked
onCreate
{ "repo_name": "CMPUT301F14T04/Funtime-Runtime-Project", "path": "Funtime-Runtime/src/ca/ualberta/cs/funtime_runtime/HomeActivity.java", "license": "gpl-3.0", "size": 7724 }
[ "android.util.Log", "android.widget.ListView", "ca.ualberta.cs.funtime_runtime.adapter.QuestionListAdapter", "ca.ualberta.cs.funtime_runtime.classes.ApplicationState", "ca.ualberta.cs.funtime_runtime.classes.QuestionSorter" ]
import android.util.Log; import android.widget.ListView; import ca.ualberta.cs.funtime_runtime.adapter.QuestionListAdapter; import ca.ualberta.cs.funtime_runtime.classes.ApplicationState; import ca.ualberta.cs.funtime_runtime.classes.QuestionSorter;
import android.util.*; import android.widget.*; import ca.ualberta.cs.funtime_runtime.adapter.*; import ca.ualberta.cs.funtime_runtime.classes.*;
[ "android.util", "android.widget", "ca.ualberta.cs" ]
android.util; android.widget; ca.ualberta.cs;
446,184
public static String encodeToString(Cursor info, ZoneId zoneId) { return encodeToString(info, VERSION, zoneId); }
static String function(Cursor info, ZoneId zoneId) { return encodeToString(info, VERSION, zoneId); }
/** * Write a {@linkplain Cursor} to a string for serialization across xcontent. */
Write a Cursor to a string for serialization across xcontent
encodeToString
{ "repo_name": "ern/elasticsearch", "path": "x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/session/Cursors.java", "license": "apache-2.0", "size": 4366 }
[ "java.time.ZoneId" ]
import java.time.ZoneId;
import java.time.*;
[ "java.time" ]
java.time;
312,635
protected static void addIdentifier(String ident, Class<?>[] mcstrSig, Class<? extends Node> nodetype, Class<? extends ComposableRecordReader> cl) throws NoSuchMethodException { Constructor<? extends Node> ncstr = nodetype.getDeclared...
static void function(String ident, Class<?>[] mcstrSig, Class<? extends Node> nodetype, Class<? extends ComposableRecordReader> cl) throws NoSuchMethodException { Constructor<? extends Node> ncstr = nodetype.getDeclaredConstructor(ncstrSig); ncstr.setAccessible(true); nodeCstrMap.put(ident, ncstr); Constructor<? extend...
/** * For a given identifier, add a mapping to the nodetype for the parse * tree and to the ComposableRecordReader to be created, including the * formals required to invoke the constructor. * The nodetype and constructor signature should be filled in from the * child node. */
For a given identifier, add a mapping to the nodetype for the parse tree and to the ComposableRecordReader to be created, including the formals required to invoke the constructor. The nodetype and constructor signature should be filled in from the child node
addIdentifier
{ "repo_name": "steveloughran/hadoop-mapreduce", "path": "src/java/org/apache/hadoop/mapreduce/lib/join/Parser.java", "license": "apache-2.0", "size": 18459 }
[ "java.lang.reflect.Constructor", "org.apache.hadoop.io.WritableComparator" ]
import java.lang.reflect.Constructor; import org.apache.hadoop.io.WritableComparator;
import java.lang.reflect.*; import org.apache.hadoop.io.*;
[ "java.lang", "org.apache.hadoop" ]
java.lang; org.apache.hadoop;
592,800
public OutputAnalyzer shouldNotMatch(String pattern) { Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout); if (matcher.find()) { reportDiagnosticSummary(); throw new RuntimeException("'" + pattern + "' found in stdout: '" + matcher.group() +...
OutputAnalyzer function(String pattern) { Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout); if (matcher.find()) { reportDiagnosticSummary(); throw new RuntimeException("'" + pattern + STR + matcher.group() + STR); } matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr); if (...
/** * Verify that the stdout and stderr contents of output buffer does not * match the pattern * * @param pattern * @throws RuntimeException If the pattern was found */
Verify that the stdout and stderr contents of output buffer does not match the pattern
shouldNotMatch
{ "repo_name": "lizhekang/TCJDK", "path": "sources/openjdk8/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java", "license": "gpl-2.0", "size": 11592 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
748,170
public static MozuClient<com.mozu.api.contracts.productruntime.CategoryCollection> getCategoryTreeClient(String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.storefront.CategoryUrl.getCategoryTreeUrl(responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contra...
static MozuClient<com.mozu.api.contracts.productruntime.CategoryCollection> function(String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.storefront.CategoryUrl.getCategoryTreeUrl(responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.productruntime.CategoryCol...
/** * Retrieves the list of product categories that appear on the storefront organized in a hierarchical format. Hidden categories do not appear in the list. * <p><pre><code> * MozuClient<com.mozu.api.contracts.productruntime.CategoryCollection> mozuClient=GetCategoryTreeClient( responseFields); * client.setBas...
Retrieves the list of product categories that appear on the storefront organized in a hierarchical format. Hidden categories do not appear in the list. <code><code> MozuClient mozuClient=GetCategoryTreeClient( responseFields); client.setBaseAddress(url); client.executeRequest(); CategoryCollection categoryCollection = ...
getCategoryTreeClient
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/storefront/CategoryClient.java", "license": "mit", "size": 8332 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
929,805
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public <T> LiveData<T> createLiveData(String[] tableNames, boolean inTransaction, Callable<T> computeFunction) { return mInvalidationLiveDataContainer.create( validateAndResolveTableNames(tableNames), inTransaction, computeFu...
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX) <T> LiveData<T> function(String[] tableNames, boolean inTransaction, Callable<T> computeFunction) { return mInvalidationLiveDataContainer.create( validateAndResolveTableNames(tableNames), inTransaction, computeFunction); } @SuppressWarnings(STR) static class ObserverWr...
/** * Creates a LiveData that computes the given function once and for every other invalidation * of the database. * <p> * Holds a strong reference to the created LiveData as long as it is active. * * @param tableNames The list of tables to observe * @param inTransaction True i...
Creates a LiveData that computes the given function once and for every other invalidation of the database. Holds a strong reference to the created LiveData as long as it is active
createLiveData
{ "repo_name": "AndroidX/androidx", "path": "room/room-runtime/src/main/java/androidx/room/InvalidationTracker.java", "license": "apache-2.0", "size": 35199 }
[ "androidx.annotation.RestrictTo", "androidx.lifecycle.LiveData", "java.util.Collections", "java.util.HashSet", "java.util.Set", "java.util.concurrent.Callable" ]
import androidx.annotation.RestrictTo; import androidx.lifecycle.LiveData; import java.util.Collections; import java.util.HashSet; import java.util.Set; import java.util.concurrent.Callable;
import androidx.annotation.*; import androidx.lifecycle.*; import java.util.*; import java.util.concurrent.*;
[ "androidx.annotation", "androidx.lifecycle", "java.util" ]
androidx.annotation; androidx.lifecycle; java.util;
2,341,450
protected void sequence_ExitStatement_PragmaList(ISerializationContext context, ExitStatement semanticObject) { genericSequencer.createSequence(context, semanticObject); } /** * Contexts: * AssignStatement returns FileNameLiteral * AssignStatement.AssignStatement_1_0 returns FileNameLiteral *...
void function(ISerializationContext context, ExitStatement semanticObject) { genericSequencer.createSequence(context, semanticObject); } /** * Contexts: * AssignStatement returns FileNameLiteral * AssignStatement.AssignStatement_1_0 returns FileNameLiteral * ConstExpression returns FileNameLiteral * Expression returns ...
/** * Contexts: * Statement returns ExitStatement * * Constraint: * (condition=Expression? pragmas+=Pragma*) */
Contexts: Statement returns ExitStatement Constraint: (condition=Expression? pragmas+=Pragma*)
sequence_ExitStatement_PragmaList
{ "repo_name": "perojonsson/bridgepoint", "path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/src-gen/org/xtuml/bp/xtext/masl/serializer/MASLSemanticSequencer.java", "license": "apache-2.0", "size": 376780 }
[ "org.eclipse.xtext.serializer.ISerializationContext", "org.xtuml.bp.xtext.masl.masl.behavior.ActionCall", "org.xtuml.bp.xtext.masl.masl.behavior.AdditiveExp", "org.xtuml.bp.xtext.masl.masl.behavior.AssignStatement", "org.xtuml.bp.xtext.masl.masl.behavior.CharacteristicCall", "org.xtuml.bp.xtext.masl.masl....
import org.eclipse.xtext.serializer.ISerializationContext; import org.xtuml.bp.xtext.masl.masl.behavior.ActionCall; import org.xtuml.bp.xtext.masl.masl.behavior.AdditiveExp; import org.xtuml.bp.xtext.masl.masl.behavior.AssignStatement; import org.xtuml.bp.xtext.masl.masl.behavior.CharacteristicCall; import org.xtuml.bp...
import org.eclipse.xtext.serializer.*; import org.xtuml.bp.xtext.masl.masl.behavior.*;
[ "org.eclipse.xtext", "org.xtuml.bp" ]
org.eclipse.xtext; org.xtuml.bp;
1,452,173
@Override protected JsonObject createJsonObject(SimpleJsonValue object) { return new SimpleJsonObjectImpl(object); }
JsonObject function(SimpleJsonValue object) { return new SimpleJsonObjectImpl(object); }
/** * Create a JSON object with the given underlying JSON object. * * @param object The underlying JSON object. * @return The JSON object. */
Create a JSON object with the given underlying JSON object
createJsonObject
{ "repo_name": "kjots/json-toolkit", "path": "json-object.simple/src/test/java/org/kjots/json/object/simple/impl/SimpleJsonObjectMapImplTest.java", "license": "apache-2.0", "size": 3328 }
[ "org.kjots.json.object.shared.JsonObject", "org.kjots.json.object.simple.SimpleJsonValue" ]
import org.kjots.json.object.shared.JsonObject; import org.kjots.json.object.simple.SimpleJsonValue;
import org.kjots.json.object.shared.*; import org.kjots.json.object.simple.*;
[ "org.kjots.json" ]
org.kjots.json;
919,772
public int isLanguageAvailable(String lang, String country, String variant, String[] params) { for (int i = 0; i < params.length - 1; i = i + 2){ String param = params[i]; if (param != null) { if (param.equals(TextToSpeech.Engine.KE...
int function(String lang, String country, String variant, String[] params) { for (int i = 0; i < params.length - 1; i = i + 2){ String param = params[i]; if (param != null) { if (param.equals(TextToSpeech.Engine.KEY_PARAM_ENGINE)) { mSelf.setEngine(params[i + 1]); break; } } } return mSelf.isLanguageAvailable(lang, cou...
/** * Returns the level of support for the specified language. * * @param lang the three letter ISO language code. * @param country the three letter ISO country code. * @param variant the variant code associated with the country and language pair. * @return one o...
Returns the level of support for the specified language
isLanguageAvailable
{ "repo_name": "mateor/pdroid", "path": "android-2.3.4_r1/tags/1.32/frameworks/base/packages/TtsService/src/android/tts/TtsService.java", "license": "gpl-3.0", "size": 60702 }
[ "android.speech.tts.TextToSpeech" ]
import android.speech.tts.TextToSpeech;
import android.speech.tts.*;
[ "android.speech" ]
android.speech;
929,619
public static void cleanup(UserAuthenticationData authData) { if (authData == null) { return; } authData.cleanup(); }
static void function(UserAuthenticationData authData) { if (authData == null) { return; } authData.cleanup(); }
/** * cleanup the data in the UerAuthenticationData (null safe). * @param authData The UserAuthenticationDAta. */
cleanup the data in the UerAuthenticationData (null safe)
cleanup
{ "repo_name": "raviu/wso2-commons-vfs", "path": "core/src/main/java/org/apache/commons/vfs2/util/UserAuthenticatorUtils.java", "license": "apache-2.0", "size": 4377 }
[ "org.apache.commons.vfs2.UserAuthenticationData" ]
import org.apache.commons.vfs2.UserAuthenticationData;
import org.apache.commons.vfs2.*;
[ "org.apache.commons" ]
org.apache.commons;
1,975,307
private void handleHttpQuery(final Channel chan, final HttpRequest req) { http_rpcs_received.incrementAndGet(); final HttpQuery query = new HttpQuery(req, chan); if (req.isChunked()) { logError(query, "Received an unsupported chunked request: " + query.request()); query.badReque...
void function(final Channel chan, final HttpRequest req) { http_rpcs_received.incrementAndGet(); final HttpQuery query = new HttpQuery(req, chan); if (req.isChunked()) { logError(query, STR + query.request()); query.badRequest(STR); return; } try { final HttpRpc rpc = http_commands.get(getEndPoint(query)); if (rpc != n...
/** * Finds the right handler for an HTTP query and executes it. * @param chan The channel on which the query was received. * @param req The parsed HTTP request. */
Finds the right handler for an HTTP query and executes it
handleHttpQuery
{ "repo_name": "box/opentsdb", "path": "src/net/opentsdb/tsd/RpcHandler.java", "license": "gpl-3.0", "size": 19302 }
[ "org.jboss.netty.channel.Channel", "org.jboss.netty.handler.codec.http.HttpRequest" ]
import org.jboss.netty.channel.Channel; import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.channel.*; import org.jboss.netty.handler.codec.http.*;
[ "org.jboss.netty" ]
org.jboss.netty;
928,048
public FlexoConcept getRelationalFlexoConcept(String conceptName, FlexoConcept fromConcept, FlexoConcept toConcept, FlexoEditor editor, FlexoAction<?, ?, ?> ownerAction) throws FlexoException;
FlexoConcept function(String conceptName, FlexoConcept fromConcept, FlexoConcept toConcept, FlexoEditor editor, FlexoAction<?, ?, ?> ownerAction) throws FlexoException;
/** * Return (creates when non-existant) a conceptual FlexoConcept in {@link VirtualModel} considered as conceptual model<br> * Created {@link FlexoConcept} will be designed as a concept reifing relationship between two other concepts * * @param conceptName * name of concept beeing created * @pa...
Return (creates when non-existant) a conceptual FlexoConcept in <code>VirtualModel</code> considered as conceptual model Created <code>FlexoConcept</code> will be designed as a concept reifing relationship between two other concepts
getRelationalFlexoConcept
{ "repo_name": "openflexo-team/openflexo-modules", "path": "freemodellingeditor/src/main/java/org/openflexo/fme/model/FMEConceptualModel.java", "license": "gpl-3.0", "size": 22618 }
[ "org.openflexo.foundation.FlexoEditor", "org.openflexo.foundation.FlexoException", "org.openflexo.foundation.action.FlexoAction", "org.openflexo.foundation.fml.FlexoConcept" ]
import org.openflexo.foundation.FlexoEditor; import org.openflexo.foundation.FlexoException; import org.openflexo.foundation.action.FlexoAction; import org.openflexo.foundation.fml.FlexoConcept;
import org.openflexo.foundation.*; import org.openflexo.foundation.action.*; import org.openflexo.foundation.fml.*;
[ "org.openflexo.foundation" ]
org.openflexo.foundation;
603,708
public void changeAccentuatedNote(TGMeasure measure,long start,int string){ TGNote note = getNote(measure,start,string); if(note != null){ note.getEffect().setAccentuatedNote(!note.getEffect().isAccentuatedNote()); } }
void function(TGMeasure measure,long start,int string){ TGNote note = getNote(measure,start,string); if(note != null){ note.getEffect().setAccentuatedNote(!note.getEffect().isAccentuatedNote()); } }
/** * Agrega un AccentuatedNote */
Agrega un AccentuatedNote
changeAccentuatedNote
{ "repo_name": "m-wichmann/tg2ly", "path": "src/org/herac/tuxguitar/song/managers/TGMeasureManager.java", "license": "lgpl-2.1", "size": 73407 }
[ "org.herac.tuxguitar.song.models.TGMeasure", "org.herac.tuxguitar.song.models.TGNote" ]
import org.herac.tuxguitar.song.models.TGMeasure; import org.herac.tuxguitar.song.models.TGNote;
import org.herac.tuxguitar.song.models.*;
[ "org.herac.tuxguitar" ]
org.herac.tuxguitar;
2,511,170
void setStreamingTextWidget(IStreamingTextWidget widget);
void setStreamingTextWidget(IStreamingTextWidget widget);
/** * This operation sets the IStreamingTextWidget that is updated by the * ItemProcessor. * * @param widget * The IStreamingTextWidget */
This operation sets the IStreamingTextWidget that is updated by the ItemProcessor
setStreamingTextWidget
{ "repo_name": "eclipse/ice", "path": "org.eclipse.ice.client/src/org/eclipse/ice/iclient/IItemProcessor.java", "license": "epl-1.0", "size": 5769 }
[ "org.eclipse.ice.iclient.uiwidgets.IStreamingTextWidget" ]
import org.eclipse.ice.iclient.uiwidgets.IStreamingTextWidget;
import org.eclipse.ice.iclient.uiwidgets.*;
[ "org.eclipse.ice" ]
org.eclipse.ice;
285,959
@Test public void testVersionedClientServerQuery() throws CacheException { final Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); VM vm3 = host.getVM(3); final int numberOfEntries = 10; final String[] queryStr = new String[] {"SELECT ...
void function() throws CacheException { final Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); VM vm3 = host.getVM(3); final int numberOfEntries = 10; final String[] queryStr = new String[] {STR + regName, STR + regName, STR + regName, STR + regName + STR, STR + regNa...
/** * Tests client-server query on PdxInstance. */
Tests client-server query on PdxInstance
testVersionedClientServerQuery
{ "repo_name": "PurelyApplied/geode", "path": "geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/PdxQueryDUnitTest.java", "license": "apache-2.0", "size": 140270 }
[ "org.apache.geode.cache.CacheException", "org.apache.geode.test.dunit.Host" ]
import org.apache.geode.cache.CacheException; import org.apache.geode.test.dunit.Host;
import org.apache.geode.cache.*; import org.apache.geode.test.dunit.*;
[ "org.apache.geode" ]
org.apache.geode;
2,190,035
public static FileSystem getInstance(Context context) { if (instance == null) { instance = new FileSystem(); } instance.context = context; return instance; }
static FileSystem function(Context context) { if (instance == null) { instance = new FileSystem(); } instance.context = context; return instance; }
/** * Gets the singleton instance of the class * @return The singleton instance of the class */
Gets the singleton instance of the class
getInstance
{ "repo_name": "ChickenF622/ipanotepad", "path": "src/main/java/com/mcoskerm/ipanotepad/FileSystem.java", "license": "apache-2.0", "size": 4116 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,393,282
public String toString(Period value) { final String str; if (value.isZero()) { str = "PT0S"; } else { StringBuilder buf = new StringBuilder(); buf.append('P'); if (value.getYears() != 0) { buf.append(value.getYears()).append('Y...
String function(Period value) { final String str; if (value.isZero()) { str = "PT0S"; } else { StringBuilder buf = new StringBuilder(); buf.append('P'); if (value.getYears() != 0) { buf.append(value.getYears()).append('Y'); } if (value.getMonths() != 0) { buf.append(value.getMonths()).append('M'); } if (value.getDays()...
/** * Returns a string representation of the amount of time. * @param value Period to convert to a String * @return the amount of time in ISO8601 string format */
Returns a string representation of the amount of time
toString
{ "repo_name": "harishpalk/Jadira", "path": "usertype.extended/src/main/java/org/jadira/usertype/dateandtime/threeten/columnmapper/StringColumnPeriodMapper.java", "license": "apache-2.0", "size": 1965 }
[ "java.time.Period" ]
import java.time.Period;
import java.time.*;
[ "java.time" ]
java.time;
1,784,391
public ByteBufferPool getBufferPool() { return bufferPool; }
ByteBufferPool function() { return bufferPool; }
/** * Get the buffer pool for this connection. * * @return the buffer pool for this connection */
Get the buffer pool for this connection
getBufferPool
{ "repo_name": "msfm/undertow", "path": "core/src/main/java/io/undertow/server/protocol/framed/AbstractFramedChannel.java", "license": "apache-2.0", "size": 44157 }
[ "io.undertow.connector.ByteBufferPool" ]
import io.undertow.connector.ByteBufferPool;
import io.undertow.connector.*;
[ "io.undertow.connector" ]
io.undertow.connector;
1,990,491
void rewardsWith(BigDecimal matchWeightTotal, String message);
void rewardsWith(BigDecimal matchWeightTotal, String message);
/** * As defined by {@link #rewardsWith(int)}. * * @param matchWeightTotal at least 0, expected sum of match weights of matches of the constraint. * @param message sometimes null, description of the scenario being asserted * @throws AssertionError when the expected reward is not observed *...
As defined by <code>#rewardsWith(int)</code>
rewardsWith
{ "repo_name": "tkobayas/optaplanner", "path": "optaplanner-test/src/main/java/org/optaplanner/test/api/score/stream/SingleConstraintAssertion.java", "license": "apache-2.0", "size": 9729 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,966,117
public static java.util.Set extractSession_SlotSet(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.SessionSlotWithStatusOnlyVoCollection voCollection) { return extractSession_SlotSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.SessionSlotWithStatusOnlyVoCollection voCollection) { return extractSession_SlotSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.scheduling.domain.objects.Session_Slot set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.scheduling.domain.objects.Session_Slot set from the value object collection
extractSession_SlotSet
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/scheduling/vo/domain/SessionSlotWithStatusOnlyVoAssembler.java", "license": "agpl-3.0", "size": 19266 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,551,214
public void removeInvalidTileEntity(BlockPos pos) { if (isChunkLoaded) { TileEntity entity = (TileEntity)chunkTileEntityMap.get(pos); if (entity != null && entity.isInvalid()) { chunkTileEntityMap.remove(pos); } } }
void function(BlockPos pos) { if (isChunkLoaded) { TileEntity entity = (TileEntity)chunkTileEntityMap.get(pos); if (entity != null && entity.isInvalid()) { chunkTileEntityMap.remove(pos); } } }
/** * Removes the tile entity at the specified position, only if it's * marked as invalid. */
Removes the tile entity at the specified position, only if it's marked as invalid
removeInvalidTileEntity
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraft/world/chunk/Chunk.java", "license": "gpl-3.0", "size": 53050 }
[ "net.minecraft.tileentity.TileEntity", "net.minecraft.util.math.BlockPos" ]
import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos;
import net.minecraft.tileentity.*; import net.minecraft.util.math.*;
[ "net.minecraft.tileentity", "net.minecraft.util" ]
net.minecraft.tileentity; net.minecraft.util;
618,687
@Override() public java.lang.Class getJavaClass( ) { return org.chocolate_milk.model.UnitOfMeasureSetRef.class; }
@Override() java.lang.Class function( ) { return org.chocolate_milk.model.UnitOfMeasureSetRef.class; }
/** * Method getJavaClass. * * @return the Java class represented by this descriptor. */
Method getJavaClass
getJavaClass
{ "repo_name": "galleon1/chocolate-milk", "path": "src/org/chocolate_milk/model/descriptors/UnitOfMeasureSetRefDescriptor.java", "license": "lgpl-3.0", "size": 5736 }
[ "org.chocolate_milk.model.UnitOfMeasureSetRef" ]
import org.chocolate_milk.model.UnitOfMeasureSetRef;
import org.chocolate_milk.model.*;
[ "org.chocolate_milk.model" ]
org.chocolate_milk.model;
181,586
@Override public void update() { delay --; if (delay != 0) return; if (getType() == EnumPumpType.VERTICAL) updateVertical(); else updateHorizontal(); delay = 20; }
void function() { delay --; if (delay != 0) return; if (getType() == EnumPumpType.VERTICAL) updateVertical(); else updateHorizontal(); delay = 20; }
/** * Like the old updateEntity(), except more generic. */
Like the old updateEntity(), except more generic
update
{ "repo_name": "SmithsGaming/Armory", "path": "src/main/com/smithsmodding/armory/common/tileentity/TileEntityPump.java", "license": "lgpl-3.0", "size": 5851 }
[ "com.smithsmodding.armory.common.block.types.EnumPumpType" ]
import com.smithsmodding.armory.common.block.types.EnumPumpType;
import com.smithsmodding.armory.common.block.types.*;
[ "com.smithsmodding.armory" ]
com.smithsmodding.armory;
53,546
public static void disableShufflingOfEndpoints() { // TODO DISABLE_RANDOM doesn't seem to be used anywhere System.setProperty(GeodeGlossary.GEMFIRE_PREFIX + "PoolImpl.DISABLE_RANDOM", "true"); System.setProperty(GeodeGlossary.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true"); }
static void function() { System.setProperty(GeodeGlossary.GEMFIRE_PREFIX + STR, "true"); System.setProperty(GeodeGlossary.GEMFIRE_PREFIX + STR, "true"); }
/** * Disables the shuffling of endpoints for a client */
Disables the shuffling of endpoints for a client
disableShufflingOfEndpoints
{ "repo_name": "davebarnes97/geode", "path": "geode-dunit/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheServerTestUtil.java", "license": "apache-2.0", "size": 23023 }
[ "org.apache.geode.util.internal.GeodeGlossary" ]
import org.apache.geode.util.internal.GeodeGlossary;
import org.apache.geode.util.internal.*;
[ "org.apache.geode" ]
org.apache.geode;
930,567
// Return our cached information (if any) if (info == null) { info = new MBeanParameterInfo (getName(), getType(), getDescription()); } return (MBeanParameterInfo)info; }
if (info == null) { info = new MBeanParameterInfo (getName(), getType(), getDescription()); } return (MBeanParameterInfo)info; }
/** * Create and return a <code>MBeanParameterInfo</code> object that * corresponds to the parameter described by this instance. * @return a parameter info */
Create and return a <code>MBeanParameterInfo</code> object that corresponds to the parameter described by this instance
createParameterInfo
{ "repo_name": "apache/tomcat", "path": "java/org/apache/tomcat/util/modeler/ParameterInfo.java", "license": "apache-2.0", "size": 1812 }
[ "javax.management.MBeanParameterInfo" ]
import javax.management.MBeanParameterInfo;
import javax.management.*;
[ "javax.management" ]
javax.management;
934,535
private void setActionModeIcon(int resource) { try { int doneButtonId = Resources.getSystem().getIdentifier("action_mode_close_button", "id", "android"); LinearLayout layout = (LinearLayout) getActivity().findViewById(doneButtonId); ((ImageView) layout.getChildAt(0)).setImageResource(resource); } ...
void function(int resource) { try { int doneButtonId = Resources.getSystem().getIdentifier(STR, "id", STR); LinearLayout layout = (LinearLayout) getActivity().findViewById(doneButtonId); ((ImageView) layout.getChildAt(0)).setImageResource(resource); } catch (Exception e) { } } public enum ContentActionMode { SINGLE_LOC...
/** * Sets the resource of the action mode in a hacky way * * @param resource */
Sets the resource of the action mode in a hacky way
setActionModeIcon
{ "repo_name": "droidstealth/droid-stealth", "path": "DroidStealth/src/main/java/com/stealth/content/ContentFragment.java", "license": "gpl-2.0", "size": 26825 }
[ "android.content.res.Resources", "android.view.Menu", "android.view.MenuInflater", "android.widget.ImageView", "android.widget.LinearLayout" ]
import android.content.res.Resources; import android.view.Menu; import android.view.MenuInflater; import android.widget.ImageView; import android.widget.LinearLayout;
import android.content.res.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
1,136,709
public static void assertEmpty(Map<?,?> map) { assertEmpty(null, map); }
static void function(Map<?,?> map) { assertEmpty(null, map); }
/** * Variant of {@link #assertEmpty(String, Map)} using a generic * message. */
Variant of <code>#assertEmpty(String, Map)</code> using a generic message
assertEmpty
{ "repo_name": "sarality/appblocks", "path": "tests/src/com/sarality/app/view/action/test/MoreAsserts.java", "license": "apache-2.0", "size": 20036 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,302,394
Properties props = new Properties(); if (revision != null) { props.setProperty(PkgProps.PKG_REVISION, revision.toString()); } return props; }
Properties props = new Properties(); if (revision != null) { props.setProperty(PkgProps.PKG_REVISION, revision.toString()); } return props; }
/** * Helper that creates the {@link Properties} from a {@link FullRevision} * as expected by {@link FullRevisionPackage}. */
Helper that creates the <code>Properties</code> from a <code>FullRevision</code> as expected by <code>FullRevisionPackage</code>
createProps
{ "repo_name": "consulo/consulo-android", "path": "tools-base/sdklib/src/test/java/com/android/sdklib/internal/repository/packages/FullRevisionPackageTest.java", "license": "apache-2.0", "size": 3056 }
[ "com.android.sdklib.repository.PkgProps", "java.util.Properties" ]
import com.android.sdklib.repository.PkgProps; import java.util.Properties;
import com.android.sdklib.repository.*; import java.util.*;
[ "com.android.sdklib", "java.util" ]
com.android.sdklib; java.util;
2,530,018
@Override public int getMaxConnections() throws ResourceException { LOG.finest("getMaxConnections()"); return 0; //TODO }
int function() throws ResourceException { LOG.finest(STR); return 0; }
/** * Returns maximum limit on number of active concurrent connections * * @return Maximum limit for number of active concurrent connections * @throws ResourceException Thrown if an error occurs */
Returns maximum limit on number of active concurrent connections
getMaxConnections
{ "repo_name": "ozoli/http-jca-adaptor", "path": "src/main/java/net/luminis/httpjca/HttpManagedConnectionMetaData.java", "license": "gpl-2.0", "size": 3172 }
[ "javax.resource.ResourceException" ]
import javax.resource.ResourceException;
import javax.resource.*;
[ "javax.resource" ]
javax.resource;
2,703,469
private double computeEntropy(Instances data) throws Exception { double [] classCounts = new double[data.numClasses()]; Enumeration instEnum = data.enumerateInstances(); while (instEnum.hasMoreElements()) { Instance inst = (Instance) instEnum.nextElement(); classCounts[(int) inst.classValue()...
double function(Instances data) throws Exception { double [] classCounts = new double[data.numClasses()]; Enumeration instEnum = data.enumerateInstances(); while (instEnum.hasMoreElements()) { Instance inst = (Instance) instEnum.nextElement(); classCounts[(int) inst.classValue()]++; } double entropy = 0; for (int j = 0...
/** * Computes the entropy of a dataset. * * @param data the data for which entropy is to be computed * @return the entropy of the data's class distribution * @throws Exception if computation fails */
Computes the entropy of a dataset
computeEntropy
{ "repo_name": "FlorentinTh/ID3Custom", "path": "ID3Custom.java", "license": "apache-2.0", "size": 17966 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,236,602
public void setProcurementCardCreateEmailService(VelocityEmailService procurementCardCreateEmailService) { this.procurementCardCreateEmailService = procurementCardCreateEmailService; }
void function(VelocityEmailService procurementCardCreateEmailService) { this.procurementCardCreateEmailService = procurementCardCreateEmailService; }
/** * Sets the procurementCardCreateEmailService attribute. * * @param procurementCardCreateEmailService The procurementCardCreateEmailService to set. */
Sets the procurementCardCreateEmailService attribute
setProcurementCardCreateEmailService
{ "repo_name": "ua-eas/kfs", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/batch/service/impl/ProcurementCardCreateDocumentServiceImpl.java", "license": "agpl-3.0", "size": 95596 }
[ "org.kuali.kfs.sys.service.VelocityEmailService" ]
import org.kuali.kfs.sys.service.VelocityEmailService;
import org.kuali.kfs.sys.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,108,664
public BoxRequestsUser.DeleteEnterpriseUser getDeleteEnterpriseUserRequest(String userId) { BoxRequestsUser.DeleteEnterpriseUser request = new BoxRequestsUser.DeleteEnterpriseUser(getUserInformationUrl(userId), mSession, userId); return request; }
BoxRequestsUser.DeleteEnterpriseUser function(String userId) { BoxRequestsUser.DeleteEnterpriseUser request = new BoxRequestsUser.DeleteEnterpriseUser(getUserInformationUrl(userId), mSession, userId); return request; }
/** * Gets a request that deletes an enterprise user * The session provided must be associated with an enterprise admin user * * @return request to delete an enterprise user */
Gets a request that deletes an enterprise user The session provided must be associated with an enterprise admin user
getDeleteEnterpriseUserRequest
{ "repo_name": "MariusVolkhart/box-android-sdk", "path": "box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiUser.java", "license": "apache-2.0", "size": 3291 }
[ "com.box.androidsdk.content.requests.BoxRequestsUser" ]
import com.box.androidsdk.content.requests.BoxRequestsUser;
import com.box.androidsdk.content.requests.*;
[ "com.box.androidsdk" ]
com.box.androidsdk;
758,440
public static void makeQueueOfSortedQueues(IBigQueue bigQueue, int maxInMemSortNumOfItems, Queue<IBigQueue> queueOfSortedQueues) throws IOException { List<String> list = new ArrayList<String>(); while(true) { // continously extract items from big queue byte[] data = bigQueue.dequeue(); if (data != nu...
static void function(IBigQueue bigQueue, int maxInMemSortNumOfItems, Queue<IBigQueue> queueOfSortedQueues) throws IOException { List<String> list = new ArrayList<String>(); while(true) { byte[] data = bigQueue.dequeue(); if (data != null) { list.add(new String(data)); } if (list.size() == maxInMemSortNumOfItems data ==...
/** * Divide a big queue into memory sortable sub-queues, sort these sub-queues in turn, and * return a queue with all sorted sub-queues. * * This method is thread safe. * * @param bigQueue the big queue to be sorted * @param maxInMemSortNumOfItems max number of items that can be sorted in memory in on...
Divide a big queue into memory sortable sub-queues, sort these sub-queues in turn, and return a queue with all sorted sub-queues. This method is thread safe
makeQueueOfSortedQueues
{ "repo_name": "jianglibo/bigqueue", "path": "samples/sortsearch/src/com/leansoft/bigqueue/sample/helper/MergeSortHelper.java", "license": "apache-2.0", "size": 7839 }
[ "com.leansoft.bigqueue.BigQueueImpl", "com.leansoft.bigqueue.IBigQueue", "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.Queue" ]
import com.leansoft.bigqueue.BigQueueImpl; import com.leansoft.bigqueue.IBigQueue; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Queue;
import com.leansoft.bigqueue.*; import java.io.*; import java.util.*;
[ "com.leansoft.bigqueue", "java.io", "java.util" ]
com.leansoft.bigqueue; java.io; java.util;
1,707,672
public boolean isCatalogJanitorEnabled() throws ServiceException, MasterNotRunningException { MasterKeepAliveConnection stub = connection.getKeepAliveMasterService(); try { return stub.isCatalogJanitorEnabled(null, RequestConverter.buildIsCatalogJanitorEnabledRequest()).getValue(); } final...
boolean function() throws ServiceException, MasterNotRunningException { MasterKeepAliveConnection stub = connection.getKeepAliveMasterService(); try { return stub.isCatalogJanitorEnabled(null, RequestConverter.buildIsCatalogJanitorEnabledRequest()).getValue(); } finally { stub.close(); } }
/** * Query on the catalog janitor state (Enabled/Disabled?) * @throws ServiceException * @throws org.apache.hadoop.hbase.MasterNotRunningException */
Query on the catalog janitor state (Enabled/Disabled?)
isCatalogJanitorEnabled
{ "repo_name": "intel-hadoop/hbase-rhino", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java", "license": "apache-2.0", "size": 138284 }
[ "com.google.protobuf.ServiceException", "org.apache.hadoop.hbase.MasterNotRunningException", "org.apache.hadoop.hbase.protobuf.RequestConverter" ]
import com.google.protobuf.ServiceException; import org.apache.hadoop.hbase.MasterNotRunningException; import org.apache.hadoop.hbase.protobuf.RequestConverter;
import com.google.protobuf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.*;
[ "com.google.protobuf", "org.apache.hadoop" ]
com.google.protobuf; org.apache.hadoop;
35,967
Observable<InputStream> getFileLargeAsync();
Observable<InputStream> getFileLargeAsync();
/** * Get a large file. * * @return the observable to the InputStream object */
Get a large file
getFileLargeAsync
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyfile/Files.java", "license": "mit", "size": 3507 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,631,015
ServiceResponse<Product> beginPutError201NoProvisioningStatePayload() throws CloudException, IOException;
ServiceResponse<Product> beginPutError201NoProvisioningStatePayload() throws CloudException, IOException;
/** * Long running put request, service returns a 201 to the initial request with no payload. * * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the Product object wrapped in {@link ServiceResponse} if s...
Long running put request, service returns a 201 to the initial request with no payload
beginPutError201NoProvisioningStatePayload
{ "repo_name": "yaqiyang/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/LROSADs.java", "license": "mit", "size": 104951 }
[ "com.microsoft.azure.CloudException", "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.io" ]
com.microsoft.azure; com.microsoft.rest; java.io;
2,216,144
public static int getInt(String key, int defaultValue) { SharedPreferences settings = sContext.getSharedPreferences(PREFERENCE_FILE_NAME, Context.MODE_PRIVATE); return settings.getInt(key, defaultValue); }
static int function(String key, int defaultValue) { SharedPreferences settings = sContext.getSharedPreferences(PREFERENCE_FILE_NAME, Context.MODE_PRIVATE); return settings.getInt(key, defaultValue); }
/** * get int preferences * * @param key The name of the preference to retrieve * @param defaultValue Value to return if this preference does not exist * @return The preference value if it exists, or defValue. Throws ClassCastException if there is a preference with * this name tha...
get int preferences
getInt
{ "repo_name": "fantasymaker-cn/mvp-call-flasher", "path": "app/src/main/java/cn/fantasymaker/callflasher/util/SharedpreferencesUtil.java", "license": "apache-2.0", "size": 9353 }
[ "android.content.Context", "android.content.SharedPreferences" ]
import android.content.Context; import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
2,210,322
public static SnapshotNewTables parse(String value, String defaultValue) { SnapshotNewTables snapshotNewTables = parse(value); if (snapshotNewTables == null && defaultValue != null) { snapshotNewTables = parse(defaultValue); } return snapshotNewTables; } } public enum Sna...
static SnapshotNewTables function(String value, String defaultValue) { SnapshotNewTables snapshotNewTables = parse(value); if (snapshotNewTables == null && defaultValue != null) { snapshotNewTables = parse(defaultValue); } return snapshotNewTables; } } public enum SnapshotLockingMode implements EnumeratedValue { EXTEND...
/** * Determine if the supplied value is one of the predefined options. * * @param value the configuration property value; may not be null * @param defaultValue the default value; may be null * @return the matching option, or null if no match is found and the non-null default is invalid */
Determine if the supplied value is one of the predefined options
parse
{ "repo_name": "data-integrations/database-delta-plugins", "path": "mysql-delta-plugins/src/main/java/io/debezium/connector/mysql/MySqlConnectorConfig.java", "license": "apache-2.0", "size": 59385 }
[ "io.debezium.config.EnumeratedValue" ]
import io.debezium.config.EnumeratedValue;
import io.debezium.config.*;
[ "io.debezium.config" ]
io.debezium.config;
62,510
public void addInfo(EncodedText enc) { byte[] val = enc.getCtext(); if (position() != header.getHeaderLength() + header.getMapInfoSize()) throw new IllegalStateException("All info must be added before anything else"); header.setMapInfoSize(header.getMapInfoSize() + enc.getLength() + 1); getWriter().put(v...
void function(EncodedText enc) { byte[] val = enc.getCtext(); if (position() != header.getHeaderLength() + header.getMapInfoSize()) throw new IllegalStateException(STR); header.setMapInfoSize(header.getMapInfoSize() + enc.getLength() + 1); getWriter().put(val); getWriter().put1u(0); }
/** * Add a string to the 'mapinfo' section. This is a section between the * header and the start of the data. Nothing points to it directly. * * @param enc A string in the EncodedText format. */
Add a string to the 'mapinfo' section. This is a section between the header and the start of the data. Nothing points to it directly
addInfo
{ "repo_name": "openstreetmap/mkgmap", "path": "src/uk/me/parabola/imgfmt/app/trergn/TREFile.java", "license": "gpl-2.0", "size": 9881 }
[ "uk.me.parabola.imgfmt.app.labelenc.EncodedText" ]
import uk.me.parabola.imgfmt.app.labelenc.EncodedText;
import uk.me.parabola.imgfmt.app.labelenc.*;
[ "uk.me.parabola" ]
uk.me.parabola;
591,919
public boolean configFileExists(String collection, String fileName) throws KeeperException, InterruptedException { Stat stat = zkClient.exists(CONFIGS_ZKNODE + "/" + collection + "/" + fileName, null, true); return stat != null; }
boolean function(String collection, String fileName) throws KeeperException, InterruptedException { Stat stat = zkClient.exists(CONFIGS_ZKNODE + "/" + collection + "/" + fileName, null, true); return stat != null; }
/** * Returns true if config file exists */
Returns true if config file exists
configFileExists
{ "repo_name": "fogbeam/Heceta_solr", "path": "solr/core/src/java/org/apache/solr/cloud/ZkController.java", "license": "apache-2.0", "size": 59449 }
[ "org.apache.zookeeper.KeeperException", "org.apache.zookeeper.data.Stat" ]
import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.data.Stat;
import org.apache.zookeeper.*; import org.apache.zookeeper.data.*;
[ "org.apache.zookeeper" ]
org.apache.zookeeper;
1,741,353
public Checkpoint checkpoint() throws PersistitException { if (_closed.get() || !_initialized.get()) { return null; } cleanup(); _journalManager.pruneObsoleteTransactions(); final Checkpoint result = _checkpointManager.checkpoint(); _journalManager.pruneOb...
Checkpoint function() throws PersistitException { if (_closed.get() !_initialized.get()) { return null; } cleanup(); _journalManager.pruneObsoleteTransactions(); final Checkpoint result = _checkpointManager.checkpoint(); _journalManager.pruneObsoleteTransactions(); return result; }
/** * Force a new Checkpoint and wait for it to be written. If Persistit is * closed or not yet initialized, do nothing and return <code>null</code>. * * @return the Checkpoint allocated by this process. * @throws PersistitInterruptedException */
Force a new Checkpoint and wait for it to be written. If Persistit is closed or not yet initialized, do nothing and return <code>null</code>
checkpoint
{ "repo_name": "jaytaylor/persistit", "path": "src/main/java/com/persistit/Persistit.java", "license": "epl-1.0", "size": 92693 }
[ "com.persistit.CheckpointManager", "com.persistit.exception.PersistitException" ]
import com.persistit.CheckpointManager; import com.persistit.exception.PersistitException;
import com.persistit.*; import com.persistit.exception.*;
[ "com.persistit", "com.persistit.exception" ]
com.persistit; com.persistit.exception;
840,489
Cluster apply(Context context); }
Cluster apply(Context context); }
/** * Executes the update request. * * @param context The context to associate with this operation. * @return the updated resource. */
Executes the update request
apply
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Cluster.java", "license": "mit", "size": 9579 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
376,804
public List<ManagedResource> cleanupBridgeClientResources(String clientId) { List<ManagedResource> returnedResources = new ArrayList<ManagedResource>(); String compatibleId = "id_"+MBeanUtil.makeCompliantMBeanNameProperty(clientId); synchronized (this.managedStatisticsResourcesMap) { Set<Entry<S...
List<ManagedResource> function(String clientId) { List<ManagedResource> returnedResources = new ArrayList<ManagedResource>(); String compatibleId = "id_"+MBeanUtil.makeCompliantMBeanNameProperty(clientId); synchronized (this.managedStatisticsResourcesMap) { Set<Entry<StatResource, StatisticResourceJmxImpl>> entrySet = ...
/** * Cleans up Managed Resources created for the client that was connected to * the server represented by this class. * * @param clientId * id of the client to be removed * @return List of ManagedResources associated with the client of given client * id */
Cleans up Managed Resources created for the client that was connected to the server represented by this class
cleanupBridgeClientResources
{ "repo_name": "sshcherbakov/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberJmxImpl.java", "license": "apache-2.0", "size": 22008 }
[ "com.gemstone.gemfire.internal.admin.ClientMembershipMessage", "com.gemstone.gemfire.internal.admin.StatResource", "java.util.ArrayList", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.Set" ]
import com.gemstone.gemfire.internal.admin.ClientMembershipMessage; import com.gemstone.gemfire.internal.admin.StatResource; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set;
import com.gemstone.gemfire.internal.admin.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
462,633
public boolean isItemValid(ItemStack stack) { return false; }
boolean function(ItemStack stack) { return false; }
/** * Check if the stack is a valid item for this slot. Always true beside for the armor slots. */
Check if the stack is a valid item for this slot. Always true beside for the armor slots
isItemValid
{ "repo_name": "trixmot/mod1", "path": "build/tmp/recompileMc/sources/net/minecraft/inventory/SlotMerchantResult.java", "license": "lgpl-2.1", "size": 4171 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
271,439
public void testRetryOnceIgnoreInterval(PrintWriter out) throws Exception { RetryCallable task = new RetryCallable(); TaskStatus<Void> status = scheduler.schedule(task, DEFAULT_SCHEDULING_DELAY, TimeUnit.MILLISECONDS); for (long start = System.nanoTime(); !status.hasResult() && System.nanoTime()...
void function(PrintWriter out) throws Exception { RetryCallable task = new RetryCallable(); TaskStatus<Void> status = scheduler.schedule(task, DEFAULT_SCHEDULING_DELAY, TimeUnit.MILLISECONDS); for (long start = System.nanoTime(); !status.hasResult() && System.nanoTime() - start < TIMEOUT_NS; Thread.sleep(POLL_INTERVAL)...
/** * Schedule a task that fails all execution attempts, and see that it is retried exactly once. * The retry interval is set to 60 seconds, make sure it's ignored and the retry happens * immediately (which is what is supposed to happen on the first retry). */
Schedule a task that fails all execution attempts, and see that it is retried exactly once. The retry interval is set to 60 seconds, make sure it's ignored and the retry happens immediately (which is what is supposed to happen on the first retry)
testRetryOnceIgnoreInterval
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.concurrent.persistent_fat_retry/test-applications/retrytest/src/web/PersistentRetryTestServlet.java", "license": "epl-1.0", "size": 23436 }
[ "com.ibm.websphere.concurrent.persistent.TaskStatus", "java.io.PrintWriter", "java.util.concurrent.ExecutionException", "java.util.concurrent.TimeUnit" ]
import com.ibm.websphere.concurrent.persistent.TaskStatus; import java.io.PrintWriter; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit;
import com.ibm.websphere.concurrent.persistent.*; import java.io.*; import java.util.concurrent.*;
[ "com.ibm.websphere", "java.io", "java.util" ]
com.ibm.websphere; java.io; java.util;
652,788
public Observable<ServiceResponse<DomainSharedAccessKeysInner>> regenerateKeyWithServiceResponseAsync(String resourceGroupName, String domainName, String keyName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required ...
Observable<ServiceResponse<DomainSharedAccessKeysInner>> function(String resourceGroupName, String domainName, String keyName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (domainName == null) { th...
/** * Regenerate key for a domain. * Regenerate a shared access key for a domain. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain * @param keyName Key name to regenerate key1 or key2 * @throws IllegalAr...
Regenerate key for a domain. Regenerate a shared access key for a domain
regenerateKeyWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/eventgrid/mgmt-v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java", "license": "mit", "size": 69931 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,711,287
static void b2iLittle(byte[] in, int inOfs, int[] out, int outOfs, int len) { if ((inOfs < 0) || ((in.length - inOfs) < len) || (outOfs < 0) || ((out.length - outOfs) < len/4)) { throw new ArrayIndexOutOfBoundsException(); } if (littleEndianUnaligned) { in...
static void b2iLittle(byte[] in, int inOfs, int[] out, int outOfs, int len) { if ((inOfs < 0) ((in.length - inOfs) < len) (outOfs < 0) ((out.length - outOfs) < len/4)) { throw new ArrayIndexOutOfBoundsException(); } if (littleEndianUnaligned) { inOfs += byteArrayOfs; len += inOfs; while (inOfs < len) { out[outOfs++] = ...
/** * byte[] to int[] conversion, little endian byte order. */
byte[] to int[] conversion, little endian byte order
b2iLittle
{ "repo_name": "JetBrains/jdk8u_jdk", "path": "src/share/classes/sun/security/provider/ByteArrayAccess.java", "license": "gpl-2.0", "size": 20390 }
[ "java.lang.Integer", "java.lang.Long" ]
import java.lang.Integer; import java.lang.Long;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,080,147
public ItemLabelPosition getPositiveItemLabelPosition(int row, int column);
ItemLabelPosition function(int row, int column);
/** * Specifies an individual item by row, column and returns the label * position. * * @param row the row (or series) index (zero-based). * @param column the column (or category) index (zero-based). * * @return The item label position (never {@code null}). */
Specifies an individual item by row, column and returns the label position
getPositiveItemLabelPosition
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/main/java/org/jfree/chart/renderer/item/LabelIRS.java", "license": "lgpl-2.1", "size": 3665 }
[ "org.jfree.chart.labels.ItemLabelPosition" ]
import org.jfree.chart.labels.ItemLabelPosition;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
540,678
private void exportTheEmptyBinaryNamespaceAt(Node atNode, AddAt addAt) { if (currentScript.declareLegacyNamespace) { return; } Node binaryNamespaceName = IR.name(currentScript.getBinaryNamespace()); binaryNamespaceName.putProp(Node.ORIGINALNAME_PROP, currentScript.legacyNamespace); Node bin...
void function(Node atNode, AddAt addAt) { if (currentScript.declareLegacyNamespace) { return; } Node binaryNamespaceName = IR.name(currentScript.getBinaryNamespace()); binaryNamespaceName.putProp(Node.ORIGINALNAME_PROP, currentScript.legacyNamespace); Node binaryNamespaceExportNode = IR.var(binaryNamespaceName, IR.obje...
/** * Add the missing "var module$exports$pkg$Foo = {};" line. */
Add the missing "var module$exports$pkg$Foo = {};" line
exportTheEmptyBinaryNamespaceAt
{ "repo_name": "superkonduktr/closure-compiler", "path": "src/com/google/javascript/jscomp/ClosureRewriteModule.java", "license": "apache-2.0", "size": 53464 }
[ "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,840,552
@Override public void exitRegister(@NotNull AssemblyParser.RegisterContext ctx) { }
@Override public void exitRegister(@NotNull AssemblyParser.RegisterContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterRegister
{ "repo_name": "mattmckillip/SE319", "path": "Portfolio/3/old code/attempt at complete project/porftolio3/src/assembly/antlr/AssemblyBaseListener.java", "license": "mit", "size": 3119 }
[ "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;
1,821,038
private void enqueueTile(final MapTile mt) { if (tileMapBounds != null && !tileMapBounds.isWithinBounds(mt.getX(), mt.getY())) { return; } // enqueue map tiles that are not already downloaded //TODO jaanus : check this synchronization synchronized (screenCache) { // enqueue on...
void function(final MapTile mt) { if (tileMapBounds != null && !tileMapBounds.isWithinBounds(mt.getX(), mt.getY())) { return; } synchronized (screenCache) { if ((screenCache.find(mt) > 0) neededTiles.contains(mt)) { return; } if (networkCache != null && networkCache.contains(mt.getIDString(), Cache.CACHE_LEVEL_MEMORY))...
/** * Enqueue a tile. * * @param mt * map tile */
Enqueue a tile
enqueueTile
{ "repo_name": "camptocamp/maps-lib-nutiteq", "path": "src/com/nutiteq/BasicMapComponent.java", "license": "gpl-2.0", "size": 79702 }
[ "com.nutiteq.cache.Cache", "com.nutiteq.components.MapTile" ]
import com.nutiteq.cache.Cache; import com.nutiteq.components.MapTile;
import com.nutiteq.cache.*; import com.nutiteq.components.*;
[ "com.nutiteq.cache", "com.nutiteq.components" ]
com.nutiteq.cache; com.nutiteq.components;
2,441,325
Future<Void> snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException;
Future<Void> snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException;
/** * Take a snapshot without waiting for the server to complete that snapshot (asynchronous). * Snapshots are considered unique based on <b>the name of the snapshot</b>. Snapshots are taken * sequentially even when requested concurrently, across all tables. * * @param snapshot snapshot to take * @thr...
Take a snapshot without waiting for the server to complete that snapshot (asynchronous). Snapshots are considered unique based on the name of the snapshot. Snapshots are taken sequentially even when requested concurrently, across all tables
snapshotAsync
{ "repo_name": "ChinmaySKulkarni/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 101053 }
[ "java.io.IOException", "java.util.concurrent.Future", "org.apache.hadoop.hbase.snapshot.SnapshotCreationException" ]
import java.io.IOException; import java.util.concurrent.Future; import org.apache.hadoop.hbase.snapshot.SnapshotCreationException;
import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.hbase.snapshot.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,553,360
EAttribute getCarLikeCommand_SteeringAngle();
EAttribute getCarLikeCommand_SteeringAngle();
/** * Returns the meta object for the attribute '{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.oarps_datatypes.oarp1_datatypes.CarLikeCommand#getSteeringAngle <em>Steering Angle</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attri...
Returns the meta object for the attribute '<code>org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.oarps_datatypes.oarp1_datatypes.CarLikeCommand#getSteeringAngle Steering Angle</code>'.
getCarLikeCommand_SteeringAngle
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/oarps_datatypes/oarp1_datatypes/Oarp1_datatypesPackage.java", "license": "epl-1.0", "size": 15897 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
897,523
@Override public ListenableFuture<TaskStatus> run(final Task task) { final RemoteTaskRunnerWorkItem completeTask, runningTask, pendingTask; if ((pendingTask = pendingTasks.get(task.getId())) != null) { log.info("Assigned a task[%s] that is already pending, not doing anything", task.getId()); r...
ListenableFuture<TaskStatus> function(final Task task) { final RemoteTaskRunnerWorkItem completeTask, runningTask, pendingTask; if ((pendingTask = pendingTasks.get(task.getId())) != null) { log.info(STR, task.getId()); return pendingTask.getResult(); } else if ((runningTask = runningTasks.get(task.getId())) != null) { ...
/** * A task will be run only if there is no current knowledge in the RemoteTaskRunner of the task. * * @param task task to run */
A task will be run only if there is no current knowledge in the RemoteTaskRunner of the task
run
{ "repo_name": "taochaoqiang/druid", "path": "indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java", "license": "apache-2.0", "size": 53705 }
[ "com.google.common.util.concurrent.ListenableFuture", "io.druid.indexing.common.TaskStatus", "io.druid.indexing.common.task.Task", "io.druid.indexing.worker.TaskAnnouncement" ]
import com.google.common.util.concurrent.ListenableFuture; import io.druid.indexing.common.TaskStatus; import io.druid.indexing.common.task.Task; import io.druid.indexing.worker.TaskAnnouncement;
import com.google.common.util.concurrent.*; import io.druid.indexing.common.*; import io.druid.indexing.common.task.*; import io.druid.indexing.worker.*;
[ "com.google.common", "io.druid.indexing" ]
com.google.common; io.druid.indexing;
523,689
@SideOnly(Side.CLIENT) public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport) { this.boatPitch = x; this.lerpY = y; this.lerpZ = z; this.boatYaw = (double)yaw; this.lerpXRot = (double...
@SideOnly(Side.CLIENT) void function(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport) { this.boatPitch = x; this.lerpY = y; this.lerpZ = z; this.boatYaw = (double)yaw; this.lerpXRot = (double)pitch; this.lerpSteps = 10; }
/** * Set the position and rotation values directly without any clamping. */
Set the position and rotation values directly without any clamping
setPositionAndRotationDirect
{ "repo_name": "Weisses/Ebonheart-Mods", "path": "ViesCraft/Archived/1.9.4 - 1976/src/main/java/com/viesis/viescraft/common/entity/airshipcolors/EntityAirshipBaseVC.java", "license": "mit", "size": 32403 }
[ "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.*;
[ "net.minecraftforge.fml" ]
net.minecraftforge.fml;
296,775
@Nullable public ImmutableList<R> getParents() { return parents; }
ImmutableList<R> function() { return parents; }
/** * Return the parent revisions if the origin provides that information. Currently only for Git and * Hg. Otherwise null. */
Return the parent revisions if the origin provides that information. Currently only for Git and Hg. Otherwise null
getParents
{ "repo_name": "google/copybara", "path": "java/com/google/copybara/Change.java", "license": "apache-2.0", "size": 7810 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,214,131
public static Field findFieldForFlag(String flagName, Object o) { return findFieldForFlagInternal(flagName, o, getAllFields(o.getClass())); }
static Field function(String flagName, Object o) { return findFieldForFlagInternal(flagName, o, getAllFields(o.getClass())); }
/** * Finds the {@link Field} on the given object annotated with the given name flag. */
Finds the <code>Field</code> on the given object annotated with the given name flag
findFieldForFlag
{ "repo_name": "neykov/incubator-brooklyn", "path": "core/src/main/java/brooklyn/util/flags/FlagUtils.java", "license": "apache-2.0", "size": 27098 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,458,400
protected boolean checkForCircularRoleMembership(String newMemberId, RoleBo roleBo) { // get all nested roleBo members that are of type roleBo Set<String> newRoleMemberIds = getRoleTypeRoleMemberIds(newMemberId); return !newRoleMemberIds.contains(roleBo.getId()); }
boolean function(String newMemberId, RoleBo roleBo) { Set<String> newRoleMemberIds = getRoleTypeRoleMemberIds(newMemberId); return !newRoleMemberIds.contains(roleBo.getId()); }
/** * This method tests to see if assigning a roleBo to another roleBo will create a circular reference. * The Role is checked to see if it is a member (direct or nested) of the roleBo to be assigned as a member. * * @param newMemberId * @param roleBo * @return true - assignment is allowe...
This method tests to see if assigning a roleBo to another roleBo will create a circular reference. The Role is checked to see if it is a member (direct or nested) of the roleBo to be assigned as a member
checkForCircularRoleMembership
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/kim/kim-impl/src/main/java/org/kuali/rice/kim/impl/role/RoleServiceImpl.java", "license": "apache-2.0", "size": 134610 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,941,475
public Map<String, Object> toHeadersMap() { return Collections.unmodifiableMap(this.headers); } /** * Will build the message ensuring that the Cloud Event attributes are all * prefixed with the prefix determined by the framework. If you want to * use a specific prefix please use {@link #build(String)} met...
Map<String, Object> function() { return Collections.unmodifiableMap(this.headers); } /** * Will build the message ensuring that the Cloud Event attributes are all * prefixed with the prefix determined by the framework. If you want to * use a specific prefix please use {@link #build(String)} method. * @return instance o...
/** * Returns a snapshot of the headers {@link Map} at the time this method is called. * The returned Map is read-only. * * @return map of headers */
Returns a snapshot of the headers <code>Map</code> at the time this method is called. The returned Map is read-only
toHeadersMap
{ "repo_name": "olegz/spring-cloud-function", "path": "spring-cloud-function-context/src/main/java/org/springframework/cloud/function/cloudevent/CloudEventMessageBuilder.java", "license": "apache-2.0", "size": 7632 }
[ "java.util.Collections", "java.util.Map", "org.springframework.messaging.Message" ]
import java.util.Collections; import java.util.Map; import org.springframework.messaging.Message;
import java.util.*; import org.springframework.messaging.*;
[ "java.util", "org.springframework.messaging" ]
java.util; org.springframework.messaging;
1,727,824
public static List<Element> getChildElementsByTagName(Element parentNode, String tagName) { if (parentNode == null) { return null; } // if there is no tag name given, treat it as returning all the child Elements if (tagName == null || tagName.trim().length() == 0) { ...
static List<Element> function(Element parentNode, String tagName) { if (parentNode == null) { return null; } if (tagName == null tagName.trim().length() == 0) { return getChildElements(parentNode); } List<Element> resultList = new ArrayList<Element>(); NodeList childNodes = parentNode.getChildNodes(); if (childNodes !=...
/** * return all the child Elements under given Element <code>parentNode</code> and with the same tag name of <code>tagName</code> ; * it's not deep search, so only the first generation children list is scanned <br/>Note: the given <code>tagName</code> is just local * name; namespace is not support right...
return all the child Elements under given Element <code>parentNode</code> and with the same tag name of <code>tagName</code> ; it's not deep search, so only the first generation children list is scanned Note: the given <code>tagName</code> is just local name; namespace is not support right now
getChildElementsByTagName
{ "repo_name": "icedeer/command-base", "path": "src/main/java/com/icedeer/common/util/xml/DomHelper.java", "license": "mit", "size": 11923 }
[ "java.util.ArrayList", "java.util.List", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import java.util.ArrayList; import java.util.List; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
2,812,774
JavaLibrary getCompiledUberRDotJava();
JavaLibrary getCompiledUberRDotJava();
/** * Compiled R.java for use by ProGuard. This should go away if/when * we create a separate rule for ProGuard. */
Compiled R.java for use by ProGuard. This should go away if/when we create a separate rule for ProGuard
getCompiledUberRDotJava
{ "repo_name": "darkforestzero/buck", "path": "src/com/facebook/buck/android/AbstractAndroidGraphEnhancementResult.java", "license": "apache-2.0", "size": 3092 }
[ "com.facebook.buck.jvm.java.JavaLibrary" ]
import com.facebook.buck.jvm.java.JavaLibrary;
import com.facebook.buck.jvm.java.*;
[ "com.facebook.buck" ]
com.facebook.buck;
45,187
FontMapping<FontBoxFont> getFontBoxFont(String baseFont, PDFontDescriptor fontDescriptor);
FontMapping<FontBoxFont> getFontBoxFont(String baseFont, PDFontDescriptor fontDescriptor);
/** * Finds a font with the given PostScript name, or a suitable substitute, or null. This allows * any font to be substituted with a PFB, TTF or OTF. * * @param fontDescriptor the FontDescriptor of the font to find */
Finds a font with the given PostScript name, or a suitable substitute, or null. This allows any font to be substituted with a PFB, TTF or OTF
getFontBoxFont
{ "repo_name": "joansmith/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FontMapper.java", "license": "apache-2.0", "size": 2228 }
[ "org.apache.fontbox.FontBoxFont" ]
import org.apache.fontbox.FontBoxFont;
import org.apache.fontbox.*;
[ "org.apache.fontbox" ]
org.apache.fontbox;
803,626
private static void overwrite( final CSVFieldValidator annConf, final CSVFieldValidatorConf csvConf ) { if( checkNullConsistence(isValued(annConf), csvConf, "validator") ) return; csvConf.setType( annConf.type() ); overwriteParams( annConf.params(), csvConf.getParams(), "valida...
static void function( final CSVFieldValidator annConf, final CSVFieldValidatorConf csvConf ) { if( checkNullConsistence(isValued(annConf), csvConf, STR) ) return; csvConf.setType( annConf.type() ); overwriteParams( annConf.params(), csvConf.getParams(), STR ); }
/** * Overwrites the given CSV configuration with the given annotation. * * @param annConf the source annotation. * @param csvConf the target CSV configuration. */
Overwrites the given CSV configuration with the given annotation
overwrite
{ "repo_name": "nerd4j/nerd4j-csv", "path": "src/main/java/org/nerd4j/csv/conf/mapping/ann/AnnotatedConfigurationFactory.java", "license": "lgpl-3.0", "size": 24697 }
[ "org.nerd4j.csv.conf.mapping.CSVFieldValidatorConf" ]
import org.nerd4j.csv.conf.mapping.CSVFieldValidatorConf;
import org.nerd4j.csv.conf.mapping.*;
[ "org.nerd4j.csv" ]
org.nerd4j.csv;
2,501,924
public boolean hasNewMessages() throws MessagingException { return getNewMessageCount() > 0; }
boolean function() throws MessagingException { return getNewMessageCount() > 0; }
/** * Indicates whether this folder contains new messages. * @exception MessagingException if a messaging error occurred */
Indicates whether this folder contains new messages
hasNewMessages
{ "repo_name": "imoseyon/leanKernel-d2usc-deprecated", "path": "vendor/samsung/common/packages/apps/Email/lib_Src/mail-1.1.2/source/gnu/mail/providers/mbox/MboxFolder.java", "license": "gpl-2.0", "size": 29474 }
[ "javax.mail.MessagingException" ]
import javax.mail.MessagingException;
import javax.mail.*;
[ "javax.mail" ]
javax.mail;
920,775
public static IStandardVariableExpressionEvaluator getVariableExpressionEvaluator(final IEngineConfiguration configuration) { final Object expressionEvaluator = configuration.getExecutionAttributes().get(STANDARD_VARIABLE_EXPRESSION_EVALUATOR_ATTRIBUTE_NAME); if (expressionEvaluator ...
static IStandardVariableExpressionEvaluator function(final IEngineConfiguration configuration) { final Object expressionEvaluator = configuration.getExecutionAttributes().get(STANDARD_VARIABLE_EXPRESSION_EVALUATOR_ATTRIBUTE_NAME); if (expressionEvaluator == null (!(expressionEvaluator instanceof IStandardVariableExpres...
/** * <p> * Obtain the variable expression evaluator (implementation of {@link IStandardVariableExpressionEvaluator}) * registered by the Standard Dialect that is being currently used. * </p> * <p> * Normally, there should be no need to obtain this object from the developers' code (o...
Obtain the variable expression evaluator (implementation of <code>IStandardVariableExpressionEvaluator</code>) registered by the Standard Dialect that is being currently used. Normally, there should be no need to obtain this object from the developers' code (only internally from <code>IStandardExpression</code> impleme...
getVariableExpressionEvaluator
{ "repo_name": "magat/thymeleaf", "path": "src/main/java/org/thymeleaf/standard/expression/StandardExpressions.java", "license": "apache-2.0", "size": 6691 }
[ "org.thymeleaf.IEngineConfiguration", "org.thymeleaf.exceptions.TemplateProcessingException" ]
import org.thymeleaf.IEngineConfiguration; import org.thymeleaf.exceptions.TemplateProcessingException;
import org.thymeleaf.*; import org.thymeleaf.exceptions.*;
[ "org.thymeleaf", "org.thymeleaf.exceptions" ]
org.thymeleaf; org.thymeleaf.exceptions;
2,846,013
@Override public void onStart(Intent intent, int startId) { // get message details from intent Bundle bundle = intent.getExtras(); from = bundle.getString("FROM"); message = bundle.getString("MESSAGE"); correctMd5 = bundle.getString("MD5"); // get & check password String[] tokens = message.s...
void function(Intent intent, int startId) { Bundle bundle = intent.getExtras(); from = bundle.getString("FROM"); message = bundle.getString(STR); correctMd5 = bundle.getString("MD5"); String[] tokens = message.split(":"); if (tokens.length >= 2) { String md5hash = MainApp.getMd5Hash(tokens[1]); if (md5hash.equals(corre...
/** * Checks password and if appropriate starts location finder * * @return void * @see android.app.Service#onStart(android.content.Intent, int) */
Checks password and if appropriate starts location finder
onStart
{ "repo_name": "Eymir/text2gps", "path": "src/uk/co/jamesy/Text2GPS/FindResponse.java", "license": "bsd-3-clause", "size": 7270 }
[ "android.content.Intent", "android.os.Bundle" ]
import android.content.Intent; import android.os.Bundle;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
1,921,248
private JLabel getVinLabel() { if (vinLabel == null) { vinLabel = new JLabel("VIN:"); vinLabel.setToolTipText("Vehicle Identification Number"); } return vinLabel; }
JLabel function() { if (vinLabel == null) { vinLabel = new JLabel("VIN:"); vinLabel.setToolTipText(STR); } return vinLabel; }
/** * Creates, caches and returns the label for the Vehicle Identification * Number Text Field * * @return JLabel */
Creates, caches and returns the label for the Vehicle Identification Number Text Field
getVinLabel
{ "repo_name": "battjt/iumpr", "path": "src/net/soliddesign/iumpr/ui/UserInterfaceView.java", "license": "mit", "size": 31088 }
[ "javax.swing.JLabel" ]
import javax.swing.JLabel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
376,759
protected void initDefault( ) { version = VERSION; // 1. CREATE AND INITIALIZE BLOCKS block = BlockImpl.createDefault( ); // OUTERMOST BLOCK // block.setBackground( ColorDefinitionImpl.TRANSPARENT( ) ); // TED 12117-- default background is white color. // block.setBackground( ColorDefinitionImpl.WHITE( ...
void function( ) { version = VERSION; block = BlockImpl.createDefault( ); TitleBlock tb = (TitleBlock) TitleBlockImpl.createDefault( ); Plot pl = (Plot) PlotImpl.createDefault( ); Legend lg = (Legend) LegendImpl.createDefault( ); block.add( tb ); block.add( pl ); block.add( lg ); Text txtChartTitle = tb.getLabel( ).get...
/** * * Note: Manually written */
Note: Manually written
initDefault
{ "repo_name": "Charling-Huang/birt", "path": "chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/impl/ChartImpl.java", "license": "epl-1.0", "size": 49963 }
[ "org.eclipse.birt.chart.exception.ChartException", "org.eclipse.birt.chart.model.attribute.ChartDimension", "org.eclipse.birt.chart.model.attribute.HorizontalAlignment", "org.eclipse.birt.chart.model.attribute.Text", "org.eclipse.birt.chart.model.attribute.TextAlignment", "org.eclipse.birt.chart.model.att...
import org.eclipse.birt.chart.exception.ChartException; import org.eclipse.birt.chart.model.attribute.ChartDimension; import org.eclipse.birt.chart.model.attribute.HorizontalAlignment; import org.eclipse.birt.chart.model.attribute.Text; import org.eclipse.birt.chart.model.attribute.TextAlignment; import org.eclipse.bir...
import org.eclipse.birt.chart.exception.*; import org.eclipse.birt.chart.model.attribute.*; import org.eclipse.birt.chart.model.attribute.impl.*; import org.eclipse.birt.chart.model.layout.*; import org.eclipse.birt.chart.model.layout.impl.*; import org.eclipse.birt.chart.model.util.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
122,697
@SmallTest public void testDataPipeSend() { Core core = CoreImpl.getInstance(); Pair<DataPipe.ProducerHandle, DataPipe.ConsumerHandle> handles = core.createDataPipe(null); addHandlePairToClose(handles); checkSendingData(handles.first, handles.second); }
void function() { Core core = CoreImpl.getInstance(); Pair<DataPipe.ProducerHandle, DataPipe.ConsumerHandle> handles = core.createDataPipe(null); addHandlePairToClose(handles); checkSendingData(handles.first, handles.second); }
/** * Testing {@link DataPipe}. */
Testing <code>DataPipe</code>
testDataPipeSend
{ "repo_name": "7kbird/chrome", "path": "mojo/android/javatests/src/org/chromium/mojo/system/impl/CoreImplTest.java", "license": "bsd-3-clause", "size": 31194 }
[ "org.chromium.mojo.system.Core", "org.chromium.mojo.system.DataPipe", "org.chromium.mojo.system.Pair" ]
import org.chromium.mojo.system.Core; import org.chromium.mojo.system.DataPipe; import org.chromium.mojo.system.Pair;
import org.chromium.mojo.system.*;
[ "org.chromium.mojo" ]
org.chromium.mojo;
1,299,021
TcpServer supportedProtocols(List<String> supportedProtocols);
TcpServer supportedProtocols(List<String> supportedProtocols);
/** * The supported application layer protocols. * * @param supportedProtocols The supported application layer protocols. * @return The TCP server. */
The supported application layer protocols
supportedProtocols
{ "repo_name": "hypercube1024/firefly", "path": "firefly-net/src/main/java/com/fireflysource/net/tcp/TcpServer.java", "license": "apache-2.0", "size": 3869 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,778,737
private void setAdditionalClaimSet(JWTClaimsSet.Builder jwtClaimsSetBuilder, Map<String, Object> additionalIdTokenClaims) { for (Map.Entry<String, Object> entry : additionalIdTokenClaims.entrySet()) { jwtClaimsSetBuilder.claim(entry.getKey(), entry.getValu...
void function(JWTClaimsSet.Builder jwtClaimsSetBuilder, Map<String, Object> additionalIdTokenClaims) { for (Map.Entry<String, Object> entry : additionalIdTokenClaims.entrySet()) { jwtClaimsSetBuilder.claim(entry.getKey(), entry.getValue()); } if (log.isDebugEnabled()) { for (Map.Entry<String, Object> entry : additional...
/** * A map with claim names and corresponding claim values is passed and all are inserted into jwtClaimSet. * * @param jwtClaimsSetBuilder contains JWT body * @param additionalIdTokenClaims a map with claim names and corresponding claim values */
A map with claim names and corresponding claim values is passed and all are inserted into jwtClaimSet
setAdditionalClaimSet
{ "repo_name": "wso2-extensions/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/openidconnect/DefaultIDTokenBuilder.java", "license": "apache-2.0", "size": 37053 }
[ "com.nimbusds.jwt.JWTClaimsSet", "java.util.Map" ]
import com.nimbusds.jwt.JWTClaimsSet; import java.util.Map;
import com.nimbusds.jwt.*; import java.util.*;
[ "com.nimbusds.jwt", "java.util" ]
com.nimbusds.jwt; java.util;
2,539,582
public StepMeta loadStepMeta( ObjectId stepId, List<DatabaseMeta> databases, List<PartitionSchema> partitionSchemas ) throws KettleException { StepMeta stepMeta = new StepMeta(); PluginRegistry registry = PluginRegistry.getInstance(); try { RowMetaAndData r = getStep( stepId ); if ( r != ...
StepMeta function( ObjectId stepId, List<DatabaseMeta> databases, List<PartitionSchema> partitionSchemas ) throws KettleException { StepMeta stepMeta = new StepMeta(); PluginRegistry registry = PluginRegistry.getInstance(); try { RowMetaAndData r = getStep( stepId ); if ( r != null ) { stepMeta.setObjectId( stepId ); s...
/** * Create a new step by loading the metadata from the specified repository. * * @param rep * @param stepId * @param databases * @param counters * @param partitionSchemas * @throws KettleException */
Create a new step by loading the metadata from the specified repository
loadStepMeta
{ "repo_name": "kurtwalker/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryStepDelegate.java", "license": "apache-2.0", "size": 22781 }
[ "java.util.List", "org.pentaho.di.core.RowMetaAndData", "org.pentaho.di.core.database.DatabaseMeta", "org.pentaho.di.core.exception.KettleDatabaseException", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.gui.Point", "org.pentaho.di.core.plugins.PluginInterface", "org.pentaho.di...
import java.util.List; import org.pentaho.di.core.RowMetaAndData; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.gui.Point; import org.pentaho.di.core.plugins.PluginInterface...
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.gui.*; import org.pentaho.di.core.plugins.*; import org.pentaho.di.core.util.*; import org.pentaho.di.i18n.*; import org.pentaho.di.partition.*; import org.pentaho....
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
2,463,574
Date getEnd();
Date getEnd();
/** * Returns the value of the '<em><b>End</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>End</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>End</em>' attribute. * @se...
Returns the value of the 'End' attribute. If the meaning of the 'End' attribute isn't clear, there really should be more of a description here...
getEnd
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/MarketOperations/MarketStatement.java", "license": "mit", "size": 9041 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,043,957
public static void registerWithoutAliases() { ConfigurationSerialization.registerClass(ApplyMagicEffect.class); } private enum aliases { DEFAULT(ApplyMagicEffect.class.getName()), OLD("com.SkyIsland.QuestManager.Magic.Spell.Effect." + ApplyMagicEffect.class.getSimpleName()), LONGI("SpellMagicStatus"), ...
static void function() { ConfigurationSerialization.registerClass(ApplyMagicEffect.class); } private enum aliases { DEFAULT(ApplyMagicEffect.class.getName()), OLD(STR + ApplyMagicEffect.class.getSimpleName()), LONGI(STR), LONG(STR), SHORT(STR); private String alias; aliases(String alias) { this.alias = alias; }
/** * Registers this class as configuration serializable with only the default alias */
Registers this class as configuration serializable with only the default alias
registerWithoutAliases
{ "repo_name": "Dove-Bren/QuestManager", "path": "src/main/java/com/skyisland/questmanager/magic/spell/effect/ApplyMagicEffect.java", "license": "gpl-3.0", "size": 4286 }
[ "org.bukkit.configuration.serialization.ConfigurationSerialization" ]
import org.bukkit.configuration.serialization.ConfigurationSerialization;
import org.bukkit.configuration.serialization.*;
[ "org.bukkit.configuration" ]
org.bukkit.configuration;
138,088
public boolean promoteBlock(int blockIndex) throws IOException { ClientBlockInfo blockInfo = getClientBlockInfo(blockIndex); return mTachyonFS.promoteBlock(blockInfo.getBlockId()); }
boolean function(int blockIndex) throws IOException { ClientBlockInfo blockInfo = getClientBlockInfo(blockIndex); return mTachyonFS.promoteBlock(blockInfo.getBlockId()); }
/** * Promote block back to top layer after access * * @param blockIndex the index of the block * @return true if success, false otherwise * @throws IOException */
Promote block back to top layer after access
promoteBlock
{ "repo_name": "carsonwang/tachyon", "path": "core/src/main/java/tachyon/client/TachyonFile.java", "license": "apache-2.0", "size": 16193 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,386,606
private void parseHost(VirtualHost host, Node hostNode) { // Parse the "RouterType" attributes and elements. parseRouter(host, hostNode); Node item = hostNode.getAttributes().getNamedItem("hostDomain"); if ((item != null) && (item.getNodeValue() != null)) { host.se...
void function(VirtualHost host, Node hostNode) { parseRouter(host, hostNode); Node item = hostNode.getAttributes().getNamedItem(STR); if ((item != null) && (item.getNodeValue() != null)) { host.setHostDomain(item.getNodeValue()); } item = hostNode.getAttributes().getNamedItem(STR); if ((item != null) && (item.getNodeVa...
/** * Parse the attributes of a DOM node and update the given host. * * @param host * the host to update. * @param hostNode * the DOM node. */
Parse the attributes of a DOM node and update the given host
parseHost
{ "repo_name": "theanuradha/debrief", "path": "org.mwc.asset.comms/docs/restlet_src/org.restlet/org/restlet/engine/component/ComponentXmlParser.java", "license": "epl-1.0", "size": 38719 }
[ "org.restlet.routing.VirtualHost", "org.w3c.dom.Node" ]
import org.restlet.routing.VirtualHost; import org.w3c.dom.Node;
import org.restlet.routing.*; import org.w3c.dom.*;
[ "org.restlet.routing", "org.w3c.dom" ]
org.restlet.routing; org.w3c.dom;
298,820
protected Response getSuccessResponse(Request request, Object message, Map<String,String> headers) { return new Acknowledgement(request.getContent(), headers); }
Response function(Request request, Object message, Map<String,String> headers) { return new Acknowledgement(request.getContent(), headers); }
/** * Default implementation returns an acknowledgement response. */
Default implementation returns an acknowledgement response
getSuccessResponse
{ "repo_name": "CenturyLinkCloud/mdw", "path": "mdw-services/src/com/centurylink/mdw/services/request/BaseHandler.java", "license": "apache-2.0", "size": 7091 }
[ "com.centurylink.mdw.model.request.Request", "com.centurylink.mdw.model.request.Response", "java.util.Map" ]
import com.centurylink.mdw.model.request.Request; import com.centurylink.mdw.model.request.Response; import java.util.Map;
import com.centurylink.mdw.model.request.*; import java.util.*;
[ "com.centurylink.mdw", "java.util" ]
com.centurylink.mdw; java.util;
1,321,040
public void removeDefaultAcl(Path path) throws IOException { throw new UnsupportedOperationException(getClass().getSimpleName() + " doesn't support removeDefaultAcl"); }
void function(Path path) throws IOException { throw new UnsupportedOperationException(getClass().getSimpleName() + STR); }
/** * Removes all default ACL entries from files and directories. * * @param path Path to modify * @throws IOException if an ACL could not be modified */
Removes all default ACL entries from files and directories
removeDefaultAcl
{ "repo_name": "joyghosh/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java", "license": "gpl-3.0", "size": 116427 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,307,818
private void useAssetForImage( Asset asset, boolean imageIsNew ) { if ( imageIsNew ) mEditableImageContainerFrame.clearState(); mEditableImageContainerFrame.setImageKey( asset ); AssetHelper.requestImage( mKiteActivity, asset, mEditableImageContainerFrame ); }
void function( Asset asset, boolean imageIsNew ) { if ( imageIsNew ) mEditableImageContainerFrame.clearState(); mEditableImageContainerFrame.setImageKey( asset ); AssetHelper.requestImage( mKiteActivity, asset, mEditableImageContainerFrame ); }
/***************************************************** * * Uses the supplied asset for the photo. * *****************************************************/
Uses the supplied asset for the photo
useAssetForImage
{ "repo_name": "bearprada/Android-Print-SDK", "path": "KitePrintSDK/src/main/java/ly/kite/journey/creation/phonecase/PhoneCaseFragment.java", "license": "mit", "size": 11440 }
[ "ly.kite.catalogue.Asset", "ly.kite.catalogue.AssetHelper" ]
import ly.kite.catalogue.Asset; import ly.kite.catalogue.AssetHelper;
import ly.kite.catalogue.*;
[ "ly.kite.catalogue" ]
ly.kite.catalogue;
2,794,701
public static String readFileAsStringByByete(String fileName) throws java.io.IOException { StringBuilder builder = new StringBuilder(); InputStream is = new FileInputStream(fileName); String s = readInputStreamAsString(is); return s; }
static String function(String fileName) throws java.io.IOException { StringBuilder builder = new StringBuilder(); InputStream is = new FileInputStream(fileName); String s = readInputStreamAsString(is); return s; }
/** * write by myself(zhidao@taobao.com) * * @param fileName * @return * @throws java.io.IOException */
write by myself(zhidao@taobao.com)
readFileAsStringByByete
{ "repo_name": "qingtian/tb-diamond", "path": "diamond-utils/src/main/java/com/taobao/diamond/utils/ZFileUtil.java", "license": "gpl-2.0", "size": 13522 }
[ "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
527,606
@Test public void testQueriesOnLocalRegionWithIndexOnFloat() throws Exception { Cache cache = CacheUtils.getCache(); testRegion = createLocalRegion(testRegionName); populateRegion(testRegion); assertNotNull(cache.getRegion(testRegionName)); assertEquals(numElem * 2, cache.getRegion(testRegion...
void function() throws Exception { Cache cache = CacheUtils.getCache(); testRegion = createLocalRegion(testRegionName); populateRegion(testRegion); assertNotNull(cache.getRegion(testRegionName)); assertEquals(numElem * 2, cache.getRegion(testRegionName).size()); String regionPath = "/" + testRegionName + STR; executeQu...
/** * Test on Local Region data against an indexed Float object and non indexed Float Object */
Test on Local Region data against an indexed Float object and non indexed Float Object
testQueriesOnLocalRegionWithIndexOnFloat
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/NumericQueryJUnitTest.java", "license": "apache-2.0", "size": 14805 }
[ "org.apache.geode.cache.Cache", "org.apache.geode.cache.query.CacheUtils", "org.junit.Assert" ]
import org.apache.geode.cache.Cache; import org.apache.geode.cache.query.CacheUtils; import org.junit.Assert;
import org.apache.geode.cache.*; import org.apache.geode.cache.query.*; import org.junit.*;
[ "org.apache.geode", "org.junit" ]
org.apache.geode; org.junit;
1,976,572
List<String> getFormFieldNames(PDDocument pdDocument) { PDAcroForm pdAcroForm = pdDocument.getDocumentCatalog().getAcroForm(); if (pdAcroForm == null) return Collections.emptyList(); List<String> result = new ArrayList<>(); for (PDField pdField : pdAcroForm.getFieldT...
List<String> getFormFieldNames(PDDocument pdDocument) { PDAcroForm pdAcroForm = pdDocument.getDocumentCatalog().getAcroForm(); if (pdAcroForm == null) return Collections.emptyList(); List<String> result = new ArrayList<>(); for (PDField pdField : pdAcroForm.getFieldTree()) { if (pdField instanceof PDTerminalField) { re...
/** * <a href="http://stackoverflow.com/questions/39574021/how-can-the-internal-labels-of-the-editable-fields-in-an-acroform-pdf-be-found"> * How can the internal labels of the editable fields in an acroform .pdf be found and listed? * </a> * <p> * This method retrieves the form field names fro...
How can the internal labels of the editable fields in an acroform .pdf be found and listed? This method retrieves the form field names from the given <code>PDDocument</code>.
getFormFieldNames
{ "repo_name": "mkl-public/testarea-pdfbox2", "path": "src/test/java/mkl/testarea/pdfbox2/form/ShowFormFieldNames.java", "license": "apache-2.0", "size": 3566 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.apache.pdfbox.pdmodel.PDDocument", "org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm", "org.apache.pdfbox.pdmodel.interactive.form.PDField", "org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm; import org.apache.pdfbox.pdmodel.interactive.form.PDField; import org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField;
import java.util.*; import org.apache.pdfbox.pdmodel.*; import org.apache.pdfbox.pdmodel.interactive.form.*;
[ "java.util", "org.apache.pdfbox" ]
java.util; org.apache.pdfbox;
2,625,944
@Override public void setDeviceUserManager(DeviceUserManager deviceUserManager) { this.deviceUserManager = deviceUserManager; }
void function(DeviceUserManager deviceUserManager) { this.deviceUserManager = deviceUserManager; }
/** * DealWithDeviceUser Interface implementation. */
DealWithDeviceUser Interface implementation
setDeviceUserManager
{ "repo_name": "fvasquezjatar/fermat-unused", "path": "CCP/plugin/identity/fermat-ccp-plugin-identity-intra-wallet-user-bitdubai/src/main/java/com/bitdubai/fermat_ccp_plugin/layer/identity/intra_wallet_user/developer/bitdubai/version_1/IntraWalletUserIdentityPluginRoot.java", "license": "mit", "size": 21645 }
[ "com.bitdubai.fermat_pip_api.layer.pip_user.device_user.interfaces.DeviceUserManager" ]
import com.bitdubai.fermat_pip_api.layer.pip_user.device_user.interfaces.DeviceUserManager;
import com.bitdubai.fermat_pip_api.layer.pip_user.device_user.interfaces.*;
[ "com.bitdubai.fermat_pip_api" ]
com.bitdubai.fermat_pip_api;
1,556,316
protected void validateDefaultFetchOrientation(FetchOrientation orientation) throws HiveSQLException { validateFetchOrientation(orientation, DEFAULT_FETCH_ORIENTATION_SET); }
void function(FetchOrientation orientation) throws HiveSQLException { validateFetchOrientation(orientation, DEFAULT_FETCH_ORIENTATION_SET); }
/** * Verify if the given fetch orientation is part of the default orientation types. * @param orientation * @throws HiveSQLException */
Verify if the given fetch orientation is part of the default orientation types
validateDefaultFetchOrientation
{ "repo_name": "jkbradley/spark", "path": "sql/hive-thriftserver/v1.2/src/main/java/org/apache/hive/service/cli/operation/Operation.java", "license": "apache-2.0", "size": 10756 }
[ "org.apache.hive.service.cli.FetchOrientation", "org.apache.hive.service.cli.HiveSQLException" ]
import org.apache.hive.service.cli.FetchOrientation; import org.apache.hive.service.cli.HiveSQLException;
import org.apache.hive.service.cli.*;
[ "org.apache.hive" ]
org.apache.hive;
2,029,953