method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public ReleaseEnvironment getReleaseEnvironment( final String project, final int releaseId, final int environmentId) { final UUID locationId = UUID.fromString("a7e426b1-03dc-48af-9dfe-c98bac612dcb"); //$NON-NLS-1$ final ApiResourceVersion apiVersion = new ApiResourceVersi...
ReleaseEnvironment function( final String project, final int releaseId, final int environmentId) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, project); routeV...
/** * [Preview API 3.1-preview.4] * * @param project * Project ID or project name * @param releaseId * * @param environmentId * * @return ReleaseEnvironment */
[Preview API 3.1-preview.4]
getReleaseEnvironment
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-releasemanagement-client/src/main/generated/com/microsoft/alm/visualstudio/services/releasemanagement/webapi/ReleaseHttpClientBase.java", "license": "mit", "size": 186198 }
[ "com.microsoft.alm.client.HttpMethod", "com.microsoft.alm.client.VssMediaTypes", "com.microsoft.alm.client.VssRestRequest", "com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseEnvironment", "com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersion", "java.util.HashMap", "ja...
import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseEnvironment; import com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersion; import java.uti...
import com.microsoft.alm.client.*; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*;
[ "com.microsoft.alm", "java.util" ]
com.microsoft.alm; java.util;
321,827
public boolean isStatic() { return Modifier.isStatic(_method.getModifiers()); }
boolean function() { return Modifier.isStatic(_method.getModifiers()); }
/** * Returns true for a static method. */
Returns true for a static method
isStatic
{ "repo_name": "dlitz/resin", "path": "modules/kernel/src/com/caucho/bytecode/JConstructorWrapper.java", "license": "gpl-2.0", "size": 3668 }
[ "java.lang.reflect.Modifier" ]
import java.lang.reflect.Modifier;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,339,976
public void list(PrintWriter out) { out.println("-- listing properties --"); Hashtable<String,Object> h = new Hashtable<>(); enumerate(h); for (Enumeration<String> e = h.keys() ; e.hasMoreElements() ;) { String key = e.nextElement(); String val = (String)...
void function(PrintWriter out) { out.println(STR); Hashtable<String,Object> h = new Hashtable<>(); enumerate(h); for (Enumeration<String> e = h.keys() ; e.hasMoreElements() ;) { String key = e.nextElement(); String val = (String)h.get(key); if (val.length() > 40) { val = val.substring(0, 37) + "..."; } out.println(key ...
/** * Prints this property list out to the specified output stream. * This method is useful for debugging. * * @param out an output stream. * @throws ClassCastException if any key in this property list * is not a string. * @since JDK1.1 */
Prints this property list out to the specified output stream. This method is useful for debugging
list
{ "repo_name": "evanman/Java-Source", "path": "util/Properties.java", "license": "lgpl-2.1", "size": 49689 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
971,453
TestFile getGradleUserHomeDir();
TestFile getGradleUserHomeDir();
/** * The Gradle user home dir that will be used for executions. */
The Gradle user home dir that will be used for executions
getGradleUserHomeDir
{ "repo_name": "gradle/gradle", "path": "subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/GradleExecuter.java", "license": "apache-2.0", "size": 17560 }
[ "org.gradle.test.fixtures.file.TestFile" ]
import org.gradle.test.fixtures.file.TestFile;
import org.gradle.test.fixtures.file.*;
[ "org.gradle.test" ]
org.gradle.test;
2,036,377
@Test public void testBuffer() { // NOPMD (assert missing) for (int i=0;i<ARRAY_LENGTH;i++) { // initialize AfterOperationEvent record = new AfterOperationEvent(LONG_VALUES.get(i % LONG_VALUES.size()), LONG_VALUES.get(i % LONG_VALUES.size()), INT_VALUES.get(i % INT_VALUES.size()), STRING_VALUES.get(i % STRI...
void function() { for (int i=0;i<ARRAY_LENGTH;i++) { AfterOperationEvent record = new AfterOperationEvent(LONG_VALUES.get(i % LONG_VALUES.size()), LONG_VALUES.get(i % LONG_VALUES.size()), INT_VALUES.get(i % INT_VALUES.size()), STRING_VALUES.get(i % STRING_VALUES.size()), STRING_VALUES.get(i % STRING_VALUES.size())); As...
/** * Tests {@link AfterOperationEvent#TestAfterOperationEvent(String, String, long, long, long, String, int, int)}. */
Tests <code>AfterOperationEvent#TestAfterOperationEvent(String, String, long, long, long, String, int, int)</code>
testBuffer
{ "repo_name": "HaStr/kieker", "path": "kieker-common/test-gen/kieker/test/common/junit/record/flow/trace/operation/TestGeneratedAfterOperationEvent.java", "license": "apache-2.0", "size": 8574 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,571,175
private void maybeAddStorageFileItemToMap(final Gav gav, final StorageFileItem item) { if (repositoryTarget != null && !repositoryTarget.isPathContained( item.getRepositoryItemUid().getRepository().getRepositoryContentClass(), item .getPath())) { log.debug("Excluding file: {} f...
void function(final Gav gav, final StorageFileItem item) { if (repositoryTarget != null && !repositoryTarget.isPathContained( item.getRepositoryItemUid().getRepository().getRepositoryContentClass(), item .getPath())) { log.debug(STR, item.getName(), repositoryTarget.getName()); return; } addStorageFileItemToMap(deletab...
/** * Compare the item path to the RepositoryTarget(if it is declared) and only include files that match that * pattern. * While the walker itself handles GAV paths, this ensures that we also respect patterns with file-level * granularity. */
Compare the item path to the RepositoryTarget(if it is declared) and only include files that match that pattern. While the walker itself handles GAV paths, this ensures that we also respect patterns with file-level granularity
maybeAddStorageFileItemToMap
{ "repo_name": "scmod/nexus-public", "path": "components/nexus-core/src/main/java/org/sonatype/nexus/maven/tasks/WalkerReleaseRemoverBackend.java", "license": "epl-1.0", "size": 11642 }
[ "org.sonatype.nexus.proxy.item.StorageFileItem", "org.sonatype.nexus.proxy.maven.gav.Gav" ]
import org.sonatype.nexus.proxy.item.StorageFileItem; import org.sonatype.nexus.proxy.maven.gav.Gav;
import org.sonatype.nexus.proxy.item.*; import org.sonatype.nexus.proxy.maven.gav.*;
[ "org.sonatype.nexus" ]
org.sonatype.nexus;
1,167,357
interface UpdateStages { interface WithTags { Update withTags(Map<String, String> tags); } }
interface UpdateStages { interface WithTags { Update withTags(Map<String, String> tags); } }
/** * Specifies tags. * @param tags Resource tags * @return the next update stage */
Specifies tags
withTags
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/compute/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/compute/v2020_06_01/ProximityPlacementGroup.java", "license": "mit", "size": 5212 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,561,012
public void setItemText(int index, String text) { checkIndex(index); final Element optionElement = (Element)optionsPanel.getElement().getChild(index); final LabelElement labelElement = (LabelElement)optionElement.getElementsByTagName("label").getItem(0); labelElement.setInnerText(tex...
void function(int index, String text) { checkIndex(index); final Element optionElement = (Element)optionsPanel.getElement().getChild(index); final LabelElement labelElement = (LabelElement)optionElement.getElementsByTagName("label").getItem(0); labelElement.setInnerText(text); if (selectedIndex == index) { currentInput...
/** * Sets the text associated with the item at a given index. * * @param index * the index of the item to be set * @param text * the item's new text * @throws IndexOutOfBoundsException * if the index is out of range */
Sets the text associated with the item at a given index
setItemText
{ "repo_name": "gazarenkov/che-sketch", "path": "ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/listbox/CustomComboBox.java", "license": "epl-1.0", "size": 16445 }
[ "com.google.gwt.dom.client.Element", "com.google.gwt.dom.client.LabelElement" ]
import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.LabelElement;
import com.google.gwt.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,665,509
@Test public void collectionHasAllOfInOrderHackedWithTooFewItemsFailure() { ArrayList<Integer> list = new ArrayList<Integer>(collection(1, null, 3)); Ordered o = ASSERT.that((Collection<Integer>)list).has().allOf(1, null, 3); list.remove(1); validateHackedFailure(o); }
@Test void function() { ArrayList<Integer> list = new ArrayList<Integer>(collection(1, null, 3)); Ordered o = ASSERT.that((Collection<Integer>)list).has().allOf(1, null, 3); list.remove(1); validateHackedFailure(o); }
/** * This tests the rather unwieldly case where someone alters the * collection out from under the Subject before inOrder() is called. */
This tests the rather unwieldly case where someone alters the collection out from under the Subject before inOrder() is called
collectionHasAllOfInOrderHackedWithTooFewItemsFailure
{ "repo_name": "andyglick/truth0", "path": "core/src/test/java/org/truth0/subjects/CollectionTest.java", "license": "apache-2.0", "size": 13345 }
[ "java.util.ArrayList", "java.util.Collection", "org.junit.Test", "org.truth0.Truth" ]
import java.util.ArrayList; import java.util.Collection; import org.junit.Test; import org.truth0.Truth;
import java.util.*; import org.junit.*; import org.truth0.*;
[ "java.util", "org.junit", "org.truth0" ]
java.util; org.junit; org.truth0;
1,659,783
public static Range findRangeBounds(CategoryDataset dataset) { return findRangeBounds(dataset, true); }
static Range function(CategoryDataset dataset) { return findRangeBounds(dataset, true); }
/** * Returns the range of values in the range for the dataset. * * @param dataset * the dataset (<code>null</code> not permitted). * * @return The range (possibly <code>null</code>). */
Returns the range of values in the range for the dataset
findRangeBounds
{ "repo_name": "djun100/afreechart", "path": "src/org/afree/data/general/DatasetUtilities.java", "license": "lgpl-3.0", "size": 51000 }
[ "org.afree.data.Range", "org.afree.data.category.CategoryDataset" ]
import org.afree.data.Range; import org.afree.data.category.CategoryDataset;
import org.afree.data.*; import org.afree.data.category.*;
[ "org.afree.data" ]
org.afree.data;
1,335,727
protected void adjustCloseAllMenu() { Action closeCurrent = getAction("CloseCurrent"); //$NON-NLS-1$ if (closeCurrent != null) { closeCurrent.setEnabled(panes.size() > 0);// || TaskMgr.getToolbarTaskCount() > 1); } Action closeAll = getAction...
void function() { Action closeCurrent = getAction(STR); if (closeCurrent != null) { closeCurrent.setEnabled(panes.size() > 0); } Action closeAll = getAction(STR); if (closeAll != null) { closeAll.setEnabled(panes.size() > 0); } Action closeAllBut = getAction(STR); if (closeAllBut != null) { closeAllBut.setEnabled(panes...
/** * Enables the Close All action as to whether there state is right in the UI. */
Enables the Close All action as to whether there state is right in the UI
adjustCloseAllMenu
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/af/core/SubPaneMgr.java", "license": "gpl-2.0", "size": 41547 }
[ "edu.ku.brc.ui.UIRegistry", "javax.swing.Action" ]
import edu.ku.brc.ui.UIRegistry; import javax.swing.Action;
import edu.ku.brc.ui.*; import javax.swing.*;
[ "edu.ku.brc", "javax.swing" ]
edu.ku.brc; javax.swing;
2,117,688
void ucSave(String inContribution, Long inAuthorID) throws BOMChangeValueException;
void ucSave(String inContribution, Long inAuthorID) throws BOMChangeValueException;
/** * Use case to save modified contribution data (without change of state). * * @param inContribution String * @param inAuthorID Long * @throws BOMChangeValueException */
Use case to save modified contribution data (without change of state)
ucSave
{ "repo_name": "aktion-hip/vif", "path": "org.hip.vif.core/src/org/hip/vif/core/bom/Completion.java", "license": "gpl-2.0", "size": 2811 }
[ "org.hip.vif.core.exc.BOMChangeValueException" ]
import org.hip.vif.core.exc.BOMChangeValueException;
import org.hip.vif.core.exc.*;
[ "org.hip.vif" ]
org.hip.vif;
2,184,899
public List cargarObjetosPersistentes(Class clasePersistente);
List function(Class clasePersistente);
/** * Carga los elementos disponibles desde la base de datos. * @param clasePersistente Clase persistente a traer de la BD. * @return Lista con los elementos encontrados. */
Carga los elementos disponibles desde la base de datos
cargarObjetosPersistentes
{ "repo_name": "marcelobusico/simbya-gecom", "path": "GeComEJB/src/java/simbya/gecom/gestores/productos/GestorActualizarStockProductosRemote.java", "license": "gpl-3.0", "size": 1981 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,620,442
@Override public void onPeerConnected(Node node) { Log.i(LOGTAG, "onPeerConnected: Node " + node.getId() + " connected!"); wearableNode = node; }
void function(Node node) { Log.i(LOGTAG, STR + node.getId() + STR); wearableNode = node; }
/** * (NodeListener) * Gets called if a new node (a wearable) is connected to the phone */
(NodeListener) Gets called if a new node (a wearable) is connected to the phone
onPeerConnected
{ "repo_name": "demantz/WearGuitarTuner", "path": "mobile/src/main/java/com/mantz_it/wearguitartuner/MainActivity.java", "license": "gpl-2.0", "size": 18595 }
[ "android.util.Log", "com.google.android.gms.wearable.Node" ]
import android.util.Log; import com.google.android.gms.wearable.Node;
import android.util.*; import com.google.android.gms.wearable.*;
[ "android.util", "com.google.android" ]
android.util; com.google.android;
2,895,581
public void parseFromJson(JSONObject map){ if (map == null || map.size() <= 0) { return; } String type = (String) map.get("type"); this.mType = type; this.mRef = (String) map.get("ref"); Object style = map.get("style"); if (style != null && style instanceof JSONObject) { WXSty...
void function(JSONObject map){ if (map == null map.size() <= 0) { return; } String type = (String) map.get("type"); this.mType = type; this.mRef = (String) map.get("ref"); Object style = map.get("style"); if (style != null && style instanceof JSONObject) { WXStyle styles = new WXStyle(); styles.putAll((JSONObject) styl...
/** * Parse the jsonObject to {@link WXDomObject} recursively * @param map the original JSONObject */
Parse the jsonObject to <code>WXDomObject</code> recursively
parseFromJson
{ "repo_name": "MrRaindrop/incubator-weex", "path": "android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java", "license": "apache-2.0", "size": 26392 }
[ "com.alibaba.fastjson.JSONArray", "com.alibaba.fastjson.JSONObject", "com.taobao.weex.dom.transition.WXTransition" ]
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.taobao.weex.dom.transition.WXTransition;
import com.alibaba.fastjson.*; import com.taobao.weex.dom.transition.*;
[ "com.alibaba.fastjson", "com.taobao.weex" ]
com.alibaba.fastjson; com.taobao.weex;
953,902
public static boolean hasMobColumns(HTableDescriptor htd) { HColumnDescriptor[] hcds = htd.getColumnFamilies(); for (HColumnDescriptor hcd : hcds) { if (hcd.isMobEnabled()) { return true; } } return false; }
static boolean function(HTableDescriptor htd) { HColumnDescriptor[] hcds = htd.getColumnFamilies(); for (HColumnDescriptor hcd : hcds) { if (hcd.isMobEnabled()) { return true; } } return false; }
/** * Checks whether this table has mob-enabled columns. * @param htd The current table descriptor. * @return Whether this table has mob-enabled columns. */
Checks whether this table has mob-enabled columns
hasMobColumns
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java", "license": "apache-2.0", "size": 39255 }
[ "org.apache.hadoop.hbase.HColumnDescriptor", "org.apache.hadoop.hbase.HTableDescriptor" ]
import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,947,831
private void appendInCriteria(TableAlias alias, PathInfo pathInfo, InCriteria c, StringBuffer buf) { appendColName(alias, pathInfo, c.isTranslateAttribute(), buf); buf.append(c.getClause()); if (c.getValue() instanceof Collection) { Object[] values = ((Collect...
void function(TableAlias alias, PathInfo pathInfo, InCriteria c, StringBuffer buf) { appendColName(alias, pathInfo, c.isTranslateAttribute(), buf); buf.append(c.getClause()); if (c.getValue() instanceof Collection) { Object[] values = ((Collection) c.getValue()).toArray(); int size = ((Collection) c.getValue()).size();...
/** * Answer the SQL-Clause for an InCriteria * * @param alias * @param pathInfo * @param c InCriteria * @param buf */
Answer the SQL-Clause for an InCriteria
appendInCriteria
{ "repo_name": "kuali/ojb-1.0.4", "path": "src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java", "license": "apache-2.0", "size": 69247 }
[ "java.util.Collection", "org.apache.ojb.broker.query.InCriteria", "org.apache.ojb.broker.util.SqlHelper" ]
import java.util.Collection; import org.apache.ojb.broker.query.InCriteria; import org.apache.ojb.broker.util.SqlHelper;
import java.util.*; import org.apache.ojb.broker.query.*; import org.apache.ojb.broker.util.*;
[ "java.util", "org.apache.ojb" ]
java.util; org.apache.ojb;
1,946,274
public static Key extractVerificationKey(Credential credential) { if (credential == null) { return null; } if (credential.getPublicKey() != null) { return credential.getPublicKey(); } else { return credential.getSecretKey(); } ...
static Key function(Credential credential) { if (credential == null) { return null; } if (credential.getPublicKey() != null) { return credential.getPublicKey(); } else { return credential.getSecretKey(); } }
/** * Extract the verification key from the credential. * * @param credential the credential containing the verification key * @return the verification key (either a public key or a secret (symmetric) key */
Extract the verification key from the credential
extractVerificationKey
{ "repo_name": "duck1123/java-xmltooling", "path": "src/main/java/org/opensaml/xml/security/SecurityHelper.java", "license": "apache-2.0", "size": 31054 }
[ "java.security.Key", "org.opensaml.xml.security.credential.Credential" ]
import java.security.Key; import org.opensaml.xml.security.credential.Credential;
import java.security.*; import org.opensaml.xml.security.credential.*;
[ "java.security", "org.opensaml.xml" ]
java.security; org.opensaml.xml;
956,553
@CacheEvict(value = RegistryCache.PROJECT_GET_WITH_COLLECTIONS, key = "#projID") @PreAuthorize("hasAnyRole('ADMIN_COMPANY', 'CONTRACT_UPDATE')") public String mark(long projID, int projectStatusID);
@CacheEvict(value = RegistryCache.PROJECT_GET_WITH_COLLECTIONS, key = STR) @PreAuthorize(STR) String function(long projID, int projectStatusID);
/** * Update the status of the project. * * @param projectID * ID of the project. * @param projectStatusID * ID of the project status. * @return Response message to the user. */
Update the status of the project
mark
{ "repo_name": "VicCebedo/PracticeRepo", "path": "mod-webapp-codebase/src/main/java/com/cebedo/pmsys/service/ProjectService.java", "license": "apache-2.0", "size": 6460 }
[ "com.cebedo.pmsys.constants.RegistryCache", "org.springframework.cache.annotation.CacheEvict", "org.springframework.security.access.prepost.PreAuthorize" ]
import com.cebedo.pmsys.constants.RegistryCache; import org.springframework.cache.annotation.CacheEvict; import org.springframework.security.access.prepost.PreAuthorize;
import com.cebedo.pmsys.constants.*; import org.springframework.cache.annotation.*; import org.springframework.security.access.prepost.*;
[ "com.cebedo.pmsys", "org.springframework.cache", "org.springframework.security" ]
com.cebedo.pmsys; org.springframework.cache; org.springframework.security;
2,729,654
@Test public void testSLLocalEnvEntry_Boolean_InvalidValue() throws Exception { SLLa ejb1 = fhome1.create(); // The test case looks for an environment variable named "envBooleanInvalid". Boolean tempBoolean = ejb1.getBooleanEnvVar("envBooleanInvalid"); assertNotNull("Get environm...
void function() throws Exception { SLLa ejb1 = fhome1.create(); Boolean tempBoolean = ejb1.getBooleanEnvVar(STR); assertNotNull(STR, tempBoolean); assertFalse(STR, tempBoolean.booleanValue()); }
/** * (ive19) Test an env-entry of type Boolean with an invalid value. */
(ive19) Test an env-entry of type Boolean with an invalid value
testSLLocalEnvEntry_Boolean_InvalidValue
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XLocalSpecWeb.war/src/com/ibm/ejb2x/base/spec/sll/web/SLLocalImplEnvEntryServlet.java", "license": "epl-1.0", "size": 40905 }
[ "com.ibm.ejb2x.base.spec.sll.ejb.SLLa", "org.junit.Assert" ]
import com.ibm.ejb2x.base.spec.sll.ejb.SLLa; import org.junit.Assert;
import com.ibm.ejb2x.base.spec.sll.ejb.*; import org.junit.*;
[ "com.ibm.ejb2x", "org.junit" ]
com.ibm.ejb2x; org.junit;
2,433,408
protected ResultSet getEstResultSet(Connection connection) throws SQLException { Statement stmt = connection.createStatement(); String query = "select acc, cl_id, clone from est_view order by acc;"; ResultSet res = stmt.executeQuery(query); return res; } /** * {@inherit...
ResultSet function(Connection connection) throws SQLException { Statement stmt = connection.createStatement(); String query = STR; ResultSet res = stmt.executeQuery(query); return res; } /** * {@inheritDoc}
/** * Return the ESTs from the AnoEST database. * This is a protected method so that it can be overriden for testing * @param connection the AnoEST database connection * @throws SQLException if there is a problem while querying * @return the ESTs */
Return the ESTs from the AnoEST database. This is a protected method so that it can be overriden for testing
getEstResultSet
{ "repo_name": "JoeCarlson/intermine", "path": "bio/sources/mosquito/anoest/main/src/org/intermine/bio/dataconversion/AnoESTConverter.java", "license": "lgpl-2.1", "size": 6081 }
[ "java.sql.Connection", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,131,884
public static Class<?> loadClass(String className, ClassLoader loader) throws ClassNotFoundException { Class<?> theClass = null; // if it is a primitive type, return the object from the "primitives" map if (primitives.containsKey(className)) { return primitives.get(className); ...
static Class<?> function(String className, ClassLoader loader) throws ClassNotFoundException { Class<?> theClass = null; if (primitives.containsKey(className)) { return primitives.get(className); } int genericsStart = className.indexOf("<"); if (genericsStart != -1) { className = className.substring(0, genericsStart); ...
/** * Loads a class with the specified classloader. * @param className The name of the class to load * @param loader The ClassLoader to use * @return The requested class * @throws ClassNotFoundException */
Loads a class with the specified classloader
loadClass
{ "repo_name": "yuri0x7c1/ofbiz-explorer", "path": "src/test/resources/apache-ofbiz-17.12.04/framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java", "license": "apache-2.0", "size": 37505 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,166,016
@Override public Object convert(Class cls, String value) throws Exception { Object result; String[] values; int i; result = null; // array? if (cls.isArray()) { values = OptionUtils.splitOptions(value); result = Array.newInstance(cls.getComponentType(), values.le...
Object function(Class cls, String value) throws Exception { Object result; String[] values; int i; result = null; if (cls.isArray()) { values = OptionUtils.splitOptions(value); result = Array.newInstance(cls.getComponentType(), values.length); for (i = 0; i < values.length; i++) Array.set(result, i, convert(cls.getComp...
/** * Converts the variable value into the appropriate object, if possible. * * @param cls the type of the property * @param value the string to convert * @return the converted value or null if it cannot be converted * @throws Exception if conversion fails with an error */
Converts the variable value into the appropriate object, if possible
convert
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/flow/core/DefaultPropertyValueConverter.java", "license": "gpl-3.0", "size": 4626 }
[ "java.io.File", "java.lang.reflect.Array", "nz.ac.waikato.cms.locator.ClassLocator" ]
import java.io.File; import java.lang.reflect.Array; import nz.ac.waikato.cms.locator.ClassLocator;
import java.io.*; import java.lang.reflect.*; import nz.ac.waikato.cms.locator.*;
[ "java.io", "java.lang", "nz.ac.waikato" ]
java.io; java.lang; nz.ac.waikato;
446,174
public static String getBackupFolder(Context context) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); return sharedPreferences.getString("backup_folder", null); }
static String function(Context context) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); return sharedPreferences.getString(STR, null); }
/** * Get google docs backup folder registered on preferences * */
Get google docs backup folder registered on preferences
getBackupFolder
{ "repo_name": "kunaldeo/financisto", "path": "src/ru/orangesoftware/financisto/utils/MyPreferences.java", "license": "gpl-2.0", "size": 27678 }
[ "android.content.Context", "android.content.SharedPreferences", "android.preference.PreferenceManager" ]
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager;
import android.content.*; import android.preference.*;
[ "android.content", "android.preference" ]
android.content; android.preference;
1,188,732
protected String doIt() throws java.lang.Exception { StringBuffer sql = null; int no = 0; String clientCheck = " AND AD_Client_ID=" + m_AD_Client_ID; // **** Prepare **** // Delete Old Imported if (m_deleteOldImported) { sql = new StringBuffer ("DELETE I_Invoice " + "WHERE I_IsI...
String function() throws java.lang.Exception { StringBuffer sql = null; int no = 0; String clientCheck = STR + m_AD_Client_ID; if (m_deleteOldImported) { sql = new StringBuffer (STR + STR).append (clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); log.fine(STR + no); } sql = new StringBuffer (STR + STR...
/** * Perform process. * @return clear Message * @throws Exception */
Perform process
doIt
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/process/ImportInvoice.java", "license": "gpl-2.0", "size": 34563 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "org.compiere.model.MBPartner", "org.compiere.model.MBPartnerLocation", "org.compiere.model.MLocation", "org.compiere.util.DB" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import org.compiere.model.MBPartner; import org.compiere.model.MBPartnerLocation; import org.compiere.model.MLocation; import org.compiere.util.DB;
import java.sql.*; import org.compiere.model.*; import org.compiere.util.*;
[ "java.sql", "org.compiere.model", "org.compiere.util" ]
java.sql; org.compiere.model; org.compiere.util;
108,683
public List<String> getAllDescription() { List<String> result = new ArrayList<String>(); List<Node> nodes = childNode.get("description"); for (Node node : nodes) { result.add(node.getText()); } return result; }
List<String> function() { List<String> result = new ArrayList<String>(); List<Node> nodes = childNode.get(STR); for (Node node : nodes) { result.add(node.getText()); } return result; }
/** * Returns all <code>description</code> elements * @return list of <code>description</code> */
Returns all <code>description</code> elements
getAllDescription
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/javaee6/PersistenceContextRefTypeImpl.java", "license": "epl-1.0", "size": 16227 }
[ "java.util.ArrayList", "java.util.List", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import java.util.ArrayList; import java.util.List; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import java.util.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
372,072
private final void updateBuffer(int offset) { fBufferOffset= offset; if (fBufferOffset + fBuffer.length > fRangeOffset + fRangeLength) fBufferLength= fRangeLength - (fBufferOffset - fRangeOffset); else fBufferLength= fBuffer.length; try { final String content= fDocument.get(fBufferOffset, fBuffer...
final void function(int offset) { fBufferOffset= offset; if (fBufferOffset + fBuffer.length > fRangeOffset + fRangeLength) fBufferLength= fRangeLength - (fBufferOffset - fRangeOffset); else fBufferLength= fBuffer.length; try { final String content= fDocument.get(fBufferOffset, fBufferLength); content.getChars(0, fBuffe...
/** * Fills the buffer with the contents of the document starting at the given offset. * * @param offset the document offset at which the buffer starts */
Fills the buffer with the contents of the document starting at the given offset
updateBuffer
{ "repo_name": "boniatillo-com/PhaserEditor", "path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/BufferedDocumentScanner.java", "license": "epl-1.0", "size": 4861 }
[ "org.eclipse.jface.text.BadLocationException" ]
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
593,560
public static List<IMendixObject> retrieveByPath(IContext context, IMendixObject mxObject, String path, boolean isSelfAssociationChild) { return component.core().retrieveByPath(context, mxObject, path, isSelfAssociationChild); }
static List<IMendixObject> function(IContext context, IMendixObject mxObject, String path, boolean isSelfAssociationChild) { return component.core().retrieveByPath(context, mxObject, path, isSelfAssociationChild); }
/** * Retrieves objects using the given object and path. * * @param context the context. * @param mxObject the start point of the path. * @param path the path (association) to the objects to retrieve. * @param isSelfAssociationChild defines whether the mxObject instance is the child of the path of a self a...
Retrieves objects using the given object and path
retrieveByPath
{ "repo_name": "mrgroen/qzIndustryPrinting", "path": "test/javasource/com/mendix/core/Core.java", "license": "apache-2.0", "size": 71337 }
[ "com.mendix.systemwideinterfaces.core.IContext", "com.mendix.systemwideinterfaces.core.IMendixObject", "java.util.List" ]
import com.mendix.systemwideinterfaces.core.IContext; import com.mendix.systemwideinterfaces.core.IMendixObject; import java.util.List;
import com.mendix.systemwideinterfaces.core.*; import java.util.*;
[ "com.mendix.systemwideinterfaces", "java.util" ]
com.mendix.systemwideinterfaces; java.util;
1,871,622
return obtenerPeliculasEstenoDispositivoResult; } /** * Sets the value of the obtenerPeliculasEstenoDispositivoResult property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link ArrayOfPelicula }{@code >}
return obtenerPeliculasEstenoDispositivoResult; } /** * Sets the value of the obtenerPeliculasEstenoDispositivoResult property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link ArrayOfPelicula }{@code >}
/** * Gets the value of the obtenerPeliculasEstenoDispositivoResult property. * * @return * possible object is * {@link JAXBElement }{@code <}{@link ArrayOfPelicula }{@code >} * */
Gets the value of the obtenerPeliculasEstenoDispositivoResult property
getObtenerPeliculasEstenoDispositivoResult
{ "repo_name": "sidlors/digital-booking", "path": "digital-booking-ws/src/main/java/mx/com/cinepolis/digital/booking/model/ws/com/cinepolis/api/ObtenerPeliculasEstenoDispositivoResponse.java", "license": "epl-1.0", "size": 2334 }
[ "javax.xml.bind.JAXBElement", "mx.com.cinepolis.digital.booking.model.ws.org.datacontract.schemas._2004._07.apicinepolis.ArrayOfPelicula" ]
import javax.xml.bind.JAXBElement; import mx.com.cinepolis.digital.booking.model.ws.org.datacontract.schemas._2004._07.apicinepolis.ArrayOfPelicula;
import javax.xml.bind.*; import mx.com.cinepolis.digital.booking.model.ws.org.datacontract.schemas.*;
[ "javax.xml", "mx.com.cinepolis" ]
javax.xml; mx.com.cinepolis;
294,803
@Test public void testConnectWithMultiplePartitionsOnTopicWithNoStateSaved() { // Define our ConsumerId final String consumerId = "MyConsumerId"; // Some re-usable TopicPartition objects final TopicPartition kafkaTopicPartition0 = new TopicPartition(topicName, 0); final ...
void function() { final String consumerId = STR; final TopicPartition kafkaTopicPartition0 = new TopicPartition(topicName, 0); final TopicPartition kafkaTopicPartition1 = new TopicPartition(topicName, 1); final TopicPartition kafkaTopicPartition2 = new TopicPartition(topicName, 2); final ConsumerPartition partition0 = ...
/** * Verifies that when we call connect that it makes the appropriate calls * to ConsumerStateManager to initialize. * * This test has the ConsumerStateManager (a mock) return an empty ConsumerState. * We verify that our internal kafka client then knows to start reading every partition from ...
Verifies that when we call connect that it makes the appropriate calls to ConsumerStateManager to initialize. This test has the ConsumerStateManager (a mock) return an empty ConsumerState. We verify that our internal kafka client then knows to start reading every partition from the earliest available offset
testConnectWithMultiplePartitionsOnTopicWithNoStateSaved
{ "repo_name": "salesforce/storm-dynamic-spout", "path": "src/test/java/com/salesforce/storm/spout/dynamic/kafka/ConsumerTest.java", "license": "bsd-3-clause", "size": 123608 }
[ "com.salesforce.storm.spout.dynamic.ConsumerPartition", "com.salesforce.storm.spout.dynamic.consumer.ConsumerState", "com.salesforce.storm.spout.dynamic.metrics.LogRecorder", "com.salesforce.storm.spout.dynamic.persistence.PersistenceAdapter", "java.util.Arrays", "java.util.Collections", "java.util.List...
import com.salesforce.storm.spout.dynamic.ConsumerPartition; import com.salesforce.storm.spout.dynamic.consumer.ConsumerState; import com.salesforce.storm.spout.dynamic.metrics.LogRecorder; import com.salesforce.storm.spout.dynamic.persistence.PersistenceAdapter; import java.util.Arrays; import java.util.Collections; i...
import com.salesforce.storm.spout.dynamic.*; import com.salesforce.storm.spout.dynamic.consumer.*; import com.salesforce.storm.spout.dynamic.metrics.*; import com.salesforce.storm.spout.dynamic.persistence.*; import java.util.*; import org.apache.kafka.clients.consumer.*; import org.apache.kafka.common.*; import org.ju...
[ "com.salesforce.storm", "java.util", "org.apache.kafka", "org.junit.jupiter", "org.mockito" ]
com.salesforce.storm; java.util; org.apache.kafka; org.junit.jupiter; org.mockito;
1,745,089
private void emitCurrentOrLeftover( SortContext localContext, ByteBuffer key, List<ByteBuffer> values) throws IOException { if (leftover != null) { int leftOverCompare = comparator.compare(leftover.getKey(), key); if (leftOverCompare <= 0) { localContext.emit(leftover.getKey(), Immutable...
void function( SortContext localContext, ByteBuffer key, List<ByteBuffer> values) throws IOException { if (leftover != null) { int leftOverCompare = comparator.compare(leftover.getKey(), key); if (leftOverCompare <= 0) { localContext.emit(leftover.getKey(), ImmutableList.of(leftover.getValue())); leftover = null; } } i...
/** * Writes out the provided key and value list. If the leftover item (which was not included in the * sort) is lower lexicographically then it is emitted first. * * If the values are emitted the list will be cleared. If the leftover value is emitted the * leftover value is cleared. * * @param key...
Writes out the provided key and value list. If the leftover item (which was not included in the sort) is lower lexicographically then it is emitted first. If the values are emitted the list will be cleared. If the leftover value is emitted the leftover value is cleared
emitCurrentOrLeftover
{ "repo_name": "OsoTech/appengine-mapreduce", "path": "java/src/main/java/com/google/appengine/tools/mapreduce/impl/sort/SortWorker.java", "license": "apache-2.0", "size": 14293 }
[ "com.google.common.collect.ImmutableList", "java.io.IOException", "java.nio.ByteBuffer", "java.util.ArrayList", "java.util.List" ]
import com.google.common.collect.ImmutableList; import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List;
import com.google.common.collect.*; import java.io.*; import java.nio.*; import java.util.*;
[ "com.google.common", "java.io", "java.nio", "java.util" ]
com.google.common; java.io; java.nio; java.util;
2,494,470
public final void testSetUsername() { String testUsername = null; model = new StandardUserModel(getInstrumentation().getTargetContext()); model.setUsername(testUsername); assertNull(model.getUsername()); }
final void function() { String testUsername = null; model = new StandardUserModel(getInstrumentation().getTargetContext()); model.setUsername(testUsername); assertNull(model.getUsername()); }
/** * Test setters for the username */
Test setters for the username
testSetUsername
{ "repo_name": "CMPUT301W14T01/localpost", "path": "LocalpostTestingTest/src/ca/cs/ualberta/localpost/test/StandardUserModelTest.java", "license": "mit", "size": 3490 }
[ "ca.cs.ualberta.localpost.model.StandardUserModel" ]
import ca.cs.ualberta.localpost.model.StandardUserModel;
import ca.cs.ualberta.localpost.model.*;
[ "ca.cs.ualberta" ]
ca.cs.ualberta;
684,624
public Cookie login(String username, String password) { UserDTO user = new UserDTO(); user.setUserName(username); user.setPassword(password); user.setRememberMe(true); Response response = createWebTarget().path("users").path("login").request() .post(Enti...
Cookie function(String username, String password) { UserDTO user = new UserDTO(); user.setUserName(username); user.setPassword(password); user.setRememberMe(true); Response response = createWebTarget().path("users").path("login").request() .post(Entity.entity(user, MediaType.APPLICATION_JSON)); if (response.getStatus()...
/** * Login para poder consultar los diferentes servicios * * @param username Nombre de usuario * @param password Clave del usuario * @return Cookie con información de la sesión del usuario * @generated */
Login para poder consultar los diferentes servicios
login
{ "repo_name": "Uniandes-MISO4203/artwork-201620-1", "path": "artwork-api/src/test/java/co/edu/uniandes/csw/artwork/tests/rest/QualificationTest.java", "license": "mit", "size": 11389 }
[ "co.edu.uniandes.csw.auth.model.UserDTO", "javax.ws.rs.client.Entity", "javax.ws.rs.core.Cookie", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response" ]
import co.edu.uniandes.csw.auth.model.UserDTO; import javax.ws.rs.client.Entity; import javax.ws.rs.core.Cookie; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response;
import co.edu.uniandes.csw.auth.model.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*;
[ "co.edu.uniandes", "javax.ws" ]
co.edu.uniandes; javax.ws;
2,408,828
private int detectShape(Bitmap targetBitmap) { if(targetBitmap != null) { double filteredMatches = 0; double highestMatchCount = 0; int highestMatchCountIndex = 0; //Setting the FeatureDetector, DescriptorExtractor and DescriptorMatcher algorithms...
int function(Bitmap targetBitmap) { if(targetBitmap != null) { double filteredMatches = 0; double highestMatchCount = 0; int highestMatchCountIndex = 0; FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB); DescriptorExtractor descriptor = DescriptorExtractor.create(DescriptorExtractor.ORB); Descripto...
/** * Compares a frame with all the saved frames in comparisonObjects. * * @param targetBitmap Bitmap which needs to get matched. * @return int Returns a positive integer if a valid shape is detected ( can be used as an index of * compariso...
Compares a frame with all the saved frames in comparisonObjects
detectShape
{ "repo_name": "19Dima89/Detector", "path": "app/src/main/java/de/rosenheim/fh/bachelor/threads/MatcherThread.java", "license": "apache-2.0", "size": 6948 }
[ "android.graphics.Bitmap", "de.rosenheim.fh.bachelor.detector.UtilityClass", "org.opencv.android.Utils", "org.opencv.core.Mat", "org.opencv.core.MatOfDMatch", "org.opencv.core.MatOfKeyPoint", "org.opencv.features2d.DescriptorExtractor", "org.opencv.features2d.DescriptorMatcher", "org.opencv.features...
import android.graphics.Bitmap; import de.rosenheim.fh.bachelor.detector.UtilityClass; import org.opencv.android.Utils; import org.opencv.core.Mat; import org.opencv.core.MatOfDMatch; import org.opencv.core.MatOfKeyPoint; import org.opencv.features2d.DescriptorExtractor; import org.opencv.features2d.DescriptorMatcher; ...
import android.graphics.*; import de.rosenheim.fh.bachelor.detector.*; import org.opencv.android.*; import org.opencv.core.*; import org.opencv.features2d.*; import org.opencv.imgproc.*;
[ "android.graphics", "de.rosenheim.fh", "org.opencv.android", "org.opencv.core", "org.opencv.features2d", "org.opencv.imgproc" ]
android.graphics; de.rosenheim.fh; org.opencv.android; org.opencv.core; org.opencv.features2d; org.opencv.imgproc;
244,010
@Test public void containersShouldExpireInSetTimeframe() throws IOException, URISyntaxException, InterruptedException { manager.startAllInactiveContainers(); await().until(() -> { ServerContainer container = manager.getContainer(0); return container.getState().isStarted(); }); Str...
void function() throws IOException, URISyntaxException, InterruptedException { manager.startAllInactiveContainers(); await().until(() -> { ServerContainer container = manager.getContainer(0); return container.getState().isStarted(); }); String key = STR; String value = "Foo"; client.setPort(Integer.parseInt(manager.get...
/** * Test that if a session is not used within the expiration time, it is expired and removed from * all containers */
Test that if a session is not used within the expiration time, it is expired and removed from all containers
containersShouldExpireInSetTimeframe
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/CargoTestBase.java", "license": "apache-2.0", "size": 16269 }
[ "java.io.IOException", "java.net.URISyntaxException", "java.util.concurrent.TimeUnit", "org.apache.geode.test.awaitility.GeodeAwaitility" ]
import java.io.IOException; import java.net.URISyntaxException; import java.util.concurrent.TimeUnit; import org.apache.geode.test.awaitility.GeodeAwaitility;
import java.io.*; import java.net.*; import java.util.concurrent.*; import org.apache.geode.test.awaitility.*;
[ "java.io", "java.net", "java.util", "org.apache.geode" ]
java.io; java.net; java.util; org.apache.geode;
2,828,399
public void processPacket(Packet p) { if (p instanceof Message) { final Message message = (Message) p; if(message.getType() == Message.Type.groupchat) { if(!StringUtils.parseResource(message.getFrom()).equalsIgnoreCase(conf.getString("connection.nickname", "MinecraftBot"...
void function(Packet p) { if (p instanceof Message) { final Message message = (Message) p; if(message.getType() == Message.Type.groupchat) { if(!StringUtils.parseResource(message.getFrom()).equalsIgnoreCase(conf.getString(STR, STR))) { if (message.getBody().startsWith(conf.getString(STR, "!"))) { if (message.getBody()....
/** * Process a incoming XMPP packet * * @param p the (@link Packet) to process */
Process a incoming XMPP packet
processPacket
{ "repo_name": "nikdoof/bukkitxmpp", "path": "src/main/java/com/pleaseignore/BukkitXMPP/BukkitXMPP.java", "license": "mit", "size": 8977 }
[ "org.bukkit.ChatColor", "org.bukkit.entity.Player", "org.jivesoftware.smack.packet.Message", "org.jivesoftware.smack.packet.Packet", "org.jivesoftware.smack.util.StringUtils" ]
import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Packet; import org.jivesoftware.smack.util.StringUtils;
import org.bukkit.*; import org.bukkit.entity.*; import org.jivesoftware.smack.packet.*; import org.jivesoftware.smack.util.*;
[ "org.bukkit", "org.bukkit.entity", "org.jivesoftware.smack" ]
org.bukkit; org.bukkit.entity; org.jivesoftware.smack;
1,796,026
@Test @Mode(TestMode.FULL) public void testUntrustedForwardedForAndPortWithIPv4AndIPv6RemoteIpConfig() throws Exception { String variation = "IPv4IPv6RemoteIP"; String testName = "testUntrustedForwardedForAndPortWithIPv4AndIPv6RemoteIpConfig"; String servletName = "EndpointInformatio...
@Mode(TestMode.FULL) void function() throws Exception { String variation = STR; String testName = STR; String servletName = STR; startServer(variation); List<BasicHeader> headerList = new ArrayList<BasicHeader>(); headerList.addAll(Arrays.asList(new BasicHeader(STR, "for=\"[2001:db9:cafe::17]:943\STR[2002:db8:ab:1234::...
/** * Test untrusted Forwarded for parameters with ports. * * The remote client address and remote port should not be verified. * * @throws Exception */
Test untrusted Forwarded for parameters with ports. The remote client address and remote port should not be verified
testUntrustedForwardedForAndPortWithIPv4AndIPv6RemoteIpConfig
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.transport.http.remoteip_fat/fat/src/com/ibm/ws/transport/http/HttpXForwardedAndForwardedHeaderTests.java", "license": "epl-1.0", "size": 99694 }
[ "com.ibm.websphere.simplicity.log.Log", "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.apache.http.HttpResponse", "org.apache.http.message.BasicHeader", "org.junit.Assert" ]
import com.ibm.websphere.simplicity.log.Log; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.http.HttpResponse; import org.apache.http.message.BasicHeader; import org.junit.Assert;
import com.ibm.websphere.simplicity.log.*; import java.util.*; import org.apache.http.*; import org.apache.http.message.*; import org.junit.*;
[ "com.ibm.websphere", "java.util", "org.apache.http", "org.junit" ]
com.ibm.websphere; java.util; org.apache.http; org.junit;
2,093,713
public void publishDocuments(List<String> documentIds, String documentLists) throws Exception { MozuClient client = com.mozu.api.clients.content.DocumentDraftSummaryClient.publishDocumentsClient( documentIds, documentLists); client.setContext(_apiContext); client.executeRequest(); client.cleanupHttpConnect...
void function(List<String> documentIds, String documentLists) throws Exception { MozuClient client = com.mozu.api.clients.content.DocumentDraftSummaryClient.publishDocumentsClient( documentIds, documentLists); client.setContext(_apiContext); client.executeRequest(); client.cleanupHttpConnection(); }
/** * Publish one or more document drafts to live content on the site. * <p><pre><code> * DocumentDraftSummary documentdraftsummary = new DocumentDraftSummary(); * documentdraftsummary.publishDocuments( documentIds, documentLists); * </code></pre></p> * @param documentLists List of document lists that cont...
Publish one or more document drafts to live content on the site. <code><code> DocumentDraftSummary documentdraftsummary = new DocumentDraftSummary(); documentdraftsummary.publishDocuments( documentIds, documentLists); </code></code>
publishDocuments
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/content/DocumentDraftSummaryResource.java", "license": "mit", "size": 5869 }
[ "com.mozu.api.MozuClient", "java.util.List" ]
import com.mozu.api.MozuClient; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
1,173,907
T receive() throws NetworkException, InterruptedException; }
T receive() throws NetworkException, InterruptedException; }
/** * Receiver the element broadcasted by sender. * * @return the element broadcasted by sender */
Receiver the element broadcasted by sender
receive
{ "repo_name": "swlsw/incubator-reef", "path": "lang/java/reef-io/src/main/java/org/apache/reef/io/network/group/api/operators/Broadcast.java", "license": "apache-2.0", "size": 2000 }
[ "org.apache.reef.exception.evaluator.NetworkException" ]
import org.apache.reef.exception.evaluator.NetworkException;
import org.apache.reef.exception.evaluator.*;
[ "org.apache.reef" ]
org.apache.reef;
2,669,894
@Override public Adapter createModelAdapter() { if (modelItemProvider == null) { modelItemProvider = new ModelItemProvider(this); } return modelItemProvider; }
Adapter function() { if (modelItemProvider == null) { modelItemProvider = new ModelItemProvider(this); } return modelItemProvider; }
/** * This creates an adapter for a {@link es.ucm.fdi.emf.model.ed2.Model}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>es.ucm.fdi.emf.model.ed2.Model</code>.
createModelAdapter
{ "repo_name": "RubenM13/E-EDD-2.0", "path": "es.ucm.fdi.ed2.emf.edit/src/es/ucm/fdi/emf/model/ed2/provider/Ed2ItemProviderAdapterFactory.java", "license": "gpl-3.0", "size": 9859 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
784,999
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1783") public final class InProcessServerBuilder extends AbstractServerImplBuilder<InProcessServerBuilder> { public static InProcessServerBuilder forName(String name) { return new InProcessServerBuilder(name); }
@ExperimentalApi("https:final class InProcessServerBuilder extends AbstractServerImplBuilder<InProcessServerBuilder> { public static InProcessServerBuilder function(String name) { return new InProcessServerBuilder(name); }
/** * Create a server builder that will bind with the given name. * * @param name the identity of the server for clients to connect to * @return a new builder */
Create a server builder that will bind with the given name
forName
{ "repo_name": "pieterjanpintens/grpc-java", "path": "core/src/main/java/io/grpc/inprocess/InProcessServerBuilder.java", "license": "apache-2.0", "size": 3541 }
[ "io.grpc.ExperimentalApi", "io.grpc.internal.AbstractServerImplBuilder" ]
import io.grpc.ExperimentalApi; import io.grpc.internal.AbstractServerImplBuilder;
import io.grpc.*; import io.grpc.internal.*;
[ "io.grpc", "io.grpc.internal" ]
io.grpc; io.grpc.internal;
560,333
public void handleRegisterRequest(String username, String authUserName, String password) { this.authUserName = authUserName; this.username = username; this.password = password; try { sipManager.startRegisterProcess(username, authUserName, password); } ...
void function(String username, String authUserName, String password) { this.authUserName = authUserName; this.username = username; this.password = password; try { sipManager.startRegisterProcess(username, authUserName, password); } catch (CommunicationsException exc) { Log.error(STR, exc); } }
/** * Handle an RegisterRequest * * @param username username * @param authUserName Authorization username * @param password password */
Handle an RegisterRequest
handleRegisterRequest
{ "repo_name": "joshuairl/toothchat-client", "path": "src/plugins/sip/src/java/net/java/sipmack/softphone/SoftPhoneManager.java", "license": "apache-2.0", "size": 38087 }
[ "net.java.sipmack.common.Log", "net.java.sipmack.sip.CommunicationsException" ]
import net.java.sipmack.common.Log; import net.java.sipmack.sip.CommunicationsException;
import net.java.sipmack.common.*; import net.java.sipmack.sip.*;
[ "net.java.sipmack" ]
net.java.sipmack;
1,139,522
@Nonnull public static <KEYTYPE, VALUETYPE> Enumeration <Map.Entry <KEYTYPE, VALUETYPE>> getEnumeration (@Nullable final Map <KEYTYPE, VALUETYPE> aMap) { if (aMap == null) return EmptyEnumeration.<Map.Entry <KEYTYPE, VALUETYPE>> getInstance (); return getEnumeration (aMap.entrySet ()); }
static <KEYTYPE, VALUETYPE> Enumeration <Map.Entry <KEYTYPE, VALUETYPE>> function (@Nullable final Map <KEYTYPE, VALUETYPE> aMap) { if (aMap == null) return EmptyEnumeration.<Map.Entry <KEYTYPE, VALUETYPE>> getInstance (); return getEnumeration (aMap.entrySet ()); }
/** * Get an Enumeration object based on a Map object. * * @param <KEYTYPE> * map key type * @param <VALUETYPE> * map value type * @param aMap * map object to use * @return an Enumeration object */
Get an Enumeration object based on a Map object
getEnumeration
{ "repo_name": "lsimons/phloc-schematron-standalone", "path": "phloc-commons/src/main/java/com/phloc/commons/collections/ContainerHelper.java", "license": "apache-2.0", "size": 126718 }
[ "com.phloc.commons.collections.iterate.EmptyEnumeration", "java.util.Enumeration", "java.util.Map", "javax.annotation.Nullable" ]
import com.phloc.commons.collections.iterate.EmptyEnumeration; import java.util.Enumeration; import java.util.Map; import javax.annotation.Nullable;
import com.phloc.commons.collections.iterate.*; import java.util.*; import javax.annotation.*;
[ "com.phloc.commons", "java.util", "javax.annotation" ]
com.phloc.commons; java.util; javax.annotation;
2,364,932
@UiHandler("executionModeList") void handleExecutionModeChange(final ChangeEvent event) { final String newExecmode = this.executionModeList.getValue(this.executionModeList.getSelectedIndex()); if (newExecmode == null) { getDelegate().executionModeChanged(null); } else if (new...
@UiHandler(STR) void handleExecutionModeChange(final ChangeEvent event) { final String newExecmode = this.executionModeList.getValue(this.executionModeList.getSelectedIndex()); if (newExecmode == null) { getDelegate().executionModeChanged(null); } else if (newExecmode.equals(EXECUTE_ALL)) { getDelegate().executionModeC...
/** * Change handler on the execution mode input. * * @param event the change event */
Change handler on the execution mode input
handleExecutionModeChange
{ "repo_name": "sunix/che-plugins", "path": "plugin-datasource/che-plugin-datasource-ext-client/src/main/java/org/eclipse/che/ide/ext/datasource/client/sqllauncher/SqlRequestLauncherViewImpl.java", "license": "epl-1.0", "size": 10659 }
[ "com.google.gwt.event.dom.client.ChangeEvent", "com.google.gwt.uibinder.client.UiHandler", "org.eclipse.che.ide.ext.datasource.shared.MultipleRequestExecutionMode" ]
import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.uibinder.client.UiHandler; import org.eclipse.che.ide.ext.datasource.shared.MultipleRequestExecutionMode;
import com.google.gwt.event.dom.client.*; import com.google.gwt.uibinder.client.*; import org.eclipse.che.ide.ext.datasource.shared.*;
[ "com.google.gwt", "org.eclipse.che" ]
com.google.gwt; org.eclipse.che;
1,565,104
public void ignorableWhitespace(char ch[], int start, int length) throws SAXException { if (contentHandler != null) { contentHandler.ignorableWhitespace(ch, start, length); } }
void function(char ch[], int start, int length) throws SAXException { if (contentHandler != null) { contentHandler.ignorableWhitespace(ch, start, length); } }
/** * Filter an ignorable whitespace event. * * @param ch * An array of characters. * @param start * The starting position in the array. * @param length * The number of characters to use from the array. * @exception org.xml.sax.SAXException * The clie...
Filter an ignorable whitespace event
ignorableWhitespace
{ "repo_name": "webos21/xi", "path": "java/jcl/src/java/org/xml/sax/helpers/XMLFilterImpl.java", "license": "apache-2.0", "size": 19332 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
812,480
@Override @XmlElement(name = "citation", namespace = Namespaces.GMI, required = true) public Citation getCitation() { return citation; }
@XmlElement(name = STR, namespace = Namespaces.GMI, required = true) Citation function() { return citation; }
/** * Returns the information identifying the algorithm and version or date. * * @return algorithm and version or date, or {@code null}. */
Returns the information identifying the algorithm and version or date
getCitation
{ "repo_name": "Geomatys/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/lineage/DefaultAlgorithm.java", "license": "apache-2.0", "size": 6634 }
[ "javax.xml.bind.annotation.XmlElement", "org.apache.sis.xml.Namespaces", "org.opengis.metadata.citation.Citation" ]
import javax.xml.bind.annotation.XmlElement; import org.apache.sis.xml.Namespaces; import org.opengis.metadata.citation.Citation;
import javax.xml.bind.annotation.*; import org.apache.sis.xml.*; import org.opengis.metadata.citation.*;
[ "javax.xml", "org.apache.sis", "org.opengis.metadata" ]
javax.xml; org.apache.sis; org.opengis.metadata;
97,663
public String cancel() { System.out.println(formation.getNom()); System.out.println("cancel editing"); formation=new Formation(); return JsfUtil.SUCCESS; }
String function() { System.out.println(formation.getNom()); System.out.println(STR); formation=new Formation(); return JsfUtil.SUCCESS; }
/** * method called when user want to cancel editing * @return */
method called when user want to cancel editing
cancel
{ "repo_name": "maximeSauvage/GestiForm", "path": "gestiform/src/main/java/be/atc/gestiform/formation/view/FormationEditView.java", "license": "gpl-2.0", "size": 2471 }
[ "be.atc.gestiform.formation.entity.Formation", "be.atc.gestiform.util.JsfUtil" ]
import be.atc.gestiform.formation.entity.Formation; import be.atc.gestiform.util.JsfUtil;
import be.atc.gestiform.formation.entity.*; import be.atc.gestiform.util.*;
[ "be.atc.gestiform" ]
be.atc.gestiform;
2,768,897
private static native JsArrayString nativeGetFormats();
static native JsArrayString function();
/** * Returns the available image formats for gallery widget mode.<p> * * @return the available image formats */
Returns the available image formats for gallery widget mode
nativeGetFormats
{ "repo_name": "serrapos/opencms-core", "path": "src-gwt/org/opencms/ade/galleries/client/preview/CmsPreviewUtil.java", "license": "lgpl-2.1", "size": 15765 }
[ "com.google.gwt.core.client.JsArrayString" ]
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.core.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,511,118
return new ShouldBeInSameYear(actual, other); } private ShouldBeInSameYear(Date actual, Date other) { super("expecting:\n<%s> to be on same year as <%s>", actual, other); }
return new ShouldBeInSameYear(actual, other); } private ShouldBeInSameYear(Date actual, Date other) { super(STR, actual, other); }
/** * Creates a new </code>{@link ShouldBeInSameYear}</code>. * @param actual the actual value in the failed assertion. * @param other the value used in the failed assertion to compare the actual value to. * @return the created {@code ErrorMessageFactory}. */
Creates a new </code><code>ShouldBeInSameYear</code></code>
shouldBeInSameYear
{ "repo_name": "alexruiz/fest-assert-2.x", "path": "src/main/java/org/fest/assertions/error/ShouldBeInSameYear.java", "license": "apache-2.0", "size": 1523 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,863,568
private void setWidgetProperty(final Map<String, Object> widgetProperties, final String key, final String[] array) { if (array != null && array.length > 0) { widgetProperties.put(key, array); } }
void function(final Map<String, Object> widgetProperties, final String key, final String[] array) { if (array != null && array.length > 0) { widgetProperties.put(key, array); } }
/** * Set widget property if the array is null and has a length greater than 0. * * @param widgetProperties * @param key * @param array */
Set widget property if the array is null and has a length greater than 0
setWidgetProperty
{ "repo_name": "afiantara/apache-wicket-1.5.7", "path": "src/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java", "license": "apache-2.0", "size": 26783 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,149,829
private void continueAsync() { // If there is no channel waiting for us, there is nothing to do. if (getDAO().getChannel() == null) { if (LOG.isDebugEnabled()) { LOG.debug("no channel on mex=" + getMessageExchangeId()); } return; } if (LOG.isDebugEnabled()) { LOG.debug("create work event for...
void function() { if (getDAO().getChannel() == null) { if (LOG.isDebugEnabled()) { LOG.debug(STR + getMessageExchangeId()); } return; } if (LOG.isDebugEnabled()) { LOG.debug(STR + getMessageExchangeId()); } JobDetails we = new JobDetails(); if (Constants.DEBUG_LEVEL > 0) { System.out.println(STR + getDAO().getInstance(...
/** * Continue from the ASYNC state. * */
Continue from the ASYNC state
continueAsync
{ "repo_name": "TheRingbearer/HAWKS", "path": "ode/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerRoleMessageExchangeImpl.java", "license": "apache-2.0", "size": 5947 }
[ "org.apache.ode.bpel.engine.replayer.Replayer", "org.apache.ode.bpel.extensions.sync.Constants", "org.apache.ode.bpel.iapi.Scheduler" ]
import org.apache.ode.bpel.engine.replayer.Replayer; import org.apache.ode.bpel.extensions.sync.Constants; import org.apache.ode.bpel.iapi.Scheduler;
import org.apache.ode.bpel.engine.replayer.*; import org.apache.ode.bpel.extensions.sync.*; import org.apache.ode.bpel.iapi.*;
[ "org.apache.ode" ]
org.apache.ode;
984,288
public ComponentMetaData getComponentMetaData() //d487943 { return ivComponentMetaData; }
ComponentMetaData function() { return ivComponentMetaData; }
/** * Return ComponentMetaData object to populate with annotation metadata to * be used at a later time. This method will return null during * java:global, java:app, and java:module processing. */
Return ComponentMetaData object to populate with annotation metadata to be used at a later time. This method will return null during java:global, java:app, and java:module processing
getComponentMetaData
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.injection.core/src/com/ibm/wsspi/injectionengine/ComponentNameSpaceConfiguration.java", "license": "epl-1.0", "size": 48728 }
[ "com.ibm.ws.runtime.metadata.ComponentMetaData" ]
import com.ibm.ws.runtime.metadata.ComponentMetaData;
import com.ibm.ws.runtime.metadata.*;
[ "com.ibm.ws" ]
com.ibm.ws;
952,112
@Test public void testWriteRaidTask() throws IOException { // xor RaidTask task = generateRaidTask(RaidCodec.getCodec("xor"), 2, 11, 1); ByteArrayOutputStream out = new ByteArrayOutputStream(); task.write(new DataOutputStream(out)); byte[] buffer = out.toByteArray(); // read and verify ...
void function() throws IOException { RaidTask task = generateRaidTask(RaidCodec.getCodec("xor"), 2, 11, 1); ByteArrayOutputStream out = new ByteArrayOutputStream(); task.write(new DataOutputStream(out)); byte[] buffer = out.toByteArray(); ByteArrayInputStream in = new ByteArrayInputStream(buffer); RaidTask newTask = ne...
/** * Test the serilization of the RaidTask object. * Will write the object, read it out and compare. * */
Test the serilization of the RaidTask object. Will write the object, read it out and compare
testWriteRaidTask
{ "repo_name": "nvoron23/hadoop-20", "path": "src/test/org/apache/hadoop/hdfs/server/protocol/TestRaidTask.java", "license": "apache-2.0", "size": 5137 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.DataInputStream", "java.io.DataOutputStream", "java.io.IOException", "org.apache.hadoop.hdfs.server.protocol.RaidTask", "org.apache.hadoop.raid.RaidCodec", "org.junit.Assert" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.hadoop.hdfs.server.protocol.RaidTask; import org.apache.hadoop.raid.RaidCodec; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.raid.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
821,377
@Exported(name = "fingerprint", inline = true, visibility = -1) public Collection<Fingerprint> getBuildFingerprints() { FingerprintAction fingerprintAction = getAction(FingerprintAction.class); if (fingerprintAction != null) { return fingerprintAction.getFingerprints().values(); ...
@Exported(name = STR, inline = true, visibility = -1) Collection<Fingerprint> function() { FingerprintAction fingerprintAction = getAction(FingerprintAction.class); if (fingerprintAction != null) { return fingerprintAction.getFingerprints().values(); } return Collections.<Fingerprint>emptyList(); } private transient Ob...
/** * get the fingerprints associated with this build * * @return never null */
get the fingerprints associated with this build
getBuildFingerprints
{ "repo_name": "jtnord/jenkins", "path": "core/src/main/java/hudson/model/AbstractBuild.java", "license": "mit", "size": 48784 }
[ "hudson.tasks.Fingerprinter", "java.util.Collection", "java.util.Collections", "org.kohsuke.stapler.export.Exported" ]
import hudson.tasks.Fingerprinter; import java.util.Collection; import java.util.Collections; import org.kohsuke.stapler.export.Exported;
import hudson.tasks.*; import java.util.*; import org.kohsuke.stapler.export.*;
[ "hudson.tasks", "java.util", "org.kohsuke.stapler" ]
hudson.tasks; java.util; org.kohsuke.stapler;
170,026
@Test public void testEagerSchedulingWithSlotTimeout() throws Exception { // we construct a simple graph: (task) final int parallelism = 3; final JobVertex vertex = new JobVertex("task"); vertex.setParallelism(parallelism); vertex.setInvokableClass(NoOpInvokable.class); final JobID jobId = new J...
void function() throws Exception { final int parallelism = 3; final JobVertex vertex = new JobVertex("task"); vertex.setParallelism(parallelism); vertex.setInvokableClass(NoOpInvokable.class); final JobID jobId = new JobID(); final JobGraph jobGraph = new JobGraph(jobId, "test", vertex); final BlockingQueue<AllocationI...
/** * This tests makes sure that with eager scheduling no task is deployed if a single * slot allocation fails. Moreover we check that allocated slots will be returned. */
This tests makes sure that with eager scheduling no task is deployed if a single slot allocation fails. Moreover we check that allocated slots will be returned
testEagerSchedulingWithSlotTimeout
{ "repo_name": "ueshin/apache-flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphSchedulingTest.java", "license": "apache-2.0", "size": 25065 }
[ "java.util.concurrent.ArrayBlockingQueue", "java.util.concurrent.BlockingQueue", "java.util.concurrent.CompletableFuture", "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException", "org.apache.flink.api.common.JobID", "org.apache.flink.runtime.clusterframework.types.AllocationID", "org...
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.clusterframework.types.A...
import java.util.concurrent.*; import org.apache.flink.api.common.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.instance.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.jobmanager.slots.*; import org.apache.flink.runtime.jobmaster.*; import o...
[ "java.util", "org.apache.flink", "org.hamcrest", "org.junit" ]
java.util; org.apache.flink; org.hamcrest; org.junit;
580,911
public static <T extends ClassDef<H>, H> List<T> readClassDefsFromAllComponents(Map<String, Map<String, String>> initialMapDefs, String resource, String propPrefix, Map<String, Map<String, String>> overrideMapDefs, ClassLoader classLoader, ClassDefFactory<T, H> classDefFactory) { Map<String, Map...
static <T extends ClassDef<H>, H> List<T> function(Map<String, Map<String, String>> initialMapDefs, String resource, String propPrefix, Map<String, Map<String, String>> overrideMapDefs, ClassLoader classLoader, ClassDefFactory<T, H> classDefFactory) { Map<String, Map<String, String>> allMapDefs = (initialMapDefs != nul...
/** * High level helper method to read class defs from all components in one shot, with optional initial and override defs. * <p> * WARN: the defs can actually override each other; caller should expect his input maps may get altered. */
High level helper method to read class defs from all components in one shot, with optional initial and override defs.
readClassDefsFromAllComponents
{ "repo_name": "ilscipio/scipio-erp", "path": "framework/base/src/com/ilscipio/scipio/ce/base/util/AdvancedPropertyUtil.java", "license": "apache-2.0", "size": 12584 }
[ "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,423,018
@Test public void testRemove(){ UserDO userDO = this.userDAO.find(1); userDAO.remove(userDO); Assert.assertFalse(userDAO.find(1).isFgActive()); }
void function(){ UserDO userDO = this.userDAO.find(1); userDAO.remove(userDO); Assert.assertFalse(userDAO.find(1).isFgActive()); }
/** * Test Remove */
Test Remove
testRemove
{ "repo_name": "sidlors/digital-booking", "path": "digital-booking-persistence/src/test/java/mx/com/cinepolis/digital/booking/persistence/dao/impl/UserDAOTest.java", "license": "epl-1.0", "size": 17663 }
[ "mx.com.cinepolis.digital.booking.model.UserDO", "org.junit.Assert" ]
import mx.com.cinepolis.digital.booking.model.UserDO; import org.junit.Assert;
import mx.com.cinepolis.digital.booking.model.*; import org.junit.*;
[ "mx.com.cinepolis", "org.junit" ]
mx.com.cinepolis; org.junit;
1,074,115
public void addArgument(int index, Node argument) { if (arguments == null) { arguments = new ArrayList<Node>(); arguments.add(argument); } else { if (index < arguments.size()) { arguments.add(index, argument); } else { logger.error("Argument '" + argument.toString() + "' can't be added a...
void function(int index, Node argument) { if (arguments == null) { arguments = new ArrayList<Node>(); arguments.add(argument); } else { if (index < arguments.size()) { arguments.add(index, argument); } else { logger.error(STR + argument.toString() + STR + index + STR); arguments.add(argument); } } if (getExpectedArgCou...
/** * Add an argument Node to the BuiltinElement at the specified argument location * @param index * @param argument */
Add an argument Node to the BuiltinElement at the specified argument location
addArgument
{ "repo_name": "crapo/sadlos2", "path": "sadl3/com.ge.research.sadl.parent/com.ge.research.sadl.reasoner/com.ge.research.sadl.reasoner-api/src/main/java/com/ge/research/sadl/model/gp/BuiltinElement.java", "license": "epl-1.0", "size": 16514 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,291,689
protected void handleChangedResources() { if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { if (isDirty()) { changedResources.addAll(editingDomain.getResourceSet().getResources()); } editingDomain.getCommandStack().flush(); updateProblemIndication = false; for (Resourc...
void function() { if (!changedResources.isEmpty() && (!isDirty() handleDirtyConflict())) { if (isDirty()) { changedResources.addAll(editingDomain.getResourceSet().getResources()); } editingDomain.getCommandStack().flush(); updateProblemIndication = false; for (Resource resource : changedResources) { if (resource.isLoad...
/** * Handles what to do with changed resources on activation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Handles what to do with changed resources on activation.
handleChangedResources
{ "repo_name": "jhon0010/sirius-blog", "path": "validation/fr.obeo.dsl.felix.metamodel.editor/src/felix/presentation/FelixEditor.java", "license": "epl-1.0", "size": 53885 }
[ "java.io.IOException", "java.util.Collections", "org.eclipse.emf.ecore.resource.Resource", "org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain", "org.eclipse.jface.viewers.StructuredSelection" ]
import java.io.IOException; import java.util.Collections; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.jface.viewers.StructuredSelection;
import java.io.*; import java.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*;
[ "java.io", "java.util", "org.eclipse.emf", "org.eclipse.jface" ]
java.io; java.util; org.eclipse.emf; org.eclipse.jface;
426,891
public boolean deleteBillingCode(String codeId) { boolean retval = true; BillingService billingService = billingServiceDao.find(Integer.parseInt(codeId)); billingServiceDao.remove(billingService); return retval; }
boolean function(String codeId) { boolean retval = true; BillingService billingService = billingServiceDao.find(Integer.parseInt(codeId)); billingServiceDao.remove(billingService); return retval; }
/** * Removes a private billing code from database * @param codeId String - The service code to be removed * @return boolean */
Removes a private billing code from database
deleteBillingCode
{ "repo_name": "williamgrosset/OSCAR-ConCert", "path": "src/main/java/oscar/oscarBilling/ca/bc/data/BillingCodeData.java", "license": "gpl-2.0", "size": 11021 }
[ "org.oscarehr.common.model.BillingService" ]
import org.oscarehr.common.model.BillingService;
import org.oscarehr.common.model.*;
[ "org.oscarehr.common" ]
org.oscarehr.common;
1,551,543
public List<TagEntry> getTags(String uname) throws IOException, ServiceException { String tagUrl = API_PREFIX + uname + "?kind=tag"; UserFeed userFeed = getFeed(tagUrl, UserFeed.class); List<GphotoEntry> entries = userFeed.getEntries(); List<TagEntry> tags = new ArrayList<TagEntry>(); for (...
List<TagEntry> function(String uname) throws IOException, ServiceException { String tagUrl = API_PREFIX + uname + STR; UserFeed userFeed = getFeed(tagUrl, UserFeed.class); List<GphotoEntry> entries = userFeed.getEntries(); List<TagEntry> tags = new ArrayList<TagEntry>(); for (GphotoEntry entry : entries) { GphotoEntry ...
/** * Retrieves the tags for the given user. These are tags aggregated across * the entire account. */
Retrieves the tags for the given user. These are tags aggregated across the entire account
getTags
{ "repo_name": "vanta/gdata-java-client", "path": "java/sample/photos/PicasawebClient.java", "license": "apache-2.0", "size": 8005 }
[ "com.google.gdata.data.photos.GphotoEntry", "com.google.gdata.data.photos.TagEntry", "com.google.gdata.data.photos.UserFeed", "com.google.gdata.util.ServiceException", "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import com.google.gdata.data.photos.GphotoEntry; import com.google.gdata.data.photos.TagEntry; import com.google.gdata.data.photos.UserFeed; import com.google.gdata.util.ServiceException; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import com.google.gdata.data.photos.*; import com.google.gdata.util.*; import java.io.*; import java.util.*;
[ "com.google.gdata", "java.io", "java.util" ]
com.google.gdata; java.io; java.util;
1,807,660
@Override public void printTo(StringBuffer buf, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) { if (hasMilliSecondPrecision) { buf.append(instant - displayOffset); } else { buf.append((instant - displ...
void function(StringBuffer buf, long instant, Chronology chrono, int displayOffset, DateTimeZone displayZone, Locale locale) { if (hasMilliSecondPrecision) { buf.append(instant - displayOffset); } else { buf.append((instant - displayOffset) / 1000); } }
/** * We adjust the instant by displayOffset to adjust for the offset that might have been added in * {@link DateTimeFormatter#printTo(Appendable, long, Chronology)} when using a time zone. */
We adjust the instant by displayOffset to adjust for the offset that might have been added in <code>DateTimeFormatter#printTo(Appendable, long, Chronology)</code> when using a time zone
printTo
{ "repo_name": "ern/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/joda/Joda.java", "license": "apache-2.0", "size": 27428 }
[ "java.util.Locale", "org.joda.time.Chronology", "org.joda.time.DateTimeZone" ]
import java.util.Locale; import org.joda.time.Chronology; import org.joda.time.DateTimeZone;
import java.util.*; import org.joda.time.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
1,192,473
private E awaitMatch(Node s, Node pred, E e, boolean timed, long nanos) { long lastTime = timed ? System.nanoTime() : 0L; Thread w = Thread.currentThread(); int spins = -1; // initialized after first item and cancel checks ThreadLocalRandom randomYields = null; // bound if needed ...
E function(Node s, Node pred, E e, boolean timed, long nanos) { long lastTime = timed ? System.nanoTime() : 0L; Thread w = Thread.currentThread(); int spins = -1; ThreadLocalRandom randomYields = null; for (;;) { Object item = s.item; if (item != e) { s.forgetContents(); return LinkedTransferQueue.<E>cast(item); } if (...
/** * Spins/yields/blocks until node s is matched or caller gives up. * * @param s the waiting node * @param pred the predecessor of s, or s itself if it has no * predecessor, or null if unknown (the null case does not occur * in any current calls but may in possible future extensions) ...
Spins/yields/blocks until node s is matched or caller gives up
awaitMatch
{ "repo_name": "h2oai/h2o-3", "path": "h2o-core/src/main/java/jsr166y/LinkedTransferQueue.java", "license": "apache-2.0", "size": 55445 }
[ "java.util.concurrent.locks.LockSupport" ]
import java.util.concurrent.locks.LockSupport;
import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
2,287,353
public void setURI(final URI uri) { ensureValidURI(uri); String sUri = uri.toString(); ElementUtils.contains(getRoot(), URI).setText(sUri); }
void function(final URI uri) { ensureValidURI(uri); String sUri = uri.toString(); ElementUtils.contains(getRoot(), URI).setText(sUri); }
/** * change the nampespace uri. * @param URI the new uri * @throws IllegalArgumentException if uri is null or empty */
change the nampespace uri
setURI
{ "repo_name": "oscarfonts/geoserver-manager", "path": "src/main/java/it/geosolutions/geoserver/rest/encoder/GSNamespaceEncoder.java", "license": "mit", "size": 4168 }
[ "it.geosolutions.geoserver.rest.encoder.utils.ElementUtils" ]
import it.geosolutions.geoserver.rest.encoder.utils.ElementUtils;
import it.geosolutions.geoserver.rest.encoder.utils.*;
[ "it.geosolutions.geoserver" ]
it.geosolutions.geoserver;
1,683,536
public Entity getProjectile() { return projectile; }
Entity function() { return projectile; }
/** * Gets the projectile which will be launched by this event * * @return the launched projectile */
Gets the projectile which will be launched by this event
getProjectile
{ "repo_name": "Sindresgaming/Spigot-API", "path": "src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java", "license": "gpl-3.0", "size": 2086 }
[ "org.bukkit.entity.Entity" ]
import org.bukkit.entity.Entity;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
748,920
public Injector getN4JSChildInjector() { return getInjector(N4JSActivator.ORG_ECLIPSE_N4JS_N4JS); }
Injector function() { return getInjector(N4JSActivator.ORG_ECLIPSE_N4JS_N4JS); }
/** * Returns with the injector for the {@code N4JS} language. This method has the same effect as calling * {@link #getInjector(String)} with the {@link N4JSActivator#ORG_ECLIPSE_N4JS_N4JS} argument. * * @return returns with the shared injector instance for the current plug-in. The returning injector is the chi...
Returns with the injector for the N4JS language. This method has the same effect as calling <code>#getInjector(String)</code> with the <code>N4JSActivator#ORG_ECLIPSE_N4JS_N4JS</code> argument
getN4JSChildInjector
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.ui/src/org/eclipse/n4js/ui/utils/N4JSGuiceUIPlugin.java", "license": "epl-1.0", "size": 2087 }
[ "com.google.inject.Injector", "org.eclipse.n4js.ui.internal.N4JSActivator" ]
import com.google.inject.Injector; import org.eclipse.n4js.ui.internal.N4JSActivator;
import com.google.inject.*; import org.eclipse.n4js.ui.internal.*;
[ "com.google.inject", "org.eclipse.n4js" ]
com.google.inject; org.eclipse.n4js;
1,000,040
public static String createEncodedWords(String str) { byte[] bytes = Utils.getBytes(str); String b64Str = base64.encodeToString(bytes); int b64StrSize = b64Str.length(); StringBuilder sb = new StringBuilder(); if (b64StrSize > AVAILABLE) { char[] chars = str.to...
static String function(String str) { byte[] bytes = Utils.getBytes(str); String b64Str = base64.encodeToString(bytes); int b64StrSize = b64Str.length(); StringBuilder sb = new StringBuilder(); if (b64StrSize > AVAILABLE) { char[] chars = str.toCharArray(); final int maxSizeBeforeEncoding = (AVAILABLE * 3 / 4) - 3; Stri...
/** * Creates a Base64 MIME compatible encoded-word. * <p> * See section #2 at * <a href="https://tools.ietf.org/html/rfc2047" target="_blank">https://tools.ietf.org/html/rfc2047</a> * for more details. * </p> * * @param str * @return * @see https://tools.ietf.org/html/...
Creates a Base64 MIME compatible encoded-word. See section #2 at HREF for more details.
createEncodedWords
{ "repo_name": "Gericop/TakiMail", "path": "src/com/takisoft/mail/util/MimeUtils.java", "license": "unlicense", "size": 3152 }
[ "com.takisoft.mail.MailConstants" ]
import com.takisoft.mail.MailConstants;
import com.takisoft.mail.*;
[ "com.takisoft.mail" ]
com.takisoft.mail;
1,720,049
public threat_subcategories_lkp fetchByPrimaryKey(long id) throws SystemException { threat_subcategories_lkp threat_subcategories_lkp = (threat_subcategories_lkp)EntityCacheUtil.getResult(threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED, threat_subcategories_lkpImpl.class, id); if (threat_subcategor...
threat_subcategories_lkp function(long id) throws SystemException { threat_subcategories_lkp threat_subcategories_lkp = (threat_subcategories_lkp)EntityCacheUtil.getResult(threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED, threat_subcategories_lkpImpl.class, id); if (threat_subcategories_lkp == _nullthreat_subcate...
/** * Returns the threat_subcategories_lkp with the primary key or returns <code>null</code> if it could not be found. * * @param id the primary key of the threat_subcategories_lkp * @return the threat_subcategories_lkp, or <code>null</code> if a threat_subcategories_lkp with the primary key could not be found ...
Returns the threat_subcategories_lkp with the primary key or returns <code>null</code> if it could not be found
fetchByPrimaryKey
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/threat_subcategories_lkpPersistenceImpl.java", "license": "gpl-2.0", "size": 36809 }
[ "com.liferay.portal.kernel.dao.orm.EntityCacheUtil", "com.liferay.portal.kernel.dao.orm.Session", "com.liferay.portal.kernel.exception.SystemException" ]
import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*;
[ "com.liferay.portal" ]
com.liferay.portal;
795,908
public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityComparator(); }
TileEntity function(World worldIn, int meta) { return new TileEntityComparator(); }
/** * Returns a new instance of a block's tile entity class. Called on placing the block. */
Returns a new instance of a block's tile entity class. Called on placing the block
createNewTileEntity
{ "repo_name": "Im-Jrotica/forge_latest", "path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockRedstoneComparator.java", "license": "lgpl-2.1", "size": 14444 }
[ "net.minecraft.tileentity.TileEntity", "net.minecraft.tileentity.TileEntityComparator", "net.minecraft.world.World" ]
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityComparator; import net.minecraft.world.World;
import net.minecraft.tileentity.*; import net.minecraft.world.*;
[ "net.minecraft.tileentity", "net.minecraft.world" ]
net.minecraft.tileentity; net.minecraft.world;
860,246
public String getSystemId() { if (inputSource == null) { return null; } else { return inputSource.getSystemId(); } } private XMLReader reader; private InputSource inputSource;
String function() { if (inputSource == null) { return null; } else { return inputSource.getSystemId(); } } private XMLReader reader; private InputSource inputSource;
/** * <p>Get the base ID (URI or system ID) from where URIs * will be resolved.</p> * * @return Base URL for the <code>Source</code>, or <code>null</code>. */
Get the base ID (URI or system ID) from where URIs will be resolved
getSystemId
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/javax/xml/transform/sax/SAXSource.java", "license": "apache-2.0", "size": 7104 }
[ "org.xml.sax.InputSource", "org.xml.sax.XMLReader" ]
import org.xml.sax.InputSource; import org.xml.sax.XMLReader;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
420,835
Observable<ArrayList<Repo>> searchRepo(String key, String language);
Observable<ArrayList<Repo>> searchRepo(String key, String language);
/** * Search repository by key & language. * @param key * @param language * @return */
Search repository by key & language
searchRepo
{ "repo_name": "mingjunli/GithubApp", "path": "app/src/main/java/com/anly/githubapp/data/api/RepoApi.java", "license": "apache-2.0", "size": 4056 }
[ "com.anly.githubapp.data.model.Repo", "java.util.ArrayList" ]
import com.anly.githubapp.data.model.Repo; import java.util.ArrayList;
import com.anly.githubapp.data.model.*; import java.util.*;
[ "com.anly.githubapp", "java.util" ]
com.anly.githubapp; java.util;
2,155,146
public void unload(Chunk chunkIn) { if (this.worldObj.provider.canDropChunk(chunkIn.xPosition, chunkIn.zPosition)) { this.droppedChunksSet.add(Long.valueOf(ChunkPos.asLong(chunkIn.xPosition, chunkIn.zPosition))); chunkIn.unloaded = true; } }
void function(Chunk chunkIn) { if (this.worldObj.provider.canDropChunk(chunkIn.xPosition, chunkIn.zPosition)) { this.droppedChunksSet.add(Long.valueOf(ChunkPos.asLong(chunkIn.xPosition, chunkIn.zPosition))); chunkIn.unloaded = true; } }
/** * Unloads a chunk */
Unloads a chunk
unload
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/world/gen/ChunkProviderServer.java", "license": "lgpl-2.1", "size": 11331 }
[ "net.minecraft.util.math.ChunkPos", "net.minecraft.world.chunk.Chunk" ]
import net.minecraft.util.math.ChunkPos; import net.minecraft.world.chunk.Chunk;
import net.minecraft.util.math.*; import net.minecraft.world.chunk.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
2,802,273
public static Date elapsedTimeToDate(long elapsedTime) { long wallTime = currentWallTime() + elapsedTime - currentElapsedTime(); return new Date(wallTime); }
static Date function(long elapsedTime) { long wallTime = currentWallTime() + elapsedTime - currentElapsedTime(); return new Date(wallTime); }
/** * This is to convert the elapsedTime to a Date. * @return A date object indicated by the elapsedTime. */
This is to convert the elapsedTime to a Date
elapsedTimeToDate
{ "repo_name": "jackkiexu/tuomatuo", "path": "tuomatuo-mq/src/main/java/com/lami/tuomatuo/mq/zookeeper/common/Time.java", "license": "gpl-2.0", "size": 1976 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
582,884
default boolean removeIf(Predicate<? super E> filter) { Objects.requireNonNull(filter); boolean removed = false; final Iterator<E> each = iterator(); while (each.hasNext()) { if (filter.test(each.next())) { each.remove(); removed = true; ...
default boolean removeIf(Predicate<? super E> filter) { Objects.requireNonNull(filter); boolean removed = false; final Iterator<E> each = iterator(); while (each.hasNext()) { if (filter.test(each.next())) { each.remove(); removed = true; } } return removed; }
/** * Removes all of the elements of this collection that satisfy the given * predicate. Errors or runtime exceptions thrown during iteration or by * the predicate are relayed to the caller. * * @implSpec * The default implementation traverses all elements of the collection using * i...
Removes all of the elements of this collection that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller
removeIf
{ "repo_name": "universsky/openjdk", "path": "jdk/src/java.base/share/classes/java/util/Collection.java", "license": "gpl-2.0", "size": 28814 }
[ "java.util.function.Predicate" ]
import java.util.function.Predicate;
import java.util.function.*;
[ "java.util" ]
java.util;
693
public ContentPreviewerFactoryBuilder binary( BiFunction<? super HttpHeaders, ? super ByteBuf, String> producer, BiPredicate<? super RequestContext, ? super HttpHeaders> predicate) { requireNonNull(predicate, "predicate"); requireNonNull(producer, "producer"); preview...
ContentPreviewerFactoryBuilder function( BiFunction<? super HttpHeaders, ? super ByteBuf, String> producer, BiPredicate<? super RequestContext, ? super HttpHeaders> predicate) { requireNonNull(predicate, STR); requireNonNull(producer, STR); previewSpecsBuilder.add(new PreviewSpec(predicate, PreviewMode.BINARY, producer...
/** * Sets the specified {@link BiPredicate} to produce the preview using the specified * {@link BiFunction} when the predicate returns {@code true}. */
Sets the specified <code>BiPredicate</code> to produce the preview using the specified <code>BiFunction</code> when the predicate returns true
binary
{ "repo_name": "line/armeria", "path": "core/src/main/java/com/linecorp/armeria/common/logging/ContentPreviewerFactoryBuilder.java", "license": "apache-2.0", "size": 9131 }
[ "com.linecorp.armeria.common.HttpHeaders", "com.linecorp.armeria.common.RequestContext", "com.linecorp.armeria.common.logging.PreviewSpec", "io.netty.buffer.ByteBuf", "java.util.Objects", "java.util.function.BiFunction", "java.util.function.BiPredicate" ]
import com.linecorp.armeria.common.HttpHeaders; import com.linecorp.armeria.common.RequestContext; import com.linecorp.armeria.common.logging.PreviewSpec; import io.netty.buffer.ByteBuf; import java.util.Objects; import java.util.function.BiFunction; import java.util.function.BiPredicate;
import com.linecorp.armeria.common.*; import com.linecorp.armeria.common.logging.*; import io.netty.buffer.*; import java.util.*; import java.util.function.*;
[ "com.linecorp.armeria", "io.netty.buffer", "java.util" ]
com.linecorp.armeria; io.netty.buffer; java.util;
665,044
public List<DetailInfo> getDetailInfosForSubsites(CmsObject cms) { List<DetailInfo> result = Lists.newArrayList(); for (CmsADEConfigDataInternal configData : m_siteConfigurationsByPath.values()) { List<DetailInfo> infosForSubsite = wrap(configData).getDetailInfos(cms); resul...
List<DetailInfo> function(CmsObject cms) { List<DetailInfo> result = Lists.newArrayList(); for (CmsADEConfigDataInternal configData : m_siteConfigurationsByPath.values()) { List<DetailInfo> infosForSubsite = wrap(configData).getDetailInfos(cms); result.addAll(infosForSubsite); } return result; }
/** * Gets the detail page information for everything.<p> * * @param cms the current CMS context * @return the list containing all detail information */
Gets the detail page information for everything
getDetailInfosForSubsites
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/ade/configuration/CmsADEConfigCacheState.java", "license": "lgpl-2.1", "size": 19587 }
[ "com.google.common.collect.Lists", "java.util.List", "org.opencms.ade.configuration.CmsADEConfigData", "org.opencms.file.CmsObject" ]
import com.google.common.collect.Lists; import java.util.List; import org.opencms.ade.configuration.CmsADEConfigData; import org.opencms.file.CmsObject;
import com.google.common.collect.*; import java.util.*; import org.opencms.ade.configuration.*; import org.opencms.file.*;
[ "com.google.common", "java.util", "org.opencms.ade", "org.opencms.file" ]
com.google.common; java.util; org.opencms.ade; org.opencms.file;
1,877,028
public DubboBootstrap application(String name) { return application(name, builder -> { // DO NOTHING }); } /** * Set the name of application and it's future build * * @param name the name of application * @param consumerBuilder {@link ApplicationBu...
DubboBootstrap function(String name) { return application(name, builder -> { }); } /** * Set the name of application and it's future build * * @param name the name of application * @param consumerBuilder {@link ApplicationBuilder}
/** * Set the name of application * * @param name the name of application * @return current {@link DubboBootstrap} instance */
Set the name of application
application
{ "repo_name": "yuyijq/dubbo", "path": "dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/DubboBootstrap.java", "license": "apache-2.0", "size": 52384 }
[ "java.util.Set", "org.apache.dubbo.config.bootstrap.builders.ApplicationBuilder" ]
import java.util.Set; import org.apache.dubbo.config.bootstrap.builders.ApplicationBuilder;
import java.util.*; import org.apache.dubbo.config.bootstrap.builders.*;
[ "java.util", "org.apache.dubbo" ]
java.util; org.apache.dubbo;
1,276,140
void setRepositoryId( String id ); class CachingRepositoryFactory implements IRepositoryFactory { public static final String REGION = "pdi-repository-cache"; private IRepositoryFactory delegate; private Logger logger = LoggerFactory.getLogger( getClass() ); public CachingRepositoryFactory() {...
void setRepositoryId( String id ); class CachingRepositoryFactory implements IRepositoryFactory { public static final String REGION = STR; private IRepositoryFactory delegate; private Logger logger = LoggerFactory.getLogger( getClass() ); public CachingRepositoryFactory() { this( new DefaultRepositoryFactory() ); } pub...
/** * Sets the "ID" of the Repository Plugin Type to use (filebased, db, enterprise) * * @param id */
Sets the "ID" of the Repository Plugin Type to use (filebased, db, enterprise)
setRepositoryId
{ "repo_name": "yshakhau/pentaho-kettle", "path": "plugins/pdi-pur-plugin/src/org/pentaho/di/repository/utils/IRepositoryFactory.java", "license": "apache-2.0", "size": 6794 }
[ "org.slf4j.Logger", "org.slf4j.LoggerFactory" ]
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import org.slf4j.*;
[ "org.slf4j" ]
org.slf4j;
164,192
protected AbstractList<XMLLeaf> readFromFile(String nomexml) { IXMLConverter mn = Platform.getXMLConverter(); mn.parse(nomexml); return mn.getCollectedXML(); }
AbstractList<XMLLeaf> function(String nomexml) { IXMLConverter mn = Platform.getXMLConverter(); mn.parse(nomexml); return mn.getCollectedXML(); }
/** * Populate an array list from the XML file. Needs to be implemented with * particulars different from types of Oggetto to types of Oggetto. * * @param nomexml * Complete path to XML file * @return Array of objects read from file. * @see XML_Navigator */
Populate an array list from the XML file. Needs to be implemented with particulars different from types of Oggetto to types of Oggetto
readFromFile
{ "repo_name": "guildenstern70/jurpe", "path": "jurpe/src/main/java/net/littlelite/jurpe/containers/AbstractXMLCollection.java", "license": "gpl-2.0", "size": 3341 }
[ "java.util.AbstractList", "net.littlelite.jurpe.system.Platform", "net.littlelite.utils.metadata.IXMLConverter", "net.littlelite.utils.metadata.XMLLeaf" ]
import java.util.AbstractList; import net.littlelite.jurpe.system.Platform; import net.littlelite.utils.metadata.IXMLConverter; import net.littlelite.utils.metadata.XMLLeaf;
import java.util.*; import net.littlelite.jurpe.system.*; import net.littlelite.utils.metadata.*;
[ "java.util", "net.littlelite.jurpe", "net.littlelite.utils" ]
java.util; net.littlelite.jurpe; net.littlelite.utils;
1,873,738
public static void generateTopKFrequentPatterns(Iterator<Pair<IntArrayList, Long>> transactionStream, LongArrayList attributeFrequency, long minSupport, int k, ...
static void function(Iterator<Pair<IntArrayList, Long>> transactionStream, LongArrayList attributeFrequency, long minSupport, int k, IntArrayList returnableFeatures, OutputCollector<Integer, List<Pair<List<Integer>, Long>>> output) throws IOException { for (int i = 0; i < attributeFrequency.size(); i++) { if (attribute...
/** * Generate Top K Frequent Patterns for every feature in returnableFeatures * given a stream of transactions and the minimum support * * * @param transactionStream * Iterator of transaction * @param attributeFrequency * list of frequent features and their support value * @para...
Generate Top K Frequent Patterns for every feature in returnableFeatures given a stream of transactions and the minimum support
generateTopKFrequentPatterns
{ "repo_name": "bharcode/Kaggle", "path": "CustomMahout/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth2/FPGrowthIds.java", "license": "gpl-2.0", "size": 11415 }
[ "java.io.IOException", "java.util.AbstractMap", "java.util.Iterator", "java.util.List", "org.apache.hadoop.mapred.OutputCollector", "org.apache.mahout.common.Pair", "org.apache.mahout.fpm.pfpgrowth.convertors.TopKPatternsOutputConverter", "org.apache.mahout.math.list.IntArrayList", "org.apache.mahou...
import java.io.IOException; import java.util.AbstractMap; import java.util.Iterator; import java.util.List; import org.apache.hadoop.mapred.OutputCollector; import org.apache.mahout.common.Pair; import org.apache.mahout.fpm.pfpgrowth.convertors.TopKPatternsOutputConverter; import org.apache.mahout.math.list.IntArrayLis...
import java.io.*; import java.util.*; import org.apache.hadoop.mapred.*; import org.apache.mahout.common.*; import org.apache.mahout.fpm.pfpgrowth.convertors.*; import org.apache.mahout.math.list.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.apache.mahout" ]
java.io; java.util; org.apache.hadoop; org.apache.mahout;
751,877
private boolean isWildCardSearch(JSONArray fields) { // Only do a wildcard search if we are passed ["*"] if (fields.length() == 1) { try { if ("*".equals(fields.getString(0))) { return true; } } catch (JSONException e) { ...
boolean function(JSONArray fields) { if (fields.length() == 1) { try { if ("*".equals(fields.getString(0))) { return true; } } catch (JSONException e) { return false; } } return false; }
/** * If the user passes in the '*' wildcard character for search then they want all fields for each contact * * @param fields * @return true if wildcard search requested, false otherwise */
If the user passes in the '*' wildcard character for search then they want all fields for each contact
isWildCardSearch
{ "repo_name": "PowerlineApp/powerline-mobile", "path": "plugins/cordova-plugin-contacts/src/android/ContactAccessorSdk5.java", "license": "agpl-3.0", "size": 103287 }
[ "org.json.JSONArray", "org.json.JSONException" ]
import org.json.JSONArray; import org.json.JSONException;
import org.json.*;
[ "org.json" ]
org.json;
603,873
checkForValidTask(); TaskDAO task = getTask(); if (task.getActivationTime() == null) { throw new HumanTaskRuntimeException( String.format("The task[id:%d] does not have a defined activation time.", task.getId())); } if (task.getActivationTime().before(new...
checkForValidTask(); TaskDAO task = getTask(); if (task.getActivationTime() == null) { throw new HumanTaskRuntimeException( String.format(STR, task.getId())); } if (task.getActivationTime().before(new Date())) { throw new HumanTaskRuntimeException( String.format(STR, task.getId())); } if (CommonTaskUtil. getOrgEntities...
/** * Checks the Pre-conditions before executing the task operation. */
Checks the Pre-conditions before executing the task operation
checkPreConditions
{ "repo_name": "chathurace/carbon-business-process", "path": "components/humantask/org.wso2.carbon.humantask/src/main/java/org/wso2/carbon/humantask/core/engine/commands/Activate.java", "license": "apache-2.0", "size": 3772 }
[ "java.util.Date", "org.wso2.carbon.humantask.core.dao.GenericHumanRoleDAO", "org.wso2.carbon.humantask.core.dao.TaskDAO", "org.wso2.carbon.humantask.core.engine.runtime.api.HumanTaskIllegalStateException", "org.wso2.carbon.humantask.core.engine.runtime.api.HumanTaskRuntimeException", "org.wso2.carbon.huma...
import java.util.Date; import org.wso2.carbon.humantask.core.dao.GenericHumanRoleDAO; import org.wso2.carbon.humantask.core.dao.TaskDAO; import org.wso2.carbon.humantask.core.engine.runtime.api.HumanTaskIllegalStateException; import org.wso2.carbon.humantask.core.engine.runtime.api.HumanTaskRuntimeException; import org...
import java.util.*; import org.wso2.carbon.humantask.core.dao.*; import org.wso2.carbon.humantask.core.engine.runtime.api.*; import org.wso2.carbon.humantask.core.engine.util.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
2,218,259
protected void before(Connection connection) throws SQLException { intercept(connection, getPreInterceptor()); }
void function(Connection connection) throws SQLException { intercept(connection, getPreInterceptor()); }
/** * Intercepts SQL workflow before subroutines are executed. * * @param connection SQL database connection. * @throws SQLException if error occurs while perform interception. * * @see #getPreInterceptor() * * @since v1.0 */
Intercepts SQL workflow before subroutines are executed
before
{ "repo_name": "soulwarelabs/jParley-Core", "path": "src/main/java/com/soulwarelabs/jparley/core/StandardExecutor.java", "license": "apache-2.0", "size": 6968 }
[ "java.sql.Connection", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,421,603
public void setFullAccessConnectionMode() throws SQLException { try (Statement s = conex.createStatement()) { s.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + "'derby.database.defaultConnectionMode', 'fullAccess')"); } }
void function() throws SQLException { try (Statement s = conex.createStatement()) { s.executeUpdate(STR + STR); } }
/** * Set the default connection mode to Full Access * * @throws SQLException */
Set the default connection mode to Full Access
setFullAccessConnectionMode
{ "repo_name": "jcrcano/DrakkarKeel", "path": "Modules/DrakkarStern/src/drakkar/stern/tracker/persistent/security/DerbyAuthentication.java", "license": "gpl-2.0", "size": 14725 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
744,535
public final MLMethod create(final String architecture, final int input, final int output) { final List<String> layers = ArchitectureParse.parseLayers(architecture); if (layers.size() != MAX_LAYERS) { throw new EncogError( "SVM's must have exactly three elements, separated by ->."); } final Arch...
final MLMethod function(final String architecture, final int input, final int output) { final List<String> layers = ArchitectureParse.parseLayers(architecture); if (layers.size() != MAX_LAYERS) { throw new EncogError( STR); } final ArchitectureLayer inputLayer = ArchitectureParse.parseLayer( layers.get(0), input); fina...
/** * Create the SVM. * @param architecture The architecture string. * @param input The input count. * @param output The output count. * @return The newly created SVM. */
Create the SVM
create
{ "repo_name": "larhoy/SentimentProjectV2", "path": "SentimentAnalysisV2/encog-core-3.1.0/src/main/java/org/encog/ml/factory/method/SVMFactory.java", "license": "mit", "size": 4208 }
[ "java.util.List", "org.encog.EncogError", "org.encog.ml.MLMethod", "org.encog.ml.factory.parse.ArchitectureLayer", "org.encog.ml.factory.parse.ArchitectureParse", "org.encog.ml.svm.KernelType", "org.encog.ml.svm.SVMType" ]
import java.util.List; import org.encog.EncogError; import org.encog.ml.MLMethod; import org.encog.ml.factory.parse.ArchitectureLayer; import org.encog.ml.factory.parse.ArchitectureParse; import org.encog.ml.svm.KernelType; import org.encog.ml.svm.SVMType;
import java.util.*; import org.encog.*; import org.encog.ml.*; import org.encog.ml.factory.parse.*; import org.encog.ml.svm.*;
[ "java.util", "org.encog", "org.encog.ml" ]
java.util; org.encog; org.encog.ml;
1,751,858
public void setFinish( Datum x, Datum y ) { this.finishx = x; this.finishy = y; }
void function( Datum x, Datum y ) { this.finishx = x; this.finishy = y; }
/** * set the end coordinates of the mouse release. * @param x the release coordinate X * @param y the release coordinate Y */
set the end coordinates of the mouse release
setFinish
{ "repo_name": "autoplot/app", "path": "dasCore/src/org/das2/event/BoxSelectionEvent.java", "license": "gpl-2.0", "size": 5613 }
[ "org.das2.datum.Datum" ]
import org.das2.datum.Datum;
import org.das2.datum.*;
[ "org.das2.datum" ]
org.das2.datum;
245,307
if (source == null || destination == null || !source.exists() || !destination.exists() || source.isDirectory() || destination.isDirectory()) { if (FS.enableLogging) { FileSyncPlugin.log("Could not copy file '" + source + "' to '" ...
if (source == null destination == null !source.exists() !destination.exists() source.isDirectory() destination.isDirectory()) { if (FS.enableLogging) { FileSyncPlugin.log(STR + source + STR + destination + "'", null, IStatus.WARNING); } return false; } if (!useCurrentDateForDestinationFiles && destination.lastModified(...
/** * Single file copy operation with replacement of variables on the fly. * Implementation reads complete file into the memory * @param source - should be file only * @param destination - should be already created * @return true if source was successfully copied */
Single file copy operation with replacement of variables on the fly. Implementation reads complete file into the memory
copy
{ "repo_name": "iloveeclipse/filesync4eclipse", "path": "FileSync/src/de/loskutov/fs/command/CopyDelegate.java", "license": "epl-1.0", "size": 5944 }
[ "de.loskutov.fs.FileSyncPlugin", "org.eclipse.core.runtime.IStatus" ]
import de.loskutov.fs.FileSyncPlugin; import org.eclipse.core.runtime.IStatus;
import de.loskutov.fs.*; import org.eclipse.core.runtime.*;
[ "de.loskutov.fs", "org.eclipse.core" ]
de.loskutov.fs; org.eclipse.core;
706,073
public WebContents addPrerender(Profile profile, String url, String referrer, int width, int height) { WebContents webContents = WebContentsFactory.createWebContents(false, false); if (addPrerender(profile, webContents, url, referrer, width, height)) { return webContents; ...
WebContents function(Profile profile, String url, String referrer, int width, int height) { WebContents webContents = WebContentsFactory.createWebContents(false, false); if (addPrerender(profile, webContents, url, referrer, width, height)) { return webContents; } if (webContents != null) webContents.destroy(); return n...
/** * Add a prerender for the given url and given content view dimensions. * <p> * The generated {@link WebContents} does not actually contain the prerendered contents but * must be used as the container that you load the prerendered URL into. * * @param profile The profile to use for the ...
Add a prerender for the given url and given content view dimensions. The generated <code>WebContents</code> does not actually contain the prerendered contents but must be used as the container that you load the prerendered URL into
addPrerender
{ "repo_name": "highweb-project/highweb-webcl-html5spec", "path": "chrome/android/java/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandler.java", "license": "bsd-3-clause", "size": 5005 }
[ "org.chromium.chrome.browser.WebContentsFactory", "org.chromium.chrome.browser.profiles.Profile", "org.chromium.content_public.browser.WebContents" ]
import org.chromium.chrome.browser.WebContentsFactory; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.content_public.browser.WebContents;
import org.chromium.chrome.browser.*; import org.chromium.chrome.browser.profiles.*; import org.chromium.content_public.browser.*;
[ "org.chromium.chrome", "org.chromium.content_public" ]
org.chromium.chrome; org.chromium.content_public;
590,714
public boolean canDeleteIndexContents(Index index, Settings indexSettings) { final IndexServiceInjectorPair indexServiceInjectorPair = this.indices.get(index.name()); if (IndexMetaData.isOnSharedFilesystem(indexSettings) == false) { if (indexServiceInjectorPair == null && nodeEnv.hasNode...
boolean function(Index index, Settings indexSettings) { final IndexServiceInjectorPair indexServiceInjectorPair = this.indices.get(index.name()); if (IndexMetaData.isOnSharedFilesystem(indexSettings) == false) { if (indexServiceInjectorPair == null && nodeEnv.hasNodeFile()) { return true; } } else { logger.trace(STR, i...
/** * This method returns true if the current node is allowed to delete the * given index. If the index uses a shared filesystem this method always * returns false. * @param index {@code Index} to check whether deletion is allowed * @param indexSettings {@code Settings} for the given index ...
This method returns true if the current node is allowed to delete the given index. If the index uses a shared filesystem this method always returns false
canDeleteIndexContents
{ "repo_name": "hydro2k/elasticsearch", "path": "core/src/main/java/org/elasticsearch/indices/IndicesService.java", "license": "apache-2.0", "size": 38445 }
[ "org.elasticsearch.cluster.metadata.IndexMetaData", "org.elasticsearch.common.settings.Settings", "org.elasticsearch.index.Index" ]
import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.Index;
import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.index.*;
[ "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.index" ]
org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index;
109,325
client.setDefaultHandler(PacketAuthenticate.class, null); client.setDefaultHandler(PacketRegister.class, null); client.setDefaultHandler(PacketPasswordChange.class, new PasswordChangeHandler(client)); client.setDefaultHandler(PacketGlobalChat.class, new GlobalChatHandler(client)); ...
client.setDefaultHandler(PacketAuthenticate.class, null); client.setDefaultHandler(PacketRegister.class, null); client.setDefaultHandler(PacketPasswordChange.class, new PasswordChangeHandler(client)); client.setDefaultHandler(PacketGlobalChat.class, new GlobalChatHandler(client)); client.sendMessage(STR); client.getSer...
/** * Causes the specified client to enter normal operation after having * authenticated successfully. All other connected users are also notified * about the new user. * * @param client The client which has been successfully authenticated. * @throws IOException An unrecoverable error occ...
Causes the specified client to enter normal operation after having authenticated successfully. All other connected users are also notified about the new user
onAuthenticated
{ "repo_name": "bendude56/tictactoe-world", "path": "TTTWorld-Server/src/me/benthomas/tttworld/server/net/AuthenticateHandler.java", "license": "gpl-3.0", "size": 4290 }
[ "me.benthomas.tttworld.net.PacketAuthenticate", "me.benthomas.tttworld.net.PacketGlobalChat", "me.benthomas.tttworld.net.PacketPasswordChange", "me.benthomas.tttworld.net.PacketRegister" ]
import me.benthomas.tttworld.net.PacketAuthenticate; import me.benthomas.tttworld.net.PacketGlobalChat; import me.benthomas.tttworld.net.PacketPasswordChange; import me.benthomas.tttworld.net.PacketRegister;
import me.benthomas.tttworld.net.*;
[ "me.benthomas.tttworld" ]
me.benthomas.tttworld;
55,655
public ServiceFuture<Void> updateAsync(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(vaultName, resourceGroupName, parameters), serviceCallback); }
ServiceFuture<Void> function(String vaultName, String resourceGroupName, BackupResourceConfigResourceInner parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(vaultName, resourceGroupName, parameters), serviceCallback); }
/** * Updates vault storage model type. * * @param vaultName The name of the recovery services vault. * @param resourceGroupName The name of the resource group where the recovery services vault is present. * @param parameters Vault storage config request * @param serviceCallback the async ...
Updates vault storage model type
updateAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/recoveryservices.backup/mgmt-v2016_12_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_12_01/implementation/BackupResourceStorageConfigsInner.java", "license": "mit", "size": 13597 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
655,528
public synchronized int addImagePath(final String orig, final String attachToTblName) { if (workbenchRowImages == null) { workbenchRowImages = new HashSet<WorkbenchRowImage>(); } //byte[] imgData = readAndScaleCardImage(orig); int order = workbenc...
synchronized int function(final String orig, final String attachToTblName) { if (workbenchRowImages == null) { workbenchRowImages = new HashSet<WorkbenchRowImage>(); } int order = workbenchRowImages.size(); WorkbenchRowImage newRowImage = new WorkbenchRowImage(); newRowImage.initialize(); newRowImage.setImageOrder(orde...
/** * Adds a new image to the row. * * @param orig the image file * @param attachToTlbName the table to attach the image to * @return the index of the new image * @throws IOException if an error occurs while loading or scaling the image file */
Adds a new image to the row
addImagePath
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/specify/datamodel/WorkbenchRow.java", "license": "gpl-2.0", "size": 41523 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
313,192
public void testRemovePrimaryKey1() { final String MODEL1 = "<?xml version='1.0' encoding='ISO-8859-1'?>\n" + "<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='test'>\n" + " <table name='TableA'>\n" + " <column name='ColPK' type='INTEGER'...
void function() { final String MODEL1 = STR + STR + DatabaseIO.DDLUTILS_NAMESPACE + STR + STR + STR + STR + STR; final String MODEL2 = STR + STR + DatabaseIO.DDLUTILS_NAMESPACE + STR + STR + STR + STR + STR; Database model1 = parseDatabaseFromString(MODEL1); Database model2 = parseDatabaseFromString(MODEL2); List chang...
/** * Tests the removal of a primary key. */
Tests the removal of a primary key
testRemovePrimaryKey1
{ "repo_name": "qxo/ddlutils", "path": "src/test/java/org/apache/ddlutils/alteration/TestPrimaryKeyComparison.java", "license": "apache-2.0", "size": 24417 }
[ "java.util.List", "org.apache.ddlutils.io.DatabaseIO", "org.apache.ddlutils.model.Database" ]
import java.util.List; import org.apache.ddlutils.io.DatabaseIO; import org.apache.ddlutils.model.Database;
import java.util.*; import org.apache.ddlutils.io.*; import org.apache.ddlutils.model.*;
[ "java.util", "org.apache.ddlutils" ]
java.util; org.apache.ddlutils;
91,511
AppUpdater setTitleOnUpdateAvailable(@NonNull String title);
AppUpdater setTitleOnUpdateAvailable(@NonNull String title);
/** * Set a custom title for the dialog when an update is available. * * @param title for the dialog * @return this */
Set a custom title for the dialog when an update is available
setTitleOnUpdateAvailable
{ "repo_name": "javiersantos/AppUpdater", "path": "library/src/main/java/com/github/javiersantos/appupdater/interfaces/IAppUpdater.java", "license": "apache-2.0", "size": 13048 }
[ "android.support.annotation.NonNull", "com.github.javiersantos.appupdater.AppUpdater" ]
import android.support.annotation.NonNull; import com.github.javiersantos.appupdater.AppUpdater;
import android.support.annotation.*; import com.github.javiersantos.appupdater.*;
[ "android.support", "com.github.javiersantos" ]
android.support; com.github.javiersantos;
528,212
@SuppressWarnings("unchecked") public boolean containsAll(Collection collection) { synchronized (children) { return children.keySet().containsAll(collection); } }
@SuppressWarnings(STR) boolean function(Collection collection) { synchronized (children) { return children.keySet().containsAll(collection); } }
/** * Returns true if given objects are children of this context. * * @param collection * a collection of objects * @return true if given objects are children of this context * @see java.util.Collection#containsAll(java.util.Collection) */
Returns true if given objects are children of this context
containsAll
{ "repo_name": "app55/app55-java", "path": "src/support/java/com/googlecode/openbeans/beancontext/BeanContextSupport.java", "license": "mit", "size": 39587 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
510,150
public SortHLAPI getOutputHLAPI(){ if(item.getOutput() == null) return null; Sort object = item.getOutput(); if(object.getClass().equals(fr.lip6.move.pnml.hlpn.integers.impl.NaturalImpl.class)){ return new fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI((fr.lip6.move.pnml.hlpn.integers.Natural)obj...
SortHLAPI function(){ if(item.getOutput() == null) return null; Sort object = item.getOutput(); if(object.getClass().equals(fr.lip6.move.pnml.hlpn.integers.impl.NaturalImpl.class)){ return new fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI((fr.lip6.move.pnml.hlpn.integers.Natural)object); } if(object.getClass().equ...
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getOutputHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/integers/hlapi/DivisionHLAPI.java", "license": "epl-1.0", "size": 108424 }
[ "fr.lip6.move.pnml.hlpn.terms.Sort", "fr.lip6.move.pnml.hlpn.terms.hlapi.SortHLAPI" ]
import fr.lip6.move.pnml.hlpn.terms.Sort; import fr.lip6.move.pnml.hlpn.terms.hlapi.SortHLAPI;
import fr.lip6.move.pnml.hlpn.terms.*; import fr.lip6.move.pnml.hlpn.terms.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,132,467
EEnum getDependencyOperator();
EEnum getDependencyOperator();
/** * Returns the meta object for enum '{@link com.b2international.snowowl.snomed.mrcm.DependencyOperator <em>Dependency Operator</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Dependency Operator</em>'. * @see com.b2international.snowowl.snomed.mrcm.Dependen...
Returns the meta object for enum '<code>com.b2international.snowowl.snomed.mrcm.DependencyOperator Dependency Operator</code>'.
getDependencyOperator
{ "repo_name": "IHTSDO/snow-owl", "path": "snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/MrcmPackage.java", "license": "apache-2.0", "size": 82769 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,566,724
public Adapter createSporadicStatementAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link com.rockwellcollins.atc.agree.agree.SporadicStatement <em>Sporadic Statement</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all ...
Creates a new adapter for an object of class '<code>com.rockwellcollins.atc.agree.agree.SporadicStatement Sporadic Statement</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createSporadicStatementAdapter
{ "repo_name": "smaccm/smaccm", "path": "fm-workbench/agree/com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/agree/util/AgreeAdapterFactory.java", "license": "bsd-3-clause", "size": 66651 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
901,364
public void testMod() { Type4Tester.create("5 3 mod").pop(2).isEmpty(); Type4Tester.create("5 2 mod").pop(1).isEmpty(); Type4Tester.create("-5 3 mod").pop(-2).isEmpty(); try { Type4Tester.create("4.4 2 mod"); Assert.fail("Expected typecheck"); ...
void function() { Type4Tester.create(STR).pop(2).isEmpty(); Type4Tester.create(STR).pop(1).isEmpty(); Type4Tester.create(STR).pop(-2).isEmpty(); try { Type4Tester.create(STR); Assert.fail(STR); } catch (ClassCastException cce) { } }
/** * Tests the "mod" operator. */
Tests the "mod" operator
testMod
{ "repo_name": "torakiki/sambox", "path": "src/test/java/org/sejda/sambox/pdmodel/common/function/type4/TestOperators.java", "license": "apache-2.0", "size": 14826 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,690,734
public void setStatusBarTintEnabled(boolean enabled) { mStatusBarTintEnabled = enabled; if (mStatusBarAvailable) { mStatusBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE); } }
void function(boolean enabled) { mStatusBarTintEnabled = enabled; if (mStatusBarAvailable) { mStatusBarTintView.setVisibility(enabled ? View.VISIBLE : View.GONE); } }
/** * Enable tinting of the system status bar. * * If the platform is running Jelly Bean or earlier, or translucent system * UI modes have not been enabled in either the theme or via window flags, * then this method does nothing. * * @param enabled True to enable tinting, false to dis...
Enable tinting of the system status bar. If the platform is running Jelly Bean or earlier, or translucent system UI modes have not been enabled in either the theme or via window flags, then this method does nothing
setStatusBarTintEnabled
{ "repo_name": "chongz/TradeInfoSys", "path": "libzxing/src/main/java/com/xys/libzxing/zxing/activity/SystemBarTintManager.java", "license": "mit", "size": 19752 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,230,200