__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/27842312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void issueControl(Control inControl) { if (LOG.isDebugEnabled()) { LOG.debug("issueControl: " + inControl); } if (getController() == null) { throw new UnsupportedOperationException("Can't issue Control because can't find a Controller for Page with ID: " + getID()); } getController().handleControl(inControl); } COM: <s> issue control via the parent servlet view </s>
funcom_train/3926875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeFile(ProcessedFile file) { if (files.contains(file)) { // System.out.println("Chisel closing file " + file.getName()); files.removeElement(file); frontEnd.close(file); if (file.isTemporary()) { file.getFile().delete(); } file.removeSerialFiles(); } } COM: <s> close a processed file and remove any serialized versions of it </s>
funcom_train/13410333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildPlayer() { // box stand in Box b = new Box("box", new Vector3f(), 0.35f, 0.25f, 0.5f); b.setModelBound(new BoundingBox()); b.updateModelBound(); player = new Node("Player Node"); player.setLocalTranslation(new Vector3f(100, 0, 100)); scene.attachChild(player); player.attachChild(b); player.updateWorldBound(); } COM: <s> we are going to build the player object here </s>
funcom_train/22968479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(HttpServletRequest request, String objectName, String className) throws XavaException { String application = request.getParameter("application"); if (Is.emptyString(application)) { throw new XavaException("application_and_module_required_in_request"); } String module = request.getParameter("module"); if (Is.emptyString(module)) { throw new XavaException("application_and_module_required_in_request"); } return get(application, module, objectName, className); } COM: <s> return a object asociate to the specified module </s>
funcom_train/7372026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandleSpec getInputSpec() { List<HandleSpec> inputSpecs = getHandleSpecs(Handle.INPUT); if (inputSpecs == null || inputSpecs.size() == 0) { addHandleSpec(Handle.INPUT, new HandleSpec("stdin", PigStreaming.class.getName())); } return getHandleSpecs(Handle.INPUT).get(0); } COM: <s> get the input specification of the code streaming command code </s>
funcom_train/32967415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Date getFieldAsDate( String expression, Node node ) throws Exception { String lexicalRepresentation = xpath.evaluate(expression, node); if (lexicalRepresentation==null || lexicalRepresentation.length()==0) { return null; } XMLGregorianCalendar cal = DatatypeFactory.newInstance().newXMLGregorianCalendar(lexicalRepresentation); return cal.toGregorianCalendar().getTime(); } COM: <s> get an xml data as a java date </s>
funcom_train/38351577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initUF() { sets = new ArrayList[getNumberOfNodes()]; for (int i = 0; i < getNumberOfNodes(); i++) { sets[i] = new ArrayList(); sets[i].add(new Integer(i)); } repr = new int[getNumberOfNodes()]; for (int i = 0; i < getNumberOfNodes(); i++) repr[i] = i; } COM: <s> initialize the union find data structure </s>
funcom_train/22387286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean insert(String s, int side, int bias) { if(!bias(bias)) return false; if(cspan != null) return false; c.setText(ctxt.substring(0, offs) + s + ctxt.substring(offs)); ZZCursorReal.adjustCursors(c, offs, s.length()); if(side > 0) offs += s.length(); return true; } COM: <s> internal convenience try to insert with bias if cant return </s>
funcom_train/8146838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setPosition(SimNode node, Point3d pos) { if(node.hasVariable(AVariable.COMMON_IDENTIFIERS.POSITION)) { AVariable posVar = node.getVariableById(AVariable.COMMON_IDENTIFIERS.POSITION); if(posVar instanceof DefaultVariable) { ((DefaultVariable)posVar).update(pos); } else { node.registerVariable(new DefaultVariable(AVariable.COMMON_IDENTIFIERS.POSITION, pos)); } } else { node.registerVariable(new DefaultVariable(AVariable.COMMON_IDENTIFIERS.POSITION, pos)); } } COM: <s> set the position for a node </s>
funcom_train/33068848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtension(){ try { HTMLProjectParams params = new HTMLProjectParams(project); IPath path = new Path(params.getRoot()).append("/WEB-INF/web.xml"); IFile file = project.getFile(path); if(file!=null && file.exists()){ FuzzyXMLDocument doc = new FuzzyXMLParser().parse(file.getContents()); String value = HTMLUtil.getXPathValue(doc.getDocumentElement(), "/web-app/servlet-mapping[servlet-name='action']/url-pattern"); value = value.trim(); if(value!=null && value.startsWith("*.")){ return value.substring(1); } } } catch(Exception ex){ } return ".do"; } COM: <s> returns the extension of the action path </s>
funcom_train/40672561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rememberPackage(String packageName) { int i = packageName.lastIndexOf('.'); if (i != -1) { // Ensure the parent package is also created. // rememberPackage(packageName.substring(0, i)); } knownPackages.add(packageName); } COM: <s> causes the compilation service itself to recognize the specified package </s>
funcom_train/14517589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String setUserStatusToNew(UserDataVO userdata) { String retval = null; try { IPasswordGenerator passwordGenerator = PasswordGeneratorFactory.getInstance(PasswordGeneratorFactory.PASSWORDTYPE_LETTERSANDDIGITS); String password= passwordGenerator.getNewPassword(8, 8); userdata.setStatus(UserDataConstants.STATUS_NEW); userdata.setPassword(password); getUserAdminSession().changeUser(raAdmin, userdata, true); retval = password; } catch (Exception e) { log.error(intres.getLocalizedMessage("xkms.errorsettinguserstatus", userdata.getUsername()),e); } return retval; } COM: <s> method that sets the users status to new and a </s>
funcom_train/537135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSuggestALot() { List<ScoredTrack> scoredTracks = createTrackList(50000); this.biasedRandomizer.setFactor(0.0); for (int i = 0; i < 100; i++) { assertNotNull(this.biasedRandomizer.suggestTrack(scoredTracks)); } } COM: <s> test suggesting one out of 50000 tracks for bug 100 </s>
funcom_train/22384714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRankLength(String dim) { ZZCell cur = this; ZZCell next; int i = 0; while((next=cur.s(dim,1))!=null) { if(next == this) throw new ZZInfiniteLoop("CIRCULAR HEAD"); cur = next; i++; } cur = this; while((next=cur.s(dim,-1))!=null) { if(next == this) throw new ZZInfiniteLoop("CIRCULAR HEAD"); cur = next; i++; } return i+1; } COM: <s> count the length of the rank </s>
funcom_train/19434568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Extent e) { int diff = index - e.index; if (diff == 0) { if (start > e.start) { return 1; } else if (start < e.start) { return -1; } else { if (end > e.end) { return 1; } else if (end < e.end) { return -1; } else { return 0; } } } else { return diff; } } COM: <s> extends are sorted by increasing index and start and finally </s>
funcom_train/7707795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String execute(String[] lines) { StringBuffer s = new StringBuffer(); s.append("tell application \"" + application + "\"\n"); for (String line : lines) s.append(line).append("\n"); s.append("end tell\n"); if (debug) System.err.println(s); return app.execute(s.toString()); } COM: <s> executes the code lines code in the context </s>
funcom_train/32057486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveSelectionCell() { System.out.println("testRemoveSelectionCell"); JGraph jp = new JGraph(); DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp); Object obj = new Object(); dg.addSelectionCell(obj); dg.removeSelectionCell(obj); assertTrue(dg.getSelectionCell() != obj); } COM: <s> this function tests remove selection cell function of default graph cell class </s>
funcom_train/4427756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SequentialPattern findLoopPattern(SequentialPattern oldPattern) { Iterator<ExecutionPattern> it = oldPattern.iterator(); if (it.hasNext()) { SequentialPattern newPattern = new SequentialPattern(); ExecutionPattern previous = it.next(); int iterations = 1; while (it.hasNext()) { ExecutionPattern next = it.next(); if (previous.equals(next)) { iterations++; } else { addPattern(newPattern, iterations, previous); previous = next; iterations = 1; } } if (iterations > 0) { addPattern(newPattern, iterations, previous); } return newPattern; } else { return oldPattern; } } COM: <s> finds a loop pattern in the given sequential pattern </s>
funcom_train/44011340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetExpireDate() { System.out.println("setExpireDate"); String expireDate = ""; CouponBO instance = new CouponBO(); instance.setExpireDate(expireDate); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set expire date method of class edu </s>
funcom_train/3318902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String toReturn = " <category> " + title + "\n"; for (int i = 0; i < categoryList.size(); i++) { toReturn += categoryList.get(i); } for (int i = 0; i < notesheetList.size(); i++) { toReturn += notesheetList.get(i); } toReturn += " </category>\n"; return toReturn; } COM: <s> this method returns a string representation of the object </s>
funcom_train/24262142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidationN1() { try { OntologyTerm ontologyTerm1 = new OntologyTerm(); ontologyTerm1.setTerm(""); ontologyTerm1.setNameSpace("www.lha.ac.uk:LHA"); curationService.addOntologyTerm(demoUser, ontologyTerm1); fail(); } catch(MacawException exception) { int totalNumberOfErrors = exception.getNumberOfErrors(); assertEquals(1, totalNumberOfErrors); int numberOfErrors = exception.getNumberOfErrors(MacawErrorType.INVALID_ONTOLOGY_TERM); assertEquals(1, numberOfErrors); log.logException(exception); } } COM: <s> validation fails if term is left blank </s>
funcom_train/7255173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopTransferProcessing( NetworkConnectionBase peer_connection ) { if( lan_upload_processor.isRegistered( peer_connection )) { lan_upload_processor.deregisterPeerConnection( peer_connection ); lan_download_processor.deregisterPeerConnection( peer_connection ); } else { upload_processor.deregisterPeerConnection( peer_connection ); download_processor.deregisterPeerConnection( peer_connection ); } } COM: <s> cancel network upload and download handling for the given connection </s>
funcom_train/40613951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Method getMethod(String className) throws ClassNotFoundException { Class<?> clazz = getClass(className); Method[] methods = clazz.getDeclaredMethods(); for (Method m : methods) { int modifiers = m.getModifiers(); if (Modifier.isPublic(modifiers)) { if (Modifier.isStatic(modifiers)) { return m; } } } return null; } COM: <s> get the first public static method of the given class </s>
funcom_train/32055240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { Enumeration enum = menuItems.elements(); if (getCurrentDocument() != null) { setEnabled(getCurrentDocument().getGraphUndoManager().canUndo()); ((JMenuItem) menuItems.get(0)).setText(getCurrentDocument() .getGraphUndoManager().getUndoPresentationName()); } else { setEnabled(false); ((JMenuItem) menuItems.get(0)).setText(Translator .getString("EditUndoLabel")); } } COM: <s> updates the items of the cell once the action has been performed </s>
funcom_train/27944595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void suspendThreads() { //PENDING detect handle if the machine is suspended try { iprof.suspendVM(); } catch (COMMUN_Exception e) { fireVMDisconnected(); } catch (UNAVAILABLE_Exception e) { //PENDING throw new RuntimeException("TODO: handle this: \"Suspend Threads is unavailable\"" + e.getMessage()); } } COM: <s> suspends all threads in the virtual machine </s>
funcom_train/6203848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHeadingLevel(String line) { int level = 0; int length = line.length() - 1; while (level < length && line.charAt(level) == '=' && line.charAt(length) == '=') { level++; length--; } if (level < length) { return level; } else { return 0; } } COM: <s> check if the line is a heading and which level of heading </s>
funcom_train/7720723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doCut() { Editor editor=getJPE().getEditor(); copyBuffer=editor.cutSelectedText(); Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); cb.setContents( new StringSelection(copyBuffer), this); getJPE().say("Text Cut"); } COM: <s> cut the selected text and place it in the copy buffer </s>
funcom_train/2876066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fault GenerateSoapFault(String soapNamespace) { Fault fault = new Fault(SoapConstants.ELEMENT_FAULT, soapNamespace); fault.setFaultCode(getFaultCode()); fault.addThrowable(this); addExtraDetails(fault); for (Element e : details) { fault.appendToFaultDetail(e.copy()); } return fault; } COM: <s> create a soap fault from ourselves </s>
funcom_train/3883433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSourceType_MaxLength(String sourceType, DiagnosticChain diagnostics, Map context) { int length = sourceType.length(); boolean result = length <= 1024; if (!result && diagnostics != null) reportMaxLengthViolation(ImsMdRootv1p1Package.Literals.SOURCE_TYPE, sourceType, length, 1024, diagnostics, context); return result; } COM: <s> validates the max length constraint of em source type em </s>
funcom_train/51100997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasToManyRelationships(ObjEntity anObjEntity) { if (anObjEntity == null) { return false; } Iterator it = anObjEntity.getRelationships().iterator(); while (it.hasNext()) { Relationship r = (Relationship) it.next(); if (r.isToMany()) { return true; } } return false; } COM: <s> returns true if an obj entity contains at least one to many relationship </s>
funcom_train/23217532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExpirationCondition(String expirationCondition) { setVariable(EXPIRATIONCONDITION, expirationCondition); TransitionTest t = new SentenceTransitionTest(expirationCondition); edges.get(5).addTransitionTest(t); edges.get(6).addTransitionTest(t); edges.get(5).addTransitionEffect( new UnifyTransitionEffect(expirationCondition)); edges.get(6).addTransitionEffect( new UnifyTransitionEffect(expirationCondition)); } COM: <s> sets the condition for this code norm atn code to transition </s>
funcom_train/14378718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(long elapsedTime) { float delta = velocityMovement.getDistance(elapsedTime); if (delta != 0) { temp.setTo(velocity); temp.multiply(delta); location.add(temp); } rotateAngle(velocityAngleX.getDistance(elapsedTime), velocityAngleY.getDistance(elapsedTime), velocityAngleZ.getDistance(elapsedTime)); } COM: <s> updates this transform3 d based on the specified elapsed time </s>
funcom_train/331394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultFile(String defaultFile) { /** * If saving from viewer or mixed mode, then the * settingsFileData may not have been loaded, in which case * load it now so that old psf names remain in the list. */ if (settingsFileData == null) { loadSettingsFileData(); if (settingsFileData == null) { settingsFileData = new SettingsFileData(); } } settingsFileData.setFirstFile(new File(defaultFile)); } COM: <s> set the default first file in the settings file data </s>
funcom_train/3460746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getIcon(int iconKind) { switch (iconKind) { case BeanInfo.ICON_COLOR_16x16: return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename, beanClass) : null; case BeanInfo.ICON_COLOR_32x32: return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename, beanClass) : null; case BeanInfo.ICON_MONO_16x16: return iconMono16x16Filename != null ? loadImage(iconMono16x16Filename, beanClass) : null; case BeanInfo.ICON_MONO_32x32: return iconMono32x32Filename != null ? loadImage(iconMono32x32Filename, beanClass) : null; } return null; } COM: <s> returns a icons of the specified size </s>
funcom_train/16482586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Boolean checkForFutureOvulation(Date date) { Date next_date = startDates.higher(date); int next_date_type = dateTypes.get(next_date); if(next_date_type == PCAL_TYPE_OVULATION) { int days_till_ovulation = dateDiff(date, next_date); return days_till_ovulation < PERIOD_FERTILE_DAYS_COUNT; } else { return null; } } COM: <s> checks if after the date specified there is an ovulation record </s>
funcom_train/785539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEdgeTable(Table edges) { Table oldEdges = getEdgeTable(); oldEdges.removeTableListener(m_listener); m_edgeTuples.invalidateAll(); m_links.clear(); init(getNodeTable(), edges, m_directed, m_nkey, m_skey, m_tkey); } COM: <s> updates this graph to use a different edge structure for the same nodes </s>
funcom_train/802664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLengthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SupDataType_length_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SupDataType_length_feature", "_UI_SupDataType_type"), MzdataPackage.Literals.SUP_DATA_TYPE__LENGTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the length feature </s>
funcom_train/18938033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getType( String key ) { int type = 0; if ( reservedWords.get( key ) != null ) { type = RESERVED_WORD; } else if ( operators.get( key ) != null ) { type = OPERATOR; } else if ( parenthetic.get( key ) != null ) { type = PARENTHERIC; } else if ( pointing.get( key ) != null ) { type = POINTING; } else if ( languageTypes.get( key ) != null ) { type = LANGUAGETYPES; } return type; } COM: <s> returns the type of the symbol received </s>
funcom_train/43889529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateTable() throws Exception { insertRow(41, DESCRIPTION_FOR_ID_41); insertRow(3, DESCRIPTION_FOR_ID_3); insertRow(27, DESCRIPTION_FOR_ID_27); insertRow(93, DESCRIPTION_FOR_ID_93); } COM: <s> insert the four test rows into the test table in arbitrary order </s>
funcom_train/10532725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGettingInheritedPropertyByContext2() throws Exception { SubControlBean sub = (SubControlBean) java.beans.Beans.instantiate(Thread.currentThread().getContextClassLoader(), "org.apache.beehive.controls.test.controls.extension.SubControlBean"); assertEquals("In_ExtensibleControl_Interface", sub.accessInheritedProperty()); } COM: <s> tests getting the property set inherited from extensible control from a subcontrol instance </s>
funcom_train/39533948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(Point2D delta){ if(! isSelectionLocked()){ //getting the scaled translation factors Point2D scaledDelta=svgHandle.getTransformsManager(). getScaledPoint(delta, true); //getting the current action manager actionSelectionManager=getSelectionManager(); if(actionSelectionManager!=null){ //translating the elements actionSelectionManager.validateTranslateAction( new HashSet<Element>(selectedElements), new Point(0, 0), scaledDelta); } } } COM: <s> translates the currently selected points by the provided factors </s>
funcom_train/639361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshGraph(int type){ for (ReachabilityGraphPanel rgp : panels) { if(rgp.isShowing()){ try { rgp.layoutGraph(rgp.getSelectedType(), true); } catch (SimulationRunningException e) { ReachabilityWarning.showReachabilityWarning(this, "QuanlAna.ReachabilityGraph.SimulationWarning"); rgp.setRefreshButtonEnabled(true); rgp.setGraphOutOfSync(true); } } } this.repaint(); } COM: <s> recomputes the rg </s>
funcom_train/7609575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String interpretStream(InputStream inputStream) throws IOException { //Initialize stack = new Stack(); programCounter = new ProgramCounter(); //Create our stack factory factory to parse the input PureFactory pureFactory = new PureFactory(); Factory factory = Factory.getInstance(pureFactory); //Parse the input stream InstrList instrList = factory.InstrListFromFile(inputStream); //get the stack program programListing = (LabelInstrList) instrList.getChildAt(0); //Run the program return runInterpreter(); } COM: <s> parses the given </s>
funcom_train/3784678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { /* stop */ /* [1] disable stuff */ flickerFlag= false; dziFlicker.flickerWindFlag= false; dziRight.flickerWindFlag= false; runT= null; /* [2] Suspend until do timeout - start may wake it up */ isSuspendedFlag= true; } /* stop */ COM: <s> stop stop or suspend flicker threads </s>
funcom_train/43293632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IStatus runInWorkspace(IProgressMonitor monitor) { //initalized? if(!m_FXLBuild.isInitialized()){ m_FXLBuild.init(m_Project); } //do the actual work in here try { m_FXLBuild.build(m_Deltas, m_Monitor); } catch (CoreException e) { OutputHandler.writeDebug("Couldn't build project "+m_Project.toString()); e.printStackTrace(); return Status.CANCEL_STATUS; } return Status.OK_STATUS; } COM: <s> runs a specific fxl builder as a workspace job </s>
funcom_train/124519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkIndices(int i, int j) { if (i >= rows() || j >= cols() || i < 0 || j < 0) throw new IllegalArgumentException("[" + i + "," + j + "] is not a valid index for " + toString() + "."); } COM: <s> checks whether the indices are valid throws exception if not </s>
funcom_train/19845574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Color fromString(String rgb) { if (rgb == null || rgb.length() != 6) return Color.white; return new Color(Integer.parseInt(rgb.substring(0, 2), 16), Integer .parseInt(rgb.substring(2, 4), 16), Integer.parseInt(rgb .substring(4, 6), 16)); } COM: <s> converts a string to a color </s>
funcom_train/11055252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertEquals(String msg, Fraction[] m, Fraction[] n) { if (m.length != n.length) { Assert.fail("vectors have different lengths"); } for (int i = 0; i < m.length; i++) { Assert.assertEquals(msg + " " + i + " elements differ", m[i],n[i]); } } COM: <s> verifies that two vectors are close sup norm </s>
funcom_train/51616114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object addNamespace(String prefix, String URI) { Node pi = doc.createProcessingInstruction("xml:namespace", "ns='"+ URI +"' prefix='"+ prefix +"'"); doc.insertBefore(pi, doc.getFirstChild()); return new Namespace(prefix, URI); } COM: <s> add a namespace to the document </s>
funcom_train/6206613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleWebFlowAdded(IFile file) { IContainer container = file.getParent(); IGaijinResourceElement parentElement = GaijinCore.getModel().findElement(container); if (parentElement != null) { IGaijinWebFlowGroup group = (IGaijinWebFlowGroup) parentElement; try { group.addWebFlow(file); addWebFlowGroupToUpdate(group); } catch (GaijinModelException e) { asyncSetErrorMarkerForResource(file, e.getMessage()); } } } COM: <s> handle the addition of a file that represents a web flow </s>
funcom_train/49251069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String createErrorMessage(String errorMessage, String xmlData) { StringBuffer message = new StringBuffer(); message.append(xmlPrefix); message.append("<response success=\"false\">"); // Error code message.append("<error_status>"); message.append(FAILED); message.append("</error_status>"); // Error message if (errorMessage != null) { message.append("<message>"); message.append(errorMessage); message.append("</message>"); } // Data in well formed XML format but with no <?xml...> prefix if (xmlData != null) { message.append(xmlData); } message.append("</response>"); return message.toString(); } COM: <s> creates a failure message in xml format </s>
funcom_train/2039365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processElapsedDays(GregorianCalendar lower, GregorianCalendar greater) { GregorianCalendar tmp = (GregorianCalendar) lower.clone(); do { tmp.add(Calendar.DAY_OF_YEAR, 1); if (tmp.equals(greater) || tmp.before(greater)) { lower.add(Calendar.DAY_OF_YEAR, 1); this.days++; } } while (tmp.before(greater)); } COM: <s> process elapsed days </s>
funcom_train/8686593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConfiguredOutputMapper(Mapper outputMapper) { if (isReference()) { throw noChildrenAllowed(); } if (this.outputMapper != null) { if (usingOutput) { throw new BuildException("attribute \"output\"" + " cannot coexist with a nested <outputmapper>"); } else { throw new BuildException("Cannot have > 1 <outputmapper>"); } } this.outputMapper = outputMapper; } COM: <s> add the output file mapper </s>
funcom_train/21157427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(LineAnnotatedString str, Object[] objects) { try { return format(str.toString(), objects); } catch (Exception e) { String detail = " in file " + str.getFilename() + ", line " + str.getLine(); throw new WrappedException(new JSSPException("Error formatting string '" + str.toString() + "'" + detail, e)); } } COM: <s> for special resource file strings use this method </s>
funcom_train/4628749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Text createFileControl(Composite container, String setting) { Label label; GridData gd; Text nameText; label = new Label(container, SWT.NULL); label.setText(setting); nameText = new Text(container, SWT.BORDER | SWT.SINGLE); gd = new GridData(GridData.FILL_HORIZONTAL); nameText.setLayoutData(gd); nameText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { dialogChanged(); } }); label = new Label(container, SWT.NULL); label.setText(".tcl"); return nameText; } COM: <s> creates file text box </s>
funcom_train/35412764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButtonNewAccount() { if (buttonNewAccount == null) { buttonNewAccount = new JButton(); buttonNewAccount.setText("New"); buttonNewAccount.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { JDialog dialog = new AccountDialog(); dialog.setVisible(true); } }); } return buttonNewAccount; } COM: <s> this method initializes button new account </s>
funcom_train/6451627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event removeAtomicEvent() { Iterator<Event> i = E.iterator(); while (i.hasNext()) { Event e = i.next(); if (e.getIntention() != null && e.getIntention().isAtomic()) { i.remove(); return e; } } return null; } COM: <s> remove and returns the event with atomic intention null if none </s>
funcom_train/3022352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TypeSummary getTypeSummary(FileSummary summary) { Iterator iter = summary.getTypes(); while (iter.hasNext()) { TypeSummary next = (TypeSummary)iter.next(); String temp = next.getName() + ".java"; if (temp.equals(summary.getName())) { return next; } } return null; } COM: <s> returns the type summary that has the same name as the file summary </s>
funcom_train/35293365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharSequence getCodeString() { return String.format("new %s(\"%s\",\"%s\",%s,%s,%s)", getClass() .getSimpleName(), id, defaultResource, type == null ? "null" : Type.class.getSimpleName() + '.' + type.name(), Utils .toStringConstant(encoding), Utils.toStringConstant(filter)); } COM: <s> return a java code representation of this resource </s>
funcom_train/10482352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] buffer, int offset, int length) { int available = size() - offset; length = Math.min(length, available); // nothing to return? quit now. if (length <= 0) { return 0; } System.arraycopy(buf, offset, buffer, 0, length); return length; } COM: <s> read a buffer of data from the output streams accumulator </s>
funcom_train/5659431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String s = "valueName='" + valueName + "', " + "value='" + value + "', " + "snmpOid='" + snmpOid + "', " + "snmpTrapMin='" + snmpTrapMin + "', " + "snmpTrapMax='" + snmpTrapMax + "'"; return s; } COM: <s> returns a formatted string of this objects values </s>
funcom_train/19105545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swapSortOrder( int col ) { // flip order for that column columnOrder[ col ] = columnOrder[ col ] ^ true; // reorder interestVector.sortBy( col, columnOrder[ col] ); //System.out.println("Swapped order of column " + col ); // update panel if( interestPanel != null ) interestPanel.updateTable(); } COM: <s> toggles the sort order between ascending and descending </s>
funcom_train/32056983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetScrollableUnitIncrement() { System.out.println("testGetScrollableUnitIncrement"); String name = "test"; String[] files = new String[2]; for (int x = 0; x < 2; x++) files[x] = "file" + x; GPLibraryPanel lPanel = new GPLibraryPanel(name, files, 2); GPLibraryPanel.ScrollablePanel scroll = lPanel.getPanel(); assertTrue(scroll.getScrollableUnitIncrement(new Rectangle(20, 20), 2, 2) == 10); } COM: <s> test of get scrollable unit increment of class </s>
funcom_train/43045383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyAsync(String id, TwitterListener listener) { getDispatcher().invokeLater(new AsyncTask(DESTROY, listener, new String[] {id}) { public void invoke(TwitterListener listener,Object[] args) throws TwitterException { listener.destroyed(destroy( (String) args[0])); } }); } COM: <s> discontinues friendship with the specified in the id parameter as the authenticating user </s>
funcom_train/26625367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean AssignTask(Runnable task) { synchronized(this) { Start(); // creates and starts the thread if not yet running if(this.task == null) { this.task=task; notifyAll(); // signals run() to start working (first wait-loop) return true; } else { System.err.println("ReusableThread.AssignTask(): already working on a thread !"); return false; } } } COM: <s> assigns a task to the thread </s>
funcom_train/5395094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createButtons() { buttonPanel = new JPanel(); sendFile = new JButton("Send"); sendFile.addActionListener(this); saveFile = new JButton("Save"); saveFile.addActionListener(this); buttonPanel.add(sendFile); buttonPanel.add(saveFile); return buttonPanel; } // end createButtons() COM: <s> creates our operating buttons </s>
funcom_train/29714213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isINarcedBy(int nTeamID) { for (Enumeration e = iNarcPods.elements();e.hasMoreElements(); ) { INarcPod pod = (INarcPod)e.nextElement(); if (pod.getTeam() == nTeamID && pod.getType() == INarcPod.HOMING) return true; } return false; } COM: <s> have we been i narced with a homing pod from that team </s>
funcom_train/48495517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMPICommandReceiver() { new Thread(new Runnable() { public void run() { Comm c = ClusterManager.getInstance().getComm(); ObjectBuf<ModelManagerCommand> cmdBuf = ObjectBuf.buffer(); while (true) { try { // Receive a command c.broadcast(0, ClusterManager.CMD_DATA, cmdBuf); } catch (Exception e) { logger.error(e); } // Put the received command into the command queue sendCommand(cmdBuf.get(0)); } } }).start(); } COM: <s> creates a special mpi command receiver </s>
funcom_train/29939232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCaret() { if (caretUpdateNeeded && (consoleWidget != null)) { Display display = Display.getCurrent(); display.asyncExec(new Runnable() { @Override @SuppressWarnings("synthetic-access") public void run() { consoleWidget.setCaretOffset(getDocument().getLength()); caretUpdateNeeded = false; } }); } } COM: <s> updates the console caret when some interactive messages from the </s>
funcom_train/45622820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGenerateFullPathsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CscType_generateFullPaths_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CscType_generateFullPaths_feature", "_UI_CscType_type"), MSBPackage.eINSTANCE.getCscType_GenerateFullPaths(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the generate full paths feature </s>
funcom_train/34319738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JQueryResultSet execute() throws JQueryException { // in case any modifications to the query string happen here JQuery q = applyFilters(); q.bindVariables(); JQueryResultSet result; if (chosenVars.isEmpty()) { String[] v = getVariables(); result = q.execute(v); } else { String[] v = (String[]) chosenVars.toArray(new String[chosenVars.size()]); result = q.execute(v); } return result; } COM: <s> executes the query and returns the results </s>
funcom_train/49469706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PortalObject getCompliantAssetsEvolution(String graphType, String timeScale, String scanStatus, String period) throws Exception{ Db db = dbRO(); try { _logger.info("Portal : getCompliantAssetsEvolution: "+graphType+","+timeScale+","+scanStatus+","+period); return PortalDataProvider.getCompliantAssetsEvolution(db, graphType, timeScale, scanStatus, period); } catch (Exception e) { store(e); throw e; } finally { db.safeClose(); } } COM: <s> get compliant assets evolution evolution of assets compliant with a policy tool </s>
funcom_train/40516880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyPotentiometerChange() { for (int i = 0; i < potentiometerListeners.size(); i++) { ((JagPotentiometerListener) potentiometerListeners.elementAt(i)) .countDidChange(new JagPotentiometerEvent(this, JagPotentiometerEvent.DISTANCE, getState(DISTANCE), (getState(DISTANCE) == Sensor.TRUE))); } } COM: <s> notifies all code jag potentiometer listener code s that potentiometer </s>
funcom_train/44398411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(boolean b) { selected = b; if (b) { this.setEnabledAt(2, true); this.setSelectedIndex(2); this.setEnabledAt(1, false); } else { this.setEnabledAt(2, false); jButton1.setEnabled(false); jList.clearSelection(); } } COM: <s> selected property setter </s>
funcom_train/17413853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long queryForLong(String sql, Object[] args, int[] argTypes) throws JDBCException { Number number = (Number)queryForObject(sql, Long.class, args, argTypes); return (number != null ? number.longValue() : 0); } COM: <s> prepared statement sql select select </s>
funcom_train/34110644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rename(String path) { // ServiceDefTarget endPoint = (ServiceDefTarget) folderService; // endPoint.setServiceEntryPoint(Config.OKMFolderService); // folderService.rename(((GWTFolder)actualItem.getUserObject()).getPath(), path,callbackRename); Main.get().mainPanel.navigator.status.setFlagRename(); hideMenuPopup(); } COM: <s> rename a folder on actual item </s>
funcom_train/2807874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unification unify(Fact f) { if (!functorAndArityEquals(f)) { return null; } for (int i = 0; i < terms.length; i++) { Fact f1 = (Fact) terms[i]; Fact f2 = (Fact) f.terms[i]; if (f1.unify(f2) == null) { return null; } } return Unification.empty; } COM: <s> a speedier version of code unify structure s code </s>
funcom_train/12225953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; Image imageIcon; try { imageIcon = ImageIO.read(new URL(URL)); imageIcon=imageIcon.getScaledInstance(200, 125,Image.SCALE_SMOOTH); g.drawImage(imageIcon,0,0,null); g2d.setFont(new Font("new Roman", Font.PLAIN, 30)); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> this method paint an image onto the backgroud of the panel </s>
funcom_train/26126105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleIncomingRequest(final MsrpSendRequest request) { try { super.checkAndPerform(new Callable<Object>() { public Object call() throws Exception { inboundFSM.receivedSendRequest(request); return null; } }, BOUND); } catch (UnhandledConditionException e) { //current state doesn't allow this } catch (Exception e) { Logger.e(TAG, "", e); } } COM: <s> called from the i o layer upon receiving a request </s>
funcom_train/46761106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemLocationModel getItemLocation(final long itemLocationId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return InventoryData.getItemLocation(itemLocationId, chain, call); }}; return (ItemLocationModel) call(method, call); } COM: <s> same transaction return the single item location model for the primary key </s>
funcom_train/25339453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeAttribute(java.lang.String namespace, java.lang.String attName, java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (namespace.equals("")) { xmlWriter.writeAttribute(attName, attValue); } else { registerPrefix(xmlWriter, namespace); xmlWriter.writeAttribute(namespace, attName, attValue); } } COM: <s> util method to write an attribute without the ns prefix </s>
funcom_train/1382332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JDateChooser getDataChooserDal() { if (dataChooserDal == null) { dataChooserDal = new JDateChooser("dd/MM/yyyy", "##/##/##", '_'); dataChooserDal.setPreferredSize(new Dimension(150, 20)); dataChooserDal.setDate(new Date()); } return dataChooserDal; } COM: <s> this method initializes data chooser dal </s>
funcom_train/36794980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readContents(File aFile) throws IOException { Reader tempReader = new InputStreamReader(new FileInputStream(aFile), ENCODING); try { StringBuilder tempResult = new StringBuilder(); char[] buf = new char[8192]; int tempRead = 0; while ((tempRead = tempReader.read(buf)) >= 0) { tempResult.append(buf, 0, tempRead); } return tempResult.toString(); } finally { tempReader.close(); } } COM: <s> reads the contents of the given file into a string </s>
funcom_train/14160509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DOMSource toDOMSource(Source source) throws ParserConfigurationException, IOException, SAXException, TransformerException { if (source instanceof DOMSource) { return (DOMSource) source; } else if (source instanceof SAXSource) { return toDOMSourceFromSAX((SAXSource) source); } else if (source instanceof StreamSource) { return toDOMSourceFromStream((StreamSource) source); } else { return null; } } COM: <s> converts the source instance to a </s>
funcom_train/39067161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removePointers(ITextEditor editor) { EditorInstructionPointerContext context = (EditorInstructionPointerContext)pointerContexts.get(editor); if (context == null) return; Object input = editor.getEditorInput(); IDocumentProvider provider = editor.getDocumentProvider(); if (provider == null) return; IAnnotationModel model = provider.getAnnotationModel(input); Annotation[] annotations = context.getAnnotations(); for (int i = 0; i < annotations.length; i++) { model.removeAnnotation(annotations[i]); } context.clearAnnotations(); pointerContexts.remove(editor); } COM: <s> removes all the arrow annotations from the given editor </s>
funcom_train/50884438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPut() { ss.put(1); ss.put(2); ss.put(-15); assertTrue(ss.compareTo(new byte[] { 1, 2, -15 }) == 0); ss.put(123); ss.put(45); ss.put(-126); assertTrue(ss.compareTo(new byte[] { 1, 2, -15, 123, 45, -126 }) == 0); } COM: <s> tests that put stores the correct set of bytes </s>
funcom_train/9877023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getMaxHeight(int[] nodeOrder, float[] height) { float max = Float.MIN_VALUE; for (int i=0; i<nodeOrder.length-1; i++) { max = Math.max(max, height[nodeOrder[i]]); } return max; } COM: <s> returns max height of the tree nodes </s>
funcom_train/32216933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visitNode(MergeNode node) throws TranslationException { // MergeNodes should have just one out transition checkSingleOutgoingTransition(node); // reserve state for merge node and get target node ActivityEdge outTransition = node.getOutgoing(null); ActivityNode target = outTransition.getTarget(); // create the command createGuard(node, true, true); createTransition(target, 1d, true); dispatchNodeVisit(target); } COM: <s> visits a merge node </s>
funcom_train/8716339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PDFGlyph getGlyphFromCMap(PDFFont font, char src) { int fontID = cmap.getFontID(src); char charID = cmap.map(src); if (font instanceof Type0Font) { font = ((Type0Font) font).getDescendantFont(fontID); } return font.getCachedGlyph(charID, null); } COM: <s> get a glyph from a cmap given a type0 font and a character </s>
funcom_train/1148889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand11() { if (okCommand11 == null) {//GEN-END:|204-getter|0|204-preInit // write pre-init user code here okCommand11 = new Command("Ok", Command.OK, 0);//GEN-LINE:|204-getter|1|204-postInit // write post-init user code here }//GEN-BEGIN:|204-getter|2| return okCommand11; } COM: <s> returns an initiliazed instance of ok command11 component </s>
funcom_train/47191991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(InputStream in) throws java.io.IOException { if (in.available() > 2000000) { throw new IOException("Font too big"); } this.file = IOUtils.toByteArray(in); this.fsize = this.file.length; if (fsize > 2000000) { throw new IOException("Font too big"); } this.current = 0; } COM: <s> initializes class and reads stream </s>
funcom_train/2903166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponentManager(Object[] manager){ if(manager != null){ for(int i=0; i<manager.length; i++){ if(manager[i] instanceof ZLauncherManager){ launcherManager = (ZLauncherManager)manager[i]; } else if(manager[i] instanceof ZDockManager){ dockManager = (ZDockManager)manager[i]; } else if(manager[i] instanceof ZWorkspaceManager){ workspaceManager = (ZWorkspaceManager)manager[i]; } } } } COM: <s> set the component managers </s>
funcom_train/3674566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadState(InputStream in) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { DocumentBuilder builder = factory.newDocumentBuilder(); setXML(builder.parse(in)); } catch (Throwable e) { throw new XMLException("Unable to build xml:" + e); } } COM: <s> loads the xml from the inputstream </s>
funcom_train/48588359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AclEntry deleteAccessControl(String userEmail, String domainName, String calendarId) throws ServiceException, IOException, Exception { prepareCalendarService(domainName, calendarId); URL url = new URL(ACL_FEED_URL); AclFeed aclFeed = service.getFeed(url, AclFeed.class); for (AclEntry aclEntry : aclFeed.getEntries()) { if (userEmail.equals(aclEntry.getScope().getValue())) { aclEntry.delete(); return aclEntry; } } return null; } COM: <s> deletes a user from a calendars access control list preventing that </s>
funcom_train/20269509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getAddingRoot(JSModule m) { if (m != null) { Node root = moduleRoots.get(m); if (root != null) { return root; } root = compiler.getNodeForCodeInsertion(m); if (root != null) { moduleRoots.put(m, root); return root; } } return defaultRoot; } COM: <s> gets a script node for code insertion in </s>
funcom_train/38808807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getChild(final String name, final Namespace ns) { // final List elements = content.getView(new ElementFilter(name, ns)); final List elements = content.getView(ElementFilter.newInstance( instanceFactory, name, ns)); final Iterator iter = elements.iterator(); if (iter.hasNext()) { return (Element) iter.next(); } return null; } COM: <s> this returns the first child element within this element with the given </s>
funcom_train/28146829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result put(Object target, long propertyId, Object value, CallProtocol callProtocol) { if(target instanceof List) { List l = (List)target; if(isWithinBounds(propertyId, l)) { try { l.set((int)propertyId, value); return Result.ok; } catch(ClassCastException e) { return Result.noRepresentation; } catch(UnsupportedOperationException e) { return Result.notWritable; } } } return Result.noAuthority; } COM: <s> puts an element into the list </s>
funcom_train/19318551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char getChar(Object value) throws MessageFormatException { if(value == null) { return ((Character) null).charValue(); } else if(value instanceof Character) { return ((Character) value).charValue(); } else { throw new MessageFormatException("Can't convert value of type " + value.getClass().getName() + " to Char"); } } COM: <s> convert value to char </s>
funcom_train/18199802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLastSynchronization(String tableName) throws StatementNotExecutedException { String query = String.format("SELECT Zustand FROM %s LIMIT 1", tableName); //$NON-NLS-1$ try { ResultSet rs = executeSelect(query); if (rs.next()) { return rs.getString(1); } return "0"; } catch (SQLException e) { log.error("MySQL Error occurred.", e); throw new StatementNotExecutedException(query); } } COM: <s> get last time when table has been changed </s>
funcom_train/4231215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void execute() { try { Iterator it = oldBounds.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); setCellBounds(entry.getKey(), (Rectangle2D) entry.getValue()); } graph.getGraphLayoutCache().edit(nestedMap, null, null, null); fitViewport(graph); //graph.setAntiAliased(true); } finally { graph = null; nestedMap = null; oldBounds.clear(); newBounds.clear(); context = null; clip = null; step = 0; } } COM: <s> executes the actual change on the graph layout cache </s>