__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25204915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void toEnc() throws IOException, FontException { // read all glyphs from the encoding vectors List<String> readenc = new ArrayList<String>(); readAllGlyphName(readenc); // get the glyph names form the afm file. List<String> names = readGlyphNames(); Collections.sort(names); // remove all names from readenc in names removeExistingNames(readenc, names); createEncFiles(names); createIncSty(); } COM: <s> create encoding vectors </s>
funcom_train/27748350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeProject() throws BuildException { this.project.init(); this.project.setUserProperty("ant.version", "1.5.1"); this.project.setUserProperty("ant.file", this.buildFile.getAbsolutePath()); this.projectInitialized = true; } COM: <s> initializes the project </s>
funcom_train/1570689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(256); sb.append("<"); sb.append(this.getClass().getSimpleName()); // TODO: add some reference-id sb.append(":"); this.appendAttributesToDescription(sb); sb.append(">"); return sb.toString(); } COM: <s> nsobject overrides to string to ensure a consistent output format for </s>
funcom_train/15624192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addToken(final int length, final byte id) { if (id >= Token.INTERNAL_FIRST && id <= Token.INTERNAL_LAST) { throw new InternalError("Invalid id: " + id); } if (length == 0) { return; } tokens.add(new Token(length, id)); } COM: <s> adds a token to the token list </s>
funcom_train/8985241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String addEmailLinkByID(String output, Integer id) { String email = UserInfoFactory.getUserEmailAddress(id); output = "<nobr>" + output + "</nobr>"; if ( !Utility.isEmpty(email) ) { return "<a href='mailto:" + email + "'>" + output + "</a>"; } else { return output; } } COM: <s> add a hyperlink to the email of the user with the given id </s>
funcom_train/38354854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeLastMessage() { if (lastmessage != null) { int n = numMessages(); output.println("DELE "+ lastmessage); String r = nextLine(); if (n > numMessages() && r.startsWith("+OK")) return true; } return false; } COM: <s> remove the last message we fetched </s>
funcom_train/34427996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateHeaders(TableInformation info) { // Heach manager represent a column and know how to generate the header of this row Iterator it = this.managers.iterator(); ColumnManager current = null; while (it.hasNext()) { current = (ColumnManager) it.next(); current.generateHeader(info, this.res); } } COM: <s> generating the table headers </s>
funcom_train/20128803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSigned(String column) throws SQLException { if (index.containsKey(column)) { return signed[index.get(column).intValue()]; } else { final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND; throw new SQLException("Column " + column + " does not exist in resultset.", state.name(), state.code()); } } COM: <s> indicates whether values in the designated column are signed numbers </s>
funcom_train/45774006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(String description, String text, int stepIndex) { m_descreptionTextArea.setText(description); m_stepIndex = stepIndex; setButtonsProperties(); m_stepTextArea.setText(text); m_message.setTitle(m_stepTitledBorder + m_stepIndex); m_contentPane.updateUI(); } COM: <s> set properties for the current step </s>
funcom_train/23878906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TerminationHandler xml2TerminationHandler(TerminationHandler terminationHandler, Element terminationHandlerElement) { if (terminationHandler == null) { terminationHandler = BPELFactory.eINSTANCE .createTerminationHandler(); terminationHandler.setElement(terminationHandlerElement); } // Save all the references to external namespaces saveNamespacePrefix(terminationHandler, terminationHandlerElement); terminationHandler .setActivity(getChildActivity(terminationHandler, terminationHandlerElement)); xml2ExtensibleElement(terminationHandler, terminationHandlerElement); return terminationHandler; } COM: <s> converts an xml termination handler element to a bpel termination handler </s>
funcom_train/2546502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ManualActivityModel getManualActivity() { ManualActivityModel model = new ManualActivityModel(); if (txtName.getText().length() == 0 || txtDesc.getText().length() == 0) return null; model.setDescription(txtDesc.getText()); model.setName(txtName.getText()); return model; } COM: <s> gets the command model associated with this activity </s>
funcom_train/31100981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String dateToString(int[] date) { StringBuffer message = new StringBuffer(8); message.append('-'); message.append('-'); message.append(date[M]); message.append('-'); message.append(date[D]); message.append((char)date[utc]); return message.toString(); } COM: <s> converts g month day object representation to string </s>
funcom_train/32779794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() throws ModelException{ switch(this.typeAnimation){ case StatisticGrafic.ANIMATION_LastValue: this.updateLastValue(); //System.out.println("update LastValue "+statistic.getId()); break; case StatisticGrafic.ANIMATION_TimeValueDiagram: this.updateTimeValueDiagram(); //System.out.println("update TimeValue "+statistic.getId()); break; case StatisticGrafic.ANIMATION_Histogram: this.updateHistogram(); //System.out.println("update Histogram "+statistic.getId()); break; } } COM: <s> updates the statistic grafic instance </s>
funcom_train/49402482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void emptyTestHelper(final String terminator, final boolean lastLineTerminated) { final String input; if (lastLineTerminated) { input = terminator; } else { input = ""; } final StringLineReader slr = new StringLineReader(input); final String output = slr.readLine(); if (lastLineTerminated) { Assert.assertEquals(output, ""); } Assert.assertNull(slr.readLine()); } COM: <s> various test cases where there is no input except perhaps a line terminator </s>
funcom_train/12158293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processProcessingInstruction (ProcessingInstruction pi) { String targetName = pi.getTarget (); ProcessingInstructionTarget target = (ProcessingInstructionTarget) piTargets.get (targetName); if (target == null) { println ("Ignoring processing instruction '" + pi + "'"); } else { target.handleProcessingInstruction (this, targetName, pi.getData ()); } } COM: <s> process a processing instruction </s>
funcom_train/44014078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstWord(String str) { String firstWord = str; Matcher firstNonWordMatcher = nonWord.matcher(str); if (firstNonWordMatcher.find()) { int firstNonWord = firstNonWordMatcher.start(); if (firstNonWord == 0) { // non-word token at beginning of string - this is the first // word firstWord = str.substring(0, 1); } else { firstWord = str.substring(0, firstNonWord); } } return firstWord.toLowerCase(Locale.ENGLISH); } COM: <s> get the first word from the string </s>
funcom_train/35192744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setEqual() { if ((!"".equals(cache2)) && (!"".equals(operator))) { calculate(); } else if (("".equals(cache2)) && (!"".equals(operator))) {// repeat // last // operation cache2 = lastEnteredNum; calculate(); } else if ("".equals(cache1)) { result = "0"; } else { result = cache1; } equalIsEntered = true; return result; } COM: <s> checks wheter there are both the operator and the operands are entered </s>
funcom_train/35099458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasOperationPrivilege( final HttpServletRequest request ) { final HttpSession session = request.getSession(false); if ( session == null ) return false; final Company company = (Company) session.getAttribute(Constants.COMPANY_SESSION_OBJECT_ATTRIBUTE_NAME); // judges operation privilege final boolean hasPrivilege = company != null; return hasPrivilege; } COM: <s> judges current customer whether having operation privilege or not </s>
funcom_train/7640553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killSelectedClient() { if (mCurrentClient != null) { Client client = mCurrentClient; // reset the selection to the device. TreePath treePath = new TreePath(new Object[] { mCurrentDevice }); TreeSelection treeSelection = new TreeSelection(treePath); mTreeViewer.setSelection(treeSelection); client.kill(); } } COM: <s> kills the selected </s>
funcom_train/102549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void graphSelectedCrossdate() { // get the row int row = table.getSelectedRow(); // get the year (== end-date of moving sample) HighScore score = (HighScore) crossdate.getHighScores().getScores().get(row); Year y = score.movingRange.getEnd(); // new cross at this offset new GraphWindow(crossdate, y); } COM: <s> make a new graph in a new window from the selected crossdate </s>
funcom_train/28158645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawMultiline(final List<Point> points) { if (points.size() > 0) { Point prev = points.get(0); Point cur; for (int i = 1; i < points.size(); i++) { cur = points.get(i); drawLine(prev, cur); prev = cur; } } } COM: <s> draw a freeform line defined by a list of points </s>
funcom_train/19908006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOgnl_04() throws Exception{ Person p1 = new Person(); Person p2 = new Person(); p1.setName("风"); p2.setName("云"); Map<String,Person> context = new HashMap<String,Person>(); context.put("p1", p1); context.put("p2", p2); // 需要加上#才表示到context中取数据,否则表示从根目录下取值 String value = (String)Ognl.getValue("#p1.name + ',' + #p2.name", context, new Object()); System.out.println(value); } COM: <s> 1 fact username </s>
funcom_train/48269147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCollectingNetworkHints() { MockDataDispatcher mockDispatcher = new MockDataDispatcher(); dispatchTestNetworkEvents(mockDispatcher); ReportDataCollector dataCollector = new ReportDataCollector(mockDispatcher); ReportData data = dataCollector.gatherDataWithinWindow(0, 22); List<HintRecord> hints = data.getHints(); assertEquals(1, hints.size()); } COM: <s> tests collecting hints attached to network resource related events </s>
funcom_train/31435758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFile(String fileText, String fileNameOut) { System.out.println("File name writing = "+fileNameOut); try { PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(fileNameOut))); out.println(fileText); out.flush(); out.close(); } catch (Exception e) { e.printStackTrace();} } COM: <s> this takes a file name and writes the string information </s>
funcom_train/22093005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendReject( Message msg, String strRejectCode ) { msg.resetCommand( c_namReject ); msg.addAttribute( new StringAttribute( c_namRejectCode, strRejectCode ) ); try { send( msg ); } catch (IOException e) { _log.warning( "can't write REJECT message" ); } } COM: <s> sends a reject message based on the received score message </s>
funcom_train/51812381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSerializeWithParms() throws Exception { serializer.serialize(oos, equalsMethod); ObjectInputStream ois = new ObjectInputStream( new ByteArrayInputStream( bytesOut.toByteArray())); Method method = serializer.deserialize(ois); assertEquals("Methods not the same", equalsMethod, method); } COM: <s> test that verifies serialization with a method with parameters </s>
funcom_train/47019511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getHelpCommand1() { if (helpCommand1 == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here helpCommand1 = new Command(getLocalizedString("Help"), Command.HELP, 1);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return helpCommand1; } COM: <s> returns an initiliazed instance of help command1 component </s>
funcom_train/781259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void retrieveCollection() throws JspException { // Do nothing if collection is there already if (collection != null) { return; } // Locate collection Object o = TagUtils.getInstance().lookup(pageContext, name, property, scope); if (o instanceof Collection) { collection = (Collection) o; } } COM: <s> retrieve the collection from the tag parameters to the collection </s>
funcom_train/44019064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFromWindowMenu(EditWindow window) { for (Component c : getRobocodeEditorMenuBar().getWindowMenu().getMenuComponents()) { if (c instanceof WindowMenuItem) { WindowMenuItem item = (WindowMenuItem) c; if (item.getEditWindow() == window) { getRobocodeEditorMenuBar().getWindowMenu().remove(item); getRobocodeEditorMenuBar().getMoreWindowsDialog().removeWindowItem(item); break; } } } } COM: <s> adds the given window to the window menu </s>
funcom_train/7456295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSensorsWithDependencies(ArrayList<Sensor> sensorList) { //first remove corrupt sensors from preselection list for (Sensor sensor : sensorList) { this.preselectedSensors.remove(sensor); } //second reset all affected userinputs to dummy value resetCorruptUserInputs(sensorList); //third reset all affected conditions in rules this.resetCorruptConditions(sensorList); } COM: <s> method that removes given sensors from preselection list and resets all </s>
funcom_train/50505913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JBossResourceReference getResourceRef(String refName) { Iterator iter = resourceReferences.iterator(); while(iter.hasNext()) { JBossResourceReference ref = (JBossResourceReference) iter.next(); if(ref.getName().equals(refName)) { return ref; } } return null; } COM: <s> gets the resource ref attribute of the jboss class settings object </s>
funcom_train/31527352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processTry(SymTabAST tree){ BlockDef block = makeBlock(tree); SymTabAST slist = tree.getFirstChildOfType(JavaTokenTypes.SLIST); SymTabAST everythingElse = (SymTabAST)slist.getNextSibling(); symbolTable.pushScope( block ); walkTree( slist, false ); symbolTable.popScope(); walkSiblings( everythingElse, false ); } COM: <s> process the given sym tab ast as a try block </s>
funcom_train/18149928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAcknowledgedBy(Acknowledgement acknowledgedBy) { // create the association set if it doesn't exist already if(_acknowledgedBy == null) _acknowledgedBy = new AssociationSetImpl<Acknowledgement>(); // add the association to the association set getAcknowledgedBy().add(acknowledgedBy); // make the inverse link acknowledgedBy.setAcknowledges(this); } COM: <s> adds an association acknowledged by </s>
funcom_train/10521150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LineItem getLineItem(String itemId) { for(int i = 0; i < _itemList.size(); i++) { if(_itemList.get(i).getItem().getItemId().equals(itemId)) return _itemList.get(i); } return null; } COM: <s> internal method to lookup a cart item based on an item id </s>
funcom_train/39166001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write() throws IOException { finish(); File newGappFile = Files.fileFromURL(gappFileURL); FileOutputStream fos = new FileOutputStream(newGappFile); BufferedOutputStream out = new BufferedOutputStream(fos); XMLOutputter outputter = new XMLOutputter(Format.getRawFormat()); outputter.output(gappDocument, out); } COM: <s> write out the possibly modified gapp file to its new location </s>
funcom_train/41679204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Rectangle setClipRect(Graphics g, Rectangle rc) { int l = g.getClipX(); int t = g.getClipY(); int b = t + g.getClipHeight(); int r = l + g.getClipWidth(); Rectangle res = new Rectangle(t, l, b, r); g.setClip(rc.left, rc.top, rc.width(), rc.height()); return res; } COM: <s> set new clip rectangle </s>
funcom_train/32015500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsValid() throws SQLException { // we want our own connection, because we want to close it ourselves Connection conn = Util.getConnection(); assertTrue( Util.isValid(conn) ); // try closing connection try { conn.close(); } catch (Exception e) { } assertFalse( Util.isValid(conn) ); } COM: <s> tests the util </s>
funcom_train/44625054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCExpression autobox(JCExpression e, Type boxedtype) { factory.at(e.pos); //Type boxed = Types.instance(context).boxedClass(vartype).type; Name valueof = names.fromString("valueOf"); JCExpression s = factory.Select(factory.Type(boxedtype),valueof); s = factory.Apply(null,s,List.<JCExpression>of(e)); return s; } COM: <s> returns an unattributed expression tree that boxes the given </s>
funcom_train/42225850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here exitCommand = new Command("Sair", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/37013402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToZip(Resource resource, ZipOutputStream out) throws Exception { InputStream in = resource.getInputStream(); try { int byteCount = 0; byte[] buffer = new byte[FileCopyUtils.BUFFER_SIZE]; int bytesRead = -1; while ((bytesRead = in.read(buffer)) != -1) { out.write(buffer, 0, bytesRead); byteCount += bytesRead; } out.flush(); } finally { try { in.close(); } catch (IOException ex) { logger.warn("Could not close InputStream", ex); } } } COM: <s> copy file to zip without closing the output stream </s>
funcom_train/36082431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lookAt(fVector3 direction, fVector3 up ) { tmpZaxis.set( direction ).normalizeLocal(); tmpXaxis.set( up ).crossLocal( direction ).normalizeLocal(); tmpYaxis.set( direction ).crossLocal( tmpXaxis ).normalizeLocal(); fromAxes( tmpXaxis, tmpYaxis, tmpZaxis ); } COM: <s> code look at code is a convienence method for auto setting the </s>
funcom_train/28757073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String newVal) { if ((newVal != null && this.title != null && (newVal.compareTo(this.title) == 0)) || (newVal == null && this.title == null && title_is_initialized)) { return; } this.title = newVal; title_is_modified = true; title_is_initialized = true; } COM: <s> setter method for title </s>
funcom_train/8936542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrefixTree getSubTree(String entity) { if (entity == null) { return null; } if (entity.length() == 0) { return this; } char index = entity.charAt(0); if (children.containsKey(index)) { return children.get(index).getSubTree(entity.substring(1)); } else { return null; } } COM: <s> get sub tree with the specified entity as a root </s>
funcom_train/23393645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWhoPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NormAct_who_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NormAct_who_feature", "_UI_NormAct_type"), FactPackage.Literals.NORM_ACT__WHO, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the who feature </s>
funcom_train/45739488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FoldHolder transform(){ for (int i=0;i<folds.size();i++){ List<Dataset> fold=folds.get(i); List<String> features=featureRanking.rankingFor(fold.get(0)); fold.get(0).select(features); fold.get(1).select(features); } return new FoldHolder(folds); } COM: <s> applies feature selection over folds </s>
funcom_train/37242669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort() { Phrase [] arr = this.getPhraseArray(); quickSort(arr, 0, arr.length-1); this.phraseList.removeAllElements(); this.phraseList.ensureCapacity(arr.length); for(int i=0;i<arr.length; i++) { phraseList.add(arr[i]); } } COM: <s> orders the phrases in the phrase list by start time </s>
funcom_train/9817355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public String quoted_string() throws ParseException { String temp; String retVal; jj_consume_token(QUOTESTRING); temp = token.toString(); retVal = new String(temp.substring(1,temp.length()-1)); /* System.out.println(retVal); */ {if (true) return retVal;} throw new Error("Missing return statement in function"); } COM: <s> parses a string which is surrounded by double quotes but does not </s>
funcom_train/39116563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculatePlayArea() { int width = (int) (cardRect.width * 2.5 ); int height = (int) (cardRect.height * 1.5); int x = (canvas.getBounds().width / 2) - (width / 2); int y = (canvas.getBounds().height / 2) - (height / 2); playRect = new Rectangle(x, y, width, height); } COM: <s> calculates the location of the play area which </s>
funcom_train/7880826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jle(String bin) { // get operands int r1 = Integer.parseInt(bin.substring(8, 11), 2); int r2 = Integer.parseInt(bin.substring(11, 14), 2); // test condition if (twosCompliment(getBinReg(r1)) <= twosCompliment(getBinReg(r2))) { regLC = effAdr(bin) - 1; } else { // increment LC by 4 } } COM: <s> description jump if less than or equal to br </s>
funcom_train/49097926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|49-getter|1|49-postInit // write post-init user code here }//GEN-BEGIN:|49-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/4918042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testShortFlag() throws Exception { this.record_Factory(COMMAND, "short", "s", false); this.record_Command(COMMAND, "short", "s"); this.record_Argument(COMMAND, "short", null); this.doTest("-s", COMMAND); } COM: <s> ensure can parse command with short flag </s>
funcom_train/45917800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onF6Action() { if (!player.isPlayback()) { if (informationRenderer.isVisible()) { informationRenderer.setVisible(false); } if (productionRenderer.isVisible()) { productionRenderer.setVisible(false); } if (!researchRenderer.isVisible()) { researchRenderer.selectCurrentTech(); } if (!researchRenderer.isVisible()) { uiSounds.playSound("Research"); researchRenderer.startAnimations(); } researchRenderer.setVisible(true); layers.validate(); } } COM: <s> action for f6 keypress </s>
funcom_train/9114023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login() throws ChatException { SessionFactory hfactory = null; try { hfactory = (SessionFactory) ctx.lookup(hibernateSessionFactory); String repositoryName = context.getCallerPrincipal().getName(); manager.login(hfactory.openSession(), repositoryName); } catch (Exception e) { if (e instanceof ChatException) { throw (ChatException) e; } throw new ChatException(e); } finally { } } COM: <s> login to the server </s>
funcom_train/27844951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() throws Exception { // Init the model _listmodel.setList(_testElements); _modelWrapper.reset(); // Call addAll _listmodel.add("elem2"); assertEquals(-1, _modelWrapper.getValueChange(_listmodel.getPointerToRoot())); assertEquals( ModelChangeTypes.VALUE_ADDED, _modelWrapper.getValueChange(PointerFactory.getIndexedPointer(2))); } COM: <s> method test add is testing add </s>
funcom_train/807321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleDoubleClick(DoubleClickEvent e) { // Only act on single selection ISelection selection = e.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection structured = (IStructuredSelection)selection; if (structured.size() == 1) { Object first = structured.getFirstElement(); treeViewer.setExpandedState(first, !treeViewer.getExpandedState(first)); } } } COM: <s> the mouse has been double clicked in the tree perform appropriate </s>
funcom_train/23792859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void putFieldHelper(Instruction s, BasicBlock b) { PutField pf = (PutField)s; FieldOperand locOp = pf.getField(); Field field = locOp.getField(); registerUse(s, field); registerDef(s, b, field); } COM: <s> record the effects of a putfield instruction on the heap array </s>
funcom_train/3991708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static final public int parseInt(String what, int otherwise) { try { int offset = what.indexOf('.'); if (offset == -1) { return Integer.parseInt(what); } else { return Integer.parseInt(what.substring(0, offset)); } } catch (NumberFormatException e) { } return otherwise; } COM: <s> parse a string to an int and provide an alternate value that </s>
funcom_train/3423137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void returnToPool(CharacterBuffer buffer) { if (buffer.isExternal) { if (fExternalTop < fExternalBufferPool.length - 1) { fExternalBufferPool[++fExternalTop] = buffer; } } else if (fInternalTop < fInternalBufferPool.length - 1) { fInternalBufferPool[++fInternalTop] = buffer; } } COM: <s> returns buffer to pool </s>
funcom_train/45602242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStartTime() { Calendar now = new GregorianCalendar(); mainWindow.getFrom().setHours(now.get(Calendar.HOUR)); if (now.get(Calendar.AM_PM) == now.get(Calendar.PM)) { final int noonOffset = 12; mainWindow.getFrom().setHours(mainWindow.getFrom().getHours() + noonOffset); } mainWindow.getFrom().setMinutes(now.get(Calendar.MINUTE)); mainWindow.getFrom().setSeconds(now.get(Calendar.SECOND)); } COM: <s> action for setting start time to now </s>
funcom_train/18894481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setup() throws Exception { //instantiate model = new DefaultTableModel(); //initialize setRenderer(); setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); getTableModel().addColumn("Property"); getTableModel().addColumn("Value"); getTableHeader().setVisible(true); getTableHeader().setResizingAllowed(true); //add setModel(model); } COM: <s> initializes and sets up </s>
funcom_train/9703408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleDirectoryBrowse() { DirectoryDialog fileDialog = new DirectoryDialog(this.getShell()); String dirName = fileDialog.open(); if (dirName != null) { if (!checkFilenameExistsInList(dirName)){ javaClasspathList.add(dirName); updateListEntries(); } } updateStatusTextField(false,""); } COM: <s> pops up the file browse dialog box </s>
funcom_train/25788880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { final Class<?>[] paramTypes = this.executeMethod.getParameterTypes(); final StringBuilder stb = new StringBuilder(); stb.append(this.executeMethod.getName()); stb.append('('); Util.append(stb, paramTypes); stb.append(')'); return stb.toString(); } COM: <s> returns the name of the method </s>
funcom_train/47184558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean PatientInList(PatientBean pb, String date) { Iterator<PatientVisitBean> it = visits.iterator(); PatientVisitBean visitBean; while (it.hasNext()){ visitBean = it.next(); if(visitBean.getPatientName().equals(pb.getFullName())){ if(visitBean.getLastOVDateY().compareTo(date) < 0){ visitBean.setLastOVDate(date); } return true; } } return false; } COM: <s> checks to see if a patient is in the list of visits </s>
funcom_train/1210653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void edit(RequestContext requestContext) { editorDriver = GWT.create(Driver.class); editorDriver.initialize(requestFactory, expenseEditor); if (requestContext == null) { fetchAndEdit(); return; } editorDriver.edit(expense, requestContext); dialog.center(); } COM: <s> construct and display the ui that will be used to edit the current </s>
funcom_train/36920953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public U predictNext() { U best = null; double max = -1.0f; for(U u : unitsSeen) { double temp = knowledgeBase.getValueFromModel(u); //System.out.println(u + "(" + temp + ") > " + best + "(" + max + ")"); if(temp > max) { max = temp; best = u; } } return best; } COM: <s> predicts the next character in the sequence by seeing which gaussian </s>
funcom_train/17416056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeFileItemUIs() { for (int i = 0, len = this.fileListItemUIs.size(); i < len; i++) { this.fileListItemUIs.get(i).removeItemSelectionListeners(); } this.fileListItemUIs = new ArrayList<ListItemUI>(20); } COM: <s> we must cleanup listeners while removing old item ui </s>
funcom_train/9183713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TVRLimeTuple out(TupleType type, Location whereto, ITuple t) { // parameter checking if (type == null || whereto == null || t == null) throw new IllegalArgumentException("null value"); if (whereto.isUnspecified()) throw new InvalidLocationException( "destination cannot be unspecified"); TVRLimeTuple tlt = TVRLimeTuple.createMaster(type, whereto, t); LimeTuple result = lts.out(tlt.toFlatTuple()); return new TVRLimeTuple(result); } COM: <s> out a tuple to a specific destination location </s>
funcom_train/29870419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void actionJEditTemplateFieldAddButton(ActionEvent e) { if ((curTemplate!=null)) { curField = new Field("",Field.TEXT,"", curTemplate.getName()); // add to template curTemplate.addField(curField); actionJEditTemplateFieldUpdateButton(e); } else { System.err.println("curTemplate =null in actionJEditTemplateFieldAddButton"); } } COM: <s> function called whenever the add button is clicked </s>
funcom_train/37191075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent mouseEvent) { final Object source = mouseEvent.getSource(); Object[][] records; fromCode = true; if(tableModel.getRowCount() == 0) { // Startin a new row tableModel.addRow(); tableModel.setSelectionInterval(0); table.revalidate(); table.repaint(); tableModel.setSelectionInterval(pastRow); listRow = new int[1]; listRowData = new Object[1][][]; } fromCode = false; } COM: <s> method for receivieng mouse clicked event </s>
funcom_train/8992196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getWorkflowGroupList() throws Exception { List tempList = new ArrayList(); WorkflowGroupDAObject wfgDAObj = new WorkflowGroupDAObject (sessionContainer,conn); try{ tempList = wfgDAObj.getFullList(); }catch(Exception e){ throw new Exception(e); } return tempList; } COM: <s> get workflow group list </s>
funcom_train/50152381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startRefreshTimer() { Calendar cal = new GregorianCalendar(); int curmins = 60 * cal.get(Calendar.HOUR_OF_DAY) + cal.get(Calendar.MINUTE); int midnight = 1440 - curmins; Timer updatetimer = new Timer("SysTrayTimer"); updatetimer.schedule(new TimerTask() { @Override public void run() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { updateImage(); } }); } }, midnight * 60 * 1000, 24 * 60 * 60 * 1000); } COM: <s> start a timer that updates the date icon each day </s>
funcom_train/19698690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createIndexes() { String indexdir = settingsConfig.getValue("indexdir"); try { // Get languages from LanguageManager Collection<Language> languages = LanguageManager.getInstance().getLanguages(); for (Language language : languages) { File indexPath = new File(indexdir, language.getIndex()); createIndex(indexPath, language.getLanguage()); } } catch (Exception e) { log.error("createIndexes " + e.getMessage(), e); } } COM: <s> create all indexes one per language </s>
funcom_train/34888995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startWaiting() { try { // Wait for SyncFlag to be true. processorSyncFlag.waitUntilTrue(0); } catch (InterruptedException e) { errEntry.setThrowable(e); errEntry.setAppContext("notifyAndStartWaiting()"); logger.logError(errEntry); } } COM: <s> waits for processor sync flag to be true </s>
funcom_train/8569514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { for (int z = 0; z < depth; z++) { for (int y = 0; y < height[z]; y++) { for (int x = 0; x < width[z]; x++) { activation[z][y][x] = 0; } } } } COM: <s> reset object to initial state clear all activation </s>
funcom_train/39314505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetScrollableTracksViewportWidth() { System.out.println("testGetScrollableTracksViewportWidth"); boolean expected = false; boolean actual = sp.getScrollableTracksViewportWidth(); assertEquals(expected,actual); System.out.println("Done testGetScrollableTracksViewportWidth"); } COM: <s> test of get scrollable tracks viewport width method of class scrollable picture </s>
funcom_train/2558090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instance getInstance(InputNode node) throws Exception { Position line = node.getPosition(); Value value = getOverride(node); if(value == null) { throw new ElementException("Array length required for %s at %s", type, line); } Class type = value.getType(); return getInstance(value, type); } COM: <s> creates the array type to use </s>
funcom_train/16526513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintExcept(Graphics g, SenseComponent toIgnore) { paintBackground(g); /* paint children */ Graphics relativeContext = g.create(position.x, position.y, size.width, size.height); for (int i = childrenCount - 1; i >= 0; i--) { if (children[i] != toIgnore) { children[i].paintExcept(relativeContext, toIgnore); } } paintForeground(g); } COM: <s> recursively paint everything that isnt to ignore this is checked by the </s>
funcom_train/3763587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectToDatabase() throws RpException { try { if (cachedConnection == null) { // Ensure the Driver is loaded Class.forName(driverName); cachedConnection = DriverManager.getConnection( connectionString, userName, password); } } catch (SQLException sqle) { sqle.printStackTrace(); throw new RpException(sqle); } catch (ClassNotFoundException cnfe) { throw new RpException(cnfe); } } COM: <s> setup the database connection </s>
funcom_train/19367044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIRIPrefix(String idPrefix, String iriPrefix) { if(idPrefix == null) { throw new NullPointerException("idPrefix must not be null"); } if(iriPrefix == null) { throw new NullPointerException("iriPrefix must not be null"); } idPrefix2IRIPrefixMap.put(idPrefix, iriPrefix); } COM: <s> sets the iri prefix for a given id prefix </s>
funcom_train/37862962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MatchListener getMatchListener(NodeProxy proxy) { MatchListener first = null; MatchListener current, previous = null; for (IndexWorker worker : indexWorkers.values()) { current = worker.getMatchListener(broker, proxy); if (current != null) { if (first == null) { first = current; } else { previous.setNextInChain(current); } previous = current; } } return first; } COM: <s> returns the match listener for this node </s>
funcom_train/43246244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDischargeType() { System.out.println("setDischargeType"); String dischargeType = ""; AdmissionObject instance = new AdmissionObject(); instance.setDischargeType(dischargeType); // 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 discharge type method of class org </s>
funcom_train/46165139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntrance(String name, Entrance entrance) { // Check parameters if (name == null && entrance == null) { throw new NullPointerException( "Parameters name and entrance can not be null."); } else if (name == null) { throw new NullPointerException("Parameter name can not be null."); } else if (entrance == null) { throw new NullPointerException( "Parameter entrance can not be null."); } entrances.put(name, entrance); } COM: <s> adds a named entrance to this location </s>
funcom_train/17787220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCacheDescriptor(String sessionID, int type, int qualifier) { if (!clientSessionTargets.containsKey(sessionID)) { throw new IllegalArgumentException("There is none session with the id \"" + sessionID + "\""); } clientSessionTargets.get(sessionID).setCacheDescriptor(type, qualifier); } COM: <s> sets the cache descriptor form type and qualifier for the session </s>
funcom_train/20643890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMax(double max) { if (xOwner.getAcceptedReducType() != ACCEPT_REDUC_FULL) return; if (max == -1 || max >= 0) { if (max != xMax) { xMax = max; if (max != -1 && xMax < xMin) xMin = xMax; fireDataChange(); } } } COM: <s> set the maximum value </s>
funcom_train/43694779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reload() { if (getActive()==null) { return; } getLog().info("RELOAD " + this.getClass().getSimpleName() + "("+getConversationName()+":"+getConversationId()+") : reload "+getActive().getId()); getEm().refresh(getActive()); } COM: <s> called from dialog to rollback </s>
funcom_train/11009113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfFormattingRun(int index) { if(st.sizeOfRArray() == 0) return 0; int pos = 0; for(int i = 0; i < st.sizeOfRArray(); i++){ CTRElt r = st.getRArray(i); if(i == index) return pos; pos += r.getT().length(); } return -1; } COM: <s> the index within the string to which the specified formatting run applies </s>
funcom_train/3987255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void textSize(float size) { if (textFont != null) { // if ((textMode == SCREEN) && (size != textFont.size)) { // throw new RuntimeException("textSize() is ignored with " + // "textMode(SCREEN)"); // } textSize = size; textLeading = (textAscent() + textDescent()) * 1.275f; } else { showTextFontException("textSize"); } } COM: <s> sets the text size also resets the value for the leading </s>
funcom_train/49945032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convIdent(final int x) { StringBuilder revname = new StringBuilder(); int num = x, rem = 0; for (int i = IDENT_DIM - 1; i >= 0; i--) { rem = num % 26; num = num / 26; revname.append((char) (rem + 65)); } return revname.reverse().toString(); } COM: <s> convert number to the three letter string containing </s>
funcom_train/47885928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasExtension(File file, ArrayList<String> extGroup) { boolean is = false; if (extGroup != null && extGroup.size() > 0) { String fname = file.getName(); int i = fname.lastIndexOf('.'); if (i != -1) { String e = fname.substring(i + 1); Iterator<String> j = extGroup.iterator(); while (j.hasNext()) { if (is = e.equals(j.next())) break; } } } return is; } COM: <s> this checks if the name of the file has the supplied extension </s>
funcom_train/48407206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRaisedExceptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BehavioralFeature_raisedException_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BehavioralFeature_raisedException_feature", "_UI_BehavioralFeature_type"), SpemxtcompletePackage.eINSTANCE.getBehavioralFeature_RaisedException(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the raised exception feature </s>
funcom_train/13390421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testSetCalculable() { /* States: * Any * Argument combinations: * calculable: valid alculable, null */ ThresholdEvent event = new ThresholdEvent(new Object()); Calculable c = new Calculable(); event.setCalculable(c); Assert.assertSame(c, event.getCalculable()); event.setCalculable(null); Assert.assertSame(null, event.getCalculable()); } COM: <s> tests the code set calculable calculable code method </s>
funcom_train/48493998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stop(int flag) { controller.stop(); receiver.removeDataConsumer(dataFilter); if (dataSet != null) receiver.removeDataConsumer(dataSet.getFilter()); runFlag = false; for (BatchRunEnded event : events) { event.finished(flag); } // Stop automatic snapshot saving Render[] renders = Coordinator.getInstance().getRenders(); for (Render render : renders) { render.disableAutomaticSnapshots(); } } COM: <s> stops a batch run process </s>
funcom_train/11688679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int drainTo(Collection<? super E> c) { int count = 0; final ReentrantLock lock = this.lock; lock.lock(); try { for (InternalQueue<E> internalQueue : queues) { count += internalQueue.drainTo(c); } this.count = this.count - count; } finally { lock.unlock(); } return count; } COM: <s> we always give high priority to highest priority elements </s>
funcom_train/51469105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reallyAddChild(final ModelBit child) throws ModelException { // add it to the list of names allNames.put(child.getName(), child); // deal with the parent/child relationships if (myChildren == null) { myChildren = new ArrayList<ModelBit>(); } myChildren.add(child); child.setParent(this); } COM: <s> do the actual adding of a child to the parent </s>
funcom_train/35838924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MediaIndex getMediaIndex(String sMeetingID) { MediaIndex match = null; MediaIndex ind = null; int count = vtMediaIndexes.size(); for (int i=0; i<count; i++) { ind = (MediaIndex)vtMediaIndexes.elementAt(i); if (ind.getMeetingID().equals(sMeetingID)) { match = ind; break; } } return match; } COM: <s> return the media index for the given meeting </s>
funcom_train/10522782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSqlEscape() throws Exception { ResultSet rs = testCtrl.getJustOneUser("fname='tester4'"); assertNotNull(rs); rs.next(); String name = rs.getString("FNAME"); assertEquals(name, "tester4"); rs.close(); } COM: <s> test query with sql escape </s>
funcom_train/11642412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StrBuilder appendWithSeparators(Iterable<?> iterable, String separator) { if (iterable != null) { separator = (separator == null ? "" : separator); Iterator<?> it = iterable.iterator(); while (it.hasNext()) { append(it.next()); if (it.hasNext()) { append(separator); } } } return this; } COM: <s> appends a iterable placing separators between each value but </s>
funcom_train/26245366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getTemperature() { if (planet == null) return 0; switch (planet.getTemperature()) { case UltraHot: return +15; case ExtremelyHot:return +10; case VeryHot: return +6; case Hot: return +3; case Warm: return +1; case Standard: return 0; case Cool: return -1; case Cold: return -3; case VeryCold: return -6; case ExtremelyCold: return -10; case UltraCold: return -15; } return 0; } COM: <s> get the temperature of the world </s>
funcom_train/26382209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getFile(String file) throws FilerCommunicationException, FilerTimeoutException { if( getFileProperties(file) == null) return null; Request(CMD_GET_FILENAME,file.toCharArray()); Request(CMD_INIT_GET,dummy); char[] buff=new char[PACKET_DATA_SIZE]; return new FilerInputStream(Request(CMD_GET_DATA,buff)); } COM: <s> retrive file from palmtop </s>
funcom_train/805754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IWizardCategory findChildCollection(IPath searchPath) { assert invariant() : "PRE: The invariant holds"; if (searchPath == null) { throw new IllegalArgumentException(); } String searchString = searchPath.segment(0); for (WizardCategory category : categories) { if (category.getId().equals(searchString)) { if (searchPath.segmentCount() == 1) { return category; } return category.findChildCollection(searchPath .removeFirstSegments(1)); } } return null; } COM: <s> returns the wizard collection child object corresponding to the passed </s>