__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/51119530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSource(Resource source) { if (source != null && !source.equals(this.source)) { this.source = source; String mt = source.getMIMEType(); if ((mt.substring(0, mt.indexOf("/")).equalsIgnoreCase("image"))) { type = TYPE_IMAGE; } else { type = TYPE_OBJECT; } requestRepaint(); } } COM: <s> set the object source resource </s>
funcom_train/27674814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyUpdater( final Machine mc, final int nargs, final int unargs ) { int n = mc.getCount(); update( mc, nargs, unargs ); if ( mc.getCount() == n ) { return; } throw( FunctionAlert.eval( "Updater trying to return results", "Updaters must return zero results" ).culpritUArgs( this, mc, nargs, unargs ).mishap() ); } COM: <s> performs this functions updater </s>
funcom_train/17386778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unknownEventReceived(BnetEvent event) { Enumeration<ErrorPlugin> enumeration = errorPlugins.elements(); while (enumeration.hasMoreElements()) { ErrorPlugin plugin = (ErrorPlugin) enumeration.nextElement(); ((ErrorCallback) plugin.getCallback()).unknownEventReceived(new BnetEvent(event), plugin.getData()); } } COM: <s> this is called if an unhandled event is received </s>
funcom_train/50872495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object copy() { OMVariable variable = new OMVariable(); Enumeration keys = attributes.keys(); Enumeration values = attributes.elements(); while(keys.hasMoreElements()) { String key = new String((String) keys.nextElement()); String value = new String((String) values.nextElement()); variable.setAttribute(key, value); } return variable; } COM: <s> copies the object full copy </s>
funcom_train/18748965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getTable() { if (table == null) { final TableModel model = getTableModel(); table = new JTable(model) { @Override public TableCellEditor getCellEditor(int row, int column) { if (column == PROPERTY_COLUMN) { return getKeyEditor(); } else { return getValueEditor(model.getPropertyKey(row)); } } }; table.setPreferredScrollableViewportSize(new Dimension(300, 70)); } return table; } COM: <s> creates a table of properties which is editable according to </s>
funcom_train/9352319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { this.m_iterate = (HSBColor) this.m_startColor.clone(); // also reset the SteppingModel!!!! this.m_stepModel = (ColorIterator.ISteppingModel) this.m_resetModel.clone(); this.m_hasnext = true; this.m_firstTime = true; } COM: <s> resets the color iterator </s>
funcom_train/42970439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insertService(String serviceName, String driverName){ Connection con; try { //connect to database con = connectionController.connect(); String query = "insert into " + TABLE_SERVICE + "(" + FIELD_SERVICE_NAME + ", " + FIELD_DRIVER_NAME + ") values (?, ?)"; PreparedStatement stm = con.prepareStatement(query); stm.setString(1, serviceName); stm.setString(2, driverName); //execute insertion stm.executeUpdate(); stm.close(); // closes connection con.close(); } catch (SQLException e) { logger.error(e); } } COM: <s> method responsible for inserting a new service in the database </s>
funcom_train/22948716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setInitialValues() { addConfigKey(new ParameterInteger("Window function (0~NONE; 1~HANN; 2~HAMMING; 3~BLACKMAN; 4~BLACKMAN-HARRIS; 5~BARTLETT)", "Window function", 0, 1, 0, 5)); } COM: <s> adds configuration key window function and its possible values </s>
funcom_train/50836378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGameModeDescription(final String mode_descr) { final JLabel game_mode_descr2 = game_mode_descr; Runnable update_game_mode_descr = new Runnable() { public void run() { Font font = new Font("Franklin Gothic Medium Cond", Font.ITALIC, 16); game_mode_descr.setText(mode_descr); game_mode_descr.setFont(font); game_mode_descr.repaint(); } }; SwingUtilities.invokeLater(update_game_mode_descr); } COM: <s> this method updates the jlabel which gives information </s>
funcom_train/15622986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameterReference(edu.udo.cs.miningmart.m4.Parameter par) throws M4Exception { // do not check for existing names in this case, because a parameterObject // may be a parameter with the same name in different steps // parObj2par.checkNameExists(par, this); parObj2par.add(this, (edu.udo.cs.miningmart.m4.core.Parameter) par); } COM: <s> informs this object that a code parameter code references it </s>
funcom_train/23442908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_KeyrefType_refer_feature"), getString("_UI_PropertyDescriptor_description", "_UI_KeyrefType_refer_feature", "_UI_KeyrefType_type"), SchemaPackage.Literals.KEYREF_TYPE__REFER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the refer feature </s>
funcom_train/50208577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleScriptTaskDrop(IFile ifile) { ScriptTaskWrapper taskWrapper = new ScriptTaskWrapper(); //taskWrapper.setFile(ifile); try { IPath path = Flow4JPlugin.getClassPath(ifile); if (path == null) return; taskWrapper.setClassPath(path); } catch (JavaModelException e) { taskWrapper.setClassPath(ifile.getFullPath()); } factory.setTemplateType(taskWrapper); super.handleDrop(); } COM: <s> handles the dropping of a script task file on the designer </s>
funcom_train/7336377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer chooseContainerId() { Integer id = ContainerId.NONE; InfoAccess infoaccess = DbManager.getInfoAccess(); List<InfoBean> tlc = ContainerHierarchyTools.getTopLevelContainers(infoaccess); if (tlc.isEmpty()) { // no container exists } else { // choose id of first top level container id = (Integer) tlc.get(0).getId(); } return id; } COM: <s> get first top level container id </s>
funcom_train/7265540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFixedSize() throws Exception { Set s = new FixedSizeArrayHashSet(2); s.add(1);s.add(2);s.add(3); assertEquals(2, s.size()); String out = ""; for (Object o : s) out = out + o; assertEquals("32",out); } COM: <s> tests that adding a new element ejects the oldest one </s>
funcom_train/3026402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RuleSet getSelectedRules() { RuleSet newRuleSet = new RuleSet(); for (Iterator i = rules.keySet().iterator(); i.hasNext(); ) { Rule rule = (Rule)i.next(); if (get(rule).isSelected()) { newRuleSet.addRule(rule); } } return newRuleSet; } COM: <s> gets the selected rules attribute of the selected rules object </s>
funcom_train/18840689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayNode(String inNodeName)throws InvalidNodeNameException { java.util.Hashtable tempInterfaceTable; if(nodeTable.containsKey(inNodeName)){ Node tempNode = (Node) nodeTable.get(inNodeName); tempInterfaceTable = tempNode.getInterfaceHashtable(); System.out.println("Name: " + tempNode.getName()); tempNode.displayInterfaces(); }else throw new InvalidNodeNameException("Node does not exist within the simulation"); } COM: <s> this method is for display information about a paritular node </s>
funcom_train/25365935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGotoIdSuccessPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DialogSkillTest_gotoIdSuccess_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DialogSkillTest_gotoIdSuccess_feature", "_UI_DialogSkillTest_type"), LeveleditorPackage.Literals.DIALOG_SKILL_TEST__GOTO_ID_SUCCESS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the goto id success feature </s>
funcom_train/42111522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateReward() { double scoreDiff = game_.getScore() - prevScore_; prevScore_ = game_.getScore(); if (StateSpec.getInstance().getGoalName().equals("survive") && game_.getLivesRemaining() < prevLives_) scoreDiff -= (prevLives_ - game_.getLivesRemaining()) * 10000; prevLives_ = game_.getLivesRemaining(); return scoreDiff; } COM: <s> calculates the reward between states </s>
funcom_train/18847393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createCollaborationProcessLaneNotFoundException(String tscToken, String laneID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getFatalErrorDiagnosticsCode(); String exceptionID = "80024"; propertyMap.addPropertyValuePair("laneID", laneID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct collaboration process lane not found exception message </s>
funcom_train/44869634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMPanelBean getCenterPanel() { if (centerPanel == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); gridLayout.setColumns(2); centerPanel = new WCMPanelBean(); centerPanel.setLayout(gridLayout); centerPanel.add(getBoxImage(), null); centerPanel.add(getDisplayPanel(), null); } return centerPanel; } COM: <s> this method initializes center panel </s>
funcom_train/33564329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recieveGetChannelList(BNetInputStream is) throws IOException { String channelList = null; do { String s = is.readNTString(); if (s.length() == 0) break; if (channelList == null) channelList = s; else channelList += ", " + s; } while (true); if (GlobalSettings.displayBattleNetChannels) dispatchRecieveInfo("Channels: " + channelList + "."); } COM: <s> recieve sid getchannellist </s>
funcom_train/1285595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double standardDeviation(List<Double> doubles) { double mean = mean(doubles); double sumOfSquares = 0; for (double d : doubles) { double delta = (d - mean); sumOfSquares += (delta * delta); } return Math.sqrt(sumOfSquares / (doubles.size() - 1)); } COM: <s> returns the standard deviation of the measurements </s>
funcom_train/13647886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UploadResponseFile upload(UploadRequestFile request) throws Throwable{ UploadResponseFile response = (UploadResponseFile) this.getBaseClient().sendSync(request, TIMEOUT); if( response == null ){ throw new SyncRequestTransportLevelException(); } if (response.getException() != null) { throw response.getException(); } return (response); } COM: <s> uploads data to the server </s>
funcom_train/32775915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scale() { int headerSize = Math.min(this.getWidth(), this.getHeight())/14; if (headerSize<14) headerSize=14; if (headerSize>30) headerSize=30; if (headerSize != title.getFont().getSize()) title.setFont(new Font("Sans Serif", Font.CENTER_BASELINE, headerSize)); } COM: <s> rescales the size of the header font </s>
funcom_train/27825241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws DatalogException { m_ruleOperator.start(); try { while (!m_ruleOperator.afterLast()) { m_tupleConsumer.consumeTuple(m_ruleOperator.tuple()); m_ruleOperator.next(); } } finally { m_ruleOperator.stop(); } } COM: <s> executes this evaluator </s>
funcom_train/23935822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object that) { if (this == that) return true; if (!(that instanceof BoundingBox)) return false; BoundingBox bbox = (BoundingBox) that; return (this.getXmin().equals(bbox.getXmin()) && this.getXmax().equals(bbox.getXmax()) && this.getYmin().equals(bbox.getYmin()) && this.getYmax().equals(bbox.getYmax())); } COM: <s> returns whether bounding boxes are the equal </s>
funcom_train/8367984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getEingabeLeeren() { if (eingabeLeeren == null) {//GEN-END:|212-getter|0|212-preInit // write pre-init user code here eingabeLeeren = new Command("Eingabe l\u00F6schen", Command.CANCEL, 4);//GEN-LINE:|212-getter|1|212-postInit // write post-init user code here }//GEN-BEGIN:|212-getter|2| return eingabeLeeren; } COM: <s> returns an initiliazed instance of eingabe leeren component </s>
funcom_train/34973775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CRUDRequest createTestCRUDRequest() { final CRUDRequest jeReq = new CRUDRequest(); jeReq.setDocType(TEST_DOCTYPE); jeReq.setRequestedAt((new JEUtils()).getGlobalTimestamp()); jeReq.setRequestedBy(TEST_USERNAME); return jeReq; } COM: <s> creates a test crudrequest without a json document </s>
funcom_train/46860030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMnuitmPurgeDeleted() { if (mnuitmPurgeDeleted == null) { mnuitmPurgeDeleted = new JMenuItem(); mnuitmPurgeDeleted.setText("Purge deleted map"); mnuitmPurgeDeleted.setIcon(new ImageIcon(getClass().getResource("/resources/icons/purge.png"))); mnuitmPurgeDeleted.setEnabled(false); mnuitmPurgeDeleted.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { PurgeDeleted(); } }); } return mnuitmPurgeDeleted; } COM: <s> this method initializes mnuitm purge deleted </s>
funcom_train/43326864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findSeqByName(String name) { for (int i=0; i<sequences(); i++) { if ((name==null) && (seqName[i]==null)) return i; else if ((name!=null) && (seqName[i] != null)) { if (name.compareTo(seqName[i]) == 0) return i; } } return -1; } COM: <s> find a sequence by name if it exists </s>
funcom_train/21821694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddIRCEventListener() { System.out.println("addIRCEventListener"); mchattie.Session session = null; IRCEventListener ircEventListener = null; mchattie.Admin instance = new mchattie.Admin(); instance.addIRCEventListener(session, ircEventListener); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of add ircevent listener method of class mchattie </s>
funcom_train/21775822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Position computePosition(AstNode node, IDocument doc) { try { int start = doc.getLineOffset(node.getLine() - 1) + node.getOffset(); int end; if (node.getLine() == node.getEndLine()) end = node.getText().length(); else end = doc.getLineOffset(node.getEndLine() + 1) - start; return new Position(start, end); } catch (BadLocationException e) { e.printStackTrace(); return null; } } COM: <s> this is kinda hackish because the last character in a block is not </s>
funcom_train/47980655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(){ for(Ticket ticket : mGame.getRouteManagement().getAreaTickets().values()){ if(mGame.getRouteManagement().getMyTickets().containsKey(ticket.getId())){ mImageTextViewPairs.get(ticket.getId()).setText( "" + mGame.getRouteManagement().getMyTickets().get(ticket.getId())); } } mTextViewRound.setText("R: " + mGame.getCurrentRound()); } COM: <s> updates the panel with actual data read from curren game </s>
funcom_train/7368466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addressName(final SecureMessage message) { String number = message.number; Address address = null; try { address = addressBookStore.getByNumber(number, false); } catch (final StoreException e) { e.printStackTrace(); //#ifdef DLOGGING logger.severe("addressName error", e); //#endif } if (address != null) { number = address.name; } return number; } COM: <s> for the given secure message get the name in the address book that </s>
funcom_train/11105661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processAction(ActionEvent event) { // FIXME - this is probably not the final answer, but gives // us a starting point to deal with application event handlers // throwing exceptions in a way consistent with elsewhere try { original.processAction(event); } catch (Exception e) { handleException(FacesContext.getCurrentInstance(), e); } } COM: <s> p handle a default action event </s>
funcom_train/3379946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(DSAParams params, SecureRandom random) { if (params == null) { throw new InvalidParameterException("Params must not be null"); } DSAParameterSpec spec = new DSAParameterSpec (params.getP(), params.getQ(), params.getG()); initialize0(spec, random); } COM: <s> initializes the dsa object using a dsa parameter object </s>
funcom_train/23632020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format() { String s = ""; if (type.equals("date")) { s = data.substring(0, 4) + "." + data.substring(4, 6) + "." + data.substring(6); } else if (type.equals("time")) { s = data.substring(0, 2) + "." + data.substring(2); } return s; } COM: <s> format the entire string correctly </s>
funcom_train/27843184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accepts(Object value, Context context) { if (_tests == null) { return true; } for (Iterator i = _tests.iterator(); i.hasNext();) { RuleTest test = (RuleTest) i.next(); if (test.accepts(value, context)) { return true; } } return false; } COM: <s> tests if this rule accepts the value to convert </s>
funcom_train/25315688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNoteFromStaffObjects(Note note) { staffObjects.remove(note); NoteCombo notecombo = note.getNotecombo(); if (notecombo != null) { notecombo.getNotes().remove(note); for (Note notecomboNote : notecombo.getNotes()) { if (playableNotes.contains(notecomboNote)) { return; } } //notecombo contains no notes on the staff anymore staffObjects.remove(notecombo); } NoteOptions noteOptions = note.getNoteOptions(); if (noteOptions != null) { staffObjects.remove(noteOptions); } } COM: <s> remove the note from the staff objects </s>
funcom_train/50314338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subtract (int[] pointArray) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); try { lockToolkit(); long rgnHandle = Fox.FXRegion_new(pointArray, false/*winding*/); Fox.FXRegion_substract(handle, rgnHandle); Fox.FXRegion_delete(rgnHandle); } finally { unlockToolkit(); } } COM: <s> subtracts the given polygon from the collection of polygons </s>
funcom_train/26133328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(final Object o) { sanityCheck() ; int count = 0 ; for (Iterator i = iterator() ; ! i.atEnd() ; i.advance(), ++count) { if (i.get().equals(o)) return count ; } return -1 ; } COM: <s> find out the position of an code object code in the </s>
funcom_train/34340178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getMiCliente() { if (miCliente == null) {//GEN-END:|33-getter|0|33-preInit // write pre-init user code here miCliente = new TextField("ingresar n\u00BA cliente", null, 5, TextField.ANY);//GEN-LINE:|33-getter|1|33-postInit // write post-init user code here }//GEN-BEGIN:|33-getter|2| return miCliente; } COM: <s> returns an initiliazed instance of mi cliente component </s>
funcom_train/50575626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { if (!SwingUtilities.isEventDispatchThread() && !Tuneology.isMainThread()) { throw new NullPointerException(); } while(tableModel.getChildCount(root) > 0) { tableModel.removeNodeFromParent((MutableTreeNode) tableModel.getChild(root, 0)); } } COM: <s> removes all elements from the tree control </s>
funcom_train/23278791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStateInformation(String name, boolean completed) { String result = ""; main: for (State s : getStates()) { if (completed && !s.isCompleted()) continue; for (Information info : s.getAttributes()) { if (info.getName().equals(name)) { result = info.getValue(); break main; } } } return result; } COM: <s> used to get the attribute information that is part of the state </s>
funcom_train/41440831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void afterManagementMethodInvocation(boolean activatedTransaction) throws ManagementException { if (logger.isDebugEnabled()) { logger.debug("afterManagementMethodInvocation( activatedTransaction = "+activatedTransaction+" ) on profile with name "+profileName+" of table "+profileTable.getProfileTableName()); } afterNonSetCmpField(activatedTransaction); } COM: <s> logic to execute after invoking a management method on the mbean </s>
funcom_train/13714619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getState(int ss0, int ss1) { if (ss0 < 0 && ss1 < 0) { throw new IllegalArgumentException( "ss0 and ss1 must not both be non-negative"); } Pair<Integer, Integer> pair = new Pair<Integer, Integer>(ss0, ss1); Integer num = states.get(pair); if (num == null) { num = states.size(); states.put(pair, num); stateQueue.addFirst(pair); } return num; } COM: <s> returns a non negative number that represents the result automatons </s>
funcom_train/27711409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPrefix(int i) { if (i < 0 || i >= fAttributeListLength) { return null; } int chunk = (fAttributeListHandle + i) >> CHUNK_SHIFT; int index = (fAttributeListHandle + i) & CHUNK_MASK; return fStringPool.toString(fAttPrefix[chunk][index]); } COM: <s> return the prefix of an attribute in this list by position </s>
funcom_train/18428157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int writeFile(String Filename, String TmpStr, boolean Append) { try { FileWriter File = new FileWriter(Filename, Append); BufferedWriter Buffer = new BufferedWriter(File); Buffer.write(TmpStr, 0, TmpStr.length()); Buffer.close(); File.close(); } catch (IOException e) { System.out.println("Caught access file IOException: " + e.toString()); return -1; } return 0; } COM: <s> writes a string in the specified file </s>
funcom_train/25779113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCommentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TestParameter_comment_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TestParameter_comment_feature", "_UI_TestParameter_type"), TestpackagePackage.Literals.TEST_PARAMETER__COMMENT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the comment feature </s>
funcom_train/25467770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOverrideMiniMapVisiblity(final int aVisiblity) { switch (aVisiblity) { case View.GONE: case View.VISIBLE: case View.INVISIBLE: if (this.mMiniMap != null) this.mMiniMap.setVisibility(aVisiblity); case NOT_SET: this.setZoomLevel(this.mZoomLevel); break; default: throw new IllegalArgumentException("See javadoc of this method !!!"); } this.mMiniMapOverriddenVisibility = aVisiblity; } COM: <s> use this method if you want to make the mini map visible i </s>
funcom_train/39101061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetLimits() { Assert.pre(valueArray != null, "valueArray is not null"); if (valueArray.getLength() == 0) { setLimits(0, 0); } else { setLimits(0, valueArray.getLength() - 1); } fireValueChange(); } COM: <s> this method adjusts the current range to reflect the value array 0 </s>
funcom_train/3562819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSession(Integer volumeID, Integer sessionID) throws DbException { NVPair[] parms; parms = new NVPair[2]; parms[0] = new NVPair("volumeID", volumeID.toString()); parms[1] = new NVPair("sessionID", sessionID.toString()); simpleRequest(REMOVE_SESSION_PAGE, "Cannot remove session", parms); } COM: <s> deletes a session </s>
funcom_train/28147036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZBDD nNot() { if (!this.getRoot().isBasicVertexX()) throw new IllegalArgumentException("use nComp method"); int index = this.getRoot().getIndex(); if (index % 2 == 0) index++; else index--; return new ZBDD(this.getManager(), index); } COM: <s> method n not </s>
funcom_train/3331868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getJavaPackage(Class type) { if (type == null) return null; String pkg = type.getName(); int idx = pkg.lastIndexOf('.'); if (idx > 0) { pkg = pkg.substring(0,idx); } else pkg = ""; return pkg; } //-- getJavaPackage COM: <s> returns the package for the given class </s>
funcom_train/12810978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getParametersName(){ TableHDU tHDU = null; String paramName = null; try { Fits fits = new Fits(this.getAbsolutePath()); tHDU = (TableHDU) fits.getHDU(1); for(int i=0; i<tHDU.getNRows(); i++){ paramName = (String) tHDU.getElement(i, 0); this.vParamName.add(paramName); } } catch (FitsException e) { Messenger.printStackTrace(e); } catch (IOException e) { Messenger.printStackTrace(e); } } COM: <s> this method gets the name of each parameters </s>
funcom_train/25365705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRoomdescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RoomEvent_roomdescription_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_roomdescription_feature", "_UI_RoomEvent_type"), LeveleditorPackage.Literals.ROOM_EVENT__ROOMDESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the roomdescription feature </s>
funcom_train/17604943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String name(String uri, Locale locale) { // Normaly URIs like /foo/ to /foo/index if (uri.endsWith("/")) { uri = uri + "index"; } return "/WEB-INF/message" + toBundleName(uri, locale) + ".properties"; } COM: <s> makes the file name </s>
funcom_train/256442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tick() { if ( ! isBusy() ) { //TODO: lifepoints //m_lifepoints.regenerate( lastActionDuration, lastAction); performAction( m_currentAction ); if ( ! m_currentActionSequence.hasNextAction() ) { m_currentActionSequence = getCreatureAI().getNextActionSequence(); } setCurrentAction( m_currentActionSequence.getNextAction() ); } } COM: <s> performs the current actions and fetchs the next action from the list </s>
funcom_train/3400123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(String key) { Entry tab[] = table; int hash = key.hashCode(); int index = (hash & 0x7FFFFFFF) % tab.length; for (Entry e = tab[index]; e != null; e = e.next) { if ((e.hash == hash) && (e.key == key)) return e.value; } return null; } COM: <s> returns the value to which the specified key is mapped in this hashtable </s>
funcom_train/8559544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPadding(int padding) { try { PortletConfig conf = getPortlets().getPortletConfig(); conf.setSkin( "padding" , String.valueOf( padding ) ); } catch ( RuntimeException e ) { logger.error("Exception setting padding value", e); // FIXME: What should we do if there's no portlets, config or skin defined ? } } COM: <s> sets the padding space to be put between portlets </s>
funcom_train/32800775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParameterPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_ParameterCS_parameter_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ParameterCS_parameter_feature", "_UI_ParameterCS_type"), OclPackage.Literals.PARAMETER_CS__PARAMETER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the parameter feature </s>
funcom_train/17201958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean mutateMoveToNop(Instruction s) { Operand result = MIR_Move.getResult(s); Operand val = MIR_Move.getValue(s); if (result.isStackLocation() && val.isStackLocation()) { if (result.similar(val)) { Empty.mutate(s, NOP); return true; } } return false; } COM: <s> attempt to rewrite a move instruction to a nop </s>
funcom_train/19322646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { if (o == null) { return -1; } MLetAttribute tmp = (MLetAttribute) o; CompareToBuilder builder = new CompareToBuilder(); builder.append(getName(), tmp.getName()); return builder.toComparison(); } COM: <s> compare according to name </s>
funcom_train/25646302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean startsAt(long fromNd, Segment toSegment) { if (fromNd == toSegment.getFirstNd()) { return true; } else if (fromNd == toSegment.getLastNd()) { return false; } else { throw new IllegalArgumentException("Lost direction."); } } COM: <s> returns true if the segments natural order starts from the given </s>
funcom_train/4748073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDefaultServerNews() { final String motd = "No server news."; final ServerConfigurationEntity entity = new ServerConfigurationEntity(); entity.setConfigKey( ServerConfigurationKeyEnum.MESSAGE_SERVERNEWS ); entity.setConfigValue( motd ); entity.setChangedBy( this.getSystemUser() ); this.getConnectorService().getApplicationDAOFactory(). getServerConfigurationDAO().mergeEntity(entity); } COM: <s> adds the default server news </s>
funcom_train/8981560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneQuery() { if (jScrollPaneQuery == null) { jScrollPaneQuery = new JScrollPane(getJTextPaneQuery()); jScrollPaneQuery.setPreferredSize(new Dimension(475, 150)); jScrollPaneQuery.setViewportView(getJTextPaneQuery()); jScrollPaneQuery.setBorder(BorderFactory.createLineBorder( SystemColor.textInactiveText, 2)); } return jScrollPaneQuery; } COM: <s> this method initializes j scroll pane query </s>
funcom_train/8088213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String overrideClassname(String classname) { Enumeration enm; String result; Class currentCls; result = classname; // check overrides enm = m_ClassnameOverride.keys(); while (enm.hasMoreElements()) { currentCls = (Class) enm.nextElement(); if (currentCls.getName().equals(classname)) { result = (String) m_ClassnameOverride.get(currentCls); break; } } return result; } COM: <s> if the given classname is stored in the classname override hashtable </s>
funcom_train/18749056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point2D lineIntersection(double x1, double y1, double dx1, double dy1, double x2, double y2, double dx2, double dy2) { double above = dx1*(y2-y1) - dy1*(x2-x1); double below = dx2*dy1 - dx1*dy2; if (below == 0) { // the lines are parallel return null; } else { double c2 = above/below; double x = x2+dx2*c2; double y = y2+dy2*c2; return new Point2D.Double(x,y); } } COM: <s> computes the intersection of two lines </s>
funcom_train/3926257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node addChildNode( String sourceNode ) throws InvalidChildNodeException, NotAGroupingNodeException, InvalidFieldException { Scene s = (Scene)getScene(); DEFNameFactory dfn = null; if ( s != null ) { dfn = s.getDEFNameFactory(); } TokenData newTokenData = new TokenData( sourceNode, dfn ); return( addChildNode( newTokenData.getNode() )); } COM: <s> add a node to a b children b field of a grouping node </s>
funcom_train/36188636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTemplate(CompositionID planID) { Dbc.require(null != planID && planID.getId() > 0); String mapKey = this.generateMapKey(planID.getId()); logger.debug("Add a Composition template - key " + mapKey); compositionMap.remove(mapKey); } COM: <s> remove a composition template from the store </s>
funcom_train/41461963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RTPFormat createFormat(int payload, Text description) { if (mediaType.equals(SessionDescription.AUDIO)) { return createAudioFormat(payload, description); } else if (mediaType.equals(SessionDescription.VIDEO)) { return createVideoFormat(payload, description); } else { return null; } } COM: <s> creates or updates format using payload number and text format description </s>
funcom_train/29681001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getResultsInFlow(Long flowId){ List resultsInFlow = null; try { // Call Web Service Operation hu.sztaki.dsd.abilities.result.web.ResultService port = resultService.getResultServicePort(); resultsInFlow = port.getResultsInFlow(flowId); } catch (Exception ex) { log4j.error(ex); // TODO handle custom exceptions here } return resultsInFlow; } COM: <s> returns result corresponding to a result flow </s>
funcom_train/35249102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public From join(Class<?> c, String alias, String from, String to) { From f = new From(c, alias); queryInfo.getFroms().add(f); queryInfo.getConditions().add( new Condition(new Field(queryInfo.getDefaultFrom(), from), Operator.equal, new Field(f, to))); return f; } COM: <s> join model class to default model class </s>
funcom_train/39016532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadProperties() { ResourceBundle resource = ResourceBundle.getBundle(getResourceName(), ActionSet.getLanguage().getLocale()); if (resource != null) { putValue(NAME, resource.getString(getID() + NAME_SUFFIX)); } else { putValue(NAME, getID()); } } COM: <s> loads the properties of the action </s>
funcom_train/38385944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mapStart(String tagEntry, String methodInvocation) throws REDXMLCallbackError { if (tagEntry.equals("#")) { tagEntry = fDelimiter; } setErrorContext("mapping <" + tagEntry + "> to '" + methodInvocation + "'"); REDXMLCallbackDescriptor desc = new REDXMLCallbackDescriptor(methodInvocation, fObj, this, fManager); fStartMap.put(tagEntry.toLowerCase(), desc); } COM: <s> set tag mapping for start tags </s>
funcom_train/22571965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doAddItem() { SelectItemsDialog dialog = new SelectItemsDialog(getSite().getShell(), fAssessment); if (dialog.open() == Window.OK) { List<IAssessmentItem> list = dialog.getSelectedItems(); for (IAssessmentItem item : list) { if (!fAssessment.getItems().contains(item)) { fAssessment.getItems().add(item); } } fAssessment.setItemsDirty(); fItemTableViewer.refresh(); setDirty(true); } } COM: <s> add an assessment item </s>
funcom_train/4257304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DocumentBuilder getDocumentBuilder() throws IOException { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(isNamespaceAware()); dbf.setValidating(false); return dbf.newDocumentBuilder(); } catch (ParserConfigurationException pce) { throw new IOException("Couldn't create the empty document: " + pce.getMessage()); } } COM: <s> returns a document builder properly configured </s>
funcom_train/31739350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDirection() throws KosiAccessException, InvalidSessionException { try { return players.getDirection(ServerSessionInformation.getUser()); } catch (IllegalArgumentException exc) { throw new KosiAccessException("Player not seated at this table"); } // The InvalidSessionException will not be caught. } COM: <s> returns the direction of the calling player </s>
funcom_train/45121647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractPersistentField_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractPersistentField_type_feature", "_UI_AbstractPersistentField_type"), DictionaryPackage.Literals.ABSTRACT_PERSISTENT_FIELD__TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DatabasePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/14272845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DLPUserInfo getNewUserInfo(Synchronizer s) { // This method should display a message to the user, requesting that they enter a user name, // Blocking until they have done so. String name=JOptionPane.showInputDialog(this, rb.getString("username.query")); int j = Math.abs(name.hashCode() % 10000); DLPUserInfo ret = new DLPUserInfo(j, 1123, 1597, name); return ret; } // end-method COM: <s> requests new user information from the sync application </s>
funcom_train/824958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CStringBuilder reverse() { // Call ensureCapacity to enforce copy-on-write. ensureCapacity(count); for (int i = count >> 1, j = count - i; --i >= 0; ++j) { char c = value[i]; value[i] = value[j]; value[j] = c; } return this; } COM: <s> reverse the characters in this string builder </s>
funcom_train/34282890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) { updateChildren(changes, a); Rectangle alloc = ((a != null) && isAllocationValid()) ? getInsideAllocation(a) : null; int pos = changes.getOffset(); View v = getViewAtPosition(pos, alloc); if (v != null) v.insertUpdate(changes, alloc, f); } COM: <s> gives notification that something was inserted into the </s>
funcom_train/46727499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ISPanel getSecondPanel(ViewReference view) throws Exception { if (rightPanel == null) { rightPanel = new ISPanel(new BorderLayout()); } else { rightPanel.removeAll(); } IFormDisplay formDisplay = SecurityService.getApplicationView(view); if (rightControlPanel != null) { rightControlPanel.releaseControls(); } rightControlPanel = new ISControlPanel((ISMediator) parentFormMediator, newControlModel, formDisplay, parentDialog); rightPanel.add(rightControlPanel.buildPanel()); return rightPanel; } COM: <s> get panel of controls for control type </s>
funcom_train/46457349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save(Job job, Tool tool) { if(tool==null||child.equals(tool)) { return; } Collection tools = (Collection) replies.get(job); if(tools==null) { tools = new HashSet(); replies.put(job, tools); } tools.add(tool); } COM: <s> saves a tool for later replies </s>
funcom_train/19659469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Widget getInfoPanel() { VerticalPanel infoPanel = new VerticalPanel(); TabPanel infoTabs = new TabPanel(); infoTabs.add(getThoughts(), "Thoughts"); infoTabs.add(getRatings(), "Ratings"); infoTabs.selectTab(1); infoPanel.add(infoTabs); infoPanel.add(getButtons()); return infoPanel; } COM: <s> what is displayed when the user expands us </s>
funcom_train/13965211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDataAttribute(EOAttribute attribute) { return (attribute.className().equals("com.webobjects.foundation.NSData") || attribute.externalType().equals("bytea") || attribute.externalType().equals("bit")) && entity().classProperties().containsObject(attribute); } COM: <s> helper to check for data columns that are not keys </s>
funcom_train/24485009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Calendar getCalendar(String date) { int year = Integer.parseInt(date.substring(0, 4)); int month = Integer.parseInt(date.substring(4, 6)) - 1; int day = Integer.parseInt(date.substring(6, 8)); Calendar calendar = new GregorianCalendar(year, month, day); return calendar; } COM: <s> get a calendar object for the given date </s>
funcom_train/29767778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegistryGetOrGenerateJdbcMapCustomer() throws SQLException { IMapping<Customer> mapping = JdbcMap.getClassRegistry().getOrGenerateMapping(Customer.class); String mappingAsText = mapping.toMappingFileText().trim(); String expectedResult = JdbcMapTestUtils.loadExpectedMappingText("Customer"); assertEquals(expectedResult, mappingAsText); } COM: <s> tests creating a mapping on the fly via the mapping registry </s>
funcom_train/21285656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testString() { Object object = eval("foo: \"c\"").get("foo"); assertTrue(object instanceof String); assertEquals("c", object); object = eval("foo: \"abc\"").get("foo"); assertTrue(object instanceof String); assertEquals("abc", object); } COM: <s> tests parsing strings </s>
funcom_train/48337657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getState() { if (STATE_THREAD == state) { synchronized(this) { if (STATE_THREAD == state) { Evaluator evaluator = (Evaluator)one; if (evaluator.isResultReady()) { one = evaluator.getResult(); two = null; if (evaluator.isResultValue()) { state = STATE_VALUE; } else { state = STATE_THROWABLE; } } } } } return state; } COM: <s> return the state of this promise </s>
funcom_train/42842896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (this.getHemisphere() == Hemisphere.West) { return getDegrees() + " " + this.getMinutes() + "'" + this.getSeconds() + "'' W"; } else { return getDegrees() + " " + this.getMinutes() + "'" + this.getSeconds() + "'' E"; } } COM: <s> returns a string representation of this longitude object </s>
funcom_train/9978212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canLink(ProjectContext context, NodeContainer node1, NodeContainer node2) { if (node1 instanceof NodeView) { NodeView nv = (NodeView) node1; if (!nv.getMgrId().equals(JspGenericViewManager.viewID)) { return false; } UrlManager mgr = node2.getAdapter(UrlManager.class); if (mgr == null) return false; // Else make a link... return true; } return false; } COM: <s> check if this manager can link these two nodes </s>
funcom_train/37587461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _ensureReady() throws DebugException { if (! isReady()) throw new IllegalStateException("Debugger is not active."); if (_eventHandlerError != null) { Throwable t = _eventHandlerError; _eventHandlerError = null; throw new DebugException("Error in Debugger Event Handler: " + t); } } COM: <s> ensures that debugger is active </s>
funcom_train/4478917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DateRange createDateRange(final Calendar calendar1, final Calendar calendar2) { final DateTime time1 = createDateTime(calendar1); final DateTime time2 = createDateTime(calendar2); try { return session.createDateRange(time1, time2); } catch (NotesException e) { error("Cannot convert DDateRange to DateRange", e); } return null; } COM: <s> creates a notes code date range code instance from two </s>
funcom_train/25657188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public RemoteProperties createSpringContext() { cleanup(); // get the ScannerAdminServiceClient bean s_ctx = new FileSystemXmlApplicationContext( RemotePropsConfiguration.getFile().toURI().toString()); return (RemoteProperties) s_ctx.getBean(SERVICE_NAME); } COM: <s> this method will create the spring context </s>
funcom_train/10565465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinHierarchyScore(Double minHierarchyScore) { if (minHierarchyScore == null) { minHierarchyScore = DEFAULT_MIN_HIERARCHY_SCORE; } else if (minHierarchyScore > 1) { minHierarchyScore = Double.valueOf(1); } else if (minScore < 0) { minHierarchyScore = Double.valueOf(0); } this.minHierarchyScore = minHierarchyScore; } COM: <s> setter for the minimum value used to decide based on the score of </s>
funcom_train/19179010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeState (TestObject container) { try{ boolean state = ((GuiTestObject)container).isEnabled(); write("isEnabled=" + state); state = ((GuiTestObject)container).isShowing(); write("isShowing=" + state); }catch(Exception ex){;} } COM: <s> write the is enabled and is showing states of the container </s>
funcom_train/5376114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nextInt(int n) { if (n > 0) { if ((n & -n) == n) { return (int) ((n * (long) next(31)) >> 31); } int bits, val; do { bits = next(31); val = bits % n; } while (bits - val + (n - 1) < 0); return val; } throw new IllegalArgumentException(); } COM: <s> returns to the caller a new pseudo random integer value which is uniformly </s>
funcom_train/12895755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int removeCurrentProject() { List<ProjectHelper> l = getProjectHelperList(); l.remove(getProjectHelper()); if (l.size() > 0) { setProjectHelper(l.get(0)); setTabIndex(0); } else { return 0; } return l.size(); } COM: <s> removes the current project </s>
funcom_train/27974851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateIndexForFile(CmsFile f) throws CmsException { if (isInIndexFolder(f)){ if (f.isFolder()) { /* folders are processed as project try{ IndexWriter writer = new IndexWriter(sParams.getIndexPath(), nlyz, false); processDir(f.getAbsolutePath(), true, writer); } catch (IOException ioe) { throw new CmsException("Could not open index"); } */ } else if (f.isFile()) { updateFile(f); } } } COM: <s> updates the index for a single resource </s>