__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/776301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFieldFor( final String attributeName, String fieldName ) { JLabel theLabel = new JLabel( fieldName ); final JTextField textField = (JTextField) addTextField(theLabel, null); textField.addFocusListener( new FocusAdapter() { public void focusLost(FocusEvent e) { setAttribute( attributeName, textField.getText() ); } }); textFields.put(attributeName, textField); } COM: <s> adds a new text field to the properties panel for the specified attribute </s>
funcom_train/38512875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttachment(Artefact pArtefact) { if (pArtefact == null) return; if (attachments == null) { attachments = new ArrayList(); } if (!attachments.contains(pArtefact)) { Util.log("Added file " + pArtefact); attachments.add(pArtefact); fireItemChanged(); } } COM: <s> adds an attachment to this feature </s>
funcom_train/12182868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ContentBuilder getModelContent() { ContentBuilder contentBuilder = null; BeanProxy selectedVariant = context.getSelectedVariant(); if (selectedVariant != null) { Proxy contentProxy = selectedVariant.getPropertyProxy(PolicyModel.CONTENT); Object model = contentProxy.getModelObject(); if (model instanceof ContentBuilder) { contentBuilder = (ContentBuilder) model; } } return contentBuilder; } COM: <s> retrieve the content builder for the currently selected variant </s>
funcom_train/35068735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector requestMentionsTimeline(String sinceId) throws TwitterException { if (sinceId != null && sinceId.length() > 0) { sinceId = "since_id="+StringUtil.urlEncode(sinceId); } HttpUtil.setBasicAuthentication(username, password); return requestTimeline(gateway+MENTIONS_TIMELINE_URL, prepareParamCount(sinceId)); } COM: <s> request responses timeline from twitter api </s>
funcom_train/23913128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMarker(Color color, String tip) { int i, start, end; for( i = 0; i < selected.length; i++ ) if( selected[i] ) break; if( i >= selected.length ) return; start = i; for( i = selected.length - 1; i >= 0; i-- ) if( selected[i] ) break; if( i < 0 ) return; end = i; addMarker(start, end, color, tip); } COM: <s> adds a marker adjusting others if necessary using current selection </s>
funcom_train/12194423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteDirectory(File dir) { File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { File file = files[i]; if (file.isDirectory()) { deleteDirectory(file); } else { file.delete(); } } dir.delete(); } COM: <s> recursively delete the directory and all its contents </s>
funcom_train/23617044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findb(LPart f, LPart t, int steps) throws InterruptedException { super.resetOps(f); // An.fun finds the fundamental pitch that is nearest to the average // the root key pitch is specified by the tonal manager applyStretch(An.fun(f), f.getTonalManager().getStepsPerOctave(), f); judgeDistances(t); } COM: <s> initialise 25 copies op </s>
funcom_train/1773062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printRow(String rowName, List<Integer> row) { StringBuilder output = new StringBuilder(); output.append(rowName); for (Integer value : row) { output.append(",").append(value); } System.out.println(output.toString()); } COM: <s> prints the row name and the values in a row </s>
funcom_train/31911488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getComputedOrientationAngle(int index){ if ( isGlyphOrientationAuto() ){ if (isVertical()) { char ch = aci.setIndex(index); if (isLatinChar(ch)) return 90.0; else return 0.0; } return 0.0; } else{ return getGlyphOrientationAngle(); } } COM: <s> return the angle value according to the orientation </s>
funcom_train/18592474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionSelectText(Component c, final int start, final int end) { final TextComponent tc = (TextComponent)c; invokeAndWait(c, new Runnable() { public void run() { tc.select(start, end); } }); if (Bugs.hasTextComponentSelectionDelay()) delay(100); } COM: <s> select the given text range </s>
funcom_train/31436153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean unassign() throws SQLException { DbConnection dc = new DbConnection(); int rowCount = dc.executeUpdate("UPDATE items SET assignedto = NULL, assigned = NULL WHERE itemid = " + itemId); assignedTo = Discobject.NONE; dc.close(); if (rowCount > 0) return true; else return false; } COM: <s> removes user assignment from the current item </s>
funcom_train/960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void setModeDependentObjectStatus() { // Ensure to change status on the EDT (event dispatcher thread), // because this method may be called from a background thread. SwingUtilities.invokeLater(new Runnable() { public void run() { for (Component button : playModeDependentObjects) { button.setEnabled(application.isPlayModeActivated()); } for (AbstractButton button : editorModeDependentObjects) { button.setEnabled(application.isEditorModeActivated()); } } }); } COM: <s> sets the objects enabled or disabled depending on the current mode </s>
funcom_train/5669242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _checkDatasetIndex(int dataset) { if (dataset < 0) { throw new IllegalArgumentException("Plot._checkDatasetIndex: Cannot" + " give a negative number for the data set index."); } while (dataset >= _points.size()) { _points.addElement(new Vector()); _histogram.addElement(new Hashtable()); } } COM: <s> check the argument to ensure that it is a valid data set index </s>
funcom_train/49410785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Identifier getIdentifier(String identifier) throws IndexException { for (Iterator<Identifier> i = identifiers.iterator(); i.hasNext(); ) { Identifier c = (Identifier) i.next(); if (c.getIdentifier().equals(identifier)) return c; } throw new IndexException("Index for specified identifier " + identifier + " was not found."); } COM: <s> get a identifier using the identifier id and type </s>
funcom_train/281570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getImage(Object object) { if (((Pseudostate) object).getKind().equals(PseudostateKind.CHOICE_LITERAL)) { return overlayImage(object, getResourceLocator().getImage( "full/obj16/Pseudostate_choice")); //$NON-NLS-1$ } else { return overlayImage(object, getResourceLocator().getImage( "full/obj16/Pseudostate")); //$NON-NLS-1$ } } COM: <s> this returns pseudostate </s>
funcom_train/43886280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highlightChanged(Object source, Filter filter) { HighlightChangeListener[] l = (HighlightChangeListener[]) listeners.getListeners(HighlightChangeListener.class); HighlightChangedEvent ev = new HighlightChangedEvent(source, filter); for (int i = 0; i < l.length; i++) { l[i].highlightChanged(ev); } } COM: <s> notify listeners that the highlight has changed </s>
funcom_train/50222900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map createLocationMap(Object modelSource) { Map map = new HashMap(); List list = new ArrayList(); Object index = new Integer(0); list.add(index); map.put(createActor((Graph) modelSource), list); map.put(interpreter, list); return map; } COM: <s> called by the compiler </s>
funcom_train/13582904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findBestPlanAndAddOneVehicle(List<PPlan> plans){ PPlan bestPlan = null; for (PPlan plan : this.plans) { if (bestPlan == null) { bestPlan = plan; } else { if (plan.getPlannedScorePerVehicle() > bestPlan.getPlannedScorePerVehicle()) { bestPlan = plan; } } } // add one vehicle bestPlan.setNVehicles(bestPlan.getNVehicles() + 1); } COM: <s> find plan with the best score per vehicle </s>
funcom_train/38992208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTilesAt(double _x, double _y) { for(int i = 0; i < drawTiles.size(); i++) { if (drawTiles.elementAt(i).getGeneralPath().contains(_x, _y)) { drawTiles.remove(i); } hTile = copyTiles.elementAt(type); repaint(); } } COM: <s> removes all of the tiles at the position x y </s>
funcom_train/18937311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTextFields() { if (model != null) { logFilenameTextField.setText(model.getProperty(PeerConfiguration.PROP_LOGFILE)); } if (logManager != null) { Level level = logManager.getLogLevel(); logLevelComboBox1.setSelectedItem(level); } } COM: <s> initializes text fields with the default values </s>
funcom_train/4519990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerPopupMenu(Class<? extends Interval> clazz, JPopupMenu popup) { if (_registeredPopupMenues == null) { _registeredPopupMenues = new HashMap<Class<? extends Interval>, JPopupMenu>(); } _registeredPopupMenues.put(clazz, popup); } COM: <s> register a popup menu for a given interval class </s>
funcom_train/24647962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkClient(Client client) throws IOException { if (!getServiceEnvironment().getClientApprovalStore().isApproved(client.getIdentifier())) { String ww = "client with identifier \"" + client.getIdentifier() + "\" has not been approved. Request rejected. Please contact your administrator."; warn(ww); throw new UnapprovedClientException("Error: " + ww); } } COM: <s> checks if the client is approved </s>
funcom_train/48053596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanUp() { JXTreeTable parentTreeTable = Main.mainWindow.tagSelection.getTreeTable(); model.detachFromParentModel(); if (parentTreeTable != null) { parentTreeTable.removePropertyChangeListener("treeTableModel", treeTableModelChangeListener); } } COM: <s> removes the listeners </s>
funcom_train/20043519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void before() { xComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, tEnv.getObjRelation("xComposer")); if (xComposer == null) { throw new StatusException(Status.failed( "Couldn't get object relation 'xComposer'. Test must be modified")); } } COM: <s> recieves the object relations </s>
funcom_train/27944604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CPUTraceRef getSiblingCPU() { ListIterator itr = getMethod().getCPUTraces().listIterator(); CPUTraceRef trace; while ( itr.hasNext() ) { trace = (CPUTraceRef) itr.next(); if ( getFrames().equals( trace.getFrames() ) ) return trace; } return null; } COM: <s> returns sibling cpu object </s>
funcom_train/1150916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand7() { if (itemCommand7 == null) {//GEN-END:|337-getter|0|337-preInit // write pre-init user code here itemCommand7 = new Command("Item", Command.ITEM, 0);//GEN-LINE:|337-getter|1|337-postInit // write post-init user code here }//GEN-BEGIN:|337-getter|2| return itemCommand7; } COM: <s> returns an initiliazed instance of item command7 component </s>
funcom_train/39825030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(String topicName) { try { connectionFactory = new com.sun.messaging.ConnectionFactory(); connection = connectionFactory.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); topic = session.createTopic(topicName); msgProducer = session.createProducer(topic); } catch (JMSException jmse) { jmse.printStackTrace(); } } COM: <s> initialize jms connection session topic and producer </s>
funcom_train/47023512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getLblDictDesc() { if (lblDictDesc == null) {//GEN-END:|265-getter|0|265-preInit // write pre-init user code here lblDictDesc = new StringItem(getLocalizedString("Desc"), null);//GEN-LINE:|265-getter|1|265-postInit // write post-init user code here }//GEN-BEGIN:|265-getter|2| return lblDictDesc; } COM: <s> returns an initiliazed instance of lbl dict desc component </s>
funcom_train/27740065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { statsTracker.failedDirectConnect(); this.shutdown = true; this.connectingSocket = null; if (pushConnectOnFailure) { statsTracker.increment(DownloadStatsTracker.PushReason.DIRECT_FAILED); connectWithPush(new PushConnector(false, false)); } else { finishConnect(); finishWorker(); } } COM: <s> upon unsuccessful connect try using a push if push connect on failure </s>
funcom_train/9892385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelCenter() { if (panelCenter == null) { panelCenter = new JPanel(); panelCenter.setLayout(new BorderLayout()); panelCenter.add(getPanelNorth(), java.awt.BorderLayout.NORTH); panelCenter.add(getPanelSouth(), java.awt.BorderLayout.SOUTH); panelCenter.add(getSplitPane(), java.awt.BorderLayout.CENTER); } return panelCenter; } COM: <s> this method initializes panel center </s>
funcom_train/179114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeIterator neighbors() { ArrayList allNeighbors = new ArrayList(); for (int i = 0; i < inEdges.size(); i++) { Edge inEdge = (Edge) inEdges.get(i); allNeighbors.add(inEdge.source()); } for (int i = 0; i < outEdges.size(); i++) { Edge outEdge = (Edge) outEdges.get(i); allNeighbors.add(outEdge.target()); } Iterator iterator = allNeighbors.iterator(); return new NodeIterator(iterator); } COM: <s> returns a node iterator for all neighbor nodes of this node </s>
funcom_train/36737135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getConfigReaders() { List output = new ArrayList(); //Change this to something a bit better later on List locs = Settings.getConfigLocations(); Iterator iter = locs.iterator(); while(iter.hasNext()) { String resource = (String)iter.next(); Reader reader = ReaderUtils.returnReaderFromResource(resource); if(reader != null) output.add(reader); } if(output.size() == 0) { throw new DbConException("Error occured whilst parsing Config locations. None returned a valid parsable location"); } return output; } COM: <s> goes through all configured uris for config locations streams these into local </s>
funcom_train/45599133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endTransactionAndCommit(DataSource dataSource) { Connection connection = getConnection(dataSource); try { connection.commit(); } catch (Exception e) { try { connection.rollback(); } catch (Exception t) { logger.warn("Unable to perform database rollback after commit failure."); } throw new DatabaseException("Error while performing database commit.", e); } finally { reenableAutoCommit(connection); } } COM: <s> ends a transaction that was started using start transaction </s>
funcom_train/19648182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeEventHandlers() { String name = null; String className = null; for ( EventHandlerElement eventHandler : configuration.getEventHandlers() ) { if ( !eventHandler.isMultiple() ) { name = eventHandler.getName(); className = eventHandler.getClassName(); createInstance( name, className, true ); injectServices( name, eventHandler.getInjectedServices() ); } } } COM: <s> write the event handlers included in the configuration file </s>
funcom_train/8222835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DomainCredential getDomainCredentialAt(int index) { List all = new ArrayList(); Iterator hosts = _domainCredentials.keySet().iterator(); while (hosts.hasNext()) all.add(_domainCredentials.get(hosts.next())); return (DomainCredential) all.toArray(new DomainCredential[0])[index]; } COM: <s> gets the domain credential at </s>
funcom_train/116273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(){ if (position < document.getLength()){ try { char c = document.getText((int)position, 1).charAt(0); position++; return c; } catch (BadLocationException x){ return -1; } } else { return -1; } } COM: <s> read a single character </s>
funcom_train/38543281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Memento loadColorModelMemento(Preferences node) throws MementoException { Memento result = null; String className = node.get(MEMENTO_CLASS_PREFERENCE, null); if (className != null) { try { result = (Memento) Class.forName(className).newInstance(); result.load(node); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } } return result; } COM: <s> enables to recover a table color memento from a sub node </s>
funcom_train/5435380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloat(int offset, float f) { int v = Float.floatToIntBits(f); setByte(offset, v % 256); setByte(offset + 1, (v >> 8) % 256); setByte(offset + 2, (v >> 16) % 256); setByte(offset + 3, (v >> 24) % 256); } COM: <s> method set float </s>
funcom_train/9163555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TypeNode parseTypeTail(TypeNode base) { char ch = input.peek(); if (ch == '[') { input.expect(ch); input.expect(']'); return parseTypeTail(new ArrayTypeNode(input.getPlace(), base)); } if (ch == '<') { input.expect(ch); return parseTypeTail(new FunctionTypeNode(input.getPlace(), base, parseTypeList())); } return base; } COM: <s> parses a type tail </s>
funcom_train/15662821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRunscount(Integer newVal) { if ((newVal != null && this.runscount != null && (newVal.compareTo(this.runscount) == 0)) || (newVal == null && this.runscount == null && runscount_is_initialized)) { return; } this.runscount = newVal; runscount_is_modified = true; runscount_is_initialized = true; } COM: <s> setter method for runscount </s>
funcom_train/2039855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOREventListener(String name, OREventListener listener) { List<OREventListener> listeners = null; if ((listeners = eventListeners.get(name)) == null) { listeners = new ArrayList<OREventListener>(); } listeners.add(listener); eventListeners.put(name, listeners); } COM: <s> adds the or event listener </s>
funcom_train/41163238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoStrategyMomentumDes update(CoStrategyMomentumDes entity) { EntityManagerHelper.log("updating CoStrategyMomentumDes instance", Level.INFO, null); try { CoStrategyMomentumDes result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved co strategy momentum des entity and return it or </s>
funcom_train/44574666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitJmlRelationalExpression(JmlRelationalExpression self) { if (self.isSubtypeOf()) { translateIsSubtypeOf(self); return; } else if (self.isEquivalence() || self.isNonEquivalence()) { translateEquivalence(self); return; } else if (self.isImplication() || self.isBackwardImplication()) { translateImplication(self); } else { // FIXME: Case of comparing locks with < or <= is not implemented visitRelationalExpression(self); } } COM: <s> translates a jml relational expression </s>
funcom_train/49165050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getNameListPlain(String lotusNames){ if (lotusNames == null) return null; String[] nameList = lotusNames.split(";"); StringBuffer sb = new StringBuffer(); for (String lotusName : nameList) { if (sb.length() > 0) sb.append("; "); sb.append(getNamePlain(lotusName)); } return sb.toString(); } COM: <s> returns a list of names without the lotus metadata </s>
funcom_train/7507976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addIntHeader(String name, int value) { try { String safeName = ESAPI.validator().getValidInput("safeSetDateHeader", name, "HTTPHeaderName", 20, false); getHttpServletResponse().addIntHeader(safeName, value); } catch (ValidationException e) { logger.warning(Logger.SECURITY_FAILURE, "Attempt to set invalid int header name denied", e); } } COM: <s> add an int header to the response after ensuring that there are no </s>
funcom_train/8222838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteDomainCredentialAt(int index) { int i = -1; Iterator hosts = _domainCredentials.keySet().iterator(); while (hosts.hasNext()) { Object key = hosts.next(); i++; if (i == index) _domainCredentials.remove(key); } } COM: <s> delete domain credential at </s>
funcom_train/12182698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNullDescriptor(Map namesToDescriptors, List policies) { // Add a null descriptor which matches to nothing SelectionPolicyType selectionType = new SelectionPolicyType() { public List getKeywords() { return new ArrayList(); } }; final PolicyDescriptor nullDescriptor = POLICY_DESCRIPTOR_FACTORY .createPolicyDescriptor(selectionType, ""); namesToDescriptors.put("", nullDescriptor); policies.add(""); } COM: <s> add a null or empty descriptor to the list </s>
funcom_train/21652957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean playerOnline(String name, Player _p) { for (Player p : GameEngine.getPlayers()) { if (p != null && _p.playerId != p.playerId) { if (p.username.equalsIgnoreCase(name)) { return true; } } } return false; } COM: <s> make sure the player isnt already online </s>
funcom_train/21821190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateItem(TreeItem currentItem) { if (currentItem != null) { boolean noErrors = true; for (TreeItem item : currentItem.getItems()) { if (item.getImage() == getImage(ImageType.ERROR)) { noErrors = false; break; } } if (noErrors) { currentItem.setExpanded(false); currentItem.setImage(getImage(ImageType.DONE)); } else { currentItem.setImage(getImage(ImageType.ERROR)); } } } COM: <s> updates the item by checking if any of its children were errors </s>
funcom_train/34320634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void backup() { //TODO: make backup work more as we would expect it to if (needToCallBackup) { for (Iterator iter = inMemory.values().iterator(); iter.hasNext();) { ResourceReferenceInfo refInfo = (ResourceReferenceInfo) iter.next(); if (refInfo.isDirty()) { writeResourceToDisk(refInfo); } } needToCallBackup = false; } diskMan.flush(); } COM: <s> backup the data that is stored in the pager to disk </s>
funcom_train/15461234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DTOTable createDTOTable() { try { DTOTableDescriptor tbDescr = (DTOTableDescriptor) getDescriptor(); if (tbDescr == null) throw new NullPointerException("Undefined descriptor (null)"); DTOTable dto = new DTOTable(); dto.setDescriptor(tbDescr); return dto; } catch (Exception e) { throw new IllegalArgumentException( "Unable to initialize DTOTable, the specified descriptor doesn't define a suitable dto class: " + getDescriptor().getClass() + " [cause: " + e.getMessage() + "]"); } } COM: <s> creates a new dtotable wiring the descriptor dependency </s>
funcom_train/27825002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaximumCardinality(Concept concept) throws KAONException { synchronized (getLock()) { if (m_domainConceptsAndCardinalitites==null) loadThisObject(OIModel.LOAD_PROPERTY_DOMAINS); Cardinality cardinality=(Cardinality)m_domainConceptsAndCardinalitites.get(concept); if (cardinality==null) return Integer.MAX_VALUE; else return cardinality.m_maximum; } } COM: <s> returns the maximum cardinality for given domain concept </s>
funcom_train/28249517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showReversePoliciedCardFront(int cardIndex, ReversePolicy cardPolicy) { // note: the random-reverse mode is encoded directly in the flashcard in order to make its policy temporary // persistent during ltm-sessions switch (cardPolicy) { case NORMAL: showCardQuestion(cardIndex); break; case REVERSE: showCardContent(cardIndex); break; default: throw new RuntimeException("unsupported reverse policy"); } return true; } COM: <s> returns true if the given card index does not represent a valid flashcard </s>
funcom_train/4521100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ProcesoElectoral entity) { LogUtil.log("saving ProcesoElectoral instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved proceso electoral entity </s>
funcom_train/26397219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVariableIgnoreCase(final String variable) { final Enumeration keys = variables.keys(); while (keys.hasMoreElements()) { final String key = (String) keys.nextElement(); if (key.equalsIgnoreCase(variable)) { return variables.getProperty(key); } } return null; } COM: <s> gets the value of an environment variable </s>
funcom_train/4461859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restoreWidths(Hashtable widths) { if(widths == null) return; JTable j = table; if(j == null) return; // load all widths TableColumnModel tcm = j.getColumnModel(); if(tcm == null) return; Enumeration e = tcm.getColumns(); while(e.hasMoreElements()) { TableColumn tc = (TableColumn) e.nextElement(); Integer oldWidth = (Integer) widths.get(tc.getIdentifier()); if(oldWidth != null) tc.setPreferredWidth(oldWidth.intValue()); } } COM: <s> restores the column widths saved into the hashtable as the column widths </s>
funcom_train/13547167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initOpUseLists(BlockNode node, ChipDef chipDef) { for (Iterator it = node.getInstructions().iterator(); it.hasNext(); ) { Instruction instr = (Instruction)it.next(); chipDef.initOpUseLists(instr.operator()); } } COM: <s> this method should probably be moved to the chipdef class </s>
funcom_train/28265959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Period)) return false; final Period period = (Period) o; if (endDate != null ? !endDate.equals(period.endDate) : period.endDate != null) return false; if (!startDate.equals(period.startDate)) return false; return true; } COM: <s> equalsmethod for the period </s>
funcom_train/32057385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTransferData() { System.out.println("testGetTransferData"); UMClipObj um = new UMClipObj("come here", "output"); DataFlavor data = new DataFlavor(); try { um.getTransferData(data); } catch (UnsupportedFlavorException e) { System.out.println("throws UnsupportedFlavorExeception"); } catch (IOException e) { System.out.println("throws exeception"); } ; } COM: <s> tests get transfer data method of class umclip obj </s>
funcom_train/6451857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitSyncSignal() { try { synchronized (syncMonitor) { inWaitSyncMonitor = true; syncMonitor.wait(); inWaitSyncMonitor = false; } } catch (InterruptedException e) { } catch (Exception e) { logger.log(Level.WARNING,"Error waiting sync (1)", e); } } COM: <s> waits for a signal to continue the execution used in synchronised </s>
funcom_train/5376798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void issueEvent(StartLevelEvent sle) { /* queue to hold set of listeners */ ListenerQueue queue = new ListenerQueue(eventManager); /* add set of StartLevelListeners to queue */ queue.queueListeners(startLevelListeners, this); /* dispatch event to set of listeners */ queue.dispatchEventAsynchronous(sle.getType(), sle); } COM: <s> this method sends the start level event to the event manager for dispatching </s>
funcom_train/33745180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bubbleSort() { boolean swapped = true; while(swapped) { swapped = false; for(int i = 0; i < mData.size() - 1; i++) { Point2D.Float c = mData.get(i); Point2D.Float n = mData.get(i+1); if(c.x > n.x) { mData.set(i+1, c); mData.set(i, n); swapped = true; } } } } COM: <s> bubble sort algorithm implemented </s>
funcom_train/16640819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExpirationDate(String expirationDateStr) throws LicenseException{ try { DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.US); Date date = df.parse(expirationDateStr); this.expirationDate=date; } catch ( Exception e) { throw new LicenseException( e.getMessage() ); } } COM: <s> parses the string and converts it to a date </s>
funcom_train/32156098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateTargets() { this.targetsPlaces = new Place[this.nbTargets]; for (int t = 0 ; t < this.targetsPlaces.length ; t++) { double x = this.rand.nextFloat() * (this.x_axis - 1); double y = this.rand.nextFloat() * (this.y_axis - 1); this.targetsPlaces[t] = new Place(t, x, y, Target + (t + 1)); } } COM: <s> generate a random place for every target </s>
funcom_train/7910781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExtendableStringMetric getExtendableStringMetric(ExtendableStringMetric.Metric id){ ExtendableStringMetric.CombinableStringMetric cm = new ExtendableStringMetric.CombinableStringMetric(id,1.0); return new ExtendableStringMetric(cm, ExtendableStringMetric.Operator.Sum); //operator doesn't matter in this case... } COM: <s> creates the simplest extendable metric a singleton with no weighting </s>
funcom_train/9432828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerContentObservers() { ContentResolver resolver = getContentResolver(); resolver.registerContentObserver(LauncherSettings.Favorites.CONTENT_URI, true, mObserver); resolver.registerContentObserver(LauncherProvider.CONTENT_APPWIDGET_RESET_URI, true, mWidgetObserver); } COM: <s> registers various content observers </s>
funcom_train/22909817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String description; try { description = getDescription(); } catch (MetadataException e) { description = _directory.getString(getTagType()) + " (unable to formulate description)"; } return "[" + _directory.getName() + "] " + getTagName() + " - " + description; } COM: <s> a basic representation of the tags type and value in format </s>
funcom_train/3091001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { g.setColor(Color.WHITE); g.fillRect(0,0,g.getClipBounds().width,g.getClipBounds().height); g.translate(posX, posY); //set up some variables used int dot = zoom/4; if (dot == 0) dot = 1; model.setDot(dot); model.setZoom(zoom); //update positions layoutTree(); drawSelectedLevel(g); drawGraph(g, dot); drawLabels(g); model.getRoot().drawTree(g); } COM: <s> main paint method </s>
funcom_train/14163893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getPageId(String filename) { JdbcTemplate jdbc = new JdbcTemplate(ds); Object[] args = new Object[1]; args[0] = filename; long pageId = 0; try { pageId = jdbc.queryForLong("SELECT id FROM page_node WHERE name = ?", args); } catch (EmptyResultDataAccessException emptyError) { // do nothing } return pageId; } COM: <s> get the unique long integer id of the storyboard page </s>
funcom_train/2324684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double normal(double a) throws ArithmeticException { double x, y, z; x = a * SQRTH; z = Math.abs(x); if (z < SQRTH) y = 0.5 + 0.5 * errorFunction(x); else { y = 0.5 * errorFunctionComplemented(z); if (x > 0) y = 1.0 - y; } return y; } COM: <s> returns the area under the normal gaussian probability density </s>
funcom_train/26526405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(String name, String value) { List list = (List) parameters.get(name); if (list != null) list.clear(); if (value != null) { if (list == null) { list = new ArrayList(1); parameters.put(name,list); } list.add(value); } } COM: <s> sets the parameter with given name to a single string value thereby </s>
funcom_train/32015699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logAndPrintException(Logger logger, FormEvent event, UserErrorException e) { logger.warn(e.getMessage()); if (e.getCause() != null) logger.warn("Cause: " + e.getCause().toString()); e.printStackTrace(); MessageBoxBean error = event.getMessageBoxBean("error"); error.appendText(e.getMessage()); } COM: <s> logs and prints the contents of a user error exception to a user </s>
funcom_train/34477710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValidationDate() throws SdaiException { // synchronized (syncObject) { if (repository == null) { throw new SdaiException(SdaiException.SI_NEXS); } if (!repository.active) { throw new SdaiException(SdaiException.RP_NOPN, repository); } if (validation_date > 0) { return repository.session.cal.longToTimeStamp(validation_date); } else { throw new SdaiException(SdaiException.VA_NSET); } // } // syncObject } COM: <s> returns the date of the most recent invocation of the </s>
funcom_train/44222640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createScript() { if (this.importTask.equals(IMPORT_MAPS)) { this.cacheScriptOutputsForBrainmapImport(); this.dumpScriptForBrainmap(); } else { this.cleanScriptStatusFile(); this.cacheScriptOutputsForDataImport(); this.dumpScriptForDataLayer(); } } COM: <s> create the adobe illustrator script file </s>
funcom_train/28643083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void warn(Object msg, Throwable t) { if(isEnabled(LEVEL_WARN)) { msg = '[' + LEVELS[LEVEL_WARN] + ']' + String.valueOf(msg) + '\n'; write(LEVEL_WARN, String.valueOf(msg)); write(LEVEL_WARN, tools.getStackTrace(t)); } } COM: <s> write warning message </s>
funcom_train/26226821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void topologicalSort(Node[] nodes, Node start) { int nodesNumber = nodes.length; for (int i = 0; i < nodesNumber; ++i) { nodes[i].setMarked(false); } num = nodesNumber; depthFirstSearch(start); for (int i = 0; i < nodesNumber; ++i) { if (!nodes[i].getMarked()) { depthFirstSearch(nodes[i]); } } } COM: <s> fill the array topological order with the nodes in topological </s>
funcom_train/18358041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void SyncMissionToStore(Mission theMission) { Long theMissKey = new Long(theMission.getMissionId()); System.out.println("Syncing Mission: " + theMission.getMissionName()); // if the mission is already present, remove it if (missionSet.containsKey(theMissKey) == true) { missionSet.remove(theMissKey); } // now save it back. missionSet.put(theMissKey,theMission); } COM: <s> sync mission to store is used to synchronise the local and global </s>
funcom_train/41413547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_success_read_config() throws Exception { ClassLoader cl = Thread.currentThread().getContextClassLoader(); InputStream in = cl.getResourceAsStream("sample-config.xml"); ConfigReader configReader = new ConfigReader(); Map config = configReader.read(in); assertNotNull(config); assertEquals(264, config.keySet().size()); // test get one of the entry in the file assertEquals("true", config .get("org.eclipse.jdt.core.formatter.comment.format_html")); } COM: <s> test successfully read a config file </s>
funcom_train/24372914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Application getMatchingApplication(Message message) throws HL7Exception { Terser t = new Terser(message); String messageType = t.get("/MSH-9-1"); String triggerEvent = t.get("/MSH-9-2"); return this.getMatchingApplication(messageType, triggerEvent); } COM: <s> returns the applications that has been registered to handle </s>
funcom_train/44364716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object newValue, int rowIndex, int columnIndex) { if ( columnIndex == COLUMN_VALUE ) { this.put(this.keySet().toArray()[rowIndex],newValue); } fireTableRowsUpdated(rowIndex,rowIndex); } COM: <s> sets the value at a specific row and column to a new value </s>
funcom_train/12569407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeResourceFile(ResourceFile resourceFile) { String resourceKey = resourceFile.getResourceKey(); this.getResourceFilesMap().remove(resourceKey); if (this.load) { ResourceRow resourceRow; for (Iterator<String> itr = this.rows.keySet().iterator(); itr.hasNext();) { resourceRow = this.rows.get(itr.next()); resourceRow.removeColumnValue(resourceKey); } } } COM: <s> remove a given resource file from the model </s>
funcom_train/3380231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeKeyStoreEntry(PrintWriter out) { out.print("keystore \""); out.print(keyStoreUrlString); out.print('"'); if (keyStoreType != null && keyStoreType.length() > 0) out.print(", \"" + keyStoreType + "\""); if (keyStoreProvider != null && keyStoreProvider.length() > 0) out.print(", \"" + keyStoreProvider + "\""); out.println(";"); out.println(); } COM: <s> writes the unexpanded keystore entry </s>
funcom_train/14094479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processElement() throws XMLException { validateElement(); Object expected = getExpectedObject(); Object actual = getActualObject(); if (expected instanceof String || actual instanceof String) { if (actual != null) { actual = actual.toString(); } if (expected != null) { expected = expected.toString(); } } Assert.assertEquals( getMessage(), expected, actual); } COM: <s> obtain the expected and actual objects </s>
funcom_train/7511155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attachImage(BufferedImage image) { if (this.sourceImage != null) { throw new IllegalStateException("Internal error. Please, detach previous image."); } logger.debug("Attaching image {}.", image); this.sourceImage = image; for (IFilter filter : this.filterList) { if (filter instanceof IFilterAttachable) { ((IFilterAttachable) filter).onAttachToImage(image); } } } COM: <s> start processing new image </s>
funcom_train/130441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void queryPose () { try { sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */ os.writeByte (PLAYER_IR_POSE_REQ); os.flush (); } catch (Exception e) { System.err.println ("[IR] : Couldn't send PLAYER_IR_POSE_REQ command: " + e.toString ()); } } COM: <s> configuration request query pose </s>
funcom_train/48423231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVersion(String line) { String version = ""; String[] lparts; try { lparts = line.split(SPLITCHAR); if (lparts.length > 0) { version = lparts[1]; } } catch (Exception Ex) { logger.log(Level.SEVERE, "Error recovering version from line" + " tokens : " + line, Ex); } return version; } COM: <s> method that recovers model version from line tokens </s>
funcom_train/1796995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilters(String filters) { // check if setting to existing value if (this.filters == null ? filters != null : !this.filters.equals(filters)) { // set to new value for customer parameter this.filters = filters; setStringCustomParameter("filters", filters); } } COM: <s> sets the dimension and metric filters </s>
funcom_train/3064072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int divadd(int[] a, int[] result, int offset) { long carry = 0; for (int j=a.length-1; j >= 0; j--) { long sum = (a[j] & LONG_MASK) + (result[j+offset] & LONG_MASK) + carry; result[j+offset] = (int)sum; carry = sum >>> 32; } return (int)carry; } COM: <s> a primitive used for division </s>
funcom_train/44770400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nodeAdded(Path path) { try { synchronized (lockMap) { PathMap.Element parent = lockMap.map(path.getAncestor(1), true); if (parent != null) { parent.insert(path.getNameElement()); } } } catch (PathNotFoundException e) { log.warn("Unable to determine path of added node's parent.", e); return; } } COM: <s> invoked when some node has been added </s>
funcom_train/18266472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cohesion() { if (!prioritySet) { // calculate the average coordinate of local agents Coordinate centerOfMass = calcCenterOfMass(this, flockRange); if (calculateDistance(centerOfMass) > clumpingRange) { // only steer towards the flock, if its center of mass is within clumping range headToward(centerOfMass); prioritySet = true; } } } COM: <s> group together with local boids </s>
funcom_train/44457401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* * public boolean getBooleanValue() { String value = getValue(); if * (value.equalsIgnoreCase("yes")) { setElementValue(new Boolean(true)); } * else if (value.equalsIgnoreCase("no")) { setElementValue(new * Boolean(false)); } return super.getBooleanValue(); } COM: <s> get boolean value </s>
funcom_train/44313324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeDefaultMacros() { fMacros.add(new Macro("COMMON_FLAGS", "-classpath ${SCJAVAPATH}")); fMacros.add(new Macro("COMPILE", "javac ${COMMON_FLAGS} -source 1.4")); fMacros.add(new Macro("RUN", "java ${COMMON_FLAGS} -enableassertions")); } COM: <s> setup default macros to use in the makefile out </s>
funcom_train/39123675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() { if (endEvent == null) { System.err.println("Fixing null end event" ); ShortMessage shm=new ShortMessage(); try { shm.setMessage(ShortMessage.NOTE_ON,channel,note,0); } catch (InvalidMidiDataException e) { // TODO Auto-generated catch block e.printStackTrace(); } duration=0; endEvent=new MidiEvent(shm,startTick); } } COM: <s> pjl hack not do not use </s>
funcom_train/4522177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRowSelection(int startIndex, int endIndex) { int start = Math.min(startIndex, endIndex); int end = Math.max(startIndex, endIndex); for (int i = start; i <= end; i++) { _selectionModel.addSelectedRow(_rowList.get(i)); } } COM: <s> set all rows in the range as selected </s>
funcom_train/8009139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDescriptionFont(String font) { _font = font; Props props = getPage().getPageProperties(); if (_font != null) { _fontStartTag = props.getProperty(_font + Props.TAG_START); _fontEndTag = props.getProperty(_font + Props.TAG_END); } else { _fontStartTag = props.getProperty(HtmlText.FONT_DEFAULT + Props.TAG_START); _fontEndTag = props.getProperty(HtmlText.FONT_DEFAULT + Props.TAG_END); } } COM: <s> this method will load the font start and end tags from the page </s>
funcom_train/12183379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasAcceptMimeTypeWithNonMatchingHeader() { MockHttpHeaders headers = new MockHttpHeaders(); headers.addHeader("accept", "text/html"); boolean hasMimeType = HTTPHeadersHelper.hasAcceptMimeType(headers, mimeType); assertFalse("These headers should not contain the mime type: " + mimeType, hasMimeType); } COM: <s> test that a single non matching header causes has accept mime type to </s>
funcom_train/42869242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alter(Instance instance, Transform matrix, AlphaTransform cxform, int ratio) { Placement placement = new Placement(instance, matrix, cxform, null, ratio, -1, frameNumber, true, false, null); placements.add(placement); } COM: <s> alter the symbol instance by applying the given properties </s>
funcom_train/2506345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void routingError(SeppMessage message, String failingHop) { /* * If the source of this message isn't a neighbor than it has used a * route to get here and therefore we must return a route error. */ Route route = routeCache.getRoute(message.getDestination()); if (route instanceof Route) { SSRRouteError error = new SSRRouteError(securityService.getRandomLong(), localPeerId, failingHop); createMessageAuthentication(error); stm.sendMessage(new SeppMessage(error, message.getSource())); } } COM: <s> is called by the underlying physical communication if an error occurs </s>
funcom_train/28116149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloseForClosedConnection() throws Exception { TestContext context = getContext(); Connection connection = context.getConnection(); connection.close(); try { connection.close(); } catch (Exception exception) { String msg = "Closing a closed connection shouldn't generate an " + "exception"; log.debug(msg, exception); fail(msg); } } COM: <s> verifies that closing a closed connection does not produce an </s>
funcom_train/41144887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String instanceToString(Instance inst) { Instance outInst; if (inst instanceof SparseInstance) { outInst = new Instance(inst.weight(), inst.toDoubleArray()); outInst.setDataset(inst.dataset()); } else { outInst = inst; } return outInst.toString(); } COM: <s> turns an instance into a string </s>