__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25198232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeImports(CodeWriter writer) throws IOException { String[] importsArray = imports.toArray(new String[0]); Arrays.sort(importsArray); for (String s : importsArray) { writer.write("import ", s, "\n"); } writer.write("\n"); } COM: <s> write all import statements </s>
funcom_train/22036056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean othersDepend() { synchronized (CellData) { int len = CellData.size(); for (int i=0; i<len; i++) { SSCellData cellData = (SSCellData) CellData.elementAt(i); if (cellData.othersDepend()) return true; } return false; } } COM: <s> whether other cells are dependent on any of this cells data objects </s>
funcom_train/17890997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawPercentage(final GC gc, final double percentage) { int level = (int)(percentage / 100.0 * 256.0); for (int y = 15; y >= 0; y--) { for (int x = 0; x < 16; x++) { if (level-- <= 0) { return; } gc.drawPoint(x, y); } } } COM: <s> this method filling percentage indicator </s>
funcom_train/10298800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHelpSet(HelpSet hs) { debug("setHelpSet"); HelpSet helpset = super.getHelpSet(); // If we already have a model check if the HelpSet has changed. // If so change the model // This could be made smarter to cache the helpmodels per HelpSet if (hs != null && helpset != hs) { super.setHelpSet(hs); if (jhelp != null) { jhelp.setModel(super.getHelpModel()); } } } COM: <s> changes the help set for this presentation </s>
funcom_train/3391374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkPrevious() { if (prev == null) { printText("doclet.Prev_Package"); } else { String path = DirectoryManager.getRelativePath(packageDoc.name(), prev.name()); printHyperLink(path + "package-summary.html", "", configuration.getText("doclet.Prev_Package"), true); } } COM: <s> print prev package link in the navigation bar </s>
funcom_train/35541574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGroupItem() { CobolDataItem dataItem = new CobolDataItem("COBOL-NAME"); dataItem.getChildren().add(new CobolDataItem("CHILD-NAME")); emitAnnotationAndCheck( dataItem, "<cb:cobolElement cobolName=\"COBOL-NAME\" levelNumber=\"1\" type=\"GROUP_ITEM\"/>"); } COM: <s> test a group item </s>
funcom_train/4745291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Source invoke(Source request) { MessageContext mc = wsContext.getMessageContext(); String httpMethod = (String) mc.get(MessageContext.HTTP_REQUEST_METHOD); // Only POST messages are processed if (httpMethod.equals("POST")) { return post(request, mc); } else { mc.put(MessageContext.HTTP_RESPONSE_CODE, 400); return null; } } COM: <s> invoke method of web service </s>
funcom_train/31754625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setControllerObject() { final LocalOrganisationPropertiesController controller = (LocalOrganisationPropertiesController) getPageController(); Display.getDefault().asyncExec(new Runnable() { public void run() { if (organisationPropertiesSection != null && !organisationPropertiesSection.getSection().isDisposed()) organisationPropertiesSection.setPropertySet(controller.getControllerObject().getPerson(), controller.getStructLocal()); switchToContent(); } }); } COM: <s> sets the controllers current object </s>
funcom_train/20109730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testASiteService_RetainsWSDL() { ConfiguredSakaiSiteService service = (ConfiguredSakaiSiteService) factory.aSiteService(userContext1); assertEquals(userContext1.getOption(SakaiServiceDelegateFactorySpringImpl.SITE_SERVICE_WSDL_LOCATION), service.getDelegateWsdlLocation()); } COM: <s> verifies that the configured sakai login service returned from a login service </s>
funcom_train/39914159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLabel9() { System.out.println("getLabel9"); Page1 instance = new Page1(); Label expResult = null; Label result = instance.getLabel9(); 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 label9 method of class timesheetmanagement </s>
funcom_train/26485780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildFromCounts(String response) { StringTokenizer strToken = new StringTokenizer(response, " "); String groupname = strToken.nextToken(); m_lastMessageID = Integer.parseInt(strToken.nextToken()); m_firstMessageID = Integer.parseInt(strToken.nextToken()); m_estimatedCount = Integer.parseInt(strToken.nextToken()); this.setPostable(strToken.nextToken()); } COM: <s> populate variables based on a list counts command response </s>
funcom_train/25111180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setfieldContentsAsBytes(byte[] bytes) { try { getRecord().setContents(bytes); } catch (UnsupportedEncodingException ex) { Logger.getLogger(RecordDataObject.class.getName()).log(Level.SEVERE, "Contents could not be set to supplied bytes[].", ex); } } COM: <s> convenience method for returning the values of the fields as bytes </s>
funcom_train/49320512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _parseProperty(String s) { int i = s.indexOf(':'); if (i != -1) { String key = s.substring(0, i).trim(); String value = s.substring(i + 1).trim(); _properties.setProperty(key, value); } } COM: <s> check for a keyword value pair in the given string and if found </s>
funcom_train/5462366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlOrganizerProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Resource blankNode = crawlParameterList(property, rdfContainer); addStatement(rdfContainer, parentNode, NCAL.organizer, blankNode); processAttendeeOrOrganizer(property, blankNode, rdfContainer); addStatement(rdfContainer, blankNode, RDF.type, NCAL.Organizer); } COM: <s> crawls the organizer property </s>
funcom_train/41740449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Task createOccurrence() { if (!this.recurrent) throw new ApplicationRuntimeException( "It's not possible to create an occurrence of a non-recurrent task"); Task n = new Task(); n.name = name; n.assignee = n.assignee; n.creation = new LocalDate(); n.duration = duration; n.list = list; n.parent = this; n.recurrent = false; n.recurrence = recurrence; n.status = status; n.finalState = finalState; return n; } COM: <s> creates a new occurrence of this recurrent task </s>
funcom_train/5542734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getMessageTerm() { Object[] args = { StaticProlog.makeJavaObject(goal), StaticProlog.makeInteger(argNo), StaticProlog.makeAtom(objType), culprit, StaticProlog.makeAtom(message) }; return StaticProlog.makeStructure(EXISTENCE_ERROR, args); } COM: <s> returns a term representation of this code existence exception code </s>
funcom_train/20058398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CLEvent createUserEvent() { try { IntByReference pErr = new IntByReference(); cl_event evt = CL.clCreateUserEvent(getEntity(), pErr); error(pErr.getValue()); return CLEvent.createEvent(null, evt, true); } catch (Throwable th) { // TODO throw if supposed to handle OpenCL 1.1 return null; } } COM: <s> creates a user event object </s>
funcom_train/34897798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onChildSelected (StepNode selectedChild) { for (int i = 0; i < this.getChildCount(); i++) { StepNode child = (StepNode)getChild(i); if (child != selectedChild) { child.deselect(); } } // If a child was selected, there is no need for bold/underline removeTextStyleForSelectedNode(); } COM: <s> deselects all child nodes not the same as the given node </s>
funcom_train/23297610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectionHighLightColor(Color paint) { if ( paint != this.fSelectionHighLightColor ) { this.fSelectionHighLightColor = paint; // send an event to all registered listeners. this.notifyTree2DPanelPreferenceChangeListeners(new Tree2DPanelPreferenceChangeEvent(this, Tree2DPanelPreferenceChangeEvent.SELECTION_COLOR_MODIFIED)); } } COM: <s> sets the default paint used to high light selected clade names </s>
funcom_train/7383091
/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) { figuraPare = new JLabel(); figuraPare.setBounds(new Rectangle(0, 1, 298, 288)); Icon pare = new ImageIcon(getClass().getResource("Pare.gif")); figuraPare.setIcon(pare); jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(figuraPare, null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/38380605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNodesByDegree(int degree) throws Exception { //we iterate through the nodes.. Hashtable list = (Hashtable) hashedNodes.clone(); Enumeration itr = list.elements(); while (itr.hasMoreElements()) { Node node = (Node) itr.nextElement(); if (node.getRelationsCount() < degree + 1) { ((Element) node).remove(); } //if } //while //..and delete those with degree less than "degree" } COM: <s> removes all nodes with degree equal or less then degree </s>
funcom_train/41207461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calculateGraidentChannel(int sourceChannel, int destChannel, int distance, int offset) { if (sourceChannel == destChannel) { return sourceChannel; } float ratio = ((float) offset) / ((float) distance); int pos = (int) (Math.abs(sourceChannel - destChannel) * ratio); if (sourceChannel > destChannel) { return sourceChannel - pos; } else { return sourceChannel + pos; } } COM: <s> converts the color channel value according to the offest within the distance </s>
funcom_train/29985628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequestLine () { StringBuilder sb = new StringBuilder (method.length () + requestURI.length () + 10); sb.append (method).append (' ').append (requestURI); if (httpVersion != null) { sb.append (' ').append (httpVersion); } return sb.toString (); } COM: <s> get the requestline of this header only valid for requests </s>
funcom_train/36047378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f != null) { String ext = Utils.getExtension(f.getName()); if (ext != null && extensionMap != null && extensionMap.containsKey(ext.toLowerCase())) { return true; } if (f.isDirectory()) { return true; } } return false; } COM: <s> determine whether a file is supported by this filter </s>
funcom_train/46694547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullExecute() { System.out.println("execute"); Property property = null; StringQuery instance = new StringQuery(); instance.buildQuery("", false, Operation.CONTAINS); boolean expResult = false; boolean result = instance.execute(property); assertEquals(expResult, result); } COM: <s> test of execute method of class string query </s>
funcom_train/35330251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public Object clone() { SnmpString newclone = null ; try { newclone = (SnmpString) super.clone() ; newclone.value = new byte[value.length] ; System.arraycopy(value, 0, newclone.value, 0, value.length) ; } catch (CloneNotSupportedException e) { throw new InternalError() ; // vm bug. } return newclone ; } COM: <s> clones the code snmp string code object making a copy of its data </s>
funcom_train/46382458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendCellMessage(CellMessage message) { ChannelComponent channel = getComponent(ChannelComponent.class); if (channel == null) { logger.severe("Unable to find channel on cell id " + getCellID() + " with name " + getName()); return; } channel.send(message); } COM: <s> a utility routine that fetches the channel component of the cell and </s>
funcom_train/21850431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object prop) { if (prop instanceof RadialGradientProperty) { RadialGradientProperty gp = (RadialGradientProperty) prop; if (m_start_color == null) m_start_color = new ColorProperty(); if (m_end_color == null) m_end_color = new ColorProperty(); m_start_color.setValue(gp.m_start_color); m_end_color.setValue(gp.m_end_color); m_position = gp.m_position; m_magnitude = gp.m_magnitude; m_painter = null; } else { assert (false); } } COM: <s> sets this property to that of another property </s>
funcom_train/25218212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String applySortRule(String text, int level) { List<Rule> rules = sortRulesMap.get(Integer.valueOf(level)); if (rules == null || rules.isEmpty()) { return (fallback == null // ? text : fallback.applySortRuleFallback(text, level)); } return Rule.apply(rules, text); } COM: <s> apply the sort rules </s>
funcom_train/43239756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propAddPredicate(Connector sender, Predicate pred) { // propagate the effects of the added predicate for (Iterator i = notifications[pred.type].iterator(); i.hasNext(); ) { Connector c = (Connector)i.next(); if (c != sender) { c.addedPred(pred); } } } COM: <s> propagates the effects of the recently added predicate pred </s>
funcom_train/42971718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDutyRatio(double ratio) { //System.out.println("Set Duty Ratio: " + ratio); this.ratio = ratio; // set the saturation if (this.ratio > 1.0) { this.ratio = 1.0; } if (this.ratio < -1.0) { this.ratio = -1.0; } } COM: <s> set the current duty ratio </s>
funcom_train/45065201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getStatusBar() { if (statusBar == null) { statusBar = new JTextPane(); statusBar.setEditable(false); statusBar.setFont(defaultFont); statusBar.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); statusBar.setBackground(new java.awt.Color(238,238,238)); statusBar.setText("Status Bar"); statusBar.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT); } return statusBar; } COM: <s> this method initializes j text pane </s>
funcom_train/1750129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String checkLogWhenSuccess(String p_LogWhenSuccess) { if (p_LogWhenSuccess.equalsIgnoreCase("yes") == true) return "yes"; else if (p_LogWhenSuccess.equalsIgnoreCase("no") == true) return "no"; else return failValue; } COM: <s> check the value gotten in the log when success </s>
funcom_train/10626898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIgnoreImmediateBeanInfo() throws IntrospectionException { BeanInfo info = Introspector.getBeanInfo(ChildBean.class, Introspector.IGNORE_IMMEDIATE_BEANINFO); PropertyDescriptor[] pds = info.getPropertyDescriptors(); assertEquals(1, pds.length); assertEquals("parentText", pds[0].getName()); } COM: <s> the test checks the get property descriptors method for </s>
funcom_train/25010719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getTabWidths() { final int twenty = 20; int x = twenty; Iterator<Integer> num = order.keySet().iterator(); ArrayList<Integer> list = new ArrayList<Integer>(); while (num.hasNext()) { list.add(num.next()); } Collections.sort(list); for (int i = 0; i < list.size(); i++) { String name = order.get(list.get(i)); JButton btn = buttons.get(name); x += btn.getPreferredSize().width; } return x; } COM: <s> gets the widths of all tab buttons </s>
funcom_train/16514917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPerspective() { try { PlatformUI.getWorkbench().showPerspective( "de.peerthing.MainPerspective", PlatformUI.getWorkbench().getActiveWorkbenchWindow()); } catch (WorkbenchException e) { System.out.println("Could not show default perspective: "); e.printStackTrace(); } } COM: <s> shows the perspective for the query editor </s>
funcom_train/25142170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug12104() throws Exception { if (versionMeetsMinimum(4, 1)) { createTable("testBug12104", "(field1 GEOMETRY)", "MyISAM"); this.stmt .executeUpdate("INSERT INTO testBug12104 VALUES (GeomFromText('POINT(1 1)'))"); this.pstmt = this.conn .prepareStatement("SELECT field1 FROM testBug12104"); this.rs = this.pstmt.executeQuery(); assertTrue(this.rs.next()); System.out.println(this.rs.getObject(1)); } } COM: <s> tests fix for bug 12104 geometry types not handled with server side </s>
funcom_train/49790031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSyncNoSet() throws Exception { beginAtSitemapThenPage("Home"); String sync1 = getLabelIDForText("sync1"); assertLabeledFieldEquals(sync1, ""); String test = "test1 " + new Date(); setLabeledFormElementField(sync1, test); // should have changed (SyncWire) String sync2 = getLabelIDForText("sync2"); assertLabeledFieldEquals(sync2, test); // should not have changed String source = getLabelIDForText("source"); assertLabeledFieldEquals(source, ""); } COM: <s> set sync1 to a value should not set the source </s>
funcom_train/888355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String classGroupFactors(String nm, NumberField n){ String[] arg = new String[] {n.getMaxOrderName()}; assignToFunCall(nm, CLASS_FACTORS2, arg);//class group factors w/o orders return funExecToString(CLASS_FACTORS, arg);//WITH orders } COM: <s> calculate store the cyclic factors of the class group </s>
funcom_train/31676103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean receive(FilePair pair) throws IOException { if( ! toRE.isMatch(pair.getStreamName()) ) return false; pair.setLocalName( toRE.substitute(pair.getStreamName(), fromSub)); if( ! cond.check(pair, true) ) return false; return true; } COM: <s> return true if this file pair matches this translation </s>
funcom_train/15407516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readAssociations(DeployBeanInfo<?> info, BeanDescriptorManager factory){ try { new AnnotationAssocOnes(info, factory).parse(); new AnnotationAssocManys(info, factory).parse(); // read the Sql annotations last because they may be // dependent on field level annotations new AnnotationSql(info).parse(); } catch (RuntimeException e){ String msg = "Error reading annotations for "+info; throw new RuntimeException(msg, e); } } COM: <s> read and process the associated relationship annotations </s>
funcom_train/22862314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findAndActivateShader(OpenGLState glState, GLSLDisplay disp, ShaderConfiguration sc, Shader s) { GLSLManagedShader cs = getCacheEntry(glState, disp, sc, s); currentShader = cs; if(cs == null) { System.err.println("Shader not found:"+s); return; } cs.activateShader(glState, disp, s); shaderChanged = false; } COM: <s> will obtain and activate a glslshader to emulate the input shaders </s>
funcom_train/17007946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(String topicName, byte[] request) { producer.generateEventIdentifier(true); producer.setTemplateId(12345); producer.setDisableTimestamp(false); try { NBEvent nbEvent = producer.generateEvent( TemplateProfileAndSynopsisTypes.STRING, topicName, request); producer.publishEvent(nbEvent); } catch (ServiceException e) { log.error("", e); } } COM: <s> publishes the specified request bytes on the specifed topic </s>
funcom_train/28473771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLocusCodingPanel() { if (locusCodingPanel == null) { locusCodingLabel = new JLabel(); locusCodingLabel.setText("Coding Region Score (0-1):"); locusCodingLabel.setPreferredSize(new Dimension(180, 16)); locusCodingPanel = new JPanel(); locusCodingPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); locusCodingPanel.add(locusCodingLabel, null); locusCodingPanel.add(getLocusCodingTextField(), null); } return locusCodingPanel; } COM: <s> this method initializes locus coding panel </s>
funcom_train/50586178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HTMLDocument convertContentToHTMLDocument(String content) { ByteArrayOutputStream tidyContent = convertContentToDOMTree(content); DOMParser parser = new DOMParser(); InputStream ais = new ByteArrayInputStream(tidyContent.toByteArray()); try { parser.parse(new InputSource(ais)); } catch (SAXException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return (HTMLDocument) parser.getDocument(); } COM: <s> converts the html content into htmldocument </s>
funcom_train/36870179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int deleteUser(String username) { Connection c = MysqlDA0Factory.createConnection(); int result = 0; try{ Statement statment = c.createStatement(); result = statment.executeUpdate( "DELETE FROM `USER` WHERE USERNAME = \"" +username +"\" LIMIT 1 "); }catch(SQLException e){ System.out.println(e.getMessage()); } return result; } COM: <s> delete the given username from the db </s>
funcom_train/3393035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkDimension(DiagnosticPosition pos, Type t) { switch (t.tag) { case METHOD: checkDimension(pos, t.getReturnType()); for (List<Type> args = t.getParameterTypes(); args.nonEmpty(); args = args.tail) checkDimension(pos, args.head); break; case ARRAY: if (types.dimensions(t) > ClassFile.MAX_DIMENSIONS) { log.error(pos, "limit.dimensions"); nerrs++; } break; default: break; } } COM: <s> check if the given type is an array with too many dimensions </s>
funcom_train/7674215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end... int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) ; int newSize = i+1; labelToIndex.shrink(newSize); return newSize; } COM: <s> gets the maximum label exclusive of any block added to this instance </s>
funcom_train/45018496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCreatorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXroot_creator_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXroot_creator_feature", "_UI_NXroot_type"), NexusPackageImpl.Literals.NXROOT__CREATOR, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the creator feature </s>
funcom_train/36231488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEqual(Matrix cfr, double tre) { try { this.checkSameDimMat(cfr); } catch (DifferentSizeMatrixException e) { return false; } for (int i = 0; i < this.nRows; i++) { for (int j = 0; j < this.nCols; j++) { if (Math.abs(this.out(i, j) - cfr.out(i, j)) > tre) { return false; } } } return true; } COM: <s> test if a b </s>
funcom_train/44385413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prependClasspath(Java target) { if (path != null) { log("Prepend '" + path.toString() + "' to classpath.", Project.MSG_DEBUG); Path javaPath = getCommandlineJava(target).getClasspath(); javaPath.append(path); javaPath.setPath(path.toString()); // TBD: Buggy - same as append. Investigate in Ant } } COM: <s> append at first position class path to a java object </s>
funcom_train/25544552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SukuData emptyView(int vid) { SukuData resu = new SukuData(); try { String sql; PreparedStatement stm; sql = "delete from viewunits where vid = ?"; stm = con.prepareStatement(sql); stm.setInt(1, vid); stm.executeUpdate(); stm.close(); } catch (SQLException e) { resu.resu = e.getMessage(); logger.log(Level.WARNING, "delete from view failed", e); e.printStackTrace(); } return resu; } COM: <s> empty the view </s>
funcom_train/37648539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals2() { Properties p1 = new Properties(); Set set = new HashSet(); set.add("foo"); p1.setProperties(set); Properties p2 = new Properties(); p2.setProperties(set); assertEquals("2 different properties instances are equals if their set are the same", p1, p2); } COM: <s> 2 different properties instances are equals if their set are the same </s>
funcom_train/4799791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String animate(double speedmul) { String ret = getCurrentFrame(); if (running) { phase += speed*speedmul; while (phase >= 1.0) { phase -= 1.0; framenr += increment; if (!pingpong) { if (framenr >= frames.length) framenr -= frames.length; if (framenr < 0) framenr += frames.length; } else { if (framenr >= frames.length) { framenr -= 2*increment; increment = -increment; } if (framenr < 0) { framenr -= 2*increment; increment = -increment; } } } } return ret; } COM: <s> does one animation step and returns current image </s>
funcom_train/30136536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUIDForConsumer(String consumerName) { for (int i = 0 ; i < consumerData.size() ; ++i) { OAuthUserConsumerData data = consumerData.get(i); if (consumerName.equalsIgnoreCase(data.getConsumerName())) { return data.getUserID(); } } return null; } COM: <s> get binding user id corresponding to the specified consumer </s>
funcom_train/22278697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decode(Decoder decoder) throws CodingException { super.decode(decoder); color = (Color)decoder.decodeObject(colorField); if (getClass() != lineBorderClass()) return; if (color == Color.black) decoder.replaceObject(blackLine()); else if (color == Color.gray) decoder.replaceObject(grayLine()); } COM: <s> decodes the line border instance </s>
funcom_train/5662687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCertificationsEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_View_certificationsEnabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_View_certificationsEnabled_feature", "_UI_View_type"), ViewPackage.eINSTANCE.getView_CertificationsEnabled(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the certifications enabled feature </s>
funcom_train/34262571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel buildNorthPanel() { JPanel lNorthPanel = GuiHelper.createPanel(new FlowLayout(FlowLayout.RIGHT)); this.infoLabel.setIcon(this.icon); if (this.getInfoMessage() != null) { this.infoLabel.setToolTipText(getInfoMessage()); } lNorthPanel.add(this.infoLabel); return lNorthPanel; } COM: <s> builds the north panel </s>
funcom_train/15724565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeActionListener(String name, ActionListener al) { BasicAction action = (BasicAction) actions.get(name); if (action != null) { action.removeActionListener(al); } BasicAction toolBarAction = (BasicAction) toolBarActions.get(name); if (toolBarAction != null) { toolBarAction.removeActionListener(al); } } COM: <s> removes an action listener from the action with the given name </s>
funcom_train/14505446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISignServerWSClient generateSignServerWSClient(String clientType, String[] hosts, boolean useHTTPS, IFaultCallback faultCallback, int port, int timeOut, String customAppURI) { return generateSignServerWSClient(clientType, hosts, useHTTPS, faultCallback, port, timeOut, DEFAULT_WSDL_URL, null); } COM: <s> generates a sign server wsclient using specified </s>
funcom_train/14099235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(int x, int y, int color) { if ((pixel == null) || (width < 1) || (height < 1) || (color < 0) ||(color > 255)) { return; } if ((x >= 0) && (x <= (width-1))) { if ((y >= 0) && (y <= (height-1))) { pixel[x][y] = color; } } } COM: <s> sets the grayscale color of the specified pixel </s>
funcom_train/35835289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateHeadOffset() { FigMessage createMessage = getFirstCreateFigMessage(); if (createMessage != null) { int y = createMessage.getFirstPoint().y; if (y > 0) { offset = y - (getY() + headFig.getHeight() / 2); } } else { offset = 0; } } COM: <s> updates the head offset looking for the create messages </s>
funcom_train/43245854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetStatus() { System.out.println("setStatus"); String status = ""; InsuranceBufferObject instance = new InsuranceBufferObject(); instance.setStatus(status); // 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 status method of class org </s>
funcom_train/25662415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initFlop(Set<PokerCard> flop2) { // Only the three first cards are kept, if the number of cards >= 3 if (flop2.size() >= 3) { int counter = 0; for (Iterator<PokerCard> itCards = flop2.iterator(); itCards .hasNext() && counter < 3;) { this.flop.add(itCards.next()); counter++; } for (PokerCard cardToRemove : this.flop) { this.deck.remove(cardToRemove); } } } COM: <s> init the table with a flop </s>
funcom_train/18552003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUnqualifiedClassName(String pPackage) { String unqualifiedName = ""; // We're looking for a space StringTokenizer stringTokenizer = new StringTokenizer(pPackage, "."); // Get the first part, the package bit // unqualifiedName = stringTokenizer.nextToken(); while (stringTokenizer.hasMoreTokens()) { // This is the qualified Class name unqualifiedName = stringTokenizer.nextToken(); } return unqualifiedName; } COM: <s> gets the unqualified class name ie </s>
funcom_train/13849589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getState() { if (operationsLogger.isLoggable(Level.FINER)) { operationsLogger.entering(TxnManagerTransaction.class.getName(), "getState"); } synchronized (stateLock) { if (operationsLogger.isLoggable(Level.FINER)) { operationsLogger.exiting(TxnManagerTransaction.class.getName(), "getState", new Integer(trstate)); } return trstate; } } COM: <s> this method returns the state of the transaction </s>
funcom_train/45354459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setBounds(347, 67, 79, 21); jButton1.setText("Cancel"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancel(); } }); } return jButton1; } COM: <s> this method initializes j button1 </s>
funcom_train/16147389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillDataCurrency(String dbFieldname,double value,String IsoCurrency){ convB4it = new UtilFormatOut(); String ueb = convB4it.formatCurrency(value,IsoCurrency,Locale.getDefault()); this.fillDataInternal(dbFieldname, ueb); } COM: <s> converts double to currency </s>
funcom_train/43218666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addProvidersAndListeners() { viewer.setContentProvider(new ContentProvider(this)); viewer.setLabelProvider(new LabelProvider()); viewer.setComparer(new TableElementComparer()); viewer.setSorter(new LocalFileSorter(LocalFileSorter.FILE_NAME, true)); viewer.addDoubleClickListener(new FileTableDoubleClickListener(this)); } COM: <s> adds label and content providers </s>
funcom_train/50573749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNewIdLocal(int type) throws CatalogException { int id; try { UniqueIdLocalHome home = getLocalHome(); UniqueIdLocal bean = home.findByPrimaryKey(new Integer(ROWID)); id = bean.generatePK(type); } catch(Exception e) { throw new CatalogException( "Cant generate new ID" + e.toString() ); } return id; } COM: <s> gives a new id using local interface </s>
funcom_train/3396065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHeader(String name) { for(int i = 0; i < headers.size(); i++) { MimeHeader hdr = (MimeHeader) headers.elementAt(i); if (hdr.getName().equalsIgnoreCase(name)) headers.removeElementAt(i--); } } COM: <s> remove all code mime header code objects whose name matches the </s>
funcom_train/44823401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get (String property) throws ContextException { Object value = null; Stack propStack = (Stack) propMap.get(property); if (propStack != null) { try { value = propStack.peek(); } catch (EmptyStackException esX) { // Just return null if stack is empty } } return value; } COM: <s> get a value for a given property in the context </s>
funcom_train/48614585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllItemsWithinCollectionPrivate(InstitutionalCollection institutionalCollection) { for(InstitutionalItem institutionalItem: institutionalCollection.getItems()) { for(InstitutionalItemVersion version :institutionalItem.getVersionedInstitutionalItem().getInstitutionalItemVersions()) { GenericItem item = version.getItem(); item.setPubliclyViewable(false); for(ItemFile file:item.getItemFiles()) { file.setPublic(false); } } institutionalItemDAO.makePersistent(institutionalItem); } } COM: <s> sets all items within a collection as private </s>
funcom_train/3349534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public X86Register request(Item owner, int jvmType, boolean supportBits8) { final int cnt = regs.length; for (int i = 0; i < cnt; i++) { final RegisterEntry re = regs[i]; if (re.jvmType == jvmType) { if (!supportBits8 || re.reg.isSuitableForBits8()) { return request(owner, re.reg); } } } return null; } COM: <s> register this register for the given owner </s>
funcom_train/8686252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isExists() { InputStream is = null; try { return isReference() ? ((Resource) getCheckedRef()).isExists() : (is = getInputStream()) != null; } catch (IOException ex) { return false; } finally { FileUtils.close(is); } } COM: <s> learn whether this file exists </s>
funcom_train/40872212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VmProxy getVmProxy(String vmId) { for (FarmProxy farmProxy : this.getFarmProxies()) { for (VmProxy vmProxy : farmProxy.getVmProxies()) { if (vmProxy.getVmId().equals(vmId)) return vmProxy; } } return null; } COM: <s> find a virtual machine proxy in the cloud by its identifier </s>
funcom_train/4237737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputPort addOutputPort(OutputPort op) { if (outputPortMap.containsKey(op.getName())) { throw new IllegalArgumentException("OutputPort [" + op.getName() + "] already present in " + getNodeName()); } outputPortMap.put(op.getName(), op); return op; } COM: <s> add output port </s>
funcom_train/9931396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testOverallForce() { double d = 0.0; for (int i = 0; i < size; i++) { d += calcForceValue(label_forces[i]); } if (Math.abs(d - overallForce) > 1e-3) System.err.println("testOverallForce() failed: " + d + " vs. " + overallForce); } COM: <s> test overall force </s>
funcom_train/46701923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCopy() { PersonExt from = new PersonExt(1); PersonExt to = new PersonExt(2); PersonExt.ID.copy(from, to); assertSame(from.get(ID), to.get(ID)); // --- from.set(PERS, new ArrayList<PersonExt>()); PERS.copy(from, to); assertSame(from.get(PERS), to.get(PERS)); } COM: <s> test of encode bytes method of class org </s>
funcom_train/3340091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processMouseEvent(MouseEvent e) { // The default for a left-button-press is to request the focus; // this is overridden by components such as buttons. if (e.getButton() == MouseEvent.BUTTON1 && e.getModifiers() == MouseEvent.MOUSE_PRESSED && this.isFocusTraversable()) requestFocus(); } COM: <s> process a mouse event that was generated by clicking the mouse </s>
funcom_train/16861875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataSet(final Map<String,String[]> dataSet) { clearValues(); if (map==null) return; for (Map.Entry<String,String[]> entry : dataSet.entrySet()) { final String fieldName=entry.getKey(); final FormField formField=get(fieldName); if (formField!=null) formField.addValues(entry.getValue()); } } COM: <s> sets the a href form control </s>
funcom_train/21998720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateDefaultBoxPriceScale() { double defaultBoxPriceScale = 0.0D; // Heuristic for a starting value for the default price scale // Use a percent of the price range. defaultBoxPriceScale = (source.getMaxValue() - source.getMinValue()) / 60; defaultBoxPriceScale = StadisticFunctions.roundDouble(defaultBoxPriceScale, 2); if (defaultBoxPriceScale <= 0.0) { defaultBoxPriceScale = 0.01; } return defaultBoxPriceScale; } COM: <s> calculates default price box scale based on graph source </s>
funcom_train/4929784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendAttribute( StringBuffer out, String name, Object value ) { String stringVal = null; if ( value instanceof String ) stringVal = ( String ) value; else if ( value != null ) stringVal = objectToXML( value ); appendAttribute( out, name, stringVal ); } COM: <s> appends an attribute to the output </s>
funcom_train/49219149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void colormapChanged( ColormapEvent e ) { colormap= e.getColormap(); // send another frame (i.e. update the image) if(slice_data != null) newPixels( slice_data, colormap, 0, slice_width); else newPixels( slice_data_int, colormap, 0, slice_width); } COM: <s> beware we only store the reference to the index color model returned </s>
funcom_train/36557862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPointAtLocation(Vector3f pointAtLocation) { if (pointAtLocation == null) this.pointAtLocation = null; else { if (this.pointAtLocation != null) this.pointAtLocation.set(pointAtLocation); else this.pointAtLocation = new Vector3f(pointAtLocation); } } COM: <s> set to null to cancel pointing </s>
funcom_train/33518961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void uptadeXML() throws DBException { try { File file = new File(USER_LEAGUE_PATH); if (!file.exists()) { file.createNewFile(); } xstream.toXML(userLeagueList, new FileOutputStream(USER_LEAGUE_PATH)); } catch (IOException e) { throw new DBException(e.getMessage() + ": " + USER_LEAGUE_PATH); } } COM: <s> this method is responsible for saving the users information at </s>
funcom_train/18288572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleAddSymbolButton() { // Find a new symbol name that doesn't already exist // in the list String symbolName = "NewSymbol"; for (int i = 1; i < 100; i++) { symbolName = "NewSymbol" + i; if (!currentDefinitions.contains(symbolName)) { break; } } currentDefinitions.add(new SymbolDefinition(symbolName, "true")); tableViewer.refresh(); } COM: <s> the add symbol button has been selected </s>
funcom_train/30277059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onRecipientChanged(RecipientChanged event) { StatWorkItem workItem = wiManager.getWorkItemByWiId(event.getWorkItem().getId()); if (workItem != null) { workItem.setRecipientChanged(event); if (LOG.isDebugEnabled()) { LOG.debug("RECIPIENT CHANGED FOR WI " + workItem.getWID()); } } } COM: <s> wi recipient change </s>
funcom_train/36365737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runJavaCode(String cmd) { if (cmd != null) { try { interpreter.eval(cmd); } catch (bsh.EvalError e) { System.err.println("jpiv2.CmdInterpreter.runJavaCode(String cmd): "); System.err.println(e.toString()); } } } COM: <s> executes a command using the bsh </s>
funcom_train/46459616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveObject(XMLControl control, Object obj) { // buf.flush(); XMLEncoder enc = new XMLEncoder(buf); enc.writeObject(obj); enc.close(); String xml = out.toString(); control.setValue("java_xml", xml); //$NON-NLS-1$ } COM: <s> saves xmlencoder data for an object in the specified xmlcontrol </s>
funcom_train/13275997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Rectangle2D getSurroundingRectangle(HomePieceOfFurniture piece) { float [][] points = piece.getPoints(); Rectangle2D rectangle = new Rectangle2D.Float(points [0][0], points [0][1], 0, 0); for (int i = 1; i < points.length; i++) { rectangle.add(points [i][0], points [i][1]); } return rectangle; } COM: <s> returns the rectangle surrounding the given code piece code </s>
funcom_train/50179050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String dateColumnName(String columnName, String alias) { if (alias != null && alias.trim().length() > 0) { return "to_char(" + alias + "." + columnName + ", '" + oracleDateFormatStr + "')"; } else { return "to_char(" + columnName + ", '" + oracleDateFormatStr + "')"; } } COM: <s> select statements with date types need to convert the date </s>
funcom_train/33005581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Packet getPacket() { Packet cap = new Packet("c"); cap.setAttribute("node", node); cap.setAttribute("ver", node); if (xmlns != null) cap.setAttribute("xmlns", xmlns); if (ext != null) cap.setAttribute("ext", ext); return cap; } COM: <s> gets a packet representation of the capability </s>
funcom_train/33412805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getJoinCommand() { StringBuilder result = new StringBuilder(); for( Relation relation : this.getRelations() ) { result.append( java.text.MessageFormat.format(JOINCMD[relation.getType().value()], relation.getName(), getJoinConditions(relation) ) ); } return result.toString(); } COM: <s> join condition syntax </s>
funcom_train/15627648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shrinkMapSize() { int shrinkFlags = 0; if (eastCheckBox.isSelected()) { shrinkFlags |= ShrinkMapSizeUtils.SHRINK_EAST; } if (southCheckBox.isSelected()) { shrinkFlags |= ShrinkMapSizeUtils.SHRINK_SOUTH; } ShrinkMapSizeUtils.shrinkMap(mapView.getMapControl().getMapModel(), shrinkFlags); } COM: <s> shrinks the map model </s>
funcom_train/51783479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDrawDashedLine() { mockG2d.expects(once()).method("setStroke"); mockG2d.expects(once()).method("setColor").with(eq(Color.BLACK)); mockG2d.expects(once()).method("draw"); drawingContext.drawDashedLine(0, 1, 100, 101); } COM: <s> tests the draw dashed line method </s>
funcom_train/42200092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resizeWindowTo(Point point) { int musDiffX = point.x - mouseClickPoint.x; int musDiffY = point.y - mouseClickPoint.y; final Dimension size = getContentPane().getPreferredSize(); size.setSize(size.width + musDiffX, size.height + musDiffY); getContentPane().setPreferredSize(size); pack(); onHide(); onShow(); mouseClickPoint = point; } COM: <s> handles resizing of the dialog during dragging </s>
funcom_train/15396908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shouldHaveField(String name) { for (Iterator i = forms.iterator(); i.hasNext();) { Form form = (Form) i.next(); if (form.hasInputField(name)) { return; } } Assert.fail("No form field '" + name + "' on page"); } COM: <s> assert that the form has a field by the given name </s>
funcom_train/4366543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() throws IOException { if (writer != null) { throw new IOException(); } else { nextChar = 0; if (LIMIT_BUFFER && (cb.length > Constants.DEFAULT_TAG_BUFFER_SIZE)) { bufferSize = Constants.DEFAULT_TAG_BUFFER_SIZE; cb = new char[bufferSize]; } } } COM: <s> clear the contents of the buffer </s>
funcom_train/8483389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initRootObject() throws InterpreterException { ATAbstractGrammar initialisationCode = host_.getInitialisationCode(); // evaluate the initialization code in the context of the global scope NATObject globalScope = Evaluator.getGlobalLexicalScope(); NATContext initCtx = new NATContext(globalScope, globalScope); // note: the return value of the init.at file is ignored initialisationCode.meta_eval(initCtx); } COM: <s> initialises the root using the contents of the init </s>