__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2708527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveSettings(ClientSettings map) throws ServerExceptions { try { Persistence pers = getPersistence(); if (pers == null) throw new ServerExceptions("Save Settings failed"); else { pers.saveSettings(map); } } catch (PersistenceException e) { throw new ServerExceptions ("Save Settings failed: Unable to connect with the database server. Please check your connection and try gain"); } } COM: <s> saves users settings </s>
funcom_train/20029035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSaveCommand() { if (saveCommand == null) {//GEN-END:|40-getter|0|40-preInit // write pre-init user code here saveCommand = new Command("Item", Command.ITEM, 0);//GEN-LINE:|40-getter|1|40-postInit // write post-init user code here }//GEN-BEGIN:|40-getter|2| return saveCommand; } COM: <s> returns an initiliazed instance of save command component </s>
funcom_train/24134660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* private int searchForth(String str, int pos) { int result = -1; Document doc = _textArea.getDocument(); while (pos < doc.getLength()) { try { String curstr = doc.getText(pos,str.length()); if (curstr.equals(str)) { result = pos; break; } } catch (BadLocationException ble) { //Ignored by design } pos++; } return result; } COM: <s> seach text area forwards for str starting at pos </s>
funcom_train/37052999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object next() { Object next = gray.pop(); List adj = graph.getAdjacentNodes(next, EdgeType.ALL); for (int i = adj.size() - 1; i >= 0; i--) { Object node = adj.get(i); if (gray.contains(node)) { classifications.put(node, EdgeClassification.BACK_EDGE); } else if (white.contains(node)) { gray.push(node); white.remove(node); classifications.put(node, EdgeClassification.TREE_EDGE); } else { classifications.put(node, EdgeClassification.FORWARD_EDGE); } } return next; } COM: <s> fully explore and return the next node in the graph </s>
funcom_train/19747854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAsPlainList() { List result = new ArrayList(); result.add(this); for (int i = 0; i < childItems.size(); i++) { ContextMenuItem child = (ContextMenuItem) childItems.get(i); result.addAll(child.getAsPlainList()); } return result; } COM: <s> returns list of all context menu items in following order root his </s>
funcom_train/26524174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List constructStatsList(Environment pEnv) { List vStats = super.constructStatsList(pEnv); IExtractor vErrorExtractor = new ScoreExtractor(); vStats.add(new AverageStat("AverageError", pEnv, vErrorExtractor)); vStats.add(new ExtremeStat("LeastError", pEnv, new ValueComparator(false, vErrorExtractor), vErrorExtractor)); return vStats; } COM: <s> construct the extra list of statistics that we are going to record </s>
funcom_train/24138504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize( int sequenceLength) { for(int k=0; k<sequenceLength; k++ ){ for(int i=0; i<hmm.getNumberOfStates(); i++){ probabilityOfMostProbPath[i][k] = Double.NEGATIVE_INFINITY; stateOfOptimalPredecessor[i][k]=null; } } } COM: <s> initialize probability matrix values probability of 0 </s>
funcom_train/2513815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color getColor(String nodeValue) { if(nodeValue.equalsIgnoreCase("red")){ return Color.red; }else if(nodeValue.equalsIgnoreCase("orange")){ return Color.orange; }else if(nodeValue.equalsIgnoreCase("yellow")){ return Color.yellow; }else if(nodeValue.equalsIgnoreCase("green")){ return Color.green; }else if(nodeValue.equalsIgnoreCase("white")){ return Color.white; }else if(nodeValue.equalsIgnoreCase("blue")){ return Color.blue; }else if(nodeValue.equalsIgnoreCase("purple")){ return Color.MAGENTA; }else if(nodeValue.equalsIgnoreCase("black")){ return Color.black; } return null; } COM: <s> a method for converting text color attributes to color values </s>
funcom_train/15724823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeCDATAElement(Element e, String tagValue) { NodeList nl = e.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { e.removeChild(nl.item(i)); } CDATASection CDATANode = XMLDocument.createCDATASection(tagValue); e.appendChild(CDATANode); } COM: <s> sets the content of an element containing a cdata section </s>
funcom_train/28215561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTriggerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractEvent_trigger_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractEvent_trigger_feature", "_UI_AbstractEvent_type"), StateMachinePackage.Literals.ABSTRACT_EVENT__TRIGGER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the trigger feature </s>
funcom_train/2428291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDeliveryMode(DeliveryMode mode) { if (mode == null) { throw new IllegalArgumentException("mode cannot be null"); } DeliveryMode old = getDeliveryMode(); setProperty(DELIVERY_MODE, mode.getJmsSpecValue()); if (old != mode) { firePropertyChange(DELIVERY_MODE, old, mode); } } COM: <s> sets the delivery mode of this message </s>
funcom_train/51418359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUniqueValuesOnlyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RegistryNode_uniqueValuesOnly_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RegistryNode_uniqueValuesOnly_feature", "_UI_RegistryNode_type"), JetsetPackage.Literals.REGISTRY_NODE__UNIQUE_VALUES_ONLY, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the unique values only feature </s>
funcom_train/11733984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy(NodeId id) throws RepositoryException { if (!exclude.contains(id)) { try { NodeState node = source.load(id); for (ChildNodeEntry entry : node.getChildNodeEntries()) { copy(entry.getId()); } copy(node); exclude.add(id); } catch (ItemStateException e) { throw new RepositoryException("Unable to copy " + id, e); } } } COM: <s> recursively copies the identified node and all its descendants </s>
funcom_train/45784399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnAceptar() { if (btnAceptar == null) { btnAceptar = new JButton(); btnAceptar.setBounds(new Rectangle(15, 81, 84, 20)); btnAceptar.setText("Aceptar"); btnAceptar.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent e) { entrar(); } }); } return btnAceptar; } COM: <s> this method initializes btn aceptar </s>
funcom_train/33881783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxRounds() { String s = props.getProperty("explorers.rounds"); int maxRounds; try{ maxRounds = Integer.parseInt(s); }catch(Exception e){ maxRounds = MAXROUNDS; log.warn("explorers.rounds invalid or absent in configuration file, using default."); } if(maxRounds <= 0){ maxRounds = MAXROUNDS; log.warn("explorers.rounds must be positive, using default."); } return maxRounds; } COM: <s> returns the maximum number of rounds that a game may last </s>
funcom_train/44566171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Loan getCurrentLoan(String parentID) { Collection<Loan> loans = getLoans(parentID); for (Loan loan : new ArrayList<Loan>(loans)) { if (loan.getValue(Loan._B_ENDDATE) == null) return loan; } Loan loan = (Loan) DcModules.get(DcModules._LOAN).getItem(); loans.add(loan); return loan; } COM: <s> retrieves the actual loan </s>
funcom_train/48506246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean delete (User user) { // try to delete from DB try { if (!Database.deleteUser(user.name)) { System.err.println("Unable to delete user from persistent database"); return false; } User us = new User(user.name, user.getPassword()); super.removeUser(us); } catch (Exception e1) { System.err.println("Unable to remove user from persistent database: " + user.name); return false; } // done return true; } COM: <s> removes a user from the database </s>
funcom_train/28367684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAgentMemory() { final List<BasicEntity> agents = scheduler.getCurrentAgents(); for (final BasicEntity se : agents) { if (se instanceof AdaptiveAgent) { final AdaptiveAgent aa = (AdaptiveAgent) se; mAgentMemory.put(aa.getName(), new AgentMemory(aa)); } } } COM: <s> record the priority gain </s>
funcom_train/21971468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void summarize(OperationSample sample, CompositePerfStats stats) { if (sample != null) { synchronized(sample) { // in future, we should identify the "baseline" stack trace at this point ... summarizeContention(sample, stats); TreeTimeStats timeStats = (TreeTimeStats)stats.getPerfStats(StatisticsType.SlowMethodIdx, StatisticsType.SlowMethodKey); timeStats.recordSample(sample); } } } COM: <s> tracks both slow methods contention </s>
funcom_train/45598765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getElement(String type, String key, String value) { Element element = xml.createElement(type); element.setAttribute(type.equals("modifier") ? "key" : "name", key); element.setAttribute("value", value); return element; } COM: <s> gets the element </s>
funcom_train/34448431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PaletteContainer createM3Actions2Group() { PaletteGroup paletteContainer = new PaletteGroup( hub.sam.mof.simulator.behaviour.diagram.part.Messages.M3Actions2Group_title); paletteContainer.add(createMAssignAction1CreationTool()); paletteContainer.add(createMCreateAction2CreationTool()); paletteContainer.add(createMInvocationAction3CreationTool()); paletteContainer.add(createMIterateAction4CreationTool()); paletteContainer.add(createMQueryAction5CreationTool()); paletteContainer.add(createMInputAction6CreationTool()); paletteContainer.add(createMOutputAction7CreationTool()); paletteContainer.add(createMAtomicGroup8CreationTool()); return paletteContainer; } COM: <s> creates m3 actions palette tool group </s>
funcom_train/50022549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(String xpath) { String result = null; try { result = Manager.getParser().evaluate(xpath, document); } catch (XPathExpressionException e) { Manager.getLogger(this).log(Level.SEVERE,"Error with path: " + xpath, e); } if (result !=null) { result=result.trim(); } return result; } COM: <s> gets the text entry of the given xpath </s>
funcom_train/42635085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProcess() { System.out.println("process"); File in = new File("src/test/resources/odt/simple.odt"); //File in = new File("src/test/resources/odt/thomas_medical_conflicts.odt"); File out = new File("target/simple.xml"); Core convert = new Core( in, out); convert.process(); //TODO: improve the tests accuracy assertTrue(out.canRead()); } COM: <s> test of process method of class core </s>
funcom_train/1907492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected float combMED(float[] scores, int totalExtractors) { Arrays.sort(scores); int zeroAnswers = totalExtractors - scores.length; int m = totalExtractors / 2 - zeroAnswers; float med; if (totalExtractors % 2 == 1) { med = (m >= 0 ? scores[m] : 0); } else { med = (m >= 0 ? scores[m] : 0); med += (m - 1 >= 0 ? scores[m - 1] : 0); med /= 2; } return med; } COM: <s> combines normalized scores using comb med </s>
funcom_train/10204881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContentsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MAnnotation_contents_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MAnnotation_contents_feature", "_UI_MAnnotation_type"), ClassDiagramPackage.Literals.MANNOTATION__CONTENTS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the contents feature </s>
funcom_train/2992334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long transform(InputStream xmlin, InputStream xslin, OutputStream output) throws Exception { //return transform(xmlin,xslin,output, new java.io.File("lib"),new java.io.File("lib")); return transform(xmlin, xslin, output, null, null); } COM: <s> does the actual transform xml xslt non fop </s>
funcom_train/41024511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { if (joglObjects == null) { return; } for (int o = 0; o < joglObjects.length; o++) { if (joglObjects[o].vboIds != null) { gl.glDeleteBuffersARB( joglObjects[o].vboIds.length, joglObjects[o].vboIds, 0); } } joglObjects = null; if (hasOwnTextureManager) { textureManager.clear(); textureManager = null; } } COM: <s> free used memory spaces </s>
funcom_train/3155955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ParamProperties createParamInfoDeleteDB() { ParamProperties paramProps = _defaultFactory.createBooleanParamProperties(); paramProps.setDefaultValue(L3Constants.DELETE_DB_DEFAULT_VALUE); paramProps.setLabel(L3Constants.DELETE_DB_LABEL); paramProps.setDescription(L3Constants.DELETE_DB_DESCRIPTION); return paramProps; } COM: <s> creates the parameter information for the parameter delete db </s>
funcom_train/49720231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel9() { if (jPanel9 == null) { GridBagConstraints gridBagConstraints27 = new GridBagConstraints(); gridBagConstraints27.insets = new Insets(10, 5, 0, 5); jPanel9 = new JPanel(); jPanel9.setLayout(new GridBagLayout()); jPanel9.add(getJProgressBar(), gridBagConstraints27); } return jPanel9; } COM: <s> this method initializes j panel9 </s>
funcom_train/22791692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadParameters() { File dataFile = getConfigFile(); if (dataFile.exists() && dataFile.canRead()) try { parameters = UjoManagerRBundle.getInstance(Parameters.class).loadResourceBundle(dataFile, false, "props"); } catch (Throwable e) { LOGGER.log(Level.WARNING, "Can't load Parameters to " + dataFile, e); } } COM: <s> load parameters from file </s>
funcom_train/13389877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installCodeBase(String jarName, byte[] jarFile, String majorVersion, String minorVersion) throws RemoteException { JarDescriptor jarDescriptor = new JarDescriptor(jarName, majorVersion, minorVersion); codeStoreManager.installCodeBase(jarDescriptor, jarFile); } COM: <s> install a jar from a url location </s>
funcom_train/1958710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Process startProcess(String commandline, File cwd) throws VerinecException { SshClient ssh = J2sshProcess.getSshConnection(host,port,username,password,prefPublicKey,keyfile,passphrase,hostVerification); return new J2sshProcess(commandline, ssh, cwd); } COM: <s> instantiate a process using runtime </s>
funcom_train/15927154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDocumentation(Object target, IParseController parseController) { if (traceOn) System.out.println("\nX10DocProvider.getDocumentation(), target is :"+ target.toString()); String doc = getHelpForEntity(target, parseController); if (traceOn) System.out.println(" " + doc); return doc; } COM: <s> get text documentation for an entity in the x10 source code </s>
funcom_train/27842480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusLost(FocusEvent inEvent) { if (!inEvent.isTemporary()) { boolean changed = (previousValue == null || !previousValue.equals(getComponentValue())); if (changed) { doViewChanged(); } if (needIssueControl(ISSUE_CONTROL_ON_LOST_FOCUS, changed)) { doIssueControl(); } } } COM: <s> invoked when a component loses the keyboard focus </s>
funcom_train/49079213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createNewStatement() { StringBuffer fontCode = new StringBuffer(); // first param is the font face: fontCode.append( "Font.getFont( Font.") .append( this.face ) .append(", Font.") .append( this.style ) .append(", Font.") .append( this.size ) .append(" )"); return fontCode.toString(); } COM: <s> retrieves the statement needed to create this font </s>
funcom_train/14245797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Wizard makeWizard(ToDoItem item) { Class wizClass = getWizardClass(item); // if wizClass is not a subclass of Wizard, print a warning if (wizClass != null) { try { Wizard w = (Wizard) wizClass.newInstance(); w.setToDoItem(item); initWizard(w); return w; } catch (Exception ex) { Argo.log.error("Could not make wizard: " + item, ex); } } return null; } COM: <s> create a new wizard to help the user fix the identified problem </s>
funcom_train/3180858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void indent(Writer out, int level) throws IOException { if (currentFormat.newlines) { if (currentFormat.indent == null || currentFormat.indent.equals("")) { return; } for (int i = 0; i < level; i++) { out.write(currentFormat.indent); } } } COM: <s> this will print indents only if the newlines flag was </s>
funcom_train/38957567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAdIstAbzweigPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DKW_adIstAbzweig_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DKW_adIstAbzweig_feature", "_UI_DKW_type"), ModelrailwayPackage.Literals.DKW__AD_IST_ABZWEIG, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ad ist abzweig feature </s>
funcom_train/37657999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadStylesheet() throws Exception { String stylesheetUri = xpath.evaluate("//tdf:stylesheet/@src", tdfDoc); Source xsltSource = new StreamSource(new FileInputStream(stylesheetUri)); transformer = tf.newTransformer(xsltSource); tdf.setTransformer(transformer); log.info("transformer created"); } COM: <s> retrieves the uri pointing to the xslt stylesheet builds a transformer </s>
funcom_train/13220018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addContextListener(Element elem, ContextListener listener) { if (elem == null) { throw new IllegalArgumentException("Element to associated with context event is null"); } if (listener == null) { throw new IllegalArgumentException("ContextPanel to associated with element is null"); } elementListeners.put(elem, listener); jsniAddContextListener(elem); } COM: <s> records the context event handler to used for context events on the specified </s>
funcom_train/3100713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCategoryId (String topic) { Long categoryId = (Long) categoryIds.get(topic); if (categoryId == null) { if (verbosity > 2) Log.current.println("No category ID found for topic " + topic); return "unknown"; } else return "DMOZ-" + categoryId.toString(); } COM: <s> substitutes category id for topic in resource references as </s>
funcom_train/43827621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLengthLowPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CPNString_lengthLow_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CPNString_lengthLow_feature", "_UI_CPNString_type"), CpntypesPackage.Literals.CPN_STRING__LENGTH_LOW, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the length low feature </s>
funcom_train/43188879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean doPrefetch2() { if (prefetchEnabled) { // Wait for notification from the renderer modules with the // bufferPrefetched event. synchronized (waitPrefetched) { source.doStart(); try { if (!waitPrefetched.isEmpty()) { // Block for at most 3 sec. in case anything goes wrong // at the renderer modules. waitPrefetched.wait(3000); } } catch (InterruptedException e) {} } } else prefetched = true; deallocated = false; return true; } COM: <s> do prefetch part ii </s>
funcom_train/18597534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isQueryTypeDescriptor() { return "type".equals(this.getField()) && (QueryRequest.QUERY_TYPE_GEO.equals(this.getText()) || QueryRequest.QUERY_TYPE_MDD.equals(this.getText()) || QueryRequest.QUERY_TYPE_MDS.equals(this.getText())); } COM: <s> is this query info object describing a query type </s>
funcom_train/21633977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NEATNeuronGene chooseRandomNeuron(final boolean includeInput) { int start; if (includeInput) { start = 0; } else { start = this.inputCount + 1; } final int neuronPos = RangeRandomizer.randomInt(start, getNeurons() .size() - 1); final NEATNeuronGene neuronGene = (NEATNeuronGene) this.neuronsChromosome .get(neuronPos); return neuronGene; } COM: <s> choose a random neuron </s>
funcom_train/25421482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToSession(String key, Object obj) { ServletRequest request = this.getServletRequest(); if(!(request instanceof HttpServletRequest)) { return; } HttpServletRequest hRequest = (HttpServletRequest) request; HttpSession session = hRequest.getSession(true); session.setAttribute(key, obj); } COM: <s> adds the to session </s>
funcom_train/23676297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeItem(FastMSTreeItem item) { // Validate. if (children == null || !children.contains(item)) { return; } // Orphan. item.clearTree(); // Physical detach. if (state != TREE_NODE_INTERIOR_NEVER_OPENED) { DOM.removeChild(childElems, item.getElement()); } // Logical detach. item.setParentItem(null); children.remove(item); } COM: <s> removes an item from the tree </s>
funcom_train/2582554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DomainOrder getDomainOrder() { int seriesCount = getSeriesCount(); for (int i = 0; i < seriesCount; i++) { XYSeries s = getSeries(i); if (!s.getAutoSort()) { return DomainOrder.NONE; // we can't be sure of the order } } return DomainOrder.ASCENDING; } COM: <s> returns the order of the domain x values if this is known </s>
funcom_train/8232685
/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:|120-getter|0|120-preInit // write pre-init user code here spacer = new Spacer(16, 1);//GEN-LINE:|120-getter|1|120-postInit // write post-init user code here }//GEN-BEGIN:|120-getter|2| return spacer; } COM: <s> returns an initiliazed instance of spacer component </s>
funcom_train/4393185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcessGraph createProcessFlowGraph(Process process) { this.processFlowGraph.setGraph(createGraphFromProcess(process)); // Set start activity of the process. Set<ActivityNode> nodes = processFlowGraph.getGraph().vertexSet(); for (ActivityNode node : nodes) { if(node.getActivityID().compareTo(startActivityID) == 0) { processFlowGraph.setStartActivity(node); break; } } return this.processFlowGraph; } COM: <s> starts the building of the process graph for the given process </s>
funcom_train/29792943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj != null && obj instanceof TeachingControlBean) { TeachingControlBean tc2 = (TeachingControlBean)obj; return (this.permissions.size() == tc2.getAccessPrivileges().size()) && (this.permissions.containsAll(tc2.getAccessPrivileges())); } else return false; } COM: <s> checks the equality of the current privilege to another </s>
funcom_train/14237006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImageList(List<DICOMImage> imageList) { _imageList = imageList; _bsHelper.notifyDestinations(this, "imageList"); setCurrentImage(((_imageList == null) || (_imageList.isEmpty())) ? null : _imageList.get(0)); } COM: <s> sets the current image list </s>
funcom_train/46766671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToolBar getJJToolBarBar() { if (jJToolBarBar == null) { jJToolBarBar = new JToolBar(); jJToolBarBar.add(getJButton()); jJToolBarBar.add(getJButton4()); jJToolBarBar.add(getJButton3()); jJToolBarBar.add(getJButton1()); jJToolBarBar.add(getJButton5()); jJToolBarBar.add(getJButton2()); } return jJToolBarBar; } COM: <s> this method initializes the tool bar </s>
funcom_train/44859780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatMoney(Money money) { if (money == null) { return ""; } MoneyFormat format = new MoneyFormat(locale); format.setShowSymbol(true); format.setShowIsoCode(false); format.setUseGrouping(true); format.setUseBracketsForNegative(false); return format.format(money); } COM: <s> format the given money instance as a currency amount symbol decimal amount </s>
funcom_train/3518218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fileNotFoundException(FileNotFoundException fnfe) { logger.log(Level.WARNING, fnfe.getLocalizedMessage(), fnfe); JOptionPane.showMessageDialog(jpmDDSO, Resources.getI18NString(Constants.S_FILE_NOT_FOUND_MSG), Resources.getI18NString(Constants.S_FILE_NOT_FOUND), JOptionPane.WARNING_MESSAGE); } COM: <s> this method displays a dialog box when a file not found exception occurs </s>
funcom_train/21960304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenu() { if (jMenu == null) { jMenu = new JMenu(); jMenu.setText("File"); jMenu.setMnemonic(java.awt.event.KeyEvent.VK_F); jMenu.add(getJFileOpen()); jMenu.add(getJFileSave()); jMenu.add(getJFileSaveAs()); jMenu.add(new JSeparator()); jMenu.add(getJFileQuit()); } return jMenu; } COM: <s> this method initializes j menu </s>
funcom_train/18846409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList removeProcessFlow(String tscToken, OWLModel ontologyBMO, String flowID) { ft = new FlowTracer(); ft.traceFlowOnDemand(componentID, "Invoking removeProcessFlow"); ProtegeDeleteProcessFlow dpf = new ProtegeDeleteProcessFlow(); ArrayList collObj = new ArrayList(); ArrayList flowCollObj = new ArrayList(); flowCollObj = dpf.removeProcessFlow(tscToken, ontologyBMO, flowID); collObj = flowCollObj; return collObj; } COM: <s> remove process flow </s>
funcom_train/19314214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FoValue getDisplayAlign(final FObj fobj, final FoContext context) { final PdDisplayAlign property = (PdDisplayAlign) getProperty( FoProperty.DISPLAY_ALIGN); if (property == null) { return PdDisplayAlign.traitValueNoInstance(); } return property.traitValue(context, fobj); } COM: <s> returns the display align property </s>
funcom_train/39358926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel moreOptions(){ //we create the panel to return JPanel result= new JPanel(); //we set the layou result.setLayout(new GridLayout(0,1)); //we set the aligment of the obejcts matchCaseBox.setAlignmentY(Component.LEFT_ALIGNMENT); findWordsOnly.setAlignmentY(Component.LEFT_ALIGNMENT); wildCards.setAlignmentY(Component.LEFT_ALIGNMENT); result.add(matchCaseBox); result.add(findWordsOnly); result.add(wildCards); //we adda border result.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); //we return the panel return result; } COM: <s> this mthod creates a panel with more searching options </s>
funcom_train/4305437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Sprite sprite) { if (sprite != null) { synchronized (getTreeLock()) { Sprite[] snapshot = sprites; int index = indexOf(snapshot, sprite); if (index != -1) { sprites = remove(snapshot, index); sprite.setParent(null); } } } } COM: <s> removes a sprite from this group </s>
funcom_train/50575903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete() { if (getFile().exists()) try { getFile().delete(); deleteEmptyDirs(dir, getFile().getParentFile()); } catch (Exception ex) { Tuneology.logException(ex, "delete"); return false; } return true; } COM: <s> deletes the local file </s>
funcom_train/45832415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFull() { boolean empty = false; try { for (Field f : this.getClass().getDeclaredFields()) { if (f.getType().equals(Long.class) && f.get(this) == null) { empty = true; } // breaking the loop. if (empty) { return false; } } } catch (Exception e) { LOG.error("Unable to get value.", e); } return empty; } COM: <s> determines if the group is empty </s>
funcom_train/46427960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String tenseToString() { if (!isEvent()) { return ""; } long delta = getEventTime() - Center.getTime(); if (delta > 0) { return Symbols.TENSE_FUTURE + " "; } if (delta < 0) { return Symbols.TENSE_PAST + " "; } return Symbols.TENSE_PRESENT + " "; } COM: <s> get a string representation of the tense of the sentence </s>
funcom_train/8634435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldDeclaration declarationOf(FieldBinding fieldBinding) { if (fieldBinding != null && this.fields != null) { for (int i = 0, max = this.fields.length; i < max; i++) { FieldDeclaration fieldDecl; if ((fieldDecl = this.fields[i]).binding == fieldBinding) return fieldDecl; } } return null; } COM: <s> find the matching parse node answers null if nothing found </s>
funcom_train/4179113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ClassResource (final ClassReader classReader) { super(new ClassNode()); this.reader = classReader; /* Initializes the caches. */ cache.put(CacheType.ANNOTATIONS, new HashMap<String, Object>()); cache.put(CacheType.FIELDS, new HashMap<String, Object>()); cache.put(CacheType.METHODS, new HashMap<String, Object>()); } COM: <s> this constructor is used to keep the </s>
funcom_train/48493716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createRandomSeedPanel() { JPanel panel = new JPanel(new GridLayout(2, 1)); checkTimeSeed = new JCheckBox("Use current time as the seed"); checkTimeSeed.addActionListener(this); spinnerSeed = new JSpinner( new SpinnerNumberModel(0, -20000000000l, 20000000000l, 1)); panel.add(checkTimeSeed); panel.add(spinnerSeed); return panel; } COM: <s> creates random seed panel </s>
funcom_train/12081499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/5260817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDerivedFromPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BusinessRule_derivedFrom_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BusinessRule_derivedFrom_feature", "_UI_BusinessRule_type"), BmmPackage.Literals.BUSINESS_RULE__DERIVED_FROM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the derived from feature </s>
funcom_train/44324968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List newRandomList(Collection addedValues) { Set set = new HashSet(); int count = getTestNodeCount(); if (addedValues != null) set.addAll(addedValues); fillRandomStringList(set, count); List list = new ArrayList(); list.addAll(set); return list; } COM: <s> method new random list </s>
funcom_train/23273394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void print(String str) { int i = str.lastIndexOf('\n'); if (i >= 0) { column = str.length() - i + 1; do { line += 1; i = str.lastIndexOf('\n', i - 1); } while (i >= 0); } else { column += str.length(); } try { writer.write(str); } catch (IOException ioe) { throw new RuntimeException(ioe); } } COM: <s> writes a string </s>
funcom_train/25986586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IRubyObject checkStringType() { IRubyObject str = TypeConverter.convertToTypeWithCheck(this, getRuntime().getString(), "to_str"); if(!str.isNil() && !(str instanceof RubyString)) { str = RubyString.newEmptyString(getRuntime()); } return str; } COM: <s> rb check string type </s>
funcom_train/17827961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getShellCommand() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < shellCommand.length; i++) { if (i > 0) { sb.append(','); } sb.append(shellCommand[i]); } return sb.toString(); } COM: <s> returns the current shell command string </s>
funcom_train/31161584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean resetTupleCentreInfo(TupleCentreId tid){ String stid=tid.toString(); Object tc=tupleCentreConnections.remove(stid); if (tc!=null){ TucsonProtocol info=(TucsonProtocol)tc; try { info.end(); } catch (Exception ex){ } return true; } return false; } COM: <s> reset information about an established connection </s>
funcom_train/25861788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocumentEntry createFileDocument(String name, InputStream inputStream, String contentType) throws ParseException, IOException, ServiceException { String[] parameters = new String[] {"convert=false"}; URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED,parameters); return (DocumentEntry) createFileEntry(url, name, inputStream, contentType); } COM: <s> uploads file of any type to server only works for premier accounts </s>
funcom_train/42445646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ActiveXComponent getNode(final String pPath) { try { ActiveXComponent lTreeManager = connection.getConnection().getPropertyAsComponent("treeManager"); return lTreeManager.invokeGetComponent("nodeByPath", new Variant(pPath)); } catch (ComFailException e) { // Doesn't exist return null; } } COM: <s> returns a node by path </s>
funcom_train/4461797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void exit() { tableManager.clear(); mainFrame.dispose(); // this "closes" this window; whether or not this // terminates the application depends on whether // other stuff is running. System.exit(0); // until we run this command. *then*, it's dead, all right. } COM: <s> clean up anything needing cleanup ing then kill this program with all </s>
funcom_train/3762161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getIndent(ReportObject reportObject) { Object object = reportObject.get(Report.INDENT); if (!(object instanceof Integer)) { return ""; } StringBuffer buf = new StringBuffer(); for (int i = 0; i < ((Integer)object).intValue(); i++) { buf.append(INDENT); } return buf.toString(); } COM: <s> get the indent for a code report object code </s>
funcom_train/11771983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu getJMenuExportAll() { if (jMenuExportAll == null) { jMenuExportAll = new JMenu(); jMenuExportAll.setFont(GuiFont.FONT_PLAIN); jMenuExportAll.add(getJMenuItemExportAllGpx()); jMenuExportAll.add(getJMenuItemExportAllTcx()); } return jMenuExportAll; } COM: <s> this method initializes j menu export all </s>
funcom_train/8636043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { HashMap hashMap = (HashMap) inheritableThreadLocal.get(); if (hashMap != null) { hashMap.clear(); // the InheritableThreadLocal.remove method was introduced in JDK 1.5 // Thus, invoking clear() on previous JDK's will fail inheritableThreadLocal.remove(); } } COM: <s> clear all entries in the mdc </s>
funcom_train/39060093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RenderedImage createImage() { BufferedImage image = new BufferedImage( getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB ); // Obtain graphics object associated with image object. Graphics2D g2 = (Graphics2D)image.getGraphics(); // Pass to private method for generating plot. doPage(g2); // With plot generated, ok to return image object. return image; } // End of method. COM: <s> returns a rendered image object representing the graph </s>
funcom_train/38217237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int consume(byte[] b, int offset, Packet p) { UDPHeader header = new UDPHeader(); header.setBeginIndex(offset); header.srcPort = PrimitiveConsumer.getInteger(b, offset); offset += 2; header.destPort = PrimitiveConsumer.getInteger(b, offset); offset += 2; header.length = PrimitiveConsumer.getInteger(b, offset); offset += 2; header.checksum = PrimitiveConsumer.getInteger(b, offset); offset += 2; header.setEndIndex(offset); p.getHeaderList().add(header); return offset; } COM: <s> implements the consumation of an udpheader in raw </s>
funcom_train/33798098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushAll(OSEvent ev) throws Exception{ for(Iterator i = allocTable.keySet().iterator(); i.hasNext();) { BufferCacheKey key = (BufferCacheKey)i.next(); // Allocate a fresh event for each block flush(key.block, new OSEvent(ev)); } //p.p("BufferCache.flushAll(): method finish"); } COM: <s> flush all entries in the buffer cache to disk </s>
funcom_train/12158790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int value() { if (elementStack.empty()) { throw new IllegalStateException( "Cannot get when not in an element"); } Value value = elementStack.peek().getValue(); if (value == null) { throw new IllegalStateException( "Must reset or increment before get"); } return value.get(); } COM: <s> return the current value of the counter </s>
funcom_train/16676902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTabs() { for (Entry<XTabItem, ILayoutPart> entry : mapTabToPart.entrySet( )) { ILayoutPart part = entry.getValue( ); XTabItem item = entry.getKey( ); String text = part.getName( ); if (text.equals(item.getText( ))) { item.setText(text); } } } COM: <s> updates the tab labels to reflect new part names </s>
funcom_train/24242659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUserExists(Integer userId) throws DBException { boolean isUserExists = false; UserDB user = new UserDB(conn); try { List l = user.getRecordBy("id", userId.toString()); // analysis exists ? isUserExists = (! l.isEmpty()); // fill record this.user_record = user.record; } finally { // close all user.release(); user = null; } return isUserExists; } COM: <s> check if the user exist by the id </s>
funcom_train/34536943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWhereParameter(String _parameter, String _fieldName, String _type) { if (this.paramWhere == null) this.paramWhere = new Vector<QueryParameterStructure>(); QueryParameterStructure aux = new QueryParameterStructure(_parameter, _fieldName, _type); paramWhere.addElement(aux); } COM: <s> adds a new parameter to the where section of the query </s>
funcom_train/8708332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue(ELContext context, Object base, Object property) { context.setPropertyResolved(false); int i = 0, len = this.elResolvers.size(); ELResolver elResolver; Object value; while (i < len) { elResolver = this.elResolvers.get(i); value = elResolver.getValue(context, base, property); if (context.isPropertyResolved()) { return value; } i++; } return null; } COM: <s> attempts to resolve the given code property code object on the given </s>
funcom_train/9994160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDatabase() throws AssertionFailedException { System.out.println("getDatabase"); Database expResult_1 = null; Database result_1 = Database.getDatabase(); assertEquals(expResult_1, result_1); fail("The test case is a prototype."); } COM: <s> test of test get database method of class database </s>
funcom_train/4831472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyMessage(final String newContent, final JButton button) { button.setEnabled(false); m_pool.execute(new Runnable() { @Override public void run() { DefaultMutableTreeNode node = (DefaultMutableTreeNode)m_tree.getSelectionPath().getLastPathComponent(); ForumCell cell = (ForumCell) node.getUserObject(); m_pipe.modifyMessage(cell.getId(),newContent,button); } }); } COM: <s> modifies a message and updates the forum accordingly </s>
funcom_train/8103202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void testGraphVizLinksOut() { System.out.println("GraphVizLinksOut"); Category instance = new Category(); String expResult = ""; String result = instance.GraphVizLinksOut(); 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 graph viz links out method of class wikipedia </s>
funcom_train/41254667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(final Card card, final int index) { if (card == null) { throw new IllegalArgumentException("Card to show can't be null"); } final String cardName = card.getDisplayName(); set(IconFactory.getCardIcon(card), cardName, cardName); // Set the action command to be this card's index within the hand, so that // the controller knows which card in the hand was clicked. setActionCommand(String.valueOf(index)); } COM: <s> sets this button to show the given card </s>
funcom_train/38950596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addIcon(String iconBase64, String modelID, String fileName) { // TODO Auto-generated method stub ESBServicesPortTypeProxy service = new ESBServicesPortTypeProxy(); try { service.addIconBASE64(iconBase64, modelID, fileName, "xml"); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } COM: <s> adds the icon </s>
funcom_train/42861315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateTree(long rowId, String name) { ContentValues values = new ContentValues(); values.put(KEY_TREE_NAME, name); return mDb.update(DATABASE_TABLE_TREES, values, KEY_ROWID + "=" + rowId, null) > 0; } COM: <s> update the tree using the details provided </s>
funcom_train/2675891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (closed) { // Already closed return; } closed = true; if (livePipe != null) { livePipe.unsubscribe((IProvider) this); } recordPipe.unsubscribe((IProvider) this); if (recording) { sendRecordStopNotify(); } sendPublishStopNotify(); // TODO: can we sent the client something to make sure he stops sending data? connMsgOut.unsubscribe(this); notifyBroadcastClose(); // deregister with jmx JMXAgent.unregisterMBean(oName); } COM: <s> closes stream unsubscribes provides sends stoppage notifications and broadcast close notification </s>
funcom_train/35867536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNotRemoteUser() throws ServletException, IOException { mockConfig.setupServletContext(basicContext); mockRequest.setSession(authenticatedSession); CASFilter filter = new CASFilter(); filter.init(mockConfig); filter.doFilter(mockRequest, mockResponse, filterChain); assertNull(( (HttpServletRequest) filterChain.getFilteredServletRequest()).getRemoteUser()); } COM: <s> test that the casfilter does not wrap the request </s>
funcom_train/5085461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showSizeOnDropFeedback(CreateRequest request) { Point p = new Point(request.getLocation().getCopy()); IFigure feedback = getSizeOnDropFeedback(request); feedback.translateToRelative(p); Dimension size = request.getSize().getCopy(); feedback.translateToRelative(size); feedback.setBounds(new Rectangle(p, size).expand(getCreationFeedbackOffset(request))); } COM: <s> places the feedback rectangle where the user indicated </s>
funcom_train/42520658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private State processGoalKick(Instant currentInstant) { Team outcomeTeam = getOutcomeTeam(currentInstant); State nextState = new State(outcomeTeam, State.X.AXIS, State.Y.DEFENCE, State.Pressure.FREE); nextState.setPlayer(nextState.getTeam().getGK()); return nextState; } COM: <s> process the current instant as a goal kick </s>
funcom_train/41226698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleRequest(HttpServletRequest request) throws ServletException { elements = new Hashtable(); Enumeration enum = request.getParameterNames(); while (enum.hasMoreElements()) { String key = enum.nextElement().toString(); elements.put(key, request.getParameter(key)); } } COM: <s> p mock parsing of the servlet input stream </s>
funcom_train/38331266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearArea() { outputArea.replaceRange("", 0, getOffset()); buffer = new StringBuilder(); printPrompt(); setFocus(); if (lastIncompleteCommand.length() > 0) { // delete the old promptEnd outputArea.replaceRange("", getOffsetWithoutPromptEnd(), getOffset()); outputArea.append(lastIncompleteCommand.toString().trim()); printNewLine(false); printPrompt(); } } COM: <s> clears the output area and sets a new prompt </s>
funcom_train/34233221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sysExit() { System.out .println("Stopping all current activities, dropping master & sending a LEAVE"); if(searching){ searching = false; } if (!masterIp.equals("")) { try { sTalkBuffer.add(masterIp, TCP_TALK_PORT, 0, "LEAVE", null); } catch (NumberFormatException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } masterIp = ""; fileBytes = null; } } COM: <s> executed by the leave button in the slave ui </s>