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 void copyFile(File source, File target) throws Exception { FileInputStream fis = new FileInputStream(source); FileOutputStream fos = new FileOutputStream(target); FileChannel inChannel = fis.getChannel(); FileChannel outChannel = fos.getChannel(); // inChannel.transferTo(0, inChannel.size()...
static void function(File source, File target) throws Exception { FileInputStream fis = new FileInputStream(source); FileOutputStream fos = new FileOutputStream(target); FileChannel inChannel = fis.getChannel(); FileChannel outChannel = fos.getChannel(); int maxCount = (64 * 1024 * 1024) - (32 * 1024); long size = inCh...
/** * fast file copy */
fast file copy
copyFile
{ "repo_name": "mys3lf/recalot.com", "path": "com.recalot.model.rec.recommender.librec/src/librec/util/FileIO.java", "license": "gpl-3.0", "size": 19193 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileOutputStream", "java.nio.channels.FileChannel" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.nio.channels.FileChannel;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,478,056
public static <K, V extends Comparable<V>> List<K> sortMapAndLimitToList(Map<K, V> map,int k,boolean keepHighest) { List<Entry<K, V>> sorted = sortByValue(map); if (keepHighest) Collections.reverse(sorted); List<K> res = new ArrayList<>(); int count = 0; for(Map.Entry<K, V> e : sorted) { if (count>...
static <K, V extends Comparable<V>> List<K> function(Map<K, V> map,int k,boolean keepHighest) { List<Entry<K, V>> sorted = sortByValue(map); if (keepHighest) Collections.reverse(sorted); List<K> res = new ArrayList<>(); int count = 0; for(Map.Entry<K, V> e : sorted) { if (count>=k) break; else res.add(e.getKey()); coun...
/** * Generic method to sort a map by value and then return the top k keys * @param <K> * @param <V> * @param map * @param k * @return */
Generic method to sort a map by value and then return the top k keys
sortMapAndLimitToList
{ "repo_name": "tmylk/seldon-server", "path": "server/src/io/seldon/util/CollectionTools.java", "license": "apache-2.0", "size": 6089 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,315,161
ServiceResponse<String> loginUser() throws ServiceException, IOException;
ServiceResponse<String> loginUser() throws ServiceException, IOException;
/** * Logs user into the system. * * @throws ServiceException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the String object wrapped in {@link ServiceResponse} if successful. */
Logs user into the system
loginUser
{ "repo_name": "xingwu1/autorest", "path": "Samples/petstore/Java/SwaggerPetstore.java", "license": "mit", "size": 35698 }
[ "com.microsoft.rest.ServiceException", "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
1,510,997
public static ClassNode createRootNode(Ontology o, MappingDefinition mapping, Map<String, ClassNode> nameVsNode, boolean properties) { if (null == o || null == nameVsNode || null == mapping) System.err.println("mapping, nameVsNode or ontology-o is null."); ClassNode root = new ClassNode(o); Iterator<...
static ClassNode function(Ontology o, MappingDefinition mapping, Map<String, ClassNode> nameVsNode, boolean properties) { if (null == o null == nameVsNode null == mapping) System.err.println(STR); ClassNode root = new ClassNode(o); Iterator<OClass> itops = o.getOClasses(true).iterator(); Vector<ClassNode> kids = new Ve...
/** Creates a structure representing the class hierarchy of an ontology * and the gazetteerLists mapped to it. * @param o an ontology * @param mapping mapping definition * @param nameVsNode : this is actually a return value: should be * initialized before passing to this method and afterwards one ca...
Creates a structure representing the class hierarchy of an ontology and the gazetteerLists mapped to it
createRootNode
{ "repo_name": "mr-justin/gate-semano", "path": "src/com/ontotext/gate/vr/ClassNode.java", "license": "lgpl-3.0", "size": 13033 }
[ "java.util.Iterator", "java.util.Map", "java.util.Vector" ]
import java.util.Iterator; import java.util.Map; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,050,442
distPollerDao = _distPollerDao; } @SuppressWarnings("unused") private AssetRecordDao _assetRecordDao;
distPollerDao = _distPollerDao; } @SuppressWarnings(STR) private AssetRecordDao _assetRecordDao;
/** * Used by Spring Application context to pass in distPollerDao; * * @param _distPollerDao a {@link org.opennms.netmgt.dao.api.DistPollerDao} object. */
Used by Spring Application context to pass in distPollerDao
setDistPollerDao
{ "repo_name": "tdefilip/opennms", "path": "opennms-tools/opennms-qosdaemon/src/main/java/org/openoss/opennms/spring/dao/OnmsAlarmOssjMapper.java", "license": "agpl-3.0", "size": 31800 }
[ "org.opennms.netmgt.dao.api.AssetRecordDao" ]
import org.opennms.netmgt.dao.api.AssetRecordDao;
import org.opennms.netmgt.dao.api.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
2,821,543
T visitBooleanValue(@NotNull CQLParser.BooleanValueContext ctx);
T visitBooleanValue(@NotNull CQLParser.BooleanValueContext ctx);
/** * Visit a parse tree produced by {@link CQLParser#booleanValue}. */
Visit a parse tree produced by <code>CQLParser#booleanValue</code>
visitBooleanValue
{ "repo_name": "HuaweiBigData/StreamCQL", "path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserVisitor.java", "license": "apache-2.0", "size": 29279 }
[ "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,161,087
public LinkedList<Point> getConvexHullList() { return convexHullList; }
LinkedList<Point> function() { return convexHullList; }
/** * Return the pending list of points in convex hull * * @return linkedlist of ch pts */
Return the pending list of points in convex hull
getConvexHullList
{ "repo_name": "Lonkal/ConvexHullApp", "path": "src/com/lonkal/convexhullapp/algorithms/ConvexHullAlgo.java", "license": "mit", "size": 1531 }
[ "java.awt.Point", "java.util.LinkedList" ]
import java.awt.Point; import java.util.LinkedList;
import java.awt.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
688,948
public String encode(String... values) { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); int i = 0; for (String value : values) { builder.put("$" + i++, value); } // We will get an error if there are named bindings which are not reached by values. return instantiat...
String function(String... values) { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); int i = 0; for (String value : values) { builder.put("$" + i++, value); } return instantiate(builder.build()); }
/** * Instantiates the template from the given positional parameters. The template must not be build * from named bindings, but only contain wildcards. Each parameter position corresponds to a * wildcard of the according position in the template. */
Instantiates the template from the given positional parameters. The template must not be build from named bindings, but only contain wildcards. Each parameter position corresponds to a wildcard of the according position in the template
encode
{ "repo_name": "cloudendpoints/endpoints-management-java", "path": "endpoints-control/src/main/java/com/google/api/control/model/PathTemplate.java", "license": "apache-2.0", "size": 33810 }
[ "com.google.common.collect.ImmutableMap" ]
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,379,250
protected SelectedProtocol getProtocol(SSLEngine engine) { String[] protocol = StringUtil.split(engine.getSession().getProtocol(), ':'); if (protocol.length < 2) { // Use HTTP/1.1 as default return SelectedProtocol.HTTP_1_1; } SelectedProtocol selectedProtocol...
SelectedProtocol function(SSLEngine engine) { String[] protocol = StringUtil.split(engine.getSession().getProtocol(), ':'); if (protocol.length < 2) { return SelectedProtocol.HTTP_1_1; } SelectedProtocol selectedProtocol = SelectedProtocol.protocol(protocol[1]); return selectedProtocol; }
/** * Return the {@link SelectedProtocol} for the {@link SSLEngine}. If its not known yet implementations MUST return * {@link SelectedProtocol#UNKNOWN}. * */
Return the <code>SelectedProtocol</code> for the <code>SSLEngine</code>. If its not known yet implementations MUST return <code>SelectedProtocol#UNKNOWN</code>
getProtocol
{ "repo_name": "firebase/netty", "path": "codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyOrHttpChooser.java", "license": "apache-2.0", "size": 6816 }
[ "io.netty.util.internal.StringUtil", "javax.net.ssl.SSLEngine" ]
import io.netty.util.internal.StringUtil; import javax.net.ssl.SSLEngine;
import io.netty.util.internal.*; import javax.net.ssl.*;
[ "io.netty.util", "javax.net" ]
io.netty.util; javax.net;
1,312,770
private static void encodeLiteral(ByteBuf in, ByteBuf out, int length) { if (length < 61) { out.writeByte(length - 1 << 2); } else { int bitLength = bitsToEncode(length - 1); int bytesToEncode = 1 + bitLength / 8; out.writeByte(59 + bytesToEncode << 2)...
static void function(ByteBuf in, ByteBuf out, int length) { if (length < 61) { out.writeByte(length - 1 << 2); } else { int bitLength = bitsToEncode(length - 1); int bytesToEncode = 1 + bitLength / 8; out.writeByte(59 + bytesToEncode << 2); for (int i = 0; i < bytesToEncode; i++) { out.writeByte(length - 1 >> i * 8 & 0...
/** * Writes a literal to the supplied output buffer by directly copying from * the input buffer. The literal is taken from the current readerIndex * up to the supplied length. * * @param in The input buffer to copy from * @param out The output buffer to copy to * @param length The l...
Writes a literal to the supplied output buffer by directly copying from the input buffer. The literal is taken from the current readerIndex up to the supplied length
encodeLiteral
{ "repo_name": "afredlyj/learn-netty", "path": "codec/src/main/java/io/netty/handler/codec/compression/Snappy.java", "license": "apache-2.0", "size": 24570 }
[ "io.netty.buffer.ByteBuf" ]
import io.netty.buffer.ByteBuf;
import io.netty.buffer.*;
[ "io.netty.buffer" ]
io.netty.buffer;
1,056,389
public void removeNodes(int number, String nodeSourceName, boolean preemptive) { int numberOfRemovedNodes = 0; // temporary list to avoid concurrent modification List<RMNode> nodelList = new LinkedList<>(); nodelList.addAll(eligibleNodes); logger.debug("Free nodes size " + ...
void function(int number, String nodeSourceName, boolean preemptive) { int numberOfRemovedNodes = 0; List<RMNode> nodelList = new LinkedList<>(); nodelList.addAll(eligibleNodes); logger.debug(STR + nodelList.size()); for (RMNode node : nodelList) { if (numberOfRemovedNodes == number) { break; } if (node.getNodeSource()...
/** * Removes "number" of nodes from the node source. * * @param number amount of nodes to be released * @param nodeSourceName a node source name * @param preemptive if true remove nodes immediately without waiting while they will be freed */
Removes "number" of nodes from the node source
removeNodes
{ "repo_name": "marcocast/scheduling", "path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/core/RMCore.java", "license": "agpl-3.0", "size": 97022 }
[ "java.util.LinkedList", "java.util.List", "org.ow2.proactive.resourcemanager.rmnode.RMNode" ]
import java.util.LinkedList; import java.util.List; import org.ow2.proactive.resourcemanager.rmnode.RMNode;
import java.util.*; import org.ow2.proactive.resourcemanager.rmnode.*;
[ "java.util", "org.ow2.proactive" ]
java.util; org.ow2.proactive;
1,820,211
@Test public void shouldMarshalAndAddNewColumns() throws Exception { template.sendBody("direct:default", Arrays.asList( asMap("A", "1", "B", "2"), asMap("C", "three", "A", "one", "B", "two") )); result.expectedMessageCount(1); result.asser...
void function() throws Exception { template.sendBody(STR, Arrays.asList( asMap("A", "1", "B", "2"), asMap("C", "three", "A", "one", "B", "two") )); result.expectedMessageCount(1); result.assertIsSatisfied(); String body = assertIsInstanceOf(String.class, result.getExchanges().get(0).getIn().getBody()); assertEquals(joi...
/** * Tests that the marshalling adds new columns on the fly and keep its order */
Tests that the marshalling adds new columns on the fly and keep its order
shouldMarshalAndAddNewColumns
{ "repo_name": "punkhorn/camel-upstream", "path": "components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatMarshalTest.java", "license": "apache-2.0", "size": 5912 }
[ "java.util.Arrays", "org.apache.camel.dataformat.univocity.UniVocityTestHelper" ]
import java.util.Arrays; import org.apache.camel.dataformat.univocity.UniVocityTestHelper;
import java.util.*; import org.apache.camel.dataformat.univocity.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,577,918
public static FlightState blockUntilFlightCompletes( Stairway stairway, Class<? extends Flight> flightClass, FlightMap inputParameters, Duration timeout) throws StairwayException, InterruptedException { String flightId = stairway.createFlightId(); stairway.submit(flightId, flight...
static FlightState function( Stairway stairway, Class<? extends Flight> flightClass, FlightMap inputParameters, Duration timeout) throws StairwayException, InterruptedException { String flightId = stairway.createFlightId(); stairway.submit(flightId, flightClass, inputParameters); return pollUntilComplete(flightId, stai...
/** * Submits the flight and block until Stairway completes it by polling regularly until the timeout * is reached. */
Submits the flight and block until Stairway completes it by polling regularly until the timeout is reached
blockUntilFlightCompletes
{ "repo_name": "databiosphere/terra-common-lib", "path": "src/test/java/bio/terra/common/stairway/test/StairwayTestUtils.java", "license": "bsd-3-clause", "size": 3185 }
[ "bio.terra.stairway.Flight", "bio.terra.stairway.FlightMap", "bio.terra.stairway.FlightState", "bio.terra.stairway.Stairway", "bio.terra.stairway.exception.StairwayException", "java.time.Duration" ]
import bio.terra.stairway.Flight; import bio.terra.stairway.FlightMap; import bio.terra.stairway.FlightState; import bio.terra.stairway.Stairway; import bio.terra.stairway.exception.StairwayException; import java.time.Duration;
import bio.terra.stairway.*; import bio.terra.stairway.exception.*; import java.time.*;
[ "bio.terra.stairway", "java.time" ]
bio.terra.stairway; java.time;
1,676,005
@Deprecated private static ZooKeeperProtos.DeprecatedTableState.State getTableState( final ZooKeeperWatcher zkw, final TableName tableName) throws KeeperException, InterruptedException { String znode = ZKUtil.joinZNode(zkw.znodePaths.tableZNode, tableName.getNameAsString()); byte [] data = ZKUt...
static ZooKeeperProtos.DeprecatedTableState.State function( final ZooKeeperWatcher zkw, final TableName tableName) throws KeeperException, InterruptedException { String znode = ZKUtil.joinZNode(zkw.znodePaths.tableZNode, tableName.getNameAsString()); byte [] data = ZKUtil.getData(zkw, znode); if (data == null data.leng...
/** * Gets table state from ZK. * @param zkw ZooKeeperWatcher instance to use * @param tableName table we're checking * @return Null or {@link ZooKeeperProtos.DeprecatedTableState.State} found in znode. * @throws KeeperException */
Gets table state from ZK
getTableState
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/ZKDataMigrator.java", "license": "apache-2.0", "size": 4337 }
[ "java.io.IOException", "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.exceptions.DeserializationException", "org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil", "org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos", "org.apache.hadoop.hbase.zookeeper.ZKUtil", "org.apache....
import java.io.IOException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.exceptions.DeserializationException; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.shaded.protobuf.generated.ZooKeeperProtos; import org.apache.hadoop.hbase.zookeeper.ZKUtil...
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.exceptions.*; import org.apache.hadoop.hbase.shaded.protobuf.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*;
[ "java.io", "org.apache.hadoop", "org.apache.zookeeper" ]
java.io; org.apache.hadoop; org.apache.zookeeper;
2,791,814
public TViewParamBean getBean(IdentityMap createdBeans) { TViewParamBean result = (TViewParamBean) createdBeans.get(this); if (result != null ) { // we have already created a bean for this object, return it return result; } // no bean exists for this objec...
TViewParamBean function(IdentityMap createdBeans) { TViewParamBean result = (TViewParamBean) createdBeans.get(this); if (result != null ) { return result; } result = new TViewParamBean(); createdBeans.put(this, result); result.setObjectID(getObjectID()); result.setNavigatorLayout(getNavigatorLayout()); result.setParamN...
/** * Creates a TViewParamBean with the contents of this object * intended for internal use only * @param createdBeans a IdentityMap which maps objects * to already created beans * @return a TViewParamBean with the contents of this object */
Creates a TViewParamBean with the contents of this object intended for internal use only
getBean
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTViewParam.java", "license": "gpl-3.0", "size": 26640 }
[ "com.aurel.track.beans.TNavigatorLayoutBean", "com.aurel.track.beans.TViewParamBean", "org.apache.commons.collections.map.IdentityMap" ]
import com.aurel.track.beans.TNavigatorLayoutBean; import com.aurel.track.beans.TViewParamBean; import org.apache.commons.collections.map.IdentityMap;
import com.aurel.track.beans.*; import org.apache.commons.collections.map.*;
[ "com.aurel.track", "org.apache.commons" ]
com.aurel.track; org.apache.commons;
532,494
EReference getFeatureTypeType_Title();
EReference getFeatureTypeType_Title();
/** * Returns the meta object for the containment reference list '{@link net.opengis.wfs20.FeatureTypeType#getTitle <em>Title</em>}'. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @return the meta object for the containment reference list '<em>Title</em>'. * @see net.opengis.wfs20.Featur...
Returns the meta object for the containment reference list '<code>net.opengis.wfs20.FeatureTypeType#getTitle Title</code>'.
getFeatureTypeType_Title
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java", "license": "lgpl-2.1", "size": 404067 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,181,480
private boolean updateESXiServiceSecProto(Integer portNum, List<String> user_secProtosToEnable, List<String> secProtosBeforeChange) throws Exception { boolean isUpdateSuccess = false; if (secProtosBeforeChange != null) { // Check if its valid security protocols combination...
boolean function(Integer portNum, List<String> user_secProtosToEnable, List<String> secProtosBeforeChange) throws Exception { boolean isUpdateSuccess = false; if (secProtosBeforeChange != null) { if (enableSsl) { if (!secProtosBeforeChange.containsAll(defaultSecProtoList)) { System.err.println( PROTO_SSLV3 + STR + STR)...
/** * TLS Security Protocol configuration method for ... Rhttpproxy/Hostd VSANVP SFCBD services */
TLS Security Protocol configuration method for ... Rhttpproxy/Hostd VSANVP SFCBD services
updateESXiServiceSecProto
{ "repo_name": "GururajHegdal/SSLv3-Configuration-Utility-for-VMware-ESXi-5.x", "path": "src/com/vmware/secprotomgmt/ESXi5xSSLConfigUpdater.java", "license": "mit", "size": 118149 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
285,692
public boolean parse(boolean complete) throws XNIException, IOException { try { boolean more = fDocumentScanner.scanDocument(complete); if (!more) { cleanup(); } return more; } catch (XNIException e) { cleanup(); ...
boolean function(boolean complete) throws XNIException, IOException { try { boolean more = fDocumentScanner.scanDocument(complete); if (!more) { cleanup(); } return more; } catch (XNIException e) { cleanup(); throw e; } catch (IOException e) { cleanup(); throw e; } }
/** * Parses the document in a pull parsing fashion. * * @param complete True if the pull parser should parse the * remaining document completely. * * @return True if there is more document to parse. * * @exception XNIException Any XNI exception, possibly wrapping...
Parses the document in a pull parsing fashion
parse
{ "repo_name": "jvshahid/nekohtml", "path": "src/org/cyberneko/html/HTMLConfiguration.java", "license": "apache-2.0", "size": 24441 }
[ "java.io.IOException", "org.apache.xerces.xni.XNIException" ]
import java.io.IOException; import org.apache.xerces.xni.XNIException;
import java.io.*; import org.apache.xerces.xni.*;
[ "java.io", "org.apache.xerces" ]
java.io; org.apache.xerces;
2,728,239
void convertActivities(List<AuditActivity> activities);
void convertActivities(List<AuditActivity> activities);
/** * Convert any given list of audit activities. After the converting, the list will contain copies of the original * activities. * * @param activities * the converted activities */
Convert any given list of audit activities. After the converting, the list will contain copies of the original activities
convertActivities
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/platform/seip-audit/seip-audit-api/src/main/java/com/sirma/itt/emf/audit/converter/AuditActivityConverter.java", "license": "lgpl-3.0", "size": 726 }
[ "com.sirma.itt.emf.audit.activity.AuditActivity", "java.util.List" ]
import com.sirma.itt.emf.audit.activity.AuditActivity; import java.util.List;
import com.sirma.itt.emf.audit.activity.*; import java.util.*;
[ "com.sirma.itt", "java.util" ]
com.sirma.itt; java.util;
1,906,392
public ScopedClassPool createScopedClassPool(ClassLoader cl, ClassPool src) { return factory.create(cl, src, this); }
ScopedClassPool function(ClassLoader cl, ClassPool src) { return factory.create(cl, src, this); }
/** * Create a scoped classpool. * * @param cl the classloader. * @param src the original classpool. * @return the classpool */
Create a scoped classpool
createScopedClassPool
{ "repo_name": "ProfilingLabs/Usemon2", "path": "usemon-agent-commons-java/src/main/java/com/usemon/lib/javassist/scopedpool/ScopedClassPoolRepositoryImpl.java", "license": "mpl-2.0", "size": 5703 }
[ "com.usemon.lib.javassist.ClassPool" ]
import com.usemon.lib.javassist.ClassPool;
import com.usemon.lib.javassist.*;
[ "com.usemon.lib" ]
com.usemon.lib;
1,649,801
private void executeLibtoolInstall() throws BuildException { Commandline cmd = new Commandline(); String libtool=project.getProperty("build.native.libtool"); if(libtool==null) libtool="libtool"; cmd.setExecutable( libtool ); cmd.createArgument().setValue("--mode=install"); cmd.createArgument().setValue( ...
void function() throws BuildException { Commandline cmd = new Commandline(); String libtool=project.getProperty(STR); if(libtool==null) libtool=STR; cmd.setExecutable( libtool ); cmd.createArgument().setValue(STR); cmd.createArgument().setValue( "cp" ); File laFile=new File( buildDir, soFile + ".la" ); cmd.createArgume...
/** Final step using libtool. */
Final step using libtool
executeLibtoolInstall
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-connectors/jk/jkant/java/org/apache/jk/ant/compilers/LibtoolLinker.java", "license": "apache-2.0", "size": 6413 }
[ "java.io.File", "org.apache.tools.ant.BuildException", "org.apache.tools.ant.types.Commandline" ]
import java.io.File; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.Commandline;
import java.io.*; import org.apache.tools.ant.*; import org.apache.tools.ant.types.*;
[ "java.io", "org.apache.tools" ]
java.io; org.apache.tools;
27,347
@Test public void testUnknownJobThrowsException() throws Exception { expectedThrown.expect(IllegalStateException.class); createMockRunner( createMockJob("testUnknownJob-projectId", "testUnknownJob-jobId", State.UNKNOWN)) .run(DirectPipeline.createForTest()); }
void function() throws Exception { expectedThrown.expect(IllegalStateException.class); createMockRunner( createMockJob(STR, STR, State.UNKNOWN)) .run(DirectPipeline.createForTest()); }
/** * Tests that the {@link BlockingDataflowPipelineRunner} throws the appropriate exception * when a job terminates in the {@link State#UNKNOWN UNKNOWN} state, indicating that the * Dataflow service returned a state that the SDK is unfamiliar with (possibly because it * is an old SDK relative the service)....
Tests that the <code>BlockingDataflowPipelineRunner</code> throws the appropriate exception when a job terminates in the <code>State#UNKNOWN UNKNOWN</code> state, indicating that the Dataflow service returned a state that the SDK is unfamiliar with (possibly because it is an old SDK relative the service)
testUnknownJobThrowsException
{ "repo_name": "joshualitt/DataflowJavaSDK", "path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/runners/BlockingDataflowPipelineRunnerTest.java", "license": "apache-2.0", "size": 11418 }
[ "com.google.cloud.dataflow.sdk.PipelineResult" ]
import com.google.cloud.dataflow.sdk.PipelineResult;
import com.google.cloud.dataflow.sdk.*;
[ "com.google.cloud" ]
com.google.cloud;
2,197,499
@Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (args.length == 1 && args[0].equalsIgnoreCase("reload")) { plugin.reload(); sender.sendMessage("Configuration reloaded from disk."); return...
boolean function(CommandSender sender, Command command, String label, String[] args) { if (args.length == 1 && args[0].equalsIgnoreCase(STR)) { plugin.reload(); sender.sendMessage(STR); return true; } if (args.length == 1 && args[0].equalsIgnoreCase(STR)) { if (Localization.makeNewTemplate(plugin)) { sender.sendMessage...
/** * This method handles user commands to reload the plugin configuration and * save new localization file templates. * * Usage: "/displayframes <reload,template>" */
This method handles user commands to reload the plugin configuration and save new localization file templates. Usage: "/displayframes "
onCommand
{ "repo_name": "EasyMFnE/DisplayFrames", "path": "src/main/java/net/easymfne/displayframes/DisplayFramesCommand.java", "license": "gpl-3.0", "size": 2685 }
[ "org.bukkit.command.Command", "org.bukkit.command.CommandSender" ]
import org.bukkit.command.Command; import org.bukkit.command.CommandSender;
import org.bukkit.command.*;
[ "org.bukkit.command" ]
org.bukkit.command;
388,290
public Bitmap getDefaultArtwork() { return defaultArtwork; }
Bitmap function() { return defaultArtwork; }
/** * Returns the default artwork to display. */
Returns the default artwork to display
getDefaultArtwork
{ "repo_name": "jeoliva/ExoPlayer", "path": "library/ui/src/main/java/com/google/android/exoplayer2/ui/SimpleExoPlayerView.java", "license": "apache-2.0", "size": 30219 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,569,739
protected final InetAddress parseAdapterName(String adapter) throws InvalidConfigurationException { NetworkInterface ni = null; try { ni = NetworkInterface.getByName( adapter); } catch (SocketException ex) { throw new InvalidConfigurationException( "Invalid adap...
final InetAddress function(String adapter) throws InvalidConfigurationException { NetworkInterface ni = null; try { ni = NetworkInterface.getByName( adapter); } catch (SocketException ex) { throw new InvalidConfigurationException( STR + adapter); } if ( ni == null) throw new InvalidConfigurationException( STR + adapter...
/** * Parse an adapter name string and return the matching address * * @param adapter String * @return InetAddress * @exception InvalidConfigurationException */
Parse an adapter name string and return the matching address
parseAdapterName
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/filesys/AbstractServerConfigurationBean.java", "license": "lgpl-3.0", "size": 23636 }
[ "java.net.InetAddress", "java.net.NetworkInterface", "java.net.SocketException", "java.util.Enumeration", "org.alfresco.jlan.server.config.InvalidConfigurationException", "org.alfresco.jlan.util.IPAddress", "org.springframework.context.ApplicationContext" ]
import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.Enumeration; import org.alfresco.jlan.server.config.InvalidConfigurationException; import org.alfresco.jlan.util.IPAddress; import org.springframework.context.ApplicationContext;
import java.net.*; import java.util.*; import org.alfresco.jlan.server.config.*; import org.alfresco.jlan.util.*; import org.springframework.context.*;
[ "java.net", "java.util", "org.alfresco.jlan", "org.springframework.context" ]
java.net; java.util; org.alfresco.jlan; org.springframework.context;
1,074,659
public String getKickstartPackageName() { return ConfigDefaults.get().getKickstartPackageName(); }
String function() { return ConfigDefaults.get().getKickstartPackageName(); }
/** * Get the name of the kickstart package this KS will use. * @return String kickstart package like auto-kickstart-ks-rhel-i386-as-4 */
Get the name of the kickstart package this KS will use
getKickstartPackageName
{ "repo_name": "lhellebr/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java", "license": "gpl-2.0", "size": 48289 }
[ "com.redhat.rhn.common.conf.ConfigDefaults" ]
import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.common.conf.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
151,600
public static int size(final Collection<?> c) { return c != null ? c.size() : 0; }
static int function(final Collection<?> c) { return c != null ? c.size() : 0; }
/** * Returns the size of the specified collection or {@code 0} if the collection is {@code null}. * * @param c the collection to check * @return the size of the specified collection or {@code 0} if the collection is {@code null}. * @since 1.2 */
Returns the size of the specified collection or 0 if the collection is null
size
{ "repo_name": "zooltech/samples", "path": "util/src/main/java/com/zt/samples/util/CollectionUtils.java", "license": "apache-2.0", "size": 3367 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,935,333
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ContainerInner>> listByStorageAccountSinglePageAsync( String deviceName, String storageAccountName, String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ContainerInner>> function( String deviceName, String storageAccountName, String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (deviceName == null) { return Mono.e...
/** * Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param storageAccountName The storage Account name. * @param resourceGroupName The resource group name. * @param context The context to associate with th...
Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device
listByStorageAccountSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/ContainersClientImpl.java", "license": "mit", "size": 73548 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.databoxedge.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
96,543
public void scheduleJob(JobSchedulingBundle job) throws SchedulerException { scheduleJob(job, (Scheduler) schedLocal.get(), getOverWriteExistingJobs()); }
void function(JobSchedulingBundle job) throws SchedulerException { scheduleJob(job, (Scheduler) schedLocal.get(), getOverWriteExistingJobs()); }
/** * Schedules a given job and trigger (both wrapped by a <code>JobSchedulingBundle</code>). * * @param job * job wrapper. * @exception SchedulerException * if the Job or Trigger cannot be added to the Scheduler, or * there is an internal Scheduler...
Schedules a given job and trigger (both wrapped by a <code>JobSchedulingBundle</code>)
scheduleJob
{ "repo_name": "chandrasekhar4u/opensymphony-quartz-backup", "path": "trunk/src/java/org/quartz/xml/JobSchedulingDataProcessor.java", "license": "apache-2.0", "size": 52482 }
[ "org.quartz.Scheduler", "org.quartz.SchedulerException" ]
import org.quartz.Scheduler; import org.quartz.SchedulerException;
import org.quartz.*;
[ "org.quartz" ]
org.quartz;
2,324,654
public boolean setAttribute(String name, String value) { if (KuixConstants.ID_ATTRIBUTE.equals(name)) { setId(value); return true; } if (KuixConstants.CLASS_ATTRIBUTE.equals(name)) { setStyleClasses(Kuix.getConverter().convertStyleClasses(value)); return true; } if (KuixConstants.STYLE...
boolean function(String name, String value) { if (KuixConstants.ID_ATTRIBUTE.equals(name)) { setId(value); return true; } if (KuixConstants.CLASS_ATTRIBUTE.equals(name)) { setStyleClasses(Kuix.getConverter().convertStyleClasses(value)); return true; } if (KuixConstants.STYLE_ATTRIBUTE.equals(name)) { parseAuthorStyle(v...
/** * Set the <code>value</code> to the specified attribute representing by * the <code>name</code> * * @param name * @param value * @return <code>true</code> if the attribute exists */
Set the <code>value</code> to the specified attribute representing by the <code>name</code>
setAttribute
{ "repo_name": "Omar913/kuix", "path": "src/org/kalmeo/kuix/widget/Widget.java", "license": "gpl-3.0", "size": 76501 }
[ "org.kalmeo.kuix.core.Kuix", "org.kalmeo.kuix.core.KuixConstants", "org.kalmeo.util.BooleanUtil" ]
import org.kalmeo.kuix.core.Kuix; import org.kalmeo.kuix.core.KuixConstants; import org.kalmeo.util.BooleanUtil;
import org.kalmeo.kuix.core.*; import org.kalmeo.util.*;
[ "org.kalmeo.kuix", "org.kalmeo.util" ]
org.kalmeo.kuix; org.kalmeo.util;
2,303,215
@RequestMapping(method = RequestMethod.POST, value = "/{functionId:.+}", produces = {MediaType.APPLICATION_JSON_VALUE}) @ApiOperation(value = "execute function", notes = "Execute function with arguments on regions, members, or group(s). By default function will be executed on all nodes if none of (onReg...
@RequestMapping(method = RequestMethod.POST, value = STR, produces = {MediaType.APPLICATION_JSON_VALUE}) @ApiOperation(value = STR, notes = STR) @ApiResponses({@ApiResponse(code = 200, message = "OK."), @ApiResponse(code = 401, message = STR), @ApiResponse(code = 403, message = STR), @ApiResponse(code = 500, message = ...
/** * Execute a function on Gemfire data node using REST API call. Arguments to the function are * passed as JSON string in the request body. * * @param functionId represents function to be executed * @param region list of regions on which function to be executed. * @param members list of nodes on whi...
Execute a function on Gemfire data node using REST API call. Arguments to the function are passed as JSON string in the request body
execute
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/FunctionAccessController.java", "license": "apache-2.0", "size": 12057 }
[ "io.swagger.annotations.ApiOperation", "io.swagger.annotations.ApiResponse", "io.swagger.annotations.ApiResponses", "java.util.Collection", "java.util.Set", "org.apache.geode.cache.LowMemoryException", "org.apache.geode.cache.execute.Execution", "org.apache.geode.cache.execute.Function", "org.apache...
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import java.util.Collection; import java.util.Set; import org.apache.geode.cache.LowMemoryException; import org.apache.geode.cache.execute.Execution; import org.apache.geode.cache.execute.F...
import io.swagger.annotations.*; import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.cache.execute.*; import org.apache.geode.internal.cache.execute.*; import org.apache.geode.management.internal.cli.exceptions.*; import org.apache.geode.rest.internal.web.exception.*; import org.apache.geode.re...
[ "io.swagger.annotations", "java.util", "org.apache.geode", "org.springframework.http", "org.springframework.util", "org.springframework.web" ]
io.swagger.annotations; java.util; org.apache.geode; org.springframework.http; org.springframework.util; org.springframework.web;
2,731,910
public int closeSessionsForManager(final String managerUuid) { // Implementation of the following SQL query in memory: // // update session set closed = now() // where closed is null and node in // (select id from Node where uuid = ?) final Node node = cur...
int function(final String managerUuid) { final Node node = currentNodes.get(managerUuid); int modificationCount = 0; if (node != null) { Iterator<Session> i = node.iterateSessions(); while (i.hasNext()) { Session session = i.next(); if (session.getClosed() == null) { session.setClosed( new Timestamp(System.currentTimeM...
/** * Assumes that the given manager is no longer available and will clean up * all in-memory sessions. */
Assumes that the given manager is no longer available and will clean up all in-memory sessions
closeSessionsForManager
{ "repo_name": "knabar/openmicroscopy", "path": "components/server/src/ome/security/basic/NodeProviderInMemory.java", "license": "gpl-2.0", "size": 5545 }
[ "java.sql.Timestamp", "java.util.Iterator" ]
import java.sql.Timestamp; import java.util.Iterator;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
239,936
private void slideUp(){ LinearLayout hiddenPanel = (LinearLayout)findViewById(R.id.rideInfo); if(rides.getRide(rideID).isCompleted() || viewingAsDriver){ complete.setVisibility(View.GONE); } if(hiddenPanel.getVisibility() == View.VISIBLE){ Animation topDown = ...
void function(){ LinearLayout hiddenPanel = (LinearLayout)findViewById(R.id.rideInfo); if(rides.getRide(rideID).isCompleted() viewingAsDriver){ complete.setVisibility(View.GONE); } if(hiddenPanel.getVisibility() == View.VISIBLE){ Animation topDown = AnimationUtils.loadAnimation(context, R.anim.slide_to_bottom); topDown...
/** * Animtation to slide up from bottom */
Animtation to slide up from bottom
slideUp
{ "repo_name": "CMPUT301F16T04/Ridr", "path": "app/src/main/java/ca/ualberta/ridr/RideView.java", "license": "lgpl-3.0", "size": 13256 }
[ "android.view.View", "android.view.animation.Animation", "android.view.animation.AnimationUtils", "android.widget.LinearLayout" ]
import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.LinearLayout;
import android.view.*; import android.view.animation.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
2,593,998
public CardThumbnailView getCardThumbnailView() { if (getParentCard() != null) return getParentCard().getCardView().getInternalThumbnailLayout(); return null; }
CardThumbnailView function() { if (getParentCard() != null) return getParentCard().getCardView().getInternalThumbnailLayout(); return null; }
/** * Return the CardThumbnailCardView * @return */
Return the CardThumbnailCardView
getCardThumbnailView
{ "repo_name": "Daniele-Comi/System-Monitor", "path": "cardLibrary/src/main/java/it/gmariotti/cardslib/library/internal/CardThumbnail.java", "license": "gpl-2.0", "size": 7676 }
[ "it.gmariotti.cardslib.library.view.component.CardThumbnailView" ]
import it.gmariotti.cardslib.library.view.component.CardThumbnailView;
import it.gmariotti.cardslib.library.view.component.*;
[ "it.gmariotti.cardslib" ]
it.gmariotti.cardslib;
448,149
@ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<VirtualNetworkGatewayInner>, VirtualNetworkGatewayInner> beginReset( String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip);
@ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<VirtualNetworkGatewayInner>, VirtualNetworkGatewayInner> beginReset( String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip);
/** * Resets the primary of the virtual network gateway in the specified resource group. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param gatewayVip Virtual network gateway vip address supplied to t...
Resets the primary of the virtual network gateway in the specified resource group
beginReset
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java", "license": "mit", "size": 135947 }
[ "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.VirtualNetworkGatewayInner" ]
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.VirtualNetworkGatewayInner;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,644,700
@Override public Set<File> getFiles(Spec<? super Dependency> dependencySpec) { LenientFilesAndArtifactResolveVisitor visitor = new LenientFilesAndArtifactResolveVisitor(); visitArtifactsWithBuildOperation(dependencySpec, getSelectedArtifacts(), fileDependencyResults, visitor); return vis...
Set<File> function(Spec<? super Dependency> dependencySpec) { LenientFilesAndArtifactResolveVisitor visitor = new LenientFilesAndArtifactResolveVisitor(); visitArtifactsWithBuildOperation(dependencySpec, getSelectedArtifacts(), fileDependencyResults, visitor); return visitor.files; }
/** * Recursive but excludes unsuccessfully resolved artifacts. */
Recursive but excludes unsuccessfully resolved artifacts
getFiles
{ "repo_name": "blindpirate/gradle", "path": "subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/DefaultLenientConfiguration.java", "license": "apache-2.0", "size": 18309 }
[ "java.io.File", "java.util.Set", "org.gradle.api.artifacts.Dependency", "org.gradle.api.specs.Spec" ]
import java.io.File; import java.util.Set; import org.gradle.api.artifacts.Dependency; import org.gradle.api.specs.Spec;
import java.io.*; import java.util.*; import org.gradle.api.artifacts.*; import org.gradle.api.specs.*;
[ "java.io", "java.util", "org.gradle.api" ]
java.io; java.util; org.gradle.api;
2,681,864
public CoinbasePrice getCoinbaseHistoricalSpotRate(Currency base, Currency counter, Date date) throws IOException { String datespec = new SimpleDateFormat("yyyy-MM-dd").format(date); return coinbase.getHistoricalSpotRate(Coinbase.CB_VERSION_VALUE, base + "-" + counter, datespec).getData(); }
CoinbasePrice function(Currency base, Currency counter, Date date) throws IOException { String datespec = new SimpleDateFormat(STR).format(date); return coinbase.getHistoricalSpotRate(Coinbase.CB_VERSION_VALUE, base + "-" + counter, datespec).getData(); }
/** * Unauthenticated resource that tells you the current price of one unit. * This is usually somewhere in between the buy and sell price, current to within a few minutes. * * @param pair The currency pair. * @param date The given date. * @return The price in the desired {@code currency} ont the giv...
Unauthenticated resource that tells you the current price of one unit. This is usually somewhere in between the buy and sell price, current to within a few minutes
getCoinbaseHistoricalSpotRate
{ "repo_name": "evdubs/XChange", "path": "xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/v2/service/CoinbaseMarketDataServiceRaw.java", "license": "mit", "size": 3646 }
[ "java.io.IOException", "java.text.SimpleDateFormat", "java.util.Date", "org.knowm.xchange.coinbase.v2.Coinbase", "org.knowm.xchange.coinbase.v2.dto.CoinbasePrice", "org.knowm.xchange.currency.Currency" ]
import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import org.knowm.xchange.coinbase.v2.Coinbase; import org.knowm.xchange.coinbase.v2.dto.CoinbasePrice; import org.knowm.xchange.currency.Currency;
import java.io.*; import java.text.*; import java.util.*; import org.knowm.xchange.coinbase.v2.*; import org.knowm.xchange.coinbase.v2.dto.*; import org.knowm.xchange.currency.*;
[ "java.io", "java.text", "java.util", "org.knowm.xchange" ]
java.io; java.text; java.util; org.knowm.xchange;
603,200
public void initBindings(Bindings binds) { binds.put(CommandIfc.VHOST_MANAGER, vHostManager); binds.put(CommandIfc.ADMINS_SET, admins); binds.put(CommandIfc.COMMANDS_ACL, commandsACL); binds.put(CommandIfc.SCRI_MANA, scriptEngineManager); binds.put(CommandIfc.ADMN_CMDS, scriptCommands); binds.put(Command...
void function(Bindings binds) { binds.put(CommandIfc.VHOST_MANAGER, vHostManager); binds.put(CommandIfc.ADMINS_SET, admins); binds.put(CommandIfc.COMMANDS_ACL, commandsACL); binds.put(CommandIfc.SCRI_MANA, scriptEngineManager); binds.put(CommandIfc.ADMN_CMDS, scriptCommands); binds.put(CommandIfc.ADMN_DISC, serviceEnti...
/** * Initialize a mapping of key/value pairs which can be used in scripts * loaded by the server * * @param binds A mapping of key/value pairs, all of whose keys are Strings. */
Initialize a mapping of key/value pairs which can be used in scripts loaded by the server
initBindings
{ "repo_name": "fanout/tigase-server", "path": "src/main/java/tigase/server/BasicComponent.java", "license": "agpl-3.0", "size": 30607 }
[ "javax.script.Bindings" ]
import javax.script.Bindings;
import javax.script.*;
[ "javax.script" ]
javax.script;
1,000,275
String[] array = new String[3]; ArrayType subject = new ArrayType(); assertTrue( subject.checkType( array ) ); }
String[] array = new String[3]; ArrayType subject = new ArrayType(); assertTrue( subject.checkType( array ) ); }
/** * Test method for {@link coyote.dataframe.ArrayType#checkType(java.lang.Object)}. */
Test method for <code>coyote.dataframe.ArrayType#checkType(java.lang.Object)</code>
testCheckType
{ "repo_name": "sdcote/dataframe", "path": "src/test/java/coyote/dataframe/ArrayTypeTest.java", "license": "mit", "size": 7927 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
900,005
public void parse(long buildTime, DirectoryScanner results) throws IOException { String[] includedFiles = results.getIncludedFiles(); File baseDir = results.getBasedir(); boolean parsed=false; for (String value : includedFiles) { File reportFile = new File(baseDir, valu...
void function(long buildTime, DirectoryScanner results) throws IOException { String[] includedFiles = results.getIncludedFiles(); File baseDir = results.getBasedir(); boolean parsed=false; for (String value : includedFiles) { File reportFile = new File(baseDir, value); if ( (buildTime-3000 <= reportFile.lastModified())...
/** * Collect reports from the given {@link DirectoryScanner}, while * filtering out all files that were created before the given time. */
Collect reports from the given <code>DirectoryScanner</code>, while filtering out all files that were created before the given time
parse
{ "repo_name": "hudson/hudson-2.x", "path": "hudson-core/src/main/java/hudson/tasks/junit/TestResult.java", "license": "mit", "size": 18161 }
[ "java.io.File", "java.io.IOException", "org.apache.tools.ant.DirectoryScanner" ]
import java.io.File; import java.io.IOException; import org.apache.tools.ant.DirectoryScanner;
import java.io.*; import org.apache.tools.ant.*;
[ "java.io", "org.apache.tools" ]
java.io; org.apache.tools;
2,503,192
public boolean isAmountValid(AccountingDocument document, AccountingLine accountingLine) { KualiDecimal amount = accountingLine.getAmount(); // Check for zero amount if (amount.isZero()) { GlobalVariables.getMessageMap().putError(KFSPropertyConstants.AMOUNT, KFSKeyConstants.ERRO...
boolean function(AccountingDocument document, AccountingLine accountingLine) { KualiDecimal amount = accountingLine.getAmount(); if (amount.isZero()) { GlobalVariables.getMessageMap().putError(KFSPropertyConstants.AMOUNT, KFSKeyConstants.ERROR_ZERO_AMOUNT, STR); return false; } return true; }
/** * determine whether the amount in the account is not zero. * * @param accountingDocument the given accounting line * @return true if the amount is not zero; otherwise, false */
determine whether the amount in the account is not zero
isAmountValid
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/document/validation/impl/LaborExpenseTransfeAmountValidValidation.java", "license": "agpl-3.0", "size": 4517 }
[ "org.kuali.kfs.krad.util.GlobalVariables", "org.kuali.kfs.sys.KFSKeyConstants", "org.kuali.kfs.sys.KFSPropertyConstants", "org.kuali.kfs.sys.businessobject.AccountingLine", "org.kuali.kfs.sys.document.AccountingDocument", "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.kfs.krad.util.GlobalVariables; import org.kuali.kfs.sys.KFSKeyConstants; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.businessobject.AccountingLine; import org.kuali.kfs.sys.document.AccountingDocument; import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.kfs.krad.util.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.businessobject.*; import org.kuali.kfs.sys.document.*; import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
1,481,724
private String formatDate(long date) { return dateFormat.format(new Date(date)); }
String function(long date) { return dateFormat.format(new Date(date)); }
/** * Helper method to format dates during processing. * @param date Date as read from image file * @return String version of date format */
Helper method to format dates during processing
formatDate
{ "repo_name": "gabrielborgesmagalhaes/hadoop-hdfs", "path": "src/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java", "license": "apache-2.0", "size": 9946 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,676,495
void open(IOContext context) throws IOException, SchemaException;
void open(IOContext context) throws IOException, SchemaException;
/** * Open an OutputStream for writing. May be invoked multiple times with new output as needed. * close() is automatically invoked before each open(); * * @param context IOContext to write to. Not null * @throws IOException * @throws SchemaException */
Open an OutputStream for writing. May be invoked multiple times with new output as needed. close() is automatically invoked before each open()
open
{ "repo_name": "real-comp/prime", "path": "src/main/java/com/realcomp/prime/view/io/RecordViewWriter.java", "license": "apache-2.0", "size": 1086 }
[ "com.realcomp.prime.record.io.IOContext", "com.realcomp.prime.schema.SchemaException", "java.io.IOException" ]
import com.realcomp.prime.record.io.IOContext; import com.realcomp.prime.schema.SchemaException; import java.io.IOException;
import com.realcomp.prime.record.io.*; import com.realcomp.prime.schema.*; import java.io.*;
[ "com.realcomp.prime", "java.io" ]
com.realcomp.prime; java.io;
1,063,641
@SuppressLint("NewApi") @CalledByNative private static void startDownloadProcessIfNecessary( Context context, final String[] commandLine) { assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2; String processType = ContentSwitches.getSwitchValue(comm...
@SuppressLint(STR) static void function( Context context, final String[] commandLine) { assert Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2; String processType = ContentSwitches.getSwitchValue(commandLine, ContentSwitches.SWITCH_PROCESS_TYPE); assert ContentSwitches.SWITCH_DOWNLOAD_PROCESS.equals(process...
/** * Spawns a background download process if it hasn't been started. The download process will * manage its own lifecyle and can outlive chrome. * * @param context Context used to obtain the application context. * @param commandLine The child process command line argv. */
Spawns a background download process if it hasn't been started. The download process will manage its own lifecyle and can outlive chrome
startDownloadProcessIfNecessary
{ "repo_name": "ds-hwang/chromium-crosswalk", "path": "content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java", "license": "bsd-3-clause", "size": 40442 }
[ "android.annotation.SuppressLint", "android.content.Context", "android.content.Intent", "android.os.Build", "android.os.Bundle", "org.chromium.base.library_loader.Linker", "org.chromium.content.app.ChromiumLinkerParams", "org.chromium.content.app.DownloadProcessService", "org.chromium.content.common...
import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import org.chromium.base.library_loader.Linker; import org.chromium.content.app.ChromiumLinkerParams; import org.chromium.content.app.DownloadProcessService; import o...
import android.annotation.*; import android.content.*; import android.os.*; import org.chromium.base.library_loader.*; import org.chromium.content.app.*; import org.chromium.content.common.*;
[ "android.annotation", "android.content", "android.os", "org.chromium.base", "org.chromium.content" ]
android.annotation; android.content; android.os; org.chromium.base; org.chromium.content;
1,623,876
Map<DeviceId, LabelResourceId> getGlobalNodeLabels();
Map<DeviceId, LabelResourceId> getGlobalNodeLabels();
/** * Retrieves device id and label pairs collection from global node label store. * * @return collection of device id and label pairs */
Retrieves device id and label pairs collection from global node label store
getGlobalNodeLabels
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/pcep/ctl/src/main/java/org/onosproject/pcelabelstore/api/PceLabelStore.java", "license": "apache-2.0", "size": 6098 }
[ "java.util.Map", "org.onosproject.incubator.net.resource.label.LabelResourceId", "org.onosproject.net.DeviceId" ]
import java.util.Map; import org.onosproject.incubator.net.resource.label.LabelResourceId; import org.onosproject.net.DeviceId;
import java.util.*; import org.onosproject.incubator.net.resource.label.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.incubator", "org.onosproject.net" ]
java.util; org.onosproject.incubator; org.onosproject.net;
1,478,350
ManagedType<Y> managedType = null; Type<Y> jpaType; if (attribute instanceof SingularAttribute) { SingularAttribute<X, Y> singularAttribute = (SingularAttribute<X, Y>) attribute; jpaType = singularAttribute.getType(); } else if (attribute instanceof PluralAttribute) { PluralAttribute<X, Z,...
ManagedType<Y> managedType = null; Type<Y> jpaType; if (attribute instanceof SingularAttribute) { SingularAttribute<X, Y> singularAttribute = (SingularAttribute<X, Y>) attribute; jpaType = singularAttribute.getType(); } else if (attribute instanceof PluralAttribute) { PluralAttribute<X, Z, Y> pluralAttribute = (PluralA...
/** * Find the Jpa type of the attribute and return it if its a ManagedType * For a SingularAttribute, call its getType() method. * For a PluralAttribute, call its getElementType() method. * * @param attribute a Jpa attribute * @return the ManagedType or null */
Find the Jpa type of the attribute and return it if its a ManagedType For a SingularAttribute, call its getType() method. For a PluralAttribute, call its getElementType() method
getManagedType
{ "repo_name": "YingLiu4203/category", "path": "src/main/java/io/reactivesw/category/api/executor/schema/GqlHelper.java", "license": "apache-2.0", "size": 1361 }
[ "javax.persistence.metamodel.ManagedType", "javax.persistence.metamodel.PluralAttribute", "javax.persistence.metamodel.SingularAttribute", "javax.persistence.metamodel.Type" ]
import javax.persistence.metamodel.ManagedType; import javax.persistence.metamodel.PluralAttribute; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.Type;
import javax.persistence.metamodel.*;
[ "javax.persistence" ]
javax.persistence;
1,243,231
@RequestMapping(value = "/{eventId}/levels/{id}", method = RequestMethod.PATCH) public ResponseEntity<String> updateLevel(@PathVariable Long eventId, @PathVariable Long id, @RequestBody LevelDto level) { LOGGER.debug("[{}] Update level {} for event {} : {}", getUserConnected(), id, eventId, level); ...
@RequestMapping(value = STR, method = RequestMethod.PATCH) ResponseEntity<String> function(@PathVariable Long eventId, @PathVariable Long id, @RequestBody LevelDto level) { LOGGER.debug(STR, getUserConnected(), id, eventId, level); eventService.updateLevel(id, level, eventId, getUserConnectedId()); return ResponseEntit...
/** * Update level. */
Update level
updateLevel
{ "repo_name": "aguillem/festival-manager", "path": "festival-manager-core/src/main/java/com/aguillem/festival/manager/core/rest/controller/EventController.java", "license": "gpl-3.0", "size": 23803 }
[ "com.aguillem.festival.manager.core.dto.LevelDto", "org.apache.commons.lang3.StringUtils", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestBody", "org.springframework.web.bind.annotation.RequestMapping", "...
import com.aguillem.festival.manager.core.dto.LevelDto; import org.apache.commons.lang3.StringUtils; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.Req...
import com.aguillem.festival.manager.core.dto.*; import org.apache.commons.lang3.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "com.aguillem.festival", "org.apache.commons", "org.springframework.http", "org.springframework.web" ]
com.aguillem.festival; org.apache.commons; org.springframework.http; org.springframework.web;
2,523,363
@Test public final void testFormParamsMultivalued() { Robolectric.getFakeHttpLayer().interceptHttpRequests(false); String subpath = "/formparamsmultivalued", key = "mutant-powers"; List<String> multivalue = new ArrayList<String>(); multivalue.add("shapeshifting"); multivalue.add("rapid-healing");...
final void function() { Robolectric.getFakeHttpLayer().interceptHttpRequests(false); String subpath = STR, key = STR; List<String> multivalue = new ArrayList<String>(); multivalue.add(STR); multivalue.add(STR); multivalue.add(STR); String body = key + STR + key + STR + key + STR; Map<String, List<String>> params = new ...
/** * <p>Test for a request which send a multivalued query parameter.</p> * * @since 1.3.0 */
Test for a request which send a multivalued query parameter
testFormParamsMultivalued
{ "repo_name": "sahan/RoboZombie", "path": "robozombie/src/test/java/com/lonepulse/robozombie/processor/RequestParamEndpointTest.java", "license": "apache-2.0", "size": 21257 }
[ "com.github.tomakehurst.wiremock.client.WireMock", "java.util.ArrayList", "java.util.LinkedHashMap", "java.util.List", "java.util.Map", "org.robolectric.Robolectric" ]
import com.github.tomakehurst.wiremock.client.WireMock; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.robolectric.Robolectric;
import com.github.tomakehurst.wiremock.client.*; import java.util.*; import org.robolectric.*;
[ "com.github.tomakehurst", "java.util", "org.robolectric" ]
com.github.tomakehurst; java.util; org.robolectric;
334,642
protected Composite createPlanIdentification(Composite parent) { try { planIdentification = MissionExtender.construct(PlanIdentification.class); planIdentification.setPlanStart(getPlanStart()); Composite identificationComposite = planIdentification.createPlanIdentification(parent, true); // ...
Composite function(Composite parent) { try { planIdentification = MissionExtender.construct(PlanIdentification.class); planIdentification.setPlanStart(getPlanStart()); Composite identificationComposite = planIdentification.createPlanIdentification(parent, true); planIdentification.updateFields(plan); planIdentification...
/** * Create the plan identification GUI elements. */
Create the plan identification GUI elements
createPlanIdentification
{ "repo_name": "nasa/OpenSPIFe", "path": "gov.nasa.ensemble.core.plan.editor/src/gov/nasa/ensemble/core/plan/editor/lifecycle/SaveAsWizard.java", "license": "apache-2.0", "size": 12857 }
[ "gov.nasa.ensemble.common.logging.LogUtil", "gov.nasa.ensemble.common.mission.MissionExtender", "org.eclipse.swt.widgets.Composite" ]
import gov.nasa.ensemble.common.logging.LogUtil; import gov.nasa.ensemble.common.mission.MissionExtender; import org.eclipse.swt.widgets.Composite;
import gov.nasa.ensemble.common.logging.*; import gov.nasa.ensemble.common.mission.*; import org.eclipse.swt.widgets.*;
[ "gov.nasa.ensemble", "org.eclipse.swt" ]
gov.nasa.ensemble; org.eclipse.swt;
2,178,605
public void addPendingCounter(PageSubscriptionCounter pageSubscriptionCounter) { getOrCreatePendingCounters().add(pageSubscriptionCounter); }
void function(PageSubscriptionCounter pageSubscriptionCounter) { getOrCreatePendingCounters().add(pageSubscriptionCounter); }
/** * This will indicate a page that will need to be called on cleanup when the page has been closed and confirmed * * @param pageSubscriptionCounter */
This will indicate a page that will need to be called on cleanup when the page has been closed and confirmed
addPendingCounter
{ "repo_name": "tabish121/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java", "license": "apache-2.0", "size": 26010 }
[ "org.apache.activemq.artemis.core.paging.cursor.PageSubscriptionCounter" ]
import org.apache.activemq.artemis.core.paging.cursor.PageSubscriptionCounter;
import org.apache.activemq.artemis.core.paging.cursor.*;
[ "org.apache.activemq" ]
org.apache.activemq;
2,753,983
long addLocation(String locationSetting, String cityName, double lat, double lon) { long locationId; // First, check if the location with this city name exists in the db Cursor locationCursor = getContext().getContentResolver().query( WeatherContract.LocationEntry.CONTENT_UR...
long addLocation(String locationSetting, String cityName, double lat, double lon) { long locationId; Cursor locationCursor = getContext().getContentResolver().query( WeatherContract.LocationEntry.CONTENT_URI, new String[]{WeatherContract.LocationEntry._ID}, WeatherContract.LocationEntry.COLUMN_LOCATION_SETTING + STR, n...
/** * Helper method to handle insertion of a new location in the weather database. * * @param locationSetting The location string used to request updates from the server. * @param cityName A human-readable city name, e.g "Mountain View" * @param lat the latitude of the city * @param lon th...
Helper method to handle insertion of a new location in the weather database
addLocation
{ "repo_name": "eristemena/udacity-go-ubiquitous", "path": "app/src/main/java/com/example/android/sunshine/app/sync/SunshineSyncAdapter.java", "license": "apache-2.0", "size": 31734 }
[ "android.content.ContentUris", "android.content.ContentValues", "android.database.Cursor", "android.net.Uri", "com.example.android.sunshine.app.data.WeatherContract" ]
import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import com.example.android.sunshine.app.data.WeatherContract;
import android.content.*; import android.database.*; import android.net.*; import com.example.android.sunshine.app.data.*;
[ "android.content", "android.database", "android.net", "com.example.android" ]
android.content; android.database; android.net; com.example.android;
2,529,863
@Override public void mouseEntered(MouseEvent e) { // this body is intentionally left empty }
void function(MouseEvent e) { }
/** * This method cannot be called directly. */
This method cannot be called directly
mouseEntered
{ "repo_name": "FTJiang/cs61B-17Spring", "path": "hw1/src/main/java/edu/princeton/cs/introcs/StdDraw.java", "license": "mit", "size": 73056 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,000,007
public Session getJmsSession() { return jmsSession; }
Session function() { return jmsSession; }
/** * Returns the underlying JMS session. * <p/> * This may be <tt>null</tt> if using {@link org.apache.camel.component.jms.JmsPollingConsumer}, * or the broker component from Apache ActiveMQ 5.11.x or older. */
Returns the underlying JMS session. This may be null if using <code>org.apache.camel.component.jms.JmsPollingConsumer</code>, or the broker component from Apache ActiveMQ 5.11.x or older
getJmsSession
{ "repo_name": "davidkarlsen/camel", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java", "license": "apache-2.0", "size": 8617 }
[ "javax.jms.Session" ]
import javax.jms.Session;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
2,473,815
public InputStream getResultingData() { return resultingData; }
InputStream function() { return resultingData; }
/** * Gets the data stream that resulted from a succesful call (null if an error has occured) This function will block if this thread is running * * @return */
Gets the data stream that resulted from a succesful call (null if an error has occured) This function will block if this thread is running
getResultingData
{ "repo_name": "GeoscienceAustralia/portal-core", "path": "src/main/java/org/auscope/portal/core/server/http/DistributedHTTPServiceCaller.java", "license": "lgpl-3.0", "size": 9969 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,588,227
public Agent getSelectedAgent () { if (m_selected == -1) return null; else return m_agents.get(m_selected); }
Agent function () { if (m_selected == -1) return null; else return m_agents.get(m_selected); }
/** * Extrae una referencia al agente seleccionado dentro del entorno. * * @return Agente seleccionado actualmente en el entorno o null si no hay * ninguno seleccionado. */
Extrae una referencia al agente seleccionado dentro del entorno
getSelectedAgent
{ "repo_name": "MazeSolver/MazeSolver", "path": "src/es/ull/mazesolver/gui/environment/Environment.java", "license": "gpl-3.0", "size": 15691 }
[ "es.ull.mazesolver.agent.Agent" ]
import es.ull.mazesolver.agent.Agent;
import es.ull.mazesolver.agent.*;
[ "es.ull.mazesolver" ]
es.ull.mazesolver;
1,084,551
public static BulkWriteResult acknowledged(final WriteRequest.Type type, final int count, final Integer modifiedCount, final List<BulkWriteUpsert> upserts) { return acknowledged(type == WriteRequest.Type.INSERT ? count : 0, (type == ...
static BulkWriteResult function(final WriteRequest.Type type, final int count, final Integer modifiedCount, final List<BulkWriteUpsert> upserts) { return acknowledged(type == WriteRequest.Type.INSERT ? count : 0, (type == WriteRequest.Type.UPDATE type == WriteRequest.Type.REPLACE) ? count : 0, type == WriteRequest.Type...
/** * Create an acknowledged BulkWriteResult * * @param type the type of the write * @param count the number of documents matched * @param modifiedCount the number of documents modified, which may be null if the server was not able to provide the count * @param upserts ...
Create an acknowledged BulkWriteResult
acknowledged
{ "repo_name": "kay-kim/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/bulk/BulkWriteResult.java", "license": "apache-2.0", "size": 11820 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,370,494
@SuppressWarnings("unchecked") synchronized public void contructPreferredFilters() { clear(); ArrayList<String> classNames; Preferences prefs = chip.getPrefs(); // Preferences.userNodeForPackage(chip.getClass()); // getString prefs for the Chip, not for the FilterChain class ...
@SuppressWarnings(STR) synchronized void function() { clear(); ArrayList<String> classNames; Preferences prefs = chip.getPrefs(); try { byte[] bytes = prefs.getByteArray(prefsKey(), null); if (bytes != null) { ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes)); classNames = (ArrayList<String>...
/** * Constructs the preferred filters for the FilterChain as stored in user * Preferences. */
Constructs the preferred filters for the FilterChain as stored in user Preferences
contructPreferredFilters
{ "repo_name": "viktorbahr/jaer", "path": "src/net/sf/jaer/eventprocessing/FilterChain.java", "license": "lgpl-2.1", "size": 22031 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "java.io.ObjectInputStream", "java.lang.reflect.Constructor", "java.util.ArrayList", "java.util.prefs.Preferences" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.prefs.Preferences;
import java.io.*; import java.lang.reflect.*; import java.util.*; import java.util.prefs.*;
[ "java.io", "java.lang", "java.util" ]
java.io; java.lang; java.util;
1,511,714
@Test public void testIsReadOnly02() { MapELResolver mapELResolver = new MapELResolver(); ELContext context = new ELContextImpl(); boolean result = mapELResolver.isReadOnly(context, new Object(), new Object()); Assert.assertFalse(result); Assert.assertFa...
void function() { MapELResolver mapELResolver = new MapELResolver(); ELContext context = new ELContextImpl(); boolean result = mapELResolver.isReadOnly(context, new Object(), new Object()); Assert.assertFalse(result); Assert.assertFalse(context.isPropertyResolved()); mapELResolver = new MapELResolver(true); result = ma...
/** * Tests that the propertyResolved is false if base is not Map. */
Tests that the propertyResolved is false if base is not Map
testIsReadOnly02
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.61/TestMapELResolver.java", "license": "mit", "size": 10174 }
[ "org.apache.jasper.el.ELContextImpl", "org.junit.Assert" ]
import org.apache.jasper.el.ELContextImpl; import org.junit.Assert;
import org.apache.jasper.el.*; import org.junit.*;
[ "org.apache.jasper", "org.junit" ]
org.apache.jasper; org.junit;
931,849
@Override public ScriptObject tailConstruct(ExecutionContext callerContext, Object... args) { return construct(callerContext, args); } } public ExoticBoundFunction(Realm realm) { super(realm); }
ScriptObject function(ExecutionContext callerContext, Object... args) { return construct(callerContext, args); } } public ExoticBoundFunction(Realm realm) { super(realm); }
/** * 9.4.1.2 [[Construct]] */
9.4.1.2 [[Construct]]
tailConstruct
{ "repo_name": "rwaldron/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/types/builtins/ExoticBoundFunction.java", "license": "mit", "size": 5563 }
[ "com.github.anba.es6draft.runtime.ExecutionContext", "com.github.anba.es6draft.runtime.Realm", "com.github.anba.es6draft.runtime.types.ScriptObject" ]
import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.Realm; import com.github.anba.es6draft.runtime.types.ScriptObject;
import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.types.*;
[ "com.github.anba" ]
com.github.anba;
607,885
protected int addNodeInDocOrder(int node) { assertion(hasCache(), "addNodeInDocOrder must be done on a mutable sequence!"); int insertIndex = -1; NodeVector vec = getVector(); // This needs to do a binary search, but a binary search // is somewhat tough because the...
int function(int node) { assertion(hasCache(), STR); int insertIndex = -1; NodeVector vec = getVector(); int size = vec.size(), i; for (i = size - 1; i >= 0; i--) { int child = vec.elementAt(i); if (child == node) { i = -2; break; } DTM dtm = m_dtmMgr.getDTM(node); if (!dtm.isNodeAfter(node, child)) { break; } } if (i ...
/** * Add the node into a vector of nodes where it should occur in * document order. * @param node The node to be added. * @return insertIndex. * @throws RuntimeException thrown if this NodeSetDTM is not of * a mutable type. */
Add the node into a vector of nodes where it should occur in document order
addNodeInDocOrder
{ "repo_name": "srnsw/xena", "path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xpath/axes/NodeSequence.java", "license": "gpl-3.0", "size": 25200 }
[ "org.apache.xml.utils.NodeVector" ]
import org.apache.xml.utils.NodeVector;
import org.apache.xml.utils.*;
[ "org.apache.xml" ]
org.apache.xml;
2,013,701
private void doWriteBytes(ByteBuffer buffer, boolean finalFragment) throws IOException { if (closed) { throw new IOException(sm.getString("outbound.closed")); } // Work out the first byte int first = 0x00; if (finalFragment) { first = fir...
void function(ByteBuffer buffer, boolean finalFragment) throws IOException { if (closed) { throw new IOException(sm.getString(STR)); } int first = 0x00; if (finalFragment) { first = first + 0x80; } if (firstFrame) { if (text.booleanValue()) { first = first + 0x1; } else { first = first + 0x2; } } upgradeOutbound.write(...
/** * Writes the provided bytes as the payload in a new WebSocket frame. * * @param buffer The bytes to include in the payload. * @param finalFragment Do these bytes represent the final fragment of a * WebSocket message? * @throws IOException */
Writes the provided bytes as the payload in a new WebSocket frame
doWriteBytes
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/catalina/websocket/WsOutbound.java", "license": "apache-2.0", "size": 19114 }
[ "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,018,544
void receiveUpdate(AbstractCommand currentJob);
void receiveUpdate(AbstractCommand currentJob);
/** * Receive the current command * * @param currentJob * the answer-job */
Receive the current command
receiveUpdate
{ "repo_name": "matthesrieke/OBDig", "path": "src/main/java/org/envirocar/obdig/protocol/DataListener.java", "license": "gpl-2.0", "size": 1717 }
[ "org.envirocar.obdig.commands.AbstractCommand" ]
import org.envirocar.obdig.commands.AbstractCommand;
import org.envirocar.obdig.commands.*;
[ "org.envirocar.obdig" ]
org.envirocar.obdig;
2,735,821
public static boolean same(final Settings left, final Settings right) { return left.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE) .equals(right.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE)); }
static boolean function(final Settings left, final Settings right) { return left.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE) .equals(right.filter(IndexScopedSettings.INDEX_SETTINGS_KEY_PREDICATE)); }
/** * Compare the specified settings for equality. * * @param left the left settings * @param right the right settings * @return true if the settings are the same, otherwise false */
Compare the specified settings for equality
same
{ "repo_name": "coding0011/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/IndexSettings.java", "license": "apache-2.0", "size": 49494 }
[ "org.elasticsearch.common.settings.IndexScopedSettings", "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.common.settings.IndexScopedSettings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,239,235
public void store(File newOntology) throws IOException { throw new UnsupportedOperationException("Method not supported in this implementation"); }
void function(File newOntology) throws IOException { throw new UnsupportedOperationException(STR); }
/** * Tries to save the ontology at the provided File */
Tries to save the ontology at the provided File
store
{ "repo_name": "avlachid/Multilingual-NLP-for-Archaeological-Reports-Ariadne-Infrastructure", "path": "SE NER/plugins/Ontology/src/gate/creole/ontology/impl/AbstractOntologyImpl.java", "license": "gpl-3.0", "size": 74022 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,864,117
jPanel6 = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); jXHeader1 = new org.jdesktop.swingx.JXHeader(); jPanel3 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel...
jPanel6 = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); jXHeader1 = new org.jdesktop.swingx.JXHeader(); jPanel3 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jPanel4 = new javax.swing.JPanel(); jLabel3 = new ja...
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. always regenerated by the Form Editor
initComponents
{ "repo_name": "oehm-smith/JStockMvn", "path": "src/main/java/org/yccheok/jstock/gui/LoadFromCloudJDialog.java", "license": "gpl-2.0", "size": 28297 }
[ "javax.swing.JLabel" ]
import javax.swing.JLabel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
234,064
@SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double distance) { double d0 = 16.0D; d0 = d0 * 64.0D * this.renderDistanceWeight; return distance < d0 * d0; }
@SideOnly(Side.CLIENT) boolean function(double distance) { double d0 = 16.0D; d0 = d0 * 64.0D * this.renderDistanceWeight; return distance < d0 * d0; }
/** * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge * length * 64 * renderDistanceWeight Args: distance */
Checks if the entity is in range to render by using the past in distance and comparing it to its average edge length * 64 * renderDistanceWeight Args: distance
isInRangeToRenderDist
{ "repo_name": "dogjaw2233/tiu-s-mod", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/item/EntityItemFrame.java", "license": "lgpl-2.1", "size": 7969 }
[ "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.*;
[ "net.minecraftforge.fml" ]
net.minecraftforge.fml;
479,282
@Override protected MD_ApplicationSchemaInformation wrap(final ApplicationSchemaInformation metadata) { return new MD_ApplicationSchemaInformation(metadata); }
MD_ApplicationSchemaInformation function(final ApplicationSchemaInformation metadata) { return new MD_ApplicationSchemaInformation(metadata); }
/** * Invoked by {@link PropertyType} at marshalling time for wrapping the given metadata value * in a {@code <gmd:MD_ApplicationSchemaInformation>} XML element. * * @param metadata The metadata element to marshall. * @return A {@code PropertyType} wrapping the given the metadata element. ...
Invoked by <code>PropertyType</code> at marshalling time for wrapping the given metadata value in a XML element
wrap
{ "repo_name": "desruisseaux/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_ApplicationSchemaInformation.java", "license": "apache-2.0", "size": 3507 }
[ "org.opengis.metadata.ApplicationSchemaInformation" ]
import org.opengis.metadata.ApplicationSchemaInformation;
import org.opengis.metadata.*;
[ "org.opengis.metadata" ]
org.opengis.metadata;
49,394
protected boolean isZeppelinHubUrlValid(String url) { boolean valid; try { new URI(url).toURL(); valid = true; } catch (URISyntaxException | MalformedURLException e) { LOG.error("Zeppelinhub url is not valid, default ZeppelinHub url will be used.", e); valid = false; } retu...
boolean function(String url) { boolean valid; try { new URI(url).toURL(); valid = true; } catch (URISyntaxException MalformedURLException e) { LOG.error(STR, e); valid = false; } return valid; } protected class User { public String login; public String email; public String name; }
/** * Perform a Simple URL check by using <code>URI(url).toURL()</code>. * If the url is not valid, the try-catch condition will catch the exceptions and return false, * otherwise true will be returned. * * @param url * @return */
Perform a Simple URL check by using <code>URI(url).toURL()</code>. If the url is not valid, the try-catch condition will catch the exceptions and return false, otherwise true will be returned
isZeppelinHubUrlValid
{ "repo_name": "AlienYvonne/SSM", "path": "smart-zeppelin/zeppelin-server/src/main/java/org/apache/zeppelin/realm/ZeppelinHubRealm.java", "license": "apache-2.0", "size": 8487 }
[ "java.net.MalformedURLException", "java.net.URISyntaxException" ]
import java.net.MalformedURLException; import java.net.URISyntaxException;
import java.net.*;
[ "java.net" ]
java.net;
1,116,683
public static Status createStatus(Throwable e, String message) { return new Status(IStatus.ERROR, PLUGIN_ID, STATUS_EXCEPTION, message, e); }
static Status function(Throwable e, String message) { return new Status(IStatus.ERROR, PLUGIN_ID, STATUS_EXCEPTION, message, e); }
/** * Convenience wrapper for rethrowing exceptions as CoreExceptions, * with severity of ERROR. */
Convenience wrapper for rethrowing exceptions as CoreExceptions, with severity of ERROR
createStatus
{ "repo_name": "Niky4000/UsefulUtils", "path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/AptPlugin.java", "license": "gpl-3.0", "size": 9845 }
[ "org.eclipse.core.runtime.IStatus", "org.eclipse.core.runtime.Status" ]
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
1,060,753
@Generated @Selector("totalCount") @NUInt public native long totalCount();
@Selector(STR) native long function();
/** * [@property] totalCount * <p> * The total number of signposts emit with the given signpostName in the aggregation period of the parent payload. */
[@property] totalCount The total number of signposts emit with the given signpostName in the aggregation period of the parent payload
totalCount
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metrickit/MXSignpostMetric.java", "license": "apache-2.0", "size": 6060 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
67,381
public void boardSpriteAdded(BoardChangedEvent e);
void function(BoardChangedEvent e);
/** * A BoardSprite has been added. * * @param e */
A BoardSprite has been added
boardSpriteAdded
{ "repo_name": "swordmaster2k/rpgwizard", "path": "core/src/main/java/org/rpgwizard/common/assets/listeners/BoardChangeListener.java", "license": "mpl-2.0", "size": 2110 }
[ "org.rpgwizard.common.assets.events.BoardChangedEvent" ]
import org.rpgwizard.common.assets.events.BoardChangedEvent;
import org.rpgwizard.common.assets.events.*;
[ "org.rpgwizard.common" ]
org.rpgwizard.common;
583,087
public static ims.core.resource.place.domain.objects.Organisation extractOrganisation(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.OrganisationConfigVo valueObject) { return extractOrganisation(domainFactory, valueObject, new HashMap()); }
static ims.core.resource.place.domain.objects.Organisation function(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.OrganisationConfigVo valueObject) { return extractOrganisation(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractOrganisation
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/careuk/vo/domain/OrganisationConfigVoAssembler.java", "license": "agpl-3.0", "size": 20778 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
209,651
public List<NewProjectConfig> getProjects() { if (projects == null) { return newArrayList(); } return projects; }
List<NewProjectConfig> function() { if (projects == null) { return newArrayList(); } return projects; }
/** * Returns the list of configurations to creating projects * * @return the list of {@link NewProjectConfig} to creating projects */
Returns the list of configurations to creating projects
getProjects
{ "repo_name": "sleshchenko/che", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/MutableProjectConfig.java", "license": "epl-1.0", "size": 5231 }
[ "com.google.common.collect.Lists", "java.util.List", "org.eclipse.che.api.project.shared.NewProjectConfig" ]
import com.google.common.collect.Lists; import java.util.List; import org.eclipse.che.api.project.shared.NewProjectConfig;
import com.google.common.collect.*; import java.util.*; import org.eclipse.che.api.project.shared.*;
[ "com.google.common", "java.util", "org.eclipse.che" ]
com.google.common; java.util; org.eclipse.che;
532,110
@Nullable public WorkbookChartAxes patch(@Nonnull final WorkbookChartAxes sourceWorkbookChartAxes) throws ClientException { return send(HttpMethod.PATCH, sourceWorkbookChartAxes); }
WorkbookChartAxes function(@Nonnull final WorkbookChartAxes sourceWorkbookChartAxes) throws ClientException { return send(HttpMethod.PATCH, sourceWorkbookChartAxes); }
/** * Patches this WorkbookChartAxes with a source * * @param sourceWorkbookChartAxes the source object with updates * @return the updated WorkbookChartAxes * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Patches this WorkbookChartAxes with a source
patch
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookChartAxesRequest.java", "license": "mit", "size": 6117 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.WorkbookChartAxes", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WorkbookChartAxes; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
326,282
Set<String> getCompositePhenomenonsForProcedure(String procedure);
Set<String> getCompositePhenomenonsForProcedure(String procedure);
/** * Get the composite phenomenon associated with the specified procedure. * * @param procedure the procedure * * @return the composite phenomenon */
Get the composite phenomenon associated with the specified procedure
getCompositePhenomenonsForProcedure
{ "repo_name": "ahuarte47/SOS", "path": "core/api/src/main/java/org/n52/sos/cache/CompositePhenomenonCache.java", "license": "gpl-2.0", "size": 5000 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,712,519
@Override public MediaPlayer getMediaPlayer() { return this; }
MediaPlayer function() { return this; }
/**************** * Media Player * ****************/
Media Player
getMediaPlayer
{ "repo_name": "openflint/Connect-SDK-Android", "path": "core/src/com/connectsdk/service/sessions/WebOSWebAppSession.java", "license": "apache-2.0", "size": 26303 }
[ "com.connectsdk.service.capability.MediaPlayer" ]
import com.connectsdk.service.capability.MediaPlayer;
import com.connectsdk.service.capability.*;
[ "com.connectsdk.service" ]
com.connectsdk.service;
1,536,440
protected Collection<FlowRule> processVersatile(ForwardingObjective fwd) { log.info("Processing versatile forwarding objective"); EthTypeCriterion ethType = (EthTypeCriterion) fwd.selector().getCriterion(Criterion.Type.ETH_TYPE); if (ethType == null) { log.error(...
Collection<FlowRule> function(ForwardingObjective fwd) { log.info(STR); EthTypeCriterion ethType = (EthTypeCriterion) fwd.selector().getCriterion(Criterion.Type.ETH_TYPE); if (ethType == null) { log.error(STR); fail(fwd, ObjectiveError.BADPARAMS); return Collections.emptySet(); } if (fwd.nextId() == null && fwd.treatme...
/** * In the OF-DPA 2.0 pipeline, versatile forwarding objectives go to the * ACL table. * @param fwd the forwarding objective of type 'versatile' * @return a collection of flow rules to be sent to the switch. An empty * collection may be returned if there is a problem in proce...
In the OF-DPA 2.0 pipeline, versatile forwarding objectives go to the ACL table
processVersatile
{ "repo_name": "sonu283304/onos", "path": "drivers/default/src/main/java/org/onosproject/driver/pipeline/OFDPA2Pipeline.java", "license": "apache-2.0", "size": 46893 }
[ "java.util.Collection", "java.util.Collections", "java.util.Deque", "java.util.List", "org.onlab.packet.VlanId", "org.onosproject.driver.extensions.OfdpaMatchVlanVid", "org.onosproject.net.PortNumber", "org.onosproject.net.behaviour.NextGroup", "org.onosproject.net.flow.DefaultFlowRule", "org.onos...
import java.util.Collection; import java.util.Collections; import java.util.Deque; import java.util.List; import org.onlab.packet.VlanId; import org.onosproject.driver.extensions.OfdpaMatchVlanVid; import org.onosproject.net.PortNumber; import org.onosproject.net.behaviour.NextGroup; import org.onosproject.net.flow.Def...
import java.util.*; import org.onlab.packet.*; import org.onosproject.driver.extensions.*; import org.onosproject.net.*; import org.onosproject.net.behaviour.*; import org.onosproject.net.flow.*; import org.onosproject.net.flow.criteria.*; import org.onosproject.net.flow.instructions.*; import org.onosproject.net.flowo...
[ "java.util", "org.onlab.packet", "org.onosproject.driver", "org.onosproject.net" ]
java.util; org.onlab.packet; org.onosproject.driver; org.onosproject.net;
2,205,812
@NonBound public JPopupMenu getPopup(Point p) { return null; }
JPopupMenu function(Point p) { return null; }
/** * Returns a component specific popup menu. Defaulted here to null * so components that have popup menus must override this class. */
Returns a component specific popup menu. Defaulted here to null so components that have popup menus must override this class
getPopup
{ "repo_name": "amitkr/power-architect", "path": "src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java", "license": "gpl-3.0", "size": 25362 }
[ "java.awt.Point", "javax.swing.JPopupMenu" ]
import java.awt.Point; import javax.swing.JPopupMenu;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,568,818
private static String findProjectHome(File startDir) { for (File cur = startDir.getAbsoluteFile(); cur != null; cur = cur.getParentFile()) { // Check 'cur' is project home directory. if (!new File(cur, "bin").isDirectory() || !new File(cur, "config").isDirectory()) ...
static String function(File startDir) { for (File cur = startDir.getAbsoluteFile(); cur != null; cur = cur.getParentFile()) { if (!new File(cur, "bin").isDirectory() !new File(cur, STR).isDirectory()) continue; return cur.getPath(); } return null; }
/** * Tries to find project home starting from specified directory and moving to root. * * @param startDir First directory in search hierarchy. * @return Project home path or {@code null} if it wasn't found. */
Tries to find project home starting from specified directory and moving to root
findProjectHome
{ "repo_name": "kromulan/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 298812 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,316,235
@Override public void stop(final BundleContext context) throws Exception { try { // remove the part listener from the parts in the current workbench final IWorkbenchWindow[] workbenchWindows = PlatformUI.getWorkbench().getWorkbenchWindows(); for (int i = 0; i < w...
void function(final BundleContext context) throws Exception { try { final IWorkbenchWindow[] workbenchWindows = PlatformUI.getWorkbench().getWorkbenchWindows(); for (int i = 0; i < workbenchWindows.length; i++) { workbenchWindows[i].getPartService().removePartListener(partListener); } PlatformUI.getWorkbench().removeWi...
/** * This method is called when the plug-in is stopped * * @see AbstractUIPlugin#stop(BundleContext) */
This method is called when the plug-in is stopped
stop
{ "repo_name": "phord/SaveDirtyEditors", "path": "src/net/sf/savedirtyeditors/PluginActivator.java", "license": "epl-1.0", "size": 6650 }
[ "org.eclipse.ui.IWorkbenchWindow", "org.eclipse.ui.PlatformUI", "org.osgi.framework.BundleContext" ]
import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; import org.osgi.framework.BundleContext;
import org.eclipse.ui.*; import org.osgi.framework.*;
[ "org.eclipse.ui", "org.osgi.framework" ]
org.eclipse.ui; org.osgi.framework;
2,714,916
public void addStatementEventListener(StatementEventListener listener) { if (!isActive) return; if (listener == null) return; statementEventListeners.add(listener); }
void function(StatementEventListener listener) { if (!isActive) return; if (listener == null) return; statementEventListeners.add(listener); }
/** * Registers a <code>StatementEventListener</code> with this * <code>PooledConnection</code> object. Components that * wish to be notified when <code>PreparedStatement</code>s created by the * connection are closed or are detected to be invalid may use this method * to register a <code>...
Registers a <code>StatementEventListener</code> with this <code>PooledConnection</code> object. Components that wish to be notified when <code>PreparedStatement</code>s created by the connection are closed or are detected to be invalid may use this method to register a <code>StatementEventListener</code> with this <cod...
addStatementEventListener
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/jdbc/EmbedXAConnection40.java", "license": "apache-2.0", "size": 4816 }
[ "javax.sql.StatementEventListener" ]
import javax.sql.StatementEventListener;
import javax.sql.*;
[ "javax.sql" ]
javax.sql;
2,825,963
List<String> keys = new ArrayList<>(); List<Order> order = new ArrayList<>(); for (String element : expressions) { assert element.length() >= 1; String operand = element.substring(1); switch (element.charAt(0)) { case KEY_PARTITION: keys.ad...
List<String> keys = new ArrayList<>(); List<Order> order = new ArrayList<>(); for (String element : expressions) { assert element.length() >= 1; String operand = element.substring(1); switch (element.charAt(0)) { case KEY_PARTITION: keys.add(operand); break; case KEY_ASCENDANT: order.add(new Order(operand, Direction.AS...
/** * Returns an instance. * @param expressions the grouping expressions * @return the instance */
Returns an instance
parse
{ "repo_name": "asakusafw/asakusafw", "path": "info/model/src/main/java/com/asakusafw/info/operator/InputGroup.java", "license": "apache-2.0", "size": 5942 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,788,585
public final Iterator<UWSAction> getUWSActions(){ return uwsActions.iterator(); }
final Iterator<UWSAction> function(){ return uwsActions.iterator(); }
/** * Gets all actions of this UWS. * * @return An iterator on its actions. */
Gets all actions of this UWS
getUWSActions
{ "repo_name": "gmantele/experimental-taplib", "path": "uws/uwslib/src/uws/service/UWSService.java", "license": "lgpl-3.0", "size": 47751 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
21,593
private void deleteNode(NodeRef nodeRef, boolean allowArchival) { // The node(s) involved may not be pending deletion checkPendingDelete(nodeRef); // Pair contains NodeId, NodeRef Pair<Long, NodeRef> nodePair = getNodePairNotNull(nodeRef); Long nodeId = no...
void function(NodeRef nodeRef, boolean allowArchival) { checkPendingDelete(nodeRef); Pair<Long, NodeRef> nodePair = getNodePairNotNull(nodeRef); Long nodeId = nodePair.getFirst(); Boolean requiresDelete = null; QName nodeTypeQName = nodeDAO.getNodeType(nodeId); Set<QName> nodeAspectQNames = nodeDAO.getNodeAspects(nodeI...
/** * Delete a node * * @param nodeRef the node to delete * @param allowArchival <tt>true</tt> if normal archival may occur or * <tt>false</tt> if the node must be forcibly deleted */
Delete a node
deleteNode
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/node/db/DbNodeServiceImpl.java", "license": "lgpl-3.0", "size": 141832 }
[ "java.util.Collections", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Set", "org.alfresco.model.ContentModel", "org.alfresco.repo.node.db.NodeHierarchyWalker", "org.alfresco.repo.transaction.TransactionalResourceHelper", "org.alfresco.service.cmr.dictionary.AspectDefinitio...
import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.alfresco.model.ContentModel; import org.alfresco.repo.node.db.NodeHierarchyWalker; import org.alfresco.repo.transaction.TransactionalResourceHelper; import org.alfresco.service.cmr....
import java.util.*; import org.alfresco.model.*; import org.alfresco.repo.node.db.*; import org.alfresco.repo.transaction.*; import org.alfresco.service.cmr.dictionary.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*;
[ "java.util", "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service", "org.alfresco.util" ]
java.util; org.alfresco.model; org.alfresco.repo; org.alfresco.service; org.alfresco.util;
869,678
protected Map<String, Object> getCasPrincipalAttributes(final Map<String, Object> model, final RegisteredService registeredService) { return super.getPrincipalAttributesAsMultiValuedAttributes(model); }
Map<String, Object> function(final Map<String, Object> model, final RegisteredService registeredService) { return super.getPrincipalAttributesAsMultiValuedAttributes(model); }
/** * Put cas principal attributes into model. * * @param model the model * @param registeredService the registered service * @return the cas principal attributes */
Put cas principal attributes into model
getCasPrincipalAttributes
{ "repo_name": "PetrGasparik/cas", "path": "cas-server-webapp-validation/src/main/java/org/jasig/cas/web/view/Cas30ResponseView.java", "license": "apache-2.0", "size": 5420 }
[ "java.util.Map", "org.jasig.cas.services.RegisteredService" ]
import java.util.Map; import org.jasig.cas.services.RegisteredService;
import java.util.*; import org.jasig.cas.services.*;
[ "java.util", "org.jasig.cas" ]
java.util; org.jasig.cas;
2,396,045
LogSchemaDto findLogSchemaById(String id);
LogSchemaDto findLogSchemaById(String id);
/** * Find log schema by id. * * @param id the log schema id * @return the log schema dto */
Find log schema by id
findLogSchemaById
{ "repo_name": "vzhukovskyi/kaa", "path": "server/common/dao/src/main/java/org/kaaproject/kaa/server/common/dao/LogSchemaService.java", "license": "apache-2.0", "size": 2281 }
[ "org.kaaproject.kaa.common.dto.logs.LogSchemaDto" ]
import org.kaaproject.kaa.common.dto.logs.LogSchemaDto;
import org.kaaproject.kaa.common.dto.logs.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
2,882,346
public SocketAddress getLocalSocketAddress() { return delegate().getLocalSocketAddress(); } /** * Sends a datagram packet from this socket. The * {@code DatagramPacket} includes information indicating the * data to be sent, its length, the IP address of the remote host, * and th...
SocketAddress function() { return delegate().getLocalSocketAddress(); } /** * Sends a datagram packet from this socket. The * {@code DatagramPacket} includes information indicating the * data to be sent, its length, the IP address of the remote host, * and the port number on the remote host. * * <p>If there is a securi...
/** * Returns the address of the endpoint this socket is bound to. * * @return a {@code SocketAddress} representing the local endpoint of this * socket, or {@code null} if it is closed or not bound yet. * @see #getLocalAddress() * @see #getLocalPort() * @see #bind(SocketAddres...
Returns the address of the endpoint this socket is bound to
getLocalSocketAddress
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/java/net/DatagramSocket.java", "license": "apache-2.0", "size": 60495 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
901,714
private List<ILevel> getListOfParameterLevels() { List<ILevel> parameterLevels = new ArrayList<ILevel>(); if (this.methodParameters != null) { for (Integer key : this.methodParameters.keySet()) { ILevel level = methodParameters.get(key).getLevel(); if (lev...
List<ILevel> function() { List<ILevel> parameterLevels = new ArrayList<ILevel>(); if (this.methodParameters != null) { for (Integer key : this.methodParameters.keySet()) { ILevel level = methodParameters.get(key).getLevel(); if (level != null) { parameterLevels.add(level); } } } return parameterLevels; }
/** * Method returns the <em>security levels</em> of parameters of the analyzed * method. Note that the returned list is not ordered. * * @return The <em>security levels</em> of the method parameter of the * analyzed method. */
Method returns the security levels of parameters of the analyzed method. Note that the returned list is not ordered
getListOfParameterLevels
{ "repo_name": "luminousfennell/jgs", "path": "TaintTracking/src/model/MethodEnvironment.java", "license": "bsd-3-clause", "size": 20288 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,857,631
SharedPreferences settings = context.getSharedPreferences(PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putString(FACEBOOK_TOKEN, token); editor.commit(); }
SharedPreferences settings = context.getSharedPreferences(PREFS_NAME, 0); SharedPreferences.Editor editor = settings.edit(); editor.putString(FACEBOOK_TOKEN, token); editor.commit(); }
/** * This method stores Facebook token into shared preferences file * @param context Application context * @param token The token that is returned by Facebook */
This method stores Facebook token into shared preferences file
setFacebookToken
{ "repo_name": "Hesamedin/AndroidTemplate", "path": "AndroidTemplate/app/src/main/java/com/kamalan/utility/MySpStorage.java", "license": "apache-2.0", "size": 1253 }
[ "android.content.SharedPreferences" ]
import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
431,214
void deleteAsync(FsVolumeReference volumeRef, File blockFile, File metaFile, ExtendedBlock block, String trashDirectory) { LOG.info("Scheduling " + block.getLocalBlock() + " file " + blockFile + " for deletion"); ReplicaFileDeleteTask deletionTask = new ReplicaFileDeleteTask( volumeRef, ...
void deleteAsync(FsVolumeReference volumeRef, File blockFile, File metaFile, ExtendedBlock block, String trashDirectory) { LOG.info(STR + block.getLocalBlock() + STR + blockFile + STR); ReplicaFileDeleteTask deletionTask = new ReplicaFileDeleteTask( volumeRef, blockFile, metaFile, block, trashDirectory); execute(((FsVo...
/** * Delete the block file and meta file from the disk asynchronously, adjust * dfsUsed statistics accordingly. */
Delete the block file and meta file from the disk asynchronously, adjust dfsUsed statistics accordingly
deleteAsync
{ "repo_name": "laxman-ch/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetAsyncDiskService.java", "license": "apache-2.0", "size": 11609 }
[ "java.io.File", "org.apache.hadoop.hdfs.protocol.ExtendedBlock", "org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeReference" ]
import java.io.File; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeReference;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.fsdataset.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,069,646
public GetFiltersResponse getFilter(GetFiltersRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, MLRequestConverters::getFilter, options, GetFiltersResponse::fromXContent, Collections....
GetFiltersResponse function(GetFiltersRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, MLRequestConverters::getFilter, options, GetFiltersResponse::fromXContent, Collections.emptySet()); }
/** * Gets Machine Learning Filters * <p> * For additional info * see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html">ML GET Filter documentation</a> * * @param request The request * @param options Additional request options (e.g. headers),...
Gets Machine Learning Filters For additional info see ML GET Filter documentation
getFilter
{ "repo_name": "nknize/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java", "license": "apache-2.0", "size": 133260 }
[ "java.io.IOException", "java.util.Collections", "org.elasticsearch.client.ml.GetFiltersRequest", "org.elasticsearch.client.ml.GetFiltersResponse" ]
import java.io.IOException; import java.util.Collections; import org.elasticsearch.client.ml.GetFiltersRequest; import org.elasticsearch.client.ml.GetFiltersResponse;
import java.io.*; import java.util.*; import org.elasticsearch.client.ml.*;
[ "java.io", "java.util", "org.elasticsearch.client" ]
java.io; java.util; org.elasticsearch.client;
1,179,330
public boolean setByPosition(int position, Object value) throws TorqueException, IllegalArgumentException { if (position == 0) { return setByName("ObjectID", value); } if (position == 1) { return setByName("AttributeID", value); } if (p...
boolean function(int position, Object value) throws TorqueException, IllegalArgumentException { if (position == 0) { return setByName(STR, value); } if (position == 1) { return setByName(STR, value); } if (position == 2) { return setByName(STR, value); } if (position == 3) { return setByName(STR, value); } if (position...
/** * Set field values by its position (zero based) in the XML schema. * * @param position The field position * @param value field value * @return True if value was set, false if not (invalid position / protected field). * @throws IllegalArgumentException if object type of value does not m...
Set field values by its position (zero based) in the XML schema
setByPosition
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTAttributeOption.java", "license": "gpl-3.0", "size": 56949 }
[ "org.apache.torque.TorqueException" ]
import org.apache.torque.TorqueException;
import org.apache.torque.*;
[ "org.apache.torque" ]
org.apache.torque;
168,316
public static void putVideoScore(ClusterSet clusterSet) { logger.info("------ Use Video ------"); boolean isCloseListCheck = parameter.getParameterNamedSpeaker().isCloseListCheck(); if (parameter.getParameterNamedSpeaker().isUseVideo()) { double thr = parameter.getParameterNamedSpeaker().getThresholdVideo()...
static void function(ClusterSet clusterSet) { logger.info(STR); boolean isCloseListCheck = parameter.getParameterNamedSpeaker().isCloseListCheck(); if (parameter.getParameterNamedSpeaker().isUseVideo()) { double thr = parameter.getParameterNamedSpeaker().getThresholdVideo(); for (String name : clusterSet) { Cluster clu...
/** * Put video score. * * @param clusterSet the cluster set */
Put video score
putVideoScore
{ "repo_name": "Adirockzz95/GenderDetect", "path": "src/src/fr/lium/experimental/spkDiarization/programs/SpeakerIdenificationDecision9.java", "license": "gpl-3.0", "size": 41469 }
[ "fr.lium.experimental.spkDiarization.libClusteringData.speakerName.SpeakerName", "fr.lium.experimental.spkDiarization.libNamedSpeaker.SpeakerNameUtils", "fr.lium.spkDiarization.libClusteringData.Cluster", "fr.lium.spkDiarization.libClusteringData.ClusterSet", "fr.lium.spkDiarization.libModel.ModelScores" ]
import fr.lium.experimental.spkDiarization.libClusteringData.speakerName.SpeakerName; import fr.lium.experimental.spkDiarization.libNamedSpeaker.SpeakerNameUtils; import fr.lium.spkDiarization.libClusteringData.Cluster; import fr.lium.spkDiarization.libClusteringData.ClusterSet; import fr.lium.spkDiarization.libModel.M...
import fr.lium.*; import fr.lium.experimental.*;
[ "fr.lium", "fr.lium.experimental" ]
fr.lium; fr.lium.experimental;
1,756,275
public static void startPersistenceService(Context context) { Log.i(LOG_CLASS, "Started persistence service."); Intent stepCountPersistenceServiceIntent = new Intent(context, StepCountPersistenceReceiver.class); context.sendBroadcast(stepCountPersistenceServiceIntent); }
static void function(Context context) { Log.i(LOG_CLASS, STR); Intent stepCountPersistenceServiceIntent = new Intent(context, StepCountPersistenceReceiver.class); context.sendBroadcast(stepCountPersistenceServiceIntent); }
/** * Starts the step detection service * * @param context The application context */
Starts the step detection service
startPersistenceService
{ "repo_name": "SecUSo/privacy-friendly-pedometer", "path": "app/src/main/java/org/secuso/privacyfriendlyactivitytracker/utils/StepDetectionServiceHelper.java", "license": "gpl-3.0", "size": 12794 }
[ "android.content.Context", "android.content.Intent", "android.util.Log", "org.secuso.privacyfriendlyactivitytracker.receivers.StepCountPersistenceReceiver" ]
import android.content.Context; import android.content.Intent; import android.util.Log; import org.secuso.privacyfriendlyactivitytracker.receivers.StepCountPersistenceReceiver;
import android.content.*; import android.util.*; import org.secuso.privacyfriendlyactivitytracker.receivers.*;
[ "android.content", "android.util", "org.secuso.privacyfriendlyactivitytracker" ]
android.content; android.util; org.secuso.privacyfriendlyactivitytracker;
2,489,595
default Web3jEndpointProducerBuilder priority(BigInteger priority) { doSetProperty("priority", priority); return this; }
default Web3jEndpointProducerBuilder priority(BigInteger priority) { doSetProperty(STR, priority); return this; }
/** * The priority of a whisper message. * * The option is a: <code>java.math.BigInteger</code> type. * * Group: producer */
The priority of a whisper message. The option is a: <code>java.math.BigInteger</code> type. Group: producer
priority
{ "repo_name": "DariusX/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Web3jEndpointBuilderFactory.java", "license": "apache-2.0", "size": 51259 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,234,881
Set<OpenstackNode> completeNodes();
Set<OpenstackNode> completeNodes();
/** * Returns all nodes with complete state. * * @return set of openstack nodes */
Returns all nodes with complete state
completeNodes
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "apps/openstacknode/api/src/main/java/org/onosproject/openstacknode/api/OpenstackNodeService.java", "license": "apache-2.0", "size": 2217 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,016,684
public void onLivingUpdate() { if (!this.onGround && this.motionY < 0.0D) { this.motionY *= 0.6D; } if (this.worldObj.isRemote) { if (this.rand.nextInt(24) == 0 && !this.isSilent()) { this.worldObj.playSound(this.posX +...
void function() { if (!this.onGround && this.motionY < 0.0D) { this.motionY *= 0.6D; } if (this.worldObj.isRemote) { if (this.rand.nextInt(24) == 0 && !this.isSilent()) { this.worldObj.playSound(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, SoundEvents.ENTITY_BLAZE_BURN, this.getSoundCategory(), 1.0F + this.ran...
/** * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */
Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn
onLivingUpdate
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/monster/EntityBlaze.java", "license": "gpl-3.0", "size": 10995 }
[ "net.minecraft.init.SoundEvents", "net.minecraft.util.EnumParticleTypes" ]
import net.minecraft.init.SoundEvents; import net.minecraft.util.EnumParticleTypes;
import net.minecraft.init.*; import net.minecraft.util.*;
[ "net.minecraft.init", "net.minecraft.util" ]
net.minecraft.init; net.minecraft.util;
659,883
RedisFuture<Long> slowlogLen();
RedisFuture<Long> slowlogLen();
/** * Obtaining the current length of the slow log. * * @return Long length of the slow log. */
Obtaining the current length of the slow log
slowlogLen
{ "repo_name": "lettuce-io/lettuce-core", "path": "src/main/java/io/lettuce/core/api/async/RedisServerAsyncCommands.java", "license": "apache-2.0", "size": 12930 }
[ "io.lettuce.core.RedisFuture" ]
import io.lettuce.core.RedisFuture;
import io.lettuce.core.*;
[ "io.lettuce.core" ]
io.lettuce.core;
1,732,138
private String getToolPath() { if (!featureConfiguration.actionIsConfigured(linkType.getActionName())) { return null; } String toolPath = featureConfiguration .getToolForAction(linkType.getActionName()) .getToolPath(cppConfiguration.getCrosstoolTopPathFragment()) ...
String function() { if (!featureConfiguration.actionIsConfigured(linkType.getActionName())) { return null; } String toolPath = featureConfiguration .getToolForAction(linkType.getActionName()) .getToolPath(cppConfiguration.getCrosstoolTopPathFragment()) .getPathString(); if (linkType.equals(LinkTargetType.DYNAMIC_LIBRAR...
/** * Returns the tool path from feature configuration, if the tool in the configuration is sane, or * builtin tool, if configuration has a dummy value. */
Returns the tool path from feature configuration, if the tool in the configuration is sane, or builtin tool, if configuration has a dummy value
getToolPath
{ "repo_name": "LuminateWireless/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java", "license": "apache-2.0", "size": 67732 }
[ "com.google.devtools.build.lib.rules.cpp.Link" ]
import com.google.devtools.build.lib.rules.cpp.Link;
import com.google.devtools.build.lib.rules.cpp.*;
[ "com.google.devtools" ]
com.google.devtools;
58,205
protected int getFirstPage() { return mFirstPage == Book.UNKNOWN_NUMBER_OF_PAGES ? 0 : mFirstPage; }
int function() { return mFirstPage == Book.UNKNOWN_NUMBER_OF_PAGES ? 0 : mFirstPage; }
/** * Return the zero based index of the first page to * be printed in this job. */
Return the zero based index of the first page to be printed in this job
getFirstPage
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/sun/print/RasterPrinterJob.java", "license": "apache-2.0", "size": 98463 }
[ "java.awt.print.Book" ]
import java.awt.print.Book;
import java.awt.print.*;
[ "java.awt" ]
java.awt;
857,998