method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static String getIdentity(X509Certificate [] chain) throws CertificateException { return getIdentity(getIdentityCertificate(chain)); }
static String function(X509Certificate [] chain) throws CertificateException { return getIdentity(getIdentityCertificate(chain)); }
/** * Finds the identity certificate in the given chain and * returns the subject DN of that certificate in the Globus format. * * @param chain the certificate chain to find the identity * certificate in. The certificates must be * of <code>X509CertificateObject</...
Finds the identity certificate in the given chain and returns the subject DN of that certificate in the Globus format
getIdentity
{ "repo_name": "ellert/JGlobus", "path": "ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java", "license": "apache-2.0", "size": 22088 }
[ "java.security.cert.CertificateException", "java.security.cert.X509Certificate" ]
import java.security.cert.CertificateException; import java.security.cert.X509Certificate;
import java.security.cert.*;
[ "java.security" ]
java.security;
2,262,739
public boolean isEndOfBlock(int offset) throws IOException{ return offset >= endOffset(); }
boolean function(int offset) throws IOException{ return offset >= endOffset(); }
/** * Check if offset reached the end, for read. * @param offset offset of reading * @return true if reached the end of block(available data), false otherwise * @throws IOException */
Check if offset reached the end, for read
isEndOfBlock
{ "repo_name": "rushmore/zbus", "path": "src/main/java/io/zbus/mq/disk/support/Block.java", "license": "mit", "size": 7914 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,615,455
@SuppressWarnings("unused") public static void show(Context context, Profile profile, WebContents webContents) { new WebsiteSettingsPopup(context, profile, webContents); }
@SuppressWarnings(STR) static void function(Context context, Profile profile, WebContents webContents) { new WebsiteSettingsPopup(context, profile, webContents); }
/** * Shows a WebsiteSettings dialog for the provided WebContents. The popup adds itself to the * view hierarchy which owns the reference while it's visible. * * @param context Context which is used for launching a dialog. * @param webContents The WebContents for which to show Website informati...
Shows a WebsiteSettings dialog for the provided WebContents. The popup adds itself to the view hierarchy which owns the reference while it's visible
show
{ "repo_name": "Pluto-tv/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java", "license": "bsd-3-clause", "size": 41857 }
[ "android.content.Context", "org.chromium.chrome.browser.profiles.Profile", "org.chromium.content_public.browser.WebContents" ]
import android.content.Context; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.content_public.browser.WebContents;
import android.content.*; import org.chromium.chrome.browser.profiles.*; import org.chromium.content_public.browser.*;
[ "android.content", "org.chromium.chrome", "org.chromium.content_public" ]
android.content; org.chromium.chrome; org.chromium.content_public;
312,005
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.fragment_category_detail, menu); return super.onCreateOptionsMenu(menu); }
boolean function(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.fragment_category_detail, menu); return super.onCreateOptionsMenu(menu); }
/** * This method inflates the menu in the toolbar */
This method inflates the menu in the toolbar
onCreateOptionsMenu
{ "repo_name": "commons-app/apps-android-commons", "path": "app/src/main/java/fr/free/nrw/commons/category/CategoryDetailsActivity.java", "license": "apache-2.0", "size": 9132 }
[ "android.view.Menu", "android.view.MenuInflater" ]
import android.view.Menu; import android.view.MenuInflater;
import android.view.*;
[ "android.view" ]
android.view;
1,071,581
protected void reduceCurrentScheduleLength (int nUpperBoundDecrease) { for (DAGraph.Vertex v : getGraph ().getVertices ()) v.setInitialScheduleBounds (v.getInitialLowerScheduleBound (), v.getInitialUpperScheduleBound () - nUpperBoundDecrease); }
void function (int nUpperBoundDecrease) { for (DAGraph.Vertex v : getGraph ().getVertices ()) v.setInitialScheduleBounds (v.getInitialLowerScheduleBound (), v.getInitialUpperScheduleBound () - nUpperBoundDecrease); }
/** * Decrements the initial upper schedule bounds of all the vertices in the * graph. */
Decrements the initial upper schedule bounds of all the vertices in the graph
reduceCurrentScheduleLength
{ "repo_name": "bcosenza/patus", "path": "src/ch/unibas/cs/hpwc/patus/codegen/backend/assembly/InstructionRegionScheduler.java", "license": "lgpl-2.1", "size": 14822 }
[ "ch.unibas.cs.hpwc.patus.codegen.backend.assembly.analyze.DAGraph" ]
import ch.unibas.cs.hpwc.patus.codegen.backend.assembly.analyze.DAGraph;
import ch.unibas.cs.hpwc.patus.codegen.backend.assembly.analyze.*;
[ "ch.unibas.cs" ]
ch.unibas.cs;
2,544,738
List readProjectsForUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException;
List readProjectsForUser(CmsDbContext dbc, CmsUser user) throws CmsDataAccessException;
/** * Reads all projects which are owned by a specified user.<p> * * @param dbc the current database context * @param user the user * * @return a list of objects of type <code>{@link CmsProject}</code> * * @throws CmsDataAccessException if something goes wrong */
Reads all projects which are owned by a specified user
readProjectsForUser
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/db/I_CmsProjectDriver.java", "license": "lgpl-2.1", "size": 25498 }
[ "java.util.List", "org.opencms.file.CmsDataAccessException", "org.opencms.file.CmsUser" ]
import java.util.List; import org.opencms.file.CmsDataAccessException; import org.opencms.file.CmsUser;
import java.util.*; import org.opencms.file.*;
[ "java.util", "org.opencms.file" ]
java.util; org.opencms.file;
1,908,417
public StringMutableWrapper sayHello() { return new StringMutableWrapper(this.message + "\n from " + getHostName() + "\n at " + new java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new java.util.Date())); }
StringMutableWrapper function() { return new StringMutableWrapper(this.message + STR + getHostName() + STR + new java.text.SimpleDateFormat(STR).format(new java.util.Date())); }
/** The Active Object creates and returns information on its location * @return a StringWrapper which is a Serialized version, for asynchrony */
The Active Object creates and returns information on its location
sayHello
{ "repo_name": "nmpgaspar/PainlessProActive", "path": "src/Examples/org/objectweb/proactive/examples/hello/TinyHello.java", "license": "agpl-3.0", "size": 3819 }
[ "org.objectweb.proactive.core.util.wrapper.StringMutableWrapper" ]
import org.objectweb.proactive.core.util.wrapper.StringMutableWrapper;
import org.objectweb.proactive.core.util.wrapper.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
1,458,286
void setVisibilityAndLicense(InputFile inputFile, RuleVisibility visibility, License license) { String filename = inputFile.getName(); Target cacheInstance = targets.get(filename); if (!(cacheInstance instanceof InputFile)) { throw new IllegalArgumentException("Can't set visibility for non...
void setVisibilityAndLicense(InputFile inputFile, RuleVisibility visibility, License license) { String filename = inputFile.getName(); Target cacheInstance = targets.get(filename); if (!(cacheInstance instanceof InputFile)) { throw new IllegalArgumentException(STR + filename + STR + pkg.getName() + "."); } if (!((Input...
/** * Sets the visibility and license for an input file. The input file must already exist as * a member of this package. * @throws IllegalArgumentException if the input file doesn't exist in this * package's target map. */
Sets the visibility and license for an input file. The input file must already exist as a member of this package
setVisibilityAndLicense
{ "repo_name": "perezd/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/Package.java", "license": "apache-2.0", "size": 77406 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
362,230
public GenericEntity<?> getGenericEntity();
GenericEntity<?> function();
/** * Wrap this resource into a JAX-RS GenericEntity object * @return GenericEntity object */
Wrap this resource into a JAX-RS GenericEntity object
getGenericEntity
{ "repo_name": "MohamedNazir/IRIS", "path": "interaction-core/src/main/java/com/temenos/interaction/core/resource/RESTResource.java", "license": "agpl-3.0", "size": 2537 }
[ "javax.ws.rs.core.GenericEntity" ]
import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,438,409
EClass getUiAddToTableCommand();
EClass getUiAddToTableCommand();
/** * Returns the meta object for class '{@link org.lunifera.ecview.semantic.uimodel.UiAddToTableCommand <em>Ui Add To Table Command</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Ui Add To Table Command</em>'. * @see org.lunifera.ecview.semantic.uimodel.UiA...
Returns the meta object for class '<code>org.lunifera.ecview.semantic.uimodel.UiAddToTableCommand Ui Add To Table Command</code>'.
getUiAddToTableCommand
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java", "license": "epl-1.0", "size": 498897 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,646
@Test public void replaceIntoDbNormal() { String sync_id = "replaceIntoDbNormal"; dao.insert(new Sync(sync_id, new DateTime(0))); assertThat(syncManager.needSync(sync_id, 1234)).isTrue(); syncManager.replaceIntoDb(sync_id); assertThat(syncManager.needSync(sync_id, 1234))....
void function() { String sync_id = STR; dao.insert(new Sync(sync_id, new DateTime(0))); assertThat(syncManager.needSync(sync_id, 1234)).isTrue(); syncManager.replaceIntoDb(sync_id); assertThat(syncManager.needSync(sync_id, 1234)).isFalse(); }
/** * Non direct way of checking that Sync entity has been replaced through needSync * Workflow: * 1. add sync with specific id and "old" timestamp * 2. verify needSync returns true * 3. use target function to update same id * 4. verify needSync returns false */
Non direct way of checking that Sync entity has been replaced through needSync Workflow: 1. add sync with specific id and "old" timestamp 2. verify needSync returns true 3. use target function to update same id 4. verify needSync returns false
replaceIntoDbNormal
{ "repo_name": "TCA-Team/TumCampusApp", "path": "app/src/test/java/de/tum/in/tumcampusapp/managers/SyncManagerTest.java", "license": "gpl-3.0", "size": 2824 }
[ "de.tum.in.tumcampusapp.utils.sync.model.Sync", "org.assertj.core.api.Assertions", "org.joda.time.DateTime" ]
import de.tum.in.tumcampusapp.utils.sync.model.Sync; import org.assertj.core.api.Assertions; import org.joda.time.DateTime;
import de.tum.in.tumcampusapp.utils.sync.model.*; import org.assertj.core.api.*; import org.joda.time.*;
[ "de.tum.in", "org.assertj.core", "org.joda.time" ]
de.tum.in; org.assertj.core; org.joda.time;
2,175,900
public boolean CallNamedPipe(String lpNamedPipeName, byte[] lpInBuffer, int nInBufferSize, byte[] lpOutBuffer, int nOutBufferSize, IntByReference lpBytesRead, int nTimeOut); /** * Enables a named pipe server process to wait for ...
boolean function(String lpNamedPipeName, byte[] lpInBuffer, int nInBufferSize, byte[] lpOutBuffer, int nOutBufferSize, IntByReference lpBytesRead, int nTimeOut); /** * Enables a named pipe server process to wait for a client process to connect * to an instance of a named pipe * @param hNamedPipe A handle to the server ...
/** * Connects to a message-type pipe (and waits if an instance of the pipe is * not available), writes to and reads from the pipe, and then closes the pipe. * @param lpNamedPipeName The pipe name. * @param lpInBuffer The data to be written to the pipe. * @param nInBufferSize The size of the wr...
Connects to a message-type pipe (and waits if an instance of the pipe is not available), writes to and reads from the pipe, and then closes the pipe
CallNamedPipe
{ "repo_name": "trejkaz/jna", "path": "contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java", "license": "lgpl-2.1", "size": 191613 }
[ "com.sun.jna.ptr.IntByReference" ]
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
1,124,028
private JPanel getJPanelNorth() { if (jPanelNorth == null) { jPanelNorth = new JPanel(); jPanelNorth.setLayout(new BorderLayout()); jPanelNorth.setPreferredSize(new java.awt.Dimension(100,12)); jPanelNorth.add(getJPanelCenterNorth(), java.awt.BorderLayout.CENTER); jPanelNorth.add(getJPanelButtons(),...
JPanel function() { if (jPanelNorth == null) { jPanelNorth = new JPanel(); jPanelNorth.setLayout(new BorderLayout()); jPanelNorth.setPreferredSize(new java.awt.Dimension(100,12)); jPanelNorth.add(getJPanelCenterNorth(), java.awt.BorderLayout.CENTER); jPanelNorth.add(getJPanelButtons(), java.awt.BorderLayout.EAST); } re...
/** * This method initializes jPanelNorth * * @return javax.swing.JPanel */
This method initializes jPanelNorth
getJPanelNorth
{ "repo_name": "iCarto/siga", "path": "libIverUtiles/src/com/iver/utiles/console/JDockPanel.java", "license": "gpl-3.0", "size": 8643 }
[ "java.awt.BorderLayout", "java.awt.Dimension", "javax.swing.JPanel" ]
import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,909,715
PageStreamTrunk next() { canDelete = false; if (first == 0) { first = next; } else if (first == next) { return null; } if (next == 0 || next >= store.getPageCount()) { return null; } ...
PageStreamTrunk next() { canDelete = false; if (first == 0) { first = next; } else if (first == next) { return null; } if (next == 0 next >= store.getPageCount()) { return null; } Page p; current = next; try { p = store.getPage(next); } catch (DbException e) { if (e.getErrorCode() == ErrorCode.FILE_CORRUPTED_1) { retur...
/** * Get the next trunk page or null if no next trunk page. * * @return the next trunk page or null */
Get the next trunk page or null if no next trunk page
next
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/h2/src/main/org/h2/store/PageStreamTrunk.java", "license": "gpl-3.0", "size": 7875 }
[ "org.h2.constant.ErrorCode", "org.h2.message.DbException" ]
import org.h2.constant.ErrorCode; import org.h2.message.DbException;
import org.h2.constant.*; import org.h2.message.*;
[ "org.h2.constant", "org.h2.message" ]
org.h2.constant; org.h2.message;
2,631,256
@FXML public void initialize(URL location, ResourceBundle resources) { v_id.setCellValueFactory(cellData -> new ReadOnlyObjectWrapper<>(cellData.getValue().getC_id())); v_nev.setCellValueFactory(cellData -> new ReadOnlyObjectWrapper<>(cellData.getValue().getC_name())); v_aldatum.setCellV...
void function(URL location, ResourceBundle resources) { v_id.setCellValueFactory(cellData -> new ReadOnlyObjectWrapper<>(cellData.getValue().getC_id())); v_nev.setCellValueFactory(cellData -> new ReadOnlyObjectWrapper<>(cellData.getValue().getC_name())); v_aldatum.setCellValueFactory(cellData -> new ReadOnlyObjectWrapp...
/** * Called to initialize a controller after its root element has been * completely processed. * * @param location The location used to resolve relative paths for the root object, or * <tt>null</tt> if the location is not known. * @param resources The resources used to l...
Called to initialize a controller after its root element has been completely processed
initialize
{ "repo_name": "firstvan/OrderTaker", "path": "view/src/main/java/hu/firstvan/controller/CustomerChooserController.java", "license": "gpl-3.0", "size": 3909 }
[ "java.util.ResourceBundle" ]
import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
504,858
public static void sendEmailAsHtml( String host, String from, String to, String subject, String message, String link) throws Exception { // message buffer StringBuilder content = new StringBuilder(); content.append(message); // can add html tags like <h1> if needed content.append("&nbsp...
static void function( String host, String from, String to, String subject, String message, String link) throws Exception { StringBuilder content = new StringBuilder(); content.append(message); content.append(STR); String url = STR + link + "\'>" + STR; content.append(url); Properties props = new Properties(); props.put...
/** * send email as html message * * @param host * @param from * @param to * @param link * @throws Exception */
send email as html message
sendEmailAsHtml
{ "repo_name": "TreeBASE/treebasetest", "path": "treebase-web/src/main/java/org/cipres/treebase/web/util/WebUtil.java", "license": "bsd-3-clause", "size": 7809 }
[ "java.util.Properties", "javax.mail.BodyPart", "javax.mail.Message", "javax.mail.Multipart", "javax.mail.Session", "javax.mail.Transport", "javax.mail.internet.InternetAddress", "javax.mail.internet.MimeBodyPart", "javax.mail.internet.MimeMessage", "javax.mail.internet.MimeMultipart" ]
import java.util.Properties; import javax.mail.BodyPart; import javax.mail.Message; import javax.mail.Multipart; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; import javax.mail.internet...
import java.util.*; import javax.mail.*; import javax.mail.internet.*;
[ "java.util", "javax.mail" ]
java.util; javax.mail;
493,137
public static LinkReference parse(String text, ContainerInfo base, SourcePositionInfo pos, boolean printOnErrors) { LinkReference result = new LinkReference(); result.text = text; int index; int len = text.length(); int pairs = 0; ...
static LinkReference function(String text, ContainerInfo base, SourcePositionInfo pos, boolean printOnErrors) { LinkReference result = new LinkReference(); result.text = text; int index; int len = text.length(); int pairs = 0; int pound = -1; done: { for (index=0; index<len; index++) { char c = text.charAt(index); swit...
/** * Parse and resolve a link string. * * @param text the original text * @param base the class or whatever that this link is on * @param pos the original position in the source document * @return a new link reference. It always returns something. If there was an * error, i...
Parse and resolve a link string
parse
{ "repo_name": "NachiketNamjoshi/TWRP_totoro_port_WIP", "path": "build_tools_replacement/tools/droiddoc/src/LinkReference.java", "license": "apache-2.0", "size": 16493 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,062,562
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { setResponeHeaders(response); PrintWriter pw = response.getWriter(); pw.println(GET_METHOD_RESPONSE_ERROR); } /** * There are three types of ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { setResponeHeaders(response); PrintWriter pw = response.getWriter(); pw.println(GET_METHOD_RESPONSE_ERROR); } /** * There are three types of requests are supported * h3. STR * Check the list of words passed as ...
/** * GET method is not supported * @see HttpServlet#doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse * response) */
GET method is not supported
doGet
{ "repo_name": "dotCMS/core-2.x", "path": "src/org/tinymce/spellchecker/TinyMCESpellCheckerServlet.java", "license": "gpl-3.0", "size": 16729 }
[ "java.io.IOException", "java.io.PrintWriter", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
78,918
public KapuaId getUserId() { return userId; }
KapuaId function() { return userId; }
/** * Get the user identifier * * @return */
Get the user identifier
getUserId
{ "repo_name": "stzilli/kapua", "path": "commons/src/main/java/org/eclipse/kapua/commons/security/KapuaSession.java", "license": "epl-1.0", "size": 8090 }
[ "org.eclipse.kapua.model.id.KapuaId" ]
import org.eclipse.kapua.model.id.KapuaId;
import org.eclipse.kapua.model.id.*;
[ "org.eclipse.kapua" ]
org.eclipse.kapua;
1,593,658
public FeatureCursor queryFeaturesForChunkIdOrder(String[] columns, BoundingBox boundingBox, Projection projection, String where, int limit) { return queryFeaturesForChunk(columns, boundingBox, projec...
FeatureCursor function(String[] columns, BoundingBox boundingBox, Projection projection, String where, int limit) { return queryFeaturesForChunk(columns, boundingBox, projection, where, getPkColumnName(), limit); }
/** * Query for features within the bounding box in the provided projection * ordered by id, starting at the offset and returning no more than the * limit * * @param columns columns * @param boundingBox bounding box * @param projection projection * @param where where c...
Query for features within the bounding box in the provided projection ordered by id, starting at the offset and returning no more than the limit
queryFeaturesForChunkIdOrder
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java", "license": "mit", "size": 276322 }
[ "mil.nga.geopackage.BoundingBox", "mil.nga.geopackage.features.user.FeatureCursor", "mil.nga.proj.Projection" ]
import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureCursor; import mil.nga.proj.Projection;
import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*;
[ "mil.nga.geopackage", "mil.nga.proj" ]
mil.nga.geopackage; mil.nga.proj;
347,316
ServiceCall<Void> post202RetryInvalidHeaderAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; ServiceResponseWithHeaders<Void, LROSADsPost202RetryInvalidHeaderHeaders> post202RetryInvalidHeader(Product product) throws CloudException, IOException, InterruptedException;
ServiceCall<Void> post202RetryInvalidHeaderAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; ServiceResponseWithHeaders<Void, LROSADsPost202RetryInvalidHeaderHeaders> post202RetryInvalidHeader(Product product) throws CloudException, IOException, InterruptedException;
/** * Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers. * * @param product Product to put * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization ...
Long running post request, service returns a 202 to the initial request, with invalid 'Location' and 'Retry-After' headers
post202RetryInvalidHeader
{ "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.ServiceCall", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceResponseWithHeaders", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponseWithHeaders; 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,180
public static void assertAllResultsEqual(Collection<?> objects) throws AssertionError { if (objects.size() == 0 || objects.size() == 1) return; Object[] resultsArray = objects.toArray(); for (int i = 1; i < resultsArray.length; i++) { Object currElement = resultsArray[i]; Obje...
static void function(Collection<?> objects) throws AssertionError { if (objects.size() == 0 objects.size() == 1) return; Object[] resultsArray = objects.toArray(); for (int i = 1; i < resultsArray.length; i++) { Object currElement = resultsArray[i]; Object lastElement = resultsArray[i - 1]; if ((currElement == null && ...
/** * Assert that all objects in the collection are equal. Returns silently if * so, throws an AssertionError if any object is not equal. All null values * are considered equal. * * @param objects the collection of objects to check for equality. */
Assert that all objects in the collection are equal. Returns silently if so, throws an AssertionError if any object is not equal. All null values are considered equal
assertAllResultsEqual
{ "repo_name": "an3m0na/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java", "license": "apache-2.0", "size": 70338 }
[ "java.util.Arrays", "java.util.Collection" ]
import java.util.Arrays; import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
927,477
BlockingQueue<Iterable<Record>> queue = new ArrayBlockingQueue<>(QUEUE_DEPTH); ExecutorService pool = Executors.newFixedThreadPool(POOL_SIZE); try { timerStart = new AtomicLong(System.currentTimeMillis()); processed = new AtomicLong(0); IntStream.range(0, 10).forEach(i -> pool.execute(() ...
BlockingQueue<Iterable<Record>> queue = new ArrayBlockingQueue<>(QUEUE_DEPTH); ExecutorService pool = Executors.newFixedThreadPool(POOL_SIZE); try { timerStart = new AtomicLong(System.currentTimeMillis()); processed = new AtomicLong(0); IntStream.range(0, 10).forEach(i -> pool.execute(() -> produce(queue, this::randomi...
/** * Creates and destroys lots of records in such a way that some may end up getting past * the eden space. */
Creates and destroys lots of records in such a way that some may end up getting past the eden space
testSimulateHighVolumeWithStrings
{ "repo_name": "alfasoftware/morf", "path": "morf-core/src/test/java/org/alfasoftware/morf/metadata/TestDataSetUtilsVolume.java", "license": "apache-2.0", "size": 9724 }
[ "java.util.concurrent.ArrayBlockingQueue", "java.util.concurrent.BlockingQueue", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "java.util.concurrent.TimeUnit", "java.util.concurrent.atomic.AtomicLong", "java.util.stream.IntStream", "org.alfasoftware.morf.dataset.Record" ]
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.IntStream; import org.alfasoftware.m...
import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.stream.*; import org.alfasoftware.morf.dataset.*;
[ "java.util", "org.alfasoftware.morf" ]
java.util; org.alfasoftware.morf;
1,490,849
loadSettings(); externalPrograms.setText("External program paths"); gamePathsPane.setText("Unreal games paths"); if (Installation.isLinux()) { String homeDir = System.getProperty("user.home"); uModelPath.setPromptText("e.g: " + homeDir + "/Downloads/umodel/umodel"); nconvertPath.setPromptTe...
loadSettings(); externalPrograms.setText(STR); gamePathsPane.setText(STR); if (Installation.isLinux()) { String homeDir = System.getProperty(STR); uModelPath.setPromptText(STR + homeDir + STR); nconvertPath.setPromptText(STR + homeDir + STR); } }
/** * Initializes the controller class. * * @param url * @param rb */
Initializes the controller class
initialize
{ "repo_name": "xtremexp/UT4Converter", "path": "src/main/java/org/xtx/ut4converter/ui/SettingsSceneController.java", "license": "lgpl-2.1", "size": 7976 }
[ "org.xtx.ut4converter.tools.Installation" ]
import org.xtx.ut4converter.tools.Installation;
import org.xtx.ut4converter.tools.*;
[ "org.xtx.ut4converter" ]
org.xtx.ut4converter;
2,916,523
public void paint(GraphicsWrap g);
void function(GraphicsWrap g);
/** * Paint the drawable object * @param g */
Paint the drawable object
paint
{ "repo_name": "hoangchunghien/Anki-Android", "path": "src/com/wildplot/android/rendering/interfaces/Drawable.java", "license": "gpl-3.0", "size": 2477 }
[ "com.wildplot.android.rendering.graphics.wrapper.GraphicsWrap" ]
import com.wildplot.android.rendering.graphics.wrapper.GraphicsWrap;
import com.wildplot.android.rendering.graphics.wrapper.*;
[ "com.wildplot.android" ]
com.wildplot.android;
1,046,299
public void setType(final ZclCommandType type) { this.type = type; }
void function(final ZclCommandType type) { this.type = type; }
/** * Sets the command * * @param type * the command */
Sets the command
setType
{ "repo_name": "tlaukkan/zigbee4java", "path": "zigbee-common/src/main/java/org/bubblecloud/zigbee/v3/zcl/ZclCommandMessage.java", "license": "apache-2.0", "size": 5210 }
[ "org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandType" ]
import org.bubblecloud.zigbee.v3.zcl.protocol.ZclCommandType;
import org.bubblecloud.zigbee.v3.zcl.protocol.*;
[ "org.bubblecloud.zigbee" ]
org.bubblecloud.zigbee;
1,830,122
protected static byte[] buildDeltasMessage(int iBaselineIndex, byte iBaselineType, short updateCount, short updateOperand, SOEObject o, String newSTFFileName, String newSTFFileIdentifier) throws IOException { // System.out.println("Building DOUBLE DeltasMessage. Values -- Baseline " // + Integer.toHexS...
static byte[] function(int iBaselineIndex, byte iBaselineType, short updateCount, short updateOperand, SOEObject o, String newSTFFileName, String newSTFFileIdentifier) throws IOException { int packetSize = 12; if (newSTFFileName != null) { packetSize += newSTFFileName.length(); } if (newSTFFileIdentifier != null) { pac...
/** * This deltas message is to be used ONLY to update the STF File data for an * object. * * @param The * baseline "name" of this object. Immutable. * @param iBaselineType * -- The baseline ID of the object -- is always 3 here. * @param updateCount * -- The number of...
This deltas message is to be used ONLY to update the STF File data for an object
buildDeltasMessage
{ "repo_name": "SWGANHServices/SWGANHJava", "path": "SWGCombined/src/PacketFactory.java", "license": "gpl-3.0", "size": 354141 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException" ]
import java.io.ByteArrayOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,344,001
public static URL getURL(String path) { URL url = null; try { url = new URL(path); if (url.getProtocol().equalsIgnoreCase("http")) { return url; } else { return null; } } catch (MalformedURLException e...
static URL function(String path) { URL url = null; try { url = new URL(path); if (url.getProtocol().equalsIgnoreCase("http")) { return url; } else { return null; } } catch (MalformedURLException ex) { return null; } }
/** * Get a <code>URL<code> object for this path * * @param path the path for which to get the URL * @return the URL represented by <code>path</code> or <code>null</code> if * it cannot be represented */
Get a <code>URL<code> object for this path
getURL
{ "repo_name": "opf-labs/jhove2", "path": "src/main/java/uk/gov/nationalarchives/droid/binFileReader/UrlByteReader.java", "license": "bsd-2-clause", "size": 4283 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
2,471,537
public boolean execute(final org.eclipse.swt.browser.Browser browser, final String script) { return Display.syncExec(new ResultRunnable<Boolean>() {
boolean function(final org.eclipse.swt.browser.Browser browser, final String script) { return Display.syncExec(new ResultRunnable<Boolean>() {
/** * Executes given javascript code in browser. For more info see * {@link Browser#execute(String)}. * * @param browser * to handle. * @param script * to execute. * * @return true if script was executed successfully. */
Executes given javascript code in browser. For more info see <code>Browser#execute(String)</code>
execute
{ "repo_name": "jboss-reddeer/reddeer", "path": "plugins/org.eclipse.reddeer.core/src/org/eclipse/reddeer/core/handler/BrowserHandler.java", "license": "epl-1.0", "size": 5488 }
[ "org.eclipse.reddeer.common.util.Display", "org.eclipse.reddeer.common.util.ResultRunnable", "org.eclipse.swt.browser.Browser" ]
import org.eclipse.reddeer.common.util.Display; import org.eclipse.reddeer.common.util.ResultRunnable; import org.eclipse.swt.browser.Browser;
import org.eclipse.reddeer.common.util.*; import org.eclipse.swt.browser.*;
[ "org.eclipse.reddeer", "org.eclipse.swt" ]
org.eclipse.reddeer; org.eclipse.swt;
1,219,961
protected Pattern compilePattern(Element regex, int flags) { Pattern p = null; try { String re = ((StringProperty) regex).getValue(); p = Pattern.compile(re, flags); } catch (PatternSyntaxException pse) { throw EvaluationException.create(sourceRange, MSG_INVALID_REGEXP, pse.getLocalizedMessage()...
Pattern function(Element regex, int flags) { Pattern p = null; try { String re = ((StringProperty) regex).getValue(); p = Pattern.compile(re, flags); } catch (PatternSyntaxException pse) { throw EvaluationException.create(sourceRange, MSG_INVALID_REGEXP, pse.getLocalizedMessage()); } return p; }
/** * Generate a Pattern from the given string and flags. * * @param regex * regular expression to compile * @param flags * matching flags to use for pattern * * @return Pattern corresponding to the given regular expression and * matching flags */
Generate a Pattern from the given string and flags
compilePattern
{ "repo_name": "quattor/pan", "path": "panc/src/main/java/org/quattor/pan/dml/functions/AbstractMatcher.java", "license": "apache-2.0", "size": 3620 }
[ "java.util.regex.Pattern", "java.util.regex.PatternSyntaxException", "org.quattor.pan.dml.data.Element", "org.quattor.pan.dml.data.StringProperty", "org.quattor.pan.exceptions.EvaluationException" ]
import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import org.quattor.pan.dml.data.Element; import org.quattor.pan.dml.data.StringProperty; import org.quattor.pan.exceptions.EvaluationException;
import java.util.regex.*; import org.quattor.pan.dml.data.*; import org.quattor.pan.exceptions.*;
[ "java.util", "org.quattor.pan" ]
java.util; org.quattor.pan;
292,078
public static <K, V> Map<K, V> asUnmodifiable(Map<K, V> self) { return Collections.unmodifiableMap(self); }
static <K, V> Map<K, V> function(Map<K, V> self) { return Collections.unmodifiableMap(self); }
/** * Creates an unmodifiable view of a Map. * * @param self a Map * @return an unmodifiable view of the Map * @see java.util.Collections#unmodifiableMap(java.util.Map) * @see #asUnmodifiable(java.util.List) * @since 2.5.0 */
Creates an unmodifiable view of a Map
asUnmodifiable
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 703151 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,620,630
@Override public synchronized void start() { assertNotRunning(); m_status = STARTING; try { InetAddress address = "*".equals(m_ipAddress) ? null : InetAddressUtils.addr(m_ipAddress); m_server = new TcpServer(this, m_eventHandlers, m_tcpPort, address); ...
synchronized void function() { assertNotRunning(); m_status = STARTING; try { InetAddress address = "*".equals(m_ipAddress) ? null : InetAddressUtils.addr(m_ipAddress); m_server = new TcpServer(this, m_eventHandlers, m_tcpPort, address); if (m_logPrefix != null) { m_server.setLogPrefix(m_logPrefix); } if (m_recsPerConn...
/** * Allocates the server socket and starts up the server socket processor * thread. If an error occurs allocating the server socket or the Fiber is * in an erronous state then a * {@link java.lang.RuntimeException runtime exception}is thrown. * * @throws java.lang.reflect.UndeclaredThrow...
Allocates the server socket and starts up the server socket processor thread. If an error occurs allocating the server socket or the Fiber is in an erronous state then a <code>java.lang.RuntimeException runtime exception</code>is thrown
start
{ "repo_name": "rfdrake/opennms", "path": "opennms-services/src/main/java/org/opennms/netmgt/eventd/adaptors/tcp/TcpEventReceiver.java", "license": "gpl-2.0", "size": 11454 }
[ "java.io.IOException", "java.lang.reflect.UndeclaredThrowableException", "java.net.InetAddress", "org.opennms.core.utils.InetAddressUtils" ]
import java.io.IOException; import java.lang.reflect.UndeclaredThrowableException; import java.net.InetAddress; import org.opennms.core.utils.InetAddressUtils;
import java.io.*; import java.lang.reflect.*; import java.net.*; import org.opennms.core.utils.*;
[ "java.io", "java.lang", "java.net", "org.opennms.core" ]
java.io; java.lang; java.net; org.opennms.core;
410,914
public int markAsDeleted(long id) throws PimListenerException { try { PimRegistryEntry entry = dao.getEntryById(id); if (entry == null) { return 0; } entry.setStatus(RegistryEntryStatus.DELETED); entry.setLastUpdate(System.curre...
int function(long id) throws PimListenerException { try { PimRegistryEntry entry = dao.getEntryById(id); if (entry == null) { return 0; } entry.setStatus(RegistryEntryStatus.DELETED); entry.setLastUpdate(System.currentTimeMillis()); return dao.updatePimRegistrEntry(entry); } catch (DataAccessException ex) { throw new P...
/** * Marks as deleted the entry with the given id * @param id the entry id * @throws com.funambol.pimlistener.service.PimListenerException if an error occurs * @return the number of updated entries */
Marks as deleted the entry with the given id
markAsDeleted
{ "repo_name": "accesstest3/cfunambol", "path": "modules/foundation/pim-listener/src/main/java/com/funambol/pimlistener/registry/PimRegistryEntryManager.java", "license": "agpl-3.0", "size": 9404 }
[ "com.funambol.pimlistener.service.PimListenerException", "com.funambol.pushlistener.service.registry.RegistryEntryStatus", "com.funambol.pushlistener.service.registry.dao.DataAccessException" ]
import com.funambol.pimlistener.service.PimListenerException; import com.funambol.pushlistener.service.registry.RegistryEntryStatus; import com.funambol.pushlistener.service.registry.dao.DataAccessException;
import com.funambol.pimlistener.service.*; import com.funambol.pushlistener.service.registry.*; import com.funambol.pushlistener.service.registry.dao.*;
[ "com.funambol.pimlistener", "com.funambol.pushlistener" ]
com.funambol.pimlistener; com.funambol.pushlistener;
1,683,167
public synchronized void add(MetricName metricName, MeasurableStat stat, MetricConfig config) { KafkaMetric metric = new KafkaMetric(new Object(), Utils.notNull(metricName), Utils.notNull(stat), ...
synchronized void function(MetricName metricName, MeasurableStat stat, MetricConfig config) { KafkaMetric metric = new KafkaMetric(new Object(), Utils.notNull(metricName), Utils.notNull(stat), config == null ? this.config : config, time); this.registry.registerMetric(metric); this.metrics.add(metric); this.stats.add(st...
/** * Register a metric with this sensor * @param metricName The name of the metric * @param stat The statistic to keep * @param config A special configuration for this metric. If null use the sensor default configuration. */
Register a metric with this sensor
add
{ "repo_name": "YMCoding/kafka-0.11.0.0-src-with-comment", "path": "clients/src/main/java/org/apache/kafka/common/metrics/Sensor.java", "license": "apache-2.0", "size": 10717 }
[ "org.apache.kafka.common.MetricName", "org.apache.kafka.common.utils.Utils" ]
import org.apache.kafka.common.MetricName; import org.apache.kafka.common.utils.Utils;
import org.apache.kafka.common.*; import org.apache.kafka.common.utils.*;
[ "org.apache.kafka" ]
org.apache.kafka;
1,400,408
public static <E> LinkedBlockingDeque<E> newLinkedBlockingDeque(Iterable<? extends E> elements) { if (elements instanceof Collection) { return new LinkedBlockingDeque<E>(Collections2.cast(elements)); } LinkedBlockingDeque<E> deque = new LinkedBlockingDeque<E>(); Iterables.addAll(deque, elements)...
static <E> LinkedBlockingDeque<E> function(Iterable<? extends E> elements) { if (elements instanceof Collection) { return new LinkedBlockingDeque<E>(Collections2.cast(elements)); } LinkedBlockingDeque<E> deque = new LinkedBlockingDeque<E>(); Iterables.addAll(deque, elements); return deque; }
/** * Creates a {@code LinkedBlockingDeque} with a capacity of {@link Integer#MAX_VALUE}, * containing the elements of the specified iterable, * in the order they are returned by the iterable's iterator. * * @since 12.0 */
Creates a LinkedBlockingDeque with a capacity of <code>Integer#MAX_VALUE</code>, containing the elements of the specified iterable, in the order they are returned by the iterable's iterator
newLinkedBlockingDeque
{ "repo_name": "jakubmalek/guava", "path": "guava/src/com/google/common/collect/Queues.java", "license": "apache-2.0", "size": 14759 }
[ "java.util.Collection", "java.util.concurrent.LinkedBlockingDeque" ]
import java.util.Collection; import java.util.concurrent.LinkedBlockingDeque;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,833,383
void injectRemoteDirectory( Artifact.SpecialArtifact output, Map<PathFragment, RemoteFileArtifactValue> children);
void injectRemoteDirectory( Artifact.SpecialArtifact output, Map<PathFragment, RemoteFileArtifactValue> children);
/** * Inject the metadata of a tree artifact whose contents are stored remotely. * * @param output an output directory. * @param children the metadata of the files stored in the directory. The paths must be relative * to the path of {@code output}. */
Inject the metadata of a tree artifact whose contents are stored remotely
injectRemoteDirectory
{ "repo_name": "dslomov/bazel-windows", "path": "src/main/java/com/google/devtools/build/lib/actions/cache/MetadataInjector.java", "license": "apache-2.0", "size": 2601 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.actions.FileArtifactValue", "com.google.devtools.build.lib.vfs.PathFragment", "java.util.Map" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.FileArtifactValue; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Map;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.vfs.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
271,824
CompletableFuture<Boolean> mapContainsValue(String mapName, V value);
CompletableFuture<Boolean> mapContainsValue(String mapName, V value);
/** * Checks whether the map contains a value. * * @param mapName map name * @param value The value to check. * @return A completable future to be completed with the result once complete. */
Checks whether the map contains a value
mapContainsValue
{ "repo_name": "kkkane/ONOS", "path": "core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DatabaseProxy.java", "license": "apache-2.0", "size": 8303 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,382,877
private void runMiddleendPasses(SoyFileSetNode soyTree, boolean doEnforceSyntaxVersionV2) throws SoySyntaxException { // If diallowing external calls, perform the check. if (generalOptions.allowExternalCalls() == Boolean.FALSE) { (new AssertNoExternalCallsVisitor()).exec(soyTree); } // H...
void function(SoyFileSetNode soyTree, boolean doEnforceSyntaxVersionV2) throws SoySyntaxException { if (generalOptions.allowExternalCalls() == Boolean.FALSE) { (new AssertNoExternalCallsVisitor()).exec(soyTree); } (new HandleCssCommandVisitor(generalOptions.getCssHandlingScheme())).exec(soyTree); if (generalOptions.get...
/** * Runs middleend passes on the given Soy tree. * * @param soyTree The Soy tree to run middleend passes on. * @param doEnforceSyntaxVersionV2 Whether to enforce SyntaxVersion.V2. * @throws SoySyntaxException If a syntax error is found. * @throws SoyAutoescapeException If there is a problem determin...
Runs middleend passes on the given Soy tree
runMiddleendPasses
{ "repo_name": "pomack/closure-templates", "path": "java/src/com/google/template/soy/SoyFileSet.java", "license": "apache-2.0", "size": 35597 }
[ "com.google.template.soy.base.SoySyntaxException", "com.google.template.soy.parsepasses.ChangeCallsToPassAllDataVisitor", "com.google.template.soy.parsepasses.HandleCssCommandVisitor", "com.google.template.soy.sharedpasses.AssertNoExternalCallsVisitor", "com.google.template.soy.sharedpasses.SubstituteGlobal...
import com.google.template.soy.base.SoySyntaxException; import com.google.template.soy.parsepasses.ChangeCallsToPassAllDataVisitor; import com.google.template.soy.parsepasses.HandleCssCommandVisitor; import com.google.template.soy.sharedpasses.AssertNoExternalCallsVisitor; import com.google.template.soy.sharedpasses.Su...
import com.google.template.soy.base.*; import com.google.template.soy.parsepasses.*; import com.google.template.soy.sharedpasses.*; import com.google.template.soy.soytree.*;
[ "com.google.template" ]
com.google.template;
2,629,364
private static int internalCompare(XMLGregorianCalendar P, XMLGregorianCalendar Q) { int result; // compare Year. if (P.getEon() == Q.getEon()) { // Eon field is only equal when null. // optimized case for comparing year not r...
static int function(XMLGregorianCalendar P, XMLGregorianCalendar Q) { int result; if (P.getEon() == Q.getEon()) { result = compareField(P.getYear(), Q.getYear()); if (result != DatatypeConstants.EQUAL) { return result; } } else { result = compareField(P.getEonAndYear(), Q.getEonAndYear()); if (result != DatatypeConstan...
/** * * <p>Implements Step B from http://www.w3.org/TR/xmlschema-2/#dateTime-order </p> * @param P calendar instance with normalized timezone offset or * having same timezone as Q * @param Q calendar instance with normalized timezone offset or * having same timezone as P...
Implements Step B from HREF
internalCompare
{ "repo_name": "MeFisto94/openjdk", "path": "jaxp/src/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java", "license": "gpl-2.0", "size": 117046 }
[ "javax.xml.datatype.DatatypeConstants", "javax.xml.datatype.XMLGregorianCalendar" ]
import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.datatype.*;
[ "javax.xml" ]
javax.xml;
1,753,911
if (jsonObject == null || StringUtils.isEmpty(key)) { return defaultValue; } try { return jsonObject.getLong(key); } catch (JSONException e) { if (isPrintException) { e.printStackTrace(); } return defaultValue; ...
if (jsonObject == null StringUtils.isEmpty(key)) { return defaultValue; } try { return jsonObject.getLong(key); } catch (JSONException e) { if (isPrintException) { e.printStackTrace(); } return defaultValue; } }
/** * get Long from jsonObject * * @param jsonObject * @param key * @param defaultValue * @return <ul> * <li>if jsonObject is null, return defaultValue</li> * <li>if key is null or empty, return defaultValue</li> * <li>if {@link JSONObject#getLong(St...
get Long from jsonObject
getLong
{ "repo_name": "Alexander0024/alexsophialib", "path": "AlexsophiaLib/src/com/alexsophia/alexsophialib/util/json/JSONUtils.java", "license": "gpl-2.0", "size": 26833 }
[ "com.alexsophia.alexsophialib.util.datsstructure.StringUtils", "org.json.JSONException" ]
import com.alexsophia.alexsophialib.util.datsstructure.StringUtils; import org.json.JSONException;
import com.alexsophia.alexsophialib.util.datsstructure.*; import org.json.*;
[ "com.alexsophia.alexsophialib", "org.json" ]
com.alexsophia.alexsophialib; org.json;
1,975,805
public ActivityImpl parseSubProcess(Element subProcessElement, ScopeImpl scope) { ActivityImpl subProcessActivity = createActivityOnScope(subProcessElement, scope); subProcessActivity.setSubProcessScope(true); parseAsynchronousContinuation(subProcessElement, subProcessActivity); Boolean isTriggeredB...
ActivityImpl function(Element subProcessElement, ScopeImpl scope) { ActivityImpl subProcessActivity = createActivityOnScope(subProcessElement, scope); subProcessActivity.setSubProcessScope(true); parseAsynchronousContinuation(subProcessElement, subProcessActivity); Boolean isTriggeredByEvent = parseBooleanAttribute(sub...
/** * Parses a subprocess (formally known as an embedded subprocess): a subprocess * defined within another process definition. * * @param subProcessElement * The XML element corresponding with the subprocess definition * @param scope * The current scope on which the subprocess is...
Parses a subprocess (formally known as an embedded subprocess): a subprocess defined within another process definition
parseSubProcess
{ "repo_name": "rainerh/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java", "license": "apache-2.0", "size": 165596 }
[ "org.camunda.bpm.engine.impl.bpmn.behavior.EventSubProcessActivityBehavior", "org.camunda.bpm.engine.impl.bpmn.behavior.SubProcessActivityBehavior", "org.camunda.bpm.engine.impl.pvm.process.ActivityImpl", "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl", "org.camunda.bpm.engine.impl.util.xml.Element" ]
import org.camunda.bpm.engine.impl.bpmn.behavior.EventSubProcessActivityBehavior; import org.camunda.bpm.engine.impl.bpmn.behavior.SubProcessActivityBehavior; import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl; import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl; import org.camunda.bpm.engine.impl.util.xm...
import org.camunda.bpm.engine.impl.bpmn.behavior.*; import org.camunda.bpm.engine.impl.pvm.process.*; import org.camunda.bpm.engine.impl.util.xml.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
1,948,447
public Extensions getExtensions();
Extensions function();
/** * Gets the Extensions child of this object. * * @return the Extensions child of this object */
Gets the Extensions child of this object
getExtensions
{ "repo_name": "danpal/OpenSAML", "path": "src/main/java/org/opensaml/saml2/metadata/ContactPerson.java", "license": "apache-2.0", "size": 4030 }
[ "org.opensaml.saml2.common.Extensions" ]
import org.opensaml.saml2.common.Extensions;
import org.opensaml.saml2.common.*;
[ "org.opensaml.saml2" ]
org.opensaml.saml2;
1,784,275
private void validateClauseWorkspaceTimingAndRelNode(CellTreeNode node, List<String> inValidNodeList) { if (((node.getChilds() != null) && (node.getChilds().size() == 2))) { if (!node.getValidNode() && (MatContext.get().relationships.contains(node.getName()) || (node.getNodeType() == CellTreeNode.TIMING_NO...
void function(CellTreeNode node, List<String> inValidNodeList) { if (((node.getChilds() != null) && (node.getChilds().size() == 2))) { if (!node.getValidNode() && (MatContext.get().relationships.contains(node.getName()) (node.getNodeType() == CellTreeNode.TIMING_NODE))) { editNode(true, node); } else if (!MatContext.ge...
/** * Validate clause workspace timing and rel node. * * @param node the node * @param inValidNodeList the in valid node list */
Validate clause workspace timing and rel node
validateClauseWorkspaceTimingAndRelNode
{ "repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_Release", "path": "mat/src/main/java/mat/client/clause/clauseworkspace/view/XmlTreeView.java", "license": "cc0-1.0", "size": 103469 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,020,522
decoders.put(cl,dec); } /** * Constructs a |@link FeatureNode} for a given {@link EStructuralFeature}
decoders.put(cl,dec); } /** * Constructs a @link FeatureNode} for a given {@link EStructuralFeature}
/** * Can be called to register new decoders for given classes. * * @param cl The class to decode (no interfaces) * @param dec The decoder used to decode objects of the class */
Can be called to register new decoders for given classes
registerFeatureDecoder
{ "repo_name": "vitruv-tools/Vitruv", "path": "bundles/extensions/changevisualization/tools.vitruv.extensions.changevisualization/src/tools/vitruv/extensions/changevisualization/tree/decoder/FeatureNodeDecoder.java", "license": "epl-1.0", "size": 5662 }
[ "org.eclipse.emf.ecore.EStructuralFeature", "tools.vitruv.extensions.changevisualization.tree.FeatureNode" ]
import org.eclipse.emf.ecore.EStructuralFeature; import tools.vitruv.extensions.changevisualization.tree.FeatureNode;
import org.eclipse.emf.ecore.*; import tools.vitruv.extensions.changevisualization.tree.*;
[ "org.eclipse.emf", "tools.vitruv.extensions" ]
org.eclipse.emf; tools.vitruv.extensions;
2,014,571
private Object invokeValueOf(Class<?> clazz, String value) throws IllegalAccessException, InvocationTargetException { try { return MethodUtils.invokeExactStaticMethod(clazz, "valueOf", value); } catch (NoSuchMethodException e) { return null; } }
Object function(Class<?> clazz, String value) throws IllegalAccessException, InvocationTargetException { try { return MethodUtils.invokeExactStaticMethod(clazz, STR, value); } catch (NoSuchMethodException e) { return null; } }
/** * Tries to invoke the method valueOf of the given class object. If this method can be called, the result will be * given back based on the given value which is used as parameter for the method. If this method can't be called * null will be given back. */
Tries to invoke the method valueOf of the given class object. If this method can be called, the result will be given back based on the given value which is used as parameter for the method. If this method can't be called null will be given back
invokeValueOf
{ "repo_name": "openengsb/openengsb", "path": "components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/DefaultConverterStep.java", "license": "apache-2.0", "size": 5745 }
[ "java.lang.reflect.InvocationTargetException", "org.apache.commons.beanutils.MethodUtils" ]
import java.lang.reflect.InvocationTargetException; import org.apache.commons.beanutils.MethodUtils;
import java.lang.reflect.*; import org.apache.commons.beanutils.*;
[ "java.lang", "org.apache.commons" ]
java.lang; org.apache.commons;
195,565
public static void intializeDevice(){ String mount = Environment.getExternalStorageState(); Log.d(TAG, "Media stat:" + mount); if(!mount.equals(Environment.MEDIA_MOUNTED)){ Log.e(TAG, "Can not initialize sdcard education resource dir."); return; } File f = new File(Environment.getExternalStorageDire...
static void function(){ String mount = Environment.getExternalStorageState(); Log.d(TAG, STR + mount); if(!mount.equals(Environment.MEDIA_MOUNTED)){ Log.e(TAG, STR); return; } File f = new File(Environment.getExternalStorageDirectory().getAbsolutePath() +Constants.PATH_EDUCATION); if (f.mkdirs()){ Log.d(TAG, STR); } el...
/** * Creates the necessary directories and files on the external drive */
Creates the necessary directories and files on the external drive
intializeDevice
{ "repo_name": "Disha10/SANA", "path": "app/src/main/java/org/sana/android/media/EducationResource.java", "license": "bsd-3-clause", "size": 9827 }
[ "android.os.Environment", "android.util.Log", "java.io.File", "java.io.IOException", "org.sana.android.Constants" ]
import android.os.Environment; import android.util.Log; import java.io.File; import java.io.IOException; import org.sana.android.Constants;
import android.os.*; import android.util.*; import java.io.*; import org.sana.android.*;
[ "android.os", "android.util", "java.io", "org.sana.android" ]
android.os; android.util; java.io; org.sana.android;
1,553,619
public void filterWorkList(boolean newSearch) { if ( newSearch ) setOffset(0); Dataset searchDS = getSearchDS( mwlFilter ); isLocal = MWLConsoleCtrl.getMwlScuDelegate().isLocal(); List l = MWLConsoleCtrl.getMwlScuDelegate().findMWLEntries( searchDS ); Collections.sort( l, comparator ); int total = l.s...
void function(boolean newSearch) { if ( newSearch ) setOffset(0); Dataset searchDS = getSearchDS( mwlFilter ); isLocal = MWLConsoleCtrl.getMwlScuDelegate().isLocal(); List l = MWLConsoleCtrl.getMwlScuDelegate().findMWLEntries( searchDS ); Collections.sort( l, comparator ); int total = l.size(); int offset = getOffset()...
/** * Update the list of MWLEntries for the view. * <p> * The query use the search criteria values from the filter and use offset and limit for paging. * <p> * if <code>newSearch is true</code> will reset paging (set <code>offset</code> to 0!) * @param newSearch */
Update the list of MWLEntries for the view. The query use the search criteria values from the filter and use offset and limit for paging. if <code>newSearch is true</code> will reset paging (set <code>offset</code> to 0!)
filterWorkList
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4jboss-all/tags/DCM4CHEE_2_10_9/dcm4jboss-web/src/java/org/dcm4chex/archive/web/maverick/mwl/model/MWLModel.java", "license": "apache-2.0", "size": 13308 }
[ "java.util.Collections", "java.util.List", "org.dcm4che.data.Dataset", "org.dcm4chex.archive.web.maverick.mwl.MWLConsoleCtrl" ]
import java.util.Collections; import java.util.List; import org.dcm4che.data.Dataset; import org.dcm4chex.archive.web.maverick.mwl.MWLConsoleCtrl;
import java.util.*; import org.dcm4che.data.*; import org.dcm4chex.archive.web.maverick.mwl.*;
[ "java.util", "org.dcm4che.data", "org.dcm4chex.archive" ]
java.util; org.dcm4che.data; org.dcm4chex.archive;
1,570,855
public TestResult runTests(Class modifiedClass, int reps) { CacheClassLoader classLoader = new CacheClassLoader(this.packageDirectory); classLoader.store(this.className, modifiedClass); Class<?> runnerClass = null; try { runnerClass = classLoader.loadClass(IsolatedTestR...
TestResult function(Class modifiedClass, int reps) { CacheClassLoader classLoader = new CacheClassLoader(this.packageDirectory); classLoader.store(this.className, modifiedClass); Class<?> runnerClass = null; try { runnerClass = classLoader.loadClass(IsolatedTestRunner.class.getName()); } catch (ClassNotFoundException e...
/** * Run the test class for a modified class. * Loads IsolatedTestRunner using a separate classloader and invokes jUnit using reflection. * This allows us to have jUnit load all classes from a CacheClassLoader, enabling us to override the modified * class with the freshly compiled version. * @...
Run the test class for a modified class. Loads IsolatedTestRunner using a separate classloader and invokes jUnit using reflection. This allows us to have jUnit load all classes from a CacheClassLoader, enabling us to override the modified class with the freshly compiled version
runTests
{ "repo_name": "drdrwhite/gin", "path": "src/main/java/gin/test/TestRunner.java", "license": "mit", "size": 3948 }
[ "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "java.util.LinkedList", "java.util.List" ]
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.LinkedList; import java.util.List;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,337,660
public static void register(ElementHandlerRegistry handlerRegistry) { // register the annotation handler: handlerRegistry.registerRenderer(FULL_TAGNAME, getInstance()); } private DiffDeleteRenderer() { }
static void function(ElementHandlerRegistry handlerRegistry) { handlerRegistry.registerRenderer(FULL_TAGNAME, getInstance()); } private DiffDeleteRenderer() { }
/** * Registers subclass with ContentElement */
Registers subclass with ContentElement
register
{ "repo_name": "vega113/incubator-wave", "path": "wave/src/main/java/org/waveprotocol/wave/client/doodad/diff/DiffDeleteRenderer.java", "license": "apache-2.0", "size": 2706 }
[ "org.waveprotocol.wave.client.editor.ElementHandlerRegistry" ]
import org.waveprotocol.wave.client.editor.ElementHandlerRegistry;
import org.waveprotocol.wave.client.editor.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
2,149,041
@Override public boolean isRedirected(HttpRequest request, HttpResponse response, HttpContext context) throws ProtocolException { if (response.getStatusLine().getStatusCode()/100 == 3) { boolean redirectable = false; for (String method : REDIRECTABLE_METHODS) if (method.equalsIgnoreCase(request.getReque...
boolean function(HttpRequest request, HttpResponse response, HttpContext context) throws ProtocolException { if (response.getStatusLine().getStatusCode()/100 == 3) { boolean redirectable = false; for (String method : REDIRECTABLE_METHODS) if (method.equalsIgnoreCase(request.getRequestLine().getMethod())) { redirectable...
/** * Determines whether a response indicates a redirection and if it does, whether to follow this redirection. * PROPFIND and REPORT must handle redirections explicitely because multi-status processing requires knowledge of the content location. * @return true for 3xx responses on OPTIONS, GET, PUT, DELETE reque...
Determines whether a response indicates a redirection and if it does, whether to follow this redirection. PROPFIND and REPORT must handle redirections explicitely because multi-status processing requires knowledge of the content location
isRedirected
{ "repo_name": "FabianoK/davdroid", "path": "app/src/main/java/at/bitfire/davdroid/webdav/DavRedirectStrategy.java", "license": "gpl-3.0", "size": 4028 }
[ "org.apache.http.HttpRequest", "org.apache.http.HttpResponse", "org.apache.http.ProtocolException", "org.apache.http.protocol.HttpContext" ]
import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.ProtocolException; import org.apache.http.protocol.HttpContext;
import org.apache.http.*; import org.apache.http.protocol.*;
[ "org.apache.http" ]
org.apache.http;
12,895
public static int readAsInt(ByteBuffer buf, int offset, final int length) { if (offset + length > buf.limit()) { throw new IllegalArgumentException("offset (" + offset + ") + length (" + length + ") exceed the" + " limit of the buffer: " + buf.limit()); } int n = 0; for(int i = offset;...
static int function(ByteBuffer buf, int offset, final int length) { if (offset + length > buf.limit()) { throw new IllegalArgumentException(STR + offset + STR + length + STR + STR + buf.limit()); } int n = 0; for(int i = offset; i < (offset + length); i++) { n <<= 8; n ^= toByte(buf, i) & 0xFF; } return n; }
/** * Converts a ByteBuffer to an int value * * @param buf The ByteBuffer * @param offset Offset to int value * @param length Number of bytes used to store the int value. * @return the int value * @throws IllegalArgumentException * if there's not enough bytes left in the buffer after t...
Converts a ByteBuffer to an int value
readAsInt
{ "repo_name": "HubSpot/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java", "license": "apache-2.0", "size": 39287 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,233,956
public String getActionTitle(Locale locale, String actionName) { return CustomActionResources.getActionTitle(actionName, locale); }
String function(Locale locale, String actionName) { return CustomActionResources.getActionTitle(actionName, locale); }
/** * Get the display title for the supplied action name * @param p_displayLocale Locale to display title in. * @param p_actionName Action name. * @return Action display title. */
Get the display title for the supplied action name
getActionTitle
{ "repo_name": "OpenNTF/Sample-WCM-Custom-Workflow-Actions", "path": "src/main/java/com/ibm/wcm/sample/customactions/CustomWorkflowActionFactoryImpl.java", "license": "apache-2.0", "size": 10618 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,318,835
public static GenericTTDataBuilder copyBuilder(TTDataSet data) { GenericTTDataBuilder builder = newBuilder(data.getName()); builder.setTest(data.getTestData()) .setQuery(data.getQueryData()) .setTrain(data.getTrainingData()) .setIsolationGroup(data.getIso...
static GenericTTDataBuilder function(TTDataSet data) { GenericTTDataBuilder builder = newBuilder(data.getName()); builder.setTest(data.getTestData()) .setQuery(data.getQueryData()) .setTrain(data.getTrainingData()) .setIsolationGroup(data.getIsolationGroup()); for (Map.Entry<String,Object> attr: data.getAttributes().en...
/** * Create a new builder initialized with this data set's values. * @return A new builder initialized to make a copy of this data set definition. */
Create a new builder initialized with this data set's values
copyBuilder
{ "repo_name": "blankazucenalg/lenskit", "path": "lenskit-eval/src/main/java/org/grouplens/lenskit/eval/data/traintest/GenericTTDataSet.java", "license": "lgpl-2.1", "size": 6396 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,558,666
public DeviceMap<DcMotorController> dcMotorControllers() { return fullMap.checkedGet(DcMotorController.class); }
DeviceMap<DcMotorController> function() { return fullMap.checkedGet(DcMotorController.class); }
/** * Returns a {@link DeviceMap<DcMotorController>} for use to access DC Motor Controller * hardware * * @return a DeviceMap to use for access to representations of DC Motor Controllers * @see DeviceMap * @see DcMotorController */
Returns a <code>DeviceMap</code> for use to access DC Motor Controller hardware
dcMotorControllers
{ "repo_name": "MHS-FIRSTrobotics/TeamClutch-FTC2016", "path": "FtcXtensible/src/main/java/org/ftccommunity/ftcxtensible/robot/ExtensibleHardwareMap.java", "license": "mit", "size": 22071 }
[ "com.qualcomm.robotcore.hardware.DcMotorController", "org.ftccommunity.ftcxtensible.collections.DeviceMap" ]
import com.qualcomm.robotcore.hardware.DcMotorController; import org.ftccommunity.ftcxtensible.collections.DeviceMap;
import com.qualcomm.robotcore.hardware.*; import org.ftccommunity.ftcxtensible.collections.*;
[ "com.qualcomm.robotcore", "org.ftccommunity.ftcxtensible" ]
com.qualcomm.robotcore; org.ftccommunity.ftcxtensible;
142,917
public static boolean isYesterday(Date date){ // Check if yesterday Calendar c1 = Calendar.getInstance(); // today c1.add(Calendar.DAY_OF_YEAR, -1); // yesterday Calendar c2 = Calendar.getInstance(); c2.setTime(date); // return c1.get(Calendar.YEAR) == c2.get(Calendar...
static boolean function(Date date){ Calendar c1 = Calendar.getInstance(); c1.add(Calendar.DAY_OF_YEAR, -1); Calendar c2 = Calendar.getInstance(); c2.setTime(date); && c1.get(Calendar.DAY_OF_YEAR) == c2.get(Calendar.DAY_OF_YEAR); }
/** * Tell whether or not a given date is yesterday * @param date Date Object * @return True if the date is yesterday False otherwise */
Tell whether or not a given date is yesterday
isYesterday
{ "repo_name": "thunder413/DateTimeUtils", "path": "DateTimeUtils/src/main/java/com/github/thunder413/datetimeutils/DateTimeUtils.java", "license": "mit", "size": 22350 }
[ "java.util.Calendar", "java.util.Date" ]
import java.util.Calendar; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,195,246
public static ClientProtocol.Message createPutAllRequest(String regionName, Set<BasicTypes.Entry> entries) { RegionAPI.PutAllRequest.Builder putAllRequestBuilder = RegionAPI.PutAllRequest.newBuilder().setRegionName(regionName); putAllRequestBuilder.addAllEntry(entries); return ClientProtocol...
static ClientProtocol.Message function(String regionName, Set<BasicTypes.Entry> entries) { RegionAPI.PutAllRequest.Builder putAllRequestBuilder = RegionAPI.PutAllRequest.newBuilder().setRegionName(regionName); putAllRequestBuilder.addAllEntry(entries); return ClientProtocol.Message.newBuilder().setPutAllRequest(putAllR...
/** * Create a request to insert multiple entries in a region * * @param regionName - Region to which entries are being added * @param entries - key, value pairs to add to the region * @return Request object containing the putAll request for the passed parameters */
Create a request to insert multiple entries in a region
createPutAllRequest
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java", "license": "apache-2.0", "size": 5133 }
[ "java.util.Set", "org.apache.geode.internal.protocol.protobuf.v1.BasicTypes", "org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol", "org.apache.geode.internal.protocol.protobuf.v1.RegionAPI" ]
import java.util.Set; import org.apache.geode.internal.protocol.protobuf.v1.BasicTypes; import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol; import org.apache.geode.internal.protocol.protobuf.v1.RegionAPI;
import java.util.*; import org.apache.geode.internal.protocol.protobuf.v1.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
162,036
public static MerkleTree build( SortedMap<PathFragment, ActionInput> inputs, MetadataProvider metadataProvider, Path execRoot, DigestUtil digestUtil) throws IOException { try (SilentCloseable c = Profiler.instance().profile("MerkleTree.build(ActionInput)")) { DirectoryTree tree...
static MerkleTree function( SortedMap<PathFragment, ActionInput> inputs, MetadataProvider metadataProvider, Path execRoot, DigestUtil digestUtil) throws IOException { try (SilentCloseable c = Profiler.instance().profile(STR)) { DirectoryTree tree = DirectoryTreeBuilder.fromActionInputs(inputs, metadataProvider, execRoo...
/** * Constructs a merkle tree from a lexicographically sorted map of inputs (files). * * @param inputs a map of path to input. The map is required to be sorted lexicographically by * paths. Inputs of type tree artifacts are not supported and are expected to have been * expanded before. * @par...
Constructs a merkle tree from a lexicographically sorted map of inputs (files)
build
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/remote/merkletree/MerkleTree.java", "license": "apache-2.0", "size": 8008 }
[ "com.google.devtools.build.lib.actions.ActionInput", "com.google.devtools.build.lib.actions.MetadataProvider", "com.google.devtools.build.lib.profiler.Profiler", "com.google.devtools.build.lib.profiler.SilentCloseable", "com.google.devtools.build.lib.remote.util.DigestUtil", "com.google.devtools.build.lib...
import com.google.devtools.build.lib.actions.ActionInput; import com.google.devtools.build.lib.actions.MetadataProvider; import com.google.devtools.build.lib.profiler.Profiler; import com.google.devtools.build.lib.profiler.SilentCloseable; import com.google.devtools.build.lib.remote.util.DigestUtil; import com.google.d...
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.profiler.*; import com.google.devtools.build.lib.remote.util.*; import com.google.devtools.build.lib.vfs.*; import java.io.*; import java.util.*;
[ "com.google.devtools", "java.io", "java.util" ]
com.google.devtools; java.io; java.util;
376,519
public void createTempTableIfNeeded(final String childTableName) throws IOException { try { final AccumuloRdfConfiguration accumuloRdfConfiguration = new AccumuloRdfConfiguration(conf); accumuloRdfConfiguration.setTablePrefix(childTablePrefix); final Connector connector =...
void function(final String childTableName) throws IOException { try { final AccumuloRdfConfiguration accumuloRdfConfiguration = new AccumuloRdfConfiguration(conf); accumuloRdfConfiguration.setTablePrefix(childTablePrefix); final Connector connector = AccumuloRyaUtils.setupConnector(accumuloRdfConfiguration); if (!conne...
/** * Creates the temp child table if it doesn't already exist in the parent. * @param childTableName the name of the child table. * @throws IOException */
Creates the temp child table if it doesn't already exist in the parent
createTempTableIfNeeded
{ "repo_name": "meiercaleb/incubator-rya", "path": "extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/MergeTool.java", "license": "apache-2.0", "size": 24155 }
[ "com.google.common.base.Joiner", "java.io.IOException", "java.util.List", "org.apache.accumulo.core.client.AccumuloException", "org.apache.accumulo.core.client.AccumuloSecurityException", "org.apache.accumulo.core.client.Connector", "org.apache.accumulo.core.client.TableExistsException", "org.apache.a...
import com.google.common.base.Joiner; import java.io.IOException; import java.util.List; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.TableExistsExcepti...
import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.accumulo.core.client.admin.*; import org.apache.accumulo.core.security.*; import org.apache.rya.accumulo.*; import org.apache.rya.accumulo.mr.merge.util.*;
[ "com.google.common", "java.io", "java.util", "org.apache.accumulo", "org.apache.rya" ]
com.google.common; java.io; java.util; org.apache.accumulo; org.apache.rya;
2,804,829
protected void addServerInstancePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MInternalComponentPlatformSwitchCase_serverInstance_feature"), ...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), mclevcmpPackage.Literals.MINTERNAL_COMPONENT_PLATFORM_SWITCH_CASE__SERVER_INSTANCE, true, false, ...
/** * This adds a property descriptor for the Server Instance feature. * @generated */
This adds a property descriptor for the Server Instance feature
addServerInstancePropertyDescriptor
{ "repo_name": "parraman/micobs", "path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevcmp/provider/MInternalComponentPlatformSwitchCaseItemProvider.java", "license": "epl-1.0", "size": 9719 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,754,552
public static void uint64Put(final DirectBuffer buffer, final int index, final long value, final ByteOrder byteOrder) { buffer.putLong(index, value, byteOrder); }
static void function(final DirectBuffer buffer, final int index, final long value, final ByteOrder byteOrder) { buffer.putLong(index, value, byteOrder); }
/** * Put a 64-bit signed integer to a {@link DirectBuffer} at the given index. * * @param buffer to which the value should be written. * @param index from which to begin writing. * @param value to be be written. * @param byteOrder for the buffer encoding */
Put a 64-bit signed integer to a <code>DirectBuffer</code> at the given index
uint64Put
{ "repo_name": "AdaptiveConsulting/simple-binary-encoding", "path": "main/java/uk/co/real_logic/sbe/codec/java/CodecUtil.java", "license": "apache-2.0", "size": 20441 }
[ "java.nio.ByteOrder" ]
import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
170,952
@Override public WikiPage getRootWikiPage(String ownerId, ObjectType ownerType) throws SynapseException { ValidateArgument.required(ownerId, "ownerId"); ValidateArgument.required(ownerType, "ownerType"); String uri = createWikiURL(ownerId, ownerType); return getJSONEntity(getRepoEndpoint(), uri, WikiPage...
WikiPage function(String ownerId, ObjectType ownerType) throws SynapseException { ValidateArgument.required(ownerId, STR); ValidateArgument.required(ownerType, STR); String uri = createWikiURL(ownerId, ownerType); return getJSONEntity(getRepoEndpoint(), uri, WikiPage.class); }
/** * Get a the root WikiPage for a given owner. * * @param ownerId * @param ownerType * @return * @throws SynapseException */
Get a the root WikiPage for a given owner
getRootWikiPage
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "client/synapseJavaClient/src/main/java/org/sagebionetworks/client/SynapseClientImpl.java", "license": "apache-2.0", "size": 229293 }
[ "org.sagebionetworks.client.exceptions.SynapseException", "org.sagebionetworks.repo.model.ObjectType", "org.sagebionetworks.repo.model.wiki.WikiPage", "org.sagebionetworks.util.ValidateArgument" ]
import org.sagebionetworks.client.exceptions.SynapseException; import org.sagebionetworks.repo.model.ObjectType; import org.sagebionetworks.repo.model.wiki.WikiPage; import org.sagebionetworks.util.ValidateArgument;
import org.sagebionetworks.client.exceptions.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.wiki.*; import org.sagebionetworks.util.*;
[ "org.sagebionetworks.client", "org.sagebionetworks.repo", "org.sagebionetworks.util" ]
org.sagebionetworks.client; org.sagebionetworks.repo; org.sagebionetworks.util;
698,371
@Experimental public AbstractDao<T, K> getDao() { return dao; }
AbstractDao<T, K> function() { return dao; }
/** * The plain DAO. */
The plain DAO
getDao
{ "repo_name": "wavinsun/SQLCipherToolkit", "path": "greendao-sqlcipher/src-core/org/greenrobot/greendao/rx/RxDao.java", "license": "mit", "size": 12642 }
[ "org.greenrobot.greendao.AbstractDao" ]
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.*;
[ "org.greenrobot.greendao" ]
org.greenrobot.greendao;
1,625,775
public static DecimalItem valueOf(BigDecimal value) { BigDecimal permille = (Objects.requireNonNull(value, "value must not be null")).multiply(THOUSAND); return valueOf(permille.longValue()); }
static DecimalItem function(BigDecimal value) { BigDecimal permille = (Objects.requireNonNull(value, STR)).multiply(THOUSAND); return valueOf(permille.longValue()); }
/** * Creates a {@link DecimalItem} instance representing the specified * {@code BigDecimal} value, with potential rounding. * * @param value * a {@code BigDecimal} value. * @return a {@link DecimalItem} representing {@code value}. */
Creates a <code>DecimalItem</code> instance representing the specified BigDecimal value, with potential rounding
valueOf
{ "repo_name": "exponent/exponent", "path": "packages/expo-structured-headers/android/src/main/java/expo/modules/structuredheaders/DecimalItem.java", "license": "bsd-3-clause", "size": 3663 }
[ "java.math.BigDecimal", "java.util.Objects" ]
import java.math.BigDecimal; import java.util.Objects;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
1,012,692
public static List<String> getPhysicalTablesWithDescRowKey(PhoenixConnection conn) throws SQLException { String query = "SELECT TENANT_ID,TABLE_SCHEM,TABLE_NAME\n" + "FROM SYSTEM.CATALOG cat1\n" + "WHERE COLUMN_NAME IS NOT NULL\n" + "AND COLUMN_FAMILY IS NU...
static List<String> function(PhoenixConnection conn) throws SQLException { String query = STR + STR + STR + STR + STR + SortOrder.DESC.getSystemValue() + "\n" + STR + getAffectedDataTypes() + ")\n" + STR + SortOrder.ASC.getSystemValue() + "\n" + STR + PBinary.INSTANCE.getSqlType() + "\n" + STR + STR; return getPhysical...
/** * Identify the tables that need to be upgraded due to PHOENIX-2067 and PHOENIX-2120 */
Identify the tables that need to be upgraded due to PHOENIX-2067 and PHOENIX-2120
getPhysicalTablesWithDescRowKey
{ "repo_name": "nickman/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java", "license": "apache-2.0", "size": 63154 }
[ "java.sql.SQLException", "java.util.List", "org.apache.phoenix.jdbc.PhoenixConnection", "org.apache.phoenix.schema.SortOrder", "org.apache.phoenix.schema.types.PBinary" ]
import java.sql.SQLException; import java.util.List; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.schema.SortOrder; import org.apache.phoenix.schema.types.PBinary;
import java.sql.*; import java.util.*; import org.apache.phoenix.jdbc.*; import org.apache.phoenix.schema.*; import org.apache.phoenix.schema.types.*;
[ "java.sql", "java.util", "org.apache.phoenix" ]
java.sql; java.util; org.apache.phoenix;
2,844,129
@Test public void testKillYarnSessionClusterEntrypoint() throws Exception { runTest(() -> { assumeTrue( "This test kills processes via the pkill command. Thus, it only runs on Linux, Mac OS, Free BSD and Solaris.", OperatingSystem.isLinux() || OperatingSystem.isMac() || OperatingSystem.isFreeBSD() || O...
void function() throws Exception { runTest(() -> { assumeTrue( STR, OperatingSystem.isLinux() OperatingSystem.isMac() OperatingSystem.isFreeBSD() OperatingSystem.isSolaris()); final YarnClusterDescriptor yarnClusterDescriptor = setupYarnClusterDescriptor(); final RestClusterClient<ApplicationId> restClusterClient = dep...
/** * Tests that Yarn will restart a killed {@link YarnSessionClusterEntrypoint} which will then resume * a persisted {@link JobGraph}. */
Tests that Yarn will restart a killed <code>YarnSessionClusterEntrypoint</code> which will then resume a persisted <code>JobGraph</code>
testKillYarnSessionClusterEntrypoint
{ "repo_name": "tzulitai/flink", "path": "flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNHighAvailabilityITCase.java", "license": "apache-2.0", "size": 14901 }
[ "org.apache.flink.api.common.JobID", "org.apache.flink.client.program.rest.RestClusterClient", "org.apache.flink.util.OperatingSystem", "org.apache.hadoop.yarn.api.records.ApplicationId", "org.junit.Assume" ]
import org.apache.flink.api.common.JobID; import org.apache.flink.client.program.rest.RestClusterClient; import org.apache.flink.util.OperatingSystem; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.junit.Assume;
import org.apache.flink.api.common.*; import org.apache.flink.client.program.rest.*; import org.apache.flink.util.*; import org.apache.hadoop.yarn.api.records.*; import org.junit.*;
[ "org.apache.flink", "org.apache.hadoop", "org.junit" ]
org.apache.flink; org.apache.hadoop; org.junit;
129,969
public Artifact combinedArchitectureBinary() { return appendExtension("_lipobin"); }
Artifact function() { return appendExtension(STR); }
/** * Lipo binary generated by combining one or more linked binaries. This binary is the one included * in generated bundles and invoked as entry point to the application. */
Lipo binary generated by combining one or more linked binaries. This binary is the one included in generated bundles and invoked as entry point to the application
combinedArchitectureBinary
{ "repo_name": "mrdomino/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/IntermediateArtifacts.java", "license": "apache-2.0", "size": 17183 }
[ "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
564,212
private void createQueryParts(String[] splitField, int parentIndex, MetaModel metaModel) throws ClassNotFoundException { while (parentIndex <= splitField.length - 1) { MetaField relationalField = metaFieldRepo .all() .filter("self.name = ?1 and self.metaModel = ?...
void function(String[] splitField, int parentIndex, MetaModel metaModel) throws ClassNotFoundException { while (parentIndex <= splitField.length - 1) { MetaField relationalField = metaFieldRepo .all() .filter(STR, splitField[parentIndex], metaModel) .fetchOne(); MetaModel subMetaModel = metaModelRepo.all().filter(STR, ...
/** * This method create query parts based on field. * * @param splitField * @param parentIndex * @param metaModel * @throws ClassNotFoundException */
This method create query parts based on field
createQueryParts
{ "repo_name": "axelor/axelor-business-suite", "path": "axelor-base/src/main/java/com/axelor/apps/base/service/advancedExport/AdvancedExportServiceImpl.java", "license": "agpl-3.0", "size": 20317 }
[ "com.axelor.meta.db.MetaField", "com.axelor.meta.db.MetaModel", "com.google.common.base.Strings" ]
import com.axelor.meta.db.MetaField; import com.axelor.meta.db.MetaModel; import com.google.common.base.Strings;
import com.axelor.meta.db.*; import com.google.common.base.*;
[ "com.axelor.meta", "com.google.common" ]
com.axelor.meta; com.google.common;
849,781
public void onKernalStart(boolean active) throws IgniteCheckedException;
void function(boolean active) throws IgniteCheckedException;
/** * Callback that notifies that kernal has successfully started, * including all managers and processors. * * @param active Cluster active flag (note: should be used carefully since state can * change concurrently). * @throws IgniteCheckedException Thrown in case of any errors. ...
Callback that notifies that kernal has successfully started, including all managers and processors
onKernalStart
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java", "license": "apache-2.0", "size": 6216 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,267,799
public boolean setPluginsConfigXML(Collection<Element> configXML, Simulation simulation, boolean visAvailable) { for (final Element pluginElement : configXML.toArray(new Element[0])) { if (pluginElement.getName().equals("plugin")) { // Read plugin class String pluginClassName = plugi...
boolean function(Collection<Element> configXML, Simulation simulation, boolean visAvailable) { for (final Element pluginElement : configXML.toArray(new Element[0])) { if (pluginElement.getName().equals(STR)) { String pluginClassName = pluginElement.getText().trim(); if (pluginClassName.equals(STR) pluginClassName.equal...
/** * Starts plugins with arguments in given config. * * @param configXML * Config XML elements * @param simulation * Simulation on which to start plugins * @return True if all plugins started, false otherwise */
Starts plugins with arguments in given config
setPluginsConfigXML
{ "repo_name": "miiicmueller/TerraZoo", "path": "contiki-2.7/tools/cooja/java/se/sics/cooja/GUI.java", "license": "gpl-2.0", "size": 157781 }
[ "java.util.Collection", "java.util.List", "org.jdom.Element" ]
import java.util.Collection; import java.util.List; import org.jdom.Element;
import java.util.*; import org.jdom.*;
[ "java.util", "org.jdom" ]
java.util; org.jdom;
326,538
void solutionsReady(CompositeRoute[] routes);
void solutionsReady(CompositeRoute[] routes);
/** * we have some solutions * @param routes * */
we have some solutions
solutionsReady
{ "repo_name": "theanuradha/debrief", "path": "org.mwc.debrief.satc.core/src/com/planetmayo/debrief/satc/model/generator/IGenerateSolutionsListener.java", "license": "epl-1.0", "size": 1267 }
[ "com.planetmayo.debrief.satc.model.legs.CompositeRoute" ]
import com.planetmayo.debrief.satc.model.legs.CompositeRoute;
import com.planetmayo.debrief.satc.model.legs.*;
[ "com.planetmayo.debrief" ]
com.planetmayo.debrief;
2,265,093
@Test(groups={"ut"}) public void testSelect() { testPage.select(); Assert.assertEquals(new Select(realDriver.findElement(By.id("select"))).getFirstSelectedOption().getText(), "option1"); }
@Test(groups={"ut"}) void function() { testPage.select(); Assert.assertEquals(new Select(realDriver.findElement(By.id(STR))).getFirstSelectedOption().getText(), STR); }
/** * Check that select behaviour remains the same as native selenium */
Check that select behaviour remains the same as native selenium
testSelect
{ "repo_name": "bhecquet/seleniumRobot", "path": "core/src/test/java/com/seleniumtests/ut/uipage/TestOverridePageObjectFactory.java", "license": "apache-2.0", "size": 9645 }
[ "org.openqa.selenium.By", "org.openqa.selenium.support.ui.Select", "org.testng.Assert", "org.testng.annotations.Test" ]
import org.openqa.selenium.By; import org.openqa.selenium.support.ui.Select; import org.testng.Assert; import org.testng.annotations.Test;
import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*; import org.testng.*; import org.testng.annotations.*;
[ "org.openqa.selenium", "org.testng", "org.testng.annotations" ]
org.openqa.selenium; org.testng; org.testng.annotations;
257,607
private void init(FitSettings.Builder fitSettings, Calibration.Builder calibration, PSF.Builder psf) { this.fitSettings = fitSettings; // Extract for convenience this.calibration = new CalibrationWriter(calibration); this.psf = psf; fitSolverSettings = fitSettings.getFitSolverSettingsBuilde...
void function(FitSettings.Builder fitSettings, Calibration.Builder calibration, PSF.Builder psf) { this.fitSettings = fitSettings; this.calibration = new CalibrationWriter(calibration); this.psf = psf; fitSolverSettings = fitSettings.getFitSolverSettingsBuilder(); filterSettings = fitSettings.getFilterSettingsBuilder()...
/** * Initialise the instance. * * @param fitSettings the fit settings * @param calibration the calibration * @param psf the psf */
Initialise the instance
init
{ "repo_name": "aherbert/GDSC-SMLM", "path": "src/main/java/uk/ac/sussex/gdsc/smlm/engine/FitConfiguration.java", "license": "gpl-3.0", "size": 133615 }
[ "uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos", "uk.ac.sussex.gdsc.smlm.data.config.CalibrationWriter", "uk.ac.sussex.gdsc.smlm.data.config.FitProtos" ]
import uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos; import uk.ac.sussex.gdsc.smlm.data.config.CalibrationWriter; import uk.ac.sussex.gdsc.smlm.data.config.FitProtos;
import uk.ac.sussex.gdsc.smlm.data.config.*;
[ "uk.ac.sussex" ]
uk.ac.sussex;
203,946
private AuthenticationInfo validateRequest(String requestedUri, String binarySecurityToken) throws WindowsDeviceEnrolmentException, OAuthTokenValidationException { AuthenticationInfo authenticationInfo = new AuthenticationInfo(); String resource = requestedUri + ":POST"; OAuthVa...
AuthenticationInfo function(String requestedUri, String binarySecurityToken) throws WindowsDeviceEnrolmentException, OAuthTokenValidationException { AuthenticationInfo authenticationInfo = new AuthenticationInfo(); String resource = requestedUri + ":POST"; OAuthValidationResponse oAuthValidationResponse = OAuthValidato...
/** * Validate SOAP request token. * * @param requestedUri -Requested endpoint URI. * @param binarySecurityToken -Binary security token comes from the soap request message. * @return returns authorized user information. * @throws WindowsDeviceEnrolmentException */
Validate SOAP request token
validateRequest
{ "repo_name": "laki88/product-mdm", "path": "modules/mobile-agents/windows/jax-rs/src/main/java/org/wso2/carbon/mdm/mobileservices/windows/common/util/BSTValidator.java", "license": "apache-2.0", "size": 6464 }
[ "org.wso2.carbon.device.mgt.common.DeviceManagementException", "org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.OAuthValidatorFactory", "org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.OAuthTokenValidationException", "org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.Wi...
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.OAuthValidatorFactory; import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.OAuthTokenValidationException; import org.wso2.carbon.mdm.mobileservices.windows.common.ex...
import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.mdm.mobileservices.windows.common.authenticator.*; import org.wso2.carbon.mdm.mobileservices.windows.common.exceptions.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
468,027
public void printLine(String text) { if (!DEBUG) { return; } @SuppressWarnings("unused") Element child = DOM.createElement("p"); child.setInnerHTML(text); m_html.getElement().insertFirst(child); }
void function(String text) { if (!DEBUG) { return; } @SuppressWarnings(STR) Element child = DOM.createElement("p"); child.setInnerHTML(text); m_html.getElement().insertFirst(child); }
/** * Prints a new line into the log window by adding a p-tag including given text as HTML.<p> * * @param text the text to print */
Prints a new line into the log window by adding a p-tag including given text as HTML
printLine
{ "repo_name": "serrapos/opencms-core", "path": "src-gwt/org/opencms/gwt/client/util/CmsDebugLog.java", "license": "lgpl-2.1", "size": 3851 }
[ "com.google.gwt.user.client.DOM", "com.google.gwt.user.client.Element" ]
import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.*;
[ "com.google.gwt" ]
com.google.gwt;
751,058
boolean validateEpisodeObservationValue(DiagnosticChain diagnostics, Map<Object, Object> context);
boolean validateEpisodeObservationValue(DiagnosticChain diagnostics, Map<Object, Object> context);
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * self.value->size() = 1 and self.value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and * let value : datatypes::CD = element.oclAsType(datatypes::CD) in * value.code = '4046840...
self.value->size() = 1 and self.value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = element.oclAsType(datatypes::CD) in value.code = '404684003' and value.codeSystem = '2.16.840.1.113883.6.96')
validateEpisodeObservationValue
{ "repo_name": "drbgfc/mdht", "path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.ccd/src/org/openhealthtools/mdht/uml/cda/ccd/EpisodeObservation.java", "license": "epl-1.0", "size": 8062 }
[ "java.util.Map", "org.eclipse.emf.common.util.DiagnosticChain" ]
import java.util.Map; import org.eclipse.emf.common.util.DiagnosticChain;
import java.util.*; import org.eclipse.emf.common.util.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
52,545
public static void readInValidTimeRange( OpenCmsTestCase tc, CmsObject cms, String resource1, CmsResourceFilter filter) throws Throwable { tc.storeResources(cms, resource1); // preperation, modify the expiration date CmsFile preperationRes = cms.readFile(res...
static void function( OpenCmsTestCase tc, CmsObject cms, String resource1, CmsResourceFilter filter) throws Throwable { tc.storeResources(cms, resource1); CmsFile preperationRes = cms.readFile(resource1, CmsResourceFilter.ALL); preperationRes.setDateReleased(System.currentTimeMillis() - (60 * 60 * 1000)); preperationRe...
/** * Test readResource of a file in its valid time range.<p> * * @param tc the OpenCmsTestCase * @param cms the CmsObject * @param resource1 the resource to touch * @param filter the filter to use * @throws Throwable if something goes wrong */
Test readResource of a file in its valid time range
readInValidTimeRange
{ "repo_name": "it-tavis/opencms-core", "path": "test/org/opencms/file/TestReadResource.java", "license": "lgpl-2.1", "size": 13826 }
[ "org.opencms.main.CmsException", "org.opencms.test.OpenCmsTestCase" ]
import org.opencms.main.CmsException; import org.opencms.test.OpenCmsTestCase;
import org.opencms.main.*; import org.opencms.test.*;
[ "org.opencms.main", "org.opencms.test" ]
org.opencms.main; org.opencms.test;
924,863
@Override public void chart(Variable var, Defuzzifier defuzzifier, boolean showIt) { String title = String.format("%s:%2.2f (%s)", var.getName(), var.getLatestDefuzzifiedValue(), defuzzifier.getName()); JFreeChart chart; if (defuzzifier.isDiscrete()) chart = chartDefuzzifierDiscrete((DefuzzifierDiscrete) def...
void function(Variable var, Defuzzifier defuzzifier, boolean showIt) { String title = String.format(STR, var.getName(), var.getLatestDefuzzifiedValue(), defuzzifier.getName()); JFreeChart chart; if (defuzzifier.isDiscrete()) chart = chartDefuzzifierDiscrete((DefuzzifierDiscrete) defuzzifier, title, false); else chart =...
/** * Create a chart showing defuzzifier * @param showIt : If true, plot is displayed */
Create a chart showing defuzzifier
chart
{ "repo_name": "pcingola/jFuzzyLogic", "path": "src/net/sourceforge/jFuzzyLogic/plot/JFuzzyChartImpl.java", "license": "lgpl-3.0", "size": 11293 }
[ "net.sourceforge.jFuzzyLogic.defuzzifier.Defuzzifier", "net.sourceforge.jFuzzyLogic.defuzzifier.DefuzzifierContinuous", "net.sourceforge.jFuzzyLogic.defuzzifier.DefuzzifierDiscrete", "net.sourceforge.jFuzzyLogic.rule.Variable", "org.jfree.chart.JFreeChart" ]
import net.sourceforge.jFuzzyLogic.defuzzifier.Defuzzifier; import net.sourceforge.jFuzzyLogic.defuzzifier.DefuzzifierContinuous; import net.sourceforge.jFuzzyLogic.defuzzifier.DefuzzifierDiscrete; import net.sourceforge.jFuzzyLogic.rule.Variable; import org.jfree.chart.JFreeChart;
import net.sourceforge.*; import org.jfree.chart.*;
[ "net.sourceforge", "org.jfree.chart" ]
net.sourceforge; org.jfree.chart;
2,238,456
public void setAnalysisHome(AnalysisHome pNewAnalysisHome) { mAnalysisHome = pNewAnalysisHome; }
void function(AnalysisHome pNewAnalysisHome) { mAnalysisHome = pNewAnalysisHome; }
/** * Set the AnalysisHome field. */
Set the AnalysisHome field
setAnalysisHome
{ "repo_name": "TreeBASE/treebasetest", "path": "treebase-core/src/main/java/org/cipres/treebase/service/study/AnalysisServiceImpl.java", "license": "bsd-3-clause", "size": 4939 }
[ "org.cipres.treebase.domain.study.AnalysisHome" ]
import org.cipres.treebase.domain.study.AnalysisHome;
import org.cipres.treebase.domain.study.*;
[ "org.cipres.treebase" ]
org.cipres.treebase;
538,421
public static final byte[] generateHash(String clearTextID) { String id; // if (function == null) { id = clearTextID; // } else { // id = clearTextID + functionSeperator + function; // } byte[] buffer = id.getBytes(); MessageDiges...
static final byte[] function(String clearTextID) { String id; id = clearTextID; byte[] buffer = id.getBytes(); MessageDigest algorithm = null; try { algorithm = MessageDigest.getInstance("MD5"); } catch (Exception e) { return null; } algorithm.reset(); algorithm.update(buffer); try{ byte[] digest1 = algorithm.digest();...
/** * Generates an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.<p> * * Note that the SHA-1 used only creates a 20 byte hash.<p> * * @param clearTextID A string that is to be hashed. This can be any string used for hashing or hiding data. ...
Generates an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank. Note that the SHA-1 used only creates a 20 byte hash
generateHash
{ "repo_name": "idega/com.idega.cluster", "path": "src/java/com/idega/cluster/net/config/id/IDApplicationFactory.java", "license": "gpl-3.0", "size": 6464 }
[ "java.security.MessageDigest" ]
import java.security.MessageDigest;
import java.security.*;
[ "java.security" ]
java.security;
1,963,309
boolean fileAllowed(File f);
boolean fileAllowed(File f);
/** * Run filter on this file. * @param f file to be tested against the filter * @return true when this filter allows this file to be processed. */
Run filter on this file
fileAllowed
{ "repo_name": "qgears/opensource-utils", "path": "commons/hu.qgears.commons/src/hu/qgears/commons/IFileFilter.java", "license": "epl-1.0", "size": 343 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,559,175
return status; } /** * An EmberStatus value indicating the success or failure of the command. * * @param status the status to set as {@link EmberStatus}
return status; } /** * An EmberStatus value indicating the success or failure of the command. * * @param status the status to set as {@link EmberStatus}
/** * An EmberStatus value indicating the success or failure of the command. * <p> * EZSP type is <i>EmberStatus</i> - Java type is {@link EmberStatus} * * @return the current status as {@link EmberStatus} */
An EmberStatus value indicating the success or failure of the command. EZSP type is EmberStatus - Java type is <code>EmberStatus</code>
getStatus
{ "repo_name": "cschwer/com.zsmartsystems.zigbee", "path": "com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/command/EzspSetRadioPowerResponse.java", "license": "epl-1.0", "size": 2813 }
[ "com.zsmartsystems.zigbee.dongle.ember.ezsp.structure.EmberStatus" ]
import com.zsmartsystems.zigbee.dongle.ember.ezsp.structure.EmberStatus;
import com.zsmartsystems.zigbee.dongle.ember.ezsp.structure.*;
[ "com.zsmartsystems.zigbee" ]
com.zsmartsystems.zigbee;
1,037,038
public void processMenuDragMouseEvent(MenuDragMouseEvent event) { switch (event.getID()) { case MouseEvent.MOUSE_ENTERED: fireMenuDragMouseEntered(event); break; case MouseEvent.MOUSE_EXITED: fireMenuDragMouseExited(event); break; case MouseEvent.MOUSE_DRAGGED: fireMenuDragMouseDrag...
void function(MenuDragMouseEvent event) { switch (event.getID()) { case MouseEvent.MOUSE_ENTERED: fireMenuDragMouseEntered(event); break; case MouseEvent.MOUSE_EXITED: fireMenuDragMouseExited(event); break; case MouseEvent.MOUSE_DRAGGED: fireMenuDragMouseDragged(event); break; case MouseEvent.MOUSE_RELEASED: fireMenuDr...
/** * This method fires MenuDragMouseEvents to registered listeners. * Different types of MenuDragMouseEvents are fired depending * on the observed mouse event. * * @param event Mouse */
This method fires MenuDragMouseEvents to registered listeners. Different types of MenuDragMouseEvents are fired depending on the observed mouse event
processMenuDragMouseEvent
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/JMenuItem.java", "license": "bsd-3-clause", "size": 25131 }
[ "java.awt.event.MouseEvent", "javax.swing.event.MenuDragMouseEvent" ]
import java.awt.event.MouseEvent; import javax.swing.event.MenuDragMouseEvent;
import java.awt.event.*; import javax.swing.event.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,766,233
Set<Zone> getRooms();
Set<Zone> getRooms();
/** * Get all the {@link Zone}s that are Rooms, that can contain Blocks. * * @return the set of zones */
Get all the <code>Zone</code>s that are Rooms, that can contain Blocks
getRooms
{ "repo_name": "eishub/BW4T", "path": "bw4t-core/src/main/java/nl/tudelft/bw4t/map/renderer/MapController.java", "license": "gpl-3.0", "size": 3241 }
[ "java.util.Set", "nl.tudelft.bw4t.map.Zone" ]
import java.util.Set; import nl.tudelft.bw4t.map.Zone;
import java.util.*; import nl.tudelft.bw4t.map.*;
[ "java.util", "nl.tudelft.bw4t" ]
java.util; nl.tudelft.bw4t;
845,215
PortEntity updateInputPort(Revision revision, PortDTO inputPortDTO);
PortEntity updateInputPort(Revision revision, PortDTO inputPortDTO);
/** * Updates the specified input port. * * @param revision Revision to compare with current base revision * @param inputPortDTO The input PortDTO * @return snapshot */
Updates the specified input port
updateInputPort
{ "repo_name": "mcgilman/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 85713 }
[ "org.apache.nifi.web.api.dto.PortDTO", "org.apache.nifi.web.api.entity.PortEntity" ]
import org.apache.nifi.web.api.dto.PortDTO; import org.apache.nifi.web.api.entity.PortEntity;
import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*;
[ "org.apache.nifi" ]
org.apache.nifi;
2,542,435
public Set getSupportedMethods() { Set s = super.getSupportedMethods(); return s; }
Set function() { Set s = super.getSupportedMethods(); return s; }
/** * Get the set methods supported by this resource kind. */
Get the set methods supported by this resource kind
getSupportedMethods
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/webdav/server/org/apache/slide/webdav/util/resourcekind/BaselineImpl.java", "license": "apache-2.0", "size": 2727 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,289,376
@Test public void testSubsystem() throws OperationFailedException { PathAddress address = PathAddress.pathAddress(SUBSYSTEM, TEST_SUBSYSTEM); ModelNode result = readFeatureDescription(address); ModelNode feature = result.require(FEATURE); Assert.assertEquals(serializeAddress(add...
void function() throws OperationFailedException { PathAddress address = PathAddress.pathAddress(SUBSYSTEM, TEST_SUBSYSTEM); ModelNode result = readFeatureDescription(address); ModelNode feature = result.require(FEATURE); Assert.assertEquals(serializeAddress(address), feature.require(NAME).asString()); Map<String, Model...
/** * Reads subsystem that has sub-resources, but no attributes. Subsystem provides a capability. * * Expectations: * * - feature-id param, * - param for extension which contains this subsystem, * - provided capability is listed in 'provides', * - 'refs' contain {feature = "exten...
Reads subsystem that has sub-resources, but no attributes. Subsystem provides a capability. Expectations: - feature-id param, - param for extension which contains this subsystem, - provided capability is listed in 'provides', - 'refs' contain {feature = "extension", include = true}, - packages contain "[extension name]...
testSubsystem
{ "repo_name": "yersan/wildfly-core", "path": "controller/src/test/java/org/jboss/as/controller/test/ReadFeatureDescriptionTestCase.java", "license": "lgpl-2.1", "size": 38844 }
[ "java.util.Map", "org.jboss.as.controller.OperationFailedException", "org.jboss.as.controller.PathAddress", "org.jboss.dmr.ModelNode", "org.junit.Assert" ]
import java.util.Map; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.PathAddress; import org.jboss.dmr.ModelNode; import org.junit.Assert;
import java.util.*; import org.jboss.as.controller.*; import org.jboss.dmr.*; import org.junit.*;
[ "java.util", "org.jboss.as", "org.jboss.dmr", "org.junit" ]
java.util; org.jboss.as; org.jboss.dmr; org.junit;
2,461,315
protected void setResource(IResource resource) { this.resource = resource; }
void function(IResource resource) { this.resource = resource; }
/** Change the resource where the created SARL element is located. * * @param resource - the resource of the created SARL element. */
Change the resource where the created SARL element is located
setResource
{ "repo_name": "jgfoster/sarl", "path": "main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java", "license": "apache-2.0", "size": 48969 }
[ "org.eclipse.core.resources.IResource" ]
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
768,873
@Override public void removeColor(ItemStack item) { NBTTagCompound nbttagcompound = item.getTagCompound(); if (nbttagcompound != null) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("display"); if (nbttagcompound1.hasKey("color")) ...
void function(ItemStack item) { NBTTagCompound nbttagcompound = item.getTagCompound(); if (nbttagcompound != null) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(STR); if (nbttagcompound1.hasKey("color")) { nbttagcompound1.removeTag("color"); } } }
/** * Remove the color from the specified armor ItemStack. */
Remove the color from the specified armor ItemStack
removeColor
{ "repo_name": "TheAwesomeGem/MineFantasy", "path": "src/main/java/minefantasy/item/mabShield/ItemShield.java", "license": "lgpl-2.1", "size": 13010 }
[ "net.minecraft.item.ItemStack", "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.item.*; import net.minecraft.nbt.*;
[ "net.minecraft.item", "net.minecraft.nbt" ]
net.minecraft.item; net.minecraft.nbt;
2,766,857
Decoded<T> handleAbsent(Supplier<? extends T> supplier);
Decoded<T> handleAbsent(Supplier<? extends T> supplier);
/** * Handle the decoded value if absent. * <p> * This method will always return a decoded value that is present. */
Handle the decoded value if absent. This method will always return a decoded value that is present
handleAbsent
{ "repo_name": "udoprog/tiny-ogt", "path": "api/src/main/java/eu/toolchain/scribe/Decoded.java", "license": "apache-2.0", "size": 4793 }
[ "java.util.function.Supplier" ]
import java.util.function.Supplier;
import java.util.function.*;
[ "java.util" ]
java.util;
2,360,161
String protocol = registryURL.getProtocol(); ExtensionLoader<ServiceDiscovery> loader = getExtensionLoader(ServiceDiscovery.class); return loader.getExtension(protocol); }
String protocol = registryURL.getProtocol(); ExtensionLoader<ServiceDiscovery> loader = getExtensionLoader(ServiceDiscovery.class); return loader.getExtension(protocol); }
/** * Create the {@link ServiceDiscovery} by {@link URL#getProtocol() the protocol} from {@link URL connection URL} * * @param registryURL * @return */
Create the <code>ServiceDiscovery</code> by <code>URL#getProtocol() the protocol</code> from <code>URL connection URL</code>
createDiscovery
{ "repo_name": "qtvbwfn/dubbo", "path": "dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/DefaultServiceDiscoveryFactory.java", "license": "apache-2.0", "size": 2160 }
[ "org.apache.dubbo.common.extension.ExtensionLoader" ]
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.extension.*;
[ "org.apache.dubbo" ]
org.apache.dubbo;
1,528,294
@Override protected void createFieldEditors() { Composite p = getFieldEditorParent(); addField(new ComboFieldEditor(PySourceLocatorPrefs.ON_SOURCE_NOT_FOUND, "Action when source is not directly found:", ENTRIES_AND_VALUES, p)); addField(new IntegerFieldEditor(PySourceLoc...
void function() { Composite p = getFieldEditorParent(); addField(new ComboFieldEditor(PySourceLocatorPrefs.ON_SOURCE_NOT_FOUND, STR, ENTRIES_AND_VALUES, p)); addField(new IntegerFieldEditor(PySourceLocatorPrefs.FILE_CONTENTS_TIMEOUT, STR, p)); addField(new TableEditor(PydevEditorPrefs.SOURCE_LOCATION_PATHS, STR, p) {
/** * Creates the editors */
Creates the editors
createFieldEditors
{ "repo_name": "rajul/Pydev", "path": "plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/SourceLocatorPrefsPage.java", "license": "epl-1.0", "size": 4884 }
[ "org.eclipse.jface.preference.IntegerFieldEditor", "org.eclipse.swt.widgets.Composite", "org.python.pydev.editor.preferences.PydevEditorPrefs", "org.python.pydev.editorinput.PySourceLocatorPrefs", "org.python.pydev.shared_ui.field_editors.ComboFieldEditor" ]
import org.eclipse.jface.preference.IntegerFieldEditor; import org.eclipse.swt.widgets.Composite; import org.python.pydev.editor.preferences.PydevEditorPrefs; import org.python.pydev.editorinput.PySourceLocatorPrefs; import org.python.pydev.shared_ui.field_editors.ComboFieldEditor;
import org.eclipse.jface.preference.*; import org.eclipse.swt.widgets.*; import org.python.pydev.editor.preferences.*; import org.python.pydev.editorinput.*; import org.python.pydev.shared_ui.field_editors.*;
[ "org.eclipse.jface", "org.eclipse.swt", "org.python.pydev" ]
org.eclipse.jface; org.eclipse.swt; org.python.pydev;
1,036,019
protected void mainLoop() { System.out.println("Welcome to fun4j [" + Version.getVersionLong() + "]"); // initialize runtime environment RunTime.wakeup(); long count = 0; Compiler c = new Compiler(); PreCompiler pc = new PreCompiler(); boolean flag = true; ...
void function() { System.out.println(STR + Version.getVersionLong() + "]"); RunTime.wakeup(); long count = 0; Compiler c = new Compiler(); PreCompiler pc = new PreCompiler(); boolean flag = true; while (flag) { count++; System.out.print(STR); try { String input = readLine(); if (STR.equalsIgnoreCase(input) input == nul...
/** * The Toplevel read / compile / apply loop */
The Toplevel read / compile / apply loop
mainLoop
{ "repo_name": "thma/fun4j", "path": "src/org/fun4j/Repl.java", "license": "bsd-3-clause", "size": 6184 }
[ "org.fun4j.compiler.BaseFunction", "org.fun4j.compiler.Compiler", "org.fun4j.compiler.Parser", "org.fun4j.compiler.PreCompiler", "org.fun4j.compiler.RunTime" ]
import org.fun4j.compiler.BaseFunction; import org.fun4j.compiler.Compiler; import org.fun4j.compiler.Parser; import org.fun4j.compiler.PreCompiler; import org.fun4j.compiler.RunTime;
import org.fun4j.compiler.*;
[ "org.fun4j.compiler" ]
org.fun4j.compiler;
1,080,484
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<OutputInner>> listByStreamingJobNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<OutputInner>> function(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accep...
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by serve...
Get the next page of items
listByStreamingJobNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/streamanalytics/azure-resourcemanager-streamanalytics/src/main/java/com/azure/resourcemanager/streamanalytics/implementation/OutputsClientImpl.java", "license": "mit", "size": 87690 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.streamanalytics.fluent.models.OutputInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.streamanalytics.fluent.models.OutputInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.streamanalytics.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
543,812
public DTMIterator asIterator(XPathContext xctxt, int contextNode) throws javax.xml.transform.TransformerException { try { xctxt.pushCurrentNodeAndExpression(contextNode, contextNode); return execute(xctxt).iter(); } finally { xctxt.popCurrentNodeAndExpression(); ...
DTMIterator function(XPathContext xctxt, int contextNode) throws javax.xml.transform.TransformerException { try { xctxt.pushCurrentNodeAndExpression(contextNode, contextNode); return execute(xctxt).iter(); } finally { xctxt.popCurrentNodeAndExpression(); } }
/** * Given an select expression and a context, evaluate the XPath * and return the resulting iterator. * * @param xctxt The execution context. * @param contextNode The node that "." expresses. * * * @return A valid DTMIterator. * @throws TransformerException thrown if the active ProblemListe...
Given an select expression and a context, evaluate the XPath and return the resulting iterator
asIterator
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java", "license": "gpl-2.0", "size": 18291 }
[ "com.sun.org.apache.xml.internal.dtm.DTMIterator", "javax.xml.transform.TransformerException" ]
import com.sun.org.apache.xml.internal.dtm.DTMIterator; import javax.xml.transform.TransformerException;
import com.sun.org.apache.xml.internal.dtm.*; import javax.xml.transform.*;
[ "com.sun.org", "javax.xml" ]
com.sun.org; javax.xml;
1,217,855
public Plugin[] loadPlugins(File directory) { List<Plugin> result = new ArrayList<Plugin>(); File[] files = directory.listFiles(); for (File file : files) { Plugin plugin = null; try { plugin = loadPlugin(file); } catch (InvalidPluginExce...
Plugin[] function(File directory) { List<Plugin> result = new ArrayList<Plugin>(); File[] files = directory.listFiles(); for (File file : files) { Plugin plugin = null; try { plugin = loadPlugin(file); } catch (InvalidPluginException ex) { Logger.getLogger(SimplePluginManager.class.getName()).log(Level.SEVERE, STR + fi...
/** * Loads the plugins contained within the specified directory * * @param directory Directory to check for plugins * @return A list of all plugins loaded */
Loads the plugins contained within the specified directory
loadPlugins
{ "repo_name": "gaessaki/Bukkit", "path": "src/main/java/org/bukkit/plugin/SimplePluginManager.java", "license": "gpl-3.0", "size": 9695 }
[ "java.io.File", "java.util.ArrayList", "java.util.List", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger;
import java.io.*; import java.util.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,421,174
@Override @Nonnull PsiClass createEnum(@Nonnull @NonNls String name) throws IncorrectOperationException;
PsiClass createEnum(@Nonnull @NonNls String name) throws IncorrectOperationException;
/** * Creates an empty enum with the specified name. * * @param name the name of the enum to create. * @return the created enum instance. * @throws IncorrectOperationException if <code>name</code> is not a valid Java identifier. */
Creates an empty enum with the specified name
createEnum
{ "repo_name": "consulo/consulo-java", "path": "java-psi-api/src/main/java/com/intellij/psi/PsiElementFactory.java", "license": "apache-2.0", "size": 20364 }
[ "com.intellij.util.IncorrectOperationException", "javax.annotation.Nonnull", "org.jetbrains.annotations.NonNls" ]
import com.intellij.util.IncorrectOperationException; import javax.annotation.Nonnull; import org.jetbrains.annotations.NonNls;
import com.intellij.util.*; import javax.annotation.*; import org.jetbrains.annotations.*;
[ "com.intellij.util", "javax.annotation", "org.jetbrains.annotations" ]
com.intellij.util; javax.annotation; org.jetbrains.annotations;
1,776,952
public static boolean isCertificateEntry(String path) throws KeyStoreManagerException { FileInputStream fis = null; boolean result = false; if (KeyStoreManager.isKeystoreExists(getKeystorePath())) { try { fis = new FileInputStream(getKeystorePath()); ...
static boolean function(String path) throws KeyStoreManagerException { FileInputStream fis = null; boolean result = false; if (KeyStoreManager.isKeystoreExists(getKeystorePath())) { try { fis = new FileInputStream(getKeystorePath()); KeyStore ks = KeyStore.getInstance(KEYSTORE_TYPE); ks.load(fis, KEYSTORE_PASSWORD.toCh...
/** * Check if a certificate is in the keystore. * * @param path certificate path * @return true if available * @throws Exception */
Check if a certificate is in the keystore
isCertificateEntry
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/RCSe/core/src/com/orangelabs/rcs/core/ims/protocol/sip/KeyStoreManager.java", "license": "gpl-2.0", "size": 19330 }
[ "java.io.FileInputStream", "java.io.IOException", "java.security.KeyStore" ]
import java.io.FileInputStream; import java.io.IOException; import java.security.KeyStore;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
2,392,313
@Property(PROPERTY_RULE_ID) public void setRuleID(String ruleID);
@Property(PROPERTY_RULE_ID) void function(String ruleID);
/** * Set ID of the {@link Rule} that added this {@link ClassificationModel}. */
Set ID of the <code>Rule</code> that added this <code>ClassificationModel</code>
setRuleID
{ "repo_name": "sgilda/windup", "path": "reporting/api/src/main/java/org/jboss/windup/reporting/model/OverviewReportLineMessageModel.java", "license": "epl-1.0", "size": 2207 }
[ "com.tinkerpop.frames.Property" ]
import com.tinkerpop.frames.Property;
import com.tinkerpop.frames.*;
[ "com.tinkerpop.frames" ]
com.tinkerpop.frames;
2,621,307
public void info(String msg, Object arg0) { logIfEnabled(Level.INFO, null, msg, arg0, UNKNOWN_ARG, UNKNOWN_ARG, null); }
void function(String msg, Object arg0) { logIfEnabled(Level.INFO, null, msg, arg0, UNKNOWN_ARG, UNKNOWN_ARG, null); }
/** * Log a info message. */
Log a info message
info
{ "repo_name": "dankito/ormlite-jpa-core", "path": "src/main/java/com/j256/ormlite/logger/Logger.java", "license": "isc", "size": 17794 }
[ "com.j256.ormlite.logger.Log" ]
import com.j256.ormlite.logger.Log;
import com.j256.ormlite.logger.*;
[ "com.j256.ormlite" ]
com.j256.ormlite;
1,024,515
protected CompletableFuture<ExecutionResult> postExecuteAsync(ExecutionResult result, Scheduler scheduler, FailsafeFuture<Object> future) { if (isFailure(result)) { return onFailureAsync(result.withFailure(), scheduler, future).whenComplete((postResult, error) -> { callFailureListener(postResult...
CompletableFuture<ExecutionResult> function(ExecutionResult result, Scheduler scheduler, FailsafeFuture<Object> future) { if (isFailure(result)) { return onFailureAsync(result.withFailure(), scheduler, future).whenComplete((postResult, error) -> { callFailureListener(postResult); }); } else { result = result.withSucces...
/** * Performs potentially asynchronous post-execution handling for a {@code result}. */
Performs potentially asynchronous post-execution handling for a result
postExecuteAsync
{ "repo_name": "jhalterman/recurrent", "path": "src/main/java/net/jodah/failsafe/PolicyExecutor.java", "license": "apache-2.0", "size": 5581 }
[ "java.util.concurrent.CompletableFuture", "net.jodah.failsafe.util.concurrent.Scheduler" ]
import java.util.concurrent.CompletableFuture; import net.jodah.failsafe.util.concurrent.Scheduler;
import java.util.concurrent.*; import net.jodah.failsafe.util.concurrent.*;
[ "java.util", "net.jodah.failsafe" ]
java.util; net.jodah.failsafe;
2,048,471