__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9296364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map<? extends Object, ? extends T> otherMap) { Iterator<?> entries = otherMap.entrySet().iterator(); while (entries.hasNext()) { Entry<Object, T> entry = (Entry<Object, T>) entries.next(); put(entry.getKey(), entry.getValue()); } } COM: <s> map given must not be of class soft object cache </s>
funcom_train/49009204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPane1() { if (jSplitPane1 == null) { jSplitPane1 = new JSplitPane(); jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT); jSplitPane1.setOneTouchExpandable(true); jSplitPane1.setDividerSize(15); jSplitPane1.setDividerLocation(250); jSplitPane1.setBottomComponent(getJPanel4()); jSplitPane1.setTopComponent(getJPanel3()); } return jSplitPane1; } COM: <s> this method initializes j split pane1 </s>
funcom_train/5593842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRaw() { System.out.println("testRaw"); sender.raw("I like cookie dough"); assertEquals("I like cookie dough", bufferToString()); sender.raw("PRIVMSG #channel :test public message"); assertEquals("PRIVMSG #channel :test public message", bufferToString()); } COM: <s> test of raw method of class net </s>
funcom_train/27903716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArgument(ImplArgument a, int pos) { // // pad out vector with nulls up to the argument we want to add if // the vector isn't long enough. // while (arguments.size() < pos) { arguments.addElement(null); } arguments.addElement(a); } COM: <s> set the argument at the indicated 0 based position </s>
funcom_train/16891024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeImages() { URL baseURL = getBundle().getEntry("/"); //$NON-NLS-1$ // TODO make sure you initialize all required icons here createImageDescriptor(IRuntimesUIConstants.ICON_NEWPRJ_WIZARD_BANNER, baseURL); createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_NEW_PRJ, baseURL); createImageDescriptor(IRuntimesUIConstants.ICON_BPEL_PRJ, baseURL); } COM: <s> initializes the table of images used in this plugin </s>
funcom_train/8009684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAreaCodeEnd(java.lang.String newAreaCodeEnd) { _sAreaCodeEnd = newAreaCodeEnd; // create new text comp HtmlText txtNewAreaCodeEnd = new HtmlText(newAreaCodeEnd, getPage()); // replace old area code end comp with new one _cont.replaceComponent(txtNewAreaCodeEnd, _txtAreaCodeEnd); // save ref of new comp _txtAreaCodeEnd = txtNewAreaCodeEnd; } COM: <s> replaces the area code end component </s>
funcom_train/25749062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toFile() { writeUsers(); writeTablespaces(); File f = new File(SessionObject.getInstance().getOutputpath(), "index.html"); super.toFile(f); if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "Saved the top level index :\n" + f.getAbsolutePath()); f = null; } COM: <s> writes this html document to file </s>
funcom_train/1958753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProjectNames() throws Throwable { String[] projs = RepositoryFactory.getProjectNames(); System.out.println("Available projects from the repository factory:"); for (int i=0; i<projs.length; i++) System.out.println(" "+projs[i]); } COM: <s> test the get project name functionality of a repository </s>
funcom_train/45831279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redraw (int x, int y, int width, int height, boolean all) { callClient("redraw", new String[] { Integer.class.getName(), Integer.class.getName(), Integer.class.getName(), Integer.class.getName(), Boolean.class.getName() }, new Object[] { new Integer(x), new Integer(y), new Integer(width), new Integer(height), new Boolean(all) }); } COM: <s> causes the rectangular area of the receiver specified by </s>
funcom_train/37854562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SVNCommitInfo doImport(File path, SVNURL dstURL, String commitMessage, boolean recursive) throws SVNException { return doImport(path, dstURL, commitMessage, null, true, false, SVNDepth.fromRecurse(recursive)); } COM: <s> committs an addition of a local unversioned file or directory into </s>
funcom_train/983365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findList (int index, double paramArray [], int size) { MODELPTR endList; endList = lists [index]; while (endList != null) { if (compareParams (endList.params, paramArray, size)) { return (endList.list); } endList = endList.ptr; } /* if not found, return 0 and calling routine should make a new list */ return (0); } COM: <s> gluint find list int index gldouble param array int size </s>
funcom_train/50076551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g){ resizeButton.setSize( resizeButtonSize, resizeButtonSize); idLabel.setLocation( getWidth()/2 - idLabel.getWidth()/2, getHeight()/2-idLabel.getHeight()/2); newId.setLocation( getWidth()/2 - idLabel.getWidth()/2, getHeight()/2-idLabel.getHeight()/2); } COM: <s> generic painting id label and resize button </s>
funcom_train/34570429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RrdBackend open(String id, boolean readOnly) throws IOException { RrdMemoryBackend backend; if (backends.containsKey(id)) { backend = backends.get(id); } else { backend = new RrdMemoryBackend(id); backends.put(id, backend); } return backend; } COM: <s> creates rrd memory backend object </s>
funcom_train/597128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueOf(final Type type) { if (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY) { return; } if (type == Type.VOID_TYPE) { push((String) null); } else { Type boxed = getBoxedType(type); invokeStatic(boxed, new Method("valueOf", boxed, new Type[] { type })); } } COM: <s> generates the instructions to box the top stack value using java 5s </s>
funcom_train/10590468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAccept() { EmailValidationRule rule = new EmailValidationRule(); assertTrue("[email protected]", rule.isEmail("[email protected]")); assertTrue("\"Arc, Joan\"@ird.govt.nz", rule.isEmail("\"Arc, Joan\"@ird.govt.nz")); } COM: <s> test some patterns that should be accepted </s>
funcom_train/4891367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PropertyMethodChain getPropertyMethodChainAddIfAbsent(Class<?> clazz, String property, boolean readOnly) { ConcurrentMap<String, PropertyMethodChain> classMethodMap = getMethodMap(clazz); PropertyMethodChain methodChain = addPropertyMethodChainIfAbsent(clazz, classMethodMap, property, readOnly); return methodChain; } COM: <s> for example grandparent </s>
funcom_train/34471279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillEntities() { final List<R> choices = loadChoices(parentRecord.getKey()); final List<R> selections = loadSelections(parentRecord.getKey()); Listbox box; for (final R rol : choices) { // Decide which box to add the item box = contains(rol, selections) ? lstSelection : lstChoice; // Add the item to the appropriate box box.getItems().add( new Listitem(extractDisplayName(rol), extractDom(rol) .getKey())); } } COM: <s> fills the entities to the list boxes </s>
funcom_train/48455679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapMarker(double latitude, double longitude, String title, String mapicon, String id, int zindex, String type) { title = escapeForJS(title); add("p.aM(" + latitude + "," + longitude + ",'" + title + "','" + mapicon + "','" + id + "'," + zindex + ",'" + type + "');"); } COM: <s> adds javascript which adds a marker to the map </s>
funcom_train/5865779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMode(String mode) throws WrongValueException { if (!_mode.equals(mode)) { if (!"auto".equals(mode) && !"instant".equals(mode) && !"defer".equals(mode)) throw new WrongValueException("Unknown mode: "+mode); if ((_localized || _progressing) && "instant".equals(mode)) throw new UnsupportedOperationException("localized/progressing not allowed in instant mold"); _mode = mode; fixMode(); } } COM: <s> sets the inclusion mode </s>
funcom_train/46825277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPossibleMove (ChessModel chessModel, int x1, int y1, int x2, int y2) { if (checkBasicMove(chessModel, x1, y1, x2, y2)) { if (Math.abs(x2 - x1) == Math.abs(y2 - y1)) { if (checkLineOfSight (chessModel, x1, y1, x2, y2)) return true; } } return false; } COM: <s> this needs overwritten a </s>
funcom_train/21995204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getRecs() throws RpcException { try { authorize(Mimes.GET_RECS); return bus.getRecs(); } catch (JRecSecurityException e) { throw new RpcException("security-problem getting recs", e); } catch (BusException e) { throw new RpcException("bus-problem getting recs", e); } } COM: <s> obtain the canonical list of supported mime types </s>
funcom_train/6216898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldMethodBeMocked(Method method) { //static or native methods should not be mocked. Final methods obviously cannot. Or non public methods. int modifiers = method.getModifiers(); return ! (Modifier.isStatic(modifiers) || Modifier.isNative(modifiers) || Modifier.isFinal(modifiers) || !Modifier.isPublic(modifiers)); } COM: <s> checks if the given method should be mocked </s>
funcom_train/21172370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeUserRole (Role role) { if (!client.removeUserRole(userName, course, role)) { return false; } HashSet<Role> oldRoles = new HashSet<Role> (roles); roles.remove(role); HashSet<Role> newRoles = new HashSet<Role> (roles); firePropertyChange(Property.ROLES, oldRoles, newRoles); return true; } COM: <s> removes the role from the given user for the current course </s>
funcom_train/46160906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFrontColorPresent(boolean cascade) { return isColorAttributePresent(StandardStyleAttribute.FRONT_COLOR.getName()) || (cascade && (isColorAttributePresent(StandardStyleAttribute.FRONT_AND_BACK_COLOR.getName()) || isColorAttributePresent(StandardStyleAttribute.COLOR.getName()))); } COM: <s> whether a color style attribute exists for the front color within the style </s>
funcom_train/28405214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireTkSubmitEvent(TkSubmitEvent submitEvent) { EventListener[] listeners = list.getListeners(CommandTaskLI.class); // Process the listeners last to first, notifying if (listeners != null) { for (int i = listeners.length - 1; i >= 0; i--) { ((CommandTaskLI) listeners[i]).taskSubmitted(submitEvent); } } } COM: <s> fire a task submission event </s>
funcom_train/3729700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { Enumeration e; FuelProxy fp; System.out.println("Inicializacion FuelFactory"); try{ e=PersistentManager.getInstance().findAllProxy("Fuel","org.jiuston.bo.FuelProxy"); while(e.hasMoreElements()){ fp=(FuelProxy)e.nextElement(); this.addElement(fp); fp.setState(OldCleanState.getInstance()); Cache.getInstance().addObject(fp); } }catch(PersistentManagerException ex){ System.out.println("no hay registros Fuel"); } } COM: <s> initialize fuels collection from database </s>
funcom_train/15724727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String fromFile(File temp) throws PGPException { try { FileReader fr = new FileReader(temp); char[] ca = new char[(int) temp.length()]; fr.read(ca); fr.close(); return (new String(ca)); } catch (IOException ioEx) { throw new PGPException(ioEx); } } COM: <s> reads the passed file into a string </s>
funcom_train/46817761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOwner() { if (object == null) { return false; } else if (((Task) object).getPeopleLinks().getOwner() == null) { return false; } return ((Task) object).getPeopleLinks().getOwner().isRole(); } COM: <s> returns if the owner role is set </s>
funcom_train/18104988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unregister(MIDletState m) { // Find it in the list and switch the last one for it. for (int i = 0; i < nmidlets; i++) { if (m == midlets[i]) { // Switch the last MIDlet into that offset. midlets[i] = midlets[nmidlets-1]; // null out from array and remove from map to allow for GC midlets[--nmidlets] = null; break; } } } COM: <s> remove a midlet from the list if it is there </s>
funcom_train/13391384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void snapshot() throws IOException { try { // Using write lock because we want an exclusive lock mutatorLock.writeLock(); updateCount = 0; // Don't need to sync on this because // mutatorLock.writeLock() gives us an exclusive lock log.snapshot(); } finally { // Using write lock because we want an exclusive lock mutatorLock.writeUnlock(); } } COM: <s> generate a snapshot will perform the necessary locking to ensure no </s>
funcom_train/4506435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuilder event = new StringBuilder(Integer.toString(hour)); event.append('-'); event.append(Integer.toString(minute)); event.append('-'); event.append(on ? '1' : '0'); return event.toString(); } COM: <s> p generate the event string in proper format for parsing </s>
funcom_train/11702819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean processCas(Object aCas) { if (!(aCas instanceof CasData)) // || skipIfCasEmpty == null) { return false; } if (DATACasUtils.isCasEmpty((CasData) aCas)) { return false; // dont process empty CAS'es } return hasFeature((CasData) aCas); } COM: <s> checks if a given cas has required features </s>
funcom_train/42977998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUrlPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DeployUnit_url_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DeployUnit_url_feature", "_UI_DeployUnit_type"), UnitPackage.Literals.DEPLOY_UNIT__URL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the url feature </s>
funcom_train/31955840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object singleElement(int row, int col) { Object res = null; if (isNull == null || !isNull[row * nFields + col]) { res = ArrayFuncs.newInstance(types[col], 1); System.arraycopy(data[col], row, res, 0, 1); } return res; } COM: <s> extract a single element from a table </s>
funcom_train/43827812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHlinscriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HLArcAddin_hlinscription_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HLArcAddin_hlinscription_feature", "_UI_HLArcAddin_type"), ModelPackage.Literals.HL_ARC_ADDIN__HLINSCRIPTION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the hlinscription feature </s>
funcom_train/48558871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextField2() { if (textField2 == null) {//GEN-END:|224-getter|0|224-preInit textField2 = new TextField("\u0421\u0435\u0440\u0432\u0435\u0440", null, 32, TextField.ANY);//GEN-LINE:|224-getter|1|224-postInit }//GEN-BEGIN:|224-getter|2| return textField2; } COM: <s> returns an initiliazed instance of text field2 component </s>
funcom_train/27947134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAtomPropertiesFromURL(String propertiesURL) { try { AtomTypeSet ats1 = new AtomTypeSet(); java.net.URL url1 = new java.net.URL(propertiesURL); ats1.load(url1.openStream()); } catch(java.io.IOException e1) {} typesReady = true; displayIfAreWeReady(); } COM: <s> takes the argument reads it as a url and allocates this as the </s>
funcom_train/44735765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertDomainBase(DomainBase expected, DomainBase actual) { assertEquals("Wrong id.", expected.getId(), actual.getId()); assertEquals("Wrong name.", expected.getName(), actual.getName()); } COM: <s> asserts equality for code domain base code entities for the given </s>
funcom_train/29881865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton createPrintButton() { JButton tJButton = createToolBarButton("V221Print.png", "Print"); tJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {mOpenPCLViewer.actionShowHidePrintChoicesPopup();} }); return tJButton; } COM: <s> print toolbar button </s>
funcom_train/51730311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exitMouse(int x,int y) { Component target = ac.getMouseListener(); MouseEvent me = new MouseEvent(target,MouseEvent.MOUSE_EXITED,System.currentTimeMillis(),0,x,y,0,false,MouseEvent.NOBUTTON); target.dispatchEvent(me); } COM: <s> causes a mouse exit event at x and y </s>
funcom_train/27747373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAll () { checkWidget (); OS.gtk_ctree_remove_node (handle, 0); for (int i=0; i<items.length; i++) { TreeItem item = items [i]; if (item != null && !item.isDisposed ()) { item.releaseWidget (); item.releaseHandle (); } } items = new TreeItem [4]; } COM: <s> removes all of the items from the receiver </s>
funcom_train/21508605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDetail(URL detailmap, URL alphamap){ addDetail(TextureManager.loadTexture(detailmap,MinificationFilter.Trilinear,MagnificationFilter.Bilinear,0f,false), alphamap == null ? null : TextureManager.loadTexture(alphamap,MinificationFilter.Trilinear,MagnificationFilter.Bilinear,0f,false), -1); } COM: <s> same as add tile texture texture but uses urls instead </s>
funcom_train/31467151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object prepare(Visitor v, Context ctx) { arrays.add(0, array); cells.add(0, cell); array = node.getExpression().acceptVisitor(v); Object o = node.getCellNumber().acceptVisitor(v); if (o instanceof Character) { o = new Integer(((Character)o).charValue()); } cell = (Number)o; return Array.get(array, cell.intValue()); } COM: <s> prepares the modifier for modification </s>
funcom_train/26453848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPOCAddress(String pocaddress) { POC_ADDRESS = pocaddress; for (int i=0; i<observers.size(); i++) { SensorObserver observer = (SensorObserver)observers.get(i); if (observer != null) { observer.sensorUpdated(getHostName(), this); } else { observers.remove(i); } } } COM: <s> sets the address of the poc for this sensor </s>
funcom_train/17901381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean builtInCommand(String command) { boolean ret = false; Command _currentCmd = firstCmd; while (_currentCmd != null) { if (_currentCmd.handleCommand(this, command)) { ret = true; break; } _currentCmd = _currentCmd.next; } return ret; } COM: <s> return true if command is built in </s>
funcom_train/28297270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEntryChangeVisualExistentVisualName() throws Exception { Entry entry = dvm.new Entry(Package.class, Sphere.class, Package.NAME, Sphere.NAME); dvm.set(entry); TestListener listener = new TestListener(); dvm.addListener(listener); entry.changeVisual(Cube.class, Sphere.NAME); assertEquals(Cube.class, entry.getVisualClass()); assertEquals(Sphere.NAME, entry.getVisualName()); assertTrue(listener.wasChanged()); } COM: <s> test entry change visual existent visual name </s>
funcom_train/50179099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { try { /* * Set the foreign key value to null. */ currentPersist.getDataShell().removeFromList(fkeyName); /* * Ensure that the next time the list is accessed * it will be read from the database. */ oneToManyList.invalidate(); } catch (PersistException e) { throw new PersistRuntimeException(e.getMessage()); } } COM: <s> set the object at the current iterator position for removal </s>
funcom_train/13244145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String fetchString(byte constantEnumeration, int rxLength) { byte [] stringBytes = getData(constantEnumeration, rxLength); // Get rid of everything after 0. int zeroPos = 0; for(zeroPos = 0;zeroPos < stringBytes.length;zeroPos++) { if(stringBytes [zeroPos] == 0) break; } String s = new String(stringBytes).substring(0,zeroPos); return s; } COM: <s> helper method for retrieving string cosntants using i2 c protocol </s>
funcom_train/40399411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public View onCreateInputView() { sv = (ScrollView) getLayoutInflater().inflate( R.layout.input, null); mInputView = (KeyboardView)sv.findViewById(R.id.keyboard); mInputView.setOnKeyboardActionListener(this); mInputView.setKeyboard(mQwertyKeyboard); return sv; } COM: <s> called by the framework when your view for creating input needs to </s>
funcom_train/45210005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tellWhiteSpace(String cdata) { if (!getIgnoreAllWhiteSpace()) { // only generated white space token if parser expects any int type = tokenManager.getType(tokenManager.getWhitespaceToken()); if (type != Token.INVALID_TYPE) { Token token = new XMLToken(type, cdata); applyLocatorInfo(token); setNextToken(token); } } } COM: <s> tells this adapter to make an </s>
funcom_train/50159054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { repositoryManager = (RepositoryManager) getAttribute("repositoryManager"); xmlConversionService = (XMLConversionService) getAttribute("xmlConversionService"); recordDataService = (RecordDataService) getAttribute("recordDataService"); if (recordDataService != null) metadataVocab = recordDataService.getVocab(); if (repositoryManager != null) { vocabLang = repositoryManager.getMetadataVocabLanguageDefault(); vocabAudience = repositoryManager.getMetadataVocabAudienceDefault(); } } COM: <s> initialized a new xmldoc reader at search time </s>
funcom_train/39393268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tableDataLinked(TcoObject object, boolean bold) throws IOException { nativeContent("<td>" + (bold ? "<b>" : "") + linkObject(object, true, false) + (bold ? "</b>" : "") + "</td>"); getCsvWriter().cell(object.getName()); } COM: <s> add a html hyperlink within a table cell to a concrete tco object </s>
funcom_train/50999483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean useWebService() { String templateValue = (String) getTemplateSettings().get(JagGenerator.TEMPLATE_USE_WEB_SERVICE); if (templateValue == null || "false".equalsIgnoreCase(templateValue)) { return new Boolean(false); } else { return new Boolean(true); } } COM: <s> check if the use web service checkbox was checked to generate a webservice </s>
funcom_train/26234703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIndexLength(Column column) { PoemType t = column.getType(); if (t instanceof StringPoemType && ((StringPoemType)t).getSize() < 0) return "(30)"; if (t instanceof BlobPoemType) return "(30)"; return ""; } COM: <s> my sql requires text and blob field indices to have an </s>
funcom_train/47449297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder sourceSubsampling(int xsub, int ysub, int xoff, int yoff) { if (xsub <= 0 || ysub <= 0 || xoff < 0 || xoff >= xsub || yoff < 0 || yoff >= ysub) { throw new IllegalArgumentException("invalid subsampling values"); } subsampling = new int[]{xsub, ysub, xoff, yoff}; return this; } COM: <s> reduce the size of the decoded image or source region by only using </s>
funcom_train/18514112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHistory() { byte[] buf = null; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bos); out.writeObject(info.getModel()); out.close(); buf = bos.toByteArray(); } catch (IOException e) { } if (buf != null) { simHistory.addElement(buf); history = simHistory.size() - 1; } } COM: <s> adds another item to the history collection </s>
funcom_train/18318405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getFacesForVertex(SimpleVertex sv) { List res = new ArrayList(); ListIterator li = gd.getFaces() .listIterator(); while (li.hasNext()) { Face element = (Face) li.next(); if (element.getVertices() .indexOf(sv) != -1) { res.add(element); } } return res; } COM: <s> get all the faces vertex is contained </s>
funcom_train/39273953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeUpdate(PreparedStatement ps) { try { int result = ps.executeUpdate(); if (LOG.isDebugEnabled()) { LOG.debug("executeUpdate: Result of the update is " + result); } ps.close(); } catch (SQLException ex) { LOG.error("Error encountered during executeUpdate", ex); throw new TransactionException(ex); } } COM: <s> execute a prepared statement against the database </s>
funcom_train/5510257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Version increment(String element) throws VersionException { // Extract which element of the version data, e.g. "major" VersionDataElement dataElement = VersionDataElement .getFromString(element); // Construct a suitable incrementor VersionDataIncrementor incrementor = new VersionDataIncrementor( dataElement); // Increment the version data element, bumping the // higher elements VersionData nextVersionData = incrementor.increment(m_data); // Construct the new immutable version return new ApacheVersion( nextVersionData); } COM: <s> accepts in string form any of the elements of version data e </s>
funcom_train/24117060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetPriorities(){ for(ApplicationModel app : systemModel.getApplications()){ for(Task task : app.getTaskList().values()){ task.setPrio(-1); } for(TaskLink taskLink : app.getTaskLinkList().values()){ taskLink.setPrio(-1); } } } COM: <s> resets the all priorities in the system model </s>
funcom_train/19080728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean readAndValidateOpponentDeck() throws IOException { Deck opponentDeck = DeckReader.getDeck(new MInputStream(inBin)); if (!DeckReader.validateDeck(MagicUIComponents.magicForm, opponentDeck, deck.getConstraint().getName())) { cancelling = true; return false; } StackManager.PLAYERS[1].zoneManager.giveCards(opponentDeck, dbStream); return true; } COM: <s> read and validate the opponents deck </s>
funcom_train/3596638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLabel(NOMElement annotation) { if (attribute!=null) { return (String)annotation.getAttributeComparableValue(attribute.getName()); } Object target = getTarget(annotation); if (target == null) return null; if (target instanceof String) { return (String)target; } else if (target instanceof NOMElement) { return getTargetName((NOMElement)target); } else { return null; } } COM: <s> p returns the label of an annotation in this layer </s>
funcom_train/14108217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKey(final PSObject key, final PSObject value) { if (key instanceof PSObjectString) { PSObjectString keyStr = (PSObjectString) key; getMap().put(new PSObjectName(keyStr.toString(), true), value); } else { getMap().put(key, value); } } COM: <s> sets a key in the dictionary </s>
funcom_train/44622437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCExpression expr(Context context) { if (expr != null) return expr; expr = JmlTree.Maker.instance(context).Binary(JCTree.EQ,id,value); expr.pos = id.pos; // FIXME _ end position not set, do we need it? expr.type = Symtab.instance(context).booleanType; return expr; } COM: <s> returns the lazily created equalilty for the definition </s>
funcom_train/12118696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String filename, BDD var) throws IOException { BufferedWriter is = null; try { is = new BufferedWriter(new FileWriter(filename)); save(is, var); } finally { if (is != null) try { is.close(); } catch (IOException _) { } } } COM: <s> p saves a bdd to a file </s>
funcom_train/8687220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveProcessor(String proc) throws Exception { String classname; if (proc.equals(PROCESSOR_TRAX)) { classname = TRAX_LIAISON_CLASS; } else { //anything else is a classname classname = proc; } Class clazz = loadClass(classname); liaison = (XSLTLiaison) clazz.newInstance(); } COM: <s> load processor here instead of in set processor this will be </s>
funcom_train/17143238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(ILine2D other) { MultiLine that = (MultiLine) other; int thisLenght = this._points.size(); int thatLenght = that._points.size(); int minPointLenght = Math.min(thisLenght,thatLenght); for (int i=0; i < minPointLenght; i++) { int result = _points.get(i).compareTo(that.getPoints().get(i)); if (result != 0) return result; } if (thisLenght > thatLenght) return 1; else return -1; } COM: <s> sorts all points alphabetically </s>
funcom_train/2932967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassLoader createClassLoader (IProject project) throws CoreException { IJavaProject jp = JavaCore.create(project); IClasspathEntry[] javacp = jp.getResolvedClasspath(true); URL[] url = new URL[javacp.length]; for (int i=0; i<javacp.length; i++) try { url[i] = javacp[i].getPath().toFile().toURL(); } catch (MalformedURLException e) { e.printStackTrace(); } return new URLClassLoader(url); } COM: <s> builds a classloader for a java project from the workspace </s>
funcom_train/20980594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int scanTagName(char[] input, int offset, int end, int[] lineNr) throws XMLParseException { this.tagName = this.scanIdentifier(input, offset, end); if (this.tagName == null) { throw this.syntaxError("a tag name", lineNr[0]); } return offset + this.tagName.length(); } COM: <s> scans the class tag name of the object </s>
funcom_train/167968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(Composite parent) { if (parent instanceof IViewer) { ((IViewer) parent).setContainer(jPanel); page = (IViewer) parent; viewers.add(parent); // if (parent instanceof RateGraph) { // jToolBar.add(((RateGraph) parent).getJButton()); // } ((IViewer) parent).setFileName(statusProcessor.getFileName()); } else { Iterator item = parent.getNodesIterator(); while (item.hasNext()) ((Component) item.next()).accept(this); } } COM: <s> visitor pattern interface set this to container of viewer </s>
funcom_train/9643514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void computeZoomValues(ZoomAttribute orig) { for (ListIterator iter = orig.getOverviewValues().listIterator(); iter .hasNext();) { ZoomAttributeValue value = (ZoomAttributeValue) iter.next(); if (value instanceof AnimatedZoomAttributeValue) { ((AnimatedZoomAttributeValue) value) .setProgress(getZoomProgress()); } else { throw new IllegalStateException( "-> ClassCastException: expected AnimatedZoomAttributeValue, but got " + value + " " + value.getClass()); } } } COM: <s> compute zoom values </s>
funcom_train/22233283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getDistanceGain(Point2f[] frontAttenuation, Point2f[] backAttenuation) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_DISTANCE_GAIN_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ConeSound2")); ((ConeSoundRetained)this.retained).getDistanceGain( frontAttenuation, backAttenuation); } COM: <s> gets this sounds elliptical distance attenuation </s>
funcom_train/3324377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAdapter(Class aClass) { Object adapter; if (aClass.equals(IContentOutlinePage.class)) { if ((fOutlinePage == null) || fOutlinePage.isDisposed()) { fOutlinePage = new SignsOutlinePage(this); fOutlineSelectionChangedListener.install(fOutlinePage); if (getEditorInput() != null) { fOutlinePage.setInput(getEditorInput()); } } adapter = fOutlinePage; } else { adapter = super.getAdapter(aClass); } return adapter; } COM: <s> get the content outline page if requested </s>
funcom_train/20527933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PersistentStore getRowStore(Session session) { if (tableType == TableBase.SYSTEM_TABLE) { database.dbInfo.getSystemTable(session, this.getName().name); return session.sessionData.getRowStore(this); } return store == null ? session.sessionData.getRowStore(this) : store; } COM: <s> path used for information schema tables </s>
funcom_train/36259255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePanelName(@NotNull final String newName) { final Runnable task = new Runnable() { public void run() { final String oldName = getPanel().getName(); getPanel().updateDatabaseName(newName); controlCenter.updatePanelTitle(oldName, newName); } }; SwingSynchronizer.runSynchronized(task); } COM: <s> update the database name on the panel tab title and in the heading </s>
funcom_train/1341622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newmessage(String text) { // create the xml for the participants Document doc = builder.newDocument(); Element root = (Element)doc.appendChild(doc.createElement("message")); root.appendChild(doc.createTextNode(text)); // send to my client send(doc); }//newmessage COM: <s> sends a new message to the client </s>
funcom_train/7263800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long read(ByteBuffer dst) { long read = 0L; while(index < buffers.length) { ByteBuffer b = buffers[index]; if(b.hasRemaining()) read += BufferUtils.transfer(b, dst, false); if(!dst.hasRemaining()) break; // Try next ByteBuffer ++index; } return read; } COM: <s> reads as much as possible into the destination buffer </s>
funcom_train/5003187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String convertStreamToString(InputStream is) { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line); } } catch (IOException e) { e.printStackTrace(); } finally { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } return sb.toString(); } COM: <s> convert stream to string </s>
funcom_train/36784184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent mouseEvent) { //Logger.log(Logger.DEBUG, "Mouse clicked at " + mouseEvent.getXLocation() + ":" + mouseEvent.getYLocation() + " in TestGrid"); //Logger.log(Logger.DEBUG, "Mouse event: " + mouseEvent.toString()); } COM: <s> notification that the mouse has been clicked inside this component </s>
funcom_train/51764128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String preprocessValue(String s) { // trim s = s.trim(); // trim possible '%' from end of string s = StringUtils.stripEnd(s, "%"); // mask out NaN strings if ("NaN".equalsIgnoreCase(s)) { s = ""; } if ("-".equals(s)) { s = ""; } return s; } COM: <s> preprocesses string value </s>
funcom_train/25969761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStatus() throws Exception { // Get the data set from database directly ITable actualTable = getTable("Status"); // Gets the list using hibernate List list = daoFactory.getLookupDAO().getStatusList(); // Size is compared assertTrue("Status count does not match with the database", list != null && list.size() == actualTable.getRowCount()); } COM: <s> test get status </s>
funcom_train/26335258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { this.player.setGameMap( this.manager.getStartMap() ); this.player.setX( this.manager.getStartingX() ); this.player.setY( this.manager.getStartingY() ); // is it night time? welcoming message if( this.worldClock.isNightTime() ) this.engine.addMessage( "It is night time." ); } COM: <s> initialize game world </s>
funcom_train/27835003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { fldIdentifier_actionPerformed(null); fldValue_actionPerformed(null); listDataSource_actionPerformed(null); listEditable_actionPerformed(null); listVisible_actionPerformed(null); fldWidth_actionPerformed(null); fldHeight_actionPerformed(null); listElements_actionPerformed(null); } COM: <s> updates all fields in the code property window code </s>
funcom_train/14088717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAddressType(String type) throws IOException { String chunkId = "3002"; /* need to remove the previous chunk if this has been called before */ removeEntry(chunkId, PT_STRING8); this.createDocument("__substg1.0_" + chunkId, PT_STRING8, createPtString(type)); } COM: <s> sets the address type typically smtp for email addresses containing the </s>
funcom_train/47138248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateEmailaddress(final String emailaddress) { return emailaddress.matches("[a-zA-Z][a-zA-Z0-9_.]+@[a-zA-Z][a-zA-Z0-9_.]+\\.[a-zA-Z0-9]+"); } COM: <s> validate email address </s>
funcom_train/41808404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public JMenuItem newJMenuItem(String title, int what) { JMenuItem menuItem = new JMenuItem(title); int modifiers = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); menuItem.setAccelerator(KeyStroke.getKeyStroke(what, modifiers)); return menuItem; } COM: <s> a software engineer somewhere needs to have his abstraction </s>
funcom_train/45598312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setList(ArrayList<T> list) { this.list = new ArrayList<T>(list.size()); for (T e : list) if (e instanceof XMLInterface) this.list.add((T) ((XMLInterface) e).clone()); else this.list.add(e); jlist.updateUI(); } COM: <s> sets the list to a new list </s>
funcom_train/46760165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TranslationModel getTranslation(final long translationId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ReferenceData.getTranslation(translationId, chain, call); }}; return (TranslationModel) call(method, call); } COM: <s> same transaction return the single translation model for the primary key </s>
funcom_train/45896764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int knowledge(Planet planet, PlanetKnowledge expected) { PlanetKnowledge k = planet.owner == this ? PlanetKnowledge.BUILDING : planets.get(planet); if (k == expected) { return 0; } if (k != null && expected == null) { return 1; } if (k == null && expected != null) { return -1; } return k.ordinal() < expected.ordinal() ? -1 : 1; } COM: <s> compare the current knowledge level of the given planet by the expected level </s>
funcom_train/11125043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void timeoutCheck(final SelectionKey key, long now) { IOSessionImpl session = (IOSessionImpl) key.attachment(); if (session != null) { int timeout = session.getSocketTimeout(); if (timeout > 0) { if (session.getLastAccessTime() + timeout < now) { sessionTimedOut(session); } } } } COM: <s> triggered to verify whether the i o session associated with the </s>
funcom_train/29885979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTitle() { String title = ""; File f = null; f = getFile(); if (f == null) { title = "untitled"; } else { title = f.getName(); } if (isModified()) { title += "*"; } return title; } COM: <s> gets the title of the document </s>
funcom_train/44534743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doDelete(String id, Object o) throws Exception { //TODO Transfer to Hibernate // try { // fbds.getSqlmap().startTransaction(); // fbds.getSqlmap().delete(id, o); // fbds.getSqlmap().commitTransaction(); // } catch (Exception e) { // throw new Exception(e); // } finally { // fbds.getSqlmap().endTransaction(); // } } COM: <s> perform simple delete from </s>
funcom_train/44447368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getChildElementNum(Control control) { if (childControl.isDisposed()) return -1; Control[] children = getFocusControls(childControl); for (int i = 0; i < children.length; i++) { if (children[i] == control) return i; } return -1; } COM: <s> returns the element number of the specified control </s>
funcom_train/37009414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int minRed() { int m = Integer.MAX_VALUE; for (int v = 0; v < getHeight(); v++) { for (int u = 0; u < getWidth(); u++) { if (red(u, v) < m) m = red(u, v); } } return m; } COM: <s> returns the minimum red pixel value in band 0 </s>
funcom_train/6458166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verify(KeyPair verifyer) throws IOException { byte digest[] = hash.digest(); byte sign[] = new byte[verifyer.getSignLength()]; for (int i = 0; i < sign.length; i++) { int b = in.read(); if (b < 0) { return false; } sign[i] = (byte)b; } return verifyer.checkSignature(digest, sign); } COM: <s> verify the input stream </s>
funcom_train/39117090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { if (dataOutputStream != null) { try { dataOutputStream.close(); } catch (IOException e) { System.err .println("Failed to terminate the dataOutputStream in a controlled way." + e); } } if (connection != null) { try { connection.close(); } catch (IOException e) { System.err.println("Failed to close the log " + e); } } } COM: <s> close the log </s>
funcom_train/45192159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move(int left, int top) { StringBuilder out = innerFrame.openScriptBuffer(); if (out != null) { out.append("wa.moveWindow("); out.append(left); out.append(','); out.append(top); out.append(");\n"); } } COM: <s> move the window </s>
funcom_train/25457402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCBUseTestMap() { if (CBUseTestMap == null) { CBUseTestMap = new JCheckBox(); CBUseTestMap.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { numXpatches.setEnabled(CBUseTestMap.isSelected()); numYpatches.setEnabled(CBUseTestMap.isSelected()); } }); } return CBUseTestMap; } COM: <s> this method initializes cbuse test map </s>
funcom_train/18110682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSearchPrevButton() { if (searchPrevButton == null) { searchPrevButton = new JButton(); searchPrevButton.setToolTipText("Previous"); searchPrevButton.setIcon(new ImageIcon(getClass().getResource("/icons/moveup.gif"))); searchPrevButton.setDisabledIcon(new ImageIcon(getClass().getResource("/icons/moveup_disabled.gif"))); searchPrevButton.addActionListener(this); } return searchPrevButton; } COM: <s> this method initializes search prev button </s>
funcom_train/31079688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDescriptor(String desc) { String origDesc = getDescriptor(); // reset the desc desc = getProject().getNameCache().getInternalForm(desc, true); _descriptorIndex = getPool().findUTF8Entry(desc, true); // change all the references in the owning class setEntry(getName(), origDesc); } COM: <s> set the descriptor of this member </s>