__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9869435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(String newVal) { if ((newVal != null && this.data != null && (newVal.compareTo(this.data) == 0)) || (newVal == null && this.data == null && data_is_initialized)) { return; } this.data = newVal; data_is_modified = true; data_is_initialized = true; } COM: <s> setter method for data </s>
funcom_train/50187441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processMouseEvent(MouseEvent evt) { switch (evt.getID()) { case MouseEvent.MOUSE_PRESSED: // remove, show bp handleMousePressedEvent(evt); break; case MouseEvent.MOUSE_EXITED: view.getStatus().setMessage(null); super.processMouseEvent(evt); break; default: super.processMouseEvent(evt); break; } } COM: <s> mehtod to handle mouse event removing bps show bp position </s>
funcom_train/45623440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIconFilePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateApplicationManifestType_iconFile_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateApplicationManifestType_iconFile_feature", "_UI_GenerateApplicationManifestType_type"), MSBPackage.eINSTANCE.getGenerateApplicationManifestType_IconFile(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the icon file feature </s>
funcom_train/28308615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLogEntry(ContainerLogEntry entry) throws Exception { logger.debug(id + " " + entry.toString()); setStatus(entry.getStatus()); entry.setElapsedTime(entry.getTimeReported() - timeStampLastLogEntry); timeStampLastLogEntry = entry.getTimeReported(); log.add(entry); } COM: <s> adds a log entry to this container </s>
funcom_train/22049749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean rollRegency(int iPriority) { if (iPriority == 0) { m_Tax_RP_IN = 0; m_Tax_RP_OUT = 0; return true; } if (iPriority == 3) { m_Tax_RP_IN = m_Tax_GB_IN - m_Tax_GB_OUT; m_Tax_RP_OUT = 0; return true; } return false; } COM: <s> calculate the amount of regency the holding should generate </s>
funcom_train/46151181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveCamera(Action action, float pan, float tilt, float zoom) { CameraTask ptzTask = new CameraTask(ptz, action, pan, tilt, zoom, this); if (requestThrottle != -1) { ptzTask.setRequestThrottle(requestThrottle); } ptzTask.start(); } COM: <s> moves the camera to the specified pan tilt zoom position </s>
funcom_train/31213978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Term cloneAndRenameVars(Term original) { if (original instanceof ConstantTerm) { // a.kozlenkov@city.ac.uk: Why do we need to create a new constant term? return original; //clone((ConstantTerm) original); } if (original instanceof VariableTerm) { return cloneAndRenameVars((VariableTerm) original); } if (original instanceof ComplexTerm) { return cloneAndRenameVars((ComplexTerm) original); } return original; } COM: <s> clone a term and rename all variables </s>
funcom_train/40926746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer() { if (spacer == null) {//GEN-END:|100-getter|0|100-preInit // write pre-init user code here spacer = new Spacer(16, 1);//GEN-LINE:|100-getter|1|100-postInit // write post-init user code here }//GEN-BEGIN:|100-getter|2| return spacer; } COM: <s> returns an initiliazed instance of spacer component </s>
funcom_train/48151311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getIntervalVariance() { double m = getIntervalMean(), sum = 0, x; for (int i = 0; i < domain.getSize(); i++) { x = domain.getValue(i); sum = sum + (x - m) * (x - m) * freq[i]; } return sum / size; } COM: <s> this method returns the interval variance </s>
funcom_train/973587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|124-getter|0|124-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|124-getter|1|124-postInit // write post-init user code here }//GEN-BEGIN:|124-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/27827091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getNextNamespacePrefix() { StringBuffer buffer=new StringBuffer(); int index=m_nextAutomaticPrefixIndex++; do { buffer.append((char)('a'+(index % 26))); index=index/26; } while (index!=0); return buffer.toString(); } COM: <s> returns the next new namespace prefix </s>
funcom_train/22338922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getNewKeyWordsTextField() { if (this.newKeyWordsTextField == null) { this.newKeyWordsTextField = new JTextField(); this.newKeyWordsTextField.setPreferredSize(new Dimension(100, 20)); this.newKeyWordsTextField.setColumns(20); } return this.newKeyWordsTextField; } COM: <s> this method initializes new key words text field </s>
funcom_train/18878296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unLoadChart(String fileName) { for (int i = 0; i < parsers.length; i++) { if (parsers[i] != null && parsers[i].getFileName().equals(fileName)) { if (parsers[i] instanceof S57Parser){ S57Parser s57 = (S57Parser) parsers[i]; s57.dispose(); } parsers[i] = null; } } repaintCharts(); } COM: <s> remove the chart from the display </s>
funcom_train/24121185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { int size = this.getSize(); WMFConstants.writeLittleEndian(out, size); WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_OFFSETCLIPRGN); WMFConstants.writeLittleEndian(out, this.yOffset); WMFConstants.writeLittleEndian(out, this.xOffset); } COM: <s> writes the content of the offset clip rgn record to a stream </s>
funcom_train/7625726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Uri reportCrash(ContentResolver resolver, CrashData crash) { try { ByteArrayOutputStream data = new ByteArrayOutputStream(); crash.write(new DataOutputStream(data)); return reportCrash(resolver, data.toByteArray()); } catch (Throwable t) { // Swallow all errors and exceptions when writing crash report Log.e(TAG, "Error writing crash: " + t); return null; } } COM: <s> report a crash in crash data format </s>
funcom_train/7697048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createXMLWorkflows(int type, int param) { String result = ""; if (type == PdspConst.WF_GET_ALL) { result = createXMLAllWorkflows(); } else if (type == PdspConst.WF_GET_BYTASKID) { createXMLWorkflows(param); } else if (type == PdspConst.WF_GET_UNREVIEWED) { } return result; } COM: <s> construct xml data for workflows </s>
funcom_train/18005124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void exitForm(java.awt.event.WindowEvent evt) { if (fichier != null) { if (fichier.getfichierFond() != null) fichier.getfichierFond().delete(); if (fichier.getfichierDonnees() != null) fichier.getfichierDonnees().delete(); if (fichier.getfichierCarte() != null) fichier.getfichierCarte().delete(); if (fichier.getfichierTemp() != null) fichier.getfichierTemp().delete(); } System.exit(0); } COM: <s> exit the application </s>
funcom_train/21885038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEcoreFeaturePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ASTFeature_ecoreFeature_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ASTFeature_ecoreFeature_feature", "_UI_ASTFeature_type"), AstPackage.Literals.AST_FEATURE__ECORE_FEATURE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the ecore feature feature </s>
funcom_train/22401333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Cluster root) { this.root = root; NodeList nodes = root.getNodes(); for (Node n : nodes) { n.setLayout(createNodeLayout(n)); } EdgeList edges = root.getInternalEdges(); for (Edge e : edges) { e.setLayout(createEdgeLayout(e)); } } COM: <s> the layout engine should have no constructor </s>
funcom_train/41301776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sendStart() { String cmd = "$STA\r\n"; try { oStream.write(cmd.getBytes()); } catch (IOException e) { R.getErrorScreen().view(e, "COMNMEALocationProvider.sendStart", null); return false; } return true; } COM: <s> sends the start command to hge 100 to start transmitting data </s>
funcom_train/17892249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(final Graphics g) { if (screen != null) { final Dimension d = getSize(); g.setColor(Color.black); g.drawRect(0, 0, d.width - 1, d.height - 1); g.drawImage(screen, 1, 1, this); } } COM: <s> override the paint call </s>
funcom_train/23056794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JToolBar createToolBar(BarProvider provider, ToolBarCustomizer customizer) { if ( logger.isDebugEnabled() ) { logger.debug("entering createToolBar(BarProvider, ToolBarCustomizer)"); } JToolBar bar = new JToolBar(); configure(bar, provider, customizer, true); if ( logger.isDebugEnabled() ) { logger.debug("exiting createToolBar(BarProvider, ToolBarCustomizer)"); } return bar; } COM: <s> create a new jtool bar according to bar provider </s>
funcom_train/16830069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E argmax(Comparator tieBreaker) { int max = Integer.MIN_VALUE; E argmax = null; for (E key : keySet()) { int count = getIntCount(key); if (argmax == null || count > max || (count == max && tieBreaker.compare(key, argmax) < 0)) { max = count; argmax = key; } } return argmax; } COM: <s> finds and returns the key in this counter with the largest count </s>
funcom_train/32055417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh(boolean flag) { super.refresh(flag); if (points != null) { Object obj = getModel().getSource(cell); Object obj1 = getModel().getTarget(cell); setSource((PortView) mapper.getMapping(obj, flag)); setTarget((PortView) mapper.getMapping(obj1, flag)); Edge.Routing routing = GraphConstants.getRouting(allAttributes); if (routing != null) { routing.route(this, points); } } } COM: <s> refreshes the graphics area </s>
funcom_train/46744568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFirstName(String firstName) { if (Converter.isDifferent(this.firstName, firstName)) { String oldfirstName= null; oldfirstName = this.firstName; this.firstName = firstName; setModified("firstName"); firePropertyChange(String.valueOf(PORTALUSERS_FIRSTNAME), oldfirstName, firstName); } } COM: <s> portal user first name </s>
funcom_train/32894295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawSmallerRing(Graphics g, Position pos) { g.drawOval(pos.getX()+this.getSecondRing(), pos.getY()+this.getSecondRing(), this.getDiameter()-(this.getSecondRing()*2), this.getDiameter()-(this.getSecondRing()*2)); } COM: <s> draws a ring that is smaller than the regular state ring </s>
funcom_train/18789541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMainAddress(Address mainAddress) { if (((this.mainAddress != null) && !this.mainAddress.equals(mainAddress)) || ((this.mainAddress == null) && (mainAddress != null))) { this.mainAddress = mainAddress; setModified(true); } } COM: <s> sets the new value of the simple property main address </s>
funcom_train/5531934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syncAllCoreComponents(String pTorqueConfig, String pUserId) throws Exception { ArrayList alOutofsyncCCs = loadOutofSyncList(pTorqueConfig); int iSize = alOutofsyncCCs.size(); for (int i = 0; i < iSize; i++) { OutofsyncCcsView objOOSV = (OutofsyncCcsView)alOutofsyncCCs.get(i); syncCoreComponent(pTorqueConfig, objOOSV.getId(), pUserId); } } COM: <s> this method loops through the entire list of out of sync </s>
funcom_train/43688986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getJSON(Object obj) { if (obj == null) { return "{}"; } try { StringWriter buffer = new StringWriter(); objectMapper.writeValue(buffer, obj); return buffer.toString(); } catch (Exception ex) { log.debug("Failed to convert object to JSON '{}' ", obj); throw new XException(ex); } } COM: <s> returns json representation of object </s>
funcom_train/29829039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRosterItem(BSComponentNode node, String groupName) { BSGroupNode group = (BSGroupNode) groups.get(groupName); if (group == null) { group = new BSGroupNode(groupName); root.add(group); groups.put(groupName, group); } group.addItem(node); } COM: <s> adds given transport item into the group </s>
funcom_train/43502740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh(Elog elog) { refreshOldLinks(elog); refreshNewLinks(); Collections.sort(elogs, new Comparator() { public int compare(Object o1, Object o2) { Date d1 = ((Elog) o1).getUpdateDate(); Date d2 = ((Elog) o2).getUpdateDate(); return d2.compareTo(d1); } }); // Tell JTable we're added something this.fireTableDataChanged(); } COM: <s> refresh the links table </s>
funcom_train/44492362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertCheckboxChecked(final String checkBoxName, final boolean checked) { String msg = "assertCheckboxChecked: " + checkBoxName + " was "; if (checked) { msg += "not checked!"; } else { msg += "checked!"; } int assertLevel = AssertLevel.NO_LEVEL; assertCheckboxChecked(msg, checkBoxName, checked, assertLevel); } COM: <s> checks that a checkbox in the working form is checked or unchecked </s>
funcom_train/29706314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent event_p) { // Check it if(event_p.getProperty().startsWith(IPrefConstants.COMPUTE_LOCALS)) { // If it's getting to true, start them all, otherwise, do nothing, // they'll stop alone... if(getComputeLocals()) { startRefuelling(); } } } COM: <s> start the refuelling thread when the property turns to true </s>
funcom_train/36671574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void liberator() { if (m_milage == getActualMilage() && (m_liberatorCount > 100)) { m_liberatorOutput[0] = -6; m_liberatorOutput[1] = -1; m_liberatorFlag = true; m_liberatorCount = 0; } else if (m_milage == getActualMilage()) { m_liberatorFlag = false; m_liberatorCount++; } else { m_liberatorFlag = false; } } COM: <s> this method is for moving backwards and liberate after the robot is stuck </s>
funcom_train/51377098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean executeQuery(DBConnection myConnection, String queryToRun) throws DBException { String firstToken = (new StringTokenizer(queryToRun)).nextToken(); if ("SELECT".equalsIgnoreCase(firstToken)) { myConnection.execute(queryToRun); return true; } else { myConnection.executeUpdate(queryToRun); return false; } } COM: <s> execute query and return true if it is a selection query </s>
funcom_train/270687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLoggingLevel (String fileLoggingLevel) {//init if ("debug".equalsIgnoreCase(fileLoggingLevel)) { level = Level.DEBUG; } if ("info".equalsIgnoreCase(fileLoggingLevel)) { level = Level.INFO; } if ("warn".equalsIgnoreCase(fileLoggingLevel)) { level = Level.WARN; } if ("error".equalsIgnoreCase(fileLoggingLevel)) { level = Level.ERROR; } if ("fatal".equals(fileLoggingLevel)) { level = Level.FATAL; } } COM: <s> sets treated file logger log level following level name string </s>
funcom_train/25099108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsCustomerVisiblePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VehicleFeature_isCustomerVisible_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VehicleFeature_isCustomerVisible_feature", "_UI_VehicleFeature_type"), VehiclefeaturemodelingPackage.Literals.VEHICLE_FEATURE__IS_CUSTOMER_VISIBLE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is customer visible feature </s>
funcom_train/43827606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValuesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CPNEnum_values_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CPNEnum_values_feature", "_UI_CPNEnum_type"), CpntypesPackage.Literals.CPN_ENUM__VALUES, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the values feature </s>
funcom_train/22845531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXpathOutputHtml() throws IOException, HttpErrorPage { String src = "<html><head><title>The header</title></head><body>The body<br></body></html>"; StringWriter out = new StringWriter(); XpathRenderer tested = new XpathRenderer("//html:body", "html"); tested.render(null, src, out); assertEquals( "<body xmlns=\"http://www.w3.org/1999/xhtml\">The body<br></body>", out.toString()); } COM: <s> tests xpath expression evaluation with html output method </s>
funcom_train/13874107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRestPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CollectionTemplateExp_rest_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CollectionTemplateExp_rest_feature", "_UI_CollectionTemplateExp_type"), QvttemplatePackage.Literals.COLLECTION_TEMPLATE_EXP__REST, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the rest feature </s>
funcom_train/8037584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refundCash(){ if(totalInserted == 0)return; tranCtrl.getCustomerPanel().getCollectCoin().setValue(String.valueOf(totalInserted) + " C"); tranCtrl.getCustomerPanel().getMoneyInserted().setValue("0" + " C"); tranCtrl.getCustomerPanel().getInvalidCoin().setState(false); } COM: <s> this operation handles the refunding of coins entered so far to the customer </s>
funcom_train/8527059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outputToWriter(Writer outWriter) throws IOException { Environment env = Environment.getCurrentEnvironment(); Writer former = env.getOut(); former.flush(); // must not close, because the former writer is still // referenced in the stack and used to write pending 'nothings' env.setOut(outWriter); } COM: <s> utility method for template to write to the given writer </s>
funcom_train/50343760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTimeSourceChanged() { int index = timeSourceBox.getSelectedIndex(); int oldIndex = internalSourceIndex; if (!clock.getInternalMaster()) oldIndex = hardwareSourceIndex; // return if nothing changed if ( oldIndex == index ) return; // change the time source master if (index == internalSourceIndex) clock.setInternalMaster(true,true); else clock.setInternalMaster(false,true); changed = true; } COM: <s> method to handle time source change </s>
funcom_train/5340332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register() { try { CarbonLock.acquire(); int err = AEInstallEventHandler(kAppleEventClass, kAEPreferencesID, new AEEventHandlerClosureUPP(this).getProc(), 0, false); if(err != 0) { java.lang.System.err.println("Preferences handled stup failed: "+err); } } finally { CarbonLock.release(); } } COM: <s> temporarily acquires the native carbon lock to install the event handler </s>
funcom_train/8147073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initVars() { // vars initialisieren initVarsClass(); initVarsMethods(); initVarsFields(); if(!hasVariable(AVariable.COMMON_IDENTIFIERS.POSITION)) { logger.debug("set a far position"); // set a distant position in order to not spawn at 0,0,0 registerVariable(new DefaultVariable(AVariable.COMMON_IDENTIFIERS.POSITION, new Point3d(1000,1000,1000))); } else { logger.debug("DID NOT set a far position"); } } COM: <s> initialize all variables </s>
funcom_train/50053688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configureShader(GL2 gl) { for (Entry<String, PropertyPair> entry : materialParams.entrySet()) { DefaultParam defaultParam = DefaultParam.getDefaultParam(entry.getKey()); shader.setGlslParam(gl, entry.getKey(), defaultParam, entry.getValue().getValue()); } } COM: <s> configure the shader to prepare for rendering </s>
funcom_train/1825853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getSelectedFile() { Assert.isTrue(isInputValid(), getValidationError()); //Store file in local variable, because we will lose the combobox text //when we call #addToComboBox. [Jon Aquino] File file = new File(getComboBoxText()); addToComboBox(file, comboBoxModel); return file; } COM: <s> side effect adds file to the combobox list of recently selected files </s>
funcom_train/13846501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSpatial() { // FIXME : Random height addition z = world.getTerrainAttributes().getZ(unit.pos.getX(), unit.pos.getY()) + .1f; group.clear().setTranslation(unit.pos.getX(), unit.pos.getY(), z).addRotationZ(unit.angle + 180f); } COM: <s> link with the scenegraph update </s>
funcom_train/33264150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void headerMouseExited(ColumnHeader header, MouseEvent mouse) { if ( showingCursor ) { Gadget gadget = header.parent.getGadgetAt( mouse.getX()+header.x, mouse.getY()+header.y ); if ( ! ( gadget instanceof ColumnHeader ) || ( gadget == headers.lastElement() ) ) { setCursor(null); resizeHeader = null; showingCursor = false; } } } COM: <s> header mouse exited </s>
funcom_train/16435189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAutoIncrecement() { List<SSPurchaseOrder> iPurchaseOrders = SSDB.getInstance().getPurchaseOrders(); int iNumber = SSDB.getInstance().getAutoIncrement().getNumber("purchaseorder"); for (SSPurchaseOrder iPurchaseOrder : iPurchaseOrders) { if (iPurchaseOrder.iNumber > iNumber) { iNumber = iPurchaseOrder.iNumber; } } this.iNumber = iNumber + 1; } COM: <s> sets the number of this purchase order as the maxinum mumber 1 </s>
funcom_train/35683314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSelectJavaClassesLink(final Composite container) { createHyperlink(container, Messages.selection_dialog_title, JavaUI.getSharedImages().getImage( ISharedImages.IMG_OBJS_CLASS), new HyperlinkAdapter() { public void linkActivated(final HyperlinkEvent e) { addJavaClasses(); } }); } COM: <s> this link will popup the resource selection dialog </s>
funcom_train/3123520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void informListeners(CGpsEvent event){ //todo send CGpsEvent to listeners //System.out.println(event.toString()); for (int i = 0; i<listeners.size();i++){ IGpsListener listener = (IGpsListener)listeners.elementAt(i); listener.onChange(event); } } COM: <s> inform all listeners about a new cgps event </s>
funcom_train/3904186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setup() { setLayout(new BorderLayout()); add(getLabel()); setUI(); // Listen to mouse clicks on the JLabel getLabel().addMouseListener(this); // Listen to Return pressed on the Textfield getTextField().addActionListener(this); // Listen to Focus events on the Textfield getTextField().addFocusListener(this); // Listen to Key events on the Textfield getTextField().addKeyListener(this); } COM: <s> set up the components listeners and text </s>
funcom_train/20474382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Object element) { if (element == null) { throw new IllegalArgumentException("ArrayList cannot contain null."); } if (this.size >= this.storedObjects.length) { increaseCapacity(); } this.storedObjects[this.size] = element; this.size++; } COM: <s> stores the given element in this list </s>
funcom_train/39363335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpMethod() throws Exception { super.setUpMethod(); assertNotNull("You must put a Fixture Loader in the Spring context.", fixtureLoader); fixture = fixtureLoader.loadFixture(this); if (fixture != null) { logger.info("Loaded fixture for class: " + this.getClass()); fixture.setUp(); } else { logger.warn("No fixture found for class: " + this.getClass()); } } COM: <s> set up the fixture </s>
funcom_train/46402596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IdmAuditLog add(IdmAuditLog instance) throws DataException { try { if (instance.getActionDatetime() == null) { instance.setActionDatetime(new java.sql.Timestamp(System.currentTimeMillis())); } sessionFactory.getCurrentSession().persist(instance); return instance; }catch(DataAccessException dae) { dae.printStackTrace(); log.error("Add operation failed.", dae); throw new DataException( dae.getMessage(), dae.getCause() ); } } COM: <s> adds a new reference dao object to the data log </s>
funcom_train/11075375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepare() { NodePointer parent = parentContext.getCurrentNodePointer(); if (parent == null) { return; } NodePointer useParent = startFromParentLocation ? parent.getParent() : parent; iterator = useParent.childIterator(nodeTest, reverse, startFromParentLocation ? parent : null); } COM: <s> allocates a property iterator </s>
funcom_train/37854556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long doStatus(File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, final ISVNStatusHandler handler) throws SVNException { return doStatus(path, SVNRevision.HEAD, SVNDepth.fromRecurse(recursive), remote, reportAll, includeIgnored, collectParentExternals, handler, null); } COM: <s> collects status information on working copy items and passes </s>
funcom_train/17818400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupMenu() { if (logger.isDebugEnabled()) { logger.debug("Setup Menu"); } jmFile = setupFileJM(); jmOptions = setupOptionsJM(); jmHelp = setupHelpJM(); jmbM.add(jmFile); jmbM.add(jmOptions); jmbM.add(jmHelp); this.setJMenuBar(jmbM); if (logger.isDebugEnabled()) { logger.debug("setupMenu() - end"); } } COM: <s> setups the menu bar </s>
funcom_train/12318337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateTopicName() { try { StringTokenizer st = new StringTokenizer(topic, SEPARATOR, true); validateToken(st.nextToken()); while (st.hasMoreTokens()) { st.nextToken(); // consume delimiter validateToken(st.nextToken()); } } catch (NoSuchElementException e) { throw new IllegalArgumentException("invalid topic"); //$NON-NLS-1$ } } COM: <s> called by the constructor to validate the topic name </s>
funcom_train/12200064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(InputStream is) throws IOException { debug.write("going to parse from input stream"); in = new InputStreamReader(is); prepareRecord(); while (!eof()) { getLine(); if (isEmpty()) { debug.write("got empty line"); finaliseRecord(true); } else if (!isComment()) { parseAttribute(line); } else { debug.write("got comment line " + line); } } finaliseRecord(false); } COM: <s> parses the input stream and fills the table with data from the stream </s>
funcom_train/49427663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onClick(final MouseInputEvent inputEvent) { effectManager.startEffect(EffectEventId.onClick, this, time, null); lastMouseX = inputEvent.getMouseX(); lastMouseY = inputEvent.getMouseY(); return interaction.onClick(inputEvent); } COM: <s> on click method </s>
funcom_train/3907583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void elementChanged(XMLDocumentListenerEvent event) { // Don't listen to events that we have fired if(event.getSource() == this){ return; } // We changed! Element element = event.getElement(); if(element == getElement()){ setValue(getElement().getText()); } } COM: <s> handling element changed event from the reload document </s>
funcom_train/32057492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initOffscreen() { try { Rectangle rectangle = graph.getBounds(); offscreen = new BufferedImage(rectangle.width, rectangle.height, 1); offgraphics = offscreen.getGraphics(); offgraphics.setClip(0, 0, (int) rectangle.getWidth(), (int) rectangle.getHeight()); offgraphics.setColor(graph.getBackground()); offgraphics.fillRect(0, 0, (int) rectangle.getWidth(), (int) rectangle.getHeight()); graph.getUI().paint(offgraphics, graph); } catch (Error error) { offscreen = null; offgraphics = null; } } COM: <s> the method init offscreen </s>
funcom_train/47109548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login(ActionEvent event) throws IOException, ServletException { // setup the request URL that is passed to the security check StringBuilder builder = new StringBuilder("/j_spring_security_check"); builder.append("?j_username=").append(username); builder.append("&j_password=").append(password); // password field will NOT be restored password = null; // now delegate to SpringSecurity redirectToPage(builder.toString()); } COM: <s> delegate request to spring security </s>
funcom_train/48463000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics2D g2, Rectangle2D r) { label.setFont(g2.getFont()); label.setBounds(0, 0, (int) r.getWidth(), (int) r.getHeight()); g2.translate(r.getX(), r.getY()); label.paint(g2); g2.translate(-r.getX(), -r.getY()); } COM: <s> draws this multiline string inside a given rectangle </s>
funcom_train/33361178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyArray(DeviceImpl devfrom [], DeviceImpl devto[]){ if (Windows.debugUSB) System.out.println(this.finishedEnumerating +" "+this.finishScanBus+ "USB.copyArray() >>> BUS["+ busnum +"]"); for(int i=0 ; i < devfrom.length ; i++){ devto[i] = devfrom[i]; } } COM: <s> copy the one array to the other array </s>
funcom_train/1029133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug22359() throws Exception { if (versionMeetsMinimum(5, 0)) { Statement timeoutStmt = null; try { timeoutStmt = this.conn.createStatement(); timeoutStmt.setQueryTimeout(2); long begin = System.currentTimeMillis(); try { timeoutStmt.execute("SELECT SLEEP(30)"); fail("Query didn't time out"); } catch (MySQLTimeoutException timeoutEx) { long end = System.currentTimeMillis(); assertTrue((end - begin) > 1000); } } finally { if (timeoutStmt != null) { timeoutStmt.close(); } } } } COM: <s> tests fix for bug 22359 driver was using millis for </s>
funcom_train/50076356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertiesFrameVisible(boolean isVisible) { propF.setVisible(isVisible); Iterator iter = mainFrames.iterator(); while(iter.hasNext()) { MainFrame mf = (MainFrame) iter.next(); mf.getMainMenuBar().setPropertiesCheckBox(isVisible); } } COM: <s> changes the status of properties frame </s>
funcom_train/7346627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skip() { this.word_index++; Node node = this.spellChecker.getMisspeltWordNode(word_index); updateDifference(node, 0); boolean success = updateGUI(); if (!success) { this.word_index--; if (!this.stop_thread) { updateGUI(); } } else { SpellCheckEvent event = this.spellChecker.getMisspeltWord(word_index); String word = event.getInvalidWord(); if (skip_list.get(word) != null) { skip(); } if (replace_list.get(word) != null) { replace(); } } } COM: <s> action triggered by the user clicking on the skip button in this dialog </s>
funcom_train/24135783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendWhoIs(User user) { getUserWaitingList().put(user.getNick(),user); String nick = user.getNick(); if (nick.startsWith("@") && nick.length()>1) { nick = nick.substring(1); } sendCommand("WHOIS "+nick); } COM: <s> send whios for user specified by user object object will be </s>
funcom_train/13258690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNewStationDetails(Object stationKey) { StationData sd = (StationData) stationDataHM.get(stationKey); Vector<Object> classKeys = getClassKeys(); for (int i = 0; i < classKeys.size(); i++) { stationDetailsBDM.put(classKeys.get(i), stationKey, getDefaultDetailsForStationType(sd)); } } COM: <s> adds details for a new station </s>
funcom_train/48506317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unsuspend (String pluginName) { UserContext context = lobby.getUserContext(); // create a message to send to server String msg = "<admin-command version='1.0' id='589a39591271844e3fbe32bbb9281ad9'>"; msg += "<plugin-unsuspend plugin=\"" + pluginName + "\"/>"; msg += "</admin-command>"; Document d = Message.construct(msg); Message m = new Message(d); try { context.getClient().sendToServer(m); } catch(NullPointerException e) { Debug.println("Not connected to a server"); } } COM: <s> creates and sends the plugin unsuspend message </s>
funcom_train/31911647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int nextInNotationType() throws IOException, XMLException { switch (current) { case 0x9: case 0xA: case 0xD: case 0x20: do { nextChar(); } while (current != -1 && XMLUtilities.isXMLSpace((char)current)); return LexicalUnits.S; case '|': nextChar(); return LexicalUnits.PIPE; case '(': nextChar(); return LexicalUnits.LEFT_BRACE; case ')': nextChar(); context = ATTLIST_CONTEXT; return LexicalUnits.RIGHT_BRACE; default: return readName(LexicalUnits.NAME); } } COM: <s> returns the next lexical unit in the context of a notation type </s>
funcom_train/21844851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isBranchTarget(ByteCode bc, int pc, int size) { if( size <= 0 ) return false; int max = bc.size(); if( max > pc+size ) max = pc+size; for( int ix = pc; ix < max; ix++ ) { Instruction i = bc.getInstruction(ix); if( i.branchTarget /* && !( i.opCode == ByteCode._STMT || i.opCode == ByteCode._NOOP) */) return true; } return false; } COM: <s> determine if a given range of instructions in the bytecode </s>
funcom_train/41290617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAlterableInstr(String ins){ if(running||!weHaveJDK)return false; /* String[] c = configs.get(macchina1955.toLowerCase()); for(String s:c) if(s.equalsIgnoreCase(ins))return false; */ for(String[] q:istr_56) if(ins.equalsIgnoreCase(q[0])) return false; return true; } COM: <s> indicates wheter the given instruction is alterable </s>
funcom_train/37885085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator collectionIterator() { try { getLock().acquire(Lock.READ_LOCK); return subcollections.stableIterator(); } catch (LockException e) { LOG.warn(e.getMessage(), e); return null; } finally { getLock().release(); } } COM: <s> return an iterator over all subcollections </s>
funcom_train/11070352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerBean(String beanName, Object bean) { logger.debug("BSFManager:registerBean"); BSFDeclaredBean tempBean; if(bean == null) { tempBean = new BSFDeclaredBean(beanName, null, null); } else { tempBean = new BSFDeclaredBean(beanName, bean, bean.getClass()); } objectRegistry.register(beanName, tempBean); } COM: <s> registering a bean allows a scripting engine or the application to </s>
funcom_train/42440285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addServiceToTheUser() { HttpSession session = request.getSession(); String username = (String) session.getAttribute("username"); SqlStatement statement = new SqlStatement(); boolean added = statement.addUserService(username, service.getUrl()); statement.close(); return added; } COM: <s> add the service to the user table </s>
funcom_train/20826893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PresetDefinition getPreset(final String presetName) { PresetDefinition result = null; for (int i=0 ; result == null && i < presets.size(); i ++) { PresetDefinition preset = presets.get(i); if (presetName.equals(preset.getName())) { result = preset; } } return result; } COM: <s> gets the preset with given name </s>
funcom_train/41238930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodProperty (Method getter, Method setter, Object pojo){ this(getter, pojo); //must be first line this.setter = setter; //verify that the trimmed names of the getter and setter match names & types String getterTrimmed = trimName(getter); String setterTrimmed = trimName(setter); if (!getterTrimmed.equals(setterTrimmed)){ //TODO: handle the exception? } } COM: <s> create a method property from a getter setter method pair </s>
funcom_train/18551926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MainClassData buildMainClassData() throws GeneratorException { Hashtable ht = new Hashtable(); Object[] o2 = (Object[]) graph.getRoots(); this.placeInPutNodesInQueue(o2); while (queue.size() != 0) { this.buildArrayList(o2); } mainClassData.setListOfActivities(listOfActivities); return mainClassData; } COM: <s> starting point for building the ordered </s>
funcom_train/39172505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void annotationSetRemoved(DocumentEvent de) { // String getSelected = (String)annotationSetsNamesCB.getSelectedItem(); annotationSetsNamesCB.removeItem(de.getAnnotationSetName()); // Note: still removing the hook (listener) is remaining and we need // to // sort it out } COM: <s> this methods implements the actions when any selected annotation set name is </s>
funcom_train/45397678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassSource getAdditionalClassSources () throws Exception { String libdirs = this.getSetting(LIBDIRS_PROPERTY); if (libdirs == null) return null; String[] libs = libdirs.split(";"); if (libs.length == 1) return new LibDirectoryClassSource(new SystemDirectory(libs[0]), true); else { CompositeClassSource ccs = new CompositeClassSource(); for (String lib : libs) ccs.add(new LibDirectoryClassSource(new SystemDirectory(lib), true)); return ccs; } } COM: <s> this will by default detect the </s>
funcom_train/29618990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJResetButton() { if (jResetButton == null) { jResetButton = new MgisButton(); jResetButton.setBounds(new java.awt.Rectangle(10,288,34,24)); jResetButton.setIcon(new ImageIcon(MgisApp.appDir + MgisApp.separator + "img" + MgisApp.separator + "reset.png")); jResetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { reset(); } }); } return jResetButton; } COM: <s> this method initializes j reset button </s>
funcom_train/41163659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoSingleTextCheckList entity) { EntityManagerHelper.log("saving CoSingleTextCheckList instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co single text check list </s>
funcom_train/42713444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int regionID, PumsHouseholdRealization hohRzn) { if (regionID >= index.size()) index.setSize(regionID + 1); List<PumsHouseholdRealization> list = index.get(regionID); if (list == null) { list = new ArrayList<PumsHouseholdRealization>(); index.set(regionID, list); } list.add(hohRzn); } COM: <s> add a household to the appropriate container </s>
funcom_train/28960748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testHasNext() { // System.out.println("hasNext"); // IndexedDocumentAnnotationManager instance = new IndexedDocumentAnnotationManager(); // boolean expResult = false; // boolean result = instance.hasNext(); // 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 has next method of class indexed document annotation manager </s>
funcom_train/34339569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getHacerPedido() { if (HacerPedido == null) {//GEN-END:|22-getter|0|22-preInit // write pre-init user code here HacerPedido = new Command("Hacer Pedido", Command.OK, 0);//GEN-LINE:|22-getter|1|22-postInit // write post-init user code here }//GEN-BEGIN:|22-getter|2| return HacerPedido; } COM: <s> returns an initiliazed instance of hacer pedido component </s>
funcom_train/9569849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setJMenuBar(getJMenuBar()); jFrame.setSize(1000, 400); jFrame.setContentPane(getJContentPane()); jFrame.setTitle("Plugin Configurator"); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/38880442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllAppenders() { /** * Since all references on attached appenders will be removed here, they'll be * automatically finalized (i.e. closed) and collected by GC. */ for (Appender appender : attachedAppenders.values()) { appender.close(); } attachedAppenders.clear(); } COM: <s> removing all appenders </s>
funcom_train/23853239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dataset newDatasetDialog(Window owner) { List<String> datasets = DBExceptionHandler.callDBManager(db, new DBFunction<List<String>>() { @Override public List<String> call() throws DatabaseException { return db.getAllDatasetNames(); } }); Importer importer = new Importer(db, profile, datasets, null); return importer.runImport(owner); } COM: <s> shows a dialog to create a new dataset and integrate new data </s>
funcom_train/30075589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void copyPropertiesFrom(Node node){ // super.copyPropertiesFrom(node); // setComputeId(node.getComputeId()); // setName(node.getName()); // setStatus(node.getStatus()); // // //setJob(node.getJob()); // // //setAvailable(node.getAvailable()); // // setTimestamp(node.getTimestamp()); // setCurrent(node.getCurrent()); // setCpuLoad(node.getCpuLoad()); // setMemoryLoad(node.getMemoryLoad()); // } COM: <s> method to copy properties from another code node code </s>
funcom_train/42520697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private State processGoalKick() { matchReport.getCurrentEvent().setSpecial(Report.GoalKick); State nextState = new State(toggleTeam(matchReport.getCurrentState().getTeam()), State.X.AXIS, State.Y.DEFENCE, State.Pressure.FREE); nextState.setPlayer(nextState.getTeam().getGK()); return nextState; } COM: <s> process goal kick creating an artificial next state </s>
funcom_train/45060352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutputIndex(int[] outputIndex) { this.outputIndex = outputIndex; isOutputIndexSet = true; if ( completeData != null ) { try { System.out.println("Vou tentar um split"); splitDataValues(); } catch (NetworkControllerException e) { System.out.println("Nao fiz o split"); e.printStackTrace(); } } } // setOutputIndex() COM: <s> this is a very important method </s>
funcom_train/20741462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeTailToRecycle(int i_indexFrom) { List<Crumb> removingList = getTail(m_trail, i_indexFrom); List<Crumb> remainder = getHaed(m_trail, i_indexFrom - 1); // refresh trail m_trail.clear(); if (remainder != null) { m_trail.addAll(remainder); } // remove trail's tail to recycle // m_trailRecycle.clear(); if (removingList != null) { m_trailRecycle.addAll(0, removingList); } } COM: <s> moves the elements of trail from i index to last element exclusive </s>
funcom_train/15462575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateContent(Pid _pid, RegistryLocation _location, Object _o) throws Exception { PidObject po = localRegistry.get(_location.getIndex()); Pid pid = po.getPid(); po.getPid(_pid); //Pid validation localRegistry.put(_location.getIndex(), new PidObject(pid, _o)); } COM: <s> updates the content of the location with the provided object </s>
funcom_train/3369052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getNormalBounds() { /* we used to test (!isMaximum) here, but since this method is used by the property listener for the IS_MAXIMUM_PROPERTY, it ended up getting the wrong answer... Since normalBounds get set to null when the frame is restored, this should work better */ if (normalBounds != null) { return normalBounds; } else { return getBounds(); } } COM: <s> if the code jinternal frame code is not in maximized state returns </s>
funcom_train/30203969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getJSpinner3() { if (jSpinner3 == null) { jSpinner3 = new JSpinner(); SpinnerNumberModel model = new SpinnerNumberModel(new Float(0), null, null, new Float(0.01)); jSpinner3.setPreferredSize(new Dimension(60, 20)); jSpinner3.setModel(model); jSpinner3.setFont(new Font("Dialog", Font.PLAIN, 12)); } return jSpinner3; } COM: <s> this method initializes j button3 </s>
funcom_train/22384683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderDC(Graphics g) { if(dc == null) return; Flob[] which = new Flob[1]; Object co = getObjectAt(dcx, dcy, which); if(co == null) return; if(!dc.accept(co)) return; which[0].renderXOR(g, dcx, dcy); } COM: <s> render the current drag cursor </s>