method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static BroadcastListener getBroadcastListener() {
return sBroadcastListener;
}
/**
* Set a {@link io.kickflip.sdk.av.BroadcastListener} to be notified on broadcast events.
*
* @param listener a {@link io.kickflip.sdk.av.BroadcastListener} | static BroadcastListener function() { return sBroadcastListener; } /** * Set a {@link io.kickflip.sdk.av.BroadcastListener} to be notified on broadcast events. * * @param listener a {@link io.kickflip.sdk.av.BroadcastListener} | /**
* Get the {@link io.kickflip.sdk.av.BroadcastListener} to be notified on broadcast events.
*/ | Get the <code>io.kickflip.sdk.av.BroadcastListener</code> to be notified on broadcast events | getBroadcastListener | {
"repo_name": "MobileManAG/Moments-Android",
"path": "app/src/main/java/io/kickflip/sdk/Kickflip.java",
"license": "apache-2.0",
"size": 16443
} | [
"io.kickflip.sdk.av.BroadcastListener"
] | import io.kickflip.sdk.av.BroadcastListener; | import io.kickflip.sdk.av.*; | [
"io.kickflip.sdk"
] | io.kickflip.sdk; | 1,629,985 |
CodeContribution generateBeanInstantiation(RuntimeHints runtimeHints); | CodeContribution generateBeanInstantiation(RuntimeHints runtimeHints); | /**
* Return the necessary code to instantiate a bean.
* @param runtimeHints the runtime hints instance to use
* @return a code contribution that provides an initialized bean instance
*/ | Return the necessary code to instantiate a bean | generateBeanInstantiation | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-beans/src/main/java/org/springframework/beans/factory/generator/BeanInstantiationGenerator.java",
"license": "apache-2.0",
"size": 1474
} | [
"org.springframework.aot.generator.CodeContribution",
"org.springframework.aot.hint.RuntimeHints"
] | import org.springframework.aot.generator.CodeContribution; import org.springframework.aot.hint.RuntimeHints; | import org.springframework.aot.generator.*; import org.springframework.aot.hint.*; | [
"org.springframework.aot"
] | org.springframework.aot; | 116,977 |
private void invokeInsn(final int opcode, final Type type,
final Method method) {
String owner = type.getSort() == Type.ARRAY ? type.getDescriptor()
: type.getInternalName();
mv.visitMethodInsn(opcode, owner, method.getName(),
method.getDescriptor());
... | void function(final int opcode, final Type type, final Method method) { String owner = type.getSort() == Type.ARRAY ? type.getDescriptor() : type.getInternalName(); mv.visitMethodInsn(opcode, owner, method.getName(), method.getDescriptor()); } | /**
* Generates an invoke method instruction.
*
* @param opcode
* the instruction's opcode.
* @param type
* the class in which the method is defined.
* @param method
* the method to be invoked.
*/ | Generates an invoke method instruction | invokeInsn | {
"repo_name": "llbit/ow2-asm",
"path": "src/org/objectweb/asm/commons/GeneratorAdapter.java",
"license": "bsd-3-clause",
"size": 50594
} | [
"org.objectweb.asm.Type"
] | import org.objectweb.asm.Type; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 929,301 |
@Deprecated
public void setDefaultDouble(double newDefaultDouble) {
defaultDouble = new Double(newDefaultDouble);
register(new DoubleConverter(defaultDouble), Double.TYPE);
register(new DoubleConverter(defaultDouble), Double.class);
}
@Deprecated
private Float defaultF... | void function(double newDefaultDouble) { defaultDouble = new Double(newDefaultDouble); register(new DoubleConverter(defaultDouble), Double.TYPE); register(new DoubleConverter(defaultDouble), Double.class); } private Float defaultFloat = new Float((float) 0.0); | /**
* Sets the default value for Double conversions.
* @param newDefaultDouble The default Double value
* @deprecated Register replacement converters for Double.TYPE and
* Double.class instead
*/ | Sets the default value for Double conversions | setDefaultDouble | {
"repo_name": "77ilogin/training",
"path": "src/main/java/org/apache/commons/beanutils/ConvertUtilsBean.java",
"license": "apache-2.0",
"size": 37898
} | [
"org.apache.commons.beanutils.converters.DoubleConverter"
] | import org.apache.commons.beanutils.converters.DoubleConverter; | import org.apache.commons.beanutils.converters.*; | [
"org.apache.commons"
] | org.apache.commons; | 487,916 |
IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, int[] stride, int offset, char ordering); | IComplexNDArray createComplex(IComplexNumber[] data, int[] shape, int[] stride, int offset, char ordering); | /**
* Creates a complex ndarray with the specified shape
*
* @param data the data to use with the ndarray
* @param shape the shape of the ndarray
* @param stride the stride for the ndarray
* @param offset the offset of the ndarray
* @return the instance
*/ | Creates a complex ndarray with the specified shape | createComplex | {
"repo_name": "drlebedev/nd4j",
"path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/NDArrayFactory.java",
"license": "apache-2.0",
"size": 43801
} | [
"org.nd4j.linalg.api.complex.IComplexNDArray",
"org.nd4j.linalg.api.complex.IComplexNumber"
] | import org.nd4j.linalg.api.complex.IComplexNDArray; import org.nd4j.linalg.api.complex.IComplexNumber; | import org.nd4j.linalg.api.complex.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 2,762,889 |
@Test
public void embeddable() throws Exception {
scanClasses(JpaEmbeddable.class);
assertThat(applyConcept("jpa2:Embeddable").getStatus(), equalTo(SUCCESS));
store.beginTransaction();
assertThat(query("MATCH (e:Type:Jpa:Embeddable) RETURN e").getColumn("e"), hasItem(typeDescript... | void function() throws Exception { scanClasses(JpaEmbeddable.class); assertThat(applyConcept(STR).getStatus(), equalTo(SUCCESS)); store.beginTransaction(); assertThat(query(STR).getColumn("e"), hasItem(typeDescriptor(JpaEmbeddable.class))); store.commitTransaction(); } | /**
* Verifies the concept "jpa2:Embeddable".
*
* @throws java.io.IOException
* If the test fails.
* @throws com.buschmais.jqassistant.core.analysis.api.AnalysisException
* If the test fails.
*/ | Verifies the concept "jpa2:Embeddable" | embeddable | {
"repo_name": "SMB-TEC/jqassistant",
"path": "plugin/jpa2/src/test/java/com/buschmais/jqassistant/plugin/jpa2/test/Jpa2IT.java",
"license": "gpl-3.0",
"size": 13386
} | [
"com.buschmais.jqassistant.plugin.jpa2.test.set.entity.JpaEmbeddable",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import com.buschmais.jqassistant.plugin.jpa2.test.set.entity.JpaEmbeddable; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import com.buschmais.jqassistant.plugin.jpa2.test.set.entity.*; import org.hamcrest.*; import org.junit.*; | [
"com.buschmais.jqassistant",
"org.hamcrest",
"org.junit"
] | com.buschmais.jqassistant; org.hamcrest; org.junit; | 1,200,957 |
public boolean ensureSomeRegionServersAvailable(final int num)
throws IOException {
boolean startedServer = false;
MiniHBaseCluster hbaseCluster = getMiniHBaseCluster();
for (int i=hbaseCluster.getLiveRegionServerThreads().size(); i<num; ++i) {
LOG.info("Started new server=" + hbaseCluster.sta... | boolean function(final int num) throws IOException { boolean startedServer = false; MiniHBaseCluster hbaseCluster = getMiniHBaseCluster(); for (int i=hbaseCluster.getLiveRegionServerThreads().size(); i<num; ++i) { LOG.info(STR + hbaseCluster.startRegionServer()); startedServer = true; } return startedServer; } | /**
* Make sure that at least the specified number of region servers
* are running
* @param num minimum number of region servers that should be running
* @return true if we started some servers
* @throws IOException
*/ | Make sure that at least the specified number of region servers are running | ensureSomeRegionServersAvailable | {
"repo_name": "amyvmiwei/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 143059
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 898,550 |
public static DMatrixRMaj mult( DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMatrixRMaj outputC,
@Nullable GrowArray<DGrowArray> workArrays ) {
if (A.numCols != B.numRows)
throw new MatrixDimensionException("Inconsistent matrix shapes. " + stringShapes(A, B))... | static DMatrixRMaj function( DMatrixSparseCSC A, DMatrixRMaj B, @Nullable DMatrixRMaj outputC, @Nullable GrowArray<DGrowArray> workArrays ) { if (A.numCols != B.numRows) throw new MatrixDimensionException(STR + stringShapes(A, B)); outputC = reshapeOrDeclare(outputC, A.numRows, B.numCols); if (workArrays == null) workA... | /**
* Performs matrix multiplication. C = A<sup>T</sup>*B
*
* @param A Matrix
* @param B Dense Matrix
* @param outputC Dense Matrix
*/ | Performs matrix multiplication. C = AT*B | mult | {
"repo_name": "lessthanoptimal/ejml",
"path": "main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_MT_DSCC.java",
"license": "apache-2.0",
"size": 9238
} | [
"org.ejml.MatrixDimensionException",
"org.ejml.UtilEjml",
"org.ejml.data.DGrowArray",
"org.ejml.data.DMatrixRMaj",
"org.ejml.data.DMatrixSparseCSC",
"org.jetbrains.annotations.Nullable"
] | import org.ejml.MatrixDimensionException; import org.ejml.UtilEjml; import org.ejml.data.DGrowArray; import org.ejml.data.DMatrixRMaj; import org.ejml.data.DMatrixSparseCSC; import org.jetbrains.annotations.Nullable; | import org.ejml.*; import org.ejml.data.*; import org.jetbrains.annotations.*; | [
"org.ejml",
"org.ejml.data",
"org.jetbrains.annotations"
] | org.ejml; org.ejml.data; org.jetbrains.annotations; | 1,549,461 |
private ArrayList<ILifeCycleListener> getLifeCycleMembers() {
ArrayList<ILifeCycleListener> boxLifeCycleMembers = new ArrayList<ILifeCycleListener>();
// com drivers
for (ComManager comManager : this.connectedComManagers) {
boxLifeCycleMembers.add(comManager);
boxLifeCycleMembers.add(comManager.getComD... | ArrayList<ILifeCycleListener> function() { ArrayList<ILifeCycleListener> boxLifeCycleMembers = new ArrayList<ILifeCycleListener>(); for (ComManager comManager : this.connectedComManagers) { boxLifeCycleMembers.add(comManager); boxLifeCycleMembers.add(comManager.getComDriver()); } return boxLifeCycleMembers; } | /**
* get all members of the lifecycle-process. Used to trigger lifecycle-changes
*
* @return
*/ | get all members of the lifecycle-process. Used to trigger lifecycle-changes | getLifeCycleMembers | {
"repo_name": "organicsmarthome/OSHv4",
"path": "source/osh_core/osh_src/osh/cal/CALManager.java",
"license": "gpl-3.0",
"size": 5364
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 18,987 |
public List<Project> findProjects(CriteriosProject criteria) throws NoConnectionException, BDException, IOException {
init();
return em.findProjects(criteria);
} | List<Project> function(CriteriosProject criteria) throws NoConnectionException, BDException, IOException { init(); return em.findProjects(criteria); } | /** Find projects by the given criteria
*
* @param criteria
* @return
* @throws NoConnectionException
* @throws BDException
*/ | Find projects by the given criteria | findProjects | {
"repo_name": "OurMap/OurMap",
"path": "OurMap/src/com/bnmi/ourmap/control/EasyDelegate.java",
"license": "bsd-3-clause",
"size": 31901
} | [
"com.bnmi.ourmap.model.CriteriosProject",
"com.bnmi.ourmap.model.Project",
"com.inga.exception.BDException",
"com.inga.exception.NoConnectionException",
"java.io.IOException",
"java.util.List"
] | import com.bnmi.ourmap.model.CriteriosProject; import com.bnmi.ourmap.model.Project; import com.inga.exception.BDException; import com.inga.exception.NoConnectionException; import java.io.IOException; import java.util.List; | import com.bnmi.ourmap.model.*; import com.inga.exception.*; import java.io.*; import java.util.*; | [
"com.bnmi.ourmap",
"com.inga.exception",
"java.io",
"java.util"
] | com.bnmi.ourmap; com.inga.exception; java.io; java.util; | 896,398 |
public WallRestoreCommentQuery restoreComment(UserActor actor, int commentId) {
return new WallRestoreCommentQuery(getClient(), actor, commentId);
} | WallRestoreCommentQuery function(UserActor actor, int commentId) { return new WallRestoreCommentQuery(getClient(), actor, commentId); } | /**
* Restores a comment deleted from a user wall or community wall.
*
* @param actor vk actor
* @param commentId Comment ID.
* @return query
*/ | Restores a comment deleted from a user wall or community wall | restoreComment | {
"repo_name": "VKCOM/vk-java-sdk",
"path": "sdk/src/main/java/com/vk/api/sdk/actions/Wall.java",
"license": "mit",
"size": 17618
} | [
"com.vk.api.sdk.client.actors.UserActor",
"com.vk.api.sdk.queries.wall.WallRestoreCommentQuery"
] | import com.vk.api.sdk.client.actors.UserActor; import com.vk.api.sdk.queries.wall.WallRestoreCommentQuery; | import com.vk.api.sdk.client.actors.*; import com.vk.api.sdk.queries.wall.*; | [
"com.vk.api"
] | com.vk.api; | 1,433,531 |
public TrackProgress getTracker() {
return tracker;
} | TrackProgress function() { return tracker; } | /**
* Gets the tracker.
*
* @return the tracker
*/ | Gets the tracker | getTracker | {
"repo_name": "aherbert/GDSC-Core",
"path": "src/main/java/uk/ac/sussex/gdsc/core/clustering/optics/OpticsManager.java",
"license": "gpl-3.0",
"size": 74412
} | [
"uk.ac.sussex.gdsc.core.logging.TrackProgress"
] | import uk.ac.sussex.gdsc.core.logging.TrackProgress; | import uk.ac.sussex.gdsc.core.logging.*; | [
"uk.ac.sussex"
] | uk.ac.sussex; | 1,015,932 |
public AndBuilder<UpperBoundary> literal( BigDecimal literal ) {
return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal)));
} | AndBuilder<UpperBoundary> function( BigDecimal literal ) { return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal))); } | /**
* Define the lower boundary value of a range.
*
* @param literal the literal value;
* @return the constraint builder; never null
*/ | Define the lower boundary value of a range | literal | {
"repo_name": "vhalbert/modeshape",
"path": "modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryBuilder.java",
"license": "apache-2.0",
"size": 126740
} | [
"java.math.BigDecimal",
"org.modeshape.jcr.query.model.Literal"
] | import java.math.BigDecimal; import org.modeshape.jcr.query.model.Literal; | import java.math.*; import org.modeshape.jcr.query.model.*; | [
"java.math",
"org.modeshape.jcr"
] | java.math; org.modeshape.jcr; | 1,939,226 |
private String getFirstComment(int i) throws IOException {
return getComment(i, 0);
} | String function(int i) throws IOException { return getComment(i, 0); } | /**
* Returns the TIFF comment from the first IFD of the first STK file in the
* given series.
*/ | Returns the TIFF comment from the first IFD of the first STK file in the given series | getFirstComment | {
"repo_name": "melissalinkert/bioformats",
"path": "components/formats-gpl/src/loci/formats/in/MetamorphReader.java",
"license": "gpl-2.0",
"size": 75029
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,482,735 |
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
} | Map<String, Object> function() { return this.additionalProperties; } | /**
* Get the additionalProperties property: A pipeline activity.
*
* @return the additionalProperties value.
*/ | Get the additionalProperties property: A pipeline activity | getAdditionalProperties | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-analytics-synapse-artifacts/src/main/java/com/azure/analytics/synapse/artifacts/models/Activity.java",
"license": "mit",
"size": 4748
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 443,193 |
private void buildNamespaceSupport(NamespaceSupport nss, Node node) {
if(node==null || node.getNodeType()!=Node.ELEMENT_NODE)
return;
buildNamespaceSupport( nss, node.getParentNode() );
nss.pushContext();
NamedNodeMap atts = node.getAttributes();
for( int i=0; i... | void function(NamespaceSupport nss, Node node) { if(node==null node.getNodeType()!=Node.ELEMENT_NODE) return; buildNamespaceSupport( nss, node.getParentNode() ); nss.pushContext(); NamedNodeMap atts = node.getAttributes(); for( int i=0; i<atts.getLength(); i++ ) { Attr a = (Attr)atts.item(i); if( "xmlns".equals(a.getPr... | /**
* Recursively visit ancestors and build up {@link NamespaceSupport} oject.
*/ | Recursively visit ancestors and build up <code>NamespaceSupport</code> oject | buildNamespaceSupport | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java",
"license": "mit",
"size": 10089
} | [
"org.w3c.dom.Attr",
"org.w3c.dom.NamedNodeMap",
"org.w3c.dom.Node",
"org.xml.sax.helpers.NamespaceSupport"
] | import org.w3c.dom.Attr; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.xml.sax.helpers.NamespaceSupport; | import org.w3c.dom.*; import org.xml.sax.helpers.*; | [
"org.w3c.dom",
"org.xml.sax"
] | org.w3c.dom; org.xml.sax; | 1,322,088 |
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller<PollResult<AzureFirewallInner>, AzureFirewallInner> beginUpdateTags(
String resourceGroupName, String azureFirewallName, Map<String, String> tags) {
return beginUpdateTagsAsync(resourceGroupName, azureFirewallName, tags).getSyncPoller... | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<AzureFirewallInner>, AzureFirewallInner> function( String resourceGroupName, String azureFirewallName, Map<String, String> tags) { return beginUpdateTagsAsync(resourceGroupName, azureFirewallName, tags).getSyncPoller(); } | /**
* Updates tags of an Azure Firewall resource.
*
* @param resourceGroupName The name of the resource group.
* @param azureFirewallName The name of the Azure Firewall.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws... | Updates tags of an Azure Firewall resource | beginUpdateTags | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java",
"license": "mit",
"size": 72271
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.network.fluent.models.AzureFirewallInner",
"java.util.Map"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.network.fluent.models.AzureFirewallInner; import java.util.Map; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 1,294,354 |
public void startSearch(@Nullable String term, boolean force) {
if (!force && currentSearchTerm.equals(term)) {
return;
}
cancelSearchTask();
currentSearchTerm = term;
if (isBlank(term)) {
clearResults();
return;
}
List<S... | void function(@Nullable String term, boolean force) { if (!force && currentSearchTerm.equals(term)) { return; } cancelSearchTask(); currentSearchTerm = term; if (isBlank(term)) { clearResults(); return; } List<SearchResult> cacheResult = searchResultsCache.get(app.getAppOrSystemLanguageCode() + "-" + term); if (cacheRe... | /**
* Kick off a search, based on a given search term.
* @param term Phrase to search for.
* @param force Whether to "force" starting this search. If the search is not forced, the
* search may be delayed by a small time, so that network requests are not sent
* too ofte... | Kick off a search, based on a given search term | startSearch | {
"repo_name": "SAGROUP2/apps-android-wikipedia",
"path": "app/src/main/java/org/wikipedia/search/SearchResultsFragment.java",
"license": "apache-2.0",
"size": 22269
} | [
"android.os.Message",
"android.support.annotation.Nullable",
"java.util.List"
] | import android.os.Message; import android.support.annotation.Nullable; import java.util.List; | import android.os.*; import android.support.annotation.*; import java.util.*; | [
"android.os",
"android.support",
"java.util"
] | android.os; android.support; java.util; | 1,516,713 |
public javax.servlet.Filter getFilterInstance()
{
return _filterInstance;
} | javax.servlet.Filter function() { return _filterInstance; } | /**
* Gets the filter instance.
*
* @return the filter instance
*/ | Gets the filter instance | getFilterInstance | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/filter/FilterInstanceWrapper.java",
"license": "epl-1.0",
"size": 13839
} | [
"javax.servlet.Filter"
] | import javax.servlet.Filter; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 1,913,314 |
public FieldList getKeys(int id) {
return this.driverKeys[id];
}
| FieldList function(int id) { return this.driverKeys[id]; } | /**
* Gets the key field indexes for the specified driver comparator.
*
* @param id The id of the driver comparator for which the key field indexes are requested.
* @return The key field indexes of the specified driver comparator.
*/ | Gets the key field indexes for the specified driver comparator | getKeys | {
"repo_name": "jinglining/flink",
"path": "flink-optimizer/src/main/java/org/apache/flink/optimizer/plan/SingleInputPlanNode.java",
"license": "apache-2.0",
"size": 8434
} | [
"org.apache.flink.api.common.operators.util.FieldList"
] | import org.apache.flink.api.common.operators.util.FieldList; | import org.apache.flink.api.common.operators.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,791,549 |
EClass getExecutableUnit(); | EClass getExecutableUnit(); | /**
* Returns the meta object for class '{@link org.eclectic.idc.core.ExecutableUnit <em>Executable Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Executable Unit</em>'.
* @see org.eclectic.idc.core.ExecutableUnit
* @generated
*/ | Returns the meta object for class '<code>org.eclectic.idc.core.ExecutableUnit Executable Unit</code>'. | getExecutableUnit | {
"repo_name": "jesusc/eclectic",
"path": "plugins/org.eclectic.idc/src-gen/org/eclectic/idc/core/CorePackage.java",
"license": "gpl-3.0",
"size": 86808
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 673,261 |
public static void push(final String message, final Object... args) {
contextStack.push(ParameterizedMessage.format(message, args));
} | static void function(final String message, final Object... args) { contextStack.push(ParameterizedMessage.format(message, args)); } | /**
* Pushes new diagnostic context information for the current thread.
*
* <p>
* The contents of the <code>message</code> and args parameters are determined solely by the client. The message
* will be treated as a format String and tokens will be replaced with the String value of the arguments... | Pushes new diagnostic context information for the current thread. The contents of the <code>message</code> and args parameters are determined solely by the client. The message will be treated as a format String and tokens will be replaced with the String value of the arguments in accordance with ParameterizedMessage. | push | {
"repo_name": "lqbweb/logging-log4j2",
"path": "log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java",
"license": "apache-2.0",
"size": 18090
} | [
"org.apache.logging.log4j.message.ParameterizedMessage"
] | import org.apache.logging.log4j.message.ParameterizedMessage; | import org.apache.logging.log4j.message.*; | [
"org.apache.logging"
] | org.apache.logging; | 476,598 |
public void handleInput( InputRequest request )
{
LOG.info( "handleInput request={}", request );
} | void function( InputRequest request ) { LOG.info( STR, request ); } | /**
* Used by Apache Ant to load data from xml into entities.
*
* @param request The input request
*/ | Used by Apache Ant to load data from xml into entities | handleInput | {
"repo_name": "PennState/directory-fortress-core-1",
"path": "src/main/java/org/apache/directory/fortress/core/ant/FortressAntTask.java",
"license": "apache-2.0",
"size": 96654
} | [
"org.apache.tools.ant.input.InputRequest"
] | import org.apache.tools.ant.input.InputRequest; | import org.apache.tools.ant.input.*; | [
"org.apache.tools"
] | org.apache.tools; | 1,121,959 |
public List<IpsecPolicy> vpnClientIpsecPolicies() {
return this.vpnClientIpsecPolicies;
} | List<IpsecPolicy> function() { return this.vpnClientIpsecPolicies; } | /**
* Get vpnClientIpsecPolicies for virtual network gateway P2S client.
*
* @return the vpnClientIpsecPolicies value
*/ | Get vpnClientIpsecPolicies for virtual network gateway P2S client | vpnClientIpsecPolicies | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VpnClientConfiguration.java",
"license": "mit",
"size": 9371
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 325,395 |
if (ApplicationEvent.class.equals(applicationEventClass) ||
!ApplicationEvent.class.isAssignableFrom(applicationEventClass)) {
throw new IllegalArgumentException("applicationEventClass needs to extend ApplicationEvent");
}
try {
this.applicationEventClassConstructor =
applicationEventClass.getConstr... | if (ApplicationEvent.class.equals(applicationEventClass) !ApplicationEvent.class.isAssignableFrom(applicationEventClass)) { throw new IllegalArgumentException(STR); } try { this.applicationEventClassConstructor = applicationEventClass.getConstructor(new Class[] {Object.class}); } catch (NoSuchMethodException ex) { thro... | /**
* Set the application event class to publish.
* <p>The event class <b>must</b> have a constructor with a single
* <code>Object</code> argument for the event source. The interceptor
* will pass in the invoked object.
* @throws IllegalArgumentException if the supplied <code>Class</code> is
* <code>null</c... | Set the application event class to publish. The event class must have a constructor with a single <code>Object</code> argument for the event source. The interceptor will pass in the invoked object | setApplicationEventClass | {
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "src/org/springframework/context/event/EventPublicationInterceptor.java",
"license": "apache-2.0",
"size": 3874
} | [
"org.springframework.context.ApplicationEvent"
] | import org.springframework.context.ApplicationEvent; | import org.springframework.context.*; | [
"org.springframework.context"
] | org.springframework.context; | 2,544,565 |
invocationCount++;
long currentPosition = pos;
long eof = validateAndGetFileChannel().size();
// return -1 if the given position is greater than or equal to the file's current size.
if (pos >= eof) {
return -1;
}
while (dest.remaining() > 0) {
// C... | invocationCount++; long currentPosition = pos; long eof = validateAndGetFileChannel().size(); if (pos >= eof) { return -1; } while (dest.remaining() > 0) { if (readBufferStartPosition <= currentPosition && currentPosition < readBufferStartPosition + readBuffer.limit()) { long posInBuffer = currentPosition - readBufferS... | /**
* Read as many bytes into dest as dest.capacity() starting at position pos in the
* FileChannel. This function can read from the buffer or the file channel
* depending on the implementation..
* @param dest
* @param pos
* @return The total number of bytes read. -1 if the given position ... | Read as many bytes into dest as dest.capacity() starting at position pos in the FileChannel. This function can read from the buffer or the file channel depending on the implementation. | read | {
"repo_name": "fengshao0907/bookkeeper",
"path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BufferedReadChannel.java",
"license": "apache-2.0",
"size": 4619
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 874,934 |
public void setBreakValue (BigDecimal BreakValue)
{
set_Value (COLUMNNAME_BreakValue, BreakValue);
} | void function (BigDecimal BreakValue) { set_Value (COLUMNNAME_BreakValue, BreakValue); } | /** Set Break Value.
@param BreakValue
Low Value of trade discount break level
*/ | Set Break Value | setBreakValue | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_I_PriceList.java",
"license": "gpl-2.0",
"size": 15476
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,650,741 |
EClass getFeatureRequirement(); | EClass getFeatureRequirement(); | /**
* Returns the meta object for class '{@link ch.hilbri.assist.model.FeatureRequirement <em>Feature Requirement</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Feature Requirement</em>'.
* @see ch.hilbri.assist.model.FeatureRequirement
*... | Returns the meta object for class '<code>ch.hilbri.assist.model.FeatureRequirement Feature Requirement</code>'. | getFeatureRequirement | {
"repo_name": "RobertHilbrich/assist",
"path": "ch.hilbri.assist.model/src-gen/ch/hilbri/assist/model/ModelPackage.java",
"license": "gpl-2.0",
"size": 419306
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 304,222 |
public List<String> executeWithTimeout(int timeoutSeconds) {
try {
return build().executeWithTimeout(timeoutSeconds);
} catch (TimeoutException e) {
return Collections.singletonList("Process timed out!");
}
} | List<String> function(int timeoutSeconds) { try { return build().executeWithTimeout(timeoutSeconds); } catch (TimeoutException e) { return Collections.singletonList(STR); } } | /**
* Shortcut to execute a command that times out after a few seconds
* @param timeoutSeconds the seconds needed to complete computation.
* @return a list of lines representing
* the output of the command.
*/ | Shortcut to execute a command that times out after a few seconds | executeWithTimeout | {
"repo_name": "vesperin/mix",
"path": "src/main/java/com/vesperin/utils/Command.java",
"license": "apache-2.0",
"size": 16689
} | [
"java.util.Collections",
"java.util.List",
"java.util.concurrent.TimeoutException"
] | import java.util.Collections; import java.util.List; import java.util.concurrent.TimeoutException; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,562,378 |
public static String templateName(@Nullable String schemaName, String tableName) {
if (schemaName == null || schemaName.equals(Schemas.DEFAULT_SCHEMA_NAME)) {
return DOT_JOINER.join(PARTITIONED_TABLE_PREFIX, tableName, "");
} else {
return DOT_JOINER.join(schemaName, PARTITIO... | static String function(@Nullable String schemaName, String tableName) { if (schemaName == null schemaName.equals(Schemas.DEFAULT_SCHEMA_NAME)) { return DOT_JOINER.join(PARTITIONED_TABLE_PREFIX, tableName, STR"); } } | /**
* compute the template name (used with partitioned tables) from a given schema and table name
*/ | compute the template name (used with partitioned tables) from a given schema and table name | templateName | {
"repo_name": "aslanbekirov/crate",
"path": "sql/src/main/java/io/crate/metadata/PartitionName.java",
"license": "apache-2.0",
"size": 8647
} | [
"org.elasticsearch.common.Nullable"
] | import org.elasticsearch.common.Nullable; | import org.elasticsearch.common.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,402,882 |
public static MemcacheWorkExecutor createLocalWorkExecutor(
MemcacheActionCache cache, Path execRoot) {
return new MemcacheWorkExecutor(cache, execRoot);
} | static MemcacheWorkExecutor function( MemcacheActionCache cache, Path execRoot) { return new MemcacheWorkExecutor(cache, execRoot); } | /**
* Create an instance of MemcacheWorkExecutor that runs locally.
* @param cache An instance of MemcacheActionCache.
* @param execRoot Path of the execution root where work is executed.
* @return An instance of MemcacheWorkExecutor tthat runs locally in the execution root.
*/ | Create an instance of MemcacheWorkExecutor that runs locally | createLocalWorkExecutor | {
"repo_name": "abergmeier-dsfishlabs/bazel",
"path": "src/main/java/com/google/devtools/build/lib/remote/MemcacheWorkExecutor.java",
"license": "apache-2.0",
"size": 7960
} | [
"com.google.devtools.build.lib.vfs.Path"
] | import com.google.devtools.build.lib.vfs.Path; | import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 988,393 |
ImmutableList<SchemaOrgType> getDrugUnitList(); | ImmutableList<SchemaOrgType> getDrugUnitList(); | /**
* Returns the value list of property drugUnit. Empty list is returned if the property not set in
* current object.
*/ | Returns the value list of property drugUnit. Empty list is returned if the property not set in current object | getDrugUnitList | {
"repo_name": "google/schemaorg-java",
"path": "src/main/java/com/google/schemaorg/core/DrugCost.java",
"license": "apache-2.0",
"size": 9232
} | [
"com.google.common.collect.ImmutableList",
"com.google.schemaorg.SchemaOrgType"
] | import com.google.common.collect.ImmutableList; import com.google.schemaorg.SchemaOrgType; | import com.google.common.collect.*; import com.google.schemaorg.*; | [
"com.google.common",
"com.google.schemaorg"
] | com.google.common; com.google.schemaorg; | 1,880,877 |
@DoesServiceRequest
public void uploadPermissions(final FileSharePermissions permissions) throws StorageException {
this.uploadPermissions(permissions, null , null , null );
} | void function(final FileSharePermissions permissions) throws StorageException { this.uploadPermissions(permissions, null , null , null ); } | /**
* Uploads the share's permissions.
*
* @param permissions
* A {@link FileSharePermissions} object that represents the permissions to upload.
*
* @throws StorageException
* If a storage service error occurred.
*/ | Uploads the share's permissions | uploadPermissions | {
"repo_name": "Azure/azure-storage-android",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFileShare.java",
"license": "apache-2.0",
"size": 71230
} | [
"com.microsoft.azure.storage.StorageException"
] | import com.microsoft.azure.storage.StorageException; | import com.microsoft.azure.storage.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 431,588 |
protected PropertyEditorRegistry getPropertyEditorRegistry() {
if (getTarget() != null) {
return getInternalBindingResult().getPropertyAccessor();
}
else {
return getSimpleTypeConverter();
}
}
| PropertyEditorRegistry function() { if (getTarget() != null) { return getInternalBindingResult().getPropertyAccessor(); } else { return getSimpleTypeConverter(); } } | /**
* Return the underlying TypeConverter of this binder's BindingResult.
*/ | Return the underlying TypeConverter of this binder's BindingResult | getPropertyEditorRegistry | {
"repo_name": "codeApeFromChina/resource",
"path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/validation/DataBinder.java",
"license": "unlicense",
"size": 23468
} | [
"org.springframework.beans.PropertyEditorRegistry"
] | import org.springframework.beans.PropertyEditorRegistry; | import org.springframework.beans.*; | [
"org.springframework.beans"
] | org.springframework.beans; | 2,783,292 |
@Override public void exitString(@NotNull QueryParser.StringContext ctx) { } | @Override public void exitString(@NotNull QueryParser.StringContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterString | {
"repo_name": "objectof-group/objectof",
"path": "model/src/main/java/net/objectof/model/query/parser/QueryParserBaseListener.java",
"license": "gpl-3.0",
"size": 6183
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,874,128 |
private void generatePostamble() {
out.popIndent();
out.printil("} catch (java.lang.Throwable t) {");
out.pushIndent();
out.printil("if (!(t instanceof javax.servlet.jsp.SkipPageException)){");
out.pushIndent();
out.printil("out = _jspx_out;");
out.printil("if... | void function() { out.popIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.printil(STR); out.pushIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.popIndent(); out.printil(STR); out.pushIndent(); out.printil(STR)... | /**
* Generates the ending part of the static portion of the servlet.
*/ | Generates the ending part of the static portion of the servlet | generatePostamble | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/jasper/compiler/Generator.java",
"license": "apache-2.0",
"size": 175629
} | [
"java.text.SimpleDateFormat",
"java.util.ArrayList",
"java.util.TimeZone",
"java.util.Vector",
"org.apache.jasper.JasperException"
] | import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.TimeZone; import java.util.Vector; import org.apache.jasper.JasperException; | import java.text.*; import java.util.*; import org.apache.jasper.*; | [
"java.text",
"java.util",
"org.apache.jasper"
] | java.text; java.util; org.apache.jasper; | 1,452,093 |
public void drawPattern(Patterns pattern, Canvas canvas, int density){
PatternParameters testedPattern = new PatternParameters(getContext());
Point[] points = testedPattern.getPattern(pattern, density);
Paint patternPaint = new Paint();
patternPaint.setColor(Color.YELLOW);
p... | void function(Patterns pattern, Canvas canvas, int density){ PatternParameters testedPattern = new PatternParameters(getContext()); Point[] points = testedPattern.getPattern(pattern, density); Paint patternPaint = new Paint(); patternPaint.setColor(Color.YELLOW); patternPaint.setStyle(Style.STROKE); patternPaint.setStr... | /**
* Draws a pattern provided by PatternParameters
* @param pattern The pattern you want to be drawn
* @param density The density of the pattern
*/ | Draws a pattern provided by PatternParameters | drawPattern | {
"repo_name": "spottheplot/testPattern",
"path": "src/com/testPattern/PaintView.java",
"license": "mit",
"size": 6592
} | [
"android.graphics.Canvas",
"android.graphics.Color",
"android.graphics.Paint",
"android.graphics.Point"
] | import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Point; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,726,189 |
private void doTestConsistencyAfterBaselineNodeStopAndRemoval(int mode) throws Exception {
backups = 2;
final int srvNodes = SERVER_NODES + 1;
IgniteEx prim = startGrids(srvNodes);
prim.cluster().baselineAutoAdjustEnabled(false);
prim.cluster().active(true);
for ... | void function(int mode) throws Exception { backups = 2; final int srvNodes = SERVER_NODES + 1; IgniteEx prim = startGrids(srvNodes); prim.cluster().baselineAutoAdjustEnabled(false); prim.cluster().active(true); for (int p = 0; p < partitions(); p++) { prim.cache(DEFAULT_CACHE_NAME).put(p, p); prim.cache(DEFAULT_CACHE_N... | /**
* Test a scenario when partition is evicted and owned again with non-zero initial and current counters.
* When rebalancing is finished no partition desync should happen.
*/ | Test a scenario when partition is evicted and owned again with non-zero initial and current counters. When rebalancing is finished no partition desync should happen | doTestConsistencyAfterBaselineNodeStopAndRemoval | {
"repo_name": "chandresh-pancholi/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateConsistencyTest.java",
"license": "apache-2.0",
"size": 50440
} | [
"java.util.Collections",
"java.util.Random",
"java.util.concurrent.atomic.AtomicBoolean",
"java.util.stream.IntStream",
"org.apache.ignite.internal.IgniteEx",
"org.apache.ignite.internal.IgniteInternalFuture"
] | import java.util.Collections; import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.IntStream; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; | import java.util.*; import java.util.concurrent.atomic.*; import java.util.stream.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,902,164 |
@Nonnull
public DriveItemRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
return new com.microsoft.graph.requests.DriveItemRequest(getRequestUrl(), getClient(), requestOptions);
} | DriveItemRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { return new com.microsoft.graph.requests.DriveItemRequest(getRequestUrl(), getClient(), requestOptions); } | /**
* Creates the request with specific requestOptions instead of the existing requestOptions
*
* @param requestOptions the options for this request
* @return the DriveItemRequest instance
*/ | Creates the request with specific requestOptions instead of the existing requestOptions | buildRequest | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/DriveItemRequestBuilder.java",
"license": "mit",
"size": 17279
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,635,455 |
public static Test suite() throws Exception {
return suite(new FtpProviderTestCase());
} | static Test function() throws Exception { return suite(new FtpProviderTestCase()); } | /**
* Creates the test suite for the ftp file system.
*/ | Creates the test suite for the ftp file system | suite | {
"repo_name": "wso2/wso2-commons-vfs",
"path": "commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/ftp/test/FtpProviderTestCase.java",
"license": "apache-2.0",
"size": 7691
} | [
"junit.framework.Test"
] | import junit.framework.Test; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,234,837 |
public static RolePermission to(RolePermissionBo bo) {
if (bo == null) {
return null;
}
return RolePermission.Builder.create(bo).build();
} | static RolePermission function(RolePermissionBo bo) { if (bo == null) { return null; } return RolePermission.Builder.create(bo).build(); } | /**
* Converts a mutable bo to its immutable counterpart
*
* @param bo the mutable business object
* @return the immutable object
*/ | Converts a mutable bo to its immutable counterpart | to | {
"repo_name": "mztaylor/rice-git",
"path": "rice-middleware/kim/kim-impl/src/main/java/org/kuali/rice/kim/impl/role/RolePermissionBo.java",
"license": "apache-2.0",
"size": 3969
} | [
"org.kuali.rice.kim.api.role.RolePermission"
] | import org.kuali.rice.kim.api.role.RolePermission; | import org.kuali.rice.kim.api.role.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,645,006 |
public static boolean isOnInterface(DetailAST blockComment) {
return isOnPlainToken(blockComment, TokenTypes.INTERFACE_DEF, TokenTypes.LITERAL_INTERFACE)
|| isOnTokenWithModifiers(blockComment, TokenTypes.INTERFACE_DEF)
|| isOnTokenWithAnnotation(blockComment, TokenTypes.INTE... | static boolean function(DetailAST blockComment) { return isOnPlainToken(blockComment, TokenTypes.INTERFACE_DEF, TokenTypes.LITERAL_INTERFACE) isOnTokenWithModifiers(blockComment, TokenTypes.INTERFACE_DEF) isOnTokenWithAnnotation(blockComment, TokenTypes.INTERFACE_DEF); } | /**
* Node is on interface definition.
* @param blockComment DetailAST
* @return true if node is before interface
*/ | Node is on interface definition | isOnInterface | {
"repo_name": "baratali/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/utils/BlockCommentPosition.java",
"license": "lgpl-2.1",
"size": 9463
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.TokenTypes"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 1,052,777 |
public void test_setAccessible$Ljava_lang_reflect_AccessibleObjectZ() {
try {
AccessibleObject ao = TestClass.class.getField("aField");
AccessibleObject[] aoa = new AccessibleObject[] { ao };
AccessibleObject.setAccessible(aoa, true);
assertTrue("Returned fals... | public void test_setAccessible$Ljava_lang_reflect_AccessibleObjectZ() { try { AccessibleObject ao = TestClass.class.getField(STR); AccessibleObject[] aoa = new AccessibleObject[] { ao }; AccessibleObject.setAccessible(aoa, true); assertTrue(STR, ao.isAccessible()); AccessibleObject.setAccessible(aoa, false); assertTrue... | /**
* java.lang.reflect.AccessibleObject#setAccessible(java.lang.reflect.AccessibleObject[],
* boolean)
*/ | java.lang.reflect.AccessibleObject#setAccessible(java.lang.reflect.AccessibleObject[], boolean) | test_setAccessible$Ljava_lang_reflect_AccessibleObjectZ | {
"repo_name": "xdajog/samsung_sources_i927",
"path": "libcore/luni/src/test/java/tests/api/java/lang/reflect/AccessibleObjectTest.java",
"license": "gpl-2.0",
"size": 7533
} | [
"java.lang.reflect.AccessibleObject"
] | import java.lang.reflect.AccessibleObject; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,451,039 |
public void emptyDirectory (boolean preserveTree) {
if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot delete a classpath file: " + file);
if (type == FileType.Internal) throw new GdxRuntimeException("Cannot delete an internal file: " + file);
emptyDirectory(file(), preserveTree);
}
... | void function (boolean preserveTree) { if (type == FileType.Classpath) throw new GdxRuntimeException(STR + file); if (type == FileType.Internal) throw new GdxRuntimeException(STR + file); emptyDirectory(file(), preserveTree); } /** Copies this file or directory to the specified file or directory. If this handle is a fi... | /** Deletes all children of this directory, recursively. Optionally preserving the folder structure.
* @throws GdxRuntimeException if this file handle is a {@link FileType#Classpath} or {@link FileType#Internal} file. */ | Deletes all children of this directory, recursively. Optionally preserving the folder structure | emptyDirectory | {
"repo_name": "ryoenji/libgdx",
"path": "gdx/src/com/badlogic/gdx/files/FileHandle.java",
"license": "apache-2.0",
"size": 28489
} | [
"com.badlogic.gdx.Files",
"com.badlogic.gdx.utils.GdxRuntimeException"
] | import com.badlogic.gdx.Files; import com.badlogic.gdx.utils.GdxRuntimeException; | import com.badlogic.gdx.*; import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,639,406 |
public ArrayList<AcceptedPattern> getPatterns() {
ArrayList<AcceptedPattern> copy = new ArrayList<AcceptedPattern>(patterns);
return copy;
}
| ArrayList<AcceptedPattern> function() { ArrayList<AcceptedPattern> copy = new ArrayList<AcceptedPattern>(patterns); return copy; } | /**
* Return the list of transitions registered in this state
*
* @return The list of transitions
*/ | Return the list of transitions registered in this state | getPatterns | {
"repo_name": "bme-mit-r5cop/wp24-agentinterface",
"path": "AgentInterface2/R5COP-WP24-AgentInterface/src/main/java/agentinterface/State.java",
"license": "mit",
"size": 3049
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 684,524 |
public void applyToGrid(Grid2D input, Grid2D collimatorMask) {
int maxSIndex = input.getSize()[0];
LaplaceKernel1D lap = new LaplaceKernel1D(maxSIndex);
lap.applyToGrid(input);
//collimatorMask.show("Mask Image");
Grid2D tmp = new Grid2D(input);
tmp.show("Laplace");
NumericPointwiseOperators.m... | void function(Grid2D input, Grid2D collimatorMask) { int maxSIndex = input.getSize()[0]; LaplaceKernel1D lap = new LaplaceKernel1D(maxSIndex); lap.applyToGrid(input); Grid2D tmp = new Grid2D(input); tmp.show(STR); NumericPointwiseOperators.multiplyBy(input, collimatorMask); Grid2D tmp2 = new Grid2D(input); tmp2.show(ST... | /**
* This method applies laplacian filtering, collimator border removal using a binary mask and atract filtering.
* @param input Sinogram
* @param collimatorMask or equivalent mask for border removal
*/ | This method applies laplacian filtering, collimator border removal using a binary mask and atract filtering | applyToGrid | {
"repo_name": "YixingHuang/CONRAD",
"path": "src/edu/stanford/rsl/tutorial/atract/AtractFilter1D.java",
"license": "gpl-3.0",
"size": 4841
} | [
"edu.stanford.rsl.conrad.data.numeric.Grid1D",
"edu.stanford.rsl.conrad.data.numeric.Grid2D",
"edu.stanford.rsl.conrad.data.numeric.NumericPointwiseOperators",
"edu.stanford.rsl.conrad.fitting.PolynomialFunction"
] | import edu.stanford.rsl.conrad.data.numeric.Grid1D; import edu.stanford.rsl.conrad.data.numeric.Grid2D; import edu.stanford.rsl.conrad.data.numeric.NumericPointwiseOperators; import edu.stanford.rsl.conrad.fitting.PolynomialFunction; | import edu.stanford.rsl.conrad.data.numeric.*; import edu.stanford.rsl.conrad.fitting.*; | [
"edu.stanford.rsl"
] | edu.stanford.rsl; | 861,737 |
public void startElement(
String elementNamespaceURI,
String elementLocalName,
String elementName) throws SAXException
{
startElement(
elementNamespaceURI,elementLocalName,elementName, null);
} | void function( String elementNamespaceURI, String elementLocalName, String elementName) throws SAXException { startElement( elementNamespaceURI,elementLocalName,elementName, null); } | /**
* Start an element in the output document. This might be an XML element
* (<elem>data</elem> type) or a CDATA section.
*/ | Start an element in the output document. This might be an XML element (data type) or a CDATA section | startElement | {
"repo_name": "itgeeker/jdk",
"path": "src/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java",
"license": "apache-2.0",
"size": 22941
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 2,514,655 |
public List<Number> getTimes() {
return times;
} | List<Number> function() { return times; } | /**
* Gets times of method saved.
*
* @return the times
*/ | Gets times of method saved | getTimes | {
"repo_name": "Nastel/tnt4j-streams-zorka",
"path": "src/main/java/com/jkoolcloud/tnt4j/streams/filters/MethodRegistry.java",
"license": "gpl-3.0",
"size": 5185
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,397,454 |
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
System.err.println("Time set");
((WhenActivity)getActivity()).setTime(hourOfDay, minute); //calls method in Parent Activity
} | void function(TimePicker view, int hourOfDay, int minute) { System.err.println(STR); ((WhenActivity)getActivity()).setTime(hourOfDay, minute); } | /**
* Handles the time being entered
* */ | Handles the time being entered | onTimeSet | {
"repo_name": "devonwhale/Find-My-Migraine",
"path": "app/src/main/java/uk/ac/bradford/findmymigraine/WhenTimePicker.java",
"license": "gpl-3.0",
"size": 1183
} | [
"android.widget.TimePicker"
] | import android.widget.TimePicker; | import android.widget.*; | [
"android.widget"
] | android.widget; | 704,026 |
public CustomJSONWriter array() throws JSONException {
if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
this.push(null);
this.append("[");
this.comma = false;
return this;
}
throw new JSONException("Misplaced array.");
} | CustomJSONWriter function() throws JSONException { if (this.mode == 'i' this.mode == 'o' this.mode == 'a') { this.push(null); this.append("["); this.comma = false; return this; } throw new JSONException(STR); } | /**
* Begin appending a new array. All values until the balancing
* <code>endArray</code> will be appended to this array. The
* <code>endArray</code> method must be called to mark the array's end.
* @return this
* @throws JSONException If the nesting is too deep, or if the object is
* star... | Begin appending a new array. All values until the balancing <code>endArray</code> will be appended to this array. The <code>endArray</code> method must be called to mark the array's end | array | {
"repo_name": "fastcat-co/fastcatsearch",
"path": "server/src/main/java/org/fastcatsearch/util/CustomJSONWriter.java",
"license": "apache-2.0",
"size": 12081
} | [
"org.json.JSONException"
] | import org.json.JSONException; | import org.json.*; | [
"org.json"
] | org.json; | 2,479,131 |
public int indexOfDatabase(DatabaseMeta ci); | int function(DatabaseMeta ci); | /**
* Find the location of database
*
* @param ci The database queried
* @return The location of the database, -1 if nothing was found.
*/ | Find the location of database | indexOfDatabase | {
"repo_name": "panbasten/imeta",
"path": "imeta2.x/imeta-src/imeta/src/main/java/com/panet/imeta/trans/HasDatabasesInterface.java",
"license": "gpl-2.0",
"size": 3666
} | [
"com.panet.imeta.core.database.DatabaseMeta"
] | import com.panet.imeta.core.database.DatabaseMeta; | import com.panet.imeta.core.database.*; | [
"com.panet.imeta"
] | com.panet.imeta; | 1,889,713 |
@Exported
public String getBackupVersion() {
File backup = getBackupFile();
if (backup.exists()) {
try {
JarFile backupPlugin = new JarFile(backup);
try {
return backupPlugin.getManifest().getMainAttributes().getValue("Plugin-Versio... | String function() { File backup = getBackupFile(); if (backup.exists()) { try { JarFile backupPlugin = new JarFile(backup); try { return backupPlugin.getManifest().getMainAttributes().getValue(STR); } finally { backupPlugin.close(); } } catch (IOException e) { LOGGER.log(WARNING, STR + backup, e); return null; } } else... | /**
* returns the version of the backed up plugin,
* or null if there's no back up.
*/ | returns the version of the backed up plugin, or null if there's no back up | getBackupVersion | {
"repo_name": "nandan4/Jenkins",
"path": "core/src/main/java/hudson/PluginWrapper.java",
"license": "mit",
"size": 20494
} | [
"java.io.File",
"java.io.IOException",
"java.util.jar.JarFile"
] | import java.io.File; import java.io.IOException; import java.util.jar.JarFile; | import java.io.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,222,984 |
@Override
public boolean isReadOnly(ELContext context, Object base, Object property)
{
if (property != null || ! (base instanceof String))
return true;
context.setPropertyResolved(true);
return false;
} | boolean function(ELContext context, Object base, Object property) { if (property != null ! (base instanceof String)) return true; context.setPropertyResolved(true); return false; } | /**
* Returns true for read-only.
*/ | Returns true for read-only | isReadOnly | {
"repo_name": "dlitz/resin",
"path": "modules/kernel/src/com/caucho/el/EnvironmentELResolver.java",
"license": "gpl-2.0",
"size": 4732
} | [
"javax.el.ELContext"
] | import javax.el.ELContext; | import javax.el.*; | [
"javax.el"
] | javax.el; | 374,765 |
@Override
public float getProgress() throws IOException {
return Math.min(1.0f, progress / (float) (split.getLength()));
}
public CombineFileRecordReader(JobConf job, CombineFileSplit split,
Reporter reporter,
Class<RecordReader<K, V>> rrClass)
throws IOException {
... | float function() throws IOException { return Math.min(1.0f, progress / (float) (split.getLength())); } public CombineFileRecordReader(JobConf job, CombineFileSplit split, Reporter reporter, Class<RecordReader<K, V>> rrClass) throws IOException { this.split = split; this.jc = job; this.rrClass = rrClass; this.reporter =... | /**
* Return progress based on the amount of data processed so far.
*/ | Return progress based on the amount of data processed so far | getProgress | {
"repo_name": "alanfgates/hive",
"path": "shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java",
"license": "apache-2.0",
"size": 12520
} | [
"java.io.IOException",
"org.apache.hadoop.mapred.JobConf",
"org.apache.hadoop.mapred.RecordReader",
"org.apache.hadoop.mapred.Reporter",
"org.apache.hadoop.mapred.lib.CombineFileSplit"
] | import java.io.IOException; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.RecordReader; import org.apache.hadoop.mapred.Reporter; import org.apache.hadoop.mapred.lib.CombineFileSplit; | import java.io.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.mapred.lib.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 303,087 |
@NotNull
public CompletableFuture<Subscription> subscribeToStream(@NotNull StreamId streamId, long eventNumber,
@NotNull BiConsumer<Subscription, CommonEvent> onEvent,
@NotNull BiConsumer<Subscription, Exception> onDrop); | CompletableFuture<Subscription> function(@NotNull StreamId streamId, long eventNumber, @NotNull BiConsumer<Subscription, CommonEvent> onEvent, @NotNull BiConsumer<Subscription, Exception> onDrop); | /**
* Subscribe a stream starting with a given event number.
*
* @param streamId
* Unique stream identifier.
* @param eventNumber
* Number of the event to start (
* {@link EscApiUtils#SUBSCRIBE_TO_NEW_EVENTS} = New events, 0 =
* First ... | Subscribe a stream starting with a given event number | subscribeToStream | {
"repo_name": "fuinorg/event-store-commons",
"path": "api/src/main/java/org/fuin/esc/api/SubscribableEventStoreAsync.java",
"license": "lgpl-3.0",
"size": 2284
} | [
"jakarta.validation.constraints.NotNull",
"java.util.concurrent.CompletableFuture",
"java.util.function.BiConsumer"
] | import jakarta.validation.constraints.NotNull; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; | import jakarta.validation.constraints.*; import java.util.concurrent.*; import java.util.function.*; | [
"jakarta.validation.constraints",
"java.util"
] | jakarta.validation.constraints; java.util; | 485,151 |
void close( IMetaStore metastore ); | void close( IMetaStore metastore ); | /**
* If the metastore object temporary and should not be kept active indefinitely, this method will release all
* resources associated with the metastore.
*
* @param metastore the IMetaStore being disposed.
*/ | If the metastore object temporary and should not be kept active indefinitely, this method will release all resources associated with the metastore | close | {
"repo_name": "pentaho/pentaho-hadoop-shims",
"path": "shim-api/src/main/java/org/pentaho/hadoop/shim/api/cluster/NamedClusterService.java",
"license": "apache-2.0",
"size": 5339
} | [
"org.pentaho.metastore.api.IMetaStore"
] | import org.pentaho.metastore.api.IMetaStore; | import org.pentaho.metastore.api.*; | [
"org.pentaho.metastore"
] | org.pentaho.metastore; | 1,263,595 |
private void skipAttribute(InputStream is)
throws IOException
{
int nameIndex = readShort(is);
// String name = _cp.getUtf8(nameIndex).getValue();
int length = readInt(is);
is.skip(length);
} | void function(InputStream is) throws IOException { int nameIndex = readShort(is); int length = readInt(is); is.skip(length); } | /**
* Parses an attribute.
*/ | Parses an attribute | skipAttribute | {
"repo_name": "dlitz/resin",
"path": "modules/kernel/src/com/caucho/bytecode/ByteCodeClassScanner.java",
"license": "gpl-2.0",
"size": 13922
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 950,961 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> getEntityTagAsync(String resourceGroupName, String serviceName, String apiId, String schemaId) {
return getEntityTagWithResponseAsync(resourceGroupName, serviceName, apiId, schemaId)
.flatMap((ApiSchemasGetEntityTagResponse res) ... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String serviceName, String apiId, String schemaId) { return getEntityTagWithResponseAsync(resourceGroupName, serviceName, apiId, schemaId) .flatMap((ApiSchemasGetEntityTagResponse res) -> Mono.empty()); } | /**
* Gets the entity state (Etag) version of the schema specified by its identifier.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param apiId API revision identifier. Must be unique in the current API Management se... | Gets the entity state (Etag) version of the schema specified by its identifier | getEntityTagAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/ApiSchemasClientImpl.java",
"license": "mit",
"size": 79226
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.apimanagement.models.ApiSchemasGetEntityTagResponse"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.apimanagement.models.ApiSchemasGetEntityTagResponse; | import com.azure.core.annotation.*; import com.azure.resourcemanager.apimanagement.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,294,557 |
Observable<ServiceResponse<Void>> putDoubleValidAsync(List<Double> arrayBody); | Observable<ServiceResponse<Void>> putDoubleValidAsync(List<Double> arrayBody); | /**
* Set array value [0, -0.01, 1.2e20].
*
* @param arrayBody the List<Double> value
* @return the {@link ServiceResponse} object if successful.
*/ | Set array value [0, -0.01, 1.2e20] | putDoubleValidAsync | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java",
"license": "mit",
"size": 72234
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.List"
] | import com.microsoft.rest.ServiceResponse; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,501,167 |
public static synchronized FmSnackBar make(Context context, String title, String actionName,
OnActionTriggerListener listener, int duration) {
FmSnackBar instance = new FmSnackBar(context);
if (title == null) {
instance.mTextView.setText("");
} else {
inst... | static synchronized FmSnackBar function(Context context, String title, String actionName, OnActionTriggerListener listener, int duration) { FmSnackBar instance = new FmSnackBar(context); if (title == null) { instance.mTextView.setText(""); } else { instance.mTextView.setText(title); } if (actionName != null & listener ... | /**
* To make a FmSnackBar instance
*
* @param context The context instance
* @param title The notification text
* @param actionName The action name displayed to end user
* @param listener The callback listener
* @param duration The displaying duration
* @return The FmSnackBar in... | To make a FmSnackBar instance | make | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/FMRadio/src/com/android/fmradio/views/FmSnackBar.java",
"license": "gpl-3.0",
"size": 5847
} | [
"android.content.Context",
"android.view.View"
] | import android.content.Context; import android.view.View; | import android.content.*; import android.view.*; | [
"android.content",
"android.view"
] | android.content; android.view; | 108,709 |
public void setOrders(List<Order> orders) {
for (Order order : orders) {
addOrder(order);
}
}
| void function(List<Order> orders) { for (Order order : orders) { addOrder(order); } } | /**
* Sets the orders
*
* @param orders the orders to set
*/ | Sets the orders | setOrders | {
"repo_name": "MitchellBot/openmrs-core",
"path": "api/src/main/java/org/openmrs/OrderGroup.java",
"license": "mpl-2.0",
"size": 4401
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 921,021 |
public void getMinPosition(float[] val) {
if ( minPosition == null ) {
minPosition = (SFVec2f)getField( "minPosition" );
}
minPosition.getValue( val );
} | void function(float[] val) { if ( minPosition == null ) { minPosition = (SFVec2f)getField( STR ); } minPosition.getValue( val ); } | /** Return the minPosition value in the argument float[]
* @param val The float[] to initialize. */ | Return the minPosition value in the argument float[] | getMinPosition | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/external/node/pointingdevicesensor/SAIPlaneSensor.java",
"license": "gpl-2.0",
"size": 6199
} | [
"org.web3d.x3d.sai.SFVec2f"
] | import org.web3d.x3d.sai.SFVec2f; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 2,461,910 |
private static Properties getORBPropertiesFile () {
return (Properties) AccessController.doPrivileged(new GetORBPropertiesFileAction());
} | static Properties function () { return (Properties) AccessController.doPrivileged(new GetORBPropertiesFileAction()); } | /**
* Load the orb.properties file.
*/ | Load the orb.properties file | getORBPropertiesFile | {
"repo_name": "tadamski/openjdk-orb",
"path": "src/share/classes/javax/rmi/CORBA/Stub.java",
"license": "gpl-2.0",
"size": 8575
} | [
"java.security.AccessController",
"java.util.Properties"
] | import java.security.AccessController; import java.util.Properties; | import java.security.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 2,732,576 |
private void load() {
List<IngestModuleFactory> moduleFactories = new ArrayList<>();
List<IngestModuleFactory> allModuleFactories = IngestModuleFactoryLoader.getIngestModuleFactories();
HashSet<String> loadedModuleNames = new HashSet<>();
// Add modules that are going to be... | void function() { List<IngestModuleFactory> moduleFactories = new ArrayList<>(); List<IngestModuleFactory> allModuleFactories = IngestModuleFactoryLoader.getIngestModuleFactories(); HashSet<String> loadedModuleNames = new HashSet<>(); for (IngestModuleFactory moduleFactory : allModuleFactories) { if (moduleFactory.isDa... | /**
* Loads the saved or default ingest job settings for the execution context
* into memory.
*/ | Loads the saved or default ingest job settings for the execution context into memory | load | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettings.java",
"license": "apache-2.0",
"size": 27362
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Map",
"java.util.logging.Level",
"org.openide.util.NbBundle",
"org.sleuthkit.autopsy.coreutils.ModuleSettings",
"org.sleuthkit.autopsy.modules.interestingitems.FilesSet",
"org.sleuthkit.autopsy.modules.interestingitems.FilesSet... | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.logging.Level; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.autopsy.modules.interestingitems.FilesSet; import org.sleuthkit.autopsy.modules... | import java.util.*; import java.util.logging.*; import org.openide.util.*; import org.sleuthkit.autopsy.coreutils.*; import org.sleuthkit.autopsy.modules.interestingitems.*; | [
"java.util",
"org.openide.util",
"org.sleuthkit.autopsy"
] | java.util; org.openide.util; org.sleuthkit.autopsy; | 577,371 |
APIProduct getAPIProductbyUUID(String uuid, String requestedTenantDomain) throws APIManagementException; | APIProduct getAPIProductbyUUID(String uuid, String requestedTenantDomain) throws APIManagementException; | /**
* Returns details of an APIProduct
*
* @param uuid UUID of the API Product's registry artifact
* @param requestedTenantDomain tenantDomain for the registry
* @return An API Product object related to the given artifact id or null
* @throws APIManagementException if fail... | Returns details of an APIProduct | getAPIProductbyUUID | {
"repo_name": "jaadds/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIManager.java",
"license": "apache-2.0",
"size": 36284
} | [
"org.wso2.carbon.apimgt.api.model.APIProduct"
] | import org.wso2.carbon.apimgt.api.model.APIProduct; | import org.wso2.carbon.apimgt.api.model.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,199,065 |
@Test
public void testDrawBorderLine() throws Exception {
BorderPaintingInfo paintInfo = new BorderPaintingInfo(0f, 0f, 1000f, 1000f, true,
Constants.EN_DASHED, Color.BLACK);
borderPainter.paint(paintInfo);
ds.endDocument();
assertTrue(line.getX1() == 4999 && line... | void function() throws Exception { BorderPaintingInfo paintInfo = new BorderPaintingInfo(0f, 0f, 1000f, 1000f, true, Constants.EN_DASHED, Color.BLACK); borderPainter.paint(paintInfo); ds.endDocument(); assertTrue(line.getX1() == 4999 && line.getX2() == 8332); } class MyDataStream extends DataStream { public MyDataStrea... | /**
* This test will fail if either of the below statements isn't true:
* org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_SPACE_RATIO = 0.5f:q
* org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_LENGTH_FACTOR = 4.0f.
*/ | This test will fail if either of the below statements isn't true: org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_SPACE_RATIO = 0.5f:q org.apache.fop.render.intermediate.BorderPainter.DASHED_BORDER_LENGTH_FACTOR = 4.0f | testDrawBorderLine | {
"repo_name": "StrategyObject/fop",
"path": "test/java/org/apache/fop/render/afp/AFPBorderPainterTestCase.java",
"license": "apache-2.0",
"size": 2786
} | [
"java.awt.Color",
"java.io.OutputStream",
"org.apache.fop.afp.AFPPaintingState",
"org.apache.fop.afp.BorderPaintingInfo",
"org.apache.fop.afp.DataStream",
"org.apache.fop.afp.Factory",
"org.apache.fop.fo.Constants",
"org.junit.Assert"
] | import java.awt.Color; import java.io.OutputStream; import org.apache.fop.afp.AFPPaintingState; import org.apache.fop.afp.BorderPaintingInfo; import org.apache.fop.afp.DataStream; import org.apache.fop.afp.Factory; import org.apache.fop.fo.Constants; import org.junit.Assert; | import java.awt.*; import java.io.*; import org.apache.fop.afp.*; import org.apache.fop.fo.*; import org.junit.*; | [
"java.awt",
"java.io",
"org.apache.fop",
"org.junit"
] | java.awt; java.io; org.apache.fop; org.junit; | 1,128,762 |
private void resetTimer() {
// Only set the timer if we have a timeout of at least 1 millisecond
if (fadeOutTime > 0) {
// Check if we need to create a new timer
if (timer == null || timer._run == false) {
// Create and start a new timer
timer = new FadeTimer();
timer.execute();
} else {
... | void function() { if (fadeOutTime > 0) { if (timer == null timer._run == false) { timer = new FadeTimer(); timer.execute(); } else { timer.resetTimer(); } } } private class FadeTimer extends AsyncTask<Void, Void, Void> { private int timer = 0; private boolean _run = true; | /**
* Resets the fade out timer to 0. Creating a new one if needed
*/ | Resets the fade out timer to 0. Creating a new one if needed | resetTimer | {
"repo_name": "treejames/senses-lbs-social",
"path": "src/org/taptwo/android/widget/CircleFlowIndicator.java",
"license": "lgpl-3.0",
"size": 10652
} | [
"android.os.AsyncTask"
] | import android.os.AsyncTask; | import android.os.*; | [
"android.os"
] | android.os; | 2,224,447 |
public static PcepValueType read(ChannelBuffer c, short hLength) {
byte[] iOpaqueValue = new byte[hLength];
c.readBytes(iOpaqueValue, 0, hLength);
return new OpaqueLinkAttributeSubTlv(iOpaqueValue, hLength);
} | static PcepValueType function(ChannelBuffer c, short hLength) { byte[] iOpaqueValue = new byte[hLength]; c.readBytes(iOpaqueValue, 0, hLength); return new OpaqueLinkAttributeSubTlv(iOpaqueValue, hLength); } | /**
* Reads the channel buffer and returns object of OpaqueLinkAttributeTlv.
*
* @param c input channel buffer
* @param hLength length
* @return object of Opaque Link Attribute Tlv
*/ | Reads the channel buffer and returns object of OpaqueLinkAttributeTlv | read | {
"repo_name": "sdnwiselab/onos",
"path": "protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OpaqueLinkAttributeSubTlv.java",
"license": "apache-2.0",
"size": 4662
} | [
"org.jboss.netty.buffer.ChannelBuffer"
] | import org.jboss.netty.buffer.ChannelBuffer; | import org.jboss.netty.buffer.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 1,208,234 |
public void setTime(long value) {
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(new Date(value));
int year = cal.get(Calendar.YEAR);
if (year < 1980) {
modDate = 0x21;
time = 0;
} else {
modDate = cal.get(Calendar.DATE);
... | void function(long value) { GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date(value)); int year = cal.get(Calendar.YEAR); if (year < 1980) { modDate = 0x21; time = 0; } else { modDate = cal.get(Calendar.DATE); modDate = (cal.get(Calendar.MONTH) + 1 << 5) modDate; modDate = ((cal.get(Calendar.YEAR) -... | /**
* Sets the modification time of this {@code ZipEntry}.
*
* @param value
* the modification time as the number of milliseconds since Jan.
* 1, 1970.
*/ | Sets the modification time of this ZipEntry | setTime | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/java/util/zip/ZipEntry.java",
"license": "gpl-3.0",
"size": 15165
} | [
"java.util.Calendar",
"java.util.Date",
"java.util.GregorianCalendar"
] | import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 1,817,447 |
@Override
public Document getNewDocument(Class<? extends Document> documentClass) throws WorkflowException {
if (documentClass == null) {
throw new IllegalArgumentException("invalid (null) documentClass");
}
if (!Document.class.isAssignableFrom(documentClass)) {
... | Document function(Class<? extends Document> documentClass) throws WorkflowException { if (documentClass == null) { throw new IllegalArgumentException(STR); } if (!Document.class.isAssignableFrom(documentClass)) { throw new IllegalArgumentException(STR); } String documentTypeName = getDataDictionaryService().getDocument... | /**
* Creates a new document by class.
*
* @see org.kuali.rice.krad.service.DocumentService#getNewDocument(java.lang.Class)
*/ | Creates a new document by class | getNewDocument | {
"repo_name": "ua-eas/ua-rice-2.1.9",
"path": "impl/src/main/java/org/kuali/rice/krad/service/impl/DocumentServiceImpl.java",
"license": "apache-2.0",
"size": 53133
} | [
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.kew.api.exception.WorkflowException",
"org.kuali.rice.krad.datadictionary.exception.UnknownDocumentTypeException",
"org.kuali.rice.krad.document.Document"
] | import org.apache.commons.lang.StringUtils; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.krad.datadictionary.exception.UnknownDocumentTypeException; import org.kuali.rice.krad.document.Document; | import org.apache.commons.lang.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.krad.datadictionary.exception.*; import org.kuali.rice.krad.document.*; | [
"org.apache.commons",
"org.kuali.rice"
] | org.apache.commons; org.kuali.rice; | 1,148,783 |
public IStatsProducer getProducer(){
return producer;
} | IStatsProducer function(){ return producer; } | /**
* Returns the producer.
* @return
*/ | Returns the producer | getProducer | {
"repo_name": "esmakula/moskito",
"path": "moskito-core/src/main/java/net/anotheria/moskito/core/dynamic/MoskitoInvokationProxy.java",
"license": "mit",
"size": 8041
} | [
"net.anotheria.moskito.core.producers.IStatsProducer"
] | import net.anotheria.moskito.core.producers.IStatsProducer; | import net.anotheria.moskito.core.producers.*; | [
"net.anotheria.moskito"
] | net.anotheria.moskito; | 161,303 |
public static boolean isDocumentAutoCorrected(Document document) {
return "true".equals(document.getUserData("autoCorrected"));
} | static boolean function(Document document) { return "true".equals(document.getUserData(STR)); } | /**
* Returns <code>true</code> if <code>document</code> contains corrections.
*
* @param document The document to test
* @return <code>true</code> if <code>document</code> contains corrections
*/ | Returns <code>true</code> if <code>document</code> contains corrections | isDocumentAutoCorrected | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-16.11.03/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java",
"license": "apache-2.0",
"size": 12586
} | [
"org.w3c.dom.Document"
] | import org.w3c.dom.Document; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,350,808 |
public static ZooKeeperSubmittedJobGraphStore createSubmittedJobGraphs(
CuratorFramework client,
Configuration configuration,
Executor executor) throws Exception {
checkNotNull(configuration, "Configuration");
RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage = createFileSystemStateStorage... | static ZooKeeperSubmittedJobGraphStore function( CuratorFramework client, Configuration configuration, Executor executor) throws Exception { checkNotNull(configuration, STR); RetrievableStateStorageHelper<SubmittedJobGraph> stateStorage = createFileSystemStateStorage(configuration, STR); String zooKeeperSubmittedJobsPa... | /**
* Creates a {@link ZooKeeperSubmittedJobGraphStore} instance.
*
* @param client The {@link CuratorFramework} ZooKeeper client to use
* @param configuration {@link Configuration} object
* @param executor to run ZooKeeper callbacks
* @return {@link ZooKeeperSubmittedJobGraphStore} instance
* @thr... | Creates a <code>ZooKeeperSubmittedJobGraphStore</code> instance | createSubmittedJobGraphs | {
"repo_name": "WangTaoTheTonic/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java",
"license": "apache-2.0",
"size": 15636
} | [
"java.util.concurrent.Executor",
"org.apache.curator.framework.CuratorFramework",
"org.apache.flink.configuration.ConfigConstants",
"org.apache.flink.configuration.Configuration",
"org.apache.flink.runtime.jobmanager.SubmittedJobGraph",
"org.apache.flink.runtime.jobmanager.ZooKeeperSubmittedJobGraphStore"... | import java.util.concurrent.Executor; import org.apache.curator.framework.CuratorFramework; import org.apache.flink.configuration.ConfigConstants; import org.apache.flink.configuration.Configuration; import org.apache.flink.runtime.jobmanager.SubmittedJobGraph; import org.apache.flink.runtime.jobmanager.ZooKeeperSubmit... | import java.util.concurrent.*; import org.apache.curator.framework.*; import org.apache.flink.configuration.*; import org.apache.flink.runtime.jobmanager.*; import org.apache.flink.runtime.zookeeper.*; import org.apache.flink.util.*; | [
"java.util",
"org.apache.curator",
"org.apache.flink"
] | java.util; org.apache.curator; org.apache.flink; | 2,833,171 |
public static void sqldayofweek(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException {
if (parsedArgs.size() != 1) {
throw new PSQLException(GT.tr("{0} function takes one and only one argument.", "dayofweek"),
PSQLState.SYNTAX_ERROR);
}
appendCall(buf, "extract(d... | static void function(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { if (parsedArgs.size() != 1) { throw new PSQLException(GT.tr(STR, STR), PSQLState.SYNTAX_ERROR); } appendCall(buf, STR, ",", ")+1", parsedArgs); } | /**
* dayofweek translation adding 1 to postgresql function since we expect values from 1 to 7
*
* @param buf The buffer to append into
* @param parsedArgs arguments
* @throws SQLException if something wrong happens
*/ | dayofweek translation adding 1 to postgresql function since we expect values from 1 to 7 | sqldayofweek | {
"repo_name": "golovnin/pgjdbc",
"path": "pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java",
"license": "bsd-2-clause",
"size": 25169
} | [
"java.sql.SQLException",
"java.util.List",
"org.postgresql.util.GT",
"org.postgresql.util.PSQLException",
"org.postgresql.util.PSQLState"
] | import java.sql.SQLException; import java.util.List; import org.postgresql.util.GT; import org.postgresql.util.PSQLException; import org.postgresql.util.PSQLState; | import java.sql.*; import java.util.*; import org.postgresql.util.*; | [
"java.sql",
"java.util",
"org.postgresql.util"
] | java.sql; java.util; org.postgresql.util; | 1,012,319 |
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE);
} | String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); } | /**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/ | Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin | toString | {
"repo_name": "fpompermaier/onvif",
"path": "onvif-ws-client/src/main/java/org/onvif/ver10/schema/FocusConfiguration.java",
"license": "apache-2.0",
"size": 5469
} | [
"org.apache.commons.lang3.builder.ToStringBuilder",
"org.apache.cxf.xjc.runtime.JAXBToStringStyle"
] | import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle; | import org.apache.commons.lang3.builder.*; import org.apache.cxf.xjc.runtime.*; | [
"org.apache.commons",
"org.apache.cxf"
] | org.apache.commons; org.apache.cxf; | 549,970 |
GroupFetchScanController openGroupFetchScan(
long conglomId,
boolean hold,
int open_mode,
int lock_level,
int isolation_level,
FormatableBitSet ... | GroupFetchScanController openGroupFetchScan( long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier[][], DataValueDescriptor[] stopKeyValue, int stopSearchOperator) throws Standa... | /**
* Open a scan which gets copies of multiple rows at a time.
* <p>
* All inputs work exactly as in openScan(). The return is
* a GroupFetchScanController, which only allows fetches of groups
* of rows from the conglomerate.
* <p>
*
* @return The GroupFetchScanController to be u... | Open a scan which gets copies of multiple rows at a time. All inputs work exactly as in openScan(). The return is a GroupFetchScanController, which only allows fetches of groups of rows from the conglomerate. | openGroupFetchScan | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/iapi/store/access/TransactionController.java",
"license": "apache-2.0",
"size": 89495
} | [
"org.apache.derby.iapi.services.io.FormatableBitSet",
"org.apache.derby.iapi.types.DataValueDescriptor",
"org.apache.derby.shared.common.error.StandardException"
] | import org.apache.derby.iapi.services.io.FormatableBitSet; import org.apache.derby.iapi.types.DataValueDescriptor; import org.apache.derby.shared.common.error.StandardException; | import org.apache.derby.iapi.services.io.*; import org.apache.derby.iapi.types.*; import org.apache.derby.shared.common.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 2,808,820 |
public static <T> T first( @This Iterable<T> thiz )
{
if( thiz instanceof List )
{
return ((List<T>)thiz).first();
}
else
{
Iterator<T> iterator = thiz.iterator();
if( !iterator.hasNext() )
{
throw new NoSuchElementException( "Collection is empty." );
}
... | static <T> T function( @This Iterable<T> thiz ) { if( thiz instanceof List ) { return ((List<T>)thiz).first(); } else { Iterator<T> iterator = thiz.iterator(); if( !iterator.hasNext() ) { throw new NoSuchElementException( STR ); } return iterator.next(); } } | /**
* Returns first element.
*
* @throws NoSuchElementException if the collection is empty.
*/ | Returns first element | first | {
"repo_name": "manifold-systems/manifold",
"path": "manifold-deps-parent/manifold-collections/src/main/java/manifold/collections/extensions/java/lang/Iterable/ManIterableExt.java",
"license": "apache-2.0",
"size": 25260
} | [
"java.util.Iterator",
"java.util.List",
"java.util.NoSuchElementException"
] | import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 767,011 |
@CanIgnoreReturnValue
public static long copy(Readable from, Appendable to) throws IOException {
checkNotNull(from);
checkNotNull(to);
CharBuffer buf = createBuffer();
long total = 0;
while (from.read(buf) != -1) {
buf.flip();
to.append(buf);
total += buf.remaining();
buf... | static long function(Readable from, Appendable to) throws IOException { checkNotNull(from); checkNotNull(to); CharBuffer buf = createBuffer(); long total = 0; while (from.read(buf) != -1) { buf.flip(); to.append(buf); total += buf.remaining(); buf.clear(); } return total; } | /**
* Copies all characters between the {@link Readable} and {@link Appendable} objects. Does not
* close or flush either object.
*
* @param from the object to read from
* @param to the object to write to
* @return the number of characters copied
* @throws IOException if an I/O error occurs
*/ | Copies all characters between the <code>Readable</code> and <code>Appendable</code> objects. Does not close or flush either object | copy | {
"repo_name": "simonzhangsm/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/io/CharStreams.java",
"license": "agpl-3.0",
"size": 8230
} | [
"com.google_voltpatches.common.base.Preconditions",
"java.io.IOException",
"java.nio.CharBuffer"
] | import com.google_voltpatches.common.base.Preconditions; import java.io.IOException; import java.nio.CharBuffer; | import com.google_voltpatches.common.base.*; import java.io.*; import java.nio.*; | [
"com.google_voltpatches.common",
"java.io",
"java.nio"
] | com.google_voltpatches.common; java.io; java.nio; | 2,745,381 |
protected BufferedImage loadImage(String filename) throws IOException {
File file = new File(filename);
BufferedImage result = ImageIO.read(file);
return result;
} | BufferedImage function(String filename) throws IOException { File file = new File(filename); BufferedImage result = ImageIO.read(file); return result; } | /**
* Loads an image.
*
* @param filename the name of the file from which the image file
* @return loaded image
* @throws IOException if reading the file fails
*/ | Loads an image | loadImage | {
"repo_name": "sourceress-project/archestica",
"path": "src/games/stendhal/tools/charas/CharasConverter.java",
"license": "gpl-2.0",
"size": 6272
} | [
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.IOException",
"javax.imageio.ImageIO"
] | import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; | import java.awt.image.*; import java.io.*; import javax.imageio.*; | [
"java.awt",
"java.io",
"javax.imageio"
] | java.awt; java.io; javax.imageio; | 964,504 |
public static String getAllOwnerEmailsString(@Nonnull OwnershipDescription descr) {
StringBuilder coownerEmails=new StringBuilder();
for (String coownerEmail : getSecondaryOwnerEmails(descr, true)) {
if (coownerEmails.length() != 0) {
coownerEmails.append(",");
... | static String function(@Nonnull OwnershipDescription descr) { StringBuilder coownerEmails=new StringBuilder(); for (String coownerEmail : getSecondaryOwnerEmails(descr, true)) { if (coownerEmails.length() != 0) { coownerEmails.append(","); } coownerEmails.append(coownerEmail); } return coownerEmails.toString(); } | /**
* Gets e-mails of secondary owners (including primary owner).
* @param descr Ownership description
* @return Comma-separated list of secondary owner e-mails (may be empty)
* @since 0.9
*/ | Gets e-mails of secondary owners (including primary owner) | getAllOwnerEmailsString | {
"repo_name": "jenkinsci/ownership-plugin",
"path": "src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/OwnershipDescriptionHelper.java",
"license": "mit",
"size": 6809
} | [
"com.synopsys.arc.jenkins.plugins.ownership.OwnershipDescription",
"javax.annotation.Nonnull"
] | import com.synopsys.arc.jenkins.plugins.ownership.OwnershipDescription; import javax.annotation.Nonnull; | import com.synopsys.arc.jenkins.plugins.ownership.*; import javax.annotation.*; | [
"com.synopsys.arc",
"javax.annotation"
] | com.synopsys.arc; javax.annotation; | 1,466,362 |
public JsonContentAssert isEqualToJson(byte[] expected) {
String expectedJson = this.loader.getJson(expected);
return assertNotFailed(compare(expectedJson, JSONCompareMode.LENIENT));
} | JsonContentAssert function(byte[] expected) { String expectedJson = this.loader.getJson(expected); return assertNotFailed(compare(expectedJson, JSONCompareMode.LENIENT)); } | /**
* Verifies that the actual value is {@link JSONCompareMode#LENIENT leniently} equal
* to the specified JSON bytes.
* @param expected the expected JSON bytes
* @return {@code this} assertion object
* @throws AssertionError if the actual JSON value is not equal to the given one
*/ | Verifies that the actual value is <code>JSONCompareMode#LENIENT leniently</code> equal to the specified JSON bytes | isEqualToJson | {
"repo_name": "ptahchiev/spring-boot",
"path": "spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JsonContentAssert.java",
"license": "apache-2.0",
"size": 46401
} | [
"org.skyscreamer.jsonassert.JSONCompareMode"
] | import org.skyscreamer.jsonassert.JSONCompareMode; | import org.skyscreamer.jsonassert.*; | [
"org.skyscreamer.jsonassert"
] | org.skyscreamer.jsonassert; | 1,948,718 |
@Nullable
public static List<S2Point> parsePoints(String str) {
List<S2LatLng> latlngs = parseLatLngs(str);
if (latlngs == null) {
return null;
}
List<S2Point> vertices = new ArrayList<>();
for (S2LatLng latlng : latlngs) {
vertices.add(latlng.toPoint());
}
return vertices;
... | static List<S2Point> function(String str) { List<S2LatLng> latlngs = parseLatLngs(str); if (latlngs == null) { return null; } List<S2Point> vertices = new ArrayList<>(); for (S2LatLng latlng : latlngs) { vertices.add(latlng.toPoint()); } return vertices; } | /**
* As above, but does not CHECK-fail on invalid input. Returns null if conversion is unsuccessful.
*/ | As above, but does not CHECK-fail on invalid input. Returns null if conversion is unsuccessful | parsePoints | {
"repo_name": "google/s2-geometry-library-java",
"path": "src/com/google/common/geometry/S2TextFormat.java",
"license": "apache-2.0",
"size": 24504
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,583,426 |
public void deserializeSnapshot(InputArchive ia) throws IOException {
clear();
SerializeUtils.deserializeSnapshot(getDataTree(),ia,getSessionWithTimeOuts());
initialized = true;
} | void function(InputArchive ia) throws IOException { clear(); SerializeUtils.deserializeSnapshot(getDataTree(),ia,getSessionWithTimeOuts()); initialized = true; } | /**
* deserialize a snapshot from an input archive
* @param ia the input archive you want to deserialize from
* @throws IOException
*/ | deserialize a snapshot from an input archive | deserializeSnapshot | {
"repo_name": "tenaciousjzh/titan-solr-cloud-test",
"path": "zookeeper-3.3.5/src/java/main/org/apache/zookeeper/server/ZKDatabase.java",
"license": "apache-2.0",
"size": 15873
} | [
"java.io.IOException",
"org.apache.jute.InputArchive",
"org.apache.zookeeper.server.util.SerializeUtils"
] | import java.io.IOException; import org.apache.jute.InputArchive; import org.apache.zookeeper.server.util.SerializeUtils; | import java.io.*; import org.apache.jute.*; import org.apache.zookeeper.server.util.*; | [
"java.io",
"org.apache.jute",
"org.apache.zookeeper"
] | java.io; org.apache.jute; org.apache.zookeeper; | 2,315,054 |
public List<Table> getTables() {
return tables;
}
| List<Table> function() { return tables; } | /**
* Returns a list of tables
*
* @return a list of tables found in the Mork document
*/ | Returns a list of tables | getTables | {
"repo_name": "ibauersachs/jmork",
"path": "src/main/java/mork/MorkDocument.java",
"license": "epl-1.0",
"size": 3265
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 238,612 |
public static Quaternionf fromAngleRadAxis(float angle, Vector3f axis) {
return fromAngleRadAxis(angle, axis.getX(), axis.getY(), axis.getZ());
} | static Quaternionf function(float angle, Vector3f axis) { return fromAngleRadAxis(angle, axis.getX(), axis.getY(), axis.getZ()); } | /**
* Creates a new quaternion from the rotation float angle in radians around the axis vector.
*
* @param angle The rotation angle in radians
* @param axis The axis of rotation
* @return The quaternion defined by the rotation around the axis
*/ | Creates a new quaternion from the rotation float angle in radians around the axis vector | fromAngleRadAxis | {
"repo_name": "DragonSphereZ/DragonSphereZ",
"path": "src/com/flowpowered/math/imaginary/Quaternionf.java",
"license": "mit",
"size": 29581
} | [
"com.flowpowered.math.vector.Vector3f"
] | import com.flowpowered.math.vector.Vector3f; | import com.flowpowered.math.vector.*; | [
"com.flowpowered.math"
] | com.flowpowered.math; | 1,286,041 |
private boolean tempDump() throws RepositoryException {
if (isCreateTempDump() && !_tempDumped) {
if (_repository.getNotInUseDBNames().contains(getDatabaseName())) {
// do not dump if database is inconsistent
_tempDumped = false;
actionMessage(Stri... | boolean function() throws RepositoryException { if (isCreateTempDump() && !_tempDumped) { if (_repository.getNotInUseDBNames().contains(getDatabaseName())) { _tempDumped = false; actionMessage(Strings.padWithDots(STR) + STR); } else { if (_repository.getDumpNames(getDatabaseName()).contains(DBSchemaSynchronizer.TEMP_DU... | /**
* temp dump database
*
* @return true if setted QuestionEvent
*/ | temp dump database | tempDump | {
"repo_name": "mozartframework/cms",
"path": "src/com/mozartframework/repository/DBSchemaSynchronizer.java",
"license": "gpl-3.0",
"size": 7016
} | [
"com.mozartframework.util.Strings"
] | import com.mozartframework.util.Strings; | import com.mozartframework.util.*; | [
"com.mozartframework.util"
] | com.mozartframework.util; | 381,816 |
@Test
void createdSutShouldHaveZeroCoordinates()
{
CartesianCoordinate p = new CartesianCoordinate();
assertThat(p.getX()).isEqualTo(0.0, offset(1E-10));
assertThat(p.getY()).isEqualTo(0.0, offset(1E-10));
assertThat(p.getZ()).isEqualTo(0.0, offset(1E-10));
} | void createdSutShouldHaveZeroCoordinates() { CartesianCoordinate p = new CartesianCoordinate(); assertThat(p.getX()).isEqualTo(0.0, offset(1E-10)); assertThat(p.getY()).isEqualTo(0.0, offset(1E-10)); assertThat(p.getZ()).isEqualTo(0.0, offset(1E-10)); } | /**
* Verify if the default constructor sets all variables zero.
*/ | Verify if the default constructor sets all variables zero | createdSutShouldHaveZeroCoordinates | {
"repo_name": "cksystemsgroup/cpcc",
"path": "cpcc-core/src/test/java/cpcc/core/utils/CartesianCoordinateTestCase.java",
"license": "gpl-3.0",
"size": 12203
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 2,754,588 |
public Point worldToViewGL(Vector2D worldPos) {
Vector2D viewpos = worldPos.add(offset).scalar(tileSize*zoom);
return new Point((int)viewpos.x,(int)viewpos.y);
}
| Point function(Vector2D worldPos) { Vector2D viewpos = worldPos.add(offset).scalar(tileSize*zoom); return new Point((int)viewpos.x,(int)viewpos.y); } | /**
* Returns viewport coordinates for a world coordinate, with low y-coordinates at the bottom of the screen. Used for fragment shaders.
* @param worldPos world position
* @return viewport position in pixels
*/ | Returns viewport coordinates for a world coordinate, with low y-coordinates at the bottom of the screen. Used for fragment shaders | worldToViewGL | {
"repo_name": "Henning1/Battlepath",
"path": "src/game/View.java",
"license": "gpl-3.0",
"size": 7586
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,629,114 |
public static List<String> findAnnotatedClasses(String[] strPathsOrJars,
final Class<? extends Annotation>[] annotations, final boolean innerClasses)
throws IOException {
return findClassesThatExtend(strPathsOrJars, annotations, innerClasses, null, null, true);
}
| static List<String> function(String[] strPathsOrJars, final Class<? extends Annotation>[] annotations, final boolean innerClasses) throws IOException { return findClassesThatExtend(strPathsOrJars, annotations, innerClasses, null, null, true); } | /**
* Find classes in the provided path(s)/jar(s) that extend the class(es).
* @param strPathsOrJars - pathnames or jarfiles to search for classes
* @param annotations - required annotations
* @param innerClasses - should we include inner classes?
*
* @return List containing discover... | Find classes in the provided path(s)/jar(s) that extend the class(es) | findAnnotatedClasses | {
"repo_name": "saketh7/Jmeter",
"path": "src/jorphan/org/apache/jorphan/reflect/ClassFinder.java",
"license": "apache-2.0",
"size": 23719
} | [
"java.io.IOException",
"java.lang.annotation.Annotation",
"java.util.List"
] | import java.io.IOException; import java.lang.annotation.Annotation; import java.util.List; | import java.io.*; import java.lang.annotation.*; import java.util.*; | [
"java.io",
"java.lang",
"java.util"
] | java.io; java.lang; java.util; | 2,171,964 |
public void setSourceTreeManager(SourceTreeManager mgr)
{
m_sourceTreeManager = mgr;
}
// =================================================
private ErrorListener m_errorListener;
private ErrorListener m_defaultErrorListener; | void function(SourceTreeManager mgr) { m_sourceTreeManager = mgr; } private ErrorListener m_errorListener; private ErrorListener m_defaultErrorListener; | /**
* Set the SourceTreeManager associated with this execution context.
*
* @param mgr the SourceTreeManager to be associated with this
* execution context.
*/ | Set the SourceTreeManager associated with this execution context | setSourceTreeManager | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xpath/internal/XPathContext.java",
"license": "mit",
"size": 40914
} | [
"javax.xml.transform.ErrorListener"
] | import javax.xml.transform.ErrorListener; | import javax.xml.transform.*; | [
"javax.xml"
] | javax.xml; | 43,523 |
public void removeLayoutComponent(Component c) {} | public void removeLayoutComponent(Component c) {} | /**
* Required by {@link LayoutManager} but no-op implementation in our case.
* @see LayoutManager#addLayoutComponent(String, Component)
*/ | Required by <code>LayoutManager</code> but no-op implementation in our case | addLayoutComponent | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/tpane/TinyPaneLayout.java",
"license": "gpl-2.0",
"size": 3858
} | [
"java.awt.Component"
] | import java.awt.Component; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,754,291 |
public ServiceCall<Map<String, String>> getInvalidAsync(final ServiceCallback<Map<String, String>> serviceCallback) {
return ServiceCall.fromResponse(getInvalidWithServiceResponseAsync(), serviceCallback);
} | ServiceCall<Map<String, String>> function(final ServiceCallback<Map<String, String>> serviceCallback) { return ServiceCall.fromResponse(getInvalidWithServiceResponseAsync(), serviceCallback); } | /**
* Get invalid Dictionary value.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceCall} object
*/ | Get invalid Dictionary value | getInvalidAsync | {
"repo_name": "matthchr/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java",
"license": "mit",
"size": 210563
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.Map"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,119,841 |
EReference getPropertiesSetStyle_PropertiesMap(); | EReference getPropertiesSetStyle_PropertiesMap(); | /**
* Returns the meta object for the map '{@link org.eclipse.gmf.runtime.notation.PropertiesSetStyle#getPropertiesMap <em>Properties Map</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the map '<em>Properties Map</em>'.
* @see org.eclipse.gmf.runtime.notation.Propertie... | Returns the meta object for the map '<code>org.eclipse.gmf.runtime.notation.PropertiesSetStyle#getPropertiesMap Properties Map</code>'. | getPropertiesSetStyle_PropertiesMap | {
"repo_name": "ghillairet/gmf-tooling-gwt-runtime",
"path": "org.eclipse.gmf.runtime.notation.gwt/src/org/eclipse/gmf/runtime/notation/NotationPackage.java",
"license": "epl-1.0",
"size": 270096
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 132,837 |
public synchronized void stop() throws LifecycleException {
// Validate and update our current component state
if (!started)
throw new LifecycleException
(sm.getString("fastEngineMapper.notStarted",
engine.getName()));
// No... | synchronized void function() throws LifecycleException { if (!started) throw new LifecycleException (sm.getString(STR, engine.getName())); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; engine.removePropertyChangeListener(this); setDefaultHost(null); engine.removeContainerListener(this); cache.clear()... | /**
* Gracefully shut down active use of the public methods of this Component.
*
* @exception LifecycleException if this component detects a fatal error
* that needs to be reported
*/ | Gracefully shut down active use of the public methods of this Component | stop | {
"repo_name": "c-rainstorm/jerrydog",
"path": "src/main/java/org/apache/catalina/core/FastEngineMapper.java",
"license": "gpl-3.0",
"size": 15432
} | [
"org.apache.catalina.LifecycleException"
] | import org.apache.catalina.LifecycleException; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,518,855 |
public void addModelWithFixedDuration(Model newModel, double exitPenalty, double loopPenalty, int duration) {
addModelWithDurationConstraint(newModel, exitPenalty, loopPenalty, FIXED_DURATION_CONSTRAINT, duration);
} | void function(Model newModel, double exitPenalty, double loopPenalty, int duration) { addModelWithDurationConstraint(newModel, exitPenalty, loopPenalty, FIXED_DURATION_CONSTRAINT, duration); } | /**
* Adds the model with fixed duration.
*
* @param newModel the new model
* @param exitPenalty the exit penalty (state i to state j)
* @param loopPenalty the loop penalty (state i to state i)
* @param duration the duration
*/ | Adds the model with fixed duration | addModelWithFixedDuration | {
"repo_name": "ArtemMy/CallRec",
"path": "app/src/main/java/fr/lium/spkDiarization/libDecoder/DecoderWithDuration.java",
"license": "gpl-3.0",
"size": 29987
} | [
"fr.lium.spkDiarization.libModel.Model"
] | import fr.lium.spkDiarization.libModel.Model; | import fr.lium.*; | [
"fr.lium"
] | fr.lium; | 748,888 |
Collection<UmlModelElementListener> getModelElementListeners();
| Collection<UmlModelElementListener> getModelElementListeners(); | /**
* Returns the UmlModelElementListeners for testing.
* @return the UmlModelElementListeners
*/ | Returns the UmlModelElementListeners for testing | getModelElementListeners | {
"repo_name": "ligenzatomas/firebird-vizualization-tool",
"path": "src/main/java/org/tinyuml/model/UmlModelElement.java",
"license": "gpl-2.0",
"size": 2166
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 13,962 |
private List<Phenomenon> removeDuplicatePhenomena(List<Phenomenon> phenomena) {
List<Phenomenon> filteredPhenomena = new ArrayList<Phenomenon>();
Set<String> set = new HashSet<String>();
for(Phenomenon phenomenon : phenomena){
if(!set.contains(phenomenon.getId())){
filteredPhenomena.add(phenomenon);
... | List<Phenomenon> function(List<Phenomenon> phenomena) { List<Phenomenon> filteredPhenomena = new ArrayList<Phenomenon>(); Set<String> set = new HashSet<String>(); for(Phenomenon phenomenon : phenomena){ if(!set.contains(phenomenon.getId())){ filteredPhenomena.add(phenomenon); set.add(phenomenon.getId()); } } return fil... | /**
* A station can have more than one phenomenon with the same id, but the height
* of the phenomenon must be different.
*
* @param phenomena - the list of phenomena to remove duplicates from
* @return a list of phenomena with the duplicate phenomena id removed.
*/ | A station can have more than one phenomenon with the same id, but the height of the phenomenon must be different | removeDuplicatePhenomena | {
"repo_name": "ioos/sos-injector",
"path": "src/main/java/com/axiomalaska/sos/xmlbuilder/SensorSensorMLBuilder.java",
"license": "unlicense",
"size": 4986
} | [
"com.axiomalaska.phenomena.Phenomenon",
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import com.axiomalaska.phenomena.Phenomenon; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; | import com.axiomalaska.phenomena.*; import java.util.*; | [
"com.axiomalaska.phenomena",
"java.util"
] | com.axiomalaska.phenomena; java.util; | 173,447 |
private void inlineEmptyMethod(NodeTraversal t, Node parent, Node call) {
// If the return value of the method call is read,
// replace it with "void 0". Otherwise, remove the call entirely.
if (NodeUtil.isExprCall(parent)) {
parent.replaceWith(IR.empty());
NodeUtil.markFunctionsDeleted(paren... | void function(NodeTraversal t, Node parent, Node call) { if (NodeUtil.isExprCall(parent)) { parent.replaceWith(IR.empty()); NodeUtil.markFunctionsDeleted(parent, compiler); } else { Node srcLocation = call; parent.replaceChild(call, NodeUtil.newUndefinedNode(srcLocation)); NodeUtil.markFunctionsDeleted(call, compiler);... | /**
* Remove the provided object and its method call.
*/ | Remove the provided object and its method call | inlineEmptyMethod | {
"repo_name": "Yannic/closure-compiler",
"path": "src/com/google/javascript/jscomp/InlineSimpleMethods.java",
"license": "apache-2.0",
"size": 9131
} | [
"com.google.javascript.rhino.IR",
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,523,265 |
public static void loadMenu(final Menu popupMenu, MenuBranch menu) {
List<MenuNode> allNodes = menu.getAllNodes();
for (MenuNode node : allNodes) {
if (node.isSeparator()) {
popupMenu.addDivider();
} else if (node.getSubMenu() != null) {
Pair<Menu, MenuItem> subMenu = popupMenu.cr... | static void function(final Menu popupMenu, MenuBranch menu) { List<MenuNode> allNodes = menu.getAllNodes(); for (MenuNode node : allNodes) { if (node.isSeparator()) { popupMenu.addDivider(); } else if (node.getSubMenu() != null) { Pair<Menu, MenuItem> subMenu = popupMenu.createSubMenu(node.getText(), true); Menu mm = s... | /**
* Renders vertical sub-menus. This does not handle recursive menus.
*
* @param popupMenu is the destination UI component to be rendered.
* @param menu is the sub-menu to be rendered into <code>popupMenu</code>.
*/ | Renders vertical sub-menus. This does not handle recursive menus | loadMenu | {
"repo_name": "vega113/incubator-wave",
"path": "wave/src/main/java/org/waveprotocol/wave/client/widget/menu/MenuBuilder.java",
"license": "apache-2.0",
"size": 2656
} | [
"java.util.List",
"org.waveprotocol.wave.model.util.Pair"
] | import java.util.List; import org.waveprotocol.wave.model.util.Pair; | import java.util.*; import org.waveprotocol.wave.model.util.*; | [
"java.util",
"org.waveprotocol.wave"
] | java.util; org.waveprotocol.wave; | 244,862 |
protected void checkSupported(AuthType authType) {
switch (authType) {
case NOSASL:
case SIMPLE:
case CUSTOM:
return;
default:
throw new RuntimeException("Authentication type not supported:" + authType.name());
}
}
class AuthenticatedChannelInfo {
private Lo... | void function(AuthType authType) { switch (authType) { case NOSASL: case SIMPLE: case CUSTOM: return; default: throw new RuntimeException(STR + authType.name()); } } class AuthenticatedChannelInfo { private LocalTime mLastAccessTime; private AuthenticatedUserInfo mUserInfo; private AuthenticatedChannelServerDriver mSas... | /**
* Used to check if given authentication is supported by the server.
*
* @param authType authentication type
* @throws RuntimeException if not supported
*/ | Used to check if given authentication is supported by the server | checkSupported | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "core/common/src/main/java/alluxio/security/authentication/DefaultAuthenticationServer.java",
"license": "apache-2.0",
"size": 8738
} | [
"java.time.LocalTime"
] | import java.time.LocalTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,049,930 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.