__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13814396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseDateRange() { Calendar cal = Calendar.getInstance(); checkParsingBoundaries( "2.3.2005 - 13.4.2005", createDate( 2005, 2, 2, 0, 0, 0), createDate( 2005, 3, 13, 23, 59, 59 ) ); } COM: <s> test tar date ranges are parsed correctly </s>
funcom_train/11021968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FreemarkerRenderer build() { AttributeValueFreemarkerServlet servlet = new AttributeValueFreemarkerServlet(); try { servlet.init(new InitParamsServletConfig(params, applicationContext)); return new FreemarkerRenderer(servlet); } catch (ServletException e) { throw new FreemarkerRequestException( "Cannot initialize internal servlet", e); } } COM: <s> creates a new </s>
funcom_train/17893212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void filterTestMethod(Method m, Map<String, Method> checkMethods) { String name = m.getName(); Matcher match = ACCESSOR_PATTERN.matcher(name); if(!match.matches()) { return; } String propertyName = match.group(2); if(hasModifier(propertyName, m.getReturnType())) { Method checker = findTestMethod(propertyName); if(checker != null) { String propertyNameCC = toCamelCase(propertyName); checkMethods.put(propertyNameCC, checker); } } } COM: <s> if this method is an accessor method i </s>
funcom_train/12806816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRotation(int rotation) { if (rotation % 90 != 0) throw new IllegalArgumentException(MessageLocalization.getComposedMessage("rotation.must.be.a.multiple.of.90")); rotation %= 360; if (rotation < 0) rotation += 360; this.rotation = rotation; } COM: <s> sets the field rotation </s>
funcom_train/37837906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logPlayer(final PreparedStatement ps, final String name, final RPObject object) throws SQLException { int age = -1; String release = "0.0"; if (object.has("age")) { age = object.getInt("age"); } if (object.has("release")) { release = object.get("release"); } ps.setDate(1, date); ps.setString(2, name); ps.setInt(3, age); ps.setString(4, release); ps.executeUpdate(); } COM: <s> logs a player </s>
funcom_train/25877402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readObject( Identifier id, File f) { OutputStream out; try { out = new FileOutputStream(f); } catch (FileNotFoundException e) { throw new EsuException("Error opening output file", e); } readObject(id, out, true); } COM: <s> downloads the given objects contents to a file </s>
funcom_train/18846824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createLoopDirectiveNotFoundException(String tscToken, String directiveID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80342"; propertyMap.addPropertyValuePair("directiveID", directiveID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct loop directive not found exception message </s>
funcom_train/24152925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSelectedYear() { System.out.println("selectedYear"); DefaultCalendarModel model = new DefaultCalendarModel(); model.setSelectedYear(2003); assertEquals( "Wrong selectYear:", 2003, model.getSelectedYear()); // test if month is wrong try { model.setSelectedYear(-1); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { // ok } } COM: <s> test of property selected year of class com </s>
funcom_train/17269345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeactivate() { System.out.println("deactivate"); Editor instance = eam.getActiveEditor(); //1.test deactivate active editor instance.deactivate(); Editor result1 = eam.getActiveEditor(); assertNotSame(result1,instance); //2.test deactivate inactive editor instance.deactivate(); Editor result2 = eam.getActiveEditor(); assertNotSame(result2,instance); } COM: <s> t c ed 3 </s>
funcom_train/33877852
/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 ("RentalCarService".equals(portName)) { setRentalCarServiceEndpointAddress(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/22397044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeStartTLS() throws IOException, MailException { if (EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) { EventLogger.logEvent(AppInfo.GUID, ("SmtpProtocol.executeStartTLS()").getBytes(), EventLogger.DEBUG_INFO); } execute(STARTTLS); } COM: <s> execute the starttls command </s>
funcom_train/19321934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String desc = ""; String[] fields = getFields(); if (fields == null || fields.length == 0) { return desc; } for (int i = 0; i < fields.length; i++) if (i == fields.length - 1) desc += fields[i]; else desc += fields[i] + ", "; return desc; } COM: <s> string representation of this object </s>
funcom_train/2742783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AsmCollection testOneSpec(String spec) { File f = new File(FILE_BASE + spec); assertTrue("file " + f.getAbsolutePath() + " does not exist, current dir: " + new File(".").getAbsolutePath(), f.exists()); ASMFileFilter filter = new ASMFileFilter(); assertTrue("not a valid asm", (filter.accept(f))); AsmCollection x = testOneSpec(f, true, false); return x; } COM: <s> test one spec </s>
funcom_train/45239764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trimInPlace() { hashCode = null; newstart: while(b.position() < b.limit()) { byte c = b.get(); if(isWhitespace(c)) { continue newstart; } b.position(b.position() - 1); break newstart; } newend: while(b.limit() > b.position()) { byte c = b.get(b.limit() - 1); if(isWhitespace(c)) { b.limit(b.limit() - 1); continue newend; } break newend; } } COM: <s> removes surrounding whitespace from this binary string in place </s>
funcom_train/41874640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean edgeEquals(GraphEdge edge, GraphNode from, GraphNode to) { if (edge == null) { return false; } GraphNode sourceNode = edge.getSourceNode(); GraphNode destinationNode = edge.getDestinationNode(); if (sourceNode != null && destinationNode != null && sourceNode.equals(from) && destinationNode.equals(to)) { return true; } else { return false; } } COM: <s> check whether the given edge equals to from to </s>
funcom_train/20803508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlwaysOnTop (boolean alwaysOnTop) { this.alwaysOnTop = alwaysOnTop; this.properties.setProperty ("alwaysOnTop", this.alwaysOnTop ? "1" : "0"); writePropertiesFile(); // Nobody is currently interested in listening to the always-on-top // setting. // If we did signal changes here, dictionary settings changes should be // differentiated from other changes to avoid unwanted search reloads } COM: <s> sets the current dictionary window always on top setting </s>
funcom_train/19913730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Track track) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(new StringBuilder("Album [").append(getName()).append("]: Removing track [") .append(track.getName()).append("]...").toString()); } boolean success = false; if (getElement().removeChild(track.getName())) { success = trackList.remove(track); } if (!success) { LOGGER.debug("Failure"); } return success; } COM: <s> removes the given track from this album </s>
funcom_train/32780088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent evt) { // if this RestockProcessQS is scheduled an order is already on its way // only if this RestockProcessQS is not scheduled yet it must be woken // up if (!isScheduled()) { // if safety stock level is reached place a new order if (clientStock.getAvail() <= safetyStockLevel) { activateAfter(currentSimProcess()); } } } COM: <s> informs the restock process qs every time the inventory level of the stock </s>
funcom_train/22550508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void completeAssignAndRequest(IOException x, Interval range, DownloadWorker victim) { ConnectionStatus status = completeAssignAndRequestImpl(x, range, victim); if (victim != null) { victim.setStealing(false); setStealing(false); } incrementState(status); } COM: <s> completes the assign and request by incrementing the state using the </s>
funcom_train/34795286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double delta(double perturbation) { final double diff = 1.0 - 0.0; double r = random.nextDouble(); double actIter = iteration.value(); double maxIter = iteration.max(); double ratio = actIter / maxIter; ratio = Math.min(ratio, 1.0); double y = Math.pow(1.0 - ratio, perturbation); return diff * (1.0 - Math.pow(r, y)); } COM: <s> calculates the delta value for the non uniform mutation </s>
funcom_train/9918486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameterValue(String paramName, int i, int j, float value) { if (paramsHashMap.containsKey(paramName)) { GLModelEffectParameter param = (GLModelEffectParameter) paramsHashMap .get(paramName); param.setValue(i, j, value); } } COM: <s> sets the ith jth value for the parameter only valid for mat types </s>
funcom_train/38991124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void uninstallComponents() { uninstallTabContainer(); if (scrollableTabLayoutEnabled()) { tabPane.remove(tabScroller.viewport); tabPane.remove(tabScroller.scrollForwardButton); tabPane.remove(tabScroller.scrollBackwardButton); tabPane.remove(tabScroller.popupMenuButton); tabScroller = null; } } COM: <s> removes any installed subcomponents from the jtabbed pane </s>
funcom_train/37231276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readAuthorization(HttpServletRequest req, HostsList hl) { user = req.getRemoteUser(); if(user != null) { roles = new HashSet<String>(); for(String role: hl.getRoles()) { if(req.isUserInRole(role)) roles.add(role); } } logger.trace("Found user " + user + " with roles " + roles); } COM: <s> set the authentication context without touching the requests parameters </s>
funcom_train/802646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStringPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SupDataType_string_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SupDataType_string_feature", "_UI_SupDataType_type"), MzdataPackage.Literals.SUP_DATA_TYPE__STRING, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the string feature </s>
funcom_train/20590048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFilm(int current_film_id, Film new_film){ int index = 0; for(Film current_film : this.cinema_film_list){ if(current_film.getID() == current_film_id){ index = this.cinema_film_list.indexOf(current_film); this.cinema_film_list.set(index, new_film); } } } COM: <s> updates a film in the film arraylist </s>
funcom_train/37078404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void collapseTier(FeatureView fv, ApolloPanelI ap) { Vector tier_labels = findTiersForTypes(fv, ap); for (int i=0; i < tier_labels.size(); i++) collapseTier((String)tier_labels.elementAt(i)); } COM: <s> the next few methods are used by tier popup menu and annotation menu </s>
funcom_train/15925159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Stmt checkIfSimpleBlock_(Stmt s) { Stmt the_one_stmt = null; if (s instanceof Block) { Block b = (Block) s; List l = b.statements(); if (l.size() == 1) the_one_stmt = (Stmt) l.get(0); } else { the_one_stmt = s; } return the_one_stmt; } COM: <s> returns the single statement that may be replaced for the async </s>
funcom_train/25510002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createActionTable() { actions = new Hashtable<String, Action>(); JTextField t = new JTextField(); Action[] actionsArray = t.getActions(); for (int i = 0; i < actionsArray.length; i++) { Action a = actionsArray[i]; actions.put((String) a.getValue(Action.NAME), a); } } COM: <s> create a table of all actions supported by a text field </s>
funcom_train/10016789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readStringLiteral(int n) { String s = ""; try{ for(int i = 0; i < n; i++){ int nextChar = read(); s += (char)nextChar; } } catch(Exception e){ System.out.println(e + "\nERROR reading String literal for XML output (readStringLiteral)"); } return s; } COM: <s> read in a string literal </s>
funcom_train/15464348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DeviceGroupInterface getGroup (String strIdentifier) throws SRCPException { // find device in the list int i; DeviceGroupInterface tempDgi; for(i=0;i<objGroupList.size();i++) { tempDgi = (DeviceGroupInterface)(objGroupList.elementAt(i)); if ( tempDgi.getIdentifier().equals(strIdentifier)) { return tempDgi; } } throw new ExcUnsupportedDeviceGroup(); } COM: <s> return the device group object identified by the command parameter </s>
funcom_train/3945211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reloadResource() { if (logger.isDebugEnabled()) { logger.debug("reloadResource() - start"); } if (resourceURI != null) { Manager.reloadManifest(resourceURI, editingDomain); } if (logger.isDebugEnabled()) { logger.debug("reloadResource() - end"); } } COM: <s> reload the resource from disk without saving any local changes </s>
funcom_train/44493616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TestCaseTag getTestCaseTag(){ Object obj = findAncestorWithClass(TestCaseTag.class); if (obj instanceof TestCaseTag) { return (TestCaseTag)obj; }else{ throw new ClassCastException("Can only execute the "+getTagDescription()+" inside a testcase tag! "+getClass().getName()); } } COM: <s> gets the test case tag for this tag </s>
funcom_train/8981549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuAbout() { if (jMenuAbout == null) { jMenuAbout = new JMenu(); jMenuAbout.setText("Sobre"); jMenuAbout.setActionCommand(Integer.toString(SOBRE)); jMenuAbout.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { listener.actionPerformed(new ActionEvent(jMenuAbout, 0, Integer.toString(SOBRE))); } }); } return jMenuAbout; } COM: <s> this method initializes j menu about </s>
funcom_train/6490210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScoreGraph(ScoreGraph graph) { LogTools.trace(logger, 25, "BaseCriteria.setScoreGraph("+graph.getDescription()+")"); if (_graph != null) { _graph.removeScoreGraphListener(this); } _graph = graph; _graph.addScoreGraphListener(this); notifyListeners(new BaseCriteriaEvent(this), CHANGED_SCOREGRAPH); } COM: <s> set the score graph </s>
funcom_train/19865579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getArtistText(Artist artist, boolean showAlbumCount) { StringBuffer text = new StringBuffer(); text.append(artist.getName()); if (showAlbumCount) { text.append(" ("); text.append(artist.getAlbumCount()); if (artist.getAlbumCount() == 1) { text.append(" album"); } else { text.append(" albums"); } text.append(")"); } return text.toString(); } COM: <s> returns the labels text for an artist </s>
funcom_train/33834810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChapter(Chapter chapter) { try { if (chapters.get(chapter.getChapterNumber() - 1) != null) { throw (new IllegalArgumentException("That chapter already exists in this story. ")); } } catch (IndexOutOfBoundsException e) { //do nothing } chapters.add(chapter.getChapterNumber() - 1,chapter); } COM: <s> adds a chapter to the story </s>
funcom_train/44011354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmpLastName() { System.out.println("setEmpLastName"); String empLastName = ""; EmployeeBO instance = new EmployeeBO(); instance.setEmpLastName(empLastName); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set emp last name method of class edu </s>
funcom_train/8763269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); jContentPane = new JPanel(); jContentPane.setLayout(gridLayout); jContentPane.add(getSimulationToggle(), null); jContentPane.add(getToggleMapDef(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/38290296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeListID getTextNode(final String id) throws DOMException { final NodeListID result = getNode(id); // if the first node is a textual node then all nodes must also be // textual hence checking first node only is enough. if (!DOMUtils.isText(result.item(0))) throw new DOMException((short) 0, "ID " + id //$NON-NLS-1$ + " doesn't denote text node."); //$NON-NLS-1$ return result; } COM: <s> gets text or cdata nodes containing text identified by id </s>
funcom_train/41489196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRetrieveByUserName() { logger.info("retrieveByUserName"); User user = new User("marka", "password"); user = (User) getUserService().save(user); User result = getUserService().retrieveByUserName("marka"); assertNotNull(result); assertEquals(user.getUsername(), result.getUsername()); } COM: <s> test of retrieve by user name method </s>
funcom_train/13491099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Fact fact(Predicate predicate, Object obj1, Object obj2) { Class[] structure = predicate.getStructure(); if (structure.length != 2) { throw new IllegalArgumentException("Not the right number of terms for this predicate, the number is 2, but must be " + structure.length); } Term[] terms = {toTerm(obj1, structure[0]), toTerm(obj2, structure[1])}; return lfactory.createFact(predicate, terms); } COM: <s> create a fact with two terms </s>
funcom_train/8810960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPage() { PageLoader loader = getPageLoader(targetPage); loader.load(targetPage, place, new AsyncCallback<Page>() { @Override public void onFailure(Throwable caught) { onPageFailedToLoad(caught); } @Override public void onSuccess(Page page) { if(isStillActive()) { onPageLoaded(page); } } }); } COM: <s> delegates the creation of the page component to a registered </s>
funcom_train/986645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem4() { if (stringItem4 == null) {//GEN-END:|60-getter|0|60-preInit // write pre-init user code here stringItem4 = new StringItem("Tiquete cinemark:", "valor 5000");//GEN-LINE:|60-getter|1|60-postInit // write post-init user code here }//GEN-BEGIN:|60-getter|2| return stringItem4; } COM: <s> returns an initiliazed instance of string item4 component </s>
funcom_train/47708623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initGUI( GenericStudyFacade facade ) { this.setTitle( this.getDUTSLabels().getSemesterCreatWindowLabel() ); this.getGeneralPanel().setLayout( new BorderLayout() ); this.subjForm = new SubjForm( this.getDUTSLabels(), facade ); this.getGeneralPanel().add( this.subjForm, BorderLayout.CENTER ); } COM: <s> initializes the graphics components of this dialog window </s>
funcom_train/2897561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHashSet(HashSet aHashSet) { ((BuildCustomTreeManipulator) myManipulatorList.get(0)).setEnabled(true); ((BuildCustomTreeManipulator) myManipulatorList.get(0)) .setHashSet(aHashSet); setRootNode(myRootNode); manipulateVisibleTree(); } COM: <s> sets a hash set used for constructing a new tree </s>
funcom_train/44875413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void determineInitialDecorations() { if ( !isIgnored() ) { ClassDescription[] classNames = location.getNotFoundDependentClasses(); if ( classNames.length > 0 ) setUnresolved(true); decorationsDetermined = true; if ( getRoot() != null ) getRoot().fireTreeStructureAddEvent(this, null); } } COM: <s> method that determines how this classpath element should be decorated </s>
funcom_train/21607025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BeanWrapperImpl getBeanWrapperForPropertyPath(String propertyPath) { int pos = PropertyAccessorUtils.getFirstNestedPropertySeparatorIndex(propertyPath); // Handle nested properties recursively. if (pos > -1) { String nestedProperty = propertyPath.substring(0, pos); String nestedPath = propertyPath.substring(pos + 1); BeanWrapperImpl nestedBw = getNestedBeanWrapper(nestedProperty); return nestedBw.getBeanWrapperForPropertyPath(nestedPath); } else { return this; } } COM: <s> recursively navigate to return a bean wrapper for the nested property path </s>
funcom_train/7623750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int disconnectSink(String address) { if (DBG) log("disconnectSink(" + address + ")"); try { return mService.disconnectSink(address); } catch (RemoteException e) { Log.w(TAG, "", e); return BluetoothError.ERROR_IPC; } } COM: <s> initiate disconnect from an a2 dp sink </s>
funcom_train/3091188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(){ if(shell != null) shell.dispose(); shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); shell.setText(getText()); shell.setImage(ivcIcon); GridLayout layout = new GridLayout(); layout.numColumns = 1; shell.setLayout(layout); } COM: <s> initializes this ivcdialog </s>
funcom_train/36062561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WorkerThreadDescriptor startBackup( ){ // 1 -- Start the backup DatabaseBackup databaseBackup = new DatabaseBackup(); //WorkerThread databaseBackup = new DummyWorker("Database Backup", 60); WorkerThreadDescriptor desc = null; try{ desc = Application.getApplication().addWorkerToQueue(databaseBackup, "Database Backup"); Thread thread = new Thread(databaseBackup); thread.start(); } catch( DuplicateEntryException e){ //Backup task already in progress } // 2 -- Get the thread descriptor return desc; } COM: <s> start the backup task </s>
funcom_train/45571844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMultiplikator() { if (this.rundenFarbe == null) { return; } else if (this.rundenFarbe.equals(beanManager.getFarbe("Steiner")) && this.blind == true) { this.multiplikator = this.multiplikator * 6; } else if (this.rundenFarbe.equals(beanManager.getFarbe("Herz")) && this.blind == true) { this.multiplikator = this.multiplikator * 4; } } COM: <s> sets the multiplier </s>
funcom_train/25476857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFile(final String src, final String dest) throws IOException { FileInputStream fis = null; FileOutputStream fos = null; try { fis = new FileInputStream(src); fos = new FileOutputStream(dest); copy(fis, fos); } catch (final FileNotFoundException e) { throw e; } finally { if (fis != null) { try { fis.close(); } catch (final IOException e) { } } if (fos != null) { try { fos.close(); } catch (final IOException e) { } } } } COM: <s> copies a file from a source location to a destination location </s>
funcom_train/35669755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUpperBoundPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LinguisticDomain_upperBound_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LinguisticDomain_upperBound_feature", "_UI_LinguisticDomain_type"), LCPnetPackage.Literals.LINGUISTIC_DOMAIN__UPPER_BOUND, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the upper bound feature </s>
funcom_train/16959953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { if (recordGame) { try { stream = new java.io.PrintStream(new java.io.FileOutputStream(dir + "recordings/temp.sfc")); stream.println(map); // print my player PlayerBox pb = GameMaster.gm.myPlayer; stream.println(pb.getName()); // print all the players PlayerBox[] players = GameMaster.gm.players; stream.println(players.length); for (PlayerBox pbs : players) stream.println(pbs.toString()); } catch (Exception e) { e.printStackTrace(); } } } COM: <s> called when the game starts </s>
funcom_train/48764291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Context pushClass(ParsedClassType c, ClassType t) { if (Report.should_report(TOPICS, 4)) Report.report(4, "push class " + c + " " + c.position()); Context_c v = push(); v.kind = CLASS; v.scope = c; v.type = t; v.inCode = false; v.staticContext = false; return v; } COM: <s> pushes on a class scoping </s>
funcom_train/46866947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFromNetwork(List userLinks, String userName) { if (userLinks != null && userLinks.size() > 0) { for (Iterator iter = userLinks.iterator(); iter.hasNext();) { UserLink userLink = (UserLink) iter.next(); userLink.setLastUpdatedBy(userName); userLink.setActive('N'); userLink.setLinkLabels(null); } } } COM: <s> deletes friends from network </s>
funcom_train/37838373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean searchEndMatch(final String itemName) { for(Map.Entry<String, Sentence> e : parsedNames.entrySet()) { Sentence parsed = e.getValue(); if (itemName.endsWith(parsed.getOriginalText()) || itemName.endsWith(parsed.getNormalized())) { name = e.getKey(); return true; } } return false; } COM: <s> check for end matches while searching for item names </s>
funcom_train/30206242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPwd(String unencrypted_password) { if (ConfThreadLocal.getConf().getField("encryptPasswords", "false").equals("true")) { log.debug("store password in encrypted form"); this.pwd = HashMaker.createDigest(unencrypted_password); } else { this.pwd = unencrypted_password; } } COM: <s> hash the given password and store it in user </s>
funcom_train/3156855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamedNode(ProductNode node, ProductNodeList nodeList) { if (node != null && nodeList != null) { nodeList.add(node); node.setOwner(this); Product product = getProduct(); if (product != null) { product.fireNodeAdded(node); } setModified(true); } } COM: <s> utility method which adds the given node tho the supplied node list </s>
funcom_train/23157465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultMutableTreeNode getTreeParent(String n) { for (int x = 0; x < parents.length; x++) { if (parents[x] != null) { if (parents[x].getUserObject().equals(n)) return parents[x]; } } return null; } COM: <s> get a tree parent with the given name </s>
funcom_train/26490501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendSimpleSMS(String userid, String phonenumber, String text) throws Exception { MessageSender realserver = Messaging.getDefaultSender(); // find the OID of the user... used for cafePaymentAdapter UserManager userManager = UserManager.getUserManager(); User user = userManager.findUser(userid); cafePaymentAdapter purse = new cafePaymentAdapter(user.getOID()); realserver.sendSMS(phonenumber, null, text, null, 1, purse); } COM: <s> send a simple sms </s>
funcom_train/46757850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueTermId(Long valueTermId) { if (!(this.valueTermId.longValue() == valueTermId.longValue())) { Long oldvalueTermId= 0L; oldvalueTermId = this.valueTermId.longValue(); this.valueTermId = valueTermId.longValue(); setModified("valueTermId"); firePropertyChange(String.valueOf(APPLICATIONCONTROLS_VALUETERMID), oldvalueTermId, valueTermId); } } COM: <s> value of the control </s>
funcom_train/44870456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getAddButton() { if (addButton == null) { addButton = new JButton(); addButton.setText("Add"); addButton.setToolTipText("Add the selected drawable to the graph"); addButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int index = getAddComboBox().getSelectedIndex(); addGUI(index, true); } }); } return addButton; } COM: <s> this method initializes add button </s>
funcom_train/2289495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsUUID publishProject(I_CmsReport report) throws CmsException { CmsUUID publishHistoryId = OpenCms.getPublishManager().publishProject( this, report, OpenCms.getPublishManager().getPublishList(this)); OpenCms.getPublishManager().waitWhileRunning(); return publishHistoryId; } COM: <s> publishes the current project </s>
funcom_train/31042217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IStatus getMostSevere(IStatus[] status) { IStatus max = null; for (int i = 0; i < status.length; i++) { IStatus curr = status[i]; if (curr.matches(IStatus.ERROR)) { return curr; } if (max == null || curr.getSeverity() > max.getSeverity()) { max = curr; } } return max; } COM: <s> finds the most severe status from a array of stati </s>
funcom_train/15581623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String propertyName, Object value) { if (propertyName.equals("target")) { setTargetAttribute(value.toString()); } else if (value instanceof String) { setParameterValue(propertyName, (String) value); } else if (value instanceof Number) { setParameterValue(propertyName, roundedValue((Number) value)); } else { super.set(propertyName, value); } } COM: <s> sets the value of the named property </s>
funcom_train/43898086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTypeName() { DefaultQuery query = new DefaultQuery(); assertNull(query.getTypeName()); query.setTypeName("foobar"); assertEquals("foobar", query.getTypeName()); query = new DefaultQuery("mytype", Filter.EXCLUDE); assertEquals("mytype", query.getTypeName()); } COM: <s> test of get type name method of class org </s>
funcom_train/4360928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharsetMapper getCharsetMapper() { // Create a mapper the first time it is requested if (this.charsetMapper == null) { try { Class clazz = Class.forName(charsetMapperClass); this.charsetMapper = (CharsetMapper) clazz.newInstance(); } catch (Throwable t) { this.charsetMapper = new CharsetMapper(); } } return (this.charsetMapper); } COM: <s> return the locale to character set mapper for this context </s>
funcom_train/39126367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createSequence() { if (sequence == null) { try { if (ticksPerQuarterNote == 0) { ticksPerQuarterNote = FrinikaConfig.TICKS_PER_QUARTER; } sequence = new FrinikaSequence(Sequence.PPQ, ticksPerQuarterNote, 1); sequencer.setSequence(sequence); } catch (InvalidMidiDataException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } COM: <s> creates a sequence based on the resolution defined in ticks per quarter note </s>
funcom_train/34246180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean getIsRequiredApprover() { if (communityMemberAssignment != null) isRequiredApprover = CacheUtility.getBoolean(WorkTaskAssignmentType.REQUIRED_REVIEWER.getName().equals(communityMemberAssignment.getGovernanceType())); if (isRequiredApprover == null) isRequiredApprover = Boolean.FALSE; return isRequiredApprover; } COM: <s> returns the is required approver </s>
funcom_train/22754023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDataSize(DataFormat format) throws FormatProcessException { int size; if (this.itemSize != "") { String result; try { result = format.calculate(this.itemSize); } catch (FormatCalculationException e) { throw new FormatProcessException(e.toString(), e); } size = Integer.parseInt(result); } else { size = 1; } return size; } COM: <s> evaluates the expression held in the size field and returns the result as </s>
funcom_train/21172227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OEBItem (String ID, String fallbackID, String mediaType, String urlBase, String href) { this.ID = ID; this.fallbackID = fallbackID; this.mediaType = mediaType; this.href = href; this.urlBase = urlBase; if (!this.urlBase.endsWith ("/")) { this.urlBase = this.urlBase + "/"; } } COM: <s> constructs an oebitem object from the given parameters </s>
funcom_train/20028975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1() { if (backCommand1 == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/45110231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReporterWithLeveling() throws Exception{ report.startLevel("first level", Reporter.MainFrame); report.report("message in level 1"); report.startLevel("second level", Reporter.CurrentPlace); report.report("message in level 2"); report.report("another message in level 2"); report.stopLevel(); report.report("another message in level 1"); report.stopLevel(); report.report("message in main report page"); } COM: <s> demonstrates report with graph </s>
funcom_train/17363633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuFileInfo() { if (menuFileInfo == null) { menuFileInfo = new JMenuItem("Show file info"); menuFileInfo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_3, KeyEvent.ALT_DOWN_MASK)); menuFileInfo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getPlayList().showFilwInfoDialog(); } }); } return menuFileInfo; } COM: <s> this method initializes menu file info </s>
funcom_train/5395470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetFECParameters() { System.out.println("setFECParameters"); long fileLength = 0L; FecEncoder instance = null; instance.setFECParameters(fileLength); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set fecparameters method of class org </s>
funcom_train/4514692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVGapScaleFactor(double vgapScaleFactor) { if (vgapScaleFactor == this.vgapScaleFactor) return; double oldValue = this.vgapScaleFactor; this.vgapScaleFactor = vgapScaleFactor; firePropertyChange("vgapScaleFactor", oldValue, this.vgapScaleFactor); if (this.vgapScaleFactor != oldValue) { revalidate(); repaint(); } } COM: <s> sets new vertical gap scale factor for the content of this button </s>
funcom_train/12184133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNamespaceMap(Namespace[] additionalNamespaces) { if (additionalNamespaces != null) { if (namespaceURIMap == null) { namespaceURIMap = new HashMap(additionalNamespaces.length); } for (int i = 0; i < additionalNamespaces.length; i++) { Namespace namespace = additionalNamespaces[i]; addNamespaceToMap(namespace); } } } COM: <s> update the namespace map with the contents of the additional namespaces </s>
funcom_train/41377647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int indexOf(char c) { int start = 0; int end = intervalls.size() - 1; while (start <= end) { int check = (start + end) / 2; Interval i = (Interval) intervalls.get(check); if (start == end) return i.contains(c) ? start : -1; if (c < i.start) { end = check - 1; continue; } if (c > i.end) { start = check + 1; continue; } return check; } return -1; } COM: <s> returns the index of the intervall that contains </s>
funcom_train/16412661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneTraceDefinition() { if (jScrollPaneTraceDefinition == null) { jScrollPaneTraceDefinition = new JScrollPane(); jScrollPaneTraceDefinition.setBounds(new Rectangle(199, 73, 553, 158)); jScrollPaneTraceDefinition.setViewportView(getJTextAreaTraceDefinition()); } return jScrollPaneTraceDefinition; } COM: <s> this method initializes j scroll pane trace definition </s>
funcom_train/41882014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Room getRoom(int roomID) throws RoomException { /* * Since the Room is Comparable based on roomnumber we can make a * dummy-room and search with that. */ try { Room returnMe = roomsList.get(roomsList.indexOf(new Room(roomID))); return returnMe; } catch (IndexOutOfBoundsException e) { throw new RoomException("Manager could not find Room " + roomID); } } COM: <s> fetches the room with the given identifying number </s>
funcom_train/27710091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { setLayout(new GridLayout(0, 1)); String version = javaVersion(); if (version == null) add(new Label("Java version cannot be established.", Label.CENTER)); else add(new Label("Java version " + version, Label.CENTER)); } COM: <s> initialises the applet tt btools </s>
funcom_train/2576969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getHeight(Graphics2D g2) { double result = 0.0; if (this.markers.size() > 0) { LineMetrics metrics = this.font.getLineMetrics( "123g", g2.getFontRenderContext() ); result = this.topOuterGap + this.topInnerGap + metrics.getHeight() + this.bottomInnerGap + this.bottomOuterGap; } return result; } COM: <s> returns the height of the band </s>
funcom_train/32750455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkAttribute(String strName, int iType) { if (!m_mapAttrs.containsKey(strName)) return false; Attribute attr = (Attribute)m_mapAttrs.get(strName); if (attr.getType() != iType) return false; return true; }; COM: <s> check attribute validity </s>
funcom_train/49156955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void quit() { System.out.println("ReMainframe Quit"); ReFrame[] allFrames = ReFrame.getAllFrames(); for (int i = allFrames.length - 1; i >= 0; i--) { if (allFrames[i].isPrimaryView()) { allFrames[i].doDefaultCloseAction(); } } Common.closeConnection(); System.exit(0); } COM: <s> quit the application </s>
funcom_train/45830787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RectangleValues getClipping() { final SwtToolkit toolkit= getToolkit(); return (RectangleValues)getToolkit().syncExec(new SwtTask() { public Object run() { Rectangle r= ((GC)getNativeComponent()).getClipping(); return new RectangleValues(r.x, r.y, r.width, r.height); } }); } COM: <s> returns the bounding rectangle of the receivers clipping </s>
funcom_train/13750977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getSource() == m_butOk) { if (!m_texIdentifier.getText().trim().equals("")) { m_controller.process(); } else { m_labInfo.setText("Please insert an identifier!"); } } else if (e.getSource() == m_butCancel) { m_controller.cancel(); } } COM: <s> user pressed locate button calls process on the controller if user </s>
funcom_train/25546538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tile getWest(){ Tile t = new Tile(); t.setLayer(layer); if(x > 0){ t.setZXY(z, x - 1, y); } else { t.setZXY(z, (1 << z) - 1, y); } return t; } COM: <s> returns a tile of the west </s>
funcom_train/11021261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resolveInheritances(Map<String, Definition> map, Locale locale) { if (map != null) { Set<String> alreadyResolvedDefinitions = new HashSet<String>(); for (Definition definition : map.values()) { resolveInheritance(definition, map, locale, alreadyResolvedDefinitions); } // end loop } } COM: <s> resolve locale specific extended instances </s>
funcom_train/37827766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addUserListInternalFrame() { userListInternalFrame = makeInternalFrame(userListIcon, UserListFrameName, true, true, true, true, 200, 200, 401, 0, true); userListPanel = new UserListPanel(); userListInternalFrame.getContentPane().add(userListPanel); userListInternalFrame.pack(); } COM: <s> adds a feature to the user list internal frame attribute of the cveidesktop </s>
funcom_train/9182260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSortOption() throws ParseException { if (this.hasSortOption()) { String value = commandLine.getOptionValues(SORT_OPTION)[0]; if (!"duedate".equals(value) && !"library".equals(value)) { throw new ParseException("Invalid value \"" + value + "\" used with -sort."); } } } COM: <s> checks the sort argument is either duedate or library </s>
funcom_train/28347381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(Font fnt) { showTBTarrXButton.setFont(fnt); showTBTarrYButton.setFont(fnt); showTBTarrAmpButton.setFont(fnt); listBPMs_Label.setFont(fnt); listenToEPICS_Button.setFont(fnt); exportASCII_Button.setFont(fnt); selectedBPM_Label.setFont(fnt); analyzeAll_Button.setFont(fnt); analysisWFPanelX.setFont(fnt); analysisWFPanelY.setFont(fnt); analysisWFPanelAmp.setFont(fnt); bpmsList.setFont(fnt); makeSnapshotButton.setFont(fnt); clearSnapshotButton.setFont(fnt); snapshotIdLabel.setFont(fnt); } COM: <s> sets the font for all gui elements </s>
funcom_train/49440506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String browseForDirectory(String startDir) { JFileChooser fc = new JFileChooser(startDir); fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int retVal = fc.showDialog(this, "Select directory"); if (retVal==JFileChooser.APPROVE_OPTION) { return(fc.getSelectedFile().getAbsolutePath()); } return(null); } COM: <s> browses for the output directory </s>
funcom_train/3370468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setup(FileSystemView view) { installShowFilesListener(); if(view == null) { view = FileSystemView.getFileSystemView(); } setFileSystemView(view); updateUI(); if(isAcceptAllFileFilterUsed()) { setFileFilter(getAcceptAllFileFilter()); } enableEvents(AWTEvent.MOUSE_EVENT_MASK); } COM: <s> performs common constructor initialization and setup </s>
funcom_train/2430388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInvalidMappings(Collection<InvalidMapping> invalid) { Set<InvalidMapping> old = invalidMappings; invalidMappings = (invalid != null) ? new LinkedHashSet<InvalidMapping>(invalid) : new LinkedHashSet<InvalidMapping>(); firePropertyChange(INVALID_MAPPINGS, old, invalidMappings); } COM: <s> updates the invalid mapping information for this code transformation code </s>
funcom_train/38566250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateColorComponentValue(int colorComponentValue) throws CaptchaException { if (colorComponentValue < MIN_COLOR_COMPONENT_VALUE || colorComponentValue > MAX_COLOR_COMPONENT_VALUE) { throw new CaptchaException("Color component value is always between " + MIN_COLOR_COMPONENT_VALUE + " and " + MAX_COLOR_COMPONENT_VALUE); } } COM: <s> validates that the color component value is in a authorized range </s>
funcom_train/8221397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPassword() { int result = JOptionPane.showConfirmDialog(this, askPasswordField, "Enter password", JOptionPane.OK_CANCEL_OPTION); if (result == JOptionPane.OK_OPTION) { return new String(askPasswordField.getPassword()); } else return null; } COM: <s> gets the password </s>
funcom_train/17174942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(String email) throws UserNotFoundException { Iterator<User> it = costumers.iterator(); while (it.hasNext()) { User user = it.next(); if (user.getEmail().equals(email)) { return user; } } it = users.iterator(); while (it.hasNext()) { User user = it.next(); if (user.getEmail().equals(email)) { return user; } } if(email.equals(admin.getEmail())) return admin; throw new UserNotFoundException("User Does Not Exists"); } COM: <s> get a user in users lists using its mail </s>
funcom_train/12908487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getTextAsFloat(final Element elem, final String tagname) { float value; String text; if((text = getTextByTagName(elem, tagname)) == null) return 0; try { value = Float.parseFloat(text); } catch(NumberFormatException ex) { log.warning("NumberFormatException while parsing float value of Text Node"); value = 0; } return value; } COM: <s> get the value of an text node as float </s>
funcom_train/21034758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEndingKeyNameUpto(String keynameUpto) { if (this.keyName.equals("/")) // root return this.keyName; int lastDotIdx = this.keyName.lastIndexOf(Constants.KEY_SEPARATOR); if (lastDotIdx < 0) return this.keyName; else return this.keyName.substring(lastDotIdx + 1, this.keyName.length()); } COM: <s> gets the last portion of a dot separated keyname upto specified keyname </s>