method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public final void setStartDate(Date date) {
this.timer.setStartDate(date);
} | final void function(Date date) { this.timer.setStartDate(date); } | /**
* <p>This method will set the start date in the workload itself and it will update it
* in the visual representation of it.</p>
*
* @param date to set
*/ | This method will set the start date in the workload itself and it will update it in the visual representation of it | setStartDate | {
"repo_name": "IBM-DBWKL/DBWKL",
"path": "com.ibm.dbwkl.request/src/com/ibm/dbwkl/workloadtypes/AWorkload.java",
"license": "epl-1.0",
"size": 14452
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,891,282 |
public void drawItem(Graphics2D g2,
XYItemRendererState state,
Rectangle2D dataArea,
PlotRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
... | void function(Graphics2D g2, XYItemRendererState state, Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass) { if (!(dataset instanceof IntervalXYDataset && dataset instanceof TableXYDatase... | /**
* Draws the visual representation of a single data item.
*
* @param g2 the graphics device.
* @param state the renderer state.
* @param dataArea the area within which the plot is being drawn.
* @param info collects information about the drawing.
* @param plot the plot (can be... | Draws the visual representation of a single data item | drawItem | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/renderer/xy/StackedXYBarRenderer.java",
"license": "lgpl-2.1",
"size": 11333
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.entity.EntityCollection",
"org.jfree.chart.entity.XYItemEntity",
"org.jfree.chart.labels.XYToolTipGenerator",
"org.jfree.chart.plot.CrosshairState",
"org.jfree.chart.plot.PlotOrientation",
"org.jfr... | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.entity.EntityCollection; import org.jfree.chart.entity.XYItemEntity; import org.jfree.chart.labels.XYToolTipGenerator; import org.jfree.chart.plot.CrosshairState; import org.jfree.chart.plot.PlotO... | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.entity.*; import org.jfree.chart.labels.*; import org.jfree.chart.plot.*; import org.jfree.data.xy.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data",
"org.jfree.ui"
] | java.awt; org.jfree.chart; org.jfree.data; org.jfree.ui; | 2,165,292 |
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
r... | static Column[] function(Column ... excludes) { ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values())); if (excludes != null && excludes.length > 0) { columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); } return columns.toArray(new Column[]{}); } | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table waf_install_active
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table waf_install_active | excludes | {
"repo_name": "sdgdsffdsfff/zeus",
"path": "slb/src/main/java/com/ctrip/zeus/dao/entity/WafInstallActive.java",
"license": "apache-2.0",
"size": 11614
} | [
"java.util.ArrayList",
"java.util.Arrays"
] | import java.util.ArrayList; import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 50,031 |
public static List<Message> getReceivedMessages() {
List<Message> messageList = messageRepository.retrieve(MAX_MESSAGES);
return messageList;
} | static List<Message> function() { List<Message> messageList = messageRepository.retrieve(MAX_MESSAGES); return messageList; } | /**
* Retrieve received messages in html.
*
* @return html representation of messages (one per row)
*/ | Retrieve received messages in html | getReceivedMessages | {
"repo_name": "GoogleCloudPlatform/java-docs-samples",
"path": "appengine-java8/pubsub/src/main/java/com/example/appengine/pubsub/PubSubHome.java",
"license": "apache-2.0",
"size": 3574
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,086,427 |
static LongCollector<?, OptionalLong> reducing(LongBinaryOperator op) {
return of(PrimitiveBox::new, (box, l) -> {
if (!box.b) {
box.b = true;
box.l = l;
} else {
box.l = op.applyAsLong(box.l, l);
}
}, (box1,... | static LongCollector<?, OptionalLong> reducing(LongBinaryOperator op) { return of(PrimitiveBox::new, (box, l) -> { if (!box.b) { box.b = true; box.l = l; } else { box.l = op.applyAsLong(box.l, l); } }, (box1, box2) -> { if (box2.b) { if (!box1.b) { box1.from(box2); } else { box1.l = op.applyAsLong(box1.l, box2.l); } } ... | /**
* Returns a {@code LongCollector} which performs a reduction of its input
* numbers under a specified {@link LongBinaryOperator}. The result is
* described as an {@link OptionalLong}.
*
* @param op a {@code LongBinaryOperator} used to reduce the input numbers
* @return a {@code L... | Returns a LongCollector which performs a reduction of its input numbers under a specified <code>LongBinaryOperator</code>. The result is described as an <code>OptionalLong</code> | reducing | {
"repo_name": "amaembo/streamex",
"path": "src/main/java/one/util/streamex/LongCollector.java",
"license": "apache-2.0",
"size": 23121
} | [
"java.util.OptionalLong",
"java.util.function.LongBinaryOperator",
"one.util.streamex.Internals"
] | import java.util.OptionalLong; import java.util.function.LongBinaryOperator; import one.util.streamex.Internals; | import java.util.*; import java.util.function.*; import one.util.streamex.*; | [
"java.util",
"one.util.streamex"
] | java.util; one.util.streamex; | 2,706,393 |
protected Map transformMap(Map map) {
if (map.isEmpty()) {
return map;
}
Map result = new LinkedMap(map.size());
for (Iterator it = map.entrySet().iterator(); it.hasNext(); ) {
Map.Entry entry = (Map.Entry) it.next();
result.put(transformKey... | Map function(Map map) { if (map.isEmpty()) { return map; } Map result = new LinkedMap(map.size()); for (Iterator it = map.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); result.put(transformKey(entry.getKey()), transformValue(entry.getValue())); } return result; } | /**
* Transforms a map.
* <p>
* The transformer itself may throw an exception if necessary.
*
* @param map the map to transform
* @throws the transformed object
*/ | Transforms a map. The transformer itself may throw an exception if necessary | transformMap | {
"repo_name": "leodmurillo/sonar",
"path": "plugins/sonar-squid-java-plugin/test-resources/commons-collections-3.2.1/src/org/apache/commons/collections/map/TransformedMap.java",
"license": "lgpl-3.0",
"size": 8640
} | [
"java.util.Iterator",
"java.util.Map"
] | import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 10,724 |
protected byte[] getNativeBytes(int columnIndex, boolean noConversion)
throws SQLException {
checkRowPos();
checkColumnBounds(columnIndex);
Object value = this.thisRow.getColumnValue(columnIndex - 1);
if (value == null) {
this.wasNullFlag = true;
} else {
this.wasNullFlag = false;
}
if (... | byte[] function(int columnIndex, boolean noConversion) throws SQLException { checkRowPos(); checkColumnBounds(columnIndex); Object value = this.thisRow.getColumnValue(columnIndex - 1); if (value == null) { this.wasNullFlag = true; } else { this.wasNullFlag = false; } if (this.wasNullFlag) { return null; } Field field =... | /**
* Get the value of a column in the current row as a Java byte array.
*
* <p>
* <b>Be warned</b> If the blob is huge, then you may run out of memory.
* </p>
*
* @param columnIndex
* the first column is 1, the second is 2, ...
*
* @return the column value; if the value is SQL NULL, t... | Get the value of a column in the current row as a Java byte array. Be warned If the blob is huge, then you may run out of memory. | getNativeBytes | {
"repo_name": "shubhanshu-gupta/Apache-Solr",
"path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "apache-2.0",
"size": 247329
} | [
"java.sql.SQLException",
"java.sql.Types"
] | import java.sql.SQLException; import java.sql.Types; | import java.sql.*; | [
"java.sql"
] | java.sql; | 545,724 |
@Generated
@Selector("dataRepresentation")
public native NSData dataRepresentation(); | @Selector(STR) native NSData function(); | /**
* Generate a data representation of the drawing.
*
* @return A NSData object containing a representation of the drawing.
*/ | Generate a data representation of the drawing | dataRepresentation | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/pencilkit/PKDrawing.java",
"license": "apache-2.0",
"size": 8438
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,316,956 |
public Builder setTypes(Set<FilterType> types) {
this.types = types;
return this;
} | Builder function(Set<FilterType> types) { this.types = types; return this; } | /**
* Specifies types of operations that respond should contain. Can be omitted if no
* specific types are required: respond will contain every operation.
*
* @param types set of operation types
*/ | Specifies types of operations that respond should contain. Can be omitted if no specific types are required: respond will contain every operation | setTypes | {
"repo_name": "RomanPozdeev/yandex-money-sdk-java",
"path": "src/main/java/com/yandex/money/api/methods/wallet/OperationHistory.java",
"license": "mit",
"size": 9295
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 296,909 |
public void addChangeListener(ChangeListener l)
{
listenerList.add(ChangeListener.class, l);
} | void function(ChangeListener l) { listenerList.add(ChangeListener.class, l); } | /**
* Add a ChangeListener to the model. Usually only called to subscribe an
* AbstractButton's listener to the model.
*
* @param l The listener to add
*/ | Add a ChangeListener to the model. Usually only called to subscribe an AbstractButton's listener to the model | addChangeListener | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/DefaultButtonModel.java",
"license": "gpl-2.0",
"size": 16087
} | [
"javax.swing.event.ChangeListener"
] | import javax.swing.event.ChangeListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,595,580 |
public static String findContainingJar(Class my_class) {
return ClassUtil.findContainingJar(my_class);
}
/**
* Get the memory required to run a task of this job, in bytes. See
* {@link #MAPRED_TASK_MAXVMEM_PROPERTY}
* <p/>
* This method is deprecated. Now, different memory limits can be
* set ... | static String function(Class my_class) { return ClassUtil.findContainingJar(my_class); } /** * Get the memory required to run a task of this job, in bytes. See * {@link #MAPRED_TASK_MAXVMEM_PROPERTY} * <p/> * This method is deprecated. Now, different memory limits can be * set for map and reduce tasks of a job, in MB. ... | /**
* Find a jar that contains a class of the same name, if any.
* It will return a jar file, even if that is not the first thing
* on the class path that has a class with the same name.
*
* @param my_class the class to find.
* @return a jar file that contains the class, or null.
* @throws IOExce... | Find a jar that contains a class of the same name, if any. It will return a jar file, even if that is not the first thing on the class path that has a class with the same name | findContainingJar | {
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java",
"license": "mit",
"size": 69550
} | [
"org.apache.hadoop.util.ClassUtil"
] | import org.apache.hadoop.util.ClassUtil; | import org.apache.hadoop.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,215,081 |
@Test
public void testStable() {
// Create mock of flow table : flow 1
IOFSwitch sw = createMockSwitch(new long[]{1});
// Create mock of flow entries : flow 1
initMockGraph(new long[]{1});
// synchronize
doSynchronization(sw);
// check if flow is not ch... | void function() { IOFSwitch sw = createMockSwitch(new long[]{1}); initMockGraph(new long[]{1}); doSynchronization(sw); assertEquals(0, idAdded.size()); assertEquals(0, idRemoved.size()); } | /**
* Test that synchronization doesn't affect anything in case either DB and
* flow table has the same entries.
*/ | Test that synchronization doesn't affect anything in case either DB and flow table has the same entries | testStable | {
"repo_name": "opennetworkinglab/spring-open",
"path": "src/test/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizerTest.java",
"license": "apache-2.0",
"size": 12029
} | [
"net.floodlightcontroller.core.IOFSwitch",
"org.junit.Assert"
] | import net.floodlightcontroller.core.IOFSwitch; import org.junit.Assert; | import net.floodlightcontroller.core.*; import org.junit.*; | [
"net.floodlightcontroller.core",
"org.junit"
] | net.floodlightcontroller.core; org.junit; | 1,954,788 |
public static void unzip(File pZipFile, String pDestination) throws IOException {
unzip(new File(pDestination), pZipFile);
} | static void function(File pZipFile, String pDestination) throws IOException { unzip(new File(pDestination), pZipFile); } | /**
* Extract a zipped file into the provided destination directory defined by
* a path in string format
*
* @param pZipFile The zip file to extract
* @param pDestination The path to the destination directory
* @throws IOException If something goes wrong, in most cases if pZipFile
* d... | Extract a zipped file into the provided destination directory defined by a path in string format | unzip | {
"repo_name": "kit-data-manager/base",
"path": "Commons/src/main/java/edu/kit/dama/util/ZipUtils.java",
"license": "apache-2.0",
"size": 15855
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 843,705 |
private static void readTableColumns(DatabaseMetaData meta,
String schemaPattern, DBTable table) throws SQLException {
ResultSet columns = null;
try {
if (null != schemaPattern && schemaPattern.trim().length() > 0)
schemaPattern = schemaPattern.trim();
else
schemaPattern = meta.getUserName();// ... | static void function(DatabaseMetaData meta, String schemaPattern, DBTable table) throws SQLException { ResultSet columns = null; try { if (null != schemaPattern && schemaPattern.trim().length() > 0) schemaPattern = schemaPattern.trim(); else schemaPattern = meta.getUserName(); columns = meta .getColumns(null, schemaPat... | /**
* Read the columns from the DatabaseMetaData and notify the given table of
* the colums
*
* @param meta
* @param schemaPattern
* @param table
* @throws java.sql.SQLException
*/ | Read the columns from the DatabaseMetaData and notify the given table of the colums | readTableColumns | {
"repo_name": "3203317/ppp",
"path": "framework-core2/src/main/java/cn/newcapec/framework/core/model/dbmeta/MetaDataRetriever.java",
"license": "mit",
"size": 8734
} | [
"java.sql.DatabaseMetaData",
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 700,170 |
public final void deleteUser(final String username) throws SEITANException {
if (conn == null) {
throw new IllegalStateException("The database wasn't initialized");
}
try {
Statement st = null;
st = conn.createStatement();
st.executeUpdate("de... | final void function(final String username) throws SEITANException { if (conn == null) { throw new IllegalStateException(STR); } try { Statement st = null; st = conn.createStatement(); st.executeUpdate(STRSTR\";"); st = conn.createStatement(); st.executeUpdate(STRSTR\";"); } catch (SQLException e) { throw new IllegalSta... | /**
* Deletes the user with the given username.
* @param username username
* @throws SEITANException
* Something went wrong.
*/ | Deletes the user with the given username | deleteUser | {
"repo_name": "joergwicker/seitan",
"path": "seitan-api-impl/src/main/java/org/kramerlab/seitan/api/impl/database/SQLiteAccessor.java",
"license": "gpl-3.0",
"size": 9173
} | [
"java.sql.SQLException",
"java.sql.Statement",
"org.kramerlab.seitan.api.impl.exceptions.SEITANException"
] | import java.sql.SQLException; import java.sql.Statement; import org.kramerlab.seitan.api.impl.exceptions.SEITANException; | import java.sql.*; import org.kramerlab.seitan.api.impl.exceptions.*; | [
"java.sql",
"org.kramerlab.seitan"
] | java.sql; org.kramerlab.seitan; | 695,970 |
@Test
public void testIncludesAllPositive09() throws Exception {
TestPerformer testPerformer;
String modelFileName;
String oclFileName;
oclFileName = "standardlibrary/collection/includesAllPositive09.ocl";
modelFileName = "testmodel.uml";
testPerformer =
TestPerformer.getInstance(AllStandardL... | void function() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = STR; modelFileName = STR; testPerformer = TestPerformer.getInstance(AllStandardLibraryTests.META_MODEL_ID, AllStandardLibraryTests.MODEL_BUNDLE, AllStandardLibraryTests.MODEL_DIRECTORY); testPerformer... | /**
* <p>
* A test case testing the method
* <code>Collection->includesAll(Collection(T))</code>.
* </p>
*/ | A test case testing the method <code>Collection->includesAll(Collection(T))</code>. | testIncludesAllPositive09 | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "tests/org.dresdenocl.ocl2parser.test/src/org/dresdenocl/ocl2parser/test/standardlibrary/TestCollection.java",
"license": "lgpl-3.0",
"size": 77031
} | [
"org.dresdenocl.ocl2parser.test.TestPerformer"
] | import org.dresdenocl.ocl2parser.test.TestPerformer; | import org.dresdenocl.ocl2parser.test.*; | [
"org.dresdenocl.ocl2parser"
] | org.dresdenocl.ocl2parser; | 2,058,339 |
public void setVariable(String variableName, Object value) throws RemoteException,
MatlabInvocationException; | void function(String variableName, Object value) throws RemoteException, MatlabInvocationException; | /**
* Sets the variable to the given <code>value</code>.
*
* @param variableName
* @param value
* @throws RemoteException
* @throws MatlabInvocationException
*/ | Sets the variable to the given <code>value</code> | setVariable | {
"repo_name": "langmo/youscope",
"path": "plugins/matlab-scripting/src/main/java/org/youscope/plugin/matlabscripting/MatlabInternalProxy.java",
"license": "gpl-2.0",
"size": 10089
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 2,366,394 |
private void getLogicalToVisualRunsMap()
{
if (isGoodLogicalToVisualRunsMap) {
return;
}
int count = countRuns();
if ((logicalToVisualRunsMap == null) ||
(logicalToVisualRunsMap.length < count)) {
logicalToVisualRunsMap = new int[count];
... | void function() { if (isGoodLogicalToVisualRunsMap) { return; } int count = countRuns(); if ((logicalToVisualRunsMap == null) (logicalToVisualRunsMap.length < count)) { logicalToVisualRunsMap = new int[count]; } int i; long[] keys = new long[count]; for (i = 0; i < count; i++) { keys[i] = ((long)(runs[i].start)<<32) + ... | /**
* Compute the logical to visual run mapping
*/ | Compute the logical to visual run mapping | getLogicalToVisualRunsMap | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/sun/text/bidi/BidiBase.java",
"license": "gpl-2.0",
"size": 152381
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 713,040 |
@Override
public double deleteFile(File file) {
double result = 0.0;
// check if the file is valid or not
if (!isFileValid(file, "deleteFile()")) {
return result;
}
double seekTime = getSeekTime(file.getSize());
double transferTime = getTransferTime(file.getSize());
// check if the file is in the ... | double function(File file) { double result = 0.0; if (!isFileValid(file, STR)) { return result; } double seekTime = getSeekTime(file.getSize()); double transferTime = getTransferTime(file.getSize()); if (contains(file)) { fileList.remove(file); nameList.remove(file.getName()); currentSize -= file.getSize(); result = se... | /**
* Removes a file from the storage. The time taken (in seconds) for deleting the file can also
* be found using {@link gridsim.datagrid.File#getTransactionTime()}.
*
* @param file the file which is removed from the storage is returned through this parameter
* @return the time taken (in seconds) for deleti... | Removes a file from the storage. The time taken (in seconds) for deleting the file can also be found using <code>gridsim.datagrid.File#getTransactionTime()</code> | deleteFile | {
"repo_name": "Sukoon-Sharma/OpenSim",
"path": "src/org/opensim/OpensimStorageServer.java",
"license": "lgpl-3.0",
"size": 19131
} | [
"org.cloudbus.cloudsim.File"
] | import org.cloudbus.cloudsim.File; | import org.cloudbus.cloudsim.*; | [
"org.cloudbus.cloudsim"
] | org.cloudbus.cloudsim; | 2,687,195 |
public List<Integer> getInts(String key, int def) {
List<String> vals = getStrings(key);
if (vals == null) {
return null;
}
List<Integer> ints = new ArrayList<Integer>(vals.size());
for (String val : vals) {
try {
ints.add(Integer.parseInt(val));
} catch (NumberFormatException ex) {
ints.... | List<Integer> function(String key, int def) { List<String> vals = getStrings(key); if (vals == null) { return null; } List<Integer> ints = new ArrayList<Integer>(vals.size()); for (String val : vals) { try { ints.add(Integer.parseInt(val)); } catch (NumberFormatException ex) { ints.add(def); } } return ints; } | /**
* Looks for integer values within this map. If any of the found values does
* not conform to a valid integer format, it is replaced with <tt>def</tt>.
*
* @param key
* The key.
* @param def
* The default value.
* @return The values with the specified key or <tt>null</tt> if no... | Looks for integer values within this map. If any of the found values does not conform to a valid integer format, it is replaced with def | getInts | {
"repo_name": "extronics/dbdoc",
"path": "src/dbdoc/Arguments.java",
"license": "mit",
"size": 5964
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 935,140 |
private List<URL> getClasspaths(DependencyResolutionResult dependencyResolutionResult)
throws MalformedURLException {
List<URL> artifactPaths = new ArrayList<>();
artifactPaths.add(buildOutputDirectory.toURI().toURL());
for (Dependency dependency: dependencyResolutionResult.getD... | List<URL> function(DependencyResolutionResult dependencyResolutionResult) throws MalformedURLException { List<URL> artifactPaths = new ArrayList<>(); artifactPaths.add(buildOutputDirectory.toURI().toURL()); for (Dependency dependency: dependencyResolutionResult.getDependencies()) { Artifact artifact = dependency.getArt... | /**
* Returns a list of {@link URL}s that need to be in the classpath before executing any of the Java code in the
* current project.
*/ | Returns a list of <code>URL</code>s that need to be in the classpath before executing any of the Java code in the current project | getClasspaths | {
"repo_name": "fschopp/cloudkeeper",
"path": "cloudkeeper-maven/cloudkeeper-maven-plugin/src/main/java/xyz/cloudkeeper/maven/CompileBundleMojo.java",
"license": "apache-2.0",
"size": 19867
} | [
"java.net.MalformedURLException",
"java.util.ArrayList",
"java.util.List",
"org.apache.maven.project.DependencyResolutionResult",
"org.eclipse.aether.artifact.Artifact",
"org.eclipse.aether.graph.Dependency"
] | import java.net.MalformedURLException; import java.util.ArrayList; import java.util.List; import org.apache.maven.project.DependencyResolutionResult; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.graph.Dependency; | import java.net.*; import java.util.*; import org.apache.maven.project.*; import org.eclipse.aether.artifact.*; import org.eclipse.aether.graph.*; | [
"java.net",
"java.util",
"org.apache.maven",
"org.eclipse.aether"
] | java.net; java.util; org.apache.maven; org.eclipse.aether; | 1,199,162 |
@Override
public Document getByDocumentHeaderId(String documentHeaderId) throws WorkflowException {
if (documentHeaderId == null) {
throw new IllegalArgumentException("invalid (null) documentHeaderId");
}
boolean internalUserSession = false;
try {
/... | Document function(String documentHeaderId) throws WorkflowException { if (documentHeaderId == null) { throw new IllegalArgumentException(STR); } boolean internalUserSession = false; try { if (GlobalVariables.getUserSession() == null) { internalUserSession = true; GlobalVariables.setUserSession(new UserSession(KRADConst... | /**
* This is temporary until workflow 2.0 and reads from a table to get documents whose status has changed to A
* (approved - no
* outstanding approval actions requested)
*
* @param documentHeaderId
* @return Document
* @throws WorkflowException
*/ | This is temporary until workflow 2.0 and reads from a table to get documents whose status has changed to A (approved - no outstanding approval actions requested) | getByDocumentHeaderId | {
"repo_name": "ua-eas/ua-rice-2.1.9",
"path": "impl/src/main/java/org/kuali/rice/krad/service/impl/DocumentServiceImpl.java",
"license": "apache-2.0",
"size": 53133
} | [
"org.kuali.rice.kew.api.WorkflowDocument",
"org.kuali.rice.kew.api.exception.WorkflowException",
"org.kuali.rice.krad.UserSession",
"org.kuali.rice.krad.UserSessionUtils",
"org.kuali.rice.krad.document.Document",
"org.kuali.rice.krad.util.GlobalVariables",
"org.kuali.rice.krad.util.KRADConstants"
] | import org.kuali.rice.kew.api.WorkflowDocument; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.krad.UserSession; import org.kuali.rice.krad.UserSessionUtils; import org.kuali.rice.krad.document.Document; import org.kuali.rice.krad.util.GlobalVariables; import org.kuali.rice.krad.util.K... | import org.kuali.rice.kew.api.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.krad.*; import org.kuali.rice.krad.document.*; import org.kuali.rice.krad.util.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,148,786 |
public void checkBottomSidePiece(Map<PieceSide,String> requiredConnectedSidesMap, PuzzlePiece pieceToObserve, SideNames connectedSide, String direction){
if(pieceToObserve.getBottomSide().isConnected()) {
updateRequiredSidesMapForValidJoin(requiredConnectedSidesMap,pieceToObserve.getBottomSide(),connectedSide... | void function(Map<PieceSide,String> requiredConnectedSidesMap, PuzzlePiece pieceToObserve, SideNames connectedSide, String direction){ if(pieceToObserve.getBottomSide().isConnected()) { updateRequiredSidesMapForValidJoin(requiredConnectedSidesMap,pieceToObserve.getBottomSide(),connectedSide,direction); } } | /**
* Check the bottom side of piece under observation and get the required sides that should also be connected.
*
* @param requiredConnectedSidesMap
* @param pieceToObserve
* @param connectedSide
* @param direction
*/ | Check the bottom side of piece under observation and get the required sides that should also be connected | checkBottomSidePiece | {
"repo_name": "5331k/CubeSolver",
"path": "cubesolver/src/main/java/org/khan/solver/cubesolver/puzzle/cube/Cube.java",
"license": "mit",
"size": 14651
} | [
"java.util.Map",
"org.khan.solver.cubesolver.puzzle.PuzzlePiece",
"org.khan.solver.cubesolver.puzzle.piece.sides.PieceSide",
"org.khan.solver.cubesolver.puzzle.piece.sides.SideNames"
] | import java.util.Map; import org.khan.solver.cubesolver.puzzle.PuzzlePiece; import org.khan.solver.cubesolver.puzzle.piece.sides.PieceSide; import org.khan.solver.cubesolver.puzzle.piece.sides.SideNames; | import java.util.*; import org.khan.solver.cubesolver.puzzle.*; import org.khan.solver.cubesolver.puzzle.piece.sides.*; | [
"java.util",
"org.khan.solver"
] | java.util; org.khan.solver; | 978,316 |
public HashMap<String, ReferenceLine> getAllXAxisReferenceLines() {
return referenceLinesXAxis;
} | HashMap<String, ReferenceLine> function() { return referenceLinesXAxis; } | /**
* Returns all the x-axis references lines as a hashmap, with the labels as
* the keys.
*
* @return hashmap of all reference lines
*/ | Returns all the x-axis references lines as a hashmap, with the labels as the keys | getAllXAxisReferenceLines | {
"repo_name": "nikgoodley-ibboost/jsparklines",
"path": "src/main/java/no/uib/jsparklines/renderers/JSparklines3dTableCellRenderer.java",
"license": "apache-2.0",
"size": 19066
} | [
"java.util.HashMap",
"no.uib.jsparklines.renderers.util.ReferenceLine"
] | import java.util.HashMap; import no.uib.jsparklines.renderers.util.ReferenceLine; | import java.util.*; import no.uib.jsparklines.renderers.util.*; | [
"java.util",
"no.uib.jsparklines"
] | java.util; no.uib.jsparklines; | 1,507,409 |
public void shutdownOutput() throws IOException {
implCreateIfNeeded();
impl.shutdownOutput();
} | void function() throws IOException { implCreateIfNeeded(); impl.shutdownOutput(); } | /**
* Shuts down the output side of the socket.
*
* @throws IOException
*/ | Shuts down the output side of the socket | shutdownOutput | {
"repo_name": "szpaddy/android-4.1.2_r2-core",
"path": "java/android/net/LocalSocket.java",
"license": "apache-2.0",
"size": 9399
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,038,672 |
private void threeRegisterOperation() throws AssemblerException
{
String instruction = currentToken.getValue();
expectedNextToken("three register normal instruction");
String destinationRegister = currentToken.getValue();
ensureTokenEquality("(" + instruction
+ ") Expected a destination register, fou... | void function() throws AssemblerException { String instruction = currentToken.getValue(); expectedNextToken(STR); String destinationRegister = currentToken.getValue(); ensureTokenEquality("(" + instruction + STR, PLPTokenType.ADDRESS); expectedNextToken(STR); ensureTokenEquality("(" + instruction + STR + destinationReg... | /**
* xxx $rd, $rs, $rt
*
* @throws AssemblerException
*/ | xxx $rd, $rs, $rt | threeRegisterOperation | {
"repo_name": "dhawal9035/WebPLP",
"path": "src/main/java/edu/asu/plp/tool/backend/plpisa/assembler/DisposablePLPAssembler.java",
"license": "apache-2.0",
"size": 57769
} | [
"edu.asu.plp.tool.backend.isa.exceptions.AssemblerException"
] | import edu.asu.plp.tool.backend.isa.exceptions.AssemblerException; | import edu.asu.plp.tool.backend.isa.exceptions.*; | [
"edu.asu.plp"
] | edu.asu.plp; | 1,198,562 |
void addExperimenters(SecurityContext ctx, GroupData group,
List<ExperimenterData> experimenters)
throws DSOutOfServiceException, DSAccessException
{
Connector c = getConnector(ctx, true, false);
Iterator<ExperimenterData> i = experimenters.iterator();
try {
IAdminPrx svc = c.getAdminService();
... | void addExperimenters(SecurityContext ctx, GroupData group, List<ExperimenterData> experimenters) throws DSOutOfServiceException, DSAccessException { Connector c = getConnector(ctx, true, false); Iterator<ExperimenterData> i = experimenters.iterator(); try { IAdminPrx svc = c.getAdminService(); List<ExperimenterGroup> ... | /**
* Adds the experimenters to the specified group.
*
* @param ctx The security context.
* @param group The group to add the experimenters to.
* @param experimenters The experimenters to add.
* @return See above.
* @throws DSOutOfServiceException If the connection is broken, or logged in
* @throws DSAc... | Adds the experimenters to the specified group | addExperimenters | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java",
"license": "gpl-2.0",
"size": 286379
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import java.util.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,598,252 |
private int indexDir(final File dataDir, final String suffix)
throws Exception {
try {
final CreateIndexRequestBuilder cirb = client.admin().indices()
.prepareCreate("owlpad-index");
cirb.execute().actionGet();
} catch (final IndexAlreadyExists... | int function(final File dataDir, final String suffix) throws Exception { try { final CreateIndexRequestBuilder cirb = client.admin().indices() .prepareCreate(STR); cirb.execute().actionGet(); } catch (final IndexAlreadyExistsException e) { LOG.info(STR, e); } final BulkRequestBuilder br = client.prepareBulk(); final Li... | /**
* Entry point for directory indexing
*
* @param dataDir
* @param suffix
* @return
* @throws Exception
*/ | Entry point for directory indexing | indexDir | {
"repo_name": "julesbond007/owlpad",
"path": "owlpad-service-impl/src/main/java/com/owlpad/service/impl/index/ESIndexServiceImpl.java",
"license": "mit",
"size": 8568
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder",
"org.elasticsearch.action.bulk.BulkRequestBuilder",
"org.elasticsearch.action.bulk.BulkResponse",
"org.elasticsearch.indices.IndexAlreadyExistsException"
] | import java.io.File; import java.util.ArrayList; import java.util.List; import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder; import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.indices.IndexAlreadyExistsException... | import java.io.*; import java.util.*; import org.elasticsearch.action.admin.indices.create.*; import org.elasticsearch.action.bulk.*; import org.elasticsearch.indices.*; | [
"java.io",
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.indices"
] | java.io; java.util; org.elasticsearch.action; org.elasticsearch.indices; | 506,422 |
protected Node nextSibling(Node n, Node root) {
while (true) {
if (n == root) {
return null;
}
Node result = n.getNextSibling();
if (result == null) {
result = n.getParentNode();
if (result == null || result == r... | Node function(Node n, Node root) { while (true) { if (n == root) { return null; } Node result = n.getNextSibling(); if (result == null) { result = n.getParentNode(); if (result == null result == root) { return null; } if (acceptNode(result) == NodeFilter.FILTER_SKIP) { n = result; continue; } return null; } switch (acc... | /**
* Returns the next sibling of the given node.
*/ | Returns the next sibling of the given node | nextSibling | {
"repo_name": "shyamalschandra/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/traversal/DOMTreeWalker.java",
"license": "apache-2.0",
"size": 10742
} | [
"org.w3c.dom.Node",
"org.w3c.dom.traversal.NodeFilter"
] | import org.w3c.dom.Node; import org.w3c.dom.traversal.NodeFilter; | import org.w3c.dom.*; import org.w3c.dom.traversal.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,826,355 |
public static <V> Map<AlgorithmChangeParameter, V> convert(Map<String, V> nameValues) {
Map<AlgorithmChangeParameter, V> result = new HashMap<AlgorithmChangeParameter, V>();
for (Map.Entry<String, V> entry : nameValues.entrySet()) {
AlgorithmChangeParameter param = AlgorithmChangePara... | static <V> Map<AlgorithmChangeParameter, V> function(Map<String, V> nameValues) { Map<AlgorithmChangeParameter, V> result = new HashMap<AlgorithmChangeParameter, V>(); for (Map.Entry<String, V> entry : nameValues.entrySet()) { AlgorithmChangeParameter param = AlgorithmChangeParameter.valueOf(entry.getKey()); result.put... | /**
* Converts a name-value to a instance-value map.
*
* @param <V> the value type
* @param nameValues the name-values to be converted
* @return the converted map
* @throws IllegalArgumentException if one of the names is not a constant of this enum
*/ | Converts a name-value to a instance-value map | convert | {
"repo_name": "QualiMaster/Infrastructure",
"path": "QualiMaster.Events/src/eu/qualimaster/pipeline/AlgorithmChangeParameter.java",
"license": "apache-2.0",
"size": 8970
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 232,458 |
public static Timer setInterval(final Function function, long delay)
{
Timer t = new Timer();
t.scheduleAtFixedRate(new TimerTask(){ | static Timer function(final Function function, long delay) { Timer t = new Timer(); t.scheduleAtFixedRate(new TimerTask(){ | /**
* Schedule a task for repeated fixed-rate execution after a specific delay has passed.
* @param the task to schedule. Receives no args. Note that the function will be
* run on a Timer thread, and not the UI Thread.
* @param delay amount of time in milliseconds before execution.
* @return the created Timer... | Schedule a task for repeated fixed-rate execution after a specific delay has passed | setInterval | {
"repo_name": "phil-brown/javaQuery",
"path": "src/self/philbrown/javaQuery/$.java",
"license": "apache-2.0",
"size": 101555
} | [
"java.util.Timer",
"java.util.TimerTask"
] | import java.util.Timer; import java.util.TimerTask; | import java.util.*; | [
"java.util"
] | java.util; | 1,774,520 |
public static GroupBucket createSelectGroupBucket(
TrafficTreatment treatment) {
return new DefaultGroupBucket(GroupDescription.Type.SELECT,
treatment,
(short) 1,
... | static GroupBucket function( TrafficTreatment treatment) { return new DefaultGroupBucket(GroupDescription.Type.SELECT, treatment, (short) 1, null, null); } | /**
* Creates select group bucket with weight as 1.
*
* @param treatment traffic treatment associated with group bucket
* @return select group bucket object
*/ | Creates select group bucket with weight as 1 | createSelectGroupBucket | {
"repo_name": "sonu283304/onos",
"path": "core/api/src/main/java/org/onosproject/net/group/DefaultGroupBucket.java",
"license": "apache-2.0",
"size": 8851
} | [
"org.onosproject.net.flow.TrafficTreatment"
] | import org.onosproject.net.flow.TrafficTreatment; | import org.onosproject.net.flow.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 567,858 |
public ApiResponse<List<CharacterOpportunitiesResponse>> getCharactersCharacterIdOpportunitiesWithHttpInfo(
Integer characterId, String datasource, String ifNoneMatch, String token) throws ApiException {
okhttp3.Call localVarCall = getCharactersCharacterIdOpportunitiesValidateBeforeCall(characte... | ApiResponse<List<CharacterOpportunitiesResponse>> function( Integer characterId, String datasource, String ifNoneMatch, String token) throws ApiException { okhttp3.Call localVarCall = getCharactersCharacterIdOpportunitiesValidateBeforeCall(characterId, datasource, ifNoneMatch, token, null); Type localVarReturnType = ne... | /**
* Get a character's completed tasks Return a list of tasks finished by
* a character --- This route is cached for up to 3600 seconds SSO Scope:
* esi-characters.read_opportunities.v1
*
* @param characterId
* An EVE character ID (required)
* @param datasource
*... | Get a character's completed tasks Return a list of tasks finished by a character --- This route is cached for up to 3600 seconds SSO Scope: esi-characters.read_opportunities.v1 | getCharactersCharacterIdOpportunitiesWithHttpInfo | {
"repo_name": "burberius/eve-esi",
"path": "src/main/java/net/troja/eve/esi/api/OpportunitiesApi.java",
"license": "apache-2.0",
"size": 109329
} | [
"com.google.gson.reflect.TypeToken",
"java.lang.reflect.Type",
"java.util.List",
"net.troja.eve.esi.ApiException",
"net.troja.eve.esi.ApiResponse",
"net.troja.eve.esi.model.CharacterOpportunitiesResponse"
] | import com.google.gson.reflect.TypeToken; import java.lang.reflect.Type; import java.util.List; import net.troja.eve.esi.ApiException; import net.troja.eve.esi.ApiResponse; import net.troja.eve.esi.model.CharacterOpportunitiesResponse; | import com.google.gson.reflect.*; import java.lang.reflect.*; import java.util.*; import net.troja.eve.esi.*; import net.troja.eve.esi.model.*; | [
"com.google.gson",
"java.lang",
"java.util",
"net.troja.eve"
] | com.google.gson; java.lang; java.util; net.troja.eve; | 624,662 |
public void testConstructClassClassOfTObjectArray() {
ConstructorUtils constructUtils = new ConstructorUtils();
TestBean testBean = constructUtils.constructClass(TestBean.class, null);
assertNotNull(testBean);
assertEquals(0, testBean.getMyInt());
assertEquals("woot", testBe... | void function() { ConstructorUtils constructUtils = new ConstructorUtils(); TestBean testBean = constructUtils.constructClass(TestBean.class, null); assertNotNull(testBean); assertEquals(0, testBean.getMyInt()); assertEquals("woot", testBean.getMyString()); testBean = constructUtils.constructClass(TestBean.class, new O... | /**
* Test method for {@link org.azeckoski.reflectutils.ConstructorUtils#constructClass(java.lang.Class, java.lang.Object[])}.
*/ | Test method for <code>org.azeckoski.reflectutils.ConstructorUtils#constructClass(java.lang.Class, java.lang.Object[])</code> | testConstructClassClassOfTObjectArray | {
"repo_name": "kevintcl/reflectutils",
"path": "src/test/java/org/azeckoski/reflectutils/ConstructorUtilsTest.java",
"license": "apache-2.0",
"size": 19229
} | [
"org.azeckoski.reflectutils.classes.TestBean"
] | import org.azeckoski.reflectutils.classes.TestBean; | import org.azeckoski.reflectutils.classes.*; | [
"org.azeckoski.reflectutils"
] | org.azeckoski.reflectutils; | 877,284 |
public static double computePRAuc(List<ValueLabelPair> pairs) {
double posClassSize = 0;
for (int i = 0; i < pairs.size(); i++) {
posClassSize += (pairs.get(i).isLabel()) ? 1 : 0;
}
if (posClassSize == 0) { // cannot compute any AUC in this case, dunno if 0.0 is actually correct, maybe 1/2?
ret... | static double function(List<ValueLabelPair> pairs) { double posClassSize = 0; for (int i = 0; i < pairs.size(); i++) { posClassSize += (pairs.get(i).isLabel()) ? 1 : 0; } if (posClassSize == 0) { return 0.0; } Collections.sort(pairs); Collections.reverse(pairs); double rho = Double.POSITIVE_INFINITY; double fp = 0, tp ... | /**
* compute area under the Precision-Recall curve. Algorithm from "Data mining and analysis" Zaki & Meira, 2014.
* Adapted according to IMCL2006 paper by Davis & Goadrich.
*
*/ | compute area under the Precision-Recall curve. Algorithm from "Data mining and analysis" Zaki & Meira, 2014. Adapted according to IMCL2006 paper by Davis & Goadrich | computePRAuc | {
"repo_name": "Data2Semantics/mustard",
"path": "mustard-learners/src/main/java/org/data2semantics/mustard/learners/evaluation/utils/AUCUtils.java",
"license": "mit",
"size": 4197
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,225,330 |
public List<Double> platesAggregated(PlateDouble plate, double[] weights) {
Preconditions.checkNotNull(plate, "The plate cannot be null.");
Preconditions.checkNotNull(weights, "Weights array cannot be null.");
List<Double> aggregated = new ArrayList<Double>();
... | List<Double> function(PlateDouble plate, double[] weights) { Preconditions.checkNotNull(plate, STR); Preconditions.checkNotNull(weights, STR); List<Double> aggregated = new ArrayList<Double>(); for (WellDouble well : plate) { List<Double> input = well.data(); for(int i = 0; i < input.size(); i++) { aggregated.add(input... | /**
* Returns the aggregated weighted statistic for the plate.
* @param PlateDouble the plate
* @param double[] weights for the data set
* @return the aggregated result
*/ | Returns the aggregated weighted statistic for the plate | platesAggregated | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/doubleflex/stat/DescriptiveStatisticListDoubleWeights.java",
"license": "apache-2.0",
"size": 26697
} | [
"com.github.jessemull.microflex.doubleflex.plate.PlateDouble",
"com.github.jessemull.microflex.doubleflex.plate.WellDouble",
"com.google.common.base.Preconditions",
"java.util.ArrayList",
"java.util.List"
] | import com.github.jessemull.microflex.doubleflex.plate.PlateDouble; import com.github.jessemull.microflex.doubleflex.plate.WellDouble; import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.List; | import com.github.jessemull.microflex.doubleflex.plate.*; import com.google.common.base.*; import java.util.*; | [
"com.github.jessemull",
"com.google.common",
"java.util"
] | com.github.jessemull; com.google.common; java.util; | 2,276,078 |
public void testCloning() {
StandardPieToolTipGenerator g1 = new StandardPieToolTipGenerator();
StandardPieToolTipGenerator g2 = null;
try {
g2 = (StandardPieToolTipGenerator) g1.clone();
}
catch (CloneNotSupportedException e) {
System.err.println("Fai... | void function() { StandardPieToolTipGenerator g1 = new StandardPieToolTipGenerator(); StandardPieToolTipGenerator g2 = null; try { g2 = (StandardPieToolTipGenerator) g1.clone(); } catch (CloneNotSupportedException e) { System.err.println(STR); } assertTrue(g1 != g2); assertTrue(g1.getClass() == g2.getClass()); assertTr... | /**
* Some checks for cloning.
*/ | Some checks for cloning | testCloning | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/tests/org/jfree/chart/labels/junit/StandardPieToolTipGeneratorTests.java",
"license": "gpl-2.0",
"size": 6241
} | [
"org.jfree.chart.labels.StandardPieToolTipGenerator"
] | import org.jfree.chart.labels.StandardPieToolTipGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,269,490 |
private void markSubroutineWalkDFS(final BitSet sub, int index,
final BitSet anyvisited) {
while (true) {
AbstractInsnNode node = instructions.get(index);
// don't visit a node twice
if (sub.get(index)) {
return;
}
sub.... | void function(final BitSet sub, int index, final BitSet anyvisited) { while (true) { AbstractInsnNode node = instructions.get(index); if (sub.get(index)) { return; } sub.set(index); if (anyvisited.get(index)) { dualCitizens.set(index); if (LOGGING) { log(STR + index + STR); } } anyvisited.set(index); if (node.getType()... | /**
* Performs a simple DFS of the instructions, assigning each to the
* subroutine <code>sub</code>. Starts from <code>index</code>. Invoked only
* by <code>markSubroutineWalk()</code>.
*
* @param sub
* the subroutine whose instructions must be computed.
* @param index
... | Performs a simple DFS of the instructions, assigning each to the subroutine <code>sub</code>. Starts from <code>index</code>. Invoked only by <code>markSubroutineWalk()</code> | markSubroutineWalkDFS | {
"repo_name": "ikisis/spec4j",
"path": "spec4j-agent/src/main/java/spec4j/asm/commons/JSRInlinerAdapter.java",
"license": "apache-2.0",
"size": 31268
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 498,575 |
private boolean tagResource(String resourceId, String tagName) {
boolean result = false;
if(! Utils.isEmptyOrWhitespaces(tagName)) {
Tag tag = new Tag( "Name", tagName );
CreateTagsRequest ctr = new CreateTagsRequest(Collections.singletonList(resourceId), Arrays.asList( tag ));
try {
this.ec2Api.cre... | boolean function(String resourceId, String tagName) { boolean result = false; if(! Utils.isEmptyOrWhitespaces(tagName)) { Tag tag = new Tag( "Name", tagName ); CreateTagsRequest ctr = new CreateTagsRequest(Collections.singletonList(resourceId), Arrays.asList( tag )); try { this.ec2Api.createTags( ctr ); } catch(Excepti... | /**
* Tags the specified resource, eg. a VM or volume (basically, it gives it a name).
* @param resourceId The ID of the resource to tag
* @param tagName The resource's name
* @return true if the tag was done, false otherwise
*/ | Tags the specified resource, eg. a VM or volume (basically, it gives it a name) | tagResource | {
"repo_name": "gibello/roboconf",
"path": "core/roboconf-target-iaas-ec2/src/main/java/net/roboconf/target/ec2/internal/Ec2MachineConfigurator.java",
"license": "apache-2.0",
"size": 15383
} | [
"com.amazonaws.services.ec2.model.CreateTagsRequest",
"com.amazonaws.services.ec2.model.Tag",
"java.util.Arrays",
"java.util.Collections",
"net.roboconf.core.utils.Utils"
] | import com.amazonaws.services.ec2.model.CreateTagsRequest; import com.amazonaws.services.ec2.model.Tag; import java.util.Arrays; import java.util.Collections; import net.roboconf.core.utils.Utils; | import com.amazonaws.services.ec2.model.*; import java.util.*; import net.roboconf.core.utils.*; | [
"com.amazonaws.services",
"java.util",
"net.roboconf.core"
] | com.amazonaws.services; java.util; net.roboconf.core; | 214,754 |
List<BridgeConfiguration> getBridgeConfigurations(); | List<BridgeConfiguration> getBridgeConfigurations(); | /**
* Returns the bridges configured for this server.
*/ | Returns the bridges configured for this server | getBridgeConfigurations | {
"repo_name": "rh-messaging/jboss-activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java",
"license": "apache-2.0",
"size": 37418
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,154,641 |
public static Map<String, Object> getObject(Object object, String path)
throws SvetovidJsonException {
object = get(object, path);
if (object == null) {
return null;
}
try {
@SuppressWarnings("unchecked")
Map<String, Object> map... | static Map<String, Object> function(Object object, String path) throws SvetovidJsonException { object = get(object, path); if (object == null) { return null; } try { @SuppressWarnings(STR) Map<String, Object> map = (Map<String, Object>) object; return map; } catch (ClassCastException e) { throw new SvetovidJsonExceptio... | /**
* Returns an object value at the specified JSON path resolved on the given
* object.
*
* @param object
* the object to apply the path to
* @param path
* the path to follow
*
* @return the object value extracted from the given object using t... | Returns an object value at the specified JSON path resolved on the given object | getObject | {
"repo_name": "ivanpribela/svetovid-lib",
"path": "src/org/svetovid/util/JsonHelper.java",
"license": "apache-2.0",
"size": 31618
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,028,644 |
protected void setRpcServiceServerAddress(Configuration conf,
InetSocketAddress serviceRPCAddress) {
setServiceAddress(conf, NetUtils.getHostPortString(serviceRPCAddress));
} | void function(Configuration conf, InetSocketAddress serviceRPCAddress) { setServiceAddress(conf, NetUtils.getHostPortString(serviceRPCAddress)); } | /**
* Modifies the configuration passed to contain the service rpc address setting
*/ | Modifies the configuration passed to contain the service rpc address setting | setRpcServiceServerAddress | {
"repo_name": "1tylermitchell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 73799
} | [
"java.net.InetSocketAddress",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.net.NetUtils"
] | import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.net.NetUtils; | import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.net.*; | [
"java.net",
"org.apache.hadoop"
] | java.net; org.apache.hadoop; | 996,421 |
public void removePosition(final Position position) {
_positions.remove(position);
} | void function(final Position position) { _positions.remove(position); } | /**
* Removes a position from the list.
*
* @param position the position to remove, not null
*/ | Removes a position from the list | removePosition | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/main/java/com/opengamma/core/position/impl/SimplePortfolioNode.java",
"license": "apache-2.0",
"size": 14221
} | [
"com.opengamma.core.position.Position"
] | import com.opengamma.core.position.Position; | import com.opengamma.core.position.*; | [
"com.opengamma.core"
] | com.opengamma.core; | 2,512,090 |
static CharSource asCharSource(
ZipFile file, ZipEntry entry, Charset charset) {
return asByteSource(file, entry).asCharSource(charset);
}
private static final class ZipEntryByteSource extends ByteSource {
private final ZipFile file;
private final ZipEntry entry;
ZipEntryByteSource(ZipFil... | static CharSource asCharSource( ZipFile file, ZipEntry entry, Charset charset) { return asByteSource(file, entry).asCharSource(charset); } private static final class ZipEntryByteSource extends ByteSource { private final ZipFile file; private final ZipEntry entry; ZipEntryByteSource(ZipFile file, ZipEntry entry) { this.... | /**
* Returns a new {@link CharSource} for reading the contents of the given
* entry in the given zip file as text using the given charset.
*/ | Returns a new <code>CharSource</code> for reading the contents of the given entry in the given zip file as text using the given charset | asCharSource | {
"repo_name": "shakamunyi/beam",
"path": "sdks/java/core/src/main/java/com/google/cloud/dataflow/sdk/util/ZipFiles.java",
"license": "apache-2.0",
"size": 10761
} | [
"com.google.common.base.Preconditions",
"com.google.common.io.ByteSource",
"com.google.common.io.CharSource",
"java.nio.charset.Charset",
"java.util.zip.ZipEntry",
"java.util.zip.ZipFile"
] | import com.google.common.base.Preconditions; import com.google.common.io.ByteSource; import com.google.common.io.CharSource; import java.nio.charset.Charset; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; | import com.google.common.base.*; import com.google.common.io.*; import java.nio.charset.*; import java.util.zip.*; | [
"com.google.common",
"java.nio",
"java.util"
] | com.google.common; java.nio; java.util; | 2,859,269 |
private void suspendExecution(final int suspendReason) {
this.mode = DebugMode.SUSPENDED;
this.getDebugTarget().suspended(suspendReason);
// Wait until someone wakes us up, i.e. sets the debug mode
// to something other than "suspend".
synchronized (this) {
while (this.mode.equals(DebugMode.SUSPENDED))... | void function(final int suspendReason) { this.mode = DebugMode.SUSPENDED; this.getDebugTarget().suspended(suspendReason); synchronized (this) { while (this.mode.equals(DebugMode.SUSPENDED)) { try { this.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } resumeExecution(); this.changedVariables = new ... | /**
* Suspends the execution for the given reason, sends the appropriate event to the debug target, and waits for
* the resume.
*
* @param suspendReason
* The reason for the suspend.
*/ | Suspends the execution for the given reason, sends the appropriate event to the debug target, and waits for the resume | suspendExecution | {
"repo_name": "team-worthwhile/worthwhile",
"path": "implementierung/src/worthwhile.debugger/src/edu/kit/iti/formal/pse/worthwhile/debugger/model/WorthwhileDebugEventListener.java",
"license": "bsd-3-clause",
"size": 15226
} | [
"edu.kit.iti.formal.pse.worthwhile.model.ast.VariableDeclaration",
"java.util.HashSet"
] | import edu.kit.iti.formal.pse.worthwhile.model.ast.VariableDeclaration; import java.util.HashSet; | import edu.kit.iti.formal.pse.worthwhile.model.ast.*; import java.util.*; | [
"edu.kit.iti",
"java.util"
] | edu.kit.iti; java.util; | 2,885,951 |
public static String getPathOr(String var, String def) {
String path = AcePathfinder.INSTANCE.getPath(var);
if (path == null) {
path = def;
}
return path;
} | static String function(String var, String def) { String path = AcePathfinder.INSTANCE.getPath(var); if (path == null) { path = def; } return path; } | /**
* Get a valid path from the pathfiner, or if not found, a user-specified path.
*/ | Get a valid path from the pathfiner, or if not found, a user-specified path | getPathOr | {
"repo_name": "agmip/dome",
"path": "src/main/java/org/agmip/dome/Command.java",
"license": "bsd-3-clause",
"size": 3901
} | [
"org.agmip.ace.AcePathfinder"
] | import org.agmip.ace.AcePathfinder; | import org.agmip.ace.*; | [
"org.agmip.ace"
] | org.agmip.ace; | 632,344 |
public void testDependentElementsRemovalUsingForeignKey()
{
try
{
DependentHolder field;
Object fieldObjectId = null;
Object[] elements = new Object[COLLECTION_SIZE*4];
Object[] elementObjectId = new Object[COLLECTION_SIZE*4];
... | void function() { try { DependentHolder field; Object fieldObjectId = null; Object[] elements = new Object[COLLECTION_SIZE*4]; Object[] elementObjectId = new Object[COLLECTION_SIZE*4]; boolean expectedDelete[] = new boolean[COLLECTION_SIZE*4]; field = new DependentHolder(200, STR); int elementNumber = 0; for (int i=0;i... | /**
* test removal of dependent element from a set/list using ForeignKey.
*/ | test removal of dependent element from a set/list using ForeignKey | testDependentElementsRemovalUsingForeignKey | {
"repo_name": "datanucleus/tests",
"path": "jdo/identity/src/test/org/datanucleus/tests/DependentFieldTest.java",
"license": "apache-2.0",
"size": 93864
} | [
"javax.jdo.JDOObjectNotFoundException",
"javax.jdo.PersistenceManager",
"javax.jdo.Transaction",
"org.datanucleus.samples.dependentfield.DependentElement1",
"org.datanucleus.samples.dependentfield.DependentElement2",
"org.datanucleus.samples.dependentfield.DependentElement3",
"org.datanucleus.samples.de... | import javax.jdo.JDOObjectNotFoundException; import javax.jdo.PersistenceManager; import javax.jdo.Transaction; import org.datanucleus.samples.dependentfield.DependentElement1; import org.datanucleus.samples.dependentfield.DependentElement2; import org.datanucleus.samples.dependentfield.DependentElement3; import org.da... | import javax.jdo.*; import org.datanucleus.samples.dependentfield.*; | [
"javax.jdo",
"org.datanucleus.samples"
] | javax.jdo; org.datanucleus.samples; | 984,061 |
public RecoveryInfo getLastRecoveryInfo() {
return lastRecoveryInfo;
} | RecoveryInfo function() { return lastRecoveryInfo; } | /**
* Info about the last recovery.
*/ | Info about the last recovery | getLastRecoveryInfo | {
"repo_name": "bjorndm/prebake",
"path": "code/third_party/bdb/src/com/sleepycat/je/dbi/EnvironmentImpl.java",
"license": "apache-2.0",
"size": 87347
} | [
"com.sleepycat.je.recovery.RecoveryInfo"
] | import com.sleepycat.je.recovery.RecoveryInfo; | import com.sleepycat.je.recovery.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 1,742,169 |
public int readPIX15Int(String name) throws IOException {
newDumpLevel(name, "PIX15");
int ret = ((int) readUB(1, "reserved") << 24)
| ((int) readUB(5, "red") << 19)
| ((int) readUB(5, "green") << 11)
| ((int) readUB(5, "blue") << 3);
endDumpLe... | int function(String name) throws IOException { newDumpLevel(name, "PIX15"); int ret = ((int) readUB(1, STR) << 24) ((int) readUB(5, "red") << 19) ((int) readUB(5, "green") << 11) ((int) readUB(5, "blue") << 3); endDumpLevel(); return ret; } | /**
* Reads one PIX15 value from the stream
*
* @param name
* @return PIX15 value
* @throws IOException
*/ | Reads one PIX15 value from the stream | readPIX15Int | {
"repo_name": "Djamana/jpexs-decompiler",
"path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java",
"license": "gpl-3.0",
"size": 128697
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 225,312 |
public void writeTo(final WebResponse response)
{
Args.notNull(response, "response");
Collections.sort(actions);
for (Action action : actions)
{
action.invoke(response);
}
} | void function(final WebResponse response) { Args.notNull(response, STR); Collections.sort(actions); for (Action action : actions) { action.invoke(response); } } | /**
* Writes the content of the buffer to the specified response. Also sets the properties and and
* headers.
*
* @param response
*/ | Writes the content of the buffer to the specified response. Also sets the properties and and headers | writeTo | {
"repo_name": "astrapi69/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/protocol/http/BufferedWebResponse.java",
"license": "apache-2.0",
"size": 13163
} | [
"java.util.Collections",
"org.apache.wicket.request.http.WebResponse",
"org.apache.wicket.util.lang.Args"
] | import java.util.Collections; import org.apache.wicket.request.http.WebResponse; import org.apache.wicket.util.lang.Args; | import java.util.*; import org.apache.wicket.request.http.*; import org.apache.wicket.util.lang.*; | [
"java.util",
"org.apache.wicket"
] | java.util; org.apache.wicket; | 2,568,928 |
EAttribute getType_IsVolatile(); | EAttribute getType_IsVolatile(); | /**
* Returns the meta object for the attribute '{@link org.xtext.example.delphi.astm.Type#isIsVolatile <em>Is Volatile</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Is Volatile</em>'.
* @see org.xtext.example.delphi.astm.Type#isIsVolatile()
* @se... | Returns the meta object for the attribute '<code>org.xtext.example.delphi.astm.Type#isIsVolatile Is Volatile</code>'. | getType_IsVolatile | {
"repo_name": "adolfosbh/cs2as",
"path": "org.xtext.example.delphi/emf-gen/org/xtext/example/delphi/astm/AstmPackage.java",
"license": "epl-1.0",
"size": 670467
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,037,286 |
int originalDepth = context.getCurrentDepth();
int targetDepth = originalDepth + 1;
if (context.isStartOfDocument()) {
targetDepth += 1;
}
T topicConfig = createConfiguration();
String id = null;
while (true) {
XMLEvent xmlEvent = context.nextEv... | int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) { targetDepth += 1; } T topicConfig = createConfiguration(); String id = null; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) { return new SimpleEntry<String, Notif... | /**
* Id (aka configuration name) isn't modeled on the actual {@link NotificationConfiguration}
* class but as the key name in the map of configurations in
* {@link BucketNotificationConfiguration}
*/ | Id (aka configuration name) isn't modeled on the actual <code>NotificationConfiguration</code> class but as the key name in the map of configurations in <code>BucketNotificationConfiguration</code> | unmarshall | {
"repo_name": "mahaliachante/aws-sdk-java",
"path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/NotificationConfigurationStaxUnmarshaller.java",
"license": "apache-2.0",
"size": 4369
} | [
"com.amazonaws.services.s3.model.NotificationConfiguration",
"com.amazonaws.transform.SimpleTypeStaxUnmarshallers",
"java.util.AbstractMap",
"javax.xml.stream.events.XMLEvent"
] | import com.amazonaws.services.s3.model.NotificationConfiguration; import com.amazonaws.transform.SimpleTypeStaxUnmarshallers; import java.util.AbstractMap; import javax.xml.stream.events.XMLEvent; | import com.amazonaws.services.s3.model.*; import com.amazonaws.transform.*; import java.util.*; import javax.xml.stream.events.*; | [
"com.amazonaws.services",
"com.amazonaws.transform",
"java.util",
"javax.xml"
] | com.amazonaws.services; com.amazonaws.transform; java.util; javax.xml; | 381,178 |
@FromAnyThread
public synchronized void addOnBeforeCreateJmeContext(@NotNull final Runnable runnable) {
this.onBeforeCreateJmeContext.add(runnable);
} | synchronized void function(@NotNull final Runnable runnable) { this.onBeforeCreateJmeContext.add(runnable); } | /**
* Do some things before when jME context will be created.
*
* @param runnable the action.
*/ | Do some things before when jME context will be created | addOnBeforeCreateJmeContext | {
"repo_name": "JavaSaBr/jME3-SpaceShift-Editor",
"path": "src/main/java/com/ss/editor/manager/InitializationManager.java",
"license": "apache-2.0",
"size": 4386
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 271,230 |
void getFactoryJson(@NotNull String workspaceId, @NotNull String path, @NotNull AsyncRequestCallback<Factory> callback); | void getFactoryJson(@NotNull String workspaceId, @NotNull String path, @NotNull AsyncRequestCallback<Factory> callback); | /**
* Retrieves factory object prototype for given project with it's attributes. It's not the stored factory object.
*
* @param workspaceId
* workspace id
* @param path
* project path
* @param callback
* callback which returns snippet of the factory or exc... | Retrieves factory object prototype for given project with it's attributes. It's not the stored factory object | getFactoryJson | {
"repo_name": "dhuebner/che",
"path": "core/platform-api-client-gwt/che-core-client-gwt-factory/src/main/java/org/eclipse/che/api/factory/gwt/client/FactoryServiceClient.java",
"license": "epl-1.0",
"size": 3610
} | [
"javax.validation.constraints.NotNull",
"org.eclipse.che.api.factory.shared.dto.Factory",
"org.eclipse.che.ide.rest.AsyncRequestCallback"
] | import javax.validation.constraints.NotNull; import org.eclipse.che.api.factory.shared.dto.Factory; import org.eclipse.che.ide.rest.AsyncRequestCallback; | import javax.validation.constraints.*; import org.eclipse.che.api.factory.shared.dto.*; import org.eclipse.che.ide.rest.*; | [
"javax.validation",
"org.eclipse.che"
] | javax.validation; org.eclipse.che; | 539,088 |
private void printUsage(Options opts) {
new HelpFormatter().printHelp("ApplicationMaster", opts);
} | void function(Options opts) { new HelpFormatter().printHelp(STR, opts); } | /**
* Helper function to print usage.
*
* @param opts arsed command line options
*/ | Helper function to print usage | printUsage | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/ApplicationMaster.java",
"license": "apache-2.0",
"size": 33544
} | [
"org.apache.commons.cli.HelpFormatter",
"org.apache.commons.cli.Options"
] | import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,258,071 |
@POST
public void create(Departamento departamento){
departamentoEJB.create(departamento);
} | void function(Departamento departamento){ departamentoEJB.create(departamento); } | /**
* Crear un departamento
* @param departamento
*/ | Crear un departamento | create | {
"repo_name": "rootbean/adsi2017_backend_completo",
"path": "src/main/java/co/edu/sena/adsi/rest/services/DepartamentoREST.java",
"license": "mit",
"size": 1514
} | [
"co.edu.sena.adsi.jpa.entities.Departamento"
] | import co.edu.sena.adsi.jpa.entities.Departamento; | import co.edu.sena.adsi.jpa.entities.*; | [
"co.edu.sena"
] | co.edu.sena; | 175,336 |
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
TFC_Core.bindTexture(new ResourceLocation(Reference.MOD_ID, Reference.ASSET_PATH_GUI + "gui_chest.png"));
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
int var5 = (this.width - this.xSize) / 2;
int var6 = (this.heigh... | void function(float par1, int par2, int par3) { TFC_Core.bindTexture(new ResourceLocation(Reference.MOD_ID, Reference.ASSET_PATH_GUI + STR)); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int var5 = (this.width - this.xSize) / 2; int var6 = (this.height - this.ySize) / 2; this.drawTexturedModalRect(var5, var6, 0, 0, this.xSi... | /**
* Draw the background layer for the GuiContainer (everything behind the items)
*/ | Draw the background layer for the GuiContainer (everything behind the items) | drawGuiContainerBackgroundLayer | {
"repo_name": "AnodeCathode/TFCraft",
"path": "src/Common/com/bioxx/tfc/GUI/GuiChestTFC.java",
"license": "gpl-3.0",
"size": 3035
} | [
"com.bioxx.tfc.Core",
"com.bioxx.tfc.Reference",
"net.minecraft.util.ResourceLocation"
] | import com.bioxx.tfc.Core; import com.bioxx.tfc.Reference; import net.minecraft.util.ResourceLocation; | import com.bioxx.tfc.*; import net.minecraft.util.*; | [
"com.bioxx.tfc",
"net.minecraft.util"
] | com.bioxx.tfc; net.minecraft.util; | 117,806 |
public boolean isSelfContained(FXOMObject fxomObject) {
final List<FXOMIntrinsic> references = fxomObject.collectReferences(null);
int externalCount = 0;
for (FXOMIntrinsic reference : references) {
assert reference.getSource() != null;
final FXOMObject target = fxIds... | boolean function(FXOMObject fxomObject) { final List<FXOMIntrinsic> references = fxomObject.collectReferences(null); int externalCount = 0; for (FXOMIntrinsic reference : references) { assert reference.getSource() != null; final FXOMObject target = fxIds.get(reference.getSource()); assert target != null; if (target.isD... | /**
* Returns true if tree below fxomObject does not contain any fx:reference
* pointing outside of the tree.
*
* @param fxomObject an fxom object (never null)
* @return true if fxomObject subtree is self-contained
*/ | Returns true if tree below fxomObject does not contain any fx:reference pointing outside of the tree | isSelfContained | {
"repo_name": "maiklos-mirrors/jfx78",
"path": "apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMIndex.java",
"license": "gpl-2.0",
"size": 3640
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,020,650 |
@Override
public Object getObject(ResultSet rs, int index)
throws SQLException
{
if (_isOrdinal) {
Object[] values = getValues();
if (values == null)
return null;
int v = rs.getInt(index);
return rs.wasNull() ? null : values[v];
}
else {
Class cl = getBeanC... | Object function(ResultSet rs, int index) throws SQLException { if (_isOrdinal) { Object[] values = getValues(); if (values == null) return null; int v = rs.getInt(index); return rs.wasNull() ? null : values[v]; } else { Class cl = getBeanClass(); String name = rs.getString(index); return rs.wasNull() ? null : Enum.valu... | /**
* Gets the value.
*/ | Gets the value | getObject | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/amber/type/EnumType.java",
"license": "gpl-2.0",
"size": 8231
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,247,157 |
CompletableFuture<ContactStateEnum> getCurrentState(); | CompletableFuture<ContactStateEnum> getCurrentState(); | /**
* Retrieves the state of the contact. This is whether the contact is detected or not. Detected
* contact means door/window is closed.
*
* @return a future that will contain the contact's state
*/ | Retrieves the state of the contact. This is whether the contact is detected or not. Detected contact means door/window is closed | getCurrentState | {
"repo_name": "beowulfe/HAP-Java",
"path": "src/main/java/io/github/hapjava/accessories/ContactSensorAccessory.java",
"license": "mit",
"size": 1405
} | [
"io.github.hapjava.characteristics.impl.contactsensor.ContactStateEnum",
"java.util.concurrent.CompletableFuture"
] | import io.github.hapjava.characteristics.impl.contactsensor.ContactStateEnum; import java.util.concurrent.CompletableFuture; | import io.github.hapjava.characteristics.impl.contactsensor.*; import java.util.concurrent.*; | [
"io.github.hapjava",
"java.util"
] | io.github.hapjava; java.util; | 190,073 |
public void reconnectClient() {
if (!mGoogleApiClient.isConnected()) {
Log.w(TAG, "reconnectClient() called when client is not connected.");
// interpret it as a request to connect
connect();
} else {
debugLog("Reconnecting client.");
mGoog... | void function() { if (!mGoogleApiClient.isConnected()) { Log.w(TAG, STR); connect(); } else { debugLog(STR); mGoogleApiClient.reconnect(); } } | /**
* Disconnects the API client, then connects again.
*/ | Disconnects the API client, then connects again | reconnectClient | {
"repo_name": "Dwite/BiggerSmaller",
"path": "app/src/main/java/Utils/GameHelper.java",
"license": "mit",
"size": 40357
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,346,246 |
public static Region fromValue(final String s3RegionId) throws IllegalArgumentException
{
if (s3RegionId == null || s3RegionId.equals("US"))
return Region.US_Standard;
for (Region region : Region.values()) {
List<String> regionIds = region.regionIds;
if (regio... | static Region function(final String s3RegionId) throws IllegalArgumentException { if (s3RegionId == null s3RegionId.equals("US")) return Region.US_Standard; for (Region region : Region.values()) { List<String> regionIds = region.regionIds; if (regionIds != null && regionIds.contains(s3RegionId)) return region; } throw ... | /**
* Returns the Amazon S3 Region enumeration value representing the specified Amazon
* S3 Region ID string. If specified string doesn't map to a known Amazon S3
* Region, then an <code>IllegalArgumentException</code> is thrown.
*
* @param s3RegionId
* The Amazon S3 region ID s... | Returns the Amazon S3 Region enumeration value representing the specified Amazon S3 Region ID string. If specified string doesn't map to a known Amazon S3 Region, then an <code>IllegalArgumentException</code> is thrown | fromValue | {
"repo_name": "flofreud/aws-sdk-java",
"path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/Region.java",
"license": "apache-2.0",
"size": 9533
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,480,597 |
@Override
public void startHandleDrag(final Point2D aLocalPoint, final PInputEvent aEvent) {
if (pfeature.getViewer().isFeatureDebugging()) {
if (log.isDebugEnabled()) {
log.debug("startHandleDrag");
}
}
rotation = 0.0d;
// InfoNode entfer... | void function(final Point2D aLocalPoint, final PInputEvent aEvent) { if (pfeature.getViewer().isFeatureDebugging()) { if (log.isDebugEnabled()) { log.debug(STR); } } rotation = 0.0d; final Collection selArr = pfeature.getViewer().getFeatureCollection().getSelectedFeatures(); for (final Object o : selArr) { final PFeatu... | /**
* Override this method to get notified when the handle starts to get dragged.
*
* @param aLocalPoint DOCUMENT ME!
* @param aEvent DOCUMENT ME!
*/ | Override this method to get notified when the handle starts to get dragged | startHandleDrag | {
"repo_name": "cismet/cismap-commons",
"path": "src/main/java/de/cismet/cismap/commons/gui/piccolo/RotationPHandle.java",
"license": "lgpl-3.0",
"size": 11598
} | [
"edu.umd.cs.piccolo.event.PInputEvent",
"java.awt.geom.Point2D",
"java.util.Collection"
] | import edu.umd.cs.piccolo.event.PInputEvent; import java.awt.geom.Point2D; import java.util.Collection; | import edu.umd.cs.piccolo.event.*; import java.awt.geom.*; import java.util.*; | [
"edu.umd.cs",
"java.awt",
"java.util"
] | edu.umd.cs; java.awt; java.util; | 2,311,132 |
@Override
public boolean equals(Object obj)
{
if(obj instanceof QName)
{
return m_qname.equals(obj);
}
else
return super.equals(obj);
}
public Arg(QName qname, XObject val, boolean isFromWithParam)
{
m_qname = qname;
m_val = val;
m_isFromWithParam = isFromWithPar... | boolean function(Object obj) { if(obj instanceof QName) { return m_qname.equals(obj); } else return super.equals(obj); } public Arg(QName qname, XObject val, boolean isFromWithParam) { m_qname = qname; m_val = val; m_isFromWithParam = isFromWithParam; m_isVisible = !isFromWithParam; m_expression = null; } | /**
* Equality function specialized for the variable name. If the argument
* is not a qname, it will deligate to the super class.
*
* @param obj the reference object with which to compare.
* @return <code>true</code> if this object is the same as the obj
* argument; <code>false</code> o... | Equality function specialized for the variable name. If the argument is not a qname, it will deligate to the super class | equals | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xpath/internal/Arg.java",
"license": "apache-2.0",
"size": 6522
} | [
"com.sun.org.apache.xml.internal.utils.QName",
"com.sun.org.apache.xpath.internal.objects.XObject"
] | import com.sun.org.apache.xml.internal.utils.QName; import com.sun.org.apache.xpath.internal.objects.XObject; | import com.sun.org.apache.xml.internal.utils.*; import com.sun.org.apache.xpath.internal.objects.*; | [
"com.sun.org"
] | com.sun.org; | 714,661 |
public List<Location> searchNearby(Double latitude, Double longitude, Double distanceInMiles, String indexerPath, int count) throws IOException {
double distanceInDeg = DistanceUtils.dist2Degrees(distanceInMiles,DistanceUtils.EARTH_EQUATORIAL_RADIUS_MI);
SpatialArgs spatialArgs = new SpatialArgs(SpatialOperat... | List<Location> function(Double latitude, Double longitude, Double distanceInMiles, String indexerPath, int count) throws IOException { double distanceInDeg = DistanceUtils.dist2Degrees(distanceInMiles,DistanceUtils.EARTH_EQUATORIAL_RADIUS_MI); SpatialArgs spatialArgs = new SpatialArgs(SpatialOperation.IsWithin, ctx.mak... | /**
* Returns a list of location near a certain coordinate.
* @param latitude, @param longitude - Center of search area
* @param distanceInMiles - Search Radius in miles
* @param indexerPath - Path to Lucene index
* @param count - Upper bound to number of results
* @return - List of locations sorted by po... | Returns a list of location near a certain coordinate | searchNearby | {
"repo_name": "chrismattmann/lucene-geo-gazetteer",
"path": "src/main/java/edu/usc/ir/geo/gazetteer/GeoNameResolver.java",
"license": "apache-2.0",
"size": 25860
} | [
"com.spatial4j.core.distance.DistanceUtils",
"edu.usc.ir.geo.gazetteer.domain.Location",
"java.io.IOException",
"java.util.HashMap",
"java.util.List",
"org.apache.lucene.search.Filter",
"org.apache.lucene.search.IndexSearcher",
"org.apache.lucene.search.MatchAllDocsQuery",
"org.apache.lucene.search.... | import com.spatial4j.core.distance.DistanceUtils; import edu.usc.ir.geo.gazetteer.domain.Location; import java.io.IOException; import java.util.HashMap; import java.util.List; import org.apache.lucene.search.Filter; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.MatchAllDocsQuery; import... | import com.spatial4j.core.distance.*; import edu.usc.ir.geo.gazetteer.domain.*; import java.io.*; import java.util.*; import org.apache.lucene.search.*; import org.apache.lucene.spatial.query.*; | [
"com.spatial4j.core",
"edu.usc.ir",
"java.io",
"java.util",
"org.apache.lucene"
] | com.spatial4j.core; edu.usc.ir; java.io; java.util; org.apache.lucene; | 2,598,760 |
protected Profile getValue() {
//PreferenceManager.setDefaultValues(getContext(), getKey(), Context.MODE_PRIVATE, R.xml.sensors, false);
getPreferenceManager().setSharedPreferencesName(ProfileFragment.NAME_SHARED_FILE_PROFILE);
SharedPreferences sp = getPreferenceManager().getSharedPreferen... | Profile function() { getPreferenceManager().setSharedPreferencesName(ProfileFragment.NAME_SHARED_FILE_PROFILE); SharedPreferences sp = getPreferenceManager().getSharedPreferences(); myValue = sp.getString(getKey(), mDefault); String[] tabValues = myValue.split(";"); Profile profile = new Profile(tabValues); return prof... | /**
* Get value of current preference in sharedPreference
* @return
*/ | Get value of current preference in sharedPreference | getValue | {
"repo_name": "aurrelhebert/android-app-warp10",
"path": "app/src/main/java/com/warp10/app/LoadProfile.java",
"license": "apache-2.0",
"size": 15338
} | [
"android.content.SharedPreferences"
] | import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 1,339,848 |
@SuppressWarnings("rawtypes")
public void toggleXAxisVisibility() {
for (IAxis axis : this.chart.getAxesXBottom()) {
if (axis.getTraces().size() < 1)
axis.setVisible(false);
else
axis.setVisible(true);
}
if (!this.xAxis2.isVisible() && !this.xAxis1.isVisible())
this.xAxis1.setVisible(true);
... | @SuppressWarnings(STR) void function() { for (IAxis axis : this.chart.getAxesXBottom()) { if (axis.getTraces().size() < 1) axis.setVisible(false); else axis.setVisible(true); } if (!this.xAxis2.isVisible() && !this.xAxis1.isVisible()) this.xAxis1.setVisible(true); } | /**
* Toggles the visibility of x1 and x2-axis. When both axis are used, both
* are shown. When only one is used, only that one is shown. When none is
* used, only x1 is shown.
*/ | Toggles the visibility of x1 and x2-axis. When both axis are used, both are shown. When only one is used, only that one is shown. When none is used, only x1 is shown | toggleXAxisVisibility | {
"repo_name": "marcel-stud/DNA",
"path": "src/dna/visualization/components/visualizer/Visualizer.java",
"license": "gpl-3.0",
"size": 12341
} | [
"info.monitorenter.gui.chart.IAxis"
] | import info.monitorenter.gui.chart.IAxis; | import info.monitorenter.gui.chart.*; | [
"info.monitorenter.gui"
] | info.monitorenter.gui; | 225,382 |
private synchronized Map<DataFlavor, LinkedHashSet<String>> getFlavorToNative() {
if (!isMapInitialized) {
initSystemFlavorMap();
}
return flavorToNative;
}
private Map<String, LinkedHashSet<String>> textTypeToNative = new HashMap<>();
private boolean isMa... | synchronized Map<DataFlavor, LinkedHashSet<String>> function() { if (!isMapInitialized) { initSystemFlavorMap(); } return flavorToNative; } private Map<String, LinkedHashSet<String>> textTypeToNative = new HashMap<>(); private boolean isMapInitialized = false; | /**
* Accessor to flavorToNative map. Since we use lazy initialization we must
* use this accessor instead of direct access to the field which may not be
* initialized yet. This method will initialize the field if needed.
*
* @return flavorToNative
*/ | Accessor to flavorToNative map. Since we use lazy initialization we must use this accessor instead of direct access to the field which may not be initialized yet. This method will initialize the field if needed | getFlavorToNative | {
"repo_name": "lostdj/Jaklin-OpenJDK-JDK",
"path": "src/java.desktop/share/classes/java/awt/datatransfer/SystemFlavorMap.java",
"license": "gpl-2.0",
"size": 45924
} | [
"java.util.HashMap",
"java.util.LinkedHashSet",
"java.util.Map"
] | import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,205,198 |
public List<Transaction> getTransactions() {
return transactions;
} | List<Transaction> function() { return transactions; } | /**
* Returns the transactions in this block
*
* @return Transaction list
*/ | Returns the transactions in this block | getTransactions | {
"repo_name": "Toporin/BitcoinCore",
"path": "src/main/java/org/ScripterRon/BitcoinCore/Block.java",
"license": "apache-2.0",
"size": 21066
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,379,353 |
@Override
public void cacheGroupsRefresh() throws IOException {
// does nothing in this provider of user to groups mapping
} | void function() throws IOException { } | /**
* Caches groups, no need to do that for this provider
*/ | Caches groups, no need to do that for this provider | cacheGroupsRefresh | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ShellBasedUnixGroupsMapping.java",
"license": "apache-2.0",
"size": 11628
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,315,123 |
void enterBooleanPredicand(@NotNull SELECTParser.BooleanPredicandContext ctx);
void exitBooleanPredicand(@NotNull SELECTParser.BooleanPredicandContext ctx); | void enterBooleanPredicand(@NotNull SELECTParser.BooleanPredicandContext ctx); void exitBooleanPredicand(@NotNull SELECTParser.BooleanPredicandContext ctx); | /**
* Exit a parse tree produced by {@link SELECTParser#booleanPredicand}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>SELECTParser#booleanPredicand</code> | exitBooleanPredicand | {
"repo_name": "ilucin/relsem-bridge-backend",
"path": "src/com/etk/parser/SELECTListener.java",
"license": "unlicense",
"size": 8962
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,924,670 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jLabel1 = new javax.swing.JLabel();
jLab... | @SuppressWarnings(STR) void function() { jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); cbxDoctoresEditar = new javax.swing.JComboBox<>(); jButton1 = new javax.swing.JButton(); ... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "JuanJoseFJ/ProyectoPacientes",
"path": "ControlPacientes/src/Vistas/JDEditarCita.java",
"license": "gpl-3.0",
"size": 23909
} | [
"javax.swing.table.DefaultTableModel"
] | import javax.swing.table.DefaultTableModel; | import javax.swing.table.*; | [
"javax.swing"
] | javax.swing; | 2,552,389 |
@Nonnull
public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() {
final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>();
if(this.findText != null) {
result.add(new com.microsoft.graph.options.FunctionOption("findText", ... | java.util.List<com.microsoft.graph.options.FunctionOption> function() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.findText != null) { result.add(new com.microsoft.graph.options.FunctionOption(STR, findText)); } if(this.withinText != null) { result.add(new com.micros... | /**
* Gets the functions options from the properties that have been set
* @return a list of function options for the request
*/ | Gets the functions options from the properties that have been set | getFunctionOptions | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/models/WorkbookFunctionsFindBParameterSet.java",
"license": "mit",
"size": 5181
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 64,504 |
public MetricDefinitionInner withUnit(UnitType unit) {
this.unit = unit;
return this;
} | MetricDefinitionInner function(UnitType unit) { this.unit = unit; return this; } | /**
* Set the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'.
*
* @param unit the unit value to set
* @return the MetricDefinitionInner object itself.
*/ | Set the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds' | withUnit | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/implementation/MetricDefinitionInner.java",
"license": "mit",
"size": 3477
} | [
"com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.UnitType"
] | import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.UnitType; | import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 50,833 |
public Map<String, ValueDiff> getUpdates() {
return Collections.unmodifiableMap(this.updates);
} | Map<String, ValueDiff> function() { return Collections.unmodifiableMap(this.updates); } | /**
* The updates this patch contains.
*
* @return a map of attribute key / value pairs.
*/ | The updates this patch contains | getUpdates | {
"repo_name": "beanone/beanone",
"path": "src/main/java/org/beanone/BeanPatch.java",
"license": "apache-2.0",
"size": 5025
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,667,395 |
protected PrintStream findStream() {
Stack<CaptureLog> stack = logs.get();
if (stack != null && !stack.isEmpty()) {
CaptureLog log = stack.peek();
if (log != null) {
PrintStream ps = log.getStream();
if (ps != null) {
return... | PrintStream function() { Stack<CaptureLog> stack = logs.get(); if (stack != null && !stack.isEmpty()) { CaptureLog log = stack.peek(); if (log != null) { PrintStream ps = log.getStream(); if (ps != null) { return ps; } } } return out; } | /**
* Find PrintStream to which the output must be written to.
*/ | Find PrintStream to which the output must be written to | findStream | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/SystemLogHandler.java",
"license": "mit",
"size": 6088
} | [
"java.io.PrintStream",
"java.util.Stack"
] | import java.io.PrintStream; import java.util.Stack; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,373,782 |
public static IVariableBinding findFieldInType(ITypeBinding type, String fieldName) {
if (type.isPrimitive())
return null;
IVariableBinding[] fields = type.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
IVariableBinding field = fields[i];
i... | static IVariableBinding function(ITypeBinding type, String fieldName) { if (type.isPrimitive()) return null; IVariableBinding[] fields = type.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { IVariableBinding field = fields[i]; if (field.getName().equals(fieldName)) return field; } return null; } | /**
* Finds the field specified by <code>fieldName<code> in
* the given <code>type</code>. Returns <code>null</code> if no such field exits.
*
* @param type
* the type to search the field in
* @param fieldName
* the field name
* @return the binding representing th... | Finds the field specified by <code>fieldName<code> in the given <code>type</code>. Returns <code>null</code> if no such field exits | findFieldInType | {
"repo_name": "riuvshin/che-plugins",
"path": "plugin-java/che-plugin-java-ext-java/src/main/java/org/eclipse/che/ide/ext/java/jdt/internal/corext/dom/Bindings.java",
"license": "epl-1.0",
"size": 60447
} | [
"org.eclipse.che.ide.ext.java.jdt.core.dom.ITypeBinding",
"org.eclipse.che.ide.ext.java.jdt.core.dom.IVariableBinding"
] | import org.eclipse.che.ide.ext.java.jdt.core.dom.ITypeBinding; import org.eclipse.che.ide.ext.java.jdt.core.dom.IVariableBinding; | import org.eclipse.che.ide.ext.java.jdt.core.dom.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 1,140,478 |
public AssertionType getAssertionType(InputStream is) throws ParsingException, ConfigurationException, ProcessingException {
if (is == null)
throw logger.nullArgumentError("InputStream");
Document samlDocument = DocumentUtil.getDocument(is);
SAMLParser samlParser = new SAMLParse... | AssertionType function(InputStream is) throws ParsingException, ConfigurationException, ProcessingException { if (is == null) throw logger.nullArgumentError(STR); Document samlDocument = DocumentUtil.getDocument(is); SAMLParser samlParser = new SAMLParser(); JAXPValidationUtil.checkSchemaValidation(samlDocument); retur... | /**
* Read an assertion from an input stream
*
* @param is
*
* @return
*
* @throws ParsingException
* @throws ProcessingException
* @throws ConfigurationException
*/ | Read an assertion from an input stream | getAssertionType | {
"repo_name": "anaerobic/keycloak",
"path": "saml/saml-core/src/main/java/org/keycloak/saml/processing/api/saml/v2/response/SAML2Response.java",
"license": "apache-2.0",
"size": 20159
} | [
"java.io.InputStream",
"org.keycloak.dom.saml.v2.assertion.AssertionType",
"org.keycloak.saml.common.exceptions.ConfigurationException",
"org.keycloak.saml.common.exceptions.ParsingException",
"org.keycloak.saml.common.exceptions.ProcessingException",
"org.keycloak.saml.common.util.DocumentUtil",
"org.k... | import java.io.InputStream; import org.keycloak.dom.saml.v2.assertion.AssertionType; import org.keycloak.saml.common.exceptions.ConfigurationException; import org.keycloak.saml.common.exceptions.ParsingException; import org.keycloak.saml.common.exceptions.ProcessingException; import org.keycloak.saml.common.util.Docume... | import java.io.*; import org.keycloak.dom.saml.v2.assertion.*; import org.keycloak.saml.common.exceptions.*; import org.keycloak.saml.common.util.*; import org.keycloak.saml.processing.core.parsers.saml.*; import org.keycloak.saml.processing.core.saml.v2.common.*; import org.keycloak.saml.processing.core.util.*; import... | [
"java.io",
"org.keycloak.dom",
"org.keycloak.saml",
"org.w3c.dom"
] | java.io; org.keycloak.dom; org.keycloak.saml; org.w3c.dom; | 2,100,584 |
public ByteBuffer acquireByteBufferFromPool()
{
return this.byteBufferPool.acquire();
} | ByteBuffer function() { return this.byteBufferPool.acquire(); } | /**
* Retrieves a ByteBuffer object from this's pool of ByteBuffers. Typically used by a
* ContextManager to store bytes that will be later enqueued to write (and thus released by that
* method).
*
* @return
*/ | Retrieves a ByteBuffer object from this's pool of ByteBuffers. Typically used by a ContextManager to store bytes that will be later enqueued to write (and thus released by that method) | acquireByteBufferFromPool | {
"repo_name": "ecologylab/ecologylabFundamental",
"path": "src/ecologylab/oodss/distributed/impl/NIONetworking.java",
"license": "lgpl-3.0",
"size": 8526
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 885,936 |
public RexNode register(
RelNode rel,
JoinRelType joinType,
List<RexNode> leftKeys) {
assert joinType != null;
if (root == null) {
assert leftKeys == null;
setRoot(rel, false);
return rexBuilder.makeRangeReference(
root.getRowType(),
... | RexNode function( RelNode rel, JoinRelType joinType, List<RexNode> leftKeys) { assert joinType != null; if (root == null) { assert leftKeys == null; setRoot(rel, false); return rexBuilder.makeRangeReference( root.getRowType(), 0, false); } final RexNode joinCond; final int origLeftInputCount = root.getRowType().getFiel... | /**
* Registers a relational expression.
*
* @param rel Relational expression
* @param joinType Join type
* @param leftKeys LHS of IN clause, or null for expressions
* other than IN
* @return Expression with which to refer to the row (or... | Registers a relational expression | register | {
"repo_name": "vlsi/calcite",
"path": "core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java",
"license": "apache-2.0",
"size": 215926
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.calcite.plan.RelOptUtil",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.core.JoinRelType",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.util.Util"
] | import java.util.ArrayList; import java.util.List; import org.apache.calcite.plan.RelOptUtil; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.JoinRelType; import org.apache.calcite.rex.RexNode; import org.apache.calcite.util.Util; | import java.util.*; import org.apache.calcite.plan.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 1,565,315 |
public void setProviderName(ProviderName providerName) {
this.providerName = providerName;
} | void function(ProviderName providerName) { this.providerName = providerName; } | /**
* Sets the providerName.
*/ | Sets the providerName | setProviderName | {
"repo_name": "computergeek1507/openhab",
"path": "bundles/binding/org.openhab.binding.weather/src/main/java/org/openhab/binding/weather/internal/common/ProviderConfig.java",
"license": "epl-1.0",
"size": 2246
} | [
"org.openhab.binding.weather.internal.model.ProviderName"
] | import org.openhab.binding.weather.internal.model.ProviderName; | import org.openhab.binding.weather.internal.model.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 734,985 |
List<SysMenu> selectByExample(SysMenuExample example); | List<SysMenu> selectByExample(SysMenuExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table SYS_MENU
*
* @mbg.generated Thu Sep 14 18:07:38 CST 2017
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table SYS_MENU | selectByExample | {
"repo_name": "micyo202/yan_demo",
"path": "src/main/java/com/yan/common/menu/mapper/SysMenuMapper.java",
"license": "mit",
"size": 2967
} | [
"com.yan.common.menu.model.SysMenu",
"com.yan.common.menu.model.SysMenuExample",
"java.util.List"
] | import com.yan.common.menu.model.SysMenu; import com.yan.common.menu.model.SysMenuExample; import java.util.List; | import com.yan.common.menu.model.*; import java.util.*; | [
"com.yan.common",
"java.util"
] | com.yan.common; java.util; | 819,278 |
public void onDisconnect(IChatComponent reason)
{
logger.info(this.getConnectionInfo() + " lost connection: " + reason.getUnformattedText());
} | void function(IChatComponent reason) { logger.info(this.getConnectionInfo() + STR + reason.getUnformattedText()); } | /**
* Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination
*/ | Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination | onDisconnect | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/server/network/NetHandlerLoginServer.java",
"license": "gpl-3.0",
"size": 11581
} | [
"net.minecraft.util.IChatComponent"
] | import net.minecraft.util.IChatComponent; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 2,126,142 |
private List<DataNode> sortByUser(List<DataNode> nodes)
{
if (CollectionUtils.isEmpty(nodes)) return nodes;
List<DataNode> sorted = new ArrayList<DataNode>();
ListMultimap<Long, DataNode> map = ArrayListMultimap.create();
sorted.add(nodes.get(0)); //default node.
Iterator<DataNode> i = nodes.iterator();
... | List<DataNode> function(List<DataNode> nodes) { if (CollectionUtils.isEmpty(nodes)) return nodes; List<DataNode> sorted = new ArrayList<DataNode>(); ListMultimap<Long, DataNode> map = ArrayListMultimap.create(); sorted.add(nodes.get(0)); Iterator<DataNode> i = nodes.iterator(); DataNode node; while (i.hasNext()) { node... | /**
* Sorts the nodes.
*
* @param nodes The nodes to sort.
* @return See above.
*/ | Sorts the nodes | sortByUser | {
"repo_name": "emilroz/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/LocationDialog.java",
"license": "gpl-2.0",
"size": 52206
} | [
"com.google.common.collect.ArrayListMultimap",
"com.google.common.collect.ListMultimap",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.apache.commons.collections.CollectionUtils",
"org.openmicroscopy.shoola.agents.util.browser.DataNode"
] | import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.openmicroscopy.shoola.agents.util.browser.DataNode; | import com.google.common.collect.*; import java.util.*; import org.apache.commons.collections.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"com.google.common",
"java.util",
"org.apache.commons",
"org.openmicroscopy.shoola"
] | com.google.common; java.util; org.apache.commons; org.openmicroscopy.shoola; | 1,963,132 |
public Parameter createParameter(final String name, final String value)
throws URISyntaxException {
final ParameterFactory factory = (ParameterFactory) getFactory(name);
Parameter parameter = null;
if (factory != null) {
parameter = factory.createParameter(name, value... | Parameter function(final String name, final String value) throws URISyntaxException { final ParameterFactory factory = (ParameterFactory) getFactory(name); Parameter parameter = null; if (factory != null) { parameter = factory.createParameter(name, value); } else if (isExperimentalName(name)) { parameter = new XParamet... | /**
* Creates a parameter.
* @param name name of the parameter
* @param value a parameter value
* @return a component
* @throws URISyntaxException thrown when the specified string is not a valid representation of a URI for selected
* parameters
*/ | Creates a parameter | createParameter | {
"repo_name": "benfortuna/ical4j",
"path": "src/main/java/net/fortuna/ical4j/model/ParameterFactoryImpl.java",
"license": "bsd-3-clause",
"size": 20271
} | [
"java.net.URISyntaxException",
"net.fortuna.ical4j.model.parameter.XParameter"
] | import java.net.URISyntaxException; import net.fortuna.ical4j.model.parameter.XParameter; | import java.net.*; import net.fortuna.ical4j.model.parameter.*; | [
"java.net",
"net.fortuna.ical4j"
] | java.net; net.fortuna.ical4j; | 1,749,542 |
private void applyShape(IShape shape) {
// Extract the shape properties
String selectedValue = shape.getProperty("selected");
String alphaValue = shape.getProperty("alpha");
// Selected
if (selectedValue != null && "true".equals(selectedValue)) {
selected = true;
}
// Alpha
if (alphaValue != ... | void function(IShape shape) { String selectedValue = shape.getProperty(STR); String alphaValue = shape.getProperty("alpha"); if (selectedValue != null && "true".equals(selectedValue)) { selected = true; } if (alphaValue != null) { try { float alphaFloat = Float.valueOf(alphaValue); alpha *= alphaFloat; } catch (NumberF... | /**
* <p>
* Applies the properties of the given shape to the state of the
* ShapeRenderProperties
* </p>
*
* @param shape
* <p>
* The shape to apply (either a child or its ancestors)
* </p>
*/ | Applies the properties of the given shape to the state of the ShapeRenderProperties | applyShape | {
"repo_name": "gorindn/ice",
"path": "src/org.eclipse.ice.viz.service.geometry/src/org/eclipse/ice/viz/service/geometry/widgets/ShapeMaterial.java",
"license": "epl-1.0",
"size": 4204
} | [
"org.eclipse.ice.viz.service.geometry.shapes.IShape"
] | import org.eclipse.ice.viz.service.geometry.shapes.IShape; | import org.eclipse.ice.viz.service.geometry.shapes.*; | [
"org.eclipse.ice"
] | org.eclipse.ice; | 1,521,892 |
@Override
public Query createNamedQuery(String name) {
try {
verifyOpen();
EJBQueryImpl query = new EJBQueryImpl(name, this, true);
query.getDatabaseQueryInternal();
return query;
} catch (RuntimeException e) {
setRollbackOnly();
... | Query function(String name) { try { verifyOpen(); EJBQueryImpl query = new EJBQueryImpl(name, this, true); query.getDatabaseQueryInternal(); return query; } catch (RuntimeException e) { setRollbackOnly(); throw e; } } | /**
* Create an instance of Query for executing a named query (in EJBQL or
* native SQL).
*
* @param name
* the name of a query defined in metadata
* @return the new query instance
*/ | Create an instance of Query for executing a named query (in EJBQL or native SQL) | createNamedQuery | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerImpl.java",
"license": "epl-1.0",
"size": 135266
} | [
"javax.persistence.Query"
] | import javax.persistence.Query; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 1,338,838 |
public void addObject(final RevObject object)
throws IncorrectObjectTypeException {
if (!exclude(object))
addObject(object, 0);
} | void function(final RevObject object) throws IncorrectObjectTypeException { if (!exclude(object)) addObject(object, 0); } | /**
* Include one object to the output file.
* <p>
* Objects are written in the order they are added. If the same object is
* added twice, it may be written twice, creating a larger than necessary
* file.
*
* @param object
* the object to add.
* @throws IncorrectObjectTypeException
* ... | Include one object to the output file. Objects are written in the order they are added. If the same object is added twice, it may be written twice, creating a larger than necessary file | addObject | {
"repo_name": "forge/plugin-undo",
"path": "src/main/jgit/org/jboss/forge/jgit/storage/pack/PackWriter.java",
"license": "epl-1.0",
"size": 71255
} | [
"org.jboss.forge.jgit.errors.IncorrectObjectTypeException",
"org.jboss.forge.jgit.revwalk.RevObject"
] | import org.jboss.forge.jgit.errors.IncorrectObjectTypeException; import org.jboss.forge.jgit.revwalk.RevObject; | import org.jboss.forge.jgit.errors.*; import org.jboss.forge.jgit.revwalk.*; | [
"org.jboss.forge"
] | org.jboss.forge; | 1,195,505 |
protected Set<org.eclipse.uml2.uml.Class> rawAccumulateAllValuesOfcl(final Object[] parameters) {
Set<org.eclipse.uml2.uml.Class> results = new HashSet<org.eclipse.uml2.uml.Class>();
rawAccumulateAllValues(POSITION_CL, parameters, results);
return results;
}
| Set<org.eclipse.uml2.uml.Class> function(final Object[] parameters) { Set<org.eclipse.uml2.uml.Class> results = new HashSet<org.eclipse.uml2.uml.Class>(); rawAccumulateAllValues(POSITION_CL, parameters, results); return results; } | /**
* Retrieve the set of values that occur in matches for cl.
* @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for cl | rawAccumulateAllValuesOfcl | {
"repo_name": "ELTE-Soft/xUML-RT-Executor",
"path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/ExternalEntityGeneralizedMatcher.java",
"license": "epl-1.0",
"size": 10601
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 9,515 |
public BufferedImage getBlurMask() {
return blurMask;
}
| BufferedImage function() { return blurMask; } | /**
* Get the mask used to give the amount of blur at each point.
* @return the mask
* @see #setBlurMask
*/ | Get the mask used to give the amount of blur at each point | getBlurMask | {
"repo_name": "x3r/WarpImage",
"path": "src/com/jhlabs/image/VariableBlurFilter.java",
"license": "mit",
"size": 8103
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,162,498 |
@Test
public void testLocalFsLinkSlashMerge() throws Exception {
LOG.info("Starting testLocalFsLinkSlashMerge");
ConfigUtil.addLinkMergeSlash(conf, "mt",
URI.create(targetTestRoot + "/wd2"));
final URI mountURI = URI.create("file://mt/");
try (FileSystem lViewFS = FileSystem.get(mountURI, co... | void function() throws Exception { LOG.info(STR); ConfigUtil.addLinkMergeSlash(conf, "mt", URI.create(targetTestRoot + "/wd2")); final URI mountURI = URI.create(STR/NewFile"); lViewFS.createNewFile(fileOnRoot); Assert.assertTrue(lViewFS.exists(fileOnRoot)); } } | /**
* Tests root level file with linkMergeSlash with
* ViewFileSystemOverloadScheme.
*/ | Tests root level file with linkMergeSlash with ViewFileSystemOverloadScheme | testLocalFsLinkSlashMerge | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemOverloadSchemeLocalFileSystem.java",
"license": "apache-2.0",
"size": 5533
} | [
"java.net.URI",
"org.junit.Assert"
] | import java.net.URI; import org.junit.Assert; | import java.net.*; import org.junit.*; | [
"java.net",
"org.junit"
] | java.net; org.junit; | 1,744,206 |
public int getMinutes()
{
Number val = getField(DatatypeConstants.MINUTES);
return (val == null) ? 0 : val.intValue();
} | int function() { Number val = getField(DatatypeConstants.MINUTES); return (val == null) ? 0 : val.intValue(); } | /**
* Returns the minutes in this duration as an int, or 0 if not present.
*/ | Returns the minutes in this duration as an int, or 0 if not present | getMinutes | {
"repo_name": "unofficial-opensource-apple/gcc_40",
"path": "libjava/javax/xml/datatype/Duration.java",
"license": "gpl-2.0",
"size": 8336
} | [
"javax.xml.datatype.DatatypeConstants"
] | import javax.xml.datatype.DatatypeConstants; | import javax.xml.datatype.*; | [
"javax.xml"
] | javax.xml; | 1,305,045 |
public VoidFuture newVoidFuture(ResultSetFuture future) {
return new VoidFuture(future);
} | VoidFuture function(ResultSetFuture future) { return new VoidFuture(future); } | /**
* Instantiates a new <code>VoidFuture</code> object.
*
* @author paouelle
*
* @param future the non-<code>null</code> result set future
* @return the corresponding new instance
*/ | Instantiates a new <code>VoidFuture</code> object | newVoidFuture | {
"repo_name": "helenusdriver/helenus",
"path": "api/src/main/java/org/helenus/driver/StatementBridge.java",
"license": "apache-2.0",
"size": 2009
} | [
"com.datastax.driver.core.ResultSetFuture"
] | import com.datastax.driver.core.ResultSetFuture; | import com.datastax.driver.core.*; | [
"com.datastax.driver"
] | com.datastax.driver; | 2,889,716 |
public Future<List<T>> get(String k) {
return getPrefix(k).compose(res -> {
if (res == null) {
return Future.succeededFuture(null);
}
LinkedList<T> t = new LinkedList<>();
for (String s : res) {
t.add(Json.decodeValue(s, clazz));
}
return Future.succeededFuture(... | Future<List<T>> function(String k) { return getPrefix(k).compose(res -> { if (res == null) { return Future.succeededFuture(null); } LinkedList<T> t = new LinkedList<>(); for (String s : res) { t.add(Json.decodeValue(s, clazz)); } return Future.succeededFuture(t); }); } | /**
* get and deserialize values from shared map.
* @param k primary-level key
* @return fut async result with deserialized values on success
*/ | get and deserialize values from shared map | get | {
"repo_name": "folio-org/okapi",
"path": "okapi-core/src/main/java/org/folio/okapi/util/LockedTypedMap2.java",
"license": "apache-2.0",
"size": 2051
} | [
"io.vertx.core.Future",
"io.vertx.core.json.Json",
"java.util.LinkedList",
"java.util.List"
] | import io.vertx.core.Future; import io.vertx.core.json.Json; import java.util.LinkedList; import java.util.List; | import io.vertx.core.*; import io.vertx.core.json.*; import java.util.*; | [
"io.vertx.core",
"java.util"
] | io.vertx.core; java.util; | 351,485 |
protected ORecord readCurrentRecord(ORecord iRecord, final int iMovement) {
if (limit > -1 && browsedRecords >= limit)
// LIMIT REACHED
return null;
do {
final boolean moveResult;
switch (iMovement) {
case 1:
moveResult = nextPosition();
break;
c... | ORecord function(ORecord iRecord, final int iMovement) { if (limit > -1 && browsedRecords >= limit) return null; do { final boolean moveResult; switch (iMovement) { case 1: moveResult = nextPosition(); break; case -1: moveResult = prevPosition(); break; case 0: moveResult = checkCurrentPosition(); break; default: throw... | /**
* Read the current record and increment the counter if the record was found.
*
* @param iRecord
* to read value from database inside it. If record is null link will be created and stored in it.
* @return record which was read from db.
*/ | Read the current record and increment the counter if the record was found | readCurrentRecord | {
"repo_name": "tempbottle/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/iterator/OIdentifiableIterator.java",
"license": "apache-2.0",
"size": 14372
} | [
"com.orientechnologies.common.log.OLogManager",
"com.orientechnologies.orient.core.exception.ODatabaseException",
"com.orientechnologies.orient.core.id.ORecordId",
"com.orientechnologies.orient.core.record.ORecord",
"com.orientechnologies.orient.core.record.ORecordInternal"
] | import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.orient.core.exception.ODatabaseException; import com.orientechnologies.orient.core.id.ORecordId; import com.orientechnologies.orient.core.record.ORecord; import com.orientechnologies.orient.core.record.ORecordInternal; | import com.orientechnologies.common.log.*; import com.orientechnologies.orient.core.exception.*; import com.orientechnologies.orient.core.id.*; import com.orientechnologies.orient.core.record.*; | [
"com.orientechnologies.common",
"com.orientechnologies.orient"
] | com.orientechnologies.common; com.orientechnologies.orient; | 2,415,316 |
@Deprecated
@Override
public void serializeEdit(RepositoryRecord previousRecordState, RepositoryRecord newRecordState, DataOutputStream out) throws IOException {
serializeRecord(newRecordState, out);
} | void function(RepositoryRecord previousRecordState, RepositoryRecord newRecordState, DataOutputStream out) throws IOException { serializeRecord(newRecordState, out); } | /**
* <p>
* Serializes an Edit Record to the log via the given
* {@link DataOutputStream}.
* </p>
*
* @param previousRecordState previous state
* @param newRecordState new state
* @param out stream to write to
* @throws IOException if fail during write
... | Serializes an Edit Record to the log via the given <code>DataOutputStream</code>. | serializeEdit | {
"repo_name": "jtstorck/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-flowfile-repo-serialization/src/main/java/org/apache/nifi/controller/repository/EncryptedSchemaRepositoryRecordSerde.java",
"license": "apache-2.0",
"size": 16556
} | [
"java.io.DataOutputStream",
"java.io.IOException"
] | import java.io.DataOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,929,539 |
public void addBadArraySizeError(final int expectedSize, final int actualSize) throws ValidationException
{
addError(StringFormatter.format(MessageConstants.MESSAGES.invalidArraySize(), expectedSize, actualSize));
}
| void function(final int expectedSize, final int actualSize) throws ValidationException { addError(StringFormatter.format(MessageConstants.MESSAGES.invalidArraySize(), expectedSize, actualSize)); } | /**
* Calls {@link #addError(String)} with a message that indicates
* that an array has the wrong number of elements
*
* @param expectedSize
* @param actualSize
* @throws ValidationException
*/ | Calls <code>#addError(String)</code> with a message that indicates that an array has the wrong number of elements | addBadArraySizeError | {
"repo_name": "Josephblt/lienzo-core",
"path": "src/main/java/com/ait/lienzo/client/core/shape/json/validators/ValidationContext.java",
"license": "apache-2.0",
"size": 9455
} | [
"com.ait.lienzo.client.core.i18n.MessageConstants",
"com.ait.lienzo.client.core.util.StringFormatter"
] | import com.ait.lienzo.client.core.i18n.MessageConstants; import com.ait.lienzo.client.core.util.StringFormatter; | import com.ait.lienzo.client.core.i18n.*; import com.ait.lienzo.client.core.util.*; | [
"com.ait.lienzo"
] | com.ait.lienzo; | 1,747,128 |
protected void validate(List<TableInfo> tableInfos)
{
try
{
KsDef ksDef = cassandra_client.describe_keyspace(databaseName);
onValidateTables(tableInfos, ksDef);
}
catch (Exception ex)
{
log.error("Error occurred while validating {}, Cau... | void function(List<TableInfo> tableInfos) { try { KsDef ksDef = cassandra_client.describe_keyspace(databaseName); onValidateTables(tableInfos, ksDef); } catch (Exception ex) { log.error(STR, databaseName, ex); throw new SchemaGenerationException(ex); } } | /**
* validate method validate schema and table for the list of tableInfos.
*
* @param tableInfos
* list of TableInfos.
*/ | validate method validate schema and table for the list of tableInfos | validate | {
"repo_name": "impetus-opensource/Kundera",
"path": "src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java",
"license": "apache-2.0",
"size": 123023
} | [
"com.impetus.kundera.configure.schema.SchemaGenerationException",
"com.impetus.kundera.configure.schema.TableInfo",
"java.util.List",
"org.apache.cassandra.thrift.KsDef"
] | import com.impetus.kundera.configure.schema.SchemaGenerationException; import com.impetus.kundera.configure.schema.TableInfo; import java.util.List; import org.apache.cassandra.thrift.KsDef; | import com.impetus.kundera.configure.schema.*; import java.util.*; import org.apache.cassandra.thrift.*; | [
"com.impetus.kundera",
"java.util",
"org.apache.cassandra"
] | com.impetus.kundera; java.util; org.apache.cassandra; | 28,658 |
public FieldType getFieldType() {
return fieldType;
}
| FieldType function() { return fieldType; } | /**
* get the fieldType.
*
* @return the fieldType
*/ | get the fieldType | getFieldType | {
"repo_name": "jhunters/jprotobuf",
"path": "src/main/java/com/baidu/bjf/remoting/protobuf/utils/FieldInfo.java",
"license": "apache-2.0",
"size": 13523
} | [
"com.baidu.bjf.remoting.protobuf.FieldType"
] | import com.baidu.bjf.remoting.protobuf.FieldType; | import com.baidu.bjf.remoting.protobuf.*; | [
"com.baidu.bjf"
] | com.baidu.bjf; | 1,375,296 |
private int readOptimized(int part, long pos, ByteBuffer b, int length) throws IOException {
if (sequentialReadSize == NO_SEQUENTIAL_READ_OPTIMIZATION) {
return 0;
}
int read = 0;
if (streamForSequentialReads == null) {
// starting a new sequential read
... | int function(int part, long pos, ByteBuffer b, int length) throws IOException { if (sequentialReadSize == NO_SEQUENTIAL_READ_OPTIMIZATION) { return 0; } int read = 0; if (streamForSequentialReads == null) { read = readFromNewSequentialStream(part, pos, b, length); } else if (streamForSequentialReads.canContinueSequenti... | /**
* Attempt to satisfy this read in an optimized fashion using {@code streamForSequentialReadsRef}.
* @return the number of bytes read
*/ | Attempt to satisfy this read in an optimized fashion using streamForSequentialReadsRef | readOptimized | {
"repo_name": "ern/elasticsearch",
"path": "x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/store/input/DirectBlobContainerIndexInput.java",
"license": "apache-2.0",
"size": 16984
} | [
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,740,135 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.