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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@ApiModelProperty(example = "null", required = true, value = "source_pin_id integer")
public Long getSourcePinId() {
return sourcePinId;
} | @ApiModelProperty(example = "null", required = true, value = STR) Long function() { return sourcePinId; } | /**
* source_pin_id integer
*
* @return sourcePinId
**/ | source_pin_id integer | getSourcePinId | {
"repo_name": "GoldenGnu/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/PlanetRoute.java",
"license": "apache-2.0",
"size": 6022
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 537,608 |
void transformGraphics(AffineTransform trans); | void transformGraphics(AffineTransform trans); | /**
* Transform the plot symbols using the given AffineTransform
* (called when the image is transformed, to keep the plot symbols up to date).
*/ | Transform the plot symbols using the given AffineTransform (called when the image is transformed, to keep the plot symbols up to date) | transformGraphics | {
"repo_name": "arturog8m/ocs",
"path": "bundle/jsky.app.ot/src/main/java/jsky/catalog/gui/TablePlotter.java",
"license": "bsd-3-clause",
"size": 3569
} | [
"java.awt.geom.AffineTransform"
] | import java.awt.geom.AffineTransform; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,219,958 |
public static boolean isAutogenerated(String name) {
return IndexWriter.WRITE_LOCK_NAME.equals(name);
} | static boolean function(String name) { return IndexWriter.WRITE_LOCK_NAME.equals(name); } | /**
* Returns true if the file is auto-generated by the store and shouldn't be deleted during cleanup.
* This includes write lock and checksum files
*/ | Returns true if the file is auto-generated by the store and shouldn't be deleted during cleanup. This includes write lock and checksum files | isAutogenerated | {
"repo_name": "maddin2016/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/store/Store.java",
"license": "apache-2.0",
"size": 67230
} | [
"org.apache.lucene.index.IndexWriter"
] | import org.apache.lucene.index.IndexWriter; | import org.apache.lucene.index.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 205,731 |
public static StatementPackage init() {
if (isInited) {
return (StatementPackage) EPackage.Registry.INSTANCE.getEPackage(StatementPackage.eNS_URI);
}
// Obtain or create and register package
StatementPackageImpl theStatementPackage = (StatementPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanc... | static StatementPackage function() { if (isInited) { return (StatementPackage) EPackage.Registry.INSTANCE.getEPackage(StatementPackage.eNS_URI); } StatementPackageImpl theStatementPackage = (StatementPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StatementPackageImpl ? EPackage.Registry.INSTANCE.get(e... | /**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>
* This method is used to initialize {@link StatementPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly.
* Instead, they should simply access that f... | Creates, registers, and initializes the Package for this model, and for any others upon which it depends. This method is used to initialize <code>StatementPackage#eINSTANCE</code> when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | init | {
"repo_name": "drbgfc/mdht",
"path": "cts2/plugins/org.openhealthtools.mdht.cts2.core/src/org/openhealthtools/mdht/cts2/statement/impl/StatementPackageImpl.java",
"license": "epl-1.0",
"size": 35311
} | [
"org.eclipse.emf.ecore.EPackage",
"org.openhealthtools.mdht.cts2.association.AssociationPackage",
"org.openhealthtools.mdht.cts2.association.impl.AssociationPackageImpl",
"org.openhealthtools.mdht.cts2.codesystem.CodeSystemPackage",
"org.openhealthtools.mdht.cts2.codesystem.impl.CodeSystemPackageImpl",
"o... | import org.eclipse.emf.ecore.EPackage; import org.openhealthtools.mdht.cts2.association.AssociationPackage; import org.openhealthtools.mdht.cts2.association.impl.AssociationPackageImpl; import org.openhealthtools.mdht.cts2.codesystem.CodeSystemPackage; import org.openhealthtools.mdht.cts2.codesystem.impl.CodeSystemPack... | import org.eclipse.emf.ecore.*; import org.openhealthtools.mdht.cts2.association.*; import org.openhealthtools.mdht.cts2.association.impl.*; import org.openhealthtools.mdht.cts2.codesystem.*; import org.openhealthtools.mdht.cts2.codesystem.impl.*; import org.openhealthtools.mdht.cts2.codesystemversion.*; import org.ope... | [
"org.eclipse.emf",
"org.openhealthtools.mdht"
] | org.eclipse.emf; org.openhealthtools.mdht; | 914,067 |
private static boolean getBooleanParam(String paramName) {
if (CommandLine.getInstance().hasSwitch(paramName)) {
return true;
}
return TextUtils.equals(ENABLED_VALUE,
VariationsAssociatedData.getVariationParamValue(FIELD_TRIAL_NAME, paramName));
} | static boolean function(String paramName) { if (CommandLine.getInstance().hasSwitch(paramName)) { return true; } return TextUtils.equals(ENABLED_VALUE, VariationsAssociatedData.getVariationParamValue(FIELD_TRIAL_NAME, paramName)); } | /**
* Gets a boolean Finch parameter, assuming the <paramName>="true" format. Also checks for
* a command-line switch with the same name, for easy local testing.
* @param paramName The name of the Finch parameter (or command-line switch) to get a value
* for.
* @return Whether... | Gets a boolean Finch parameter, assuming the ="true" format. Also checks for a command-line switch with the same name, for easy local testing | getBooleanParam | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java",
"license": "bsd-3-clause",
"size": 16459
} | [
"android.text.TextUtils",
"org.chromium.base.CommandLine",
"org.chromium.components.variations.VariationsAssociatedData"
] | import android.text.TextUtils; import org.chromium.base.CommandLine; import org.chromium.components.variations.VariationsAssociatedData; | import android.text.*; import org.chromium.base.*; import org.chromium.components.variations.*; | [
"android.text",
"org.chromium.base",
"org.chromium.components"
] | android.text; org.chromium.base; org.chromium.components; | 2,802,188 |
Long averageNullableLong(
FunctionExpression<NullableLongFunction1<TSource>> selector); | Long averageNullableLong( FunctionExpression<NullableLongFunction1<TSource>> selector); | /**
* Computes the average of a sequence of nullable
* long values that is obtained by invoking a projection function
* on each element of the input sequence.
*/ | Computes the average of a sequence of nullable long values that is obtained by invoking a projection function on each element of the input sequence | averageNullableLong | {
"repo_name": "YrAuYong/incubator-calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/ExtendedQueryable.java",
"license": "apache-2.0",
"size": 25225
} | [
"org.apache.calcite.linq4j.function.NullableLongFunction1",
"org.apache.calcite.linq4j.tree.FunctionExpression"
] | import org.apache.calcite.linq4j.function.NullableLongFunction1; import org.apache.calcite.linq4j.tree.FunctionExpression; | import org.apache.calcite.linq4j.function.*; import org.apache.calcite.linq4j.tree.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 966,394 |
public void showAlertDialog(Context context, String title, String message,
Boolean status) {
AlertDialog alertDialog = new AlertDialog.Builder(context).create();
// Setting Dialog Title
alertDialog.setTitle(title);
// Setting Dialog Message
alertDialog.setMessage(message);
if(status != null)
// ... | void function(Context context, String title, String message, Boolean status) { AlertDialog alertDialog = new AlertDialog.Builder(context).create(); alertDialog.setTitle(title); alertDialog.setMessage(message); if(status != null) | /**
* Function to display simple Alert Dialog
* @param context - application context
* @param title - alert dialog title
* @param message - alert message
* @param status - success/failure (used to set icon)
* - pass null if you don't want icon
* */ | Function to display simple Alert Dialog | showAlertDialog | {
"repo_name": "NhamPhanDinh/smmatest",
"path": "SMMA/src/jp/ne/smma/EventList/Controller/AlertDialogManager.java",
"license": "apache-2.0",
"size": 1089
} | [
"android.app.AlertDialog",
"android.content.Context"
] | import android.app.AlertDialog; import android.content.Context; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 1,895,224 |
@MCRCommand(syntax = "delete all permissions for id {1}",
help = "The command delete all access rules for a given id",
order = 120)
public static void permissionDeleteAllForID(String id) {
MCRRuleAccessInterface accessImpl = MCRAccessManager.requireRulesInterface();
accessImpl.re... | @MCRCommand(syntax = STR, help = STR, order = 120) static void function(String id) { MCRRuleAccessInterface accessImpl = MCRAccessManager.requireRulesInterface(); accessImpl.removeAllRules(id); } | /**
* delete all permissions for a given id
*
* @param id
* String the id of the object the rule is assigned to
*/ | delete all permissions for a given id | permissionDeleteAllForID | {
"repo_name": "MyCoRe-Org/mycore",
"path": "mycore-base/src/main/java/org/mycore/frontend/cli/MCRAccessCommands.java",
"license": "gpl-3.0",
"size": 17538
} | [
"org.mycore.access.MCRAccessManager",
"org.mycore.access.MCRRuleAccessInterface",
"org.mycore.frontend.cli.annotation.MCRCommand"
] | import org.mycore.access.MCRAccessManager; import org.mycore.access.MCRRuleAccessInterface; import org.mycore.frontend.cli.annotation.MCRCommand; | import org.mycore.access.*; import org.mycore.frontend.cli.annotation.*; | [
"org.mycore.access",
"org.mycore.frontend"
] | org.mycore.access; org.mycore.frontend; | 2,662,087 |
public boolean removeChild(INode child, int latestSnapshotId) {
if (isInLatestSnapshot(latestSnapshotId)) {
// create snapshot feature if necessary
DirectoryWithSnapshotFeature sf = this.getDirectoryWithSnapshotFeature();
if (sf == null) {
sf = this.addSnapshotFeature(null);
}
... | boolean function(INode child, int latestSnapshotId) { if (isInLatestSnapshot(latestSnapshotId)) { DirectoryWithSnapshotFeature sf = this.getDirectoryWithSnapshotFeature(); if (sf == null) { sf = this.addSnapshotFeature(null); } return sf.removeChild(this, child, latestSnapshotId); } return removeChild(child); } | /**
* Remove the specified child from this directory.
*/ | Remove the specified child from this directory | removeChild | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java",
"license": "apache-2.0",
"size": 36049
} | [
"org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature"
] | import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature; | import org.apache.hadoop.hdfs.server.namenode.snapshot.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,988,458 |
public void doSave_page(RunData data, Context context)
{
SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());
// read the form - if rejected, leave things as they are
if (!readPageForm(data, state)) return;
// done with the page
state.removeAttribu... | void function(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); if (!readPageForm(data, state)) return; state.removeAttribute("page"); doSave_edit(data, context); } | /**
* save the page edited, and save the site edit
*/ | save the page edited, and save the site edit | doSave_page | {
"repo_name": "kingmook/sakai",
"path": "site/site-tool/tool/src/java/org/sakaiproject/site/tool/AdminSitesAction.java",
"license": "apache-2.0",
"size": 77028
} | [
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event"
] | org.sakaiproject.cheftool; org.sakaiproject.event; | 2,459,026 |
@XLFunction(name = "MyArray",
description = "Creates an array",
category = "Mine",
typeConversionMode = TypeConversionMode.SIMPLEST_RESULT)
public static XLArray myArray() {
final XLValue[][] arr = { { XLNumber.of(1), XLString.of("Two"), XLNumber.of(3) },
{ XLString.of("One"), XLNumber... | @XLFunction(name = STR, description = STR, category = "Mine", typeConversionMode = TypeConversionMode.SIMPLEST_RESULT) static XLArray function() { final XLValue[][] arr = { { XLNumber.of(1), XLString.of("Two"), XLNumber.of(3) }, { XLString.of("One"), XLNumber.of(2), XLString.of("3") } }; return XLArray.of(arr); } | /**
* Creates an XLArray.
*
* @return the array
*/ | Creates an XLArray | myArray | {
"repo_name": "McLeodMoores/xl4j",
"path": "xll-examples/src/main/java/com/mcleodmoores/xl4j/examples/MyTestFunctions.java",
"license": "gpl-3.0",
"size": 6297
} | [
"com.mcleodmoores.xl4j.v1.api.annotations.TypeConversionMode",
"com.mcleodmoores.xl4j.v1.api.annotations.XLFunction",
"com.mcleodmoores.xl4j.v1.api.values.XLArray",
"com.mcleodmoores.xl4j.v1.api.values.XLNumber",
"com.mcleodmoores.xl4j.v1.api.values.XLString",
"com.mcleodmoores.xl4j.v1.api.values.XLValue"... | import com.mcleodmoores.xl4j.v1.api.annotations.TypeConversionMode; import com.mcleodmoores.xl4j.v1.api.annotations.XLFunction; import com.mcleodmoores.xl4j.v1.api.values.XLArray; import com.mcleodmoores.xl4j.v1.api.values.XLNumber; import com.mcleodmoores.xl4j.v1.api.values.XLString; import com.mcleodmoores.xl4j.v1.ap... | import com.mcleodmoores.xl4j.v1.api.annotations.*; import com.mcleodmoores.xl4j.v1.api.values.*; | [
"com.mcleodmoores.xl4j"
] | com.mcleodmoores.xl4j; | 2,627,327 |
@Override
public boolean equals(final Object object) {
if (object instanceof DirectionAlongMeridian) {
final DirectionAlongMeridian that = (DirectionAlongMeridian) object;
return baseDirection.equals(that.baseDirection) &&
Numerics.equals(meridian, that.meridia... | boolean function(final Object object) { if (object instanceof DirectionAlongMeridian) { final DirectionAlongMeridian that = (DirectionAlongMeridian) object; return baseDirection.equals(that.baseDirection) && Numerics.equals(meridian, that.meridian); } return false; } | /**
* Tests this object for equality with the specified one.
* This method is used mostly for assertions.
*/ | Tests this object for equality with the specified one. This method is used mostly for assertions | equals | {
"repo_name": "Geomatys/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java",
"license": "apache-2.0",
"size": 13069
} | [
"org.apache.sis.internal.util.Numerics"
] | import org.apache.sis.internal.util.Numerics; | import org.apache.sis.internal.util.*; | [
"org.apache.sis"
] | org.apache.sis; | 1,412,504 |
@Override
public void setServiceAccountClientLink(String clientInternalId) {
}
protected StorageId storageId; | void function(String clientInternalId) { } protected StorageId storageId; | /**
* This method should not be overriden
*
* @return
*/ | This method should not be overriden | setServiceAccountClientLink | {
"repo_name": "mhajas/keycloak",
"path": "server-spi/src/main/java/org/keycloak/storage/adapter/AbstractUserAdapterFederatedStorage.java",
"license": "apache-2.0",
"size": 13829
} | [
"org.keycloak.storage.StorageId"
] | import org.keycloak.storage.StorageId; | import org.keycloak.storage.*; | [
"org.keycloak.storage"
] | org.keycloak.storage; | 2,594,248 |
@SuppressWarnings("WeakerAccess")
public static char[] decrypt(String data, char[] password) {
// check the data
if (data == null) {
return null;
}
try {
CipherKey key = convertToCipherKey(data);
SecretKeyFactory factory = SecretKeyFactory.ge... | @SuppressWarnings(STR) static char[] function(String data, char[] password) { if (data == null) { return null; } try { CipherKey key = convertToCipherKey(data); SecretKeyFactory factory = SecretKeyFactory.getInstance(ALGORITHM); KeySpec spec = new PBEKeySpec(password, key.getSalt(), key.getIterations(), DERIVED_KEY_LEN... | /**
* Decrypts the data with password.
*
* @param data the data.
* @param password the password.
* @return the corresponding string.
* @throws RuntimeException if the method fails.
*/ | Decrypts the data with password | decrypt | {
"repo_name": "lorislab/treasure",
"path": "src/main/java/org/lorislab/treasure/Treasure.java",
"license": "apache-2.0",
"size": 14063
} | [
"java.security.spec.KeySpec",
"javax.crypto.Cipher",
"javax.crypto.SecretKey",
"javax.crypto.SecretKeyFactory",
"javax.crypto.spec.IvParameterSpec",
"javax.crypto.spec.PBEKeySpec",
"javax.crypto.spec.SecretKeySpec"
] | import java.security.spec.KeySpec; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec; | import java.security.spec.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 1,005,256 |
public void addTable(final byte[] table, final List<byte[]> families) {
ByteMap<ByteMap<ByteMap<TreeMap<Long, byte[]>>>> map = storage.get(table);
if (map == null) {
map = new ByteMap<ByteMap<ByteMap<TreeMap<Long, byte[]>>>>();
storage.put(table, map);
}
for (final byte[] family : families... | void function(final byte[] table, final List<byte[]> families) { ByteMap<ByteMap<ByteMap<TreeMap<Long, byte[]>>>> map = storage.get(table); if (map == null) { map = new ByteMap<ByteMap<ByteMap<TreeMap<Long, byte[]>>>>(); storage.put(table, map); } for (final byte[] family : families) { if (!map.containsKey(family)) { m... | /**
* Add a table with families to the data store. If the table or family
* exists, it's a no-op. Give real values as we don't check `em.
* @param table The table to add
* @param families A list of one or more famlies to add to the table
*/ | Add a table with families to the data store. If the table or family exists, it's a no-op. Give real values as we don't check `em | addTable | {
"repo_name": "manolama/opentsdb",
"path": "test/storage/MockBase.java",
"license": "lgpl-2.1",
"size": 67471
} | [
"java.util.List",
"java.util.TreeMap",
"org.hbase.async.Bytes"
] | import java.util.List; import java.util.TreeMap; import org.hbase.async.Bytes; | import java.util.*; import org.hbase.async.*; | [
"java.util",
"org.hbase.async"
] | java.util; org.hbase.async; | 385,071 |
public static String generateHTMLTable(List<String> columnNames, List<List<String>> data) {
String html = "<html>\n";
html += style2;
html += "<body>\n";
html += "<table data-toggle=\"table\" data-striped='true'>\n";
// table header
html += "<thead><tr>";
for (String columnName : columnNames) {
htm... | static String function(List<String> columnNames, List<List<String>> data) { String html = STR; html += style2; html += STR; html += STRtable\STR; html += STR; for (String columnName : columnNames) { html += STRleft\STRtrue\STR + columnName + "</th>"; } html += STR; for (List<String> row : data) { html += STR; for (Stri... | /**
* Generates an HTML table based on the given column names and data.
* @param columnNames the column names
* @param data the data as a list of row entry values
* @return an HTML table
*/ | Generates an HTML table based on the given column names and data | generateHTMLTable | {
"repo_name": "AKSW/SemWeb2NL",
"path": "owl2nl/src/test/java/org/aksw/owl2nl/evaluation/HTMLTableGenerator.java",
"license": "gpl-3.0",
"size": 4817
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,642,850 |
public Color getHighlightOuterColor() {
return highlightOuter;
} | Color function() { return highlightOuter; } | /**
* Returns the outer highlight color of the bevel border.
* Will return null if no highlight color was specified
* at instantiation.
* @since 1.3
*/ | Returns the outer highlight color of the bevel border. Will return null if no highlight color was specified at instantiation | getHighlightOuterColor | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/javax/swing/border/BevelBorder.java",
"license": "mit",
"size": 10390
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,972,922 |
@Test public void testGetExistentSet()
{
INamedSet<TestModelRoot> nset;
INamedSet<?> nsetr;
nset = new NamedSetDefaultImpl<TestModelRoot>(TestModelRoot.class, "set1");
nset.add(MODEL_ROOT_INT_PROPERTY);
registry.putSet(nset);
nset = new NamedSetDefaultImpl<TestMo... | @Test void function() { INamedSet<TestModelRoot> nset; INamedSet<?> nsetr; nset = new NamedSetDefaultImpl<TestModelRoot>(TestModelRoot.class, "set1"); nset.add(MODEL_ROOT_INT_PROPERTY); registry.putSet(nset); nset = new NamedSetDefaultImpl<TestModelRoot>(TestModelRoot.class, "set2"); nset.add(MODEL_ROOT_INT_PROPERTY); ... | /**
* Test for {@link SetRegistryDefaultImpl#getSet(String)} with existent set name.
*/ | Test for <code>SetRegistryDefaultImpl#getSet(String)</code> with existent set name | testGetExistentSet | {
"repo_name": "albirar/framework",
"path": "core/src/test/java/cat/albirar/framework/sets/registry/impl/SetRegistryDefaultImplTest.java",
"license": "gpl-3.0",
"size": 19918
} | [
"cat.albirar.framework.sets.impl.models.TestModelRoot",
"cat.albirar.framework.sets.registry.INamedSet",
"cat.albirar.framework.sets.registry.impl.NamedSetDefaultImpl",
"org.junit.Assert",
"org.junit.Test"
] | import cat.albirar.framework.sets.impl.models.TestModelRoot; import cat.albirar.framework.sets.registry.INamedSet; import cat.albirar.framework.sets.registry.impl.NamedSetDefaultImpl; import org.junit.Assert; import org.junit.Test; | import cat.albirar.framework.sets.impl.models.*; import cat.albirar.framework.sets.registry.*; import cat.albirar.framework.sets.registry.impl.*; import org.junit.*; | [
"cat.albirar.framework",
"org.junit"
] | cat.albirar.framework; org.junit; | 1,738,596 |
@Test(expected = IllegalArgumentException.class)
public void testGetPerso_IdentifierTooLarge() throws Exception {
CommandParser.getPerso("15");
} | @Test(expected = IllegalArgumentException.class) void function() throws Exception { CommandParser.getPerso("15"); } | /**
* Negative test case: parse personalization with non-existant perso identifier (too large number
* @throws Exception
*/ | Negative test case: parse personalization with non-existant perso identifier (too large number | testGetPerso_IdentifierTooLarge | {
"repo_name": "PersoSim/de.persosim.simulator",
"path": "de.persosim.simulator.integrationtest/src/de/persosim/simulator/test/CommandParserOsgiTest.java",
"license": "gpl-3.0",
"size": 1292
} | [
"de.persosim.simulator.CommandParser",
"org.junit.Test"
] | import de.persosim.simulator.CommandParser; import org.junit.Test; | import de.persosim.simulator.*; import org.junit.*; | [
"de.persosim.simulator",
"org.junit"
] | de.persosim.simulator; org.junit; | 2,355,623 |
public static void main(String[] args) {
// set the look and feel to the system look and feel
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} cat... | static void function(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (UnsupportedLookAndFeelEx... | /**
* Entry point for the example application.
* @param args command line arguments
*/ | Entry point for the example application | main | {
"repo_name": "satishbabusee/dyn4j",
"path": "examples/org/dyn4j/examples/ExampleGraphics2D.java",
"license": "bsd-3-clause",
"size": 13811
} | [
"javax.swing.UIManager",
"javax.swing.UnsupportedLookAndFeelException"
] | import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,071,628 |
private void hoistNoCompileFiles() {
boolean staleInputs = false;
for (CompilerInput input : inputs) {
Node n = input.getAstRoot(this);
// Inputs can have a null AST on a parse error.
if (n == null) {
continue;
}
JSDocInfo info = n.getJSDocInfo();
if (info != null... | void function() { boolean staleInputs = false; for (CompilerInput input : inputs) { Node n = input.getAstRoot(this); if (n == null) { continue; } JSDocInfo info = n.getJSDocInfo(); if (info != null && info.isNoCompile()) { input.getModule().remove(input); staleInputs = true; } } if (staleInputs) { repartitionInputs(); ... | /**
* Hoists inputs with the @nocompiler annotation out of the inputs.
*/ | Hoists inputs with the @nocompiler annotation out of the inputs | hoistNoCompileFiles | {
"repo_name": "martinrosstmc/closure-compiler",
"path": "src/com/google/javascript/jscomp/Compiler.java",
"license": "apache-2.0",
"size": 78462
} | [
"com.google.javascript.rhino.JSDocInfo",
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,101,403 |
protected PropertySheetPage getActivePropertySheetPage()
{
IWorkbenchPart activePart = workbenchPart.getSite().getPage().getActivePart();
if (activePart instanceof PropertySheet)
{
PropertySheet propertySheet = (PropertySheet)activePart;
IPage currentPage = propertySheet.getCurrentPage();
... | PropertySheetPage function() { IWorkbenchPart activePart = workbenchPart.getSite().getPage().getActivePart(); if (activePart instanceof PropertySheet) { PropertySheet propertySheet = (PropertySheet)activePart; IPage currentPage = propertySheet.getCurrentPage(); if (currentPage != null) { if (currentPage instanceof Prop... | /**
* Returns the property sheet page of the workbench page's active property sheet.
*/ | Returns the property sheet page of the workbench page's active property sheet | getActivePropertySheetPage | {
"repo_name": "peterkir/org.eclipse.oomph",
"path": "plugins/org.eclipse.oomph.ui/src/org/eclipse/oomph/internal/ui/FindAndReplaceTarget.java",
"license": "epl-1.0",
"size": 71440
} | [
"org.eclipse.ui.IWorkbenchPart",
"org.eclipse.ui.part.IPage",
"org.eclipse.ui.views.properties.PropertySheet",
"org.eclipse.ui.views.properties.PropertySheetPage"
] | import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.part.IPage; import org.eclipse.ui.views.properties.PropertySheet; import org.eclipse.ui.views.properties.PropertySheetPage; | import org.eclipse.ui.*; import org.eclipse.ui.part.*; import org.eclipse.ui.views.properties.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 425,744 |
public void delete() {
despawnItem();
shops.remove(this);
VisualShop.getShopSaver().deleteShop(this);
if (VisualShop.getVSConfig().LOG_SHOP_CREATION.value)
VisualShop.info("Shop deleted : " + this);
}
| void function() { despawnItem(); shops.remove(this); VisualShop.getShopSaver().deleteShop(this); if (VisualShop.getVSConfig().LOG_SHOP_CREATION.value) VisualShop.info(STR + this); } | /**
* Delete the shop
*/ | Delete the shop | delete | {
"repo_name": "mathdu07/VisualShop",
"path": "src/fr/mathdu07/visualshop/shop/Shop.java",
"license": "lgpl-3.0",
"size": 8430
} | [
"fr.mathdu07.visualshop.VisualShop"
] | import fr.mathdu07.visualshop.VisualShop; | import fr.mathdu07.visualshop.*; | [
"fr.mathdu07.visualshop"
] | fr.mathdu07.visualshop; | 809,955 |
logger.info("\n###starting...");
try {
Container container = this.getActualContainer();
Server server = new ContainerServer(container);
connection = new SocketConnection(server);
SocketAddress address = new InetSocketAddress(port);
socketAddress =(Inet... | logger.info(STR); try { Container container = this.getActualContainer(); Server server = new ContainerServer(container); connection = new SocketConnection(server); SocketAddress address = new InetSocketAddress(port); socketAddress =(InetSocketAddress) connection.connect(address); this.isRunning = true; logger.info(STR ... | /**
* Starts the simulator at the supplied port exposing the end point.
*/ | Starts the simulator at the supplied port exposing the end point | start | {
"repo_name": "authorjapps/simulator",
"path": "src/main/java/org/jsmart/simulator/base/BaseSimulator.java",
"license": "apache-2.0",
"size": 3170
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.SocketAddress",
"org.simpleframework.http.core.Container",
"org.simpleframework.http.core.ContainerServer",
"org.simpleframework.transport.Server",
"org.simpleframework.transport.connect.SocketConnection"
] | import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketAddress; import org.simpleframework.http.core.Container; import org.simpleframework.http.core.ContainerServer; import org.simpleframework.transport.Server; import org.simpleframework.transport.connect.SocketConnection; | import java.io.*; import java.net.*; import org.simpleframework.http.core.*; import org.simpleframework.transport.*; import org.simpleframework.transport.connect.*; | [
"java.io",
"java.net",
"org.simpleframework.http",
"org.simpleframework.transport"
] | java.io; java.net; org.simpleframework.http; org.simpleframework.transport; | 1,696,787 |
public LayoutedObject getObject(int index) {
return (LayoutedObject) (layoutedObjects.elementAt(index));
} | LayoutedObject function(int index) { return (LayoutedObject) (layoutedObjects.elementAt(index)); } | /**
* Operation getObject returns a object with a given index from the
* layouter.
*
* @param index
* represents the index of this object in the layouter.
* @return The LayoutedObject for the given index.
*/ | Operation getObject returns a object with a given index from the layouter | getObject | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/graph/src/gov/nih/nci/cagrid/graph/uml/classdiagram/ClassdiagramLayouter.java",
"license": "bsd-3-clause",
"size": 20481
} | [
"gov.nih.nci.cagrid.graph.uml.layout.LayoutedObject"
] | import gov.nih.nci.cagrid.graph.uml.layout.LayoutedObject; | import gov.nih.nci.cagrid.graph.uml.layout.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 2,758,650 |
public void writeThermometerChart(JRChart chart) throws IOException
{
writer.startElement(JRXmlConstants.ELEMENT_thermometerChart, getNamespace());
writeChart(chart);
writeValueDataset((JRValueDataset) chart.getDataset());
// write plot
JRThermometerPlot plot = (JRThermometerPlot) chart.getPlot();
wr... | void function(JRChart chart) throws IOException { writer.startElement(JRXmlConstants.ELEMENT_thermometerChart, getNamespace()); writeChart(chart); writeValueDataset((JRValueDataset) chart.getDataset()); JRThermometerPlot plot = (JRThermometerPlot) chart.getPlot(); writer.startElement(JRThermometerPlotFactory.ELEMENT_th... | /**
* Writes the description of a thermometer chart to the output stream.
*
* @param chart the thermometer chart to write
*/ | Writes the description of a thermometer chart to the output stream | writeThermometerChart | {
"repo_name": "delafer/j7project",
"path": "jasper352/csb-jasperreport-dep/src/net/sf/jasperreports/engine/xml/JRXmlWriter.java",
"license": "gpl-2.0",
"size": 105164
} | [
"java.io.IOException",
"net.sf.jasperreports.charts.JRThermometerPlot",
"net.sf.jasperreports.charts.JRValueDataset",
"net.sf.jasperreports.charts.xml.JRThermometerPlotFactory",
"net.sf.jasperreports.engine.JRChart"
] | import java.io.IOException; import net.sf.jasperreports.charts.JRThermometerPlot; import net.sf.jasperreports.charts.JRValueDataset; import net.sf.jasperreports.charts.xml.JRThermometerPlotFactory; import net.sf.jasperreports.engine.JRChart; | import java.io.*; import net.sf.jasperreports.charts.*; import net.sf.jasperreports.charts.xml.*; import net.sf.jasperreports.engine.*; | [
"java.io",
"net.sf.jasperreports"
] | java.io; net.sf.jasperreports; | 2,005,670 |
public final File getOutputFile()
{
return outputFile;
}
private static final String COPYRIGHT_PREAMBLE = "Copyright (c)";
private static final String DEFAULT_VERSION_INFO_FILENAME = "maven-version-info.rc";
@Parameter(
defaultValue = "false",
re... | final File function() { return outputFile; } private static final String COPYRIGHT_PREAMBLE = STR; private static final String DEFAULT_VERSION_INFO_FILENAME = STR; @Parameter( defaultValue = "false", readonly = false ) private boolean skip = false; @Parameter( readonly = false, required = false ) private String company... | /**
* Get the configured output file
* @return the configured value, if not configured the default is returned
*/ | Get the configured output file | getOutputFile | {
"repo_name": "andi12/msbuild-maven-plugin",
"path": "msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/configuration/VersionInfoConfiguration.java",
"license": "apache-2.0",
"size": 4233
} | [
"java.io.File",
"org.apache.maven.plugins.annotations.Parameter"
] | import java.io.File; import org.apache.maven.plugins.annotations.Parameter; | import java.io.*; import org.apache.maven.plugins.annotations.*; | [
"java.io",
"org.apache.maven"
] | java.io; org.apache.maven; | 1,912,811 |
// initialize a new generation with the same parameters
ElitisticListPopulation nextGeneration =
new ElitisticListPopulation(getPopulationLimit(), getElitismRate());
final List<Chromosome> oldChromosomes = getChromosomeList();
Collections.sort(oldChromosomes);
// index ... | ElitisticListPopulation nextGeneration = new ElitisticListPopulation(getPopulationLimit(), getElitismRate()); final List<Chromosome> oldChromosomes = getChromosomeList(); Collections.sort(oldChromosomes); int boundIndex = (int) FastMath.ceil((1.0 - getElitismRate()) * oldChromosomes.size()); for (int i = boundIndex; i ... | /**
* Start the population for the next generation. The <code>{@link #elitismRate}</code>
* percents of the best chromosomes are directly copied to the next generation.
*
* @return the beginnings of the next generation.
*/ | Start the population for the next generation. The <code><code>#elitismRate</code></code> percents of the best chromosomes are directly copied to the next generation | nextGeneration | {
"repo_name": "charles-cooper/idylfin",
"path": "src/org/apache/commons/math3/genetics/ElitisticListPopulation.java",
"license": "apache-2.0",
"size": 5146
} | [
"java.util.Collections",
"java.util.List",
"org.apache.commons.math3.util.FastMath"
] | import java.util.Collections; import java.util.List; import org.apache.commons.math3.util.FastMath; | import java.util.*; import org.apache.commons.math3.util.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 541,289 |
JobCompletableFuture<Map<KeyIn, List<ValueIn>>> submit(); | JobCompletableFuture<Map<KeyIn, List<ValueIn>>> submit(); | /**
* Submits the task to Hazelcast and executes the defined mapper and reducer on all cluster nodes.
*
* @return JobCompletableFuture to wait for mapped and possibly reduced result
*/ | Submits the task to Hazelcast and executes the defined mapper and reducer on all cluster nodes | submit | {
"repo_name": "tombujok/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/mapreduce/MappingJob.java",
"license": "apache-2.0",
"size": 5767
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 510,931 |
public void setForeground(Drawable drawable) {
if (foreground == drawable) {
return;
}
if (foreground != null) {
foreground.setCallback(null);
unscheduleDrawable(foreground);
}
foreground = drawable;
if (drawable != null) {
... | void function(Drawable drawable) { if (foreground == drawable) { return; } if (foreground != null) { foreground.setCallback(null); unscheduleDrawable(foreground); } foreground = drawable; if (drawable != null) { drawable.setCallback(this); if (drawable.isStateful()) { drawable.setState(getDrawableState()); } } requestL... | /**
* Supply a Drawable that is to be rendered on top of all of the child
* views in the frame layout.
*
* @param drawable The Drawable to be drawn on top of the children.
*/ | Supply a Drawable that is to be rendered on top of all of the child views in the frame layout | setForeground | {
"repo_name": "pchrysa/Memento-Calendar",
"path": "android_mobile/src/main/java/com/alexstyl/specialdates/ui/widget/ForegroundImageView.java",
"license": "mit",
"size": 3280
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 705,982 |
public Object getMergePolicy(String className) {
if (className == null) {
throw new InvalidConfigurationException("Class name is mandatory!");
}
try {
return policyProvider.getMergePolicy(className);
} catch (InvalidConfigurationException e) {
retu... | Object function(String className) { if (className == null) { throw new InvalidConfigurationException(STR); } try { return policyProvider.getMergePolicy(className); } catch (InvalidConfigurationException e) { return getOrPutIfAbsent(mergePolicyMap, className, policyConstructorFunction); } } | /**
* Returns an instance of a merge policy by its classname.
* <p>
* First tries to resolve the classname as {@link SplitBrainMergePolicy},
* then as {@link ReplicatedMapMergePolicy}.
* <p>
* If no merge policy matches an exception is thrown.
*
* @param className the classname o... | Returns an instance of a merge policy by its classname. First tries to resolve the classname as <code>SplitBrainMergePolicy</code>, then as <code>ReplicatedMapMergePolicy</code>. If no merge policy matches an exception is thrown | getMergePolicy | {
"repo_name": "tufangorel/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/replicatedmap/merge/MergePolicyProvider.java",
"license": "apache-2.0",
"size": 3566
} | [
"com.hazelcast.config.InvalidConfigurationException",
"com.hazelcast.util.ConcurrencyUtil"
] | import com.hazelcast.config.InvalidConfigurationException; import com.hazelcast.util.ConcurrencyUtil; | import com.hazelcast.config.*; import com.hazelcast.util.*; | [
"com.hazelcast.config",
"com.hazelcast.util"
] | com.hazelcast.config; com.hazelcast.util; | 2,510,166 |
public List<YangNode> getNotificationNodes() {
return notificationNodes;
} | List<YangNode> function() { return notificationNodes; } | /**
* Returns notifications node list.
*
* @return notification nodes
*/ | Returns notifications node list | getNotificationNodes | {
"repo_name": "paradisecr/ONOS-OXP",
"path": "utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java",
"license": "apache-2.0",
"size": 7729
} | [
"java.util.List",
"org.onosproject.yangutils.datamodel.YangNode"
] | import java.util.List; import org.onosproject.yangutils.datamodel.YangNode; | import java.util.*; import org.onosproject.yangutils.datamodel.*; | [
"java.util",
"org.onosproject.yangutils"
] | java.util; org.onosproject.yangutils; | 1,418,867 |
private SSLContext makeDefaultContext() throws IllegalStateException {
try {
final SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(null, null, null); // use defaults
return ctx;
} catch (final NoSuchAlgorithmException e) {
throw new RuntimeException("This JVM doesn't support TLS, this should... | SSLContext function() throws IllegalStateException { try { final SSLContext ctx = SSLContext.getInstance("TLS"); ctx.init(null, null, null); return ctx; } catch (final NoSuchAlgorithmException e) { throw new RuntimeException(STR, e); } catch (final KeyManagementException e) { throw new IllegalStateException(STR, e); } ... | /**
* Needed to create SSLOptions from JVM Parameters. this is needed since the
* current Datastax Driver does not
* have a constructor that allows the overriding of only the Ciphers.
*
* @return default ssl context
* @throws IllegalStateException
* the illegal state exception
*/ | Needed to create SSLOptions from JVM Parameters. this is needed since the current Datastax Driver does not have a constructor that allows the overriding of only the Ciphers | makeDefaultContext | {
"repo_name": "dentinger/cassandra-session-factory",
"path": "src/main/java/com/dentinger/ds/util/CassandraSessionFactory.java",
"license": "apache-2.0",
"size": 4454
} | [
"java.security.KeyManagementException",
"java.security.NoSuchAlgorithmException",
"javax.net.ssl.SSLContext"
] | import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import javax.net.ssl.SSLContext; | import java.security.*; import javax.net.ssl.*; | [
"java.security",
"javax.net"
] | java.security; javax.net; | 60,161 |
protected void handleChangedResources() {
if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
if (isDirty()) {
changedResources.addAll(editingDomain.getResourceSet().getResources());
}
editingDomain.getCommandStack().flush();
updateProblemIndication = false;
for (Resourc... | void function() { if (!changedResources.isEmpty() && (!isDirty() handleDirtyConflict())) { if (isDirty()) { changedResources.addAll(editingDomain.getResourceSet().getResources()); } editingDomain.getCommandStack().flush(); updateProblemIndication = false; for (Resource resource : changedResources) { if (resource.isLoad... | /**
* Handles what to do with changed resources on activation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Handles what to do with changed resources on activation. | handleChangedResources | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/workplan/presentation/WorkplanEditor.java",
"license": "epl-1.0",
"size": 57449
} | [
"java.io.IOException",
"java.util.Collections",
"org.eclipse.emf.ecore.resource.Resource",
"org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain",
"org.eclipse.jface.viewers.StructuredSelection"
] | import java.io.IOException; import java.util.Collections; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.jface.viewers.StructuredSelection; | import java.io.*; import java.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*; | [
"java.io",
"java.util",
"org.eclipse.emf",
"org.eclipse.jface"
] | java.io; java.util; org.eclipse.emf; org.eclipse.jface; | 2,577,192 |
@Override
public boolean remove(Object key, final OIdentifiable value) {
checkForRebuild();
key = getCollatingValue(key);
final ODatabase database = getDatabase();
final boolean txIsActive = database.getTransaction().isActive();
if (txIsActive)
keyLockManager.acquireSharedLock... | boolean function(Object key, final OIdentifiable value) { checkForRebuild(); key = getCollatingValue(key); final ODatabase database = getDatabase(); final boolean txIsActive = database.getTransaction().isActive(); if (txIsActive) keyLockManager.acquireSharedLock(key); try { modificationLock.requestModificationLock(); t... | /**
* Splits passed in key on several words and remove records with keys equals to any item of split result and values equals to
* passed in value.
*
* @param key
* Key to remove.
* @param value
* Value to remove.
* @return <code>true</code> if at least one record is r... | Splits passed in key on several words and remove records with keys equals to any item of split result and values equals to passed in value | remove | {
"repo_name": "jdillon/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/index/OIndexFullText.java",
"license": "apache-2.0",
"size": 13721
} | [
"com.orientechnologies.orient.core.db.ODatabase",
"com.orientechnologies.orient.core.db.record.OIdentifiable",
"java.util.Set"
] | import com.orientechnologies.orient.core.db.ODatabase; import com.orientechnologies.orient.core.db.record.OIdentifiable; import java.util.Set; | import com.orientechnologies.orient.core.db.*; import com.orientechnologies.orient.core.db.record.*; import java.util.*; | [
"com.orientechnologies.orient",
"java.util"
] | com.orientechnologies.orient; java.util; | 786,723 |
public SSLContext getServiceSSLContext(String serviceName) throws IOException, SSLContextException {
return SSLContextUtil.getSSLContext(
getServiceKeyStorePath(serviceName),
getKeystorePass(serviceName),
getKeystoreType(serviceName),
getServic... | SSLContext function(String serviceName) throws IOException, SSLContextException { return SSLContextUtil.getSSLContext( getServiceKeyStorePath(serviceName), getKeystorePass(serviceName), getKeystoreType(serviceName), getServiceTrustStorePath(serviceName), getTruststorePass(serviceName), getTruststoreType(serviceName)); ... | /**
* This helper returns an SSL context for the named service. The keystores must be configured with
* configuration properties in the format:
* ezbake.ssl.keystore.file.serviceName
*
*
* @param serviceName suffix on the keystore/truststore property keys
* @return an SSL context ... | This helper returns an SSL context for the named service. The keystores must be configured with configuration properties in the format: ezbake.ssl.keystore.file.serviceName | getServiceSSLContext | {
"repo_name": "ezbake/ezbake-common-java",
"path": "ezbakehelpers/ezconfigurationhelpers/src/main/java/ezbakehelpers/ezconfigurationhelpers/ssl/SslConfigurationHelper.java",
"license": "apache-2.0",
"size": 12020
} | [
"java.io.IOException",
"javax.net.ssl.SSLContext"
] | import java.io.IOException; import javax.net.ssl.SSLContext; | import java.io.*; import javax.net.ssl.*; | [
"java.io",
"javax.net"
] | java.io; javax.net; | 1,366,524 |
@Test public void getSize() throws Exception {
int size = dictionaryChunksWrapper.getSize();
Assert.assertEquals("", 4, size);
} | @Test void function() throws Exception { int size = dictionaryChunksWrapper.getSize(); Assert.assertEquals("", 4, size); } | /**
* The method validate the size
*
* @throws Exception
*/ | The method validate the size | getSize | {
"repo_name": "Zhangshunyu/incubator-carbondata",
"path": "core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryChunksWrapperTest.java",
"license": "apache-2.0",
"size": 3081
} | [
"org.junit.Assert",
"org.junit.Test"
] | import org.junit.Assert; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 142,388 |
public static String joinStrings(List<String> list, String delim)
{
if (list == null)
return null;
StringBuilder builder = new StringBuilder(list.get(0));
for (String s : list.subList(1, list.size())) {
builder.append(delim).append(s);
}
return bu... | static String function(List<String> list, String delim) { if (list == null) return null; StringBuilder builder = new StringBuilder(list.get(0)); for (String s : list.subList(1, list.size())) { builder.append(delim).append(s); } return builder.toString(); } | /**
* This method takes a List<String> and a delimiter and joins the strings
* into a single string, where the original strings are separated using
* the given delimiter.
*
*/ | This method takes a List and a delimiter and joins the strings into a single string, where the original strings are separated using the given delimiter | joinStrings | {
"repo_name": "ervinyang/tutorial_zookeeper",
"path": "zookeeper-trunk/src/java/main/org/apache/zookeeper/common/StringUtils.java",
"license": "mit",
"size": 2240
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 672,727 |
@Override
public ProductData.UTC getSceneRasterStartTime() {
return null;
} | ProductData.UTC function() { return null; } | /**
* Gets the (sensing) start time associated with the first raster data line.
*
* @return the sensing start time, can be null e.g. for non-swath products
*/ | Gets the (sensing) start time associated with the first raster data line | getSceneRasterStartTime | {
"repo_name": "arraydev/snap-engine",
"path": "snap-envisat-reader/src/main/java/org/esa/snap/dataio/envisat/DorisOrbitProductFile.java",
"license": "gpl-3.0",
"size": 7337
} | [
"org.esa.snap.framework.datamodel.ProductData"
] | import org.esa.snap.framework.datamodel.ProductData; | import org.esa.snap.framework.datamodel.*; | [
"org.esa.snap"
] | org.esa.snap; | 2,530,473 |
public boolean bulkUnion(Collection<T> items) {
if (items.isEmpty()) return false;
Iterator<T> it = items.iterator();
T head = it.next();
// bulkUnion(x) is equivalent to makeSet(x)
if (!it.hasNext()) {
if (get(head) != null) return false;
makeSet(head);
return true;
}
bo... | boolean function(Collection<T> items) { if (items.isEmpty()) return false; Iterator<T> it = items.iterator(); T head = it.next(); if (!it.hasNext()) { if (get(head) != null) return false; makeSet(head); return true; } boolean result = false; while(it.hasNext()) { boolean changed = union(head, it.next()); result = resul... | /**
* Merges all the item sets corresponding to the given items. Returns true if any item
* sets were merged or created, false otherwise (item sets are already identical).
*/ | Merges all the item sets corresponding to the given items. Returns true if any item sets were merged or created, false otherwise (item sets are already identical) | bulkUnion | {
"repo_name": "cloudera/Impala",
"path": "fe/src/main/java/org/apache/impala/util/DisjointSet.java",
"license": "apache-2.0",
"size": 6223
} | [
"java.util.Collection",
"java.util.Iterator"
] | import java.util.Collection; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,253,760 |
public static ProfilesConfiguration getProfilesConfiguration()
{ return profilesConfiguration;
}
/////////////////////////////////////////////////////////////////
// AI /////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
private static Ai... | static ProfilesConfiguration function() { return profilesConfiguration; } private static AisConfiguration aisConfiguration; | /**
* Returns the profiles-related settings.
*
* @return
* Current profiles-related settings.
*/ | Returns the profiles-related settings | getProfilesConfiguration | {
"repo_name": "vlabatut/totalboumboum",
"path": "src/org/totalboumboum/configuration/Configuration.java",
"license": "gpl-2.0",
"size": 12771
} | [
"org.totalboumboum.configuration.ai.AisConfiguration",
"org.totalboumboum.configuration.profiles.ProfilesConfiguration"
] | import org.totalboumboum.configuration.ai.AisConfiguration; import org.totalboumboum.configuration.profiles.ProfilesConfiguration; | import org.totalboumboum.configuration.ai.*; import org.totalboumboum.configuration.profiles.*; | [
"org.totalboumboum.configuration"
] | org.totalboumboum.configuration; | 748,784 |
public Release updateReleaseResource(
final ReleaseUpdateMetadata releaseUpdateMetadata,
final String project,
final int releaseId) {
final UUID locationId = UUID.fromString("a166fde7-27ad-408e-ba75-703c2cc9d500"); //$NON-NLS-1$
final ApiResourceVersion apiVersion = new A... | Release function( final ReleaseUpdateMetadata releaseUpdateMetadata, final String project, final int releaseId) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, p... | /**
* [Preview API 3.1-preview.4]
*
* @param releaseUpdateMetadata
*
* @param project
* Project ID or project name
* @param releaseId
*
* @return Release
*/ | [Preview API 3.1-preview.4] | updateReleaseResource | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-releasemanagement-client/src/main/generated/com/microsoft/alm/visualstudio/services/releasemanagement/webapi/ReleaseHttpClientBase.java",
"license": "mit",
"size": 186198
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.visualstudio.services.releasemanagement.webapi.Release",
"com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseUpdateMetadata",
"com.microsoft.a... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.Release; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseUpdateMetadata; impor... | import com.microsoft.alm.client.*; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 321,881 |
public static SitesEntry verifySite(WebmasterToolsService myService,
String siteUrl) throws IOException, ServiceException {
VerificationMethod method = new VerificationMethod();
method.setMethodType(VerificationMethod.MethodType.HTMLPAGE);
// Or method.setMethodType(VerificationMethod.MethodType.MET... | static SitesEntry function(WebmasterToolsService myService, String siteUrl) throws IOException, ServiceException { VerificationMethod method = new VerificationMethod(); method.setMethodType(VerificationMethod.MethodType.HTMLPAGE); method.setInUse(true); SitesEntry entry = new SitesEntry(); entry.addVerificationMethod(m... | /**
* Submit site for verification. This example verifies through an
* HTML page. A webmaster may also verify through
* VerificationMethod.MethodType.METATAG.
*
* @param myService authenticated WebmasterTools Service object.
* @param siteUrl URL of site to be verified.
* @return a SitesEntry for th... | Submit site for verification. This example verifies through an HTML page. A webmaster may also verify through VerificationMethod.MethodType.METATAG | verifySite | {
"repo_name": "elhoim/gdata-client-java",
"path": "java/sample/webmastertools/WebmasterToolsClient.java",
"license": "apache-2.0",
"size": 19368
} | [
"com.google.gdata.client.webmastertools.WebmasterToolsService",
"com.google.gdata.data.webmastertools.SitesEntry",
"com.google.gdata.data.webmastertools.VerificationMethod",
"com.google.gdata.util.ServiceException",
"java.io.IOException",
"java.net.URLEncoder"
] | import com.google.gdata.client.webmastertools.WebmasterToolsService; import com.google.gdata.data.webmastertools.SitesEntry; import com.google.gdata.data.webmastertools.VerificationMethod; import com.google.gdata.util.ServiceException; import java.io.IOException; import java.net.URLEncoder; | import com.google.gdata.client.webmastertools.*; import com.google.gdata.data.webmastertools.*; import com.google.gdata.util.*; import java.io.*; import java.net.*; | [
"com.google.gdata",
"java.io",
"java.net"
] | com.google.gdata; java.io; java.net; | 503,244 |
CommitLogSegment recycle()
{
try
{
sync();
}
catch (FSWriteError e)
{
logger.error("I/O error flushing {} {}", this, e.getMessage());
throw e;
}
close();
return new CommitLogSegment(getPath());
} | CommitLogSegment recycle() { try { sync(); } catch (FSWriteError e) { logger.error(STR, this, e.getMessage()); throw e; } close(); return new CommitLogSegment(getPath()); } | /**
* Recycle processes an unneeded segment file for reuse.
*
* @return a new CommitLogSegment representing the newly reusable segment.
*/ | Recycle processes an unneeded segment file for reuse | recycle | {
"repo_name": "matthewtt/cassandra_read",
"path": "src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java",
"license": "apache-2.0",
"size": 21910
} | [
"org.apache.cassandra.io.FSWriteError"
] | import org.apache.cassandra.io.FSWriteError; | import org.apache.cassandra.io.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 2,188,594 |
public boolean getNextReview(Contentlet content, User user, boolean respectFrontendRoles); | boolean function(Contentlet content, User user, boolean respectFrontendRoles); | /**
* Finds the next date that a contentlet must be reviewed
* @param content
* @param user
* @param respectFrontendRoles
* @return
*/ | Finds the next date that a contentlet must be reviewed | getNextReview | {
"repo_name": "dotCMS/core-2.x",
"path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPreHook.java",
"license": "gpl-3.0",
"size": 46499
} | [
"com.dotmarketing.portlets.contentlet.model.Contentlet",
"com.liferay.portal.model.User"
] | import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.liferay.portal.model.User; | import com.dotmarketing.portlets.contentlet.model.*; import com.liferay.portal.model.*; | [
"com.dotmarketing.portlets",
"com.liferay.portal"
] | com.dotmarketing.portlets; com.liferay.portal; | 956,861 |
public void setImageType(ImageType imageType) {
if (imageType != null) {
store.put(Names.imageType, imageType);
} else {
store.remove(Names.imageType);
}
}
| void function(ImageType imageType) { if (imageType != null) { store.put(Names.imageType, imageType); } else { store.remove(Names.imageType); } } | /**
* set the image type
* @param imageType whether it is a static or dynamic image
*/ | set the image type | setImageType | {
"repo_name": "Luxoft/SDLP2",
"path": "SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/Image.java",
"license": "lgpl-2.1",
"size": 3190
} | [
"com.smartdevicelink.proxy.constants.Names",
"com.smartdevicelink.proxy.rpc.enums.ImageType"
] | import com.smartdevicelink.proxy.constants.Names; import com.smartdevicelink.proxy.rpc.enums.ImageType; | import com.smartdevicelink.proxy.constants.*; import com.smartdevicelink.proxy.rpc.enums.*; | [
"com.smartdevicelink.proxy"
] | com.smartdevicelink.proxy; | 680,166 |
public static void cleanUpTokenReferral(Configuration conf) {
conf.unset(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY);
} | static void function(Configuration conf) { conf.unset(MRJobConfig.MAPREDUCE_JOB_CREDENTIALS_BINARY); } | /**
* Remove jobtoken referrals which don't make sense in the context
* of the task execution.
*
* @param conf
*/ | Remove jobtoken referrals which don't make sense in the context of the task execution | cleanUpTokenReferral | {
"repo_name": "simbadzina/hadoop-fcfs",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/security/TokenCache.java",
"license": "apache-2.0",
"size": 8398
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.mapreduce.MRJobConfig"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.MRJobConfig; | import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,634,947 |
public void insertContextMenu(List<CmsContextMenuEntryBean> menuBeans, CmsUUID structureId) {
List<I_CmsContextMenuEntry> menuEntries = transformEntries(menuBeans, structureId);
m_contextButton.showMenu(menuEntries);
} | void function(List<CmsContextMenuEntryBean> menuBeans, CmsUUID structureId) { List<I_CmsContextMenuEntry> menuEntries = transformEntries(menuBeans, structureId); m_contextButton.showMenu(menuEntries); } | /**
* Inserts the context menu.<p>
*
* @param menuBeans the menu beans from the server
* @param structureId the structure id of the resource at which the workplace should be opened
*/ | Inserts the context menu | insertContextMenu | {
"repo_name": "it-tavis/opencms-core",
"path": "src-gwt/org/opencms/ade/editprovider/client/CmsDirectEditToolbarHandler.java",
"license": "lgpl-2.1",
"size": 7050
} | [
"java.util.List",
"org.opencms.gwt.shared.CmsContextMenuEntryBean",
"org.opencms.util.CmsUUID"
] | import java.util.List; import org.opencms.gwt.shared.CmsContextMenuEntryBean; import org.opencms.util.CmsUUID; | import java.util.*; import org.opencms.gwt.shared.*; import org.opencms.util.*; | [
"java.util",
"org.opencms.gwt",
"org.opencms.util"
] | java.util; org.opencms.gwt; org.opencms.util; | 709,971 |
private void processLangRefsets(RefexChronicleBI<?> refexChronicle)
throws IOException, ContradictionException {
if (refexChronicle != null) {
if (!excludedRefsetIds.contains(refexChronicle.getNid())) {
Collection<RefexVersionBI<?>> versions = new HashSet<>();
if (releaseType.equals(Rele... | void function(RefexChronicleBI<?> refexChronicle) throws IOException, ContradictionException { if (refexChronicle != null) { if (!excludedRefsetIds.contains(refexChronicle.getNid())) { Collection<RefexVersionBI<?>> versions = new HashSet<>(); if (releaseType.equals(ReleaseType.FULL)) { for (Object o : refexChronicle.ge... | /**
* Processes a language refex member to determine if the language is English
* or another language. Only the versions which have a stamp nid in the
* specified collection of stamp nids will be written.
*
* @param refexChronicle refex member to process
* @throws IOException signals that an I/O excep... | Processes a language refex member to determine if the language is English or another language. Only the versions which have a stamp nid in the specified collection of stamp nids will be written | processLangRefsets | {
"repo_name": "vaskaloidis/va-isaac-gui",
"path": "import-export/src/main/java/gov/va/isaac/ie/exporter/Rf2Export.java",
"license": "apache-2.0",
"size": 47130
} | [
"gov.va.isaac.ie.exporter.Rf2File",
"java.io.IOException",
"java.util.Collection",
"java.util.HashSet",
"java.util.Optional",
"org.ihtsdo.otf.tcc.api.chronicle.ComponentVersionBI",
"org.ihtsdo.otf.tcc.api.contradiction.ContradictionException",
"org.ihtsdo.otf.tcc.api.metadata.binding.SnomedMetadataRf2... | import gov.va.isaac.ie.exporter.Rf2File; import java.io.IOException; import java.util.Collection; import java.util.HashSet; import java.util.Optional; import org.ihtsdo.otf.tcc.api.chronicle.ComponentVersionBI; import org.ihtsdo.otf.tcc.api.contradiction.ContradictionException; import org.ihtsdo.otf.tcc.api.metadata.bi... | import gov.va.isaac.ie.exporter.*; import java.io.*; import java.util.*; import org.ihtsdo.otf.tcc.api.chronicle.*; import org.ihtsdo.otf.tcc.api.contradiction.*; import org.ihtsdo.otf.tcc.api.metadata.binding.*; import org.ihtsdo.otf.tcc.api.refex.*; | [
"gov.va.isaac",
"java.io",
"java.util",
"org.ihtsdo.otf"
] | gov.va.isaac; java.io; java.util; org.ihtsdo.otf; | 706,972 |
public Optional<SoyType> computeLowestCommonTypeArithmetic(SoyType t0, SoyType t1) {
// If either of the types is an error type, return the error type
if (t0 == ErrorType.getInstance() || t1 == ErrorType.getInstance()) {
return Optional.<SoyType>of(ErrorType.getInstance());
}
// If either of the... | Optional<SoyType> function(SoyType t0, SoyType t1) { if (t0 == ErrorType.getInstance() t1 == ErrorType.getInstance()) { return Optional.<SoyType>of(ErrorType.getInstance()); } if (!isNumericOrUnknown(t0) !isNumericOrUnknown(t1)) { return Optional.absent(); } if (t0.isAssignableFrom(t1)) { return Optional.of(t0); } else... | /**
* Compute the most specific type that is assignable from both t0 and t1, taking into account
* arithmetic promotions - that is, converting int to float if needed.
*
* @param t0 A type.
* @param t1 Another type.
* @return A type that is assignable from both t0 and t1 or absent if the types are not ... | Compute the most specific type that is assignable from both t0 and t1, taking into account arithmetic promotions - that is, converting int to float if needed | computeLowestCommonTypeArithmetic | {
"repo_name": "rpatil26/closure-templates",
"path": "java/src/com/google/template/soy/types/SoyTypeOps.java",
"license": "apache-2.0",
"size": 3923
} | [
"com.google.common.base.Optional",
"com.google.template.soy.types.primitive.ErrorType",
"com.google.template.soy.types.primitive.FloatType"
] | import com.google.common.base.Optional; import com.google.template.soy.types.primitive.ErrorType; import com.google.template.soy.types.primitive.FloatType; | import com.google.common.base.*; import com.google.template.soy.types.primitive.*; | [
"com.google.common",
"com.google.template"
] | com.google.common; com.google.template; | 1,263,093 |
public List<Annotation> getAnnotations() {
return annotations == null ? new ArrayList<Annotation>() : annotations;
} | List<Annotation> function() { return annotations == null ? new ArrayList<Annotation>() : annotations; } | /**
* Returns the list of annotations modifying this document's content.
*
* @return a list of annotations.
*/ | Returns the list of annotations modifying this document's content | getAnnotations | {
"repo_name": "nelsonsilva/wave-protocol",
"path": "src/com/google/wave/api/BlipData.java",
"license": "apache-2.0",
"size": 12306
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 29,873 |
public void autobribe(final Marker marker, final String message, final Object p0, final Object p1, final Object p2,
final Object p3, final Object p4, final Object p5) {
logger.logIfEnabled(FQCN, AUTOBRIBE, marker, message, p0, p1, p2, p3, p4, p5);
} | void function(final Marker marker, final String message, final Object p0, final Object p1, final Object p2, final Object p3, final Object p4, final Object p5) { logger.logIfEnabled(FQCN, AUTOBRIBE, marker, message, p0, p1, p2, p3, p4, p5); } | /**
* Logs a message with parameters at the {@code AUTOBRIBE} level.
*
* @param marker the marker data specific to this log statement
* @param message the message to log; the format depends on the message factory.
* @param p0 parameter to the message.
* @param p1 parameter to the message.
... | Logs a message with parameters at the AUTOBRIBE level | autobribe | {
"repo_name": "Betalord/BHBot",
"path": "src/main/java/BHBotLogger.java",
"license": "gpl-3.0",
"size": 177002
} | [
"org.apache.logging.log4j.Marker"
] | import org.apache.logging.log4j.Marker; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 1,153,404 |
@Generated
@CVariable()
@MappedReturn(ObjCStringMapper.class)
public static native String NSCalendarIdentifierIslamicUmmAlQura(); | @CVariable() @MappedReturn(ObjCStringMapper.class) static native String function(); | /**
* The Islamic Umm al-Qura calendar used in Saudi Arabia. This is based on astronomical calculation, instead of tabular behavior.
*/ | The Islamic Umm al-Qura calendar used in Saudi Arabia. This is based on astronomical calculation, instead of tabular behavior | NSCalendarIdentifierIslamicUmmAlQura | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/c/Foundation.java",
"license": "apache-2.0",
"size": 156135
} | [
"org.moe.natj.c.ann.CVariable",
"org.moe.natj.general.ann.MappedReturn",
"org.moe.natj.objc.map.ObjCStringMapper"
] | import org.moe.natj.c.ann.CVariable; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.map.ObjCStringMapper; | import org.moe.natj.c.ann.*; import org.moe.natj.general.ann.*; import org.moe.natj.objc.map.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,657,934 |
private JPanel buildToolBar()
{
JPanel p = new JPanel();
p.add(filterButton);
p.add(Box.createHorizontalStrut(5));
p.add(cancelButton);
return UIUtilities.buildComponentPanelRight(p);
}
| JPanel function() { JPanel p = new JPanel(); p.add(filterButton); p.add(Box.createHorizontalStrut(5)); p.add(cancelButton); return UIUtilities.buildComponentPanelRight(p); } | /**
* Builds and lays out the tool bar.
*
* @return See above.
*/ | Builds and lays out the tool bar | buildToolBar | {
"repo_name": "rleigh-dundee/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/util/FilteringDialog.java",
"license": "gpl-2.0",
"size": 21446
} | [
"javax.swing.Box",
"javax.swing.JPanel",
"org.openmicroscopy.shoola.util.ui.UIUtilities"
] | import javax.swing.Box; import javax.swing.JPanel; import org.openmicroscopy.shoola.util.ui.UIUtilities; | import javax.swing.*; import org.openmicroscopy.shoola.util.ui.*; | [
"javax.swing",
"org.openmicroscopy.shoola"
] | javax.swing; org.openmicroscopy.shoola; | 2,158,050 |
public NestedSet<Pair<String, String>> getCoverageEnvironment() {
return coverageEnvironment;
} | NestedSet<Pair<String, String>> function() { return coverageEnvironment; } | /**
* Returns the environment variables that need to be added to tests that collect code coverage.
*/ | Returns the environment variables that need to be added to tests that collect code coverage | getCoverageEnvironment | {
"repo_name": "Asana/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java",
"license": "apache-2.0",
"size": 10719
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSet",
"com.google.devtools.build.lib.util.Pair"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.util.Pair; | import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.util.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,436,871 |
public X509Certificate extractCertificate(String certData) throws SecurityConfigException {
byte[] bytes = Base64.decode(certData);
X509Certificate cert;
try {
CertificateFactory factory = CertificateFactory.getInstance("X.509");
cert = (X509Certificate) factory
... | X509Certificate function(String certData) throws SecurityConfigException { byte[] bytes = Base64.decode(certData); X509Certificate cert; try { CertificateFactory factory = CertificateFactory.getInstance("X.509"); cert = (X509Certificate) factory .generateCertificate(new ByteArrayInputStream(bytes)); } catch (Certificat... | /**
* Extract the encoded certificate into {@link X509Certificate}.
*
* @param certData encoded certificate.
* @return {@link X509Certificate} object.
* @throws SecurityConfigException if extracting the certificate fails.
*/ | Extract the encoded certificate into <code>X509Certificate</code> | extractCertificate | {
"repo_name": "wso2/carbon-identity-framework",
"path": "components/security-mgt/org.wso2.carbon.security.mgt/src/main/java/org/wso2/carbon/security/keystore/KeyStoreAdmin.java",
"license": "apache-2.0",
"size": 38482
} | [
"java.io.ByteArrayInputStream",
"java.security.cert.CertificateException",
"java.security.cert.CertificateFactory",
"java.security.cert.X509Certificate",
"org.apache.axiom.om.util.Base64",
"org.wso2.carbon.security.SecurityConfigException"
] | import java.io.ByteArrayInputStream; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import org.apache.axiom.om.util.Base64; import org.wso2.carbon.security.SecurityConfigException; | import java.io.*; import java.security.cert.*; import org.apache.axiom.om.util.*; import org.wso2.carbon.security.*; | [
"java.io",
"java.security",
"org.apache.axiom",
"org.wso2.carbon"
] | java.io; java.security; org.apache.axiom; org.wso2.carbon; | 602,491 |
public static long getModifiedInSecs(long timestamp) {
// 5 second resolution
long timeInSec = TimeUnit.MILLISECONDS.toSeconds(timestamp);
return timeInSec - timeInSec % MODIFIED_IN_SECS_RESOLUTION;
}
public enum SplitDocType {
NONE(-1),
DEFAUL... | static long function(long timestamp) { long timeInSec = TimeUnit.MILLISECONDS.toSeconds(timestamp); return timeInSec - timeInSec % MODIFIED_IN_SECS_RESOLUTION; } public enum SplitDocType { NONE(-1), DEFAULT(10), DEFAULT_NO_CHILD(20), PROP_COMMIT_ONLY(30), INTERMEDIATE(40), DEFAULT_LEAF(50), COMMIT_ROOT_ONLY(60), ; fina... | /**
* Return time in seconds with 5 second resolution
*
* @param timestamp time in millis to convert
* @return the time in seconds with the given resolution.
*/ | Return time in seconds with 5 second resolution | getModifiedInSecs | {
"repo_name": "afilimonov/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java",
"license": "apache-2.0",
"size": 87554
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,435,407 |
public static boolean syncTextInElement(OrasiDriver driver, String text, int timeout, Element element) {
return syncTextInElement(driver, text, timeout, getSyncToFailTest(), element);
} | static boolean function(OrasiDriver driver, String text, int timeout, Element element) { return syncTextInElement(driver, text, timeout, getSyncToFailTest(), element); } | /**
*
* Used in conjunction with WebObjectText Present to determine if the
* desired text is present in the desired element Will loop for the time out
* passed in the variable timeout If text is not present within the time,
* throw an error
*
* @author Justin
*
*/ | Used in conjunction with WebObjectText Present to determine if the desired text is present in the desired element Will loop for the time out passed in the variable timeout If text is not present within the time, throw an error | syncTextInElement | {
"repo_name": "Orasi/Xeeva",
"path": "src/main/java/com/orasi/utils/PageLoaded.java",
"license": "bsd-3-clause",
"size": 30167
} | [
"com.orasi.core.interfaces.Element"
] | import com.orasi.core.interfaces.Element; | import com.orasi.core.interfaces.*; | [
"com.orasi.core"
] | com.orasi.core; | 671,855 |
public void onPostWorldTick(World world)
{
bus().post(new TickEvent.WorldTickEvent(Side.SERVER, Phase.END, world));
} | void function(World world) { bus().post(new TickEvent.WorldTickEvent(Side.SERVER, Phase.END, world)); } | /**
* Every tick just after world and other ticks occur
*/ | Every tick just after world and other ticks occur | onPostWorldTick | {
"repo_name": "LiamWA11/RandomStuffMod",
"path": "Random Stuff By LiamWA11/build/unpacked/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java",
"license": "lgpl-3.0",
"size": 14702
} | [
"net.minecraft.world.World"
] | import net.minecraft.world.World; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 297,579 |
private void setupFocusListener()
{
for (final Component view : views)
{
view.addFocusListener(new FocusListener() { | void function() { for (final Component view : views) { view.addFocusListener(new FocusListener() { | /**
* Refreshes the listeners for focus changes
*/ | Refreshes the listeners for focus changes | setupFocusListener | {
"repo_name": "phil-brown/javaQuery",
"path": "src/self/philbrown/javaQuery/$.java",
"license": "apache-2.0",
"size": 101555
} | [
"java.awt.Component",
"java.awt.event.FocusListener"
] | import java.awt.Component; import java.awt.event.FocusListener; | import java.awt.*; import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,774,487 |
Validate.notNull(valDT, "valuationDate was null");
final double timeToSettlement = TimeCalculator.getTimeBetween(valDT, _settlementDate);
final double timeToExpiry = TimeCalculator.getTimeBetween(valDT, _expiryDT);
return new EquityIndexOption(timeToExpiry, timeToSettlement, _strike, _isCall, _currency, _po... | Validate.notNull(valDT, STR); final double timeToSettlement = TimeCalculator.getTimeBetween(valDT, _settlementDate); final double timeToExpiry = TimeCalculator.getTimeBetween(valDT, _expiryDT); return new EquityIndexOption(timeToExpiry, timeToSettlement, _strike, _isCall, _currency, _pointValue); } | /**
* Creates Analytics version of Option, as of exact dateTime, ready for pricing
* @param valueDate Date at which valuation will occur
* @return EquityIndexOption derivative as of valDT
*/ | Creates Analytics version of Option, as of exact dateTime, ready for pricing | toDerivative | {
"repo_name": "charles-cooper/idylfin",
"path": "src/com/opengamma/analytics/financial/equity/option/EquityIndexOptionDefinition.java",
"license": "apache-2.0",
"size": 4378
} | [
"com.opengamma.analytics.util.time.TimeCalculator",
"org.apache.commons.lang.Validate"
] | import com.opengamma.analytics.util.time.TimeCalculator; import org.apache.commons.lang.Validate; | import com.opengamma.analytics.util.time.*; import org.apache.commons.lang.*; | [
"com.opengamma.analytics",
"org.apache.commons"
] | com.opengamma.analytics; org.apache.commons; | 1,027,746 |
public void takeSnapshot(Path sourceVolume, Path target, boolean readonly) {
try {
{
LinkedList<String> list = new LinkedList<String>();
list.addAll(Arrays.asList("btrfs", "subvolume", "snapshot"));
if (readonly) {
list.add("-r"... | void function(Path sourceVolume, Path target, boolean readonly) { try { { LinkedList<String> list = new LinkedList<String>(); list.addAll(Arrays.asList("btrfs", STR, STR)); if (readonly) { list.add("-r"); } list.add(sourceVolume.toAbsolutePath().toString()); list.add(target.toAbsolutePath().toString()); int exitValue =... | /**
* Takes a read only snapshot of the source an puts it to the target
*
* @param readonly
* TODO
*/ | Takes a read only snapshot of the source an puts it to the target | takeSnapshot | {
"repo_name": "ruediste/btrbck",
"path": "impl/src/main/java/com/github/ruediste1/btrbck/BtrfsService.java",
"license": "gpl-3.0",
"size": 7215
} | [
"java.io.IOException",
"java.nio.file.Path",
"java.util.Arrays",
"java.util.LinkedList"
] | import java.io.IOException; import java.nio.file.Path; import java.util.Arrays; import java.util.LinkedList; | import java.io.*; import java.nio.file.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 2,157,646 |
@Test(expected = NullPointerException.class)
public void flipNullAxis() {
Geometry.flip(Geometry.createSquare(1.0), null, null);
}
| @Test(expected = NullPointerException.class) void function() { Geometry.flip(Geometry.createSquare(1.0), null, null); } | /**
* Tests the flip polygon method with a null axis.
* @since 3.1.4
*/ | Tests the flip polygon method with a null axis | flipNullAxis | {
"repo_name": "satishbabusee/dyn4j",
"path": "junit/org/dyn4j/geometry/GeometryTest.java",
"license": "bsd-3-clause",
"size": 54121
} | [
"org.dyn4j.geometry.Geometry",
"org.junit.Test"
] | import org.dyn4j.geometry.Geometry; import org.junit.Test; | import org.dyn4j.geometry.*; import org.junit.*; | [
"org.dyn4j.geometry",
"org.junit"
] | org.dyn4j.geometry; org.junit; | 2,796,683 |
public static PortBindInfo resolvePortBindPort(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort, String... excludedContainers) {
final DockerCompositions dockerContainersContent = cubeDockerConfiguration.getDockerContainersContent();
final Set<Map.Entry<String, CubeContainer>> conta... | static PortBindInfo function(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort, String... excludedContainers) { final DockerCompositions dockerContainersContent = cubeDockerConfiguration.getDockerContainersContent(); final Set<Map.Entry<String, CubeContainer>> containers = dockerContainersContent.getCont... | /**
* Method that tries to resolve a bind port for a given exposed port.
*
* @param cubeDockerConfiguration where all docker configuration is exposed
* @param exposedPort used to find the binding port
* @param excludedContainers where binding port search is ignored
* @retu... | Method that tries to resolve a bind port for a given exposed port | resolvePortBindPort | {
"repo_name": "lordofthejars/arquillian-cube",
"path": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/SinglePortBindResolver.java",
"license": "apache-2.0",
"size": 8378
} | [
"java.util.Collection",
"java.util.Map",
"java.util.Set",
"org.arquillian.cube.docker.impl.client.CubeDockerConfiguration",
"org.arquillian.cube.docker.impl.client.config.CubeContainer",
"org.arquillian.cube.docker.impl.client.config.DockerCompositions",
"org.arquillian.cube.docker.impl.client.config.Po... | import java.util.Collection; import java.util.Map; import java.util.Set; import org.arquillian.cube.docker.impl.client.CubeDockerConfiguration; import org.arquillian.cube.docker.impl.client.config.CubeContainer; import org.arquillian.cube.docker.impl.client.config.DockerCompositions; import org.arquillian.cube.docker.i... | import java.util.*; import org.arquillian.cube.docker.impl.client.*; import org.arquillian.cube.docker.impl.client.config.*; | [
"java.util",
"org.arquillian.cube"
] | java.util; org.arquillian.cube; | 1,226,544 |
@Override
protected void onHandleIntent(final Intent intent) {
if (isCorrectIntent(intent)) {
if (LocationClient.hasError(intent)) {
int errorCode = LocationClient.getErrorCode(intent);
// Get the error message
String errorMessage = Locatio... | void function(final Intent intent) { if (isCorrectIntent(intent)) { if (LocationClient.hasError(intent)) { int errorCode = LocationClient.getErrorCode(intent); String errorMessage = LocationServiceErrorMessages.getErrorString(this, errorCode); Log.d(LOG_TAG, STR + errorMessage); CommonUtils.showShortToast(this, errorMe... | /**
* Handles incoming intents
*
* @param intent
* The Intent sent by Location Services. This Intent is provided
* to Location Services (inside a PendingIntent) when you call
* addGeofences()
*/ | Handles incoming intents | onHandleIntent | {
"repo_name": "CesarValiente/GeofencesDemo",
"path": "src/org/cesar/geofencesdemo/geofence/service/ReceiveTransitionsIntentService.java",
"license": "apache-2.0",
"size": 4479
} | [
"android.content.Intent",
"android.util.Log",
"com.google.android.gms.location.Geofence",
"com.google.android.gms.location.LocationClient",
"java.util.List",
"org.cesar.geofencesdemo.geofence.data.SimpleGeofence",
"org.cesar.geofencesdemo.geofence.data.SimpleGeofenceStore",
"org.cesar.geofencesdemo.ge... | import android.content.Intent; import android.util.Log; import com.google.android.gms.location.Geofence; import com.google.android.gms.location.LocationClient; import java.util.List; import org.cesar.geofencesdemo.geofence.data.SimpleGeofence; import org.cesar.geofencesdemo.geofence.data.SimpleGeofenceStore; import org... | import android.content.*; import android.util.*; import com.google.android.gms.location.*; import java.util.*; import org.cesar.geofencesdemo.geofence.data.*; import org.cesar.geofencesdemo.geofence.util.*; import org.cesar.geofencesdemo.managers.*; | [
"android.content",
"android.util",
"com.google.android",
"java.util",
"org.cesar.geofencesdemo"
] | android.content; android.util; com.google.android; java.util; org.cesar.geofencesdemo; | 2,710,866 |
PagedIterable<BillingProfile> listByBillingAccount(String billingAccountName, String expand, Context context); | PagedIterable<BillingProfile> listByBillingAccount(String billingAccountName, String expand, Context context); | /**
* Lists the billing profiles that a user has access to. The operation is supported for billing accounts with
* agreement type Microsoft Customer Agreement or Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param expand May be ... | Lists the billing profiles that a user has access to. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement or Microsoft Partner Agreement | listByBillingAccount | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/BillingProfiles.java",
"license": "mit",
"size": 5778
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,674,544 |
@Empty
Map<String, Set<T>> getClusterSummaries(String application); | Map<String, Set<T>> getClusterSummaries(String application); | /**
* Looks up all of the clusters known to this provider to be for a specified application Keyed on
* account name. Similar to {@link #getClusterSummaries(java.lang.String)}, but returns the names
* of server groups and load balancers, not reified views.
*
* @param application
* @return map of cluste... | Looks up all of the clusters known to this provider to be for a specified application Keyed on account name. Similar to <code>#getClusterSummaries(java.lang.String)</code>, but returns the names of server groups and load balancers, not reified views | getClusterSummaries | {
"repo_name": "duftler/clouddriver",
"path": "clouddriver-core/src/main/groovy/com/netflix/spinnaker/clouddriver/model/ClusterProvider.java",
"license": "apache-2.0",
"size": 4680
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,483,494 |
public void initJingle(XMPPConnection adaptee) {
} | void function(XMPPConnection adaptee) { } | /**
* Initialize Jingle from an XmppConnectionAdapter.
*
* @param adaptee XmppConnection used for jingle.
*/ | Initialize Jingle from an XmppConnectionAdapter | initJingle | {
"repo_name": "kontinuity/beemotr",
"path": "src/com/beem/project/beem/BeemService.java",
"license": "gpl-3.0",
"size": 17965
} | [
"org.jivesoftware.smack.XMPPConnection"
] | import org.jivesoftware.smack.XMPPConnection; | import org.jivesoftware.smack.*; | [
"org.jivesoftware.smack"
] | org.jivesoftware.smack; | 2,568,345 |
public void updateProvisioningEntityName(ProvisioningEntity provisioningEntity) throws
IdentityApplicationManagementException {
Connection dbConnection = null;
String provisioningEntityName = null;
String en... | void function(ProvisioningEntity provisioningEntity) throws IdentityApplicationManagementException { Connection dbConnection = null; String provisioningEntityName = null; String entityLocalID = null; PreparedStatement prepStmt = null; try { dbConnection = JDBCPersistenceManager.getInstance().getDBConnection(); String s... | /**
* Applicable for only group name update
*
* @param provisioningEntity
* @throws IdentityApplicationManagementException
*/ | Applicable for only group name update | updateProvisioningEntityName | {
"repo_name": "Niranjan-K/carbon-identity",
"path": "components/provisioning/org.wso2.carbon.identity.provisioning/src/main/java/org/wso2/carbon/identity/provisioning/dao/ProvisioningManagementDAO.java",
"license": "apache-2.0",
"size": 23851
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"org.wso2.carbon.identity.application.common.IdentityApplicationManagementException",
"org.wso2.carbon.identity.application.common.util.IdentityApplicationManagementUtil",
"org.wso2.carbon.identity.core.persistence.JDBCPersisten... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; import org.wso2.carbon.identity.application.common.util.IdentityApplicationManagementUtil; import org.wso2.carbon.identity.core.persiste... | import java.sql.*; import org.wso2.carbon.identity.application.common.*; import org.wso2.carbon.identity.application.common.util.*; import org.wso2.carbon.identity.core.persistence.*; import org.wso2.carbon.identity.provisioning.*; import org.wso2.carbon.user.core.util.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 1,451,149 |
@Column(length = 255)
@Field
public String getSymptom() {
return symptom;
} | @Column(length = 255) String function() { return symptom; } | /**
* Gets the symptom.
*
* @return the symptom
*/ | Gets the symptom | getSymptom | {
"repo_name": "AAFC-MBB/hpdb",
"path": "src/main/java/ca/gc/agr/mbb/hostpathogen/web/model/HostPathogen.java",
"license": "mit",
"size": 10975
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,310,634 |
public Map<String, Object> toMap() {
Map<String, Object> map = new HashMap<String, Object>();
map.put(PROPERTY_ID, id);
map.put(PROPERTY_NAME, name);
map.put(PROPERTY_MEMO, memo);
map.put(PROPERTY_CREATETIME, createTime);
map.put(PROPERTY_UPDATETIME, updateTime);
... | Map<String, Object> function() { Map<String, Object> map = new HashMap<String, Object>(); map.put(PROPERTY_ID, id); map.put(PROPERTY_NAME, name); map.put(PROPERTY_MEMO, memo); map.put(PROPERTY_CREATETIME, createTime); map.put(PROPERTY_UPDATETIME, updateTime); map.put(PROPERTY_PROJECTID, projectId); return map; } | /**
* get map key is field name, value is field value.
*
* @return Map
*/ | get map key is field name, value is field value | toMap | {
"repo_name": "sdgdsffdsfff/configcenter-1",
"path": "src/main/java/com/baidu/cc/configuration/bo/EnvironmentBase.java",
"license": "apache-2.0",
"size": 14661
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,558,478 |
public void lock (ThreadInfo ti) {
// if we do unlock consistency checks with JPFExceptions, we should do the same here
if ((monitor.getLockingThread() != null) && (monitor.getLockingThread() != ti)){
throw new JPFException("thread " + ti.getName() + " tries to lock object: "
+ this + " w... | void function (ThreadInfo ti) { if ((monitor.getLockingThread() != null) && (monitor.getLockingThread() != ti)){ throw new JPFException(STR + ti.getName() + STR + this + STR + monitor.getLockingThread().getName()); } setMonitorWithoutLocked(ti); monitor.setLockingThread(ti); monitor.incLockCount(); ti.resetLockRef(); T... | /**
* from a MONITOR_ENTER or sync INVOKExx if we can acquire the lock
*/ | from a MONITOR_ENTER or sync INVOKExx if we can acquire the lock | lock | {
"repo_name": "parasoft-pl/jpf-core",
"path": "main/src/main/java/gov/nasa/jpf/vm/ElementInfo.java",
"license": "apache-2.0",
"size": 67422
} | [
"gov.nasa.jpf.JPFException"
] | import gov.nasa.jpf.JPFException; | import gov.nasa.jpf.*; | [
"gov.nasa.jpf"
] | gov.nasa.jpf; | 729,756 |
public static PDAnnotation createAnnotation(COSBase base) throws IOException
{
PDAnnotation annot = null;
if (base instanceof COSDictionary)
{
COSDictionary annotDic = (COSDictionary) base;
String subtype = annotDic.getNameAsString(COSName.SUBTYPE);
if... | static PDAnnotation function(COSBase base) throws IOException { PDAnnotation annot = null; if (base instanceof COSDictionary) { COSDictionary annotDic = (COSDictionary) base; String subtype = annotDic.getNameAsString(COSName.SUBTYPE); if (PDAnnotationFileAttachment.SUB_TYPE.equals(subtype)) { annot = new PDAnnotationFi... | /**
* Create the correct annotation from the base COS object.
*
* @param base The COS object that is the annotation.
* @return The correctly typed annotation object.
*
* @throws IOException If the annotation type is unknown.
*/ | Create the correct annotation from the base COS object | createAnnotation | {
"repo_name": "TomRoush/PdfBox-Android",
"path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java",
"license": "apache-2.0",
"size": 22980
} | [
"android.util.Log",
"com.tom_roush.pdfbox.cos.COSBase",
"com.tom_roush.pdfbox.cos.COSDictionary",
"com.tom_roush.pdfbox.cos.COSName",
"java.io.IOException"
] | import android.util.Log; import com.tom_roush.pdfbox.cos.COSBase; import com.tom_roush.pdfbox.cos.COSDictionary; import com.tom_roush.pdfbox.cos.COSName; import java.io.IOException; | import android.util.*; import com.tom_roush.pdfbox.cos.*; import java.io.*; | [
"android.util",
"com.tom_roush.pdfbox",
"java.io"
] | android.util; com.tom_roush.pdfbox; java.io; | 1,583,684 |
public static KeyValue.Type fromDeleteType(
DeleteType type) throws IOException {
switch (type) {
case DELETE_ONE_VERSION:
return KeyValue.Type.Delete;
case DELETE_MULTIPLE_VERSIONS:
return KeyValue.Type.DeleteColumn;
case DELETE_FAMILY:
return KeyValue.Type.DeleteFamily;
c... | static KeyValue.Type function( DeleteType type) throws IOException { switch (type) { case DELETE_ONE_VERSION: return KeyValue.Type.Delete; case DELETE_MULTIPLE_VERSIONS: return KeyValue.Type.DeleteColumn; case DELETE_FAMILY: return KeyValue.Type.DeleteFamily; case DELETE_FAMILY_VERSION: return KeyValue.Type.DeleteFamil... | /**
* Convert a protocol buffer DeleteType to delete KeyValue type.
*
* @param type The DeleteType
* @return The type.
* @throws IOException
*/ | Convert a protocol buffer DeleteType to delete KeyValue type | fromDeleteType | {
"repo_name": "drewpope/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java",
"license": "apache-2.0",
"size": 114457
} | [
"java.io.IOException",
"java.lang.reflect.Type",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.client.Delete",
"org.apache.hadoop.hbase.protobuf.generated.ClientProtos"
] | import java.io.IOException; import java.lang.reflect.Type; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; | import java.io.*; import java.lang.reflect.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.io",
"java.lang",
"org.apache.hadoop"
] | java.io; java.lang; org.apache.hadoop; | 106,022 |
public List<Node> getRefs() {
return this.refs;
}
| List<Node> function() { return this.refs; } | /**
* Returns references to the nodes contained within this instance.
* @return List containing the predecessor (first in this list) and successors of a
* node.
*
*/ | Returns references to the nodes contained within this instance | getRefs | {
"repo_name": "yahiaelgamal/PeerBox",
"path": "src/de/uniba/wiai/lspi/chord/com/RefsAndEntries.java",
"license": "gpl-2.0",
"size": 3279
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,936,745 |
public static Date addWeeks(Date date, int amount) {
return addWeeks(date, amount, TimeZones.DEFAULT);
} | static Date function(Date date, int amount) { return addWeeks(date, amount, TimeZones.DEFAULT); } | /**
* Adds a number of weeks to a date returning a new object. The original
* date object is unchanged.
*
* @param date
* the date, not null
* @param amount
* the amount to add, may be negative
* @return the new date object with the amount added
* @throws IllegalArgumentException... | Adds a number of weeks to a date returning a new object. The original date object is unchanged | addWeeks | {
"repo_name": "aroychoudhury/fileanalytics",
"path": "src/main/java/org/abhishek/fileanalytics/utils/DateUtils.java",
"license": "gpl-2.0",
"size": 7624
} | [
"java.util.Date",
"org.abhishek.fileanalytics.constants.TimeZones"
] | import java.util.Date; import org.abhishek.fileanalytics.constants.TimeZones; | import java.util.*; import org.abhishek.fileanalytics.constants.*; | [
"java.util",
"org.abhishek.fileanalytics"
] | java.util; org.abhishek.fileanalytics; | 793,645 |
public Timestamp getLastRefreshTime() {
return this.lastRefreshTime;
} | Timestamp function() { return this.lastRefreshTime; } | /**
* Get property lastRefreshTime.
* @return Timestamp, value of property lastRefreshTime.
*/ | Get property lastRefreshTime | getLastRefreshTime | {
"repo_name": "ekoi/DANS-DVN-4.6.1",
"path": "src/main/java/edu/harvard/iq/dataverse/worldmapauth/WorldMapToken.java",
"license": "apache-2.0",
"size": 9846
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,895,168 |
public void printTo(Appendable appendable, long instant) throws IOException {
appendable.append(print(instant));
} | void function(Appendable appendable, long instant) throws IOException { appendable.append(print(instant)); } | /**
* Prints an instant from milliseconds since 1970-01-01T00:00:00Z,
* using ISO chronology in the default DateTimeZone.
*
* @param appendable the destination to format to, not null
* @param instant millis since 1970-01-01T00:00:00Z
* @since 2.0
*/ | Prints an instant from milliseconds since 1970-01-01T00:00:00Z, using ISO chronology in the default DateTimeZone | printTo | {
"repo_name": "jorisdgff/Trade-Today",
"path": "Third Party Libraries/joda-time-2.3/src/main/java/org/joda/time/format/DateTimeFormatter.java",
"license": "unlicense",
"size": 37627
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,400,212 |
public void updateTask() {
--this.lookForFriends;
if (this.lookForFriends <= 0) {
World world = this.silverfish.worldObj;
Random random = this.silverfish.getRNG();
BlockPos blockpos = new BlockPos(this.silverfish);
for (int i = 0; i <= 5 && i >= -5; i = i <= 0 ? 1 - i : 0 - i) {
for (i... | void function() { --this.lookForFriends; if (this.lookForFriends <= 0) { World world = this.silverfish.worldObj; Random random = this.silverfish.getRNG(); BlockPos blockpos = new BlockPos(this.silverfish); for (int i = 0; i <= 5 && i >= -5; i = i <= 0 ? 1 - i : 0 - i) { for (int j = 0; j <= 10 && j >= -10; j = j <= 0 ?... | /**
* Updates the task
*/ | Updates the task | updateTask | {
"repo_name": "EPIICTHUNDERCAT/TameableMobs",
"path": "src/main/java/com/github/EPIICTHUNDERCAT/TameableMobs/mobs/TameableSilverfish.java",
"license": "mit",
"size": 36373
} | [
"java.util.Random",
"net.minecraft.block.BlockSilverfish",
"net.minecraft.block.state.IBlockState",
"net.minecraft.init.Blocks",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.BlockSilverfish; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.*; import net.minecraft.block.state.*; import net.minecraft.init.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.init",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.init; net.minecraft.util; net.minecraft.world; | 1,399,784 |
private Activity.Actor buildActor(JsonNode node) {
Activity.Actor actor = new Activity.Actor();
JsonNode actorNode = node.get("actor");
actor.setId(actorNode.get("id").asText());
actor.setDisplayName(actorNode.get("displayName").asText());
actor.setUrl(actorNode.get("url").a... | Activity.Actor function(JsonNode node) { Activity.Actor actor = new Activity.Actor(); JsonNode actorNode = node.get("actor"); actor.setId(actorNode.get("id").asText()); actor.setDisplayName(actorNode.get(STR).asText()); actor.setUrl(actorNode.get("url").asText()); Activity.Actor.Image image = new Activity.Actor.Image()... | /**
* Given a raw JsonNode, build out the G+ {@link com.google.api.services.plus.model.Activity.Actor} object
*
* @param node
* @return {@link com.google.api.services.plus.model.Activity.Actor} object
*/ | Given a raw JsonNode, build out the G+ <code>com.google.api.services.plus.model.Activity.Actor</code> object | buildActor | {
"repo_name": "robdouglas/incubator_streams_apache",
"path": "streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusActivityDeserializer.java",
"license": "apache-2.0",
"size": 6894
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.google.api.services.plus.model.Activity"
] | import com.fasterxml.jackson.databind.JsonNode; import com.google.api.services.plus.model.Activity; | import com.fasterxml.jackson.databind.*; import com.google.api.services.plus.model.*; | [
"com.fasterxml.jackson",
"com.google.api"
] | com.fasterxml.jackson; com.google.api; | 479,593 |
Response<Void> suspendWithResponse(
String resourceGroupName,
String automationAccountName,
String jobName,
String clientRequestId,
Context context); | Response<Void> suspendWithResponse( String resourceGroupName, String automationAccountName, String jobName, String clientRequestId, Context context); | /**
* Suspend the job identified by job name.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param automationAccountName The name of the automation account.
* @param jobName The job name.
* @param clientRequestId Identifies this specific client request.
* @param cont... | Suspend the job identified by job name | suspendWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/models/Jobs.java",
"license": "mit",
"size": 12829
} | [
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.Response; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,913,674 |
public CertificateOrderStatus status() {
return this.status;
} | CertificateOrderStatus function() { return this.status; } | /**
* Get current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'.
*
* @return the status value
*/ | Get current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted' | status | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServiceCertificateOrderInner.java",
"license": "mit",
"size": 12516
} | [
"com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderStatus"
] | import com.microsoft.azure.management.appservice.v2019_08_01.CertificateOrderStatus; | import com.microsoft.azure.management.appservice.v2019_08_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,184,414 |
private void triggerDragStop(final DragContext ctx,
final DraggableOptions options) {
Scheduler.get().scheduleDeferred(new ScheduledCommand() { | void function(final DragContext ctx, final DraggableOptions options) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { | /**
* Use a deferred command to be sure that this event is trigger after the
* possible drop event.
*
* @param draggable
* @param options
*/ | Use a deferred command to be sure that this event is trigger after the possible drop event | triggerDragStop | {
"repo_name": "ArcBees/gwtquery-draggable-plugin",
"path": "plugin/src/main/java/gwtquery/plugins/draggable/client/Draggable.java",
"license": "mit",
"size": 21736
} | [
"com.google.gwt.core.client.Scheduler"
] | import com.google.gwt.core.client.Scheduler; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,071,140 |
@JsonProperty( "num_hosts" )
public void setNumHosts( int numHosts ) {
this.numHosts = numHosts;
} | @JsonProperty( STR ) void function( int numHosts ) { this.numHosts = numHosts; } | /**
* Sets the number of hosts.
*
* @param numHosts the number of hosts
*/ | Sets the number of hosts | setNumHosts | {
"repo_name": "tenable/Tenable.io-SDK-for-Java",
"path": "src/main/java/com/tenable/io/api/scans/models/RemediationsResult.java",
"license": "mit",
"size": 2913
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,513,438 |
public Dimension getVideoSize() {
for (Element sink : getSinks()) {
for (Pad pad : sink.getPads()) {
Dimension size = Video.getVideoSize(pad);
if (size != null) {
return size;
}
}
}
return null;
} | Dimension function() { for (Element sink : getSinks()) { for (Pad pad : sink.getPads()) { Dimension size = Video.getVideoSize(pad); if (size != null) { return size; } } } return null; } | /**
* Retrieves the width and height of the video frames configured in the caps
* of the video sink's pad.
*
* @return dimensions of the video frames, or null if the video frame size is
* not available
*/ | Retrieves the width and height of the video frames configured in the caps of the video sink's pad | getVideoSize | {
"repo_name": "guiseco/gst1-java-core",
"path": "src/org/freedesktop/gstreamer/elements/PlayBin.java",
"license": "gpl-3.0",
"size": 15815
} | [
"java.awt.Dimension",
"org.freedesktop.gstreamer.Element",
"org.freedesktop.gstreamer.Pad",
"org.freedesktop.gstreamer.Video"
] | import java.awt.Dimension; import org.freedesktop.gstreamer.Element; import org.freedesktop.gstreamer.Pad; import org.freedesktop.gstreamer.Video; | import java.awt.*; import org.freedesktop.gstreamer.*; | [
"java.awt",
"org.freedesktop.gstreamer"
] | java.awt; org.freedesktop.gstreamer; | 2,678,453 |
@Override
public void onAttach(Activity activity)
{
super.onAttach(activity);
mActivity = (SettingsActivityView) activity;
mPresenter.onAttach();
} | void function(Activity activity) { super.onAttach(activity); mActivity = (SettingsActivityView) activity; mPresenter.onAttach(); } | /**
* This version of onAttach is needed for versions below Marshmallow.
*
* @param activity
*/ | This version of onAttach is needed for versions below Marshmallow | onAttach | {
"repo_name": "Mikevin/dolphin",
"path": "Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/settings/SettingsFragment.java",
"license": "gpl-2.0",
"size": 4282
} | [
"android.app.Activity"
] | import android.app.Activity; | import android.app.*; | [
"android.app"
] | android.app; | 2,422,863 |
form = new Form();
// It could be the case that we've already created the EMFComponent,
// if so just skip this creation stuff
if (project != null && project.isAccessible()) {
// Refresh the project space
try {
project.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
... | form = new Form(); if (project != null && project.isAccessible()) { try { project.refreshLocal(IResource.DEPTH_INFINITE, null); } catch (CoreException e) { logger.error(getClass().getName() + STR, e); } loadDefault(); } } | /**
* This method sets up the BatMLModel Item's Form reference, specifically,
* it searches for the correct XML schema and creates an EMFComponent and
* adds it to the Form.
*/ | This method sets up the BatMLModel Item's Form reference, specifically, it searches for the correct XML schema and creates an EMFComponent and adds it to the Form | setupForm | {
"repo_name": "eclipse/ice",
"path": "org.eclipse.ice.caebat.batml/src/org/eclipse/ice/caebat/batml/BatMLModel.java",
"license": "epl-1.0",
"size": 9298
} | [
"org.eclipse.core.resources.IResource",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.ice.datastructures.form.Form"
] | import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.ice.datastructures.form.Form; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.ice.datastructures.form.*; | [
"org.eclipse.core",
"org.eclipse.ice"
] | org.eclipse.core; org.eclipse.ice; | 1,125,792 |
public boolean find(String keyString) throws xBaseJException, IOException {
return find(keyString, false);
} | boolean function(String keyString) throws xBaseJException, IOException { return find(keyString, false); } | /**
* used to find a record with an equal or greater string value. when done
* the record pointer and field contents will be changed.
*
* @param keyString
* a search string
* @return boolean indicating if the record found contains the exact key
* @throws xBaseJException
... | used to find a record with an equal or greater string value. when done the record pointer and field contents will be changed | find | {
"repo_name": "datacleaner/metamodel_extras",
"path": "dbase/src/main/java/org/xBaseJ/DBF.java",
"license": "lgpl-3.0",
"size": 73588
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,218,914 |
private ArrayList<Key> getOverlaps(IntervalTreeNode<Key> head, Interval1D k, double reciprocalRatio, int wiggle) {
if (head == null) {
return new ArrayList<>();
}
ArrayList<Key> retVal = head.getOverlaps(k, reciprocalRatio, wiggle);
int compVal = head.checkKey(k);
... | ArrayList<Key> function(IntervalTreeNode<Key> head, Interval1D k, double reciprocalRatio, int wiggle) { if (head == null) { return new ArrayList<>(); } ArrayList<Key> retVal = head.getOverlaps(k, reciprocalRatio, wiggle); int compVal = head.checkKey(k); if (compVal == 0) { retVal.addAll(getOverlaps(head.getLeft(), k, r... | /**
* TODO There are some optimizations here if the left and right trees are augmented with more information
*
* @param k key to search for
* @return List of Keys that overlap the given key
*/ | TODO There are some optimizations here if the left and right trees are augmented with more information | getOverlaps | {
"repo_name": "bioinform/varsim",
"path": "src/main/java/com/bina/intervalTree/IntervalTree.java",
"license": "bsd-2-clause",
"size": 18329
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,872,776 |
public Actions clickAndHold() {
if (isBuildingActions()) {
action.addAction(new ClickAndHoldAction(jsonMouse, null));
}
return tick(defaultMouse.createPointerDown(LEFT.asArg()));
} | Actions function() { if (isBuildingActions()) { action.addAction(new ClickAndHoldAction(jsonMouse, null)); } return tick(defaultMouse.createPointerDown(LEFT.asArg())); } | /**
* Clicks (without releasing) at the current mouse location.
* @return A self reference.
*/ | Clicks (without releasing) at the current mouse location | clickAndHold | {
"repo_name": "Jarob22/selenium",
"path": "java/client/src/org/openqa/selenium/interactions/Actions.java",
"license": "apache-2.0",
"size": 21447
} | [
"org.openqa.selenium.interactions.PointerInput"
] | import org.openqa.selenium.interactions.PointerInput; | import org.openqa.selenium.interactions.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 318,412 |
public void rollback(final String serviceURI, final CoordinationContextType coordinationContext)
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallba... | void function(final String serviceURI, final CoordinationContextType coordinationContext) throws SoapFault, IOException { final String messageId = MessageId.getMessageId() ; final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId) ; final RequestCallback callback = new RequestCallback() ; final ATIn... | /**
* Send a rollback request.
* @param serviceURI The target service URI.
* @param coordinationContext The coordination context.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/ | Send a rollback request | rollback | {
"repo_name": "nmcl/scratch",
"path": "graalvm/transactions/fork/narayana/XTS/localjunit/WSTX11-interop/src/main/java/com/jboss/transaction/txinterop/webservices/atinterop/AsyncParticipantStub.java",
"license": "apache-2.0",
"size": 20126
} | [
"com.arjuna.webservices.SoapFault",
"com.arjuna.webservices11.wsaddr.AddressingHelper",
"com.arjuna.wsc11.messaging.MessageId",
"com.jboss.transaction.txinterop.webservices.atinterop.client.AsyncParticipantClient",
"com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor",
"j... | import com.arjuna.webservices.SoapFault; import com.arjuna.webservices11.wsaddr.AddressingHelper; import com.arjuna.wsc11.messaging.MessageId; import com.jboss.transaction.txinterop.webservices.atinterop.client.AsyncParticipantClient; import com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorPr... | import com.arjuna.webservices.*; import com.arjuna.webservices11.wsaddr.*; import com.arjuna.wsc11.messaging.*; import com.jboss.transaction.txinterop.webservices.atinterop.client.*; import com.jboss.transaction.txinterop.webservices.atinterop.processors.*; import java.io.*; import org.oasis_open.docs.ws_tx.wscoor.*; | [
"com.arjuna.webservices",
"com.arjuna.webservices11",
"com.arjuna.wsc11",
"com.jboss.transaction",
"java.io",
"org.oasis_open.docs"
] | com.arjuna.webservices; com.arjuna.webservices11; com.arjuna.wsc11; com.jboss.transaction; java.io; org.oasis_open.docs; | 793,261 |
public static WebUser getWebUser(HttpSession session) {
if (session == null) {
return null;
}
Object attr = session.getAttribute(Constants.WEBUSER_SES_ATTR);
if (attr == null) {
return null;
}
return (WebUser) attr;
} | static WebUser function(HttpSession session) { if (session == null) { return null; } Object attr = session.getAttribute(Constants.WEBUSER_SES_ATTR); if (attr == null) { return null; } return (WebUser) attr; } | /**
* Retrieve the cached <code>WebUser</code> representing the user
* interacting with server.
*
* @param session
* the http session
*/ | Retrieve the cached <code>WebUser</code> representing the user interacting with server | getWebUser | {
"repo_name": "cc14514/hq6",
"path": "hq-web/src/main/java/org/hyperic/hq/ui/util/SessionUtils.java",
"license": "unlicense",
"size": 25054
} | [
"javax.servlet.http.HttpSession",
"org.hyperic.hq.ui.Constants",
"org.hyperic.hq.ui.WebUser"
] | import javax.servlet.http.HttpSession; import org.hyperic.hq.ui.Constants; import org.hyperic.hq.ui.WebUser; | import javax.servlet.http.*; import org.hyperic.hq.ui.*; | [
"javax.servlet",
"org.hyperic.hq"
] | javax.servlet; org.hyperic.hq; | 2,201,169 |
@Override
public void setClientLogLevel(Level aValue) {
Level oldValue = getClientLogLevel();
if (aValue != null) {
projectPrivateProperties.setProperty(CLIENT_LOG_LEVEL_KEY, aValue.getName());
} else {
projectPrivateProperties.remove(CLIENT_LOG_LEVEL_KEY);
... | void function(Level aValue) { Level oldValue = getClientLogLevel(); if (aValue != null) { projectPrivateProperties.setProperty(CLIENT_LOG_LEVEL_KEY, aValue.getName()); } else { projectPrivateProperties.remove(CLIENT_LOG_LEVEL_KEY); } projectPrivatePropertiesIsDirty = true; changeSupport.firePropertyChange(CLIENT_LOG_LE... | /**
* Sets a log level for Platypus Client.
*
* @param aValue Log level value
*/ | Sets a log level for Platypus Client | setClientLogLevel | {
"repo_name": "jskonst/PlatypusJS",
"path": "designer/PlatypusExplorer/src/com/eas/designer/explorer/project/PlatypusProjectSettingsImpl.java",
"license": "apache-2.0",
"size": 28654
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 469,110 |
public static final SourceModel.Expr getFileLength(SourceModel.Expr fileName) {
return
SourceModel.Expr.Application.make(
new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.getFileLength), fileName});
}
public static final QualifiedName getFileLength =
QualifiedName.make(CA... | static final SourceModel.Expr function(SourceModel.Expr fileName) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.getFileLength), fileName}); } static final QualifiedName function = QualifiedName.make(CAL_File.MODULE_NAME, STR); | /**
* Returns the length, in bytes, of the file.
* <p>
* The return value is 0 if the file does not exist, and is unspecified if the
* path denotes a directory.
*
* @param fileName (CAL type: <code>Cal.IO.File.FileName</code>)
* the file whose length is to be returned.
* @retur... | Returns the length, in bytes, of the file. The return value is 0 if the file does not exist, and is unspecified if the path denotes a directory | getFileLength | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Libraries/src/org/openquark/cal/module/Cal/IO/CAL_File.java",
"license": "bsd-3-clause",
"size": 59940
} | [
"org.openquark.cal.compiler.QualifiedName",
"org.openquark.cal.compiler.SourceModel"
] | import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel; | import org.openquark.cal.compiler.*; | [
"org.openquark.cal"
] | org.openquark.cal; | 2,610,814 |
public ExtWebResourceLog update(ExtWebResourceLog log) throws DaoException {
EntityTransaction et = null;
try {
et = this.entityManager.getTransaction();
et.begin();
log = this.entityManager.merge(log);
et.commit();
} catch (Exception e) {
try {
if (et != null)
et.rollback();
} catch... | ExtWebResourceLog function(ExtWebResourceLog log) throws DaoException { EntityTransaction et = null; try { et = this.entityManager.getTransaction(); et.begin(); log = this.entityManager.merge(log); et.commit(); } catch (Exception e) { try { if (et != null) et.rollback(); } catch (Exception e1) { LOGGER.warn(e1.getMessa... | /**
* Updates a previously persisted instance of {@link ExtWebResourceLog}, with the response received from the
* external web service.
*
* @param log
* Log instance to persist
* @return Updated log object
* @throws DaoException
* when unable to persist
*/ | Updates a previously persisted instance of <code>ExtWebResourceLog</code>, with the response received from the external web service | update | {
"repo_name": "anu-doi/anudc",
"path": "DataCommons/src/main/java/au/edu/anu/datacommons/doi/logging/ExtWebResourceLogDao.java",
"license": "gpl-3.0",
"size": 3219
} | [
"au.edu.anu.datacommons.data.db.dao.DaoException",
"javax.persistence.EntityTransaction"
] | import au.edu.anu.datacommons.data.db.dao.DaoException; import javax.persistence.EntityTransaction; | import au.edu.anu.datacommons.data.db.dao.*; import javax.persistence.*; | [
"au.edu.anu",
"javax.persistence"
] | au.edu.anu; javax.persistence; | 1,371,999 |
@Override
public JSONObject execute(FileSystem fs) throws IOException {
boolean renamed = fs.rename(path, toPath);
return toJSON(HttpFSFileSystem.RENAME_JSON, renamed);
}
}
@InterfaceAudience.Private
public static class FSSetOwner implements FileSystemAccess.FileSystemExecutor<Void> {... | JSONObject function(FileSystem fs) throws IOException { boolean renamed = fs.rename(path, toPath); return toJSON(HttpFSFileSystem.RENAME_JSON, renamed); } } @InterfaceAudience.Private public static class FSSetOwner implements FileSystemAccess.FileSystemExecutor<Void> { private Path path; private String owner; private S... | /**
* Executes the filesystem operation.
*
* @param fs filesystem instance to use.
*
* @return <code>true</code> if the rename operation was successful,
* <code>false</code> otherwise.
*
* @throws IOException thrown if an IO error occured.
*/ | Executes the filesystem operation | execute | {
"repo_name": "Microsoft-CISL/hadoop-prototype",
"path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java",
"license": "apache-2.0",
"size": 39001
} | [
"java.io.IOException",
"org.apache.hadoop.classification.InterfaceAudience",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.http.client.HttpFSFileSystem",
"org.apache.hadoop.lib.service.FileSystemAccess",
"org.json.simple.JSONObject"
] | import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.http.client.HttpFSFileSystem; import org.apache.hadoop.lib.service.FileSystemAccess; import org.json.simple.JSONObject; | import java.io.*; import org.apache.hadoop.classification.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.http.client.*; import org.apache.hadoop.lib.service.*; import org.json.simple.*; | [
"java.io",
"org.apache.hadoop",
"org.json.simple"
] | java.io; org.apache.hadoop; org.json.simple; | 642,050 |
public StoredSortedValueSet getSupplierSet() {
return (StoredSortedValueSet) supplierMap.values();
} | StoredSortedValueSet function() { return (StoredSortedValueSet) supplierMap.values(); } | /**
* Return an entity set view of the supplier storage container.
*/ | Return an entity set view of the supplier storage container | getSupplierSet | {
"repo_name": "djsedulous/namecoind",
"path": "libs/db-4.7.25.NC/examples_java/src/collections/ship/marshal/SampleViews.java",
"license": "mit",
"size": 9341
} | [
"com.sleepycat.collections.StoredSortedValueSet"
] | import com.sleepycat.collections.StoredSortedValueSet; | import com.sleepycat.collections.*; | [
"com.sleepycat.collections"
] | com.sleepycat.collections; | 2,141,970 |
@FIXVersion(introduced="4.0")
@TagNumRef(tagNum=TagNum.ClOrdID, required = true)
public void setClOrdID(String clOrdID) {
this.clOrdID = clOrdID;
} | @FIXVersion(introduced="4.0") @TagNumRef(tagNum=TagNum.ClOrdID, required = true) void function(String clOrdID) { this.clOrdID = clOrdID; } | /**
* Message field setter.
* @param clOrdID field value
*/ | Message field setter | setClOrdID | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/OrderModificationRequestMsg.java",
"license": "gpl-3.0",
"size": 149491
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,390,080 |
public static DatabaseSchema jsonNodeToDbSchema(String dbName, JsonNode dbJson) {
validateJsonNode(dbJson, "tables");
validateJsonNode(dbJson, "version");
String dbVersion = dbJson.get("version").asText();
Map<String, TableSchema> tables = new HashMap<>();
Iterator<Map.Entry<... | static DatabaseSchema function(String dbName, JsonNode dbJson) { validateJsonNode(dbJson, STR); validateJsonNode(dbJson, STR); String dbVersion = dbJson.get(STR).asText(); Map<String, TableSchema> tables = new HashMap<>(); Iterator<Map.Entry<String, JsonNode>> tablesIter = dbJson.get(STR).fields(); while (tablesIter.ha... | /**
* convert JsonNode into DatabaseSchema.
* @param dbName database name
* @param dbJson the JsonNode of get_schema result
* @return DatabaseSchema
* @throws AbnormalJsonNodeException this is an abnormal JsonNode exception
*/ | convert JsonNode into DatabaseSchema | jsonNodeToDbSchema | {
"repo_name": "sonu283304/onos",
"path": "protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/FromJsonUtil.java",
"license": "apache-2.0",
"size": 13697
} | [
"com.fasterxml.jackson.databind.JsonNode",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map",
"org.onosproject.ovsdb.rfc.schema.DatabaseSchema",
"org.onosproject.ovsdb.rfc.schema.TableSchema"
] | import com.fasterxml.jackson.databind.JsonNode; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; import org.onosproject.ovsdb.rfc.schema.TableSchema; | import com.fasterxml.jackson.databind.*; import java.util.*; import org.onosproject.ovsdb.rfc.schema.*; | [
"com.fasterxml.jackson",
"java.util",
"org.onosproject.ovsdb"
] | com.fasterxml.jackson; java.util; org.onosproject.ovsdb; | 618,089 |
public SelectionBuilder where(String selection, String... selectionArgs) {
if (TextUtils.isEmpty(selection)) {
if (selectionArgs != null && selectionArgs.length > 0) {
throw new IllegalArgumentException("Valid selection required when including arguments=");
}
... | SelectionBuilder function(String selection, String... selectionArgs) { if (TextUtils.isEmpty(selection)) { if (selectionArgs != null && selectionArgs.length > 0) { throw new IllegalArgumentException(STR); } return this; } if (mSelection.length() > 0) { mSelection.append(STR); } mSelection.append("(").append(selection).... | /**
* Append the given selection clause to the internal state. Each clause is
* surrounded with parenthesis and combined using {@code AND}.
*/ | Append the given selection clause to the internal state. Each clause is surrounded with parenthesis and combined using AND | where | {
"repo_name": "bigbugbb/iTracker",
"path": "app/src/main/java/com/itracker/android/utils/SelectionBuilder.java",
"license": "apache-2.0",
"size": 5931
} | [
"android.text.TextUtils",
"java.util.Collections"
] | import android.text.TextUtils; import java.util.Collections; | import android.text.*; import java.util.*; | [
"android.text",
"java.util"
] | android.text; java.util; | 2,692,820 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.