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
private Map<String,Object> executeRelatedResources(final Api api, Map<String, BeanPropertiesFilter> filters, Map<String, ResourceWithMetadata> relatedResources, String uniqueEntityId) { final Map<String,Object> results = new HashMap<String,Object>(relatedResources.size())...
Map<String,Object> function(final Api api, Map<String, BeanPropertiesFilter> filters, Map<String, ResourceWithMetadata> relatedResources, String uniqueEntityId) { final Map<String,Object> results = new HashMap<String,Object>(relatedResources.size()); for (final Entry<String, ResourceWithMetadata> relation : relatedReso...
/** * Loops through the related Resources and executed them. The results are added to list of embedded results used by * the ExecutionResult object. * * @param relatedResources * @param execRes * @param uniqueEntityId */
Loops through the related Resources and executed them. The results are added to list of embedded results used by the ExecutionResult object
executeRelatedResources
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/remote-api/source/java/org/alfresco/rest/framework/webscripts/ResourceWebScriptHelper.java", "license": "lgpl-3.0", "size": 27085 }
[ "java.util.HashMap", "java.util.Map", "org.alfresco.rest.framework.Api", "org.alfresco.rest.framework.core.ResourceWithMetadata", "org.alfresco.rest.framework.jacksonextensions.BeanPropertiesFilter" ]
import java.util.HashMap; import java.util.Map; import org.alfresco.rest.framework.Api; import org.alfresco.rest.framework.core.ResourceWithMetadata; import org.alfresco.rest.framework.jacksonextensions.BeanPropertiesFilter;
import java.util.*; import org.alfresco.rest.framework.*; import org.alfresco.rest.framework.core.*; import org.alfresco.rest.framework.jacksonextensions.*;
[ "java.util", "org.alfresco.rest" ]
java.util; org.alfresco.rest;
1,420,082
public static String parseFromUnicode( String input, EmojiTransformer transformer ) { int prev = 0; StringBuilder sb = new StringBuilder(input.length()); List<UnicodeCandidate> replacements = getUnicodeCandidates(input); for (UnicodeCandidate candidate : replacements) { sb.append(input...
static String function( String input, EmojiTransformer transformer ) { int prev = 0; StringBuilder sb = new StringBuilder(input.length()); List<UnicodeCandidate> replacements = getUnicodeCandidates(input); for (UnicodeCandidate candidate : replacements) { sb.append(input, prev, candidate.getEmojiStartIndex()); sb.appen...
/** * Detects all unicode emojis in input string and replaces them with the * return value of transformer.transform() * * @param input the string to process * @param transformer emoji transformer to apply to each emoji * * @return input string with all emojis transformed */
Detects all unicode emojis in input string and replaces them with the return value of transformer.transform()
parseFromUnicode
{ "repo_name": "vdurmont/emoji-java", "path": "src/main/java/com/vdurmont/emoji/EmojiParser.java", "license": "mit", "size": 19122 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,710,012
public void saveUsage(Usage usage) throws DAOException;
void function(Usage usage) throws DAOException;
/** * Saves a usage * @param The usage to save * @throws DAOException */
Saves a usage
saveUsage
{ "repo_name": "openmrs/openmrs-module-usagestatistics", "path": "api/src/main/java/org/openmrs/module/usagestatistics/db/UsageStatisticsDAO.java", "license": "mpl-2.0", "size": 7382 }
[ "org.openmrs.api.db.DAOException", "org.openmrs.module.usagestatistics.Usage" ]
import org.openmrs.api.db.DAOException; import org.openmrs.module.usagestatistics.Usage;
import org.openmrs.api.db.*; import org.openmrs.module.usagestatistics.*;
[ "org.openmrs.api", "org.openmrs.module" ]
org.openmrs.api; org.openmrs.module;
2,648,073
public Optional<String> getSorts() { return sorts; }
Optional<String> function() { return sorts; }
/** * Getter for the sorts. * * @return the sorts */
Getter for the sorts
getSorts
{ "repo_name": "yahoo/fili", "path": "fili-core/src/main/java/com/yahoo/bard/webservice/web/apirequest/RequestParameters.java", "license": "apache-2.0", "size": 7439 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
2,732,382
protected void setAdminState(AdminStates newState) { if (newState == AdminStates.NORMAL) { adminState = null; } else { adminState = newState; } } private transient int level; //which level of the tree the node resides private transient Node parent; //its parent @Override pub...
void function(AdminStates newState) { if (newState == AdminStates.NORMAL) { adminState = null; } else { adminState = newState; } } private transient int level; private transient Node parent; public Node getParent() { return parent; }
/** * Sets the admin state of this node. */
Sets the admin state of this node
setAdminState
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/DatanodeInfo.java", "license": "apache-2.0", "size": 12138 }
[ "org.apache.hadoop.net.Node" ]
import org.apache.hadoop.net.Node;
import org.apache.hadoop.net.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,370,610
FeatureMap getGroup();
FeatureMap getGroup();
/** * Returns the value of the '<em><b>Group</b></em>' attribute list. * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Group</em>' attribute list isn't clear, * there really should be more of a description here...
Returns the value of the 'Group' attribute list. The list contents are of type <code>org.eclipse.emf.ecore.util.FeatureMap.Entry</code>. If the meaning of the 'Group' attribute list isn't clear, there really should be more of a description here...
getGroup
{ "repo_name": "pedromateo/tug_qt_unit_testing_fw", "path": "qt48_model/src/org/casa/dsltesting/Qt48XmlschemaQwtEnhanced/PropertySpecifications.java", "license": "gpl-3.0", "size": 2700 }
[ "org.eclipse.emf.ecore.util.FeatureMap" ]
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
864,076
protected BasicViewer materializeViewer(Composite viewerParent) throws Exception { try { return new FXViewer(viewerParent); } catch (Exception e) { throw new Exception("", e); //$NON-NLS-1$ } }
BasicViewer function(Composite viewerParent) throws Exception { try { return new FXViewer(viewerParent); } catch (Exception e) { throw new Exception("", e); } }
/** * <p> * Fix for Eclipse/PDE's wonky fragment support. Creates a GeometryViewer * supplied by an implementation fragment. * </p> * * @param viewerParent * the parent widget * * @return a concrete implementation of GeometryViewer * * @throws Exception * th...
Fix for Eclipse/PDE's wonky fragment support. Creates a GeometryViewer supplied by an implementation fragment.
materializeViewer
{ "repo_name": "eclipse/eavp", "path": "org.eclipse.eavp.viz.service.javafx/src/org/eclipse/eavp/viz/service/javafx/canvas/FXVizCanvas.java", "license": "epl-1.0", "size": 7839 }
[ "org.eclipse.swt.widgets.Composite" ]
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,847,727
public static Method getAdder(Class<?> c, String fieldName) { FieldInfo info = getFieldInfo(c, fieldName); if (info != null) { return info.getAdder(); } return null; }
static Method function(Class<?> c, String fieldName) { FieldInfo info = getFieldInfo(c, fieldName); if (info != null) { return info.getAdder(); } return null; }
/** * Returns the Method object that is the adder for the field name * * @param c the Class * @param fieldName the name of the relevant collection * @return the adder, or null if it is not present or if the field is not found */
Returns the Method object that is the adder for the field name
getAdder
{ "repo_name": "elsiklab/intermine", "path": "intermine/model/main/src/org/intermine/metadata/TypeUtil.java", "license": "lgpl-2.1", "size": 29187 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
147,495
public static void eliminateDeadInstructions(IR ir, boolean preserveImplicitSSA) { // (USE BACKWARDS PASS FOR INCREASED EFFECTIVENESS) ArrayList<Instruction> setCaughtExceptionInstructions = null; int getCaughtExceptionInstructions = 0; for (Instruction instr = ir.lastInstructionInCodeOrder(), ...
static void function(IR ir, boolean preserveImplicitSSA) { ArrayList<Instruction> setCaughtExceptionInstructions = null; int getCaughtExceptionInstructions = 0; for (Instruction instr = ir.lastInstructionInCodeOrder(), prevInstr = null; instr != null; instr = prevInstr) { prevInstr = instr.prevInstructionInCodeOrder();...
/** * Simple conservative dead code elimination. * An instruction is eliminated if: * <ul> * <li> 1. it is not a PEI, store or non-pure call * <li> 2. it DEFs only registers * <li> 3. all registers it DEFS are dead * </ul> * * <p> Note: this function incrementally maintains the register li...
Simple conservative dead code elimination. An instruction is eliminated if: 1. it is not a PEI, store or non-pure call 2. it DEFs only registers 3. all registers it DEFS are dead Note: this function incrementally maintains the register list
eliminateDeadInstructions
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/Simple.java", "license": "epl-1.0", "size": 23413 }
[ "java.util.ArrayList", "java.util.Enumeration", "org.jikesrvm.compilers.opt.ir.Instruction", "org.jikesrvm.compilers.opt.ir.Move", "org.jikesrvm.compilers.opt.ir.Register", "org.jikesrvm.compilers.opt.ir.operand.Operand", "org.jikesrvm.compilers.opt.ir.operand.RegisterOperand" ]
import java.util.ArrayList; import java.util.Enumeration; import org.jikesrvm.compilers.opt.ir.Instruction; import org.jikesrvm.compilers.opt.ir.Move; import org.jikesrvm.compilers.opt.ir.Register; import org.jikesrvm.compilers.opt.ir.operand.Operand; import org.jikesrvm.compilers.opt.ir.operand.RegisterOperand;
import java.util.*; import org.jikesrvm.compilers.opt.ir.*; import org.jikesrvm.compilers.opt.ir.operand.*;
[ "java.util", "org.jikesrvm.compilers" ]
java.util; org.jikesrvm.compilers;
2,025,666
public void updateFeedbackModel(Assessment assessmentXml, AssessmentFeedbackIfc feedback) { Integer feedbackDelivery = feedback.getFeedbackDelivery(); if (feedback.FEEDBACK_BY_DATE.equals(feedbackDelivery)) { assessmentXml.setFieldentry("FEEDBACK_DELIVERY", "DATED...
void function(Assessment assessmentXml, AssessmentFeedbackIfc feedback) { Integer feedbackDelivery = feedback.getFeedbackDelivery(); if (feedback.FEEDBACK_BY_DATE.equals(feedbackDelivery)) { assessmentXml.setFieldentry(STR, "DATED"); } else if (feedback.IMMEDIATE_FEEDBACK.equals(feedbackDelivery)) { assessmentXml.setFi...
/** * Set feedback settings in XML * @param assessmentXml * @param feedback */
Set feedback settings in XML
updateFeedbackModel
{ "repo_name": "duke-compsci290-spring2016/sakai", "path": "samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/helper/assessment/AssessmentHelperBase.java", "license": "apache-2.0", "size": 21907 }
[ "org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentFeedbackIfc", "org.sakaiproject.tool.assessment.qti.asi.Assessment" ]
import org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentFeedbackIfc; import org.sakaiproject.tool.assessment.qti.asi.Assessment;
import org.sakaiproject.tool.assessment.data.ifc.assessment.*; import org.sakaiproject.tool.assessment.qti.asi.*;
[ "org.sakaiproject.tool" ]
org.sakaiproject.tool;
2,560,361
boolean gtk_scrolled_window_get_overlay_scrolling(GtkScrolledWindow scrolled_window);
boolean gtk_scrolled_window_get_overlay_scrolling(GtkScrolledWindow scrolled_window);
/** * Returns whether overlay scrolling is enabled for this scrolled window. * * @param scrolled_window a GtkScrolledWindow * @return TRUE if overlay scrolling is enabled */
Returns whether overlay scrolling is enabled for this scrolled window
gtk_scrolled_window_get_overlay_scrolling
{ "repo_name": "Ccook/gtk-java-bindings", "path": "src/main/java/com/github/ccook/gtk/library/object/widget/container/bin/GtkScrolledWindowLibrary.java", "license": "apache-2.0", "size": 12382 }
[ "com.github.ccook.gtk.model.object.widget.container.bin.GtkScrolledWindow" ]
import com.github.ccook.gtk.model.object.widget.container.bin.GtkScrolledWindow;
import com.github.ccook.gtk.model.object.widget.container.bin.*;
[ "com.github.ccook" ]
com.github.ccook;
1,240,840
public static void createDirs(Path path,Configuration conf) throws IOException { FileSystem fs = path.getFileSystem(conf); if (!fs.exists(path)) { fs.mkdirs(path); } }
static void function(Path path,Configuration conf) throws IOException { FileSystem fs = path.getFileSystem(conf); if (!fs.exists(path)) { fs.mkdirs(path); } }
/** * Create directories for a path. * @param path - directories path. * @param conf - cluster configuration. * @throws IOException - if an I/O error occurs. */
Create directories for a path
createDirs
{ "repo_name": "pombredanne/brisk-hadoop-common", "path": "src/contrib/gridmix/src/test/system/org/apache/hadoop/mapred/gridmix/UtilsForGridmix.java", "license": "apache-2.0", "size": 9999 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,494,774
public void addChoosableFileFilter(FileFilter filter) { if (filter != null) { FileFilter[] old = getChoosableFileFilters(); choosableFilters.add(filter); FileFilter[] newFilters = getChoosableFileFilters(); firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old, ...
void function(FileFilter filter) { if (filter != null) { FileFilter[] old = getChoosableFileFilters(); choosableFilters.add(filter); FileFilter[] newFilters = getChoosableFileFilters(); firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old, newFilters); } setFileFilter(filter); }
/** * Adds a file filter to the list of available filters and sends a * {@link PropertyChangeEvent} (with the property name * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered * listeners. * * @param filter the filter (<code>null</code> permitted). */
Adds a file filter to the list of available filters and sends a <code>PropertyChangeEvent</code> (with the property name <code>#CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY</code>) to all registered listeners
addChoosableFileFilter
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/JFileChooser.java", "license": "gpl-2.0", "size": 44341 }
[ "javax.swing.filechooser.FileFilter" ]
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.*;
[ "javax.swing" ]
javax.swing;
1,970,375
protected byte[] inflate(byte[] data, int buffersize) throws Exception { Inflater inflater = new Inflater(); inflater.setInput(data); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); byte[] buffer = new byte[buffersize]; while (!inflater.finished(...
byte[] function(byte[] data, int buffersize) throws Exception { Inflater inflater = new Inflater(); inflater.setInput(data); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); byte[] buffer = new byte[buffersize]; while (!inflater.finished()) { int count = inflater.inflate(buffer); outputStrea...
/** * inflate the byte array, using the specified buffer size * * @param data the data to inflate * @param buffersize the buffer size to use when inflating the data * @return the inflated data * @throws Exception */
inflate the byte array, using the specified buffer size
inflate
{ "repo_name": "zapbot/zap-extensions", "path": "addOns/ascanrulesBeta/src/main/java/org/zaproxy/zap/extension/ascanrulesBeta/GitMetadata.java", "license": "apache-2.0", "size": 68910 }
[ "java.io.ByteArrayOutputStream", "java.util.zip.Inflater" ]
import java.io.ByteArrayOutputStream; import java.util.zip.Inflater;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,091,645
public TDoubleList getMetrics() { TDoubleList retVal = new TDoubleArrayList(); for(Sample s : averagedRecords) { retVal.add(s.score); } return retVal; }
TDoubleList function() { TDoubleList retVal = new TDoubleArrayList(); for(Sample s : averagedRecords) { retVal.add(s.score); } return retVal; }
/** * Returns a list of the averages in the contained averaged record list. * @return */
Returns a list of the averages in the contained averaged record list
getMetrics
{ "repo_name": "sambitgaan/htm.java", "path": "src/main/java/org/numenta/nupic/algorithms/Anomaly.java", "license": "agpl-3.0", "size": 13813 }
[ "gnu.trove.list.TDoubleList", "gnu.trove.list.array.TDoubleArrayList" ]
import gnu.trove.list.TDoubleList; import gnu.trove.list.array.TDoubleArrayList;
import gnu.trove.list.*; import gnu.trove.list.array.*;
[ "gnu.trove.list" ]
gnu.trove.list;
11,032
@FIXVersion(introduced="4.3") @TagNumRef(tagNum=TagNum.LocateReqd) public void setLocateReqd(Boolean locateReqd) { this.locateReqd = locateReqd; }
@FIXVersion(introduced="4.3") @TagNumRef(tagNum=TagNum.LocateReqd) void function(Boolean locateReqd) { this.locateReqd = locateReqd; }
/** * Message field setter. * @param locateReqd field value */
Message field setter
setLocateReqd
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/CrossOrderModificationRequestMsg.java", "license": "gpl-3.0", "size": 87836 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,869,125
public boolean correctSocketAddress (InetAddress sa) { return this.sa.equals (sa); }
boolean function (InetAddress sa) { return this.sa.equals (sa); }
/** Check if the user is still using the same InetAddress * @param sa the new InetAddress of the user * @return true if the user is still on the same InetAddress */
Check if the user is still using the same InetAddress
correctSocketAddress
{ "repo_name": "curious-attempt-bunny/rabbit-http-proxy-fake-desktop-headers", "path": "src/rabbit/filter/authenticate/AuthUserInfo.java", "license": "apache-2.0", "size": 1537 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,915,872
KieModuleModel newKieModuleModel(); public static class Factory { private static KieServices INSTANCE; static { try { INSTANCE = ( KieServices ) Class.forName( "org.kie.builder.impl.KieServicesImpl" ).newInstance(); } catch (Exceptio...
KieModuleModel newKieModuleModel(); public static class Factory { private static KieServices INSTANCE; static { try { INSTANCE = ( KieServices ) Class.forName( STR ).newInstance(); } catch (Exception e) { throw new RuntimeException(STR, e); } }
/** * Creates a new KieModuleModel to programmatically define a KieModule */
Creates a new KieModuleModel to programmatically define a KieModule
newKieModuleModel
{ "repo_name": "psiroky/droolsjbpm-knowledge", "path": "kie-api/src/main/java/org/kie/KieServices.java", "license": "apache-2.0", "size": 3599 }
[ "org.kie.builder.model.KieModuleModel" ]
import org.kie.builder.model.KieModuleModel;
import org.kie.builder.model.*;
[ "org.kie.builder" ]
org.kie.builder;
1,365,801
public boolean testIdentityFieldNotEquals() throws Exception { Logger.getLogger(getClass()).debug( "Test identity field not equals - " + clazz.getName()); // Create an object Object o1 = createObject(1); Method[] methods = clazz.getMethods(); for (int i = 0; i < methods.length; i++) { ...
boolean function() throws Exception { Logger.getLogger(getClass()).debug( STR + clazz.getName()); Object o1 = createObject(1); Method[] methods = clazz.getMethods(); for (int i = 0; i < methods.length; i++) { Method m = methods[i]; if (!m.getName().startsWith("set")) continue; String fieldName = m.getName().substring(3...
/** * Creates two objects and verifies that any difference in identity fields * produces inequality. * * @return true, if successful * @throws Exception the exception */
Creates two objects and verifies that any difference in identity fields produces inequality
testIdentityFieldNotEquals
{ "repo_name": "WestCoastInformatics/Snomed-In-5-Minutes", "path": "model/src/main/java/org/ihtsdo/tutorial/util/EqualsHashcodeTester.java", "license": "apache-2.0", "size": 6814 }
[ "java.lang.reflect.Method", "org.apache.log4j.Logger" ]
import java.lang.reflect.Method; import org.apache.log4j.Logger;
import java.lang.reflect.*; import org.apache.log4j.*;
[ "java.lang", "org.apache.log4j" ]
java.lang; org.apache.log4j;
1,518,857
public static MCashBook get (Properties ctx, int C_CashBook_ID) { return get(ctx, C_CashBook_ID, null); } // get
static MCashBook function (Properties ctx, int C_CashBook_ID) { return get(ctx, C_CashBook_ID, null); }
/** * Get MCashBook from Cache * @param ctx context * @param C_CashBook_ID id * @return MCashBook */
Get MCashBook from Cache
get
{ "repo_name": "neuroidss/adempiere", "path": "base/src/org/compiere/model/MCashBook.java", "license": "gpl-2.0", "size": 4921 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
582,445
@Override protected void serviceInit(Configuration conf) throws Exception { super.serviceInit(conf); Configuration hbaseConf = HBaseConfiguration.create(conf); conn = ConnectionFactory.createConnection(hbaseConf); entityTable = new EntityTable().getTableMutator(hbaseConf, conn); app2FlowTable = ...
void function(Configuration conf) throws Exception { super.serviceInit(conf); Configuration hbaseConf = HBaseConfiguration.create(conf); conn = ConnectionFactory.createConnection(hbaseConf); entityTable = new EntityTable().getTableMutator(hbaseConf, conn); app2FlowTable = new App2FlowTable().getTableMutator(hbaseConf, ...
/** * initializes the hbase connection to write to the entity table */
initializes the hbase connection to write to the entity table
serviceInit
{ "repo_name": "zjshen/hadoop-YARN-2928-POC", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineWriterImpl.java", "license": "apache-2.0", "size": 11788 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.HBaseConfiguration", "org.apache.hadoop.hbase.client.ConnectionFactory", "org.apache.hadoop.yarn.server.timelineservice.storage.app2flow.App2FlowTable", "org.apache.hadoop.yarn.server.timelineservice.storage.entity.EntityTable" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.client.ConnectionFactory; import org.apache.hadoop.yarn.server.timelineservice.storage.app2flow.App2FlowTable; import org.apache.hadoop.yarn.server.timelineservice.storage.entity.EntityTable;
import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.yarn.server.timelineservice.storage.app2flow.*; import org.apache.hadoop.yarn.server.timelineservice.storage.entity.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
476,686
public ActionForward moveModuleUp( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { DynaActionForm editForm = (DynaActionForm) form; Integer moduleIndex = (Integer) editForm.get(MODULE_INDEX); int currM...
ActionForward function( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { DynaActionForm editForm = (DynaActionForm) form; Integer moduleIndex = (Integer) editForm.get(MODULE_INDEX); int currModuleIndex = moduleIndex.intValue(); Form...
/** * Swap the display order of the Module with the previous Module. * * @param mapping The ActionMapping used to select this instance. * @param form The optional ActionForm bean for this request. * @param request The HTTP Request we are processing. * @param response The HTTP Response we are processin...
Swap the display order of the Module with the previous Module
moveModuleUp
{ "repo_name": "NCIP/cadsr-formbuilder", "path": "software/formbuilder/src/java/gov/nih/nci/ncicb/cadsr/formbuilder/struts/actions/FormEditAction.java", "license": "bsd-3-clause", "size": 52713 }
[ "gov.nih.nci.ncicb.cadsr.common.CaDSRConstants", "gov.nih.nci.ncicb.cadsr.common.resource.Form", "gov.nih.nci.ncicb.cadsr.common.resource.Module", "gov.nih.nci.ncicb.cadsr.formbuilder.struts.common.FormActionUtil", "java.io.IOException", "java.util.List", "javax.servlet.ServletException", "javax.servl...
import gov.nih.nci.ncicb.cadsr.common.CaDSRConstants; import gov.nih.nci.ncicb.cadsr.common.resource.Form; import gov.nih.nci.ncicb.cadsr.common.resource.Module; import gov.nih.nci.ncicb.cadsr.formbuilder.struts.common.FormActionUtil; import java.io.IOException; import java.util.List; import javax.servlet.ServletExcept...
import gov.nih.nci.ncicb.cadsr.common.*; import gov.nih.nci.ncicb.cadsr.common.resource.*; import gov.nih.nci.ncicb.cadsr.formbuilder.struts.common.*; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*;
[ "gov.nih.nci", "java.io", "java.util", "javax.servlet", "org.apache.struts" ]
gov.nih.nci; java.io; java.util; javax.servlet; org.apache.struts;
2,058,048
@Override public void enterCompDescriptorFormula(@NotNull QueryGrammarParser.CompDescriptorFormulaContext ctx) { }
@Override public void enterCompDescriptorFormula(@NotNull QueryGrammarParser.CompDescriptorFormulaContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
exitCompMathMeasureAtom
{ "repo_name": "pmeisen/dis-timeintervaldataanalyzer", "path": "src/net/meisen/dissertation/impl/parser/query/generated/QueryGrammarBaseListener.java", "license": "bsd-3-clause", "size": 33327 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,760,977
void resumeTasks(Collection<String> taskOids, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException;
void resumeTasks(Collection<String> taskOids, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException;
/** * Resume suspended tasks. * * @param taskOids a collection of OIDs of tasks that have to be resumed * @throws SchemaException * @throws com.evolveum.midpoint.util.exception.ObjectNotFoundException */
Resume suspended tasks
resumeTasks
{ "repo_name": "PetrGasparik/midpoint", "path": "model/model-api/src/main/java/com/evolveum/midpoint/model/api/TaskService.java", "license": "apache-2.0", "size": 8511 }
[ "com.evolveum.midpoint.schema.result.OperationResult", "com.evolveum.midpoint.util.exception.ObjectNotFoundException", "com.evolveum.midpoint.util.exception.SchemaException", "com.evolveum.midpoint.util.exception.SecurityViolationException", "java.util.Collection" ]
import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.util.exception.SecurityViolationException; import java.util.Collection;
import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.util.exception.*; import java.util.*;
[ "com.evolveum.midpoint", "java.util" ]
com.evolveum.midpoint; java.util;
474,731
public List<EmailTemplate> getEmailTemplates(int max, int start);
List<EmailTemplate> function(int max, int start);
/** * Get a list of all the email templates in the system * @param max limit the number of items returned (0 for all) * @param start start with this item (0 for the first one) * @return a list of templates */
Get a list of all the email templates in the system
getEmailTemplates
{ "repo_name": "harfalm/Sakai-10.1", "path": "emailtemplateservice/api/src/java/org/sakaiproject/emailtemplateservice/service/EmailTemplateService.java", "license": "apache-2.0", "size": 6310 }
[ "java.util.List", "org.sakaiproject.emailtemplateservice.model.EmailTemplate" ]
import java.util.List; import org.sakaiproject.emailtemplateservice.model.EmailTemplate;
import java.util.*; import org.sakaiproject.emailtemplateservice.model.*;
[ "java.util", "org.sakaiproject.emailtemplateservice" ]
java.util; org.sakaiproject.emailtemplateservice;
1,576,580
public List<ExecService> listExecServicesThisExecServiceDependsOn(PerunSession perunSession, ExecService dependantExecService, ExecServiceType execServiceType) throws ServiceNotExistsException, InternalErrorException, PrivilegeException;
List<ExecService> function(PerunSession perunSession, ExecService dependantExecService, ExecServiceType execServiceType) throws ServiceNotExistsException, InternalErrorException, PrivilegeException;
/** * List execServices this execService depends on which are of specified execServiceType * * @param perunSession * @param dependantExecService execService which dependencies we want to look up * @param execServiceType type of execServices to list * @return list of exec services this execService depends on...
List execServices this execService depends on which are of specified execServiceType
listExecServicesThisExecServiceDependsOn
{ "repo_name": "ondrocks/perun", "path": "perun-controller/src/main/java/cz/metacentrum/perun/controller/service/GeneralServiceManager.java", "license": "bsd-2-clause", "size": 14197 }
[ "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException", "cz.metacentrum.perun.taskslib.model.ExecService", "java.uti...
import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException; import cz.metacentrum.perun.taskslib.model.ExecService...
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import cz.metacentrum.perun.taskslib.model.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,959,080
public void addItem(String itemName, String actionName, Icon icon, KeyStroke accelerator){ this.addItem(itemName, actionName, icon, -1, accelerator); }
void function(String itemName, String actionName, Icon icon, KeyStroke accelerator){ this.addItem(itemName, actionName, icon, -1, accelerator); }
/** * Adauga un item la meniu si in hashtable * @param itemName Numele optiunii */
Adauga un item la meniu si in hashtable
addItem
{ "repo_name": "genomeartist/genomeartist", "path": "sources_java/Components/src/ro/genomeartist/components/popup/JConfigurableMenu.java", "license": "gpl-3.0", "size": 5758 }
[ "javax.swing.Icon", "javax.swing.KeyStroke" ]
import javax.swing.Icon; import javax.swing.KeyStroke;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
157,288
public static Bound withSchema(ValueProvider<TableSchema> schema) { return new Bound().withSchema(schema); }
static Bound function(ValueProvider<TableSchema> schema) { return new Bound().withSchema(schema); }
/** * Like {@link #withSchema(TableSchema)}, but with a {@link ValueProvider}. */
Like <code>#withSchema(TableSchema)</code>, but with a <code>ValueProvider</code>
withSchema
{ "repo_name": "jasonkuster/beam", "path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java", "license": "apache-2.0", "size": 122807 }
[ "com.google.api.services.bigquery.model.TableSchema", "org.apache.beam.sdk.options.ValueProvider" ]
import com.google.api.services.bigquery.model.TableSchema; import org.apache.beam.sdk.options.ValueProvider;
import com.google.api.services.bigquery.model.*; import org.apache.beam.sdk.options.*;
[ "com.google.api", "org.apache.beam" ]
com.google.api; org.apache.beam;
1,750,079
public void truncate() throws IOException { getDatabase().checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_UPDATE);
void function() throws IOException { getDatabase().checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_UPDATE);
/** * Truncates all the clusters the class uses. * * @throws IOException */
Truncates all the clusters the class uses
truncate
{ "repo_name": "wuman/orientdb-android", "path": "core/src/main/java/com/orientechnologies/orient/core/metadata/schema/OClassImpl.java", "license": "apache-2.0", "size": 33711 }
[ "com.orientechnologies.orient.core.metadata.security.ODatabaseSecurityResources", "com.orientechnologies.orient.core.metadata.security.ORole", "java.io.IOException" ]
import com.orientechnologies.orient.core.metadata.security.ODatabaseSecurityResources; import com.orientechnologies.orient.core.metadata.security.ORole; import java.io.IOException;
import com.orientechnologies.orient.core.metadata.security.*; import java.io.*;
[ "com.orientechnologies.orient", "java.io" ]
com.orientechnologies.orient; java.io;
561,856
public void resuming(SessionEvent sevt) { } // resuming
void function(SessionEvent sevt) { }
/** * Called when the debuggee is about to be resumed. * * @param sevt session event. */
Called when the debuggee is about to be resumed
resuming
{ "repo_name": "mbertacca/JSwat2", "path": "classes/com/bluemarsh/jswat/view/ViewManager.java", "license": "gpl-2.0", "size": 6267 }
[ "com.bluemarsh.jswat.event.SessionEvent" ]
import com.bluemarsh.jswat.event.SessionEvent;
import com.bluemarsh.jswat.event.*;
[ "com.bluemarsh.jswat" ]
com.bluemarsh.jswat;
2,902,694
public void addTldSkipPatterns(String... patterns) { Assert.notNull(patterns, "Patterns must not be null"); this.tldSkipPatterns.addAll(Arrays.asList(patterns)); }
void function(String... patterns) { Assert.notNull(patterns, STR); this.tldSkipPatterns.addAll(Arrays.asList(patterns)); }
/** * Add patterns that match jars to ignore for TLD scanning. See Tomcat's * catalina.properties for typical values. * @param patterns the additional jar patterns to skip when scanning for TLDs etc */
Add patterns that match jars to ignore for TLD scanning. See Tomcat's catalina.properties for typical values
addTldSkipPatterns
{ "repo_name": "mdeinum/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java", "license": "apache-2.0", "size": 33006 }
[ "java.util.Arrays", "org.springframework.util.Assert" ]
import java.util.Arrays; import org.springframework.util.Assert;
import java.util.*; import org.springframework.util.*;
[ "java.util", "org.springframework.util" ]
java.util; org.springframework.util;
2,880,048
public static void assertNoException(final WebDriver selenium) { assertFalse(isElementPresent(selenium, By.id("exception-handler")), "Error loading page"); }
static void function(final WebDriver selenium) { assertFalse(isElementPresent(selenium, By.id(STR)), STR); }
/** * Assert that the current page is not the error handler page. * * @param selenium web browser driver */
Assert that the current page is not the error handler page
assertNoException
{ "repo_name": "jpschewe/fll-sw", "path": "src/integrationTest/java/fll/web/IntegrationTestUtils.java", "license": "gpl-2.0", "size": 45127 }
[ "org.junit.jupiter.api.Assertions", "org.openqa.selenium.By", "org.openqa.selenium.WebDriver" ]
import org.junit.jupiter.api.Assertions; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver;
import org.junit.jupiter.api.*; import org.openqa.selenium.*;
[ "org.junit.jupiter", "org.openqa.selenium" ]
org.junit.jupiter; org.openqa.selenium;
1,515,845
return new BinaryFormat(Sets.newEnumSet(Arrays.asList(flags), PackHeaderFlag.class)); }
return new BinaryFormat(Sets.newEnumSet(Arrays.asList(flags), PackHeaderFlag.class)); }
/** * Create a new binary format with some flags. * @param flags The flags. * @return The new binary format. */
Create a new binary format with some flags
create
{ "repo_name": "tajinder-txstate/lenskit", "path": "lenskit-core/src/main/java/org/lenskit/data/packed/BinaryFormat.java", "license": "lgpl-2.1", "size": 7195 }
[ "com.google.common.collect.Sets", "java.util.Arrays" ]
import com.google.common.collect.Sets; import java.util.Arrays;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
664,976
private CppCompileActionBuilder initializeCompileAction(Artifact sourceArtifact) { CppCompileActionBuilder builder = new CppCompileActionBuilder(ruleContext, ccToolchain, configuration); builder.setSourceFile(sourceArtifact); builder.setCcCompilationContext(ccCompilationContext); builder.setCo...
CppCompileActionBuilder function(Artifact sourceArtifact) { CppCompileActionBuilder builder = new CppCompileActionBuilder(ruleContext, ccToolchain, configuration); builder.setSourceFile(sourceArtifact); builder.setCcCompilationContext(ccCompilationContext); builder.setCoptsFilter(coptsFilter); builder.setFeatureConfigu...
/** * Returns a {@code CppCompileActionBuilder} with the common fields for a C++ compile action being * initialized. */
Returns a CppCompileActionBuilder with the common fields for a C++ compile action being initialized
initializeCompileAction
{ "repo_name": "ButterflyNetwork/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java", "license": "apache-2.0", "size": 86864 }
[ "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
2,378,786
public Image getImage( String uri ) { return getImage( null, uri, false ); }
Image function( String uri ) { return getImage( null, uri, false ); }
/** * Get image from URI * * @param uri * URI * @return The image gotten */
Get image from URI
getImage
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/ImageManager.java", "license": "epl-1.0", "size": 12771 }
[ "org.eclipse.swt.graphics.Image" ]
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
821,096
protected void undeployDir(File dir) { String files[] = dir.list(); if (files == null) { files = new String[0]; } for (int i = 0; i < files.length; i++) { File file = new File(dir, files[i]); if (file.isDirectory()) { undeployDir(f...
void function(File dir) { String files[] = dir.list(); if (files == null) { files = new String[0]; } for (int i = 0; i < files.length; i++) { File file = new File(dir, files[i]); if (file.isDirectory()) { undeployDir(file); } else { file.delete(); } } dir.delete(); }
/** * Delete the specified directory, including all of its contents and * subdirectories recursively. * * @param dir * File object representing the directory to be deleted */
Delete the specified directory, including all of its contents and subdirectories recursively
undeployDir
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.0/FarmWarDeployer.java", "license": "mit", "size": 25223 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,571,055
@Override public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); if (command.equals("SelectFont")) { attemptFontSelection(); } else if (command.equals("SelectPaint")) { attemptPaintSelection(); } ...
void function(ActionEvent event) { String command = event.getActionCommand(); if (command.equals(STR)) { attemptFontSelection(); } else if (command.equals(STR)) { attemptPaintSelection(); } else if (command.equals(STR)) { attemptModifyShowTitle(); } }
/** * Handles button clicks by passing control to an appropriate handler * method. * * @param event the event */
Handles button clicks by passing control to an appropriate handler method
actionPerformed
{ "repo_name": "simon04/jfreechart", "path": "src/main/java/org/jfree/chart/editor/DefaultTitleEditor.java", "license": "lgpl-2.1", "size": 10430 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,537,494
public static boolean hasCameraFeature(Context context) { PackageManager pm = context.getApplicationContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); }
static boolean function(Context context) { PackageManager pm = context.getApplicationContext().getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); }
/** * Checks whether the device has a camera feature or not. * * @param context a context to check for camera feature. * @return true if the device has a camera feature. false otherwise. */
Checks whether the device has a camera feature or not
hasCameraFeature
{ "repo_name": "zhihu/Matisse", "path": "matisse/src/main/java/com/zhihu/matisse/internal/utils/MediaStoreCompat.java", "license": "apache-2.0", "size": 5651 }
[ "android.content.Context", "android.content.pm.PackageManager" ]
import android.content.Context; import android.content.pm.PackageManager;
import android.content.*; import android.content.pm.*;
[ "android.content" ]
android.content;
2,145,886
public BillingSubscriptionsClient getBillingSubscriptions() { return this.billingSubscriptions; } private final ProductsClient products;
BillingSubscriptionsClient function() { return this.billingSubscriptions; } private final ProductsClient products;
/** * Gets the BillingSubscriptionsClient object to access its operations. * * @return the BillingSubscriptionsClient object. */
Gets the BillingSubscriptionsClient object to access its operations
getBillingSubscriptions
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingManagementClientImpl.java", "license": "mit", "size": 19968 }
[ "com.azure.resourcemanager.billing.fluent.BillingSubscriptionsClient", "com.azure.resourcemanager.billing.fluent.ProductsClient" ]
import com.azure.resourcemanager.billing.fluent.BillingSubscriptionsClient; import com.azure.resourcemanager.billing.fluent.ProductsClient;
import com.azure.resourcemanager.billing.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,225,377
public void trim() { for (Entry<?> entry : entries) { entry.trim(size); } }
void function() { for (Entry<?> entry : entries) { entry.trim(size); } }
/** * Trims the number of options per suggest text term to the requested size. * For internal usage. */
Trims the number of options per suggest text term to the requested size. For internal usage
trim
{ "repo_name": "wuranbo/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/suggest/Suggest.java", "license": "apache-2.0", "size": 24048 }
[ "org.elasticsearch.search.suggest.Suggest" ]
import org.elasticsearch.search.suggest.Suggest;
import org.elasticsearch.search.suggest.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,462,013
@Test public void testSetSkipFirstDrawStep3() throws Exception { this.cards.addCards("Enough cards for opening hand", 7); this.cards.addCards("Card for draw step", 1); Library<String> library = new Library<>(this.cards); Goldfish<String, Agent<String>> test = new Goldfish<St...
void function() throws Exception { this.cards.addCards(STR, 7); this.cards.addCards(STR, 1); Library<String> library = new Library<>(this.cards); Goldfish<String, Agent<String>> test = new Goldfish<String, Agent<String>>( library, this.agent); test.setSkipFirstDrawStep(true); test.setSkipFirstDrawStep(false); test.call...
/** * Setting on the draw */
Setting on the draw
testSetSkipFirstDrawStep3
{ "repo_name": "GoldfishMTG/simulation", "path": "test/org/goldfishmtg/simulation/GoldfishTest.java", "license": "mit", "size": 5723 }
[ "junit.framework.Assert", "org.goldfishmtg.cards.Library", "org.mockito.Mockito" ]
import junit.framework.Assert; import org.goldfishmtg.cards.Library; import org.mockito.Mockito;
import junit.framework.*; import org.goldfishmtg.cards.*; import org.mockito.*;
[ "junit.framework", "org.goldfishmtg.cards", "org.mockito" ]
junit.framework; org.goldfishmtg.cards; org.mockito;
571,100
private static void validateArray(final Object array) { if (array == null) { throw new IllegalArgumentException("The Array must not be null"); } else if (Array.getLength(array) == 0) { throw new IllegalArgumentException("Array cannot be empty."); } }
static void function(final Object array) { if (array == null) { throw new IllegalArgumentException(STR); } else if (Array.getLength(array) == 0) { throw new IllegalArgumentException(STR); } }
/** * Checks if the specified array is neither null nor empty. * * @param array the array to check * @throws IllegalArgumentException if {@code array} is either {@code null} or empty */
Checks if the specified array is neither null nor empty
validateArray
{ "repo_name": "nhchanh/apache-commons-lang3-3.2", "path": "src/main/java/org/apache/commons/lang3/math/NumberUtils.java", "license": "apache-2.0", "size": 49531 }
[ "java.lang.reflect.Array" ]
import java.lang.reflect.Array;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,840,862
@Override protected int poll() throws Exception { // must reset for each poll shutdownRunningTask = null; pendingExchanges = 0; // poll data from the database MyBatisEndpoint endpoint = getEndpoint(); LOG.trace("Polling: {}", endpoint); List<?> data = end...
int function() throws Exception { shutdownRunningTask = null; pendingExchanges = 0; MyBatisEndpoint endpoint = getEndpoint(); LOG.trace(STR, endpoint); List<?> data = endpoint.getProcessingStrategy().poll(this, getEndpoint()); Queue<DataHolder> answer = new LinkedList<>(); if (useIterator) { for (Object item : data) { ...
/** * Polls the database */
Polls the database
poll
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java", "license": "apache-2.0", "size": 7465 }
[ "java.util.LinkedList", "java.util.List", "java.util.Queue", "org.apache.camel.Exchange", "org.apache.camel.util.CastUtils" ]
import java.util.LinkedList; import java.util.List; import java.util.Queue; import org.apache.camel.Exchange; import org.apache.camel.util.CastUtils;
import java.util.*; import org.apache.camel.*; import org.apache.camel.util.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
858,457
@Override public void onResume() { super.onResume(); app = (ApplicationController) this.getApplication(); storyController = app.getStoryController(); pageController = app.getPageController(); tileBuilder = new TileLayoutBuilder(this); decisionBuilder = new DecisionLay...
void function() { super.onResume(); app = (ApplicationController) this.getApplication(); storyController = app.getStoryController(); pageController = app.getPageController(); tileBuilder = new TileLayoutBuilder(this); decisionBuilder = new DecisionLayoutBuilder(storyController,this); commentBuilder = new CommentLayoutB...
/** * Called when the Activity resumes. Handles setting up the entire activity */
Called when the Activity resumes. Handles setting up the entire activity
onResume
{ "repo_name": "CMPUT301F13T02/ChooseYourAdventure", "path": "src/ca/ualberta/CMPUT301F13T02/chooseyouradventure/ViewPageActivity.java", "license": "bsd-3-clause", "size": 16124 }
[ "android.widget.LinearLayout" ]
import android.widget.LinearLayout;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,359,235
public ProvisioningState provisioningState() { return this.provisioningState; }
ProvisioningState function() { return this.provisioningState; }
/** * Get the provisioningState property: The provisioning state of the express route cross connection resource. * * @return the provisioningState value. */
Get the provisioningState property: The provisioning state of the express route cross connection resource
provisioningState
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ExpressRouteCrossConnectionProperties.java", "license": "mit", "size": 7507 }
[ "com.azure.resourcemanager.network.models.ProvisioningState" ]
import com.azure.resourcemanager.network.models.ProvisioningState;
import com.azure.resourcemanager.network.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
135,101
public void store(Edge e, int partitionId) { // defensive programming: check range of partitions first if (partitionId >= 0 && partitionId < this.partitions.size()) { Vertex first = e.getFirstVertex(); Vertex second = e.getSecondVertex(); // store edge on the partition it was assigned to this...
void function(Edge e, int partitionId) { if (partitionId >= 0 && partitionId < this.partitions.size()) { Vertex first = e.getFirstVertex(); Vertex second = e.getSecondVertex(); this.partitions.get(partitionId).addEdge(e); dataContainer.store(first, partitionId); dataContainer.store(second, partitionId); } else { System...
/** * Stores the edge on the indicated partition. * * @param e * @param partitionId */
Stores the edge on the indicated partition
store
{ "repo_name": "GraphPartitioning/WISE", "path": "GraphPartitioning/src/de/ipvs/fachstudie/graphpartitioning/partitioner/memory/LimitedMemory.java", "license": "mit", "size": 6031 }
[ "de.ipvs.fachstudie.graphpartitioning.model.Edge", "de.ipvs.fachstudie.graphpartitioning.model.Vertex" ]
import de.ipvs.fachstudie.graphpartitioning.model.Edge; import de.ipvs.fachstudie.graphpartitioning.model.Vertex;
import de.ipvs.fachstudie.graphpartitioning.model.*;
[ "de.ipvs.fachstudie" ]
de.ipvs.fachstudie;
2,853,940
@Override public LegendItemCollection getLegendItems() { if (this.fixedLegendItems != null) { return this.fixedLegendItems; } LegendItemCollection result = new LegendItemCollection(); int count = this.datasets.size(); for (int datasetIndex = 0; datasetIndex < ...
LegendItemCollection function() { if (this.fixedLegendItems != null) { return this.fixedLegendItems; } LegendItemCollection result = new LegendItemCollection(); int count = this.datasets.size(); for (int datasetIndex = 0; datasetIndex < count; datasetIndex++) { XYDataset dataset = getDataset(datasetIndex); PolarItemRen...
/** * Returns the legend items for the plot. Each legend item is generated by * the plot's m_Renderer, since the m_Renderer is responsible for the visual * representation of the data. * * @return The legend items. */
Returns the legend items for the plot. Each legend item is generated by the plot's m_Renderer, since the m_Renderer is responsible for the visual representation of the data
getLegendItems
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-chart/jfreechat.src/org/jfree/chart/plot/PolarPlot.java", "license": "lgpl-3.0", "size": 71134 }
[ "org.jfree.chart.LegendItem", "org.jfree.chart.LegendItemCollection", "org.jfree.chart.renderer.PolarItemRenderer", "org.jfree.data.xy.XYDataset" ]
import org.jfree.chart.LegendItem; import org.jfree.chart.LegendItemCollection; import org.jfree.chart.renderer.PolarItemRenderer; import org.jfree.data.xy.XYDataset;
import org.jfree.chart.*; import org.jfree.chart.renderer.*; import org.jfree.data.xy.*;
[ "org.jfree.chart", "org.jfree.data" ]
org.jfree.chart; org.jfree.data;
800,565
private static void computeUpToDegree(final int degree, final int maxDegree, final RecurrenceCoefficientsGenerator generator, final List<BigFraction> coefficients) { int startK = (maxDegree - 1) * maxDegree / 2; for...
static void function(final int degree, final int maxDegree, final RecurrenceCoefficientsGenerator generator, final List<BigFraction> coefficients) { int startK = (maxDegree - 1) * maxDegree / 2; for (int k = maxDegree; k < degree; ++k) { int startKm1 = startK; startK += k; BigFraction[] ai = generator.generate(k); BigF...
/** Compute polynomial coefficients up to a given degree. * @param degree maximal degree * @param maxDegree current maximal degree * @param generator recurrence coefficients generator * @param coefficients list where the computed coefficients should be appended */
Compute polynomial coefficients up to a given degree
computeUpToDegree
{ "repo_name": "tbepler/seq-svm", "path": "src/org/apache/commons/math3/analysis/polynomials/PolynomialsUtils.java", "license": "mit", "size": 16961 }
[ "java.util.List", "org.apache.commons.math3.fraction.BigFraction" ]
import java.util.List; import org.apache.commons.math3.fraction.BigFraction;
import java.util.*; import org.apache.commons.math3.fraction.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,141,621
private void prepareToShowStartPagePreNative() { assert TabUiFeatureUtilities.supportInstantStart(isTablet() && !hadWarmStart(), this); try (TraceEvent e = TraceEvent.scoped("ChromeTabbedActivity.prepareToShowStartPagePreNative")) { setupCompositorContentPreNative...
void function() { assert TabUiFeatureUtilities.supportInstantStart(isTablet() && !hadWarmStart(), this); try (TraceEvent e = TraceEvent.scoped(STR)) { setupCompositorContentPreNativeForPhone(); getCompositorViewHolderSupplier().get().setLayoutManager(mLayoutManager); if (shouldShowOverviewPageOnStart()) { mLayoutManage...
/** * Prepares to show the start page before native is initialized. For example, create * an LayoutManagerChrome object, add overview mode observer and so on. */
Prepares to show the start page before native is initialized. For example, create an LayoutManagerChrome object, add overview mode observer and so on
prepareToShowStartPagePreNative
{ "repo_name": "chromium/chromium", "path": "chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java", "license": "bsd-3-clause", "size": 135297 }
[ "org.chromium.base.TraceEvent", "org.chromium.chrome.browser.device.DeviceClassManager", "org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities" ]
import org.chromium.base.TraceEvent; import org.chromium.chrome.browser.device.DeviceClassManager; import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities;
import org.chromium.base.*; import org.chromium.chrome.browser.device.*; import org.chromium.chrome.browser.tasks.tab_management.*;
[ "org.chromium.base", "org.chromium.chrome" ]
org.chromium.base; org.chromium.chrome;
272,058
@Generated @Selector("setDelegate:") public native void setDelegate_unsafe(@Mapped(ObjCObjectMapper.class) AVPlayerViewControllerDelegate value);
@Selector(STR) native void function(@Mapped(ObjCObjectMapper.class) AVPlayerViewControllerDelegate value);
/** * [@property] delegate * <p> * The receiver's delegate. */
[@property] delegate The receiver's delegate
setDelegate_unsafe
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/avkit/AVPlayerViewController.java", "license": "apache-2.0", "size": 16042 }
[ "org.moe.natj.general.ann.Mapped", "org.moe.natj.objc.ann.Selector", "org.moe.natj.objc.map.ObjCObjectMapper" ]
import org.moe.natj.general.ann.Mapped; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; import org.moe.natj.objc.map.*;
[ "org.moe.natj" ]
org.moe.natj;
1,583,562
@Test public void timeout() { final DeviceObjectPropertyValues callbackValues = new DeviceObjectPropertyValues(); final ReadListener callback = (progress, deviceId, oid, pid, pin, value) -> { callbackValues.add(deviceId, oid, pid, pin, value); // System.out.pri...
void function() { final DeviceObjectPropertyValues callbackValues = new DeviceObjectPropertyValues(); final ReadListener callback = (progress, deviceId, oid, pid, pin, value) -> { callbackValues.add(deviceId, oid, pid, pin, value); return false; }; final DeviceObjectPropertyReferences refs = new DeviceObjectPropertyRef...
/** * Requests a property from a device that doesn't exist. */
Requests a property from a device that doesn't exist
timeout
{ "repo_name": "infiniteautomation/BACnet4J", "path": "src/test/java/com/serotonin/bacnet4j/util/PropertyUtilsTest.java", "license": "gpl-3.0", "size": 24785 }
[ "com.serotonin.bacnet4j.type.enumerated.ErrorClass", "com.serotonin.bacnet4j.type.enumerated.ErrorCode", "com.serotonin.bacnet4j.type.enumerated.ObjectType", "com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier", "com.serotonin.bacnet4j.type.error.ErrorClassAndCode", "org.junit.Assert" ]
import com.serotonin.bacnet4j.type.enumerated.ErrorClass; import com.serotonin.bacnet4j.type.enumerated.ErrorCode; import com.serotonin.bacnet4j.type.enumerated.ObjectType; import com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier; import com.serotonin.bacnet4j.type.error.ErrorClassAndCode; import org.junit.Asse...
import com.serotonin.bacnet4j.type.enumerated.*; import com.serotonin.bacnet4j.type.error.*; import org.junit.*;
[ "com.serotonin.bacnet4j", "org.junit" ]
com.serotonin.bacnet4j; org.junit;
2,881,079
public void setPolicy(final Policy policy) { this.policy = policy; }
void function(final Policy policy) { this.policy = policy; }
/** * DOCUMENT ME! * * @param policy DOCUMENT ME! */
DOCUMENT ME
setPolicy
{ "repo_name": "cismet/data-objects", "path": "src/main/java/de/cismet/cids/jpa/entity/catalog/CatNode.java", "license": "lgpl-3.0", "size": 13559 }
[ "de.cismet.cids.jpa.entity.permission.Policy" ]
import de.cismet.cids.jpa.entity.permission.Policy;
import de.cismet.cids.jpa.entity.permission.*;
[ "de.cismet.cids" ]
de.cismet.cids;
551,881
private CompletableFuture<Void> copyCandidates(CompactionArgs args, TimeoutTimer timer) { val attributes = generateAttributeUpdates(args); // Collect all the candidates for copying and calculate the total serialization length. val toWrite = new ArrayList<TableEntry>(); val totalLeng...
CompletableFuture<Void> function(CompactionArgs args, TimeoutTimer timer) { val attributes = generateAttributeUpdates(args); val toWrite = new ArrayList<TableEntry>(); val totalLength = new AtomicInteger(0); args.getAll().stream().sorted(Comparator.comparingLong(c -> c.entry.getKey().getVersion())) .forEach(c -> { toWr...
/** * Copies the {@link Candidate}s in the given {@link CompactionArgs} set to a contiguous block at the end of the Segment. * * @param args A {@link CompactionArgs} containing the {@link Candidate}s to copy. * @param timer Timer for the operation. * @return A CompletableFuture that, when comp...
Copies the <code>Candidate</code>s in the given <code>CompactionArgs</code> set to a contiguous block at the end of the Segment
copyCandidates
{ "repo_name": "pravega/pravega", "path": "segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/TableCompactor.java", "license": "apache-2.0", "size": 23431 }
[ "io.pravega.common.TimeoutTimer", "io.pravega.common.concurrent.Futures", "io.pravega.common.util.BufferView", "io.pravega.segmentstore.contracts.tables.TableEntry", "java.util.ArrayList", "java.util.Comparator", "java.util.concurrent.CompletableFuture", "java.util.concurrent.atomic.AtomicInteger" ]
import io.pravega.common.TimeoutTimer; import io.pravega.common.concurrent.Futures; import io.pravega.common.util.BufferView; import io.pravega.segmentstore.contracts.tables.TableEntry; import java.util.ArrayList; import java.util.Comparator; import java.util.concurrent.CompletableFuture; import java.util.concurrent.at...
import io.pravega.common.*; import io.pravega.common.concurrent.*; import io.pravega.common.util.*; import io.pravega.segmentstore.contracts.tables.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*;
[ "io.pravega.common", "io.pravega.segmentstore", "java.util" ]
io.pravega.common; io.pravega.segmentstore; java.util;
2,301,886
void getAvailabilityInfo(CmsUUID structureId, AsyncCallback<CmsAvailabilityInfoBean> callback);
void getAvailabilityInfo(CmsUUID structureId, AsyncCallback<CmsAvailabilityInfoBean> callback);
/** * Gets a {@link CmsAvailabilityInfoBean} for a given resource.<p> * * @param structureId the structure id to create the {@link CmsAvailabilityInfoBean} for * @param callback the asynchronous callback */
Gets a <code>CmsAvailabilityInfoBean</code> for a given resource
getAvailabilityInfo
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/gwt/shared/rpc/I_CmsVfsServiceAsync.java", "license": "lgpl-2.1", "size": 12380 }
[ "com.google.gwt.user.client.rpc.AsyncCallback", "org.opencms.gwt.shared.CmsAvailabilityInfoBean", "org.opencms.util.CmsUUID" ]
import com.google.gwt.user.client.rpc.AsyncCallback; import org.opencms.gwt.shared.CmsAvailabilityInfoBean; import org.opencms.util.CmsUUID;
import com.google.gwt.user.client.rpc.*; import org.opencms.gwt.shared.*; import org.opencms.util.*;
[ "com.google.gwt", "org.opencms.gwt", "org.opencms.util" ]
com.google.gwt; org.opencms.gwt; org.opencms.util;
550,489
@Test public void testOnDataTreeNodeDeleted() throws Exception { Collection<DataTreeModification<NodeConnector>> changes = new ArrayList<>(); DataTreeModification<NodeConnector> change0 = getMockDataTreeModification( ModificationType.DELETE, "testPort2"); changes.add(change0); service.onDa...
void function() throws Exception { Collection<DataTreeModification<NodeConnector>> changes = new ArrayList<>(); DataTreeModification<NodeConnector> change0 = getMockDataTreeModification( ModificationType.DELETE, STR); changes.add(change0); service.onDataTreeChanged(changes); service.addListeningPort(STR); service.onDat...
/** * Method: onDataTreeChanged(@Nonnull Collection<DataTreeModification<NodeConnector>> changes) * When Node is deleted in DataTree. */
Method: onDataTreeChanged(@Nonnull Collection> changes) When Node is deleted in DataTree
testOnDataTreeNodeDeleted
{ "repo_name": "openalto/alto-experimental", "path": "alto-bwmonitor/impl/src/test/java/org/opendaylight/alto/ext/impl/BwFetchingServiceTest.java", "license": "epl-1.0", "size": 6885 }
[ "java.util.ArrayList", "java.util.Collection", "org.opendaylight.controller.md.sal.binding.api.DataObjectModification", "org.opendaylight.controller.md.sal.binding.api.DataTreeModification", "org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector" ]
import java.util.ArrayList; import java.util.Collection; import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
import java.util.*; import org.opendaylight.controller.md.sal.binding.api.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.*;
[ "java.util", "org.opendaylight.controller", "org.opendaylight.yang" ]
java.util; org.opendaylight.controller; org.opendaylight.yang;
2,182,404
public void setSelectedNetworkComponent(NetworkComponent networkComponent) { if (networkComponent!=null && networkComponent.getId()!=null) { this.currNetworkComponent = networkComponent; int rowCount = this.getDefaultTableModel4Components().getRowCount(); int row = -1; // Searching...
void function(NetworkComponent networkComponent) { if (networkComponent!=null && networkComponent.getId()!=null) { this.currNetworkComponent = networkComponent; int rowCount = this.getDefaultTableModel4Components().getRowCount(); int row = -1; for (row = 0; row < rowCount; row++) { String compId = (String) getJTableCom...
/** * Sets the currently selected network component. * @param networkComponent the network component to be selected */
Sets the currently selected network component
setSelectedNetworkComponent
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/org.awb.env.networkModel/src/org/awb/env/networkModel/controller/ui/NetworkComponentTablePanel.java", "license": "lgpl-2.1", "size": 36116 }
[ "org.awb.env.networkModel.NetworkComponent" ]
import org.awb.env.networkModel.NetworkComponent;
import org.awb.env.*;
[ "org.awb.env" ]
org.awb.env;
1,636,308
void getEnhancedVoicePrivacy(Message onComplete);
void getEnhancedVoicePrivacy(Message onComplete);
/** * Get the currently set Voice Privacy (VP) mode. * * @param onComplete a callback message when the action is completed. */
Get the currently set Voice Privacy (VP) mode
getEnhancedVoicePrivacy
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/telephony/java/com/android/internal/telephony/Phone.java", "license": "gpl-3.0", "size": 61641 }
[ "android.os.Message" ]
import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
440,883
protected void addIrriguePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Parcelle_irrigue_feature"), getString("_UI_PropertyDescriptor_descr...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ExploitationPackage.Literals.PARCELLE__IRRIGUE, true, false, false, ItemPropertyDescriptor.BOOLEA...
/** * This adds a property descriptor for the Irrigue feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Irrigue feature.
addIrriguePropertyDescriptor
{ "repo_name": "HamedKaramoko/farmingdsl", "path": "fr.esir.lsi.langage.edit/src/exploitation/provider/ParcelleItemProvider.java", "license": "mit", "size": 7612 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,117,065
public @UInt32 int getAlphaSampleDepth();
@UInt32 int function();
/** * <p>Returns the alpha sample depth property of the CDCI descriptor, which * specifies the number of bits used to store the alpha * component.</p> * * <p>If this optional property is not present, its default value is returned.</p> * * @return Alpha sample depth property of the CDCI descripto...
Returns the alpha sample depth property of the CDCI descriptor, which specifies the number of bits used to store the alpha component. If this optional property is not present, its default value is returned
getAlphaSampleDepth
{ "repo_name": "AMWA-TV/maj", "path": "src/main/java/tv/amwa/maj/model/CDCIDescriptor.java", "license": "apache-2.0", "size": 20953 }
[ "tv.amwa.maj.integer.UInt32" ]
import tv.amwa.maj.integer.UInt32;
import tv.amwa.maj.integer.*;
[ "tv.amwa.maj" ]
tv.amwa.maj;
845,711
private void checkRemoteDirectory(int tenantId) throws DeploymentSynchronizerException { TenantSVNRepositoryContext repoContext= tenantSVNRepositories.get(tenantId); if (repoContext == null ) { log.warn("TenantSVNRepositoryContext not initialized for " + tenantId); return; ...
void function(int tenantId) throws DeploymentSynchronizerException { TenantSVNRepositoryContext repoContext= tenantSVNRepositories.get(tenantId); if (repoContext == null ) { log.warn(STR + tenantId); return; } SVNUrl svnUrl = repoContext.getSvnUrl(); ISVNClientAdapter svnClient = repoContext.getSvnClient(); try { ISVNI...
/** * Check whether the specified directory exists in the remote SVN repository. If the * directory does not exist, attempt to create it. * * @throws DeploymentSynchronizerException If an error occurs while creating the directory */
Check whether the specified directory exists in the remote SVN repository. If the directory does not exist, attempt to create it
checkRemoteDirectory
{ "repo_name": "johannnallathamby/carbon-commons", "path": "components/deployment-synchronizer/org.wso2.carbon.deployment.synchronizer.subversion/src/main/java/org/wso2/carbon/deployment/synchronizer/subversion/SVNBasedArtifactRepository.java", "license": "apache-2.0", "size": 38346 }
[ "org.tigris.subversion.svnclientadapter.ISVNClientAdapter", "org.tigris.subversion.svnclientadapter.ISVNInfo", "org.tigris.subversion.svnclientadapter.SVNClientException", "org.tigris.subversion.svnclientadapter.SVNUrl", "org.wso2.carbon.deployment.synchronizer.DeploymentSynchronizerException" ]
import org.tigris.subversion.svnclientadapter.ISVNClientAdapter; import org.tigris.subversion.svnclientadapter.ISVNInfo; import org.tigris.subversion.svnclientadapter.SVNClientException; import org.tigris.subversion.svnclientadapter.SVNUrl; import org.wso2.carbon.deployment.synchronizer.DeploymentSynchronizerException;
import org.tigris.subversion.svnclientadapter.*; import org.wso2.carbon.deployment.synchronizer.*;
[ "org.tigris.subversion", "org.wso2.carbon" ]
org.tigris.subversion; org.wso2.carbon;
1,649,156
public Color getInnerRadiusColor() { return r2Color; }
Color function() { return r2Color; }
/** * Get the color used to draw the lens' inner radius. * * @return color of the boundary (null if border is not drawn) */
Get the color used to draw the lens' inner radius
getInnerRadiusColor
{ "repo_name": "sharwell/zgrnbviewer", "path": "org-tvl-netbeans-zgrviewer/src/fr/inria/zvtm/lens/FixedSizeLens.java", "license": "lgpl-3.0", "size": 22880 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,015,172
public void tabClosingEffect(long time, int id) { if (mStackTabs == null) return; // |id| cannot be used to access the particular tab in the model. // The tab is already gone from the model by this point. int newIndex = 0; boolean needAnimation = false; for (in...
void function(long time, int id) { if (mStackTabs == null) return; int newIndex = 0; boolean needAnimation = false; for (int i = 0; i < mStackTabs.length; ++i) { if (mStackTabs[i].getId() == id) { needAnimation = !mStackTabs[i].isDying(); mStackTabs[i].setDying(true); } else { mStackTabs[i].setNewIndex(newIndex++); } }...
/** * Triggers the closing motions. * * @param time The current time of the app in ms. * @param id The id of the tab that get closed. */
Triggers the closing motions
tabClosingEffect
{ "repo_name": "Chilledheart/chromium", "path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java", "license": "bsd-3-clause", "size": 111044 }
[ "org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation" ]
import org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation;
import org.chromium.chrome.browser.compositor.layouts.phone.stack.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,848,327
public List<String> getComputationalNodes() { List<String> computationalNodesList = new ArrayList<>( computationalNodes.size()); for (Map.Entry<BigInteger, ComputationalNodeInfo> entry : computationalNodes .entrySet()) { computationalNodesList.add(entry.getValue().toString()); } return comput...
List<String> function() { List<String> computationalNodesList = new ArrayList<>( computationalNodes.size()); for (Map.Entry<BigInteger, ComputationalNodeInfo> entry : computationalNodes .entrySet()) { computationalNodesList.add(entry.getValue().toString()); } return computationalNodesList; }
/** * <p> * Returns list of connected computational nodes. * </p> * * @return */
Returns list of connected computational nodes.
getComputationalNodes
{ "repo_name": "Waszker/IO_projekt", "path": "ComputationalCluster/src/ComputationalServer/ServerCore/ComputationalServerCore.java", "license": "gpl-2.0", "size": 10570 }
[ "java.math.BigInteger", "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
2,061,504
public static void clearClassFromClassCache(ClassLoader ldr, String clsName) { ConcurrentMap<String, Class> map = classCache.get(ldr); if (map != null) map.remove(clsName); }
static void function(ClassLoader ldr, String clsName) { ConcurrentMap<String, Class> map = classCache.get(ldr); if (map != null) map.remove(clsName); }
/** * Clears class associated with provided class loader from class cache. * * @param ldr Class loader. * @param clsName Class name of clearing class. */
Clears class associated with provided class loader from class cache
clearClassFromClassCache
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 388551 }
[ "java.util.concurrent.ConcurrentMap" ]
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,549,781
public ServiceCall<CertificateBundle> updateCertificateAsync(UpdateCertificateRequest updateCertificateRequest, final ServiceCallback<CertificateBundle> serviceCallback) { return innerKeyVaultClient.updateCertificateAsync( updateCertificateRequest.vaultBaseUrl(), updateCerti...
ServiceCall<CertificateBundle> function(UpdateCertificateRequest updateCertificateRequest, final ServiceCallback<CertificateBundle> serviceCallback) { return innerKeyVaultClient.updateCertificateAsync( updateCertificateRequest.vaultBaseUrl(), updateCertificateRequest.certificateName(), updateCertificateRequest.certific...
/** * Updates the attributes associated with the specified certificate. * * @param updateCertificateRequest the grouped properties for updating a certificate request * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link Servic...
Updates the attributes associated with the specified certificate
updateCertificateAsync
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java", "license": "mit", "size": 85271 }
[ "com.microsoft.azure.keyvault.models.CertificateBundle", "com.microsoft.azure.keyvault.requests.UpdateCertificateRequest", "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.azure.keyvault.models.CertificateBundle; import com.microsoft.azure.keyvault.requests.UpdateCertificateRequest; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.azure.keyvault.models.*; import com.microsoft.azure.keyvault.requests.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,164,531
public TimeValue getTook() { return new TimeValue(tookInMillis); }
TimeValue function() { return new TimeValue(tookInMillis); }
/** * How long the search took. */
How long the search took
getTook
{ "repo_name": "Helen-Zhao/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/search/SearchResponse.java", "license": "apache-2.0", "size": 7750 }
[ "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,766,596
public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta)); }
IBlockState function(int meta) { return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta)); }
/** * Convert the given metadata into a BlockState for this Block */
Convert the given metadata into a BlockState for this Block
getStateFromMeta
{ "repo_name": "SparkyTheFox/Sparkys-Mod-1.11.2-1.4.0-Alpha-SourceCode", "path": "common/mod/sparkyfox/servermod/props/adventure/PropMTable.java", "license": "lgpl-3.0", "size": 5717 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.util.EnumFacing" ]
import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing;
import net.minecraft.block.state.*; import net.minecraft.util.*;
[ "net.minecraft.block", "net.minecraft.util" ]
net.minecraft.block; net.minecraft.util;
1,916,424
private List<PortInfo> getIslPorts(final Map<String, Map<String, Double>> portStatsByPortNo, String switchid) { List<PortInfo> portInfos = getPortInfo(portStatsByPortNo); List<IslLink> islLinkPorts = switchIntegrationService.getIslLinkPortsInfo(null); String switchIdInfo = null; if ...
List<PortInfo> function(final Map<String, Map<String, Double>> portStatsByPortNo, String switchid) { List<PortInfo> portInfos = getPortInfo(portStatsByPortNo); List<IslLink> islLinkPorts = switchIntegrationService.getIslLinkPortsInfo(null); String switchIdInfo = null; if (islLinkPorts != null) { for (IslLink islLink : ...
/** * Sets the isl ports. * * @param portInfos * the port infos * @param switchid * the switchid * @return the list */
Sets the isl ports
getIslPorts
{ "repo_name": "jonvestal/open-kilda", "path": "src-gui/src/main/java/org/openkilda/service/StatsService.java", "license": "apache-2.0", "size": 17198 }
[ "java.util.List", "java.util.Map", "org.openkilda.integration.model.response.IslLink", "org.openkilda.integration.model.response.IslPath", "org.openkilda.model.PortInfo" ]
import java.util.List; import java.util.Map; import org.openkilda.integration.model.response.IslLink; import org.openkilda.integration.model.response.IslPath; import org.openkilda.model.PortInfo;
import java.util.*; import org.openkilda.integration.model.response.*; import org.openkilda.model.*;
[ "java.util", "org.openkilda.integration", "org.openkilda.model" ]
java.util; org.openkilda.integration; org.openkilda.model;
540,798
public List<Object> getSegments() { if (isRoot()) return Collections.emptyList(); else { List<Object> list = new ArrayList<Object>(); this.buildSegmentList_nonRoot(list); return list; } }
List<Object> function() { if (isRoot()) return Collections.emptyList(); else { List<Object> list = new ArrayList<Object>(); this.buildSegmentList_nonRoot(list); return list; } }
/** * Returns the segments of this path. * * @return */
Returns the segments of this path
getSegments
{ "repo_name": "jehanson4/livedata", "path": "org.jehanson.livedata/src/org/jehanson/livedata/LDPath.java", "license": "epl-1.0", "size": 6020 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,200,608
public ActiveUser getBySessionId(final String sessionID) { final Session session = getSessionFactory().getCurrentSession(); final Criteria criteria = session.createCriteria(ActiveUser.class); criteria.add(Restrictions.eq("sessionId", sessionID)); return (ActiveUser) criteria.uniqueRe...
ActiveUser function(final String sessionID) { final Session session = getSessionFactory().getCurrentSession(); final Criteria criteria = session.createCriteria(ActiveUser.class); criteria.add(Restrictions.eq(STR, sessionID)); return (ActiveUser) criteria.uniqueResult(); }
/** * Get the ActiveUser from the database that corresponds to the input session id. * * @param sessionID the session id. * @return an Entity object. */
Get the ActiveUser from the database that corresponds to the input session id
getBySessionId
{ "repo_name": "EaW1805/data", "path": "src/main/java/com/eaw1805/data/managers/ActiveUserManager.java", "license": "mit", "size": 4162 }
[ "com.eaw1805.data.model.ActiveUser", "org.hibernate.Criteria", "org.hibernate.Session", "org.hibernate.criterion.Restrictions" ]
import com.eaw1805.data.model.ActiveUser; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.criterion.Restrictions;
import com.eaw1805.data.model.*; import org.hibernate.*; import org.hibernate.criterion.*;
[ "com.eaw1805.data", "org.hibernate", "org.hibernate.criterion" ]
com.eaw1805.data; org.hibernate; org.hibernate.criterion;
359,403
private static PlatformCacheExtension[] prepareCacheExtensions(Collection<PlatformCacheExtension> cacheExts) { if (!F.isEmpty(cacheExts)) { int maxExtId = 0; Map<Integer, PlatformCacheExtension> idToExt = new HashMap<>(); for (PlatformCacheExtension cacheExt : cacheExts...
static PlatformCacheExtension[] function(Collection<PlatformCacheExtension> cacheExts) { if (!F.isEmpty(cacheExts)) { int maxExtId = 0; Map<Integer, PlatformCacheExtension> idToExt = new HashMap<>(); for (PlatformCacheExtension cacheExt : cacheExts) { if (cacheExt == null) throw new IgniteException(STR); if (cacheExt.i...
/** * Prepare cache extensions. * * @param cacheExts Original extensions. * @return Prepared extensions. */
Prepare cache extensions
prepareCacheExtensions
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java", "license": "apache-2.0", "size": 24411 }
[ "java.util.Collection", "java.util.HashMap", "java.util.Map", "org.apache.ignite.IgniteException", "org.apache.ignite.internal.processors.platform.cache.PlatformCacheExtension", "org.apache.ignite.internal.util.typedef.F" ]
import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.apache.ignite.IgniteException; import org.apache.ignite.internal.processors.platform.cache.PlatformCacheExtension; import org.apache.ignite.internal.util.typedef.F;
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.internal.processors.platform.cache.*; import org.apache.ignite.internal.util.typedef.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,530,357
public void setToDefaults() { fontScale = 1; mcc = mnc = 0; mLocaleList = LocaleList.getEmptyLocaleList(); locale = null; userSetLocale = false; touchscreen = TOUCHSCREEN_UNDEFINED; keyboard = KEYBOARD_UNDEFINED; keyboardHidden = KEYBOARDHIDDEN_UNDEFIN...
void function() { fontScale = 1; mcc = mnc = 0; mLocaleList = LocaleList.getEmptyLocaleList(); locale = null; userSetLocale = false; touchscreen = TOUCHSCREEN_UNDEFINED; keyboard = KEYBOARD_UNDEFINED; keyboardHidden = KEYBOARDHIDDEN_UNDEFINED; hardKeyboardHidden = HARDKEYBOARDHIDDEN_UNDEFINED; navigation = NAVIGATION_U...
/** * Set this object to the system defaults. */
Set this object to the system defaults
setToDefaults
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/content/res/Configuration.java", "license": "apache-2.0", "size": 87508 }
[ "android.os.LocaleList" ]
import android.os.LocaleList;
import android.os.*;
[ "android.os" ]
android.os;
936,596
public void trueClose( boolean addToDeadPool ) throws IOException { if ( log.isDebugEnabled() ) log.debug( "++++ Closing socket for real: " + toString() ); boolean err = false; StringBuilder errMsg = new StringBuilder(); if ( in != null ) { try { in.close(); } catch( IOException ...
void function( boolean addToDeadPool ) throws IOException { if ( log.isDebugEnabled() ) log.debug( STR + toString() ); boolean err = false; StringBuilder errMsg = new StringBuilder(); if ( in != null ) { try { in.close(); } catch( IOException ioe ) { log.error( STR + toString() + STR + getHost() ); log.error( ioe.getMe...
/** * closes socket and all streams connected to it * * @throws IOException if fails to close streams or socket */
closes socket and all streams connected to it
trueClose
{ "repo_name": "ZhangPeng1990/crm", "path": "gdsap-framework/src/main/java/uk/co/quidos/cache/memcache/client/SockIOPool.java", "license": "apache-2.0", "size": 53661 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,538,805
static void moveFile(File src, File dst) throws IOException { FileChannel inChannel = new FileInputStream(src).getChannel(); FileChannel outChannel = new FileOutputStream(dst).getChannel(); try { long bytesCopied = inChannel.transferTo(0, inChannel.size(), outChannel); ...
static void moveFile(File src, File dst) throws IOException { FileChannel inChannel = new FileInputStream(src).getChannel(); FileChannel outChannel = new FileOutputStream(dst).getChannel(); try { long bytesCopied = inChannel.transferTo(0, inChannel.size(), outChannel); if(bytesCopied >= src.length()) src.delete(); } fi...
/** * Copies the contents of the file in {@code src} to {@code dst} and then deletes the {@code src} if copy was successful. * If the file copy was unsuccessful, the src file will not be deleted. * @param src Source file * @param dst Destination file * @throws IOException if an error occurred d...
Copies the contents of the file in src to dst and then deletes the src if copy was successful. If the file copy was unsuccessful, the src file will not be deleted
moveFile
{ "repo_name": "buptzyf/gnucash-android", "path": "app/src/main/java/org/gnucash/android/db/MigrationHelper.java", "license": "apache-2.0", "size": 8223 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileOutputStream", "java.io.IOException", "java.nio.channels.FileChannel" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,807,618
public BillingRule getRule(final Engagement engagement) { if (isShortEngagement(engagement)) { return shortEngagementBillingRule; } else if (isMediumEngagement(engagement)) { return mediumEngagementBillingRule; } return longEngagementBillingRule; }
BillingRule function(final Engagement engagement) { if (isShortEngagement(engagement)) { return shortEngagementBillingRule; } else if (isMediumEngagement(engagement)) { return mediumEngagementBillingRule; } return longEngagementBillingRule; }
/** * Returns the {@link BillingRule} for the passed {@link Engagement}. * * @param engagement the {@code Engagement}. * @return the {@code BillingRule} for the {@code Engagement}. */
Returns the <code>BillingRule</code> for the passed <code>Engagement</code>
getRule
{ "repo_name": "swquinn/redi2", "path": "src/main/java/org/seanquinn/redi2/billing/rule/BillingRuleFactory.java", "license": "mit", "size": 4925 }
[ "org.seanquinn.redi2.domain.Engagement" ]
import org.seanquinn.redi2.domain.Engagement;
import org.seanquinn.redi2.domain.*;
[ "org.seanquinn.redi2" ]
org.seanquinn.redi2;
1,343,598
public ApplicationGatewayHttpListener withCustomErrorConfigurations(List<ApplicationGatewayCustomError> customErrorConfigurations) { this.customErrorConfigurations = customErrorConfigurations; return this; }
ApplicationGatewayHttpListener function(List<ApplicationGatewayCustomError> customErrorConfigurations) { this.customErrorConfigurations = customErrorConfigurations; return this; }
/** * Set custom error configurations of the HTTP listener. * * @param customErrorConfigurations the customErrorConfigurations value to set * @return the ApplicationGatewayHttpListener object itself. */
Set custom error configurations of the HTTP listener
withCustomErrorConfigurations
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/ApplicationGatewayHttpListener.java", "license": "mit", "size": 9123 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,741,729
public void verifyMetaPersistence() throws Exception { try (Builder b = new Builder()) { b.setIncludeResource("foo.xml;literal='I exist'"); Jar inner = b.build(); assertTrue(b.check()); try (Jar outer = new Jar("x")) { outer.putResource("foo.jar", new JarResource(inner)); Manifest m = new Mani...
void function() throws Exception { try (Builder b = new Builder()) { b.setIncludeResource(STR); Jar inner = b.build(); assertTrue(b.check()); try (Jar outer = new Jar("x")) { outer.putResource(STR, new JarResource(inner)); Manifest m = new Manifest(); m.getMainAttributes() .putValue(Constants.META_PERSISTENCE, STR); ou...
/** * Verify that the Meta-Persistence header is correctly verified * * @throws Exception */
Verify that the Meta-Persistence header is correctly verified
verifyMetaPersistence
{ "repo_name": "psoreide/bnd", "path": "biz.aQute.bndlib.tests/test/test/VerifierTest.java", "license": "apache-2.0", "size": 16986 }
[ "java.util.jar.Manifest" ]
import java.util.jar.Manifest;
import java.util.jar.*;
[ "java.util" ]
java.util;
1,543,955
static void FindPfStepTokens(Token[][] toks) { for (int k = 0 ; k < toks.length ; k++) { Token[] input = toks[k] ; Vector outputVec = new Vector(input.length) ; int i = 0 ; while (i < input.length) { if ( (i < input.length - 2) && (input[i]....
static void FindPfStepTokens(Token[][] toks) { for (int k = 0 ; k < toks.length ; k++) { Token[] input = toks[k] ; Vector outputVec = new Vector(input.length) ; int i = 0 ; while (i < input.length) { if ( (i < input.length - 2) && (input[i].string.equals("<")) && (input[i+1].column == input[i].column + 1) && (input[i+1...
/*********************************************************************** * The method FindPfStepTokens replaces each sequence of three to five * * tokens created by TokenizeSpec for something like "<42>" or * * "<42>1a." into a single token of type PF_STEP. * ************...
The method FindPfStepTokens replaces each sequence of three to five tokens created by TokenizeSpec for something like "" or "1a." into a single token of type PF_STEP.
FindPfStepTokens
{ "repo_name": "lemmy/tlaplus", "path": "tlatools/org.lamport.tlatools/src/tla2tex/Token.java", "license": "mit", "size": 20599 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,608,505
void readTX7() throws IOException { Debug.message("e00", "E00: read TX7"); tx7 = new OMGraphicList(); int[] header = new int[8]; double[] coords = new double[2]; isr.readLine(); while (true) { String S = isr.readLine(); if (S == null) ...
void readTX7() throws IOException { Debug.message("e00", STR); tx7 = new OMGraphicList(); int[] header = new int[8]; double[] coords = new double[2]; isr.readLine(); while (true) { String S = isr.readLine(); if (S == null) break; parseString(S, header, 10); if (header[0] == -1) break; int n = header[2]; for (int i = 0;...
/** * read TX7 records * * @exception IOException * @since */
read TX7 records
readTX7
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/layer/e00/E00Parser.java", "license": "mit", "size": 29704 }
[ "com.bbn.openmap.omGraphics.OMGraphicList", "com.bbn.openmap.util.Debug", "java.io.IOException" ]
import com.bbn.openmap.omGraphics.OMGraphicList; import com.bbn.openmap.util.Debug; import java.io.IOException;
import com.bbn.openmap.*; import com.bbn.openmap.util.*; import java.io.*;
[ "com.bbn.openmap", "java.io" ]
com.bbn.openmap; java.io;
2,390,023
public Point2D getMiddleOfLinePoint() { if (vector != null && vector.getShape() instanceof Line2D) { return VectorMath.getMiddlePoint(((Line2D) vector.getShape())); } return null; }
Point2D function() { if (vector != null && vector.getShape() instanceof Line2D) { return VectorMath.getMiddlePoint(((Line2D) vector.getShape())); } return null; }
/** * The middle poind tor linked line, if linked line exists. * * @return The middle poind tor linked line,, ore null. */
The middle poind tor linked line, if linked line exists
getMiddleOfLinePoint
{ "repo_name": "gabibau/orthodontic-preview", "path": "ortho-ui/src/main/java/com/orthodonticpreview/ui/persistence/TeethPlace.java", "license": "lgpl-3.0", "size": 5069 }
[ "com.orthodonticpreview.datamodel.VectorMath", "java.awt.geom.Line2D", "java.awt.geom.Point2D" ]
import com.orthodonticpreview.datamodel.VectorMath; import java.awt.geom.Line2D; import java.awt.geom.Point2D;
import com.orthodonticpreview.datamodel.*; import java.awt.geom.*;
[ "com.orthodonticpreview.datamodel", "java.awt" ]
com.orthodonticpreview.datamodel; java.awt;
2,280,414
@Deprecated public Duration getIdleEvictTimeDuration() { return idleEvictDuration; }
Duration function() { return idleEvictDuration; }
/** * Gets the {@code idleEvictTime} for this eviction configuration * instance. * <p> * How the evictor behaves based on this value will be determined by the * configured {@link EvictionPolicy}. * </p> * * @return The {@code idleEvictTime}. * @since 2.10.0 * @deprecate...
Gets the idleEvictTime for this eviction configuration instance. How the evictor behaves based on this value will be determined by the configured <code>EvictionPolicy</code>.
getIdleEvictTimeDuration
{ "repo_name": "apache/commons-pool", "path": "src/main/java/org/apache/commons/pool2/impl/EvictionConfig.java", "license": "apache-2.0", "size": 6871 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
669,663
public Rectangle getBounds();
Rectangle function();
/** * Gets the bounds of this component in the form of a Rectangle object. */
Gets the bounds of this component in the form of a Rectangle object
getBounds
{ "repo_name": "Vhati/ArcanistCCG", "path": "src/main/java/org/arcanist/client/HoverListener.java", "license": "gpl-2.0", "size": 619 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
923,559
@Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); @Test public void testRecoveryRegisterAndDownload() throws Exception { Random rand = new Random(); BlobServer[] server = new BlobServer[2]; InetSocketAddress[] serverAddress = new InetSocketAddress[2]; Bl...
@Rule TemporaryFolder temporaryFolder = new TemporaryFolder(); public void function() throws Exception { Random rand = new Random(); BlobServer[] server = new BlobServer[2]; InetSocketAddress[] serverAddress = new InetSocketAddress[2]; BlobLibraryCacheManager[] libServer = new BlobLibraryCacheManager[2]; PermanentBlobC...
/** * Tests that with {@link HighAvailabilityMode#ZOOKEEPER} distributed JARs are recoverable from * any participating BlobLibraryCacheManager. */
Tests that with <code>HighAvailabilityMode#ZOOKEEPER</code> distributed JARs are recoverable from any participating BlobLibraryCacheManager
testRecoveryRegisterAndDownload
{ "repo_name": "lincoln-lil/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheRecoveryITCase.java", "license": "apache-2.0", "size": 7689 }
[ "java.io.File", "java.io.FileInputStream", "java.net.InetSocketAddress", "java.util.ArrayList", "java.util.Arrays", "java.util.Collections", "java.util.Random", "org.apache.flink.api.common.JobID", "org.apache.flink.configuration.BlobServerOptions", "org.apache.flink.configuration.Configuration", ...
import java.io.File; import java.io.FileInputStream; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Random; import org.apache.flink.api.common.JobID; import org.apache.flink.configuration.BlobServerOptions; import org.apache.flink.c...
import java.io.*; import java.net.*; import java.util.*; import org.apache.flink.api.common.*; import org.apache.flink.configuration.*; import org.apache.flink.runtime.blob.*; import org.junit.*; import org.junit.rules.*;
[ "java.io", "java.net", "java.util", "org.apache.flink", "org.junit", "org.junit.rules" ]
java.io; java.net; java.util; org.apache.flink; org.junit; org.junit.rules;
1,028,135
public ScriptableHashMap<String, String> getTransitions() { ScriptableHashMap<String, String> transitions = new ScriptableHashMap<String, String>(); WorkflowNode workflowNode = task.getPath().getNode(); if (workflowNode != null) { for (WorkflowTransition transit...
ScriptableHashMap<String, String> function() { ScriptableHashMap<String, String> transitions = new ScriptableHashMap<String, String>(); WorkflowNode workflowNode = task.getPath().getNode(); if (workflowNode != null) { for (WorkflowTransition transition : workflowNode.getTransitions()) { transitions.put(transition.getId...
/** * Get the available transition ids. * * @return */
Get the available transition ids
getTransitions
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/workflow/jscript/JscriptWorkflowTask.java", "license": "lgpl-3.0", "size": 9561 }
[ "org.alfresco.repo.jscript.ScriptableHashMap", "org.alfresco.service.cmr.workflow.WorkflowNode", "org.alfresco.service.cmr.workflow.WorkflowTransition" ]
import org.alfresco.repo.jscript.ScriptableHashMap; import org.alfresco.service.cmr.workflow.WorkflowNode; import org.alfresco.service.cmr.workflow.WorkflowTransition;
import org.alfresco.repo.jscript.*; import org.alfresco.service.cmr.workflow.*;
[ "org.alfresco.repo", "org.alfresco.service" ]
org.alfresco.repo; org.alfresco.service;
1,011,526
private InputMethodHighlight convertVisualFeedbackToHighlight(int feedback) { InputMethodHighlight highlight; switch (feedback) { case XIMUnderline: highlight = InputMethodHighlight.UNSELECTED_CONVERTED_TEXT_HIGHLIGHT; break; case XIMReverse: high...
InputMethodHighlight function(int feedback) { InputMethodHighlight highlight; switch (feedback) { case XIMUnderline: highlight = InputMethodHighlight.UNSELECTED_CONVERTED_TEXT_HIGHLIGHT; break; case XIMReverse: highlight = InputMethodHighlight.SELECTED_CONVERTED_TEXT_HIGHLIGHT; break; case XIMHighlight: highlight = Inp...
/** * Performs mapping from an XIM visible feedback value to Java IM highlight. * @return Java input method highlight */
Performs mapping from an XIM visible feedback value to Java IM highlight
convertVisualFeedbackToHighlight
{ "repo_name": "universsky/openjdk", "path": "jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java", "license": "gpl-2.0", "size": 40354 }
[ "java.awt.im.InputMethodHighlight" ]
import java.awt.im.InputMethodHighlight;
import java.awt.im.*;
[ "java.awt" ]
java.awt;
1,833,291
public List<DashboardComponentEntry> getDashboardComponents( ) { return _listDashboardComponents; }
List<DashboardComponentEntry> function( ) { return _listDashboardComponents; }
/** * Returns all Dashboard Component Services of the plugin * * @return The list of Dashboard Component Services */
Returns all Dashboard Component Services of the plugin
getDashboardComponents
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/plugin/PluginFile.java", "license": "bsd-3-clause", "size": 27353 }
[ "fr.paris.lutece.portal.service.dashboard.DashboardComponentEntry", "java.util.List" ]
import fr.paris.lutece.portal.service.dashboard.DashboardComponentEntry; import java.util.List;
import fr.paris.lutece.portal.service.dashboard.*; import java.util.*;
[ "fr.paris.lutece", "java.util" ]
fr.paris.lutece; java.util;
174,185
public static MediaType valueOf(String type) throws IllegalArgumentException { if (type == null || type.trim().isEmpty() || type.startsWith(SUBTYPE_SEPARATOR) || type.endsWith(SUBTYPE_SEPARATOR)) { throw new IllegalArgumentException("Invalid mime type '" + type + "'"); } String[]...
static MediaType function(String type) throws IllegalArgumentException { if (type == null type.trim().isEmpty() type.startsWith(SUBTYPE_SEPARATOR) type.endsWith(SUBTYPE_SEPARATOR)) { throw new IllegalArgumentException(STR + type + "'"); } String[] splitType = type.split(SUBTYPE_SEPARATOR); if (splitType.length == 2) { ...
/** * Creates a new instance of MediaType by parsing the supplied string. * * @param type the media type string * @return the newly created MediaType * @throws IllegalArgumentException if the supplied string cannot be parsed * or is null */
Creates a new instance of MediaType by parsing the supplied string
valueOf
{ "repo_name": "josueeduardo/rest-client", "path": "src/main/java/io/joshworks/restclient/http/MediaType.java", "license": "mit", "size": 12849 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,132,186
public static String[] getPortNames(Pattern pattern) { return getPortNames(PORTNAMES_PATH, pattern, PORTNAMES_COMPARATOR); }
static String[] function(Pattern pattern) { return getPortNames(PORTNAMES_PATH, pattern, PORTNAMES_COMPARATOR); }
/** * Get sorted array of serial ports in the system matched pattern * * @param pattern RegExp pattern for matching port names <b>(not null)</b> * * @return String array. If there is no ports in the system String[] * * @since 2.3.0 */
Get sorted array of serial ports in the system matched pattern
getPortNames
{ "repo_name": "os-cillation/easyfpga-sdk-java", "path": "src/jssc/SerialPortList.java", "license": "gpl-3.0", "size": 13566 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
587,887
ManagedReference createInstance(Object instance);
ManagedReference createInstance(Object instance);
/** * Returns the managed reference of an new instance. * @param instance an object instance * @return a managed reference */
Returns the managed reference of an new instance
createInstance
{ "repo_name": "jstourac/wildfly", "path": "ee/src/main/java/org/jboss/as/ee/component/EEClassIntrospector.java", "license": "lgpl-2.1", "size": 693 }
[ "org.jboss.as.naming.ManagedReference" ]
import org.jboss.as.naming.ManagedReference;
import org.jboss.as.naming.*;
[ "org.jboss.as" ]
org.jboss.as;
634,713
public static void throwAtomikosJMSException ( String msg , Throwable cause ) throws AtomikosJMSException { Configuration.logWarning ( msg , cause ); throw new AtomikosJMSException ( msg , cause ); }
static void function ( String msg , Throwable cause ) throws AtomikosJMSException { Configuration.logWarning ( msg , cause ); throw new AtomikosJMSException ( msg , cause ); }
/** * Logs and throws and AtomikosJMSException. * @param msg The message to use. * @param cause The cause. * @throws AtomikosJMSException */
Logs and throws and AtomikosJMSException
throwAtomikosJMSException
{ "repo_name": "hmalphettes/atomikos-essentials-3.5.8-osgified-sandbox", "path": "com.atomikos.transactions.jms/src/com/atomikos/jms/AtomikosJMSException.java", "license": "apache-2.0", "size": 2486 }
[ "com.atomikos.icatch.system.Configuration" ]
import com.atomikos.icatch.system.Configuration;
import com.atomikos.icatch.system.*;
[ "com.atomikos.icatch" ]
com.atomikos.icatch;
2,150,227
public BigDecimal getQtySpent () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtySpent); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtySpent); if (bd == null) return Env.ZERO; return bd; }
/** Get Quantity Used. @return Quantity used for this event */
Get Quantity Used
getQtySpent
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/X_R_RequestAction.java", "license": "gpl-2.0", "size": 26391 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
1,772,660
public static DiskLruCache open(File directory, int appVersion, int valueCount, long maxSize) throws IOException { if (maxSize <= 0) { throw new IllegalArgumentException("maxSize <= 0"); } if (valueCount <= 0) { throw new IllegalArgumentException("valueCount <= 0"); } // If a bk...
static DiskLruCache function(File directory, int appVersion, int valueCount, long maxSize) throws IOException { if (maxSize <= 0) { throw new IllegalArgumentException(STR); } if (valueCount <= 0) { throw new IllegalArgumentException(STR); } File backupFile = new File(directory, JOURNAL_FILE_BACKUP); if (backupFile.exis...
/** * Opens the cache in {@code directory}, creating a cache if none exists * there. * * @param directory a writable directory * @param valueCount the number of values per cache entry. Must be positive. * @param maxSize the maximum number of bytes this cache should use to store * @throws IOExceptio...
Opens the cache in directory, creating a cache if none exists there
open
{ "repo_name": "eity0323/aimanager", "path": "lib.datapp/src/main/java/com/sien/lib/datapp/cache/disk/DiskLruCache.java", "license": "mit", "size": 31075 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,742,690
public void serialize(OutputStream out) throws IOException { Iterator<Entry> entryIterator = new Iterator<Entry>() { private Iterator<StringList> dictionaryIterator = Dictionary.this.iterator();
void function(OutputStream out) throws IOException { Iterator<Entry> entryIterator = new Iterator<Entry>() { private Iterator<StringList> dictionaryIterator = Dictionary.this.iterator();
/** * Writes the current instance to the given {@link OutputStream}. * * @param out * @throws IOException */
Writes the current instance to the given <code>OutputStream</code>
serialize
{ "repo_name": "mccraigmccraig/opennlp", "path": "src/main/java/opennlp/tools/dictionary/Dictionary.java", "license": "apache-2.0", "size": 7018 }
[ "java.io.IOException", "java.io.OutputStream", "java.util.Iterator" ]
import java.io.IOException; import java.io.OutputStream; import java.util.Iterator;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,361,722
public AccessibleTreeNode addAccessibleChild (AccessibleTreeNode aParent, XAccessible xChild) { AccessibleTreeNode aChild = null; if (xChild != null) { XAccessibleContext xContext = xChild.getAccessibleContext(); if (xContext != null) { ...
AccessibleTreeNode function (AccessibleTreeNode aParent, XAccessible xChild) { AccessibleTreeNode aChild = null; if (xChild != null) { XAccessibleContext xContext = xChild.getAccessibleContext(); if (xContext != null) { int nIndex = xContext.getAccessibleIndexInParent() + 1; synchronized (maChildList) { if ((nIndex >= ...
/** Try to add the specified accessible child into the lists of children. The insertion position is determined from the getIndexInParent method of the child. */
Try to add the specified accessible child into the lists of
addAccessibleChild
{ "repo_name": "qt-haiku/LibreOffice", "path": "toolkit/test/accessibility/AccessibleTreeHandler.java", "license": "gpl-3.0", "size": 4178 }
[ "com.sun.star.accessibility.XAccessible", "com.sun.star.accessibility.XAccessibleContext" ]
import com.sun.star.accessibility.XAccessible; import com.sun.star.accessibility.XAccessibleContext;
import com.sun.star.accessibility.*;
[ "com.sun.star" ]
com.sun.star;
1,635,980
public IOFile writeBytes(final byte[] source, final boolean append) throws IOException { try { this.getParentDirectory().create(); Utils.write(source, this); } catch (final IOException ex) { throw new IOException(ex); } return this; }
IOFile function(final byte[] source, final boolean append) throws IOException { try { this.getParentDirectory().create(); Utils.write(source, this); } catch (final IOException ex) { throw new IOException(ex); } return this; }
/** * writes a byte array to a file (possibly overwrites the file) * * @param source : byte[] : source * @param append : boolean : appends to the end of the file * @return : IOFile : this file * @throws IOException : thrown exception */
writes a byte array to a file (possibly overwrites the file)
writeBytes
{ "repo_name": "jurgendl/jhaws", "path": "jhaws/io/src/main/java/org/jhaws/common/io/IOFile.java", "license": "mit", "size": 55511 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,826,875
@Test public void testGetBoxForInnerBlock() { System.out.println( "=== testGetBoxForInnerBlock() ==="); stopwatch.reset();stopwatch.start(); RdfInstAdpFactoryWrap factory = inj.getInstance(RdfInstAdpFactoryWrap.class); IInnerBlock innerBlock = factory.createAdp(innerBlockRes, IInnerBlock.class); IBo...
void function() { System.out.println( STR); stopwatch.reset();stopwatch.start(); RdfInstAdpFactoryWrap factory = inj.getInstance(RdfInstAdpFactoryWrap.class); IInnerBlock innerBlock = factory.createAdp(innerBlockRes, IInnerBlock.class); IBox mainBox = innerBlock.getBox(); Assert.assertTrue(mainBoxRes.equals(((IRdfResou...
/** * Test method for {@link tuwien.dbai.wpps.core.wpmodel.physmodel.bgm.instadp.rdfimpl.BoxImpl#getBoxForInnerBlock(com.hp.hpl.jena.rdf.model.Resource, com.hp.hpl.jena.rdf.model.Model)}. */
Test method for <code>tuwien.dbai.wpps.core.wpmodel.physmodel.bgm.instadp.rdfimpl.BoxImpl#getBoxForInnerBlock(com.hp.hpl.jena.rdf.model.Resource, com.hp.hpl.jena.rdf.model.Model)</code>
testGetBoxForInnerBlock
{ "repo_name": "ruslanrf/wpps", "path": "wpps_plugins/tuwien.dbai.wpps.core/test/tuwien/dbai/wpps/core/junit/test/physmodel/bgm/adp/instadp/rdfimpl/TestBoxStructContainmentImpl_1.java", "license": "gpl-2.0", "size": 15707 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,790,414
public void drawButton(Minecraft mc, int mouseX, int mouseY) { if (this.visible) { mc.getTextureManager().bindTexture(GuiButton.buttonTextures); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition &...
void function(Minecraft mc, int mouseX, int mouseY) { if (this.visible) { mc.getTextureManager().bindTexture(GuiButton.buttonTextures); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + t...
/** * Draws this button to the screen. */
Draws this button to the screen
drawButton
{ "repo_name": "dogjaw2233/tiu-s-mod", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiButtonLanguage.java", "license": "lgpl-2.1", "size": 1113 }
[ "net.minecraft.client.Minecraft", "net.minecraft.client.renderer.GlStateManager" ]
import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.*; import net.minecraft.client.renderer.*;
[ "net.minecraft.client" ]
net.minecraft.client;
285,431
public String reverseLookup(Destination d, Properties options) { return null; }
String function(Destination d, Properties options) { return null; }
/** * Same as reverseLookup(dest) but with options * @param d non-null * @param options NamingService-specific, can be null * @return host name or null * @since 0.8.7 */
Same as reverseLookup(dest) but with options
reverseLookup
{ "repo_name": "NoYouShutup/CryptMeme", "path": "CryptMeme/core/java/src/net/i2p/client/naming/NamingService.java", "license": "mit", "size": 17180 }
[ "java.util.Properties", "net.i2p.data.Destination" ]
import java.util.Properties; import net.i2p.data.Destination;
import java.util.*; import net.i2p.data.*;
[ "java.util", "net.i2p.data" ]
java.util; net.i2p.data;
1,834,238
@Override public boolean onOptionsItemSelected(MenuItem item) { return super.onOptionsItemSelected(item); }
boolean function(MenuItem item) { return super.onOptionsItemSelected(item); }
/** * Called when a menu item is selected. */
Called when a menu item is selected
onOptionsItemSelected
{ "repo_name": "austgl/swiftp", "path": "src/org/swiftp/ServerControlActivity.java", "license": "gpl-3.0", "size": 21916 }
[ "android.view.MenuItem" ]
import android.view.MenuItem;
import android.view.*;
[ "android.view" ]
android.view;
1,975,411
protected boolean enlist(BeanO beanO) throws TransactionRolledbackException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2 if (isTraceOn && tc.isEntryEnabled()) // d144064 Tr.entry(tc, "enlist", new Object[] { Boolean.valueOf(globalTransaction), this, bea...
boolean function(BeanO beanO) throws TransactionRolledbackException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, STR, new Object[] { Boolean.valueOf(globalTransaction), this, beanO }); ensureActive(); if (ivBeanOsEnlistedInTx == false) { initialize...
/** * Enlist the given <code>BeanO</code> in this container transaction. */
Enlist the given <code>BeanO</code> in this container transaction
enlist
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/ContainerTx.java", "license": "epl-1.0", "size": 77209 }
[ "com.ibm.websphere.ras.Tr", "com.ibm.websphere.ras.TraceComponent", "com.ibm.ws.ejbcontainer.InternalConstants", "java.util.ArrayList", "javax.transaction.TransactionRolledbackException" ]
import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.ejbcontainer.InternalConstants; import java.util.ArrayList; import javax.transaction.TransactionRolledbackException;
import com.ibm.websphere.ras.*; import com.ibm.ws.ejbcontainer.*; import java.util.*; import javax.transaction.*;
[ "com.ibm.websphere", "com.ibm.ws", "java.util", "javax.transaction" ]
com.ibm.websphere; com.ibm.ws; java.util; javax.transaction;
2,629,987