__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32056742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMouseMoved() { System.out.println("testMouseMoved"); int i = 1; boolean b = true; JGraph g = new JGraph( new DefaultGraphModel() ); Rule x = new Rule(i, b, g); MouseEvent e = new MouseEvent( new Button() , 1, 1, 1, 1, 1, 1, false ); x.mouseMoved(e); } COM: <s> test of mouse moved method of class rule </s>
funcom_train/31890155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEditable(boolean b) { required.setEnabled(b); optional.setEnabled(b); reqAdd.setEnabled(b); reqEdit.setEnabled(b); reqDelete.setEnabled(b); optAdd.setEnabled(b); optEdit.setEnabled(b); optDelete.setEnabled(b); } COM: <s> disables or enables the controls </s>
funcom_train/11308909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDateHeader(String header) { try { String value = getHeader(header); if (value != null) return DateUtil.parseDate(value); else return null; } catch (DateParseException e) { return null; // treat other invalid date formats, especially including the value "0", as in the past } } COM: <s> return the named http header as a java </s>
funcom_train/3363464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doAccessibleAction(int i) { if (i == 0 && isValid() == true) { URL u = (URL) getAccessibleActionObject(i); if (u != null) { HyperlinkEvent linkEvent = new HyperlinkEvent(JEditorPane.this, HyperlinkEvent.EventType.ACTIVATED, u); JEditorPane.this.fireHyperlinkUpdate(linkEvent); return true; } } return false; // link invalid or i != 0 } COM: <s> perform the specified action on the object </s>
funcom_train/17544508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLock(FileLock lock) throws IOException { if (lock == null) { throw new IOException("Lock is null."); //NO18N } else if (lock != getLock()){ throw new IOException("Invalid lock [" + lock + "]. Expected [" + getLock() + "]."); //NO18N } } COM: <s> testing the lock </s>
funcom_train/25451567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSimulator(SimulatorBean simulator) { if (this.simulator != null) this.simulator.getLogMessages().removeObservableListListener(this); this.simulator = simulator; this.messageStore = new AppendOnlyList(); updateList(); this.simulator.getLogMessages().addObservableListListener(this); } COM: <s> set the value of simulator </s>
funcom_train/38868408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testBadData() { String grpdata="?U E /U / /////////////////// ////"; sao.setGrpData(grpdata); Assert.assertEquals(1,sao.parseGrp()); } COM: <s> test parse grp for sao group 54 bad data error </s>
funcom_train/12160441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEnabledState() { if (actionable != null && !actionable.isDisposed()) { setEnabled(actionable.isEnabled(IWorkbenchActionConstants.DELETE)); return; } if (deleteAction != null) { setEnabled(deleteAction.isEnabled()); return; } setEnabled(false); } COM: <s> update the enabled state for this action based on the current </s>
funcom_train/27943731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove( String strFilter ) { int nSize = filter.size(); // Check for the string entry in the list for( int nCount = 0; nCount < nSize; nCount++ ) { if( ( ( java.lang.String ) filter.get( nCount ) ).compareTo( strFilter ) == 0 ) { filter.remove( nCount ); return true; } } return false; } COM: <s> remove a extension previously added to this </s>
funcom_train/5158882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFrontendGroupStyle() { if(umcParams.get(KEY_FRONTEND_GROUP_STYLE)==null || umcParams.get(KEY_FRONTEND_GROUP_STYLE).equals("")) return "coverflow"; return umcParams.get(KEY_FRONTEND_GROUP_STYLE).getValue(); } COM: <s> returs the style to be used for the group sides </s>
funcom_train/15628602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(final String str) { if (!firstWord) { if (thisLineLength + str.length() + 1 > maxLineLength) { sb.append(",\n"); thisLineLength = 0; } else { sb.append(", "); thisLineLength += 2; } } sb.append(str); thisLineLength += str.length(); firstWord = false; } COM: <s> append a word </s>
funcom_train/48898749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void establishListeningSocket() { ssListen=null; try { ssListen=new ServerSocket(portListen); } catch (IOException ioe) { getLogger().severe("Unable to establish listening socket: "+ioe.getMessage()); System.exit(0); } } //establishListeningSocket COM: <s> sets up the listening socket for new incoming connections </s>
funcom_train/12800736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkEp (int s, int e, int v) { fillSeasonList(s); if (seasonList.get(s).size() <= e) { return false; } else { if (downloadHigherVersion) { return seasonList.get(s).get(e) >= v; } else { return seasonList.get(s).get(e) == 1; } } } COM: <s> checks whether an episode was already downloaded </s>
funcom_train/46759568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mergeRedirects(final IContainer mainContainer, final ServiceCall call) throws Exception { if (mainContainer.getRedirectPanelId() > 0L) { // get panel tree IContainer childPanel = getApplicationPanel(mainContainer.getRedirectPanelId(), call); addRedirectTree(childPanel, call); mainContainer.getChildContainers().add(childPanel); } for (IContainer childContainer : mainContainer.getChildContainers()) { mergeRedirects(childContainer, call); } } COM: <s> merge the redirected link panel trees </s>
funcom_train/19844427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSettings(HieroSettings settings) { paddingTop = settings.getPaddingTop(); paddingLeft = settings.getPaddingLeft(); paddingBottom = settings.getPaddingBottom(); paddingRight = settings.getPaddingRight(); paddingAdvanceX = settings.getPaddingAdvanceX(); paddingAdvanceY = settings.getPaddingAdvanceY(); glyphPageWidth = settings.getGlyphPageWidth(); glyphPageHeight = settings.getGlyphPageHeight(); effects.addAll(settings.getEffects()); } COM: <s> load the hiero setting and configure the unicode fonts rendering </s>
funcom_train/139111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFileTypeHandler(FileTypeHandler fileTypeHandler) { String[] extensions = fileTypeHandler.getExtensions(); for (String extension : extensions) { if (fileTypeHandlerMap.get(extension) != null) { Logger.getLogger(ServerUtils.class.getName()).log(Level.SEVERE, "duplicate SymLoaderFactory for extension {0}!!!", new Object[]{extension}); } fileTypeHandlerMap.put(extension, fileTypeHandler); } } COM: <s> add a new file type handler for a list of extensions </s>
funcom_train/8691839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Map addToNameMap(Map map, String name, Rule rule) { if (map == null) { map = new HashMap(); } RuleSet ruleSet = (RuleSet) map.get(name); if (ruleSet == null) { ruleSet = new RuleSet(); map.put(name, ruleSet); } ruleSet.addRule(rule); return map; } COM: <s> adds the rule to a rule set for the given name </s>
funcom_train/223174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVMStatLines(String result) { String line[] = result.split("\n"); for (int i = 0; i < line.length; i++) { if (!line[i].equals("")) { sysLoadInfo.put("vmstat."+i, line[i]); } } } COM: <s> sets each line the string result </s>
funcom_train/21454001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnSize(){ TableColumn column = null; for (int i = 0; i < 8; i++) { column = shiftTable.getColumnModel().getColumn(i); if (i == 0) { column.setPreferredWidth(300); column.setMinWidth(100); } else { column.setPreferredWidth(300); column.setMinWidth(100); } } } COM: <s> set the column width of the all the columns in the jtable </s>
funcom_train/13938507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultTool(int defaultToolIndx, int toolMode){ if(toolMode < 0 || toolMode >= MENUET_TOTAL_MODES){ // invalid toolMode System.out.println("Menuet(setDefaultTool): invalid tool mode specified.. "); return; } if(defaultToolIndx < 0 || defaultToolIndx >= menuetElements[toolMode].size()){ // invalid tool index System.out.println("Menuet(setDefaultTool): invalid tool default Index!.. "); return; } defaultTool[toolMode] = defaultToolIndx; } COM: <s> set the default tool to select when the meneuts mode is </s>
funcom_train/3391078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream resolveclasspath(String classname){ if(classpath.indexOf(File.pathSeparator) != -1){ StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator); //separates path. while(st.hasMoreTokens()){ String path = (st.nextToken()).trim(); InputStream in = resolveclasspathhelper(path, classname); if(in != null) return in; } return null; } else return (resolveclasspathhelper(classpath, classname)); } COM: <s> resolves file name for classfile to disassemble </s>
funcom_train/22354747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortingStatus(int column, int status) { Directive directive = getDirective(column); if (directive != TableSorter.EMPTY_DIRECTIVE) { sortingColumns.remove(directive); } if (status != TableSorter.NOT_SORTED) { sortingColumns.add(new Directive(column, status)); } sortingStatusChanged(); } COM: <s> changes the sorting status of a column </s>
funcom_train/37570836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEFSP(EFSP efsp) throws ModelException { try { Integer id = ((IntegerIdImpl)(efsp.getId())).integerValue(); EJBEFSP ejbefsp = m_EFSPHome.findByPrimaryKey(id); ejbefsp.fromVO(efsp); } catch (Exception exception) { throw new ModelException("The EJBEFSPFacadeBean did not find an EFSP entity for " + efsp + "."); } } COM: <s> update an efsp ejb setting its values to those of efsp </s>
funcom_train/8093533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getMaxBorder(int attrIndex) throws Exception { if(!attribute(attrIndex).isNumeric()) throw new Exception("Exception.getMaxBorder : not numeric attribute !"); if(numInstances() == 0) throw new Exception("Exception.getMaxBorder : empty Exemplar !"); return m_MaxBorder[attrIndex]; } COM: <s> returns the value of the sup border of the hyperrectangle </s>
funcom_train/38567915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttributeValue(NamedNodeMap attributes, String attributeName){ Node current; if(attributes != null){ for(int i = 0; i < attributes.getLength(); i++){ current = attributes.item(i); if(attributeName.equals(current.getNodeName())){ return current.getNodeValue(); } } } return null; } COM: <s> retrives a value of an attribute </s>
funcom_train/25315663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Mode createMode(int modeType, Placement placement, int modeID) { Mode mode; switch (modeType) { case 0: mode = new CrawlerMode(this.melody, placement); mode.setModeID(modeID); break; case 1: mode = new CannonMode(this.melody, placement); mode.setModeID(modeID); break; default: mode = null; } return mode; } COM: <s> creates a mode by the given mode type </s>
funcom_train/41280980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String computeETag() { String etag_s = null; if (fresource != null) { long lstamp = fresource.getFileStamp(); if ( lstamp >= 0L ) { StringBuffer sb = new StringBuffer(32); sb.append(Integer.toString(getOid(), 32)); sb.append(':'); sb.append(Long.toString(lstamp, 32)); etag_s = sb.toString(); } } return etag_s; } COM: <s> compute the etag string </s>
funcom_train/43365216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkTooltip(){ String message; switch(lockType){ case ObjectInfo.OPERATION_LOCK: // lock made by an operation just for the operation, released when complete. message = "Object is locked for an operation by "+lockerName+"."; break; case ObjectInfo.PERSISTENT_LOCK: // lock made by a user for purposes of private editting of a tree. message = "Object is locked out for use by "+lockerName+"."; break; default: //no lock message = ""; } tooltip.setLockingStatus(message); } COM: <s> check the current state and update the tooltip </s>
funcom_train/5420708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXlint(final String value) { if (!"ignore".equals(value) && !"warning".equals(value) && !"error".equals(value)) { throw new IllegalArgumentException('"' + value + "\" is not one of \"ignore\", \"warning\" or \"error\""); } this.Xlint = value; super.setXlint(value); } COM: <s> sets the value for the xlint option </s>
funcom_train/25123455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("InfuturSOAP".equals(portName)) { setInfuturSOAPEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/37148847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskGraphNode getTaskGraphNodeByID(int id) { TaskGraphNode res = null; Iterator it = myTaskGraph.iterator(); while (it.hasNext()) { TaskGraphNode tgn = (TaskGraphNode) it.next(); if (tgn.getID() == id) { res = tgn; break; } } return res; } COM: <s> returns the code task graph node code corresponding to the given task </s>
funcom_train/21377854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextureCoord(E3DVector2F[] textureCoord) { vertices[0].setTextureCoord(textureCoord[0]); vertices[1].setTextureCoord(textureCoord[1]); vertices[2].setTextureCoord(textureCoord[2]); vertices[3].setTextureCoord(textureCoord[3]); } COM: <s> set the texture coordinates of the quad </s>
funcom_train/1606798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchActivePlayer() { playerList.add(playerList.pollFirst()); GameBoardUI.getInstance().changeDiceColor(getCurrentPlayer().getPlayerColor()); GameBoardUI.getInstance().displayStatusMessage("@Spieler " + playerList.peekFirst().getPlayerName() + " : Sie sind an der Reihe"); } COM: <s> puts the currently active </s>
funcom_train/12786907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPipedOutputStreamExample1Separating() throws SafeException, Exception { TypestateRegressionUnit test = new TypestateRegressionUnit("j2se.typestate.output_stream.PipedOutputStreamExample1", 4); test.selectTypestateRule("PipedOutputStream"); test.selectSeparatingTypestateSolver(); SafeRegressionDriver.run(test); } COM: <s> warning always connect a piped output stream when using default </s>
funcom_train/9543021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecentFilesMenu() { recentfiles.removeAll(); ExecutableMenuItem recent; for (int i = 0; i < recentFiles.getSize(); i++) { String name = recentFiles.getFile(i); recent = new ExecutableMenuItem(name, true) { private static final long serialVersionUID = 3752961868431292451L; @Override public void execute() { recentFiles.setRecentFile(getRealName()); setRecentFilesMenu(); app.promptOpen(new File(getRealName())); } }; recentfiles.add(recent); } this.revalidate(); this.repaint(); } COM: <s> sets the code jmenu code of the recent files </s>
funcom_train/32057996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSelectionModel(GraphSelectionModel graphselectionmodel) { cancelEditing(graph); if (graphSelectionListener != null && graphSelectionModel != null) { graphSelectionModel .removeGraphSelectionListener(graphSelectionListener); } graphSelectionModel = graphselectionmodel; if (graphSelectionModel != null && graphSelectionListener != null) { graphSelectionModel .addGraphSelectionListener(graphSelectionListener); } if (graph != null) { graph.repaint(); } } COM: <s> sets the selectionmodel for the graph </s>
funcom_train/23362243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { final MainWindow elinf = MainWindowSingelton.getInstance(); String event = e.getActionCommand(); if ("load".equals(event)) { loaded = true; elinf.setEnable(false); path = graphInstance.getPathway(); SingleElementLoader sel = new SingleElementLoader(this, path, p, table); sel.execute(); } else if ("loadInformation".equals(event)) { InformationUpdate iu = new InformationUpdate(this, p, selectedObject); iu.execute(); } } COM: <s> load chosen elements remove them from the table </s>
funcom_train/20138827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(final PApplet theApplet) { theApplet.pushStyle(); theApplet.pushMatrix(); theApplet.translate(position.x, position.y); _myDisplay.display(theApplet, this); theApplet.popMatrix(); theApplet.popStyle(); // theApplet.pushMatrix(); // _myDebugDisplay.display(theApplet, this); // theApplet.popMatrix(); } COM: <s> the default draw function for each controller extending superclass </s>
funcom_train/20250355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearVisualItemValueCache(Slot slot) { assert slot != null; LightweightList<Slot> dependentSlots = slotMappingConfiguration .getDependentSlots(slot); for (DefaultVisualItem visualItem : fullVisualItemContainer .getDefaultVisualItems()) { visualItem.clearValueCache(slot); for (Slot dependentSlot : dependentSlots) { visualItem.clearValueCache(dependentSlot); } } } COM: <s> clears the cached </s>
funcom_train/17416134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showItemImage() { this.image = this.item.getThumbImage(); if (this.image != null) { this.labelFileName.setText(getShortFileName(item.getFile())); this.imagePanel1.setImage(image); this.repaint(); } } COM: <s> in image mode loads the image and shows it </s>
funcom_train/28346133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeOpticsRef( final DataAdaptor parentAdaptor ) { DataAdaptor adaptor = parentAdaptor.createChild( OPTICS_TAG ); adaptor.setValue( OPTICS_NAME_KEY, OPTICS_NAME ); String opticsUrlSpec = opticsUrlSpec(); adaptor.setValue( OPTICS_URL_KEY, opticsUrlSpec ); } COM: <s> write the optics reference </s>
funcom_train/25788221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationInfo getApplicationInfo(Request request, Response response) { final ApplicationInfo applicationInfo = new ApplicationInfo(); applicationInfo.getResources().setBaseRef( request.getResourceRef().getBaseRef()); applicationInfo.getResources().setResources( getResourceInfos(getFirstRouter(getInboundRoot()), request, response)); return applicationInfo; } COM: <s> returns a wadl description of the current application </s>
funcom_train/1131439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean toStream(OutputStream os) { XMLEncoder encode = new XMLEncoder(os); encode.setExceptionListener(silence); // set delegates for this class and all sensors encode.setPersistenceDelegate(RobotConfig.class, CONFIG_DEL); encode.setPersistenceDelegate(Sensor.class, Sensor.SENSOR_DEL); for (Class<Sensor> type : Sensor.SENSOR_TYPES) encode.setPersistenceDelegate(type, Sensor.SENSOR_DEL); // set up objects try { encode.writeObject(this); encode.close(); return true; } catch (Throwable t) { return false; } } COM: <s> writes the xml encoded robot configuration to the given stream </s>
funcom_train/49159159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int collumnNr) { switch (collumnNr) { case COLUMN_DAY: return ClientController.getInstance().getTranslation("tmScheduler.day"); case COLUMN_EVENT: return ClientController.getInstance().getTranslation("tmScheduler.event"); default: return null; } } COM: <s> returns column names </s>
funcom_train/51720810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dbgwri(I_stack_elt module, String txt, boolean isrcv) { if (module.isdebug()) { String dir = "DOWN"; if (!(isrcv ^ module.isfrommedia())) { dir = "UP"; } TDeb.wri("|" + module.toString() + "|" + dir + "|" + txt); } } COM: <s> report for stacks logs </s>
funcom_train/44706677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSubmitButtons(Container c) { m_security = new WorkflowLockedContainer(m_itemModel); c.add(m_security); //this label is needed since boxpanel will not render itself if //nothing inside it is visible. Minor kludge, hence this comment. c.add(new Label("")); super.addSubmitButtons(m_security); } COM: <s> wraps submit buttons in workflow locked container </s>
funcom_train/44011373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCreditCardNum() { System.out.println("getCreditCardNum"); MembershipBO instance = null; String expResult = ""; String result = instance.getCreditCardNum(); 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 get credit card num method of class edu </s>
funcom_train/14627181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPorts(){ Combo combo = m_mainWindow.getComboPort(); combo.removeAll(); for (String port : m_soapLogic.getPorts()) combo.add(port); if(combo.getItemCount()>0) { combo.select(0); combo.setEnabled(true); } } COM: <s> sets all available ports in the combo box in the gui </s>
funcom_train/2731448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Term visit(VariableTerm variable) { logger.debug("<VariableTerm>"); Term newTerm = getSubstitute(variable); logger.debug("<Before>" + printer.visit(variable) + "</Before>"); logger.debug("<After>" + printer.visit(newTerm) + "</After>"); logger.debug("</VariableTerm>"); return newTerm; } COM: <s> makes substitutions on a free variable term </s>
funcom_train/1237858
/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 == this) { return true; } if (!(obj instanceof QName)) { return false; } if ((namespaceURI == ((QName) obj).namespaceURI) && (localPart == ((QName) obj).localPart)) { return true; } return false; } COM: <s> tests this qname for equality with another object </s>
funcom_train/37508250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTextHeight() { if (m_textHeight == null) { m_textHeight = new JTextField(); m_textHeight.setPreferredSize(new Dimension(50, m_textHeight.getPreferredSize().height)); m_textHeight.setEnabled(false); m_textHeight.setEditable(false); } return m_textHeight; } COM: <s> returns the textfield for the height </s>
funcom_train/25969752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUoms() throws Exception { // Get the data set from database directly ITable actualTable = getTable("Uom"); // Gets the list using hibernate List list = daoFactory.getLookupDAO().getUomList(); // Size is compared assertTrue("UOM count does not match with the database", list != null && list.size() == actualTable.getRowCount()); } COM: <s> test get uoms </s>
funcom_train/41070934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthorLabelFontStyle(FontStyles authorLabelFontStyle) throws java.beans.PropertyVetoException { FontStyles oldAuthorLabelFontStyle = this.authorLabelFontStyle; vetoableChangeSupport.fireVetoableChange(PROP_AUTHORLABELFONTSTYLE, oldAuthorLabelFontStyle, authorLabelFontStyle); this.authorLabelFontStyle = authorLabelFontStyle; propertyChangeSupport.firePropertyChange(PROP_AUTHORLABELFONTSTYLE, oldAuthorLabelFontStyle, authorLabelFontStyle); } COM: <s> set the value of author label font style </s>
funcom_train/44106084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String handleRequest(ControllerContext ctx) throws Exception { String title = ctx.getRequest().getParameter("title"); String photographer = ctx.getRequest().getParameter("photographer"); String persons = ctx.getRequest().getParameter("persons"); boolean display_next = ctx.getRequest().getParameter("next") != null; saveInformation(ctx, title, photographer, persons); if (display_next) ctx.getPhotos().nextPhoto(); return getController("display-photo").handleRequest(ctx); } COM: <s> speichert meta daten </s>
funcom_train/43394889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getQuotaSpace(String userID) { // a "readQuotaSpace(userID);" // is temporally here // (this way the quota size // refreshes) until the proper // portlet not imported // from the supergrid readQuotaSpace(userID); // return quotaBytes*(1024*1024); } COM: <s> getting the maximum quota for the storage space </s>
funcom_train/3444345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractReader create(String name, Table table) { AbstractReader ret = null; for (Iterator iter = iterator(); iter.hasNext(); ) { Creator c = (Creator)iter.next(); ret = c.create(name, table); if (ret != null) break; } return ret; } COM: <s> returns an code abstract reader code able to read the specified </s>
funcom_train/39363617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetValueObject() { Date input = new Date(42); tested.setValue(input); Object actual = tested.getValue(); ObjectAssert.assertInstanceOf(java.sql.Date.class, actual); java.sql.Date actualDate = (java.sql.Date) actual; java.sql.Date expectedDate = new java.sql.Date(42); assertEquals(expectedDate, actualDate); } COM: <s> test conversion date to date </s>
funcom_train/36999805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(int id) { int index = (id & 0x7FFFFFFF) % globalRef.length; for (Entry e = globalRef[index]; e != null; e = e.next) { if(e.id == id) return e.value; } throw new NullPointerException("cannot manipulate the object #"+id+" which has already been destroyed by PHP"); } COM: <s> get the object associated with the ref id </s>
funcom_train/49441586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAnExitToken(final String/* ! */command) { assert command != null; boolean exit = false; final StringTokenizer pharseTokens = new StringTokenizer(this.tokens); while (pharseTokens.hasMoreElements() && !exit) { if (command.compareToIgnoreCase(pharseTokens.nextToken()) == 0) { exit = true; } } return exit; } COM: <s> analyze the current command to see if the application has to finish </s>
funcom_train/43098773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object findNamespaceForEvent(Object trans, Object model) { Object enclosing = getStateMachine(trans); while ((!Model.getFacade().isAPackage(enclosing)) && (enclosing != null)) { enclosing = Model.getFacade().getNamespace(enclosing); } if (enclosing == null) { enclosing = model; } return enclosing; } COM: <s> find the correct namespace for an event </s>
funcom_train/3402406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add (String key, String value) { String k = normalize(key); List<String> l = map.get(k); if (l == null) { l = new LinkedList<String>(); map.put(k,l); } l.add (value); } COM: <s> adds the given value to the list of headers </s>
funcom_train/28366099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public PatternGenerator makeEndsWithGenerator() { return new PatternGenerator() { /** * Compile a pattern based on the specified text and flags * @param text the text from which to build the pattern * @param flags the pattern flags used to compile the filter * @return the compiled pattern */ public Pattern compilePattern(String text, int flags) { return Pattern.compile(".*" + text, flags); } }; } COM: <s> constructs a pattern generator which checks whether the tested text ends with the </s>
funcom_train/18747831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInjection(Set<? extends Node> injection) { assert injection.size() == 2 : String.format("Injection %s should have size 2", injection); if (injections == null) { injections = new HashSet<Set<? extends Node>>(); } injections.add(injection); } COM: <s> adds an injection constraint i </s>
funcom_train/47751989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FrameTreeNode mergeChild(FrameTreeNode node) { FrameTreeNode child = findChild(node.getFrame().getName()); if(child == null) { attachChild(node); return node; } else { FrameTree.mergeFrameTrees(node, child); return child; } } COM: <s> merge a child </s>
funcom_train/3591135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataHandler createDataHandler() { try { return new DataHandler(new FileDataSource(getZipscormLoc())); } catch (Exception e) { Logger.getLogger(SamgiConstantsG.LOGGER).error("Error creating the datahandler for the BIS lesson with lesson code " + getLessonCode(), e); SamgiUtilG.getInstance().getErrorHistory().add(e); return null; } } COM: <s> create the datahandler for the bis scorm package </s>
funcom_train/48668556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyHighlight(StyledDocument doc, int start, int length) { // First set a default style for whole document doc.setCharacterAttributes(start, length, getDefaultStyle(), true); // Parse range looking for tokens to highlight LinkedList<ParsedToken> pts = parse(doc, start, length); // Now set colors for found tokens AttributeSet[] styles = getStyles(); for (ParsedToken pt : pts) { doc.setCharacterAttributes(pt.start, pt.length, styles[pt.type], false); } } COM: <s> removes existing highlight parses text looking for tokens and </s>
funcom_train/32733641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean returnUnits(int units) { if ((units > 0) && (units + availUnits <= maxUnits) && isOn() && !isFailed()) { int oldUnits = availUnits; availUnits += units; firePropertyChange(this.availUnitsPropertyName, oldUnits, availUnits); return true; } else { return false; } } COM: <s> carries out the actions to return a specific number of units </s>
funcom_train/34451434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMetaObjectPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MClass_metaObject_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_MClass_metaObject_feature", "_UI_MClass_type"), M3ActionsPackage.Literals.MCLASS__META_OBJECT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the meta object feature </s>
funcom_train/39106307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getAllTests(TestTreeNode node) { ArrayList result = new ArrayList(node.getChildCount()); for (Enumeration e = node.depthFirstEnumeration() ; e.hasMoreElements() ;) { node = (TestTreeNode)e.nextElement(); if (node.getUserObject() instanceof TestSpecification) result.add(node.getUserObject()); } java.util.Collections.sort(result); return result; } COM: <s> this method returns all the tests starting at the node parameter </s>
funcom_train/19312597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isOuterEdge(final FoContext context, final FObj fobj) { final RelativeCompass direction = this.getRelativeCompass(context, fobj); switch (direction) { case BEFORE: case START: { return context.isFirst(); } case AFTER: case END: { return context.isLast(); } default: { throw new NullPointerException("RelativeCompass cannot be null"); } } } COM: <s> indicates whether the context is on the outer edge of its parent </s>
funcom_train/10626904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIgnoreAllBeanInfo() throws IntrospectionException { BeanInfo info = Introspector.getBeanInfo(ChildBean.class, Introspector.IGNORE_ALL_BEANINFO); PropertyDescriptor[] pds = info.getPropertyDescriptors(); assertEquals(2, pds.length); assertEquals("class", pds[0].getName()); assertEquals("text", pds[1].getName()); } COM: <s> the test checks the get property descriptors method for ignore all beaninfo </s>
funcom_train/22189925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProjectType () { Button [] btns = { m_btnFullPolicyProject, m_btnExistingPolicyProject, m_btnModulePolicyProject }; for (int i = 0; i < btns.length; i++) if (btns[i].getSelection()) { Integer nType = (Integer) btns[i].getData(); return (nType.intValue()); } return (0); } COM: <s> get the type of project one of </s>
funcom_train/3764014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test() { try { Spider spider = new Spider(UtilExtract.getUri( "http://www.google.ie/search?hl=en&lr=&q=www.cnn.com&btnG=Search"), 40); spider.start(); } catch (Throwable e) { e.printStackTrace(System.out); fail(); } } COM: <s> test the spider </s>
funcom_train/8907801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (continuing) { try { synchronized(ACCESS_LOG_LOCK) { if (accessWriter != null) accessWriter.flush(); } } catch (Exception e) { /* Ignore */ } try { Thread.currentThread().sleep(60000); } catch (Exception e) { /* Ignore */ } } } COM: <s> the run implementation for the flusher thread </s>
funcom_train/46793626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractHttpBody(MessageContext mc) { ControlManager.getInstance().writeIntoLog("[TransportRequestHandler] extractHttpBody() method called"); String packet = mc.getRequestMessage().getHttpPacket(); int endHeader = packet.indexOf("\r\n\r\n"); if (endHeader > 0) { //return body return packet.substring(endHeader + 4, packet.length()); } else { //error return "Error: HTTP body not present"; } } COM: <s> extracts http body from http packet </s>
funcom_train/41876013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStrings() { PatchVersionComparator c = new PatchVersionComparator(); assertSame("foo", c.determineBestVersion("foo", "bar")); c = new PatchVersionComparator(); assertSame("foo", c.determineBestVersion("foo", "foo")); } COM: <s> test major minor patch works with just strings </s>
funcom_train/31156718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Town findNearestTown(Position position) { Town town = null; double d = Double.MAX_VALUE; Iterator it = towns.iterator(); while (it.hasNext()) { Town t = (Town)it.next(); double current = Distance.getDistance(position, t.getPosition(), Distance.DISTANCE_KM); if (current < d) { d = current; town = t; } } return town; } COM: <s> find the nearest town from a position </s>
funcom_train/48153098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(double r){ //Correct for invalid parameter: if(r < 0) r = 1; parameter = r; //Sets the truncated set of values double a = Math.ceil(getMean() - 4 * getSD()), b = Math.ceil(getMean() + 4 * getSD()); if (a < 0) a = 0; setDomain(a, b, 1, DISCRETE); } COM: <s> this method sets the parameter and creates the domain of the distribution </s>
funcom_train/18003558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBrowserVisibility(final boolean isVisible) { MozillaExecutor.mozAsyncExec(new Runnable() { @Override public void run() { ChromeAdapter chromeAdapter = getChromeAdapter(); if (chromeAdapter != null) { nsIBaseWindow baseWindow = XPCOMUtils.qi(chromeAdapter.getWebBrowser(), nsIBaseWindow.class); baseWindow.setVisibility(isVisible); } } }); } COM: <s> set inner mozilla browser visibility </s>
funcom_train/31977174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int LOADLANG(CommandEvent event, String filename,String uselocale) throws Exception{ Locale locale = event.instance.req.getLocale(); ResourceBundle rb = ResourceBundle.getBundle(filename,locale); Enumeration enum = rb.getKeys(); Hashtable nv2 = new Hashtable(); while(enum.hasMoreElements()){ String key = (String) enum.nextElement(); String val = rb.getString(key); nv2.put(key,val); } if (uselocale.equals("1")){ locale = rb.getLocale(); if (!locale.toString().equals("")){ event.instance.res.setLocale(locale); } } event.instance.nv.put("LANG",nv2); return 1; } COM: <s> loads a language specific file into the nvbundle </s>
funcom_train/33442250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doArthOperation(String methodName) { loadEnv(); mv .visitMethodInsn( INVOKEVIRTUAL, "com/googlecode/aviator/runtime/type/AviatorObject", methodName, "(Lcom/googlecode/aviator/runtime/type/AviatorObject;Ljava/util/Map;)Lcom/googlecode/aviator/runtime/type/AviatorObject;"); popOperand(); popOperand(); } COM: <s> do arithmetic operation </s>
funcom_train/18518471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getId() { StringBuffer idStr = new StringBuffer(GUIDGenerator.generateGUID(getInstance()).toUpperCase()); for (int i = idStr.length() - 4; i > 0; i -= 4) { idStr.insert(i, '.'); } return idStr.toString(); } COM: <s> generates the ocurrence id </s>
funcom_train/35036056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateInfo() { // Get the latest at the time of method executiom final String latestInfo; if (infoModel != null && !infoModel.isEmpty()) latestInfo = infoModel.getFirst(); else latestInfo = "jNZB Version " + JNZB.VERSION; Runnable r = new Runnable() { public void run() { infoField.setText(latestInfo); infoField.setToolTipText(latestInfo); } }; SwingUtilities.invokeLater(r); } COM: <s> update the info display with the latest value in the model </s>
funcom_train/2882742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { if (parent != null) { Object obj = parent.sfAttributeKeyFor(this); if (obj != null) { try { parent.sfRemoveAttribute(obj); } catch (SmartFrogRuntimeException e) { // ignore, we just want to know it is not there } } } setState(DELETED); parent = null; } COM: <s> detaches itself from the parent and sets state to deleted </s>
funcom_train/27762685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasOverridingChildren() { final Iterator iter = children.iterator(); while (iter.hasNext()) { final InheritanceContainer current = (InheritanceContainer) iter.next(); if (!current.isValueInherited() || current.hasOverridingChildren()) { return true; } } return false; } COM: <s> returns whether another container that inherits from this container </s>
funcom_train/17901011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertAfter() { if (focusTable == columnDataTable.getTable()) columnDataTable.insertAfter(); else if (focusTable == conPanel.getTable()) { conPanel.insertRowAfter(); conPanel.setCellEditor(2, new ComboBoxCellEditor( columnDataTable.getTableColumnData())); } } COM: <s> p inserts a row after the selection </s>
funcom_train/5420059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void seleccionarArchivo() { FileDialog dialog = new FileDialog(this,"Select the script file",FileDialog.LOAD); dialog.show(); String file = dialog.getFile(); if(file != null) script.setText( dialog.getDirectory() + file); } COM: <s> select the script file from a open dialog </s>
funcom_train/48104576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FacebookMethod fql_query(String query) { HashMap<String, String> parameters = new HashMap<String, String>(); parameters.put("query", query); return getMethodFactory().create("facebook.fql.query", parameters, true); } COM: <s> create a method to query with the facebook query language </s>
funcom_train/39163755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancelAction() throws GateException{ //if we added a new utterance but user does not want it any more... if (utteranceAdded) { currentSet.remove(utterance); //delete it utteranceAdded = false; } //also cleanup the temporary annotation sets used by the viewer //to cache the added and deleted tree annotations STreeNode.undo(document); } //cancelAction() COM: <s> called by the gui when the user has pressed the cancel button </s>
funcom_train/43391351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void errorLog(String txt) { try { FileWriter tmp = new FileWriter(OutputDir + "/stderr.log", true); BufferedWriter out = new BufferedWriter(tmp); out.newLine(); out.write(txt); out.close(); } catch (Exception e) { e.printStackTrace(); } } COM: <s> creates a log entry in the file stderr </s>
funcom_train/45076722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Trait getTrait(String name) { Vector<Trait> traits = taggedProfileTable.get(currentId); if (traits == null) { return null; } else { for (int i = 0; i < traits.size(); i++) { Trait t = traits.elementAt(i); if (t.getName().equals(name)) { return t; } } return null; } } COM: <s> get trait from taggedprofile for current id </s>
funcom_train/47302786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateName(int number) { if (number == 0) { return new String(parent.getName() + "_idx"); //$NON-NLS-1$ } else { return new String(parent.getName() + "_idx" + Integer.toString(number)); //$NON-NLS-1$ } } COM: <s> this will generate an index name if the format tablename idx </s>
funcom_train/50153358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadLog(int taskid) throws Exception { TableSorter tslog = (TableSorter) logtable.getModel(); // clear rows tslog.setRowCount(0); // add log entries Collection<Tasklog> logs = TaskModel.getReference().getLogs(taskid); for (Tasklog log : logs) { Object o[] = { log.getLogTime(), log.getDescription() }; tslog.addRow(o); } } COM: <s> load the tasklog table for a given task </s>
funcom_train/26525564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DreamComponent childWithName(String name) { DreamComponent tmp = null; for(int childNo = 0; childNo < this.getChildCount(); childNo++ ) { tmp = (DreamComponent)this.getChildAt(childNo); if( tmp.getIdentifier().equals(name) ) { return tmp; } } return null; } COM: <s> returns a component with the given name identifier if any exists </s>
funcom_train/25440543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendTrigger(StringBuilder stringBuilder) throws IOException { for (DbTable dbTable : ApplicationUtil.getProjectData().getDataBase().getDbTables()) { stringBuilder.append(ddlGeneratorInterface.getSqlTable(dbTable.getName(), false, false, false, false, false, true, false, false, false, ddlIncludeStorageParameter)); } } COM: <s> scrive il file dei trigger </s>
funcom_train/33282380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jsxFunction_setStartBefore(final Node refNode) { if (refNode == null) { throw Context.reportRuntimeError("It is illegal to call Range.setStartBefore() with a null node."); } startContainer_ = refNode.getParent(); startOffset_ = getPositionInContainer(refNode); } COM: <s> sets the start of the range to be before the node </s>
funcom_train/4521183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Parametro entity) { LogUtil.log("saving Parametro instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved parametro entity </s>
funcom_train/44157094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void out(int level, String message, Throwable throwable) { String prefix = getPrefix(level); String suffix = getSuffix(level); String text = getText(level); String msg = getMessage(message); // Checkstyle: Using System.out is ok here // because we are implementing a logger! stream.println(prefix + text + msg + suffix); if (throwable != null) { stream.print(prefix); stream.print(getMessage(ExceptionUtils.getFullStackTrace(throwable))); stream.print(suffix); stream.flush(); } } COM: <s> output a message with the correct formatting for the level </s>
funcom_train/44221592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTargetWizardBaseClass(String viewType) { ViewStateMachine vsm = this.get_plugin().get_vsm(); kmrgObjectHash views = vsm.get_top().Views; ViewDefinition vd = (ViewDefinition) views.readFromCollection(viewType); String baseClass = vd.get_primaryPrimitive().getWizardControl().get_baseClass(); return baseClass; } COM: <s> p get the base class name for the target wizard class </s>
funcom_train/25365916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNpcGivenbyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Quest_npcGivenby_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Quest_npcGivenby_feature", "_UI_Quest_type"), LeveleditorPackage.Literals.QUEST__NPC_GIVENBY, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the npc givenby feature </s>