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 ArrayList<Interval> getIntervals() {
return _intervals;
} | ArrayList<Interval> function() { return _intervals; } | /**
* Gets the interpolated boundaries
* @return List of interpolated boundaries
*/ | Gets the interpolated boundaries | getIntervals | {
"repo_name": "MSHE-Ledoux/georchestra-geosync",
"path": "mapfishapp/src/main/java/org/georchestra/mapfishapp/ws/classif/ContinuousFilterFactory.java",
"license": "gpl-3.0",
"size": 6773
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 791,617 |
default
void preRemove(KeycloakSession session, RealmModel realm, ComponentModel model) {
} | default void preRemove(KeycloakSession session, RealmModel realm, ComponentModel model) { } | /**
* Called before the component is removed.
*
* @param session
* @param realm
* @param model model of the component, which is going to be removed
*/ | Called before the component is removed | preRemove | {
"repo_name": "almighty/keycloak",
"path": "server-spi/src/main/java/org/keycloak/component/ComponentFactory.java",
"license": "apache-2.0",
"size": 3262
} | [
"org.keycloak.models.KeycloakSession",
"org.keycloak.models.RealmModel"
] | import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; | import org.keycloak.models.*; | [
"org.keycloak.models"
] | org.keycloak.models; | 1,492,096 |
public void readEntity(HashMap<String, EntityProperty> properties, OperationContext opContext)
throws StorageException; | void function(HashMap<String, EntityProperty> properties, OperationContext opContext) throws StorageException; | /**
* Populates an instance of the object implementing {@link TableEntity} using the specified properties parameter,
* which represents a map of <code>String</code> property names to {@link EntityProperty} data typed values.
*
* @param properties
* The <code>java.util.HashMap</code>... | Populates an instance of the object implementing <code>TableEntity</code> using the specified properties parameter, which represents a map of <code>String</code> property names to <code>EntityProperty</code> data typed values | readEntity | {
"repo_name": "Azure/azure-storage-android",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/table/TableEntity.java",
"license": "apache-2.0",
"size": 8309
} | [
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"java.util.HashMap"
] | import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import java.util.HashMap; | import com.microsoft.azure.storage.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,209,145 |
@Override
public boolean hasDerivedRole(String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification) {
if (StringUtils.isBlank(principalId)) {
throw new RiceIllegalArgumentException("principalId was null or blank");
}
if (g... | boolean function(String principalId, List<String> groupIds, String namespaceCode, String roleName, Map<String, String> qualification) { if (StringUtils.isBlank(principalId)) { throw new RiceIllegalArgumentException(STR); } if (groupIds == null) { throw new RiceIllegalArgumentException(STR); } if (StringUtils.isBlank(na... | /**
* This simple initial implementation just calls
* {@link #getRoleMembersFromApplicationRole(String, String, Map<String, String>)} and checks the results.
*
*/ | This simple initial implementation just calls <code>#getRoleMembersFromApplicationRole(String, String, Map)</code> and checks the results | hasDerivedRole | {
"repo_name": "mztaylor/rice-git",
"path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/kim/role/RoleTypeServiceBase.java",
"license": "apache-2.0",
"size": 10756
} | [
"java.util.List",
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.api.exception.RiceIllegalArgumentException",
"org.kuali.rice.core.api.membership.MemberType",
"org.kuali.rice.kim.api.role.RoleMembership"
] | import java.util.List; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; import org.kuali.rice.core.api.membership.MemberType; import org.kuali.rice.kim.api.role.RoleMembership; | import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.core.api.exception.*; import org.kuali.rice.core.api.membership.*; import org.kuali.rice.kim.api.role.*; | [
"java.util",
"org.apache.commons",
"org.kuali.rice"
] | java.util; org.apache.commons; org.kuali.rice; | 368,774 |
protected void initLoginConfig(XmlParser.Node node) {
XmlParser.Node method = node.get("auth-method");
FormAuthenticator _formAuthenticator = null;
if (method != null) {
Authenticator authenticator = null;
String m = method.toString(false, true);
if (SecurityConstraint.__FORM_AUTH.equals(m))
aut... | void function(XmlParser.Node node) { XmlParser.Node method = node.get(STR); FormAuthenticator _formAuthenticator = null; if (method != null) { Authenticator authenticator = null; String m = method.toString(false, true); if (SecurityConstraint.__FORM_AUTH.equals(m)) authenticator = _formAuthenticator = new FormAuthentic... | /**
* Inits the login config.
*
* @param node
* the node
*/ | Inits the login config | initLoginConfig | {
"repo_name": "confluxtoo/finflux_automation_test",
"path": "browsermob-proxy/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/XMLConfiguration.java",
"license": "mpl-2.0",
"size": 27731
} | [
"org.browsermob.proxy.jetty.http.Authenticator",
"org.browsermob.proxy.jetty.http.ClientCertAuthenticator",
"org.browsermob.proxy.jetty.http.SecurityConstraint",
"org.browsermob.proxy.jetty.xml.XmlParser"
] | import org.browsermob.proxy.jetty.http.Authenticator; import org.browsermob.proxy.jetty.http.ClientCertAuthenticator; import org.browsermob.proxy.jetty.http.SecurityConstraint; import org.browsermob.proxy.jetty.xml.XmlParser; | import org.browsermob.proxy.jetty.http.*; import org.browsermob.proxy.jetty.xml.*; | [
"org.browsermob.proxy"
] | org.browsermob.proxy; | 2,183,641 |
private void populateAddElementAndAttributeAction(ISelection selection, EditingDomain domain,
Collection<?> newOutputMappingChildDescriptors) {
boolean enableCompleElem = false;
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
Obje... | void function(ISelection selection, EditingDomain domain, Collection<?> newOutputMappingChildDescriptors) { boolean enableCompleElem = false; IStructuredSelection structuredSelection = (IStructuredSelection) selection; Object owner = structuredSelection.getFirstElement(); if (owner instanceof ElementMapping) { ElementM... | /**
* Populate add element and attribute action.
*
* @param selection
* the selection
* @param domain
* the domain
* @param newOutputMappingChildDescriptors
* the new output mapping child descriptors
*/ | Populate add element and attribute action | populateAddElementAndAttributeAction | {
"repo_name": "knadikari/developer-studio",
"path": "data-services/org.wso2.developerstudio.eclipse.ds.editor/src/org/wso2/developerstudio/eclipse/ds/presentation/DsActionBarContributor.java",
"license": "apache-2.0",
"size": 51874
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.eclipse.emf.edit.domain.EditingDomain",
"org.eclipse.jface.action.IAction",
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.IStructuredSelection",
"org.wso2.developerstudio.eclipse.ds.ElementMapping",
"org.wso2.developerstudio.ecli... | import java.util.ArrayList; import java.util.Collection; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.wso2.developerstudio.eclipse.ds.ElementMapping; import org.ws... | import java.util.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*; import org.wso2.developerstudio.eclipse.ds.*; import org.wso2.developerstudio.eclipse.ds.actions.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.jface",
"org.wso2.developerstudio"
] | java.util; org.eclipse.emf; org.eclipse.jface; org.wso2.developerstudio; | 950,178 |
@Override
public void performPaint(Graphics g, PaintMoment moment) {
AxisPanel axis;
double pos;
axis = getPanel().getPlot().getAxis(Axis.LEFT);
g.setColor(m_Color);
if (m_Percentage) {
pos = (axis.getMaximum() - axis.getMinimum()) * m_Value + axis.getMinimum();
g.drawLine(... | void function(Graphics g, PaintMoment moment) { AxisPanel axis; double pos; axis = getPanel().getPlot().getAxis(Axis.LEFT); g.setColor(m_Color); if (m_Percentage) { pos = (axis.getMaximum() - axis.getMinimum()) * m_Value + axis.getMinimum(); g.drawLine( 0, axis.valueToPos(pos), getPlot().getWidth() - 1, axis.valueToPos... | /**
* The paint routine of the paintlet.
*
* @param g the graphics context to use for painting
* @param moment what {@link PaintMoment} is currently being painted
*/ | The paint routine of the paintlet | performPaint | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/gui/visualization/core/HorizontalIndicatorPaintlet.java",
"license": "gpl-3.0",
"size": 5051
} | [
"java.awt.Color",
"java.awt.Graphics"
] | import java.awt.Color; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 532,553 |
@Test
public void testAnnotatedPackage() {
performAnalysis("ghIssues/issue463/Issue463.class", "ghIssues/issue463/package-info.class");
BugInstanceMatcher bugTypeMatcher = new BugInstanceMatcherBuilder().bugType("RV_RETURN_VALUE_IGNORED")
.atLine(34).build();
assertThat(g... | void function() { performAnalysis(STR, STR); BugInstanceMatcher bugTypeMatcher = new BugInstanceMatcherBuilder().bugType(STR) .atLine(34).build(); assertThat(getBugCollection(), containsExactly(1, bugTypeMatcher)); } | /**
* When package is annotated with {@code @CheckReturnValue} and method is not annotated with
* {@code @CanIgnoreReturnValue}, SpotBugs should report a bug for invocation which doesn't use returned value.
*
* @see <a href="https://github.com/spotbugs/spotbugs/issues/582">Issue 582</a>
*/ | When package is annotated with @CheckReturnValue and method is not annotated with @CanIgnoreReturnValue, SpotBugs should report a bug for invocation which doesn't use returned value | testAnnotatedPackage | {
"repo_name": "KengoTODA/spotbugs",
"path": "spotbugs-tests/src/test/java/edu/umd/cs/findbugs/detect/Issue463Test.java",
"license": "lgpl-2.1",
"size": 1541
} | [
"edu.umd.cs.findbugs.test.CountMatcher",
"edu.umd.cs.findbugs.test.matcher.BugInstanceMatcher",
"edu.umd.cs.findbugs.test.matcher.BugInstanceMatcherBuilder",
"org.junit.Assert"
] | import edu.umd.cs.findbugs.test.CountMatcher; import edu.umd.cs.findbugs.test.matcher.BugInstanceMatcher; import edu.umd.cs.findbugs.test.matcher.BugInstanceMatcherBuilder; import org.junit.Assert; | import edu.umd.cs.findbugs.test.*; import edu.umd.cs.findbugs.test.matcher.*; import org.junit.*; | [
"edu.umd.cs",
"org.junit"
] | edu.umd.cs; org.junit; | 1,894,499 |
void memoryChange(int x) {
if (memoryCount < Constants.MEMORY_FACTOR) {
memoryPerPage += (x - memoryPerPage) / ++memoryCount;
} else {
memoryPerPage += (x > memoryPerPage ? 1 : -1) + ((x - memoryPerPage) / Constants.MEMORY_FACTOR);
}
} | void memoryChange(int x) { if (memoryCount < Constants.MEMORY_FACTOR) { memoryPerPage += (x - memoryPerPage) / ++memoryCount; } else { memoryPerPage += (x > memoryPerPage ? 1 : -1) + ((x - memoryPerPage) / Constants.MEMORY_FACTOR); } } | /**
* The memory usage of a page was changed. The new value is used to adopt
* the average estimated memory size of a page.
*
* @param x the new memory size
*/ | The memory usage of a page was changed. The new value is used to adopt the average estimated memory size of a page | memoryChange | {
"repo_name": "ferquies/2dam",
"path": "AD/Tema 2/h2/src/main/org/h2/index/PageBtreeIndex.java",
"license": "gpl-3.0",
"size": 14623
} | [
"org.h2.engine.Constants"
] | import org.h2.engine.Constants; | import org.h2.engine.*; | [
"org.h2.engine"
] | org.h2.engine; | 2,363,578 |
public static boolean sendHttpResponse(
boolean isSuccess,
HttpExchange exchange,
byte[] response) {
int returnCode = isSuccess ? HttpURLConnection.HTTP_OK : HttpURLConnection.HTTP_UNAVAILABLE;
try {
exchange.sendResponseHeaders(returnCode, response.length);
} catch (IOException e)... | static boolean function( boolean isSuccess, HttpExchange exchange, byte[] response) { int returnCode = isSuccess ? HttpURLConnection.HTTP_OK : HttpURLConnection.HTTP_UNAVAILABLE; try { exchange.sendResponseHeaders(returnCode, response.length); } catch (IOException e) { LOG.log(Level.SEVERE, STR, e); return false; } Out... | /**
* Send a http response with HTTP_OK return code and response body
*
* @param isSuccess send back HTTP_OK if it is true, otherwise send back HTTP_UNAVAILABLE
* @param exchange the HttpExchange to send response
* @param response the response the sent back in response body
* @return true if we send t... | Send a http response with HTTP_OK return code and response body | sendHttpResponse | {
"repo_name": "streamlio/heron",
"path": "heron/spi/src/java/com/twitter/heron/spi/utils/NetworkUtils.java",
"license": "apache-2.0",
"size": 18091
} | [
"com.sun.net.httpserver.HttpExchange",
"java.io.IOException",
"java.io.OutputStream",
"java.net.HttpURLConnection",
"java.util.logging.Level"
] | import com.sun.net.httpserver.HttpExchange; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.util.logging.Level; | import com.sun.net.httpserver.*; import java.io.*; import java.net.*; import java.util.logging.*; | [
"com.sun.net",
"java.io",
"java.net",
"java.util"
] | com.sun.net; java.io; java.net; java.util; | 1,036,056 |
public static List<Double> toList(double... array) {
PreCon.notNull(array);
ArrayList<Double> result = new ArrayList<>(array.length + 5);
for (double b : array) {
result.add(b);
}
return result;
} | static List<Double> function(double... array) { PreCon.notNull(array); ArrayList<Double> result = new ArrayList<>(array.length + 5); for (double b : array) { result.add(b); } return result; } | /**
* Convert an array to an array list.
*
* @param array The array to convert.
*/ | Convert an array to an array list | toList | {
"repo_name": "JCThePants/NucleusFramework",
"path": "src/com/jcwhatever/nucleus/utils/ArrayUtils.java",
"license": "mit",
"size": 83295
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,472,189 |
EClass getLinkedBy(); | EClass getLinkedBy(); | /**
* Returns the meta object for class '{@link org.eclectic.frontend.mappings.LinkedBy <em>Linked By</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Linked By</em>'.
* @see org.eclectic.frontend.mappings.LinkedBy
* @generated
*/ | Returns the meta object for class '<code>org.eclectic.frontend.mappings.LinkedBy Linked By</code>'. | getLinkedBy | {
"repo_name": "jesusc/eclectic",
"path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/mappings/MappingsPackage.java",
"license": "gpl-3.0",
"size": 129327
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 228,039 |
public void delScript(ScriptingEngine s);
| void function(ScriptingEngine s); | /**
* Remove a running script from this object.
* @see com.planet_ink.coffee_mud.Common.interfaces.ScriptingEngine
* @param s the specific scripting engine to remove
*/ | Remove a running script from this object | delScript | {
"repo_name": "bozimmerman/CoffeeMud",
"path": "com/planet_ink/coffee_mud/core/interfaces/Behavable.java",
"license": "apache-2.0",
"size": 4922
} | [
"com.planet_ink.coffee_mud.Common"
] | import com.planet_ink.coffee_mud.Common; | import com.planet_ink.coffee_mud.*; | [
"com.planet_ink.coffee_mud"
] | com.planet_ink.coffee_mud; | 2,488,043 |
public Collection<IInfo> getTokensStartingWith(String qualifier, int getWhat) {
synchronized (lock) {
return getWithFilter(qualifier, getWhat, startingWithFilter, true, null);
}
} | Collection<IInfo> function(String qualifier, int getWhat) { synchronized (lock) { return getWithFilter(qualifier, getWhat, startingWithFilter, true, null); } } | /**
* This is the function for which we are most optimized!
*
* @param qualifier the tokens returned have to start with the given qualifier
* @return a list of info, all starting with the given qualifier
*/ | This is the function for which we are most optimized | getTokensStartingWith | {
"repo_name": "aptana/Pydev",
"path": "bundles/com.python.pydev.analysis/src/com/python/pydev/analysis/additionalinfo/AbstractAdditionalTokensInfo.java",
"license": "epl-1.0",
"size": 32320
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 279,361 |
public void migrateTo(DTMManager manager) {
super.migrateTo(manager);
if (manager instanceof XSLTCDTMManager) {
_dtmManager = (XSLTCDTMManager)manager;
}
} | void function(DTMManager manager) { super.migrateTo(manager); if (manager instanceof XSLTCDTMManager) { _dtmManager = (XSLTCDTMManager)manager; } } | /**
* Migrate a DTM built with an old DTMManager to a new DTMManager.
* After the migration, the new DTMManager will treat the DTM as
* one that is built by itself.
* This is used to support DTM sharing between multiple transformations.
* @param manager the DTMManager
*/ | Migrate a DTM built with an old DTMManager to a new DTMManager. After the migration, the new DTMManager will treat the DTM as one that is built by itself. This is used to support DTM sharing between multiple transformations | migrateTo | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java",
"license": "mit",
"size": 61748
} | [
"com.sun.org.apache.xml.internal.dtm.DTMManager"
] | import com.sun.org.apache.xml.internal.dtm.DTMManager; | import com.sun.org.apache.xml.internal.dtm.*; | [
"com.sun.org"
] | com.sun.org; | 2,128,876 |
@JsonProperty("state")
public void setState(ArtifactState state) {
this.state = state;
} | @JsonProperty("state") void function(ArtifactState state) { this.state = state; } | /**
* Describes the state of an artifact or artifact version. The following states
* are possible:
*
* * ENABLED
* * DISABLED
* * DEPRECATED
*
* (Required)
*
*/ | Describes the state of an artifact or artifact version. The following states are possible: ENABLED DISABLED DEPRECATED (Required) | setState | {
"repo_name": "apiman/apiman-studio",
"path": "back-end/hub-codegen/src/test/resources/OpenApi2JaxRsTest/_expected-registry-api-v2/generated-api/src/main/java/org/example/api/beans/SearchedVersion.java",
"license": "apache-2.0",
"size": 6246
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"io.apicurio.registry.types.ArtifactState"
] | import com.fasterxml.jackson.annotation.JsonProperty; import io.apicurio.registry.types.ArtifactState; | import com.fasterxml.jackson.annotation.*; import io.apicurio.registry.types.*; | [
"com.fasterxml.jackson",
"io.apicurio.registry"
] | com.fasterxml.jackson; io.apicurio.registry; | 1,260,033 |
@SuppressWarnings("all")
public static void setField(Object target, Field field, Object value) {
try {
Assert.isFalse(Modifier.isFinal(field.getModifiers()), new FieldAccessException(String.format(
"Cannot set the value of a final field (%1$s) on %2$s type (%3$s)!", field.getName(),
Boo... | @SuppressWarnings("all") static void function(Object target, Field field, Object value) { try { Assert.isFalse(Modifier.isFinal(field.getModifiers()), new FieldAccessException(String.format( STR, field.getName(), BooleanUtils.toString(target == null, "class", STR), field.getDeclaringClass().getName()))); boolean curren... | /**
* Sets the field on the given object to the given value. If the "target" object is null, then this method assumes
* the field is a static (class) member field; otherwise the field is considered an instance (object) member field.
* This method is not null-safe!
*
* @param target the Object on which th... | Sets the field on the given object to the given value. If the "target" object is null, then this method assumes the field is a static (class) member field; otherwise the field is considered an instance (object) member field. This method is not null-safe | setField | {
"repo_name": "jxblum/cp-elements",
"path": "src/main/java/org/cp/elements/lang/reflect/ReflectionUtils.java",
"license": "apache-2.0",
"size": 35682
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Modifier",
"org.cp.elements.lang.Assert",
"org.cp.elements.lang.BooleanUtils"
] | import java.lang.reflect.Field; import java.lang.reflect.Modifier; import org.cp.elements.lang.Assert; import org.cp.elements.lang.BooleanUtils; | import java.lang.reflect.*; import org.cp.elements.lang.*; | [
"java.lang",
"org.cp.elements"
] | java.lang; org.cp.elements; | 1,881,302 |
String createPaste(@NotNull AccountCredentials accountCredentials, @NotNull Paste paste); | String createPaste(@NotNull AccountCredentials accountCredentials, @NotNull Paste paste); | /**
* Creates a new paste and return the url for this created paste.
*
* @param accountCredentials Account credentials to be used to log into the paste bin API.
* @param paste The paste holding the information to be used in creating process.
* @return A url for the created paste.
... | Creates a new paste and return the url for this created paste | createPaste | {
"repo_name": "kennedyoliveira/pastebin4j",
"path": "src/main/java/com/github/kennedyoliveira/pastebin4j/api/PasteBinApi.java",
"license": "mit",
"size": 5679
} | [
"com.github.kennedyoliveira.pastebin4j.AccountCredentials",
"com.github.kennedyoliveira.pastebin4j.Paste",
"org.jetbrains.annotations.NotNull"
] | import com.github.kennedyoliveira.pastebin4j.AccountCredentials; import com.github.kennedyoliveira.pastebin4j.Paste; import org.jetbrains.annotations.NotNull; | import com.github.kennedyoliveira.pastebin4j.*; import org.jetbrains.annotations.*; | [
"com.github.kennedyoliveira",
"org.jetbrains.annotations"
] | com.github.kennedyoliveira; org.jetbrains.annotations; | 703,645 |
public Set<IDecisionVariable> getProblemPoints() {
return problemPoints;
} | Set<IDecisionVariable> function() { return problemPoints; } | /**
* Method for returning a set of {@link IDecisionVariable}s that may caused a constraint to fail.
* @return problemPoints Set of {@link IDecisionVariable}s.
*/ | Method for returning a set of <code>IDecisionVariable</code>s that may caused a constraint to fail | getProblemPoints | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/Reasoner/EASy-Original-Reasoner/de.uni_hildesheim.sse.reasoning.reasoner/src/net/ssehub/easy/reasoning/sseReasoner/functions/FailedElementDetails.java",
"license": "apache-2.0",
"size": 2861
} | [
"java.util.Set",
"net.ssehub.easy.varModel.confModel.IDecisionVariable"
] | import java.util.Set; import net.ssehub.easy.varModel.confModel.IDecisionVariable; | import java.util.*; import net.ssehub.easy.*; | [
"java.util",
"net.ssehub.easy"
] | java.util; net.ssehub.easy; | 423,860 |
public String customDataPath() {
return settings.get(IndexMetaData.SETTING_DATA_PATH);
} | String function() { return settings.get(IndexMetaData.SETTING_DATA_PATH); } | /**
* Returns the customDataPath for this index, if configured. <code>null</code> o.w.
*/ | Returns the customDataPath for this index, if configured. <code>null</code> o.w | customDataPath | {
"repo_name": "strahanjen/strahanjen.github.io",
"path": "elasticsearch-master/core/src/main/java/org/elasticsearch/index/IndexSettings.java",
"license": "bsd-3-clause",
"size": 24739
} | [
"org.elasticsearch.cluster.metadata.IndexMetaData"
] | import org.elasticsearch.cluster.metadata.IndexMetaData; | import org.elasticsearch.cluster.metadata.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 1,603,504 |
public Atom refresh(Atom obj) ;
//
// public void delete(Atom obj); | Atom function(Atom obj) ; | /**
* Update the obj using the latest information from the back-end
*
* @param obj Object to be refreshed from the back-end
* @return Due to copy-on-write, this may return a new object with
* updated information
*/ | Update the obj using the latest information from the back-end | refresh | {
"repo_name": "SeqWare/queryengine",
"path": "seqware-queryengine-backend/src/main/java/com/github/seqware/queryengine/backInterfaces/LowLevelBackEndInterface.java",
"license": "gpl-3.0",
"size": 2076
} | [
"com.github.seqware.queryengine.model.Atom"
] | import com.github.seqware.queryengine.model.Atom; | import com.github.seqware.queryengine.model.*; | [
"com.github.seqware"
] | com.github.seqware; | 1,416,968 |
@GetMapping(value = "/adorationSecure/adorationListHours")
public String adoratorsHOurs(HttpSession httpSession) {
if (!isRegisteredAdorator(currentUserProvider, httpSession)) {
return REDIRECT_TO_HOME;
}
return "adoratorListHours";
} | @GetMapping(value = STR) String function(HttpSession httpSession) { if (!isRegisteredAdorator(currentUserProvider, httpSession)) { return REDIRECT_TO_HOME; } return STR; } | /**
* Serves the adorator list page - adorator view.
*
* @return the name of the adorators jsp file
*/ | Serves the adorator list page - adorator view | adoratorsHOurs | {
"repo_name": "tkohegyi/adoration",
"path": "adoration-application/modules/adoration-webapp/src/main/java/org/rockhill/adoration/web/controller/AdoratorListController.java",
"license": "gpl-3.0",
"size": 5762
} | [
"javax.servlet.http.HttpSession",
"org.springframework.web.bind.annotation.GetMapping"
] | import javax.servlet.http.HttpSession; import org.springframework.web.bind.annotation.GetMapping; | import javax.servlet.http.*; import org.springframework.web.bind.annotation.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 46,440 |
public Color getTickColor();
| Color function(); | /**
* Returns the color used when drawing tick marks on the meter.
*
* @return the color used when drawing tick marks on the meter
*/ | Returns the color used when drawing tick marks on the meter | getTickColor | {
"repo_name": "juniormesquitadandao/report4all",
"path": "lib/src/net/sf/jasperreports/charts/JRMeterPlot.java",
"license": "mit",
"size": 4954
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,743,528 |
private String _read(String rowKey) throws RowNotFoundException {
Row row = CqlUtils.executeOne(sessionHelper.getSession(), cqlGetMetadata,
ConsistencyLevel.LOCAL_ONE, rowKey);
String jsonString = row != null ? row.getString(CqlTemplate.COL_METADATA_METADATA) : null;
if (json... | String function(String rowKey) throws RowNotFoundException { Row row = CqlUtils.executeOne(sessionHelper.getSession(), cqlGetMetadata, ConsistencyLevel.LOCAL_ONE, rowKey); String jsonString = row != null ? row.getString(CqlTemplate.COL_METADATA_METADATA) : null; if (jsonString != null) { return jsonString; } throw new ... | /**
* Reads a row data from storage (no cache).
*
* @param rowKey
* @return
* @throws RowNotFoundException
*/ | Reads a row data from storage (no cache) | _read | {
"repo_name": "DDTH/ddth-tsc",
"path": "ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/internal/MetadataManager.java",
"license": "mit",
"size": 5101
} | [
"com.datastax.driver.core.ConsistencyLevel",
"com.datastax.driver.core.Row",
"com.github.ddth.cql.CqlUtils"
] | import com.datastax.driver.core.ConsistencyLevel; import com.datastax.driver.core.Row; import com.github.ddth.cql.CqlUtils; | import com.datastax.driver.core.*; import com.github.ddth.cql.*; | [
"com.datastax.driver",
"com.github.ddth"
] | com.datastax.driver; com.github.ddth; | 1,743,554 |
public EncodedChars encodeChars(CharSequence chars) throws CharacterCodingException {
return encoder.encode(chars);
} | EncodedChars function(CharSequence chars) throws CharacterCodingException { return encoder.encode(chars); } | /**
* Encodes a character sequence to a byte array.
* @param chars the characters
* @return the encoded characters
* @throws CharacterCodingException if the encoding operation fails
*/ | Encodes a character sequence to a byte array | encodeChars | {
"repo_name": "pellcorp/fop",
"path": "src/java/org/apache/fop/afp/fonts/CharacterSet.java",
"license": "apache-2.0",
"size": 12473
} | [
"java.nio.charset.CharacterCodingException",
"org.apache.fop.afp.fonts.CharactersetEncoder"
] | import java.nio.charset.CharacterCodingException; import org.apache.fop.afp.fonts.CharactersetEncoder; | import java.nio.charset.*; import org.apache.fop.afp.fonts.*; | [
"java.nio",
"org.apache.fop"
] | java.nio; org.apache.fop; | 2,673,792 |
public @NotNull WSEndpoint getEndpoint() {
return endpoint;
} | @NotNull WSEndpoint function() { return endpoint; } | /**
*
* The created pipeline is used to serve this {@link com.sun.xml.internal.ws.api.server.WSEndpoint}.
* Specifically, its {@link com.sun.xml.internal.ws.api.WSBinding} should be of interest to many
* {@link com.sun.xml.internal.ws.api.pipe.Pipe}s.
* @return Always non-null.
*/ | The created pipeline is used to serve this <code>com.sun.xml.internal.ws.api.server.WSEndpoint</code>. Specifically, its <code>com.sun.xml.internal.ws.api.WSBinding</code> should be of interest to many <code>com.sun.xml.internal.ws.api.pipe.Pipe</code>s | getEndpoint | {
"repo_name": "samskivert/ikvm-openjdk",
"path": "build/linux-amd64/impsrc/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java",
"license": "gpl-2.0",
"size": 10051
} | [
"com.sun.istack.internal.NotNull",
"com.sun.xml.internal.ws.api.server.WSEndpoint"
] | import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.server.WSEndpoint; | import com.sun.istack.internal.*; import com.sun.xml.internal.ws.api.server.*; | [
"com.sun.istack",
"com.sun.xml"
] | com.sun.istack; com.sun.xml; | 100,701 |
public CcLibraryHelper setNoCopts(@Nullable Pattern nocopts) {
this.nocopts = nocopts;
return this;
} | CcLibraryHelper function(@Nullable Pattern nocopts) { this.nocopts = nocopts; return this; } | /**
* Sets a pattern that is used to filter copts; set to {@code null} for no filtering.
*/ | Sets a pattern that is used to filter copts; set to null for no filtering | setNoCopts | {
"repo_name": "wakashige/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java",
"license": "apache-2.0",
"size": 40893
} | [
"java.util.regex.Pattern",
"javax.annotation.Nullable"
] | import java.util.regex.Pattern; import javax.annotation.Nullable; | import java.util.regex.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 2,756 |
@Test
public void testGetOldPassword() {
ClientRequestChangePasswordData instance = new ClientRequestChangePasswordData();
String oldPassword = "Old Password";
byte[] expResult = oldPassword.getBytes();
instance.setOldPassword(expResult);
byte[] result = instance.getOldPa... | void function() { ClientRequestChangePasswordData instance = new ClientRequestChangePasswordData(); String oldPassword = STR; byte[] expResult = oldPassword.getBytes(); instance.setOldPassword(expResult); byte[] result = instance.getOldPassword(); assertEquals(result.length, expResult.length); for (int i = 0; i < resul... | /**
* Test of getOldPassword method, of class ClientRequestChangePasswordData.
*/ | Test of getOldPassword method, of class ClientRequestChangePasswordData | testGetOldPassword | {
"repo_name": "jimv39/qvcsos",
"path": "qvcse-qvcslib/src/test/java/com/qumasoft/qvcslib/requestdata/ClientRequestChangePasswordDataTest.java",
"license": "apache-2.0",
"size": 4255
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,304,966 |
int getOperationFromRecord(
Record record,
int defaultOpCode,
UnsupportedOperationAction unsupportedAction,
List<OnRecordErrorException> errorRecords
) {
String op = record.getHeader().getAttribute(OperationType.SDC_OPERATION_TYPE);
int opCode = -1; // unsupported
if (Strings.is... | int getOperationFromRecord( Record record, int defaultOpCode, UnsupportedOperationAction unsupportedAction, List<OnRecordErrorException> errorRecords ) { String op = record.getHeader().getAttribute(OperationType.SDC_OPERATION_TYPE); int opCode = -1; if (Strings.isNullOrEmpty(op)) { return defaultOpCode; } try { opCode ... | /**
* Get the numeric operation code from record header. The default code is
* used if the operation code is not found in the header. This can be
* overwritten in inherited classes.
*
* @param record the record to find the operation code
* @param defaultOpCode the default operation code
* @param un... | Get the numeric operation code from record header. The default code is used if the operation code is not found in the header. This can be overwritten in inherited classes | getOperationFromRecord | {
"repo_name": "rockmkd/datacollector",
"path": "jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/JdbcRecordReader.java",
"license": "apache-2.0",
"size": 5709
} | [
"com.google.common.base.Strings",
"com.streamsets.pipeline.api.Record",
"com.streamsets.pipeline.api.base.OnRecordErrorException",
"com.streamsets.pipeline.lib.operation.OperationType",
"com.streamsets.pipeline.lib.operation.UnsupportedOperationAction",
"java.util.List"
] | import com.google.common.base.Strings; import com.streamsets.pipeline.api.Record; import com.streamsets.pipeline.api.base.OnRecordErrorException; import com.streamsets.pipeline.lib.operation.OperationType; import com.streamsets.pipeline.lib.operation.UnsupportedOperationAction; import java.util.List; | import com.google.common.base.*; import com.streamsets.pipeline.api.*; import com.streamsets.pipeline.api.base.*; import com.streamsets.pipeline.lib.operation.*; import java.util.*; | [
"com.google.common",
"com.streamsets.pipeline",
"java.util"
] | com.google.common; com.streamsets.pipeline; java.util; | 2,168,467 |
public List<ByteBuffer> transceive(List<ByteBuffer> request)
throws IOException {
lockChannel();
try {
writeBuffers(request);
return readBuffers();
} finally {
unlockChannel();
}
} | List<ByteBuffer> function(List<ByteBuffer> request) throws IOException { lockChannel(); try { writeBuffers(request); return readBuffers(); } finally { unlockChannel(); } } | /** Called by {@link Requestor#request(String,Object)} for two-way messages.
* By default calls {@link #writeBuffers(List)} followed by
* {@link #readBuffers()}. */ | Called by <code>Requestor#request(String,Object)</code> for two-way messages. By default calls <code>#writeBuffers(List)</code> followed by | transceive | {
"repo_name": "eonezhang/avro",
"path": "lang/java/ipc/src/main/java/org/apache/avro/ipc/Transceiver.java",
"license": "apache-2.0",
"size": 3884
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"java.util.List"
] | import java.io.IOException; import java.nio.ByteBuffer; import java.util.List; | import java.io.*; import java.nio.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 1,705,528 |
public static List<CmsRelationType> getAllNotDefinedInContent() {
return filterNotDefinedInContent(getAll());
} | static List<CmsRelationType> function() { return filterNotDefinedInContent(getAll()); } | /**
* Returns all relation types for relations that are not defined in the content.<p>
*
* @return a list of {@link CmsRelationType} objects
*/ | Returns all relation types for relations that are not defined in the content | getAllNotDefinedInContent | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/relations/CmsRelationType.java",
"license": "lgpl-2.1",
"size": 20963
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 378,473 |
@Override public void exitYear(@NotNull DateParser.YearContext ctx) { } | @Override public void exitYear(@NotNull DateParser.YearContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterYear | {
"repo_name": "cestella/analytics_util",
"path": "components/syntactic_analysis/src/main/java/com/caseystella/parser/DateBaseListener.java",
"license": "apache-2.0",
"size": 3771
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,594,230 |
public SLStatementNode createReturn(Token t, SLExpressionNode valueNode) {
final int start = t.charPos;
final int length = valueNode == null ? t.val.length() : valueNode.getSourceSection().getCharEndIndex() - start;
final SLReturnNode returnNode = new SLReturnNode(valueNode);
returnN... | SLStatementNode function(Token t, SLExpressionNode valueNode) { final int start = t.charPos; final int length = valueNode == null ? t.val.length() : valueNode.getSourceSection().getCharEndIndex() - start; final SLReturnNode returnNode = new SLReturnNode(valueNode); returnNode.setSourceSection(source.createSection(start... | /**
* Returns an {@link SLReturnNode} for the given parameters.
*
* @param t The token containing the return node's info
* @param valueNode The value of the return
* @return An SLReturnNode for the given parameters.
*/ | Returns an <code>SLReturnNode</code> for the given parameters | createReturn | {
"repo_name": "azadmanesh/sl-tracer",
"path": "truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SLNodeFactory.java",
"license": "gpl-2.0",
"size": 24522
} | [
"com.oracle.truffle.sl.nodes.SLExpressionNode",
"com.oracle.truffle.sl.nodes.SLStatementNode",
"com.oracle.truffle.sl.nodes.controlflow.SLReturnNode",
"com.oracle.truffle.sl.tracer.ReturnWrapperNode"
] | import com.oracle.truffle.sl.nodes.SLExpressionNode; import com.oracle.truffle.sl.nodes.SLStatementNode; import com.oracle.truffle.sl.nodes.controlflow.SLReturnNode; import com.oracle.truffle.sl.tracer.ReturnWrapperNode; | import com.oracle.truffle.sl.nodes.*; import com.oracle.truffle.sl.nodes.controlflow.*; import com.oracle.truffle.sl.tracer.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 1,273,414 |
public static BuildDataFile readBuildDataFile(FilePath ws, final String buildNumber, final String stepName, final String stepId) throws IOException, InterruptedException {
return createAndGetTempDir(ws).act(new ReadBuildDataFileCallable(buildNumber, stepName, stepId));
} | static BuildDataFile function(FilePath ws, final String buildNumber, final String stepName, final String stepId) throws IOException, InterruptedException { return createAndGetTempDir(ws).act(new ReadBuildDataFileCallable(buildNumber, stepName, stepId)); } | /**
* Read pipeline build data from @tmp/artifactory-pipeline-cache/build-number directory.
* Used to transfer data between different steps in declarative pipelines.
*
* @param buildNumber - The build number.
* @param stepName - The step name - One of 'artifactoryMaven', 'mavenDeploy', 'mave... | Read pipeline build data from @tmp/artifactory-pipeline-cache/build-number directory. Used to transfer data between different steps in declarative pipelines | readBuildDataFile | {
"repo_name": "JFrogDev/jenkins-artifactory-plugin",
"path": "src/main/java/org/jfrog/hudson/pipeline/declarative/utils/DeclarativePipelineUtils.java",
"license": "apache-2.0",
"size": 8799
} | [
"java.io.IOException",
"org.jfrog.hudson.pipeline.declarative.BuildDataFile",
"org.jfrog.hudson.util.ExtractorUtils"
] | import java.io.IOException; import org.jfrog.hudson.pipeline.declarative.BuildDataFile; import org.jfrog.hudson.util.ExtractorUtils; | import java.io.*; import org.jfrog.hudson.pipeline.declarative.*; import org.jfrog.hudson.util.*; | [
"java.io",
"org.jfrog.hudson"
] | java.io; org.jfrog.hudson; | 1,007,020 |
public CoordGrid offset (CompassPoint direction) {
return copyNew(direction.getDeltaX(), direction.getDeltaY(), 0);
} | CoordGrid function (CompassPoint direction) { return copyNew(direction.getDeltaX(), direction.getDeltaY(), 0); } | /**
* Gets the tile offset in the given direction. Does not modify the coord itself
*
* For example, if 3200,3200 was offset NORTH, the returned coordinate would be 3201,3200
* @param direction The direction to offset by
* @return The offset coordinate.
*/ | Gets the tile offset in the given direction. Does not modify the coord itself For example, if 3200,3200 was offset NORTH, the returned coordinate would be 3201,3200 | offset | {
"repo_name": "Sundays211/VirtueRS3",
"path": "src/main/java/org/virtue/game/map/CoordGrid.java",
"license": "mit",
"size": 18408
} | [
"org.virtue.core.constants.CompassPoint"
] | import org.virtue.core.constants.CompassPoint; | import org.virtue.core.constants.*; | [
"org.virtue.core"
] | org.virtue.core; | 833,048 |
public TokenCreator getTokenCreator() {
return this.tokenCreator;
} | TokenCreator function() { return this.tokenCreator; } | /**
* Returns the used token-creator for the parsing process.
* @return The token-creator.
*/ | Returns the used token-creator for the parsing process | getTokenCreator | {
"repo_name": "stefan-baur/jesadido-poc",
"path": "src/main/java/org/jesadido/poc/core/syntax/Grammar.java",
"license": "lgpl-3.0",
"size": 9422
} | [
"org.jesadido.poc.core.syntax.tokens.TokenCreator"
] | import org.jesadido.poc.core.syntax.tokens.TokenCreator; | import org.jesadido.poc.core.syntax.tokens.*; | [
"org.jesadido.poc"
] | org.jesadido.poc; | 1,218,812 |
// ------------------------------------------------------------------------------------------
private int computeNumberOfBuildings() {
int numberOfBuildings = 0;
List<BuildingDescriptor> descriptors = mCityConfig
.getBuildingDescriptors();
for (BuildingDescriptor cur : descriptors) {
numberOfBu... | int function() { int numberOfBuildings = 0; List<BuildingDescriptor> descriptors = mCityConfig .getBuildingDescriptors(); for (BuildingDescriptor cur : descriptors) { numberOfBuildings += cur.getInstanceCount(); } return numberOfBuildings; } | /**
* Methode bestimmt, wieviele Gebaeude gebaut werden sollen
*
* @return Anzahl der insgesamt zu errichtenden Gebaeude
*/ | Methode bestimmt, wieviele Gebaeude gebaut werden sollen | computeNumberOfBuildings | {
"repo_name": "pgunia/SemanticBuildingModeler_Code",
"path": "Prototype/src/semantic/building/modeler/prototype/city/City.java",
"license": "gpl-2.0",
"size": 7918
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,712,044 |
public static Collection<Patient> fromJsonArrayToPatients(String json) {
return new JSONDeserializer<List<Patient>>().use(null, ArrayList.class)
.use("values", Patient.class).deserialize(json);
}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
@Version
@Co... | static Collection<Patient> function(String json) { return new JSONDeserializer<List<Patient>>().use(null, ArrayList.class) .use(STR, Patient.class).deserialize(json); } @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private Long id; @Column(name = STR) private Integer version; | /**
* From json array to patients.
*
* @param json
* the json
* @return the collection
*/ | From json array to patients | fromJsonArrayToPatients | {
"repo_name": "tlin-fei/ds4p",
"path": "DS4P/consent2share/core/src/main/java/gov/samhsa/consent2share/domain/patient/Patient.java",
"license": "bsd-3-clause",
"size": 22738
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"javax.persistence.Column",
"javax.persistence.GeneratedValue",
"javax.persistence.GenerationType"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 631,977 |
public static boolean isValidLayout( GridItem grid, Module module )
{
int columnCount = grid.getColumnCount( module );
if ( columnCount == 0 )
return false;
// for bugzilla 191687
if ( !checkColumnRepeat( module, grid ) )
return false;
return true;
} | static boolean function( GridItem grid, Module module ) { int columnCount = grid.getColumnCount( module ); if ( columnCount == 0 ) return false; if ( !checkColumnRepeat( module, grid ) ) return false; return true; } | /**
* Checks whether the layout grid is valid or not. The invalid grid has
* following cases:
* <ul>
* <li>column count bigger than zero.
* <li>no repeat value bigger than one in column slot
* </ul>
*
* @param grid
* the table
* @param module
* the root of the table
* @ret... | Checks whether the layout grid is valid or not. The invalid grid has following cases: column count bigger than zero. no repeat value bigger than one in column slot | isValidLayout | {
"repo_name": "sguan-actuate/birt",
"path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/elements/table/LayoutUtil.java",
"license": "epl-1.0",
"size": 9988
} | [
"org.eclipse.birt.report.model.core.Module",
"org.eclipse.birt.report.model.elements.GridItem"
] | import org.eclipse.birt.report.model.core.Module; import org.eclipse.birt.report.model.elements.GridItem; | import org.eclipse.birt.report.model.core.*; import org.eclipse.birt.report.model.elements.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 2,153,164 |
@Test
@Mode(FULL)
public void testInvalidationServletNoLocalCacheTwoServer() throws Exception {
List<String> session = new ArrayList<>();
appA.sessionPut("testInvalidationServletNoLocalCacheTwoServer-foo", "bar", session, true);
appB.invokeServlet("sessionGetTimeout&key=testInvalidat... | @Mode(FULL) void function() throws Exception { List<String> session = new ArrayList<>(); appA.sessionPut(STR, "bar", session, true); appB.invokeServlet(STR, session); appB.sessionGet(STR, null, session); } | /**
* Test that a session, created on one server, which invalidates during a servlet call on a second server
* cannot access the session, which has not been cached locally.
*
* (This test is for ensuring Session Database parity)
*/ | Test that a session, created on one server, which invalidates during a servlet call on a second server cannot access the session, which has not been cached locally. (This test is for ensuring Session Database parity) | testInvalidationServletNoLocalCacheTwoServer | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.session.cache_fat/fat/src/com/ibm/ws/session/cache/fat/SessionCacheTwoServerTimeoutTest.java",
"license": "epl-1.0",
"size": 10050
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,736,161 |
public boolean concatImages(BufferedImage[] buffImages, int cols, int rows, String path) {
BufferedImage finalImg = concatImages(buffImages, cols, rows);
File folder = new File(path);
if (!folder.exists()) {
folder.mkdir();
}
try {
ImageIO.write(fina... | boolean function(BufferedImage[] buffImages, int cols, int rows, String path) { BufferedImage finalImg = concatImages(buffImages, cols, rows); File folder = new File(path); if (!folder.exists()) { folder.mkdir(); } try { ImageIO.write(finalImg, "bmp", new File(folder.getAbsolutePath() + STR)); } catch (IOException ex) ... | /**
* Build an image based on image array and write it to disk on the given
* path
*
* @param buffImages Image array containing all images to be built as one
* simple
* @param cols Number of image columns
* @param rows Number of image rows
* @param path Path to be written
* ... | Build an image based on image array and write it to disk on the given path | concatImages | {
"repo_name": "rlebre/wsi_zoom_level_app",
"path": "WSIViewer/src/main/java/pt/ua/rsi/wsi/Wsi.java",
"license": "gpl-2.0",
"size": 29878
} | [
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.IOException",
"javax.imageio.ImageIO"
] | import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; | import java.awt.image.*; import java.io.*; import javax.imageio.*; | [
"java.awt",
"java.io",
"javax.imageio"
] | java.awt; java.io; javax.imageio; | 1,306,103 |
@Nullable
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
return Blocks.DIRT.getItemDropped(Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.DIRT), rand, fortune);
} | Item function(IBlockState state, Random rand, int fortune) { return Blocks.DIRT.getItemDropped(Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.DIRT), rand, fortune); } | /**
* Get the Item that this Block should drop when harvested.
*/ | Get the Item that this Block should drop when harvested | getItemDropped | {
"repo_name": "danielyc/test-1.9.4",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockGrassPath.java",
"license": "gpl-3.0",
"size": 3035
} | [
"java.util.Random",
"net.minecraft.block.state.IBlockState",
"net.minecraft.init.Blocks",
"net.minecraft.item.Item"
] | import java.util.Random; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.Item; | import java.util.*; import net.minecraft.block.state.*; import net.minecraft.init.*; import net.minecraft.item.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.init",
"net.minecraft.item"
] | java.util; net.minecraft.block; net.minecraft.init; net.minecraft.item; | 1,050,174 |
public void setCookieHandler(CookieHandler cookieHandler) {
this.cookieHandler = cookieHandler;
} | void function(CookieHandler cookieHandler) { this.cookieHandler = cookieHandler; } | /**
* Configure a cookie handler to maintain a HTTP session
*/ | Configure a cookie handler to maintain a HTTP session | setCookieHandler | {
"repo_name": "curso007/camel",
"path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java",
"license": "apache-2.0",
"size": 29348
} | [
"org.apache.camel.http.common.cookie.CookieHandler"
] | import org.apache.camel.http.common.cookie.CookieHandler; | import org.apache.camel.http.common.cookie.*; | [
"org.apache.camel"
] | org.apache.camel; | 167,749 |
void textCacheRefreshed(TextResource resource, String bufferedString)
throws IOException; | void textCacheRefreshed(TextResource resource, String bufferedString) throws IOException; | /**
* Called right after the text cache of the given resource has been
* refreshed.
*
* @param resource The resource for which the binary cache has been updated.
* @param bufferedString The string that has just been cached.
* @throws IOException Can be thrown by implementors if required.
... | Called right after the text cache of the given resource has been refreshed | textCacheRefreshed | {
"repo_name": "skuzzle/reguice",
"path": "src/main/java/de/skuzzle/inject/conf/CachingStrategy.java",
"license": "mit",
"size": 2374
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,891,794 |
@Override
public void combine(Point3d point) {
double dis,oldc_to_new_c;
if( boundsIsInfinite) {
return;
}
if( boundsIsEmpty) {
radius = 0.0;
center.x = point.x;
center.y = point.y;
center.z = point.z;
} else {
dis = Math.sqrt( (point.x - center.x)*(point.x - center.x) +
... | void function(Point3d point) { double dis,oldc_to_new_c; if( boundsIsInfinite) { return; } if( boundsIsEmpty) { radius = 0.0; center.x = point.x; center.y = point.y; center.z = point.z; } else { dis = Math.sqrt( (point.x - center.x)*(point.x - center.x) + (point.y - center.y)*(point.y - center.y) + (point.z - center.z)... | /**
* Combines this bounding sphere with a point.
* @param point a 3D point in space
*/ | Combines this bounding sphere with a point | combine | {
"repo_name": "kephale/java3d-core",
"path": "src/classes/share/javax/media/j3d/BoundingSphere.java",
"license": "gpl-2.0",
"size": 51579
} | [
"javax.vecmath.Point3d"
] | import javax.vecmath.Point3d; | import javax.vecmath.*; | [
"javax.vecmath"
] | javax.vecmath; | 77,670 |
@Message(id=16859, value = "Invalid 'from' type '%s' for Dozer transformer")
SwitchYardException invalidFromTypeForDozerTransformer(QName from); | @Message(id=16859, value = STR) SwitchYardException invalidFromTypeForDozerTransformer(QName from); | /**
* invalidFromTypeForDozerTransformer method definition.
* @param from 'from' QName
* @return SwitchYardException
*/ | invalidFromTypeForDozerTransformer method definition | invalidFromTypeForDozerTransformer | {
"repo_name": "cunningt/switchyard",
"path": "core/transform/src/main/java/org/switchyard/transform/internal/TransformMessages.java",
"license": "apache-2.0",
"size": 22568
} | [
"javax.xml.namespace.QName",
"org.jboss.logging.annotations.Message",
"org.switchyard.SwitchYardException"
] | import javax.xml.namespace.QName; import org.jboss.logging.annotations.Message; import org.switchyard.SwitchYardException; | import javax.xml.namespace.*; import org.jboss.logging.annotations.*; import org.switchyard.*; | [
"javax.xml",
"org.jboss.logging",
"org.switchyard"
] | javax.xml; org.jboss.logging; org.switchyard; | 2,377,693 |
private CmsXmlContent unmarshalXmlContent(CmsFile file) throws CmsXmlException {
CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms, file);
content.setAutoCorrectionEnabled(true);
content.correctXmlStructure(m_cms);
return content;
} | CmsXmlContent function(CmsFile file) throws CmsXmlException { CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms, file); content.setAutoCorrectionEnabled(true); content.correctXmlStructure(m_cms); return content; } | /**
* Unmarshal the XML content with auto-correction.
* @param file the file that contains the XML
* @return the XML read from the file
* @throws CmsXmlException thrown if the XML can't be read.
*/ | Unmarshal the XML content with auto-correction | unmarshalXmlContent | {
"repo_name": "gallardo/opencms-core",
"path": "src/org/opencms/ugc/CmsUgcSession.java",
"license": "lgpl-2.1",
"size": 29917
} | [
"org.opencms.file.CmsFile",
"org.opencms.xml.CmsXmlException",
"org.opencms.xml.content.CmsXmlContent",
"org.opencms.xml.content.CmsXmlContentFactory"
] | import org.opencms.file.CmsFile; import org.opencms.xml.CmsXmlException; import org.opencms.xml.content.CmsXmlContent; import org.opencms.xml.content.CmsXmlContentFactory; | import org.opencms.file.*; import org.opencms.xml.*; import org.opencms.xml.content.*; | [
"org.opencms.file",
"org.opencms.xml"
] | org.opencms.file; org.opencms.xml; | 976,827 |
public void giveExp(int num) {
int exp = this.getExp();
int expn = this.getExpNeeded();
int lev = this.getLevel();
boolean exped=false;
if(this.controller instanceof NPCController){
return;
}
exp += num;
while (exp >= expn) {
exp -= expn;
expn *= 2;
lev++;
exped=true;
}
f... | void function(int num) { int exp = this.getExp(); int expn = this.getExpNeeded(); int lev = this.getLevel(); boolean exped=false; if(this.controller instanceof NPCController){ return; } exp += num; while (exp >= expn) { exp -= expn; expn *= 2; lev++; exped=true; } for (Iterator<Entry<Attribute, Long>> set = attributes.... | /**
* Use this to give an experience points to a creature. This can change
* creature's level (when after change exp>=expNeeded).
*
* @todo force class change upon some level/block change
* @todo Write this to database
*/ | Use this to give an experience points to a creature. This can change creature's level (when after change exp>=expNeeded) | giveExp | {
"repo_name": "kosttek/MegaMud",
"path": "src/pl/edu/agh/megamud/base/Creature.java",
"license": "bsd-3-clause",
"size": 12278
} | [
"java.util.Iterator",
"java.util.Map",
"pl.edu.agh.megamud.dao.Attribute"
] | import java.util.Iterator; import java.util.Map; import pl.edu.agh.megamud.dao.Attribute; | import java.util.*; import pl.edu.agh.megamud.dao.*; | [
"java.util",
"pl.edu.agh"
] | java.util; pl.edu.agh; | 320,699 |
public void setShape(@Nullable Shape shape) {
this.shape = shape;
invalidate();
} | void function(@Nullable Shape shape) { this.shape = shape; invalidate(); } | /**
* Set the {@link Shape} to draw.
*
* @param shape a {@link Shape}.
*/ | Set the <code>Shape</code> to draw | setShape | {
"repo_name": "literacyapp-org/shapi",
"path": "app/src/main/java/fr/tvbarthel/apps/shapi/shape/ShapeView.java",
"license": "apache-2.0",
"size": 4903
} | [
"android.support.annotation.Nullable"
] | import android.support.annotation.Nullable; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 300,421 |
@Override
public MaterializedReplica getMaterializedReplica(ExtendedBlock block)
throws ReplicaNotFoundException {
File blockFile;
try {
ReplicaInfo r = dataset.getReplicaInfo(block);
blockFile = new File(r.getBlockURI());
} catch (IOException e) {
LOG.error("Block file for " + b... | MaterializedReplica function(ExtendedBlock block) throws ReplicaNotFoundException { File blockFile; try { ReplicaInfo r = dataset.getReplicaInfo(block); blockFile = new File(r.getBlockURI()); } catch (IOException e) { LOG.error(STR + block + STR, e); throw new ReplicaNotFoundException(block); } File metaFile = FsDatase... | /**
* Return a materialized replica from the FsDatasetImpl.
*/ | Return a materialized replica from the FsDatasetImpl | getMaterializedReplica | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImplTestUtils.java",
"license": "apache-2.0",
"size": 17565
} | [
"java.io.File",
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.server.datanode.ReplicaInfo",
"org.apache.hadoop.hdfs.server.datanode.ReplicaNotFoundException"
] | import java.io.File; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo; import org.apache.hadoop.hdfs.server.datanode.ReplicaNotFoundException; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,728,625 |
private String suggestedFilename(final String q) throws UnsupportedEncodingException {
Map<String,String> params = ServiceCore.splitQuery(q);
String[] terms = params.get("q").split("\\s+");
String type = params.get("type");
for (String t : terms) {
if (t.matches("^[A-Za-z... | String function(final String q) throws UnsupportedEncodingException { Map<String,String> params = ServiceCore.splitQuery(q); String[] terms = params.get("q").split("\\s+"); String type = params.get("type"); for (String t : terms) { if (t.matches(STR) t.matches(STR)) { String s = t.substring(0,4).toUpperCase(); return s... | /**
* Responsible for examining the query string and determining a filename suitable for
* users to save to. Should be conservative in the characters used and the length. Use of a suitable
* extension is strongly recommended.
*
* @param q
* @return
*/ | Responsible for examining the query string and determining a filename suitable for users to save to. Should be conservative in the characters used and the length. Use of a suitable extension is strongly recommended | suggestedFilename | {
"repo_name": "ozacas/hrgp-hub",
"path": "src/main/java/au/edu/unimelb/plantcell/hrgp/services/AssemblyDownload.java",
"license": "gpl-2.0",
"size": 7647
} | [
"java.io.UnsupportedEncodingException",
"java.util.Map"
] | import java.io.UnsupportedEncodingException; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,254,399 |
public void setFile(File file) {
this.file = file;
// update configuration as well
getConfiguration().setDirectory(FileUtil.isAbsolute(file) ? file.getAbsolutePath() : file.getPath());
} | void function(File file) { this.file = file; getConfiguration().setDirectory(FileUtil.isAbsolute(file) ? file.getAbsolutePath() : file.getPath()); } | /**
* The starting directory
*/ | The starting directory | setFile | {
"repo_name": "ullgren/camel",
"path": "components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java",
"license": "apache-2.0",
"size": 20622
} | [
"java.io.File",
"org.apache.camel.util.FileUtil"
] | import java.io.File; import org.apache.camel.util.FileUtil; | import java.io.*; import org.apache.camel.util.*; | [
"java.io",
"org.apache.camel"
] | java.io; org.apache.camel; | 2,141,900 |
public HaloEvent.Builder withExtra(@NonNull Object values) {
AssertionUtils.notNull(values, "values");
Map<String, Object> mapped = mapValues(values);
if (mapped != null) {
JSONObject data = new JSONObject(mapped);
mExtra = data;
}
... | HaloEvent.Builder function(@NonNull Object values) { AssertionUtils.notNull(values, STR); Map<String, Object> mapped = mapValues(values); if (mapped != null) { JSONObject data = new JSONObject(mapped); mExtra = data; } return this; } | /**
* Set the content extra values.
*
* @param values The additional information.
* @return The builder.
*/ | Set the content extra values | withExtra | {
"repo_name": "mobgen/halo-android",
"path": "sdk/halo-sdk/src/main/java/com/mobgen/halo/android/sdk/core/management/models/HaloEvent.java",
"license": "apache-2.0",
"size": 9704
} | [
"android.support.annotation.NonNull",
"com.mobgen.halo.android.framework.common.utils.AssertionUtils",
"java.util.Map",
"org.json.JSONObject"
] | import android.support.annotation.NonNull; import com.mobgen.halo.android.framework.common.utils.AssertionUtils; import java.util.Map; import org.json.JSONObject; | import android.support.annotation.*; import com.mobgen.halo.android.framework.common.utils.*; import java.util.*; import org.json.*; | [
"android.support",
"com.mobgen.halo",
"java.util",
"org.json"
] | android.support; com.mobgen.halo; java.util; org.json; | 1,794,954 |
@ServiceMethod(returns = ReturnType.SINGLE)
DeploymentResourceInner createOrUpdate(
String resourceGroupName,
String serviceName,
String appName,
String deploymentName,
DeploymentResourceInner deploymentResource); | @ServiceMethod(returns = ReturnType.SINGLE) DeploymentResourceInner createOrUpdate( String resourceGroupName, String serviceName, String appName, String deploymentName, DeploymentResourceInner deploymentResource); | /**
* Create a new Deployment or update an exiting Deployment.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
*... | Create a new Deployment or update an exiting Deployment | createOrUpdate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/DeploymentsClient.java",
"license": "mit",
"size": 59035
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.appplatform.fluent.models.DeploymentResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.appplatform.fluent.models.DeploymentResourceInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.appplatform.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,518,098 |
private native void sinkEventImpl(Element elem, String typeName) ; | native void function(Element elem, String typeName) ; | /**
* Sink an event on the element.
*
* @param elem the element to sink the event on
* @param typeName the name of the event to sink
*/ | Sink an event on the element | sinkEventImpl | {
"repo_name": "ArcBees/gwtquery-droppable-plugin",
"path": "plugin/src/main/java/com/google/gwt/user/cellview/client/CellBasedWidgetImplStandard.java",
"license": "mit",
"size": 5469
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,368,225 |
public static Set<Aspect> collectExtendedAspects(Aspect aspect) {
Set<Instantiation> instantiations = collectExtendsInstantiations(aspect);
Set<Aspect> extendedAspects = new HashSet<Aspect>();
for (Instantiation instantiation : instantiations) {
extendedAspects.add(instanti... | static Set<Aspect> function(Aspect aspect) { Set<Instantiation> instantiations = collectExtendsInstantiations(aspect); Set<Aspect> extendedAspects = new HashSet<Aspect>(); for (Instantiation instantiation : instantiations) { extendedAspects.add(instantiation.getSource()); } return extendedAspects; } | /**
* Collects a set of aspects that are extended by this aspect.
* Collects these recursively in case an extended aspect also extends another aspect.
*
* @param aspect the current aspect
* @return the set of aspects that are extended by this aspect
*/ | Collects a set of aspects that are extended by this aspect. Collects these recursively in case an extended aspect also extends another aspect | collectExtendedAspects | {
"repo_name": "sacooper/ECSE-429-Project-Group1",
"path": "ca.mcgill.sel.ram/src/ca/mcgill/sel/ram/util/RAMModelUtil.java",
"license": "gpl-2.0",
"size": 51401
} | [
"ca.mcgill.sel.ram.Aspect",
"ca.mcgill.sel.ram.Instantiation",
"java.util.HashSet",
"java.util.Set"
] | import ca.mcgill.sel.ram.Aspect; import ca.mcgill.sel.ram.Instantiation; import java.util.HashSet; import java.util.Set; | import ca.mcgill.sel.ram.*; import java.util.*; | [
"ca.mcgill.sel",
"java.util"
] | ca.mcgill.sel; java.util; | 2,669,312 |
public List<NamedFacebookType> getWith() {
return unmodifiableList(with);
}
}
public static class Currency implements Serializable {
@Facebook("user_currency")
private String userCurrency;
@Facebook("currency_exchange")
private BigDecimal currencyExchange;
@Facebo... | List<NamedFacebookType> function() { return unmodifiableList(with); } } public static class Currency implements Serializable { @Facebook(STR) private String userCurrency; @Facebook(STR) private BigDecimal currencyExchange; @Facebook(STR) private BigDecimal currencyExchangeInverse; @Facebook(STR) private BigDecimal curr... | /**
* Friends associated with this sport.
*
* @return Friends associated with this sport.
*/ | Friends associated with this sport | getWith | {
"repo_name": "oleke/Gender-Mining",
"path": "restfb/source/library/com/restfb/types/User.java",
"license": "apache-2.0",
"size": 20976
} | [
"com.restfb.Facebook",
"java.io.Serializable",
"java.math.BigDecimal",
"java.util.Collections",
"java.util.List"
] | import com.restfb.Facebook; import java.io.Serializable; import java.math.BigDecimal; import java.util.Collections; import java.util.List; | import com.restfb.*; import java.io.*; import java.math.*; import java.util.*; | [
"com.restfb",
"java.io",
"java.math",
"java.util"
] | com.restfb; java.io; java.math; java.util; | 429,536 |
public static Representation newInstance(String contentId, long revisionId, Format format,
SegmentBase segmentBase, String customCacheKey) {
if (segmentBase instanceof SingleSegmentBase) {
return new SingleSegmentRepresentation(contentId, revisionId, format,
(SingleSegmentBase) segmentBase, ... | static Representation function(String contentId, long revisionId, Format format, SegmentBase segmentBase, String customCacheKey) { if (segmentBase instanceof SingleSegmentBase) { return new SingleSegmentRepresentation(contentId, revisionId, format, (SingleSegmentBase) segmentBase, customCacheKey, -1); } else if (segmen... | /**
* Constructs a new instance.
*
* @param contentId Identifies the piece of content to which this representation belongs.
* @param revisionId Identifies the revision of the content.
* @param format The format of the representation.
* @param segmentBase A segment base element for the representation.
... | Constructs a new instance | newInstance | {
"repo_name": "ppamorim/ExoPlayer",
"path": "library/src/main/java/com/google/android/exoplayer/dash/mpd/Representation.java",
"license": "apache-2.0",
"size": 10721
} | [
"com.google.android.exoplayer.chunk.Format",
"com.google.android.exoplayer.dash.mpd.SegmentBase"
] | import com.google.android.exoplayer.chunk.Format; import com.google.android.exoplayer.dash.mpd.SegmentBase; | import com.google.android.exoplayer.chunk.*; import com.google.android.exoplayer.dash.mpd.*; | [
"com.google.android"
] | com.google.android; | 1,102,539 |
private void updateTodayButtonEnabled() {
boolean todayBtnEnabled = true;
Date today = new Date();
switch ( viewType ) {
case DAY:
if ( DateUtils.areDatesEqual( today, currentDate ) ) {
todayBtnEnabled = false;
}
... | void function() { boolean todayBtnEnabled = true; Date today = new Date(); switch ( viewType ) { case DAY: if ( DateUtils.areDatesEqual( today, currentDate ) ) { todayBtnEnabled = false; } break; case WEEK: DateRange weekRange = DateUtils.getWeekDateRange( currentDate ); if ( DateUtils.isDateInRange( today, weekRange )... | /**
* Determines if 'today' is within the currently displayed date range (e.g. week or month). If it is, the 'Today' button is
* disabled, otherwise its enabled.
* <p/>
* Clicking on "Today" button when current day (today) is already displayed is useless, so its better to disable the button.
*/ | Determines if 'today' is within the currently displayed date range (e.g. week or month). If it is, the 'Today' button is disabled, otherwise its enabled. Clicking on "Today" button when current day (today) is already displayed is useless, so its better to disable the button | updateTodayButtonEnabled | {
"repo_name": "pefernan/jbpm-console-ng",
"path": "jbpm-wb-common/jbpm-wb-common-client/src/main/java/org/jbpm/workbench/common/client/util/CalendarPicker.java",
"license": "apache-2.0",
"size": 11332
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,444,560 |
private void increaseLengthTo(int index, int maxLength) {
if (highestResultIndex > -1) {
int newResultsCount = Math.min(index-highestResultIndex, maxLength);
if (newResultsCount == maxLength) {
results.clear();
results.addAll(Collections.<T> nCopies(ma... | void function(int index, int maxLength) { if (highestResultIndex > -1) { int newResultsCount = Math.min(index-highestResultIndex, maxLength); if (newResultsCount == maxLength) { results.clear(); results.addAll(Collections.<T> nCopies(maxLength, null)); } else if (newResultsCount > 0) { results.addAll(Collections.<T> nC... | /**
* Increases the size of cached results buffer.
* @param index the index to increase length to
* @param maxLength the maximum length of the results buffer
*/ | Increases the size of cached results buffer | increaseLengthTo | {
"repo_name": "troestergmbh/ta4j",
"path": "ta4j/src/main/java/eu/verdelhan/ta4j/indicators/CachedIndicator.java",
"license": "mit",
"size": 5685
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 1,062,726 |
public void setAuthDAO(UserRoleDAO authDAO) {
this.authDAO = authDAO;
} | void function(UserRoleDAO authDAO) { this.authDAO = authDAO; } | /**
* Spring setter.
* @param authDAO set the authentication dao bean.
*/ | Spring setter | setAuthDAO | {
"repo_name": "DIA-NZ/webcurator",
"path": "wct-core/src/main/java/org/webcurator/auth/WCTAuthenticationProcessingFilter.java",
"license": "apache-2.0",
"size": 5278
} | [
"org.webcurator.domain.UserRoleDAO"
] | import org.webcurator.domain.UserRoleDAO; | import org.webcurator.domain.*; | [
"org.webcurator.domain"
] | org.webcurator.domain; | 1,320,804 |
public static JSONArray getArrayFromJSONObject(JSONObject object, String key) {
// Return the key from the first object
try {
return object.getJSONArray(key);
}
catch (JSONException e) {
return null;
}
catch (NullPointerException e) {
return null;
}
} | static JSONArray function(JSONObject object, String key) { try { return object.getJSONArray(key); } catch (JSONException e) { return null; } catch (NullPointerException e) { return null; } } | /**
* This method retrieves the value from the given key from a given JSON Object.
* It returns the value as a JSONArray.
*/ | This method retrieves the value from the given key from a given JSON Object. It returns the value as a JSONArray | getArrayFromJSONObject | {
"repo_name": "IIStevowII/Chatter",
"path": "Android/src/nl/stevenhack/chatter/helpers/DataHelper.java",
"license": "mit",
"size": 3747
} | [
"org.json.JSONArray",
"org.json.JSONException",
"org.json.JSONObject"
] | import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 2,726,178 |
public static Throwable getExceptionToDisplay(Throwable exception) {
Throwable toDisplayException = null;
if (exception != null) {
Collection<Throwable> exceptions = SilverpeasException.getChainedExceptions(exception);
for (Throwable exception1 : exceptions) {
toDisplayException = exceptio... | static Throwable function(Throwable exception) { Throwable toDisplayException = null; if (exception != null) { Collection<Throwable> exceptions = SilverpeasException.getChainedExceptions(exception); for (Throwable exception1 : exceptions) { toDisplayException = exception1; } } return toDisplayException; } | /**
* Method declaration
* @param exception
* @return
* @see
*/ | Method declaration | getExceptionToDisplay | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "web-core/src/main/java/com/stratelia/webactiv/homepage/HomePageUtil.java",
"license": "agpl-3.0",
"size": 5515
} | [
"com.stratelia.webactiv.util.exception.SilverpeasException",
"java.util.Collection"
] | import com.stratelia.webactiv.util.exception.SilverpeasException; import java.util.Collection; | import com.stratelia.webactiv.util.exception.*; import java.util.*; | [
"com.stratelia.webactiv",
"java.util"
] | com.stratelia.webactiv; java.util; | 367,013 |
//-----------------------------------------------------------------------
private static boolean dateByOrdinal(
DateTimeFormatterBuilder bld,
Collection<DateTimeFieldType> fields,
boolean extended,
boolean strictISO) {
boolean reducedPrec = false;
if (fi... | static boolean function( DateTimeFormatterBuilder bld, Collection<DateTimeFieldType> fields, boolean extended, boolean strictISO) { boolean reducedPrec = false; if (fields.remove(DateTimeFieldType.year())) { bld.append(Constants.ye); if (fields.remove(DateTimeFieldType.dayOfYear())) { appendSeparator(bld, extended); bl... | /**
* Creates a date using the ordinal date format.
* Specification reference: 5.2.2.
*
* @param bld the builder
* @param fields the fields
* @param extended true to use extended format
* @param strictISO true to only allow ISO formats
* @since 1.1
*/ | Creates a date using the ordinal date format. Specification reference: 5.2.2 | dateByOrdinal | {
"repo_name": "0359xiaodong/joda-time-android",
"path": "library/src/org/joda/time/format/ISODateTimeFormat.java",
"license": "apache-2.0",
"size": 76312
} | [
"java.util.Collection",
"org.joda.time.DateTimeFieldType"
] | import java.util.Collection; import org.joda.time.DateTimeFieldType; | import java.util.*; import org.joda.time.*; | [
"java.util",
"org.joda.time"
] | java.util; org.joda.time; | 280,361 |
@Override
@SuppressWarnings("unchecked")
public List<Return> executeEvents(final EventType _eventType,
final Object... _objectTuples)
throws EFapsException
{
List<Return> ret = new ArrayList<>();
if (_eventType.equals(EventType.UI_COMMAND_EXE... | @SuppressWarnings(STR) List<Return> function(final EventType _eventType, final Object... _objectTuples) throws EFapsException { List<Return> ret = new ArrayList<>(); if (_eventType.equals(EventType.UI_COMMAND_EXECUTE) && getCommand().hasEvents(EventType.UI_PICKER)) { this.executed = true; final Parameter param = new Pa... | /**
* Execute events.
*
* @param _eventType the event type
* @param _objectTuples the object tuples
* @return the list< return>
* @throws EFapsException on error
*/ | Execute events | executeEvents | {
"repo_name": "eFaps/eFaps-WebApp",
"path": "src/main/java/org/efaps/ui/wicket/models/field/UIPicker.java",
"license": "apache-2.0",
"size": 8438
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.efaps.admin.event.EventType",
"org.efaps.admin.event.Parameter",
"org.efaps.admin.event.Return",
"org.efaps.db.Context",
"org.efaps.util.EFapsException"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.efaps.admin.event.EventType; import org.efaps.admin.event.Parameter; import org.efaps.admin.event.Return; import org.efaps.db.Context; import org.efaps.util.EFapsException; | import java.util.*; import org.efaps.admin.event.*; import org.efaps.db.*; import org.efaps.util.*; | [
"java.util",
"org.efaps.admin",
"org.efaps.db",
"org.efaps.util"
] | java.util; org.efaps.admin; org.efaps.db; org.efaps.util; | 2,201,643 |
public void writeln(Collection<? extends CharSequence> data) throws IllegalStateException, IOException{
writeln(StandardCharsets.US_ASCII, data);
} | void function(Collection<? extends CharSequence> data) throws IllegalStateException, IOException{ writeln(StandardCharsets.US_ASCII, data); } | /**
* <p>Sends a collection of ASCII string objects each appended with a line terminator (CR+LF) to the serial port/device.</p>
*
* @param data
* A collection of ASCII string objects (or an array) of data to be transmitted. (variable-length-argument)
*/ | Sends a collection of ASCII string objects each appended with a line terminator (CR+LF) to the serial port/device | writeln | {
"repo_name": "Pi4J/pi4j",
"path": "pi4j-core/src/main/java/com/pi4j/io/serial/impl/AbstractSerialDataWriter.java",
"license": "lgpl-3.0",
"size": 11555
} | [
"java.io.IOException",
"java.nio.charset.StandardCharsets",
"java.util.Collection"
] | import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Collection; | import java.io.*; import java.nio.charset.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 2,099,294 |
protected Method getCreateMethod(Object home) throws AspectException {
try {
// Cache the EJB create() method that must be declared on the home interface.
return home.getClass().getMethod("create", (Class[]) null);
}
catch (NoSuchMethodException ex) {
throw new AspectException("EJB home [" + home + "]... | Method function(Object home) throws AspectException { try { return home.getClass().getMethod(STR, (Class[]) null); } catch (NoSuchMethodException ex) { throw new AspectException(STR + home + STR); } } | /**
* Determine the create method of the given EJB home object.
* @param home the EJB home object
* @return the create method
* @throws AspectException if the method couldn't be retrieved
*/ | Determine the create method of the given EJB home object | getCreateMethod | {
"repo_name": "raedle/univis",
"path": "lib/springframework-1.2.8/src/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java",
"license": "lgpl-2.1",
"size": 5682
} | [
"java.lang.reflect.Method",
"org.aopalliance.aop.AspectException"
] | import java.lang.reflect.Method; import org.aopalliance.aop.AspectException; | import java.lang.reflect.*; import org.aopalliance.aop.*; | [
"java.lang",
"org.aopalliance.aop"
] | java.lang; org.aopalliance.aop; | 691,630 |
@Hierarchy(HierarchyOp.GET)
PlotMargin getMargin(); | @Hierarchy(HierarchyOp.GET) PlotMargin getMargin(); | /**
* Returns the margin of this plot.
*
* @return the margin of this plot
*/ | Returns the margin of this plot | getMargin | {
"repo_name": "jplot2d/jplot2d",
"path": "jplot2d-core/src/main/java/org/jplot2d/element/Plot.java",
"license": "lgpl-3.0",
"size": 13155
} | [
"org.jplot2d.annotation.Hierarchy",
"org.jplot2d.annotation.HierarchyOp"
] | import org.jplot2d.annotation.Hierarchy; import org.jplot2d.annotation.HierarchyOp; | import org.jplot2d.annotation.*; | [
"org.jplot2d.annotation"
] | org.jplot2d.annotation; | 1,837,160 |
@Test
public void testDeregisterThenDisconnect() {
TestDomainManager manager = new TestDomainManager(domain);
AtomicInteger active = new AtomicInteger(0);
AtomicInteger standby = new AtomicInteger(0);
manager.register(id, (role, domain) -> {
if (role == Role.ACTIVE) ... | void function() { TestDomainManager manager = new TestDomainManager(domain); AtomicInteger active = new AtomicInteger(0); AtomicInteger standby = new AtomicInteger(0); manager.register(id, (role, domain) -> { if (role == Role.ACTIVE) { active.incrementAndGet(); } else if (role == Role.STANDBY) { standby.incrementAndGet... | /**
* Test that once we have deregistered we won't receive anymore notifications to our callbacks.
*/ | Test that once we have deregistered we won't receive anymore notifications to our callbacks | testDeregisterThenDisconnect | {
"repo_name": "jeffgdotorg/opennms",
"path": "features/distributed/coordination/common/src/test/java/org/opennms/features/distributed/coordination/common/ConnectionBasedDomainManagerTest.java",
"license": "gpl-2.0",
"size": 5433
} | [
"com.jayway.awaitility.Awaitility",
"java.util.concurrent.TimeUnit",
"java.util.concurrent.atomic.AtomicInteger",
"org.junit.Assert",
"org.opennms.features.distributed.coordination.api.Role"
] | import com.jayway.awaitility.Awaitility; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Assert; import org.opennms.features.distributed.coordination.api.Role; | import com.jayway.awaitility.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.junit.*; import org.opennms.features.distributed.coordination.api.*; | [
"com.jayway.awaitility",
"java.util",
"org.junit",
"org.opennms.features"
] | com.jayway.awaitility; java.util; org.junit; org.opennms.features; | 772,494 |
void deleteDataValues( DataElement dataElement );
| void deleteDataValues( DataElement dataElement ); | /**
* Deletes all data values for the given data element.
*
* @param dataElement the data element.
*/ | Deletes all data values for the given data element | deleteDataValues | {
"repo_name": "troyel/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValueService.java",
"license": "bsd-3-clause",
"size": 10974
} | [
"org.hisp.dhis.dataelement.DataElement"
] | import org.hisp.dhis.dataelement.DataElement; | import org.hisp.dhis.dataelement.*; | [
"org.hisp.dhis"
] | org.hisp.dhis; | 1,553,621 |
private static List<String> recursiveDeleteFilesStartingWith(FileSystem fileSystem, Path directory, String filePrefix)
{
FileStatus[] allFiles;
try {
allFiles = fileSystem.listStatus(directory);
}
catch (IOException e) {
return ImmutableList.of(directory +... | static List<String> function(FileSystem fileSystem, Path directory, String filePrefix) { FileStatus[] allFiles; try { allFiles = fileSystem.listStatus(directory); } catch (IOException e) { return ImmutableList.of(directory + "/" + filePrefix + "*"); } ImmutableList.Builder<String> notDeletedFiles = ImmutableList.builde... | /**
* Attempt to remove all files in all directories within {@code location} that start with the {@code filePrefix}.
* @return the files starting with the {@code filePrefix} that could not be removed
*/ | Attempt to remove all files in all directories within location that start with the filePrefix | recursiveDeleteFilesStartingWith | {
"repo_name": "nileema/presto",
"path": "presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java",
"license": "apache-2.0",
"size": 79730
} | [
"com.facebook.presto.hadoop.HadoopFileStatus",
"com.google.common.collect.ImmutableList",
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import com.facebook.presto.hadoop.HadoopFileStatus; import com.google.common.collect.ImmutableList; import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import com.facebook.presto.hadoop.*; import com.google.common.collect.*; import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; | [
"com.facebook.presto",
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.facebook.presto; com.google.common; java.io; java.util; org.apache.hadoop; | 945,705 |
private boolean listenerRemove0(Object topic, GridMessageListener exp) {
if (topic instanceof GridTopic) {
synchronized (sysLsnrsMux) {
return systemListenerChange(topic, exp, null);
}
}
else
return lsnrMap.remove(topic, exp);
} | boolean function(Object topic, GridMessageListener exp) { if (topic instanceof GridTopic) { synchronized (sysLsnrsMux) { return systemListenerChange(topic, exp, null); } } else return lsnrMap.remove(topic, exp); } | /**
* Remove listener if it matches expected value.
*
* @param topic Topic.
* @param exp Listener.
* @return Result.
*/ | Remove listener if it matches expected value | listenerRemove0 | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java",
"license": "apache-2.0",
"size": 104430
} | [
"org.apache.ignite.internal.GridTopic"
] | import org.apache.ignite.internal.GridTopic; | import org.apache.ignite.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,593,188 |
@Generated
@Selector("distribution")
@NInt
public native long distribution(); | @Selector(STR) native long function(); | /**
* The layout of the arrangedSubviews along the axis
*/ | The layout of the arrangedSubviews along the axis | distribution | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UIStackView.java",
"license": "apache-2.0",
"size": 25877
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,052,195 |
@SuppressWarnings("unchecked")
public <T extends Number> Map<String, T> getMapOfNumbers(String attrName,
Class<T> valueType) {
if (valueType == Short.class
|| valueType == Integer.class
|| valueType == Long.class
|| valueType == Float.class
|| valueType ==... | @SuppressWarnings(STR) <T extends Number> Map<String, T> function(String attrName, Class<T> valueType) { if (valueType == Short.class valueType == Integer.class valueType == Long.class valueType == Float.class valueType == Double.class valueType == Number.class valueType == BigDecimal.class valueType == BigInteger.clas... | /**
* Convenient method to return the specified attribute in the current item
* as a (copy of) map of string-to-<code>T</code>'s where T must be a
* subclass of <code>Number</code>; or null if the attribute doesn't
* exist.
*
* @param attrName
* the attribute name
* @... | Convenient method to return the specified attribute in the current item as a (copy of) map of string-to-<code>T</code>'s where T must be a subclass of <code>Number</code>; or null if the attribute doesn't exist | getMapOfNumbers | {
"repo_name": "mahaliachante/aws-sdk-java",
"path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java",
"license": "apache-2.0",
"size": 52160
} | [
"java.math.BigDecimal",
"java.math.BigInteger",
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.math.BigDecimal; import java.math.BigInteger; import java.util.LinkedHashMap; import java.util.Map; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 169,833 |
private Room readRoom(XMLStreamReader reader)
throws XMLStreamException {
ArrayList<Rate> rates = new ArrayList<Rate>();
Room room = new Room(rates, "");
room.setRoomName(reader.getAttributeValue(null, NAME));
while (reader.hasNext()) {
int eventType = reader.next();
switch (eventType) {
ca... | Room function(XMLStreamReader reader) throws XMLStreamException { ArrayList<Rate> rates = new ArrayList<Rate>(); Room room = new Room(rates, STRPremature end of file"); } | /**
*
* <br />
* The method sets the name (attribute of the room element)
* of the room, checks for rate element and if this exists
* sets it as rate for the room
*
* @param reader stream used for reading the XML file
* @return a room object
*/ | The method sets the name (attribute of the room element) of the room, checks for rate element and if this exists sets it as rate for the room | readRoom | {
"repo_name": "ada89/StAXParserDemo",
"path": "StAXParserDemo/src/main/java/org/parser/controller/StAXParser.java",
"license": "epl-1.0",
"size": 10047
} | [
"java.util.ArrayList",
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamReader",
"org.parser.models.Rate",
"org.parser.models.Room"
] | import java.util.ArrayList; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.parser.models.Rate; import org.parser.models.Room; | import java.util.*; import javax.xml.stream.*; import org.parser.models.*; | [
"java.util",
"javax.xml",
"org.parser.models"
] | java.util; javax.xml; org.parser.models; | 573,796 |
public void setForeground(Color fg)
{
if (fg == getForeground())
return;
super.setForeground(fg);
repaint();
} | void function(Color fg) { if (fg == getForeground()) return; super.setForeground(fg); repaint(); } | /**
* Set the value of the <code>foreground</code> property.
*
* @param fg The new value of the property
*/ | Set the value of the <code>foreground</code> property | setForeground | {
"repo_name": "rhuitl/uClinux",
"path": "lib/classpath/javax/swing/JComponent.java",
"license": "gpl-2.0",
"size": 117352
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,705,186 |
@JsonProperty( "scan_count" )
public void setScanCount( int scanCount ) {
this.scanCount = scanCount;
} | @JsonProperty( STR ) void function( int scanCount ) { this.scanCount = scanCount; } | /**
* Sets scan count.
*
* @param scanCount the scan count
*/ | Sets scan count | setScanCount | {
"repo_name": "tenable/Tenable.io-SDK-for-Java",
"path": "src/main/java/com/tenable/io/api/scannerGroups/models/ScannerGroup.java",
"license": "mit",
"size": 7548
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,957,887 |
public void saveCity(City city) {
if (city != null) {
ContentValues values = new ContentValues();
values.put("city_name", city.getCityName());
values.put("city_code", city.getCityCode());
values.put("province_id", city.getProvinceId());
db.insert("... | void function(City city) { if (city != null) { ContentValues values = new ContentValues(); values.put(STR, city.getCityName()); values.put(STR, city.getCityCode()); values.put(STR, city.getProvinceId()); db.insert("City", null, values); } } | /**
* save City to database
*/ | save City to database | saveCity | {
"repo_name": "ScottWang96/coolweather",
"path": "app/src/main/java/com/coolweather/app/db/CoolWeatherDB.java",
"license": "apache-2.0",
"size": 4990
} | [
"android.content.ContentValues",
"com.coolweather.app.model.City"
] | import android.content.ContentValues; import com.coolweather.app.model.City; | import android.content.*; import com.coolweather.app.model.*; | [
"android.content",
"com.coolweather.app"
] | android.content; com.coolweather.app; | 618,118 |
private StringBuilder appendQuotedString(String pattern, ParsePosition pos, StringBuilder appendTo,
boolean escapingOn)
{
int start = pos.getIndex();
char[] c = pattern.toCharArray();
if (escapingOn && c[start] == QUOTE)
{
next(pos);
return ap... | StringBuilder function(String pattern, ParsePosition pos, StringBuilder appendTo, boolean escapingOn) { int start = pos.getIndex(); char[] c = pattern.toCharArray(); if (escapingOn && c[start] == QUOTE) { next(pos); return appendTo == null ? null : appendTo.append(QUOTE); } int lastHold = start; for (int i = pos.getInd... | /**
* Consume a quoted string, adding it to <code>appendTo</code> if specified.
*
* @param pattern
* pattern to parse
* @param pos
* current parse position
* @param appendTo
* optional StringBuffer to append
* @param escapingOn
* ... | Consume a quoted string, adding it to <code>appendTo</code> if specified | appendQuotedString | {
"repo_name": "mfornos/humanize",
"path": "humanize-slim/src/main/java/humanize/text/ExtendedMessageFormat.java",
"license": "apache-2.0",
"size": 19301
} | [
"java.text.ParsePosition"
] | import java.text.ParsePosition; | import java.text.*; | [
"java.text"
] | java.text; | 1,495,909 |
EAttribute getConstants_FLAT_RATE_CIS_DAILY();
| EAttribute getConstants_FLAT_RATE_CIS_DAILY(); | /**
* Returns the meta object for the attribute '{@link TaxationWithRoot.Constants#getFLAT_RATE_CIS_DAILY <em>FLAT RATE CIS DAILY</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>FLAT RATE CIS DAILY</em>'.
* @see TaxationWithRoot.Constants#getFLAT... | Returns the meta object for the attribute '<code>TaxationWithRoot.Constants#getFLAT_RATE_CIS_DAILY FLAT RATE CIS DAILY</code>'. | getConstants_FLAT_RATE_CIS_DAILY | {
"repo_name": "viatra/VIATRA-Generator",
"path": "Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/TaxationPackage.java",
"license": "epl-1.0",
"size": 295635
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,233,006 |
@Override
public int tickRate(World par1World) {
return this.blockMaterial == Material.water ? 5 : (this.blockMaterial == Material.lava ? (par1World.provider.hasNoSky ? 10 : 30) : 0);
} | int function(World par1World) { return this.blockMaterial == Material.water ? 5 : (this.blockMaterial == Material.lava ? (par1World.provider.hasNoSky ? 10 : 30) : 0); } | /**
* How many world ticks before ticking
*/ | How many world ticks before ticking | tickRate | {
"repo_name": "DirectCodeGraveyard/Minetweak",
"path": "src/main/java/net/minecraft/block/BlockFluid.java",
"license": "lgpl-3.0",
"size": 10807
} | [
"net.minecraft.material.Material",
"net.minecraft.world.World"
] | import net.minecraft.material.Material; import net.minecraft.world.World; | import net.minecraft.material.*; import net.minecraft.world.*; | [
"net.minecraft.material",
"net.minecraft.world"
] | net.minecraft.material; net.minecraft.world; | 578,609 |
default AdvancedBoxEndpointBuilder httpParams(
Map<String, Object> httpParams) {
doSetProperty("httpParams", httpParams);
return this;
} | default AdvancedBoxEndpointBuilder httpParams( Map<String, Object> httpParams) { doSetProperty(STR, httpParams); return this; } | /**
* Custom HTTP params for settings like proxy host.
*
* The option is a: <code>java.util.Map<java.lang.String,
* java.lang.Object></code> type.
*
* Group: advanced
*/ | Custom HTTP params for settings like proxy host. The option is a: <code>java.util.Map<java.lang.String, java.lang.Object></code> type. Group: advanced | httpParams | {
"repo_name": "CodeSmell/camel",
"path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/BoxEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 61191
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 862,349 |
public User createUser(User createUser) {
return connector.createUser(createUser, sessionData.getAccessToken());
}
/**
* Updates a user based on the given {@link UpdateUser}.
*
* @param id
* the user ID
* @param updateUser
* the {@link UpdateUser} | User function(User createUser) { return connector.createUser(createUser, sessionData.getAccessToken()); } /** * Updates a user based on the given {@link UpdateUser}. * * @param id * the user ID * @param updateUser * the {@link UpdateUser} | /**
* Create the given.
*
* @param createUser
* the user
*
* @return User the created user
*/ | Create the given | createUser | {
"repo_name": "tkrille/osiam-addon-administration",
"path": "src/main/java/org/osiam/addons/administration/service/UserService.java",
"license": "mit",
"size": 6383
} | [
"org.osiam.resources.scim.UpdateUser",
"org.osiam.resources.scim.User"
] | import org.osiam.resources.scim.UpdateUser; import org.osiam.resources.scim.User; | import org.osiam.resources.scim.*; | [
"org.osiam.resources"
] | org.osiam.resources; | 547,959 |
public Iterable<Block> getBlocksFromGenus(String genusName) {
//TODO: performance issue, must iterate through all blocks
ArrayList<Block> blocks = new ArrayList<Block>();
for (RenderableBlock renderable : blockCanvas.getBlocks()) {
Block block = getEnv().getBlock(renderable.g... | Iterable<Block> function(String genusName) { ArrayList<Block> blocks = new ArrayList<Block>(); for (RenderableBlock renderable : blockCanvas.getBlocks()) { Block block = getEnv().getBlock(renderable.getBlockID()); if (block.getGenusName().equals(genusName)) { blocks.add(block); } } return blocks; } | /**
* Returns all the Blocks of the specified genus.
* Include all live blocks on all pages. Does NOT include:
* (1) all blocks of a different genus
* (2) Factory blocks,
* (3) dead blocks,
* (4) or subset blocks.
* If no blocks are found, it returns an empty set.
... | Returns all the Blocks of the specified genus. Include all live blocks on all pages. Does NOT include: (1) all blocks of a different genus (2) Factory blocks, (3) dead blocks, (4) or subset blocks. If no blocks are found, it returns an empty set | getBlocksFromGenus | {
"repo_name": "laurentschall/openblocks",
"path": "src/main/java/edu/mit/blocks/workspace/Workspace.java",
"license": "lgpl-3.0",
"size": 36613
} | [
"edu.mit.blocks.codeblocks.Block",
"edu.mit.blocks.renderable.RenderableBlock",
"java.util.ArrayList"
] | import edu.mit.blocks.codeblocks.Block; import edu.mit.blocks.renderable.RenderableBlock; import java.util.ArrayList; | import edu.mit.blocks.codeblocks.*; import edu.mit.blocks.renderable.*; import java.util.*; | [
"edu.mit.blocks",
"java.util"
] | edu.mit.blocks; java.util; | 903,225 |
public Observable<ServiceResponse<Page<USqlDatabase>>> listDatabasesNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<USqlDatabase>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Retrieves the list of databases from the Data Lake Analytics catalog.
*
ServiceResponse<PageImpl<USqlDatabase>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @return the PagedList<USqlDatabase> object wrapped in {@link ServiceResponse} if succes... | Retrieves the list of databases from the Data Lake Analytics catalog | listDatabasesNextSinglePageAsync | {
"repo_name": "anudeepsharma/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java",
"license": "mit",
"size": 474209
} | [
"com.microsoft.azure.Page",
"com.microsoft.azure.management.datalake.analytics.models.USqlDatabase",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.azure.management.datalake.analytics.models.USqlDatabase; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,914,598 |
PolicyTestBackEndServiceResponse invoke(ServiceRequest request, byte[] requestBody); | PolicyTestBackEndServiceResponse invoke(ServiceRequest request, byte[] requestBody); | /**
* Called to invoke the back end service. Includes full request details
* as well as the request body.
* @param request the service request
* @param requestBody the request body or null if the body is empty
* @return a back end response
*/ | Called to invoke the back end service. Includes full request details as well as the request body | invoke | {
"repo_name": "KevinHorvatin/apiman",
"path": "test/policies/src/main/java/io/apiman/test/policies/IPolicyTestBackEndService.java",
"license": "apache-2.0",
"size": 1413
} | [
"io.apiman.gateway.engine.beans.ServiceRequest"
] | import io.apiman.gateway.engine.beans.ServiceRequest; | import io.apiman.gateway.engine.beans.*; | [
"io.apiman.gateway"
] | io.apiman.gateway; | 1,517,823 |
public void setUsers(final List<User> users) {
this.users = new ArrayList<>(users);
} | void function(final List<User> users) { this.users = new ArrayList<>(users); } | /**
* Set this application's users.
*
* @param users A new list of users.
*/ | Set this application's users | setUsers | {
"repo_name": "kangaroo-server/kangaroo",
"path": "kangaroo-server-authz/src/main/java/net/krotscheck/kangaroo/authz/common/database/entity/Application.java",
"license": "apache-2.0",
"size": 9184
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 990,246 |
ByteBuffer encrypt(ByteBuffer data); | ByteBuffer encrypt(ByteBuffer data); | /**
* Encrypts the contents of the input ByteBuffer into a new ByteBuffer instance. The returned instance will
* be at position 0 and ready to read.
*/ | Encrypts the contents of the input ByteBuffer into a new ByteBuffer instance. The returned instance will be at position 0 and ready to read | encrypt | {
"repo_name": "nezihyigitbasi/presto",
"path": "presto-main/src/main/java/com/facebook/presto/spiller/SpillCipher.java",
"license": "apache-2.0",
"size": 1604
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,963,536 |
public static PlanetTypes getRandomStartPlanetType(final SpaceRace race) {
ArrayList<PlanetTypes> list = new ArrayList<>();
int highestValue = 0;
for (WorldType worldType : WorldType.values()) {
if (worldType != WorldType.ARTIFICALWORLD
&& race.getWorldTypeBaseValue(worldType) > highestVal... | static PlanetTypes function(final SpaceRace race) { ArrayList<PlanetTypes> list = new ArrayList<>(); int highestValue = 0; for (WorldType worldType : WorldType.values()) { if (worldType != WorldType.ARTIFICALWORLD && race.getWorldTypeBaseValue(worldType) > highestValue) { highestValue = race.getWorldTypeBaseValue(world... | /**
* Get Highest random start planet type.
* @param race Space race for best starting planet
* @return Planet type
*/ | Get Highest random start planet type | getRandomStartPlanetType | {
"repo_name": "tuomount/Open-Realms-of-Stars",
"path": "src/main/java/org/openRealmOfStars/starMap/planet/PlanetTypes.java",
"license": "gpl-2.0",
"size": 16521
} | [
"java.awt.image.BufferedImage",
"java.util.ArrayList"
] | import java.awt.image.BufferedImage; import java.util.ArrayList; | import java.awt.image.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,306,056 |
private JEditTextArea getUploadSchemaTextPane() {
if (this.uploadSchemaTextPane == null) {
this.uploadSchemaTextPane = new JEditTextArea(GMETextAreaDefaults.createDefaults());
this.uploadSchemaTextPane.setTokenMarker(new XMLTokenMarker());
}
return this.uploadSch... | JEditTextArea function() { if (this.uploadSchemaTextPane == null) { this.uploadSchemaTextPane = new JEditTextArea(GMETextAreaDefaults.createDefaults()); this.uploadSchemaTextPane.setTokenMarker(new XMLTokenMarker()); } return this.uploadSchemaTextPane; } | /**
* This method initializes uploadSchemaTextPane
*
* @return javax.swing.JTextArea
*/ | This method initializes uploadSchemaTextPane | getUploadSchemaTextPane | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/globalModelExchange-ui/src/java/org/cagrid/gme/discoverytools/GMEViewer.java",
"license": "bsd-3-clause",
"size": 20365
} | [
"gov.nih.nci.cagrid.introduce.portal.common.jedit.JEditTextArea",
"gov.nih.nci.cagrid.introduce.portal.common.jedit.XMLTokenMarker"
] | import gov.nih.nci.cagrid.introduce.portal.common.jedit.JEditTextArea; import gov.nih.nci.cagrid.introduce.portal.common.jedit.XMLTokenMarker; | import gov.nih.nci.cagrid.introduce.portal.common.jedit.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 888,934 |
@Activate
public void activate() {
idGenerator = coreService.getIdGenerator(VirtualNetworkService.VIRTUAL_NETWORK_TOPIC);
tenantIdSet = storageService.<TenantId>setBuilder()
.withSerializer(SERIALIZER)
.withName("onos-tenantId")
.withRelaxedReadCo... | void function() { idGenerator = coreService.getIdGenerator(VirtualNetworkService.VIRTUAL_NETWORK_TOPIC); tenantIdSet = storageService.<TenantId>setBuilder() .withSerializer(SERIALIZER) .withName(STR) .withRelaxedReadConsistency() .build() .asDistributedSet(); tenantIdSet.addListener(setListener); networkIdVirtualNetwor... | /**
* Distributed network store service activate method.
*/ | Distributed network store service activate method | activate | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/DistributedVirtualNetworkStore.java",
"license": "apache-2.0",
"size": 39354
} | [
"java.util.Set",
"org.onosproject.incubator.net.tunnel.TunnelId",
"org.onosproject.incubator.net.virtual.NetworkId",
"org.onosproject.incubator.net.virtual.TenantId",
"org.onosproject.incubator.net.virtual.VirtualDevice",
"org.onosproject.incubator.net.virtual.VirtualHost",
"org.onosproject.incubator.ne... | import java.util.Set; import org.onosproject.incubator.net.tunnel.TunnelId; import org.onosproject.incubator.net.virtual.NetworkId; import org.onosproject.incubator.net.virtual.TenantId; import org.onosproject.incubator.net.virtual.VirtualDevice; import org.onosproject.incubator.net.virtual.VirtualHost; import org.onos... | import java.util.*; import org.onosproject.incubator.net.tunnel.*; import org.onosproject.incubator.net.virtual.*; import org.onosproject.net.*; import org.onosproject.net.intent.*; | [
"java.util",
"org.onosproject.incubator",
"org.onosproject.net"
] | java.util; org.onosproject.incubator; org.onosproject.net; | 46,823 |
public List<SourceDestValidation> getAdditionalSourceDestValidations() {
if ((source.getRuntimeMappings() == null || source.getRuntimeMappings().isEmpty()) == false) {
SourceDestValidation validation = new SourceDestValidator.RemoteClusterMinimumVersionValidation(
FIELD_CAPS_RUNT... | List<SourceDestValidation> function() { if ((source.getRuntimeMappings() == null source.getRuntimeMappings().isEmpty()) == false) { SourceDestValidation validation = new SourceDestValidator.RemoteClusterMinimumVersionValidation( FIELD_CAPS_RUNTIME_MAPPINGS_INTRODUCED_VERSION, STR ); return Collections.singletonList(val... | /**
* Determines the minimum version of a cluster in multi-cluster setup that is needed to successfully run this transform config.
*
* @return version
*/ | Determines the minimum version of a cluster in multi-cluster setup that is needed to successfully run this transform config | getAdditionalSourceDestValidations | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/TransformConfig.java",
"license": "apache-2.0",
"size": 33945
} | [
"java.util.Collections",
"java.util.List",
"org.elasticsearch.xpack.core.common.validation.SourceDestValidator"
] | import java.util.Collections; import java.util.List; import org.elasticsearch.xpack.core.common.validation.SourceDestValidator; | import java.util.*; import org.elasticsearch.xpack.core.common.validation.*; | [
"java.util",
"org.elasticsearch.xpack"
] | java.util; org.elasticsearch.xpack; | 2,111,981 |
public void masquerade(Channel channel)
{
// If the channel doesn't have a caller id
// preserve the existing one (as given this is a clone they should be
// identical).
// Asterisk doesn't always pass the caller ID on the channel hence this
// protects us from Aste... | void function(Channel channel) { if (channel.hasCallerID()) { this._callerID = channel.getCallerID(); } else if (this._callerID != null && ((ChannelImpl) channel)._callerID != null) { PBX pbx = PBXFactory.getActivePBX(); if (this._callerID != null) { ((ChannelImpl) channel)._callerID = pbx.buildCallerID(this._callerID.... | /**
* designed for use by the ChannelProxy when a channel is being cloned as a
* result of Asterisk undertaking an Masquerade. This is not intended to be
* a complete clone just the key elements that we generally track on our
* side rather than getting directly from asterisk.
*/ | designed for use by the ChannelProxy when a channel is being cloned as a result of Asterisk undertaking an Masquerade. This is not intended to be a complete clone just the key elements that we generally track on our side rather than getting directly from asterisk | masquerade | {
"repo_name": "scgm11/asterisk-java",
"path": "src/main/java/org/asteriskjava/pbx/internal/core/ChannelImpl.java",
"license": "apache-2.0",
"size": 27889
} | [
"org.asteriskjava.pbx.Channel",
"org.asteriskjava.pbx.PBXFactory"
] | import org.asteriskjava.pbx.Channel; import org.asteriskjava.pbx.PBXFactory; | import org.asteriskjava.pbx.*; | [
"org.asteriskjava.pbx"
] | org.asteriskjava.pbx; | 2,762,959 |
private void triggerEndOfLoopOnParentControllers(Sampler sam, JMeterContext threadContext) {
TransactionSampler transactionSampler = null;
if(sam instanceof TransactionSampler) {
transactionSampler = (TransactionSampler) sam;
}
Sampler realSampler = findRealSampler... | void function(Sampler sam, JMeterContext threadContext) { TransactionSampler transactionSampler = null; if(sam instanceof TransactionSampler) { transactionSampler = (TransactionSampler) sam; } Sampler realSampler = findRealSampler(sam); if(realSampler == null) { throw new IllegalStateException(STR+sam.getName()+STR+sam... | /**
* Trigger end of loop on parent controllers up to Thread Group
* @param sam Sampler Base sampler
* @param threadContext
*/ | Trigger end of loop on parent controllers up to Thread Group | triggerEndOfLoopOnParentControllers | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-jmeter-3.0/src/core/org/apache/jmeter/threads/JMeterThread.java",
"license": "apache-2.0",
"size": 37321
} | [
"java.util.List",
"org.apache.jmeter.control.Controller",
"org.apache.jmeter.control.TransactionSampler",
"org.apache.jmeter.samplers.Sampler"
] | import java.util.List; import org.apache.jmeter.control.Controller; import org.apache.jmeter.control.TransactionSampler; import org.apache.jmeter.samplers.Sampler; | import java.util.*; import org.apache.jmeter.control.*; import org.apache.jmeter.samplers.*; | [
"java.util",
"org.apache.jmeter"
] | java.util; org.apache.jmeter; | 685,609 |
void reattachCollection(PersistentCollection collection, CollectionSnapshot snapshot)
throws HibernateException {
if ( collection.wasInitialized() ) {
addInitializedDetachedCollection(collection, snapshot);
}
else {
if ( !isCollectionSnapshotValid(snapshot) ) {
throw new HibernateException("could no... | void reattachCollection(PersistentCollection collection, CollectionSnapshot snapshot) throws HibernateException { if ( collection.wasInitialized() ) { addInitializedDetachedCollection(collection, snapshot); } else { if ( !isCollectionSnapshotValid(snapshot) ) { throw new HibernateException(STR); } addUninitializedDetac... | /**
* Reattach a detached (disassociated) initialized or uninitialized
* collection wrapper
*/ | Reattach a detached (disassociated) initialized or uninitialized collection wrapper | reattachCollection | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/hibernate218/src/net/sf/hibernate/impl/SessionImpl.java",
"license": "lgpl-3.0",
"size": 136343
} | [
"net.sf.hibernate.HibernateException",
"net.sf.hibernate.collection.PersistentCollection",
"net.sf.hibernate.engine.CollectionSnapshot"
] | import net.sf.hibernate.HibernateException; import net.sf.hibernate.collection.PersistentCollection; import net.sf.hibernate.engine.CollectionSnapshot; | import net.sf.hibernate.*; import net.sf.hibernate.collection.*; import net.sf.hibernate.engine.*; | [
"net.sf.hibernate"
] | net.sf.hibernate; | 2,749,096 |
public static AbstractGeneReader createGeneReader(ExecutorService executorService, FileManager fileManager,
GeneFile geneFile) {
if (getOrigin(geneFile) == Gene.Origin.GTF) {
return new GtfReader(executorService, fileManager, geneFile);
... | static AbstractGeneReader function(ExecutorService executorService, FileManager fileManager, GeneFile geneFile) { if (getOrigin(geneFile) == Gene.Origin.GTF) { return new GtfReader(executorService, fileManager, geneFile); } else { return new GffReader(executorService, fileManager, geneFile); } } | /**
* Creates a proper implementation of AbstractGeneReader for a specified GeneFile
*
* @param executorService an ExecutorService is required for multithreading reading
* @param fileManager a FileManager is required for file access
* @param geneFile a GeneFile object, from which to ... | Creates a proper implementation of AbstractGeneReader for a specified GeneFile | createGeneReader | {
"repo_name": "epam/NGB",
"path": "server/catgenome/src/main/java/com/epam/catgenome/manager/gene/reader/AbstractGeneReader.java",
"license": "mit",
"size": 34262
} | [
"com.epam.catgenome.entity.gene.Gene",
"com.epam.catgenome.entity.gene.GeneFile",
"com.epam.catgenome.manager.FileManager",
"java.util.concurrent.ExecutorService"
] | import com.epam.catgenome.entity.gene.Gene; import com.epam.catgenome.entity.gene.GeneFile; import com.epam.catgenome.manager.FileManager; import java.util.concurrent.ExecutorService; | import com.epam.catgenome.entity.gene.*; import com.epam.catgenome.manager.*; import java.util.concurrent.*; | [
"com.epam.catgenome",
"java.util"
] | com.epam.catgenome; java.util; | 1,119,059 |
@Test
public void testQuestion1ToQuestion1NotInList() {
final Player player = PlayerTestHelper.createPlayer("bob");
npcEngine.setCurrentState(QUESTION_1);
npcEngine.step(player, "NotanItem");
assertThat(npcEngine.getCurrentState(), is(QUESTION_1));
assertThat(getReply(npc), is("I don't think that's a pie... | void function() { final Player player = PlayerTestHelper.createPlayer("bob"); npcEngine.setCurrentState(QUESTION_1); npcEngine.step(player, STR); assertThat(npcEngine.getCurrentState(), is(QUESTION_1)); assertThat(getReply(npc), is(STR)); } | /**
* Player brings an item not in list.
*/ | Player brings an item not in list | testQuestion1ToQuestion1NotInList | {
"repo_name": "markuskeunecke/stendhal",
"path": "tests/games/stendhal/server/maps/quests/ElvishArmorTest.java",
"license": "gpl-2.0",
"size": 13549
} | [
"games.stendhal.server.entity.player.Player",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import games.stendhal.server.entity.player.Player; import org.hamcrest.Matchers; import org.junit.Assert; | import games.stendhal.server.entity.player.*; import org.hamcrest.*; import org.junit.*; | [
"games.stendhal.server",
"org.hamcrest",
"org.junit"
] | games.stendhal.server; org.hamcrest; org.junit; | 352,056 |
public void renderBrokenItemStack(ItemStack p_70669_1_)
{
this.playSound("random.break", 0.8F, 0.8F + this.worldObj.rand.nextFloat() * 0.4F);
for (int var2 = 0; var2 < 5; ++var2)
{
Vec3 var3 = new Vec3(((double)this.rand.nextFloat() - 0.5D) * 0.1D, Math.random() * 0.1D + 0.1... | void function(ItemStack p_70669_1_) { this.playSound(STR, 0.8F, 0.8F + this.worldObj.rand.nextFloat() * 0.4F); for (int var2 = 0; var2 < 5; ++var2) { Vec3 var3 = new Vec3(((double)this.rand.nextFloat() - 0.5D) * 0.1D, Math.random() * 0.1D + 0.1D, 0.0D); var3 = var3.rotatePitch(-this.rotationPitch * (float)Math.PI / 180... | /**
* Renders broken item particles using the given ItemStack
*/ | Renders broken item particles using the given ItemStack | renderBrokenItemStack | {
"repo_name": "Hexeption/Youtube-Hacked-Client-1.8",
"path": "minecraft/net/minecraft/entity/EntityLivingBase.java",
"license": "mit",
"size": 71852
} | [
"net.minecraft.item.Item",
"net.minecraft.item.ItemStack",
"net.minecraft.util.EnumParticleTypes",
"net.minecraft.util.Vec3"
] | import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.Vec3; | import net.minecraft.item.*; import net.minecraft.util.*; | [
"net.minecraft.item",
"net.minecraft.util"
] | net.minecraft.item; net.minecraft.util; | 1,989,488 |
public void setHighlighters(Highlighter... highlighters) {
Highlighter[] old = getHighlighters();
getCompoundHighlighter().setHighlighters(highlighters);
firePropertyChange("highlighters", old, getHighlighters());
} | void function(Highlighter... highlighters) { Highlighter[] old = getHighlighters(); getCompoundHighlighter().setHighlighters(highlighters); firePropertyChange(STR, old, getHighlighters()); } | /**
* Sets the <code>Highlighter</code>s to the table, replacing any old settings.
* None of the given Highlighters must be null.<p>
*
* This is a bound property. <p>
*
* Note: as of version #1.257 the null constraint is enforced strictly. To remove
* all highlighters use this meth... | Sets the <code>Highlighter</code>s to the table, replacing any old settings. None of the given Highlighters must be null. This is a bound property. Note: as of version #1.257 the null constraint is enforced strictly. To remove all highlighters use this method without param | setHighlighters | {
"repo_name": "syncer/swingx",
"path": "swingx-core/src/main/java/org/jdesktop/swingx/JXList.java",
"license": "lgpl-2.1",
"size": 57097
} | [
"org.jdesktop.swingx.decorator.Highlighter"
] | import org.jdesktop.swingx.decorator.Highlighter; | import org.jdesktop.swingx.decorator.*; | [
"org.jdesktop.swingx"
] | org.jdesktop.swingx; | 1,696,344 |
protected void parseFontFaceRule() {
try {
documentHandler.startFontFace();
if (current != LexicalUnits.LEFT_CURLY_BRACE) {
reportError("left.curly.brace");
} else {
nextIgnoreSpaces();
try {
parseStyle... | void function() { try { documentHandler.startFontFace(); if (current != LexicalUnits.LEFT_CURLY_BRACE) { reportError(STR); } else { nextIgnoreSpaces(); try { parseStyleDeclaration(true); } catch (CSSParseException e) { reportError(e); } } } finally { documentHandler.endFontFace(); } } | /**
* Parses a font-face rule.
*/ | Parses a font-face rule | parseFontFaceRule | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/css/parser/Parser.java",
"license": "apache-2.0",
"size": 57701
} | [
"org.w3c.css.sac.CSSParseException"
] | import org.w3c.css.sac.CSSParseException; | import org.w3c.css.sac.*; | [
"org.w3c.css"
] | org.w3c.css; | 2,785,861 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.