__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/42275383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void status() { if ( m_dead ) { System.out.println("This Node is DEAD"); } System.out.println("Username: " + m_username); System.out.println("ID: " + m_node.getId().toStringFull()); System.out.println("Personal File List: " + m_personalFileList); System.out.println("Inventory: " + m_inventory.keySet()); } COM: <s> status information on this node </s>
funcom_train/38566047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWord(Integer length) { StringBuffer word = new StringBuffer(length.intValue()); for (int i = 0; i < length.intValue(); i++) { word.append(possiblesChars[myRandom.nextInt(possiblesChars.length)]); } return word.toString(); } COM: <s> return a word of length between min and max length </s>
funcom_train/14597620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DelegateNode setConstituent(DelegateNode node) { DelegateNode released = constituent; constituent = node; if (node == null) { setVisible(false); } else { addConstituentImpl(node); } constituentIcon.setConstituent(node); if (released != null) { removeConstituentImpl(released); } updateLinks(); return released; } COM: <s> set the single constituent this instance accepts and returns </s>
funcom_train/15608464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String substituteEntityReferences(String st) { StringBuffer collector = new StringBuffer(st.length() + 50); for (int i = 0; i < st.length(); i++) { collector.append(substituteEntityReferences(st.charAt(i))); } // FOr all chars. return collector.toString(); } // End method COM: <s> back subs an entire string worth of characters </s>
funcom_train/45317557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendBadRequest(String text) { Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).info("Bad request " + text); AACCNormalResponse response = new AACCNormalResponse(); response.setCode(AACCNormalResponse.MSG_BAD_REQUEST); response.setMessage(text); sendMessage(response); } COM: <s> sends text to the client with response code 400 </s>
funcom_train/13389130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object parent, Object child) { //Only Element can have children!!! if (parent instanceof Element) { if (child instanceof Attribute) return ((Element)parent).getAttributes().indexOf(child); else return ((Element)parent).getMixedContent().indexOf(child)+((Element)parent).getAttributes().size(); } else return -1; } COM: <s> returns the index of child in parent </s>
funcom_train/22520456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createButtonsForButtonBar(Composite parent) { ((GridLayout) parent.getLayout()).makeColumnsEqualWidth = false; if (isHelpAvailable()) { createButton2(parent, IDialogConstants.HELP_ID, IDialogConstants.HELP_LABEL, false); } if (needsPreviousAndNextButtons()) { createPreviousAndNextButtons(parent); } finishButton = createButton2(parent, IDialogConstants.FINISH_ID, IDialogConstants.FINISH_LABEL, true); createCancelButton(parent); } COM: <s> creates the buttons for this dialogs button bar </s>
funcom_train/10980641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveErrors(HttpSession session, ActionMessages errors) { // Remove the error attribute if none are required if ((errors == null) || errors.isEmpty()) { session.removeAttribute(Globals.ERROR_KEY); return; } // Save the errors we need session.setAttribute(Globals.ERROR_KEY, errors); } COM: <s> p save the specified error messages keys into the appropriate session </s>
funcom_train/18336723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String fallback() throws SAXException { String systemCodebase; if ((systemCodebase = primaryFallback()) == null) if((systemCodebase = secondaryFallback()) == null) throw new SAXException("There's no explicit systemcodebase specified, WSMX_HOME was not set and automatic recovery failed"); return systemCodebase; } COM: <s> attempts to get a valid systemcodebase </s>
funcom_train/18455830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setToolTips() { insertBtn.setToolTipText(stringFactory.getString( LabelStringFactory.XSLROW_TOOL_TIP_INSERT_STYLESHEET)); textField.setToolTipText(stringFactory.getString( LabelStringFactory.XSLROW_TOOL_TIP_PICK_STYLESHEET)); removeCb.setToolTipText(stringFactory.getString( LabelStringFactory.XSLROW_TOOL_TIP_REMOVE_CHECKBOX)); browseBtn.setToolTipText(stringFactory.getString( LabelStringFactory.XSLROW_TOOL_TIP_BROWSE_BTN)); action.setToolTipText(stringFactory.getString( LabelStringFactory.XSLROW_TOOL_TIP_TAKE_ACTION)); } COM: <s> sets the various tool tips on the gui components found on this row </s>
funcom_train/3100560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createRdfNode () { rdf = document.createElementNS(rdfNamespace, "rdf:RDF"); rdf.setAttribute("xmlns:rdf", rdfNamespace); rdf.setAttribute("xmlns:rdfs", rdfsNamespace); rdf.setAttribute("xmlns:daml", damlNamespace); rdf.setAttribute("xmlns", cycDamlNamespace); document.appendChild(rdf); } COM: <s> creates an rdf node </s>
funcom_train/18095531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelPreview() { if (jPanelPreview == null) { jLabelPreview = new JLabel(); jLabelPreview.setText(Msg.getString("PanelSonderzeichen.LABEL_INFO_SELECT_CHARS")); //$NON-NLS-1$ jPanelPreview = new JPanel(); HelperPanel.formatPanel(jPanelPreview); jPanelPreview.setLayout(new GridBagLayout()); jPanelPreview.add(jLabelPreview, new GridBagConstraints()); } return jPanelPreview; } COM: <s> this method initializes j panel preview </s>
funcom_train/48406439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsLabeledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_List_isLabeled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_List_isLabeled_feature", "_UI_List_type"), SpemxtcompletePackage.eINSTANCE.getList_IsLabeled(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is labeled feature </s>
funcom_train/36916033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void example2(int translatorType) { // DatabaseFacade.translatorTestingInit(translatorType); SelectStatement statement; // select * from <table1> statement = new SelectStatement(tabTable, true); // Add <table2>.<field> statement.select().column(tabTable.getColumn(DbfTableRegistryTable.DATABASE_TABLE_NAME)); // Join <table2> statement.from().join(tabTable); // Print results System.out.println(statement.getSQL()); } COM: <s> example select table1 </s>
funcom_train/44138043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAListOfComponents(Vector v) { clearSelection(); OSMElementComponent compo = null; for(int i = 0;i < v.size();i++) { compo = (OSMElementComponent)v.get(i); m_selectedComponents.add(compo); } if(compo != null) { compo.select(); this.m_Notifier.notifyComponentSelected(this, null); } } COM: <s> to select a list of components </s>
funcom_train/7677559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object obj1, Object obj2){ PackageDiff p1 = (PackageDiff)obj1; PackageDiff p2 = (PackageDiff)obj2; if (p1.pdiff < p2.pdiff) return 1; if (p1.pdiff > p2.pdiff) return -1; return p1.name_.compareTo(p2.name_); } COM: <s> compare two package diffs by their percentage difference </s>
funcom_train/37836108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showWindow() { boolean addListener = slotWindow == null; slotWindow = inspector.inspectMe(entity, entity.getContent(), slotWindow, 5, 6); /* * Register a listener for window closing so that we can * drop the reference to the closed window and let the * garbage collector claim it. */ if (addListener && (slotWindow != null)) { slotWindow.addCloseListener(new CloseListener() { public void windowClosed(InternalWindow window) { slotWindow = null; } }); } } COM: <s> show the content window </s>
funcom_train/39930063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void detectCollisionWith(ECollisionId me, ECollisionId you){ List<IComponent> mes = spatialComponents.get(me); List<IComponent> yous = spatialComponents.get(you); for(IComponent iMe : mes){ if(iMe.isActive()){ for(IComponent iYou : yous){ SpatialComponent sMe = (SpatialComponent)iMe; SpatialComponent sYou = (SpatialComponent)iYou; if(sMe.getBounds() .intersects((sYou.getBounds()))){ sMe.collidedWith(sYou); sYou.collidedWith(sMe); } } } } } COM: <s> detects the collisions between components </s>
funcom_train/27841941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getListSource() { if (isModelBased()) { try { return (listSource == null) ? null : listModelManager.get(listSource, listSourceSelector); } catch (Exception ex) { if (ex instanceof RuntimeException) { throw (RuntimeException) ex; } else { throw new RuntimeException(ex.toString()); } } } else { return listSource; } } COM: <s> gets the list source </s>
funcom_train/45231923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getTxpNonConformita() { if (txpNonConformita == null) { txpNonConformita = new JTextPane(); txpNonConformita.setText(scheda.getNonConformita()); if(modality == mode.view){ txpNonConformita.setEditable(false); } txpNonConformita.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { scheda.setNonConformita(txpNonConformita.getText()); } }); } return txpNonConformita; } COM: <s> this method initializes txp non conformita </s>
funcom_train/42903649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dataSinkUpdate(DataSinkEvent evt) { if (evt instanceof EndOfStreamEvent) { synchronized (waitFileSync) { fileDone = true; waitFileSync.notifyAll(); System.err.print("O"); } } else if (evt instanceof DataSinkErrorEvent) { synchronized (waitFileSync) { fileDone = true; fileSuccess = false; waitFileSync.notifyAll(); System.err.print("X"); } } } COM: <s> event handler for the file writer </s>
funcom_train/35006991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printKey() { System.out.println("PT................CT"); for (int i=0; i < cables.length; i++){ System.out.println((char)(i+65) + ".................." + cables[i]); } } COM: <s> prints the whole key for the plugboard for testing purposes </s>
funcom_train/16987670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawWithTexture(){ PVector c, n; UV uv; if(useSolid) app.fill(col); else app.noFill(); if(useWire){ app.stroke(scol); app.strokeWeight(sweight); } else { app.noStroke(); } app.textureMode(NORMAL); app.beginShape(TRIANGLE_FAN); app.texture(discSkin); for(int seg = 0; seg < nSegs; seg++) { c = coord[seg]; n = norm[seg]; uv = uvLoc[seg]; app.normal(n.x, n.y, n.z); app.vertex(c.x, c.y, c.z, uv.u, uv.v); } app.endShape(PApplet.CLOSE); } COM: <s> draw using texture </s>
funcom_train/9817033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBytestreamLength() { int tmpLength = (headerBits + getFrameSize()*getFrameCount() + RB_POSTAMBLE_SIZE)/BYTE_SIZE; int even = (headerBits + getFrameSize()*getFrameCount() + RB_POSTAMBLE_SIZE)%BYTE_SIZE; if(even == 0) return tmpLength; else return tmpLength+1; } COM: <s> returns the bitstream length in terms of bytes based on the </s>
funcom_train/15491814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void projectSlice(Object pixelArray, RayFunction rayFunc, int ptype) { switch(ptype) { case BYTE_TYPE: rayFunc.projectSlice((byte[])pixelArray); break; case SHORT_TYPE: rayFunc.projectSlice((short[])pixelArray); break; case FLOAT_TYPE: rayFunc.projectSlice((float[])pixelArray); break; } } COM: <s> handles mechanics of projection by selecting appropriate pixel </s>
funcom_train/8011086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayFormat(String displayFormat) { if( displayFormat != null ) { //Retrieve format string from page properties Props props = getPage().getPageProperties(); String newFormat = props.getThemeProperty(_theme,displayFormat); if( newFormat != null ) displayFormat = newFormat; } _displayFormat = displayFormat; _updateLocale = true; } COM: <s> sets the default display format for the text </s>
funcom_train/50812116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processCrawler(Ping ping, Connection excl) { Collection conns = manager.getActiveConnections(excl); for(Iterator iter = conns.iterator(); iter.hasNext(); ) { Connection c = (Connection) iter.next(); Pong cpong = new Pong(ping, c.getAddress(), 0, 0); c.queuePacket(cpong); } } COM: <s> deal with the special case crawler pings </s>
funcom_train/8407829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof Map.Entry)) { return false; } Map.Entry e = (Map.Entry) obj; return data[KEY].equals(e.getKey()) && data[VALUE].equals(e.getValue()); } COM: <s> compares the specified object with this entry for equality </s>
funcom_train/28752065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProcedurechargemultiplier(Long newVal) { if ((newVal != null && this.procedurechargemultiplier != null && (newVal.compareTo(this.procedurechargemultiplier) == 0)) || (newVal == null && this.procedurechargemultiplier == null && procedurechargemultiplier_is_initialized)) { return; } this.procedurechargemultiplier = newVal; procedurechargemultiplier_is_modified = true; procedurechargemultiplier_is_initialized = true; } COM: <s> setter method for procedurechargemultiplier </s>
funcom_train/3742732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void analyze(String text) throws Exception { BreakIterator boundary = BreakIterator.getWordInstance(); boundary.setText(text); Stemmer stemmer = null; try { stemmer = new Stemmer(language); } catch (Exception e) { log.error("Unable to instantiate a Stemmer for language " + language, e); throw e; } AnalyseResult result = performAnalysis(boundary, new StringBuffer(text), stoptable, minlen, stemmer); wordcount = result.getWordCount(); wordtable = result.getWordTable(); } COM: <s> this method analyzes a given text an fills a hitlist </s>
funcom_train/137639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void mousePressed(MouseEvent e) { List<GlyphI> hit_glyphs = nmap.getItemsByPixel(e.getX(), e.getY()); if (hit_glyphs == null || hit_glyphs.isEmpty()) { heardEvent(e); } } COM: <s> overrides to only pass event to </s>
funcom_train/23868170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(final String messagePattern, final Object... messageArguments) { CDebug.checkParameterNotEmpty(messagePattern, "messagePattern"); if (messageArguments != null && messageArguments.length > 0) { return Formatter.format(locale, messagePattern, messageArguments); } return messagePattern; } COM: <s> formats the supplied message pattern with the optionally supplied </s>
funcom_train/41598764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generatePackages() { int busyUsers = getBusyUsers(); for(int i = 0; i < userCount; i++) { Package item = generatePackage(i, busyUsers); if( item != null ) { buffer.setPackage(i, item); instance.createPackage(this); } } //return buffer.getPackagesForService(); } COM: <s> generate package for all users and return packages for service </s>
funcom_train/48936564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getUserInfoTag() { StringBuffer buf = new StringBuffer(64); buf.append("User=").append(agent.getID()).append(","); buf.append(agent.getLevel()).append(","); buf.append(agent.getUserClass()).append(","); buf.append(agent.getAgentCode()).append("\r\n"); return buf.toString(); } COM: <s> returns the value for the lt user info tag </s>
funcom_train/22371834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getSavedArguments(ICommandHandler commandHandler, boolean commands) { StringBuilder sb = new StringBuilder(); for (String arg : savedArguments) { if (commands && commandHandler.isValidCommand(arg) || !commands && !commandHandler.isValidCommand(arg)) { sb.append(arg); sb.append(" "); } } return sb.toString().trim(); } COM: <s> returns commands or arguments </s>
funcom_train/34901987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Experiment loadExperiment(final Long id){ final Experiment exp = HibernateUtil.runInTransaction_Quiet(new ITransactionCallable<Experiment>() { public Experiment run(Transaction transaction) throws InvocationTargetException, InterruptedException { Experiment exp = ExperimentDao.getInstance().findById_Deep(id); return exp; } }); return exp; } COM: <s> load the experiment from data base </s>
funcom_train/39382587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExactFileName(String fileName){ Enumeration enumFiles = this.pakFile.entries(); ZipEntry zipEnt = null; while(enumFiles.hasMoreElements()){ zipEnt = (ZipEntry)enumFiles.nextElement(); if(zipEnt.getName().equalsIgnoreCase(fileName))return zipEnt.getName(); } return null; } COM: <s> returns the file name with case sensitive format </s>
funcom_train/32878054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String init(String fileName) { String transID = "PDFSVS" + new Random().nextLong(); try { PdfReader reader = new PdfReader(fileName); helperMap.put(transID, new PDFSVSHelper(fileName, reader)); } catch (IOException e) { transID = "ERROR"; logger.fatal("Exception reading file: " + fileName, e); } return transID; } COM: <s> initializes the pdfsvs service for a particular pdf </s>
funcom_train/21844594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final InstructionContext env) throws JBasicException { if( !env.instruction.integerValid) throw new JBasicException(Status.INVOPARG, "<missing integer>"); int code = env.instruction.integerOperand; switch(code) { case 0: env.codeStream.fDynamicSymbolCreation = false; break; case 1: env.codeStream.fDynamicSymbolCreation = true; break; default: throw new JBasicException(Status.INVOPARG, code); } } COM: <s> modify the current running contexts dynamic variable creation flag </s>
funcom_train/27753528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performClose() { prefs.putBoolean(SHELL_MAXIMIZED, shell.getMaximized()); shell.setMaximized(false); Point shellSize = shell.getSize(); prefs.putInt(SHELL_WIDTH, shellSize.x); prefs.putInt(SHELL_HEIGHT, shellSize.y); prefs.putDouble(LIST_POS, ((double) sashPos.numerator) / sashPos.denominator); } COM: <s> saves the preferences when the shell closes </s>
funcom_train/25071288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateZoom(double x1, double y1, double x2, double y2) { if (x2 != x1 & y1 != y2) { return Math.min(canvas.getWidth() / (Math.abs(x2 - x1) * (1 + overfit)), canvas.getHeight() / (Math.abs(y2 - y1) * (1 + overfit))); } else { return 1; } } COM: <s> computes the zoomfactor neccessary to just fit a rectangle specified in </s>
funcom_train/18459689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String subscribe(String topic, Listener listener, Map options) { String route_id = null; String random = getMessageId(); List listeners; if (this == listener) throw new RuntimeException("Circular subscription"); // generate magic route id route_id = getRouteId(topic, random); routes.put(route_id,listener); // add to list of listeners for this topic listeners=getListeners(topic); if (listeners == null) { listeners= new ArrayList(); topics.put(topic,listeners); } listeners.add(listener); return route_id; } COM: <s> subscribe the listener to the specified topic </s>
funcom_train/14094174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List findNodeList(final TreeNode parent, final List outList) { TreeNode node; for (int idx = 0; idx < parent.getChildCount(); idx++) { node = (TreeNode) parent.getChildAt(idx); outList.add(node); findNodeList(node, outList); } return outList; } COM: <s> calls itself recursively to build a list of all </s>
funcom_train/2677197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendSeekStatus(IPlayItem item, int position) { Status seek = new Status(StatusCodes.NS_SEEK_NOTIFY); seek.setClientid(getStreamId()); seek.setDetails(item.getName()); seek.setDesciption("Seeking " + position + " (stream ID: " + getStreamId() + ")."); StatusMessage seekMsg = new StatusMessage(); seekMsg.setBody(seek); doPushMessage(seekMsg); } COM: <s> send seek status notification </s>
funcom_train/47104224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeWeapons(){ weapons = new Weapon[Weapon.values().length]; weaponLevels = new int[Weapon.values().length]; for(int i = 0; i < Weapon.values().length; i++){ weapons[i] = Weapon.values()[i]; weaponLevels[i] = 0; } //Debug /*for(int i = 0; i < Constants.MAX_NUMBER_WEAPONS; i++){ weaponLevels[i] = 1; }*/ weaponLevels[0] = 1; setReadiedWeapon(Weapon.W_00); } COM: <s> creates an array with all possible weapon choices and gives the player the </s>
funcom_train/21686996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getRepeatCommand() { if (repeatCommand == null) {//GEN-END:|119-getter|0|119-preInit // write pre-init user code here repeatCommand = new Command("Repeat interval", Command.OK, 0);//GEN-LINE:|119-getter|1|119-postInit // write post-init user code here }//GEN-BEGIN:|119-getter|2| return repeatCommand; } COM: <s> returns an initiliazed instance of repeat command component </s>
funcom_train/31793598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initBeanLibraries(){ String path = getConfigurationPath(); String[] beansLibrariesFilesAbsolutePath = new String[beansLibrariesFiles.length]; for(int i=0; i < beansLibrariesFiles.length; i++) beansLibrariesFilesAbsolutePath[i] = path + File.separator + beansLibrariesFiles[i]; if(beansLibrariesFiles.length > 0) beanslibraries = new FileSystemXmlApplicationContext(beansLibrariesFilesAbsolutePath); } COM: <s> read additional configurations </s>
funcom_train/46729017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long placeOrderFromTemplate(final long patientId, final long visitId, final long templateOrderId) throws Exception { IServiceMethod method = new DefaultServiceMethod() { public Object execute() throws Exception { return getBean().placeOrderFromTemplate(patientId, visitId, templateOrderId, getServiceCall()); }}; return (Long) call(method); } COM: <s> create a new order for the specified patient </s>
funcom_train/39138759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubmitJobWithInvalidApplication() { long xMaxWait = System.getProperty("acceptable.wait") == null ? 1000 * 120 : Long.parseLong(System.getProperty("acceptable.wait")); assertUnsuccessfulSubmission( getJSDLString(System.getProperty("basedir") + "/data/examples/invalid-application.jsdl"), xMaxWait); } COM: <s> test case a valid job description with unknown executable should result </s>
funcom_train/20269816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: HotSwapCompilerPass getHotSwapPass(AbstractCompiler compiler) { // TODO(bashir): If in future most of PassFactory's in DefaultPassConfig // turns out to be DefaultPassConfig.HotSwapPassFactory, we should probably // change the implementaion here by the one in HotSwapPassFactory. return null; } COM: <s> any factory whose compiler pass has a corresponding hot swap version should </s>
funcom_train/38806722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debug(GanttPoint leftTopPoint, GanttRectangle clientRect, String message) { logger.debug(getCategory() + " [x=" + leftTopPoint.x + ",y=" + leftTopPoint.y + "]" + " [w=" + clientRect.width + ",h=" + clientRect.height + "] " + message); } COM: <s> debug log with position and rectangle size on the canvas </s>
funcom_train/8638574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEncryption(Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException { if (stamper.isAppend()) throw new DocumentException("Append mode does not support changing the encryption status."); if (stamper.isContentWritten()) throw new DocumentException("Content was already written to the output."); stamper.setEncryption(certs, permissions, encryptionType); } COM: <s> sets the certificate encryption options for this document </s>
funcom_train/28296228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDataNonExistentData() throws Exception { Entry entry = dvm.new Entry(Package.class, Sphere.class, Package.NAME, Sphere.NAME); dvm.set(entry); DataConversion<Integer, Color3f> conversion = createConversion(); dvm.setProperty(entry.getDataClass(), Package.CLASSES_ATTR, Sphere.COLOR_ATTRIBUTE, conversion); try { dvm.getDataProperty(IsClassOf.class, Sphere.COLOR_ATTRIBUTE); } catch (IllegalArgumentException e) { assertTrue(true); } } COM: <s> test get data non existent data </s>
funcom_train/3904297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCoolBarPanel(CoolBarPanel coolBarPanel) { if(coolBarPanel == null) { return; } if(_group == null) { _group = new Vector(); } if(!_group.contains(coolBarPanel)) { _group.add(coolBarPanel); coolBarPanel.addComponentSelectionListener(this); } } COM: <s> add a cool bar panel to the grouping </s>
funcom_train/12641780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object key) { Object k = maskNull(key); int hash = hash(k); int i = indexFor(hash, table.length); Entry e = table[i]; while (true) { if (e == null) return e; if (e.hash == hash && eq(k, e.key)) return e.value; e = e.next; } } COM: <s> returns the value to which the specified key is mapped in this identity </s>
funcom_train/17210528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadNetworkJar(String file, boolean tab) { String jarRead; try { jarRead = fileIO.jarRead(file); boolean success = ns.edgeListParse(jarRead, file, tab); if (success) { String jarNodes = fileIO.jarRead(file+".n"); ns.nodeListParse(jarNodes, tab); } return success; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return false; } COM: <s> load a new network from jar </s>
funcom_train/26601773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean compareTwoString(String string1,String string2){ if ( string1.length() != string2.length() ) return false; char []source = string1.toCharArray(); char []target = string2.toCharArray(); for(int j = 0; j < source.length; ++j) if ( source[j] != target[j] ) return false; return true; } COM: <s> method compares two string passed </s>
funcom_train/46104881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteNode(Network target2, int start, int end, int col) { if (inhibitNotify != 0) { return; } try { for (int i = start; i <= end; i++) { Node currentNode = findNode(i, target); target.removeNode(currentNode); } } catch (Exception e) { new ObviousRuntimeException(e); } } COM: <s> node s have been deleted </s>
funcom_train/28366010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String urlSpecForFilePath(String filePath) throws FilePathException { String urlSpec = null; try { File mainFile = new File(filePath); URL url = mainFile.toURL(); urlSpec = url.toString(); } catch(Exception excpt) { throw new FilePathException(filePath); } return urlSpec; } COM: <s> convert a file path to a url specification </s>
funcom_train/24920352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MIKEYMessage initiatorCreate(KeyAgreementType type, String peerUri) { if(log.isTraceEnabled()) log.trace("type=" + type + ", peerUri=" + peerUri); setState(State.STATE_INITIATOR); try { // create the key agreement createKeyAgreement(type); if(ka == null) throw new MIKEYException("Can't create key agreement"); ka.setPeerUri(peerUri); return ka.createMessage(); } catch(MIKEYException me) { log.error("MIKEYException caught", me); setState(State.STATE_ERROR); } return null; } COM: <s> creates the initiator message which will be send to the responder </s>
funcom_train/37820166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFontSize(int size) { try { this.font = EbnfFont.getFont().deriveFont(Font.PLAIN, size); } catch (FontNotInitializedException e) { // TODO Auto-generated catch block e.printStackTrace(); } fm = PANEL.getFontMetrics(font); radius = (int) Math.round(0.6 * fm.getHeight()); space = radius; } COM: <s> sets the size of the actual font </s>
funcom_train/50482229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateHostsList() { //Refresh list of Hosts, called after a host is added / deleted int i; hostRefList.removeAllElements(); for (i = 0; i < hostsList.size(); i++) { hostRefList.add(i, hostsList.parseHost(i) + " - " + hostsList.parseIp(i)); } getKnownHostsList().updateUI(); setNoSelectedHost(); } COM: <s> refreshes host list from configuration class </s>
funcom_train/7427213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChildren(final Collection nodes, final Object constraints, final Anchor anchor) { final Iterator i = nodes.iterator(); while (i.hasNext()) { final PNode each = (PNode) i.next(); addChild(each, constraints, anchor); } } COM: <s> adds a collection of nodes to the end of the list </s>
funcom_train/22077811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test01Modify() throws MapperException { ctxmock.expects(once()).method("modifyAttributes").with(same(cn), modopCheck01()); /* input */ Personne input = new Personne(); input.setName("Naquin"); input.setSurname("Thierry"); /* operations */ this.mods = new ModificationsVariables(output); mods.modifyAttribute("name", new VariableString("${self.name}")); mods.modifyAttribute("surname", new VariableString("${self.surname}")); sm.setOperations(mods); sm.modify(input, env); } COM: <s> test basic modify operatoin on two attributes first name and last name </s>
funcom_train/13491835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addQuery(Query q) { synchronized (queries) { String name = q.getName(); if (name==null) throw new IllegalArgumentException("Queries must have a name"); for (Iterator iter = queries.iterator();iter.hasNext();) { Query nextQuery = (Query)iter.next(); if (name.equals(nextQuery.getName())) { iter.remove(); break; } } queries.add(q); } } COM: <s> add a query </s>
funcom_train/3304894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillData (Map formdata) throws com.sun.star.uno.Exception { logger.debug ("filling SXW-Form with data"); logMsg = null; Object formComponent = docHelper.getFormComponentTreeRoot(); fill(formComponent, formdata, false); logger.debug(logMsg.toString()); logger.debug ("form.data with "+formdata.size()+" entries was processed"); } COM: <s> parses the given form and puts all data into the form </s>
funcom_train/10912269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEmpty() { int areaCount = 0; for (int i = 0; i < getColumnCount(); i++) { NormalFlow flow = getNormalFlow(i); if (flow != null) { if (flow.getChildAreas() != null) { areaCount += flow.getChildAreas().size(); } } } return (areaCount == 0); } COM: <s> indicates whether any child areas have been added to this span area </s>
funcom_train/1785787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseFile(String filepath) { file = filepath; try { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser; saxParser = factory.newSAXParser(); saxParser.parse(new File(filepath).getAbsolutePath(), this); } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> parse the xml file </s>
funcom_train/6330964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TestResult doRun() throws Exception { TestResult result = new TestResult(); Test test = getTest(testClass); result.addListener(this); try { setUpDatabase(); test.run(result); } finally { if (fDatabase != null) fDatabase.close(); } return result; } COM: <s> run the test suite </s>
funcom_train/4193503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invite(Message invite) { printLog("inside invite(invite)",LogLevel.MEDIUM); if (!statusIs(D_INIT)) return; // else changeStatus(D_INVITING); invite_req=invite; update(Dialog.UAC,invite_req); InviteTransactionClient invite_tc=new InviteTransactionClient(sip_provider,invite_req,this); invite_tc.request(); } COM: <s> starts a new invite transaction client </s>
funcom_train/37916859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHits(int resultId) throws EXistException { QueryResult qr = factory.resultSets.get(resultId); if (qr == null) throw new EXistException("result set unknown or timed out"); qr.timestamp = System.currentTimeMillis(); if (qr.result == null) return 0; return qr.result.getItemCount(); } COM: <s> the method code get hits code </s>
funcom_train/39870672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean diff(WorkSource other) { int N = mNum; if (N != other.mNum) { return true; } final int[] uids1 = mUids; final int[] uids2 = other.mUids; for (int i=0; i<N; i++) { if (uids1[i] != uids2[i]) { return true; } } return false; } COM: <s> compare this work source with another </s>
funcom_train/2558555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getType(Method method) throws Exception { MethodType type = getMethodType(method); if(type == MethodType.SET) { return getParameterType(method); } if(type == MethodType.GET) { return getReturnType(method); } if(type == MethodType.IS) { return getReturnType(method); } return null; } COM: <s> this is used to extract the type from a method </s>
funcom_train/39949258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLatitude(double latitude){ if(Double.isNaN(latitude)) { throw new IllegalArgumentException("Latitude " + latitude + " is not legal"); } if(latitude >= -90D && latitude <= 90D) { this._latitude=latitude; } else { throw new IllegalArgumentException("Latitude out of range"); } } COM: <s> sets the geodetic latitude for this point </s>
funcom_train/1212884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(String var) throws CajuScriptException { set(CajuScript.CAJU_VARS.concat("_").concat(var).concat("_key"), null); eachIndexs.put(var, null); eachValues.put(var, null); eachIterators.put(var, null); eachEnumerations.put(var, null); } COM: <s> clean an variable used in for each </s>
funcom_train/3915256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRelativePath2() { File rootFolder = new File("/RootFolder"); File file = new File("/RootFolder/Dir/FileHere.txt"); String path = FileUtils.getRelativePath(rootFolder, file); assertTrue("Relative Path is wrong: " + path, path.equals("Dir/FileHere.txt")); } COM: <s> path should be subset of parent path and preserve case </s>
funcom_train/22365151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { String text = super.getText(); if((text == null) || (text.indexOf('\r') == -1)) { return text; } StringBuffer sb = new StringBuffer(text.length()); char chars[] = text.toCharArray(); for(int i = 0; i < chars.length; i++) { if(chars[i] != '\r') { sb.append(chars[i]); } } return sb.toString(); } COM: <s> gives back the text in the text pane </s>
funcom_train/21188234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getModifications(Date lastBuild, Date now) { List mods = new ArrayList(); try { validate(); mods = getModificationsFromAlienBrain(lastBuild, now); } catch (Exception e) { LOG.error("Log command failed to execute succesfully", e); } if (!mods.isEmpty()) { properties.modificationFound(); } return mods; } COM: <s> get a list of modifications detailing all the changes between now and </s>
funcom_train/24002519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(String x,final AsyncCallback<Boolean> callback) { synchronized (lock) { print(x,new AsyncCallback<Boolean>() { public void onSuccess(Boolean b) { println(callback); } public void onFailure(Throwable t) { callback.onFailure(t); } }); } } COM: <s> prints a string and then terminates the line </s>
funcom_train/34019522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setBounds(new java.awt.Rectangle(631, 22, 104, 29)); jButton.setText("Processar"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { processar(); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/17893468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCopyProtectionParamPassword() throws Exception { KeyStore.PasswordProtection pparam1 = new KeyStore.PasswordProtection("password".toCharArray()); KeyStore.PasswordProtection pparam2 = (KeyStore.PasswordProtection) KeyStoreUtilities.copyProtectionParam(pparam1); assertTrue(pparam1 != pparam2); char[] p1 = pparam1.getPassword(); char[] p2 = pparam2.getPassword(); assertTrue(p1 != p2); String sp1 = new String(p1); String sp2 = new String(p2); assertTrue(sp1.equals(sp2)); } COM: <s> test copying a password protection parameter </s>
funcom_train/41117301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getJPanel1(), java.awt.BorderLayout.EAST); jContentPane.add(getJScrollPane(), java.awt.BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/42046942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InvoiceLineDO find(int invoiceNr, int sequence, Lock lockType) throws RimuDBException { KeyList keylist = new KeyList(); keylist.add(InvoiceLineDO.F_INVOICE_NR, new Integer(invoiceNr)); keylist.add(InvoiceLineDO.F_SEQUENCE, new Integer(sequence)); return (InvoiceLineDO) find(keylist, lockType); } COM: <s> return a invoice line do for the given primary key value s </s>
funcom_train/21607146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke() throws InvocationTargetException, IllegalAccessException { // In the static case, target will simply be <code>null</code>. Object targetObject = getTargetObject(); Method preparedMethod = getPreparedMethod(); if (targetObject == null && !Modifier.isStatic(preparedMethod.getModifiers())) { throw new IllegalArgumentException("Target method must not be non-static without a target"); } ReflectionUtils.makeAccessible(preparedMethod); return preparedMethod.invoke(targetObject, getArguments()); } COM: <s> invoke the specified method </s>
funcom_train/1711309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public int getMediaBoxHeight(int pageNumber) { //check values correctly set setSizeForPage(pageNumber); if((debug)&&(mediaBoxHeights.elementAt(pageNumber)!=mediaBoxH)){ System.out.println("Wrong height "+mediaBoxHeights.elementAt(pageNumber)+" "+mediaBoxH); System.exit(1); } return mediaBoxH; } COM: <s> return height of media box </s>
funcom_train/42116906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int calcFactor(SymmetricMatrix cov) { EigenvalueDecomposition evd = new EigenvalueDecomposition(cov, true); evd.setErrorsControl(errors); DiagonalMatrix d = evd.getD(); sortEigen(null, d, d.getRowsCount()); float tmp = sum_var; sum_var = d.trace(); calcContribution(d); sum_var = tmp; for (int i = 0; i < cumulative.getColumnsCount(); ++i) { if (cumulative.get(i) >= minCumulative - errors) return i + 1; } return cumulative.getColumnsCount(); } COM: <s> compute the factor from minimum cumulative contribution </s>
funcom_train/18575654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void convertParameters (String sig, SBWParameters params) throws EInvalidSBWType { String args[] = extractArguments(sig); Parameter p; if (args != null) for (int i = 0; i < args.length; i++) { // convert each parameter string to Parameter object p = (Parameter) convertParameter(args[i]); // disregard if VOID if (!p.getType().equals(ParameterType.VOID)) params.add(p); } } COM: <s> convert all the parameters of a method signature to gum parameter equivalents and </s>
funcom_train/16911850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PText createOutputLabel() { PText ret = new PText(); ret.setFont(IN_OUT_FONT); // ret.setPaint(getNetworkPanel().getLineColor()); ret.translate(this.getX(), this.getY() - DIAMETER / 2 - ARROW_LINE - 5); return ret; } COM: <s> create the output label </s>
funcom_train/45186731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convertArchive() { ChooseNewArchiveTypeWindow dlg = new ChooseNewArchiveTypeWindow((JFrame)getTopLevelAncestor()); dlg.pack(); DialogTools.setDialogAtCenter(dlg); dlg.show(); String type = dlg.getSelectedType(); if (type != null) { archive = archive.convert(type); } } COM: <s> converts archive to another type </s>
funcom_train/37246340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTempo(String title, float tempo) { Object o = null; try { o = getObjectByTitle(title); } catch (Exception e) { handleException(e); } if (o instanceof Score) { Score s = (Score) o; s.setTempo((double) tempo); } else if (o instanceof Part) { Part p = (Part) o; p.setTempo((double) tempo); } else if (o instanceof Phrase) { Phrase ph = (Phrase) o; ph.setTempo((double) tempo); } } COM: <s> set the tempo for a score part or phrase </s>
funcom_train/24567895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteAllTracks() { Cursor cursor = getContentResolver().query(TrackContentProvider.CONTENT_URI_TRACK, null, null, null, Schema.COL_START_DATE + " asc"); // Stop any currently active tracks if (currentTrackId != -1) { stopActiveTrack(); } if (cursor.moveToFirst()) { int id_col = cursor.getColumnIndex("_id"); do { deleteTrack(cursor.getLong(id_col)); } while (cursor.moveToNext()); } } COM: <s> deletes all tracks and their data </s>
funcom_train/29850348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getValueCount(int valueIndex) { if (valueIndex < valuesCount.size()) { return (((Integer) valuesCount.elementAt(valueIndex)).doubleValue()); // Aus.a("valueCount",((Integer) valuesCount.elementAt(valueIndex)).doubleValue()); } else { // Aus.a("keine Anzahl an Werten vorhanden"); return 0; } } COM: <s> insert the methods description here </s>
funcom_train/13915442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node setChildNodes(Node pParentNode) { Element e = pParentNode.getOwnerDocument().createElement("EMPTY"); // XMLHelper.outputXML(this.) Object action = this.getAction(false); if (action != null) { e.appendChild(pParentNode.getOwnerDocument().createTextNode(this.getAction(false).toString())); } pParentNode.appendChild(e); return e; } COM: <s> sets the child nodes </s>
funcom_train/44822923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CtxPropDomainDef getDomainDefByName (String domainName) { for (int i=0; domainDefs != null && i < domainDefs.length; i++) { if (domainDefs[i].getName().equals(domainName)) return domainDefs[i]; } return null; } COM: <s> get the ctx prop domain def object for a given domain name </s>
funcom_train/31079608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParams(Class[] types) { if (types == null) setParams((String[]) null); else { String[] names = new String[types.length]; for (int i = 0; i < types.length; i++) names[i] = types[i].getName(); setParams(names); } } COM: <s> set the parameter type of this method </s>
funcom_train/28762290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCssnamefont(String newVal) { if ((newVal != null && this.cssnamefont != null && (newVal.compareTo(this.cssnamefont) == 0)) || (newVal == null && this.cssnamefont == null && cssnamefont_is_initialized)) { return; } this.cssnamefont = newVal; cssnamefont_is_modified = true; cssnamefont_is_initialized = true; } COM: <s> setter method for cssnamefont </s>
funcom_train/3374145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToolTipText(MouseEvent event) { String retValue = super.getToolTipText(event); if (retValue == null) { TextUI ui = getUI(); if (ui != null) { retValue = ui.getToolTipText(this, new Point(event.getX(), event.getY())); } } return retValue; } COM: <s> returns the string to be used as the tooltip for code event code </s>
funcom_train/10345680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPublicKey(PublicKey key) throws InvalidKeyException { if (key == null) throw new NullPointerException("Key is null!"); DERDecoder dec; clear(); algorithm_ = new AlgorithmIdentifier(); add(algorithm_); encodedKey_ = new ASN1BitString(); add(encodedKey_); try { dec = new DERDecoder(new ByteArrayInputStream(key.getEncoded())); decode(dec); dec.close(); } catch (IOException e) { throw new InvalidKeyException("Caught IOException!"); } catch (ASN1Exception e) { throw new InvalidKeyException("Bad encoding!"); } } COM: <s> initializes this instance with the given public key </s>
funcom_train/28346875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeAnalysisCntrlPanel() { if(showAnalysis_Button.isSelected()) { analysisCntrlPanel.removeAll(); analysisCntrlPanel.add(showAnalysis_Button); analysisCntrlPanel.add(makeAnalysis_Button); analysisPanel.removeAll(); analysisPanel.add(analysisCntrlPanel, BorderLayout.NORTH); analysisPanel.add(analysisTxtPanel, BorderLayout.CENTER); } else { analysisCntrlPanel.removeAll(); analysisCntrlPanel.add(showAnalysis_Button); analysisPanel.removeAll(); analysisPanel.add(analysisCntrlPanel, BorderLayout.NORTH); } aWFPanel.validate(); aWFPanel.repaint(); } COM: <s> forms the analysis panel </s>
funcom_train/14233374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGraphics(String fullOrPartial){ if (fullOrPartial.equals("Full")){ SwingUtilities.invokeLater(new Runnable() { public void run() { mainWindow.dispose(); initialize(); setGUI(); addActionListeners(); loadOnlineListsStatus(); loadLocalPanel(); SwingUtilities.updateComponentTreeUI(mainWindow); mainWindow.setVisible(true); } }); }else{ if (fullOrPartial.equals("Partial")){ SwingUtilities.invokeLater(new Runnable() { public void run() { SwingUtilities.updateComponentTreeUI(mainWindow); contentPane.updateUI(); logPanel.updateUI(); } }); } } } COM: <s> updates the graphics in the guimain </s>