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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(EsbPackage.Literals.END_POINT_PROPERTY__VALUE_EXPRESSION);
}
return childrenFeatu... | Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EsbPackage.Literals.END_POINT_PROPERTY__VALUE_EXPRESSION); } return childrenFeatures; } | /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!--... | This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>. | getChildrenFeatures | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EndPointPropertyItemProvider.java",
"license": "apache-2.0",
"size": 11996
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.EStructuralFeature",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage"
] | import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; | import java.util.*; import org.eclipse.emf.ecore.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"java.util",
"org.eclipse.emf",
"org.wso2.developerstudio"
] | java.util; org.eclipse.emf; org.wso2.developerstudio; | 1,287,433 |
public static void setupMail(Map mailMap) {
if (mailMap == null) {
return;
}
MailConf appMail = new MailConf();
int port = 0;
try {
port = Integer.parseInt((String) mailMap.get("port"));
} catch (Exception e) {
log.error(e.getMessage(), e);
}
appMail.setPort(port);
appMail.setServer((Strin... | static void function(Map mailMap) { if (mailMap == null) { return; } MailConf appMail = new MailConf(); int port = 0; try { port = Integer.parseInt((String) mailMap.get("port")); } catch (Exception e) { log.error(e.getMessage(), e); } appMail.setPort(port); appMail.setServer((String) mailMap.get(STR)); appMail.setUserN... | /**
* Method to setup mail manager in AppStoreWrapper by extracting mail
* configuration from a map.
*
* @param mailMap
* the new up mail
*/ | Method to setup mail manager in AppStoreWrapper by extracting mail configuration from a map | setupMail | {
"repo_name": "impetus-opensource/ankush",
"path": "ankush/src/main/java/com/impetus/ankush/AppStoreWrapper.java",
"license": "lgpl-3.0",
"size": 22762
} | [
"com.impetus.ankush.common.mail.MailConf",
"com.impetus.ankush.common.mail.MailManager",
"com.impetus.ankush.common.utils.PasswordUtil",
"java.util.Map"
] | import com.impetus.ankush.common.mail.MailConf; import com.impetus.ankush.common.mail.MailManager; import com.impetus.ankush.common.utils.PasswordUtil; import java.util.Map; | import com.impetus.ankush.common.mail.*; import com.impetus.ankush.common.utils.*; import java.util.*; | [
"com.impetus.ankush",
"java.util"
] | com.impetus.ankush; java.util; | 401,797 |
@Override
public void onEvent(EndGeneration event) {
fittest = event.getPopulation().fittest().getFitness();
} | void function(EndGeneration event) { fittest = event.getPopulation().fittest().getFitness(); } | /**
* Retireves the current best fitness from the population.
*
* @param event the event to get the popuation from.
*/ | Retireves the current best fitness from the population | onEvent | {
"repo_name": "sfrancis1970/EpochX",
"path": "framework/src/main/java/org/epochx/TerminationFitness.java",
"license": "gpl-3.0",
"size": 2329
} | [
"org.epochx.event.GenerationEvent"
] | import org.epochx.event.GenerationEvent; | import org.epochx.event.*; | [
"org.epochx.event"
] | org.epochx.event; | 585,286 |
protected void addNotificationListener() throws Exception {
JMXEndpoint ep = getEndpoint();
NotificationFilter nf = ep.getNotificationFilter();
// if we should observe a single attribute then use filter
if (nf == null && ep.getObservedAttribute() != null) {
LOG.debug("Ob... | void function() throws Exception { JMXEndpoint ep = getEndpoint(); NotificationFilter nf = ep.getNotificationFilter(); if (nf == null && ep.getObservedAttribute() != null) { LOG.debug(STR, ep.getObservedAttribute()); boolean match = !ep.isNotifyDiffer(); nf = new JMXConsumerNotificationFilter(ep.getObservedAttribute(),... | /**
* Adds a notification listener to the target bean.
*/ | Adds a notification listener to the target bean | addNotificationListener | {
"repo_name": "onders86/camel",
"path": "components/camel-jmx/src/main/java/org/apache/camel/component/jmx/JMXConsumer.java",
"license": "apache-2.0",
"size": 13921
} | [
"javax.management.NotificationFilter",
"javax.management.ObjectName"
] | import javax.management.NotificationFilter; import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 434,027 |
public static long[] getLongArrayFromSet(Set set) {
if ( set == null ) return null;
long[] ia = new long[ set.size() ];
int i = 0;
for ( Iterator iter = set.iterator() ; iter.hasNext() ; i++ ) {
ia[i] = Long.parseLong( (String) iter.next() );
}
return ia;
} | static long[] function(Set set) { if ( set == null ) return null; long[] ia = new long[ set.size() ]; int i = 0; for ( Iterator iter = set.iterator() ; iter.hasNext() ; i++ ) { ia[i] = Long.parseLong( (String) iter.next() ); } return ia; } | /**
* Converts a Set of int values as String to an int array.
*
* @param set Set with String objects of int
* @return int Array
*/ | Converts a Set of int values as String to an int array | getLongArrayFromSet | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_9_5/dcm4jboss-web/src/java/org/dcm4chex/archive/web/maverick/FolderMoveDelegate.java",
"license": "apache-2.0",
"size": 19685
} | [
"java.util.Iterator",
"java.util.Set"
] | import java.util.Iterator; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,051,849 |
@Override
public void putAll(String storeName, String tableName, Collection<T> states)
throws IOException {
Path tablePath = new Path(new Path(this.storeRootDir, storeName), tableName);
if (!this.fs.exists(tablePath) && !create(storeName, tableName)) {
throw new IOException("Failed to create a s... | void function(String storeName, String tableName, Collection<T> states) throws IOException { Path tablePath = new Path(new Path(this.storeRootDir, storeName), tableName); if (!this.fs.exists(tablePath) && !create(storeName, tableName)) { throw new IOException(STR + tableName); } Closer closer = Closer.create(); try { S... | /**
* See {@link StateStore#putAll(String, String, Collection)}.
*
* <p>
* This implementation does not support putting the state objects into an existing store as
* append is to be supported by the Hadoop SequenceFile (HADOOP-7139).
* </p>
*/ | See <code>StateStore#putAll(String, String, Collection)</code>. This implementation does not support putting the state objects into an existing store as append is to be supported by the Hadoop SequenceFile (HADOOP-7139). | putAll | {
"repo_name": "slietz/gobblin",
"path": "gobblin-metastore/src/main/java/gobblin/metastore/FsStateStore.java",
"license": "apache-2.0",
"size": 9438
} | [
"com.google.common.base.Strings",
"com.google.common.io.Closer",
"java.io.IOException",
"java.util.Collection",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.SequenceFile",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.io.compress.DefaultCodec"
] | import com.google.common.base.Strings; import com.google.common.io.Closer; import java.io.IOException; import java.util.Collection; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.compress.DefaultCodec; | import com.google.common.base.*; import com.google.common.io.*; import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.io.compress.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.hadoop; | 2,911,486 |
FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ONE);
for (GradoopId gradoopId : elementIds) {
RowFilter rowFilter = new RowFilter(
CompareFilter.CompareOp.EQUAL,
new BinaryComparator(gradoopId.toByteArray())
);
filterList.addFilter(rowFilter);
}
retur... | FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ONE); for (GradoopId gradoopId : elementIds) { RowFilter rowFilter = new RowFilter( CompareFilter.CompareOp.EQUAL, new BinaryComparator(gradoopId.toByteArray()) ); filterList.addFilter(rowFilter); } return filterList; } | /**
* Creates a HBase Filter object to return only graph elements that are equal to the given
* GradoopIds.
*
* @param elementIds a set of graph element GradoopIds to filter
* @return a HBase Filter object
*/ | Creates a HBase Filter object to return only graph elements that are equal to the given GradoopIds | getIdFilter | {
"repo_name": "smee/gradoop",
"path": "gradoop-store/gradoop-hbase/src/main/java/org/gradoop/storage/impl/hbase/filter/HBaseFilterUtils.java",
"license": "apache-2.0",
"size": 1769
} | [
"org.apache.hadoop.hbase.filter.BinaryComparator",
"org.apache.hadoop.hbase.filter.CompareFilter",
"org.apache.hadoop.hbase.filter.FilterList",
"org.apache.hadoop.hbase.filter.RowFilter",
"org.gradoop.common.model.impl.id.GradoopId"
] | import org.apache.hadoop.hbase.filter.BinaryComparator; import org.apache.hadoop.hbase.filter.CompareFilter; import org.apache.hadoop.hbase.filter.FilterList; import org.apache.hadoop.hbase.filter.RowFilter; import org.gradoop.common.model.impl.id.GradoopId; | import org.apache.hadoop.hbase.filter.*; import org.gradoop.common.model.impl.id.*; | [
"org.apache.hadoop",
"org.gradoop.common"
] | org.apache.hadoop; org.gradoop.common; | 2,746,419 |
public Group<E> intersection(Group<E> g) {
try {
if ((MOP.forName(this.getTypeName())).isAssignableFrom(MOP.forName(g.getTypeName()))) {
ProxyForGroup<E> result = new ProxyForGroup<E>(this.getTypeName());
E member;
Iterator<E> it = this.iterator();... | Group<E> function(Group<E> g) { try { if ((MOP.forName(this.getTypeName())).isAssignableFrom(MOP.forName(g.getTypeName()))) { ProxyForGroup<E> result = new ProxyForGroup<E>(this.getTypeName()); E member; Iterator<E> it = this.iterator(); while (it.hasNext()) { member = it.next(); if (g.indexOf(member) > -1) { result.ad... | /**
* Creates a new group with all members that belong to the group and to the group <code>g</code>
* .
*
* @param g
* - a group
* @return a group that contain the common members of the group and <code>g</code>.
* <code>null<code> if the class of the group is incom... | Creates a new group with all members that belong to the group and to the group <code>g</code> | intersection | {
"repo_name": "acontes/programming",
"path": "src/Core/org/objectweb/proactive/core/group/ProxyForGroup.java",
"license": "agpl-3.0",
"size": 57805
} | [
"java.util.Iterator",
"org.objectweb.proactive.core.mop.ConstructionOfReifiedObjectFailedException",
"org.objectweb.proactive.core.mop.MOP"
] | import java.util.Iterator; import org.objectweb.proactive.core.mop.ConstructionOfReifiedObjectFailedException; import org.objectweb.proactive.core.mop.MOP; | import java.util.*; import org.objectweb.proactive.core.mop.*; | [
"java.util",
"org.objectweb.proactive"
] | java.util; org.objectweb.proactive; | 2,480,457 |
boolean smoothSlideTo(float slideOffset, int velocity) {
if (!mCanSlide) {
// Nothing to do.
return false;
}
final int topBound = getSlidingTop();
int y = (int) (topBound + slideOffset * mSlideRange);
if (mDragHelper.smoothSlideViewTo(mSlideableView,
mSlideableView.getLeft(), y)) {
// set th... | boolean smoothSlideTo(float slideOffset, int velocity) { if (!mCanSlide) { return false; } final int topBound = getSlidingTop(); int y = (int) (topBound + slideOffset * mSlideRange); if (mDragHelper.smoothSlideViewTo(mSlideableView, mSlideableView.getLeft(), y)) { if (slideOffset == mAnchorPoint) { mSlideState = SlideS... | /**
* Smoothly animate mDraggingPane to the target X position within its range.
*
* @param slideOffset
* position to animate to
* @param velocity
* initial velocity in case of fling, or 0.
*/ | Smoothly animate mDraggingPane to the target X position within its range | smoothSlideTo | {
"repo_name": "parkin/CU-Bus-Guide",
"path": "main/src/main/java/com/teamparkin/mtdapp/views/MySlidingUpPanel.java",
"license": "apache-2.0",
"size": 39372
} | [
"android.support.v4.view.ViewCompat"
] | import android.support.v4.view.ViewCompat; | import android.support.v4.view.*; | [
"android.support"
] | android.support; | 2,275,779 |
public void loadXML( Node transnode, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace,
OverwritePrompter prompter ) throws KettleXMLException, KettleMissingPluginsException {
loadXML( transnode, null, rep, setInternalVariables, parentVariableSpace, prompter );
} | void function( Node transnode, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace, OverwritePrompter prompter ) throws KettleXMLException, KettleMissingPluginsException { loadXML( transnode, null, rep, setInternalVariables, parentVariableSpace, prompter ); } | /**
* Parses an XML DOM (starting at the specified Node) that describes the transformation.
*
* @param transnode
* The XML node to load from
* @param rep
* The repository to load the default list of database connections from (null if no repository is available)
* @param setInterna... | Parses an XML DOM (starting at the specified Node) that describes the transformation | loadXML | {
"repo_name": "eayoungs/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/TransMeta.java",
"license": "apache-2.0",
"size": 221441
} | [
"org.pentaho.di.core.exception.KettleMissingPluginsException",
"org.pentaho.di.core.exception.KettleXMLException",
"org.pentaho.di.core.gui.OverwritePrompter",
"org.pentaho.di.core.variables.VariableSpace",
"org.pentaho.di.repository.Repository",
"org.w3c.dom.Node"
] | import org.pentaho.di.core.exception.KettleMissingPluginsException; import org.pentaho.di.core.exception.KettleXMLException; import org.pentaho.di.core.gui.OverwritePrompter; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.repository.Repository; import org.w3c.dom.Node; | import org.pentaho.di.core.exception.*; import org.pentaho.di.core.gui.*; import org.pentaho.di.core.variables.*; import org.pentaho.di.repository.*; import org.w3c.dom.*; | [
"org.pentaho.di",
"org.w3c.dom"
] | org.pentaho.di; org.w3c.dom; | 2,316,569 |
@Override
@Nullable
public VirtualFile getVirtualFile() {
return null;
} | VirtualFile function() { return null; } | /**
* Returns the virtual file represented by this node or one of its children.
*
* @return the virtual file instance, or null if the project view node doesn't represent a virtual file.
*/ | Returns the virtual file represented by this node or one of its children | getVirtualFile | {
"repo_name": "paplorinc/intellij-community",
"path": "platform/lang-api/src/com/intellij/ide/projectView/ProjectViewNode.java",
"license": "apache-2.0",
"size": 9332
} | [
"com.intellij.openapi.vfs.VirtualFile"
] | import com.intellij.openapi.vfs.VirtualFile; | import com.intellij.openapi.vfs.*; | [
"com.intellij.openapi"
] | com.intellij.openapi; | 1,052,208 |
public static <T> void saveJsonFile(T jsonFile, String filePath) throws IOException {
assert jsonFile != null;
assert filePath != null;
serializeObjectToJsonFile(new File(filePath), jsonFile);
} | static <T> void function(T jsonFile, String filePath) throws IOException { assert jsonFile != null; assert filePath != null; serializeObjectToJsonFile(new File(filePath), jsonFile); } | /**
* Saves the Json object to the specified file.
* Overwrites existing file if it exists, creates a new file if it doesn't.
* @param jsonFile cannot be null
* @param filePath cannot be null
* @throws IOException if there was an error during writing to the file
*/ | Saves the Json object to the specified file. Overwrites existing file if it exists, creates a new file if it doesn't | saveJsonFile | {
"repo_name": "CS2103JAN2017-T16-B2/main",
"path": "src/main/java/seedu/address/commons/util/JsonUtil.java",
"license": "mit",
"size": 5498
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,802,090 |
@Override
public void setOptimisationProblem(Problem problem) {
this.problem = new MultistartProblemAdapter(problem);
}
/**
* {@inheritDoc} | void function(Problem problem) { this.problem = new MultistartProblemAdapter(problem); } /** * {@inheritDoc} | /**
* Set the optimisation problem.
*
* @param problem The problem to set.
*/ | Set the optimisation problem | setOptimisationProblem | {
"repo_name": "krharrison/cilib",
"path": "library/src/main/java/net/sourceforge/cilib/algorithm/MultistartOptimisationAlgorithm.java",
"license": "gpl-3.0",
"size": 7954
} | [
"net.sourceforge.cilib.problem.Problem"
] | import net.sourceforge.cilib.problem.Problem; | import net.sourceforge.cilib.problem.*; | [
"net.sourceforge.cilib"
] | net.sourceforge.cilib; | 2,005,184 |
public int executeUpdate(String sql) throws SQLException {
return executeUpdate(sql, Statement.NO_GENERATED_KEYS);
} | int function(String sql) throws SQLException { return executeUpdate(sql, Statement.NO_GENERATED_KEYS); } | /**
* To execute a DML statement
*
* @param sql - SQL Query
* @return Rows Affected Count
* @throws SQLException
*/ | To execute a DML statement | executeUpdate | {
"repo_name": "derekstavis/bluntly",
"path": "vendor/github.com/youtube/vitess/java/jdbc/src/main/java/com/flipkart/vitess/jdbc/VitessStatement.java",
"license": "mit",
"size": 27251
} | [
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 109,558 |
private void generatePatternBitmap(){
if(getBounds().width() <= 0 || getBounds().height() <= 0){
return;
}
mBitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888);
Canvas canvas = new Canvas(mBitmap);
Rect r = new Rect();
boolean verticalStartWhite = true... | void function(){ if(getBounds().width() <= 0 getBounds().height() <= 0){ return; } mBitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888); Canvas canvas = new Canvas(mBitmap); Rect r = new Rect(); boolean verticalStartWhite = true; for (int i = 0; i <= numRectanglesVertical; i++) { b... | /**
* This will generate a bitmap with the pattern
* as big as the rectangle we were allow to draw on.
* We do this to chache the bitmap so we don't need to
* recreate it each time draw() is called since it
* takes a few milliseconds.
*/ | This will generate a bitmap with the pattern as big as the rectangle we were allow to draw on. We do this to chache the bitmap so we don't need to recreate it each time draw() is called since it takes a few milliseconds | generatePatternBitmap | {
"repo_name": "bhubie/Expander",
"path": "color-picker-view/src/main/java/com/github/danielnilsson9/colorpickerview/drawable/AlphaPatternDrawable.java",
"license": "gpl-3.0",
"size": 3709
} | [
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.graphics.Rect"
] | import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,272,384 |
private void doUpdate(HttpServletRequest request, CrossListsModifyForm frm)
throws Exception {
// Get the modified offering
List ids = frm.getCourseOfferingIds();
String courseIds = Constants.arrayToStr(ids.toArray(), "", " ");
String origCourseIds = frm.getOriginalOff... | void function(HttpServletRequest request, CrossListsModifyForm frm) throws Exception { List ids = frm.getCourseOfferingIds(); String courseIds = Constants.arrayToStr(ids.toArray(), STR STRCourse removed from offering: STRfrom CurriculumCourse where course.uniqueId = :courseIdSTRcourseIdSTRfrom CourseRequest where cours... | /**
* Update the instructional offering
* @param request
* @param frm
*/ | Update the instructional offering | doUpdate | {
"repo_name": "maciej-zygmunt/unitime",
"path": "JavaSource/org/unitime/timetable/action/CrossListsModifyAction.java",
"license": "apache-2.0",
"size": 28204
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"javax.servlet.http.HttpServletRequest",
"org.unitime.commons.Debug",
"org.unitime.timetable.defaults.ApplicationProperty",
"org.unitime.timetable.form.CrossListsModifyForm",
"org.unitime.timetable.interfaces.ExternalCourseCrosslistAction",
"o... | import java.util.Iterator; import java.util.List; import java.util.Set; import javax.servlet.http.HttpServletRequest; import org.unitime.commons.Debug; import org.unitime.timetable.defaults.ApplicationProperty; import org.unitime.timetable.form.CrossListsModifyForm; import org.unitime.timetable.interfaces.ExternalCours... | import java.util.*; import javax.servlet.http.*; import org.unitime.commons.*; import org.unitime.timetable.defaults.*; import org.unitime.timetable.form.*; import org.unitime.timetable.interfaces.*; import org.unitime.timetable.model.*; import org.unitime.timetable.util.*; | [
"java.util",
"javax.servlet",
"org.unitime.commons",
"org.unitime.timetable"
] | java.util; javax.servlet; org.unitime.commons; org.unitime.timetable; | 2,712,754 |
public void setAddition(boolean addition) {
this.addition = addition;
}
//-------------------------------------------------------------- Constructor
public ExceptionToRecurrenceRule(boolean rdate, String date)
throws ParseException {
this.setAddition(rdate);
t... | void function(boolean addition) { this.addition = addition; } public ExceptionToRecurrenceRule(boolean rdate, String date) throws ParseException { this.setAddition(rdate); this.setDate(date); } | /**
* Setter for property addition.
*
* @param addition new value of property addition (true if it is a positive
* exception, false if it is a negative one)
*/ | Setter for property addition | setAddition | {
"repo_name": "accesstest3/cfunambol",
"path": "common/pim-framework/src/main/java/com/funambol/common/pim/calendar/ExceptionToRecurrenceRule.java",
"license": "agpl-3.0",
"size": 6522
} | [
"java.text.ParseException"
] | import java.text.ParseException; | import java.text.*; | [
"java.text"
] | java.text; | 841,801 |
public DcmElement putAE(int tag, String[] values) {
return put(
values != null
? StringElement.createAE(tag, values)
: StringElement.createAE(tag));
} | DcmElement function(int tag, String[] values) { return put( values != null ? StringElement.createAE(tag, values) : StringElement.createAE(tag)); } | /**
* Description of the Method
*
* @param tag Description of the Parameter
* @param values Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putAE | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_2/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 83021
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 1,519,876 |
public synchronized void deregisterEntityClasses(final String iPackageName, final ClassLoader iClassLoader) {
OLogManager.instance().debug(this, "Discovering entity classes inside package: %s", iPackageName);
List<Class<?>> classes = null;
try {
classes = OReflectionHelper.getClassesFor(iPacka... | synchronized void function(final String iPackageName, final ClassLoader iClassLoader) { OLogManager.instance().debug(this, STR, iPackageName); List<Class<?>> classes = null; try { classes = OReflectionHelper.getClassesFor(iPackageName, iClassLoader); } catch (ClassNotFoundException e) { throw new OException(e); } for (... | /**
* Scans all classes accessible from the context class loader which belong to the given package and subpackages.
*
* @param iPackageName
* The base package
*/ | Scans all classes accessible from the context class loader which belong to the given package and subpackages | deregisterEntityClasses | {
"repo_name": "DiceHoldingsInc/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/entity/OEntityManager.java",
"license": "apache-2.0",
"size": 8203
} | [
"com.orientechnologies.common.exception.OException",
"com.orientechnologies.common.log.OLogManager",
"com.orientechnologies.common.reflection.OReflectionHelper",
"java.util.List",
"java.util.Map"
] | import com.orientechnologies.common.exception.OException; import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.common.reflection.OReflectionHelper; import java.util.List; import java.util.Map; | import com.orientechnologies.common.exception.*; import com.orientechnologies.common.log.*; import com.orientechnologies.common.reflection.*; import java.util.*; | [
"com.orientechnologies.common",
"java.util"
] | com.orientechnologies.common; java.util; | 993,143 |
public void blockingMappingUpdate(IndexService indexService, String type, String source) throws Exception {
TimeValue timeout = settings.getAsTime(SETTING_CLUSTER_MAPPING_UPDATE_TIMEOUT, TimeValue.timeValueSeconds(Integer.getInteger(SETTING_SYSTEM_MAPPING_UPDATE_TIMEOUT, 30)));
BlockingActionListene... | void function(IndexService indexService, String type, String source) throws Exception { TimeValue timeout = settings.getAsTime(SETTING_CLUSTER_MAPPING_UPDATE_TIMEOUT, TimeValue.timeValueSeconds(Integer.getInteger(SETTING_SYSTEM_MAPPING_UPDATE_TIMEOUT, 30))); BlockingActionListener mappingUpdateListener = new BlockingAc... | /**
* CQL schema update must be asynchronous when triggered by a new dynamic field (see #91)
* @param indexService
* @param type
* @param source
* @throws Exception
*/ | CQL schema update must be asynchronous when triggered by a new dynamic field (see #91) | blockingMappingUpdate | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/cluster/service/ClusterService.java",
"license": "apache-2.0",
"size": 177717
} | [
"org.apache.cassandra.index.Index",
"org.apache.cassandra.service.ElassandraDaemon",
"org.elasticsearch.action.admin.indices.mapping.put.PutMappingClusterStateUpdateRequest",
"org.elasticsearch.cluster.metadata.MetaDataMappingService",
"org.elasticsearch.common.unit.TimeValue",
"org.elasticsearch.index.In... | import org.apache.cassandra.index.Index; import org.apache.cassandra.service.ElassandraDaemon; import org.elasticsearch.action.admin.indices.mapping.put.PutMappingClusterStateUpdateRequest; import org.elasticsearch.cluster.metadata.MetaDataMappingService; import org.elasticsearch.common.unit.TimeValue; import org.elast... | import org.apache.cassandra.index.*; import org.apache.cassandra.service.*; import org.elasticsearch.action.admin.indices.mapping.put.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.index.*; | [
"org.apache.cassandra",
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | org.apache.cassandra; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; | 2,148,485 |
public void testEquals() {
final Quarter q1 = new Quarter(2, 2002);
final Quarter q2 = new Quarter(2, 2002);
assertTrue(q1.equals(q2));
} | void function() { final Quarter q1 = new Quarter(2, 2002); final Quarter q2 = new Quarter(2, 2002); assertTrue(q1.equals(q2)); } | /**
* Tests the equals method.
*/ | Tests the equals method | testEquals | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/data/time/junit/QuarterTests.java",
"license": "lgpl-3.0",
"size": 7940
} | [
"org.jfree.data.time.Quarter"
] | import org.jfree.data.time.Quarter; | import org.jfree.data.time.*; | [
"org.jfree.data"
] | org.jfree.data; | 151,304 |
@Override
protected RemoteOperationResult run(OwnCloudClient client) {
OwnCloudVersion version = client.getOwnCloudVersion();
boolean versionWithForbiddenChars =
(version != null && version.isVersionWithForbiddenCharacters());
/// check parameters
if (!FileUtils.isValidPath(mTarg... | RemoteOperationResult function(OwnCloudClient client) { OwnCloudVersion version = client.getOwnCloudVersion(); boolean versionWithForbiddenChars = (version != null && version.isVersionWithForbiddenCharacters()); if (!FileUtils.isValidPath(mTargetRemotePath, versionWithForbiddenChars)) { return new RemoteOperationResult... | /**
* Performs the rename operation.
*
* @param client Client object to communicate with the remote ownCloud server.
*/ | Performs the rename operation | run | {
"repo_name": "noyo/android-library",
"path": "src/com/owncloud/android/lib/resources/files/MoveRemoteFileOperation.java",
"license": "mit",
"size": 8090
} | [
"android.util.Log",
"com.owncloud.android.lib.common.OwnCloudClient",
"com.owncloud.android.lib.common.network.WebdavUtils",
"com.owncloud.android.lib.common.operations.RemoteOperationResult",
"com.owncloud.android.lib.resources.status.OwnCloudVersion",
"org.apache.commons.httpclient.HttpStatus",
"org.a... | import android.util.Log; import com.owncloud.android.lib.common.OwnCloudClient; import com.owncloud.android.lib.common.network.WebdavUtils; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import org.apache.commons.httpclient.Http... | import android.util.*; import com.owncloud.android.lib.common.*; import com.owncloud.android.lib.common.network.*; import com.owncloud.android.lib.common.operations.*; import com.owncloud.android.lib.resources.status.*; import org.apache.commons.httpclient.*; import org.apache.jackrabbit.webdav.client.methods.*; | [
"android.util",
"com.owncloud.android",
"org.apache.commons",
"org.apache.jackrabbit"
] | android.util; com.owncloud.android; org.apache.commons; org.apache.jackrabbit; | 1,450,724 |
@SuppressWarnings("unchecked")
static void writeObject(DataOutput out, Object instance,
Class declaredClass,
Configuration conf)
throws IOException {
Object instanceObj = instance;
Class declClass = declaredClass;
if (instanceObj == n... | @SuppressWarnings(STR) static void writeObject(DataOutput out, Object instance, Class declaredClass, Configuration conf) throws IOException { Object instanceObj = instance; Class declClass = declaredClass; if (instanceObj == null) { instanceObj = new NullInstance(declClass, conf); declClass = Writable.class; } writeCla... | /**
* Write a {@link Writable}, {@link String}, primitive type, or an array of
* the preceding.
* @param out
* @param instance
* @param declaredClass
* @param conf
* @throws IOException
*/ | Write a <code>Writable</code>, <code>String</code>, primitive type, or an array of the preceding | writeObject | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/HbaseObjectWritableFor96Migration.java",
"license": "apache-2.0",
"size": 30157
} | [
"com.google.protobuf.Message",
"java.io.ByteArrayOutputStream",
"java.io.DataOutput",
"java.io.IOException",
"java.io.ObjectOutputStream",
"java.io.Serializable",
"java.lang.reflect.Array",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.client.Scan",
"org.apac... | import com.google.protobuf.Message; import java.io.ByteArrayOutputStream; import java.io.DataOutput; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; import java.lang.reflect.Array; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hb... | import com.google.protobuf.*; import java.io.*; import java.lang.reflect.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.shaded.protobuf.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.io.*; | [
"com.google.protobuf",
"java.io",
"java.lang",
"java.util",
"org.apache.hadoop"
] | com.google.protobuf; java.io; java.lang; java.util; org.apache.hadoop; | 1,521,283 |
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v202111")
@RequestWrapper(localName = "getSlatesByStatement", targetNamespace = "https://www.google.com/apis/ads/publisher/v202111", className = "com.google.api.ads.admanager.jaxws.v202111.LiveStreamEventServic... | @WebResult(name = "rval", targetNamespace = STRgetSlatesByStatementSTRhttps: @ResponseWrapper(localName = "getSlatesByStatementResponseSTRhttps: SlatePage function( @WebParam(name = "statementSTRhttps: Statement statement) throws ApiException_Exception ; | /**
*
* Gets a {@link SlatePage} of {@link Slate} objects that satisfy the
* given {@link Statement#query}. The following fields are supported for
* filtering:
*
* <table>
* <tr>
* <th scope="col">PQL Property</th> <th sco... | Gets a <code>SlatePage</code> of <code>Slate</code> objects that satisfy the given <code>Statement#query</code>. The following fields are supported for filtering: PQL Property Object Property id <code>Slate#id</code> name <code>Slate#name</code> lastModifiedDateTime <code>Slate#lastModifiedDateTime</code> | getSlatesByStatement | {
"repo_name": "googleads/googleads-java-lib",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v202111/LiveStreamEventServiceInterface.java",
"license": "apache-2.0",
"size": 15748
} | [
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.ResponseWrapper"
] | import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 988,335 |
private boolean isApplicable(final MethodHandle method, final LinkerServices linkerServices, final boolean varArg) {
final Class<?>[] formalTypes = method.type().parameterArray();
final int cl = classes.length;
final int fl = formalTypes.length - (varArg ? 1 : 0);
if(varArg) {
... | boolean function(final MethodHandle method, final LinkerServices linkerServices, final boolean varArg) { final Class<?>[] formalTypes = method.type().parameterArray(); final int cl = classes.length; final int fl = formalTypes.length - (varArg ? 1 : 0); if(varArg) { if(cl < fl) { return false; } } else { if(cl != fl) { ... | /**
* Returns true if the supplied method is applicable to actual parameter classes represented by this ClassString
* object.
*
*/ | Returns true if the supplied method is applicable to actual parameter classes represented by this ClassString object | isApplicable | {
"repo_name": "md-5/jdk10",
"path": "src/jdk.dynalink/share/classes/jdk/dynalink/beans/ClassString.java",
"license": "gpl-2.0",
"size": 8164
} | [
"java.lang.invoke.MethodHandle"
] | import java.lang.invoke.MethodHandle; | import java.lang.invoke.*; | [
"java.lang"
] | java.lang; | 212,765 |
public void reportLostFile(AlluxioURI path)
throws IOException, FileDoesNotExistException, AlluxioException {
LineageMasterClient masterClient = mLineageContext.acquireMasterClient();
try {
masterClient.reportLostFile(path.getPath());
} catch (NotFoundException e) {
throw new FileDoesNot... | void function(AlluxioURI path) throws IOException, FileDoesNotExistException, AlluxioException { LineageMasterClient masterClient = mLineageContext.acquireMasterClient(); try { masterClient.reportLostFile(path.getPath()); } catch (NotFoundException e) { throw new FileDoesNotExistException(e.getMessage()); } catch (Unav... | /**
* Reports a file as lost.
*
* @param path the path to the lost file
* @throws FileDoesNotExistException if the file does not exist
*/ | Reports a file as lost | reportLostFile | {
"repo_name": "WilliamZapata/alluxio",
"path": "core/client/fs/src/main/java/alluxio/client/lineage/LineageFileSystem.java",
"license": "apache-2.0",
"size": 4689
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 160,135 |
public int countMatches(final Classifier pElem) {
return rawCountMatches(new Object[]{pElem});
}
| int function(final Classifier pElem) { return rawCountMatches(new Object[]{pElem}); } | /**
* Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
* @param pElem the fixed value of pattern parameter elem, or null if not bound.
* @return the number of pattern matches found.
*
*/ | Returns the number of all matches of the pattern that conform to the given fixed values of some parameters | countMatches | {
"repo_name": "ELTE-Soft/xUML-RT-Executor",
"path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/TemplateParameterMatcher.java",
"license": "epl-1.0",
"size": 10295
} | [
"org.eclipse.uml2.uml.Classifier"
] | import org.eclipse.uml2.uml.Classifier; | import org.eclipse.uml2.uml.*; | [
"org.eclipse.uml2"
] | org.eclipse.uml2; | 2,549,955 |
@Test(expected = BgpParseException.class)
public void bgpUpdateMessageTest33() throws BgpParseException {
byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0... | @Test(expected = BgpParseException.class) void function() throws BgpParseException { byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x... | /**
* This test case checks update message with invalid prefix nlri length in input.
*/ | This test case checks update message with invalid prefix nlri length in input | bgpUpdateMessageTest33 | {
"repo_name": "gkatsikas/onos",
"path": "protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java",
"license": "apache-2.0",
"size": 100195
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.junit.Test",
"org.onosproject.bgpio.exceptions.BgpParseException",
"org.onosproject.bgpio.types.BgpHeader"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.junit.Test; import org.onosproject.bgpio.exceptions.BgpParseException; import org.onosproject.bgpio.types.BgpHeader; | import org.hamcrest.*; import org.jboss.netty.buffer.*; import org.junit.*; import org.onosproject.bgpio.exceptions.*; import org.onosproject.bgpio.types.*; | [
"org.hamcrest",
"org.jboss.netty",
"org.junit",
"org.onosproject.bgpio"
] | org.hamcrest; org.jboss.netty; org.junit; org.onosproject.bgpio; | 785,314 |
@Test
public void test03_build2() throws Exception {
SampleValueObject foo10 = new SampleValueObjectBuilder().setString("foo").setNumber(10).build();
SampleValueObject foo20 = new SampleValueObjectBuilder().setString("foo").setNumber(20).build();
SampleValueObject bar10 = new SampleValueObjectBuilder().setStr... | void function() throws Exception { SampleValueObject foo10 = new SampleValueObjectBuilder().setString("foo").setNumber(10).build(); SampleValueObject foo20 = new SampleValueObjectBuilder().setString("foo").setNumber(20).build(); SampleValueObject bar10 = new SampleValueObjectBuilder().setString("bar").setNumber(10).bui... | /**
* Test method for {@link org.jiemamy.dddbase.ValueObjectBuilder#build()}.
*
* @throws Exception 例外が発生した場合
*/ | Test method for <code>org.jiemamy.dddbase.ValueObjectBuilder#build()</code> | test03_build2 | {
"repo_name": "Jiemamy/dddbase",
"path": "src/test/java/org/jiemamy/dddbase/ValueObjectBuilderTest.java",
"license": "apache-2.0",
"size": 5714
} | [
"org.hamcrest.CoreMatchers",
"org.jiemamy.dddbase.sample.SampleValueObject",
"org.jiemamy.dddbase.sample.SampleValueObjectBuilder",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.jiemamy.dddbase.sample.SampleValueObject; import org.jiemamy.dddbase.sample.SampleValueObjectBuilder; import org.junit.Assert; | import org.hamcrest.*; import org.jiemamy.dddbase.sample.*; import org.junit.*; | [
"org.hamcrest",
"org.jiemamy.dddbase",
"org.junit"
] | org.hamcrest; org.jiemamy.dddbase; org.junit; | 816,704 |
@Override
public String getCategory() {
return IPlot.DEFAULT_CATEGORY;
}
| String function() { return IPlot.DEFAULT_CATEGORY; } | /**
* There should not be multiple categories for this type of series, so
* return the default category
*/ | There should not be multiple categories for this type of series, so return the default category | getCategory | {
"repo_name": "jarrah42/eavp",
"path": "org.eclipse.eavp.viz.service/src/org/eclipse/eavp/viz/service/csv/CSVSeries.java",
"license": "epl-1.0",
"size": 8968
} | [
"org.eclipse.eavp.viz.service.IPlot"
] | import org.eclipse.eavp.viz.service.IPlot; | import org.eclipse.eavp.viz.service.*; | [
"org.eclipse.eavp"
] | org.eclipse.eavp; | 2,362,388 |
CompletableFuture<Void> revokeSubscriptionPermissionAsync(NamespaceName namespace, String subscriptionName,
String role, String authDataJson); | CompletableFuture<Void> revokeSubscriptionPermissionAsync(NamespaceName namespace, String subscriptionName, String role, String authDataJson); | /**
* Revoke subscription admin-api access for a role
* @param namespace
* @param subscriptionName
* @param role
* @return
*/ | Revoke subscription admin-api access for a role | revokeSubscriptionPermissionAsync | {
"repo_name": "nkurihar/pulsar",
"path": "pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationProvider.java",
"license": "apache-2.0",
"size": 5793
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.pulsar.common.naming.NamespaceName"
] | import java.util.concurrent.CompletableFuture; import org.apache.pulsar.common.naming.NamespaceName; | import java.util.concurrent.*; import org.apache.pulsar.common.naming.*; | [
"java.util",
"org.apache.pulsar"
] | java.util; org.apache.pulsar; | 237,463 |
public static InputStream doPost(String url, Map<String, String[]> parameterMap, String charset)
throws MalformedURLException, IOException, UnsupportedEncodingException
{
String query = createQuery(parameterMap, charset);
URLConnection urlConnection = new URL(url).openConnection();
... | static InputStream function(String url, Map<String, String[]> parameterMap, String charset) throws MalformedURLException, IOException, UnsupportedEncodingException { String query = createQuery(parameterMap, charset); URLConnection urlConnection = new URL(url).openConnection(); urlConnection.setUseCaches(false); urlConn... | /**
* Invoke a POST request on the given URL with the given parameter map and the given charset
* encoding. It is highly recommended to close the obtained inputstream after processing!
* @param url The URL to be invoked.
* @param parameterMap The parameter map to be processed as query parameters.
... | Invoke a POST request on the given URL with the given parameter map and the given charset encoding. It is highly recommended to close the obtained inputstream after processing | doPost | {
"repo_name": "tranSMART-N/tranSMART-N_app",
"path": "src/java/net/balusc/util/HttpServletUtil.java",
"license": "gpl-3.0",
"size": 16319
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStreamWriter",
"java.io.UnsupportedEncodingException",
"java.net.MalformedURLException",
"java.net.URLConnection",
"java.util.Map"
] | import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URLConnection; import java.util.Map; | import java.io.*; import java.net.*; import java.util.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 945,798 |
@Override
public ArrowBuf getValidityBuffer() {
return validityBuffer;
} | ArrowBuf function() { return validityBuffer; } | /**
* Get buffer that manages the validity (NULL or NON-NULL nature) of
* elements in the vector. Consider it as a buffer for internal bit vector
* data structure.
* @return buffer
*/ | Get buffer that manages the validity (NULL or NON-NULL nature) of elements in the vector. Consider it as a buffer for internal bit vector data structure | getValidityBuffer | {
"repo_name": "wagavulin/arrow",
"path": "java/vector/src/main/java/org/apache/arrow/vector/BaseFixedWidthVector.java",
"license": "apache-2.0",
"size": 28058
} | [
"io.netty.buffer.ArrowBuf"
] | import io.netty.buffer.ArrowBuf; | import io.netty.buffer.*; | [
"io.netty.buffer"
] | io.netty.buffer; | 49,296 |
default CoAPEndpointProducerBuilder publicKey(PublicKey publicKey) {
doSetProperty("publicKey", publicKey);
return this;
} | default CoAPEndpointProducerBuilder publicKey(PublicKey publicKey) { doSetProperty(STR, publicKey); return this; } | /**
* Set the configured public key for use with Raw Public Key.
*
* The option is a: <code>java.security.PublicKey</code> type.
*
* Group: common
*/ | Set the configured public key for use with Raw Public Key. The option is a: <code>java.security.PublicKey</code> type. Group: common | publicKey | {
"repo_name": "adessaigne/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CoAPEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 43205
} | [
"java.security.PublicKey"
] | import java.security.PublicKey; | import java.security.*; | [
"java.security"
] | java.security; | 2,144,499 |
@Test
public void union() {
// overlapping AABBs
AABB aabb1 = new AABB(-2.0, 0.0, 2.0, 1.0);
AABB aabb2 = new AABB(-1.0, -2.0, 5.0, 0.5);
// test the getUnion method
AABB aabbr = aabb1.getUnion(aabb2);
TestCase.assertEquals(-2.0, aabbr.getMinX(), 1.0E-4);
TestCase.assertEquals(-2.0, aabbr.... | void function() { AABB aabb1 = new AABB(-2.0, 0.0, 2.0, 1.0); AABB aabb2 = new AABB(-1.0, -2.0, 5.0, 0.5); AABB aabbr = aabb1.getUnion(aabb2); TestCase.assertEquals(-2.0, aabbr.getMinX(), 1.0E-4); TestCase.assertEquals(-2.0, aabbr.getMinY(), 1.0E-4); TestCase.assertEquals(5.0, aabbr.getMaxX(), 1.0E-4); TestCase.assertE... | /**
* Tests the union methods.
*/ | Tests the union methods | union | {
"repo_name": "pravin02/dyn4j",
"path": "junit/org/dyn4j/geometry/AABBTest.java",
"license": "bsd-3-clause",
"size": 11826
} | [
"junit.framework.TestCase"
] | import junit.framework.TestCase; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,877,933 |
public static boolean strToBool(String boolAsString)
{
boolean result = false;
if (boolAsString.equals(ProcessEngineConstants.Variables.Common.ALGERNON_TRUE))
{
result = true;
}
return result;
} | static boolean function(String boolAsString) { boolean result = false; if (boolAsString.equals(ProcessEngineConstants.Variables.Common.ALGERNON_TRUE)) { result = true; } return result; } | /**
* Converts algernon boolean as String to a java boolean.
*
* @param boolAsString :TRUE or :FALSE
* @return true if boolAsString==":TRUE" otherwise false.
*/ | Converts algernon boolean as String to a java boolean | strToBool | {
"repo_name": "prowim/prowim",
"path": "prowim-server/src/org/prowim/utils/StringConverter.java",
"license": "gpl-3.0",
"size": 11298
} | [
"org.prowim.datamodel.algernon.ProcessEngineConstants"
] | import org.prowim.datamodel.algernon.ProcessEngineConstants; | import org.prowim.datamodel.algernon.*; | [
"org.prowim.datamodel"
] | org.prowim.datamodel; | 2,600,466 |
public static void performInInfo(
final IModuleStorage.Info info, final TVChannel channel )
{
if( !info.channelsList.contains( channel.getID( ) ) )
{
info.channelsList.add(
new TVChannelsSet.Channel(
channel.getID( ), channel.getDisplayNa... | static void function( final IModuleStorage.Info info, final TVChannel channel ) { if( !info.channelsList.contains( channel.getID( ) ) ) { info.channelsList.add( new TVChannelsSet.Channel( channel.getID( ), channel.getDisplayName( ) ) ); } for( final Iterator it = channel.getProgrammes( ).iterator( ); it.hasNext( ); ) {... | /**
* Perform channel info for info about all channels.
*
* @param info
* @param channel
*/ | Perform channel info for info about all channels | performInInfo | {
"repo_name": "andybalaam/freeguide",
"path": "src/freeguide/common/lib/fgspecific/StorageHelper.java",
"license": "gpl-2.0",
"size": 4889
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,313,294 |
public ClientCommand getCommand()
{
return handle.getClientCommands().read(0);
} | ClientCommand function() { return handle.getClientCommands().read(0); } | /**
* Retrieve whether or not we're logging in or respawning.
*
* @return The current command
*/ | Retrieve whether or not we're logging in or respawning | getCommand | {
"repo_name": "TribeServer/ItemPlus",
"path": "src/main/java/com/comphenix/PacketWrapper/WrapperPlayClientClientCommand.java",
"license": "gpl-3.0",
"size": 2051
} | [
"com.comphenix.protocol.wrappers.EnumWrappers"
] | import com.comphenix.protocol.wrappers.EnumWrappers; | import com.comphenix.protocol.wrappers.*; | [
"com.comphenix.protocol"
] | com.comphenix.protocol; | 566,553 |
public static void savePSPData(String id, Phase phase) {
String filePath = System.getProperty("user.dir") + "/pspData/" + id + ".ser";
try {
FileOutputStream fileOut = new FileOutputStream(filePath);
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(phase);
out.close();
f... | static void function(String id, Phase phase) { String filePath = System.getProperty(STR) + STR + id + ".ser"; try { FileOutputStream fileOut = new FileOutputStream(filePath); ObjectOutputStream out = new ObjectOutputStream(fileOut); out.writeObject(phase); out.close(); fileOut.close(); } catch (IOException i) { i.print... | /**
* Description: Save PSD data for current project
*
* @param id
* @param phase
*/ | Description: Save PSD data for current project | savePSPData | {
"repo_name": "cst316/spring16project-Team-Houston",
"path": "src/net/sf/memoranda/ProjectManager.java",
"license": "gpl-2.0",
"size": 6251
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.ObjectOutputStream",
"net.sf.memoranda.ui.Phase"
] | import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import net.sf.memoranda.ui.Phase; | import java.io.*; import net.sf.memoranda.ui.*; | [
"java.io",
"net.sf.memoranda"
] | java.io; net.sf.memoranda; | 428,203 |
public static Map<String, GuiField> traverse(Activity activity, Node node,
ViewGroup rootView, Location location) {
int childCount = node.getChildNodes().getLength();
NodeList children = node.getChildNodes();
Map<String, GuiField> fields = new HashMap<String, GuiField>();
for (int i = 0; i < childCount; ... | static Map<String, GuiField> function(Activity activity, Node node, ViewGroup rootView, Location location) { int childCount = node.getChildNodes().getLength(); NodeList children = node.getChildNodes(); Map<String, GuiField> fields = new HashMap<String, GuiField>(); for (int i = 0; i < childCount; i++) { if (children.it... | /**
* Look at each node in the xml file, determine the type, and initialize so
* it may be added to the TemplateView later on.
*
* @param activity
* @param node
* @param rootView
* @param location
* @return
*/ | Look at each node in the xml file, determine the type, and initialize so it may be added to the TemplateView later on | traverse | {
"repo_name": "isis-ammo/ammo-dash",
"path": "dash/src/edu/vu/isis/ammo/dash/template/parsing/AmmoParser.java",
"license": "mit",
"size": 7667
} | [
"android.app.Activity",
"android.location.Location",
"android.view.ViewGroup",
"edu.vu.isis.ammo.dash.template.view.CheckGroupView",
"edu.vu.isis.ammo.dash.template.view.FreeformTextView",
"edu.vu.isis.ammo.dash.template.view.GuiField",
"edu.vu.isis.ammo.dash.template.view.HeaderView",
"edu.vu.isis.am... | import android.app.Activity; import android.location.Location; import android.view.ViewGroup; import edu.vu.isis.ammo.dash.template.view.CheckGroupView; import edu.vu.isis.ammo.dash.template.view.FreeformTextView; import edu.vu.isis.ammo.dash.template.view.GuiField; import edu.vu.isis.ammo.dash.template.view.HeaderView... | import android.app.*; import android.location.*; import android.view.*; import edu.vu.isis.ammo.dash.template.view.*; import java.text.*; import java.util.*; import org.w3c.dom.*; | [
"android.app",
"android.location",
"android.view",
"edu.vu.isis",
"java.text",
"java.util",
"org.w3c.dom"
] | android.app; android.location; android.view; edu.vu.isis; java.text; java.util; org.w3c.dom; | 511,315 |
protected void scheduleEndOfCampaignEvent(C campaign, CampaignEnrollment enrollment) {
DateTime endDate = campaignEndDate(campaign, enrollment);
if (endDate != null && endDate.isAfterNow()) {
String campaignName = campaign.getName();
String externalId = enrollment.getExterna... | void function(C campaign, CampaignEnrollment enrollment) { DateTime endDate = campaignEndDate(campaign, enrollment); if (endDate != null && endDate.isAfterNow()) { String campaignName = campaign.getName(); String externalId = enrollment.getExternalId(); Map<String, Object> params = new SchedulerPayloadBuilder() .withEx... | /**
* Schedules a single job, that fires when the last message of the campaign is sent.
*
* @param campaign the campaign definition
* @param enrollment the campaign enrollment to schedule the job for
*/ | Schedules a single job, that fires when the last message of the campaign is sent | scheduleEndOfCampaignEvent | {
"repo_name": "koshalt/modules",
"path": "message-campaign/src/main/java/org/motechproject/messagecampaign/scheduler/CampaignSchedulerService.java",
"license": "bsd-3-clause",
"size": 12955
} | [
"java.util.Map",
"org.joda.time.DateTime",
"org.motechproject.event.MotechEvent",
"org.motechproject.messagecampaign.EventKeys",
"org.motechproject.messagecampaign.builder.SchedulerPayloadBuilder",
"org.motechproject.messagecampaign.domain.campaign.CampaignEnrollment",
"org.motechproject.scheduler.contr... | import java.util.Map; import org.joda.time.DateTime; import org.motechproject.event.MotechEvent; import org.motechproject.messagecampaign.EventKeys; import org.motechproject.messagecampaign.builder.SchedulerPayloadBuilder; import org.motechproject.messagecampaign.domain.campaign.CampaignEnrollment; import org.motechpro... | import java.util.*; import org.joda.time.*; import org.motechproject.event.*; import org.motechproject.messagecampaign.*; import org.motechproject.messagecampaign.builder.*; import org.motechproject.messagecampaign.domain.campaign.*; import org.motechproject.scheduler.contract.*; | [
"java.util",
"org.joda.time",
"org.motechproject.event",
"org.motechproject.messagecampaign",
"org.motechproject.scheduler"
] | java.util; org.joda.time; org.motechproject.event; org.motechproject.messagecampaign; org.motechproject.scheduler; | 1,154,995 |
jbgPeriod = new javax.swing.ButtonGroup();
jbgXmlFile = new javax.swing.ButtonGroup();
jbgTrialSheet = new javax.swing.ButtonGroup();
jbgRequest = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
jlYear = new j... | jbgPeriod = new javax.swing.ButtonGroup(); jbgXmlFile = new javax.swing.ButtonGroup(); jbgTrialSheet = new javax.swing.ButtonGroup(); jbgRequest = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jlYear = new javax.swing.JLabel(); jsYear = new javax.swing.JSpinner()... | /**
* 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": "swaplicado/siie32",
"path": "src/erp/mod/fin/form/SDialogFiscalXmlFile.java",
"license": "mit",
"size": 42042
} | [
"javax.swing.JSpinner",
"javax.swing.SpinnerNumberModel",
"sa.lib.gui.bean.SBeanFieldRadio"
] | import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; import sa.lib.gui.bean.SBeanFieldRadio; | import javax.swing.*; import sa.lib.gui.bean.*; | [
"javax.swing",
"sa.lib.gui"
] | javax.swing; sa.lib.gui; | 2,862,253 |
public ResponseMetaData responseMetaData() {
return this.responseMetaData;
} | ResponseMetaData function() { return this.responseMetaData; } | /**
* Get meta Data.
*
* @return the responseMetaData value
*/ | Get meta Data | responseMetaData | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/DiagnosticDetectorResponseInner.java",
"license": "mit",
"size": 6579
} | [
"com.microsoft.azure.management.appservice.v2019_08_01.ResponseMetaData"
] | import com.microsoft.azure.management.appservice.v2019_08_01.ResponseMetaData; | import com.microsoft.azure.management.appservice.v2019_08_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 296,835 |
void sendInvitationEmailToEmail(UserInfo user, MembershipInvitation mis, String acceptInvitationEndpoint) throws NotFoundException; | void sendInvitationEmailToEmail(UserInfo user, MembershipInvitation mis, String acceptInvitationEndpoint) throws NotFoundException; | /**
* Send an invitation message to an email address
*
* @param user The user that is sending the invitation
* @param mis The invitation, the {@link MembershipInvitation#getInviteeEmail()} must be present
* @param acceptInvitationEndpoint
* @return
* @throws NotFoundException
*/ | Send an invitation message to an email address | sendInvitationEmailToEmail | {
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/team/MembershipInvitationManager.java",
"license": "apache-2.0",
"size": 5325
} | [
"org.sagebionetworks.repo.model.MembershipInvitation",
"org.sagebionetworks.repo.model.UserInfo",
"org.sagebionetworks.repo.web.NotFoundException"
] | import org.sagebionetworks.repo.model.MembershipInvitation; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.web.NotFoundException; | import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.web.*; | [
"org.sagebionetworks.repo"
] | org.sagebionetworks.repo; | 1,009,357 |
MaintainProvision getMaintainProvisionLocal() throws ServiceException;
| MaintainProvision getMaintainProvisionLocal() throws ServiceException; | /**
* Getter for the MaintainProvisionLocal.
*
* @return the MaintainProvision.
* @throws ServiceException
*/ | Getter for the MaintainProvisionLocal | getMaintainProvisionLocal | {
"repo_name": "NABUCCO/org.nabucco.business.provision",
"path": "org.nabucco.business.provision.facade.component/src/main/gen/org/nabucco/business/provision/facade/component/ProvisionComponentLocal.java",
"license": "epl-1.0",
"size": 3159
} | [
"org.nabucco.business.provision.facade.service.maintain.MaintainProvision",
"org.nabucco.framework.base.facade.exception.service.ServiceException"
] | import org.nabucco.business.provision.facade.service.maintain.MaintainProvision; import org.nabucco.framework.base.facade.exception.service.ServiceException; | import org.nabucco.business.provision.facade.service.maintain.*; import org.nabucco.framework.base.facade.exception.service.*; | [
"org.nabucco.business",
"org.nabucco.framework"
] | org.nabucco.business; org.nabucco.framework; | 2,493,673 |
public void addAtoms(Atom[] iAtoms, Atom[] jAtoms) {
addAtoms(iAtoms, null, jAtoms, null);
} | void function(Atom[] iAtoms, Atom[] jAtoms) { addAtoms(iAtoms, null, jAtoms, null); } | /**
* Adds the i and j atoms and fills the grid. Their bounds will be computed.
* Subsequent call to {@link #getIndicesContacts()} or {@link #getAtomContacts()} will produce the interatomic contacts.
* @param iAtoms
* @param jAtoms
*/ | Adds the i and j atoms and fills the grid. Their bounds will be computed. Subsequent call to <code>#getIndicesContacts()</code> or <code>#getAtomContacts()</code> will produce the interatomic contacts | addAtoms | {
"repo_name": "heuermh/biojava",
"path": "biojava-structure/src/main/java/org/biojava/nbio/structure/contact/Grid.java",
"license": "lgpl-2.1",
"size": 15357
} | [
"org.biojava.nbio.structure.Atom"
] | import org.biojava.nbio.structure.Atom; | import org.biojava.nbio.structure.*; | [
"org.biojava.nbio"
] | org.biojava.nbio; | 2,418,517 |
@PUT
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]*}")
@Consumes(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Adds a new item to the registry or updates the existing item.")
@ApiResponses(value = { @ApiResponse(code = 200, message = "OK"),
@ApiResponse(code = 20... | @RolesAllowed({ Role.ADMIN }) @Path(STR) @Consumes(MediaType.APPLICATION_JSON) @ApiOperation(value = STR) @ApiResponses(value = { @ApiResponse(code = 200, message = "OK"), @ApiResponse(code = 201, message = STR), @ApiResponse(code = 400, message = STR), @ApiResponse(code = 404, message = STR), @ApiResponse(code = 405, ... | /**
* Create or Update an item by supplying an item bean.
*
* @param itemname
* @param item the item bean.
* @return
*/ | Create or Update an item by supplying an item bean | createOrUpdateItem | {
"repo_name": "kceiw/smarthome",
"path": "bundles/io/org.eclipse.smarthome.io.rest.core/src/main/java/org/eclipse/smarthome/io/rest/core/item/ItemResource.java",
"license": "epl-1.0",
"size": 24222
} | [
"io.swagger.annotations.ApiOperation",
"io.swagger.annotations.ApiParam",
"io.swagger.annotations.ApiResponse",
"io.swagger.annotations.ApiResponses",
"java.util.Locale",
"javax.annotation.security.RolesAllowed",
"javax.ws.rs.Consumes",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.P... | import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import java.util.Locale; import javax.annotation.security.RolesAllowed; import javax.ws.rs.Consumes; import javax.ws.rs.HeaderParam; import javax.ws.... | import io.swagger.annotations.*; import java.util.*; import javax.annotation.security.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.eclipse.smarthome.core.auth.*; import org.eclipse.smarthome.core.items.*; import org.eclipse.smarthome.core.items.dto.*; import org.eclipse.smarthome.io.rest.*; | [
"io.swagger.annotations",
"java.util",
"javax.annotation",
"javax.ws",
"org.eclipse.smarthome"
] | io.swagger.annotations; java.util; javax.annotation; javax.ws; org.eclipse.smarthome; | 1,340,706 |
interface ReadableSlob {
@Nullable String snapshot();
} | interface ReadableSlob { @Nullable String snapshot(); } | /**
* Returns a serialized form of the object. Can be null if the object has no
* history.
*/ | Returns a serialized form of the object. Can be null if the object has no history | snapshot | {
"repo_name": "Psantium/walkaround",
"path": "src/com/google/walkaround/slob/shared/SlobModel.java",
"license": "apache-2.0",
"size": 2485
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,487,251 |
synchronized ServerName getLastRegionServerOfRegion(final String encodedName) {
return lastAssignments.get(encodedName);
} | synchronized ServerName getLastRegionServerOfRegion(final String encodedName) { return lastAssignments.get(encodedName); } | /**
* Get the last region server a region was on for purpose of re-assignment,
* i.e. should the re-assignment be held back till log split is done?
*/ | Get the last region server a region was on for purpose of re-assignment, i.e. should the re-assignment be held back till log split is done | getLastRegionServerOfRegion | {
"repo_name": "tobegit3hub/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java",
"license": "apache-2.0",
"size": 29978
} | [
"org.apache.hadoop.hbase.ServerName"
] | import org.apache.hadoop.hbase.ServerName; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,260,021 |
public IBlockState getStateFromMeta(int meta)
{
return this.getDefaultState().withProperty(this.getTypeProperty(), BlockFlower.EnumFlowerType.getType(this.getBlockType(), meta));
} | IBlockState function(int meta) { return this.getDefaultState().withProperty(this.getTypeProperty(), BlockFlower.EnumFlowerType.getType(this.getBlockType(), meta)); } | /**
* Convert the given metadata into a BlockState for this Block
*/ | Convert the given metadata into a BlockState for this Block | getStateFromMeta | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockFlower.java",
"license": "gpl-3.0",
"size": 7480
} | [
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.state.IBlockState; | import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 1,648,980 |
public void xMinYMin() throws ParseException {
align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN;
} | void function() throws ParseException { align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN; } | /**
* Invoked when 'xMinYMin' has been parsed.
* @exception ParseException if an error occured while processing
* the transform
*/ | Invoked when 'xMinYMin' has been parsed | xMinYMin | {
"repo_name": "apache/batik",
"path": "batik-svg-dom/src/main/java/org/apache/batik/dom/svg/AbstractSVGPreserveAspectRatio.java",
"license": "apache-2.0",
"size": 9953
} | [
"org.apache.batik.parser.ParseException",
"org.w3c.dom.svg.SVGPreserveAspectRatio"
] | import org.apache.batik.parser.ParseException; import org.w3c.dom.svg.SVGPreserveAspectRatio; | import org.apache.batik.parser.*; import org.w3c.dom.svg.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 2,166,450 |
public void startProfiling() {
if (mThread.isProfiling()) {
File file = new File(mThread.getProfileFilePath());
file.getParentFile().mkdirs();
Debug.startMethodTracing(file.toString(), 8 * 1024 * 1024);
}
} | void function() { if (mThread.isProfiling()) { File file = new File(mThread.getProfileFilePath()); file.getParentFile().mkdirs(); Debug.startMethodTracing(file.toString(), 8 * 1024 * 1024); } } | /**
* This method will start profiling if isProfiling() returns true. You should
* only call this method if you set the handleProfiling attribute in the
* manifest file for this Instrumentation to true.
*/ | This method will start profiling if isProfiling() returns true. You should only call this method if you set the handleProfiling attribute in the manifest file for this Instrumentation to true | startProfiling | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/base/core/java/android/app/Instrumentation.java",
"license": "gpl-2.0",
"size": 68156
} | [
"android.os.Debug",
"java.io.File"
] | import android.os.Debug; import java.io.File; | import android.os.*; import java.io.*; | [
"android.os",
"java.io"
] | android.os; java.io; | 2,756,893 |
ArrayList getFilesList() {
File startFD = new File(startDir);
if (!startFD.exists()) {
print("treewalker.not.exist",startDir);
System.exit(0);
}
if (!startFD.isDirectory()) {
print("treewalker.not.directory",startDir);
System.exit(0);
... | ArrayList getFilesList() { File startFD = new File(startDir); if (!startFD.exists()) { print(STR,startDir); System.exit(0); } if (!startFD.isDirectory()) { print(STR,startDir); System.exit(0); } FileWalker fileWalker = new FileWalker(); FileObserver fileObserver = new FileObserver(suffix); fileWalker.addObserver(fileOb... | /** Walks the directory tree populating the list with the source files to
* analyze
*/ | Walks the directory tree populating the list with the source files to analyze | getFilesList | {
"repo_name": "cdegroot/river",
"path": "qa/src/com/sun/jini/tool/AbstractTreeWalker.java",
"license": "apache-2.0",
"size": 22853
} | [
"com.sun.jini.system.FileObserver",
"com.sun.jini.system.FileWalker",
"java.io.File",
"java.util.ArrayList"
] | import com.sun.jini.system.FileObserver; import com.sun.jini.system.FileWalker; import java.io.File; import java.util.ArrayList; | import com.sun.jini.system.*; import java.io.*; import java.util.*; | [
"com.sun.jini",
"java.io",
"java.util"
] | com.sun.jini; java.io; java.util; | 850,815 |
@Test
@Ignore("Not Implemented")
public void intermediaryThatReceivesMaxForwardOfZeroOnOptionsOrTraceMustRespondToRequest() {
} | @Ignore(STR) void function() { } | /**
* See <a href="https://tools.ietf.org/html/rfc7231#section-5.1">RFC 7230 section 5.1: Controls</a>.
*/ | See RFC 7230 section 5.1: Controls | intermediaryThatReceivesMaxForwardOfZeroOnOptionsOrTraceMustRespondToRequest | {
"repo_name": "irina-mitrea-luxoft/k3po",
"path": "specification/http/src/test/java/org/kaazing/specification/http/rfc7231/RequestHeaderFieldsIT.java",
"license": "agpl-3.0",
"size": 2148
} | [
"org.junit.Ignore"
] | import org.junit.Ignore; | import org.junit.*; | [
"org.junit"
] | org.junit; | 749,010 |
public boolean isTextInTable(String tableSummaryOrId, String text) {
HtmlTable table = getHtmlTable(tableSummaryOrId);
if (table == null) {
throw new RuntimeException("No table with summary or id ["
+ tableSummaryOrId + "] found in response.");
}
for (int row = 0; row < table.getRo... | boolean function(String tableSummaryOrId, String text) { HtmlTable table = getHtmlTable(tableSummaryOrId); if (table == null) { throw new RuntimeException(STR + tableSummaryOrId + STR); } for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; table.getCellAt(row, col) != null; col++) { HtmlTableCell ce... | /**
* Return true if given text is present in a specified table of the response.
*
* @param tableSummaryOrId table summary or id to inspect for expected text.
* @param text expected text to check for.
*/ | Return true if given text is present in a specified table of the response | isTextInTable | {
"repo_name": "omarmohsen/JWebUnit",
"path": "jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java",
"license": "gpl-3.0",
"size": 79633
} | [
"com.gargoylesoftware.htmlunit.html.HtmlTable",
"com.gargoylesoftware.htmlunit.html.HtmlTableCell"
] | import com.gargoylesoftware.htmlunit.html.HtmlTable; import com.gargoylesoftware.htmlunit.html.HtmlTableCell; | import com.gargoylesoftware.htmlunit.html.*; | [
"com.gargoylesoftware.htmlunit"
] | com.gargoylesoftware.htmlunit; | 2,501,722 |
public SparseMatrix[] getLOOByItem(boolean isByDate, SparseMatrix timestamps) throws Exception {
SparseMatrix trainMatrix = new SparseMatrix(rateMatrix);
// for building test matrix
Table<Integer, Integer, Double> dataTable = HashBasedTable.create();
Multimap<Integer, Integer> colMap = HashMultimap.create(... | SparseMatrix[] function(boolean isByDate, SparseMatrix timestamps) throws Exception { SparseMatrix trainMatrix = new SparseMatrix(rateMatrix); Table<Integer, Integer, Double> dataTable = HashBasedTable.create(); Multimap<Integer, Integer> colMap = HashMultimap.create(); for (int i = 0, im = rateMatrix.numColumns(); i <... | /**
* Split ratings into two parts where one rating per item is preserved as the test set and the remaining data as the
* training set
*
*/ | Split ratings into two parts where one rating per item is preserved as the test set and the remaining data as the training set | getLOOByItem | {
"repo_name": "martinb741/Recommender",
"path": "src/main/i5/las2peer/services/recommender/librec/data/DataSplitter.java",
"license": "cc0-1.0",
"size": 22793
} | [
"com.google.common.collect.HashBasedTable",
"com.google.common.collect.HashMultimap",
"com.google.common.collect.Multimap",
"com.google.common.collect.Table",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import com.google.common.collect.HashBasedTable; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Table; import java.util.ArrayList; import java.util.Collections; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 263,727 |
public boolean start() {
checkIfCalledOnValidThread();
Log.d(TAG, "start" + AppRTCUtils.getThreadInfo());
if (!initDefaultSensor()) {
// Proximity sensor is not supported on this device.
return false;
}
sensorManager.registerListener(this, proximitySensor, SensorManager.SENSOR_DELAY_NORMAL);
return... | boolean function() { checkIfCalledOnValidThread(); Log.d(TAG, "start" + AppRTCUtils.getThreadInfo()); if (!initDefaultSensor()) { return false; } sensorManager.registerListener(this, proximitySensor, SensorManager.SENSOR_DELAY_NORMAL); return true; } | /**
* Activate the proximity sensor. Also do initializtion if called for the
* first time.
*/ | Activate the proximity sensor. Also do initializtion if called for the first time | start | {
"repo_name": "LexlooWorks/Comic",
"path": "src/com/nvapp/video/webrtc/AppRTCProximitySensor.java",
"license": "apache-2.0",
"size": 5993
} | [
"android.hardware.SensorManager",
"android.util.Log"
] | import android.hardware.SensorManager; import android.util.Log; | import android.hardware.*; import android.util.*; | [
"android.hardware",
"android.util"
] | android.hardware; android.util; | 1,219,217 |
public void moderateComment(String siteId, String commentId, String status, Listener listener,
ErrorListener errorListener) {
Map<String, String> params = new HashMap<String, String>();
params.put("status", status);
String path = String.format("sites/%s/commen... | void function(String siteId, String commentId, String status, Listener listener, ErrorListener errorListener) { Map<String, String> params = new HashMap<String, String>(); params.put(STR, status); String path = String.format(STR, siteId, commentId); post(path, params, null, listener, errorListener); } | /**
* Moderate a comment.
* <p/>
* http://developer.wordpress.com/docs/api/1/sites/%24site/comments/%24comment_ID/
*/ | Moderate a comment. HREF | moderateComment | {
"repo_name": "abassawo/WordPress-Android",
"path": "libs/networking/WordPressNetworking/src/main/java/org/wordpress/android/networking/RestClientUtils.java",
"license": "gpl-2.0",
"size": 11615
} | [
"com.wordpress.rest.RestRequest",
"java.util.HashMap",
"java.util.Map"
] | import com.wordpress.rest.RestRequest; import java.util.HashMap; import java.util.Map; | import com.wordpress.rest.*; import java.util.*; | [
"com.wordpress.rest",
"java.util"
] | com.wordpress.rest; java.util; | 1,524,149 |
public Message readMessage(String input) throws QuickFixException {
if (input == null) {
return null;
}
// this throws a json parse exception if it can't read.
Map<?, ?> message = (Map<?, ?>) new JsonReader().read(new StringReader(input));
if (message == null) {
... | Message function(String input) throws QuickFixException { if (input == null) { return null; } Map<?, ?> message = (Map<?, ?>) new JsonReader().read(new StringReader(input)); if (message == null) { return null; } List<?> actions = (List<?>) message.get(STR); List<Action> actionList = Lists.newArrayList(); if (actions !=... | /**
* Translate a string into a message.
*
* @param input the input from the customer (unsanitized) to read into a message.
* @return a message, or null.
* @throws QuickFixException if there is an error instantiating the action (not action not found).
*/ | Translate a string into a message | readMessage | {
"repo_name": "madmax983/aura",
"path": "aura/src/main/java/org/auraframework/http/AuraServlet.java",
"license": "apache-2.0",
"size": 31413
} | [
"com.google.common.collect.Lists",
"java.io.StringReader",
"java.util.List",
"java.util.Map",
"org.auraframework.def.ActionDef",
"org.auraframework.def.BaseComponentDef",
"org.auraframework.def.ComponentDef",
"org.auraframework.def.DefDescriptor",
"org.auraframework.instance.Action",
"org.aurafram... | import com.google.common.collect.Lists; import java.io.StringReader; import java.util.List; import java.util.Map; import org.auraframework.def.ActionDef; import org.auraframework.def.BaseComponentDef; import org.auraframework.def.ComponentDef; import org.auraframework.def.DefDescriptor; import org.auraframework.instanc... | import com.google.common.collect.*; import java.io.*; import java.util.*; import org.auraframework.def.*; import org.auraframework.instance.*; import org.auraframework.system.*; import org.auraframework.throwable.quickfix.*; import org.auraframework.util.json.*; | [
"com.google.common",
"java.io",
"java.util",
"org.auraframework.def",
"org.auraframework.instance",
"org.auraframework.system",
"org.auraframework.throwable",
"org.auraframework.util"
] | com.google.common; java.io; java.util; org.auraframework.def; org.auraframework.instance; org.auraframework.system; org.auraframework.throwable; org.auraframework.util; | 874,763 |
public void refreshDataFeedIngestionWithResponse() {
// BEGIN: com.azure.ai.metricsadvisor.administration.MetricsAdvisorAdministrationAsyncClient.refreshDataFeedIngestionWithResponse#String-OffsetDateTime-OffsetDateTime
final String dataFeedId = "4957a2f7-a0f4-4fc0-b8d7-d866c1df0f4c";
final ... | void function() { final String dataFeedId = STR; final OffsetDateTime startTime = OffsetDateTime.parse(STR); final OffsetDateTime endTime = OffsetDateTime.parse(STR); metricsAdvisorAdminAsyncClient.refreshDataFeedIngestionWithResponse(dataFeedId, startTime, endTime) .subscribe(response -> { System.out.printf(STR, respo... | /**
* Code snippet for {@link MetricsAdvisorAdministrationAsyncClient#refreshDataFeedIngestionWithResponse(String, OffsetDateTime, OffsetDateTime)}.
*/ | Code snippet for <code>MetricsAdvisorAdministrationAsyncClient#refreshDataFeedIngestionWithResponse(String, OffsetDateTime, OffsetDateTime)</code> | refreshDataFeedIngestionWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/metricsadvisor/azure-ai-metricsadvisor/src/samples/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClientJavaDocCodeSnippets.java",
"license": "mit",
"size": 107059
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 2,083,204 |
public static <T> Collection<T> coerceCollection(final Class<T> elementType, final Object value) {
return coerceCollection(elementType, null, value);
} | static <T> Collection<T> function(final Class<T> elementType, final Object value) { return coerceCollection(elementType, null, value); } | /**
* Converts an object to a collection with the given element type.
* @return The resulting collection - it may be empty, but never null
*/ | Converts an object to a collection with the given element type | coerceCollection | {
"repo_name": "robertoandrade/cyclos",
"path": "src/nl/strohalm/cyclos/utils/conversion/CoercionHelper.java",
"license": "gpl-2.0",
"size": 10997
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,073,691 |
private int getContextId(JSONObject params) throws ApiException {
return ApiUtils.getIntParam(params, PARAM_CONTEXT_ID);
} | int function(JSONObject params) throws ApiException { return ApiUtils.getIntParam(params, PARAM_CONTEXT_ID); } | /**
* Gets the context id from the parameters or throws a Missing Parameter exception, if any
* problems occured.
*
* @param params the params
* @return the context id
* @throws ApiException the api exception
*/ | Gets the context id from the parameters or throws a Missing Parameter exception, if any problems occured | getContextId | {
"repo_name": "JordanGS/zaproxy",
"path": "src/org/zaproxy/zap/extension/users/UsersAPI.java",
"license": "apache-2.0",
"size": 11079
} | [
"net.sf.json.JSONObject",
"org.zaproxy.zap.extension.api.ApiException",
"org.zaproxy.zap.utils.ApiUtils"
] | import net.sf.json.JSONObject; import org.zaproxy.zap.extension.api.ApiException; import org.zaproxy.zap.utils.ApiUtils; | import net.sf.json.*; import org.zaproxy.zap.extension.api.*; import org.zaproxy.zap.utils.*; | [
"net.sf.json",
"org.zaproxy.zap"
] | net.sf.json; org.zaproxy.zap; | 2,652,469 |
public SubmissionBuilder creator(UserID creator)
{
this.creator = creator;
return this;
} | SubmissionBuilder function(UserID creator) { this.creator = creator; return this; } | /**
* Sets the {@link UserID} of the creator.
*
* @param creator The {@code UserID} of the creator
* @return The {@code SubmissionBuilder} object
*/ | Sets the <code>UserID</code> of the creator | creator | {
"repo_name": "diretto/JavaClientTaskPlugin",
"path": "src/org/diretto/api/client/external/task/entities/SubmissionBuilder.java",
"license": "mit",
"size": 4207
} | [
"org.diretto.api.client.user.UserID"
] | import org.diretto.api.client.user.UserID; | import org.diretto.api.client.user.*; | [
"org.diretto.api"
] | org.diretto.api; | 1,006,475 |
public static EnvVars createCookie() {
return new EnvVars("HUDSON_COOKIE", UUID.randomUUID().toString());
} | static EnvVars function() { return new EnvVars(STR, UUID.randomUUID().toString()); } | /**
* Creates a magic cookie that can be used as the model environment variable
* when we later kill the processes.
*/ | Creates a magic cookie that can be used as the model environment variable when we later kill the processes | createCookie | {
"repo_name": "eclipse/hudson.core",
"path": "hudson-core/src/main/java/hudson/EnvVars.java",
"license": "apache-2.0",
"size": 9058
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 1,499,411 |
public Object getObject() throws SAXException {
return null;
} | Object function() throws SAXException { return null; } | /**
* Returns the object for this element or null, if this element does not create an object.
*
* @return the object.
* @throws org.xml.sax.SAXException
* if an parser error occurred.
*/ | Returns the object for this element or null, if this element does not create an object | getObject | {
"repo_name": "mbatchelor/pentaho-reporting",
"path": "engine/extensions/src/main/java/org/pentaho/reporting/engine/classic/extensions/modules/mailer/parser/SessionPropertyReadHandler.java",
"license": "lgpl-2.1",
"size": 2363
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 309,388 |
private void recordPutWithoutWal(final Map<byte [], List<KeyValue>> familyMap) {
if (numPutsWithoutWAL.getAndIncrement() == 0) {
LOG.info("writing data to region " + this +
" with WAL disabled. Data may be lost in the event of a crash.");
}
long putSize = 0;
for (List<KeyValue> e... | void function(final Map<byte [], List<KeyValue>> familyMap) { if (numPutsWithoutWAL.getAndIncrement() == 0) { LOG.info(STR + this + STR); } long putSize = 0; for (List<KeyValue> edits : familyMap.values()) { for (KeyValue kv : edits) { putSize += kv.getKeyLength() + kv.getValueLength(); } } dataInMemoryWithoutWAL.addAn... | /**
* Update counters for numer of puts without wal and the size of possible data loss.
* These information are exposed by the region server metrics.
*/ | Update counters for numer of puts without wal and the size of possible data loss. These information are exposed by the region server metrics | recordPutWithoutWal | {
"repo_name": "gdweijin/hindex",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 221667
} | [
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hbase.KeyValue"
] | import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.KeyValue; | import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,244,166 |
public CenterFundingSourceType find(long id);
| CenterFundingSourceType function(long id); | /**
* This method gets a fundingSourceType object by a given fundingSourceType identifier.
*
* @param fundingSourceTypeID is the fundingSourceType identifier.
* @return a CenterFundingSourceType object.
*/ | This method gets a fundingSourceType object by a given fundingSourceType identifier | find | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ICenterFundingSourceTypeDAO.java",
"license": "gpl-3.0",
"size": 2992
} | [
"org.cgiar.ccafs.marlo.data.model.CenterFundingSourceType"
] | import org.cgiar.ccafs.marlo.data.model.CenterFundingSourceType; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 2,881,162 |
public ServiceResponse<Void> putDoubleValid(Map<String, Double> arrayBody) throws ErrorException, IOException, IllegalArgumentException {
if (arrayBody == null) {
throw new IllegalArgumentException("Parameter arrayBody is required and cannot be null.");
}
Validator.validate(array... | ServiceResponse<Void> function(Map<String, Double> arrayBody) throws ErrorException, IOException, IllegalArgumentException { if (arrayBody == null) { throw new IllegalArgumentException(STR); } Validator.validate(arrayBody); Call<ResponseBody> call = service.putDoubleValid(arrayBody); return putDoubleValidDelegate(call.... | /**
* Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}.
*
* @param arrayBody the Map<String, Double> value
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException excep... | Set dictionary value {"0": 0, "1": -0.01, "2": 1.2e20} | putDoubleValid | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodydictionary/DictionaryOperationsImpl.java",
"license": "mit",
"size": 167988
} | [
"com.microsoft.rest.ServiceResponse",
"com.microsoft.rest.Validator",
"java.io.IOException",
"java.util.Map"
] | import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; import java.util.Map; | import com.microsoft.rest.*; import java.io.*; import java.util.*; | [
"com.microsoft.rest",
"java.io",
"java.util"
] | com.microsoft.rest; java.io; java.util; | 2,032,332 |
public int run(String[] args) throws Exception {
System.out.println("\n*****Loading the Configuration for this Job*****\n");
configure(args);
System.out.println("\n*****Done....*****\n");
System.out.println("Computing the KNN and weights");
JobConf conf1 = createJob1(args);
... | int function(String[] args) throws Exception { System.out.println(STR); configure(args); System.out.println(STR); System.out.println(STR); JobConf conf1 = createJob1(args); RunningJob job1 = JobClient.runJob(conf1); System.out.println(STR); return 0; } | /**
* Function to call the mapreduce jobs in this class.
*/ | Function to call the mapreduce jobs in this class | run | {
"repo_name": "saigoda/Recommender-System",
"path": "src/main/java/CreateGraph/KNN_Weight.java",
"license": "mit",
"size": 7237
} | [
"org.apache.hadoop.mapred.JobClient",
"org.apache.hadoop.mapred.JobConf",
"org.apache.hadoop.mapred.RunningJob"
] | import org.apache.hadoop.mapred.JobClient; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.RunningJob; | import org.apache.hadoop.mapred.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,789,631 |
public void setStroke(Stroke s){
gc.setStroke(s);
} | void function(Stroke s){ gc.setStroke(s); } | /**
* Sets the <code>Stroke</code> for the <code>Graphics2D</code> context.
* @param s the <code>Stroke</code> object to be used to stroke a
* <code>Shape</code> during the rendering process
*/ | Sets the <code>Stroke</code> for the <code>Graphics2D</code> context | setStroke | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/ext/awt/g2d/AbstractGraphics2D.java",
"license": "apache-2.0",
"size": 60727
} | [
"java.awt.Stroke"
] | import java.awt.Stroke; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,268,549 |
public boolean getForceTransitions() {
if ( forceTransitions == null ) {
forceTransitions = (SFBool)getField( "forceTransitions" );
}
return( forceTransitions.getValue( ) );
} | boolean function() { if ( forceTransitions == null ) { forceTransitions = (SFBool)getField( STR ); } return( forceTransitions.getValue( ) ); } | /** Return the forceTransitions boolean value.
* @return The forceTransitions boolean value. */ | Return the forceTransitions boolean value | getForceTransitions | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/external/node/navigation/SAILOD.java",
"license": "gpl-2.0",
"size": 6410
} | [
"org.web3d.x3d.sai.SFBool"
] | import org.web3d.x3d.sai.SFBool; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 76,556 |
// access to low level API
public HLAnnotation getContainedItem(){
return item;
}
//getters giving LLAPI object
| HLAnnotation function(){ return item; } | /**
* Return encapsulated object
*/ | Return encapsulated object | getContainedItem | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/hlcorestructure/hlapi/HLAnnotationHLAPI.java",
"license": "epl-1.0",
"size": 18811
} | [
"fr.lip6.move.pnml.symmetricnet.hlcorestructure.HLAnnotation"
] | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.HLAnnotation; | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 1,228,026 |
public int getCurrentPage() {
return mViewPager.getCurrentItem();
}
private class SectionsPagerAdapter extends FragmentStatePagerAdapter {
private final TalkRadioFragment[] fragments;
public SectionsPagerAdapter(FragmentManager fm) {
super(fm);
fragmen... | int function() { return mViewPager.getCurrentItem(); } private class SectionsPagerAdapter extends FragmentStatePagerAdapter { private final TalkRadioFragment[] fragments; public SectionsPagerAdapter(FragmentManager fm) { super(fm); fragments = new TalkRadioFragment[]{TalkRadioFragment.newInstance(), TalkRadioFragment.n... | /**
* Return the current page of the fragment.
*/ | Return the current page of the fragment | getCurrentPage | {
"repo_name": "mbeloded/oidarSample",
"path": "app/src/main/java/com/oidar/fragment/DrawerTalkRadioFragment.java",
"license": "gpl-2.0",
"size": 4960
} | [
"android.support.v4.app.FragmentManager",
"android.support.v4.app.FragmentStatePagerAdapter"
] | import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; | import android.support.v4.app.*; | [
"android.support"
] | android.support; | 1,374,346 |
EAttribute getEvent_Direction(); | EAttribute getEvent_Direction(); | /**
* Returns the meta object for the attribute '{@link org.yakindu.base.types.Event#getDirection <em>Direction</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Direction</em>'.
* @see org.yakindu.base.types.Event#getDirection()
* @see #getEvent()
... | Returns the meta object for the attribute '<code>org.yakindu.base.types.Event#getDirection Direction</code>'. | getEvent_Direction | {
"repo_name": "Yakindu/statecharts",
"path": "plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java",
"license": "epl-1.0",
"size": 91972
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 722,093 |
public Date getDate() {
return new Date(calendar.getTimeInMillis());
} | Date function() { return new Date(calendar.getTimeInMillis()); } | /**
* Returns a Date object.
*
* @return a date object constructed from the calendar property.
*/ | Returns a Date object | getDate | {
"repo_name": "freeplane/freeplane",
"path": "freeplane/src/main/java/org/freeplane/core/ui/components/calendar/JCalendar.java",
"license": "gpl-2.0",
"size": 17605
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 94,505 |
public void configure() throws InitializationException {
if (appenders == null) {
throw new InitializationException("Configuration property logging.appenders cannot be null.");
}
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
context.reset();
for (AppenderBase appender : app... | void function() throws InitializationException { if (appenders == null) { throw new InitializationException(STR); } LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); context.reset(); for (AppenderBase appender : appenders) { appender.configure(context); } Logger logger = context.getLogger(org.s... | /**
* Configure logging appenders.
*
* @throws InitializationException
*/ | Configure logging appenders | configure | {
"repo_name": "epam/DLab",
"path": "services/billing-azure/src/main/java/com/epam/dlab/billing/azure/config/LoggingConfigurationFactory.java",
"license": "apache-2.0",
"size": 4523
} | [
"ch.qos.logback.classic.Logger",
"ch.qos.logback.classic.LoggerContext",
"com.epam.dlab.billing.azure.logging.AppenderBase",
"com.epam.dlab.exceptions.InitializationException",
"org.slf4j.LoggerFactory"
] | import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.LoggerContext; import com.epam.dlab.billing.azure.logging.AppenderBase; import com.epam.dlab.exceptions.InitializationException; import org.slf4j.LoggerFactory; | import ch.qos.logback.classic.*; import com.epam.dlab.billing.azure.logging.*; import com.epam.dlab.exceptions.*; import org.slf4j.*; | [
"ch.qos.logback",
"com.epam.dlab",
"org.slf4j"
] | ch.qos.logback; com.epam.dlab; org.slf4j; | 1,855,835 |
@Test
public void certAndBasicAuth() {
User user = certAndBasicAuthUser(CLIENT_CERT_PATH, CLIENT_KEY_PATH, "foo", "secret");
user.validate();
assertThat(user.hasCertAuth(), is(true));
assertThat(user.hasTokenAuth(), is(false));
assertThat(user.hasBasicAuth(), is(true));
... | void function() { User user = certAndBasicAuthUser(CLIENT_CERT_PATH, CLIENT_KEY_PATH, "foo", STR); user.validate(); assertThat(user.hasCertAuth(), is(true)); assertThat(user.hasTokenAuth(), is(false)); assertThat(user.hasBasicAuth(), is(true)); } | /**
* It should be possible to combine cert auth and basic auth.
*/ | It should be possible to combine cert auth and basic auth | certAndBasicAuth | {
"repo_name": "elastisys/scale.cloudpool",
"path": "kubernetes/src/test/java/com/elastisys/scale/cloudpool/kubernetes/config/kubeconfig/TestUser.java",
"license": "apache-2.0",
"size": 9465
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 388,980 |
public static SmeltEvent.Start createSmeltEventStart(Game game, Cause cause, ItemStackSnapshot fuel, Inventory targetInventory, Furnace targetTile, List<ItemStackTransaction> transactions) {
Map<String, Object> values = Maps.newHashMap();
values.put("game", game);
values.put("cause", cause);... | static SmeltEvent.Start function(Game game, Cause cause, ItemStackSnapshot fuel, Inventory targetInventory, Furnace targetTile, List<ItemStackTransaction> transactions) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("cause", cause); values.put("fuel", fuel); values.put(STR, targe... | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.block.tileentity.SmeltEvent.Start}.
*
* @param game The game
* @param cause The cause
* @param fuel The fuel
* @param targetInventory The target inventory
* @param t... | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.block.tileentity.SmeltEvent.Start</code> | createSmeltEventStart | {
"repo_name": "jamierocks/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 196993
} | [
"com.google.common.collect.Maps",
"java.util.List",
"java.util.Map",
"org.spongepowered.api.Game",
"org.spongepowered.api.block.tileentity.carrier.Furnace",
"org.spongepowered.api.event.block.tileentity.SmeltEvent",
"org.spongepowered.api.event.cause.Cause",
"org.spongepowered.api.item.inventory.Inven... | import com.google.common.collect.Maps; import java.util.List; import java.util.Map; import org.spongepowered.api.Game; import org.spongepowered.api.block.tileentity.carrier.Furnace; import org.spongepowered.api.event.block.tileentity.SmeltEvent; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.a... | import com.google.common.collect.*; import java.util.*; import org.spongepowered.api.*; import org.spongepowered.api.block.tileentity.carrier.*; import org.spongepowered.api.event.block.tileentity.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.item.inventory.*; | [
"com.google.common",
"java.util",
"org.spongepowered.api"
] | com.google.common; java.util; org.spongepowered.api; | 2,173,178 |
protected Set<AnnotatableType> furtherRequires() {
return Collections.emptySet();
} | Set<AnnotatableType> function() { return Collections.emptySet(); } | /**
* The annotation types beyond sentence and token that are also required. By default will return an empty Set.
*
* @return The annotations beyond sentence and token that are required for this annotator to perform annotation
*/ | The annotation types beyond sentence and token that are also required. By default will return an empty Set | furtherRequires | {
"repo_name": "dbracewell/hermes",
"path": "hermes-core/src/main/java/com/davidbracewell/hermes/annotator/SentenceLevelAnnotator.java",
"license": "apache-2.0",
"size": 2243
} | [
"com.davidbracewell.hermes.AnnotatableType",
"java.util.Collections",
"java.util.Set"
] | import com.davidbracewell.hermes.AnnotatableType; import java.util.Collections; import java.util.Set; | import com.davidbracewell.hermes.*; import java.util.*; | [
"com.davidbracewell.hermes",
"java.util"
] | com.davidbracewell.hermes; java.util; | 1,172,855 |
@Units("milliseconds")
@Description("The configured maximum time in milliseconds to wait for a connection before a failure is returned to the client")
public long getConnectionWaitTime(); | @Units(STR) @Description(STR) long function(); | /**
* How long to wait for connections when timed out.
*/ | How long to wait for connections when timed out | getConnectionWaitTime | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/management/server/ConnectionPoolMXBean.java",
"license": "gpl-2.0",
"size": 4999
} | [
"com.caucho.jmx.Description",
"com.caucho.jmx.Units"
] | import com.caucho.jmx.Description; import com.caucho.jmx.Units; | import com.caucho.jmx.*; | [
"com.caucho.jmx"
] | com.caucho.jmx; | 479,912 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<LocalNetworkGatewayInner> listByResourceGroup(String resourceGroupName, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<LocalNetworkGatewayInner> listByResourceGroup(String resourceGroupName, Context context); | /**
* Gets all the local network gateways in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.m... | Gets all the local network gateways in a resource group | listByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/LocalNetworkGatewaysClient.java",
"license": "mit",
"size": 22790
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.LocalNetworkGatewayInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.LocalNetworkGatewayInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 178,767 |
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
| void function(SiteService siteService) { this.siteService = siteService; } | /**
* Sets the Site Service to be used for importing into
*
* @param siteService The Site Service
*/ | Sets the Site Service to be used for importing into | setSiteService | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/admin/patch/impl/SiteLoadPatch.java",
"license": "lgpl-3.0",
"size": 13998
} | [
"org.alfresco.service.cmr.site.SiteService"
] | import org.alfresco.service.cmr.site.SiteService; | import org.alfresco.service.cmr.site.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 2,258,316 |
public Iterator findParentGroups(IGroupMember gm) throws GroupsException {
if (gm.isGroup()) {
IEntityGroup group = (IEntityGroup) gm;
return findParentGroups(group);
} else {
IEntity ent = (IEntity) gm;
return findParentGroups(ent);
}
} | Iterator function(IGroupMember gm) throws GroupsException { if (gm.isGroup()) { IEntityGroup group = (IEntityGroup) gm; return findParentGroups(group); } else { IEntity ent = (IEntity) gm; return findParentGroups(ent); } } | /**
* Returns an <code>Iterator</code> over the <code>Collection</code> of <code>IEntityGroups
* </code> that the <code>IGroupMember</code> belongs to.
*
* @return java.util.Iterator
* @param gm org.apereo.portal.groups.IEntityGroup
*/ | Returns an <code>Iterator</code> over the <code>Collection</code> of <code>IEntityGroups </code> that the <code>IGroupMember</code> belongs to | findParentGroups | {
"repo_name": "jhelmer-unicon/uPortal",
"path": "uportal-war/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStore.java",
"license": "apache-2.0",
"size": 32974
} | [
"java.util.Iterator",
"org.apereo.portal.groups.GroupsException",
"org.apereo.portal.groups.IEntity",
"org.apereo.portal.groups.IEntityGroup",
"org.apereo.portal.groups.IGroupMember"
] | import java.util.Iterator; import org.apereo.portal.groups.GroupsException; import org.apereo.portal.groups.IEntity; import org.apereo.portal.groups.IEntityGroup; import org.apereo.portal.groups.IGroupMember; | import java.util.*; import org.apereo.portal.groups.*; | [
"java.util",
"org.apereo.portal"
] | java.util; org.apereo.portal; | 1,781,518 |
private static void initialize(InternalCache cache) {
try {
InternalRegionFactory factory = cache.createInternalRegionFactory(RegionShortcut.LOCAL);
factory.setEntryTimeToLive(
new ExpirationAttributes(ADMIN_REGION_EXPIRY_INTERVAL, ExpirationAction.DESTROY));
if (logger.isDebugEnabled(... | static void function(InternalCache cache) { try { InternalRegionFactory factory = cache.createInternalRegionFactory(RegionShortcut.LOCAL); factory.setEntryTimeToLive( new ExpirationAttributes(ADMIN_REGION_EXPIRY_INTERVAL, ExpirationAction.DESTROY)); if (logger.isDebugEnabled()) { logger.debug(STR); } factory.addCacheLi... | /**
* This method creates the client health monitoring region.
* <p>
* GuardedBy ClientHealthMonitoringRegion.class
*
* @param cache The current GemFire Cache
*/ | This method creates the client health monitoring region. GuardedBy ClientHealthMonitoringRegion.class | initialize | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/admin/ClientHealthMonitoringRegion.java",
"license": "apache-2.0",
"size": 4105
} | [
"org.apache.geode.cache.ExpirationAction",
"org.apache.geode.cache.ExpirationAttributes",
"org.apache.geode.cache.RegionShortcut",
"org.apache.geode.internal.admin.remote.ClientHealthStats",
"org.apache.geode.internal.cache.InternalCache",
"org.apache.geode.internal.cache.InternalRegionFactory"
] | import org.apache.geode.cache.ExpirationAction; import org.apache.geode.cache.ExpirationAttributes; import org.apache.geode.cache.RegionShortcut; import org.apache.geode.internal.admin.remote.ClientHealthStats; import org.apache.geode.internal.cache.InternalCache; import org.apache.geode.internal.cache.InternalRegionFa... | import org.apache.geode.cache.*; import org.apache.geode.internal.admin.remote.*; import org.apache.geode.internal.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 580,005 |
public AllGroupHeadsCollector<?> createAllGroupCollector() throws IOException {
return null;
} | AllGroupHeadsCollector<?> function() throws IOException { return null; } | /**
* Returns a collector that is able to return the most relevant document of all groups. Returns
* <code>null</code> if the command doesn't support this type of collector.
*
* @return a collector that is able to return the most relevant document of all groups.
* @throws IOException If I/O rel... | Returns a collector that is able to return the most relevant document of all groups. Returns <code>null</code> if the command doesn't support this type of collector | createAllGroupCollector | {
"repo_name": "apache/solr",
"path": "solr/core/src/java/org/apache/solr/search/Grouping.java",
"license": "apache-2.0",
"size": 38428
} | [
"java.io.IOException",
"org.apache.lucene.search.grouping.AllGroupHeadsCollector"
] | import java.io.IOException; import org.apache.lucene.search.grouping.AllGroupHeadsCollector; | import java.io.*; import org.apache.lucene.search.grouping.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,455,355 |
default Metrics.Single inspect(Metric metric) throws EntityNotFoundException {
Environments.Single env = tenants().get(metric.getTenantId()).environments().get(metric.getEnvironmentId());
if (metric.getFeedId() == null) {
return env.feedlessMetrics().get(metric.getId());
} else ... | default Metrics.Single inspect(Metric metric) throws EntityNotFoundException { Environments.Single env = tenants().get(metric.getTenantId()).environments().get(metric.getEnvironmentId()); if (metric.getFeedId() == null) { return env.feedlessMetrics().get(metric.getId()); } else { return env.feeds().get(metric.getFeedId... | /**
* Provides an access interface for inspecting given metric.
*
* @param metric the metric to steer to.
* @return the access interface to the metric
*/ | Provides an access interface for inspecting given metric | inspect | {
"repo_name": "pilhuhn/hawkular-inventory",
"path": "api/src/main/java/org/hawkular/inventory/api/Inventory.java",
"license": "apache-2.0",
"size": 11779
} | [
"org.hawkular.inventory.api.model.Metric"
] | import org.hawkular.inventory.api.model.Metric; | import org.hawkular.inventory.api.model.*; | [
"org.hawkular.inventory"
] | org.hawkular.inventory; | 807,920 |
Collection<StoreFile> close() throws IOException; | Collection<StoreFile> close() throws IOException; | /**
* Close all the readers We don't need to worry about subsequent requests because the HRegion
* holds a write lock that will prevent any more reads or writes.
* @return the {@link StoreFile StoreFiles} that were previously being used.
* @throws IOException on failure
*/ | Close all the readers We don't need to worry about subsequent requests because the HRegion holds a write lock that will prevent any more reads or writes | close | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java",
"license": "apache-2.0",
"size": 12112
} | [
"java.io.IOException",
"java.util.Collection"
] | import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,323,814 |
HttpMethod httpMethod = null;
try {
httpMethod = HttpMethod.valueOf(method);
} catch (IllegalArgumentException ex) {
}
return new Maybe<>(httpMethod);
} | HttpMethod httpMethod = null; try { httpMethod = HttpMethod.valueOf(method); } catch (IllegalArgumentException ex) { } return new Maybe<>(httpMethod); } | /**
* Converts string to an HttpMethod.
*
* @param method
* @return
*/ | Converts string to an HttpMethod | toHttpMethod | {
"repo_name": "hbcomputerscience/espresso",
"path": "src/main/java/org/hbw/espresso/router/Router.java",
"license": "apache-2.0",
"size": 2830
} | [
"org.hbw.espresso.functor.Maybe",
"org.hbw.espresso.http.HttpMethod"
] | import org.hbw.espresso.functor.Maybe; import org.hbw.espresso.http.HttpMethod; | import org.hbw.espresso.functor.*; import org.hbw.espresso.http.*; | [
"org.hbw.espresso"
] | org.hbw.espresso; | 2,804,045 |
private void sendCancelOrError(Job job, boolean isError) {
int command = isError ? MESSAGE_EXCEPTION_OCCUR
: MESSAGE_CANCEL_BY_USER;
if (job != null) {
Message message = mHandler.obtainMessage(command, job.id, 0, job);
message.sendToTarget();
}
Job jobInQueue = null;
while (null != (jobInQueue... | void function(Job job, boolean isError) { int command = isError ? MESSAGE_EXCEPTION_OCCUR : MESSAGE_CANCEL_BY_USER; if (job != null) { Message message = mHandler.obtainMessage(command, job.id, 0, job); message.sendToTarget(); } Job jobInQueue = null; while (null != (jobInQueue = popJob())) { Message message = mHandler.... | /**
* Send cancel event
*/ | Send cancel event | sendCancelOrError | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Nfc/src/com/mediatek/nfc/handover/FilePushClient.java",
"license": "gpl-2.0",
"size": 18688
} | [
"android.os.Message"
] | import android.os.Message; | import android.os.*; | [
"android.os"
] | android.os; | 2,187,331 |
Map<String, String> getProperties(); | Map<String, String> getProperties(); | /**
* Gets the properties that can be referenced in the camel context
*
* @return the properties
*/ | Gets the properties that can be referenced in the camel context | getProperties | {
"repo_name": "jarst/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 68708
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,241,706 |
public static Pattern[] getPatternsFromStrings(final String[] regexps){
Pattern[] patterns = new Pattern[regexps.length];
for (int i = 0; i < regexps.length; i++) {
Pattern pattern = Pattern.compile(".*\\." + regexps[i],Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
patterns[i] = pattern;
}
... | static Pattern[] function(final String[] regexps){ Pattern[] patterns = new Pattern[regexps.length]; for (int i = 0; i < regexps.length; i++) { Pattern pattern = Pattern.compile(".*\\." + regexps[i],Pattern.CASE_INSENSITIVE Pattern.UNICODE_CASE); patterns[i] = pattern; } return patterns; } | /**
* Returns an array of compiled regex.Patterns given an array of Strings.
* Patterns are case insensitive
*/ | Returns an array of compiled regex.Patterns given an array of Strings. Patterns are case insensitive | getPatternsFromStrings | {
"repo_name": "OpenWIS/openwis",
"path": "openwis-dataservice/openwis-dataservice-cache/openwis-dataservice-cache-ejb/src/main/java/org/openwis/dataservice/util/GlobalDataCollectionUtils.java",
"license": "gpl-3.0",
"size": 3756
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,067,498 |
public static BufferedImage getGreenTree() {
return greenTree;
} | static BufferedImage function() { return greenTree; } | /**
* Devuelve el sprite del green tree. <br>
*
* @return Sprite del green tree. <br>
*/ | Devuelve el sprite del green tree. | getGreenTree | {
"repo_name": "JavaATR/jrpg-2017b-cliente",
"path": "src/main/resources/recursos/Recursos.java",
"license": "mit",
"size": 38422
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,158,711 |
@Nullable
protected ResourceBundle getCachedBundle(
@NotNull final String bundleName,
@NotNull final Map<String, TimestampResourceBundle> map,
final boolean resetCache,
final long cacheTtl)
{
@Nullable TimestampResourceBundle result = map.get(bundleName);
if ... | ResourceBundle function( @NotNull final String bundleName, @NotNull final Map<String, TimestampResourceBundle> map, final boolean resetCache, final long cacheTtl) { @Nullable TimestampResourceBundle result = map.get(bundleName); if (resetCache) { emptyCache(map); result = null; } else if ( (result != null) && (hasExpir... | /**
* Retrieves the cached <code>ResourceBundle</code>.
* @param bundleName the bundle name.
* @param map the caching mechanism.
* @param resetCache whether the cache should be reset.
* @param cacheTtl the cache TTL.
* @return such bundle, or <code>null</code> if any.
*/ | Retrieves the cached <code>ResourceBundle</code> | getCachedBundle | {
"repo_name": "rydnr/java-commons",
"path": "src/main/java/org/acmsl/commons/CachingBundleI14able.java",
"license": "gpl-2.0",
"size": 16572
} | [
"java.util.Map",
"java.util.ResourceBundle",
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable"
] | import java.util.Map; import java.util.ResourceBundle; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 372,219 |
private static void processDayOfData(Date beginDate) {
Date endDate = new Date(beginDate.getTime() + Time.MS_PER_DAY);
System.out.println("Processing data for beginDate="
+ time.dateTimeStrMsecForTimezone(beginDate.getTime())
+ " endDate="
+ time.dateTimeStrMsecForTimezone(endDate.getTime()));
... | static void function(Date beginDate) { Date endDate = new Date(beginDate.getTime() + Time.MS_PER_DAY); System.out.println(STR + time.dateTimeStrMsecForTimezone(beginDate.getTime()) + STR + time.dateTimeStrMsecForTimezone(endDate.getTime())); List<AvlReport> avlReports = AvlReport.getAvlReportsFromDb( beginDate, endDate... | /**
* Processes days worth of AVL data to determine the block assignments
* for each trip. Updates the static tripToBlockMap with the block
* assignment for each trip.
*
* @param beginDate
*/ | Processes days worth of AVL data to determine the block assignments for each trip. Updates the static tripToBlockMap with the block assignment for each trip | processDayOfData | {
"repo_name": "TheTransitClock/transitime",
"path": "transitclock/src/main/java/org/transitclock/custom/mbta/GenerateMbtaBlockInfo.java",
"license": "gpl-3.0",
"size": 14745
} | [
"java.util.ArrayList",
"java.util.Date",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.transitclock.db.structs.AvlReport",
"org.transitclock.gtfs.gtfsStructs.GtfsTrip",
"org.transitclock.utils.Time"
] | import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.transitclock.db.structs.AvlReport; import org.transitclock.gtfs.gtfsStructs.GtfsTrip; import org.transitclock.utils.Time; | import java.util.*; import org.transitclock.db.structs.*; import org.transitclock.gtfs.*; import org.transitclock.utils.*; | [
"java.util",
"org.transitclock.db",
"org.transitclock.gtfs",
"org.transitclock.utils"
] | java.util; org.transitclock.db; org.transitclock.gtfs; org.transitclock.utils; | 746,890 |
private void initTableViewer(Composite parent) {
mTableViewer = new TableViewer(parent, SWT.SINGLE | SWT.FULL_SELECTION);
initTable();
initColumns();
mTableViewer.setLabelProvider(new DetailLabelProvider());
mTableViewer.setContentProvider(new ArrayContentProvider());
}
| void function(Composite parent) { mTableViewer = new TableViewer(parent, SWT.SINGLE SWT.FULL_SELECTION); initTable(); initColumns(); mTableViewer.setLabelProvider(new DetailLabelProvider()); mTableViewer.setContentProvider(new ArrayContentProvider()); } | /**
* Initializes the TableView with label and content
* providers
* @param parent the Composite parent to the view
*/ | Initializes the TableView with label and content providers | initTableViewer | {
"repo_name": "bobbrady/tpteam",
"path": "tpbuddy/src/edu/harvard/fas/rbrady/tpteam/tpbuddy/views/DetailView.java",
"license": "mit",
"size": 4587
} | [
"org.eclipse.jface.viewers.ArrayContentProvider",
"org.eclipse.jface.viewers.TableViewer",
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.widgets.Composite; | import org.eclipse.jface.viewers.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jface; org.eclipse.swt; | 1,754,443 |
public ExerciseDecisionType getExerciseType() {
return _exerciseType;
} | ExerciseDecisionType function() { return _exerciseType; } | /**
* Gets the exercise type.
* @return The exercise type
*/ | Gets the exercise type | getExerciseType | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/equity/option/EquityOption.java",
"license": "apache-2.0",
"size": 6530
} | [
"com.opengamma.analytics.financial.ExerciseDecisionType"
] | import com.opengamma.analytics.financial.ExerciseDecisionType; | import com.opengamma.analytics.financial.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 244,779 |
PagedIterable<Operation> list(); | PagedIterable<Operation> list(); | /**
* Lists all of the available IoT Central Resource Provider operations.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return ... | Lists all of the available IoT Central Resource Provider operations | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iotcentral/azure-resourcemanager-iotcentral/src/main/java/com/azure/resourcemanager/iotcentral/models/Operations.java",
"license": "mit",
"size": 1345
} | [
"com.azure.core.http.rest.PagedIterable"
] | import com.azure.core.http.rest.PagedIterable; | import com.azure.core.http.rest.*; | [
"com.azure.core"
] | com.azure.core; | 1,613,252 |
@Override
public int hashCode() {
return 31 * Arrays.hashCode(dates) + Arrays.hashCode(values);
} | int function() { return 31 * Arrays.hashCode(dates) + Arrays.hashCode(values); } | /**
* A hash code for this time-series.
*
* @return a suitable hash code
*/ | A hash code for this time-series | hashCode | {
"repo_name": "OpenGamma/OG-Commons",
"path": "modules/collect/src/main/java/com/opengamma/collect/timeseries/SparseLocalDateDoubleTimeSeries.java",
"license": "apache-2.0",
"size": 18635
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,529,858 |
public static ASN1Set getInstance(
Object obj)
{
if (obj == null || obj instanceof ASN1Set)
{
return (ASN1Set)obj;
}
else if (obj instanceof ASN1SetParser)
{
return ASN1Set.getInstance(((ASN1SetParser)obj).toASN1Primitive());
}
... | static ASN1Set function( Object obj) { if (obj == null obj instanceof ASN1Set) { return (ASN1Set)obj; } else if (obj instanceof ASN1SetParser) { return ASN1Set.getInstance(((ASN1SetParser)obj).toASN1Primitive()); } else if (obj instanceof byte[]) { try { return ASN1Set.getInstance(ASN1Primitive.fromByteArray((byte[])ob... | /**
* return an ASN1Set from the given object.
*
* @param obj the object we want converted.
* @exception IllegalArgumentException if the object cannot be converted.
* @return an ASN1Set instance, or null.
*/ | return an ASN1Set from the given object | getInstance | {
"repo_name": "isghe/bc-java",
"path": "core/src/main/java/org/bouncycastle/asn1/ASN1Set.java",
"license": "mit",
"size": 15675
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,506,767 |
public void setBooleanIfUnset(String name, boolean value) {
setIfUnset(name, Boolean.toString(value));
}
public static class IntegerRanges {
private static class Range {
int start;
int end;
}
List<Range> ranges = new ArrayList<Range>();
public IntegerRanges() {
}
... | void function(String name, boolean value) { setIfUnset(name, Boolean.toString(value)); } public static class IntegerRanges { private static class Range { int start; int end; } List<Range> ranges = new ArrayList<Range>(); public IntegerRanges() { } public IntegerRanges(String newValue) { StringTokenizer itr = new String... | /**
* Set the given property, if it is currently unset.
* @param name property name
* @param value new value
*/ | Set the given property, if it is currently unset | setBooleanIfUnset | {
"repo_name": "submergerock/avatar-hadoop",
"path": "build/hadoop-0.20.1-dev/src/core/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 42445
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.StringTokenizer"
] | import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,532,297 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.