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
private ZooPC checkObject(Object pc) { return checkObject(pc, false); }
ZooPC function(Object pc) { return checkObject(pc, false); }
/** * Check for base class, persistence state and PM affiliation. * @param pc * @return CachedObject */
Check for base class, persistence state and PM affiliation
checkObject
{ "repo_name": "NickCharsley/zoodb", "path": "src/org/zoodb/internal/Session.java", "license": "gpl-3.0", "size": 24234 }
[ "org.zoodb.api.impl.ZooPC" ]
import org.zoodb.api.impl.ZooPC;
import org.zoodb.api.impl.*;
[ "org.zoodb.api" ]
org.zoodb.api;
374,940
// some defensive programming if (!Verifier.isValidRNA2DStructure(dotBracket)) { throw new IllegalArgumentException("input RNA structure is problematic: " + dotBracket); } if (granularity < 1) { throw new IllegalArgumentException("granularity shoul...
if (!Verifier.isValidRNA2DStructure(dotBracket)) { throw new IllegalArgumentException(STR + dotBracket); } if (granularity < 1) { throw new IllegalArgumentException(STR + granularity + ")"); } ArrayList<Character> stringRepresentation = new ArrayList<>(); for (Character c : dotBracket.toCharArray()) { if (c != '.') { s...
/** * Vienna dot-bracket RNA structure to Granular Tree representation (also in Vienna dot-bracket) */
Vienna dot-bracket RNA structure to Granular Tree representation (also in Vienna dot-bracket)
dotBracketToGranularTree
{ "repo_name": "major-lab/RNA2D", "path": "src/rna2d/core/representations/GranularTree.java", "license": "cc0-1.0", "size": 4965 }
[ "java.util.ArrayList", "java.util.LinkedList" ]
import java.util.ArrayList; import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
1,964,255
public static boolean isAuthenticationEmpty(final Connection connection) throws SQLException { final Collection<String> tables = SQLFunctions.getTablesInDB(connection); if (!tables.contains("fll_authentication")) { GenerateDB.createAuthentication(connection); return true; } try (Statement...
static boolean function(final Connection connection) throws SQLException { final Collection<String> tables = SQLFunctions.getTablesInDB(connection); if (!tables.contains(STR)) { GenerateDB.createAuthentication(connection); return true; } try (Statement stmt = connection.createStatement(); ResultSet rs = stmt.executeQue...
/** * Check if the authentication table is empty or doesn't exist. This will * create the authentication table if it doesn't exist. * * @param connection database connection * @return true if the authentication table is missing or empty * @throws SQLException on a database error */
Check if the authentication table is empty or doesn't exist. This will create the authentication table if it doesn't exist
isAuthenticationEmpty
{ "repo_name": "jpschewe/fll-sw", "path": "src/main/java/fll/db/Authentication.java", "license": "gpl-2.0", "size": 15292 }
[ "java.sql.Connection", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "java.util.Collection", "net.mtu.eggplant.util.sql.SQLFunctions" ]
import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Collection; import net.mtu.eggplant.util.sql.SQLFunctions;
import java.sql.*; import java.util.*; import net.mtu.eggplant.util.sql.*;
[ "java.sql", "java.util", "net.mtu.eggplant" ]
java.sql; java.util; net.mtu.eggplant;
1,759,695
public double num(XPathContext xctxt) throws javax.xml.transform.TransformerException { return (m_left.num(xctxt) % m_right.num(xctxt)); }
double function(XPathContext xctxt) throws javax.xml.transform.TransformerException { return (m_left.num(xctxt) % m_right.num(xctxt)); }
/** * Evaluate this operation directly to a double. * * @param xctxt The runtime execution context. * * @return The result of the operation as a double. * * @throws javax.xml.transform.TransformerException */
Evaluate this operation directly to a double
num
{ "repo_name": "srnsw/xena", "path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xpath/operations/Mod.java", "license": "gpl-3.0", "size": 2148 }
[ "org.apache.xpath.XPathContext" ]
import org.apache.xpath.XPathContext;
import org.apache.xpath.*;
[ "org.apache.xpath" ]
org.apache.xpath;
240,128
private boolean limitReached(Rectangular gp, Rectangular limit, short required) { switch (required) { case REQ_HORIZONTAL: return gp.getX1() <= limit.getX1() && gp.getX2() >= limit.getX2(); case REQ_VERTICAL: return gp.getY1() <= limit.getY1() && gp.getY2() >= limit.getY2(); ...
boolean function(Rectangular gp, Rectangular limit, short required) { switch (required) { case REQ_HORIZONTAL: return gp.getX1() <= limit.getX1() && gp.getX2() >= limit.getX2(); case REQ_VERTICAL: return gp.getY1() <= limit.getY1() && gp.getY2() >= limit.getY2(); case REQ_BOTH: return gp.getX1() <= limit.getX1() && gp....
/** * Checks if the grid bounds have reached a specified limit in the specified direction. * @param gp the bounds to check * @param limit the limit to be reached * @param required the required direction (use the REQ_* constants) * @return true if the limit has been reached or exceeded */
Checks if the grid bounds have reached a specified limit in the specified direction
limitReached
{ "repo_name": "Michal27/dp_vips_fitlayout", "path": "src/main/java/org/fit/segm/grouping/op/GroupAnalyzerByStyles.java", "license": "lgpl-3.0", "size": 18050 }
[ "org.fit.layout.model.Rectangular" ]
import org.fit.layout.model.Rectangular;
import org.fit.layout.model.*;
[ "org.fit.layout" ]
org.fit.layout;
2,827,137
public void setPullRefreshEnable(boolean enable) { mEnablePullRefresh = enable; if (!mEnablePullRefresh) { // disable, hide the content mHeaderViewContent.setVisibility(View.INVISIBLE); } else { mHeaderViewContent.setVisibility(View.VISIBLE); } }
void function(boolean enable) { mEnablePullRefresh = enable; if (!mEnablePullRefresh) { mHeaderViewContent.setVisibility(View.INVISIBLE); } else { mHeaderViewContent.setVisibility(View.VISIBLE); } }
/** * enable or disable pull down refreshMsgsFromDB feature. * * @param enable */
enable or disable pull down refreshMsgsFromDB feature
setPullRefreshEnable
{ "repo_name": "connectim/Android", "path": "app/src/main/java/connect/view/pullTorefresh/XListView.java", "license": "mit", "size": 11050 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,769,037
public static String md5Hex(byte[] secretBytes) { String retval = null; // add secret MessageDigest md; try { md = MessageDigest.getInstance("MD5"); //byte[] secretBytes = inputString.getBytes("UTF-8"); md.update(secretBytes); // genera...
static String function(byte[] secretBytes) { String retval = null; MessageDigest md; try { md = MessageDigest.getInstance("MD5"); md.update(secretBytes); byte[] digest = md.digest(); retval = new String(Hex.encodeHex(digest)); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(STR + STR, e); } return ret...
/** * MD5 and Hexify an array of bytes. Take the input array, MD5 encodes it * and then turns it into Hex. * @param secretBytes you want md5hexed * @return md5hexed String. */
MD5 and Hexify an array of bytes. Take the input array, MD5 encodes it and then turns it into Hex
md5Hex
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/common/util/MD5Crypt.java", "license": "gpl-2.0", "size": 9095 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException", "org.apache.commons.codec.binary.Hex" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import org.apache.commons.codec.binary.Hex;
import java.security.*; import org.apache.commons.codec.binary.*;
[ "java.security", "org.apache.commons" ]
java.security; org.apache.commons;
891,820
private void executeSendFeedback(ActionEvent event, RequestContext context) throws Exception { MessageBroker msgBroker = extractMessageBroker(); ApplicationConfiguration appConfig = context.getApplicationConfiguration(); FeedbackMessage msg = getFeedbackMessage(); // validate parameters boolean bOk = tr...
void function(ActionEvent event, RequestContext context) throws Exception { MessageBroker msgBroker = extractMessageBroker(); ApplicationConfiguration appConfig = context.getApplicationConfiguration(); FeedbackMessage msg = getFeedbackMessage(); boolean bOk = true; String sName = msg.getFromName(); String sEmail = msg....
/** * Executes the sending of a user feedback message. * @param event the associated JSF action event * @param context the context associated with the active request * @throws Exception if an exception occurs */
Executes the sending of a user feedback message
executeSendFeedback
{ "repo_name": "GeoinformationSystems/GeoprocessingAppstore", "path": "src/com/esri/gpt/control/identity/SelfCareController.java", "license": "apache-2.0", "size": 18851 }
[ "com.esri.gpt.control.ResourceKeys", "com.esri.gpt.framework.context.ApplicationConfiguration", "com.esri.gpt.framework.context.RequestContext", "com.esri.gpt.framework.jsf.MessageBroker", "com.esri.gpt.framework.mail.FeedbackMessage", "com.esri.gpt.framework.mail.MailRequest", "com.esri.gpt.framework.u...
import com.esri.gpt.control.ResourceKeys; import com.esri.gpt.framework.context.ApplicationConfiguration; import com.esri.gpt.framework.context.RequestContext; import com.esri.gpt.framework.jsf.MessageBroker; import com.esri.gpt.framework.mail.FeedbackMessage; import com.esri.gpt.framework.mail.MailRequest; import com....
import com.esri.gpt.control.*; import com.esri.gpt.framework.context.*; import com.esri.gpt.framework.jsf.*; import com.esri.gpt.framework.mail.*; import com.esri.gpt.framework.util.*; import javax.faces.event.*; import javax.servlet.http.*;
[ "com.esri.gpt", "javax.faces", "javax.servlet" ]
com.esri.gpt; javax.faces; javax.servlet;
2,603,887
public static void renameUnusedFile(File journalFile) { journalFile.renameTo(new File(journalFile.getAbsolutePath() + ".unusedFile" + System.currentTimeMillis())); }
static void function(File journalFile) { journalFile.renameTo(new File(journalFile.getAbsolutePath() + STR + System.currentTimeMillis())); }
/** * Rename a journal file to indicate it was found empty and is being ignored. */
Rename a journal file to indicate it was found empty and is being ignored
renameUnusedFile
{ "repo_name": "jeffbrown/prevayler", "path": "core/src/main/java/org/prevayler/implementation/PrevaylerDirectory.java", "license": "bsd-3-clause", "size": 7506 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,350,022
EAttribute getCURVE_SetParF();
EAttribute getCURVE_SetParF();
/** * Returns the meta object for the attribute '{@link gluemodel.substationStandard.Dataclasses.CURVE#getSetParF <em>Set Par F</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Set Par F</em>'. * @see gluemodel.substationStandard.Dataclasses.CURVE#getS...
Returns the meta object for the attribute '<code>gluemodel.substationStandard.Dataclasses.CURVE#getSetParF Set Par F</code>'.
getCURVE_SetParF
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/Dataclasses/DataclassesPackage.java", "license": "mit", "size": 381891 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,297,879
public void timeoutBean(BeanId beanId) throws RemoteException { beanId.getActivationStrategy().atTimeout(beanId); }
void function(BeanId beanId) throws RemoteException { beanId.getActivationStrategy().atTimeout(beanId); }
/** * Called by the session bean reaper when an object needs to be timed * out. The bean is removed. */
Called by the session bean reaper when an object needs to be timed out. The bean is removed
timeoutBean
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/activator/Activator.java", "license": "epl-1.0", "size": 29937 }
[ "com.ibm.ejs.container.BeanId", "java.rmi.RemoteException" ]
import com.ibm.ejs.container.BeanId; import java.rmi.RemoteException;
import com.ibm.ejs.container.*; import java.rmi.*;
[ "com.ibm.ejs", "java.rmi" ]
com.ibm.ejs; java.rmi;
2,268,093
@Test public void testIsNew2() { // Setup CallbackServlet s = (CallbackServlet) getServlet(); s.setCallback((request, response) -> request.getSession()); doFilter(); HttpServletRequest request = (HttpServletRequest) getFilteredRequest(); request.getSession(); MockHttpServletResponse r...
void function() { CallbackServlet s = (CallbackServlet) getServlet(); s.setCallback((request, response) -> request.getSession()); doFilter(); HttpServletRequest request = (HttpServletRequest) getFilteredRequest(); request.getSession(); MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse(); Cook...
/** * Subsequent calls should not return true */
Subsequent calls should not return true
testIsNew2
{ "repo_name": "jdeppe-pivotal/geode", "path": "extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/CommonTests.java", "license": "apache-2.0", "size": 17167 }
[ "com.mockrunner.mock.web.MockHttpServletRequest", "com.mockrunner.mock.web.MockHttpServletResponse", "javax.servlet.http.Cookie", "javax.servlet.http.HttpServletRequest", "org.junit.Assert" ]
import com.mockrunner.mock.web.MockHttpServletRequest; import com.mockrunner.mock.web.MockHttpServletResponse; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import org.junit.Assert;
import com.mockrunner.mock.web.*; import javax.servlet.http.*; import org.junit.*;
[ "com.mockrunner.mock", "javax.servlet", "org.junit" ]
com.mockrunner.mock; javax.servlet; org.junit;
1,872,903
ElderState getElderState(boolean force) throws InterruptedException;
ElderState getElderState(boolean force) throws InterruptedException;
/** * Returns the elder state or null if this DM is not the elder. * <p> * If useTryLock is true, then it will attempt to get a try-lock and throw IllegalStateException * if another thread already holds the try-lock. * * @param force if true then this DM must become the elder. * @throws IllegalStat...
Returns the elder state or null if this DM is not the elder. If useTryLock is true, then it will attempt to get a try-lock and throw IllegalStateException if another thread already holds the try-lock
getElderState
{ "repo_name": "davinash/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionManager.java", "license": "apache-2.0", "size": 14971 }
[ "org.apache.geode.distributed.internal.locks.ElderState" ]
import org.apache.geode.distributed.internal.locks.ElderState;
import org.apache.geode.distributed.internal.locks.*;
[ "org.apache.geode" ]
org.apache.geode;
341,127
public Color getSelectionForeground() { return selectionForeground; }
Color function() { return selectionForeground; }
/** * Getter for the selectionForeground. Each selected Cell paints the foreground in this Color. That means the * foreground-Property in the renderer is set to the selectionForeground. * * @return the selectionForeground * * @since 0.1 */
Getter for the selectionForeground. Each selected Cell paints the foreground in this Color. That means the foreground-Property in the renderer is set to the selectionForeground
getSelectionForeground
{ "repo_name": "cismet/jGrid", "path": "src/main/java/com/guigarage/jgrid/JGrid.java", "license": "apache-2.0", "size": 29546 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,722,505
public static Map<String, String> decodeArgToParams( final String arg) { if (arg == null) { return null; } String decodedArg; decodedArg = arg; Map<String, String> params = new HashMap<String, String>(); for (String param : decodedArg.split(PARAMS_SEPARATOR)) { String[] nameValueArray ...
static Map<String, String> function( final String arg) { if (arg == null) { return null; } String decodedArg; decodedArg = arg; Map<String, String> params = new HashMap<String, String>(); for (String param : decodedArg.split(PARAMS_SEPARATOR)) { String[] nameValueArray = param.split(NAME_VALUE_SEPARATOR, 2); if (nameVa...
/** * Decode arguments into parameters. * @param arg * @return the parameters */
Decode arguments into parameters
decodeArgToParams
{ "repo_name": "GIP-RECIA/esco-grouper-ui", "path": "ext/esup-commons/src/main/java/org/esupportail/commons/services/urlGeneration/AbstractUrlGenerator.java", "license": "apache-2.0", "size": 4156 }
[ "java.util.HashMap", "java.util.Map", "org.esupportail.commons.utils.strings.StringUtils" ]
import java.util.HashMap; import java.util.Map; import org.esupportail.commons.utils.strings.StringUtils;
import java.util.*; import org.esupportail.commons.utils.strings.*;
[ "java.util", "org.esupportail.commons" ]
java.util; org.esupportail.commons;
920,143
@Override public void populateExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySource glpeSource, GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry explicitEntry) { if (LOG.isDebugEnabled()) { L...
void function(GeneralLedgerPendingEntrySource glpeSource, GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry explicitEntry) { if (LOG.isDebugEnabled()) { LOG.debug(STR); } explicitEntry.setFinancialDocumentTypeCode(glpeSource.getFina...
/** * This populates an empty GeneralLedgerPendingEntry explicitEntry object instance with default values. * * @param accountingDocument * @param accountingLine * @param sequenceHelper * @param explicitEntry */
This populates an empty GeneralLedgerPendingEntry explicitEntry object instance with default values
populateExplicitGeneralLedgerPendingEntry
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/sys/service/impl/GeneralLedgerPendingEntryServiceImpl.java", "license": "agpl-3.0", "size": 59591 }
[ "java.sql.Timestamp", "org.apache.commons.lang.StringUtils", "org.kuali.kfs.coa.businessobject.Account", "org.kuali.kfs.coa.businessobject.ObjectCode", "org.kuali.kfs.coa.service.ObjectCodeService", "org.kuali.kfs.sys.KFSConstants", "org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntry", "org.ku...
import java.sql.Timestamp; import org.apache.commons.lang.StringUtils; import org.kuali.kfs.coa.businessobject.Account; import org.kuali.kfs.coa.businessobject.ObjectCode; import org.kuali.kfs.coa.service.ObjectCodeService; import org.kuali.kfs.sys.KFSConstants; import org.kuali.kfs.sys.businessobject.GeneralLedgerPend...
import java.sql.*; import org.apache.commons.lang.*; import org.kuali.kfs.coa.businessobject.*; import org.kuali.kfs.coa.service.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.businessobject.*; import org.kuali.kfs.sys.context.*; import org.kuali.kfs.sys.document.*; import org.kuali.kfs.sys.service.*;
[ "java.sql", "org.apache.commons", "org.kuali.kfs" ]
java.sql; org.apache.commons; org.kuali.kfs;
1,987,656
public String getTextStringValue() throws IOException { return PDFStringUtil.asTextString(getStringValue()); }
String function() throws IOException { return PDFStringUtil.asTextString(getStringValue()); }
/** * Get the value as a text string; i.e., a string encoded in UTF-16BE * or PDFDocEncoding. Simple latin alpha-numeric characters are preserved in * both these encodings. * * @return the text string value * @throws IOException */
Get the value as a text string; i.e., a string encoded in UTF-16BE or PDFDocEncoding. Simple latin alpha-numeric characters are preserved in both these encodings
getTextStringValue
{ "repo_name": "Pixplicity/PDFrenderer", "path": "src/com/sun/pdfview/PDFObject.java", "license": "lgpl-2.1", "size": 22732 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
326,888
public void setValues(Map<Triple<Object, Object, Object>, ValueSnapshot> values) { JodaBeanUtils.notNull(values, "values"); this._values = values; }
void function(Map<Triple<Object, Object, Object>, ValueSnapshot> values) { JodaBeanUtils.notNull(values, STR); this._values = values; }
/** * Sets the values in the snapshot. * @param values the new value of the property, not null */
Sets the values in the snapshot
setValues
{ "repo_name": "ChinaQuants/OG-Platform", "path": "projects/OG-Core/src/main/java/com/opengamma/core/marketdatasnapshot/impl/ManageableVolatilityCubeSnapshot.java", "license": "apache-2.0", "size": 9921 }
[ "com.opengamma.core.marketdatasnapshot.ValueSnapshot", "com.opengamma.util.tuple.Triple", "java.util.Map", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.core.marketdatasnapshot.ValueSnapshot; import com.opengamma.util.tuple.Triple; import java.util.Map; import org.joda.beans.JodaBeanUtils;
import com.opengamma.core.marketdatasnapshot.*; import com.opengamma.util.tuple.*; import java.util.*; import org.joda.beans.*;
[ "com.opengamma.core", "com.opengamma.util", "java.util", "org.joda.beans" ]
com.opengamma.core; com.opengamma.util; java.util; org.joda.beans;
2,455,377
protected static void deleteFiles() { for (int i = 0; i < dirs.length; i++) { File[] files = dirs[i].listFiles(); for (int j = 0; j < files.length; j++) { files[j].delete(); } } }
static void function() { for (int i = 0; i < dirs.length; i++) { File[] files = dirs[i].listFiles(); for (int j = 0; j < files.length; j++) { files[j].delete(); } } }
/** * cleans all the directory of all the files present in them */
cleans all the directory of all the files present in them
deleteFiles
{ "repo_name": "prasi-in/geode", "path": "geode-core/src/test/java/org/apache/geode/internal/cache/Bug34179TooManyFilesOpenJUnitTest.java", "license": "apache-2.0", "size": 3252 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,480,712
private double periodize(final List<KeyDevelopmentsStatsPerMonthVO> grossProductPerMonthList, final Period period) { final int year = period.getBegin().get(Calendar.YEAR); final int startMonth = period.getBegin().get(Calendar.MONTH) + 1; final int endMonth = period.getEnd().get(Calendar.MONT...
double function(final List<KeyDevelopmentsStatsPerMonthVO> grossProductPerMonthList, final Period period) { final int year = period.getBegin().get(Calendar.YEAR); final int startMonth = period.getBegin().get(Calendar.MONTH) + 1; final int endMonth = period.getEnd().get(Calendar.MONTH) + 1; double result = 0.0; for (fin...
/** * gets the data (which may be number of members, number of transactions, gross product, transaction amounts, etc) for one period for through time * from the big list with the data for all periods. Summarizes several months together if necessary. * * @param grossProductPerMonth, a <code>KeyDevel...
gets the data (which may be number of members, number of transactions, gross product, transaction amounts, etc) for one period for through time from the big list with the data for all periods. Summarizes several months together if necessary
periodize
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/services/stats/StatisticalKeyDevelopmentsServiceImpl.java", "license": "gpl-2.0", "size": 45073 }
[ "java.util.Calendar", "java.util.List", "nl.strohalm.cyclos.services.stats.general.KeyDevelopmentsStatsPerMonthVO", "nl.strohalm.cyclos.utils.Period" ]
import java.util.Calendar; import java.util.List; import nl.strohalm.cyclos.services.stats.general.KeyDevelopmentsStatsPerMonthVO; import nl.strohalm.cyclos.utils.Period;
import java.util.*; import nl.strohalm.cyclos.services.stats.general.*; import nl.strohalm.cyclos.utils.*;
[ "java.util", "nl.strohalm.cyclos" ]
java.util; nl.strohalm.cyclos;
1,653,698
public static boolean isParseable(Object input) { return (null != input) && (isWrapperType(input.getClass()) || allPrimitiveTypes().contains(input.getClass()) || (String.class.isInstance(input) && ( Strs.inRange('0', '9').matchesAllOf( MINUS_STRING.matcher((String) input).replaceFirst(Strs.EMPT...
static boolean function(Object input) { return (null != input) && (isWrapperType(input.getClass()) allPrimitiveTypes().contains(input.getClass()) (String.class.isInstance(input) && ( Strs.inRange('0', '9').matchesAllOf( MINUS_STRING.matcher((String) input).replaceFirst(Strs.EMPTY)) ) ) ); } private static final Pattern...
/** * Check if the given input is able parse to number or boolean * * @param input * @return */
Check if the given input is able parse to number or boolean
isParseable
{ "repo_name": "jronrun/benayn", "path": "benayn-ustyle/src/main/java/com/benayn/ustyle/Objects2.java", "license": "apache-2.0", "size": 35594 }
[ "com.benayn.ustyle.string.Strs", "com.google.common.primitives.Primitives", "java.util.regex.Pattern" ]
import com.benayn.ustyle.string.Strs; import com.google.common.primitives.Primitives; import java.util.regex.Pattern;
import com.benayn.ustyle.string.*; import com.google.common.primitives.*; import java.util.regex.*;
[ "com.benayn.ustyle", "com.google.common", "java.util" ]
com.benayn.ustyle; com.google.common; java.util;
2,502,104
public WhatsUpInfo getWhatsUpInfo() throws Exception;
WhatsUpInfo function() throws Exception;
/** * Invokes the 'whatsup' command on the management node, and * returns the results in the WhatsUpInfo object. * * @return WhatsUpInfo ***********************************************************/
Invokes the 'whatsup' command on the management node, and returns the results in the WhatsUpInfo object
getWhatsUpInfo
{ "repo_name": "meier/opensm-client-server", "path": "src/main/java/gov/llnl/lc/infiniband/opensm/plugin/net/OsmAdminApi.java", "license": "gpl-2.0", "size": 7481 }
[ "gov.llnl.lc.system.whatsup.WhatsUpInfo" ]
import gov.llnl.lc.system.whatsup.WhatsUpInfo;
import gov.llnl.lc.system.whatsup.*;
[ "gov.llnl.lc" ]
gov.llnl.lc;
1,355,968
public void checkpointInRFR(LogInstant cinstant, long redoLWM, long undoLWM, DataFactory df) throws StandardException;
void function(LogInstant cinstant, long redoLWM, long undoLWM, DataFactory df) throws StandardException;
/** * redoing a checkpoint during rollforward recovery * @param cinstant The LogInstant of the checkpoint * @param redoLWM Redo Low Water Mark in the check point record * @param undoLWM Undo Low Water Mark in the checkpoint * @param df - the data factory * @exception StandardException - encounter excepti...
redoing a checkpoint during rollforward recovery
checkpointInRFR
{ "repo_name": "kavin256/Derby", "path": "java/engine/org/apache/derby/iapi/store/raw/log/LogFactory.java", "license": "apache-2.0", "size": 14790 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.store.raw.data.DataFactory" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.store.raw.data.DataFactory;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.store.raw.data.*;
[ "org.apache.derby" ]
org.apache.derby;
2,725,180
public static VmDevice findVmDeviceByGeneralType(Map<Guid, VmDevice> vmManagedDeviceMap, VmDeviceGeneralType generalType) { for (VmDevice vmDevice : vmManagedDeviceMap.values()) { if (vmDevice.getType() == generalType) { return...
static VmDevice function(Map<Guid, VmDevice> vmManagedDeviceMap, VmDeviceGeneralType generalType) { for (VmDevice vmDevice : vmManagedDeviceMap.values()) { if (vmDevice.getType() == generalType) { return vmDevice; } } return null; }
/** * Find a device in the map with the given general type. * * @param vmManagedDeviceMap * @param generalType * @return */
Find a device in the map with the given general type
findVmDeviceByGeneralType
{ "repo_name": "jtux270/translate", "path": "ovirt/3.6_source/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/VmDeviceCommonUtils.java", "license": "gpl-3.0", "size": 16949 }
[ "java.util.Map", "org.ovirt.engine.core.common.businessentities.VmDevice", "org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType", "org.ovirt.engine.core.compat.Guid" ]
import java.util.Map; import org.ovirt.engine.core.common.businessentities.VmDevice; import org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType; import org.ovirt.engine.core.compat.Guid;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
1,252,302
public static ObjectProfileNode.INodeVisitor newXMLNodePrinter (final OutputStream out, final String indent, final DecimalFormat format, ...
static ObjectProfileNode.INodeVisitor function (final OutputStream out, final String indent, final DecimalFormat format, final boolean shortClassNames) { return new XMLNodePrinter (out, indent, format, shortClassNames); } private ObjectProfileVisitors () {}
/** * Factory method for creating the XML output visitor. To create a valid * XML document, start the traversal on the profile root node. It is up to * the caller to buffer 'out'. * * @param out stream to dump the nodes into [may not be null] * @param indent indent increment string ...
Factory method for creating the XML output visitor. To create a valid XML document, start the traversal on the profile root node. It is up to the caller to buffer 'out'
newXMLNodePrinter
{ "repo_name": "LoickBriot/replication-benchmarker", "path": "src/main/java/jbenchmarker/vladium/ObjectProfileVisitors.java", "license": "gpl-3.0", "size": 10899 }
[ "java.io.OutputStream", "java.text.DecimalFormat" ]
import java.io.OutputStream; import java.text.DecimalFormat;
import java.io.*; import java.text.*;
[ "java.io", "java.text" ]
java.io; java.text;
1,751,434
public void setDateList(ArrayList<DatePair> dateList) { this.dateList = dateList; updateLastUpdate(); }
void function(ArrayList<DatePair> dateList) { this.dateList = dateList; updateLastUpdate(); }
/** * Set a new dateList of the Task object. * * @param dateList of possible DatePair */
Set a new dateList of the Task object
setDateList
{ "repo_name": "cs2103aug2014-w11-4j/main", "path": "src/rubberduck/common/datatransfer/Task.java", "license": "gpl-2.0", "size": 10718 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,069,903
public void updateOutgoingMessage(AbstractChat abstractChat, Message message, MessageItem messageItem) { sent.put(abstractChat.getAccount(), message.getStanzaId(), messageItem); }
void function(AbstractChat abstractChat, Message message, MessageItem messageItem) { sent.put(abstractChat.getAccount(), message.getStanzaId(), messageItem); }
/** * Update outgoing message before sending. * * @param abstractChat * @param message * @param messageItem */
Update outgoing message before sending
updateOutgoingMessage
{ "repo_name": "bigbugbb/iTracker", "path": "app/src/main/java/com/itracker/android/data/message/ReceiptManager.java", "license": "apache-2.0", "size": 6509 }
[ "org.jivesoftware.smack.packet.Message" ]
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,892,910
@Test public void testGetConvertedListDomainFromDTO( ) throws Exception { logger.debug( "Starting GetConvertedListDomainFromDTO" ); List< Preference > preferenceDTOList = new ArrayList<>( ); List< com.mana.innovative.domain.consumer.Preference > preferenceDomainList; preferenc...
void function( ) throws Exception { logger.debug( STR ); List< Preference > preferenceDTOList = new ArrayList<>( ); List< com.mana.innovative.domain.consumer.Preference > preferenceDomainList; preferenceDTOList.add( preferenceDTO ); TestDummyDomainObjectGenerator.setTestPreferenceDomainZEROIDObject( preferenceDomain );...
/** * Test get converted list domain from dTO. * * @throws Exception the exception */
Test get converted list domain from dTO
testGetConvertedListDomainFromDTO
{ "repo_name": "arkoghosh11/bloom-test", "path": "bloom-converter/src/test/java/com/mana/innovative/converter/response/WhenPreferenceConversionThenTestPreferenceConverterDomainDTOMethods.java", "license": "apache-2.0", "size": 7876 }
[ "com.mana.innovative.constants.TestConstants", "com.mana.innovative.converter.TestDummyDomainObjectGenerator", "com.mana.innovative.dto.consumer.Preference", "java.util.ArrayList", "java.util.List", "junit.framework.Assert" ]
import com.mana.innovative.constants.TestConstants; import com.mana.innovative.converter.TestDummyDomainObjectGenerator; import com.mana.innovative.dto.consumer.Preference; import java.util.ArrayList; import java.util.List; import junit.framework.Assert;
import com.mana.innovative.constants.*; import com.mana.innovative.converter.*; import com.mana.innovative.dto.consumer.*; import java.util.*; import junit.framework.*;
[ "com.mana.innovative", "java.util", "junit.framework" ]
com.mana.innovative; java.util; junit.framework;
155,666
public int getPriority() { AuthenticatorsConfiguration authenticatorsConfiguration = AuthenticatorsConfiguration.getInstance(); AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = authenticatorsConfiguration.getAuthenticatorConfig(getAuthenticatorName()); if...
int function() { AuthenticatorsConfiguration authenticatorsConfiguration = AuthenticatorsConfiguration.getInstance(); AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = authenticatorsConfiguration.getAuthenticatorConfig(getAuthenticatorName()); if (authenticatorConfig != null && authenticatorConfig.g...
/** * This method reads the configuration relevant to given authenticator name and will return the * priority level. This is a helper method for child classes. If the priority is not defined in * the configuration this will return the default priority level. {@see #DEFAULT_PRIORITY_LEVEL}. * * ...
This method reads the configuration relevant to given authenticator name and will return the priority level. This is a helper method for child classes. If the priority is not defined in the configuration this will return the default priority level. #DEFAULT_PRIORITY_LEVEL
getPriority
{ "repo_name": "maheshika/carbon4-kernel", "path": "core/org.wso2.carbon.core.services/src/main/java/org/wso2/carbon/core/services/authentication/AbstractAuthenticator.java", "license": "apache-2.0", "size": 20165 }
[ "org.wso2.carbon.core.security.AuthenticatorsConfiguration" ]
import org.wso2.carbon.core.security.AuthenticatorsConfiguration;
import org.wso2.carbon.core.security.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
833,832
private void finalizeInit() { MXMediasCache mxMediasCache = mSession.getMediasCache(); mAddMembersFloatingActionButton = mViewHierarchy.findViewById(R.id.add_participants_create_view);
void function() { MXMediasCache mxMediasCache = mSession.getMediasCache(); mAddMembersFloatingActionButton = mViewHierarchy.findViewById(R.id.add_participants_create_view);
/** * Finalize the fragment initialization. */
Finalize the fragment initialization
finalizeInit
{ "repo_name": "noepitome/neon-android", "path": "neon/src/main/java/im/neon/fragments/VectorRoomDetailsMembersFragment.java", "license": "apache-2.0", "size": 39149 }
[ "org.matrix.androidsdk.db.MXMediasCache" ]
import org.matrix.androidsdk.db.MXMediasCache;
import org.matrix.androidsdk.db.*;
[ "org.matrix.androidsdk" ]
org.matrix.androidsdk;
1,652,307
private void createSubscriptionToPEPService(PEPService pepService, JID subscriber, JID owner) { // If `owner` has a PEP service, generate and process a pubsub subscription packet // that is equivalent to: (where 'from' field is JID of subscriber and 'to' field is JID of owner) // // ...
void function(PEPService pepService, JID subscriber, JID owner) { IQ subscriptionPacket = new IQ(IQ.Type.set); subscriptionPacket.setFrom(subscriber); subscriptionPacket.setTo(owner.toBareJID()); Element pubsubElement = subscriptionPacket.setChildElement(STR, STRsubscribeSTRjidSTRoptionsSTRxSTRjabber:x:dataSTRFORM_TYPE...
/** * Generates and processes an IQ stanza that subscribes to a PEP service. * * @param pepService the PEP service of the owner. * @param subscriber the JID of the entity that is subscribing to the PEP service. * @param owner the JID of the owner of the PEP service. */
Generates and processes an IQ stanza that subscribes to a PEP service
createSubscriptionToPEPService
{ "repo_name": "fanjunwei/openfireSSO", "path": "src/java/org/jivesoftware/openfire/pep/IQPEPHandler.java", "license": "apache-2.0", "size": 25775 }
[ "org.dom4j.Element" ]
import org.dom4j.Element;
import org.dom4j.*;
[ "org.dom4j" ]
org.dom4j;
2,274,900
private void generateNotificationsForRevokedRequests(List<ActionRequestValue> revokedRequests, PrincipalContract principal, Recipient delegator) { ActionRequestFactory arFactory = new ActionRequestFactory(getRouteHeader()); List<ActionRequestValue> notificationRequests = arFactory.generateNotifica...
void function(List<ActionRequestValue> revokedRequests, PrincipalContract principal, Recipient delegator) { ActionRequestFactory arFactory = new ActionRequestFactory(getRouteHeader()); List<ActionRequestValue> notificationRequests = arFactory.generateNotifications(revokedRequests, principal, delegator, KewApiConstants....
/** * Generates FYIs for revoked ActionRequests * @param revokedRequests the revoked actionrequests * @param principal principal taking action, omitted from notifications * @param delegator delegator to omit from notifications */
Generates FYIs for revoked ActionRequests
generateNotificationsForRevokedRequests
{ "repo_name": "ua-eas/ua-rice-2.1.9", "path": "impl/src/main/java/org/kuali/rice/kew/actions/ReturnToPreviousNodeAction.java", "license": "apache-2.0", "size": 26470 }
[ "java.util.List", "org.kuali.rice.kew.actionrequest.ActionRequestFactory", "org.kuali.rice.kew.actionrequest.ActionRequestValue", "org.kuali.rice.kew.actionrequest.Recipient", "org.kuali.rice.kew.api.KewApiConstants", "org.kuali.rice.kim.api.identity.principal.PrincipalContract" ]
import java.util.List; import org.kuali.rice.kew.actionrequest.ActionRequestFactory; import org.kuali.rice.kew.actionrequest.ActionRequestValue; import org.kuali.rice.kew.actionrequest.Recipient; import org.kuali.rice.kew.api.KewApiConstants; import org.kuali.rice.kim.api.identity.principal.PrincipalContract;
import java.util.*; import org.kuali.rice.kew.actionrequest.*; import org.kuali.rice.kew.api.*; import org.kuali.rice.kim.api.identity.principal.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
877,346
public NotificationDataDTO recoverWithNotification(UserRecoveryDTO recoveryDTO) throws IdentityException { String notificationAddress; String secretKey = null; String confirmationKey = null; NotificationSendingModule module = null; boolean persistData = true; String ...
NotificationDataDTO function(UserRecoveryDTO recoveryDTO) throws IdentityException { String notificationAddress; String secretKey = null; String confirmationKey = null; NotificationSendingModule module = null; boolean persistData = true; String userId = recoveryDTO.getUserId(); String domainName = recoveryDTO.getTenant...
/** * Processing recovery * * @param recoveryDTO class that contains user and tenant Information * @return true if the reset request is processed successfully. * @throws IdentityException if fails */
Processing recovery
recoverWithNotification
{ "repo_name": "thariyarox/carbon-identity", "path": "components/identity-mgt/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/RecoveryProcessor.java", "license": "apache-2.0", "size": 28217 }
[ "java.util.HashMap", "java.util.Map", "org.apache.axis2.context.MessageContext", "org.wso2.carbon.identity.base.IdentityException", "org.wso2.carbon.identity.core.util.IdentityUtil", "org.wso2.carbon.identity.mgt.dto.NotificationDataDTO", "org.wso2.carbon.identity.mgt.dto.UserRecoveryDTO", "org.wso2.c...
import java.util.HashMap; import java.util.Map; import org.apache.axis2.context.MessageContext; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.mgt.dto.NotificationDataDTO; import org.wso2.carbon.identity.mgt.dto.UserRecover...
import java.util.*; import org.apache.axis2.context.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.identity.mgt.dto.*; import org.wso2.carbon.identity.mgt.internal.*; import org.wso2.carbon.identity.mgt.mail.*; import org.wso2.carbon.identity.mgt.util.*; i...
[ "java.util", "org.apache.axis2", "org.wso2.carbon" ]
java.util; org.apache.axis2; org.wso2.carbon;
323,548
@Override public LmsPrefs fetchByPrimaryKey(Serializable primaryKey) throws SystemException { return fetchByPrimaryKey(((Long)primaryKey).longValue()); }
LmsPrefs function(Serializable primaryKey) throws SystemException { return fetchByPrimaryKey(((Long)primaryKey).longValue()); }
/** * Returns the lms prefs with the primary key or returns <code>null</code> if it could not be found. * * @param primaryKey the primary key of the lms prefs * @return the lms prefs, or <code>null</code> if a lms prefs with the primary key could not be found * @throws SystemException if a system exception oc...
Returns the lms prefs with the primary key or returns <code>null</code> if it could not be found
fetchByPrimaryKey
{ "repo_name": "TelefonicaED/liferaylms-portlet", "path": "docroot/WEB-INF/src/com/liferay/lms/service/persistence/LmsPrefsPersistenceImpl.java", "license": "agpl-3.0", "size": 23281 }
[ "com.liferay.lms.model.LmsPrefs", "com.liferay.portal.kernel.exception.SystemException", "java.io.Serializable" ]
import com.liferay.lms.model.LmsPrefs; import com.liferay.portal.kernel.exception.SystemException; import java.io.Serializable;
import com.liferay.lms.model.*; import com.liferay.portal.kernel.exception.*; import java.io.*;
[ "com.liferay.lms", "com.liferay.portal", "java.io" ]
com.liferay.lms; com.liferay.portal; java.io;
2,287,132
List<I_CmsHistoryResource> getAllNotDeletedEntries(CmsDbContext dbc) throws CmsDataAccessException;
List<I_CmsHistoryResource> getAllNotDeletedEntries(CmsDbContext dbc) throws CmsDataAccessException;
/** * Returns all historical resources (of not deleted resources).<p> * * @param dbc the current database context * * @return a list of {@link I_CmsHistoryResource} objects * * @throws CmsDataAccessException if something goes wrong */
Returns all historical resources (of not deleted resources)
getAllNotDeletedEntries
{ "repo_name": "victos/opencms-core", "path": "src/org/opencms/db/I_CmsHistoryDriver.java", "license": "lgpl-2.1", "size": 14323 }
[ "java.util.List", "org.opencms.file.CmsDataAccessException" ]
import java.util.List; import org.opencms.file.CmsDataAccessException;
import java.util.*; import org.opencms.file.*;
[ "java.util", "org.opencms.file" ]
java.util; org.opencms.file;
607,438
private void configGUI(){ this.setLayout(new GridLayout(1,1)); this.add(((JPanelGuiBasedTNGraphics)graphics).getJPanelTNGui()); return; }
void function(){ this.setLayout(new GridLayout(1,1)); this.add(((JPanelGuiBasedTNGraphics)graphics).getJPanelTNGui()); return; }
/** * configure the layout of the visualization */
configure the layout of the visualization
configGUI
{ "repo_name": "elitak/peertrust", "path": "sandbox/TomcatPeerTrust/src/org/peertrust/demo/client/applet/NegotiationVisualizationPane.java", "license": "gpl-2.0", "size": 7967 }
[ "java.awt.GridLayout" ]
import java.awt.GridLayout;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,661,108
public void removeEventListener(EventListener listener, Collection<String> ueis);
void function(EventListener listener, Collection<String> ueis);
/** * Removes a registered event listener - the UEI list indicates the list of * events the listener is no more interested in * * @param listener a {@link org.opennms.netmgt.model.events.EventListener} object. * @param ueis a {@link java.util.Collection} object. */
Removes a registered event listener - the UEI list indicates the list of events the listener is no more interested in
removeEventListener
{ "repo_name": "tdefilip/opennms", "path": "opennms-model/src/main/java/org/opennms/netmgt/model/events/EventSubscriptionService.java", "license": "agpl-3.0", "size": 3245 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,507,166
public Optional<Conversation> addMessage(AddMessageToConversationOptions options) throws IOException;
Optional<Conversation> function(AddMessageToConversationOptions options) throws IOException;
/** * Add a message to an existing conversation. The returned Conversation object will only * have a single message in it (the one we just added) * @param options Parameters for the message adding method * @return Conversation object with only the added message in it * @throws IOException if th...
Add a message to an existing conversation. The returned Conversation object will only have a single message in it (the one we just added)
addMessage
{ "repo_name": "kstateome/canvas-api", "path": "src/main/java/edu/ksu/canvas/interfaces/ConversationWriter.java", "license": "lgpl-3.0", "size": 2527 }
[ "edu.ksu.canvas.model.Conversation", "edu.ksu.canvas.requestOptions.AddMessageToConversationOptions", "java.io.IOException", "java.util.Optional" ]
import edu.ksu.canvas.model.Conversation; import edu.ksu.canvas.requestOptions.AddMessageToConversationOptions; import java.io.IOException; import java.util.Optional;
import edu.ksu.canvas.*; import edu.ksu.canvas.model.*; import java.io.*; import java.util.*;
[ "edu.ksu.canvas", "java.io", "java.util" ]
edu.ksu.canvas; java.io; java.util;
2,345,328
public @CheckForNull RepositoryBrowser<?> getBrowser() { return null; }
@CheckForNull RepositoryBrowser<?> function() { return null; }
/** * Returns the {@link RepositoryBrowser} for files * controlled by this {@link SCM}. * * @return * null to indicate that there's no explicitly configured browser * for this SCM instance. * * @see #getEffectiveBrowser() */
Returns the <code>RepositoryBrowser</code> for files controlled by this <code>SCM</code>
getBrowser
{ "repo_name": "keyurpatankar/hudson", "path": "core/src/main/java/hudson/scm/SCM.java", "license": "mit", "size": 33311 }
[ "javax.annotation.CheckForNull" ]
import javax.annotation.CheckForNull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,749,788
public static LambdaExpression findEnclosingLambdaExpression(ASTNode node) { node= node.getParent(); while (node != null) { if (node instanceof LambdaExpression) { return (LambdaExpression) node; } if (node instanceof BodyDeclaration || node instanceof AnonymousClassDeclaration) { return null; ...
static LambdaExpression function(ASTNode node) { node= node.getParent(); while (node != null) { if (node instanceof LambdaExpression) { return (LambdaExpression) node; } if (node instanceof BodyDeclaration node instanceof AnonymousClassDeclaration) { return null; } node= node.getParent(); } return null; } /** * Returns...
/** * Returns the lambda expression node which encloses the given <code>node</code>, or * <code>null</code> if none. * * @param node the node * @return the enclosing lambda expression node for the given <code>node</code>, or * <code>null</code> if none * * @since 3.10 */
Returns the lambda expression node which encloses the given <code>node</code>, or <code>null</code> if none
findEnclosingLambdaExpression
{ "repo_name": "kumattau/JDTPatch", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java", "license": "epl-1.0", "size": 44243 }
[ "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.AnonymousClassDeclaration", "org.eclipse.jdt.core.dom.BodyDeclaration", "org.eclipse.jdt.core.dom.LambdaExpression" ]
import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.AnonymousClassDeclaration; import org.eclipse.jdt.core.dom.BodyDeclaration; import org.eclipse.jdt.core.dom.LambdaExpression;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
281,544
@SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double distance) { double d0 = this.getEntityBoundingBox().getAverageEdgeLength() * 4.0D; if (Double.isNaN(d0)) { d0 = 4.0D; } d0 = d0 * 64.0D; return distance < d0 * d0; }
@SideOnly(Side.CLIENT) boolean function(double distance) { double d0 = this.getEntityBoundingBox().getAverageEdgeLength() * 4.0D; if (Double.isNaN(d0)) { d0 = 4.0D; } d0 = d0 * 64.0D; return distance < d0 * d0; }
/** * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge * length * 64 * renderDistanceWeight Args: distance */
Checks if the entity is in range to render by using the past in distance and comparing it to its average edge length * 64 * renderDistanceWeight Args: distance
isInRangeToRenderDist
{ "repo_name": "dogjaw2233/tiu-s-mod", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/projectile/EntityFishHook.java", "license": "lgpl-2.1", "size": 28983 }
[ "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.*;
[ "net.minecraftforge.fml" ]
net.minecraftforge.fml;
2,656,376
public static MethodCall createLambdaInstance( DeclaredTypeDescriptor lambdaType, Expression instance) { checkArgument(lambdaType.isJsFunctionImplementation()); // Use the method from the interface instead instead of the implementation method, since it is // the appropriate semantic behaviour. The ...
static MethodCall function( DeclaredTypeDescriptor lambdaType, Expression instance) { checkArgument(lambdaType.isJsFunctionImplementation()); MethodDescriptor jsFunctionMethodDescriptor = lambdaType.getFunctionalInterface().getJsFunctionMethodDescriptor(); String functionalMethodMangledName = jsFunctionMethodDescriptor...
/** * Generates the following code: * * <p>$Util.$makeLambdaFunction(Type.prototype.m_equal, $instance, Type.$copy); */
Generates the following code: $Util.$makeLambdaFunction(Type.prototype.m_equal, $instance, Type.$copy)
createLambdaInstance
{ "repo_name": "google/j2cl", "path": "transpiler/java/com/google/j2cl/transpiler/ast/AstUtils.java", "license": "apache-2.0", "size": 45317 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,673,211
default Optional<SystemTable> getSystemTable(ConnectorSession session, SchemaTableName tableName) { return Optional.empty(); }
default Optional<SystemTable> getSystemTable(ConnectorSession session, SchemaTableName tableName) { return Optional.empty(); }
/** * Returns the system table for the specified table name, if one exists. * The system tables handled via {@link #getSystemTable} differ form those returned by {@link Connector#getSystemTables()}. * The former mechanism allows dynamic resolution of system tables, while the latter is * based on sta...
Returns the system table for the specified table name, if one exists. The system tables handled via <code>#getSystemTable</code> differ form those returned by <code>Connector#getSystemTables()</code>. The former mechanism allows dynamic resolution of system tables, while the latter is based on static list of system tab...
getSystemTable
{ "repo_name": "martint/presto", "path": "presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorMetadata.java", "license": "apache-2.0", "size": 39854 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
691,992
private boolean containsGroup(final Set<Group> userGroups, final AccessPolicy policy) { if (userGroups.isEmpty() || policy.getGroups().isEmpty()) { return false; } for (Group userGroup : userGroups) { if (policy.getGroups().contains(userGroup.getIdentifier())) { ...
boolean function(final Set<Group> userGroups, final AccessPolicy policy) { if (userGroups.isEmpty() policy.getGroups().isEmpty()) { return false; } for (Group userGroup : userGroups) { if (policy.getGroups().contains(userGroup.getIdentifier())) { return true; } } return false; }
/** * Determines if the policy contains one of the user's groups. * * @param userGroups the set of the user's groups * @param policy the policy * @return true if one of the Groups in userGroups is contained in the policy */
Determines if the policy contains one of the user's groups
containsGroup
{ "repo_name": "tequalsme/nifi", "path": "nifi-framework-api/src/main/java/org/apache/nifi/authorization/AbstractPolicyBasedAuthorizer.java", "license": "apache-2.0", "size": 27071 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,385,041
public void testIncrementalLoader() { Instance temp; Instances data; if (!(getLoader() instanceof IncrementalConverter)) return; try { // save m_Saver.setInstances(m_Instances); m_Saver.setFile(new File(m_ExportFilename)); m_Saver.writeBatch(); // load ...
void function() { Instance temp; Instances data; if (!(getLoader() instanceof IncrementalConverter)) return; try { m_Saver.setInstances(m_Instances); m_Saver.setFile(new File(m_ExportFilename)); m_Saver.writeBatch(); ((AbstractFileLoader) m_Loader).setFile(new File(m_ExportFilename)); data = new Instances(m_Loader.getS...
/** * test the incremental loading (via setFile(File)). */
test the incremental loading (via setFile(File))
testIncrementalLoader
{ "repo_name": "dsibournemouth/autoweka", "path": "weka-3.7.7/src/test/java/weka/core/converters/AbstractFileConverterTest.java", "license": "gpl-3.0", "size": 11381 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,080,632
public void testAutoRange4() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.setValue(100.0, "Row 1", "Column 1"); dataset.setValue(200.0, "Row 1", "Column 2"); JFreeChart chart = ChartFactory.createBarChart("Test", "Categories", "Value", data...
void function() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); dataset.setValue(100.0, STR, STR); dataset.setValue(200.0, STR, STR); JFreeChart chart = ChartFactory.createBarChart("Test", STR, "Value", dataset, PlotOrientation.VERTICAL, false, false, false); CategoryPlot plot = (CategoryPlot) chart.ge...
/** * A check for the interaction between the 'autoRangeIncludesZero' flag * and the base setting in the BarRenderer. */
A check for the interaction between the 'autoRangeIncludesZero' flag and the base setting in the BarRenderer
testAutoRange4
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/chart/axis/junit/NumberAxisTests.java", "license": "lgpl-2.1", "size": 16698 }
[ "junit.framework.Test", "org.jfree.chart.ChartFactory", "org.jfree.chart.JFreeChart", "org.jfree.chart.axis.NumberAxis", "org.jfree.chart.plot.CategoryPlot", "org.jfree.chart.plot.PlotOrientation", "org.jfree.chart.renderer.category.BarRenderer", "org.jfree.data.category.DefaultCategoryDataset" ]
import junit.framework.Test; import org.jfree.chart.ChartFactory; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.renderer.category.BarRenderer; import org.jfree.data.category.Default...
import junit.framework.*; import org.jfree.chart.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.category.*; import org.jfree.data.category.*;
[ "junit.framework", "org.jfree.chart", "org.jfree.data" ]
junit.framework; org.jfree.chart; org.jfree.data;
2,479,687
@Test(expected = EntityProviderException.class) public void validationOfDuplicatedPropertyException() throws Exception { String room = "<?xml version='1.0' encoding='UTF-8'?>" + "<entry xmlns=\"http://www.w3.org/2005/Atom\" " + " xmlns:m=\"http://schemas.microsoft.com/ado/2007...
@Test(expected = EntityProviderException.class) void function() throws Exception { String room = STR + STRhttp: STRhttp: STRhttp: STRhttp: STRW/&quot;1&quot;\">" + STR <id>http: STRtext\STR + STR + STRapplication/xml\">" + STR + STR + STR + STR + STR + STR + STR + STR + STR; EdmEntitySet entitySet = MockFacade.getMockE...
/** * Double occurrence of <code>d:Name</code> tag must result in an exception. * * @throws Exception */
Double occurrence of <code>d:Name</code> tag must result in an exception
validationOfDuplicatedPropertyException
{ "repo_name": "SAP/cloud-odata-java", "path": "odata-core/src/test/java/com/sap/core/odata/core/ep/consumer/XmlEntityConsumerTest.java", "license": "apache-2.0", "size": 102425 }
[ "com.sap.core.odata.api.edm.EdmEntitySet", "com.sap.core.odata.api.ep.EntityProviderException", "com.sap.core.odata.testutil.mock.MockFacade", "java.io.InputStream", "org.junit.Test" ]
import com.sap.core.odata.api.edm.EdmEntitySet; import com.sap.core.odata.api.ep.EntityProviderException; import com.sap.core.odata.testutil.mock.MockFacade; import java.io.InputStream; import org.junit.Test;
import com.sap.core.odata.api.edm.*; import com.sap.core.odata.api.ep.*; import com.sap.core.odata.testutil.mock.*; import java.io.*; import org.junit.*;
[ "com.sap.core", "java.io", "org.junit" ]
com.sap.core; java.io; org.junit;
1,647,863
public static int countCerts(KeyStore ks) { int count = 0; try { for(Enumeration<String> e = ks.aliases(); e.hasMoreElements();) { String alias = e.nextElement(); if (ks.isCertificateEntry(alias)) { info("Found cert " + alias); ...
static int function(KeyStore ks) { int count = 0; try { for(Enumeration<String> e = ks.aliases(); e.hasMoreElements();) { String alias = e.nextElement(); if (ks.isCertificateEntry(alias)) { info(STR + alias); count++; } } } catch (Exception foo) {} return count; }
/** * Count all X509 Certs in a key store * * @return number successfully added * @since 0.8.2, moved from SSLEepGet in 0.9.9 */
Count all X509 Certs in a key store
countCerts
{ "repo_name": "oakes/Nightweb", "path": "common/java/core/net/i2p/crypto/KeyStoreUtil.java", "license": "unlicense", "size": 19644 }
[ "java.security.KeyStore", "java.util.Enumeration" ]
import java.security.KeyStore; import java.util.Enumeration;
import java.security.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
2,157,703
public final MetaProperty<Map<String, String>> attributes() { return _attributes; }
final MetaProperty<Map<String, String>> function() { return _attributes; }
/** * The meta-property for the {@code attributes} property. * @return the meta-property, not null */
The meta-property for the attributes property
attributes
{ "repo_name": "DevStreet/FinanceAnalytics", "path": "projects/OG-Master/src/main/java/com/opengamma/master/security/ManageableSecurity.java", "license": "apache-2.0", "size": 20784 }
[ "java.util.Map", "org.joda.beans.MetaProperty" ]
import java.util.Map; import org.joda.beans.MetaProperty;
import java.util.*; import org.joda.beans.*;
[ "java.util", "org.joda.beans" ]
java.util; org.joda.beans;
328,399
Mask getMask();
Mask getMask();
/** * Returns the mask of this node or null if any. */
Returns the mask of this node or null if any
getMask
{ "repo_name": "shyamalschandra/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/gvt/GraphicsNode.java", "license": "apache-2.0", "size": 13662 }
[ "org.apache.flex.forks.batik.gvt.filter.Mask" ]
import org.apache.flex.forks.batik.gvt.filter.Mask;
import org.apache.flex.forks.batik.gvt.filter.*;
[ "org.apache.flex" ]
org.apache.flex;
387,809
@Nullable public IgniteBiPredicate<ClusterNode, ClusterNode> getBackupFilter() { return backupFilter; }
@Nullable IgniteBiPredicate<ClusterNode, ClusterNode> function() { return backupFilter; }
/** * Gets optional backup filter. If not {@code null}, backups will be selected * from all nodes that pass this filter. First node passed to this filter is primary node, * and second node is a node being tested. * <p> * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is s...
Gets optional backup filter. If not null, backups will be selected from all nodes that pass this filter. First node passed to this filter is primary node, and second node is a node being tested. Note that backupFilter is ignored if excludeNeighbors is set to true
getBackupFilter
{ "repo_name": "agura/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java", "license": "apache-2.0", "size": 36417 }
[ "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.lang.IgniteBiPredicate", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.lang.IgniteBiPredicate; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.cluster.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
1,900,744
public static File createTempDir() throws IOException { File tmp = File.createTempFile("hudson", "tmp"); if(!tmp.delete()) throw new IOException("Failed to delete "+tmp); if(!tmp.mkdirs()) throw new IOException("Failed to create a new directory "+tmp); return ...
static File function() throws IOException { File tmp = File.createTempFile(STR, "tmp"); if(!tmp.delete()) throw new IOException(STR+tmp); if(!tmp.mkdirs()) throw new IOException(STR+tmp); return tmp; } private static final Pattern errorCodeParser = Pattern.compile(STR);
/** * Creates a new temporary directory. */
Creates a new temporary directory
createTempDir
{ "repo_name": "fujibee/hudson", "path": "core/src/main/java/hudson/Util.java", "license": "mit", "size": 33654 }
[ "java.io.File", "java.io.IOException", "java.util.regex.Pattern" ]
import java.io.File; import java.io.IOException; import java.util.regex.Pattern;
import java.io.*; import java.util.regex.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,112,689
private void writeHex(int i) throws IOException { int cursor = 8; do { hex[--cursor] = HEX_DIGITS[i & 0xf]; } while ((i >>>= 4) != 0); socketOut.write(hex, cursor, hex.length - cursor); }
void function(int i) throws IOException { int cursor = 8; do { hex[--cursor] = HEX_DIGITS[i & 0xf]; } while ((i >>>= 4) != 0); socketOut.write(hex, cursor, hex.length - cursor); }
/** * Equivalent to, but cheaper than writing Integer.toHexString().getBytes() * followed by CRLF. */
Equivalent to, but cheaper than writing Integer.toHexString().getBytes() followed by CRLF
writeHex
{ "repo_name": "xdajog/samsung_sources_i927", "path": "libcore/luni/src/main/java/libcore/net/http/ChunkedOutputStream.java", "license": "gpl-2.0", "size": 4779 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
914,441
@Override public void stateChanged(ChangeEvent e) { updateCalendar(); if (!dialogStyle) { fireChangeEvent(); } }
void function(ChangeEvent e) { updateCalendar(); if (!dialogStyle) { fireChangeEvent(); } }
/** * Recieves StateChanges from the MonthPanel and updates the Calendar * * @param e ChangeEvent * * @see * javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent) */
Recieves StateChanges from the MonthPanel and updates the Calendar
stateChanged
{ "repo_name": "altsoft/PlatypusJS", "path": "platypus-js-calendar-widget/src/main/java/de/wannawork/jcalendar/JCalendarPanel.java", "license": "apache-2.0", "size": 24976 }
[ "javax.swing.event.ChangeEvent" ]
import javax.swing.event.ChangeEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
1,022,384
public static CipherOption negotiateCipherOption(Configuration conf, List<CipherOption> options) throws IOException { // Negotiate cipher suites if configured. Currently, the only supported // cipher suite is AES/CTR/NoPadding or SM4/CTR/NoPadding, but the protocol // allows multiple values for fut...
static CipherOption function(Configuration conf, List<CipherOption> options) throws IOException { String cipherSuites = conf.get(DFS_ENCRYPT_DATA_TRANSFER_CIPHER_SUITES_KEY); if (cipherSuites == null cipherSuites.isEmpty()) { return null; } if (!cipherSuites.equals(CipherSuite.AES_CTR_NOPADDING.getName()) && !cipherSui...
/** * Negotiate a cipher option which server supports. * * @param conf the configuration * @param options the cipher options which client supports * @return CipherOption negotiated cipher option */
Negotiate a cipher option which server supports
negotiateCipherOption
{ "repo_name": "mapr/hadoop-common", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java", "license": "apache-2.0", "size": 22893 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.crypto.CipherOption", "org.apache.hadoop.crypto.CipherSuite", "org.apache.hadoop.crypto.CryptoCodec" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.crypto.CipherOption; import org.apache.hadoop.crypto.CipherSuite; import org.apache.hadoop.crypto.CryptoCodec;
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.crypto.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
91,660
@MethodSource("com.azure.messaging.servicebus.IntegrationTestBase#messagingEntityWithSessions") @ParameterizedTest void receiveMessage(MessagingEntityType entityType, boolean isSessionEnabled) throws InterruptedException { // Arrange // The message is locked for this duration at a time. ...
@MethodSource(STR) void receiveMessage(MessagingEntityType entityType, boolean isSessionEnabled) throws InterruptedException { final int lockTimeoutDurationSeconds = 15; final int entityIndex = TestUtils.USE_CASE_PROCESSOR_RECEIVE; final Duration expectedMaxAutoLockRenew = Duration.ofSeconds(35); final String messageId...
/** * Validate that processor receive the message and {@code MaxAutoLockRenewDuration} is set on the * {@link ServiceBusReceiverAsyncClient}. The message lock is released by the client and same message received * again. */
Validate that processor receive the message and MaxAutoLockRenewDuration is set on the <code>ServiceBusReceiverAsyncClient</code>. The message lock is released by the client and same message received again
receiveMessage
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusProcessorClientIntegrationTest.java", "license": "mit", "size": 10471 }
[ "com.azure.core.amqp.AmqpRetryOptions", "com.azure.messaging.servicebus.implementation.MessagingEntityType", "java.time.Duration", "java.time.OffsetTime", "java.util.UUID", "java.util.concurrent.CountDownLatch", "java.util.concurrent.TimeUnit", "java.util.concurrent.atomic.AtomicReference", "org.jun...
import com.azure.core.amqp.AmqpRetryOptions; import com.azure.messaging.servicebus.implementation.MessagingEntityType; import java.time.Duration; import java.time.OffsetTime; import java.util.UUID; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.Atomi...
import com.azure.core.amqp.*; import com.azure.messaging.servicebus.implementation.*; import java.time.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.junit.jupiter.api.*; import org.junit.jupiter.params.provider.*;
[ "com.azure.core", "com.azure.messaging", "java.time", "java.util", "org.junit.jupiter" ]
com.azure.core; com.azure.messaging; java.time; java.util; org.junit.jupiter;
849,347
private static int getAudioObjectType(ParsableBitArray bitArray) { int audioObjectType = bitArray.readBits(5); if (audioObjectType == AUDIO_OBJECT_TYPE_ESCAPE) { audioObjectType = 32 + bitArray.readBits(6); } return audioObjectType; }
static int function(ParsableBitArray bitArray) { int audioObjectType = bitArray.readBits(5); if (audioObjectType == AUDIO_OBJECT_TYPE_ESCAPE) { audioObjectType = 32 + bitArray.readBits(6); } return audioObjectType; }
/** * Returns the AAC audio object type as specified in 14496-3 (2005) Table 1.14. * * @param bitArray The bit array containing the audio specific configuration. * @return The audio object type. */
Returns the AAC audio object type as specified in 14496-3 (2005) Table 1.14
getAudioObjectType
{ "repo_name": "amzn/exoplayer-amazon-port", "path": "library/common/src/main/java/com/google/android/exoplayer2/audio/AacUtil.java", "license": "apache-2.0", "size": 15486 }
[ "com.google.android.exoplayer2.util.ParsableBitArray" ]
import com.google.android.exoplayer2.util.ParsableBitArray;
import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
578,997
private void failWithError(short alertLevel, short alertDescription) throws IOException { if(!closed) { this.closed = true; if(alertLevel == AlertLevel.fatal) { this.failedWithError = true; } sendAlert(alertLevel, alertDescription); rs.close(); if...
void function(short alertLevel, short alertDescription) throws IOException { if(!closed) { this.closed = true; if(alertLevel == AlertLevel.fatal) { this.failedWithError = true; } sendAlert(alertLevel, alertDescription); rs.close(); if(alertLevel == AlertLevel.fatal) { throw new IOException(TLS_ERROR_MESSAGE); } } else ...
/** * Terminate this connection with an alert. * <p/> * Can be used for normal closure too. * * @param alertLevel The level of the alert, an be AlertLevel.fatal or AL_warning. * @param alertDescription The exact alert message. * @throws IOException If alert was fatal. */
Terminate this connection with an alert. Can be used for normal closure too
failWithError
{ "repo_name": "SafetyCulture/DroidText", "path": "app/src/main/java/bouncycastle/repack/org/bouncycastle/crypto/tls/TlsProtocolHandler.java", "license": "lgpl-3.0", "size": 36743 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,927,132
@Test public void chatFoundWithSameThreadBaseJid() { Chat outgoing = cm.createChat("you@testserver", null); Stanza incomingChat = createChatPacket(outgoing.getThreadID(), false); processServerMessage(incomingChat); Chat newChat = listener.getNewChat(); assertNotNull(new...
void function() { Chat outgoing = cm.createChat(STR, null); Stanza incomingChat = createChatPacket(outgoing.getThreadID(), false); processServerMessage(incomingChat); Chat newChat = listener.getNewChat(); assertNotNull(newChat); assertTrue(newChat == outgoing); }
/** * Confirm that an existing chat created with a base jid is matched to an incoming chat message that has the same id * and the user is a base jid. */
Confirm that an existing chat created with a base jid is matched to an incoming chat message that has the same id and the user is a base jid
chatFoundWithSameThreadBaseJid
{ "repo_name": "TTalkIM/Smack", "path": "smack-im/src/test/java/org/jivesoftware/smack/chat/ChatConnectionTest.java", "license": "apache-2.0", "size": 13833 }
[ "org.jivesoftware.smack.packet.Stanza", "org.junit.Assert" ]
import org.jivesoftware.smack.packet.Stanza; import org.junit.Assert;
import org.jivesoftware.smack.packet.*; import org.junit.*;
[ "org.jivesoftware.smack", "org.junit" ]
org.jivesoftware.smack; org.junit;
911,520
public OrganizationDetails withAdminDetails(List<AdministratorDetails> adminDetails) { this.adminDetails = adminDetails; return this; }
OrganizationDetails function(List<AdministratorDetails> adminDetails) { this.adminDetails = adminDetails; return this; }
/** * Set the adminDetails value. * * @param adminDetails the adminDetails value to set * @return the OrganizationDetails object itself. */
Set the adminDetails value
withAdminDetails
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/OrganizationDetails.java", "license": "mit", "size": 1683 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
834,480
public void addSelectionChangedListener(ISelectionChangedListener listener) { selectionChangedListeners.add(listener); }
void function(ISelectionChangedListener listener) { selectionChangedListeners.add(listener); }
/** * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This implements <code>org.eclipse.jface.viewers.ISelectionProvider</code>.
addSelectionChangedListener
{ "repo_name": "patrickneubauer/XMLIntellEdit", "path": "xmlintelledit/classes.editor/src/org_eclipse_smarthome_schemas_thing_description_v1__0Simplified/presentation/org_eclipse_smarthome_schemas_thing_description_v1__0SimplifiedEditor.java", "license": "mit", "size": 55507 }
[ "org.eclipse.jface.viewers.ISelectionChangedListener" ]
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,880,289
@Test(expected = IllegalArgumentException.class) public void testInvalidValueOfArrayInvalidOffsetIPv6() { IpAddress ipAddress; byte[] value; value = new byte[] {11, 22, 33, // Preamble 0x11, 0x11, 0x22, 0x22, 0x33, ...
@Test(expected = IllegalArgumentException.class) void function() { IpAddress ipAddress; byte[] value; value = new byte[] {11, 22, 33, 0x11, 0x11, 0x22, 0x22, 0x33, 0x33, 0x44, 0x44, 0x55, 0x55, 0x66, 0x66, 0x77, 0x77, (byte) 0x88, (byte) 0x88, 44, 55}; ipAddress = IpAddress.valueOf(IpAddress.Version.INET6, value, 6); }
/** * Tests invalid valueOf() converger for an array and an invalid offset * for IPv6. */
Tests invalid valueOf() converger for an array and an invalid offset for IPv6
testInvalidValueOfArrayInvalidOffsetIPv6
{ "repo_name": "sonu283304/onos", "path": "utils/misc/src/test/java/org/onlab/packet/IpAddressTest.java", "license": "apache-2.0", "size": 33304 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,803,233
private BlockingDataflowRunner createMockRunner(DataflowPipelineJob job) throws Exception { DataflowRunner mockRunner = mock(DataflowRunner.class); TestDataflowPipelineOptions options = PipelineOptionsFactory.as(TestDataflowPipelineOptions.class); options.setRunner(BlockingDataflowRunner.cla...
BlockingDataflowRunner function(DataflowPipelineJob job) throws Exception { DataflowRunner mockRunner = mock(DataflowRunner.class); TestDataflowPipelineOptions options = PipelineOptionsFactory.as(TestDataflowPipelineOptions.class); options.setRunner(BlockingDataflowRunner.class); options.setProject(job.getProjectId());...
/** * Returns a {@link BlockingDataflowRunner} that will return the provided a job to return. * Some {@link PipelineOptions} will be extracted from the job, such as the project ID. */
Returns a <code>BlockingDataflowRunner</code> that will return the provided a job to return. Some <code>PipelineOptions</code> will be extracted from the job, such as the project ID
createMockRunner
{ "repo_name": "tweise/beam", "path": "runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/BlockingDataflowRunnerTest.java", "license": "apache-2.0", "size": 11534 }
[ "org.apache.beam.runners.dataflow.testing.TestDataflowPipelineOptions", "org.apache.beam.sdk.Pipeline", "org.apache.beam.sdk.options.PipelineOptionsFactory", "org.mockito.Mockito" ]
import org.apache.beam.runners.dataflow.testing.TestDataflowPipelineOptions; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.options.PipelineOptionsFactory; import org.mockito.Mockito;
import org.apache.beam.runners.dataflow.testing.*; import org.apache.beam.sdk.*; import org.apache.beam.sdk.options.*; import org.mockito.*;
[ "org.apache.beam", "org.mockito" ]
org.apache.beam; org.mockito;
1,326,688
public void externalEntityDecl(String name, XMLResourceIdentifier identifier, Augmentations augs) throws XNIException { int entityIndex = getEntityDeclIndex(name); if( entityIndex == -1){ entityIndex = createEntityDec...
void function(String name, XMLResourceIdentifier identifier, Augmentations augs) throws XNIException { int entityIndex = getEntityDeclIndex(name); if( entityIndex == -1){ entityIndex = createEntityDecl(); boolean isPE = name.startsWith("%"); boolean inExternal = (fReadingExternalDTD fPEDepth > 0); XMLEntityDecl entityD...
/** * An external entity declaration. * * @param name The name of the entity. Parameter entity names start * with '%', whereas the name of a general entity is just * the entity name. * @param identifier An object containing all location information ...
An external entity declaration
externalEntityDecl
{ "repo_name": "jimma/xerces", "path": "src/org/apache/xerces/impl/dtd/DTDGrammar.java", "license": "apache-2.0", "size": 109011 }
[ "org.apache.xerces.xni.Augmentations", "org.apache.xerces.xni.XMLResourceIdentifier", "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.XMLResourceIdentifier; import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
1,418,383
@Test public void clientClosesClientInputStreamIfOutputStreamIsClosed() throws Exception { // write the mocking script peer.acceptFrame(); // SYN_STREAM peer.acceptFrame(); // DATA peer.acceptFrame(); // DATA with FLAG_FIN peer.acceptFrame(); // RST_STREAM peer.play(); // play it back ...
@Test void function() throws Exception { peer.acceptFrame(); peer.acceptFrame(); peer.acceptFrame(); peer.acceptFrame(); peer.play(); Http2Connection connection = connection(peer); Http2Stream stream = connection.newStream(headerEntries("a", STR), true); Source source = stream.getSource(); BufferedSink out = Okio.buffe...
/** * Test that the client doesn't send a RST_STREAM if doing so will disrupt the output stream. */
Test that the client doesn't send a RST_STREAM if doing so will disrupt the output stream
clientClosesClientInputStreamIfOutputStreamIsClosed
{ "repo_name": "zmarkan/okhttp", "path": "okhttp-tests/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.java", "license": "apache-2.0", "size": 59989 }
[ "java.io.IOException", "java.util.Arrays", "org.junit.Assert", "org.junit.Test" ]
import java.io.IOException; import java.util.Arrays; import org.junit.Assert; import org.junit.Test;
import java.io.*; import java.util.*; import org.junit.*;
[ "java.io", "java.util", "org.junit" ]
java.io; java.util; org.junit;
297,942
public void addLongClickView(@NonNull View view, int position) { initialiseGestureListener(view, position); }
void function(@NonNull View view, int position) { initialiseGestureListener(view, position); }
/** * Adds a view to receive long click and touch events * * @param view view to receive events * @param position add position of view if in a list, this will be returned in the general action listener * and drag to action listener. */
Adds a view to receive long click and touch events
addLongClickView
{ "repo_name": "anuj7sharma/SampleBoard", "path": "peeknpop/src/main/java/com/peekandpop/shalskar/peekandpop/PeekAndPop.java", "license": "mit", "size": 31780 }
[ "android.support.annotation.NonNull", "android.view.View" ]
import android.support.annotation.NonNull; import android.view.View;
import android.support.annotation.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
809,227
LOG.info(() -> String.format("CORS Allowed Origins: %s", allowedOrigin)); final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.addAllowedOrigin(allowedOrigin); con...
LOG.info(() -> String.format(STR, allowedOrigin)); final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); final CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); config.addAllowedOrigin(allowedOrigin); config.addAllowedHeader("*"); config.addAllowedMeth...
/** * Creates the CORS filter. * * @return the CORS filter. */
Creates the CORS filter
corsFilter
{ "repo_name": "gazbert/BX-bot", "path": "bxbot-rest-api/src/main/java/com/gazbert/bxbot/rest/api/security/config/RestCorsConfig.java", "license": "mit", "size": 2818 }
[ "org.springframework.web.cors.CorsConfiguration", "org.springframework.web.cors.UrlBasedCorsConfigurationSource", "org.springframework.web.filter.CorsFilter" ]
import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter;
import org.springframework.web.cors.*; import org.springframework.web.filter.*;
[ "org.springframework.web" ]
org.springframework.web;
2,283,491
protected Person getWorkflowPessimisticLockOwnerUser() { String networkId = KRADConstants.SYSTEM_USER; return getPersonService().getPersonByPrincipalName(networkId); }
Person function() { String networkId = KRADConstants.SYSTEM_USER; return getPersonService().getPersonByPrincipalName(networkId); }
/** * This method identifies the user that should be used to create and clear {@link PessimisticLock} objects required by * Workflow.<br> * <br> * The default is the Kuali system user defined by {@link RiceConstants#SYSTEM_USER}. This method can be overriden by * implementing documents if anoth...
This method identifies the user that should be used to create and clear <code>PessimisticLock</code> objects required by Workflow. The default is the Kuali system user defined by <code>RiceConstants#SYSTEM_USER</code>. This method can be overriden by implementing documents if another user is needed
getWorkflowPessimisticLockOwnerUser
{ "repo_name": "sbower/kuali-rice-1", "path": "impl/src/main/java/org/kuali/rice/krad/service/impl/PessimisticLockServiceImpl.java", "license": "apache-2.0", "size": 24380 }
[ "org.kuali.rice.kim.api.identity.Person", "org.kuali.rice.krad.util.KRADConstants" ]
import org.kuali.rice.kim.api.identity.Person; import org.kuali.rice.krad.util.KRADConstants;
import org.kuali.rice.kim.api.identity.*; import org.kuali.rice.krad.util.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,872,687
String getUniqueFileName(CmsObject cms, String parentFolder, String baseName);
String getUniqueFileName(CmsObject cms, String parentFolder, String baseName);
/** * Returns a unique filename for the given base name and the parent folder.<p> * * @param cms the current OpenCms user context * @param parentFolder the parent folder of the file * @param baseName the proposed file name * * @return the unique file name */
Returns a unique filename for the given base name and the parent folder
getUniqueFileName
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/loader/I_CmsFileNameGenerator.java", "license": "lgpl-2.1", "size": 5057 }
[ "org.opencms.file.CmsObject" ]
import org.opencms.file.CmsObject;
import org.opencms.file.*;
[ "org.opencms.file" ]
org.opencms.file;
466,909
public default boolean none(Predicate<? super T> predicate) { return stream().noneMatch(predicate); }
default boolean function(Predicate<? super T> predicate) { return stream().noneMatch(predicate); }
/** * Returns <code>true</code>, if the <code>predicate</code> provided returns <code>true</code> for none of the elements. */
Returns <code>true</code>, if the <code>predicate</code> provided returns <code>true</code> for none of the elements
none
{ "repo_name": "codebulb/LambdaOmega", "path": "src/main/java/ch/codebulb/lambdaomega/abstractions/SequentialIFunctions.java", "license": "bsd-3-clause", "size": 10176 }
[ "java.util.function.Predicate" ]
import java.util.function.Predicate;
import java.util.function.*;
[ "java.util" ]
java.util;
2,086,876
public void setRemoveActionHelper(final RemoveActionHelper removeActionHelper) { this.removeActionHelper = removeActionHelper; }
void function(final RemoveActionHelper removeActionHelper) { this.removeActionHelper = removeActionHelper; }
/** * DOCUMENT ME! * * @param removeActionHelper DOCUMENT M */
DOCUMENT ME
setRemoveActionHelper
{ "repo_name": "cismet/lagis-client", "path": "src/main/java/de/cismet/lagis/gui/panels/BaumTable.java", "license": "gpl-3.0", "size": 1656 }
[ "de.cismet.lagis.gui.tables.RemoveActionHelper" ]
import de.cismet.lagis.gui.tables.RemoveActionHelper;
import de.cismet.lagis.gui.tables.*;
[ "de.cismet.lagis" ]
de.cismet.lagis;
288,361
void handlePacket(byte[] packetData) { if (!this.enabled) { return; } Log.d(TAG, "handlePacket: Received packet of length " + packetData.length); this.lastPacketReceived = System.currentTimeMillis(); }
void handlePacket(byte[] packetData) { if (!this.enabled) { return; } Log.d(TAG, STR + packetData.length); this.lastPacketReceived = System.currentTimeMillis(); }
/** * Handles an incoming packet on a device. * * @param packetData The data of the packet */
Handles an incoming packet on a device
handlePacket
{ "repo_name": "Free-Software-for-Android/AdAway", "path": "app/src/main/java/org/adaway/vpn/VpnWatchdog.java", "license": "gpl-3.0", "size": 6122 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,895,319
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); }...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String expressRouteGatewayName, String connectionName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (expressRouteGatewayName == null) { throw new IllegalArgumentException(STR); } if (connectionName == null) { throw ...
/** * Deletes a connection to a ExpressRoute circuit. * * @param resourceGroupName The name of the resource group. * @param expressRouteGatewayName The name of the ExpressRoute gateway. * @param connectionName The name of the connection subresource. * @throws IllegalArgumentException throw...
Deletes a connection to a ExpressRoute circuit
deleteWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteConnectionsInner.java", "license": "mit", "size": 39006 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
669,451
public Object execute(final Map<Object, Object> iArgs) { if (clusterName == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); final OCluster cluster = getDatabase().getStorage().getClusterByName(clusterName); final long recs = cluste...
Object function(final Map<Object, Object> iArgs) { if (clusterName == null) throw new OCommandExecutionException(STR); final OCluster cluster = getDatabase().getStorage().getClusterByName(clusterName); final long recs = cluster.getEntries(); try { cluster.truncate(); } catch (IOException e) { throw new OCommandExecutio...
/** * Execute the command. */
Execute the command
execute
{ "repo_name": "jdillon/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLTruncateCluster.java", "license": "apache-2.0", "size": 3702 }
[ "com.orientechnologies.orient.core.exception.OCommandExecutionException", "com.orientechnologies.orient.core.storage.OCluster", "java.io.IOException", "java.util.Map" ]
import com.orientechnologies.orient.core.exception.OCommandExecutionException; import com.orientechnologies.orient.core.storage.OCluster; import java.io.IOException; import java.util.Map;
import com.orientechnologies.orient.core.exception.*; import com.orientechnologies.orient.core.storage.*; import java.io.*; import java.util.*;
[ "com.orientechnologies.orient", "java.io", "java.util" ]
com.orientechnologies.orient; java.io; java.util;
928,708
@Test public void testIsHolidayByDateCurrency() { assertTrue(SOURCE.isHoliday(LocalDate.of(2018, 9, 7), Currency.AUD)); assertFalse(SOURCE.isHoliday(LocalDate.of(2018, 9, 7), Currency.BRL)); }
void function() { assertTrue(SOURCE.isHoliday(LocalDate.of(2018, 9, 7), Currency.AUD)); assertFalse(SOURCE.isHoliday(LocalDate.of(2018, 9, 7), Currency.BRL)); }
/** * Tests whether a date is a holiday. */
Tests whether a date is a holiday
testIsHolidayByDateCurrency
{ "repo_name": "McLeodMoores/starling", "path": "projects/core/src/test/java/com/opengamma/core/holiday/impl/SchemeAlteringHolidaySourceTest.java", "license": "apache-2.0", "size": 8227 }
[ "com.opengamma.util.money.Currency", "org.testng.Assert", "org.threeten.bp.LocalDate" ]
import com.opengamma.util.money.Currency; import org.testng.Assert; import org.threeten.bp.LocalDate;
import com.opengamma.util.money.*; import org.testng.*; import org.threeten.bp.*;
[ "com.opengamma.util", "org.testng", "org.threeten.bp" ]
com.opengamma.util; org.testng; org.threeten.bp;
1,288,772
public void write(final OutputStream stream, final int disk) throws IOException { MsqHeader header; HuffmanOutputStream huffmanStream; HuffmanTree tree; int size; byte[] bytes; // Calculate the size of the tileset size = 0; for (final Pic tile: th...
void function(final OutputStream stream, final int disk) throws IOException { MsqHeader header; HuffmanOutputStream huffmanStream; HuffmanTree tree; int size; byte[] bytes; size = 0; for (final Pic tile: this.tiles) { size += tile.getWidth() * tile.getHeight() / 2; } header = new MsqHeader(MsqType.Compressed, disk, siz...
/** * Writes a HTDS tileset to a stream. * * @param stream * The output stream * @param disk * The disk index * @throws IOException * When file operation fails. */
Writes a HTDS tileset to a stream
write
{ "repo_name": "delMar43/wlandsuite", "path": "src/main/java/de/ailis/wlandsuite/htds/HtdsTileset.java", "license": "mit", "size": 9433 }
[ "de.ailis.wlandsuite.huffman.HuffmanOutputStream", "de.ailis.wlandsuite.huffman.HuffmanTree", "de.ailis.wlandsuite.msq.MsqHeader", "de.ailis.wlandsuite.msq.MsqType", "de.ailis.wlandsuite.pic.Pic", "java.io.IOException", "java.io.OutputStream" ]
import de.ailis.wlandsuite.huffman.HuffmanOutputStream; import de.ailis.wlandsuite.huffman.HuffmanTree; import de.ailis.wlandsuite.msq.MsqHeader; import de.ailis.wlandsuite.msq.MsqType; import de.ailis.wlandsuite.pic.Pic; import java.io.IOException; import java.io.OutputStream;
import de.ailis.wlandsuite.huffman.*; import de.ailis.wlandsuite.msq.*; import de.ailis.wlandsuite.pic.*; import java.io.*;
[ "de.ailis.wlandsuite", "java.io" ]
de.ailis.wlandsuite; java.io;
2,208,703
private JMenuBar createMenuBar() { TaskBar tb = ImporterAgent.getRegistry().getTaskBar(); JMenuBar bar = tb.getTaskBarMenuBar(); if (!model.isMaster()) return bar; JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMen...
JMenuBar function() { TaskBar tb = ImporterAgent.getRegistry().getTaskBar(); JMenuBar bar = tb.getTaskBarMenuBar(); if (!model.isMaster()) return bar; JMenu[] existingMenus = new JMenu[bar.getMenuCount()]; for (int i = 0; i < existingMenus.length; i++) { existingMenus[i] = bar.getMenu(i); } bar.removeAll(); bar.add(cre...
/** * Creates the menu bar. * * @return The menu bar. */
Creates the menu bar
createMenuBar
{ "repo_name": "emilroz/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/view/ImporterUI.java", "license": "gpl-2.0", "size": 21244 }
[ "javax.swing.JMenu", "javax.swing.JMenuBar", "org.openmicroscopy.shoola.agents.fsimporter.ImporterAgent", "org.openmicroscopy.shoola.env.ui.TaskBar" ]
import javax.swing.JMenu; import javax.swing.JMenuBar; import org.openmicroscopy.shoola.agents.fsimporter.ImporterAgent; import org.openmicroscopy.shoola.env.ui.TaskBar;
import javax.swing.*; import org.openmicroscopy.shoola.agents.fsimporter.*; import org.openmicroscopy.shoola.env.ui.*;
[ "javax.swing", "org.openmicroscopy.shoola" ]
javax.swing; org.openmicroscopy.shoola;
1,681,955
public void drawScreen(int mouseX, int mouseY, float partialTicks) { if (this.loadingAchievements) { this.drawDefaultBackground(); this.drawCenteredString(this.fontRendererObj, I18n.format("multiplayer.downloadingStats", new Object[0]), this.width / 2, this.height / 2, 16...
void function(int mouseX, int mouseY, float partialTicks) { if (this.loadingAchievements) { this.drawDefaultBackground(); this.drawCenteredString(this.fontRendererObj, I18n.format(STR, new Object[0]), this.width / 2, this.height / 2, 16777215); this.drawCenteredString(this.fontRendererObj, lanSearchStates[(int)(Minecra...
/** * Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */
Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
drawScreen
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/client/gui/achievement/GuiAchievements.java", "license": "mit", "size": 22906 }
[ "net.minecraft.client.Minecraft", "net.minecraft.client.renderer.GlStateManager", "net.minecraft.client.resources.I18n", "net.minecraft.util.MathHelper", "org.lwjgl.input.Mouse" ]
import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.resources.I18n; import net.minecraft.util.MathHelper; import org.lwjgl.input.Mouse;
import net.minecraft.client.*; import net.minecraft.client.renderer.*; import net.minecraft.client.resources.*; import net.minecraft.util.*; import org.lwjgl.input.*;
[ "net.minecraft.client", "net.minecraft.util", "org.lwjgl.input" ]
net.minecraft.client; net.minecraft.util; org.lwjgl.input;
2,856,164
public ComputeNodeType addComputeNode(String name, List<ProcessorType> processors, List<AdaptorType> adaptors) throws InvalidElementException { AdaptorsListType adaptorsList = new AdaptorsListType(); if (adaptors != null) { for (AdaptorType a : adaptors) { adaptor...
ComputeNodeType function(String name, List<ProcessorType> processors, List<AdaptorType> adaptors) throws InvalidElementException { AdaptorsListType adaptorsList = new AdaptorsListType(); if (adaptors != null) { for (AdaptorType a : adaptors) { adaptorsList.getAdaptor().add(a); } } return this.addComputeNode(name, proce...
/** * Adds a new ComputeNode with the given information and returns the instance of the new ComputeNode. * * @param name Compute node name * @param processors List of processors * @param adaptors List of adaptors * @return Added compute node * @throws InvalidElementException Error inv...
Adds a new ComputeNode with the given information and returns the instance of the new ComputeNode
addComputeNode
{ "repo_name": "mF2C/COMPSs", "path": "compss/runtime/config/xml/resources/src/main/java/es/bsc/compss/types/resources/ResourcesFile.java", "license": "apache-2.0", "size": 130588 }
[ "es.bsc.compss.types.resources.exceptions.InvalidElementException", "es.bsc.compss.types.resources.jaxb.AdaptorType", "es.bsc.compss.types.resources.jaxb.AdaptorsListType", "es.bsc.compss.types.resources.jaxb.AttachedDisksListType", "es.bsc.compss.types.resources.jaxb.ComputeNodeType", "es.bsc.compss.type...
import es.bsc.compss.types.resources.exceptions.InvalidElementException; import es.bsc.compss.types.resources.jaxb.AdaptorType; import es.bsc.compss.types.resources.jaxb.AdaptorsListType; import es.bsc.compss.types.resources.jaxb.AttachedDisksListType; import es.bsc.compss.types.resources.jaxb.ComputeNodeType; import e...
import es.bsc.compss.types.resources.exceptions.*; import es.bsc.compss.types.resources.jaxb.*; import java.util.*;
[ "es.bsc.compss", "java.util" ]
es.bsc.compss; java.util;
56,455
@Predicate(name = "stdlib_string_matches_regex") public static boolean stringMatchesRegex(String str, String regex) { return str.matches(regex); }
@Predicate(name = STR) static boolean function(String str, String regex) { return str.matches(regex); }
/** * Checks whether the given string matches the given regex. */
Checks whether the given string matches the given regex
stringMatchesRegex
{ "repo_name": "AntoniusW/Alpha", "path": "src/main/java/at/ac/tuwien/kr/alpha/api/externals/stdlib/AspStandardLibrary.java", "license": "bsd-2-clause", "size": 9342 }
[ "at.ac.tuwien.kr.alpha.api.externals.Predicate" ]
import at.ac.tuwien.kr.alpha.api.externals.Predicate;
import at.ac.tuwien.kr.alpha.api.externals.*;
[ "at.ac.tuwien" ]
at.ac.tuwien;
1,196,627
protected void setSelectedApnKey(String key) { mSelectedKey = key; ContentResolver resolver = getContentResolver(); ContentValues values = new ContentValues(); values.put(APN_ID, mSelectedKey); resolver.update(mRestoreCarrierUri, values, null, null); }
void function(String key) { mSelectedKey = key; ContentResolver resolver = getContentResolver(); ContentValues values = new ContentValues(); values.put(APN_ID, mSelectedKey); resolver.update(mRestoreCarrierUri, values, null, null); }
/** For inheritence. */
For inheritence
setSelectedApnKey
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Settings/src/com/android/settings/ApnSettings.java", "license": "gpl-2.0", "size": 33210 }
[ "android.content.ContentResolver", "android.content.ContentValues" ]
import android.content.ContentResolver; import android.content.ContentValues;
import android.content.*;
[ "android.content" ]
android.content;
2,735,667
@Secured(action = ActionTypes.READ) @GetMapping("/services") public Object listDetail(@RequestParam(required = false) boolean withInstances, @RequestParam(defaultValue = Constants.DEFAULT_NAMESPACE_ID) String namespaceId, @RequestParam(required = false) int pageNo, @RequestParam(requ...
@Secured(action = ActionTypes.READ) @GetMapping(STR) Object function(@RequestParam(required = false) boolean withInstances, @RequestParam(defaultValue = Constants.DEFAULT_NAMESPACE_ID) String namespaceId, @RequestParam(required = false) int pageNo, @RequestParam(required = false) int pageSize, @RequestParam(name = STR,...
/** * List service detail information. * * @param withInstances whether return instances * @param namespaceId namespace id * @param pageNo number of page * @param pageSize size of each page * @param serviceName service name * @param groupName ...
List service detail information
listDetail
{ "repo_name": "alibaba/nacos", "path": "naming/src/main/java/com/alibaba/nacos/naming/controllers/CatalogController.java", "license": "apache-2.0", "size": 8215 }
[ "com.alibaba.nacos.api.common.Constants", "com.alibaba.nacos.api.exception.NacosException", "com.alibaba.nacos.auth.annotation.Secured", "com.alibaba.nacos.common.utils.StringUtils", "com.alibaba.nacos.plugin.auth.constant.ActionTypes", "org.springframework.web.bind.annotation.GetMapping", "org.springfr...
import com.alibaba.nacos.api.common.Constants; import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.auth.annotation.Secured; import com.alibaba.nacos.common.utils.StringUtils; import com.alibaba.nacos.plugin.auth.constant.ActionTypes; import org.springframework.web.bind.annotation.GetMapping;...
import com.alibaba.nacos.api.common.*; import com.alibaba.nacos.api.exception.*; import com.alibaba.nacos.auth.annotation.*; import com.alibaba.nacos.common.utils.*; import com.alibaba.nacos.plugin.auth.constant.*; import org.springframework.web.bind.annotation.*;
[ "com.alibaba.nacos", "org.springframework.web" ]
com.alibaba.nacos; org.springframework.web;
33,510
private void showEnvValues(boolean showAll) { out.println(); out.print(i18n.getString("adt.envList.title")); SortedSet ss = new TreeSet(); for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) { String key = (String)(e.nextElement()); ss.add(key); ...
void function(boolean showAll) { out.println(); out.print(i18n.getString(STR)); SortedSet ss = new TreeSet(); for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) { String key = (String)(e.nextElement()); ss.add(key); } for (Iterator iter = ss.iterator(); iter.hasNext(); ) { String key = (String) (iter.next());...
/** * Print out a listing of some or all of the env values used by the tests. * @param showAll show all environment values (uniquely and multiply defined.) * The default is to just show the multiple defined values. */
Print out a listing of some or all of the env values used by the tests
showEnvValues
{ "repo_name": "otmarjr/jtreg-fork", "path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/audit/Audit.java", "license": "gpl-2.0", "size": 27296 }
[ "java.util.Enumeration", "java.util.Iterator", "java.util.SortedSet", "java.util.TreeSet", "java.util.Vector" ]
import java.util.Enumeration; import java.util.Iterator; import java.util.SortedSet; import java.util.TreeSet; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,599,561
public void set(String name, int index, Object value) { Object prop = dynaValues.get(name); if (prop == null) { throw new NullPointerException ("No indexed value for '" + name + "[" + index + "]'"); } else if (prop.getClass().isArray()) { Array.set(pr...
void function(String name, int index, Object value) { Object prop = dynaValues.get(name); if (prop == null) { throw new NullPointerException (STR + name + "[" + index + "]'"); } else if (prop.getClass().isArray()) { Array.set(prop, index, value); } else if (prop instanceof List) { try { ((List) prop).set(index, value);...
/** * <p>Set the value of an indexed property with the specified name.</p> * * @param name Name of the property whose value is to be set * @param index Index of the property to be set * @param value Value to which this property is to be set * * @exception ConversionException if the sp...
Set the value of an indexed property with the specified name
set
{ "repo_name": "codelibs/cl-struts", "path": "src/share/org/apache/struts/action/DynaActionForm.java", "license": "apache-2.0", "size": 21363 }
[ "java.lang.reflect.Array", "java.util.List", "org.apache.commons.beanutils.ConversionException" ]
import java.lang.reflect.Array; import java.util.List; import org.apache.commons.beanutils.ConversionException;
import java.lang.reflect.*; import java.util.*; import org.apache.commons.beanutils.*;
[ "java.lang", "java.util", "org.apache.commons" ]
java.lang; java.util; org.apache.commons;
1,545,496
private VOOTMember[] createVOOTMembers(List<Member> members, Group group) throws VOOTException{ VOOTMember[] vootMembers = new VOOTMember[members.size()]; int i=0; for(Member member : members){ User userOfMember = new User(); try{ userOfMember = perun.getUsersManagerBl().getUserByMember(session,...
VOOTMember[] function(List<Member> members, Group group) throws VOOTException{ VOOTMember[] vootMembers = new VOOTMember[members.size()]; int i=0; for(Member member : members){ User userOfMember = new User(); try{ userOfMember = perun.getUsersManagerBl().getUserByMember(session, member); }catch(InternalErrorException e...
/** * This method creates members used by VOOT, that are represented to end-user. They are created from members by provider and membership role * is set by relationship of member and specific group. * * @param members members by provider * @param group specific group * @return ...
This method creates members used by VOOT, that are represented to end-user. They are created from members by provider and membership role is set by relationship of member and specific group
createVOOTMembers
{ "repo_name": "stavamichal/perun", "path": "perun-voot/src/main/java/cz/metacentrum/perun/voot/VOOT.java", "license": "bsd-2-clause", "size": 32537 }
[ "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.Member", "cz.metacentrum.perun.core.api.User", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "java.util.List" ]
import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
2,507,820
private static void copy(InputStream in, OutputStream out) throws IOException { // Do not allow other threads to intrude on streams during copy. synchronized (in) { synchronized (out) { byte[] buffer = new byte[256]; while (true) { int bytesRead = in.read(buffer); if (bytesRead == -1) ...
static void function(InputStream in, OutputStream out) throws IOException { synchronized (in) { synchronized (out) { byte[] buffer = new byte[256]; while (true) { int bytesRead = in.read(buffer); if (bytesRead == -1) break; out.write(buffer, 0, bytesRead); } } } } private File file; private Document document; private M...
/** * Copies data from an input stream to an output stream * * @param in * the stream to copy data from. * @param out * the stream to copy data to. * @throws IOException * if there's trouble during the copy. */
Copies data from an input stream to an output stream
copy
{ "repo_name": "andang72/architecture-ee", "path": "src/main/java/architecture/ee/util/xml/XmlProperties.java", "license": "apache-2.0", "size": 22660 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.io.OutputStream", "java.io.Reader", "java.nio.charset.StandardCharsets", "java.util.HashMap", "java.util.Map", ...
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Reader; import java.nio.charset.StandardCharsets; import java.ut...
import java.io.*; import java.nio.charset.*; import java.util.*; import org.dom4j.*;
[ "java.io", "java.nio", "java.util", "org.dom4j" ]
java.io; java.nio; java.util; org.dom4j;
1,691,785
public void showTreeInSeperateWindow() { JFrame frame = new JFrame(forest.getMetaxml().getProjectName()); frame.getContentPane().add(graphComponent); frame.setSize(500, 500); // frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setVisible(true); }
void function() { JFrame frame = new JFrame(forest.getMetaxml().getProjectName()); frame.getContentPane().add(graphComponent); frame.setSize(500, 500); frame.setVisible(true); }
/** * Shows the phylogeny tree in separate Window. * */
Shows the phylogeny tree in separate Window
showTreeInSeperateWindow
{ "repo_name": "modsim/vizardous", "path": "src/main/java/vizardous/delegate/MyPopUpMenu.java", "license": "gpl-3.0", "size": 17919 }
[ "javax.swing.JFrame" ]
import javax.swing.JFrame;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,090,508
if (_initNFSExports) { return; } final String exporttable = System.getProperty(NFS_EXPORTS_PROPERTY); if (exporttable != null) { final String[] exportTableEntries = exporttable.split(NFS_EXPORTS_SEPARATOR); final ListExporter exporter = new ListExporter...
if (_initNFSExports) { return; } final String exporttable = System.getProperty(NFS_EXPORTS_PROPERTY); if (exporttable != null) { final String[] exportTableEntries = exporttable.split(NFS_EXPORTS_SEPARATOR); final ListExporter exporter = new ListExporter(); for (String entry : exportTableEntries) { final String[] localE...
/**Initializes the NFS Exports. * */
Initializes the NFS Exports
initNFSExports
{ "repo_name": "SnakeDoc/GuestVM", "path": "guestvm~guestvm/com.oracle.max.ve/src/com/sun/max/ve/fs/nfs/NFSExports.java", "license": "bsd-3-clause", "size": 5673 }
[ "java.io.File", "org.openthinclient.mountd.ListExporter", "org.openthinclient.mountd.NFSExport" ]
import java.io.File; import org.openthinclient.mountd.ListExporter; import org.openthinclient.mountd.NFSExport;
import java.io.*; import org.openthinclient.mountd.*;
[ "java.io", "org.openthinclient.mountd" ]
java.io; org.openthinclient.mountd;
452,823
public DataOperationResult<AchievementUser> save(final AchievementUser achievementUser) throws DataOperationException { boolean create = false; if (achievementUser.getId() == null) { achievementUser.setId(new AchievementUserId(UUID.randomUUID().toString())); create = true; } if (achievementUser.getCrea...
DataOperationResult<AchievementUser> function(final AchievementUser achievementUser) throws DataOperationException { boolean create = false; if (achievementUser.getId() == null) { achievementUser.setId(new AchievementUserId(UUID.randomUUID().toString())); create = true; } if (achievementUser.getCreated() == null) { ach...
/** * Saves an {@link AchievementUser}. Assigns a new ID ({@link UUID}) and * sets the creation date if necessary. If either of these elements are set, * will perform an insert. Otherwise will perform an update. * * @param achievementUser * The achievementUser to save. * @return The result of ...
Saves an <code>AchievementUser</code>. Assigns a new ID (<code>UUID</code>) and sets the creation date if necessary. If either of these elements are set, will perform an insert. Otherwise will perform an update
save
{ "repo_name": "efsavage/ajah", "path": "ajah-achievement/src/main/java/com/ajah/user/achievement/data/AchievementUserManager.java", "license": "apache-2.0", "size": 8016 }
[ "com.ajah.spring.jdbc.DataOperationResult", "com.ajah.spring.jdbc.err.DataOperationException", "com.ajah.user.achievement.AchievementUser", "com.ajah.user.achievement.AchievementUserId", "java.util.Date", "java.util.UUID" ]
import com.ajah.spring.jdbc.DataOperationResult; import com.ajah.spring.jdbc.err.DataOperationException; import com.ajah.user.achievement.AchievementUser; import com.ajah.user.achievement.AchievementUserId; import java.util.Date; import java.util.UUID;
import com.ajah.spring.jdbc.*; import com.ajah.spring.jdbc.err.*; import com.ajah.user.achievement.*; import java.util.*;
[ "com.ajah.spring", "com.ajah.user", "java.util" ]
com.ajah.spring; com.ajah.user; java.util;
2,634,060
private void applyColorbandAndColorFactors(Structure tex, Image image, BlenderContext blenderContext) { float rfac = ((Number) tex.getFieldValue("rfac")).floatValue(); float gfac = ((Number) tex.getFieldValue("gfac")).floatValue(); float bfac = ((Number) tex.getFieldValue("bfac")).floatValue...
void function(Structure tex, Image image, BlenderContext blenderContext) { float rfac = ((Number) tex.getFieldValue("rfac")).floatValue(); float gfac = ((Number) tex.getFieldValue("gfac")).floatValue(); float bfac = ((Number) tex.getFieldValue("bfac")).floatValue(); float[][] colorBand = new ColorBand(tex, blenderConte...
/** * This method applies the colorband and color factors to image type * textures. If there is no colorband defined for the texture or the color * factors are all equal to 1.0f then no changes are made. * * @param tex * the texture structure * @param image * ...
This method applies the colorband and color factors to image type textures. If there is no colorband defined for the texture or the color factors are all equal to 1.0f then no changes are made
applyColorbandAndColorFactors
{ "repo_name": "PlanetWaves/clockworkengine", "path": "trunk/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/TextureHelper.java", "license": "apache-2.0", "size": 34021 }
[ "com.jme3.scene.plugins.blender.BlenderContext", "com.jme3.scene.plugins.blender.file.Structure", "com.jme3.scene.plugins.blender.textures.io.PixelIOFactory", "com.jme3.scene.plugins.blender.textures.io.PixelInputOutput", "com.jme3.texture.Image" ]
import com.jme3.scene.plugins.blender.BlenderContext; import com.jme3.scene.plugins.blender.file.Structure; import com.jme3.scene.plugins.blender.textures.io.PixelIOFactory; import com.jme3.scene.plugins.blender.textures.io.PixelInputOutput; import com.jme3.texture.Image;
import com.jme3.scene.plugins.blender.*; import com.jme3.scene.plugins.blender.file.*; import com.jme3.scene.plugins.blender.textures.io.*; import com.jme3.texture.*;
[ "com.jme3.scene", "com.jme3.texture" ]
com.jme3.scene; com.jme3.texture;
2,425,942
public void finish() throws IOException { dataOutputStream.writeInt(0); }
void function() throws IOException { dataOutputStream.writeInt(0); }
/** * Write an end marker to the stream so that decoder knows to return null at this position. * @throws IOException On IO error */
Write an end marker to the stream so that decoder knows to return null at this position
finish
{ "repo_name": "sedmelluq/lavaplayer", "path": "main/src/main/java/com/sedmelluq/discord/lavaplayer/tools/io/MessageOutput.java", "license": "apache-2.0", "size": 2079 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,320,525
@ApiModelProperty(value = "") public String getDescription() { return description; }
@ApiModelProperty(value = "") String function() { return description; }
/** * Get description * @return description **/
Get description
getDescription
{ "repo_name": "Telestream/telestream-cloud-java-sdk", "path": "telestream-cloud-qc-sdk/src/main/java/net/telestream/cloud/qc/Template.java", "license": "mit", "size": 4605 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,850,621
@Override @XmlElement(name = "resourceMaintenance") public Collection<MaintenanceInformation> getResourceMaintenances() { return resourceMaintenances = nonNullCollection(resourceMaintenances, MaintenanceInformation.class); }
@XmlElement(name = STR) Collection<MaintenanceInformation> function() { return resourceMaintenances = nonNullCollection(resourceMaintenances, MaintenanceInformation.class); }
/** * Provides information about the frequency of resource updates, and the scope of those updates. * * @return frequency and scope of resource updates. */
Provides information about the frequency of resource updates, and the scope of those updates
getResourceMaintenances
{ "repo_name": "Geomatys/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java", "license": "apache-2.0", "size": 30038 }
[ "java.util.Collection", "javax.xml.bind.annotation.XmlElement", "org.opengis.metadata.maintenance.MaintenanceInformation" ]
import java.util.Collection; import javax.xml.bind.annotation.XmlElement; import org.opengis.metadata.maintenance.MaintenanceInformation;
import java.util.*; import javax.xml.bind.annotation.*; import org.opengis.metadata.maintenance.*;
[ "java.util", "javax.xml", "org.opengis.metadata" ]
java.util; javax.xml; org.opengis.metadata;
2,340,630
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { return null; }
AxisAlignedBB function(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { return null; }
/** * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been * cleared to be reused) */
Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused)
getCollisionBoundingBoxFromPool
{ "repo_name": "mviitanen/marsmod", "path": "mcp/src/minecraft/net/minecraft/block/BlockBasePressurePlate.java", "license": "gpl-2.0", "size": 7965 }
[ "net.minecraft.util.AxisAlignedBB", "net.minecraft.world.World" ]
import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World;
import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
797,977
public List<Import> getAllImports() { return new ArrayList<>(allImports); }
List<Import> function() { return new ArrayList<>(allImports); }
/** * Returns a copied list of all imports, ordinals and by name. * * @return all imports, ordinal and by name */
Returns a copied list of all imports, ordinals and by name
getAllImports
{ "repo_name": "katjahahn/PortEx", "path": "src/main/java/com/github/katjahahn/parser/sections/idata/ImportDLL.java", "license": "apache-2.0", "size": 6445 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,388,861
private void explodeConceptSetHelper(Concept concept, Collection<Concept> ret, Collection<Integer> alreadySeen) { if (alreadySeen.contains(concept.getConceptId())) { return; } alreadySeen.add(concept.getConceptId()); List<ConceptSet> cs = getConceptSetsByConcept(concept); for (ConceptSet set : cs) { ...
void function(Concept concept, Collection<Concept> ret, Collection<Integer> alreadySeen) { if (alreadySeen.contains(concept.getConceptId())) { return; } alreadySeen.add(concept.getConceptId()); List<ConceptSet> cs = getConceptSetsByConcept(concept); for (ConceptSet set : cs) { Concept c = set.getConcept(); if (c.isSet(...
/** * Utility method used by getConceptsInSet(Concept concept) * * @param concept * @param ret * @param alreadySeen */
Utility method used by getConceptsInSet(Concept concept)
explodeConceptSetHelper
{ "repo_name": "ssmusoke/openmrs-core", "path": "api/src/main/java/org/openmrs/api/impl/ConceptServiceImpl.java", "license": "mpl-2.0", "size": 57755 }
[ "java.util.Collection", "java.util.List", "org.apache.commons.lang.StringUtils", "org.openmrs.Concept", "org.openmrs.ConceptSet" ]
import java.util.Collection; import java.util.List; import org.apache.commons.lang.StringUtils; import org.openmrs.Concept; import org.openmrs.ConceptSet;
import java.util.*; import org.apache.commons.lang.*; import org.openmrs.*;
[ "java.util", "org.apache.commons", "org.openmrs" ]
java.util; org.apache.commons; org.openmrs;
2,535,401
private static boolean isRowEmpty(Row row) { if (row == null || row.getCell(0) == null || row.getCell(0).getCellType() != CellType.NUMERIC || row.getCell(0).getNumericCellValue() <= 0) return true; else return false; }
static boolean function(Row row) { if (row == null row.getCell(0) == null row.getCell(0).getCellType() != CellType.NUMERIC row.getCell(0).getNumericCellValue() <= 0) return true; else return false; }
/** * Checks if a row is empty by checking the primary key column (assumed to * always be column 0) to see if it is not null, numeric, and greater than 0 * * @param row the row to check * * @return true, if is row empty */
Checks if a row is empty by checking the primary key column (assumed to always be column 0) to see if it is not null, numeric, and greater than 0
isRowEmpty
{ "repo_name": "ptgrogan/spacenet", "path": "src/main/java/edu/mit/spacenet/data/Spreadsheet_2_5.java", "license": "apache-2.0", "size": 99299 }
[ "org.apache.poi.ss.usermodel.CellType", "org.apache.poi.ss.usermodel.Row" ]
import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.*;
[ "org.apache.poi" ]
org.apache.poi;
461,948
public boolean deleteSelectedEquations() { if (selectedEquations.isEmpty()) { return false; } formulaListView.clearFocus(); // search for the last formula before first deleted that will still in the view int selectedFormulaId = ViewUtils.INVALID_INDEX;...
boolean function() { if (selectedEquations.isEmpty()) { return false; } formulaListView.clearFocus(); int selectedFormulaId = ViewUtils.INVALID_INDEX; final ArrayList<FormulaBase> fList = formulaListView.getFormulas(FormulaBase.class); if (selectedEquations.size() < fList.size()) { boolean equationFound = false; for (i...
/** * Procedure deletes all equations stored within the selectedEquations vector */
Procedure deletes all equations stored within the selectedEquations vector
deleteSelectedEquations
{ "repo_name": "mkulesh/microMathematics", "path": "app/src/main/java/com/mkulesh/micromath/formula/FormulaList.java", "license": "gpl-3.0", "size": 41377 }
[ "com.mkulesh.micromath.undo.DeleteState", "com.mkulesh.micromath.utils.ViewUtils", "java.util.ArrayList" ]
import com.mkulesh.micromath.undo.DeleteState; import com.mkulesh.micromath.utils.ViewUtils; import java.util.ArrayList;
import com.mkulesh.micromath.undo.*; import com.mkulesh.micromath.utils.*; import java.util.*;
[ "com.mkulesh.micromath", "java.util" ]
com.mkulesh.micromath; java.util;
948,694
protected void onPostExecute(Intent result) { result.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(result); if (executorToFinish != null) executorToFinish.finish(); }
void function(Intent result) { result.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(result); if (executorToFinish != null) executorToFinish.finish(); }
/** Starts new activity and finishes executor. * @param result may indicate Task*Activity or EndActivity */
Starts new activity and finishes executor
onPostExecute
{ "repo_name": "andre-wojtowicz/poznan-location-based-game", "path": "android-project/src/pl/zgora/andre/poznanlbgame/util/NextTaskAT.java", "license": "apache-2.0", "size": 2575 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
481,818
public Element elementByClassName(String className) throws Exception { JSONObject jsonObject = new JSONObject(); jsonObject.put("value", className); jsonObject.put("using", "class name"); boolean isExist = findElement(jsonObject); return isExist ? element : null; }
Element function(String className) throws Exception { JSONObject jsonObject = new JSONObject(); jsonObject.put("value", className); jsonObject.put("using", STR); boolean isExist = findElement(jsonObject); return isExist ? element : null; }
/** * <p> * Search for an element on the page, starting from the document root.<br> * Support: Android iOS Web(WebView) * * @param className The className attribute of element * @return return the element to find if it exist,if it does not exist ,return null * @throws Exception *...
Search for an element on the page, starting from the document root. Support: Android iOS Web(WebView)
elementByClassName
{ "repo_name": "macacajs/wd.java", "path": "src/main/java/macaca/client/MacacaClient.java", "license": "mit", "size": 51693 }
[ "com.alibaba.fastjson.JSONObject" ]
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.*;
[ "com.alibaba.fastjson" ]
com.alibaba.fastjson;
2,588,350