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 Builder packages(Class<?>... basePackageClasses) {
Set<String> packages = new HashSet<>();
for (Class<?> type : basePackageClasses) {
packages.add(ClassUtils.getPackageName(type));
}
this.packagesToScan = StringUtils.toStringArray(packages);
return this;
} | Builder function(Class<?>... basePackageClasses) { Set<String> packages = new HashSet<>(); for (Class<?> type : basePackageClasses) { packages.add(ClassUtils.getPackageName(type)); } this.packagesToScan = StringUtils.toStringArray(packages); return this; } | /**
* The classes whose packages should be scanned for {@code @Entity} annotations.
* @param basePackageClasses the classes to use
* @return the builder for fluent usage
*/ | The classes whose packages should be scanned for @Entity annotations | packages | {
"repo_name": "lburgazzoli/spring-boot",
"path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java",
"license": "apache-2.0",
"size": 8678
} | [
"java.util.HashSet",
"java.util.Set",
"org.springframework.util.ClassUtils",
"org.springframework.util.StringUtils"
] | import java.util.HashSet; import java.util.Set; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 1,420,950 |
private boolean isBeforeOrEqualTo(Date actual, Date other) {
return comparisonStrategy.isLessThanOrEqualTo(actual, other);
} | boolean function(Date actual, Date other) { return comparisonStrategy.isLessThanOrEqualTo(actual, other); } | /**
* Returns <code>true</code> if the actual {@code Date} is before or equal to the given one according to underlying
* {@link #comparisonStrategy}, false otherwise.
* @param actual the actual date - must not be null.
* @param other the given Date.
* @return <code>true</code> if the actual {@code Date} ... | Returns <code>true</code> if the actual Date is before or equal to the given one according to underlying <code>#comparisonStrategy</code>, false otherwise | isBeforeOrEqualTo | {
"repo_name": "dorzey/assertj-core",
"path": "src/main/java/org/assertj/core/internal/Dates.java",
"license": "apache-2.0",
"size": 39894
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,023,357 |
@Override
public boolean permission(Player player, String permission) {
return checkUserPermission(ph.getUser(player.getName()).updatePlayer(player), permission);
} | boolean function(Player player, String permission) { return checkUserPermission(ph.getUser(player.getName()).updatePlayer(player), permission); } | /**
* Checks if a player can use that permission node.
*
* @param player
* @param permission
* @return true if the player has the permission
*/ | Checks if a player can use that permission node | permission | {
"repo_name": "GravityCraftMC/EssentialsGroupManager",
"path": "src/main/java/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java",
"license": "gpl-3.0",
"size": 36770
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 11,311 |
public static Bson geoWithinCenterSphere(final String fieldName, final double x, final double y, final double radius) {
BsonDocument centerSphere = new BsonDocument("$centerSphere",
new BsonArray(Arrays.<BsonValue>asList(new BsonArray(asList(new BsonDoubl... | static Bson function(final String fieldName, final double x, final double y, final double radius) { BsonDocument centerSphere = new BsonDocument(STR, new BsonArray(Arrays.<BsonValue>asList(new BsonArray(asList(new BsonDouble(x), new BsonDouble(y))), new BsonDouble(radius)))); return new OperatorFilter<BsonDocument>(STR... | /**
* Creates a filter that matches all documents containing a field with geospatial data (GeoJSON or legacy coordinate pairs) that exist
* entirely within the specified circle, using spherical geometry. If using longitude and latitude, specify longitude first.
*
* @param fieldName the field name
... | Creates a filter that matches all documents containing a field with geospatial data (GeoJSON or legacy coordinate pairs) that exist entirely within the specified circle, using spherical geometry. If using longitude and latitude, specify longitude first | geoWithinCenterSphere | {
"repo_name": "gianpaj/mongo-java-driver",
"path": "driver-core/src/main/com/mongodb/client/model/Filters.java",
"license": "apache-2.0",
"size": 42343
} | [
"java.util.Arrays",
"org.bson.BsonArray",
"org.bson.BsonDocument",
"org.bson.BsonDouble",
"org.bson.BsonValue",
"org.bson.conversions.Bson"
] | import java.util.Arrays; import org.bson.BsonArray; import org.bson.BsonDocument; import org.bson.BsonDouble; import org.bson.BsonValue; import org.bson.conversions.Bson; | import java.util.*; import org.bson.*; import org.bson.conversions.*; | [
"java.util",
"org.bson",
"org.bson.conversions"
] | java.util; org.bson; org.bson.conversions; | 1,579,192 |
protected boolean validateAssetRepresentative() {
boolean valid = true;
Person assetRepresentative = SpringContext.getBean(PersonService.class).getPersonByPrincipalName(newAsset.getAssetRepresentative().getPrincipalName());
if (ObjectUtils.isNull(assetRepresentative)) {
putFieldE... | boolean function() { boolean valid = true; Person assetRepresentative = SpringContext.getBean(PersonService.class).getPersonByPrincipalName(newAsset.getAssetRepresentative().getPrincipalName()); if (ObjectUtils.isNull(assetRepresentative)) { putFieldError(ASSET_REPRESENTATIVE, ERROR_PRE_TAG_INVALID_REPRESENTATIVE_ID); ... | /**
* Validate asset representative
*
* @return boolean
*/ | Validate asset representative | validateAssetRepresentative | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/validation/impl/AssetRule.java",
"license": "agpl-3.0",
"size": 35887
} | [
"org.kuali.kfs.krad.util.ObjectUtils",
"org.kuali.kfs.sys.context.SpringContext",
"org.kuali.rice.kim.api.identity.Person",
"org.kuali.rice.kim.api.identity.PersonService"
] | import org.kuali.kfs.krad.util.ObjectUtils; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.kim.api.identity.Person; import org.kuali.rice.kim.api.identity.PersonService; | import org.kuali.kfs.krad.util.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kim.api.identity.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 773,958 |
EReference getCallableElement_SupportedInterfaceRefs(); | EReference getCallableElement_SupportedInterfaceRefs(); | /**
* Returns the meta object for the reference list '{@link org.eclipse.bpmn2.CallableElement#getSupportedInterfaceRefs <em>Supported Interface Refs</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Supported Interface Refs</em>'.
* @see org.eclip... | Returns the meta object for the reference list '<code>org.eclipse.bpmn2.CallableElement#getSupportedInterfaceRefs Supported Interface Refs</code>'. | getCallableElement_SupportedInterfaceRefs | {
"repo_name": "Rikkola/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 929298
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,124,109 |
Set<Class<?>> allClasses() {
final Set<Class<?>> allClasses = new HashSet<>(getClasses());
for (Object singleton : getSingletons()) {
allClasses.add(singleton.getClass());
}
return allClasses;
} | Set<Class<?>> allClasses() { final Set<Class<?>> allClasses = new HashSet<>(getClasses()); for (Object singleton : getSingletons()) { allClasses.add(singleton.getClass()); } return allClasses; } | /**
* Combines types of getClasses() and getSingletons in one Set.
*
* @return all registered types
*/ | Combines types of getClasses() and getSingletons in one Set | allClasses | {
"repo_name": "jplock/dropwizard",
"path": "dropwizard-jersey/src/main/java/io/dropwizard/jersey/DropwizardResourceConfig.java",
"license": "apache-2.0",
"size": 14685
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 729,511 |
public boolean hasArrived_b() throws StopRequestException {
ai.checkInterruption(); // APPEL OBLIGATOIRE
if (arrived_b == false) {
if (arrived_tile_b == null) {
// System.out.println("ssssss");
arrived_b = true;
} else {
AiTile currentTile = ai.getPercepts().getOwnHero().getTile();
... | boolean function() throws StopRequestException { ai.checkInterruption(); if (arrived_b == false) { if (arrived_tile_b == null) { arrived_b = true; } else { AiTile currentTile = ai.getPercepts().getOwnHero().getTile(); arrived_b = currentTile == arrived_tile_b; } } return arrived_b; } | /**
* Verifies if we arrived the final case or not:
*
* @return Description manquante !
* @throws StopRequestException
* Description manquante !
*/ | Verifies if we arrived the final case or not: | hasArrived_b | {
"repo_name": "vlabatut/totalboumboum",
"path": "resources/ai/org/totalboumboum/ai/v200910/ais/demirciduzokergok/v5_2/Wall_Manager.java",
"license": "gpl-2.0",
"size": 9591
} | [
"org.totalboumboum.ai.v200910.adapter.communication.StopRequestException",
"org.totalboumboum.ai.v200910.adapter.data.AiTile"
] | import org.totalboumboum.ai.v200910.adapter.communication.StopRequestException; import org.totalboumboum.ai.v200910.adapter.data.AiTile; | import org.totalboumboum.ai.v200910.adapter.communication.*; import org.totalboumboum.ai.v200910.adapter.data.*; | [
"org.totalboumboum.ai"
] | org.totalboumboum.ai; | 2,871,531 |
public String getMessage(String code, List<?> args, String defaultMessage) {
return getMessage(code, (args != null ? args.toArray() : null), defaultMessage, isDefaultHtmlEscape());
} | String function(String code, List<?> args, String defaultMessage) { return getMessage(code, (args != null ? args.toArray() : null), defaultMessage, isDefaultHtmlEscape()); } | /**
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
* @param code code of the message
* @param args arguments for the message as a List, or {@code null} if none
* @param defaultMessage String to return if the lookup fails
* @return the message
*/ | Retrieve the message for the given code, using the "defaultHtmlEscape" setting | getMessage | {
"repo_name": "QBNemo/spring-mvc-showcase",
"path": "src/main/java/org/springframework/web/servlet/support/RequestContext.java",
"license": "apache-2.0",
"size": 38194
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,708,242 |
public void addPositions(final Collection<? extends Position> positions) {
ArgumentChecker.noNulls(positions, "positions");
for (final Position position : positions) {
addPosition(position);
}
} | void function(final Collection<? extends Position> positions) { ArgumentChecker.noNulls(positions, STR); for (final Position position : positions) { addPosition(position); } } | /**
* Adds a collection of nodes to the list of immediate children.
*
* @param positions the positions to add, not null
*/ | Adds a collection of nodes to the list of immediate children | addPositions | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/main/java/com/opengamma/core/position/impl/SimplePortfolioNode.java",
"license": "apache-2.0",
"size": 14221
} | [
"com.opengamma.core.position.Position",
"com.opengamma.util.ArgumentChecker",
"java.util.Collection"
] | import com.opengamma.core.position.Position; import com.opengamma.util.ArgumentChecker; import java.util.Collection; | import com.opengamma.core.position.*; import com.opengamma.util.*; import java.util.*; | [
"com.opengamma.core",
"com.opengamma.util",
"java.util"
] | com.opengamma.core; com.opengamma.util; java.util; | 2,512,089 |
public List<EncuestaDetalle> getResponseBlock(EncuestaPlantillaBloque bloque) {
if (getBean().getId() == null) {
return getResponseBlockMemory(bloque);
} else {
return encuestaDetalleLogic.getRespuestas(getBean(), bloque);
}
} | List<EncuestaDetalle> function(EncuestaPlantillaBloque bloque) { if (getBean().getId() == null) { return getResponseBlockMemory(bloque); } else { return encuestaDetalleLogic.getRespuestas(getBean(), bloque); } } | /**
* Obtiene las respuestas relacionadas a un bloque en particular.
*
* <p>
* Esto es, verifica si la los datos del formulario estan en memoria y de lo
* contrario obtiene las respuestas de la base de datos.
*
* @param bloque
* Bloque del cual se desea obtener las respuestas.
* @return L... | Obtiene las respuestas relacionadas a un bloque en particular. Esto es, verifica si la los datos del formulario estan en memoria y de lo contrario obtiene las respuestas de la base de datos | getResponseBlock | {
"repo_name": "fpuna-cia/karaku",
"path": "src/main/java/py/una/pol/karaku/survey/controller/KarakuDynamicSurveyBaseController.java",
"license": "lgpl-2.1",
"size": 19229
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,671,726 |
@Vm2c(code="return getObject(_fp, FP_returnIP);")
native static Address getPreviousIP(Address fp) throws AllowInlinedPragma; | @Vm2c(code=STR) native static Address getPreviousIP(Address fp) throws AllowInlinedPragma; | /**
* Gets the previous instruction pointer from a frame pointer.
*
* @param fp the frame pointer
* @return the previous instruction pointer
*/ | Gets the previous instruction pointer from a frame pointer | getPreviousIP | {
"repo_name": "nejads/MqttMoped",
"path": "squawk/cldc/src/com/sun/squawk/VM.java",
"license": "gpl-2.0",
"size": 178144
} | [
"com.sun.squawk.pragma.AllowInlinedPragma"
] | import com.sun.squawk.pragma.AllowInlinedPragma; | import com.sun.squawk.pragma.*; | [
"com.sun.squawk"
] | com.sun.squawk; | 2,517,878 |
public List<T> getRows() {
return Collections.unmodifiableList(rows);
} | List<T> function() { return Collections.unmodifiableList(rows); } | /**
* Get the rows from the model.
*
* @return the rows
*/ | Get the rows from the model | getRows | {
"repo_name": "chriswareham/superfly",
"path": "src/main/java/net/chriswareham/gui/SortedTableModel.java",
"license": "bsd-2-clause",
"size": 3332
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,623,466 |
public BaseDescr statement(PackageDescrBuilder pkg) throws RecognitionException {
BaseDescr descr = null;
try {
if (helper.validateIdentifierKey(DroolsSoftKeywords.IMPORT)) {
descr = importStatement(pkg);
if (state.failed)
return descr;... | BaseDescr function(PackageDescrBuilder pkg) throws RecognitionException { BaseDescr descr = null; try { if (helper.validateIdentifierKey(DroolsSoftKeywords.IMPORT)) { descr = importStatement(pkg); if (state.failed) return descr; } else if (helper.validateIdentifierKey(DroolsSoftKeywords.GLOBAL)) { descr = globalStateme... | /**
* statement := importStatement
* | globalStatement
* | declare
* | rule
* | ruleAttribute
* | function
* | query
* ;
*
* @throws org.antlr.runtime.RecognitionException
*/ | statement := importStatement | globalStatement | declare | rule | ruleAttribute | function | query | statement | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/drools-master/drools-compiler/src/main/java/org/drools/compiler/lang/DRL6Parser.java",
"license": "mit",
"size": 172972
} | [
"org.antlr.runtime.RecognitionException",
"org.drools.compiler.lang.api.PackageDescrBuilder",
"org.drools.compiler.lang.descr.BaseDescr"
] | import org.antlr.runtime.RecognitionException; import org.drools.compiler.lang.api.PackageDescrBuilder; import org.drools.compiler.lang.descr.BaseDescr; | import org.antlr.runtime.*; import org.drools.compiler.lang.api.*; import org.drools.compiler.lang.descr.*; | [
"org.antlr.runtime",
"org.drools.compiler"
] | org.antlr.runtime; org.drools.compiler; | 1,142,574 |
Map<String, TreeNode> newFiles = new HashMap<>();
for (String file : files.keySet()) {
if (Files.isDirectory(Paths.get(file))) {
files.get(file).flatten(); // flatten the children
newFiles.putAll(files.get(file).getOnlyFiles()); // add its files to the
// new Map
} else
n... | Map<String, TreeNode> newFiles = new HashMap<>(); for (String file : files.keySet()) { if (Files.isDirectory(Paths.get(file))) { files.get(file).flatten(); newFiles.putAll(files.get(file).getOnlyFiles()); } else newFiles.put(file, files.get(file)); } files = newFiles; changed(); } | /**
* Flattens the TreeNode, i.e., moves all it's child nodes to one level.
*/ | Flattens the TreeNode, i.e., moves all it's child nodes to one level | flatten | {
"repo_name": "DGLABArquivos/roda-in",
"path": "src/main/java/org/roda/rodain/core/rules/TreeNode.java",
"license": "lgpl-3.0",
"size": 5393
} | [
"java.nio.file.Files",
"java.nio.file.Paths",
"java.util.HashMap",
"java.util.Map"
] | import java.nio.file.Files; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; | import java.nio.file.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 1,231,917 |
public List<Long> getNodes() {
return m_nodes;
} | List<Long> function() { return m_nodes; } | /**
* Get the node IDs in this category
*
* @return the list of node IDs in this category
*/ | Get the node IDs in this category | getNodes | {
"repo_name": "tdefilip/opennms",
"path": "opennms-services/src/main/java/org/opennms/netmgt/rtc/datablock/RTCCategory.java",
"license": "agpl-3.0",
"size": 4606
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,730,759 |
public String getSavepointName() throws SQLException {
if (id == -1) {
return name;
}
throw Util.notSupported();
} | String function() throws SQLException { if (id == -1) { return name; } throw Util.notSupported(); } | /**
* Retrieves the name of the savepoint that this <code>Savepoint</code>
* object represents.
*
* @return the name of this savepoint
* @exception SQLException if this is an un-named savepoint
* @since 1.4
*/ | Retrieves the name of the savepoint that this <code>Savepoint</code> object represents | getSavepointName | {
"repo_name": "RabadanLab/Pegasus",
"path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/jdbc/JDBCSavepoint.java",
"license": "mit",
"size": 4484
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,481,546 |
public void init(final long projection,
final int[] state,
final HashGroupify groupify,
final HashGroupify source,
final int[] snapshot,
final TransitionType transition,
final int star... | void function(final long projection, final int[] state, final HashGroupify groupify, final HashGroupify source, final int[] snapshot, final TransitionType transition, final int startIndex, final int stopIndex, final int bucket, final HashGroupifyEntry element, final int[][] buffer) { this.buffer = buffer; this.startInd... | /**
* Inits the.
*
* @param projection
* the projection
* @param state
* the state
* @param groupify
* the groupify
* @param source
* the source
* @param snapshot
* the snapshot
* @param... | Inits the | init | {
"repo_name": "jgaupp/arx",
"path": "src/main/org/deidentifier/arx/framework/check/transformer/AbstractTransformer.java",
"license": "apache-2.0",
"size": 23546
} | [
"org.deidentifier.arx.framework.check.StateMachine",
"org.deidentifier.arx.framework.check.groupify.HashGroupify",
"org.deidentifier.arx.framework.check.groupify.HashGroupifyEntry"
] | import org.deidentifier.arx.framework.check.StateMachine; import org.deidentifier.arx.framework.check.groupify.HashGroupify; import org.deidentifier.arx.framework.check.groupify.HashGroupifyEntry; | import org.deidentifier.arx.framework.check.*; import org.deidentifier.arx.framework.check.groupify.*; | [
"org.deidentifier.arx"
] | org.deidentifier.arx; | 560,284 |
public static void trace(final Logger logger, final String format, final Throwable throwable, final Object... params) {
trace(logger, format, throwable, null, params);
} | static void function(final Logger logger, final String format, final Throwable throwable, final Object... params) { trace(logger, format, throwable, null, params); } | /**
* Enable logging using String.format internally only if debug level is
* enabled.
*
* @param logger
* the logger that will be used to log the message
* @param format
* the format string (the template string)
* @param throwable
* a throwable object that holds the t... | Enable logging using String.format internally only if debug level is enabled | trace | {
"repo_name": "foundation-runtime/logging",
"path": "logging-log4j/src/main/java/com/cisco/oss/foundation/logging/LoggingHelper.java",
"license": "apache-2.0",
"size": 17837
} | [
"org.apache.log4j.Logger"
] | import org.apache.log4j.Logger; | import org.apache.log4j.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 1,512,293 |
private void addRelationToQueryGraph(String fromVariable, String toVariable,
QueryRelation queryRelation) {
if (!queryGraph.containsKey(fromVariable)) {
queryGraph.put(fromVariable, new HashMap<>());
}
if (!queryGraph.get(fromVariable).containsKey(toVariable)) {
... | void function(String fromVariable, String toVariable, QueryRelation queryRelation) { if (!queryGraph.containsKey(fromVariable)) { queryGraph.put(fromVariable, new HashMap<>()); } if (!queryGraph.get(fromVariable).containsKey(toVariable)) { queryGraph.get(fromVariable).put(toVariable, new ArrayList<>()); } queryGraph.ge... | /**
* Adds the new relation to the {@code queryGraph} map.
*
* @param fromVariable The from variable.
* @param toVariable The to variable.
* @param queryRelation The {@link QueryRelation} containing the relation and variable types.
*/ | Adds the new relation to the queryGraph map | addRelationToQueryGraph | {
"repo_name": "graphflow/graphflow",
"path": "src/main/java/ca/waterloo/dsg/graphflow/query/structuredquery/QueryGraph.java",
"license": "apache-2.0",
"size": 6738
} | [
"java.util.ArrayList",
"java.util.HashMap"
] | import java.util.ArrayList; import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 253,056 |
public void onItemSelected(AdapterView<?> parent, View view, int position,
long id) {
// enable the corresponding TextView depending on whether the "disabling"
// position was selected
correspondingTextField.setEnabled(position != disableIndex);
}// onItemSelected
| void function(AdapterView<?> parent, View view, int position, long id) { correspondingTextField.setEnabled(position != disableIndex); } | /**
* callback method when an item is selected
*
* @param parent
* the AdapterView where the selection happened
* @param view
* the view within the AdapterView that was clicked
* @param position
* the position in the spinner of the new selection
* @param id
* the row id of the item th... | callback method when an item is selected | onItemSelected | {
"repo_name": "MaxRobinson/Phase10",
"path": "Phase10Proj/src/edu/up/cs301/game/GameMainActivity.java",
"license": "gpl-2.0",
"size": 24770
} | [
"android.view.View",
"android.widget.AdapterView"
] | import android.view.View; import android.widget.AdapterView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,436,332 |
private void handleRedirect(State state, Response response,
int statusCode) throws StopRequest, RetryDownload {
if (Constants.LOGVV) {
Log.v(Constants.TAG, "got HTTP redirect " + statusCode);
}
if (state.mRedirectCount >= Constants.MAX_REDIRECTS) {... | void function(State state, Response response, int statusCode) throws StopRequest, RetryDownload { if (Constants.LOGVV) { Log.v(Constants.TAG, STR + statusCode); } if (state.mRedirectCount >= Constants.MAX_REDIRECTS) { throw new StopRequest(Downloads.STATUS_TOO_MANY_REDIRECTS, STR); } String header = response.header(STR... | /**
* Handle a 3xx redirect status.
*/ | Handle a 3xx redirect status | handleRedirect | {
"repo_name": "cowthan/Ayo2022",
"path": "LibDownloadProvider/app/src/main/java/com/mozillaonline/providers/downloads/DownloadThread.java",
"license": "mit",
"size": 35615
} | [
"android.util.Log",
"com.squareup.okhttp.Response",
"java.net.URISyntaxException"
] | import android.util.Log; import com.squareup.okhttp.Response; import java.net.URISyntaxException; | import android.util.*; import com.squareup.okhttp.*; import java.net.*; | [
"android.util",
"com.squareup.okhttp",
"java.net"
] | android.util; com.squareup.okhttp; java.net; | 407,340 |
@Before
public void setup() throws ConfigurationException, BundleException {
UI.setCurrent(new DefaultUI());
UI.getCurrent().setContent(rootLayout);
} | void function() throws ConfigurationException, BundleException { UI.setCurrent(new DefaultUI()); UI.getCurrent().setContent(rootLayout); } | /**
* Setup tests.
*
* @throws ConfigurationException
* @throws BundleException
*/ | Setup tests | setup | {
"repo_name": "lunifera/lunifera-runtime-web",
"path": "org.lunifera.runtime.web.ecview.presentation.vaadin.tests/src/org/lunifera/runtime/web/ecview/presentation/vaadin/tests/presentation/ListPresentationTests.java",
"license": "epl-1.0",
"size": 62275
} | [
"com.vaadin.ui.UI",
"org.osgi.framework.BundleException",
"org.osgi.service.cm.ConfigurationException"
] | import com.vaadin.ui.UI; import org.osgi.framework.BundleException; import org.osgi.service.cm.ConfigurationException; | import com.vaadin.ui.*; import org.osgi.framework.*; import org.osgi.service.cm.*; | [
"com.vaadin.ui",
"org.osgi.framework",
"org.osgi.service"
] | com.vaadin.ui; org.osgi.framework; org.osgi.service; | 345,149 |
public static String quote(String string) {
StringWriter sw = new StringWriter();
synchronized (sw.getBuffer()) {
try {
return quote(string, sw).toString();
} catch (IOException ignored) {
// will never happen - we are writing to a string write... | static String function(String string) { StringWriter sw = new StringWriter(); synchronized (sw.getBuffer()) { try { return quote(string, sw).toString(); } catch (IOException ignored) { return ""; } } } | /**
* Produce a string in double quotes with backslash sequences in all the
* right places. A backslash will be inserted within </, producing <\/,
* allowing JSON text to be delivered in HTML. In JSON text, a string cannot
* contain a control character or an unescaped quote or backslash.
*
... | Produce a string in double quotes with backslash sequences in all the right places. A backslash will be inserted within </, producing <\/, allowing JSON text to be delivered in HTML. In JSON text, a string cannot contain a control character or an unescaped quote or backslash | quote | {
"repo_name": "kunonx/DesignFramework",
"path": "src/main/java/io/github/kunonx/DesignFramework/json/JSONObject.java",
"license": "mit",
"size": 67076
} | [
"java.io.IOException",
"java.io.StringWriter"
] | import java.io.IOException; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,576,950 |
public EReference getRemoteControl_Control() {
return (EReference)getRemoteControl().getEStructuralFeatures().get(0);
} | EReference function() { return (EReference)getRemoteControl().getEStructuralFeatures().get(0); } | /**
* Returns the meta object for the reference '{@link CIM15.IEC61970.SCADA.RemoteControl#getControl <em>Control</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Control</em>'.
* @see CIM15.IEC61970.SCADA.RemoteControl#getControl()
* @see #getRemote... | Returns the meta object for the reference '<code>CIM15.IEC61970.SCADA.RemoteControl#getControl Control</code>'. | getRemoteControl_Control | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/SCADA/SCADAPackage.java",
"license": "apache-2.0",
"size": 65525
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,092,975 |
@NonNull
public Cursor getSyncLog(@Nullable String moduleName) {
Select.FromSyntax query = Select.all().from(HaloContentContract.ContentSyncLog.class);
Select.ExecutableExpression executable = query;
if (moduleName != null) {
executable = query.where(HaloContentContract.Conte... | Cursor function(@Nullable String moduleName) { Select.FromSyntax query = Select.all().from(HaloContentContract.ContentSyncLog.class); Select.ExecutableExpression executable = query; if (moduleName != null) { executable = query.where(HaloContentContract.ContentSyncLog.MODULE_NAME).eq(moduleName); } return executable.on(... | /**
* Provides the sync log for the given module name.
*
* @param moduleName The module name or null for all.
* @return The cursor for this module name logs.
*/ | Provides the sync log for the given module name | getSyncLog | {
"repo_name": "mobgen/halo-android",
"path": "sdk-libs/halo-content/src/main/java/com/mobgen/halo/android/content/sync/ContentSyncLocalDatasource.java",
"license": "apache-2.0",
"size": 20507
} | [
"android.database.Cursor",
"android.support.annotation.Nullable",
"com.mobgen.halo.android.content.spec.HaloContentContract",
"com.mobgen.halo.android.framework.storage.database.dsl.queries.Select"
] | import android.database.Cursor; import android.support.annotation.Nullable; import com.mobgen.halo.android.content.spec.HaloContentContract; import com.mobgen.halo.android.framework.storage.database.dsl.queries.Select; | import android.database.*; import android.support.annotation.*; import com.mobgen.halo.android.content.spec.*; import com.mobgen.halo.android.framework.storage.database.dsl.queries.*; | [
"android.database",
"android.support",
"com.mobgen.halo"
] | android.database; android.support; com.mobgen.halo; | 1,294,991 |
public static void setStringType(Schema s, StringType stringType) {
// Utf8 is the default and implements CharSequence, so we only need to add
// a property when the type is String
if (stringType == StringType.String)
s.addProp(GenericData.STRING_PROP, GenericData.STRING_TYPE_STRING);
}
publ... | static void function(Schema s, StringType stringType) { if (stringType == StringType.String) s.addProp(GenericData.STRING_PROP, GenericData.STRING_TYPE_STRING); } public static GenericData get() { return INSTANCE; } | /** Set the Java type to be used when reading this schema. Meaningful only
* only string schemas and map schemas (for the keys). */ | Set the Java type to be used when reading this schema. Meaningful only | setStringType | {
"repo_name": "relateiq/avro",
"path": "lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java",
"license": "apache-2.0",
"size": 40400
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 349,454 |
if (scenario == null) {
throw new PerfCakeException("Scenario property is not set. Please use -Dscenario=<scenario name> to specify a scenario.");
}
final URL scenarioUrl;
try {
scenarioUrl = Utils.locationToUrlWithCheck(scenario, PerfCakeConst.SCENARIOS_DIR_PROPERTY, Utils.determin... | if (scenario == null) { throw new PerfCakeException(STR); } final URL scenarioUrl; try { scenarioUrl = Utils.locationToUrlWithCheck(scenario, PerfCakeConst.SCENARIOS_DIR_PROPERTY, Utils.determineDefaultLocation(STR), ".xml", ".dsl"); } catch (final MalformedURLException e) { throw new PerfCakeException(STR, e); } log.i... | /**
* Loads {@link org.perfcake.scenario.Scenario} from the location specified with the system property <code>-Dscenario=<scenario name></code>.
*
* @param scenario
* Scenario location.
* @return Parsed {@link org.perfcake.scenario.Scenario}.
* @throws PerfCakeException
* I... | Loads <code>org.perfcake.scenario.Scenario</code> from the location specified with the system property <code>-Dscenario=<scenario name></code> | load | {
"repo_name": "vjuranek/PerfCake",
"path": "perfcake/src/main/java/org/perfcake/scenario/ScenarioLoader.java",
"license": "apache-2.0",
"size": 3362
} | [
"java.net.MalformedURLException",
"org.perfcake.PerfCakeConst",
"org.perfcake.PerfCakeException",
"org.perfcake.util.Utils"
] | import java.net.MalformedURLException; import org.perfcake.PerfCakeConst; import org.perfcake.PerfCakeException; import org.perfcake.util.Utils; | import java.net.*; import org.perfcake.*; import org.perfcake.util.*; | [
"java.net",
"org.perfcake",
"org.perfcake.util"
] | java.net; org.perfcake; org.perfcake.util; | 2,800,926 |
void register(Type javaType, QName xmlType, org.jrubycxf.aegis.type.AegisType type); | void register(Type javaType, QName xmlType, org.jrubycxf.aegis.type.AegisType type); | /**
* Register a type, manually specifying the java class, the schema type,
* and the Aegis type object that provides serialization, deserialization,
* and schema.
* @param javaType Java class.
* @param xmlType XML Schema type QName.
* @param type Aegis type object.
*/ | Register a type, manually specifying the java class, the schema type, and the Aegis type object that provides serialization, deserialization, and schema | register | {
"repo_name": "claudemamo/jruby-cxf",
"path": "src/main/java/org/jrubycxf/aegis/type/TypeMapping.java",
"license": "apache-2.0",
"size": 3440
} | [
"java.lang.reflect.Type",
"javax.xml.namespace.QName"
] | import java.lang.reflect.Type; import javax.xml.namespace.QName; | import java.lang.reflect.*; import javax.xml.namespace.*; | [
"java.lang",
"javax.xml"
] | java.lang; javax.xml; | 2,091,224 |
public List<CommandMessage<?>> getDispatchedCommands() {
return dispatchedCommands;
} | List<CommandMessage<?>> function() { return dispatchedCommands; } | /**
* Returns a list with all commands that have been dispatched by this command bus.
*
* @return a list with all commands that have been dispatched
*/ | Returns a list with all commands that have been dispatched by this command bus | getDispatchedCommands | {
"repo_name": "soulrebel/AxonFramework",
"path": "test/src/main/java/org/axonframework/test/utils/RecordingCommandBus.java",
"license": "apache-2.0",
"size": 4989
} | [
"java.util.List",
"org.axonframework.commandhandling.CommandMessage"
] | import java.util.List; import org.axonframework.commandhandling.CommandMessage; | import java.util.*; import org.axonframework.commandhandling.*; | [
"java.util",
"org.axonframework.commandhandling"
] | java.util; org.axonframework.commandhandling; | 131,315 |
public static <R> Function<Object,List<R>> listOf(final Type<R> resultType, final String methodName, final Object... optionalParameters) {
return methodForListOf(resultType, methodName, optionalParameters);
}
| static <R> Function<Object,List<R>> function(final Type<R> resultType, final String methodName, final Object... optionalParameters) { return methodForListOf(resultType, methodName, optionalParameters); } | /**
* <p>
* Abbreviation for {{@link #methodForListOf(Type, String, Object...)}.
* </p>
*
* @since 1.1
*
* @param methodName the name of the method
* @param optionalParameters the (optional) parameters of the method.
* @return the result of the method execution
... | Abbreviation for {<code>#methodForListOf(Type, String, Object...)</code>. | listOf | {
"repo_name": "op4j/op4j",
"path": "src/main/java/org/op4j/functions/Call.java",
"license": "apache-2.0",
"size": 27542
} | [
"java.util.List",
"org.javaruntype.type.Type"
] | import java.util.List; import org.javaruntype.type.Type; | import java.util.*; import org.javaruntype.type.*; | [
"java.util",
"org.javaruntype.type"
] | java.util; org.javaruntype.type; | 2,544,179 |
public void setWarFile(File warFile) {
this.warFile = warFile;
} | void function(File warFile) { this.warFile = warFile; } | /**
* Sets the war file for this container to deploy and use
*/ | Sets the war file for this container to deploy and use | setWarFile | {
"repo_name": "davinash/geode",
"path": "geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/ServerContainer.java",
"license": "apache-2.0",
"size": 17206
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,004,856 |
protected HTTPSampleResult downloadPageResources(HTTPSampleResult res, HTTPSampleResult container, int frameDepth) {
Iterator<URL> urls = null;
try {
final byte[] responseData = res.getResponseData();
if (responseData.length > 0) { // Bug 39205
final LinkExtr... | HTTPSampleResult function(HTTPSampleResult res, HTTPSampleResult container, int frameDepth) { Iterator<URL> urls = null; try { final byte[] responseData = res.getResponseData(); if (responseData.length > 0) { final LinkExtractorParser parser = getParser(res); if (parser != null) { String userAgent = getUserAgent(res); ... | /**
* Download the resources of an HTML page.
*
* @param res
* result of the initial request - must contain an HTML response
* @param container
* for storing the results, if any
* @param frameDepth
* Depth of this target in the frame structure. Us... | Download the resources of an HTML page | downloadPageResources | {
"repo_name": "johrstrom/cloud-meter",
"path": "cloud-meter-protocols/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java",
"license": "apache-2.0",
"size": 78461
} | [
"java.net.MalformedURLException",
"java.net.URISyntaxException",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"java.util.concurrent.Callable",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.Future",
"org.apache.jmeter.protocol.http.control.Cookie",
"org.apache.j... | import java.net.MalformedURLException; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import org.apache.jmeter.protocol.http.contro... | import java.net.*; import java.util.*; import java.util.concurrent.*; import org.apache.jmeter.protocol.http.control.*; import org.apache.jmeter.protocol.http.parser.*; import org.apache.jmeter.protocol.http.sampler.*; import org.apache.jmeter.protocol.http.util.*; import org.apache.jmeter.testelement.property.*; impor... | [
"java.net",
"java.util",
"org.apache.jmeter",
"org.apache.oro"
] | java.net; java.util; org.apache.jmeter; org.apache.oro; | 933,946 |
protected void notifyDisconnected() {
for(final IBlaubotConnectionListener listener: this.connectionListeners){
listener.onConnectionClosed(this);
}
} | void function() { for(final IBlaubotConnectionListener listener: this.connectionListeners){ listener.onConnectionClosed(this); } } | /**
* Notifies all registered listeners that this connection is now disconnected
*/ | Notifies all registered listeners that this connection is now disconnected | notifyDisconnected | {
"repo_name": "Blaubot/Blaubot",
"path": "blaubot/src/main/java/eu/hgross/blaubot/core/AbstractBlaubotConnection.java",
"license": "mit",
"size": 1776
} | [
"eu.hgross.blaubot.core.acceptor.IBlaubotConnectionListener"
] | import eu.hgross.blaubot.core.acceptor.IBlaubotConnectionListener; | import eu.hgross.blaubot.core.acceptor.*; | [
"eu.hgross.blaubot"
] | eu.hgross.blaubot; | 621,353 |
@SuppressWarnings("unchecked")
protected WB getWaveBean(final Wave wave) {
return (WB) wave.getWaveBean();
}
| @SuppressWarnings(STR) WB function(final Wave wave) { return (WB) wave.getWaveBean(); } | /**
* Get the wave Bean from the wave and cast it.
*
* @param wave the wave that hold the bean
*
* @return the casted wavebean
*/ | Get the wave Bean from the wave and cast it | getWaveBean | {
"repo_name": "amischler/JRebirth",
"path": "org.jrebirth/core/src/main/java/org/jrebirth/core/command/CommandWaveBuilder.java",
"license": "apache-2.0",
"size": 2854
} | [
"org.jrebirth.core.wave.Wave"
] | import org.jrebirth.core.wave.Wave; | import org.jrebirth.core.wave.*; | [
"org.jrebirth.core"
] | org.jrebirth.core; | 2,101,967 |
public Artist[] findByCompanyId_PrevAndNext(long artistId, long companyId,
com.liferay.portal.kernel.util.OrderByComparator<Artist> orderByComparator)
throws NoSuchArtistException; | Artist[] function(long artistId, long companyId, com.liferay.portal.kernel.util.OrderByComparator<Artist> orderByComparator) throws NoSuchArtistException; | /**
* Returns the artists before and after the current artist in the ordered set where companyId = ?.
*
* @param artistId the primary key of the current artist
* @param companyId the company ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the previous,... | Returns the artists before and after the current artist in the ordered set where companyId = ? | findByCompanyId_PrevAndNext | {
"repo_name": "liferay-labs/jukebox-portlet",
"path": "jukebox/jukebox-api/src/main/java/org/liferay/jukebox/service/persistence/ArtistPersistence.java",
"license": "gpl-2.0",
"size": 89289
} | [
"org.liferay.jukebox.exception.NoSuchArtistException",
"org.liferay.jukebox.model.Artist"
] | import org.liferay.jukebox.exception.NoSuchArtistException; import org.liferay.jukebox.model.Artist; | import org.liferay.jukebox.exception.*; import org.liferay.jukebox.model.*; | [
"org.liferay.jukebox"
] | org.liferay.jukebox; | 2,640,489 |
public Metadata parse() throws IOException {
Metadata.Builder data = Metadata.newBuilder();
int numHeaders = 0;
while (numHeaders++ < MAX_NUM_HEADERS) {
List<String> header = headerInputStream.nextHeader();
if (headerInputStream.getChecksumFailureMessage().isPresent()) {
data.addParseW... | Metadata function() throws IOException { Metadata.Builder data = Metadata.newBuilder(); int numHeaders = 0; while (numHeaders++ < MAX_NUM_HEADERS) { List<String> header = headerInputStream.nextHeader(); if (headerInputStream.getChecksumFailureMessage().isPresent()) { data.addParseWarning(headerInputStream.getChecksumFa... | /**
* Parses JPI headers into a {@code edmtools.Proto.Metadata} proto.
*
* <p>If an unexpected error disrupts the stream, throw an {@link IOException}. Otherwise,
* add the warning to the {@code edmtools.Proto.Metadata} proto.
*/ | Parses JPI headers into a edmtools.Proto.Metadata proto. If an unexpected error disrupts the stream, throw an <code>IOException</code>. Otherwise, add the warning to the edmtools.Proto.Metadata proto | parse | {
"repo_name": "wannamak/edmtools",
"path": "src/main/edmtools/MetadataParser.java",
"license": "apache-2.0",
"size": 9109
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,462,607 |
public static Instance createInstanceFromClass(Dataset data) {
Instance out = new DenseInstance(data.size());
int index = 0;
for (Instance inst : data)
out.put(index++, (double) data.classIndex(inst.classValue()));
return out;
} | static Instance function(Dataset data) { Instance out = new DenseInstance(data.size()); int index = 0; for (Instance inst : data) out.put(index++, (double) data.classIndex(inst.classValue())); return out; } | /**
* Creates an Instance from the class labels over all Instances in a data
* set.
*
* The indices of the class labels are used because the class labels can be
* any Object.
*
* @param data
* data set to create class label instance for
* @return instance with class label indices as value... | Creates an Instance from the class labels over all Instances in a data set. The indices of the class labels are used because the class labels can be any Object | createInstanceFromClass | {
"repo_name": "diyerland/saveAll",
"path": "algorithm/java-ml/javaml-0.1.7/javaml-0.1.7-src/net/sf/javaml/tools/DatasetTools.java",
"license": "mit",
"size": 8485
} | [
"net.sf.javaml.core.Dataset",
"net.sf.javaml.core.DenseInstance",
"net.sf.javaml.core.Instance"
] | import net.sf.javaml.core.Dataset; import net.sf.javaml.core.DenseInstance; import net.sf.javaml.core.Instance; | import net.sf.javaml.core.*; | [
"net.sf.javaml"
] | net.sf.javaml; | 1,394,467 |
public boolean delete () {
if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot delete a classpath file: " + file);
if (type == FileType.Internal) throw new GdxRuntimeException("Cannot delete an internal file: " + file);
return file().delete();
}
| boolean function () { if (type == FileType.Classpath) throw new GdxRuntimeException(STR + file); if (type == FileType.Internal) throw new GdxRuntimeException(STR + file); return file().delete(); } | /** Deletes this file or empty directory and returns success. Will not delete a directory that has children.
* @throws GdxRuntimeException if this file handle is a {@link FileType#Classpath} or {@link FileType#Internal} file. */ | Deletes this file or empty directory and returns success. Will not delete a directory that has children | delete | {
"repo_name": "jiachenning/libgdx",
"path": "gdx/src/com/badlogic/gdx/files/FileHandle.java",
"license": "apache-2.0",
"size": 31073
} | [
"com.badlogic.gdx.Files",
"com.badlogic.gdx.utils.GdxRuntimeException"
] | import com.badlogic.gdx.Files; import com.badlogic.gdx.utils.GdxRuntimeException; | import com.badlogic.gdx.*; import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,104,495 |
public DhcpOptions withDnsServers(List<String> dnsServers) {
this.dnsServers = dnsServers;
return this;
} | DhcpOptions function(List<String> dnsServers) { this.dnsServers = dnsServers; return this; } | /**
* Set the list of DNS servers IP addresses.
*
* @param dnsServers the dnsServers value to set
* @return the DhcpOptions object itself.
*/ | Set the list of DNS servers IP addresses | withDnsServers | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/DhcpOptions.java",
"license": "mit",
"size": 1202
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,266,339 |
EAttribute getElement_SubstitutionGroup(); | EAttribute getElement_SubstitutionGroup(); | /**
* Returns the meta object for the attribute '{@link org.w3._2001.schema.Element#getSubstitutionGroup <em>Substitution Group</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Substitution Group</em>'.
* @see org.w3._2001.schema.Element#getSubstitutio... | Returns the meta object for the attribute '<code>org.w3._2001.schema.Element#getSubstitutionGroup Substitution Group</code>'. | getElement_SubstitutionGroup | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wps/src/org/w3/_2001/schema/SchemaPackage.java",
"license": "lgpl-2.1",
"size": 433240
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,878,484 |
public static Data getDataFromResultSet(ResultSet rs) throws SQLException {
ResultSetMetaData meta = rs.getMetaData();
Data data = new Data();
int numColumns = meta.getColumnCount();
String[] dbCols = new String[numColumns];
for (int i = 0; i < numColumns; i++) {
... | static Data function(ResultSet rs) throws SQLException { ResultSetMetaData meta = rs.getMetaData(); Data data = new Data(); int numColumns = meta.getColumnCount(); String[] dbCols = new String[numColumns]; for (int i = 0; i < numColumns; i++) { dbCols[i] = meta.getColumnName(i + 1); data.addHeader(dbCols[i]); } while (... | /**
* Gets a Data object from a ResultSet.
*
* @param rs
* ResultSet passed in from a database query
* @return a Data object
* @throws java.sql.SQLException when database access errors occur
*/ | Gets a Data object from a ResultSet | getDataFromResultSet | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-jmeter-3.0/src/jorphan/org/apache/jorphan/collections/Data.java",
"license": "apache-2.0",
"size": 21059
} | [
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,566,538 |
public static List<String> getJobs(Configuration conf) throws IOException {
try {
return getStorage(conf).getAllForType(type);
} catch (Exception e) {
throw new IOException("Can't get jobs", e);
}
} | static List<String> function(Configuration conf) throws IOException { try { return getStorage(conf).getAllForType(type); } catch (Exception e) { throw new IOException(STR, e); } } | /**
* Get an id for each currently existing job, which can be used to create
* a JobState object.
*
* @param conf
* @throws IOException
*/ | Get an id for each currently existing job, which can be used to create a JobState object | getJobs | {
"repo_name": "cloudera/hcatalog",
"path": "webhcat/svr/src/main/java/org/apache/hcatalog/templeton/tool/JobState.java",
"license": "apache-2.0",
"size": 9020
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,745,469 |
public static TextField newPasswordField() {
return new FilthyPasswordField();
} | static TextField function() { return new FilthyPasswordField(); } | /**
* Create a new password field.
*
* @return A new password field.
*/ | Create a new password field | newPasswordField | {
"repo_name": "wichtounet/jtheque-core",
"path": "jtheque-ui/src/main/java/org/jtheque/ui/components/filthy/Filthy.java",
"license": "apache-2.0",
"size": 4909
} | [
"org.jtheque.ui.components.TextField",
"org.jtheque.ui.impl.components.filthy.FilthyPasswordField"
] | import org.jtheque.ui.components.TextField; import org.jtheque.ui.impl.components.filthy.FilthyPasswordField; | import org.jtheque.ui.components.*; import org.jtheque.ui.impl.components.filthy.*; | [
"org.jtheque.ui"
] | org.jtheque.ui; | 645,363 |
BufferedReader reader = new BufferedReader(new InputStreamReader(is, charset));
StringBuilder sb = new StringBuilder();
int ch;
try {
while ((ch = reader.read()) != -1) {
sb.append((char) ch);
}
} finally {
if (closeStream) {
... | BufferedReader reader = new BufferedReader(new InputStreamReader(is, charset)); StringBuilder sb = new StringBuilder(); int ch; try { while ((ch = reader.read()) != -1) { sb.append((char) ch); } } finally { if (closeStream) { is.close(); } } return sb.toString(); } /** * Read all available bytes from one channel and co... | /**
* Read data from an InputStream and convert it to a String.
* @param is data source
* @param charset charset for input byte stream
* @param closeStream should be the given stream closed on exit?
* @return string representation of given input stream
* @throws IOException
*/ | Read data from an InputStream and convert it to a String | convertStreamToString | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/src/org/jetel/util/stream/StreamUtils.java",
"license": "lgpl-2.1",
"size": 9771
} | [
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.nio.channels.FileChannel"
] | import java.io.BufferedReader; import java.io.InputStreamReader; import java.nio.channels.FileChannel; | import java.io.*; import java.nio.channels.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,531,855 |
public String setStringValue(String value) throws ControlException {
String v = null;
if(type!=V4L4JConstants.CTRL_TYPE_STRING)
throw new UnsupportedMethod("This control is not a string control");
if (value.length() > max)
throw new ControlException("The new string value for this control exceeds th... | String function(String value) throws ControlException { String v = null; if(type!=V4L4JConstants.CTRL_TYPE_STRING) throw new UnsupportedMethod(STR); if (value.length() > max) throw new ControlException(STR); if (value.length() < min) throw new ControlException(STR); state.get(); try { doSetStringValue(v4l4jObject,id, v... | /**
* This method sets a new string value for this control. The returned value
* is the new value of the control.
* @param value the new value
* @return the new value of the control after setting it
* @throws ControlException if the value can not be set, or if the new string value's length
* is under / ove... | This method sets a new string value for this control. The returned value is the new value of the control | setStringValue | {
"repo_name": "sarxos/v4l4j",
"path": "src/main/java/au/edu/jcu/v4l4j/Control.java",
"license": "gpl-3.0",
"size": 27578
} | [
"au.edu.jcu.v4l4j.exceptions.ControlException",
"au.edu.jcu.v4l4j.exceptions.UnsupportedMethod"
] | import au.edu.jcu.v4l4j.exceptions.ControlException; import au.edu.jcu.v4l4j.exceptions.UnsupportedMethod; | import au.edu.jcu.v4l4j.exceptions.*; | [
"au.edu.jcu"
] | au.edu.jcu; | 776,336 |
private int isFastConnection(int connectionSpeed)
{
switch (connectionSpeed) {
case UserCredentials.HIGH:
return RenderingControl.UNCOMPRESSED;
case UserCredentials.MEDIUM:
return RenderingControl.MEDIUM;
case UserCredentials.LOW:
... | int function(int connectionSpeed) { switch (connectionSpeed) { case UserCredentials.HIGH: return RenderingControl.UNCOMPRESSED; case UserCredentials.MEDIUM: return RenderingControl.MEDIUM; case UserCredentials.LOW: default: return RenderingControl.LOW; } } | /**
* Returns <code>true</code> if the connection is fast,
* <code>false</code> otherwise.
*
* @param connectionSpeed The connection speed.
* @return See above.
*/ | Returns <code>true</code> if the connection is fast, <code>false</code> otherwise | isFastConnection | {
"repo_name": "lucalianas/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/DataServicesFactory.java",
"license": "gpl-2.0",
"size": 28558
} | [
"org.openmicroscopy.shoola.env.data.login.UserCredentials",
"org.openmicroscopy.shoola.env.rnd.RenderingControl"
] | import org.openmicroscopy.shoola.env.data.login.UserCredentials; import org.openmicroscopy.shoola.env.rnd.RenderingControl; | import org.openmicroscopy.shoola.env.data.login.*; import org.openmicroscopy.shoola.env.rnd.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,366,314 |
static ASTNode enclosingLoopScope(final ASTNode node)
{
ASTNode scope = node; // .getParent();
while (scope != null && !ASTTools.isEnclosingLoopScope(scope))
{
scope = scope.getParent();
}
return scope;
}
//
// private static ASTNode enclosingMethodScope(final ASTNode node) {
//
... | static ASTNode enclosingLoopScope(final ASTNode node) { ASTNode scope = node; while (scope != null && !ASTTools.isEnclosingLoopScope(scope)) { scope = scope.getParent(); } return scope; } | /**
* Traverses the self-or-ancestor axis until an enclosing loop control predicate is found.
*/ | Traverses the self-or-ancestor axis until an enclosing loop control predicate is found | enclosingLoopScope | {
"repo_name": "UBPL/jive",
"path": "edu.buffalo.cse.jive.core.ast/src/edu/buffalo/cse/jive/internal/core/ast/ASTTools.java",
"license": "epl-1.0",
"size": 24711
} | [
"org.eclipse.jdt.core.dom.ASTNode"
] | import org.eclipse.jdt.core.dom.ASTNode; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 199,402 |
private static X509Certificate[] getCertChain(SSLSession sslSession)
{
try
{
javax.security.cert.X509Certificate javaxCerts[] = sslSession.getPeerCertificateChain();
if (javaxCerts == null || javaxCerts.length == 0)
return null;
int le... | static X509Certificate[] function(SSLSession sslSession) { try { javax.security.cert.X509Certificate javaxCerts[] = sslSession.getPeerCertificateChain(); if (javaxCerts == null javaxCerts.length == 0) return null; int length = javaxCerts.length; X509Certificate[] javaCerts = new X509Certificate[length]; java.security.c... | /**
* Return the chain of X509 certificates used to negotiate the SSL Session.
* <p>
* Note: in order to do this we must convert a javax.security.cert.X509Certificate[], as used by
* JSSE to a java.security.cert.X509Certificate[],as required by the Servlet specs.
*
* @param sslSessi... | Return the chain of X509 certificates used to negotiate the SSL Session. Note: in order to do this we must convert a javax.security.cert.X509Certificate[], as used by JSSE to a java.security.cert.X509Certificate[],as required by the Servlet specs | getCertChain | {
"repo_name": "dbroeglin/cipango",
"path": "cipango-server/src/main/java/org/cipango/server/bio/TlsConnector.java",
"license": "apache-2.0",
"size": 18038
} | [
"java.io.ByteArrayInputStream",
"java.security.cert.X509Certificate",
"javax.net.ssl.SSLPeerUnverifiedException",
"javax.net.ssl.SSLSession",
"org.eclipse.jetty.util.log.Log"
] | import java.io.ByteArrayInputStream; import java.security.cert.X509Certificate; import javax.net.ssl.SSLPeerUnverifiedException; import javax.net.ssl.SSLSession; import org.eclipse.jetty.util.log.Log; | import java.io.*; import java.security.cert.*; import javax.net.ssl.*; import org.eclipse.jetty.util.log.*; | [
"java.io",
"java.security",
"javax.net",
"org.eclipse.jetty"
] | java.io; java.security; javax.net; org.eclipse.jetty; | 179,941 |
@Override
public boolean remove(String key) {
File file= this.getFile( key);
return file.delete();
} | boolean function(String key) { File file= this.getFile( key); return file.delete(); } | /**
* Remove information from the external resource.
*
* @param key Identifies data within the external system.
*/ | Remove information from the external resource | remove | {
"repo_name": "timfulmer/bigdatahowto",
"path": "modules/bd-defaults/src/main/java/info/bigdatahowto/defaults/FileResource.java",
"license": "apache-2.0",
"size": 3149
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,856,814 |
public void contextInitialized(ServletContextEvent sce) {
log.info("juddi-admin gui startup");
FileOutputStream fos = null;
try {
//URL resource = sce.getServletContext().getResource("/META-INF/config.properties");
... | void function(ServletContextEvent sce) { log.info(STR); FileOutputStream fos = null; try { Properties p = new Properties(); log.info(STR); boolean ok = false; String key = AES.GEN(256); if (key == null) { ok = false; } else { if (AES.ValidateKey(key)) { log.info(STR); ok = true; } else { log.warning(STR); } } if (!ok) ... | /**
* creates a new AES key and stores it to the properties files
*
* @param sce
*/ | creates a new AES key and stores it to the properties files | contextInitialized | {
"repo_name": "st609877063/juddi",
"path": "juddiv3-war/src/main/java/org/apache/juddi/adminconsole/StartupServlet.java",
"license": "apache-2.0",
"size": 5367
} | [
"java.io.FileOutputStream",
"java.util.Properties",
"java.util.logging.Level",
"javax.servlet.ServletContextEvent"
] | import java.io.FileOutputStream; import java.util.Properties; import java.util.logging.Level; import javax.servlet.ServletContextEvent; | import java.io.*; import java.util.*; import java.util.logging.*; import javax.servlet.*; | [
"java.io",
"java.util",
"javax.servlet"
] | java.io; java.util; javax.servlet; | 1,953,057 |
protected void handleRadioValueChange(CustomRadioButtonSingle radioButton,
String val) {
// Temperature
if (radioButton == temperatureUnavailable
|| radioButton == temperatureRefused) {
temperatureValue.setEnabled(false);
temperatureUnits.setEnabled(false);
temperatureQualifier.setEnabled(false);... | void function(CustomRadioButtonSingle radioButton, String val) { if (radioButton == temperatureUnavailable radioButton == temperatureRefused) { temperatureValue.setEnabled(false); temperatureUnits.setEnabled(false); temperatureQualifier.setEnabled(false); } else if (radioButton == temperatureRecorded) { temperatureValu... | /**
* Perform UI changes based on potential value.
*
* @param radioButton
* @param val
*/ | Perform UI changes based on potential value | handleRadioValueChange | {
"repo_name": "freemed/freemed",
"path": "ui/gwt/src/main/java/org/freemedsoftware/gwt/client/screen/patient/VitalsEntry.java",
"license": "gpl-2.0",
"size": 33139
} | [
"org.freemedsoftware.gwt.client.widget.CustomRadioButtonSingle"
] | import org.freemedsoftware.gwt.client.widget.CustomRadioButtonSingle; | import org.freemedsoftware.gwt.client.widget.*; | [
"org.freemedsoftware.gwt"
] | org.freemedsoftware.gwt; | 1,172,006 |
public static void help(int errorCode) {
// This prints out some help
HelpFormatter formater = new HelpFormatter();
formater.printHelp("java -jar", options);
exit(errorCode);
} | static void function(int errorCode) { HelpFormatter formater = new HelpFormatter(); formater.printHelp(STR, options); exit(errorCode); } | /**
* Prints the help for this application and exits.
*/ | Prints the help for this application and exits | help | {
"repo_name": "xdurvak/eiffel-remrem-generate",
"path": "cli/src/main/java/com/ericsson/eiffel/remrem/generate/cli/CLIOptions.java",
"license": "apache-2.0",
"size": 6439
} | [
"org.apache.commons.cli.HelpFormatter"
] | import org.apache.commons.cli.HelpFormatter; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,677,940 |
public void refreshStoreFiles(Collection<String> newFiles) throws IOException {
List<StoreFileInfo> storeFiles = new ArrayList<>(newFiles.size());
for (String file : newFiles) {
storeFiles.add(fs.getStoreFileInfo(getColumnFamilyName(), file));
}
refreshStoreFilesInternal(storeFiles);
} | void function(Collection<String> newFiles) throws IOException { List<StoreFileInfo> storeFiles = new ArrayList<>(newFiles.size()); for (String file : newFiles) { storeFiles.add(fs.getStoreFileInfo(getColumnFamilyName(), file)); } refreshStoreFilesInternal(storeFiles); } | /**
* Replaces the store files that the store has with the given files. Mainly used by secondary
* region replicas to keep up to date with the primary region files.
* @throws IOException
*/ | Replaces the store files that the store has with the given files. Mainly used by secondary region replicas to keep up to date with the primary region files | refreshStoreFiles | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java",
"license": "apache-2.0",
"size": 98563
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Collection",
"java.util.List"
] | import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,247,811 |
public void createInitialLayout(IPageLayout layout)
{
// ---------------HOW THE PERSPECTIVE IS LAID OUT---------------
//
// The Android Perspective will be dynamically populated according to
// the contributions declared to it through the androidPerspectiveExtension
// e... | void function(IPageLayout layout) { addEmulatorView(layout); addRunCoolbar(layout); createAndPopulateDynamicAreas(layout); layout.setEditorAreaVisible(false); } | /**
* Creates the initial layout for a page.
*
* @param layout the page layout
*
* @see IPerspectiveFactory#createInitialLayout(IPageLayout)
*/ | Creates the initial layout for a page | createInitialLayout | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/emulator/src/com/motorola/studio/android/emulator/ui/perspective/AndroidEmulatorPerspective.java",
"license": "gpl-2.0",
"size": 10798
} | [
"org.eclipse.ui.IPageLayout"
] | import org.eclipse.ui.IPageLayout; | import org.eclipse.ui.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 2,401,103 |
public void updateAllPlayerLocations() {
Player[] players = server.getOnlinePlayers();
for (int i = 0; i < players.length; i++) {
updateQuitLocation(players[i]);
}
} | void function() { Player[] players = server.getOnlinePlayers(); for (int i = 0; i < players.length; i++) { updateQuitLocation(players[i]); } } | /**
* Called on plugin shutdown to update the logout location of all
* players. Can also be called periodically to do the same so that
* we have a recently recorded location in the event of a server
* crash.
*/ | Called on plugin shutdown to update the logout location of all players. Can also be called periodically to do the same so that we have a recently recorded location in the event of a server crash | updateAllPlayerLocations | {
"repo_name": "andune/HomeSpawnPlus",
"path": "core/src/main/java/com/andune/minecraft/hsp/util/SpawnUtil.java",
"license": "gpl-3.0",
"size": 11142
} | [
"com.andune.minecraft.commonlib.server.api.Player"
] | import com.andune.minecraft.commonlib.server.api.Player; | import com.andune.minecraft.commonlib.server.api.*; | [
"com.andune.minecraft"
] | com.andune.minecraft; | 2,086,000 |
public void testColumnarSerDe() throws Throwable {
try {
System.out.println("test: testColumnarSerde");
// Create the SerDe
ColumnarSerDe serDe = new ColumnarSerDe();
Configuration conf = new Configuration();
Properties tbl = createProperties();
SerDeUtils.initializeSerDe(serDe... | void function() throws Throwable { try { System.out.println(STR); ColumnarSerDe serDe = new ColumnarSerDe(); Configuration conf = new Configuration(); Properties tbl = createProperties(); SerDeUtils.initializeSerDe(serDe, conf, tbl, null); BytesRefArrayWritable braw = new BytesRefArrayWritable(8); String[] data = {"123... | /**
* Test ColumnarSerDe
*/ | Test ColumnarSerDe | testColumnarSerDe | {
"repo_name": "WANdisco/amplab-hive",
"path": "serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java",
"license": "apache-2.0",
"size": 8950
} | [
"java.util.Properties",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hive.serde2.columnar.BytesRefArrayWritable",
"org.apache.hadoop.hive.serde2.columnar.BytesRefWritable",
"org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe"
] | import java.util.Properties; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.serde2.columnar.BytesRefArrayWritable; import org.apache.hadoop.hive.serde2.columnar.BytesRefWritable; import org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe; | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hive.serde2.columnar.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,350,367 |
public long getTimeDuration(String name, long defaultValue,
TimeUnit defaultUnit, TimeUnit returnUnit) {
String vStr = get(name);
if (null == vStr) {
return returnUnit.convert(defaultValue, defaultUnit);
} else {
return getTimeDurationHelper(name, vStr, defaultUnit, returnUnit);
}
... | long function(String name, long defaultValue, TimeUnit defaultUnit, TimeUnit returnUnit) { String vStr = get(name); if (null == vStr) { return returnUnit.convert(defaultValue, defaultUnit); } else { return getTimeDurationHelper(name, vStr, defaultUnit, returnUnit); } } | /**
* Return time duration in the given time unit. Valid units are encoded in
* properties as suffixes: nanoseconds (ns), microseconds (us), milliseconds
* (ms), seconds (s), minutes (m), hours (h), and days (d). If no unit is
* provided, the default unit is applied.
*
* @param name Property name
*... | Return time duration in the given time unit. Valid units are encoded in properties as suffixes: nanoseconds (ns), microseconds (us), milliseconds (ms), seconds (s), minutes (m), hours (h), and days (d). If no unit is provided, the default unit is applied | getTimeDuration | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 136532
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 278,873 |
public static java.util.List extractPendingEmergencyAdmissionList(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.PendingEmergencyAdmissionForTrackingFormVoCollection voCollection)
{
return extractPendingEmergencyAdmissionList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.PendingEmergencyAdmissionForTrackingFormVoCollection voCollection) { return extractPendingEmergencyAdmissionList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.admin.pas.domain.objects.PendingEmergencyAdmission list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.admin.pas.domain.objects.PendingEmergencyAdmission list from the value object collection | extractPendingEmergencyAdmissionList | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/PendingEmergencyAdmissionForTrackingFormVoAssembler.java",
"license": "agpl-3.0",
"size": 21428
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,562,605 |
public MetaProperty<MarketDataSnapshotMaster> marketDataSnapshotMaster() {
return _marketDataSnapshotMaster;
} | MetaProperty<MarketDataSnapshotMaster> function() { return _marketDataSnapshotMaster; } | /**
* The meta-property for the {@code marketDataSnapshotMaster} property.
* @return the meta-property, not null
*/ | The meta-property for the marketDataSnapshotMaster property | marketDataSnapshotMaster | {
"repo_name": "DevStreet/FinanceAnalytics",
"path": "projects/OG-Financial/src/main/java/com/opengamma/financial/tool/marketdata/MarketDataSnapshotSaver.java",
"license": "apache-2.0",
"size": 30837
} | [
"com.opengamma.master.marketdatasnapshot.MarketDataSnapshotMaster",
"org.joda.beans.MetaProperty"
] | import com.opengamma.master.marketdatasnapshot.MarketDataSnapshotMaster; import org.joda.beans.MetaProperty; | import com.opengamma.master.marketdatasnapshot.*; import org.joda.beans.*; | [
"com.opengamma.master",
"org.joda.beans"
] | com.opengamma.master; org.joda.beans; | 32,466 |
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(StextPackage.Literals.REACTION_TRIGGER__TRIGGERS);
childrenFeatures.add(StextPackage.Literals.REACTION_TRIGGER__GUARD);
... | Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(StextPackage.Literals.REACTION_TRIGGER__TRIGGERS); childrenFeatures.add(StextPackage.Literals.REACTION_TRIGGER__GUARD); } return childrenFeatures; } | /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-... | This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>. | getChildrenFeatures | {
"repo_name": "Yakindu/statecharts",
"path": "plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/ReactionTriggerItemProvider.java",
"license": "epl-1.0",
"size": 6147
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.EStructuralFeature",
"org.yakindu.sct.model.stext.stext.StextPackage"
] | import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.yakindu.sct.model.stext.stext.StextPackage; | import java.util.*; import org.eclipse.emf.ecore.*; import org.yakindu.sct.model.stext.stext.*; | [
"java.util",
"org.eclipse.emf",
"org.yakindu.sct"
] | java.util; org.eclipse.emf; org.yakindu.sct; | 534,822 |
@VisibleForTesting
public synchronized void cleanAllApplications() {
try {
removeKeyRegistry(this.registry, this.user, getRegistryKey(null, null),
true, false);
} catch (YarnException e) {
LOG.warn("Unexpected exception from removeKeyRegistry", e);
}
} | synchronized void function() { try { removeKeyRegistry(this.registry, this.user, getRegistryKey(null, null), true, false); } catch (YarnException e) { LOG.warn(STR, e); } } | /**
* For testing, delete all application records in registry.
*/ | For testing, delete all application records in registry | cleanAllApplications | {
"repo_name": "xiao-chen/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/utils/FederationRegistryClient.java",
"license": "apache-2.0",
"size": 11580
} | [
"org.apache.hadoop.yarn.exceptions.YarnException"
] | import org.apache.hadoop.yarn.exceptions.YarnException; | import org.apache.hadoop.yarn.exceptions.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 39,066 |
public AmqpReceiver createReceiver(Source source) throws Exception {
return createReceiver(source, getNextReceiverId());
} | AmqpReceiver function(Source source) throws Exception { return createReceiver(source, getNextReceiverId()); } | /**
* Create a receiver instance using the given Source
*
* @param source the caller created and configured Source used to create the receiver link.
* @return a newly created receiver that is ready for use.
* @throws Exception if an error occurs while creating the receiver.
*/ | Create a receiver instance using the given Source | createReceiver | {
"repo_name": "kjniemi/activemq-artemis",
"path": "tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/AmqpSession.java",
"license": "apache-2.0",
"size": 27319
} | [
"org.apache.qpid.proton.amqp.messaging.Source"
] | import org.apache.qpid.proton.amqp.messaging.Source; | import org.apache.qpid.proton.amqp.messaging.*; | [
"org.apache.qpid"
] | org.apache.qpid; | 1,526,313 |
public static void createHatchTexture() {
BufferedImage bi = new BufferedImage(15, 15, BufferedImage.TYPE_INT_ARGB);
Graphics2D big = bi.createGraphics();
big.setColor(getBackgroundColor());
Composite comp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f);
big.setCo... | static void function() { BufferedImage bi = new BufferedImage(15, 15, BufferedImage.TYPE_INT_ARGB); Graphics2D big = bi.createGraphics(); big.setColor(getBackgroundColor()); Composite comp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f); big.setComposite(comp); big.fillRect(0,0,15,15); big.setColor(getOutsi... | /**
* Initialize the hatch pattern used to paint the non-downloaded area
*/ | Initialize the hatch pattern used to paint the non-downloaded area | createHatchTexture | {
"repo_name": "CURocketry/Ground_Station_GUI",
"path": "src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java",
"license": "gpl-3.0",
"size": 30235
} | [
"java.awt.AlphaComposite",
"java.awt.Composite",
"java.awt.Graphics2D",
"java.awt.Rectangle",
"java.awt.TexturePaint",
"java.awt.image.BufferedImage",
"java.io.File",
"org.openstreetmap.josm.data.conflict.ConflictCollection",
"org.openstreetmap.josm.data.osm.DataSet",
"org.openstreetmap.josm.data.... | import java.awt.AlphaComposite; import java.awt.Composite; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.TexturePaint; import java.awt.image.BufferedImage; import java.io.File; import org.openstreetmap.josm.data.conflict.ConflictCollection; import org.openstreetmap.josm.data.osm.DataSet; import... | import java.awt.*; import java.awt.image.*; import java.io.*; import org.openstreetmap.josm.data.conflict.*; import org.openstreetmap.josm.data.osm.*; import org.openstreetmap.josm.data.osm.event.*; import org.openstreetmap.josm.data.osm.visitor.paint.relations.*; | [
"java.awt",
"java.io",
"org.openstreetmap.josm"
] | java.awt; java.io; org.openstreetmap.josm; | 482,069 |
private void shuffle(Random random, int[] ints) {
for (int i = ints.length - 1; i > 0; i--) {
int j = random.nextInt(i + 1);
int t = ints[j];
ints[j] = ints[i];
ints[i] = t;
}
// move even walls (left) towards the start, so we end up with
// long horizontal corridors
if (h... | void function(Random random, int[] ints) { for (int i = ints.length - 1; i > 0; i--) { int j = random.nextInt(i + 1); int t = ints[j]; ints[j] = ints[i]; ints[i] = t; } if (horizontal) { for (int i = 2; i < ints.length; i++) { if (ints[i] % 2 == 0) { int j = random.nextInt(i); int t = ints[j]; ints[j] = ints[i]; ints[i... | /**
* Randomly permutes the members of an array. Based on the Fisher-Yates
* algorithm.
*
* @param random Random number generator
* @param ints Array of integers to shuffle
*/ | Randomly permutes the members of an array. Based on the Fisher-Yates algorithm | shuffle | {
"repo_name": "b-slim/calcite",
"path": "example/function/src/main/java/org/apache/calcite/example/maze/Maze.java",
"license": "apache-2.0",
"size": 9780
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 415,044 |
private void doCompaction() {
ImmutableSegment result = null;
boolean resultSwapped = false;
Action nextStep = null;
try {
nextStep = policy();
if (nextStep == Action.NOOP) {
return;
}
if (nextStep == Action.FLATTEN) {
// Youngest Segment in the pipeline is wit... | void function() { ImmutableSegment result = null; boolean resultSwapped = false; Action nextStep = null; try { nextStep = policy(); if (nextStep == Action.NOOP) { return; } if (nextStep == Action.FLATTEN) { compactingMemStore.flattenOneSegment(versionedList.getVersion()); return; } if (!isInterrupted.get()) { result = ... | /**----------------------------------------------------------------------
* The worker thread performs the compaction asynchronously.
* The solo (per compactor) thread only reads the compaction pipeline.
* There is at most one thread per memstore instance.
*/ | ---------------------------------------------------------------------- The worker thread performs the compaction asynchronously. The solo (per compactor) thread only reads the compaction pipeline. There is at most one thread per memstore instance | doCompaction | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreCompactor.java",
"license": "apache-2.0",
"size": 12376
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,610,703 |
public List<Note> removeFolder(String folderPath, AuthenticationInfo subject) throws IOException {
// update notebookrepo
this.notebookRepo.remove(folderPath, subject);
// update filesystem tree
Folder folder = getFolder(folderPath);
List<Note> notes = folder.getParent().removeFolder(folder.getN... | List<Note> function(String folderPath, AuthenticationInfo subject) throws IOException { this.notebookRepo.remove(folderPath, subject); Folder folder = getFolder(folderPath); List<Note> notes = folder.getParent().removeFolder(folder.getName(), subject); for (Note note : notes) { this.notesInfo.remove(note.getId()); } re... | /**
* Remove the folder from the tree and returns the affected NoteInfo under this folder.
*
* @param folderPath
* @param subject
* @return
* @throws IOException
*/ | Remove the folder from the tree and returns the affected NoteInfo under this folder | removeFolder | {
"repo_name": "cquptEthan/incubator-zeppelin",
"path": "zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NoteManager.java",
"license": "apache-2.0",
"size": 16179
} | [
"java.io.IOException",
"java.util.List",
"org.apache.zeppelin.user.AuthenticationInfo"
] | import java.io.IOException; import java.util.List; import org.apache.zeppelin.user.AuthenticationInfo; | import java.io.*; import java.util.*; import org.apache.zeppelin.user.*; | [
"java.io",
"java.util",
"org.apache.zeppelin"
] | java.io; java.util; org.apache.zeppelin; | 2,130,523 |
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addSourceElementPropertyDescriptor(object);
}
return itemPropertyDescriptors;
} | List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addSourceElementPropertyDescriptor(object); } return itemPropertyDescriptors; } | /**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the property descriptors for the adapted class. | getPropertyDescriptors | {
"repo_name": "Yakindu/statecharts",
"path": "plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/MappedElementItemProvider.java",
"license": "epl-1.0",
"size": 4473
} | [
"java.util.List",
"org.eclipse.emf.edit.provider.IItemPropertyDescriptor"
] | import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | import java.util.*; import org.eclipse.emf.edit.provider.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 2,416,774 |
static AbstractUIPlugin getPlugin() {
return WorkbenchPlugin.getDefault();
} | static AbstractUIPlugin getPlugin() { return WorkbenchPlugin.getDefault(); } | /**
* Returns the UI plugin for the bookmarks view.
*/ | Returns the UI plugin for the bookmarks view | getPlugin | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkNavigator.java",
"license": "epl-1.0",
"size": 25999
} | [
"org.eclipse.ui.internal.WorkbenchPlugin",
"org.eclipse.ui.plugin.AbstractUIPlugin"
] | import org.eclipse.ui.internal.WorkbenchPlugin; import org.eclipse.ui.plugin.AbstractUIPlugin; | import org.eclipse.ui.internal.*; import org.eclipse.ui.plugin.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 539,297 |
public ListResourceSkusResult withValue(List<AzureResourceSkuInner> value) {
this.value = value;
return this;
} | ListResourceSkusResult function(List<AzureResourceSkuInner> value) { this.value = value; return this; } | /**
* Set the value property: The collection of available SKUs for an existing resource.
*
* @param value the value value to set.
* @return the ListResourceSkusResult object itself.
*/ | Set the value property: The collection of available SKUs for an existing resource | withValue | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ListResourceSkusResult.java",
"license": "mit",
"size": 1706
} | [
"com.azure.resourcemanager.kusto.fluent.models.AzureResourceSkuInner",
"java.util.List"
] | import com.azure.resourcemanager.kusto.fluent.models.AzureResourceSkuInner; import java.util.List; | import com.azure.resourcemanager.kusto.fluent.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 2,347,054 |
@Override
public void open(Configuration configuration) {
producer = getKafkaProducer(this.producerConfig);
RuntimeContext ctx = getRuntimeContext();
if (null != flinkKafkaPartitioner) {
if (flinkKafkaPartitioner instanceof FlinkKafkaDelegatePartitioner) {
((FlinkKafkaDelegatePartitioner) flinkKafkaP... | void function(Configuration configuration) { producer = getKafkaProducer(this.producerConfig); RuntimeContext ctx = getRuntimeContext(); if (null != flinkKafkaPartitioner) { if (flinkKafkaPartitioner instanceof FlinkKafkaDelegatePartitioner) { ((FlinkKafkaDelegatePartitioner) flinkKafkaPartitioner).setPartitions( getPa... | /**
* Initializes the connection to Kafka.
*/ | Initializes the connection to Kafka | open | {
"repo_name": "hongyuhong/flink",
"path": "flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.java",
"license": "apache-2.0",
"size": 14759
} | [
"java.util.Map",
"org.apache.flink.api.common.functions.RuntimeContext",
"org.apache.flink.configuration.Configuration",
"org.apache.flink.metrics.MetricGroup",
"org.apache.flink.streaming.api.operators.StreamingRuntimeContext",
"org.apache.flink.streaming.connectors.kafka.internals.metrics.KafkaMetricWra... | import java.util.Map; import org.apache.flink.api.common.functions.RuntimeContext; import org.apache.flink.configuration.Configuration; import org.apache.flink.metrics.MetricGroup; import org.apache.flink.streaming.api.operators.StreamingRuntimeContext; import org.apache.flink.streaming.connectors.kafka.internals.metri... | import java.util.*; import org.apache.flink.api.common.functions.*; import org.apache.flink.configuration.*; import org.apache.flink.metrics.*; import org.apache.flink.streaming.api.operators.*; import org.apache.flink.streaming.connectors.kafka.internals.metrics.*; import org.apache.flink.streaming.connectors.kafka.pa... | [
"java.util",
"org.apache.flink",
"org.apache.kafka"
] | java.util; org.apache.flink; org.apache.kafka; | 1,884,666 |
PreparedStatement buildInsertPreparedStatement(String tableName, DbParameterAccessor[] accessors)
throws SQLException; | PreparedStatement buildInsertPreparedStatement(String tableName, DbParameterAccessor[] accessors) throws SQLException; | /**
* This method creates an insert command that will be used to populate new
* rows in a table.
*/ | This method creates an insert command that will be used to populate new rows in a table | buildInsertPreparedStatement | {
"repo_name": "dbfit/dbfit",
"path": "dbfit-java/core/src/main/java/dbfit/api/DBEnvironment.java",
"license": "gpl-2.0",
"size": 6884
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException"
] | import java.sql.PreparedStatement; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 399,259 |
public static BSIC fromPerAligned(byte[] encodedBytes) {
BSIC result = new BSIC();
result.decodePerAligned(new BitStreamReader(encodedBytes));
return result;
} | static BSIC function(byte[] encodedBytes) { BSIC result = new BSIC(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new BSIC from encoded stream.
*/ | Creates a new BSIC from encoded stream | fromPerAligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/BSIC.java",
"license": "apache-2.0",
"size": 2830
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 123,977 |
public AnimatableValue getUnderlyingValue(AnimationTarget target) {
SVGNumberList nl = getBaseVal();
int n = nl.getNumberOfItems();
float[] numbers = new float[n];
for (int i = 0; i < n; i++) {
numbers[i] = nl.getItem(n).getValue();
}
return new Animatable... | AnimatableValue function(AnimationTarget target) { SVGNumberList nl = getBaseVal(); int n = nl.getNumberOfItems(); float[] numbers = new float[n]; for (int i = 0; i < n; i++) { numbers[i] = nl.getItem(n).getValue(); } return new AnimatableNumberListValue(target, numbers); } | /**
* Returns the base value of the attribute as an {@link AnimatableValue}.
*/ | Returns the base value of the attribute as an <code>AnimatableValue</code> | getUnderlyingValue | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMAnimatedNumberList.java",
"license": "apache-2.0",
"size": 14268
} | [
"org.apache.batik.anim.values.AnimatableNumberListValue",
"org.apache.batik.anim.values.AnimatableValue",
"org.apache.batik.dom.anim.AnimationTarget",
"org.w3c.dom.svg.SVGNumberList"
] | import org.apache.batik.anim.values.AnimatableNumberListValue; import org.apache.batik.anim.values.AnimatableValue; import org.apache.batik.dom.anim.AnimationTarget; import org.w3c.dom.svg.SVGNumberList; | import org.apache.batik.anim.values.*; import org.apache.batik.dom.anim.*; import org.w3c.dom.svg.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,414,771 |
void createContainerLogDirs(String appId, String containerId,
List<String> logDirs, String user) throws IOException {
boolean containerLogDirStatus = false;
FsPermission containerLogDirPerms = new
FsPermission(getLogDirPermissions());
for (String rootLogDir : logDirs) {
// create $log.... | void createContainerLogDirs(String appId, String containerId, List<String> logDirs, String user) throws IOException { boolean containerLogDirStatus = false; FsPermission containerLogDirPerms = new FsPermission(getLogDirPermissions()); for (String rootLogDir : logDirs) { Path appLogDir = new Path(rootLogDir, appId); Pat... | /**
* Create application log directories on all disks.
*
* @param appId the application ID
* @param containerId the container ID
* @param logDirs the target directories to create
* @param user the user as whom the directories should be created.
* Used only on secure Windows hosts.
* @throws IOEx... | Create application log directories on all disks | createContainerLogDirs | {
"repo_name": "soumabrata-chakraborty/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java",
"license": "apache-2.0",
"size": 35924
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,429,011 |
@Override
protected Description methodDescription(Method method) {
Annotation [] annotations = testAnnotations(method);
annotations = Arrays.copyOf(annotations, annotations.length + 1);
annotations[annotations.length - 1] = new TestInfoAnnotation(method.getDeclaringClass().getName(), method.getName());
retu... | Description function(Method method) { Annotation [] annotations = testAnnotations(method); annotations = Arrays.copyOf(annotations, annotations.length + 1); annotations[annotations.length - 1] = new TestInfoAnnotation(method.getDeclaringClass().getName(), method.getName()); return Description.createTestDescription(getT... | /**
* This terrible hack uses a custom Annotation object to add information to the otherwise
* sealed Description object.
*/ | This terrible hack uses a custom Annotation object to add information to the otherwise sealed Description object | methodDescription | {
"repo_name": "Top-Q/jsystem",
"path": "jsystem-core-projects/jsystemCore/src/main/java/junit/framework/JSystemJUnit4ClassRunner.java",
"license": "apache-2.0",
"size": 8706
} | [
"java.lang.annotation.Annotation",
"java.lang.reflect.Method",
"java.util.Arrays",
"org.junit.internal.runners.InitializationError",
"org.junit.runner.Description"
] | import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Arrays; import org.junit.internal.runners.InitializationError; import org.junit.runner.Description; | import java.lang.annotation.*; import java.lang.reflect.*; import java.util.*; import org.junit.internal.runners.*; import org.junit.runner.*; | [
"java.lang",
"java.util",
"org.junit.internal",
"org.junit.runner"
] | java.lang; java.util; org.junit.internal; org.junit.runner; | 2,629,452 |
@Test
public void testSellIceCream() {
final SpeakerNPC npc = getNPC("Sam");
final Engine en = npc.getEngine();
assertTrue(en.step(player, "hi Sam"));
assertEquals("Hi. Can I #offer you an ice cream?", getReply(npc));
// Currently there are no response to sell sentences for Sam.
assertFalse(en.step(pl... | void function() { final SpeakerNPC npc = getNPC("Sam"); final Engine en = npc.getEngine(); assertTrue(en.step(player, STR)); assertEquals(STR, getReply(npc)); assertFalse(en.step(player, "sell")); } | /**
* Tests for sellIceCream.
*/ | Tests for sellIceCream | testSellIceCream | {
"repo_name": "acsid/stendhal",
"path": "tests/games/stendhal/server/maps/kalavan/citygardens/IceCreamSellerNPCTest.java",
"license": "gpl-2.0",
"size": 6255
} | [
"games.stendhal.server.entity.npc.SpeakerNPC",
"games.stendhal.server.entity.npc.fsm.Engine",
"org.junit.Assert"
] | import games.stendhal.server.entity.npc.SpeakerNPC; import games.stendhal.server.entity.npc.fsm.Engine; import org.junit.Assert; | import games.stendhal.server.entity.npc.*; import games.stendhal.server.entity.npc.fsm.*; import org.junit.*; | [
"games.stendhal.server",
"org.junit"
] | games.stendhal.server; org.junit; | 871,437 |
private Chromosome doGenetic(List<? extends Human> agents, List<ClusterData> zones) {
int length = agents.size();
SOSGeneticAlgorithm ga = new SOSGeneticAlgorithm(new OnePointCrossover<GCAChromosome>(), CROSSOVER_RATE, new ExchangeMutation<ClusterData>(EXCHANGE_MUTATTION_RATE, random), MUTATION_RATE, new SOSTour... | Chromosome function(List<? extends Human> agents, List<ClusterData> zones) { int length = agents.size(); SOSGeneticAlgorithm ga = new SOSGeneticAlgorithm(new OnePointCrossover<GCAChromosome>(), CROSSOVER_RATE, new ExchangeMutation<ClusterData>(EXCHANGE_MUTATTION_RATE, random), MUTATION_RATE, new SOSTournamentSelection(... | /**
* Instantiates Aima genetic and runs the aglorithm
*
* @param agents
* @param zones
* @return
*/ | Instantiates Aima genetic and runs the aglorithm | doGenetic | {
"repo_name": "alim1369/sos",
"path": "src/sos/search_v2/tools/genetic/GeneticClusterAssigner.java",
"license": "apache-2.0",
"size": 5364
} | [
"java.util.List",
"org.apache.commons.math3.genetics.Chromosome",
"org.apache.commons.math3.genetics.OnePointCrossover",
"org.apache.commons.math3.genetics.Population"
] | import java.util.List; import org.apache.commons.math3.genetics.Chromosome; import org.apache.commons.math3.genetics.OnePointCrossover; import org.apache.commons.math3.genetics.Population; | import java.util.*; import org.apache.commons.math3.genetics.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,059,382 |
public Set<Operation> getAllValuesOfredefined(final RedefinedLeafMatch partialMatch) {
return rawAccumulateAllValuesOfredefined(partialMatch.toArray());
}
| Set<Operation> function(final RedefinedLeafMatch partialMatch) { return rawAccumulateAllValuesOfredefined(partialMatch.toArray()); } | /**
* Retrieve the set of values that occur in matches for redefined.
* @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for redefined | getAllValuesOfredefined | {
"repo_name": "ELTE-Soft/xUML-RT-Executor",
"path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/RedefinedLeafMatcher.java",
"license": "epl-1.0",
"size": 13613
} | [
"hu.eltesoft.modelexecution.validation.RedefinedLeafMatch",
"java.util.Set",
"org.eclipse.uml2.uml.Operation"
] | import hu.eltesoft.modelexecution.validation.RedefinedLeafMatch; import java.util.Set; import org.eclipse.uml2.uml.Operation; | import hu.eltesoft.modelexecution.validation.*; import java.util.*; import org.eclipse.uml2.uml.*; | [
"hu.eltesoft.modelexecution",
"java.util",
"org.eclipse.uml2"
] | hu.eltesoft.modelexecution; java.util; org.eclipse.uml2; | 2,446,020 |
public void warn(Throwable throwable, String msg, Object arg0) {
logIfEnabled(Level.WARNING, throwable, msg, arg0, UNKNOWN_ARG, UNKNOWN_ARG, null);
} | void function(Throwable throwable, String msg, Object arg0) { logIfEnabled(Level.WARNING, throwable, msg, arg0, UNKNOWN_ARG, UNKNOWN_ARG, null); } | /**
* Log a warning message with a throwable.
*/ | Log a warning message with a throwable | warn | {
"repo_name": "dankito/ormlite-jpa-core",
"path": "src/main/java/com/j256/ormlite/logger/Logger.java",
"license": "isc",
"size": 17794
} | [
"com.j256.ormlite.logger.Log"
] | import com.j256.ormlite.logger.Log; | import com.j256.ormlite.logger.*; | [
"com.j256.ormlite"
] | com.j256.ormlite; | 1,024,530 |
public void handle(MapTileTask mapTileTaskResult) {
if (!mapTileTaskResult.handleException(context)) {
synchronized (context.getPdfLock()) { //tiles may be currently loading in another thread
dc.saveState();
try {
mapTileTaskResult.renderOnPdf... | void function(MapTileTask mapTileTaskResult) { if (!mapTileTaskResult.handleException(context)) { synchronized (context.getPdfLock()) { dc.saveState(); try { mapTileTaskResult.renderOnPdf(dc); } catch (DocumentException e) { context.addError(e); } finally { dc.restoreState(); target.addDone(1); } } } else { target.addD... | /**
* Called each time a result is available, in the order the tiles were
* scheduled to be loaded. For one PDF file, not called in //.
*/ | Called each time a result is available, in the order the tiles were scheduled to be loaded. For one PDF file, not called in // | handle | {
"repo_name": "alediator/mapfish-print",
"path": "src/main/java/org/mapfish/print/map/ParallelMapTileLoader.java",
"license": "gpl-3.0",
"size": 3718
} | [
"com.lowagie.text.DocumentException"
] | import com.lowagie.text.DocumentException; | import com.lowagie.text.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 2,537,465 |
@Subscribe
public void onUiScoreEvent(ScoreUpdateEvent event) {
Log.d(TAG, "ScoreUpdateEvent: score from event: " + event.getScore() +
" , config max score per stage:" + config.getNoStages() + " , currentStage: " + currentStage);
fragment.s... | void function(ScoreUpdateEvent event) { Log.d(TAG, STR + event.getScore() + STR + config.getNoStages() + STR + currentStage); fragment.setCurrentStageOverTotal(currentStage + 1, config.getNoStages()); fragment.setCurrentScoreOverTotal(event.getScore(), config.getMaxScore()); fragment.setMasterGameId(master.getGameID())... | /**
* Method to update the scores in the Fragment.
* @param event A {@link ScoreUpdateEvent}.
*/ | Method to update the scores in the Fragment | onUiScoreEvent | {
"repo_name": "polimi-giocoso/super",
"path": "app/src/main/java/it/playfellas/superapp/ui/master/GamePresenter.java",
"license": "apache-2.0",
"size": 4658
} | [
"android.util.Log",
"it.playfellas.superapp.events.ui.ScoreUpdateEvent"
] | import android.util.Log; import it.playfellas.superapp.events.ui.ScoreUpdateEvent; | import android.util.*; import it.playfellas.superapp.events.ui.*; | [
"android.util",
"it.playfellas.superapp"
] | android.util; it.playfellas.superapp; | 327,210 |
private class BibDatabaseEntryListener {
@Subscribe
public void listen(EntryChangedEvent entryChangedEvent) {
citationStylesCache.remove(entryChangedEvent.getBibEntry());
} | class BibDatabaseEntryListener { public void function(EntryChangedEvent entryChangedEvent) { citationStylesCache.remove(entryChangedEvent.getBibEntry()); } | /**
* removes the outdated citation of the changed entry
*/ | removes the outdated citation of the changed entry | listen | {
"repo_name": "bartsch-dev/jabref",
"path": "src/main/java/org/jabref/logic/citationstyle/CitationStyleCache.java",
"license": "mit",
"size": 2501
} | [
"org.jabref.model.entry.event.EntryChangedEvent"
] | import org.jabref.model.entry.event.EntryChangedEvent; | import org.jabref.model.entry.event.*; | [
"org.jabref.model"
] | org.jabref.model; | 563,405 |
protected void sequence_ErrorBox(EObject context, ErrorBox semanticObject) {
if(errorAcceptor != null) {
if(transientValues.isValueTransient(semanticObject, MMDSLPackage.eINSTANCE.getErrorBox_Title()) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MM... | void function(EObject context, ErrorBox semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, MMDSLPackage.eINSTANCE.getErrorBox_Title()) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, MMDSLPackage.eINSTANCE.getErrorBo... | /**
* Constraint:
* (title=STRING text=STRING buttontype=ButtonType)
*/ | Constraint: (title=STRING text=STRING buttontype=ButtonType) | sequence_ErrorBox | {
"repo_name": "niksavis/mm-dsl",
"path": "org.xtext.nv.dsl/src-gen/org/xtext/nv/dsl/serializer/MMDSLSemanticSequencer.java",
"license": "epl-1.0",
"size": 190481
} | [
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.serializer.acceptor.SequenceFeeder",
"org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider",
"org.eclipse.xtext.serializer.sequencer.ITransientValueService",
"org.xtext.nv.dsl.mMDSL.ErrorBox",
"org.xtext.nv.dsl.mMDSL.MMDSLPackage",
"org.xtext.n... | import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; import org.xtext.nv.dsl.mMDSL.ErrorBox; import org.xtext.nv.dsl.mMDSL.MMDSLPackage... | import org.eclipse.emf.ecore.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; import org.xtext.nv.dsl.*; | [
"org.eclipse.emf",
"org.eclipse.xtext",
"org.xtext.nv"
] | org.eclipse.emf; org.eclipse.xtext; org.xtext.nv; | 1,125,847 |
@Test
public void testMozColumnCountInteger() {
{
MozColumnCount mozColumnCount = new MozColumnCount(2);
assertEquals(Integer.valueOf(2), mozColumnCount.getValue());
assertEquals("2", mozColumnCount.getCssValue());
}
{
final Mo... | void function() { { MozColumnCount mozColumnCount = new MozColumnCount(2); assertEquals(Integer.valueOf(2), mozColumnCount.getValue()); assertEquals("2", mozColumnCount.getCssValue()); } { final MozColumnCount mozColumnCount1 = new MozColumnCount(2); MozColumnCount mozColumnCount = new MozColumnCount(mozColumnCount1); ... | /**
* Test method for {@link com.webfirmframework.wffweb.css.css3.MozColumnCount#MozColumnCount(integer)}.
*/ | Test method for <code>com.webfirmframework.wffweb.css.css3.MozColumnCount#MozColumnCount(integer)</code> | testMozColumnCountInteger | {
"repo_name": "webfirmframework/wff",
"path": "wffweb/src/test/java/com/webfirmframework/wffweb/css/css3/MozColumnCountTest.java",
"license": "apache-2.0",
"size": 9189
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 168,992 |
public boolean showHideMeasure( final String cubeName, final String measureName, final boolean visible ) throws ModelerException {
Element measureNode = (Element) getMeasureNode( cubeName, measureName );
if ( measureNode == null ) {
measureNode = getCalculatedMeasureNode( cubeName, measureName );
}
... | boolean function( final String cubeName, final String measureName, final boolean visible ) throws ModelerException { Element measureNode = (Element) getMeasureNode( cubeName, measureName ); if ( measureNode == null ) { measureNode = getCalculatedMeasureNode( cubeName, measureName ); } if ( measureNode != null ) { showH... | /**
* set visible=false on the given measure
*
* @param cubeName Cube to search for measure
* @param measureName Name of measure to search for
* @param visible
* @throws ModelerException
*/ | set visible=false on the given measure | showHideMeasure | {
"repo_name": "kurtwalker/modeler",
"path": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/util/MondrianSchemaHandler.java",
"license": "lgpl-2.1",
"size": 27697
} | [
"org.pentaho.agilebi.modeler.ModelerException",
"org.w3c.dom.Element"
] | import org.pentaho.agilebi.modeler.ModelerException; import org.w3c.dom.Element; | import org.pentaho.agilebi.modeler.*; import org.w3c.dom.*; | [
"org.pentaho.agilebi",
"org.w3c.dom"
] | org.pentaho.agilebi; org.w3c.dom; | 1,251,415 |
interface AwsSqsComponentBuilder extends ComponentBuilder<SqsComponent> {
default AwsSqsComponentBuilder amazonAWSHost(
java.lang.String amazonAWSHost) {
doSetProperty("amazonAWSHost", amazonAWSHost);
return this;
} | interface AwsSqsComponentBuilder extends ComponentBuilder<SqsComponent> { default AwsSqsComponentBuilder amazonAWSHost( java.lang.String amazonAWSHost) { doSetProperty(STR, amazonAWSHost); return this; } | /**
* The hostname of the Amazon AWS cloud.
*
* The option is a: <code>java.lang.String</code> type.
*
* Default: amazonaws.com
* Group: common
*/ | The hostname of the Amazon AWS cloud. The option is a: <code>java.lang.String</code> type. Default: amazonaws.com Group: common | amazonAWSHost | {
"repo_name": "ullgren/camel",
"path": "core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSqsComponentBuilderFactory.java",
"license": "apache-2.0",
"size": 27888
} | [
"org.apache.camel.builder.component.ComponentBuilder",
"org.apache.camel.component.aws.sqs.SqsComponent"
] | import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.aws.sqs.SqsComponent; | import org.apache.camel.builder.component.*; import org.apache.camel.component.aws.sqs.*; | [
"org.apache.camel"
] | org.apache.camel; | 581,797 |
synchronized void renderTheScene(final GL2 gl, final GLU glu, final JHelpSceneRenderer sceneRenderer)
{
Node node;
if(this.nodeList == null)
{
final Stack<Node> stack = new Stack<Node>();
stack.push(this.root);
final ArrayList<Node> nodes = new ArrayList<Node>()... | synchronized void renderTheScene(final GL2 gl, final GLU glu, final JHelpSceneRenderer sceneRenderer) { Node node; if(this.nodeList == null) { final Stack<Node> stack = new Stack<Node>(); stack.push(this.root); final ArrayList<Node> nodes = new ArrayList<Node>(); while(stack.isEmpty() == false) { node = stack.pop(); no... | /**
* Render the scene
*
* @param gl
* OpenGL context
* @param glu
* GLU context
* @param sceneRenderer
* Scene renderer
*/ | Render the scene | renderTheScene | {
"repo_name": "automenta/narchy",
"path": "lab/lab_x/main/java/jhelp/engine/Scene.java",
"license": "agpl-3.0",
"size": 10722
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Stack"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.Stack; | import java.util.*; | [
"java.util"
] | java.util; | 1,372,123 |
@Test
public void test310CloseCaseAndRefreshAccountWill() throws Exception {
final String TEST_NAME = "test310CloseCaseAndRefreshAccountWill";
displayTestTitle(TEST_NAME);
// GIVEN
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
syncServiceMock.reset();
accountWillComple... | void function() throws Exception { final String TEST_NAME = STR; displayTestTitle(TEST_NAME); Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); syncServiceMock.reset(); accountWillCompletionTimestampStart = clock.currentTimeXMLGregorianCalendar(); closeCase(willLastCaseOid); PrismObject<Shad... | /**
* Case is closed. The operation is complete.
*/ | Case is closed. The operation is complete | test310CloseCaseAndRefreshAccountWill | {
"repo_name": "arnost-starosta/midpoint",
"path": "provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/manual/AbstractManualResourceTest.java",
"license": "apache-2.0",
"size": 116854
} | [
"com.evolveum.midpoint.prism.PrismObject",
"com.evolveum.midpoint.schema.GetOperationOptions",
"com.evolveum.midpoint.schema.PointInTimeType",
"com.evolveum.midpoint.schema.SelectorOptions",
"com.evolveum.midpoint.schema.constants.SchemaConstants",
"com.evolveum.midpoint.schema.result.OperationResult",
... | import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.schema.GetOperationOptions; import com.evolveum.midpoint.schema.PointInTimeType; import com.evolveum.midpoint.schema.SelectorOptions; import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.result.Ope... | import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.schema.*; import com.evolveum.midpoint.schema.constants.*; import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.task.api.*; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import org.testng.*; | [
"com.evolveum.midpoint",
"org.testng"
] | com.evolveum.midpoint; org.testng; | 24,382 |
@Test public void testProjectMapping() {
final RelBuilder builder = RelBuilder.create(config().build());
RelNode root =
builder.scan("EMP")
.project(builder.field(0), builder.field(0))
.build();
assertTrue(root instanceof Project);
Project project = ... | @Test void function() { final RelBuilder builder = RelBuilder.create(config().build()); RelNode root = builder.scan("EMP") .project(builder.field(0), builder.field(0)) .build(); assertTrue(root instanceof Project); Project project = (Project) root; Mappings.TargetMapping mapping = project.getMapping(); assertTrue(mappi... | /** Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-3228">[CALCITE-3228]
* IllegalArgumentException in getMapping() for project containing same reference</a>. */ | Test case for [CALCITE-3228] | testProjectMapping | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/RelBuilderTest.java",
"license": "apache-2.0",
"size": 116680
} | [
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.core.Project",
"org.apache.calcite.tools.RelBuilder",
"org.apache.calcite.util.mapping.Mappings",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.Project; import org.apache.calcite.tools.RelBuilder; import org.apache.calcite.util.mapping.Mappings; import org.junit.Assert; import org.junit.Test; | import org.apache.calcite.rel.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.tools.*; import org.apache.calcite.util.mapping.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 1,156,111 |
public RealMatrix getWeightSquareRoot() {
return weightMatrixSqrt.copy();
} | RealMatrix function() { return weightMatrixSqrt.copy(); } | /**
* Gets the square-root of the weight matrix.
*
* @return the square-root of the weight matrix.
*/ | Gets the square-root of the weight matrix | getWeightSquareRoot | {
"repo_name": "charles-cooper/idylfin",
"path": "src/org/apache/commons/math3/optim/nonlinear/vector/jacobian/AbstractLeastSquaresOptimizer.java",
"license": "apache-2.0",
"size": 10777
} | [
"org.apache.commons.math3.linear.RealMatrix"
] | import org.apache.commons.math3.linear.RealMatrix; | import org.apache.commons.math3.linear.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,282,995 |
public boolean getDpadLeft()
{
return super.getRawAxis(Config.Joystick.chnDpadHorz) < -Config.Joystick.minDpadVal;
}
| boolean function() { return super.getRawAxis(Config.Joystick.chnDpadHorz) < -Config.Joystick.minDpadVal; } | /**
* Returns if the dpad left is pressed or not
* @return
*/ | Returns if the dpad left is pressed or not | getDpadLeft | {
"repo_name": "FRC-Team-955/AerialAssist",
"path": "RobotCode/src/ModClasses/MyJoystick.java",
"license": "gpl-3.0",
"size": 2668
} | [
"edu.wpi.first.wpilibj.Joystick"
] | import edu.wpi.first.wpilibj.Joystick; | import edu.wpi.first.wpilibj.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 859,114 |
public List<String> getExcerptFieldNames() {
if (m_excerptFieldNames == null) {
// lazy initialize the field names
m_excerptFieldNames = new ArrayList<String>();
Iterator<CmsSearchField> i = getFields().iterator();
while (i.hasNext()) {
CmsLuc... | List<String> function() { if (m_excerptFieldNames == null) { m_excerptFieldNames = new ArrayList<String>(); Iterator<CmsSearchField> i = getFields().iterator(); while (i.hasNext()) { CmsLuceneField field = (CmsLuceneField)i.next(); if (field.isInExcerptAndStored()) { m_excerptFieldNames.add(field.getName()); } } } retu... | /**
* Returns a list of all field names (Strings) that are used in generating the search excerpt.<p>
*
* @return a list of all field names (Strings) that are used in generating the search excerpt
*/ | Returns a list of all field names (Strings) that are used in generating the search excerpt | getExcerptFieldNames | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/search/fields/CmsLuceneFieldConfiguration.java",
"license": "lgpl-2.1",
"size": 10524
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 822,086 |
public Set<SyncListener> getSyncListeners() {
// Make a copy so callers get an immutable snapshot of the current state.
return Collections.unmodifiableSet(new HashSet<SyncListener>(syncListeners));
} | Set<SyncListener> function() { return Collections.unmodifiableSet(new HashSet<SyncListener>(syncListeners)); } | /**
* Get the set of sync command listeners that are currently registered.
*
* @return the currently registered sync listeners
*/ | Get the set of sync command listeners that are currently registered | getSyncListeners | {
"repo_name": "brunchboy/beat-link",
"path": "src/main/java/org/deepsymmetry/beatlink/BeatFinder.java",
"license": "epl-1.0",
"size": 28014
} | [
"java.util.Collections",
"java.util.HashSet",
"java.util.Set"
] | import java.util.Collections; import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,200,600 |
public static Animator createAnimator(int duration, Object object,
String propertyName, KeyFrames keyFrames) {
PropertySetter ps = new PropertySetter(object, propertyName, keyFrames);
Animator animator = new Animator(duration, ps);
return animator;
}
| static Animator function(int duration, Object object, String propertyName, KeyFrames keyFrames) { PropertySetter ps = new PropertySetter(object, propertyName, keyFrames); Animator animator = new Animator(duration, ps); return animator; } | /**
* Utility method that constructs a PropertySetter and an Animator using
* that PropertySetter and returns the Animator
* @param duration the duration, in milliseconds, of the animation
* @param object the object whose property will be animated
* @param propertyName the name of the prop... | Utility method that constructs a PropertySetter and an Animator using that PropertySetter and returns the Animator | createAnimator | {
"repo_name": "KEOpenSource/CAExplorer",
"path": "org/jdesktop/animation/timing/interpolation/PropertySetter.java",
"license": "apache-2.0",
"size": 17236
} | [
"org.jdesktop.animation.timing.Animator"
] | import org.jdesktop.animation.timing.Animator; | import org.jdesktop.animation.timing.*; | [
"org.jdesktop.animation"
] | org.jdesktop.animation; | 1,879,327 |
public String getSTDOUT(){
if(stdOutStr!=null){
return(this.stdOutStr.toString());
}
if(this.stdOutFile != null){
try {
return(IO.tail(new File(this.stdOutFile), NUM_LINES_STDOUT_STDERR));
} catch (IOException e) {
this.LOGGER.warn("Can't read STDOUT file " + this.stdOutFile);
e.printStack... | String function(){ if(stdOutStr!=null){ return(this.stdOutStr.toString()); } if(this.stdOutFile != null){ try { return(IO.tail(new File(this.stdOutFile), NUM_LINES_STDOUT_STDERR)); } catch (IOException e) { this.LOGGER.warn(STR + this.stdOutFile); e.printStackTrace(); } } if(p!=null){ try { return(getLogEntryStdOut(p).... | /**
* Returns the last x lines from STDOUT
* @return String containing STDOUT of the executed command
*/ | Returns the last x lines from STDOUT | getSTDOUT | {
"repo_name": "ibisngs/knime4ngs-src",
"path": "de.helmholtz_muenchen.ibis.knimenodes/src/de/helmholtz_muenchen/ibis/utils/threads/ExecuteThread.java",
"license": "gpl-3.0",
"size": 8144
} | [
"de.helmholtz_muenchen.ibis.utils.IO",
"java.io.File",
"java.io.IOException"
] | import de.helmholtz_muenchen.ibis.utils.IO; import java.io.File; import java.io.IOException; | import de.helmholtz_muenchen.ibis.utils.*; import java.io.*; | [
"de.helmholtz_muenchen.ibis",
"java.io"
] | de.helmholtz_muenchen.ibis; java.io; | 1,006,688 |
@Test
public void testGetCSWRecord() throws Exception {
final String docString = ResourceUtil
.loadResourceAsString("org/auscope/portal/GASeismicSurvey/SeismicSurvey.xml");
final ByteArrayInputStream is1 = new ByteArrayInputStream(docString.getBytes());
final String mockU... | void function() throws Exception { final String docString = ResourceUtil .loadResourceAsString(STR); final ByteArrayInputStream is1 = new ByteArrayInputStream(docString.getBytes()); final String mockUrl = STRCanberraSTRACTSTRc523c6bc-29be-21dd-e044-00144fdd4fa6", record.getFileIdentifier()); Assert.assertEquals(22, rec... | /**
* Test that the function is able to actually load CSW records from multiple services
*
* @throws Exception
*/ | Test that the function is able to actually load CSW records from multiple services | testGetCSWRecord | {
"repo_name": "yan073/AuScope-Portal",
"path": "src/test/java/org/auscope/portal/services/TestSeismicSurveyWMSService.java",
"license": "lgpl-3.0",
"size": 2394
} | [
"java.io.ByteArrayInputStream",
"org.auscope.portal.core.test.ResourceUtil",
"org.junit.Assert"
] | import java.io.ByteArrayInputStream; import org.auscope.portal.core.test.ResourceUtil; import org.junit.Assert; | import java.io.*; import org.auscope.portal.core.test.*; import org.junit.*; | [
"java.io",
"org.auscope.portal",
"org.junit"
] | java.io; org.auscope.portal; org.junit; | 805,678 |
public void setBounds(Bbox bounds) {
this.bounds = bounds;
} | void function(Bbox bounds) { this.bounds = bounds; } | /**
* Set the bounding box for the legend. It may be that a legend image is built reflecting styles within a certain
* area.
*
* @param bounds
* The bounds to use for legend creation.
*/ | Set the bounding box for the legend. It may be that a legend image is built reflecting styles within a certain area | setBounds | {
"repo_name": "lat-lon/geoeditor",
"path": "face/geomajas-face-puregwt/client/src/main/java/org/geomajas/puregwt/client/map/layer/LegendConfig.java",
"license": "agpl-3.0",
"size": 4886
} | [
"org.geomajas.geometry.Bbox"
] | import org.geomajas.geometry.Bbox; | import org.geomajas.geometry.*; | [
"org.geomajas.geometry"
] | org.geomajas.geometry; | 990,936 |
public void setUseParentHandlers(boolean useParentHandlers)
throws ConfigException
{
} | void function(boolean useParentHandlers) throws ConfigException { } | /**
* Sets the use-parent-handlers
*/ | Sets the use-parent-handlers | setUseParentHandlers | {
"repo_name": "CleverCloud/Quercus",
"path": "resin/src/main/java/com/caucho/log/LogHandlerConfig.java",
"license": "gpl-2.0",
"size": 7734
} | [
"com.caucho.config.ConfigException"
] | import com.caucho.config.ConfigException; | import com.caucho.config.*; | [
"com.caucho.config"
] | com.caucho.config; | 2,205,300 |
@Nullable public static String lambdaEnclosingClassName(String clsName) {
int idx = clsName.indexOf("$$Lambda$");
return idx != -1 ? clsName.substring(0, idx) : null;
} | @Nullable static String function(String clsName) { int idx = clsName.indexOf(STR); return idx != -1 ? clsName.substring(0, idx) : null; } | /**
* Extracts full name of enclosing class from JDK8 lambda class name.
*
* @param clsName JDK8 lambda class name.
* @return Full name of enclosing class for JDK8 lambda class name or
* {@code null} if passed in name is not related to lambda.
*/ | Extracts full name of enclosing class from JDK8 lambda class name | lambdaEnclosingClassName | {
"repo_name": "shurun19851206/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 289056
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,743,115 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.