__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5551378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void verifyCumulativeProbabilities() throws Exception { for (int i = 0; i < cumulativeTestPoints.length; i++) { assertEquals("Incorrect cumulative probability value returned for " + cumulativeTestPoints[i], cumulativeTestValues[i], distribution.cumulativeProbability(cumulativeTestPoints[i]), tolerance); } } COM: <s> verifies that cumulative probability density calculations match exptected values </s>
funcom_train/47548107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLineCap() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); GdkGCValues values = new GdkGCValues(); OS.gdk_gc_get_values(handle, values); int cap = SWT.CAP_FLAT; switch (values.cap_style) { case OS.GDK_CAP_ROUND: cap = SWT.CAP_ROUND; break; case OS.GDK_CAP_BUTT: cap = SWT.CAP_FLAT; break; case OS.GDK_CAP_PROJECTING: cap = SWT.CAP_SQUARE; break; } return cap; } COM: <s> returns the receivers line cap style which will be one </s>
funcom_train/5668774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getInputStream(String aFullname) throws IOException { for (int i = 0; i < fEntries.size(); i++) { ZipEntry searchEntry = (ZipEntry) fEntries.get(i); String searchName = searchEntry.getName(); if (aFullname.equals(searchName)) { return fZipFile.getInputStream(searchEntry); } } return null; } COM: <s> return input stream of the archive item by given filename </s>
funcom_train/14157983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void positionCurrentPlayerAfter(String previousPlayerName) { String nextPlayer = getNextNonFoldedPlayerName(previousPlayerName); while(info.getPlayerInfo(nextPlayer).isAllIn() && nextPlayer!=previousPlayerName) { logger.info(nextPlayer + " is allin, switching to next player."); nextPlayer = getNextNonFoldedPlayerName(nextPlayer); } info.setCurrentPlayerName(nextPlayer); logger.info("Current player is " + nextPlayer); } COM: <s> position current player after passed player name </s>
funcom_train/31435543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void offModule() { AutoHomeAdminSession.getInstance().printMessage("Sending off command to " + module.getDescription()); try { AutoHomeAdminSession.getInstance().sendCommandToX10Module(module, 0); } catch(HomeException err){ AutoHomeAdminSession.getInstance().printMessage("Failed Transmission because" + err); } } COM: <s> this takes the selected module and turns that device off </s>
funcom_train/47184573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String updateAllergies(long pid, String description) throws FormValidationException, DBException { AllergyBean bean = new AllergyBean(); bean.setDescription(description); //AllergyBeanValidator abv = new AllergyBeanValidator(); //abv.validate(bean); Removed for new option medication selector allergyDAO.addAllergy(pid, description); emailutil.sendEmail(makeEmail()); return "Allergy Added"; } COM: <s> adds an allergy to the patients records </s>
funcom_train/22285284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace(Widget newWidget) { PlayerPanel player = this.player; if (player != null) { PopupWidget pw = (PopupWidget)newWidget; for (int i = player.nwidgets ; i-- > 0 ;) { if (player.widgets[i] == this) { player.widgets[i] = pw; } } pw.player = player; } super.replace(newWidget); } COM: <s> replace the widget with a newer version </s>
funcom_train/26530559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTooltip(EVTask task) { Object[] values = new Object[columns.length]; for (int i = 0; i < columns.length; ++i) { Object v = EVTaskList.this.getValueAt(task, columns[i]); if (html && v instanceof String) v = HTMLUtils.escapeEntities((String) v); values[i] = v; } return MessageFormat.format(format, values); } COM: <s> generates and returns a formatted tooltip for a specific task </s>
funcom_train/20385513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object convertValue(Map context, Object o, Class toClass) { if (o instanceof String[]) { return convertFromString(((String[]) o)[0], toClass); } else if (o instanceof String) { return convertFromString((String) o, toClass); } return super.convertValue(context, o, toClass); } COM: <s> converts the given object to a given type </s>
funcom_train/17680227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendInsertColumnList(CharBuf s) { int nc = cols.length; s.append(cols[0].name); for (int i = 1; i < nc; i++) { s.append(", "); s.append(cols[i].name); } } COM: <s> append part of an insert column name list for all our columns </s>
funcom_train/21802744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IConnector createConnector(IProject source, IProject target) { INode src = createProject(source); INode dst = createProject(target); IConnector connector = new ConnectorModel(src, dst); int idx = this.connectors.indexOf(connector); if (idx >= 0) { return this.connectors.get(idx); } addConnector(connector); ((ProjectModel) src).addOutgoingConnection(connector); ((ProjectModel) dst).addIncamingConnection(connector); return connector; } COM: <s> create a connection between two projects </s>
funcom_train/32308143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { ArrayPointer ptr; if (this==obj) return true; if (null==obj) return false; try { ptr = (ArrayPointer)obj; } catch (ClassCastException e) { return false; } return (getBase()==ptr.getBase()) && (getOffset()==ptr.getOffset()); } COM: <s> returns true if code obj code is an code array pointer code </s>
funcom_train/48668080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getMegaBytes(float f, char unit) { if(unit == 'k' || unit == 'K') { return f / 1024; } if(unit == 'g' || unit == 'G') { return f * 1024; } if(unit == ' ' || unit == 'b' || unit == 'B') { return f / 1048576; } return f; } COM: <s> applies the unit char to the given value </s>
funcom_train/19810543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String semanticCheckAll(Collaborations collaborations) { String errorMessage = ""; List<Collaboration> collaborationList = collaborations.getCollaboration(); for (Collaboration collaboration : collaborationList) { if (!this.referenceCheck(collaboration)) { errorMessage += "There are invalid reference within " + collaboration.getName() + ".\n"; } errorMessage += semanticCheck(collaboration); } return errorMessage; } COM: <s> check all collaborations in the collaborations </s>
funcom_train/21963907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOddity() { String html = " and here are > some more > things to < test> when you want"; SgmlLexer lex = new SgmlLexer(new StringCharacterStream(html)); String test = ""; int count = 0; while (lex.hasNext()) { test += lex.next(); count++; } assertEquals(html,test); assertEquals(3,count); } COM: <s> tests for odd arrangements such as double close </s>
funcom_train/3424546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdAttribute(int attrIndex) { int chunk = attrIndex >> CHUNK_SHIFT; int index = attrIndex & CHUNK_MASK; int extra = getChunkIndex(fNodeExtra, chunk, index); extra = extra | ID; setChunkIndex(fNodeExtra, extra, chunk, index); } COM: <s> sets type of attribute </s>
funcom_train/4250007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Double calculateLoss(Double frequency, Double tssDB, Double calculateSeparation) { // Calculate the speed of Light in dB Double speedOfLightDB = 32.44; // Calculate the frequency (Mhz) in dB Double frequencyDB = 20 * Math.log10(frequency); // Calculate distance (km) in dB Double distanceDB = 20 * Math.log10(calculateSeparation/1000); // Calculate the distance in meters return tssDB - distanceDB - frequencyDB - speedOfLightDB; } COM: <s> calculates the loss of separation between the receiver and transmitter </s>
funcom_train/36108603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected URL getExternalResource(String path) throws IOException{ try{ if(!path.contains("://")) { if(new File(path).isAbsolute()) path = "file:///"+path; else path = "file:///"+Const.userDir+Const.fileSep+path; } return new URL(path.replace('\\', '/')); }catch(MalformedURLException e){ throw new IOException(path+" is not found"); } } COM: <s> creates non system and non classloader based resource url </s>
funcom_train/13687935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawIcon() { if ( visible && VIEW_BOUNDS.intersects( getBounds() )) { if (masking) { getIcon().mask(raster, (int) x, (int) y, mask); masking = false; } else getIcon().draw(raster, (int) x, (int) y); // debug(); } } COM: <s> draw the sprite icon or mask the icon with specified color </s>
funcom_train/10951619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getKeyClass(Class parentClass, String property) { Key annotation = getAnnotation(parentClass, property, Key.class); if (annotation != null) { return annotation.value(); } Class clazz = getClass(parentClass, property, false); if (clazz != null) { return clazz; } return (Class) xworkConverter.getConverter(parentClass, KEY_PREFIX + property); } COM: <s> determines the key class by looking for the value of </s>
funcom_train/4393041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addChild(StreamItem childSI, ActivityNode childNode) { StreamItemChildReferences cSIRef; if (childSI != null) { if ((cSIRef = childrenReferencesMap.get(childNode)) != null) { cSIRef.addChildReference(childSI); } else { childrenReferencesMap.put(childNode, new StreamItemChildReferences(childSI)); } return true; } else { return false; } } COM: <s> adds the specified child stream element to the child references </s>
funcom_train/18341177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToBuddyList(Buddy buddy) throws IllegalArgumentException, IllegalStateException { if (!connected) { throw new IllegalStateException("not connected yet!"); } cmdHandler.addToBuddyList(buddy); //todo need to be sure it worked! listener.buddyAdded(buddy); } COM: <s> adds a buddy to the buddy list </s>
funcom_train/35307470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int value) { BoundedRangeModel m = getModel(); int oldValue = m.getValue(); m.setValue(value); if (accessibleContext != null) { accessibleContext.firePropertyChange( AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, Integer.valueOf(oldValue), Integer.valueOf(m.getValue())); } } COM: <s> sets the scrollbars value </s>
funcom_train/16830698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean relaxPriority(E key, double priority) { Entry<E> entry = getEntry(key); if (entry == null) { entry = makeEntry(key); } if (compare(priority, entry.priority) <= 0) { return false; } entry.priority = priority; heapifyUp(entry); return true; } COM: <s> promotes a key in the queue adding it if it wasnt there already </s>
funcom_train/5154330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringCache() { double perc = 0; if( cacheHit > 0 ) perc = ((int) (10000 * (((double) cacheMiss) / ((double) cacheHit)))) / 100; return "Cache size: " + cachePdf.size() + "\tMiss/Hit: " + cacheMiss + " / " + cacheHit + " ( " + perc + "% )"; } COM: <s> some cache statistics </s>
funcom_train/34282682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void propertyChange(PropertyChangeEvent e) { String name = e.getPropertyName(); // If they change the syntax scheme, we must do this so that // WrappedSyntaxView(_TEST) updates its child views properly. if (name.equals(RSyntaxTextArea.SYNTAX_SCHEME_PROPERTY)) { modelChanged(); } // Everything else is general to all RTextAreas. else { super.propertyChange(e); } } COM: <s> gets called whenever a bound property is changed on this uis </s>
funcom_train/33162125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAclCombo() { GridData gridData = new GridData(); gridData.grabExcessHorizontalSpace = true; gridData.verticalAlignment = GridData.CENTER; gridData.horizontalAlignment = GridData.FILL; aclCombo = new Combo(this, SWT.NONE); aclCombo.setLayoutData(gridData); aclCombo.setData("A string", new Integer(1) ) ; } COM: <s> this method initializes acl combo </s>
funcom_train/50910996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Int2Range plus(Int2Range r2) { if (!isValid()) { if (r2 == null || !r2.isValid()) { return new Int2Range(); } else { return new Int2Range(r2); } } if (r2 == null || !r2.isValid()) { return new Int2Range(this); } return new Int2Range(xrange.plus(r2.xrange), yrange.plus(r2.yrange)); } COM: <s> merge two ranges and take the maximum extents </s>
funcom_train/43888330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object o) { Iterator e = iterator(); try { if (o==null) { while (e.hasNext()) { if (e.next()==null) { e.remove(); return true; } } } else { while (e.hasNext()) { if (o.equals(e.next())) { e.remove(); return true; } } } return false; } finally { close( e ); } } COM: <s> removes a single instance of the specified element from this </s>
funcom_train/11691398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int hash(byte[] term1, byte[] term2, int probe, int numFeatures) { long r = MurmurHash.hash64A(term1, probe); r = MurmurHash.hash64A(term2, (int) r) % numFeatures; if (r < 0) { r += numFeatures; } return (int) r; } COM: <s> hash two byte arrays and an integer into the range 0 </s>
funcom_train/29722784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Packet createReportPacket(Player p) { // When the final report is created, MM sends a null player to create the // report. This will handle that issue. if (p == null || !doBlind()) return new Packet(Packet.COMMAND_SENDING_REPORTS, filterReportVector(vPhaseReport, p)); return new Packet(Packet.COMMAND_SENDING_REPORTS, p.getTurnReport()); } COM: <s> creates a packet containing a vector of reports </s>
funcom_train/43214378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireFailedDirectory(File file, Collection<PropagationExceptionWrapper> exceptions) { fireFailure(new AddFileToolEvent(AddFileToolEvent.ACTION_FAILED, AddFileToolEvent.TYPE_DIRECTORY, file, null, null, null, null), exceptions); } COM: <s> p notifies listeners that a directory upload has failed </s>
funcom_train/38866138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findNodeContent(Document parsedDocument) { NodeList nl = parsedDocument.getChildNodes(); Node result = nl.item(0); NodeList nl2 = result.getChildNodes(); Node item = nl2.item(3); NodeList nl3 = item.getChildNodes(); Node item2 = nl3.item(1); NodeList nl4 = item2.getChildNodes(); Node item3 = nl4.item(5); NodeList nl5 = item3.getChildNodes(); Node item4 = nl5.item(1); return item4.getTextContent(); } COM: <s> given a document object parse only the needed piece </s>
funcom_train/3678626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void eraseAllPressed() { ModelFacade modelFacade = ModelFacade.getInstance(); modelFacade.eraseAllPaintingsFromCurrentSlide(); String message = modelFacade.generateXML( ModelFacade.SLIDE ); applicationContext.validation( message ); ViewFacade viewFacade = ViewFacade.getInstance(); viewFacade.repaint(); } COM: <s> erase all the paintings from the model </s>
funcom_train/32057801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActionPerformed() { System.out.println("testActionPerformed"); GPGraphpad graphpad = new GPGraphpad(); FileRecent4 file4 = new FileRecent4(graphpad); ActionEvent action = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command"); file4.actionPerformed(action); } COM: <s> tests action performed method of class file recent4 </s>
funcom_train/3672039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isNodeConfigured() { Collection lAllInputLinks = inputLinks.values(); Iterator lIter = lAllInputLinks.iterator(); while(lIter.hasNext()){ InputLink lLink = (InputLink) lIter.next(); if(lLink == InputLink.UNDEFINED_INPUT){ return false; } } return true; } COM: <s> tests if this node is fully configured </s>
funcom_train/37230004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMsgStructure( String sMsgStructure ) { HL7Element e = new SimpleElement( iLevel + 1, parent ); e.setType( "ST" ); e.setName( "MSG.3" ); e.setValue( sMsgStructure ); try { setComponent( e, 3 ); } catch( MalformedFieldException mfe ) { mfe.printStackTrace(); } } COM: <s> set the structure code of the message </s>
funcom_train/45789094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToken(IToken<?> t) { if (threshold > 0 && this.tokens.size() == threshold) { // TODO: Throw a Threshold exceeded exception // A place can only have a certain number of tokens. } this.tokens.add(t); EventManager.getInstance().dispatchEvent(new PlaceEvent<Place<?>>(this, TOKEN_ADDED)); } COM: <s> adds the specified </s>
funcom_train/46479075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCompromiseModePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CompromiseMethod_CompromiseMode_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CompromiseMethod_CompromiseMode_feature", "_UI_CompromiseMethod_type"), IS1Package.Literals.COMPROMISE_METHOD__COMPROMISE_MODE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the compromise mode feature </s>
funcom_train/5502554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PropertyName pname(Token token) { if (token == null) return null; String tmp = token.getText(); if (!tmp.startsWith("<")) { return new PropertyName("DAV:", text(token)); } String namespaceURI = tmp.substring(tmp.indexOf('"') + 1, tmp.lastIndexOf('"')); String localName = tmp.substring(1, tmp.indexOf(' ')); return new PropertyName(namespaceURI, localName); } COM: <s> get the property name from a token </s>
funcom_train/42668557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBack() { if (Back == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here Back = new Command("Anterior", Command.BACK, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return Back; } COM: <s> returns an initiliazed instance of back component </s>
funcom_train/37840529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleMouseEvent(BoardState boardState, MouseEvent event) { RPAction action = new RPAction(); action.put("type", "create_dot_action"); action.put("x", event.getX()); action.put("y", event.getY()); action.put("color", boardState.getColor().getRGB()); action.put("thickness", boardState.getThickness()); MarboardClientFramework.executeAction(action); } COM: <s> tells the server to draw a dot at the position the mouse pointer </s>
funcom_train/34354689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleError(Application application, Throwable e) { // log error LOGGER.error(ApplicationResourceBundle.get().get(errorMessageKey), e); // always synchronize on the application instance (since this method may be called from background threads) synchronized(application) { button.getWindow().showNotification(String.format("%s: %s", ApplicationResourceBundle.get().get(errorMessageKey), StringEscapeUtils.escapeHtml(e.getMessage())), Notification.TYPE_ERROR_MESSAGE); setPressed(false); } } COM: <s> displays standard error message and unpresses the button </s>
funcom_train/18743168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialog(JFrame frame) { // createContentPane(); this.dialog = createContentPane().createDialog(frame, createTitle()); this.dialog.setResizable(true); // dialog.setSize(200,200); this.dialog.pack(); this.dialog.setVisible(true); } COM: <s> shows the dialog that requests the boundary </s>
funcom_train/29945198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyNeg(ASTNeg n) { Type et = doIt(n.getExpr()); if (intType().equals(et)) { n.setType(_last = intType()); } else { n.setType(_last = errorType()); _failed = true; System.out.println("operand of - should be integer. Got:" + et.toString()); } } COM: <s> this function checks whether the operand of is integer or not </s>
funcom_train/7546783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateButtons() { fClearButton.setEnabled(folders != null && folders.isEmpty()); IStructuredSelection selection = (IStructuredSelection) fLocationsViewer .getSelection(); boolean canRemove = true; if (folders == null) canRemove = false; else { List list = selection.toList(); for (Iterator iterator = list.iterator(); iterator.hasNext();) { Object o = iterator.next(); if (!folders.contains(o)) canRemove = false; break; } if (selection.isEmpty()) canRemove = false; } fRemoveButton.setEnabled(canRemove); } COM: <s> refresh the enable disable state for the buttons </s>
funcom_train/28279543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMatcherString(String pattern, boolean update) { if (pattern.length() == 0) { fStringMatcher = null; } else { fStringMatcher = new StringMatcher(pattern, true, false); } // Update the name pattern filter on the tree viewer namePatternFilter.setStringMatcher(fStringMatcher); // Update the tree viewer according to the pattern if (update) { stringMatcherUpdated(); } } COM: <s> sets the patterns to filter out for the receiver </s>
funcom_train/7616282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage getSubimage(int x, int y, int w, int h) { WritableRaster wr = raster.createWritableChild(x, y, w, h, 0, 0, null); return new BufferedImage(cm, wr, cm.isAlphaPremultiplied(), properties); } COM: <s> gets the rectangular area of this buffered image as a subimage </s>
funcom_train/40144110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean inBoundaryBox(Coordinate c) { return (c.getX() >= getX() && c.getX() <= (getX() + getWidth()) && c.getY() >= getY() && c.getY() <= (getY() + getHeight())); } COM: <s> returns true if the coordinates is in the words boundary </s>
funcom_train/3395186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanChar() { bp++; ch = buf[bp]; switch (ch) { case '\r': // return col = 0; break; case '\n': // newline if (bp == 0 || buf[bp-1] != '\r') { col = 0; } break; case '\t': // tab col = (col / TabInc * TabInc) + TabInc; break; case '\\': // possible Unicode col++; convertUnicode(); break; default: col++; break; } } COM: <s> read next character </s>
funcom_train/36761425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDefinedAverage(int start, int days, int column) { double toReturn = 0.0; try { for (int i = start; i < days; i++) { toReturn = toReturn + Double.valueOf(dataArray[i][column]).doubleValue(); } } catch (NumberFormatException e) { } return toReturn / days; } COM: <s> get previous 2 day average </s>
funcom_train/36534432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getParkNumber(int parkID) { int id = 0; try { String selectStatement = "SELECT ParkNum FROM carpark WHERE pid=?;"; PreparedStatement pstmt = con.prepareStatement(selectStatement); pstmt.setInt(1, parkID); ResultSet result = pstmt.executeQuery(); while (result.next()) { id = result.getInt(1); } result.close(); pstmt.close(); } catch(SQLException sqle) { System.out.println(sqle); } return id; } COM: <s> gets the number of a car park given its database assigned id </s>
funcom_train/42864242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPredAtAll(Community<T> commA_, Community<T> commB_) { boolean isPred = false; if (hasCores(commA_, commB_)) { isPred = true; } else if (null != commB_.getPredecessors()) { for (Community<T> bPred : commB_.getPredecessors()) { isPredAtAll(commA_, bPred); } } return isPred; } COM: <s> recurs down the timeline to find the first predecesor it can find </s>
funcom_train/51103265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDbRelationship(DbRelationship dbRel) { refreshFromPath(true); dbRelationships.remove(dbRel); // Do not listen any more EventManager.getDefaultManager().removeListener( this, DbRelationship.PROPERTY_DID_CHANGE, dbRel); this.calculateReadOnlyValue(); this.calculateToManyValue(); } COM: <s> removes the relationship code db rel code from the list of relationships </s>
funcom_train/18726286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showChooser() { if (chooser != null) { chooser.setMode(chooserMode); chooser.setDialogTitle(chooserTitle); chooser.setColor(getColor()); chooser.setOptional(optional); chooser.show(new Location.RelativeTo(this)); setColor(chooser.getColor()); } } COM: <s> show the existing chooser programmatically as if the </s>
funcom_train/28757179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMidforeground(String newVal) { if ((newVal != null && this.midforeground != null && (newVal.compareTo(this.midforeground) == 0)) || (newVal == null && this.midforeground == null && midforeground_is_initialized)) { return; } this.midforeground = newVal; midforeground_is_modified = true; midforeground_is_initialized = true; } COM: <s> setter method for midforeground </s>
funcom_train/30005400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setColumnWidth(int column, int width) { if (column < this.getColumnModel().getColumnCount() && width >= 0) { TableColumn col = this.getColumnModel().getColumn(column); col.setPreferredWidth(width); return true; } else { return false; } } COM: <s> sets the width of the specified column </s>
funcom_train/29576107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerClass(String name, URL classURL) throws java.lang.Exception { // Check defined interfaces; // Check super calls this.setUpClassReader(); // sp.parseXMLFile("BaseClass.xml"); sp.parseXMLFile(classURL.toString()); } COM: <s> register a class by a url </s>
funcom_train/14009754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendMailMessage(EmailMessage emailmessage, String defaultRecipientEmail, String defaultRecipientName) { try { InternetAddress defaultAddress = new InternetAddress(defaultRecipientEmail, defaultRecipientName); EmailUtils.sendMailMessage(_mailsession, emailmessage, defaultAddress); } catch (UnsupportedEncodingException e) { _logger.error(e); } } COM: <s> send the email message </s>
funcom_train/13273805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getBackgroundNode() { Background background = new Background(new Color3f(0.9f, 0.9f, 0.9f)); background.setCapability(Background.ALLOW_COLOR_WRITE); background.setApplicationBounds(new BoundingSphere(new Point3d(0, 0, 0), 100)); return background; } COM: <s> returns the background node </s>
funcom_train/22086961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startMethod(String methodName, String type, short flags) { short methodNameIndex = itsConstantPool.addUtf8(methodName); short typeIndex = itsConstantPool.addUtf8(type); itsCurrentMethod = new ClassFileMethod(methodNameIndex, typeIndex, flags); itsMethods.addElement(itsCurrentMethod); } COM: <s> add a method and begin adding code </s>
funcom_train/32061779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void setSpeedfactor( float newspeedfactor ) { // argcheckLess( toNum( newspeedfactor ) , "newspeedfactor", // toNum( 0f ), null ); // argcheckGreater( toNum( newspeedfactor ) , "newspeedfactor", // toNum( 1.0f ), null ); // // currentspeedfactor = newspeedfactor; // } COM: <s> sets the speed factor for the taskforce </s>
funcom_train/2290465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsResourceTranslator getFolderTranslator() { String[] array = m_folderTranslationEnabled ? new String[m_folderTranslations.size()] : new String[0]; for (int i = 0; i < m_folderTranslations.size(); i++) { array[i] = (String)m_folderTranslations.get(i); } return new CmsResourceTranslator(array, false); } COM: <s> returns the folder resource translator that has been initialized </s>
funcom_train/1345360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVariables(String var) throws IllegalArgumentException { if (var.length() == 0) throw new IllegalArgumentException("no variables given"); SymbolSet s = new SymbolSet(var); if (!s.validate()) throw new IllegalArgumentException("invalid variables"); if (s.hasDuplicates()) throw new IllegalArgumentException("invalid variables"); variables = s; } COM: <s> sets elements that can be replaced </s>
funcom_train/22603744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object searchInputValue(){ if(getSearchInput()== null) return null; try{ Method m = getSearchInput().getClass().getMethod(getSearchValueGetter(), (Class[])null); Object inputValue= m.invoke(getSearchInput(), (Object[])null); if(getValuePrefix()!=null) inputValue = prefix(inputValue); if(getValueAppendix()!= null) inputValue = append(inputValue); return inputValue; }catch(Exception e){ throw new SearchException(e); } } COM: <s> use reflection invoking search value getter method on search input for user </s>
funcom_train/12796193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTotalDiskSpace(String diskVol) throws NSClient4JException { // Returns <free>&<total> String result[] = split(submittRequest(password + "&4&" + diskVol), "&"); double totalSpace = Double.parseDouble(result[1]); return "" + totalSpace; } COM: <s> returns the total disk space for the volume name passed </s>
funcom_train/45107852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialiseImage() throws Exception { file = (IFile) getEditorInput().getAdapter(IFile.class); if (file != null) { try { BufferedImage loadedImage = ImageIO.read(file.getContents()); RenderableRaster background = new RenderableRaster(loadedImage); ImageDocument document = new ImageDocument(background); ImageEditorModel model = new ImageEditorModel(document); canvas.setImageEditorModel(model); } catch (Exception e) { e.printStackTrace(); } } } COM: <s> initialises the image </s>
funcom_train/46416782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableComponents(boolean b[]){ fileTB.setEnabled(b[0]); //Certificate file name fileBt.setEnabled(b[1]); //Certificate file selector button pwdTB.setEnabled(b[2]); //Password certSelCB.setEnabled(b[3]); //Certificate selector } COM: <s> enable or disable the required component of a key store </s>
funcom_train/19358396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OWLConstant getOWLConstant(String literal, String datatype, String lang) { if (datatype != null) { return dataFactory.getOWLTypedConstant(literal, dataFactory.getOWLDataType(getURI(datatype))); } else { if (lang != null) { return dataFactory.getOWLUntypedConstant(literal, lang); } else { return dataFactory.getOWLUntypedConstant(literal); } } } COM: <s> a convenience method to obtain an code owlconstant code </s>
funcom_train/39466553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadInPaths() { String[] list = {}; try { list = Archiver.retrieveList(path); } catch (IOException e) { Archiver.store("", path, true); //e.printStackTrace(); } File file; for (int i = 0; i < list.length; i++) { file = new File(list[i]); if (file.canRead()) pathList.add(file); } } COM: <s> loads the paths from file </s>
funcom_train/37596372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int emitPartialBindingsVar(MethodVisitor mv, DJClass outerC, StackSizeTracker stack) { if (outerC == null) { return 1; } else { int result = stack.newVariable(); emitLoadBindings(mv, 1, className(outerC), stack); mv.visitVarInsn(ASTORE, result); stack.adjust(-1); return result; } } COM: <s> determine the location of a constructors runtime bindings before this has been bound </s>
funcom_train/12781574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace(T a, T b) throws IllegalArgumentException { int i = getMappedIndex(a); if (i == -1) { throw new IllegalArgumentException("first element does not exist in map"); } map.remove(a); map.put(b, new Integer(i)); array[i] = b; } COM: <s> replace a in this mapping with b </s>
funcom_train/45544684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleBrowse() { ContainerSelectionDialog dialog = new ContainerSelectionDialog( getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, "Select new file container"); if (dialog.open() == Window.OK) { Object[] result = dialog.getResult(); if (result.length == 1) { containerText.setText(((Path) result[0]).toString()); } } } COM: <s> uses the standard container selection dialog to choose the new value for </s>
funcom_train/17925003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getUserGraphOutgoing(Integer userid) { /* Check wether the cache contains the userid */ List edges = (List) this.userGraphCacheOutgoing.get(userid); if (edges != null) { return edges; } /* Load the user-edges and put them into the cache */ edges = getUserGraphOutgoingFromDatabase(userid); this.userGraphCacheOutgoing.put(userid, edges); return edges; } COM: <s> returns the list of outgoing edges of the user userid </s>
funcom_train/3578893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModuleException(String module, String exception){ module = module.replace('.', '/'); //System.out.println("setModuleException ." + module) ; TreeNode modNode = findLayerObject(rootApplicationLayer, module + ".class"); if(modNode != null){ modNode.setException(exception); //System.out.println("setModuleException found node."); } } COM: <s> notify a module that an uncaught exception has occured </s>
funcom_train/40311919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidRowSQLException() { SQLException e = new InvalidRowSQLException("message"); assertNotNull("Create instance failed.", e); assertTrue("The error message mismatches.", e.getMessage().indexOf("message") >= 0); assertEquals("The sqlstate mismatches.", "02000", e.getSQLState()); } COM: <s> tests constructor with error message and the properties can be retrieved correctly later </s>
funcom_train/28114120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void XORDraw(){ g.setColor(theIM.getBackground()); g.setXORMode(Color.red); g.fillArc(x1-4,y1-4,8,8,0,360); g.drawArc(x1-6,y1-6,12,12,0,360); } COM: <s> draw the pos in xor mode </s>
funcom_train/43884452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void walk(XSDTypeDefinition base, Visitor visitor) { List types = types(base); for (int i = 0; i < types.size(); i++) { XSDTypeDefinition type = (XSDTypeDefinition) types.get(i); //do the visit, if visitor returns false, break out if (!visitor.visit(type)) { break; } } } COM: <s> walks from the bottom of the type hierachy to the top </s>
funcom_train/21225196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHours() throws IllegalStateException { switch (getFormat()) { case VALIDITY_PERIOD_HH_MM_SS: /* Second octet */ return data[0]; default: throw new IllegalStateException( "The VP format does not correspond to VALIDITY_PERIOD_HH_MM_SS, " + "see the method getFormat() for more information."); } } COM: <s> this will return the validity period in hours </s>
funcom_train/5342602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void engineReset() { int i = 60; do { pad[i ] = (byte)0x00; pad[i + 1] = (byte)0x00; pad[i + 2] = (byte)0x00; pad[i + 3] = (byte)0x00; } while ((i -= 4) >= 0); padding = 0; bytes = 0; init(); } COM: <s> reset athen initialize the digest context </s>
funcom_train/43098697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object copyDataType(Object source, Object ns) { if (!(source instanceof MDataType)) { throw new IllegalArgumentException(); } if (!(ns instanceof MNamespace)) { throw new IllegalArgumentException(); } MDataType i = (MDataType) createDataType(); ((MNamespace) ns).addOwnedElement(i); doCopyDataType(source, i); return i; } COM: <s> copies a datatype and its features </s>
funcom_train/252938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop( final long duration) { Logger.getLogger(getClass()).debug("Splash.stop( "+duration+")"); // Create a runnable object ... Runnable timer = new SplashRunner( this) { @Override public void run() { try { Thread.sleep( duration); getSplash().stop(); } catch ( Exception e) { e.printStackTrace(); } } }; // Create and start the thread ... Thread thread = new Thread( timer); thread.start(); } COM: <s> hide the splash screen after x milli seconds </s>
funcom_train/23365395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getModuleCode(String input) { String regex = "[0-9]{2,2}-[0-9]{5,5}(\\.[0-9]{1,3}){0,1}"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(input); if (m.find()) { return m.group(); } else { return null; } } COM: <s> gets the module code from the specified string </s>
funcom_train/17805144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetRuntimeComponentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RuntimeConnection_targetRuntimeComponent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RuntimeConnection_targetRuntimeComponent_feature", "_UI_RuntimeConnection_type"), CtbPackage.Literals.RUNTIME_CONNECTION__TARGET_RUNTIME_COMPONENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the target runtime component feature </s>
funcom_train/21940649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field79 getField79() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("79"); if (t == null) { log.fine("field 79 not found"); return null; } else { return new Field79(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 79 </s>
funcom_train/24539604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceFillerOrEmpty(EObject child, Object childObject, Object requestType, Point cell) { if (isFillerLabelAtCell(cell)) replaceFiller(child, childObject, requestType, cell); else if (isEmptyAtCell(cell)) replaceEmptyCell(child, childObject, requestType, cell); } COM: <s> replace the filler or empty at the given cell with the new child </s>
funcom_train/24427371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long largestCylinderValOnDisk( ) { // return the maximum end cylinder value for the four partitions return Math.max( Math.max( partitionEntry1.getEndCylinder( ), partitionEntry2.getEndCylinder( ) ), Math.max( partitionEntry3 .getEndCylinder( ), partitionEntry4.getEndCylinder( ) ) ); } COM: <s> used for getting the end cylinder value for a disk </s>
funcom_train/40621354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCellEditor(int column, AbstractCellEditor<R> editor) { if (cellEditors == null) { cellEditors = new HashMap<Integer, AbstractCellEditor<R>>(); } if (editor == null) { cellEditors.remove(new Integer(column)); } else { cellEditors.put(new Integer(column), editor); } } COM: <s> set the cell editor for a column </s>
funcom_train/6348863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadCommandPrompt() throws Exception { try { ExecUtil.runCommandPrompt("nowayjose", new Path("/")); //$NON-NLS-1$ //$NON-NLS-2$ fail("should've gotten IOException"); //$NON-NLS-1$ } catch (IOException e) { } } COM: <s> tests an invalid command for command prompt </s>
funcom_train/9352086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void listenToAxisTitle(final AxisTitle axisTitle) { axisTitle.addPropertyChangeListener(AxisTitle.PROPERTY_TITLE, this); axisTitle.addPropertyChangeListener(AxisTitle.PROPERTY_TITLEFONT, this); axisTitle.addPropertyChangeListener(AxisTitle.PROPERTY_TITLEPAINTER, this); } COM: <s> internal routine for an axis to listen to the new given axis title </s>
funcom_train/50899149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCategoryId(JDCConnection oConn) throws SQLException { DBSubset oCats = new DBSubset(DB.k_x_cat_objs,DB.gu_category, DB.gu_object+"=?",4); oCats.load(oConn, new Object[]{get(DB.gu_product)}); if (oCats.getRowCount()>0) return oCats.getString(0,0); else return null; } // getCategoryId COM: <s> get guid of the first category to which this products belongs </s>
funcom_train/12652462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result matchDescriptive(PatientHistory history) { // Validate history and lateral diagnoses if (history == null) return Result.FAIL; // If maximum then use worse lateral result, if minimum use better lateral result Result left = matchDescriptive(getDiagnosis(history, LEFT_BREAST)); Result right = matchDescriptive(getDiagnosis(history, RIGHT_BREAST)); return maximum ? worse(left, right) : better(left, right); } COM: <s> returns how the patients lymph count characteristic </s>
funcom_train/18740585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Result play(String strategy, String acceptor, int count) { Exploration exploration = new Exploration(strategy, acceptor, count); try { exploration.play(getGTS(), getGTS().startState()); } catch (FormatException e) { // there can be no incompatibility assert false; } return exploration.getLastResult(); } COM: <s> plays a given exploration on the gts and returns the result </s>
funcom_train/37866948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readNamespaceDecls() { if (nsRead) return; if (state == START_ELEMENT || state == END_ELEMENT) { if (nodeId == null) readNodeId(); ElementImpl.readNamespaceDecls(namespaces, current, document, nodeId); } nsRead = true; } COM: <s> read all namespace declarations defined on the current element </s>
funcom_train/1786980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendNameRangeToFile(File file, String lower, String upper) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true), "UTF8")); bw.write(lower); bw.write("\t"); bw.write(upper); bw.write("\n"); bw.close(); } COM: <s> appends a name range to file </s>
funcom_train/3787040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldIdxRowDatum(int row, int fieldIdx) { /* getFieldIdxRowDatum */ if(fieldIdx<0 || row<0) return(null); String sR= tData[row][fieldIdx]; return(sR); } /* getFieldIdxRowDatum */ COM: <s> get field idx row datum get datum by field idx with row index </s>
funcom_train/1590508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMillisKeepLocal(DateTimeZone newZone, long oldInstant) { if (newZone == null) { newZone = DateTimeZone.getDefault(); } if (newZone == this) { return oldInstant; } long instantLocal = oldInstant + getOffset(oldInstant); return instantLocal - newZone.getOffsetFromLocal(instantLocal); } COM: <s> gets the millisecond instant in another zone keeping the same local time </s>
funcom_train/46261644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { Point newMousePosition = e.getPoint(); myfdo.add(newMousePosition); drawLineSegment(startingMousePosition,newMousePosition); /* update current mouse coordinates */ startingMousePosition = newMousePosition; if(e.getWhen() != 0){ canvas.com.sendMessage("mouse dragged "+e.getPoint().x+" "+e.getPoint().y); } } COM: <s> adds position of mouse event to current freehanddrawingobject </s>
funcom_train/22279015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollBarDidBecomeInactive(ScrollBar aScrollBar) { if(debugScrollers) System.err.println("--scrollBarBecameInactive"); if(ignoreScrollBars) return; if(aScrollBar == horizScrollBar && horizScrollDisplay == NEVER_DISPLAY) return; if(aScrollBar == vertScrollBar && vertScrollDisplay == NEVER_DISPLAY) return; layoutView(0, 0); } COM: <s> implemented to catch scroll bar deactivation and ensure their removal </s>
funcom_train/40613997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression getCheckConstraint(Session session, String asColumnName) { if (checkConstraint == null) { return null; } Parser parser = new Parser(session); String sql; synchronized (this) { String oldName = name; name = asColumnName; sql = checkConstraint.getSQL(); name = oldName; } Expression expr = parser.parseExpression(sql); return expr; } COM: <s> get the check constraint expression for this column if set </s>