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 void testManyBytes() throws SQLException { byte[] data = "aaaaaaaaaa".getBytes(); readWrite(data); }
void function() throws SQLException { byte[] data = STR.getBytes(); readWrite(data); }
/** * Test the writing and reading of a few bytes. * @throws SQLException */
Test the writing and reading of a few bytes
testManyBytes
{ "repo_name": "tivv/davepgjdbc", "path": "org/postgresql/test/jdbc3/Jdbc3BlobTest.java", "license": "bsd-3-clause", "size": 8519 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,654,348
private Node eliminateCallParamAt( SimpleDefinitionFinder defFinder, Parameter p, Node call, int argIndex) { Preconditions.checkArgument( NodeUtil.isCallOrNew(call), "Node must be a call or new."); Node formalArgPtr = NodeUtil.getArgumentForCallOrNew( call, argIndex); if (formalArg...
Node function( SimpleDefinitionFinder defFinder, Parameter p, Node call, int argIndex) { Preconditions.checkArgument( NodeUtil.isCallOrNew(call), STR); Node formalArgPtr = NodeUtil.getArgumentForCallOrNew( call, argIndex); if (formalArgPtr != null) { call.removeChild(formalArgPtr); if (p.getArg() != formalArgPtr) { rem...
/** * Eliminates the parameter from a function call. * @param defFinder * @param p * @param call The function call node * @param argIndex The index of the the argument to remove. * @return The Node of the argument removed. */
Eliminates the parameter from a function call
eliminateCallParamAt
{ "repo_name": "visokio/closure-compiler", "path": "src/com/google/javascript/jscomp/OptimizeParameters.java", "license": "apache-2.0", "size": 17698 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
1,355,046
@Test public void listEditorialTest() throws IOException { Cookie cookieSessionId = login(username, password); Response response = target .request().cookie(cookieSessionId).get(); String listEditorial = response.readEntity(String.class); List<EditorialDetailDTO> lis...
void function() throws IOException { Cookie cookieSessionId = login(username, password); Response response = target .request().cookie(cookieSessionId).get(); String listEditorial = response.readEntity(String.class); List<EditorialDetailDTO> listEditorialTest = new ObjectMapper().readValue(listEditorial, List.class); As...
/** * Prueba para consultar la lista de Editorials * * @generated */
Prueba para consultar la lista de Editorials
listEditorialTest
{ "repo_name": "diegofruizs/book", "path": "book-api/src/test/java/co/edu/uniandes/csw/book/tests/rest/EditorialTest.java", "license": "mit", "size": 9997 }
[ "co.edu.uniandes.csw.book.dtos.detail.EditorialDetailDTO", "java.io.IOException", "java.util.List", "javax.ws.rs.core.Cookie", "javax.ws.rs.core.Response", "org.codehaus.jackson.map.ObjectMapper", "org.junit.Assert" ]
import co.edu.uniandes.csw.book.dtos.detail.EditorialDetailDTO; import java.io.IOException; import java.util.List; import javax.ws.rs.core.Cookie; import javax.ws.rs.core.Response; import org.codehaus.jackson.map.ObjectMapper; import org.junit.Assert;
import co.edu.uniandes.csw.book.dtos.detail.*; import java.io.*; import java.util.*; import javax.ws.rs.core.*; import org.codehaus.jackson.map.*; import org.junit.*;
[ "co.edu.uniandes", "java.io", "java.util", "javax.ws", "org.codehaus.jackson", "org.junit" ]
co.edu.uniandes; java.io; java.util; javax.ws; org.codehaus.jackson; org.junit;
819,333
@Symmetric @PositiveDefinite public double[][] rndSymmetricPositiveDefiniteMatrix(final int n) { final double emin = Randomizer.rndBox(getPositiveEvMin(), 2 * getPositiveEvMin()); final double emax = Randomizer.rndBox(2 * getPositiveEvMin(), getPositiveEvMax()); return rndMatrix(n, emin, emax, true); ...
double[][] function(final int n) { final double emin = Randomizer.rndBox(getPositiveEvMin(), 2 * getPositiveEvMin()); final double emax = Randomizer.rndBox(2 * getPositiveEvMin(), getPositiveEvMax()); return rndMatrix(n, emin, emax, true); }
/** * Create a n times n symmetric random positive definite matrix with positive random eigenvalues * between default 0.25 and 10 (or the setter values). * * @param n the dimension of the matrix * @return matrix with positive random eigenvalues */
Create a n times n symmetric random positive definite matrix with positive random eigenvalues between default 0.25 and 10 (or the setter values)
rndSymmetricPositiveDefiniteMatrix
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/lapack/Matrices.java", "license": "gpl-3.0", "size": 12560 }
[ "de.lab4inf.math.util.Randomizer" ]
import de.lab4inf.math.util.Randomizer;
import de.lab4inf.math.util.*;
[ "de.lab4inf.math" ]
de.lab4inf.math;
1,282,514
void newInstantiator(Instantiator instantiator);
void newInstantiator(Instantiator instantiator);
/** * Invoked when a new {@code Instantiator} is {@linkplain Instantiator#register(Instantiator) * registered}. */
Invoked when a new Instantiator is Instantiator#register(Instantiator) registered
newInstantiator
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java", "license": "apache-2.0", "size": 136336 }
[ "org.apache.geode.Instantiator" ]
import org.apache.geode.Instantiator;
import org.apache.geode.*;
[ "org.apache.geode" ]
org.apache.geode;
1,657,054
@Override public void putAll(Map<? extends Integer, ? extends Integer> map) { Iterator<? extends Entry<? extends Integer,? extends Integer>> it = map.entrySet().iterator(); for (int i = map.size(); i-- > 0;) { Entry<? extends Integer,? extends Integer> e = it.next(); this...
void function(Map<? extends Integer, ? extends Integer> map) { Iterator<? extends Entry<? extends Integer,? extends Integer>> it = map.entrySet().iterator(); for (int i = map.size(); i-- > 0;) { Entry<? extends Integer,? extends Integer> e = it.next(); this.put(e.getKey(), e.getValue()); } }
/** * Copies the key/value mappings in <tt>map</tt> into this map. * Note that this will be a <b>deep</b> copy, as storage is by * primitive value. * * @param map a <code>Map</code> value */
Copies the key/value mappings in map into this map. Note that this will be a deep copy, as storage is by primitive value
putAll
{ "repo_name": "amikey/haha", "path": "trove/trove4j-1.1-sources.jar-unzipped_flattened/decorator/TIntIntHashMapDecorator.java", "license": "apache-2.0", "size": 11865 }
[ "java.util.Iterator", "java.util.Map" ]
import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,763,701
@Test(expected = Exception.class) public void testInsertBatchRandomValuesDoNoWorkInBinaryDoubleColumn() throws Exception { testInsertSpecialValuesByBatch("randomString"); }
@Test(expected = Exception.class) void function() throws Exception { testInsertSpecialValuesByBatch(STR); }
/** * The 'randomString' is not a special value for the BINARY_DOUBLE type so it should throw an error. */
The 'randomString' is not a special value for the BINARY_DOUBLE type so it should throw an error
testInsertBatchRandomValuesDoNoWorkInBinaryDoubleColumn
{ "repo_name": "feedzai/pdb", "path": "src/test/java/com/feedzai/commons/sql/abstraction/engine/impl/abs/AbstractEngineSchemaTest.java", "license": "apache-2.0", "size": 40851 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,896,139
@javax.annotation.Nullable @ApiModelProperty(value = "") public V1ObjectMeta getMetadata() { return metadata; }
@javax.annotation.Nullable @ApiModelProperty(value = "") V1ObjectMeta function() { return metadata; }
/** * Get metadata * * @return metadata */
Get metadata
getMetadata
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1Lease.java", "license": "apache-2.0", "size": 5529 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,376,537
boolean shouldCompareByEquals(DfaValue dfaLeft, DfaValue dfaRight);
boolean shouldCompareByEquals(DfaValue dfaLeft, DfaValue dfaRight);
/** * Returns true if two given values should be compared by content, rather than by reference. * * @param dfaLeft left value * @param dfaRight right value * @return true if two given values should be compared by content, rather than by reference. */
Returns true if two given values should be compared by content, rather than by reference
shouldCompareByEquals
{ "repo_name": "consulo/consulo-java", "path": "java-analysis-impl/src/main/java/com/intellij/codeInspection/dataFlow/DfaMemoryState.java", "license": "apache-2.0", "size": 5903 }
[ "com.intellij.codeInspection.dataFlow.value.DfaValue" ]
import com.intellij.codeInspection.dataFlow.value.DfaValue;
import com.intellij.*;
[ "com.intellij" ]
com.intellij;
1,193,884
public ServiceFuture<LinkedServiceInner> deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName, final ServiceCallback<LinkedServiceInner> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName), s...
ServiceFuture<LinkedServiceInner> function(String resourceGroupName, String workspaceName, String linkedServiceName, final ServiceCallback<LinkedServiceInner> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName), serviceCallback); }
/** * Deletes a linked service instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param serviceCallback the async ServiceCallback to...
Deletes a linked service instance
deleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/loganalytics/mgmt-v2020_03_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2020_03_01_preview/implementation/LinkedServicesInner.java", "license": "mit", "size": 38358 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,869,093
boolean checkAndRecordNewServer(final ServerName serverName, final ServerMetrics sl) { ServerName existingServer = null; synchronized (this.onlineServers) { existingServer = findServerWithSameHostnamePortWithLock(serverName); if (existingServer != null && (existingServer.getStartcode() > serverNam...
boolean checkAndRecordNewServer(final ServerName serverName, final ServerMetrics sl) { ServerName existingServer = null; synchronized (this.onlineServers) { existingServer = findServerWithSameHostnamePortWithLock(serverName); if (existingServer != null && (existingServer.getStartcode() > serverName.getStartcode())) { L...
/** * Check is a server of same host and port already exists, * if not, or the existed one got a smaller start code, record it. * * @param serverName the server to check and record * @param sl the server load on the server * @return true if the server is recorded, otherwise, false */
Check is a server of same host and port already exists, if not, or the existed one got a smaller start code, record it
checkAndRecordNewServer
{ "repo_name": "francisliu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java", "license": "apache-2.0", "size": 47198 }
[ "org.apache.hadoop.hbase.ServerMetrics", "org.apache.hadoop.hbase.ServerName" ]
import org.apache.hadoop.hbase.ServerMetrics; import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,763,243
public static <T> ProtocolProxy<T> getProtocolProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, ...
static <T> ProtocolProxy<T> function(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth) throws IOException { if (UserGroupInformation.isSecurityEnabl...
/** * Get a protocol proxy that contains a proxy connection to a remote server * and a set of methods that are supported by the server * * @param protocol protocol * @param clientVersion client's version * @param addr server address * @param ticket security ticket * @param conf configuration ...
Get a protocol proxy that contains a proxy connection to a remote server and a set of methods that are supported by the server
getProtocolProxy
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java", "license": "apache-2.0", "size": 38952 }
[ "java.io.IOException", "java.net.InetSocketAddress", "java.util.concurrent.atomic.AtomicBoolean", "javax.net.SocketFactory", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.io.retry.RetryPolicy", "org.apache.hadoop.security.SaslRpcServer", "org.apache.hadoop.security.UserGroupInformation" ]
import java.io.IOException; import java.net.InetSocketAddress; import java.util.concurrent.atomic.AtomicBoolean; import javax.net.SocketFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.retry.RetryPolicy; import org.apache.hadoop.security.SaslRpcServer; import org.apache.hadoop.security....
import java.io.*; import java.net.*; import java.util.concurrent.atomic.*; import javax.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.retry.*; import org.apache.hadoop.security.*;
[ "java.io", "java.net", "java.util", "javax.net", "org.apache.hadoop" ]
java.io; java.net; java.util; javax.net; org.apache.hadoop;
2,026,685
@Beta public StringBuilder appendTo(StringBuilder builder, Iterator<? extends Entry<?, ?>> entries) { try { appendTo((Appendable) builder, entries); } catch (IOException impossible) { throw new AssertionError(impossible); } return builder; }
StringBuilder function(StringBuilder builder, Iterator<? extends Entry<?, ?>> entries) { try { appendTo((Appendable) builder, entries); } catch (IOException impossible) { throw new AssertionError(impossible); } return builder; }
/** * Appends the string representation of each entry in {@code entries}, using the previously * configured separator and key-value separator, to {@code builder}. Identical to {@link * #appendTo(Appendable, Iterable)}, except that it does not throw {@link IOException}. * * @since 11.0 */
Appends the string representation of each entry in entries, using the previously configured separator and key-value separator, to builder. Identical to <code>#appendTo(Appendable, Iterable)</code>, except that it does not throw <code>IOException</code>
appendTo
{ "repo_name": "wspeirs/sop4j-base", "path": "src/main/java/com/sop4j/base/google/common/base/Joiner.java", "license": "apache-2.0", "size": 16504 }
[ "java.io.IOException", "java.util.Iterator", "java.util.Map" ]
import java.io.IOException; import java.util.Iterator; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,576,705
@Test public void testPreferredBlockSize () { replication = 3; preferredBlockSize = 128*1024*1024; INodeFile inf = createINodeFile(replication, preferredBlockSize); assertEquals("True has to be returned in this case", preferredBlockSize, inf.getPreferredBlockSize()); }
void function () { replication = 3; preferredBlockSize = 128*1024*1024; INodeFile inf = createINodeFile(replication, preferredBlockSize); assertEquals(STR, preferredBlockSize, inf.getPreferredBlockSize()); }
/** * Test for the PreferredBlockSize value. Sets a value and checks if it was * set correct. */
Test for the PreferredBlockSize value. Sets a value and checks if it was set correct
testPreferredBlockSize
{ "repo_name": "oza/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java", "license": "apache-2.0", "size": 42359 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,170,540
@Override public void onClose(CloseEvent<PopupPanel> event) { hideChildren(); if (event.isAutoClosed()) { hideParents(true); menuVisible = false; } visibleChildMenu = null; popup = null; }
void function(CloseEvent<PopupPanel> event) { hideChildren(); if (event.isAutoClosed()) { hideParents(true); menuVisible = false; } visibleChildMenu = null; popup = null; }
/** * Listener method, fired when this menu is closed. */
Listener method, fired when this menu is closed
onClose
{ "repo_name": "mstahv/framework", "path": "client/src/main/java/com/vaadin/client/ui/VMenuBar.java", "license": "apache-2.0", "size": 62170 }
[ "com.google.gwt.event.logical.shared.CloseEvent", "com.google.gwt.user.client.ui.PopupPanel" ]
import com.google.gwt.event.logical.shared.CloseEvent; import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.event.logical.shared.*; import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,371,444
public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { return this.innerProperties() == null ? null : this.innerProperties().ipv6PeeringConfig(); }
Ipv6ExpressRouteCircuitPeeringConfig function() { return this.innerProperties() == null ? null : this.innerProperties().ipv6PeeringConfig(); }
/** * Get the ipv6PeeringConfig property: The IPv6 peering configuration. * * @return the ipv6PeeringConfig value. */
Get the ipv6PeeringConfig property: The IPv6 peering configuration
ipv6PeeringConfig
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ExpressRouteCrossConnectionPeeringInner.java", "license": "mit", "size": 13204 }
[ "com.azure.resourcemanager.network.models.Ipv6ExpressRouteCircuitPeeringConfig" ]
import com.azure.resourcemanager.network.models.Ipv6ExpressRouteCircuitPeeringConfig;
import com.azure.resourcemanager.network.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
989,919
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String virtualHubName, String ipConfigName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualHubName, ipConfigName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String virtualHubName, String ipConfigName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualHubName, ipConfigName), serviceCallback); }
/** * Deletes a VirtualHubIpConfiguration. * * @param resourceGroupName The resource group name of the VirtualHubBgpConnection. * @param virtualHubName The name of the VirtualHub. * @param ipConfigName The name of the ipconfig. * @param serviceCallback the async ServiceCallback to handle s...
Deletes a VirtualHubIpConfiguration
deleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/VirtualHubIpConfigurationsInner.java", "license": "mit", "size": 45941 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,709,983
private byte[] transceiveGetData(int tag, String msg) throws Exception { byte[] response = transceive(getData(tag), msg); ByteBuffer buffer = ByteBuffer.wrap(response); if (getTlvTag(buffer) != tag) { throw new Exception(String.format("Invalid IIN tlv tag 0x%4X", tag)); ...
byte[] function(int tag, String msg) throws Exception { byte[] response = transceive(getData(tag), msg); ByteBuffer buffer = ByteBuffer.wrap(response); if (getTlvTag(buffer) != tag) { throw new Exception(String.format(STR, tag)); } return getTlvData(buffer); }
/** Query card data with getData command */
Query card data with getData command
transceiveGetData
{ "repo_name": "fidesmo/apdu-over-ble-android", "path": "app/src/main/java/com/fidesmo/ble/client/apdu/CardInfoClient.java", "license": "mit", "size": 10953 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,142,404
void createSnapshot(CreateSnapshotRequest request, ActionListener<CreateSnapshotResponse> listener);
void createSnapshot(CreateSnapshotRequest request, ActionListener<CreateSnapshotResponse> listener);
/** * Creates a new snapshot. */
Creates a new snapshot
createSnapshot
{ "repo_name": "nezirus/elasticsearch", "path": "core/src/main/java/org/elasticsearch/client/ClusterAdminClient.java", "license": "apache-2.0", "size": 26945 }
[ "org.elasticsearch.action.ActionListener", "org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest", "org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse" ]
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest; import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
import org.elasticsearch.action.*; import org.elasticsearch.action.admin.cluster.snapshots.create.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
127,601
private boolean verifyVacancy(String text) { Pattern pattern = Pattern.compile("java[^script]"); return pattern.matcher(text.toLowerCase()).find(); }
boolean function(String text) { Pattern pattern = Pattern.compile(STR); return pattern.matcher(text.toLowerCase()).find(); }
/** * Verify vacancy. * @param text text for verifying. * @return tru if successful. */
Verify vacancy
verifyVacancy
{ "repo_name": "alekseyponkin/aponkin", "path": "SQL_JDBC/src/main/java/ru/job4j/parser/ParserJsop.java", "license": "apache-2.0", "size": 4007 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
807,965
public Collection<OntologyObjectProperty> getEquivalentProperties() throws InconsistencyException, NoSuchEntityException, ReasoningInterruptedException { try { Collection<OntologyObjectProperty> equivalentProperties = new ArrayList<>(); for (OWLObjectPropertyExpression property : getOntology().reasoner....
Collection<OntologyObjectProperty> function() throws InconsistencyException, NoSuchEntityException, ReasoningInterruptedException { try { Collection<OntologyObjectProperty> equivalentProperties = new ArrayList<>(); for (OWLObjectPropertyExpression property : getOntology().reasoner.getEquivalentObjectProperties(instance...
/** * Retrieves the named properties equivalent to the current one. * @return The set of equivalent properties. * @throws InconsistencyException * If the ontology is inconsistent. * @throws ReasoningInterruptedException * If the reasoning is interrupted. * @throws NoSuchEntityExcep...
Retrieves the named properties equivalent to the current one
getEquivalentProperties
{ "repo_name": "SPDSS/adss", "path": "it.polito.security.ontologies/src/it/polito/security/ontologies/OntologyObjectProperty.java", "license": "epl-1.0", "size": 31178 }
[ "it.polito.security.ontologies.exceptions.InconsistencyException", "it.polito.security.ontologies.exceptions.NoSuchEntityException", "it.polito.security.ontologies.exceptions.ReasoningInterruptedException", "java.util.ArrayList", "java.util.Collection", "org.semanticweb.owlapi.model.OWLObjectPropertyExpre...
import it.polito.security.ontologies.exceptions.InconsistencyException; import it.polito.security.ontologies.exceptions.NoSuchEntityException; import it.polito.security.ontologies.exceptions.ReasoningInterruptedException; import java.util.ArrayList; import java.util.Collection; import org.semanticweb.owlapi.model.OWLOb...
import it.polito.security.ontologies.exceptions.*; import java.util.*; import org.semanticweb.owlapi.model.*; import org.semanticweb.owlapi.reasoner.*;
[ "it.polito.security", "java.util", "org.semanticweb.owlapi" ]
it.polito.security; java.util; org.semanticweb.owlapi;
730,997
@Override protected JsonNode processIf(ArrayNode ast) throws HistoneException { ArrayNode conditions = (ArrayNode) ast.get(1); boolean isSafe = true; ArrayNode conditionsOut = nodeFactory.jsonArray(); for (JsonNode condition : conditions) { JsonNode expression = cond...
JsonNode function(ArrayNode ast) throws HistoneException { ArrayNode conditions = (ArrayNode) ast.get(1); boolean isSafe = true; ArrayNode conditionsOut = nodeFactory.jsonArray(); for (JsonNode condition : conditions) { JsonNode expression = condition.get(0); JsonNode statements = condition.get(1); expression = process...
/** * If is safe if for all conditions both expression and statements are safe. */
If is safe if for all conditions both expression and statements are safe
processIf
{ "repo_name": "MegafonWebLab/histone-java", "path": "src/main/java/ru/histone/optimizer/SafeASTNodesMarker.java", "license": "apache-2.0", "size": 15675 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.node.ArrayNode", "ru.histone.HistoneException", "ru.histone.parser.AstNodeType" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import ru.histone.HistoneException; import ru.histone.parser.AstNodeType;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import ru.histone.*; import ru.histone.parser.*;
[ "com.fasterxml.jackson", "ru.histone", "ru.histone.parser" ]
com.fasterxml.jackson; ru.histone; ru.histone.parser;
592,776
@NonNull public RectF getBounds() { return mDstRectF; }
RectF function() { return mDstRectF; }
/** * Returns current transform bounds - latest received by {@link #onBoundsChange(Rect)}. * * @return current transform bounds */
Returns current transform bounds - latest received by <code>#onBoundsChange(Rect)</code>
getBounds
{ "repo_name": "panpf/sketch", "path": "sketch-gif/src/main/java/pl/droidsonroids/gif/transforms/CornerRadiusTransform.java", "license": "apache-2.0", "size": 2393 }
[ "android.graphics.RectF" ]
import android.graphics.RectF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
550,579
public Collection<JID> getAdmins() { return AdminManager.getInstance().getAdminAccounts(); }
Collection<JID> function() { return AdminManager.getInstance().getAdminAccounts(); }
/** * Returns a collection with the JIDs of the server's admins. The collection may include * JIDs of local users and users of remote servers. * * @return a collection with the JIDs of the server's admins. */
Returns a collection with the JIDs of the server's admins. The collection may include JIDs of local users and users of remote servers
getAdmins
{ "repo_name": "surevine/openfire-bespoke", "path": "src/java/org/jivesoftware/openfire/XMPPServer.java", "license": "gpl-2.0", "size": 58285 }
[ "java.util.Collection", "org.jivesoftware.openfire.admin.AdminManager" ]
import java.util.Collection; import org.jivesoftware.openfire.admin.AdminManager;
import java.util.*; import org.jivesoftware.openfire.admin.*;
[ "java.util", "org.jivesoftware.openfire" ]
java.util; org.jivesoftware.openfire;
630,890
public ServiceCall putResourceCollectionAsync(ResourceCollection resourceComplexObject, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); }
ServiceCall function(ResourceCollection resourceComplexObject, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); }
/** * Put External Resource as a ResourceCollection. * * @param resourceComplexObject External Resource as a ResourceCollection to put * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null ...
Put External Resource as a ResourceCollection
putResourceCollectionAsync
{ "repo_name": "stankovski/AutoRest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/azureresource/AutoRestResourceFlatteningTestServiceImpl.java", "license": "mit", "size": 28989 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,676,997
private String computeResourceNameHash(Resource resource) { return HexEncoder.encode(SHA_DIGEST.digest(resource.getName().getBytes(StandardCharsets.UTF_8))); }
String function(Resource resource) { return HexEncoder.encode(SHA_DIGEST.digest(resource.getName().getBytes(StandardCharsets.UTF_8))); }
/** * Compute a SHA1 of the resource name, encoded in base64, so we can use it as a file name. * * @param resource * the resource which name will be hashed * @return the hash */
Compute a SHA1 of the resource name, encoded in base64, so we can use it as a file name
computeResourceNameHash
{ "repo_name": "jaikiran/ant-ivy", "path": "src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java", "license": "apache-2.0", "size": 71308 }
[ "java.nio.charset.StandardCharsets", "org.apache.ivy.plugins.repository.Resource", "org.apache.ivy.util.HexEncoder" ]
import java.nio.charset.StandardCharsets; import org.apache.ivy.plugins.repository.Resource; import org.apache.ivy.util.HexEncoder;
import java.nio.charset.*; import org.apache.ivy.plugins.repository.*; import org.apache.ivy.util.*;
[ "java.nio", "org.apache.ivy" ]
java.nio; org.apache.ivy;
926,504
@CanIgnoreReturnValue @Override public Builder<E> add(E element) { checkNotNull(element); getReadyToExpandTo(size + 1); contents[size++] = element; return this; } /** * Adds each element of {@code elements} to the {@code ImmutableList}. * * @param elements the...
Builder<E> function(E element) { checkNotNull(element); getReadyToExpandTo(size + 1); contents[size++] = element; return this; } /** * Adds each element of {@code elements} to the {@code ImmutableList}. * * @param elements the {@code Iterable} to add to the {@code ImmutableList}
/** * Adds {@code element} to the {@code ImmutableList}. * * @param element the element to add * @return this {@code Builder} object * @throws NullPointerException if {@code element} is null */
Adds element to the ImmutableList
add
{ "repo_name": "EdwardLee03/guava", "path": "guava/src/com/google/common/collect/ImmutableList.java", "license": "apache-2.0", "size": 27422 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
34,238
public void reload() { List<CmsResource> settingConfigResources = new ArrayList<>(); try { I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(TYPE_SETTINGS_CONFIG); CmsResourceFilter filter = CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireType(type); ...
void function() { List<CmsResource> settingConfigResources = new ArrayList<>(); try { I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(TYPE_SETTINGS_CONFIG); CmsResourceFilter filter = CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireType(type); settingConfigResources.addAll(m_cms.readResources(...
/** * Reloads the formatter cache.<p> */
Reloads the formatter cache
reload
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ade/configuration/formatters/CmsFormatterConfigurationCache.java", "license": "lgpl-2.1", "size": 18831 }
[ "com.google.common.collect.Maps", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.opencms.file.CmsResource", "org.opencms.file.CmsResourceFilter", "org.opencms.file.types.CmsResourceTypeFunctionConfig", "org.opencms.main.CmsException", "org.opencms.main.OpenCms"...
import com.google.common.collect.Maps; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.file.types.CmsResourceTypeFunctionConfig; import org.opencms.main.CmsException; imp...
import com.google.common.collect.*; import java.util.*; import org.opencms.file.*; import org.opencms.file.types.*; import org.opencms.main.*; import org.opencms.util.*; import org.opencms.xml.content.*;
[ "com.google.common", "java.util", "org.opencms.file", "org.opencms.main", "org.opencms.util", "org.opencms.xml" ]
com.google.common; java.util; org.opencms.file; org.opencms.main; org.opencms.util; org.opencms.xml;
159,804
Collection<ICar> getCarList();
Collection<ICar> getCarList();
/** * Obtains a collection of the cars on the road. * * @return */
Obtains a collection of the cars on the road
getCarList
{ "repo_name": "bjsemrad/trafficsim", "path": "src/model/road/IRoad.java", "license": "mit", "size": 1650 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,392,076
void size(Handler<AsyncResult<Integer>> resultHandler);
void size(Handler<AsyncResult<Integer>> resultHandler);
/** * Get the number of sessions in the store * * @param resultHandler will be called with the number, or a failure */
Get the number of sessions in the store
size
{ "repo_name": "lingkong7/vertx-web", "path": "vertx-web/src/main/java/io/vertx/ext/web/sstore/SessionStore.java", "license": "apache-2.0", "size": 2255 }
[ "io.vertx.core.AsyncResult", "io.vertx.core.Handler" ]
import io.vertx.core.AsyncResult; import io.vertx.core.Handler;
import io.vertx.core.*;
[ "io.vertx.core" ]
io.vertx.core;
2,663,566
private String getPath(NodeState node) { // remember as fallback String uuid = node.getNodeId().toString(); StringBuilder path = new StringBuilder(); List<ChildNodeEntry> elements = new ArrayList<ChildNodeEntry>(); try { while (node.getParentId() != null) { ...
String function(NodeState node) { String uuid = node.getNodeId().toString(); StringBuilder path = new StringBuilder(); List<ChildNodeEntry> elements = new ArrayList<ChildNodeEntry>(); try { while (node.getParentId() != null) { NodeId parentId = node.getParentId(); NodeState parent = (NodeState) stateMgr.getItemState(pa...
/** * Returns the path for <code>node</code>. If an error occurs this method * returns the uuid of the node. * * @param node the node to retrieve the path from * @return the path of the node or its uuid. */
Returns the path for <code>node</code>. If an error occurs this method returns the uuid of the node
getPath
{ "repo_name": "Kast0rTr0y/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ConsistencyCheck.java", "license": "apache-2.0", "size": 28745 }
[ "java.util.ArrayList", "java.util.List", "org.apache.jackrabbit.core.id.NodeId", "org.apache.jackrabbit.core.state.ChildNodeEntry", "org.apache.jackrabbit.core.state.ItemStateException", "org.apache.jackrabbit.core.state.NodeState" ]
import java.util.ArrayList; import java.util.List; import org.apache.jackrabbit.core.id.NodeId; import org.apache.jackrabbit.core.state.ChildNodeEntry; import org.apache.jackrabbit.core.state.ItemStateException; import org.apache.jackrabbit.core.state.NodeState;
import java.util.*; import org.apache.jackrabbit.core.id.*; import org.apache.jackrabbit.core.state.*;
[ "java.util", "org.apache.jackrabbit" ]
java.util; org.apache.jackrabbit;
233,712
public int getUsageCount() throws DAOException;
int function() throws DAOException;
/** * Gets the total number of usages * @return the number of rows in the usage table * @throws DAOException */
Gets the total number of usages
getUsageCount
{ "repo_name": "openmrs/openmrs-module-usagestatistics", "path": "api/src/main/java/org/openmrs/module/usagestatistics/db/UsageStatisticsDAO.java", "license": "mpl-2.0", "size": 7382 }
[ "org.openmrs.api.db.DAOException" ]
import org.openmrs.api.db.DAOException;
import org.openmrs.api.db.*;
[ "org.openmrs.api" ]
org.openmrs.api;
2,648,087
@Test public void testStop() { ScheduledFuture<Void> future = createFutureMock(); expectSchedule(future); EasyMock.expect(future.cancel(false)).andReturn(Boolean.TRUE); EasyMock.replay(future, controller, executor); PeriodicReloadingTrigger trigger = createTrigger(); ...
void function() { ScheduledFuture<Void> future = createFutureMock(); expectSchedule(future); EasyMock.expect(future.cancel(false)).andReturn(Boolean.TRUE); EasyMock.replay(future, controller, executor); PeriodicReloadingTrigger trigger = createTrigger(); trigger.start(); trigger.stop(); assertFalse(STR, trigger.isRunni...
/** * Tests whether a running trigger can be stopped. */
Tests whether a running trigger can be stopped
testStop
{ "repo_name": "mohanaraosv/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/reloading/TestPeriodicReloadingTrigger.java", "license": "apache-2.0", "size": 7153 }
[ "java.util.concurrent.ScheduledFuture", "org.easymock.EasyMock", "org.junit.Assert" ]
import java.util.concurrent.ScheduledFuture; import org.easymock.EasyMock; import org.junit.Assert;
import java.util.concurrent.*; import org.easymock.*; import org.junit.*;
[ "java.util", "org.easymock", "org.junit" ]
java.util; org.easymock; org.junit;
2,829,833
public static List<SimpleEntry<Concept, Double>> getOverlaps(AbstractConceptDB<Concept> cdb, Concept concept) { List<SimpleEntry<Concept, Double>> retval = new ArrayList<>(); for (Concept c : cdb.getAllConcepts()) { if (c.equals(concept)) { continue; } double overlap = cdb.getOverlap(concept, ...
static List<SimpleEntry<Concept, Double>> function(AbstractConceptDB<Concept> cdb, Concept concept) { List<SimpleEntry<Concept, Double>> retval = new ArrayList<>(); for (Concept c : cdb.getAllConcepts()) { if (c.equals(concept)) { continue; } double overlap = cdb.getOverlap(concept, c); if (overlap != 0.0) { retval.add...
/** * Returns a list of the concepts which overlap with concept * * This is a very expensive operation, and it should normally only be used * for listing and debugging purposes * * @param concept * @return */
Returns a list of the concepts which overlap with concept This is a very expensive operation, and it should normally only be used for listing and debugging purposes
getOverlaps
{ "repo_name": "Xapagy/Xapagy", "path": "src/main/java/org/xapagy/ui/prettygeneral/xwConcept.java", "license": "agpl-3.0", "size": 4692 }
[ "java.util.AbstractMap", "java.util.ArrayList", "java.util.List", "org.xapagy.concepts.AbstractConceptDB", "org.xapagy.concepts.Concept" ]
import java.util.AbstractMap; import java.util.ArrayList; import java.util.List; import org.xapagy.concepts.AbstractConceptDB; import org.xapagy.concepts.Concept;
import java.util.*; import org.xapagy.concepts.*;
[ "java.util", "org.xapagy.concepts" ]
java.util; org.xapagy.concepts;
2,668,385
public static JobExecutionResult execute(Plan plan) throws Exception { return new LocalExecutor().executePlan(plan); }
static JobExecutionResult function(Plan plan) throws Exception { return new LocalExecutor().executePlan(plan); }
/** * Executes the given dataflow plan. * * @param plan The dataflow plan. * @return The execution result. * * @throws Exception Thrown, if either the startup of the local execution context, or the execution * caused an exception. */
Executes the given dataflow plan
execute
{ "repo_name": "shaoxuan-wang/flink", "path": "flink-clients/src/main/java/org/apache/flink/client/LocalExecutor.java", "license": "apache-2.0", "size": 11374 }
[ "org.apache.flink.api.common.JobExecutionResult", "org.apache.flink.api.common.Plan" ]
import org.apache.flink.api.common.JobExecutionResult; import org.apache.flink.api.common.Plan;
import org.apache.flink.api.common.*;
[ "org.apache.flink" ]
org.apache.flink;
2,788,472
@Value.Immutable public interface TaskContext<T> { Callable<T> task();
@Value.Immutable interface TaskContext<T> { Callable<T> function();
/** * Executed to shut down an object. */
Executed to shut down an object
task
{ "repo_name": "palantir/atlasdb", "path": "atlasdb-commons/src/main/java/com/palantir/util/TimedRunner.java", "license": "apache-2.0", "size": 3864 }
[ "java.util.concurrent.Callable", "org.immutables.value.Value" ]
import java.util.concurrent.Callable; import org.immutables.value.Value;
import java.util.concurrent.*; import org.immutables.value.*;
[ "java.util", "org.immutables.value" ]
java.util; org.immutables.value;
22,118
public static void dimensionCheck(final int n) { if (n <= 0) { final String msg = format("dimension %d is not positive", n); getLogger().warn(msg); throw new IllegalArgumentException(msg); } }
static void function(final int n) { if (n <= 0) { final String msg = format(STR, n); getLogger().warn(msg); throw new IllegalArgumentException(msg); } }
/** * Check the dimension is greater than zero. * * @param n dimension to check */
Check the dimension is greater than zero
dimensionCheck
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/lapack/LinearAlgebra.java", "license": "gpl-3.0", "size": 103733 }
[ "java.lang.String" ]
import java.lang.String;
import java.lang.*;
[ "java.lang" ]
java.lang;
23,468
@Deprecated protected final void requirePOST() throws ServletException { StaplerRequest req = Stapler.getCurrentRequest(); if (req==null) return; // invoked outside the context of servlet String method = req.getMethod(); if(!method.equalsIgnoreCase("POST")) throw new...
final void function() throws ServletException { StaplerRequest req = Stapler.getCurrentRequest(); if (req==null) return; String method = req.getMethod(); if(!method.equalsIgnoreCase("POST")) throw new ServletException(STR+method); }
/** * Convenience method to verify that the current request is a POST request. * * @deprecated * Use {@link RequirePOST} on your method. */
Convenience method to verify that the current request is a POST request
requirePOST
{ "repo_name": "ErikVerheul/jenkins", "path": "core/src/main/java/hudson/model/AbstractModelObject.java", "license": "mit", "size": 4303 }
[ "javax.servlet.ServletException", "org.kohsuke.stapler.Stapler", "org.kohsuke.stapler.StaplerRequest" ]
import javax.servlet.ServletException; import org.kohsuke.stapler.Stapler; import org.kohsuke.stapler.StaplerRequest;
import javax.servlet.*; import org.kohsuke.stapler.*;
[ "javax.servlet", "org.kohsuke.stapler" ]
javax.servlet; org.kohsuke.stapler;
1,894,049
public OffsetDateTime deletedTime() { return this.innerFileShareProperties() == null ? null : this.innerFileShareProperties().deletedTime(); }
OffsetDateTime function() { return this.innerFileShareProperties() == null ? null : this.innerFileShareProperties().deletedTime(); }
/** * Get the deletedTime property: The deleted time if the share was deleted. * * @return the deletedTime value. */
Get the deletedTime property: The deleted time if the share was deleted
deletedTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/FileShareInner.java", "license": "mit", "size": 9118 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,612,021
public Scan setFamilyMap(Map<byte [], NavigableSet<byte []>> familyMap) { this.familyMap = familyMap; return this; }
Scan function(Map<byte [], NavigableSet<byte []>> familyMap) { this.familyMap = familyMap; return this; }
/** * Setting the familyMap * @param familyMap map of family to qualifier * @return this */
Setting the familyMap
setFamilyMap
{ "repo_name": "alipayhuber/hack-hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java", "license": "apache-2.0", "size": 25624 }
[ "java.util.Map", "java.util.NavigableSet" ]
import java.util.Map; import java.util.NavigableSet;
import java.util.*;
[ "java.util" ]
java.util;
908,859
private boolean nightTime(String time){ try { Date currentTime = new SimpleDateFormat("HH:mm:ss").parse(time); Date nightTime = new SimpleDateFormat("HH:mm:ss").parse("18:00:00"); Date earlyMorning = new SimpleDateFormat("HH:mm:ss").parse("6:00:00"); return cu...
boolean function(String time){ try { Date currentTime = new SimpleDateFormat(STR).parse(time); Date nightTime = new SimpleDateFormat(STR).parse(STR); Date earlyMorning = new SimpleDateFormat(STR).parse(STR); return currentTime.getTime() > nightTime.getTime() currentTime.getTime() < earlyMorning.getTime(); }catch(ParseE...
/** * A function to check if it's night time or not * Plus this is easier on the eyes in night * @param time the time * @return boolean */
A function to check if it's night time or not Plus this is easier on the eyes in night
nightTime
{ "repo_name": "CMPUT301F16T04/Ridr", "path": "app/src/main/java/ca/ualberta/ridr/GeoView.java", "license": "lgpl-3.0", "size": 13217 }
[ "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
446,443
public static GlobalAggregatorBuilder global(String name) { return new GlobalAggregatorBuilder(name); }
static GlobalAggregatorBuilder function(String name) { return new GlobalAggregatorBuilder(name); }
/** * Create a new {@link Global} aggregation with the given name. */
Create a new <code>Global</code> aggregation with the given name
global
{ "repo_name": "nomoa/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/aggregations/AggregationBuilders.java", "license": "apache-2.0", "size": 13337 }
[ "org.elasticsearch.search.aggregations.bucket.global.GlobalAggregatorBuilder" ]
import org.elasticsearch.search.aggregations.bucket.global.GlobalAggregatorBuilder;
import org.elasticsearch.search.aggregations.bucket.global.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
2,171,763
void getLuma22Unsafe(byte[] pic, int picW, int imgH, byte[] blk, int blkOff, int blkStride, int x, int y, int blkW, int blkH) { getLuma20UnsafeNoRound(pic, picW, imgH, tmp1, 0, blkW, x, y - 2, blkW, blkH + 7); getLuma02NoRoundInt(tmp1, blkW, tmp2, blkOff, blkStride, 0, 2, blkW, blkH); ...
void getLuma22Unsafe(byte[] pic, int picW, int imgH, byte[] blk, int blkOff, int blkStride, int x, int y, int blkW, int blkH) { getLuma20UnsafeNoRound(pic, picW, imgH, tmp1, 0, blkW, x, y - 2, blkW, blkH + 7); getLuma02NoRoundInt(tmp1, blkW, tmp2, blkOff, blkStride, 0, 2, blkW, blkH); for (int j = 0; j < blkH; j++) { f...
/** * Hpel (2, 2) unsafe */
Hpel (2, 2) unsafe
getLuma22Unsafe
{ "repo_name": "jcodec/jcodec", "path": "src/main/java/org/jcodec/codecs/h264/decode/BlockInterpolator.java", "license": "bsd-2-clause", "size": 43265 }
[ "org.jcodec.common.tools.MathUtil" ]
import org.jcodec.common.tools.MathUtil;
import org.jcodec.common.tools.*;
[ "org.jcodec.common" ]
org.jcodec.common;
91,010
public static ITypeBinding getBindingOfParentType(ASTNode node) { while (node != null) { if (node instanceof AbstractTypeDeclaration) { return ((AbstractTypeDeclaration) node).resolveBinding(); } else if (node instanceof AnonymousClassDeclaration) { return ((AnonymousClassDeclaration) ...
static ITypeBinding function(ASTNode node) { while (node != null) { if (node instanceof AbstractTypeDeclaration) { return ((AbstractTypeDeclaration) node).resolveBinding(); } else if (node instanceof AnonymousClassDeclaration) { return ((AnonymousClassDeclaration) node).resolveBinding(); } node = node.getParent(); } re...
/** * Returns the type binding of the node's enclosing type declaration. * * @param node an AST node * @return the type binding of the node's parent type declaration, or <code>null</code> */
Returns the type binding of the node's enclosing type declaration
getBindingOfParentType
{ "repo_name": "sleshchenko/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/corext/dom/Bindings.java", "license": "epl-1.0", "size": 59124 }
[ "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.AbstractTypeDeclaration", "org.eclipse.jdt.core.dom.AnonymousClassDeclaration", "org.eclipse.jdt.core.dom.ITypeBinding" ]
import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.AbstractTypeDeclaration; import org.eclipse.jdt.core.dom.AnonymousClassDeclaration; import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
272,687
public Attr createAttribute(String name) { if (checkingCharacters) { checkName(name, "1.1".equals(version)); } if (name.startsWith("xml:")) { return createAttributeNS(XMLConstants.XML_NS_URI, name); } else if (XMLConstants.XMLNS_ATTRIBUTE.equals(name) || ...
Attr function(String name) { if (checkingCharacters) { checkName(name, "1.1".equals(version)); } if (name.startsWith("xml:")) { return createAttributeNS(XMLConstants.XML_NS_URI, name); } else if (XMLConstants.XMLNS_ATTRIBUTE.equals(name) name.startsWith(STR)) { return createAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_U...
/** * <b>DOM L1</b> * Returns a newly created attribute with the specified name. */
DOM L1 Returns a newly created attribute with the specified name
createAttribute
{ "repo_name": "github-lis/JamVM-PH", "path": "src/classpath/gnu/xml/dom/DomDocument.java", "license": "gpl-2.0", "size": 47563 }
[ "javax.xml.XMLConstants", "org.w3c.dom.Attr" ]
import javax.xml.XMLConstants; import org.w3c.dom.Attr;
import javax.xml.*; import org.w3c.dom.*;
[ "javax.xml", "org.w3c.dom" ]
javax.xml; org.w3c.dom;
1,435,771
private static TypeI normalizeClassType(TypeI type) { if (type == null || type.isUnknownType()) { return type; } else if (type.isConstructor() || type.isInterface()) { return type.toMaybeFunctionType().getInstanceType(); } else if (type.isPrototypeObject()) { return type.toMaybeObjectTyp...
static TypeI function(TypeI type) { if (type == null type.isUnknownType()) { return type; } else if (type.isConstructor() type.isInterface()) { return type.toMaybeFunctionType().getInstanceType(); } else if (type.isPrototypeObject()) { return type.toMaybeObjectType().normalizeObjectForCheckAccessControls(); } return ty...
/** * Normalize the type of a constructor, its instance, and its prototype * all down to the same type (the instance type). */
Normalize the type of a constructor, its instance, and its prototype all down to the same type (the instance type)
normalizeClassType
{ "repo_name": "Pimm/closure-compiler", "path": "src/com/google/javascript/jscomp/CheckAccessControls.java", "license": "apache-2.0", "size": 36315 }
[ "com.google.javascript.rhino.TypeI" ]
import com.google.javascript.rhino.TypeI;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,036,145
@Metadata(description = "A map which contains general HTTP connector properties. Uses the same principle as sslSocketConnectorProperties.", label = "security") public void setSocketConnectorProperties(Map<String, Object> socketConnectorProperties) { this.socketConnectorProperties = socketConnectorProper...
@Metadata(description = STR, label = STR) void function(Map<String, Object> socketConnectorProperties) { this.socketConnectorProperties = socketConnectorProperties; }
/** * A map which contains general HTTP connector properties. Uses the same principle as sslSocketConnectorProperties. */
A map which contains general HTTP connector properties. Uses the same principle as sslSocketConnectorProperties
setSocketConnectorProperties
{ "repo_name": "jonmcewen/camel", "path": "components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java", "license": "apache-2.0", "size": 65878 }
[ "java.util.Map", "org.apache.camel.spi.Metadata" ]
import java.util.Map; import org.apache.camel.spi.Metadata;
import java.util.*; import org.apache.camel.spi.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
270,745
@CLIResolver public static AbstractItem resolveForCLI( @Argument(required=true,metaVar="NAME",usage="Job name") String name) throws CmdLineException { AbstractItem item = Jenkins.getInstance().getItemByFullName(name, AbstractItem.class); if (item==null) throw new CmdLineE...
static AbstractItem function( @Argument(required=true,metaVar="NAME",usage=STR) String name) throws CmdLineException { AbstractItem item = Jenkins.getInstance().getItemByFullName(name, AbstractItem.class); if (item==null) throw new CmdLineException(null,Messages.AbstractItem_NoSuchJobExists(name,AbstractProject.findNea...
/** * Used for CLI binding. */
Used for CLI binding
resolveForCLI
{ "repo_name": "IsCoolEntertainment/debpkg_jenkins", "path": "core/src/main/java/hudson/model/AbstractItem.java", "license": "mit", "size": 18957 }
[ "hudson.util.AlternativeUiTextProvider", "org.kohsuke.args4j.Argument", "org.kohsuke.args4j.CmdLineException" ]
import hudson.util.AlternativeUiTextProvider; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException;
import hudson.util.*; import org.kohsuke.args4j.*;
[ "hudson.util", "org.kohsuke.args4j" ]
hudson.util; org.kohsuke.args4j;
1,271,099
public void setLastupdatedtime(Date lastupdatedtime) { this.lastupdatedtime = lastupdatedtime; }
void function(Date lastupdatedtime) { this.lastupdatedtime = lastupdatedtime; }
/** * This method was generated by MyBatis Generator. * This method sets the value of the database column m_crm_lead.lastUpdatedTime * * @param lastupdatedtime the value for m_crm_lead.lastUpdatedTime * * @mbggenerated Mon Sep 21 13:52:02 ICT 2015 */
This method was generated by MyBatis Generator. This method sets the value of the database column m_crm_lead.lastUpdatedTime
setLastupdatedtime
{ "repo_name": "maduhu/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/crm/domain/Lead.java", "license": "agpl-3.0", "size": 42844 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
613,191
void deleteIndicatorReportLines(Indicator indicator);
void deleteIndicatorReportLines(Indicator indicator);
/** * Delete all <code>IndicatorReportLine</code>s for the specified <code>Indicator</code> * @param indicator */
Delete all <code>IndicatorReportLine</code>s for the specified <code>Indicator</code>
deleteIndicatorReportLines
{ "repo_name": "DIA-NZ/webcurator", "path": "wct-core/src/main/java/org/webcurator/core/scheduler/TargetInstanceManager.java", "license": "apache-2.0", "size": 8101 }
[ "org.webcurator.domain.model.core.Indicator" ]
import org.webcurator.domain.model.core.Indicator;
import org.webcurator.domain.model.core.*;
[ "org.webcurator.domain" ]
org.webcurator.domain;
722,628
public static void parseField(String field, String descriptor, Pattern pattern) { Matcher matcher = pattern.matcher(descriptor); if (!matcher.matches()) { throw new IllegalArgumentException("Invalid field " + field + ", wrong signature: " + descriptor); } ...
static void function(String field, String descriptor, Pattern pattern) { Matcher matcher = pattern.matcher(descriptor); if (!matcher.matches()) { throw new IllegalArgumentException(STR + field + STR + descriptor); } }
/** * Checks if a field descriptor matches a given pattern. * @param field the field whose type descriptor is checked * @param descriptor the field descriptor to be checked * @param pattern the pattern to use * @throws IllegalArgumentException if the method signature descriptor does not match t...
Checks if a field descriptor matches a given pattern
parseField
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/Patterns.java", "license": "apache-2.0", "size": 4462 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
590,407
@Test @SmallTest @Feature({"NewTabPage", "FeedNewTabPage"}) public void testOpenMostVisitedItemInIncognitoTab() throws ExecutionException { ChromeTabUtils.invokeContextMenuAndOpenInANewTab(mActivityTestRule, mTileGridLayout.getChildAt(0), ContextMenuManager.Contex...
@Feature({STR, STR}) void function() throws ExecutionException { ChromeTabUtils.invokeContextMenuAndOpenInANewTab(mActivityTestRule, mTileGridLayout.getChildAt(0), ContextMenuManager.ContextMenuItemId.OPEN_IN_INCOGNITO_TAB, true, mSiteSuggestions.get(0).url); }
/** * Tests opening a most visited item in a new incognito tab. */
Tests opening a most visited item in a new incognito tab
testOpenMostVisitedItemInIncognitoTab
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java", "license": "bsd-3-clause", "size": 24524 }
[ "java.util.concurrent.ExecutionException", "org.chromium.base.test.util.Feature", "org.chromium.chrome.browser.native_page.ContextMenuManager", "org.chromium.chrome.test.util.ChromeTabUtils" ]
import java.util.concurrent.ExecutionException; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.native_page.ContextMenuManager; import org.chromium.chrome.test.util.ChromeTabUtils;
import java.util.concurrent.*; import org.chromium.base.test.util.*; import org.chromium.chrome.browser.native_page.*; import org.chromium.chrome.test.util.*;
[ "java.util", "org.chromium.base", "org.chromium.chrome" ]
java.util; org.chromium.base; org.chromium.chrome;
2,605,694
public static String getFrostWireJarPath() { return new File(FrostWireUtils.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent(); }
static String function() { return new File(FrostWireUtils.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent(); }
/** * Returns the path of the FrostWire.jar executable. * For a windows binary distribution this is the same path as FrostWire.exe since those files live together. * * @return */
Returns the path of the FrostWire.jar executable. For a windows binary distribution this is the same path as FrostWire.exe since those files live together
getFrostWireJarPath
{ "repo_name": "votaguz/frostwire-desktop", "path": "src/com/limegroup/gnutella/util/FrostWireUtils.java", "license": "gpl-3.0", "size": 6164 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
749,756
public static <T> org.hamcrest.core.AnyOf<T> anyOf(final Matcher<T> first, final Matcher<? super T> second, final Matcher<? super T> third, final Matcher<? super T> fourth, final Matcher<? super T> fifth, final Matcher<? super T> sixth) { return org.hamcrest.core.AnyOf.<T>anyOf(first, second, third, fourth, fifth...
static <T> org.hamcrest.core.AnyOf<T> function(final Matcher<T> first, final Matcher<? super T> second, final Matcher<? super T> third, final Matcher<? super T> fourth, final Matcher<? super T> fifth, final Matcher<? super T> sixth) { return org.hamcrest.core.AnyOf.<T>anyOf(first, second, third, fourth, fifth, sixth); ...
/** * Creates a matcher that matches if the examined object matches <b>ANY</b> of the specified matchers. * <p/> * For example: * <pre>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</pre> */
Creates a matcher that matches if the examined object matches ANY of the specified matchers. For example: <code>assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))</code>
anyOf
{ "repo_name": "gv2011/util", "path": "testutil/src/main/java/com/github/gv2011/testutil/Matchers.java", "license": "mit", "size": 65674 }
[ "org.hamcrest.Matcher" ]
import org.hamcrest.Matcher;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
1,123,405
@Inject public void init() { try { initializeConfiguration(); } catch (ConfigurationException e) { Throwables.propagate(e); } }
void function() { try { initializeConfiguration(); } catch (ConfigurationException e) { Throwables.propagate(e); } }
/** * This method mimics "post construct"! This will work as long we don't have optional dependencies! * TODO: this needs better solution. */
This method mimics "post construct"! This will work as long we don't have optional dependencies
init
{ "repo_name": "scmod/nexus-public", "path": "components/nexus-core/src/main/java/org/sonatype/nexus/configuration/AbstractLastingConfigurable.java", "license": "epl-1.0", "size": 2088 }
[ "com.google.common.base.Throwables", "org.sonatype.configuration.ConfigurationException" ]
import com.google.common.base.Throwables; import org.sonatype.configuration.ConfigurationException;
import com.google.common.base.*; import org.sonatype.configuration.*;
[ "com.google.common", "org.sonatype.configuration" ]
com.google.common; org.sonatype.configuration;
1,647,408
EReference getDiagnosticStatus_Values();
EReference getDiagnosticStatus_Values();
/** * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.diagnostic_datatypes.DiagnosticStatus#getValues <em>Values</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment ...
Returns the meta object for the containment reference list '<code>org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.diagnostic_datatypes.DiagnosticStatus#getValues Values</code>'.
getDiagnosticStatus_Values
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/diagnostic_datatypes/Diagnostic_datatypesPackage.java", "license": "epl-1.0", "size": 20940 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,533,787
public static Bitmap imageOreintationValidator(Bitmap pBitmap, String pPath) { ExifInterface ei; try { ei = new ExifInterface(pPath); int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90...
static Bitmap function(Bitmap pBitmap, String pPath) { ExifInterface ei; try { ei = new ExifInterface(pPath); int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90: pBitmap = rotateImage(pBitmap, 90); break;...
/** * Checks if the orientation of the image is correct, if it's not it will rotate the image * * @param pBitmap * The bitmap to check the orientation for * @param pPath * The path to the image, used to load the exif interface * @return Bitmap in the correct orientation */
Checks if the orientation of the image is correct, if it's not it will rotate the image
imageOreintationValidator
{ "repo_name": "victronenergy/apps_vrm_android", "path": "victronvrm/src/main/java/nl/victronenergy/util/TakePictureUtils.java", "license": "mit", "size": 7831 }
[ "android.graphics.Bitmap", "android.media.ExifInterface", "java.io.IOException" ]
import android.graphics.Bitmap; import android.media.ExifInterface; import java.io.IOException;
import android.graphics.*; import android.media.*; import java.io.*;
[ "android.graphics", "android.media", "java.io" ]
android.graphics; android.media; java.io;
2,142,502
public void drawValue(Canvas c, ValueFormatter formatter, float value, Entry entry, int dataSetIndex, float x, float y, int color) { mValuePaint.setColor(color); c.drawText(formatter.getFormattedValue(value, entry, dataSetIndex, mViewPortHandler), x, y, mValuePaint); }
void function(Canvas c, ValueFormatter formatter, float value, Entry entry, int dataSetIndex, float x, float y, int color) { mValuePaint.setColor(color); c.drawText(formatter.getFormattedValue(value, entry, dataSetIndex, mViewPortHandler), x, y, mValuePaint); }
/** * Draws the value of the given entry by using the provided ValueFormatter. * * @param c canvas * @param formatter formatter for custom value-formatting * @param value the value to be drawn * @param entry the entry the value belongs to * @param dataSetIn...
Draws the value of the given entry by using the provided ValueFormatter
drawValue
{ "repo_name": "wpy2016/TimeContrloller", "path": "app/src/main/java/com/jn/chart/renderer/DataRenderer.java", "license": "gpl-2.0", "size": 4503 }
[ "android.graphics.Canvas", "com.jn.chart.data.Entry", "com.jn.chart.formatter.ValueFormatter" ]
import android.graphics.Canvas; import com.jn.chart.data.Entry; import com.jn.chart.formatter.ValueFormatter;
import android.graphics.*; import com.jn.chart.data.*; import com.jn.chart.formatter.*;
[ "android.graphics", "com.jn.chart" ]
android.graphics; com.jn.chart;
1,228,145
public void writeNBTTagCompoundToBuffer(NBTTagCompound nbt) { if (nbt == null) { this.writeByte(0); } else { try { CompressedStreamTools.write(nbt, new ByteBufOutputStream(this)); } catch (IOExcep...
void function(NBTTagCompound nbt) { if (nbt == null) { this.writeByte(0); } else { try { CompressedStreamTools.write(nbt, new ByteBufOutputStream(this)); } catch (IOException ioexception) { throw new EncoderException(ioexception); } } }
/** * Writes a compressed NBTTagCompound to this buffer */
Writes a compressed NBTTagCompound to this buffer
writeNBTTagCompoundToBuffer
{ "repo_name": "tomtomtom09/CampCraft", "path": "build/tmp/recompileMc/sources/net/minecraft/network/PacketBuffer.java", "license": "gpl-3.0", "size": 26384 }
[ "io.netty.buffer.ByteBufOutputStream", "io.netty.handler.codec.EncoderException", "java.io.IOException", "net.minecraft.nbt.CompressedStreamTools", "net.minecraft.nbt.NBTTagCompound" ]
import io.netty.buffer.ByteBufOutputStream; import io.netty.handler.codec.EncoderException; import java.io.IOException; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound;
import io.netty.buffer.*; import io.netty.handler.codec.*; import java.io.*; import net.minecraft.nbt.*;
[ "io.netty.buffer", "io.netty.handler", "java.io", "net.minecraft.nbt" ]
io.netty.buffer; io.netty.handler; java.io; net.minecraft.nbt;
1,347,549
public boolean deleteAllTrafficCameras() { SQLiteDatabase database = getWritableDatabase(); return database.delete(TC_TABLE, "1", null) > 0; }
boolean function() { SQLiteDatabase database = getWritableDatabase(); return database.delete(TC_TABLE, "1", null) > 0; }
/** * Deletes all traffic cameras from the database * * @return */
Deletes all traffic cameras from the database
deleteAllTrafficCameras
{ "repo_name": "emuneee/nc-traffic-cams-open", "path": "nc-traffic-cams/src/com/emuneee/nctrafficcams/api/CameraDBHelper.java", "license": "apache-2.0", "size": 17524 }
[ "android.database.sqlite.SQLiteDatabase" ]
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.*;
[ "android.database" ]
android.database;
2,221,505
public static void deleteSafely(DistributionPackage distributionPackage) { if (distributionPackage != null) { try { distributionPackage.delete(); } catch (Throwable t) { log.error("error deleting package", t); } } }
static void function(DistributionPackage distributionPackage) { if (distributionPackage != null) { try { distributionPackage.delete(); } catch (Throwable t) { log.error(STR, t); } } }
/** * Delete a distribution package, if deletion fails, ignore it * @param distributionPackage the package to delete */
Delete a distribution package, if deletion fails, ignore it
deleteSafely
{ "repo_name": "Sivaramvt/sling", "path": "contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/DistributionPackageUtils.java", "license": "apache-2.0", "size": 4026 }
[ "org.apache.sling.distribution.packaging.DistributionPackage" ]
import org.apache.sling.distribution.packaging.DistributionPackage;
import org.apache.sling.distribution.packaging.*;
[ "org.apache.sling" ]
org.apache.sling;
2,587,867
public boolean physicallyExists() { // TODO: there is no need for this method anymore, replace it by calling exists(); init(); try { return resourceImpl.exists(); // originally I only checked for a FileSystemException. I expanded it to // include all exce...
boolean function() { init(); try { return resourceImpl.exists(); } catch (Exception e) { Message.verbose(STR + getName(), e); return false; } }
/** * Return a flag indicating whether a provided VFS resource physically exists * * @return <code>true</code> if the resource physically exists, <code>false</code> otherwise. */
Return a flag indicating whether a provided VFS resource physically exists
physicallyExists
{ "repo_name": "jaikiran/ant-ivy", "path": "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java", "license": "apache-2.0", "size": 6223 }
[ "org.apache.ivy.util.Message" ]
import org.apache.ivy.util.Message;
import org.apache.ivy.util.*;
[ "org.apache.ivy" ]
org.apache.ivy;
2,706,378
protected void validateCloneSolution(SolutionG originalSolution, SolutionG cloneSolution) { for (PropertyAccessor propertyAccessor : solutionDescriptor.getEntityPropertyAccessorMap().values()) { Object originalProperty = propertyAccessor.executeGetter(originalSolu...
void function(SolutionG originalSolution, SolutionG cloneSolution) { for (PropertyAccessor propertyAccessor : solutionDescriptor.getEntityPropertyAccessorMap().values()) { Object originalProperty = propertyAccessor.executeGetter(originalSolution); if (originalProperty != null) { Object cloneProperty = propertyAccessor....
/** * Fails fast if {@link #isFieldAnEntityPropertyOnSolution} assumptions were wrong. * @param originalSolution never null * @param cloneSolution never null */
Fails fast if <code>#isFieldAnEntityPropertyOnSolution</code> assumptions were wrong
validateCloneSolution
{ "repo_name": "elsam/drools-planner-old", "path": "drools-planner-core/src/main/java/org/drools/planner/core/domain/solution/cloner/FieldAccessingSolutionCloner.java", "license": "apache-2.0", "size": 16245 }
[ "org.drools.planner.core.domain.common.PropertyAccessor" ]
import org.drools.planner.core.domain.common.PropertyAccessor;
import org.drools.planner.core.domain.common.*;
[ "org.drools.planner" ]
org.drools.planner;
1,631,795
public static RowProjector compile(StatementContext context, SelectStatement statement, GroupBy groupBy, List<? extends PDatum> targetColumns) throws SQLException { List<KeyValueColumnExpression> arrayKVRefs = new ArrayList<KeyValueColumnExpression>(); List<Expression> arrayKVFuncs = new ArrayList<E...
static RowProjector function(StatementContext context, SelectStatement statement, GroupBy groupBy, List<? extends PDatum> targetColumns) throws SQLException { List<KeyValueColumnExpression> arrayKVRefs = new ArrayList<KeyValueColumnExpression>(); List<Expression> arrayKVFuncs = new ArrayList<Expression>(); List<Aliased...
/** * Builds the projection for the scan * @param context query context kept between compilation of different query clauses * @param statement TODO * @param groupBy compiled GROUP BY clause * @param targetColumns list of columns, parallel to aliasedNodes, that are being set for an * UPSERT...
Builds the projection for the scan
compile
{ "repo_name": "jffnothing/phoenix-4.0.0-incubating", "path": "phoenix-core/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java", "license": "apache-2.0", "size": 31416 }
[ "com.google.common.collect.Lists", "java.sql.SQLException", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.NavigableSet", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.util.Bytes", "org.apache.phoenix.compile.GroupByCompiler", "org.apache.phoenix.expression....
import com.google.common.collect.Lists; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.NavigableSet; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.compile.GroupByCompiler; import o...
import com.google.common.collect.*; import java.sql.*; import java.util.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.apache.phoenix.compile.*; import org.apache.phoenix.expression.*; import org.apache.phoenix.parse.*; import org.apache.phoenix.schema.*; import org.apache...
[ "com.google.common", "java.sql", "java.util", "org.apache.hadoop", "org.apache.phoenix" ]
com.google.common; java.sql; java.util; org.apache.hadoop; org.apache.phoenix;
749,233
public void setRandom(SecureRandom random) { this.random = random; }
void function(SecureRandom random) { this.random = random; }
/** * Sets random. * * @param random the random */
Sets random
setRandom
{ "repo_name": "forsrc/MyStudy", "path": "src/main/java/com/forsrc/utils/MyRsaUtils.java", "license": "apache-2.0", "size": 16784 }
[ "java.security.SecureRandom" ]
import java.security.SecureRandom;
import java.security.*;
[ "java.security" ]
java.security;
103,030
protected ListSelectionListener createListSelectionListener() { return new ListSelectionHandler(); }
ListSelectionListener function() { return new ListSelectionHandler(); }
/** * Creates and returns the list selection listener for this UI. * * @return the list selection listener for this UI */
Creates and returns the list selection listener for this UI
createListSelectionListener
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/javax/swing/plaf/basic/BasicListUI.java", "license": "gpl-2.0", "size": 46124 }
[ "javax.swing.event.ListSelectionListener" ]
import javax.swing.event.ListSelectionListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
561,066
public static Path writePolicyFile(Path filename, PolicySetType policySet) { JAXBElement<PolicySetType> policySetElement = new ObjectFactory().createPolicySet(policySet); try { JAXBContext context = JAXBContext.newInstance(PolicySetType.class); Marshaller m = context.createMa...
static Path function(Path filename, PolicySetType policySet) { JAXBElement<PolicySetType> policySetElement = new ObjectFactory().createPolicySet(policySet); try { JAXBContext context = JAXBContext.newInstance(PolicySetType.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT...
/** * Helper static class that does the work to write a policy set to a file on disk. */
Helper static class that does the work to write a policy set to a file on disk
writePolicyFile
{ "repo_name": "dash-/apache-openaz", "path": "openaz-xacml/src/main/java/org/apache/openaz/xacml/util/XACMLPolicyWriter.java", "license": "apache-2.0", "size": 4763 }
[ "java.nio.file.Files", "java.nio.file.Path", "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBElement", "javax.xml.bind.JAXBException", "javax.xml.bind.Marshaller" ]
import java.nio.file.Files; import java.nio.file.Path; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller;
import java.nio.file.*; import javax.xml.bind.*;
[ "java.nio", "javax.xml" ]
java.nio; javax.xml;
1,534,620
public CloudSyncPage signInToAlfrescoInTheCloud(WebDrone drone, String cloudUserName, String password) { CloudSyncPage cloudSyncPage = navigateToCloudSync(drone); if (cloudSyncPage.isDisconnectButtonDisplayed()) { cloudSyncPage = cloudSyncPage.disconnectCloudAccount()....
CloudSyncPage function(WebDrone drone, String cloudUserName, String password) { CloudSyncPage cloudSyncPage = navigateToCloudSync(drone); if (cloudSyncPage.isDisconnectButtonDisplayed()) { cloudSyncPage = cloudSyncPage.disconnectCloudAccount().render(); } CloudSignInPage cloudSignInPage = cloudSyncPage.selectCloudSign(...
/** * Method to Set Up Cloud sync by admin and returns CloudSyncPage * * @param drone * @param cloudUserName * @param password * @return CloudSyncPage */
Method to Set Up Cloud sync by admin and returns CloudSyncPage
signInToAlfrescoInTheCloud
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/qa-share/src/main/java/org/alfresco/share/util/AbstractCloudSyncTest.java", "license": "lgpl-3.0", "size": 30423 }
[ "org.alfresco.po.share.user.CloudSignInPage", "org.alfresco.po.share.user.CloudSyncPage", "org.alfresco.webdrone.WebDrone" ]
import org.alfresco.po.share.user.CloudSignInPage; import org.alfresco.po.share.user.CloudSyncPage; import org.alfresco.webdrone.WebDrone;
import org.alfresco.po.share.user.*; import org.alfresco.webdrone.*;
[ "org.alfresco.po", "org.alfresco.webdrone" ]
org.alfresco.po; org.alfresco.webdrone;
2,562,899
protected final ByteBuf newDirectBuffer(Object holder, ByteBuf buf) { final int readableBytes = buf.readableBytes(); if (readableBytes == 0) { ReferenceCountUtil.release(holder); return Unpooled.EMPTY_BUFFER; } final ByteBufAllocator alloc = alloc(); ...
final ByteBuf function(Object holder, ByteBuf buf) { final int readableBytes = buf.readableBytes(); if (readableBytes == 0) { ReferenceCountUtil.release(holder); return Unpooled.EMPTY_BUFFER; } final ByteBufAllocator alloc = alloc(); if (alloc.isDirectBufferPooled()) { return newDirectBuffer0(holder, buf, alloc, readab...
/** * Returns an off-heap copy of the specified {@link ByteBuf}, and releases the specified holder. * The caller must ensure that the holder releases the original {@link ByteBuf} when the holder is released by * this method. */
Returns an off-heap copy of the specified <code>ByteBuf</code>, and releases the specified holder. The caller must ensure that the holder releases the original <code>ByteBuf</code> when the holder is released by this method
newDirectBuffer
{ "repo_name": "NiteshKant/netty", "path": "transport-native-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java", "license": "apache-2.0", "size": 29755 }
[ "io.netty.buffer.ByteBuf", "io.netty.buffer.ByteBufAllocator", "io.netty.buffer.ByteBufUtil", "io.netty.buffer.Unpooled", "io.netty.util.ReferenceCountUtil" ]
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufAllocator; import io.netty.buffer.ByteBufUtil; import io.netty.buffer.Unpooled; import io.netty.util.ReferenceCountUtil;
import io.netty.buffer.*; import io.netty.util.*;
[ "io.netty.buffer", "io.netty.util" ]
io.netty.buffer; io.netty.util;
1,187,308
protected static Clustering kMeans(int k, Cluster[] centers, List<? extends Cluster> data) { assert (centers.length == k); assert (k > 0); int dimensions = centers[0].getCenter().length; ArrayList<ArrayList<Cluster>> clustering = new ArrayList<ArrayList<Cluster>>(); for (in...
static Clustering function(int k, Cluster[] centers, List<? extends Cluster> data) { assert (centers.length == k); assert (k > 0); int dimensions = centers[0].getCenter().length; ArrayList<ArrayList<Cluster>> clustering = new ArrayList<ArrayList<Cluster>>(); for (int i = 0; i < k; i++) { clustering.add(new ArrayList<Cl...
/** * (The Actual Algorithm) k-means of (micro)clusters, with specified initialization points. * * @param k * @param centers - initial centers * @param data * @return (macro)clustering - SphereClusters */
(The Actual Algorithm) k-means of (micro)clusters, with specified initialization points
kMeans
{ "repo_name": "serianon/dsmoa", "path": "Service/src/main/java/de/hsrm/derns002/dsmoa/service/dsm/algorithms/MyWithKmeans.java", "license": "gpl-3.0", "size": 14406 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
428,258
public static Object getDataBasedOnDataType(String data, DataType actualDataType) { if (null == data || CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(data)) { return null; } try { switch (actualDataType) { case INT: if (data.isEmpty()) { return null; }...
static Object function(String data, DataType actualDataType) { if (null == data CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(data)) { return null; } try { switch (actualDataType) { case INT: if (data.isEmpty()) { return null; } return Integer.parseInt(data); case SHORT: if (data.isEmpty()) { return null; } return Sh...
/** * Below method will be used to convert the data passed to its actual data * type * * @param data data * @param actualDataType actual data type * @return actual data after conversion */
Below method will be used to convert the data passed to its actual data type
getDataBasedOnDataType
{ "repo_name": "ksimar/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java", "license": "apache-2.0", "size": 24598 }
[ "java.math.BigDecimal", "java.text.ParseException", "java.util.Date", "org.apache.carbondata.core.constants.CarbonCommonConstants", "org.apache.carbondata.core.metadata.datatype.DataType", "org.apache.spark.unsafe.types.UTF8String" ]
import java.math.BigDecimal; import java.text.ParseException; import java.util.Date; import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.metadata.datatype.DataType; import org.apache.spark.unsafe.types.UTF8String;
import java.math.*; import java.text.*; import java.util.*; import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.metadata.datatype.*; import org.apache.spark.unsafe.types.*;
[ "java.math", "java.text", "java.util", "org.apache.carbondata", "org.apache.spark" ]
java.math; java.text; java.util; org.apache.carbondata; org.apache.spark;
182,243
public void subtreeModified(Node rootOfModifications) { handleSubtreeModified(rootOfModifications); }
void function(Node rootOfModifications) { handleSubtreeModified(rootOfModifications); }
/** * A subtree of the CSSNavigableDocument tree has been modified * in some way. */
A subtree of the CSSNavigableDocument tree has been modified in some way
subtreeModified
{ "repo_name": "apache/batik", "path": "batik-css/src/main/java/org/apache/batik/css/engine/CSSEngine.java", "license": "apache-2.0", "size": 90735 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,934,171
public void notifyPanelClosed(OverlayPanel panel, @StateChangeReason int reason) { // TODO(mdjones): Close should behave like "requestShowPanel". The reason it currently does // not is because closing will cancel animation for that panel. This method waits for the // panel's "onClosed" event...
void function(OverlayPanel panel, @StateChangeReason int reason) { if (panel == null) return; if (reason == StateChangeReason.PANEL_SUPPRESS) { if (mActivePanel == panel) { if (mActivePanel.canBeSuppressed()) { mSuppressedPanels.add(mActivePanel); } mActivePanel = mPendingPanel; peekPanel(mActivePanel, mPendingReason);...
/** * Notify the manager that some other object hid the panel. * NOTE(mdjones): It is possible that a panel other than the one currently showing was hidden. * @param panel The panel that was closed. */
Notify the manager that some other object hid the panel. NOTE(mdjones): It is possible that a panel other than the one currently showing was hidden
notifyPanelClosed
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelManager.java", "license": "bsd-3-clause", "size": 9593 }
[ "org.chromium.chrome.browser.compositor.bottombar.OverlayPanel" ]
import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel;
import org.chromium.chrome.browser.compositor.bottombar.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
952,845
public static IAST Distributed(final IExpr x, final IAST distribution) { return new AST2(Distributed, x, distribution); }
static IAST function(final IExpr x, final IAST distribution) { return new AST2(Distributed, x, distribution); }
/** * Create a <code>Distributed(x, &lt;distribution&gt;)</code> AST. * * @param x * @param distribution * @return */
Create a <code>Distributed(x, &lt;distribution&gt;)</code> AST
Distributed
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java", "license": "gpl-3.0", "size": 283472 }
[ "org.matheclipse.core.interfaces.IExpr" ]
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
140,763
private SubjectConfirmationData createSubjectConfirmationData(X509Certificate certificate, PublicKey publicKey) throws Exception { SubjectConfirmationData subjectConfirmationData = (SubjectConfirmationData) createOpenSAMLObject(SubjectConfirmationData.DEFAULT_ELEMENT_NAME); subjectConfirmat...
SubjectConfirmationData function(X509Certificate certificate, PublicKey publicKey) throws Exception { SubjectConfirmationData subjectConfirmationData = (SubjectConfirmationData) createOpenSAMLObject(SubjectConfirmationData.DEFAULT_ELEMENT_NAME); subjectConfirmationData.getUnknownXMLObjects().add(getKeyInfo(certificate,...
/** * Creates the subject confirmation data. * * @param certificate the certificate * @param publicKey the public key * @return the subject confirmation data * @throws Exception the exception */
Creates the subject confirmation data
createSubjectConfirmationData
{ "repo_name": "AurionProject/Aurion", "path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/callback/openSAML/OpenSAML2ComponentBuilder.java", "license": "bsd-3-clause", "size": 33078 }
[ "java.security.PublicKey", "java.security.cert.X509Certificate", "org.opensaml.saml2.core.SubjectConfirmationData" ]
import java.security.PublicKey; import java.security.cert.X509Certificate; import org.opensaml.saml2.core.SubjectConfirmationData;
import java.security.*; import java.security.cert.*; import org.opensaml.saml2.core.*;
[ "java.security", "org.opensaml.saml2" ]
java.security; org.opensaml.saml2;
2,262,392
protected FileDescriptor getFileDescriptor() { return fd; }
FileDescriptor function() { return fd; }
/** * Gets the {@code FileDescriptor} of this datagram socket, which is invalid * if the socket is closed or not bound. * * @return the current file descriptor of this socket. */
Gets the FileDescriptor of this datagram socket, which is invalid if the socket is closed or not bound
getFileDescriptor
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/java/net/DatagramSocketImpl.java", "license": "gpl-3.0", "size": 10636 }
[ "java.io.FileDescriptor" ]
import java.io.FileDescriptor;
import java.io.*;
[ "java.io" ]
java.io;
1,647,559
public void setIdAttributeNode(Attr attr, boolean isId) throws DOMException { }
void function(Attr attr, boolean isId) throws DOMException { }
/** * Sets an attribute, specified by the object. */
Sets an attribute, specified by the object
setIdAttributeNode
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/xml/QAttributedNode.java", "license": "gpl-2.0", "size": 9784 }
[ "org.w3c.dom.Attr", "org.w3c.dom.DOMException" ]
import org.w3c.dom.Attr; import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,904,181
private boolean checkAllPathsWithoutBackEdges(DiGraphNode<N, E> a, DiGraphNode<N, E> b) { if (nodePredicate.apply(a.getValue()) && (inclusive || (a != start && a != end))) { return true; } if (a == b) { return false; } for (DiGraphEdge<N, E> e : a.getOutEdges()) { /...
boolean function(DiGraphNode<N, E> a, DiGraphNode<N, E> b) { if (nodePredicate.apply(a.getValue()) && (inclusive (a != start && a != end))) { return true; } if (a == b) { return false; } for (DiGraphEdge<N, E> e : a.getOutEdges()) { if (e.getAnnotation() == VISITED_EDGE) { continue; } e.setAnnotation(VISITED_EDGE); if ...
/** * Verify that all non-looping paths from {@code a} to {@code b} pass * through at least one node where {@code nodePredicate} is true. */
Verify that all non-looping paths from a to b pass through at least one node where nodePredicate is true
checkAllPathsWithoutBackEdges
{ "repo_name": "robbert/closure-compiler", "path": "src/com/google/javascript/jscomp/CheckPathsBetweenNodes.java", "license": "apache-2.0", "size": 7366 }
[ "com.google.javascript.jscomp.graph.DiGraph" ]
import com.google.javascript.jscomp.graph.DiGraph;
import com.google.javascript.jscomp.graph.*;
[ "com.google.javascript" ]
com.google.javascript;
97,256
public void editEntry(JSONObject jObj) { messageContrll(Constants.JSON_REQUEST_EDIT, jObj); }
void function(JSONObject jObj) { messageContrll(Constants.JSON_REQUEST_EDIT, jObj); }
/** * Edit scanned entry in database by sending encoded JSONObject to * myHealthHub with Edit-Request */
Edit scanned entry in database by sending encoded JSONObject to myHealthHub with Edit-Request
editEntry
{ "repo_name": "kleinl/BarcodeScannerWidget_addOn-master", "path": "app/src/main/java/com/ess/tudarmstadt/de/mwidgetexample/comm/CommBroadcastReceiver.java", "license": "gpl-3.0", "size": 9205 }
[ "com.ess.tudarmstadt.de.mwidgetexample.utils.Constants", "org.json.JSONObject" ]
import com.ess.tudarmstadt.de.mwidgetexample.utils.Constants; import org.json.JSONObject;
import com.ess.tudarmstadt.de.mwidgetexample.utils.*; import org.json.*;
[ "com.ess.tudarmstadt", "org.json" ]
com.ess.tudarmstadt; org.json;
1,899,097
List<ScoreboardElement> getElements(Player player);
List<ScoreboardElement> getElements(Player player);
/** * Gets the list of ScoreboardElements that are tracked for this player */
Gets the list of ScoreboardElements that are tracked for this player
getElements
{ "repo_name": "t7seven7t/ViewIt", "path": "ViewItPlugin/src/main/java/net/t7seven7t/viewit/scoreboard/ScoreboardService.java", "license": "apache-2.0", "size": 4429 }
[ "java.util.List", "org.bukkit.entity.Player" ]
import java.util.List; import org.bukkit.entity.Player;
import java.util.*; import org.bukkit.entity.*;
[ "java.util", "org.bukkit.entity" ]
java.util; org.bukkit.entity;
1,353,734
@Override public final Element getDocumentElement() { int dochandle=dtm.getDocument(); int elementhandle=DTM.NULL; for(int kidhandle=dtm.getFirstChild(dochandle); kidhandle!=DTM.NULL; kidhandle=dtm.getN...
final Element function() { int dochandle=dtm.getDocument(); int elementhandle=DTM.NULL; for(int kidhandle=dtm.getFirstChild(dochandle); kidhandle!=DTM.NULL; kidhandle=dtm.getNextSibling(kidhandle)) { switch(dtm.getNodeType(kidhandle)) { case Node.ELEMENT_NODE: if(elementhandle!=DTM.NULL) { elementhandle=DTM.NULL; kidha...
/** This is a bit of a problem in DTM, since a DTM may be a Document * Fragment and hence not have a clear-cut Document Element. We can * make it work in the well-formed cases but would that be confusing for others? * * * @see org.w3c.dom.Document */
This is a bit of a problem in DTM, since a DTM may be a Document Fragment and hence not have a clear-cut Document Element. We can make it work in the well-formed cases but would that be confusing for others
getDocumentElement
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java", "license": "apache-2.0", "size": 66767 }
[ "com.sun.org.apache.xml.internal.dtm.DTMDOMException", "org.w3c.dom.DOMException", "org.w3c.dom.Element", "org.w3c.dom.Node" ]
import com.sun.org.apache.xml.internal.dtm.DTMDOMException; import org.w3c.dom.DOMException; import org.w3c.dom.Element; import org.w3c.dom.Node;
import com.sun.org.apache.xml.internal.dtm.*; import org.w3c.dom.*;
[ "com.sun.org", "org.w3c.dom" ]
com.sun.org; org.w3c.dom;
567,889
public static void error( final Logger logger, final String type, final int version, final @Nullable Ident ident, final Object... args) { logger.error(buildLogLine(type, version, ident, args)); }
static void function( final Logger logger, final String type, final int version, final @Nullable Ident ident, final Object... args) { logger.error(buildLogLine(type, version, ident, args)); }
/** * Generate a new error log message according to the Spotify log format. * * @see LoggingSupport#debug for parameter descriptions. */
Generate a new error log message according to the Spotify log format
error
{ "repo_name": "spotify/logging-java", "path": "src/main/java/com/spotify/logging/LoggingSupport.java", "license": "apache-2.0", "size": 6202 }
[ "javax.annotation.Nullable", "org.slf4j.Logger" ]
import javax.annotation.Nullable; import org.slf4j.Logger;
import javax.annotation.*; import org.slf4j.*;
[ "javax.annotation", "org.slf4j" ]
javax.annotation; org.slf4j;
278,001
public final class ForteF77Compiler extends GccCompatibleCCompiler { private static final ForteF77Compiler instance = new ForteF77Compiler("f77"); public static ForteF77Compiler getInstance() { return instance; } private String identifier; private File[] includePath; private Fo...
final class ForteF77Compiler extends GccCompatibleCCompiler { private static final ForteF77Compiler instance = new ForteF77Compiler("f77"); public static ForteF77Compiler function() { return instance; } private String identifier; private File[] includePath; private ForteF77Compiler(String command) { super(command, "-V"...
/** * Gets singleton instance of this class */
Gets singleton instance of this class
getInstance
{ "repo_name": "1spatial/cpptasks-parallel", "path": "src/main/java/net/sf/antcontrib/cpptasks/sun/ForteF77Compiler.java", "license": "apache-2.0", "size": 3007 }
[ "java.io.File", "net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler" ]
import java.io.File; import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler;
import java.io.*; import net.sf.antcontrib.cpptasks.gcc.*;
[ "java.io", "net.sf.antcontrib" ]
java.io; net.sf.antcontrib;
2,464,781
public DataNode setWavelength_error(IDataset wavelength_error);
DataNode function(IDataset wavelength_error);
/** * wavelength standard deviation * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_WAVELENGTH * </p> * * @param wavelength_error the wavelength_error */
wavelength standard deviation Type: NX_FLOAT Units: NX_WAVELENGTH
setWavelength_error
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXmonochromator.java", "license": "epl-1.0", "size": 8669 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode", "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*;
[ "org.eclipse.dawnsci", "org.eclipse.january" ]
org.eclipse.dawnsci; org.eclipse.january;
334,010
boolean hasLocation(Location location); /** * Returns a {@linkplain JavaFileObject file object} for input * representing the specified class of the specified kind in the * given location. * * @param location a location * @param className the name of a class * @param kind the ...
boolean hasLocation(Location location); /** * Returns a {@linkplain JavaFileObject file object} for input * representing the specified class of the specified kind in the * given location. * * @param location a location * @param className the name of a class * @param kind the kind of file, must be one of { * JavaFileObj...
/** * Determines if a location is known to this file manager. * * @param location a location * @return true if the location is known */
Determines if a location is known to this file manager
hasLocation
{ "repo_name": "shelan/jdk9-mirror", "path": "langtools/src/java.compiler/share/classes/javax/tools/JavaFileManager.java", "license": "gpl-2.0", "size": 17615 }
[ "javax.tools.JavaFileObject" ]
import javax.tools.JavaFileObject;
import javax.tools.*;
[ "javax.tools" ]
javax.tools;
1,222,430
protected void release(Session session) { if ( session != null && session.isOpen() ) { try { session.close(); } catch( Throwable ignore ) { } } }
void function(Session session) { if ( session != null && session.isOpen() ) { try { session.close(); } catch( Throwable ignore ) { } } }
/** * Used to release a {@link #getSessionUnderTest fixture session}. * Overridden to perform session releasing/testing specific to the given * config scenario being tested. * * @param session The session to be released. */
Used to release a <code>#getSessionUnderTest fixture session</code>. Overridden to perform session releasing/testing specific to the given config scenario being tested
release
{ "repo_name": "cacheonix/cacheonix-core", "path": "3rdparty/hibernate-3.2/test/org/hibernate/test/connections/ConnectionManagementTestCase.java", "license": "lgpl-2.1", "size": 7770 }
[ "org.hibernate.Session" ]
import org.hibernate.Session;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
596,905
private Value getSpellCheckedStatement() { String v = null; if (spellSuggestion != null) { try { v = spellSuggestion.getSuggestion(); } catch (IOException e) { log.warn("Spell checking failed", e); } ...
Value function() { String v = null; if (spellSuggestion != null) { try { v = spellSuggestion.getSuggestion(); } catch (IOException e) { log.warn(STR, e); } } if (v != null) { return valueFactory.createValue(v); } else { return null; } } }
/** * Returns the spell checked string of the first relation query node * with a spellcheck operation. * * @return a StringValue or <code>null</code> if the spell checker * thinks the words are spelled correctly. This method also * returns <code>null...
Returns the spell checked string of the first relation query node with a spellcheck operation
getSpellCheckedStatement
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java", "license": "apache-2.0", "size": 27684 }
[ "java.io.IOException", "javax.jcr.Value" ]
import java.io.IOException; import javax.jcr.Value;
import java.io.*; import javax.jcr.*;
[ "java.io", "javax.jcr" ]
java.io; javax.jcr;
734,618
protected List<Configuration> getConfigurations() { if (configurations == null) { configurations = new ArrayList<>(); } return configurations; } /** * Adds a {@link ConfigurationHeader}. * <p> * It will be printed as: * <pre> * |\t{name} * ...
List<Configuration> function() { if (configurations == null) { configurations = new ArrayList<>(); } return configurations; } /** * Adds a {@link ConfigurationHeader}. * <p> * It will be printed as: * <pre> * \t{name} * </pre> * * @param name The name of the {@link ConfigurationHeader}
/** * Gets the {@link Configuration} to print. * * @return The {@link Configuration} to print. * @since 1.3.0 */
Gets the <code>Configuration</code> to print
getConfigurations
{ "repo_name": "stzilli/kapua", "path": "commons/src/main/java/org/eclipse/kapua/commons/util/log/ConfigurationPrinter.java", "license": "epl-1.0", "size": 16569 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,844,651
Ignite ig = startGrid(); IgniteCache<Map.Entry<Integer, Integer>, Long> cache = ig.getOrCreateCache(DEFAULT_CACHE_NAME);
Ignite ig = startGrid(); IgniteCache<Map.Entry<Integer, Integer>, Long> cache = ig.getOrCreateCache(DEFAULT_CACHE_NAME);
/** * Check correct Map.Entry serialization key on local get/put operation. * https://issues.apache.org/jira/browse/IGNITE-10290 * * @throws Exception If failed. */
Check correct Map.Entry serialization key on local get/put operation. HREF
test
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheLocalGetSerializationTest.java", "license": "apache-2.0", "size": 2192 }
[ "java.util.Map", "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCache" ]
import java.util.Map; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache;
import java.util.*; import org.apache.ignite.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,024,435
public OneResponse enable(boolean enable) { return enable(client, id, enable); }
OneResponse function(boolean enable) { return enable(client, id, enable); }
/** * Enables or disables the datastore. * * @param enable True for enabling, false for disabling. * @return If successful the message contains the datastore id. */
Enables or disables the datastore
enable
{ "repo_name": "spirit03/one", "path": "src/oca/java/src/org/opennebula/client/datastore/Datastore.java", "license": "apache-2.0", "size": 16201 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
486,605
// [TARGET put(FullEntity...)] // [VARIABLE "my_key_name1"] // [VARIABLE "my_key_name2"] public void batchPutEntities(String keyName1, String keyName2) { // [START batchPutEntities] Key key1 = datastore.newKeyFactory().setKind("MyKind").newKey(keyName1); Entity.Builder entityBuilder1 = Entity.newBui...
void function(String keyName1, String keyName2) { Key key1 = datastore.newKeyFactory().setKind(STR).newKey(keyName1); Entity.Builder entityBuilder1 = Entity.newBuilder(key1); entityBuilder1.set(STR, STR); Entity entity1 = entityBuilder1.build(); Key key2 = datastore.newKeyFactory().setKind(STR).newKey(keyName2); Entity...
/** * Example of putting multiple entities. */
Example of putting multiple entities
batchPutEntities
{ "repo_name": "shinfan/gcloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/DatastoreSnippets.java", "license": "apache-2.0", "size": 12211 }
[ "com.google.cloud.datastore.Entity", "com.google.cloud.datastore.Key" ]
import com.google.cloud.datastore.Entity; import com.google.cloud.datastore.Key;
import com.google.cloud.datastore.*;
[ "com.google.cloud" ]
com.google.cloud;
660,408
protected List<Pair<VM, VmDevice>> getVmsWithVmDeviceInfoForDiskId() { if (cachedVmsDeviceInfo == null) { cachedVmsDeviceInfo = getVmDao().getVmsWithPlugInfo(getImage().getId()); } return cachedVmsDeviceInfo; }
List<Pair<VM, VmDevice>> function() { if (cachedVmsDeviceInfo == null) { cachedVmsDeviceInfo = getVmDao().getVmsWithPlugInfo(getImage().getId()); } return cachedVmsDeviceInfo; }
/** * Cache method to retrieve all the VMs with the device info related to the image */
Cache method to retrieve all the VMs with the device info related to the image
getVmsWithVmDeviceInfoForDiskId
{ "repo_name": "jtux270/translate", "path": "ovirt/3.6_source/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java", "license": "gpl-3.0", "size": 21593 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.VmDevice", "org.ovirt.engine.core.common.utils.Pair" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.VmDevice; import org.ovirt.engine.core.common.utils.Pair;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.common.utils.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
1,836,866
EAttribute getEventTransformation_TypeName();
EAttribute getEventTransformation_TypeName();
/** * Returns the meta object for the attribute '{@link com.odcgroup.page.transformmodel.EventTransformation#getTypeName <em>Type Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Type Name</em>'. * @see com.odcgroup.page.transformmodel.EventTransf...
Returns the meta object for the attribute '<code>com.odcgroup.page.transformmodel.EventTransformation#getTypeName Type Name</code>'.
getEventTransformation_TypeName
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/page/core/com.odcgroup.page.transformmodel/src/generated/java/com/odcgroup/page/transformmodel/TransformModelPackage.java", "license": "epl-1.0", "size": 69832 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,975,682
public void resetLastNodeOutputImage() { ImageOpNode node = getLastNode(); if (node != null) { node.setParam(Param.OUTPUT_IMG, null); } }
void function() { ImageOpNode node = getLastNode(); if (node != null) { node.setParam(Param.OUTPUT_IMG, null); } }
/** * Allow to remove the preprocessing cache * * @param imgSource */
Allow to remove the preprocessing cache
resetLastNodeOutputImage
{ "repo_name": "mischwarz/Weasis", "path": "weasis-core/weasis-core-api/src/main/java/org/weasis/core/api/image/SimpleOpManager.java", "license": "epl-1.0", "size": 8177 }
[ "org.weasis.core.api.image.ImageOpNode" ]
import org.weasis.core.api.image.ImageOpNode;
import org.weasis.core.api.image.*;
[ "org.weasis.core" ]
org.weasis.core;
1,299,407
public FinderReturn findByVenOrderItemContactDetailLikeFR(VenOrderItemContactDetail venOrderItemContactDetail, JPQLAdvancedQueryCriteria criteria, int firstResult, int maxResults);
FinderReturn function(VenOrderItemContactDetail venOrderItemContactDetail, JPQLAdvancedQueryCriteria criteria, int firstResult, int maxResults);
/** * findByVenOrderItemContactDetail>LikeFR - finds a list of VenOrderItemContactDetail> Like with a finder return object * * @param venOrderItemContactDetail * @return the list of VenOrderItemContactDetail found */
findByVenOrderItemContactDetail>LikeFR - finds a list of VenOrderItemContactDetail> Like with a finder return object
findByVenOrderItemContactDetailLikeFR
{ "repo_name": "yauritux/venice-legacy", "path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/VenOrderItemContactDetailSessionEJBRemote.java", "license": "apache-2.0", "size": 3214 }
[ "com.djarum.raf.utilities.JPQLAdvancedQueryCriteria", "com.gdn.venice.facade.finder.FinderReturn", "com.gdn.venice.persistence.VenOrderItemContactDetail" ]
import com.djarum.raf.utilities.JPQLAdvancedQueryCriteria; import com.gdn.venice.facade.finder.FinderReturn; import com.gdn.venice.persistence.VenOrderItemContactDetail;
import com.djarum.raf.utilities.*; import com.gdn.venice.facade.finder.*; import com.gdn.venice.persistence.*;
[ "com.djarum.raf", "com.gdn.venice" ]
com.djarum.raf; com.gdn.venice;
1,678,240
private void expire( LocalDateTime expires ) { if( evicted == null ) { // No notification so use the simple method of expiry map.values(). removeIf( e -> e.isBefore( expires ) ); } else { // As we need to notify we'll have to do it ...
void function( LocalDateTime expires ) { if( evicted == null ) { map.values(). removeIf( e -> e.isBefore( expires ) ); } else { Iterator<Map.Entry<K, CacheEntry<K, V>>> it = map.entrySet().iterator(); while( it.hasNext() ) { Map.Entry<K, CacheEntry<K, V>> e = it.next(); if( e.getValue().isBefore( expires ) ) { it.remov...
/** * Expires all entries that were inserted before expires * <p> * @param expires LocalDateTime marking point entries are removed */
Expires all entries that were inserted before expires
expire
{ "repo_name": "peter-mount/opendata-common", "path": "cluster/src/main/java/uk/trainwatch/util/cache/Cache.java", "license": "apache-2.0", "size": 16572 }
[ "java.time.LocalDateTime", "java.util.Iterator", "java.util.Map" ]
import java.time.LocalDateTime; import java.util.Iterator; import java.util.Map;
import java.time.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
1,212,390
public final static DateFormat getDateInstance() { return get(DEFAULT, -1, ULocale.getDefault(Category.FORMAT)); }
final static DateFormat function() { return get(DEFAULT, -1, ULocale.getDefault(Category.FORMAT)); }
/** * Returns the date formatter with the default formatting style * for the default <code>FORMAT</code> locale. * @return a date formatter. * @see Category#FORMAT * @stable ICU 2.0 */
Returns the date formatter with the default formatting style for the default <code>FORMAT</code> locale
getDateInstance
{ "repo_name": "Miracle121/quickdic-dictionary.dictionary", "path": "jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/text/DateFormat.java", "license": "apache-2.0", "size": 83832 }
[ "com.ibm.icu.util.ULocale" ]
import com.ibm.icu.util.ULocale;
import com.ibm.icu.util.*;
[ "com.ibm.icu" ]
com.ibm.icu;
1,227,673
@SuppressWarnings({"unused", "PMD.UnusedPrivateMethod" }) private void setFactorValues(final Set<AbstractFactorValue> factorValuesVal) { this.factorValues = factorValuesVal; } /** * {@inheritDoc}
@SuppressWarnings({STR, STR }) void function(final Set<AbstractFactorValue> factorValuesVal) { this.factorValues = factorValuesVal; } /** * {@inheritDoc}
/** * Sets the factorValues. * * @param factorValuesVal * the factorValues */
Sets the factorValues
setFactorValues
{ "repo_name": "NCIP/caarray", "path": "software/caarray-common.jar/src/main/java/gov/nih/nci/caarray/domain/hybridization/Hybridization.java", "license": "bsd-3-clause", "size": 18173 }
[ "gov.nih.nci.caarray.domain.project.AbstractFactorValue", "java.util.Set" ]
import gov.nih.nci.caarray.domain.project.AbstractFactorValue; import java.util.Set;
import gov.nih.nci.caarray.domain.project.*; import java.util.*;
[ "gov.nih.nci", "java.util" ]
gov.nih.nci; java.util;
2,537,330
@Test public void testShortArrayToInt() { final short[] src = new short[]{ (short)0xCDF1, (short)0xF0C1, (short)0x0F12, (short)0x3456, (short)0x7800}; assertEquals(0x00000000, Conversion.shortArrayToInt(src, 0, 0, 0, 0)); assertEquals(0x0000CDF1, Conversion.shortArrayToInt(sr...
void function() { final short[] src = new short[]{ (short)0xCDF1, (short)0xF0C1, (short)0x0F12, (short)0x3456, (short)0x7800}; assertEquals(0x00000000, Conversion.shortArrayToInt(src, 0, 0, 0, 0)); assertEquals(0x0000CDF1, Conversion.shortArrayToInt(src, 0, 0, 0, 1)); assertEquals(0xF0C1CDF1, Conversion.shortArrayToInt...
/** * Tests {@link Conversion#shortArrayToInt(short[], int, int, int, int)}. */
Tests <code>Conversion#shortArrayToInt(short[], int, int, int, int)</code>
testShortArrayToInt
{ "repo_name": "MuShiiii/commons-lang", "path": "src/test/java/org/apache/commons/lang3/ConversionTest.java", "license": "apache-2.0", "size": 100581 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,676,840
@Test public void testCorsPreflightRequestForPuttingEvents(final TestContext ctx) { httpClient.options( String.format("/%s/%s/%s", EventConstants.EVENT_ENDPOINT, "my-tenant", "my-device"), MultiMap.caseInsensitiveMultiMap() .add(HttpHeaders.ORIGIN, CO...
void function(final TestContext ctx) { httpClient.options( String.format(STR, EventConstants.EVENT_ENDPOINT, STR, STR), MultiMap.caseInsensitiveMultiMap() .add(HttpHeaders.ORIGIN, CORS_ORIGIN) .add(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, HttpMethod.PUT.name()), status -> status == HttpURLConnection.HTTP_OK) .setHand...
/** * Verifies that the HTTP adapter returns matching CORS headers in response to a * CORS preflight request for putting an event. * * @param ctx The vert.x test context. */
Verifies that the HTTP adapter returns matching CORS headers in response to a CORS preflight request for putting an event
testCorsPreflightRequestForPuttingEvents
{ "repo_name": "dejanb/hono", "path": "tests/src/test/java/org/eclipse/hono/tests/http/CorsIT.java", "license": "epl-1.0", "size": 5899 }
[ "io.vertx.core.MultiMap", "io.vertx.core.http.HttpHeaders", "io.vertx.core.http.HttpMethod", "io.vertx.ext.unit.TestContext", "java.net.HttpURLConnection", "org.eclipse.hono.util.EventConstants" ]
import io.vertx.core.MultiMap; import io.vertx.core.http.HttpHeaders; import io.vertx.core.http.HttpMethod; import io.vertx.ext.unit.TestContext; import java.net.HttpURLConnection; import org.eclipse.hono.util.EventConstants;
import io.vertx.core.*; import io.vertx.core.http.*; import io.vertx.ext.unit.*; import java.net.*; import org.eclipse.hono.util.*;
[ "io.vertx.core", "io.vertx.ext", "java.net", "org.eclipse.hono" ]
io.vertx.core; io.vertx.ext; java.net; org.eclipse.hono;
1,875,715