__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34258521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasGrayTasks() { for(int i = 0; this.getWorkTaskLinkList().size() > i; i++) { WorkTaskLink lPD = (WorkTaskLink) getWorkTaskLinkList().get(i); if (lPD.isGray()) { return true; } } return false; } COM: <s> this is different than is gray </s>
funcom_train/890200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evaluate(Object target) { if (getConditions().size() == 0) { return true; } for (Iterator i = getConditions().iterator(); i.hasNext();) { if (((Condition) i.next()).evaluate(target)) { return true; } } return false; } COM: <s> returns true if if at least one of the nested </s>
funcom_train/625418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopReggie() throws NetException { final String[] groups = new String[] { GroupnameProvider.getUuid()}; final Class[] classes = new Class[] { ServiceRegistrar.class}; new JiniComponentDestroyer(groups, classes, "Error while trying to destroy Lookup Service: ", this.mWaitDuration); } COM: <s> shuts down reggie gracefully </s>
funcom_train/39470174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean acceptsString(String str) throws SymbolNotInAlphabet { if (isEmpty()) { return false; } int state = startState; for (int i = 0; i<str.length(); i++) { char ch = str.charAt(i); if (!alpha.containsSymbol(ch)) { throw new SymbolNotInAlphabet("symbol: "+ch); } int idx = alpha.idxSymbol(ch); state = delta[state][idx]; } return accept.contains(new Integer(state)); } COM: <s> returns true if this dfa accepts the specified string </s>
funcom_train/25492906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawCircle(double x, double y, Color color, float size) { cb.setLineWidth(1f); cb.setColorStroke(color); cb.circle((float) (x/scale + xMin), (float) (y/scale) + yMin , size); cb.stroke(); } COM: <s> draws a circle with the specified position color and size </s>
funcom_train/24090757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit(JComboBox statesCombo) { log.debug("enter FileMenu.exit()"); switch (getExitOption()) { case JOptionPane.YES_OPTION: log.debug("\tyou have selected the YES_OPTION"); if (viewer.isChangedViewer()) { save(statesCombo); exit(statesCombo); } System.exit(0); break; case JOptionPane.NO_OPTION: log.debug("\tyou have selected the NO_OPTION"); if (viewer.isChangedViewer()) { viewer.setChangedViewer(false); exit(statesCombo); } break; case JOptionPane.CANCEL_OPTION: log.debug("\tyou have selected the CANCEL_OPTION"); break; default: break; } } COM: <s> this method handles two types of exits one in which the </s>
funcom_train/45469544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getJavaClass(final ClassLoader loader) { Class result = null; try { result = ClassLoadingUtils.loadClass(loader, _name); } catch (ClassNotFoundException e) { _log.error("Unable to load base class of " + getName(), e); } return result; } COM: <s> get the base class of this class molder given a class loader </s>
funcom_train/34567703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ColorModel getSelectRowColor(int rowIndex){ if(rowIndex >= colorList.size() && rowIndex < getRowCount()){ insertChangeModel(rowIndex,getRowCount() - colorList.size()); } if(ifFiltered){ OrderedData od = filteredData.get(rowIndex); return colorList.get(od.getDataIdx()); }else return colorList.get(rowIndex); } COM: <s> get color model for specific row get it from color model array list </s>
funcom_train/1655152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onReply(String pluginname, String indentifier, SimpleFieldSet params, Bucket data) { String message = params.get("Message"); boolean identitiesWereReceived = false; synchronized(sfsLock) { if(message.equals("Identities")) { sfsIdentities = params; identitiesWereReceived = true; } else if(message.equals("OwnIdentities")) { sfsOwnIdentities = params; identitiesWereReceived = true; } } if(identitiesWereReceived) mThread.interrupt(); } COM: <s> called by the plugin talker it is run in a different thread </s>
funcom_train/18566194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setTitle("Creative Commons"); this.setContentPane(getJContentPane()); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { IlPool.getInstance().finalizeLoad(true); } }); } COM: <s> this method initializes this </s>
funcom_train/3631057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxStringLength(FontMetrics fm) { for (int i = 0; i < getText().length(); i++) if ((fm.stringWidth(getText().substring(0, i)) > ((this.getSize()).width - fm.stringWidth(" ") * 3))) return i; // 3 character safeguard return getText().length(); } COM: <s> method to get the maximum characters allowed from the canvas width </s>
funcom_train/41724579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxExponent() { int result = 0; TiedNumberExpression<IntegerValue> currentVariable = null; int currentVariableMaxExponent = 0; for (TiedNumberExpression<IntegerValue> variable : this) { if (currentVariable == variable) { currentVariableMaxExponent++; } else { currentVariable = variable; currentVariableMaxExponent = 1; } result = Math.max(result, currentVariableMaxExponent); } return result; } COM: <s> returns the max exponent of any of the variables i </s>
funcom_train/10548805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataTypeDescriptor getStoredDataTypeDescriptor(Object o) { if (o instanceof DataTypeDescriptor) return (DataTypeDescriptor) o; else // Must be an OldRoutineType, so we will convert it to a // DataTypeDescriptor for our purposes return DataTypeDescriptor .getType(RoutineAliasInfo.getStoredType(o)); } COM: <s> when retrieving a data type descriptor it might just be a regular </s>
funcom_train/4880409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1 () { if (okCommand1 == null) {//GEN-END:|51-getter|0|51-preInit // write pre-init user code here okCommand1 = new Command ("Ok", Command.OK, 0);//GEN-LINE:|51-getter|1|51-postInit // write post-init user code here }//GEN-BEGIN:|51-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/23689736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeCode eqTypeCheck(Exp exp1, Exp exp2, Env arg, String op){ TypeChecker.enter("\t inTypeCheck((TypeCode t1, TypeCode t2))"); TypeCode t1 = (TypeCode)exp1.accept(this, arg); TypeCode t2 = (TypeCode)exp2.accept(this, arg); if(t1==t2){ lastCompType = t1; return TypeCode.BOOL; } throw new TypeException("incomparable types: " + t1 + " and " + t2); } COM: <s> typecheck such as equality and inequality </s>
funcom_train/41117624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy() { // Get system clipboard Clipboard c = this.getToolkit().getSystemClipboard(); // Copy and save the scribble in a Transferable object SimpleSelection s = new SimpleSelection(lines.clone(), dataFlavor); // Put that object on the clipboard c.setContents(s, s); } COM: <s> copy the current scribble and store it in a simple selection object </s>
funcom_train/13994636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMenuBarMaxItems() { menuBarItems = new Component[] { Box.createHorizontalGlue(), createMenuBarButton(MINIMIZE_ACTION), createMenuBarButton(RESTORE_ACTION), Box.createHorizontalStrut(2), createMenuBarButton(CLOSE_ACTION), Box.createHorizontalStrut(2) }; } COM: <s> creates the buttons for the menu bar in maximized state minimize </s>
funcom_train/31756573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Button createFgColorButton( ) { fgColorChooser = new ColorChooser(); final Button button = new Button( styleComp, SWT.PUSH ); button.setText( "Fg Color" ); button.addSelectionListener( new SelectionAdapter() { public void widgetSelected( final SelectionEvent event ) { fgIndex = ( fgIndex + 1 ) % MAX_COLORS; updateFgColor(); } } ); return button; } COM: <s> creates a button to change the foreground color of the registered </s>
funcom_train/37866965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StoredNode getNode() { StoredNode node = StoredNode.deserialize(current.data(), current.start(), current.getLength(), document); node.setOwnerDocument(document); node.setInternalAddress(current.getAddress()); return node; } COM: <s> deserialize the node at the current position of the cursor and return </s>
funcom_train/8554773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCountWeight() { System.out.println("countWeight"); float fW = 0.0F; float fC = 0.0F; float expResult = 0.0F; float result = Relevances.countWeight(fW, fC); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of count weight method of class dirindex </s>
funcom_train/647346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnText(Object element, int columnIndex) { ExplainNode en = (ExplainNode) element; switch (columnIndex) { case 0: return en.toString(); case 1: return formatNumber(en.getTotalCost()); case 2: return formatNumber(en.getCost()); case 3: return formatNumber(en.getStreamCount()); case 4: return formatNumber(en.getColumnCount()); case 5: return formatNumber(en.getCpuCost()); case 6: return formatNumber(en.getIoCost()); case 7: return formatNumber(en.getFirstRowCost()); } return null; } COM: <s> return formatted column text </s>
funcom_train/1479245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWindowPane(Player p, int set) { if (p == null || p.stream == null || p.disconnected[0]) { return; } p.getByteVector().createFrame(239); p.getByteVector().writeWord(set); p.getByteVector().writeByteA(0); } COM: <s> set either fullscreen or normal </s>
funcom_train/37075037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTranscriptOfOneLevelAnnot(SeqFeatureI feat) { if (!feat.isTranscript()) return false; String annotType = feat.getRefFeature().getFeatureType(); FeatureProperty fp =Config.getPropertyScheme().getFeatureProperty(annotType); return fp.isOneLevel(); } COM: <s> in other words is this a false transcript </s>
funcom_train/123123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection <? extends E> c) { if (c instanceof FastCollection) return addAll((FastCollection) c); boolean modified = false; Iterator <? extends E> itr = c.iterator(); int pos = c.size(); while (--pos >= 0) { if (add(itr.next())) { modified = true; } } return modified; } COM: <s> appends all of the values in the specified collection to the end of </s>
funcom_train/26279930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JGimpChannel getActiveChannel() throws JGimpException { JGimpChannel activeChannel = (JGimpChannel) m_App.callProcedure("gimp_image_get_active_channel", this)[0]; if (activeChannel.getID() == -1) { return null; } return activeChannel; } COM: <s> returns the active channel for the image null if no channel </s>
funcom_train/4347945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void write(InputStream source, OutputStream destination, int bufferSize) throws IOException { if (source == null || destination == null) throw new NullPointerException("Must provide non-null source and destination streams."); int read = 0; byte[] chunk = new byte[bufferSize]; while ((read = source.read(chunk)) > 0) destination.write(chunk, 0, read); } COM: <s> writes the contents of the </s>
funcom_train/25365719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNpcPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RoomEvent_npc_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_npc_feature", "_UI_RoomEvent_type"), LeveleditorPackage.Literals.ROOM_EVENT__NPC, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the npc feature </s>
funcom_train/9874760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCghAnalysisMenu(JMenu menu, ActionManager manager) { int index = 0; Action action; while ((action = manager.getAction(ActionManager.CGH_ANALYSIS_ACTION+String.valueOf(index)))!=null) { menu.add(createJMenuItem(action)); index++; } } COM: <s> adds cgh analysis menu items </s>
funcom_train/4744722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRefreshFromQuota(int quotaID) { QuotaModificationMapping found = null; for (QuotaModificationMapping qm: createUserGroupData.getQuotas()) { if (qm.getQuota().getQuotaID() == quotaID) { found = qm; } } if (found != null) { found.setRefresh(null); } } COM: <s> removes an refreshment from the the quota modification mapping </s>
funcom_train/5347225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWrongProtocolHost() { CATCHER.endpoint = new Endpoint("www.yahoo.com", 80); RouterService.connect(); sleep(); assertEquals("unexpected successful connect", 0, CATCHER.connectSuccess); assertGreaterThan("should have received failures", 0, CATCHER.connectFailures); //assertEquals("should have received failure", 1, CATCHER.connectFailures); } COM: <s> test to make sure tests does not succeed with a host reporting </s>
funcom_train/7504435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeDictionaryFile(List<HuffmanData> datas) { BufferedWriter out = null; try { out = FileUtil.getWriter(Configuration.getOutputDictionaryFileName()); for (HuffmanData data: datas) { String value; switch(data.getValue()) { case '\n': value = "\\n"; break; case '\r': value = "\\r"; break; case '\t': value = "\\t"; break; default: value = data.getValue() + ""; } String line = value + ":" + data.getIndex() + '\n'; out.write(line); } } catch (IOException e) { e.printStackTrace(); } finally { FileUtil.close(out); } } COM: <s> write dictionary file </s>
funcom_train/19259271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append( "[(" ); buffer.append( getEasting() ); buffer.append( ", " ); buffer.append( getNorthing() ); buffer.append( "), (" ); try { buffer.append( getLongitude() ); buffer.append( ", " ); buffer.append( getLatitude() ); } catch( ProjException e ) { e.printStackTrace(); } buffer.append( ")]" ); return buffer.toString(); } COM: <s> returns the coordinates of this point as a string </s>
funcom_train/25505711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IntegerWidget getProxyPortField() { if (proxyPortField == null) { proxyPortField = new IntegerWidget(BigInteger.ZERO, null); //$NON-NLS-1$ proxyPortField.setColumns(10); proxyPortField.setToolTipText(LocalizationData.get("PreferencesDialog.Network.port.tooltip")); //$NON-NLS-1$ proxyPortField.addPropertyChangeListener(IntegerWidget.VALUE_PROPERTY, this.updateOkListener); } return proxyPortField; } COM: <s> this method initializes proxy port field </s>
funcom_train/29561248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float scoreFloats( float scoreVal, float otherVal ) { // this may be crude: score as the ratio of the smallest vs the highest -> 0.0-1.0 range float diff = Math.abs( scoreVal - otherVal ); if ( diff >= expectedRange ) { return 0f; } float result = 1.0f - (diff / expectedRange); assert( result <= 1.0f ); return result; } COM: <s> calculate the score </s>
funcom_train/35682666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEndpointNotFound() { try { LegStarConfigCommons legStarConfig = new LegStarConfigCommons( CONFIG_FILE); legStarConfig.getHostEndpoint("NotAMainframe"); } catch (LegStarConfigurationException e) { assertEquals( "The requested endpoint:NotAMainframe is not defined.", e.getMessage()); } } COM: <s> try a non existing endpoint </s>
funcom_train/49835879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeBNC() { File f = new File(System.getProperty("user.home") + File.separator + "wordnet" + File.separator + "data" + File.separator + "bncobjects.dat"); try { FileOutputStream fstrm = new FileOutputStream(f); ObjectOutput ostrm = new ObjectOutputStream(fstrm); ostrm.writeObject(bnc); ostrm.flush(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> this writes out the bnc words as serialised objects </s>
funcom_train/1330713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(Object obj, String name, IWriter writer) { if (obj == null) { if (serializeNullValues) { writer.writeKey(name); writer.writeValue(NULL); } return; } for (IConverter converter : converters) { if (converter.canConvert(obj.getClass())) { converter.marshal(obj, name, writer, this); return; } } new BeanConverter().marshal(obj, name, writer, this); } COM: <s> processes a given object using registered converters and writes it to the </s>
funcom_train/32755775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display( final Knob knob ) { ELEMENT_STATE_RECORDS.clear(); _knob = knob; final List<KnobElement> elements = knob.getElements(); for ( final KnobElement element : elements ) { ELEMENT_STATE_RECORDS.add( new KnobElementStateRecord( element ) ); } ELEMENT_STATE_TABLE_MODEL.fireTableDataChanged(); final JDialog dialog = getDialog(); dialog.setLocationRelativeTo( dialog.getOwner() ); dialog.setVisible( true ); } COM: <s> display the dialog </s>
funcom_train/16695201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compile(File[] sourceFiles) throws CompileException, IOException { this.benchmark.report("Source files", sourceFiles); Resource[] sourceFileResources = new Resource[sourceFiles.length]; for (int i = 0; i < sourceFiles.length; ++i) sourceFileResources[i] = new FileResource(sourceFiles[i]); this.compile(sourceFileResources); return true; } COM: <s> reads a set of java trade compilation units a </s>
funcom_train/17912034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transferable createTransferable(JComponent c) { Transferable t = null; System.out.println("createTransferable"); if(c instanceof JTree) { JTree tree = (JTree) c; t = new GenericTransferable(tree.getSelectionPaths()); dragPath = tree.getSelectionPath(); if (dragPath != null) { draggedNode = (MutableTreeNode) dragPath.getLastPathComponent(); } } return t; } COM: <s> create a transferable that contains all paths that are currently selected in </s>
funcom_train/15746709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generatePointList() { if (points != null) if (rawPoints == getAttributeValue(SVGConstants.SVG_POINTS_ATTRIBUTE)) return; points = new PointList(); rawPoints = getAttributeValue(SVGConstants.SVG_POINTS_ATTRIBUTE); if (rawPoints == null) return; String[] rawList = rawPoints.split(" "); String[] tmpPoint = null; for (String s : rawList) { tmpPoint = s.split(","); if (tmpPoint.length > 1) points.addPoint(Integer.parseInt(tmpPoint[0]), Integer.parseInt(tmpPoint[1])); } } COM: <s> initializes the local point list cache </s>
funcom_train/4717816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void computeByteArray(OSCJavaToByteArrayConverter stream) { stream.write("#bundle"); computeTimeTagByteArray(stream); Enumeration enum = packets.elements(); OSCPacket nextElement; byte[] packetBytes; while (enum.hasMoreElements()) { nextElement = (OSCPacket) enum.nextElement(); packetBytes = nextElement.getByteArray(); stream.write(packetBytes.length); stream.write(packetBytes); } byteArray = stream.toByteArray(); } COM: <s> compute the osc byte stream representation of the bundle </s>
funcom_train/23173287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNewID () { HashSet<Integer> hsIDs = new HashSet<Integer> (); for (T t : this.lIdObjects) { hsIDs.add (t.getId ()); } // find first unused ID int newID = 1; while (hsIDs.contains (newID)) { newID++; } return newID; } COM: <s> this method returns an unique id which is not in use yet </s>
funcom_train/22020942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(String name, String type) { // set non-static and private as default AttributeProps a = new AttributeProps(name, type, null, null, null, Constants.notStaticCst, Constants.privateCst); nameToAttr.put(name, a); attributesFigure.addLine(createAttrText(a), a.static_, a.visibility); } COM: <s> add a new attribute to this class or interface </s>
funcom_train/7754810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attachDataset( Dataset d ) { if (dataset.contains (d) ) return; dataset.add(d); d.yAxis = this; // set the range of the data this.setDataRange (); // adjust the axis Limits this.setAxisMinLimit (); this.setAxisMaxLimit (); // set the range of the axis this.setAxisRange (); } COM: <s> attach a dataset for the vertical axis to manage </s>
funcom_train/8901833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProbabilisticNetwork load(File input) throws LoadException, IOException, JAXBException{ int index = input.getName().lastIndexOf('.'); String id = input.getName().substring(0, index); ProbabilisticNetwork pn = new ProbabilisticNetwork(id); loadXML(input, pn); /* * Aqui é feito o carregamento do arquivo. * Estudar como isto é relacionado com o XML. * Esta classe deve buscar o arquivo temporário criado pelo banco */ return pn; } COM: <s> loads a new probabilistic network from the input file </s>
funcom_train/4852804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand2() { if (backCommand2 == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here backCommand2 = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return backCommand2; } COM: <s> returns an initiliazed instance of back command2 component </s>
funcom_train/16608288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getNextSubmissionTuple() throws IOException { String line = submissionListReader.readLine(); if (line == null) return false; ArrayList<String> arr = new ArrayList<String>(); StringTokenizer t = new StringTokenizer(line, "\t,"); while (t.hasMoreTokens()) { String token = t.nextToken(); arr.add(token); } if (arr.size() != 2) { return false; } currentSubmissionPK = arr.get(0); currentTestSetupPK = arr.get(1); return true; } COM: <s> get the next submission pk project pk tuple from the submission list </s>
funcom_train/19254246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize() { if (SwingWTUtils.osIsMacOSX() && orientation == VERTICAL && (parent instanceof JScrollPane)) { Dimension d = super.getPreferredSize(); d.width = d.width + 70; return d; } else return super.getPreferredSize(); } COM: <s> this is actually a special case for some reason when we use vertical </s>
funcom_train/23180884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPie3DBackground() throws Exception { Map params = Parameters.parseQueryString("cht=p3&chd=t:60,40&chs=250x100"); JFreeChart chart = ChartEngine.buildChart(params); assertNull(chart.getPlot().getBackgroundPaint()); } COM: <s> make sure the pie 3d background is transparent by default </s>
funcom_train/18008725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeUpdate(PreparedStatementCreator psc) throws DataAccessException { PreparedStatement st=null; try { st=psc.createPreparedStatement(sqlConn); return st.executeUpdate(); } catch (SQLException e) { throw new DataAccessException("cannot execute update", e); } finally { if (st!=null) { try { st.close(); } catch (SQLException e) { throw new DataAccessException("cannot close statement", e); } } } } COM: <s> p execute an sql update statement </s>
funcom_train/44342342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeIncomeRelations() { if (incomeRelations != null) { Relation relation = null; for (Iterator i = incomeRelations.iterator(); i.hasNext();) { relation = (Relation) i.next(); relation.getSourceConcept().removeOutcomeRelation(relation); relation = null; // for the gc } incomeRelations.clear(); incomeRelations = null; } } COM: <s> remove from the cg all the income relations of the current concept </s>
funcom_train/51254272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sessionCreated(IoSession session) throws Exception { System.out.println("Session created from "+(InetSocketAddress)session.getRemoteAddress()+" to "+(InetSocketAddress)session.getLocalAddress()); session.getFilterChain().addLast( "codec", new ProtocolCodecFilter( new NATProtocolCodecFactory() ) ); } COM: <s> a new session has been created </s>
funcom_train/35278451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SixDofJoint getJoint(String boneName) { PhysicsBoneLink link = boneLinks.get(boneName); if (link != null) { return link.joint; } else { logger.log(Level.WARNING, "Not joint was found for bone {0}. make sure you call spatial.addControl(ragdoll) before setting joints limit", boneName); return null; } } COM: <s> return the joint between the given bone and its parent </s>
funcom_train/45440041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendErrorPage(int code, String msg) throws Exception { if (isCommitted()) throw new IllegalStateException("Respose already committed."); if (msg == null) msg = ""; resetBuffer(); pwriter = null; setContentType("text/html; charset=utf-8"); PrintWriter out = getWriter(); out.println("<html><head>"); out.println("<title>" + code + " " + getStatusMessage(code) + "</title>"); out.println("</head><body>"); out.println("<h1>" + getStatusMessage(code) + "</h1><hr/>"); out.println("<p>" + msg + "</p>"); out.println("</body></html>"); commit(); } COM: <s> sends a html error page back to the client html code 200 </s>
funcom_train/41435621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serviceStopping(ServiceID serviceID) { try { ReceivableService receivableService = resourceAdaptorContext .getServiceLookupFacility().getReceivableService(serviceID); if (receivableService.getReceivableEvents().length > 0) { object.serviceStopping(receivableService); } } catch (Throwable e) { logger.warn("invocation resulted in unchecked exception", e); } } COM: <s> indicates a service is stopping the entity will forward this </s>
funcom_train/17603926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionMessage(MessageType type, String message) { List<String> messages; synchronized (context) { String key = actionKey(type); messages = (List<String>) context.getAttribute(key); if (messages == null) { messages = new ArrayList<String>(); context.setAttribute(key, messages); } } synchronized (messages) { messages.add(message); } } COM: <s> correctly synchronizes the context and the action messages list </s>
funcom_train/40528378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void warnWithoutLocation(String message) throws SAXException { ErrorHandler errorHandler = tokenizer.getErrorHandler(); if (errorHandler == null) { return; } SAXParseException spe = new SAXParseException(message, null, tokenizer.getSystemId(), -1, -1); errorHandler.warning(spe); } COM: <s> reports a warning without line col </s>
funcom_train/14616726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SimpleHash makeHash1() { SimpleHash hash1 = new SimpleHash(); hash1.put( "string10", "Scalar10" ); hash1.put( "string11", new FastScalar( "Scalar11" )); hash1.put( "string12", new SimpleScalar( "Scalar12" )); return hash1; } COM: <s> make a new hash model </s>
funcom_train/8228756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (checkAdminCredentials(acc.getAdminAccounts())) { dispose(); new Layout(configFileSupHost, configFileDBHost, userName.getText()); } else { JOptionPane.showMessageDialog(mainPanel, "Incorrect User Name / Password Combination.\n Please Try Again.", "Message", JOptionPane.WARNING_MESSAGE); } } COM: <s> method is called when the user clicks the login button </s>
funcom_train/13915409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocked() { boolean res = false; synchronized (this.mutex) { if (this.givenLocks != 0) { res = true; } if (ReadWriteLock.TRACE) { System.out.println(Thread.currentThread().toString() + " checked for lock, GivenLocks = " + this.givenLocks); } } return res; } COM: <s> checks if is locked </s>
funcom_train/34607196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initZobristKey() { // Create a new multidimensional array. _factors = new long[2][6][64]; Random rand = new Random(); for (int i = 0; i < 64; i++) { for (int j = 0; j < 6; j++) { _factors[0][j][i] = rand.nextLong(); _factors[1][j][i] = rand.nextLong(); } } _blackMoves = rand.nextLong(); } COM: <s> create a new key instance </s>
funcom_train/43340705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Tactic_description_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Tactic_description_feature", "_UI_Tactic_type"), TacticsPackage.eINSTANCE.getTactic_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the description feature </s>
funcom_train/36255125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintArrow(Canvas canvas,float x, float y) { float y1=y-8; float x1=x-4; float x2=x+4; paint.setColor(Color.RED); for(float i=x1;i<=x2;i++) { canvas.drawLine(x,y,i,y1, paint); } y1=y-16; canvas.drawLine(x,y,x,y1, paint); canvas.drawText(getContext().getString(R.string.now_text), x-12, y1, paint); } COM: <s> draws an arrow showing current time </s>
funcom_train/29907118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void add(Addin addin, String namespaceOrNull) { if(addin instanceof ReflectAddin) { ((ReflectAddin)addin).setObjectConverter(converter); } Function[] f = addin.getFunctions(); for (int i = 0; i < f.length; i++) { functions.add(new FunctionNamespacer(f[i], namespaceOrNull)); } } COM: <s> add an addin with optional namespace </s>
funcom_train/37583699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: TYPE_AND_SIZE { protected String prefix() { throw new IllegalArgumentException(); } protected String delimiter() { throw new IllegalArgumentException(); } protected String suffix() { throw new IllegalArgumentException(); } protected ArrayStringMode nestedMode() { throw new IllegalArgumentException(); } }, COM: <s> arrays are printed with an element type name and a size like </s>
funcom_train/19645818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showWelcome() { outputMessage("Welcome to GoMoku game!"); outputMessage("==========================================================="); } COM: <s> prints welcome message </s>
funcom_train/18058811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldExplanation(UID objectId, int fieldNumber) throws RemoteException { synchronized(SO) { SO.rmcCount++; try { CategorySource cat = (CategorySource) SO.objectMap.get(objectId); return cat.getFieldExplanation(fieldNumber); } catch(PerformanceException e) { throw new RemoteException(e.getMessage()); } } } COM: <s> return the field explanation given the field number </s>
funcom_train/38528854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancelOnlineSetup() { try { /* kill daemons, clear data areas */ resetAcq(true); /* unlock sort mode */ lockMode(false); consoleLog.closeLogFile(); } catch (Exception e) { LOGGER.log(SEVERE, e.getMessage(), e); } } COM: <s> cancels online setup </s>
funcom_train/3840287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setID(String id) { try { int liop; File df; df = new File(id); String fn = df.getName(); liop = fn.lastIndexOf("."); if (liop == -1) { _tileSetID = fn; } else { _tileSetID = fn.substring(0, liop); } } catch (Exception e) { _tileSetID = id; } } COM: <s> sets this tile set id </s>
funcom_train/40945041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addItemProperty(Object id, Property property) { // Null ids are not accepted if (id == null) throw new NullPointerException("Item property id can not be null"); // Cant add a property twice if (map.containsKey(id)) { return false; } // Put the property to map map.put(id, property); list.add(id); // Send event fireItemPropertySetChange(); return true; } COM: <s> tries to add a new property into the item </s>
funcom_train/37125905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SoapmillException errorBadXML(Exception e) { String error = "\n" + "\tThere might be an error in your XML!\n" + "\tIs it well-formed? Hand-written?\n" + "\t-- the error --\n\t" + e.getMessage() ; _logger.error(error); return new SoapmillException(error, e); } COM: <s> returns an error message which will describe what is wrong with </s>
funcom_train/31907238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { for (;;) { long free = runtime.freeMemory(); long total = runtime.totalMemory(); Iterator it = components.iterator(); while (it.hasNext()) { Component c = (Component)it.next(); ((MemoryChangeListener)c).memoryStateChanged(total, free); c.repaint(); } try { sleep(timeout); if (suspended) { synchronized(this) { while (suspended) { wait(); } } } } catch (InterruptedException e) {} } } COM: <s> the thread main method </s>
funcom_train/45601976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Quest readQuest(Quest quest, BufferedReader reader) throws IOException, ParseException { getLine(reader); // { readClassAndLevelRequirements(quest, reader); readQuestRequirements(quest, reader); String questGiver = getLine(reader); quest.setQuestGiver(questGiver); readQuestScript(quest, reader); String farewell = getLine(reader); quest.setFarewell(farewell); getLine(reader); // } return quest; } COM: <s> read a single quest </s>
funcom_train/32145680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileRenamer getBackRenamer() { if (this.mBackRenamer == null) { this.mBackRenamer = new FileRenamer( this.mTarget, this.mCurrent, this.mCreateTargetPath, this.mFileValidators); } this.mBackRenamer.setBackRenamer(this); return this.mBackRenamer; } COM: <s> return the same </s>
funcom_train/16767843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void register(IConnection conn) { log.debug("Registering connection for this client {}", id); if (conn != null) { IScope scp = conn.getScope(); if (scp != null) { connToScope.put(conn, scp); } else { log.warn("Clients scope is null. Id: {}", id); } } else { log.warn("Clients connection is null. Id: {}", id); } } COM: <s> associate connection with client </s>
funcom_train/18118349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOkButton() { if (okButton == null) { okButton = new JButton(); okButton.setText(Messages.getString("NewProjectDialog.okButton")); //$NON-NLS-1$ okButton.setPreferredSize(new Dimension(100, 26)); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { control.acceptDialog(); } }); } return okButton; } COM: <s> this method initializes ok button </s>
funcom_train/7630495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float pose(int euler) { // don't use an array to avoid allocations if (euler == EULER_X) return mPoseEulerX; else if (euler == EULER_Y) return mPoseEulerY; else if (euler == EULER_Z) return mPoseEulerZ; throw new IllegalArgumentException(); } COM: <s> returns the faces pose </s>
funcom_train/36856150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scan(String in) throws BadCharacterException { tokens = new ArrayList<Token.Terminal>(in.length()); for(int i = 0; i < in.length(); i++) { if(isAccepted(in.charAt(i))) { tokens.add(new Token.Terminal(in.charAt(i))); } else { throw new BadCharacterException(in.charAt(i), i); } } } COM: <s> performs the scanning operation throwing an exception if a bad character </s>
funcom_train/10874145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Automaton optional(Automaton a) { a = a.cloneExpandedIfRequired(); State s = new State(); s.addEpsilon(a.initial); s.accept = true; a.initial = s; a.deterministic = false; //a.clearHashCode(); a.clearNumberedStates(); a.checkMinimizeAlways(); return a; } COM: <s> returns an automaton that accepts the union of the empty string and the </s>
funcom_train/40362644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attributes serialize(Attributes attributes) { Attributes attrs = new Attributes(); for (Iterator iter = attributes.iterator(); iter.hasNext();) { Attribute attr = (Attribute) iter.next(); Object obj = attr.getValue(); if (obj instanceof RemoteObject) { obj = ((RemoteObject) obj).serialize(); } else if (obj instanceof Attributes) { obj = serialize((Attributes) obj); } attrs.put(attr.getName(), obj); } return attrs; } COM: <s> helper method that iterates thru the supplied </s>
funcom_train/51632908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void install(JavaEditor editor, ISourceViewer sourceViewer, SemanticHighlightingPresenter presenter, SemanticHighlighting[] semanticHighlightings, Highlighting[] highlightings) { fPresenter= presenter; fSemanticHighlightings= semanticHighlightings; fHighlightings= highlightings; fEditor= editor; fSourceViewer= sourceViewer; if (fEditor instanceof CompilationUnitEditor) { ((CompilationUnitEditor)fEditor).addReconcileListener(this); } else { fSourceViewer.addTextInputListener(this); scheduleJob(); } } COM: <s> install this reconciler on the given editor presenter and highlightings </s>
funcom_train/21085170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort() { Object[] a = signalVector.toArray(); Arrays.sort(a, new Comparator() { public int compare(Object o1, Object o2) { return ((int[]) o1)[AXIS_TIME] - ((int[]) o2)[AXIS_TIME]; } }); signalVector = new Vector(a.length); for (int i = 0; i < a.length; ++i) signalVector.add(a[i]); } COM: <s> sort the sampled values of the signal regarding their timestamp </s>
funcom_train/36459561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Buffer getBuffer() { Buffer buffer = new Buffer(); buffer.setData(data); buffer.setOffset(0); buffer.setLength(data.length); buffer.setFormat(outputFormat); buffer.setTimeStamp(startTimestamp); buffer.setDuration(endTimestamp - startTimestamp); return buffer; } COM: <s> reads the next buffer </s>
funcom_train/14139065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCalendarSetField(String field, String expression) { for(int index = 0; index < SET_FIELDS.length; index++) { if(field.equals(SET_FIELDS[index])) { return SET_CALENDAR_FIELDS[index]; } } throw new IllegalArgumentException("Unrecognized field '" + field + "' in expression '" + expression + "'"); } COM: <s> returns the integer value for the java </s>
funcom_train/7880680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jne(String bin) { // get operands int r1 = Integer.parseInt(bin.substring(8, 11), 2); int r2 = Integer.parseInt(bin.substring(11, 14), 2); // test condition if (twosCompliment(getBinReg(r1)) != twosCompliment(getBinReg(r2))) { regLC = effAdr(bin) - 1; } else { // increment LC by 4 } } COM: <s> description jump if not equal br </s>
funcom_train/7624167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assumeLayout() { int width = mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight(); if (width < 1) { width = 0; } int physicalWidth = width; if (mHorizontallyScrolling) { width = VERY_WIDE; } makeNewLayout(width, physicalWidth, UNKNOWN_BORING, UNKNOWN_BORING, physicalWidth, false); } COM: <s> make a new layout based on the already measured size of the view </s>
funcom_train/3631829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void engage(int value) { String fetchSpec = Promotion.getByNo(value); Vector v = Application.dbConnection().fetch(new Promotion(), fetchSpec); if (v.size() == 1) { Promotion promotion = (Promotion) v.elementAt(0); EjPromotion eji = new EjPromotion(context(), promotion); eji.engage(0); } context().eventStack().nextEvent(); } COM: <s> load the promotion engage it and add it to </s>
funcom_train/18025985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFillToReference(boolean fillToReference) { boolean old = this.fillToReference; if (this.fillToReference != fillToReference) { this.fillToReference = fillToReference; update(); propertyChangeSupport.firePropertyChange("fillToReference", old, fillToReference); } } COM: <s> setter for property fill to reference </s>
funcom_train/10482073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFlags(Flags flag, boolean newvalue) throws MessagingException { // if this is the SEEN flag, make sure we shadow this in the newsrc // file. if (flag.contains(Flags.Flag.SEEN)) { ((NNTPFolder) folder).setSeen(msgnum, newvalue); } // have the superclass do the real flag setting. super.setFlags(flag, newvalue); } COM: <s> override of set flags </s>
funcom_train/20625877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultMutableTreeNode addExclude(DefaultMutableTreeNode parent){ Object puo = parent.getUserObject(); if (puo != null && puo.equals(EXCLUDE)) { throw new IllegalArgumentException("Parent node cannot be Exclude node"); } DefaultMutableTreeNode node = new DefaultMutableTreeNode(EXCLUDE); parent.add(node); return node; } COM: <s> creates an exclude node and adds it to parent </s>
funcom_train/39423684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMiddleName() { if(unappliedMods.isSetName() && unappliedMods.getName().isSetMiddle()){ return unappliedMods.getName().getMiddle(); }else if(personElement.isSetName() && personElement.getName().isSetMiddle()){ return personElement.getName().getMiddle(); } return ""; } COM: <s> get the value of middle name </s>
funcom_train/15624416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEditingFocus() { try { requestFocus(); setCaretVisible(true); focusedComponent = this; setCaretPosition(0); // set caret to 0, 0 coordinates } catch (final NullPointerException e) { log.error("Null Pointer Exception in JEditTextArea.setEditingFocus()"); } } COM: <s> sets the focus to this text area so this component is instantly </s>
funcom_train/19770498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInstanceOfNull() { try { createInjector().getInstance(Foo.class); fail("Getting an instance of null should fail with an error"); } catch (ProvisionException expected) { NullPointerException cause = (NullPointerException)expected.getCause(); assertContains(cause.getMessage(), "null returned by binding " + "at com.google.inject.NullableInjectionPointTest"); } } COM: <s> we havent decided on what the desired behaviour of this test should be </s>
funcom_train/4833762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAproximatedPrices() throws Exception { int probableCloseMinute = getProbableCloseMinute(); int nextDay = prices16th.size(); double lowerBound = (prices16th.size()>0)? prices16th.lastElement()+1: 1; /* Updates predictions about prices */ currentPredictedPriceForNextDay = pricePredictor.getPredictedPriceForDay(nextDay, lowerBound, prices16th, prices17th); currentPredictedPriceForClosureDay = pricePredictor.getPredictedPriceForDay(probableCloseMinute, lowerBound, prices16th, prices17th); } COM: <s> approximates expected prize of buying for the given day </s>
funcom_train/4539607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ if(status == EightQueensSimulatorTileInfo.PLACE_PIECE){ return "Tile : " + tile.toString() + " Status : Piece Placed"; }else if (status == EightQueensSimulatorTileInfo.REMOVE_PIECE){ return "Tile : " + tile.toString() + " Status : Piece Remove"; }else{ return "Tile : " + tile.toString() + " Status : Invalid Move"; } } COM: <s> creates a string representation of this class </s>
funcom_train/12566362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String callRemoteMethod() { String message = "blank"; try { message = "Current time on server is: " + _clock.getCurrentTime(); } catch (RemoteException e) { message = "Exception:" + e.getMessage(); e.printStackTrace(); } return message; } COM: <s> invoke the remote method </s>
funcom_train/18582139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPatientSidePanels() { mainFrame.getCurrentTab().clearSidePanels(); patientCentricSidePanels = new SidePanel[2]; // side panels patientCentricSidePanels[0] = new AlerterSideFunction(); patientCentricSidePanels[1] = new NotesSideFunction(); mainFrame.getCurrentTab().setPatientCentricSidePanels( patientCentricSidePanels); searchSidePanelActive = false; } COM: <s> adds the patient sidepanels to the patient tab </s>
funcom_train/32083672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Region region) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); NSAutoreleasePool pool = null; if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init(); try { OS.UnionRgn(handle, region.handle, handle); } finally { if (pool != null) pool.release(); } } COM: <s> adds all of the polygons which make up the area covered </s>
funcom_train/7768779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void requestServerStatus() { ServerStatusRequest request = new ServerStatusRequest(); QThread thread = new QThread(request); request.requestStarted.connect(this, "incrementRequestCount()"); request.requestFinished.connect(this, "updateServerStatus(ServerStatus)"); thread.start(); } COM: <s> requests tranquility server status from eve api </s>