__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/17203231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instruction nextInstructionInCodeOrder() {
if (next == null) {
if (VM.VerifyAssertions) VM._assert(BBend.conforms(this));
BasicBlock nBlock = BBend.getBlock(this).block.nextBasicBlockInCodeOrder();
if (nBlock == null) {
return null;
} else {
return nBlock.firstInstruction();
}
} else {
return next;
}
}
COM: <s> return the next instruction with respect to the current </s>
|
funcom_train/22497414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Note loadNote(Element noteElement) {
int id;
// attempt to load the note
try {
id = noteElement.getAttribute("id").getIntValue();
} catch (Exception e) {
logger.log(Level.SEVERE,
"Data conversion error in getting the ID for note "
+ noteElement + ".", e);
return null;
}
// return created note
Note note = new Note(id);
logger.log(Level.INFO, "Loaded note: " + id, note);
return note;
}
COM: <s> this method loads the note from the given note element </s>
|
funcom_train/18954567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int deleteUser(String gruppe, String nutzer) {
MCRGroup group = MCRUserMgr.instance().retrieveGroup(gruppe);
MCRUser user = MCRUserMgr.instance().retrieveUser(nutzer);
if (user.getPrimaryGroupID().equals(gruppe)) {
return 1;
} else {
group.removeMemberUserID(nutzer);
MCRUserMgr.instance().updateGroup(group);
return 0;
}
}
COM: <s> delete the user from the group only </s>
|
funcom_train/3704856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void commonInit() throws IOException {
//// 1. Set up transports.
getTransportManager().startListeners();
getTransportManager().addListener(lstnr);
//// 2. Start up the operators.
opResolver = new OpResolver();
opResponseHeaders = new OpResponseHeaders();
opLog = new OpServerLogFile();
} // of initialization
COM: <s> do initializations common to all constructors </s>
|
funcom_train/4461584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getSequenceNamesByColumn(String colName) {
Set set = (Set) new HashSet();
validateColName(colName);
if(!isColumn(colName))
return set;
Iterator i = getSequences().iterator();
while(i.hasNext()) {
String seqName = (String) i.next();
if(getSequenceIgnoreCancelled(colName, seqName) != null)
set.add(seqName);
}
return set;
}
COM: <s> returns a set of all sequence names in column col name </s>
|
funcom_train/19323163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPriority(int priority) throws JMSException {
if (isClosed()) {
throw new javax.jms.IllegalStateException(
"The message producer is closed.");
}
if (defaultPriority < 0 || defaultPriority > 9) {
throw new JMSException("Illegal priority value");
} else {
this.defaultPriority = priority;
}
}
COM: <s> sets the default length of time in milliseconds from its dispatch time </s>
|
funcom_train/50342080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRosterGroupList(String str, boolean notify) {
if (_rosterGroupList.contains(str)) {
return;
}
_rosterGroupList.add(str);
Collections.sort(_rosterGroupList);
if (notify) {
firePropertyChange("RosterGroupAdded", null, str);
}
}
COM: <s> add a roster group and optionally notify all listeners </s>
|
funcom_train/8358487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createItemSummaryBlock() {
JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createTitledBorder(""));
panel.setBackground(Color.WHITE);
panel.setLayout(new MigLayout("insets 0", "[grow,left][grow,right]",
""));
panel.add(new JLabel("Сумма:"));
totalSum = new JLabel();
totalSum.setFont(new Font("", Font.BOLD, totalSum.getFont().getSize()));
panel.add(totalSum);
updateTotalSum();
this.add(panel, "span 2, wrap");
}
COM: <s> creating components for displaying items summary like total price </s>
|
funcom_train/9140418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String stem(String term) {
stemmer.setCurrent(term);
/* one can only imagine why a stemmer abstract class wouldn't
wouldn't have a stem() method. */
try{
stemMethod.invoke(stemmer, emptyArgs); //stemmer.stem();
}catch (Exception e) {
System.err.println("ERROR: Cannot use snowball stemmer "+language+" : "+e);
e.printStackTrace();
}
return stemmer.getCurrent();
}
COM: <s> stems the given term and returns the stem </s>
|
funcom_train/28997208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String className, Collection objects) {
Hashtable h = (Hashtable) cache.get(className);
if (h == null) {
h = new Hashtable(initialCapacity);
}
Iterator i = objects.iterator();
while (i.hasNext()) {
resolveObject(h, i.next());
}
cache.put(className, h);
}
COM: <s> adds the given class name to this cache and then </s>
|
funcom_train/47135921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TreeObject createDummyModel() {
TreeObject to1 = new TreeDoubleLinked("Inbox");
TreeObject to2 = new TreeDoubleLinked("Drafts");
TreeObject to3 = new TreeDoubleLinked("Sent");
TreeDoubleLinked p1 = new TreeDoubleLinked("me@this.com");
p1.addChild(to1);
p1.addChild(to2);
p1.addChild(to3);
TreeObject to4 = new TreeDoubleLinked("Inbox");
TreeDoubleLinked p2 = new TreeDoubleLinked("other@aol.com");
p2.addChild(to4);
TreeDoubleLinked root = new TreeDoubleLinked("");
root.addChild(p1);
root.addChild(p2);
return root;
}
COM: <s> we will set up a dummy model to initialize tree heararchy </s>
|
funcom_train/10945011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCurrency() {
if (this.currencyUom != null) {
return this.currencyUom;
} else {
// uh oh, not good, should always be passed in on init, we can't really do anything without it, so throw an exception
throw new IllegalStateException("The Currency UOM is not set in the shopping cart, this is not a valid state, it should always be passed in when the cart is created.");
}
}
COM: <s> get the current currency setting </s>
|
funcom_train/5377641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File createGenerationDir() {
File generationDir = getGenerationDir();
if (!generationDir.exists() && (!adaptor.canWrite() || !generationDir.mkdirs())) {
if (Debug.DEBUG && Debug.DEBUG_GENERAL) {
Debug.println("Unable to create bundle generation directory: " + generationDir.getPath()); //$NON-NLS-1$
}
}
return generationDir;
}
COM: <s> return the generation directory for the bundle data </s>
|
funcom_train/37565897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidate(Block invalidBlks[]) throws IOException {
for (int i = 0; i < invalidBlks.length; i++) {
File f = getFile(invalidBlks[i]);
long len = f.length();
if (!f.delete()) {
throw new IOException("Unexpected error trying to delete block " + invalidBlks[i] + " at file " + f);
}
}
}
COM: <s> were informed that a block is no longer valid </s>
|
funcom_train/44335961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isAuthorized(RunData data) throws Exception {
boolean isAuthorized = false;
/*
* Get acl and check security.
*/
AccessControlList acl = data.getACL();
//if (acl == null || ! acl.hasPermission("default_view", "group"))
if (acl != null && (acl.hasRole("turbine_root") || acl.hasRole("Admin"))) {
isAuthorized = true;
}
else {
isAuthorized = false;
}
return isAuthorized;
}
COM: <s> this currently only checks to make sure that user is allowed to </s>
|
funcom_train/44709951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVerticalAlignment(int alignmentEnum) {
String alignmentLiteral = "";
switch (alignmentEnum) {
case TOP:
alignmentLiteral = "top";
break;
case BOTTOM:
alignmentLiteral = "bottom";
break;
case CENTER:
alignmentLiteral = "center";
break;
default:
throw new IllegalArgumentException("Undefined Arg in setVerticalAlignment");
}
setAttribute("verticalAlignment", alignmentLiteral);
}
COM: <s> sets the vertical alignment of this component </s>
|
funcom_train/13364497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IToken nextToken(final IRule rule) {
fTokenOffset = fOffset;
fColumn = UNDEFINED;
final IToken token = (rule.evaluate(this));
if (!token.isUndefined()) {
return token;
}
if (read() == EOF) {
return Token.EOF;
}
return fDefaultReturnToken;
}
COM: <s> returns the next token using the specified rule </s>
|
funcom_train/25371591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadFile(String filename) {
ArffSortedTableModel model;
this.m_Filename = filename;
createTitle();
if (filename.equals("")) {
model = null;
}
else {
model = new ArffSortedTableModel(filename);
model.setShowAttributeIndex(getShowAttributeIndex());
}
m_TableArff.setModel(model);
setChanged(false);
createName();
}
COM: <s> loads the specified file into the table </s>
|
funcom_train/19542855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void returnScriptContext(ScriptContext context) {
context.getBindings(ScriptContext.ENGINE_SCOPE).clear();
ENGINE_CONTEXTS.add(context);
if (savedGlobalBindings == null) savedGlobalBindings = new LinkedList<Bindings>();
teardownContext(context.getBindings(ScriptContext.GLOBAL_SCOPE), savedGlobalBindings.pop());
}
COM: <s> return the script context to the cache and restore the proper parent </s>
|
funcom_train/101713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doInitComponents(){
// Dynamic components
btnAdd = new javax.swing.JButton();
btnRemove = new javax.swing.JButton();
tblAvailMeas = new javax.swing.JTable();
tblChosenMeas = new javax.swing.JTable();
// Standard components
initComponents();
// Hide ribbon
panelRibbon.setVisible(false);
// Hide preview button
btnPreview.setVisible(false);
// Make sure components are using I18n
internationalizeComponents();
}
COM: <s> initilize components of the gui </s>
|
funcom_train/33338487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AggregateAdapters createOrRecreateRootAdapter(final Object pojo, final Oid oid) {
NakedObject rootAdapter = createOrRecreateAdapter(pojo, oid);
AggregateAdapters aggregateAdapters = new AggregateAdapters(rootAdapter);
// failed experiment to try to ensure that all adapters are loaded for the root;
// left in in case we want to re-instate
// eagerlyCreateCollectionAdapters(rootAdapter, aggregateAdapters);
return aggregateAdapters;
}
COM: <s> helper method that creates but does not </s>
|
funcom_train/19273025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Query getLuceneQuery(SearchQuery query) {
try {
Query luceneQuery = ((AbstractLuceneSearchQuery) query).getLuceneQuery();
luceneQuery = this.searcher.rewrite(luceneQuery);
return luceneQuery;
} catch (IOException e) {
throw new RuntimeIoException(e, IoMode.READ);
}
}
COM: <s> this method gets the lucene </s>
|
funcom_train/39053096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void crashAndRestartServer(boolean clean) throws Exception {
System.err.println("simulate watchdog server crash...");
tearDown(clean);
Properties props =
SgsTestNode.getDefaultProperties(
"TestWatchdogServiceImpl", null, null);
props.setProperty(
StandardProperties.NODE_TYPE,
NodeType.coreServerNode.name());
setUp(props, false);
}
COM: <s> tears down the server node and restarts it as a server only stack </s>
|
funcom_train/10153041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getExampleHelpContext(final File f) {
String contextString = null;
if (f != null && f.exists())
{
final SAXBuilder sb = new SAXBuilder();
Document document = null;
try
{
document = sb.build(f);
final Element elem = document.getRootElement().getChild(EXAMPLE_HELP);
if (elem != null) {
contextString = elem.getText();
}
}
catch (final JDOMException exception)
{
XADesignerLogger.logError(exception);
}
catch (final IOException exception)
{
XADesignerLogger.logError(exception);
}
}
return contextString;
}
COM: <s> capture the example help context string defined in the xaware resource file </s>
|
funcom_train/22232664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInfluencingBoundingLeaf(BoundingLeaf region) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_INFLUENCING_BOUNDS_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ModelClip13"));
if (isLive())
((ModelClipRetained)this.retained).setInfluencingBoundingLeaf(region);
else
((ModelClipRetained)this.retained).initInfluencingBoundingLeaf(region);
}
COM: <s> set the model clip nodes influencing region to the specified </s>
|
funcom_train/50532859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean SetPropertiesInternal(Properties props) {
String str;
this.props=(Properties)props.clone();
str=props.getProperty("trace");
if(str != null) {
trace=new Boolean(str).booleanValue();
props.remove("trace");
}
str=props.getProperty("down_thread");
if(str != null) {
down_thread=new Boolean(str).booleanValue();
props.remove("down_thread");
}
str=props.getProperty("up_thread");
if(str != null) {
up_thread=new Boolean(str).booleanValue();
props.remove("up_thread");
}
return SetProperties(props);
}
COM: <s> called by configurator </s>
|
funcom_train/42180620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Texture getColoredImageTexture(Color color) {
BufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
Graphics g = image.getGraphics();
g.setColor(color);
g.drawLine(0, 0, 0, 0);
g.dispose();
return new TextureLoader(image).getTexture();
}
COM: <s> returns a texture image of one pixel of the given code color code </s>
|
funcom_train/1147369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancelCommand() {
if (cancelCommand == null) {//GEN-END:|66-getter|0|66-preInit
// write pre-init user code here
cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|66-getter|1|66-postInit
// write post-init user code here
}//GEN-BEGIN:|66-getter|2|
return cancelCommand;
}
COM: <s> returns an initiliazed instance of cancel command component </s>
|
funcom_train/1383625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDateChooser getDateDal() {
if (dateDal == null) {
Date date = getTime().getTime();
dateDal = new JDateChooser("dd/MM/yyyy", "##/##/##", '_');
dateDal.setPreferredSize(new Dimension(100, 20));
dateDal.setDate(date);
}
return dateDal;
}
COM: <s> this method initializes date dal </s>
|
funcom_train/34507968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ArtifactId makeArtifact(String name, String templateName) throws CartagoException {
SensorId sid = linkDefaultSensor();
try {
use(FACTORY,new Op("makeArtifact",name,templateName),sid);
ArtifactId id = (ArtifactId)sense(sid,"make_succeeded").getContent();
this.unlinkSensor(sid);
return id;
} catch (Exception ex){
throw new CartagoException("make_failed");
}
}
COM: <s> auxiliary action to make an artifact </s>
|
funcom_train/19063508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDefaultSettings(IMailbox folder) {
IFolderItem item = folder.getConfiguration();
XmlElement parent = item.getElement("property");
// use global settings
String[] ids = handler.getPluginIdList();
for (int i = 0; i < ids.length; i++) {
AbstractFolderOptionsPlugin plugin = getPlugin(ids[i]);
XmlElement child = plugin.createDefaultElement(false);
parent.addElement(child);
}
}
COM: <s> create default settings for this folder </s>
|
funcom_train/7980395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beginCrawlStop() {
LOGGER.fine("Started.");
sendCrawlStateChangeEvent(STOPPING, this.sExit);
if (this.frontier != null) {
this.frontier.terminate();
this.frontier.unpause();
}
LOGGER.fine("Finished.");
}
COM: <s> start the process of stopping the crawl </s>
|
funcom_train/24130816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(final Class persistenceClass, final Serializable id) throws ObjectNotFoundException {
Object result = getHibernateTemplate().get(persistenceClass, id);
if (result == null) {
throw new ObjectNotFoundException(persistenceClass.getSimpleName() + " with ID " + id + " was not found");
}
return result;
}
COM: <s> returns an object of given class with given id </s>
|
funcom_train/3431456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initExtendedTypes()
{
m_extendedTypes = new ExtendedType[m_initialSize];
for (int i = 0; i < DTM.NTYPES; i++) {
m_extendedTypes[i] = m_defaultExtendedTypes[i];
m_table[i] = new HashEntry(m_defaultExtendedTypes[i], i, i, null);
}
m_nextType = DTM.NTYPES;
}
COM: <s> initialize the vector of extended types with the </s>
|
funcom_train/51590519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Byte getByte(ByteChannel soc) {
ByteBuffer buf = ByteBuffer.allocate(1);
int cnt;
try {
cnt = socTcp.read(buf);
} catch (IOException ex) {
logger.log(Level.SEVERE,"IO Exception during parsing cmd !",ex);
return null;
}
if (cnt==0) {
return null;
}
buf.rewind();
return buf.get();
}
COM: <s> get one byte command id from socket chanel </s>
|
funcom_train/27929756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTableCreate1() {
Table t = new Table(".");
assertEquals(t.commentName(), "_new");
assertEquals(t.getAbb(), "_new");
assertEquals(t.getBasedir(), ".");
assertEquals(t.getName(), "_new");
}
COM: <s> create unnamed table object </s>
|
funcom_train/31937220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finishWizards() {
if (deferWizards != null) {
Iterator iter = deferWizards.iterator();
while (iter.hasNext()) {
WorkbenchWizardElement wizard = (WorkbenchWizardElement)iter.next();
IConfigurationElement config = wizard.getConfigurationElement();
finishWizard(wizard, config, wizards);
}
deferWizards = null;
}
}
COM: <s> finishes the addition of wizards </s>
|
funcom_train/15624812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertGameObject(@NotNull final GameObject<TestGameObject, TestMapArchObject, TestArchetype> gameObject, @NotNull final String archetypeName, @NotNull final String name) {
final TestGameObject inv = newGameObject(archetypeName, name);
gameObject.addLast(inv);
}
COM: <s> inserts a game object into the inventory of another game object </s>
|
funcom_train/35716241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeListener(VerifyKeyListener listener) {
if (listener == null)
return;
if (fReentranceCount > 0) {
fBatched.add(new Batch(listener, -1));
} else {
int size= fListeners.size();
for (int i= 0; i < size; i++) {
if (listener == fListeners.get(i)) {
fListeners.remove(i);
if (size == 1) // checking old size, i.e. current size == size - 1
uninstall();
return;
}
}
}
}
COM: <s> removes the given listener </s>
|
funcom_train/7277253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addXMLToResponse(Response response, FileDesc fd) {
List<LimeXMLDocument> docs = fd.getLimeXMLDocuments();
if (docs.size() == 0)
return;
if (docs.size() == 1)
response.setDocument(docs.get(0));
}
COM: <s> adds xml to the response </s>
|
funcom_train/12212660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTableColumn(TableColumnBean c) {
switch (c.getUiObject()) {
case LayoutConstants.TEXT_FIELD:
operationsTable.addColumn(c);
break;
case LayoutConstants.BUTTON:
// TODO Button cannot be added until the ExtdTable is made more
// robust
operationsTable.addColumn(c);
break;
case LayoutConstants.BUTTON_CHECK_BOX:
operationsTable.addColumn(c);
break;
case LayoutConstants.COMBO_BOX_EDITABLE:
operationsTable.addComboBoxColumn(c, true);
break;
case LayoutConstants.COMBO_BOX_NON_EDITABLE:
operationsTable.addComboBoxColumn(c, false);
break;
default:
break;
}
}
COM: <s> identify the type of uiobject to be created for each column and create </s>
|
funcom_train/5593790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPart() {
System.out.println("testPart");
sender.part("#channel");
assertEquals("PART #channel :", bufferToString());
sender.part(new String[] { "#channel", "#channel2" }, "you suck");
assertEquals("PART #channel,#channel2 :you suck", bufferToString());
}
COM: <s> test of part method of class net </s>
|
funcom_train/1170595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Card moveToPlayFromHand(Card c) {
//handles the case for Clone, etc where prev was null
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, c.getOwner());
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, c.getController());
c = changeZone(hand, play, c);
return c;
}
COM: <s> p move to play from hand </s>
|
funcom_train/1573788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutputStream outputStream() {
if (this.sResponse == null)
return null;
try {
return this.sResponse.getOutputStream();
}
catch (IOException e) {
log.warn("could not get OutputStream of ServletResponse: " +
this.sResponse, e);
return null;
}
}
COM: <s> returns the output stream associated with the servlet response </s>
|
funcom_train/43340759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPlayerPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_PlayerMovement_player_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_PlayerMovement_player_feature",
"_UI_PlayerMovement_type"), TacticsPackage.eINSTANCE
.getPlayerMovement_Player(), true, null, null, null));
}
COM: <s> this adds a property descriptor for the player feature </s>
|
funcom_train/7660007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
final ReentrantLock lock = this.lock;
lock.lock();
try {
/*
* Retract generation number enough to cover threads
* currently waiting on current and still resuming from
* previous generation, plus similarly accommodating spans
* after the reset.
*/
generation -= 4;
broken = false;
trip.signalAll();
} finally {
lock.unlock();
}
}
COM: <s> resets the barrier to its initial state </s>
|
funcom_train/45018374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXentry_duration_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXentry_duration_feature", "_UI_NXentry_type"),
NexusPackageImpl.Literals.NXENTRY__DURATION,
true,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the duration feature </s>
|
funcom_train/9117671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setJMenuBar(getJJMenuBar());
jFrame.setSize(691, 526);
jFrame.setContentPane(getJContentPane());
jFrame.setTitle("PSDX Application");
}
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
funcom_train/31217699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean preFilter( ProvaObject[] source, ProvaObject[] target ) {
for( int i=1; i<source.length; i++ ) {
if( source[i] instanceof ProvaConstant && target[i] instanceof ProvaConstant &&
!((ProvaConstant) source[i]).matched((ProvaConstant) target[i]) )
return false;
}
return true;
}
COM: <s> reject obvious mismatches between constants </s>
|
funcom_train/9273958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void varchar100() throws SQLException {
PreparedStatement ps = getOrPrepareStatement(
"SELECT VC100 FROM T --DERBY-PROPERTIES index=T_VC100");
ResultSet rs = ps.executeQuery();
while (rs.next()) {
assertNotNull(rs.getString(1));
}
rs.close();
}
COM: <s> test the performance of an index scan on a varchar 100 column </s>
|
funcom_train/20846000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean notifyActionInvokeListeners(String requestURI, XMLElement envelope, Hashtable tmpAttachmentList, ResponseOutput respOut) {
if (actionInvokeListeners == null) return false;
try {
actionInvokeListeners.lockRead();
AbstractService ser = (AbstractService) actionInvokeListeners.get(requestURI);
if (ser != null) {
ser.invokeActionInternal(envelope, tmpAttachmentList, respOut);
return true;
}
return false;
} finally {
actionInvokeListeners.unlock();
}
}
COM: <s> notifies the registered service action listeners </s>
|
funcom_train/24132151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String key, String defaultValue) {
String val = super.getProperty(key);
if (val == null) {
logger.warn("Property [" + key + "] + not found. Returning [" + defaultValue + "].");
}
return (val == null) ? defaultValue : val;
}
COM: <s> returns the property value </s>
|
funcom_train/3023314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reportAverageOtherMethods(ProjectMetrics projectData) {
// Other Methods
double top = projectData.getOtherMethodTotal();
double bottom = projectData.getClassTotal();
System.out.println("[002] " + projectData.getOtherMethodTotal() + " total other methods in " + projectData.getClassTotal() + " classes.");
System.out.println("[002] " + "Average: " + (top / bottom));
}
COM: <s> reports on the average number of other methods </s>
|
funcom_train/7687003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupView() {
mPin2Field = (EditText) findViewById(R.id.pin);
if (mPin2Field != null) {
mPin2Field.setKeyListener(DigitsKeyListener.getInstance());
mPin2Field.setMovementMethod(null);
mPin2Field.setOnClickListener(mClicked);
}
}
COM: <s> reflect the changes in the layout that force the user to open </s>
|
funcom_train/43416087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initUI(MachineInitStruct initStruct) {
((BufferedScreenModel) initStruct.screenModel).init(
executionControl.getMachine(),
executionControl.getZsciiEncoding());
int version = executionControl.getVersion();
statusPanel.setVisible(version <= 3);
mainView.initUI(screenModel, executionControl);
}
COM: <s> initializes the user interface </s>
|
funcom_train/9162160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDefinition() {
Widget newDef;
if ( m_state.isDefinitionExpanded() ) {
newDef = WidgetFactory.createWidget(
m_definition.getParent(),
m_query.getDefinition());
} else {
newDef = new EmptyWidget(m_definition.getParent());
}
m_definition.replaceWith(newDef);
m_definition = newDef;
}
COM: <s> update the definition representation from the query </s>
|
funcom_train/25742334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendToHelios(String projectName, String toolName, String branch, String version, Map<String, File> maps, Timestamp timestamp) throws MissingFileException, IOException{
File tmpJar = this.packageHeliosJar(projectName, toolName, branch, version, maps,timestamp);
this.moveToHelios(projectName,tmpJar);
}
COM: <s> package and move to helios project add </s>
|
funcom_train/48123567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initScorerDocQueue() throws IOException {
Iterator si = subScorers.iterator();
scorerDocQueue = new ScorerDocQueue(nrScorers);
while (si.hasNext()) {
Scorer se = (Scorer) si.next();
if (se.next()) { // doc() method will be used in scorerDocQueue.
scorerDocQueue.insert(se);
}
}
}
COM: <s> called the first time next or skip to is called to </s>
|
funcom_train/37034394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void threadStart() {
// Has the background thread already been started?
if (thread != null)
return;
// Start the background thread
if (debug >= 1)
log(" Starting background thread");
threadDone = false;
threadName = "HostConfig[" + host.getName() + "]";
thread = new Thread(this, threadName);
thread.setDaemon(true);
thread.start();
}
COM: <s> start the background thread that will periodically check for </s>
|
funcom_train/13599490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPooledActors(Set pooledActors) {
if (pooledActors!=null) {
this.pooledActors = new HashSet(pooledActors);
Iterator iter = pooledActors.iterator();
while (iter.hasNext()) {
PooledActor pooledActor = (PooledActor) iter.next();
pooledActor.addTaskInstance(this);
}
} else {
pooledActors = null;
}
}
COM: <s> takes a set of </s>
|
funcom_train/44482384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void traverse(File directory) {
File[] all = directory.listFiles();
for (int i = 0; i < all.length; ++i) {
if (all[i].isDirectory()) {
if (startDirectory(all[i])) {
traverse(all[i]);
endDirectory(all[i]);
}
}
else {
handleFile(all[i]);
}
}
}
COM: <s> start the depth first traversal of the directory </s>
|
funcom_train/31359135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void componentChanged(ComponentModel userObject, int what){
if ((what & userObject.STATUS) == 0)
return;
javax.swing.SwingUtilities.invokeLater(new Runnable(){
ComponentModel userObject;
Runnable setUserO(ComponentModel o){
userObject = o;
return this;
}
public void run(){
setLeafIcon(userObject.getIcon());
setClosedIcon(userObject.getIcon());
setOpenIcon(userObject.getIcon());
userObject.getTreeModel().nodeStructureChanged(
userObject.getTreeNode());
}
}.setUserO(userObject));
}
COM: <s> called by a random thread when an object starts or stops </s>
|
funcom_train/5432964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SimpleGrid getSimpleGrid(Grid g) {
SimplePlanet sp=(SimplePlanet)allPlanets.get(g.thePlanet);
if(sp==null) {
net.sourceforge.chaosrts.Debug.debugMsg("Weird... we're missing a SimplePlanet");
return null;
}
return sp.getGrid(g.X(),g.Y());
}
COM: <s> returns the simple grid for the given grid </s>
|
funcom_train/20553145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel2() {
if (jPanel2 == null) {
GridLayout gridLayout1 = new GridLayout();
gridLayout1.setRows(1);
headingLabel = new JLabel();
headingLabel.setText("JLabel");
headingLabel.setFont(new Font("Dialog", Font.BOLD, 18));
jPanel2 = new JPanel();
jPanel2.setBorder(BorderFactory.createEmptyBorder(10, 5, 25, 5));
jPanel2.setLayout(gridLayout1);
jPanel2.add(headingLabel, null);
}
return jPanel2;
}
COM: <s> this method initializes j panel2 </s>
|
funcom_train/34057299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void header(TableModel model) {
tr(1).close();
List columns = model.getColumnHandler().getHeaderColumns();
for (Iterator iter = columns.iterator(); iter.hasNext();) {
Column column = (Column) iter.next();
append(column.getCellDisplay());
}
trEnd(1);
}
COM: <s> the header row of the table </s>
|
funcom_train/36658678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Object obj) {
ScalableListNodeIterator<E> iter =
new ScalableListNodeIterator<E>(getHead());
boolean removed = false;
// Find and remove the object in the ListNode<E> that contains it
while (iter.hasNext()) {
ListNode<E> n = iter.next();
removed = n.remove(this, obj);
if (removed) {
break;
}
}
return removed;
}
COM: <s> removes the first occurrence in this list of the specified element </s>
|
funcom_train/48068656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurFirstUnread() {
if (unreadMails != 0) {
Enumeration messages = storage.getEnumeration();
MessageHeader message;
//ANup cur = 0;
empties = 0;
while ( messages.hasMoreElements() ) {
message = (MessageHeader)messages.nextElement();
if ( message.readStatus == MessageHeader.NOT_READ) {
break;
}
//Anup shiftSelectedIndex(true);
}
}
}
COM: <s> moves the cursor on the first unread mail </s>
|
funcom_train/32138556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int find(String search) {
IDocument doc = getSourceViewer().getDocument();
FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(doc);
int line = 0;
jumpToLocation(0, 0);
try {
IRegion reg = finder.find(0, search, true, false, false, false);
int offset = reg.getOffset();
line = doc.getLineOfOffset(offset);
} catch(BadLocationException ble) {
} catch(NullPointerException npe) {
line = -1;
}
return line;
}
COM: <s> searches the idocument for the specified string </s>
|
funcom_train/29648373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Command lookup(String cmd) {
//First try direct lookup.
Command comm = commands.get(cmd);
//Next try alternate commands
if (comm == null) {
String altCmd = alternateCommands.get(cmd);
if (altCmd != null)
comm = commands.get(altCmd);
//Next try command completion.
if (comm == null) {
comm = completeCommand(cmd);
}
}
if (comm == null) {
return new Bad();
}
else {
return comm;
}
}
COM: <s> finds a command given a string </s>
|
funcom_train/38790126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void setXPathSupportClass(Class cl) {
if (cl != null && !XPathSupport.class.isAssignableFrom(cl)) {
throw new RuntimeException("Class " + cl.getName()
+ " does not implement freemarker.ext.dom.XPathSupport");
}
xpathSupportClass = cl;
}
COM: <s> set an alternative implementation of freemarker </s>
|
funcom_train/40318355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void guiInterrupt() {
if (this.isAlive()) {
current_process.getPCB().state = ProcessControlBlock.READY;
printOut(current_process + " interrupted by the user at " + program_counter);
ih.handleInterrupt(InterruptHandler.TIMER_INT, null);
}
}
COM: <s> handles when an interrupt comes from someone hitting </s>
|
funcom_train/51556405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector listGroups() {
try {
Connection conn = new Connect().connect();
Statement st = conn.createStatement();
String query = "SELECT * FROM groups WHERE";
Vector v = new Vector();
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
this.gID = rs.getInt("gid");
this.name = rs.getString("name");
this.description = rs.getString("description");
v.add(this);
}
return v;
} catch (Exception e) {
log.setDescription("Error while listing groups. " + e.toString());
log.setLevel("error");
log.add();
return null;
}
}
COM: <s> gets information about all groups </s>
|
funcom_train/39379983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getCssImports() {
processPageControls();
HtmlStringBuffer buffer = new HtmlStringBuffer(80 * cssImports.size());
for (int i = 0; i < cssImports.size(); i++) {
String line = cssImports.get(i).toString();
buffer.append(line);
if (i < cssImports.size() - 1) {
buffer.append('\n');
}
}
return buffer.toString();
}
COM: <s> return a html string of all the pages html css imports </s>
|
funcom_train/43372018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String findNCBITaxonomyRecordByTaxId(Long taxId) throws Exception {
DBObject dbo = new DBObject();
String sql = "SELECT * from ncbiTaxon where tax_id = '" + taxId + "'";
ResultSet resultSet = dbo.sqlExecuteSelect(sql);
String scientificName = "";
if (resultSet.next()) {
scientificName = resultSet.getString("scientific_name");
}
resultSet.getStatement().close();
resultSet.close();
dbo.closeConnection();
return scientificName;
}
COM: <s> finds the ncbi taxonomy record by tax id </s>
|
funcom_train/9082400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accepts(WaveletId id) {
boolean match = ids.isEmpty() && prefixes.isEmpty();
if (!match) {
match = ids.contains(id);
}
Iterator<String> itr = prefixes.iterator();
while (itr.hasNext() && !match) {
match = match || id.getId().startsWith(itr.next());
}
return match;
}
COM: <s> checks whether an id is accepted by the filter </s>
|
funcom_train/10858210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStemming() throws Exception {
Reader reader = new StringReader("Brasília");
Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
BrazilianStemFilterFactory factory = new BrazilianStemFilterFactory();
TokenStream stream = factory.create(tokenizer);
assertTokenStreamContents(stream, new String[] { "brasil" });
}
COM: <s> ensure the filter actually stems and normalizes text </s>
|
funcom_train/15465448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adjustFinalDiagnosis(String deidText) {
int index = deidText.indexOf("[Final Diagnosis]");
int length = (new String("[Final Diagnosis]")).length();
if (index > 2) {
deidText = deidText.substring(0, index - 2) + "[Final Diagnosis]"
+ deidText.substring(index + length, deidText.length());
}
}
COM: <s> adjust final diagnosis </s>
|
funcom_train/41621247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransform(int jointIndex, int index, float value) {
switch(index)
{
case 0:
this.translations[jointIndex].x = value;
break;
case 1:
this.translations[jointIndex].y = value;
break;
case 2:
this.translations[jointIndex].z = value;
break;
case 3:
this.orientations[jointIndex].x = value;
break;
case 4:
this.orientations[jointIndex].y = value;
break;
case 5:
this.orientations[jointIndex].z = value;
this.processOrientation(jointIndex, this.orientations[jointIndex]);
break;
default:
break;
}
}
COM: <s> set the transform of this frame </s>
|
funcom_train/33371378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buffer = new StringBuffer();
int padding = 5;
for(int i=0; i<row; i++) {
buffer.append("[ ");
for(int j=0; j<col; j++) {
buffer.append(toPresentation(x[i][j], padding)).append(' ');
}
buffer.append(" ] \n");
}
return buffer.toString();
}
COM: <s> returns a string representation of this matrix </s>
|
funcom_train/11321494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale getLocale() {
Locale locale = (Locale) getSessionAttribute(LOCALE);
if (locale == null) {
if (clickServlet.getConfigService().getLocale() != null) {
locale = clickServlet.getConfigService().getLocale();
} else {
locale = getRequest().getLocale();
}
}
return locale;
}
COM: <s> return the users locale </s>
|
funcom_train/22034696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SSCellData getCellDataByName(String varName) {
int len = CellData.size();
SSCellData cellData = null;
for (int i=0; i<len; i++) {
SSCellData cd = (SSCellData) CellData.elementAt(i);
if (cd.getVariableName().equals(varName)) {
cellData = cd;
break;
}
}
return cellData;
}
COM: <s> obtains the cell data entry corresponding to the given variable name </s>
|
funcom_train/44341809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRectangle(Rectangle rct, Lexicon lexicon) {
getRectangle().x = rct.x;
getRectangle().y = rct.y;
getRectangle().width = rct.width;
getRectangle().height = rct.height;
Point pt = node.getLeftTopPoint();
pt.x = rct.x;
pt.y = rct.y;
this.updateRelatedVEdges(null, false, lexicon);
}
COM: <s> update the rectangle of the current visual node using the specified rectangle </s>
|
funcom_train/17027390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAllCategories(RESTCommand cmd) throws SimalAPIException {
if (cmd.isJSON()) {
try {
return SimalRepositoryFactory.getCategoryService().getAllCategoriesAsJSON();
} catch (SimalRepositoryException e) {
throw new SimalAPIException(
"Unable to get JSON representation of all categories from the repository",
e);
}
} else {
throw new SimalAPIException("Unkown format requested - " + cmd);
}
}
COM: <s> get all the categories from the repository </s>
|
funcom_train/4096277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDirectory(String directoryName) {
File dir = new File(directoryName);
if (!dir.exists()) {
if (dir.mkdirs()) {
String message = "Created directory [" + directoryName + "]";
if (debug) {
log.debug(message);
}
} else {
log.error("Failed to create directory [" + directoryName + "]");
}
}
}
COM: <s> creates a new directory if it does not exist already </s>
|
funcom_train/2552184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Study findByID(Integer expID) {
String query = "from Study as study where study.studyId = ?";
Study study = null;
Object[] parameters = { expID };
List list = this.getHibernateTemplate().find(query, parameters);
if (list.size() > 0) {
study = (Study) list.get(0);
}
return study;
}
COM: <s> finds an instance of study in the database by the study id </s>
|
funcom_train/45232898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxpJdbcClasspath() {
if (txpJdbcClasspath == null) {
txpJdbcClasspath = new JTextField();
txpJdbcClasspath.setBounds(new Rectangle(97, 167, 380, 20));
txpJdbcClasspath.setEditable(false);
txpJdbcClasspath.setText(EnvProperties.getInstance().getProperty(EnvProperties.DB_CLASSPATH));
}
return txpJdbcClasspath;
}
COM: <s> this method initializes txp jdbc classpath </s>
|
funcom_train/15401414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void retrieveInfo() {
DICOMImageCluster cluster=null;
cluster=_cluster;
//DICOMImageCluster nonVirtualRoot = ((MDImageViewingFrontView)cluster.getTopLevelAncestor()).getContentDICOMImageCluster();
//_ancestors.add(cluster);
for (; cluster!=null; cluster=cluster.getClusterParent()) {
_ancestors.add(cluster);
}
//_ancestors.add(nonVirtualRoot);
}
COM: <s> links parent clusters to ancestors </s>
|
funcom_train/926348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int index, int i) {
if (index > size || index < 0)
throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size);
ensureCapacity(size+1);
System.arraycopy(elementData, index, elementData, index + 1, size - index);
elementData[index] = i;
size++;
}
COM: <s> inserts the specified element at the specified position in this </s>
|
funcom_train/27709886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetEjbName() {
final String EJB_NAME = "TEST_EJB_NAME";
MessageEntry testEntry = new MessageEntry("", "", "");
testEntry.setEjbName(EJB_NAME);
assertEquals(EJB_NAME, testEntry.getEjbName());
}
COM: <s> test of get ejb name and set ejbname method of class velcro </s>
|
funcom_train/39061884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
// Create a frame.
clientFrame = new OleFrame(parent, SWT.CLIP_CHILDREN);
clientFrame.setBackground(
JFaceColors.getBannerBackground(clientFrame.getDisplay()));
initializeWorkbenchMenus();
// Set the input file.
IEditorInput input = getEditorInput();
if (input instanceof IFileEditorInput) {
setResource(((IFileEditorInput) input).getFile());
resource.getWorkspace().addResourceChangeListener(resourceListener);
}
createClientSite();
}
COM: <s> create part control method comment </s>
|
funcom_train/9549936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonBrowseResource4() {
if (jButtonBrowseResource4 == null) {
jButtonBrowseResource4 = new JButton();
jButtonBrowseResource4.setText("Browse");
jButtonBrowseResource4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
getResourceFile4();
}
});
}
return jButtonBrowseResource4;
}
COM: <s> this method initializes j button browse resource4 </s>
|
funcom_train/9101219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void summary() {
for (int i = 0; i < tasks.length; i++) {
Flog.info("" + token + " " + tasks[i].toString(), "" + tasks[i].getTotalFound() + " results so far. S[" + tasks[i].getStatus() + "][" + tasks[i].getTimeTaken() + "ms]");
}
}
COM: <s> dumps information log entries of the states of the tasks </s>
|
funcom_train/14242496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClassdiagramNode getClassdiagramNode4owner(MClassifier m) {
for(int i=0; i < _layoutedClassNodes.size(); i++) {
if (_layoutedClassNodes.elementAt(i) instanceof ClassdiagramNode)
if(getClassdiagramNode(i).getFigure().getOwner() == m)
return getClassdiagramNode(i);
}
return null;
}
COM: <s> search the nodes in this classdiagram for a node </s>
|
funcom_train/943723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getQuadsWithInstanceValues() {
ArrayList quads = new ArrayList();
InstanceWorld iw = InstanceWorld.getCurrentInstanceWorld();
for (Iterator it = this.computeAttributeQuads(iw).iterator(); it
.hasNext();) {
Quad quad = (Quad) it.next();
if (!quad.objectIsLiteral()) {
quads.add(quad);
}
}
return quads;
}
COM: <s> return the list of quads with non literal values for this </s>
|
funcom_train/48623808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LicenseVersion changeCurrentVersion(int myVersion) {
// the max version is always the current version
if (myVersion == maxVersion)
return this.getCurrentVersion();
for (LicenseVersion version : versions) {
if (version.getVersionNumber() == myVersion) {
maxVersion = maxVersion + 1;
LicenseVersion newVersion = new LicenseVersion(version
.getLicense(), this, maxVersion);
this.versions.add(newVersion);
currentVersion = newVersion;
return newVersion;
}
}
return null;
}
COM: <s> changes the current license version if the version exists otherwise the </s>
|
funcom_train/50848082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdateDate() throws Exception {
if (!isTestUpdates()) {
return;
}
try {
ResultSet rs = this.newUpdateableJdbcResultSet();
rs.next();
rs.updateDate("date_column", java.sql.Date.valueOf("2005-12-14"));
} catch (Exception e) {
fail(e.toString());
}
}
COM: <s> test of update date method of interface java </s>
|
funcom_train/41717163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
name = name.trim();
if (name.equals(""))
name = null;
if (name == null) {
if (this.name == null)
return;
} else if (name.equals(this.name))
return;
logger.info("Expression (ID:" + this.getId() + ") name changed from '"
+ this.name + "' to '" + name + "'.");
this.name = name;
fireObjectUpdated();
}
COM: <s> sets the name of this instance </s>
|
funcom_train/7508318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getServletPath() {
String path = getHttpServletRequest().getServletPath();
String clean = "";
try {
clean = ESAPI.validator().getValidInput("HTTP servlet path: " + path, path, "HTTPServletPath", 100, false);
} catch (ValidationException e) {
// already logged
}
return clean;
}
COM: <s> returns the server path from the http servlet request after canonicalizing </s>
|
funcom_train/17178403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAttributeValue(AttributeTagDelegate tag) {
String value = null;
Iterator<ImageResource> iterator = imageSet.iterator();
if (iterator.hasNext()) {
ImageResource image = iterator.next();
try {
value = image.getAttributeValue(tag, false);
} catch (IOException e) {
//TODO: try next file?
} catch (DicomException e) {
//TODO: try next file?
}
}
return value;
}
COM: <s> gets the dicom attribute value for the specified tag from the scan </s>
|
funcom_train/8829367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(int idDoc) throws SQLException {
try{
String query = "DELETE FROM DOCUMENT WHERE idDoc = ?";
PreparedStatement stmt = connect.prepareStatement(query);
stmt.setInt(1, idDoc);
stmt.execute();
query = "DELETE FROM APPARTIENT WHERE idDoc = ?";
stmt = connect.prepareStatement(query);
stmt.setInt(1, idDoc);
stmt.execute();
} catch (SQLException e1) {
throw e1;
}
}
COM: <s> delete a record from the table document from the database </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.