__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37821547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setViews() { rootPanel.setLayout(new BorderLayout()); panelLayers = new JPanel(new CardLayout()); panelLayers.add(editor.getView(), EDITOR); panelLayers.add(transformator.getView(), TRANSFORMATION); panelLayers.add(simulator.getView(), SIMULATION); rootPanel.add(panelLayers); } COM: <s> add all views in a </s>
funcom_train/21263729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Reglas entity) { EntityManagerHelper.log("saving Reglas instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved reglas entity </s>
funcom_train/4208873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startQueueListener() { final Runnable queueListener = new Runnable() { public void run() { while (true) { try { String jid = queue.take(); getVCard(jid); } catch (InterruptedException e) { e.printStackTrace(); } } } }; TaskEngine.getInstance().submit(queueListener); } COM: <s> listens for new vcards to lookup in a queue </s>
funcom_train/28423682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String execute(File f) { if (f == null) throw new IllegalArgumentException("file cannot be null"); Date date = new Date(f.lastModified()); String lm; if (format != null) lm = new SimpleDateFormat(format).format(date); else lm = date.toString(); return lm; } COM: <s> checks if the given file is writable </s>
funcom_train/22426192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeAnyRows() { List<TimeBarRow> rows = new ArrayList<TimeBarRow>(); int rowCount = this.getRowCount(); for(int i=0; i<rowCount; i++) { rows.add(getRow(i)); } for(TimeBarRow row: rows) { remRow(row); } } COM: <s> removes all and any rows present </s>
funcom_train/48388393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMembers(Canvas... members) { if(!isCreated()) { setAttribute("members", members, true); } else { Canvas[] membersToRemove = getMembers(); for(Canvas member : membersToRemove) { removeMember(member); } for(Canvas member : members) { addMember(member); } } } COM: <s> an array of canvases that will be contained within this layout </s>
funcom_train/37190336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object runStatement(int type, String sqlString) throws SQLException { Object object = createStatement(type, null); try { switch(type) { case STATEMENT_EXECUTE: ((java.sql.Statement)object).execute(sqlString); break; default: object = runQuery((java.sql.Statement)object, sqlString); break; } } catch(SQLException e) { ((java.sql.Statement)object).close(); throw new SQLException(e.toString()); } return object; } COM: <s> returns a java </s>
funcom_train/1198954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPlayingTimeString() { String str; long time = getPlayingTime(); long mins = time / 60; long secs = Math.round((((double)time / 60) - (long)(time / 60)) * 60); str = mins + ":"; if( secs < 10 ) { str += "0" + secs; } else { str += "" + secs; } return str; } COM: <s> return a formatted version of the get playing time method </s>
funcom_train/1884438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSourceDataEventRecorded(StringTree st, SourceData data) { EventRecorded e = new EventRecorded(); e.eventType = st.value; for (StringTree ch : st.children) { if ("DATE".equals(ch.tag)) { e.datePeriod = ch.value; } else if ("PLAC".equals(ch.tag)) { e.jurisdiction = ch.value; } else { unknownTag(ch); } } } COM: <s> load the data for a recorded event from a string tree node </s>
funcom_train/45354648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCbRange() { if (cbRange == null) { cbRange = new JComboBox(); cbRange.setBounds(282, 31, 97, 18); cbRange.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { UpdateList(); } }); } return cbRange; } COM: <s> this method initializes j combo box2 </s>
funcom_train/11754115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure(Binder binder) { binder.bind(PluginActionManager.class).to(PluginActionManager.class); binder.bind(ActionManager.class).to(PluginActionManager.class); binder.bind(Application.class).to(PluginApplication.class); binder.bind(PlatformInitializer.class).to( GenericPlatformInitializer.class); binder.bind(WidgetFactory.class).to(DefaultWidgetFactory.class); binder.bind(ProjectValidator.class).to(DefaultProjectValidator.class); } COM: <s> bind plugin specific classes </s>
funcom_train/24118329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doShow5Days(Event event) throws InterruptedException { this.cal.setMold("default"); btn_Show1Day.setStyle(btnOriginColor); btn_Show5Days.setStyle(btnPressedColor); btn_ShowWeek.setStyle(btnOriginColor); btn_Show2Weeks.setStyle(btnOriginColor); btn_ShowMonth.setStyle(btnOriginColor); this.cal.setFirstDayOfWeek("monday"); this.cal.setDays(5); try { synchronizeModel(); } catch (ParseException e) { e.printStackTrace(); } } COM: <s> changes the view for 5 days view </s>
funcom_train/19244867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(final KernelQedeqBo bo) { int index; while (0 <= (index = props.indexOf(bo))) { final String label = (String) labels.get(index); label2Context.remove(label); props.remove(index); labels.remove(index); contexts.remove(index); } } COM: <s> delete a given qedeq bo already from list </s>
funcom_train/29699432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeMinefield(Minefield mf) { if (game.containsVibrabomb(mf)) { game.removeVibrabomb(mf); } game.removeMinefield(mf); Enumeration<Player> players = game.getPlayers(); while (players.hasMoreElements()) { Player player = players.nextElement(); removeMinefield(player, mf); } } COM: <s> removes the minefield from the game </s>
funcom_train/32007398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getChkLogging() { if (chkLogging == null) { chkLogging = new JCheckBox(); chkLogging.setText("show Logging"); chkLogging.setHorizontalTextPosition(SwingConstants.TRAILING); chkLogging.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { scrLogging.setVisible(chkLogging.isSelected()); validate(); } }); } return chkLogging; } COM: <s> this method initializes chk logging </s>
funcom_train/20308138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof Functor) { Functor f2 = (Functor)obj; if (name.equals(f2.name) && args.length == f2.args.length) { for (int i = 0; i < args.length; i++) { if (!args[i].sameValueAs(f2.args[i])) return false; } return true; } } return false; } COM: <s> equality is based on structural comparison </s>
funcom_train/26454820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLog() { // Invoke the log // The other log method is not tested since it calls the same as we do //TODO /*getAdmin().log(TEST_LOG, System.out); getAdmin().log("", System.out); getAdmin().log(null, System.out); getAdmin().log(TEST_LOG, null); */ } COM: <s> perform a call to the log method </s>
funcom_train/29548097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSelectedConceptUri() { TreePath treePath=treeTable.tree.getSelectionPath(); if(treePath!=null) { DefaultMutableTreeNode node=(DefaultMutableTreeNode)treePath.getLastPathComponent(); if(node!=null) { return ((NotebookOutlineNode)node).getUri(); } } return null; } COM: <s> get uri of the selected concept </s>
funcom_train/7720804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFontSize(int size) { // get the current selected font Font curf=textArea.getFont(); // get the name of this font String name=curf.getName(); // create a new font based on the old one with new size Font newf=new Font(name,Font.PLAIN,size); // set this new font into the textArea textArea.setFont(newf); } COM: <s> set the fontsize of the text area to new size </s>
funcom_train/40678065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(final HAVE_DATA listener) { connect(HAVE_DATA.class, listener, new GstCallback() { @SuppressWarnings("unused") public boolean callback(Pad pad, Buffer buffer) { listener.haveData(pad, buffer); return true; } }); } COM: <s> add a listener for the code have data code signal on this </s>
funcom_train/3375383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void actionPropertyChanged(Action action, String propertyName) { if (propertyName == Action.ACTION_COMMAND_KEY) { setActionCommandFromAction(action); } else if (propertyName == "enabled") { AbstractAction.setEnabledFromAction(this, action); } else if (Action.SHORT_DESCRIPTION == propertyName) { AbstractAction.setToolTipTextFromAction(this, action); } } COM: <s> updates the comboboxs state in response to property changes in </s>
funcom_train/7273528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void install(MessageRouter router) { router.setUDPMessageHandler(LimeAckMessageImpl.class, this); router.setUDPMessageHandler(LimeDataMessageImpl.class, this); router.setUDPMessageHandler(LimeFinMessageImpl.class, this); router.setUDPMessageHandler(LimeKeepAliveMessageImpl.class, this); router.setUDPMessageHandler(LimeSynMessageImpl.class, this); } COM: <s> installs this handler on the given router </s>
funcom_train/45623545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResolvedModulesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResolveComReferenceType_resolvedModules_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResolveComReferenceType_resolvedModules_feature", "_UI_ResolveComReferenceType_type"), MSBPackage.eINSTANCE.getResolveComReferenceType_ResolvedModules(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the resolved modules feature </s>
funcom_train/44897981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object call() throws EJBException { if (method == null) throw new EJBException("null method invocation"); Object result; try { result = method.invoke(target, args); } catch (Exception e) { throw new EJBException("invocation failed", e); } return result; } COM: <s> invokes the method specified on the target object with the pre registered at </s>
funcom_train/3410083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTrafficClass(int tc) throws SocketException { if (tc < 0 || tc > 255) throw new IllegalArgumentException("tc is not in range 0 -- 255"); if (isClosed()) throw new SocketException("Socket is closed"); getImpl().setOption(SocketOptions.IP_TOS, new Integer(tc)); } COM: <s> sets traffic class or type of service octet in the ip </s>
funcom_train/43154714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchSource() { try { String version = System.getProperty("version"); if (version == null) { SwitchSource.main("-dir", "src", "-auto"); } else { SwitchSource.main("-dir", "src", "-version", version); } } catch (IOException e) { throw new RuntimeException(e); } } COM: <s> switch the source code to the current jdk </s>
funcom_train/18896976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUID() throws Exception { String currentUID = ""; for (int i = 0; i < NUM_UIDS; i++) { currentUID = UIDGenerator.generateUID(); //is it unique?? if (uids.contains(currentUID)) { fail("UID set already contains UID [" + i + "]: " + currentUID); } uids.add(currentUID); } } COM: <s> tests that uid are unique </s>
funcom_train/17047563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPushEnd() { boolean result = true; for (AtnState curPushState = pushState; curPushState != null; curPushState = curPushState.pushState) { // check for rule end, but don't verifyPop because push is not necessarily at end of constituent if (!curPushState.isRuleEnd(false)) { result = false; break; } } return result; } COM: <s> determine whether all push states would pop to rule ends </s>
funcom_train/47824798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processCommand() { // Send command to 'runner' (unless handcraft command) if(cli.getText().trim().equalsIgnoreCase("clear")) { console.setText("osgi>clear\n"); cli.setText(""); } else if(runner!=null && runner.isRunning()) { console.append("\n\nosgi>"+cli.getText().trim()+"\n"); runner.processCommand(cli.getText()); cli.setText(""); } } COM: <s> process command waiting at cli text box </s>
funcom_train/12164457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHostRelativeAsset() throws Exception { // Default Strings // Test Project RuntimeProject projectMock = createProject("http://www.volantis.com/webapp/"); // Test case 5 - Host relative Asset doRelativeOrAbsoluteTest("/a/b/c.png", projectMock, "", "http://www.volantis.com/webapp/a/b/c.png"); } COM: <s> test a host relative asset </s>
funcom_train/33281827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object jsxGet_applets() { if (applets_ == null) { applets_ = new HTMLCollection(getDomNodeOrDie(), false, "HTMLDocument.applets") { @Override protected boolean isMatching(final DomNode node) { return node instanceof HtmlApplet; } }; } return applets_; } COM: <s> returns the value of the java script attribute applets </s>
funcom_train/2037614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isThumbUploaded() { if (thumbImage !=null && !thumbImage.isEmpty()) { String imageURL = thumbImage.getSrc(); return !(DEFAULT_HORIZONTAL_THUMB_IMAGE.equals(imageURL) || DEFAULT_VERTICAL_THUMB_IMAGE.equals(imageURL)); } return false; } COM: <s> not upload the default thumb image </s>
funcom_train/22277107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(Encoder encoder) throws CodingException { encoder.encodeString(NAME_KEY, name); encoder.encodeObject(TP_MANAGER_KEY, manager); encoder.encodeObject(COMMANDS_VECTOR_KEY, commands); encoder.encodeInt(TYPE_KEY, type); } COM: <s> encodes the target proxy </s>
funcom_train/36386147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forEachValue( TCharProcedure procedure ) { Object[] keys = _set; char[] values = _values; for ( int i = values.length; i-- > 0; ) { if ( keys[i] != FREE && keys[i] != REMOVED && ! procedure.execute( values[i] ) ) { return false; } } return true; } COM: <s> executes tt procedure tt for each value in the map </s>
funcom_train/20846071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HTTPRequest getRequest(BufferedInputStream reader, OutputStream out) { String requestLine = reader.readCRLFTerminatedLine(); if (requestLine == null) { Log.warn("Error in HTTP request. Request empty?"); return null; } HTTPRequest request; try { request = new HTTPRequest(requestLine); } catch (Exception e) { Log.warn("Error in HTTP request. Could not parse request."); HTTPUtil.badRequest(out, e.getMessage()); return null; } return request; } COM: <s> read in a http request from the given reader </s>
funcom_train/10671074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result testMulticastEventSource() { try { if (eventSetDescriptor[0].isUnicast()) { throw new Exception("mistake in isUnicast"); } return passed(); } catch (Exception e) { e.printStackTrace(); return failed(e.getMessage()); } } COM: <s> if bean is multicast event source verify it using is unicast method </s>
funcom_train/9672989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNext(char separator) throws ParseException { int start = actualPosition; while (true) { // Check what's next char nextCharacter = lookForward(0); if (nextCharacter == separator) // Separator found break; else if (nextCharacter == '\0') throw new ParseException("EOL reached", 0); shiftPosition(1); } return this.sample.substring(start, this.actualPosition); } COM: <s> get the next token from the buffer </s>
funcom_train/22092944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void subRequest( String strMime, byte[] yaData ) { _log.entering( "SymbolRequest", "subRequest" ); filter( _iRequest, _iSubreq, strMime, yaData ); _log.exiting( "SymbolRequest", "subRequest" ); } COM: <s> starts a sub request filtering from a mimetype </s>
funcom_train/8328551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParallelPeriodMinValue() { String query = "with " + "member [measures].[foo] as " + "'([Measures].[unit sales],ParallelPeriod([Time].[Quarter], -2147483648))' " + "select " + "[measures].[foo] on columns, " + "[time].[1997].children on rows " + "from [sales]"; executeQuery(query); } COM: <s> tests that integeer </s>
funcom_train/11730149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDate() throws RepositoryException { Value val = PropertyUtil.getValue(prop); Calendar calendar = val.getDate(); assertEquals("Conversion from Long value to Date value is not correct.", val.getLong(), calendar.getTimeInMillis()); } COM: <s> tests conversion from long type to date type </s>
funcom_train/39408299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJListReport() { if (jListUserConfig == null) { jListUserConfig = new JList(); jListUserConfig.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent e) { if(e.getKeyCode() == KeyEvent.VK_ENTER) { select(); } } }); userConfigListModel = new DefaultListModel(); jListUserConfig.setModel(userConfigListModel); } return jListUserConfig; } COM: <s> this method initializes j list user config </s>
funcom_train/21707752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TrackedFileSummary getTrackedFile(long fileNum) { /* * Use a local variable to access the array since the snapshot field * can be changed by other threads. */ TrackedFileSummary[] a = snapshot; for (int i = 0; i < a.length; i += 1) { if (a[i].getFileNumber() == fileNum) { return a[i]; } } return null; } COM: <s> returns one file from the snapshot of tracked files or null if the </s>
funcom_train/22501431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStyleRange(StyleRange range) { checkWidget(); if (isListening(LineGetStyle)) return; if (range != null) { if (range.isUnstyled()) { setStyleRanges(range.start, range.length, null, null, false); } else { setStyleRanges(range.start, 0, null, new StyleRange[]{range}, false); } } else { setStyleRanges(0, 0, null, null, true); } } COM: <s> adds the specified style </s>
funcom_train/4921411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleManagedObjectSource() { // Record building the office floor this.record_officeFloorBuilder_addOffice("OFFICE"); this.record_officeFloorBuilder_addManagedObject( "MANAGED_OBJECT_SOURCE", ClassManagedObjectSource.class, 10, "class.name", SimpleManagedObject.class.getName()); this.record_managedObjectBuilder_setManagingOffice("OFFICE"); // Compile the office floor this.compile(true); } COM: <s> tests compiling a simple </s>
funcom_train/1930146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkMembersHaveInitializedValues(String label) { Tester.checkEqual("INIT", initString, label + " initialized "); Tester.checkEqual((Object) null, initNull, label + " initialized "); Tester.checkEqual((Object) null, initNone, label + " initialized "); Tester.checkEqual(1, initOne, label + " initialized "); } COM: <s> the same method for all variants </s>
funcom_train/39383675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildResourceConfig(File dir) { File[] dirContents = dir.listFiles(); for(File file : dirContents) { if(file.isFile() && file.getName().endsWith(".gar")) { logger.info(file.getAbsolutePath()); this.build(file); } else if(file.isDirectory()) { buildResourceConfig(file); } } } COM: <s> builds the resource config for the given grass resource builder </s>
funcom_train/5395529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncodeToOutputStream() throws Exception { System.out.println("encodeToOutputStream"); Object data = null; OutputStream s = null; ByteEncodingAlgorithm instance = new ByteEncodingAlgorithm(); instance.encodeToOutputStream(data, s); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of encode to output stream method of class org </s>
funcom_train/32319766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startsWith(String prefix, int index) { int plen = prefix.length(); int count = 0; if ((index < 0) || (index > (length() - plen))) { return false; } while (--plen >= 0) { if (charAt(index++) != prefix.charAt(count++)) { return false; } } return true; } COM: <s> tests if this buffer starts with the specified prefix beginning </s>
funcom_train/42651912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property getAssociatedProperty() { if(associatedPropertyName == null) return null ; try { return getAssociatedClass().requirePropertyInHierarchy(associatedPropertyName); } catch(NoSuchPropertyException e) { throw new IllegalStateException("Invalid association definition. Associated " + "property not found: " + associatedPropertyName); } } COM: <s> returns the associated property </s>
funcom_train/46381739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface SnapshotCreationListener { /** * Notification that a snapshot has been created successfully * @param worldRoot the world root that was created */ public void snapshotCreated(WorldRoot worldRoot); /** * Notification that snapshot creation has failed. * @param reason a String describing the reason for failure * @param cause an exception that caused the failure. */ public void snapshotFailed(String reason, Throwable cause); } COM: <s> a listener that will be notified of the success or failure of </s>
funcom_train/32070349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addDocumentAttachment(DocumentAttachment documentAttachment) { boolean addOk = getDocumentAttachments().add(documentAttachment); if (addOk) { documentAttachment.setLabel((Label)this); } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed document attachment to the label collection </s>
funcom_train/38732042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SessionHandler createWebUISessionHandler(){ SessionManager sessionManager = new HashSessionManager(); HashSessionIdManagerProxy hashSessionIdManagerProxy = new HashSessionIdManagerProxy(); sessionManager.setIdManager(hashSessionIdManagerProxy); sessionManager.setMaxInactiveInterval(Integer.parseInt((Environment .getConfiguration()) .getProperty("wsmx.securitmanager.sessiontimeout"))); SessionHandler sessionHandler = new SessionHandler(sessionManager); sessionHandler.setServer(jettyWebServer); return sessionHandler; } COM: <s> creates a session handler </s>
funcom_train/25797120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showPicture(INotifiableManager manager, String filename) { mConnection.getBoolean(manager, "ClearSlideshow"); mConnection.getBoolean(manager, "PlaySlideshow", filename.substring(0, filename.replaceAll("\\\\", "/").lastIndexOf("/") ) + ";false"); mConnection.getBoolean(manager, "SlideshowSelect", filename ); return playNext(manager); } COM: <s> show the picture file code filename code </s>
funcom_train/12316906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IBrowser createBrowser(boolean external) { if (!initialized) { init(); } //external = external || alwaysUseExternal; //return createBrowserAdapter(forceExternal); if (external) { return new CurrentBrowser(createBrowserAdapter(true), getCurrentBrowserID(), true); } return new CurrentBrowser(createBrowserAdapter(alwaysUseExternal), getCurrentInternalBrowserID(), false); } COM: <s> creates web browser if preferences specify to always use external the </s>
funcom_train/42184078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAncestorListener() { addAncestorListener(new AncestorListener() { public void ancestorAdded(AncestorEvent event) { if (universe == null) { createUniverse(); } } public void ancestorRemoved(AncestorEvent event) { if (universe != null) { disposeUniverse(); } } public void ancestorMoved(AncestorEvent event) { } }); } COM: <s> adds an ancestor listener to this component to manage canvas universe </s>
funcom_train/37830692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRandomPathFrom(final int x, final int y, final int distance) { final int dist2_1 = distance + distance + 1; final int dx = Rand.rand(dist2_1) - distance; final int dy = Rand.rand(dist2_1) - distance; final List<Node> path = new ArrayList<Node>(1); path.add(new Node(x + dx, y + dy)); setPath(new FixedPath(path, false)); } COM: <s> set a random destination as a path </s>
funcom_train/19717097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String storeAlign( String alignId ) { SOAPAction = "storeRequest"; String message = createMessage( "<id>"+alignId+"</id>" ); String answer = sendMessageMonoThread( message, false ); String result[] = getResultsFromMessage( answer, "storeResponse" ); //System.out.println("Stored Align="+ result[0]); return result[0]; } COM: <s> store an alignment on the server </s>
funcom_train/2293695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initFileInfo() { try { // edit an existing user, get the user object from db m_path = getParamResource(); m_title = getCms().readPropertyObject(m_path, CmsPropertyDefinition.PROPERTY_TITLE, false).getValue("-"); } catch (CmsException e) { // should never happen } } COM: <s> initializes the user object </s>
funcom_train/9689459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkClasspathForChanges() { final String curClasspathString = getClassPath().getStringForm(); if (!curClasspathString.equals(this.lastClasspathString)) { setClassPathChanged(true); } this.lastClasspathString = curClasspathString; // updates caches also as a side effect, so can't be skipped if (getClassPath().isAnythingChanged()) { setClassPathChanged(true); } } COM: <s> checks whether the classpath for this project has changed </s>
funcom_train/13774424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readMPS(String fname) { if (id == -1) { id = native_create_lpx(); } native_read_mps(id, fname); nbRows = native_get_num_rows(id); nbCols = native_get_num_cols(id); nbMarkedColumns = 0; nbMarkedRows = 0; } COM: <s> rewrites current lp problem object by that reading from mps file given by </s>
funcom_train/16570501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane2() { if (jScrollPane2 == null) { jScrollPane2 = new JScrollPane(); jScrollPane2.setPreferredSize(new java.awt.Dimension(175, 100)); jScrollPane2.setViewportView(getListCommand()); } return jScrollPane2; } COM: <s> this method initializes j scroll pane2 </s>
funcom_train/43474729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(String key, String value) { try { DHTMessage mesg = new DHTMessage(endPoint.getLocalNodeHandle(), DHTMessage.INSERT, key, value); endPoint.route(GenericFactory.buildId(new BigInteger(key, 16)), mesg, null); } catch (InitializationException e) { e.printStackTrace(); System.exit(-1); } } COM: <s> owner dhtapplication method which permits to send a message with a </s>
funcom_train/51526460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCTable(List<Transaction> tidList) { Hashtable<Transaction,Integer> ct = ctable.getCTable(); for(Transaction t: tidList){ if(t == null)break; boolean containsKey = false; try{ containsKey = ct.containsKey(t); }catch(NullPointerException npe){ // do nothing // can probably remove this, prior bug was causing this exception } if(!containsKey){ ct.put(t, 0); } ct.put(t, ct.get(t)+1); } } COM: <s> update ctable with newest information </s>
funcom_train/51222855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileElement addRecentFile(File value) { Vector<String> recentFiles = getRecentFiles(); if (value != null && value.exists() && value.isFile()) { recentFiles.add(0, value.getAbsolutePath()); } // cut of to maximum number of files if (recentFiles.size() > getNumberOfRecentFiles()) { recentFiles.setSize(getNumberOfRecentFiles()); } setRecentFiles(recentFiles); return this; } COM: <s> add a new opened file </s>
funcom_train/10626930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindRegisteredEditor() { PropertyEditorManager.registerEditor(SampleProperty.class, OtherEditor.class); PropertyEditor pe = PropertyEditorManager .findEditor(SampleProperty.class); assertNotNull("No property editor found", pe); assertTrue(pe instanceof OtherEditor); PropertyEditorManager.registerEditor(SampleProperty.class, null); } COM: <s> the test checks the method find editor for registered editors </s>
funcom_train/3273966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doMouseScroll(int amount) { //System.out.println(amount); if (userInterface.isOrbitKeyDown()) { view.cameraFocusLength *= Math.pow(1.2, amount); viewMoved = true; } else { translationSpeed = (float)Math.min(Math.pow(1.2, amount)*translationSpeed, 1000); } } COM: <s> scrolls the camera focus point in and out </s>
funcom_train/14124801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdownHibernate(XWikiContext context) throws HibernateException { Session session = getSession(context); preCloseSession(session); closeSession(session); if (getSessionFactory()!=null) { ((SessionFactoryImpl)getSessionFactory()).getConnectionProvider().close(); } } COM: <s> allows to shut down the hibernate configuration </s>
funcom_train/25478899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUp() throws Exception { RunConfiguration.getInstance(new String[]{}); LogFactory.getPersistentLog(RunConfiguration.getInstance().getDisplayLogLevel(), RunConfiguration.getInstance().getLogLevel(), RunConfiguration.getInstance().getLogPath()); PointFactory.clear(); PathFactory.clear(); } COM: <s> sets up the run configuration and generates a log entry </s>
funcom_train/5381603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getWaitingLock(Thread current) { int index = indexOf(current, false); //find the lock that this thread is waiting for for (int j = 0; j < graph[index].length; j++) { if (graph[index][j] == WAITING_FOR_LOCK) return locks.get(j); } //it can happen that a thread is not waiting for any lock (it is not really part of the deadlock) return null; } COM: <s> returns the lock the given thread is waiting for </s>
funcom_train/31128576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int connectionStatus() { int status = -1; String cmd = "$WFGS\n"; RS485.hsWrite(cmd.getBytes(), 0, cmd.length()); Delay.msDelay(50); String reply = readFully(false); if(reply.startsWith("WFGS=") && reply.length() > 5) { status = reply.charAt(5) - 48; } else { status = -1; } if(debug) RConsole.println("connectionStatus returning " + status); return status; } COM: <s> get the current connection status </s>
funcom_train/40429174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void animateMove(Widget widget, int left, int top, double dur) { Effect.move(widget, new EffectOption[] { new EffectOption("mode", "absolute"), new EffectOption("x", left), new EffectOption("y", top), new EffectOption("duration", dur) }); } COM: <s> animates a move effect for the given widget w absolute positioning </s>
funcom_train/48209326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String view() { System.out.println("UserAction::view"); UserDao userDao = new UserDao(); GroupDao groupDao = new GroupDao(); user = userDao.get(user.getUserId()); try { user.setGroupName(groupDao.get(user.getGroupId()).getGroupName()); } catch (Exception e) { user.setGroupName("Chưa thuộc group nào"); } return SUCCESS; } COM: <s> action user view user management </s>
funcom_train/43261112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand4() { if (exitCommand4 == null) {//GEN-END:|146-getter|0|146-preInit // write pre-init user code here exitCommand4 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|146-getter|1|146-postInit // write post-init user code here }//GEN-BEGIN:|146-getter|2| return exitCommand4; } COM: <s> returns an initiliazed instance of exit command4 component </s>
funcom_train/7980325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long discoveredUriCount() { // While shouldrun is true we can use info direct from the crawler. // After that our last snapshot will have to do. return shouldrun && this.controller != null && this.controller.getFrontier() != null? controller.getFrontier().discoveredUriCount() : discoveredUriCount; } COM: <s> number of i discovered i uris </s>
funcom_train/10209815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initWidgets() { List<SumoRoute> routes = sm.getRoutes(); List<SumoVehicle> vehicles = sm.getVehicles(); List<SumoTrip> trips = sm.getTrips(); for (SumoRoute r : routes) routeWidget.addItem(r.getId()); for (SumoVehicle v : vehicles) vehicleWidget.addItem(v.getId()); for (SumoTrip t : trips) tripWidget.addItem(t.getId()); } COM: <s> initializes all child widgets with the corresponding data </s>
funcom_train/38350131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void widgetSelected(SelectionEvent e) { if (e.item instanceof TableItem) { editMap.setEnabled(true); selectedTableItem = (TableItem) e.item; } else if (e.getSource() instanceof Button) { Button b = (Button) e.getSource(); openEditMapShell(); } } COM: <s> event handler for controls responds to open edit map dialog </s>
funcom_train/12768145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image copyImage16(Item item) { Image img = null; if ((item.getImage() != null) && !item.getImage().isDisposed()) { img = item.getImage(); Image img16 = new Image(img.getDevice(), 16, 16); GC gc = new GC(img16); gc.drawImage(img, 0, 0, 16, 16, 0, 0, 16, 16); img = img16; gc.dispose(); } return img; } COM: <s> returns the 16x16 image from the item if not null or disposed </s>
funcom_train/43526272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsMainPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Method_isMain_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Method_isMain_feature", "_UI_Method_type"), CallGraphPackage.Literals.METHOD__IS_MAIN, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is main feature </s>
funcom_train/21460745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatrix0() { DenseMatrix64F A = new DenseMatrix64F(5,5); if( !extractor.process(A) ){ throw new RuntimeException("Failed!"); } assertEquals(5,extractor.getNumberOfEigenvalues()); for( int i = 0 ; i < 5; i++ ) { Complex64F c = extractor.getEigenvalues()[i]; assertEquals(0,c.imaginary,1e-12); assertEquals(0,c.getReal(),1e-12); } } COM: <s> see if a totally zero matrix messes it up </s>
funcom_train/27946039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int fineScale (int x) { if (x<=10) return 10; int d=1; int i=x; while (i>=10) { i/=10; d*=10; } // d is power of than <= x return (x+d-1)/d*d; } COM: <s> returns round number greater or equal to argument </s>
funcom_train/13629167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCustomerId(int customerId) { if (this.getOrderNumber() == null || this.getOrderNumber().equals("")) { //also create orderNumber on getting the regular Id; java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat( "MMddHms"); this.setOrderNumber(new String(customerId + sdf.format(new java.util.Date()))); } super.setCustomerId(customerId); } COM: <s> sets the customer id and generates the order number for the transaction </s>
funcom_train/119177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize(JComponent c) { Dimension pSize = this.getPreferredMinSize(); if (!validCachedPreferredSize) updateCachedPreferredSize(); if (graph != null) { if (pSize != null) return new Dimension( Math.max(pSize.width, preferredSize.width), Math.max(pSize.height, preferredSize.height)); return new Dimension(preferredSize.width, preferredSize.height); } else if (pSize != null) return pSize; else return new Dimension(0, 0); } COM: <s> returns the preferred size to properly display the graph </s>
funcom_train/32757827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeLatestRunPVLoggerSnapshot( final Writer writer ) throws IOException { final long snapshotID = myWindow.mpxDocument.getLatestRunPVLoggerSnapshotID(); if ( snapshotID == 0 ) { JOptionPane.showMessageDialog( this, "No PV Logger snapshot is available for the latest run.", "No PV Logger Snapshot", JOptionPane.WARNING_MESSAGE ); } writer.write( "\n " + "PVLogger ID = " + snapshotID ); } COM: <s> write the pv logger snapshot id to the specified writer </s>
funcom_train/16380491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTrashPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SubTaskDefType_trash_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SubTaskDefType_trash_feature", "_UI_SubTaskDefType_type"), CTEPackage.Literals.SUB_TASK_DEF_TYPE__TRASH, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the trash feature </s>
funcom_train/29839131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLegendProperties(Legend legend) { if (legend instanceof StandardLegend) { // only supports StandardLegend at present StandardLegend standard = (StandardLegend) legend; standard.setOutlineStroke(getOutlineStroke()); standard.setOutlinePaint(getOutlinePaint()); standard.setBackgroundPaint(getBackgroundPaint()); standard.setItemFont(getSeriesFont()); standard.setItemPaint(getSeriesPaint()); } else { // raise exception - unrecognised legend } } COM: <s> sets the properties of the specified legend to match the properties </s>
funcom_train/342689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClickTemplate createTemplate(){ if (averageFFT==null)return null; if (averageFFT.length==0)return null; ClickTemplate clickTemplate=new ClickTemplate(); clickTemplate.setSampleRate(sampleRate); clickTemplate.setSpectrum(averageFFT); clickTemplate.setSpectrumStd(stdFFT); clickTemplate.setColor(fftColour); System.out.println("N----: "+N); clickTemplate.setN(N); return clickTemplate; } COM: <s> creates a click template from the saved instance variables </s>
funcom_train/26530863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ActionHandler selectActionHandler(String action) throws IOException { String mode = (String) parameters.get("mode"); if ("edit".equals(mode) && "save".equals(action)) return new SavePageHandler(); else throw new IOException("Unsupported mode/action"); } COM: <s> select an appropriate handler for an action request </s>
funcom_train/28311667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImPoint getCursorPosition() { ImPoint point = (ImPoint) modelRoot .getProperty(ModelRoot.Property.CURSOR_POSITION); // Check for null & make a defensive copy point = null == point ? new ImPoint() : point; if (!modelRoot.getWorld().boundsContain(point.x, point.y)) { throw new IllegalStateException(String.valueOf(point)); } return point; } COM: <s> utility method that gets the cursor position from the model root </s>
funcom_train/1301872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyedWork findWork(WorkRequest workRequest) { KeyedWork result = null; final DbHandle dbHandle = getDbHandle(workRequest); if (dbHandle.isClosed()) return null; final DbValue dbValue = dbHandle.get(workRequest.getKey()); if (dbValue != null) { result = new KeyedWork(workRequest.getKey(), dbValue.getPublishable()); } return result; } COM: <s> find work in this queue </s>
funcom_train/47366689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calcolateImpulse(double acc){ String[] strMass = extractValue(this.robotMass); double unconvertValue = Double.parseDouble(strMass[0]); String unit = strMass[1]; double massaValue = convertUnitStandard(unconvertValue, unit); this.setImpulsePush(massaValue * acc); } COM: <s> michel uncini 18 12 2009 </s>
funcom_train/3593657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double pollMediaTime() { synccounter++; if (synccounter >= MAXSYNC) { //System.out.println("ALIGN"); alignTimes(); synccounter=0; } if (DEBUG) System.out.println("Polling master: " + masterPlayer); if (nmh==null || nmh.playingHandlers==null) { return time; } if (masterPlayer==null || masterPlayer.pastEndTime(time)) { return time; } return masterPlayer.getTime(); } COM: <s> finds out the time from the master media also sends sync </s>
funcom_train/32211394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDirectoryPath() { String dirPath = this.dirText.getText(); if (!dirPath.endsWith(File.separator)) { dirPath += File.separator; } String pkgPath = this.pkgText.getText() .replace('.', File.separatorChar); if (!pkgPath.equals("")) { pkgPath += File.separator; } return dirPath + pkgPath; } COM: <s> gets the full path to the directory of the test file </s>
funcom_train/14363871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationInstance newApplicationInstance() { Cooee2Impress impress = new Cooee2Impress(clazz, method); impress .setActionListener(new Controller(impress, impress.getPresentation())); try { impress.setStyleSheet(StyleSheetLoader.load("style.xml", Thread .currentThread().getContextClassLoader())); } catch (Exception e) { throw new RuntimeException(e); } return impress; } COM: <s> creates a new cooee2 impress instance with the previously created </s>
funcom_train/35744500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { elements.clear(); namespaces.clear(); properties.clear(); // a cleared message has no ancestors lineage.retainAll(Collections.singletonList(lineage.get(0))); incMessageModCount(); if (Logging.SHOW_FINER && LOG.isLoggable(Level.FINER)) { LOG.finer("Cleared " + this); } } COM: <s> removes all of the elements in all namespaces from the message </s>
funcom_train/8084478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyInto(Object[] anArray) { if (anArray.length < getSize()) throw new IndexOutOfBoundsException("Array not big enough!"); for (int i = 0; i < getSize(); i++) anArray[i] = ((CheckBoxListItem) getElementAt(i)).getContent(); } COM: <s> copies the components of this list into the specified array </s>
funcom_train/25778957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInstrNumPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Instruction_instrNum_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Instruction_instrNum_feature", "_UI_Instruction_type"), CoveragepackagePackage.Literals.INSTRUCTION__INSTR_NUM, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the instr num feature </s>
funcom_train/26019351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handle200OkUnpublish(SipTransactionContext ctx) { // 200 OK response received if (logger.isActivated()) { logger.info("200 OK response received"); } SipResponse resp = ctx.getSipResponse(); // Retrieve the entity tag in the response saveEntityTag((SIPETagHeader)resp.getHeader(SIPETagHeader.NAME)); } COM: <s> handle 200 0 k response of unpublish </s>
funcom_train/31300429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { Map map = new HashMap(); Cloud cloud = cloudProvider.getCloud(); NodeIterator iter = cloud.getNode(nodeNumber).getRelatedNodes(Constants.BUNDLE_VALUE_NODEMANAGER_NAME).nodeIterator(); while (iter.hasNext()) { BundleValue value = new BundleValue(iter.nextNode()); map.put(value.getLocale(), value); } synchronized (bundleValues) { bundleValues.clear(); bundleValues.putAll(map); } } COM: <s> loads the chiild bundle value objects and stores them in a map </s>
funcom_train/44659085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ListSelectionModel getListSelectionModel(ListSelectionEvent e) { if (e.getSource() instanceof JList) { // we're coming from a JList return ((JList)e.getSource()).getSelectionModel(); } Assert.isTrue(e.getSource() instanceof ListSelectionModel, "Unsupported source in ListSelectionEvent"); return (ListSelectionModel)e.getSource(); } COM: <s> retrieve the code list selection model code from the given </s>
funcom_train/1304225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTotalCount() { if (_totalCount == null) { final DbMap onomasticon = getOnomasticon(); final FreqName freqName = doLookup(TOTAL_COUNT_KEY); if (freqName != null) { _totalCount = freqName.getFrequency(); } else _totalCount = 0; } return _totalCount; } COM: <s> get the total count of names in this onomasticon </s>