__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/42967238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void delete(File file) { // Returns if the directory doesn't exist. if (!file.exists()) return; // If the file is a directory, deletes its content. if (file.isDirectory()) { File afile[]; //// Iterates over the current file's children. int j = (afile = file.listFiles()).length; for (int i = 0; i < j; i++) { File item = afile[i]; delete(item); } } // Delete the current file. file.delete(); } COM: <s> deletes a file </s>
funcom_train/48526861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String convert(String string) { if (string.indexOf('&') < 0) return string; for (int i=0; i<ENTITIES.length; i++) string = string.replaceAll(ENTITIES[i][0], ENTITIES[i][1]); return string; } COM: <s> internal method which deconverts all of the html xml entities </s>
funcom_train/47615976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { setTitle("TestFrame"); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setFont(new Font("Dialog", Font.PLAIN, 12)); setState(Frame.ICONIFIED); setExtendedState(Frame.ICONIFIED); setForeground(Color.black); setLayout(new GroupLayout()); add(getPanel_Main(), new Constraints(new Bilateral(0, 0, 5), new Leading(0, 404, 10, 10))); setSize(707, 406); } COM: <s> loads the components in the gui </s>
funcom_train/2368978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { synchronized (this) { this.running = false; this.stopped.set(false); while (!this.stopped.get()) { synchronized (this) { try { this.wait(); } catch (InterruptedException e) { LOGGER.error("stop()", e); } } } } } COM: <s> stops a eventually running </s>
funcom_train/35924607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int generateNodename(int nodeNumber) { try { name = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { fatalError(e); } boolean nodeNumberOk = false; Component c = null; while (!nodeNumberOk) { try { c = ns.lookup(name + "_" + nodeNumber); } catch (RemoteException ignored) { } if (c != null) { nodeNumber++; } else { nodeNumberOk = true; name += "_" + nodeNumber; } } return nodeNumber; } COM: <s> method which generate the name of the jade node formatted like this </s>
funcom_train/14610270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readProperties() throws IOException { logSequenceDiagram(Sequence.enter, "readProperties()"); checkOpen(); if (!propertiesReaded) { readProperties(this.properties); propertiesReaded = true; logSequenceDiagram(Sequence.process, "readProperties()"); } logSequenceDiagram(Sequence.exit, "readProperties()"); } COM: <s> reads the properties in the stream </s>
funcom_train/1926727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModuleNode addSigMember(String name, SigMember sigMember) { Map nodeMap = getMap(ModuleNode.TYPE_MODULE); ModuleNode n = (ModuleNode) nodeMap.get(name); if (n == null) { return null; } ((ModuleNodeModule) n).addSigMember(sigMember); return n; } COM: <s> adds a signature member to a module node </s>
funcom_train/7442106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Variant getPreferredVariant(List<Variant> variants) { Variant result = null; // If variants were found, select the best matching one if ((variants != null) && (!variants.isEmpty())) { result = getClientInfo().getPreferredVariant( variants, (getApplication() == null) ? null : getApplication() .getMetadataService()); } return result; } COM: <s> returns the preferred variant among a list of available variants </s>
funcom_train/17932917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getPapPclowjTextField() { if (papPclowjTextField == null) { papPclowjTextField = new JTextField(); papPclowjTextField.setEditable(false); // papPclowjTextField // .setPreferredSize(new java.awt.Dimension(100, 20)); papPclowjTextField.setText("4"); papPclowjTextField .setHorizontalAlignment(javax.swing.JTextField.RIGHT); } return papPclowjTextField; } COM: <s> this method initializes pbht papj text field </s>
funcom_train/3904076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWriteNormalizedMeasurePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectiveMappingType_writeNormalizedMeasure_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectiveMappingType_writeNormalizedMeasure_feature", "_UI_ObjectiveMappingType_type"), ImsssPackage.Literals.OBJECTIVE_MAPPING_TYPE__WRITE_NORMALIZED_MEASURE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the write normalized measure feature </s>
funcom_train/33607087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawSegments(C[][] coords, PathStyle style) { if (coords == null || coords.length <= 0) return; if (coords[0].length != 2) throw new IllegalArgumentException("drawSegments should be called with length 2 arrays: " + coords[0].length); for (C[] segment : coords) drawSegment(segment[0], segment[1], style); } COM: <s> draws straight segments relative to the window between specified </s>
funcom_train/29768701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean fireBeforePropertyGet(List<IVOWListener> listeners, ITransactionalBean<?> tBean, String property, Object value) { for (IVOWListener listener : listeners) { if (!(listener.beforePropertyGet(this, tBean, property, value))) { return false; } } return true; } COM: <s> inform listeners before the operation </s>
funcom_train/40622749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void insertCells(int row, int column, int count) { Element tr = rowFormatter.getRawElement(row); Element beforeTd = cellFormatter.getRawElement(row, column); for (int i = column; i < column + count; i++) { Element td = createCell(); tr.insertBefore(td, beforeTd); } } COM: <s> inserts a number of cells before the specified cell </s>
funcom_train/50913360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIdentity() { if (this.getValue().equals("1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0")) { return true; } else { return false; } } COM: <s> is identity matrix </s>
funcom_train/35843675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getTriggerAssociation() { // If we don't have it, find the trigger. If this fails it will keep // its default value of null if ((triggerAssociation == null) && (getToDoItem() != null)) { triggerAssociation = getModelElement(); } return triggerAssociation; } COM: <s> tries to identify the association that triggered the critic </s>
funcom_train/12629670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculatedPropertyInmutability() { OrcDTO dto = (OrcDTO) this.getPopulator().populateDTO(orc, OrcDTO.class); if (!dto.getName().equals("Ugh")) fail(); assertTrue("Assert calculated property reaches the DTO.", dto.getStrength().equals(orc.getType().getBaseConstitution() - orc.getWeapon().getDamage())); } COM: <s> calculated properties populate the dto from the domain object </s>
funcom_train/40735647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLastName(String newVal) { if ((newVal != null && lastName != null && (newVal.compareTo(lastName) == 0)) || (newVal == null && lastName == null && lastNameIsInitialized)) { return; } lastName = newVal; lastNameIsModified = true; lastNameIsInitialized = true; } COM: <s> setter method for last name </s>
funcom_train/46165897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stateChanged(){ if(slavesMap.size() == 0){ return; } CheckBoxListener[] listeners = slavesMap.values().toArray( new CheckBoxListener[slavesMap.size()]); State firstState = listeners[0].getCurrentState(); if(firstState == State.UNDECIDED){ setSuperState(State.UNDECIDED); return; } for(int i = 1; i < listeners.length; i++){ if(firstState != listeners[i].getCurrentState()) { setSuperState(State.UNDECIDED); return; } } setSuperState(firstState); } COM: <s> this method is called when a change in slaves states occured and a </s>
funcom_train/32634571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type intersection(Type type) { if (this == tError || type == tError) return tError; if (this == tUnknown) return type; if (type == tUnknown || this == type) return this; /* We have two different singleton sets now. */ if ((GlobalOptions.debuggingFlags & GlobalOptions.DEBUG_TYPES) != 0) GlobalOptions.err.println("intersecting "+ this +" and "+ type + " to <error>"); return tError; } COM: <s> intersect this set of types with another type set and return the </s>
funcom_train/51590179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getUnresolvedRequirements(Resource requiredResource) { List unresolvedRequirements = new ArrayList(); for (int i = 0; i < requiredResource.getRequirements().length; ++i) { Requirement requirement = requiredResource.getRequirements()[i]; if (findResource(availableResources, requiredResource.getId(), requirement) == null) { unresolvedRequirements.add(requirement); } } return unresolvedRequirements; } COM: <s> for a given resource return the list of its requirements that are not </s>
funcom_train/7909854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataSource(DataSource newSource) { table.setDataSource(newSource); this.matrix = newSource; matrix.addListener(this); setTitle("Edit " + curatorModule.getName()+ ": " + newSource.getName()); if (newSource instanceof FileElement && ((FileElement)newSource).getProject() != null) ((FileElement)newSource).getProject().getCentralModelListener().addListener(this); contentsChanged(); } COM: <s> this should be added in an extention </s>
funcom_train/39567981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joinOverlay() { if (joined) throw new IllegalStateException("HC_Node.joinGroup() called twice without leaveOverlay()!"); resetNeighborhood(); MyLogicalAddress = new HC_LogicalAddress(MaxAddress(), true); MyState = Joining; Adapter.Start(); //Adapter.startTimer(); Adapter.setTimer(new Integer(0), SleepTime); joined = true; } COM: <s> joins a multicast group </s>
funcom_train/35750903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testDelete() { Acl acl = entityManager.find(ForumAcl.class, 1); assertNotNull(acl); forumAclDAO.delete((ForumAcl) acl); entityManager.flush(); Acl actualAcl = entityManager.find(ForumAcl.class, 1); assertEquals("Forum Acl found!", null, actualAcl); AclEntry aclEntry = entityManager.find(ForumAclEntry.class, 1); assertEquals("Forum Acl Entry found, should have been removed in cascade!", null, aclEntry); } COM: <s> test method for </s>
funcom_train/41187706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProjectCommandStateInit(final CommandState command) { // If not locked, continue to add items if (!readOnlyState.getState()) { this.projectCommandStates.add(command); // If the command state is active, set. if (command.isActive()) { this.activeState = command; } } // End of the if // } COM: <s> implementation routine add project command state init </s>
funcom_train/6347329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCharCopy() { char[] x = new char[]{'\0', 'c', '\uFFFF'}; CharArrayRecord r = RecordFactoryCreator. createCharArrayRecordFactory(). createRecord(x); char[] y = r.getCharArray(); char[] z = r.getCharArray(); assertNotSame(y, z); } COM: <s> asserts that the char wrapper makes a copy when returning </s>
funcom_train/47184367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String editAppt(ApptBean appt) throws FormValidationException { validator.validate(appt); if(appt.getDate().before(new Timestamp(System.currentTimeMillis()))) return "The scheduled date of this appointment ("+appt.getDate()+") has already passed."; try { apptDAO.editAppt(appt); return "Success: Appointment changed"; } catch (SQLException e) { e.printStackTrace(); return e.getMessage(); } } COM: <s> updates an existing appointment </s>
funcom_train/46934668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void storeAndGet() throws Exception { BasicXmlResource xml = null; try { Resource r = new ClassPathResource("/net/sf/xaj/oracle/test-01.xml"); xml = new BasicXmlResource(r.getInputStream(), null); } catch ( IOException e ) { throw new RuntimeException(e); } Serializable id = testOracleXmlDb.storeXml(xml); assertNotNull(id); XmlResource r = testOracleXmlDb.get(id); assertNotNull(r); assertEquals(id, r.getId()); } COM: <s> test storing a doc and then storing again </s>
funcom_train/30009276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetReadInfo() { System.out.println("getReadInfo"); Document instance = new Document(); boolean expResult = true; boolean result = instance.getReadInfo(); 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 read info method of class papyrus </s>
funcom_train/48703448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void downloadFinished() { downloadFinished = true; editor.getProgressBar().setVisible(false); editor.getProgressBarLabel().setVisible(false); editor.setOkEnabled(true); editor.getProgressBar().setValue(editor.getProgressBar().getMaximum()); } COM: <s> this is called by the download thread when download is completed </s>
funcom_train/44215813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeRequested() { controller.getStopAction().actionPerformed(null); if(model.isSaveNeeded()) { String message = Strings.getString("SaveConfirmation"); String title = Strings.getString("SaveConfirmationDialogTitle"); int result = JOptionPane.showConfirmDialog(PounderFrame.this, message, title, JOptionPane.YES_NO_CANCEL_OPTION); switch(result) { case JOptionPane.YES_OPTION: controller.getSaveAction().actionPerformed(null); dispose(); break; case JOptionPane.CANCEL_OPTION: return; case JOptionPane.NO_OPTION: dispose(); break; } } else dispose(); } COM: <s> check if save needed and close if desired </s>
funcom_train/34673334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGuestServletsContentExistsNodeRef() throws MalformedURLException, IOException { String content; content=loadUrlContentAsString(new URL("http://localhost:8080/alfresco/d/d/workspace/SpacesStore/fc6d1198-fc28-11dc-b2b2-4798120be4e3/Alfresco-Tutorial.pdf")); assertEquals("Wrong number of characters returned.", 4351571, content.length()); } COM: <s> guest servlets provide access to content without needing authentication </s>
funcom_train/50173470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit() throws TransactionException { try { if( connection == null ) { return; } if( connection.isClosed() ) { throw new TransactionException("Invalid transactional state."); } connection.commit(); connection.close(); connection = null; } catch( SQLException e ) { throw new TransactionException("Database error: " + e.getMessage()); } } COM: <s> sends a commit to the connection currently in use </s>
funcom_train/13306178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameter(QueryParameter qp,boolean instantAdd){ List<QueryParameterEntry> values = new ArrayList<QueryParameterEntry>(); values.addAll(qp.getValues()); if(!instantAdd) addParameter(qp.getType(), values); else{ mapParameters.put(qp.getType(), qp.getValues()); queryParameters.add(qp); } } COM: <s> adds new parameter to the query object </s>
funcom_train/46156960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { componentList.clear(); HUD mainHUD = HUDManagerFactory.getHUDManager().getHUD("main"); Iterator<HUDComponent> hudIt = mainHUD.getComponents(); while (hudIt.hasNext() == true) { HUDComponent hudComponent = hudIt.next(); componentList.add(hudComponent); } fireTableDataChanged(); } COM: <s> refresh the values in the table based upon the latest components in </s>
funcom_train/9298398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected final String TEXT_93 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)" + NL + "\t */" + NL + "\tprotected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}"; COM: <s> protected final string text 92 nl nl t nl t </s>
funcom_train/12172305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node getRealNode(Node node) { if (node == null) { return null; } if (node instanceof Element) { Element element = (Element) node; if (KEEPTOGETHER_ELEMENT.equals(element.getName())) { return getRealNode(element.getHead()); } } return node; } COM: <s> if the specified node is a keep together element then return the </s>
funcom_train/38834032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ConnectorRequest getLoginRequest() { final Map<String, Object> myParamsLogin = new HashMap<String, Object>(); myParamsLogin.put("u", "admin"); myParamsLogin.put("pw", "admin"); return new StandardConnectorRequest("login", myParamsLogin); } COM: <s> gets the login request </s>
funcom_train/45622729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCodePagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CscType_codePage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CscType_codePage_feature", "_UI_CscType_type"), MSBPackage.eINSTANCE.getCscType_CodePage(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the code page feature </s>
funcom_train/36416230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = ""; result = result + "AID: " + aid + ", LC: " + lifeCycleState + ", PR: " + privileges + ", Kind: " + kind.toShortString(); for (AID a : executableAIDS) { result = result + "\n " + a; } return result; } COM: <s> return a string representation of this entry </s>
funcom_train/2496836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUser(String id) throws DataAccessException { try { DAOFactory factory = (DAOFactory) DAOFactory.getFactory(); GroupDAO groupDAO = (GroupDAO) factory.getGroupDAO(); AccountEntity user = new AccountEntity(); user.setId(id); groupDAO.removeUser(user, entity); } catch(DataAccessException dae) { FacesMessages.instance().add(dae.getMessage()); log.error(dae); throw new LdapLookupException(dae); } } COM: <s> removes the specified user from the group </s>
funcom_train/34238455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitAllDirs(File dir) { if (dir.isDirectory()) { folders.add(dir.getAbsolutePath()); String[] children = dir.list(); for (int i = 0; i < children.length; i++) { visitAllDirs(new File(dir, children[i])); } } } COM: <s> process only directories under dir </s>
funcom_train/23392153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Emoticons getEmoticon(int id) throws SQLException { Emoticons result = new Emoticons(); myStatement.execute("select idEmoticons, path, groups from emoticons where idEmoticons=" + id + " limit 0,1"); ResultSet reset = myStatement.getResultSet(); result.setId(new Integer(reset.getString(1))); result.setPath(reset.getString(2)); result.setGroup(new Integer(reset.getString(3))); return result; } COM: <s> loads one emoticon by emoticon id </s>
funcom_train/9825776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Wire nor_o(Wire in, Wire out, String name) { if (in.getWidth() == 1) { return not_o(in, out, name); } return nor_o(new Wire[] {in}, out, name); } COM: <s> constructs a new arbitrary number input nor gate </s>
funcom_train/19267741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void expectDebugLogContaining(String target, String log) { executeTarget(target); String realLog = getFullLog(); assertTrue("expecting log to contain \"" + log + "\" log was \"" + realLog + "\"", realLog.indexOf(log) >= 0); } COM: <s> assert that the given message has been logged with a priority </s>
funcom_train/12157994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeOutCreateCSSVersionMethod(PrintStream out) { // write out the createCSSVersion() method out.println(); out.println(" // Javadoc inherited"); out.println(" public final DefaultCSSVersion createCSSVersion() {"); out.println(" return version;"); out.println(" }"); } COM: <s> generates a create cssversion method </s>
funcom_train/27944132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onAddPlugin( org.planetamessenger.plugin.JPlugin plugin ) { if( JSharedObjects.getProfileManager().checkForPluginUser( plugin.getPluginProperties().getPluginId() ) ) { accountsTable.addRow( plugin ); if( !addInviteAction.isEnabled() ) { addInviteAction.setEnabled( true ); addUserItem.setEnabled( true ); } } } COM: <s> this method listener is called </s>
funcom_train/4250002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateRotationFactor() { if (rotationFactor == null){ SensorLocation loc1 = World.sensorLocations.get(0); SensorLocation loc2 = World.sensorLocations.get(World.sensorLocations.get(0).getSensor().indexRotationalBearing-1); rotationFactor = Math.atan((loc1.getNorth()-loc2.getNorth())/(loc1.getWest()-loc2.getWest())); } } COM: <s> calculates rotation factor for drawing purposes </s>
funcom_train/28265956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isWithin(Date dateToCheck) { if (dateToCheck == null) { throw new IllegalArgumentException("When checking if a date is within the period, a date must be provided"); } if (dateToCheck.after(startDate) && ((endDate == null) || (endDate != null && dateToCheck.before(endDate)))) { return true; } return false; } COM: <s> checks if a date is within the period </s>
funcom_train/37741868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Long selectByActivityKey(Long key) throws SQLException { Connection con = null; PreparedStatement prepStmt = null; ResultSet rs = null; try { con = ds.getConnection(); prepStmt = con.prepareStatement ("SELECT PROCESSDBID FROM ACTIVITY WHERE DBID = ? "); prepStmt.setLong(1, key.longValue()); rs = prepStmt.executeQuery(); if (! rs.next()) { return null; } return new Long(rs.getLong(1)); } finally { JDBCUtil.closeAll (rs, prepStmt, con); } } COM: <s> this method retrieves an activitys container </s>
funcom_train/23940554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tramer(Disk d, double dt) { d.momentum.add(Complex.mul(d.translatoryForce, dt)); d.translatoryForce.set(0, 0); // modify the translation momnetum d.setAngularMomentum(d.getAngularMomentum() + (d.getForceOnAngularMomentum() * dt)); d.setForceOnAngularMomentum(0);// modify the angular momentum } COM: <s> applies the forces to a disk </s>
funcom_train/12562742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyApp(int appId, boolean force) { try { midletStateHandler.destroyApp(force); midletSuite.close(); appContext.terminateIsolate(); } catch (Throwable e) { if (e instanceof MIDletStateChangeException || !force) { throw new RuntimeException(e.getMessage()); } handleFatalException(e); } } COM: <s> call a midlets destroy app method </s>
funcom_train/4138290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image getImage(INetworkCall call) { if(call.getState().equals(INetworkCall.ACTIVE_STATE)) return imageRegistry.get(RUNNING_IMAGE); else if(call.getState().equals(INetworkCall.ERROR_STATE)) return imageRegistry.get(ERROR_IMAGE); else if(call.getState().equals(INetworkCall.WARNING_STATE)) return imageRegistry.get(WARNING_IMAGE); else if(call.getState().equals(INetworkCall.SUCCESS_STATE)) return imageRegistry.get(DONE_IMAGE); return null; } COM: <s> returns the image based on the state of the specified ixhrcall </s>
funcom_train/41738995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void downloadComplete(Downloader downloader) throws ParseException { // keeping track of the threads' status status.get(downloader).downloadEnds(); IMirror mirror = downloader.getMirror(); if(mirror instanceof ISecondaryMirror) { // ie. not for master // Runs with the DOM-based implementation DOMDiffGenerator comparator = (DOMDiffGenerator)DiffGeneratorFactory.getDiffGenerator(Config.TREE, master, (ISecondaryMirror)mirror); // the comparator thread will call back listener's diffCompleted() } } COM: <s> this method is called by a downloader when its job is done </s>
funcom_train/42422481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedFormat(OWLOntologyFormat format) { if (format == null) { formatComboBox.setSelectedIndex(0); } for (int i = 0; i < formatComboBox.getModel().getSize(); i++) { if (formatComboBox.getModel().getElementAt(i).equals(format)) { formatComboBox.setSelectedIndex(i); return; } } } COM: <s> set the selected format </s>
funcom_train/885332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isImage(File imageFile, boolean allowNonExistingFiles) { boolean isImage = false; if ((imageFile != null) && (allowNonExistingFiles || imageFile.isFile())) { final String imageFileName = imageFile.getName().toLowerCase(); for (String extension : SUPPORTED_IMAGE_FILE_EXTENSIONS) { if (imageFileName.endsWith(extension)) { isImage = true; break; } } } return isImage; } COM: <s> checks if the given image file is supported </s>
funcom_train/20479645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateMatrixPosition() { matrixTop = 0; matrixLeft = 0; if (mLocationRow > 0) { matrixTop = mLocationTop - Tile.sHeight * mLocationRow; } else { matrixTop = mLocationTop; } if (mLocationCol > 0) { matrixLeft = mLocationLeft - Tile.sWidth * mLocationCol; } else { matrixLeft = mLocationLeft; } // Log.d(Constants.LOG_TAG, // "matrix top left = "+matrixTop+","+matrixLeft); } COM: <s> determines the top left position of the 0 0 tile </s>
funcom_train/10510180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(ResourceCollection c) { checkChildrenAllowed(); if (c == null) { return; } if (union == null) { union = new Union(); union.setProject(getProject()); union.setCache(cache); } union.add(c); setChecked(false); } COM: <s> add a nested code resource collection code </s>
funcom_train/17705721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(byte b) throws IOException, NotConnectedException { if (connected) { byte[] bb = new byte[1]; bb[0] = b; outStr.write(bb); // System.out.println("Sent byte"); } else { throw new NotConnectedException("Not connected to arduino..."); } } COM: <s> write a byte to the outgoing buffer if we are connected </s>
funcom_train/28353532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exportParameters() { final File file = chooseExportFile(); if ( file == null ) return; try { final Writer writer = new FileWriter( file ); getEnergyManagerDocument().getModel().exportInitialParameters( writer ); writer.flush(); } catch ( java.io.IOException exception ) { displayError( "Write exception", "Error writing out parameters.", exception ); } } COM: <s> export the current parameters </s>
funcom_train/24000545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAsJavaObject() { OclType expResult = new TestOclType() { @Override protected Object toJava(Object source) { return "bob"; } }; OclObject instance = new OclObject(expResult, "a"); assertEquals("bob",instance.asJavaObject()); } COM: <s> test of as java object method of class ocl object </s>
funcom_train/12687191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrustedCertificate(String alias, Certificate cert) throws Exception { //String alias = CertificateUtility.getCommonName((X509Certificate) cert); keyStore.setCertificateEntry(alias, cert); logger.info("Added new trusted certificate for: " + alias); // must re-write SSL keystores createSSLKeystore(true, true, unwrapStorePassword(), unwrapKeyPassword()); rehashKeystoreEntries(); } COM: <s> adds a trusted certificate to the key store </s>
funcom_train/18551016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMessageCollection_getMessageFN() { MessageContainer mc = null; try { mc = new MessageContainer(fileName); } catch (MessageException e) { fail(); } try { mc.putMessage(message); } catch (MessageException e1) { fail(); } Message returned = null; try { returned = mc.getMessage(message.getCode()); } catch (MessageException e2) { fail(); } assertEquals(message,returned); } COM: <s> tests the functionality of the get message method </s>
funcom_train/26344771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String encrypt(String str) { try { // Encode the string into bytes using utf-8 byte[] utf8 = str.getBytes("UTF8"); // Encrypt byte[] enc = ecipher.doFinal(utf8); // Encode bytes to base64 to get a string return new BASE64Encoder().encode(enc); } catch (javax.crypto.BadPaddingException e) { } catch (IllegalBlockSizeException e) { // } catch (UnsupportedEncodingException e) { } catch (java.io.IOException e) { } return null; } COM: <s> method encrypts a string </s>
funcom_train/39915657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTextField32() { System.out.println("setTextField32"); TextField tf = null; Page1 instance = new Page1(); instance.setTextField32(tf); // 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 text field32 method of class timesheetmanagement </s>
funcom_train/18053833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvWindowZoomMenuItem() { if (svWindowZoomMenuItem == null) { svWindowZoomMenuItem = new JMenuItem(); svWindowZoomMenuItem.setText("Zoom"); svWindowZoomMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { pack(); } }); } return svWindowZoomMenuItem; } COM: <s> this method initializes sv window zoom menu item </s>
funcom_train/18103694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveNewCL(CategorisedLandmark clm) throws IOException { // serialise the new record byte[] record = serialise(clm); Integer ID; try { // save to disc and get the ID ID = new Integer(store.addRecord(record, 0, record.length)); } catch (RecordStoreException e) { throw new IOException(e.getMessage()); } // get the instance WeakReference instance = new WeakReference(clm.getLandmark()); // add to the instance lookup instances.put(ID, instance); } COM: <s> convenience method for appending a new categorised landmark object to the </s>
funcom_train/38859909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isContainedType(Class<?> targetClass) { boolean results=false; if(meta.containedTypes != null && meta.containedTypes.length>0 && meta.containedTypes[0] != null) { for(LoidMetaType itype:meta.containedTypes) if(itype.className.equals(targetClass.getCanonicalName())) { results =true; break; } } return results; } COM: <s> finds a match for this class in our contained types </s>
funcom_train/29923856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateAuthorization() { System.out.println("CreateAuthCorrect"); try { auth = authFact.createAuthorization("admin", "admin"); assertTrue("known user, right password", true); } catch (Exception ex) { System.out.println("Exception thrown: " + ex); fail(); } } COM: <s> this tests known user right password </s>
funcom_train/17733425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testShowTree_Root_Dirs_One() throws Exception { logger.info("Running testShowTree_Root_Dirs_One..."); logger.debug("Tree with a single directory: \n"); File a = new File(rootDir, "a"); assertTrue(a.mkdir()); Tree tree = new Tree(rootDir); tree.showTree(); printNativeTree(rootDir); } COM: <s> tests tree with only one folder </s>
funcom_train/48407170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SimpleImage_path_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SimpleImage_path_feature", "_UI_SimpleImage_type"), SpemxtcompletePackage.eINSTANCE.getSimpleImage_Path(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the path feature </s>
funcom_train/2806285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveCartItem(int fromIndex, int toIndex) { if (toIndex < fromIndex) { cartLines.add(toIndex, cartLines.remove(fromIndex)); } else if (toIndex > fromIndex) { cartLines.add(toIndex - 1, cartLines.remove(fromIndex)); } } COM: <s> moves a line item to a differnt index </s>
funcom_train/48792689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int newOrder() throws OtherException { try { return cartses.buy(); } catch (RemoteException e) { throw new OtherException( " Remote Exception in creating a new order in CartSes Bean", e); } catch (CreateException e) { throw new OtherException( " Create Exception in creating a new order in CartSes Bean", e); } catch (InsufficientCreditException e) { throw new OtherException( " Remote Exception in creating a new order in CartSes Bean", e); } } COM: <s> method new order create a new order for the current list of items </s>
funcom_train/8064918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJustificationByName(String justifyString) { if (justifyString.equals("Left")) _justification = JUSTIFY_LEFT; else if (justifyString.equals("Center")) _justification = JUSTIFY_CENTER; else if (justifyString.equals("Right")) _justification = JUSTIFY_RIGHT; _fm = null; } COM: <s> set the text justification given one of these strings left center or </s>
funcom_train/5600993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File write(final ImageRequest request, final RenderedImage image, final String format) throws IOException, WebServiceException { final Iterator<ImageWriter> it = getImageWriter(format); while (it.hasNext()) { disposeWriter(); writer = it.next(); final File file = write(request, image); if (file != null) { return file; } } return null; } COM: <s> attempts to write the given image using a writer of the given format </s>
funcom_train/2326289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FloatMatrix1D repeat(FloatMatrix1D A, int repeat) { int size = (int) A.size(); FloatMatrix1D matrix = make(repeat * size); for (int i = repeat; --i >= 0;) { matrix.viewPart(size * i, size).assign(A); } return matrix; } COM: <s> c a a </s>
funcom_train/65060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createKTable() { GridData gridData1 = new org.eclipse.swt.layout.GridData(); gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData1.grabExcessHorizontalSpace = true; gridData1.grabExcessVerticalSpace = true; gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; kTable = new KTable(topComposite, SWT.NONE); kTable.setLayoutData(gridData1); kTable.setModel(model); } COM: <s> this method initializes k table </s>
funcom_train/3671340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { setWalletSaver(new EmptySaver()); fileName=getParameter("wallet"); if(fileName==null) fileName="wallet"; init2(); saveCerts.setEnabled(false); try{ load(new URL(getCodeBase(),fileName).openStream()); issuers=wallet.getIssuerVector(); updateIssuer((Issuer)issuers.iterator().next()); }catch(Exception x){ x.printStackTrace(System.err); return; } tabs.setSelectedComponent(access); } COM: <s> initializes the applet pocket book </s>
funcom_train/25709985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { System.out.println(type + ">" + line); } } catch (IOException ioe) { ioe.printStackTrace(); } } COM: <s> start this stream gobbler thread </s>
funcom_train/14122253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputStream getImageStream(PACEventForm pacForm) throws FileNotFoundException, IOException { FormFile image = pacForm.getImage(); if ((image != null) && (image.getFileSize() > 0)) { return image.getInputStream(); } return null; } COM: <s> checks if there is uploaded image if so returns input stream of this </s>
funcom_train/14229946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object sendPrivateData(CallId call, String address, String terminal, Object data) { if (!(data instanceof Serializable)) throw new PlatformException("sendPrivateData data is not serializable through remote proxy"); try { return this.getRemote().sendPrivateData(call, address, terminal, (Serializable)data); } catch (RemoteException re) { throw new PlatformException(re.getMessage()); } catch (NotSerializableException nse) { throw new PlatformException("sendPrivateData result not serializable through remote proxy"); } } COM: <s> trigger send private data against the remote interface </s>
funcom_train/19338360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWidgets () { formPanel = new JPanel (); formPanel.setLayout (new BoxLayout (formPanel, BoxLayout.Y_AXIS)); matchExactly = new JCheckBox ("Match exactly"); onlyCurrentView = new JCheckBox ("Find only in current view"); formPanel.add (matchExactly); formPanel.add (onlyCurrentView); buttonsPanel = new JPanel (); buttonsPanel.add (okButton); buttonsPanel.add (cancelButton); } COM: <s> adds some elements to the frame </s>
funcom_train/38388591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean processResourceDeltas(IResourceDelta[] deltas, Object parent) { if (deltas == null) return false; if (deltas.length > 1) { // more than one child changed, refresh from here downwards postRefresh(parent); return true; } for (int i= 0; i < deltas.length; i++) { if (processResourceDelta(deltas[i], parent)) return true; } return false; } COM: <s> process resource deltas </s>
funcom_train/32759223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayValue(Integer intVal) { if (intVal == this.intValFalse) { this.butSigInv.setSelected(true); } else if (intVal == this.intValTrue) { this.butSigInv.setSelected(false); } else { // do nothing } } COM: <s> checks the button if the given value is equal to </s>
funcom_train/11388974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Cookie createCookie(String token) { Cookie cookie = new Cookie(AuthenticatedURL.AUTH_COOKIE, token); if (getCookieDomain() != null) { cookie.setDomain(getCookieDomain()); } if (getCookiePath() != null) { cookie.setPath(getCookiePath()); } return cookie; } COM: <s> creates the hadoop authentiation http cookie </s>
funcom_train/11020575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Renderable render(final Attribute attribute) { return new AbstractDefaultToStringRenderable(getVelocityContext(), null, getResponse(), getRequest()) { public boolean render(InternalContextAdapter context, Writer writer) throws IOException { Request velocityRequest = createVelocityRequest( getServletContext(), writer); TilesContainer container = TilesAccess .getCurrentContainer(velocityRequest); container.render(attribute, velocityRequest); return true; } }; } COM: <s> renders an attribute </s>
funcom_train/24002777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void isDirectory(final AsyncCallback<Boolean> callback) { fs.getBooleanAttributes(this, new AsyncCallback<Integer>() { public void onSuccess(Integer attributes) { callback.onSuccess(((attributes & FileSystem.BA_DIRECTORY) != 0)); } public void onFailure(Throwable t) { callback.onFailure(t); } }); } COM: <s> tests whether the file denoted by this abstract pathname is a </s>
funcom_train/13874855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRefinedRelationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MappingOperation_refinedRelation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MappingOperation_refinedRelation_feature", "_UI_MappingOperation_type"), QvtoperationalPackage.Literals.MAPPING_OPERATION__REFINED_RELATION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the refined relation feature </s>
funcom_train/24513560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Action createPackSelectedAction() { String text = getUIString(PACKSELECTED_ACTION_COMMAND); BoundAction action = new BoundAction(text, PACKSELECTED_ACTION_COMMAND); action.registerCallback(this, "packSelected"); action.setEnabled(getSelectedColumnCount() > 0); return action; } COM: <s> creates an action for packing selected columns </s>
funcom_train/17772437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPanel(PrefPanel panel){ if(! (panel instanceof FilenamePatternPanel)){ throw new IllegalArgumentException("You can only add FilenamePatternPanels to a FilenamePatternModule."); } /* remove the new panel from the set of available panels */ availableFields.remove(((FilenamePatternPanel) panel).getField()); /* add the new panel */ super.addPanel(panel); } COM: <s> adds an existing filename pattern panel to this module </s>
funcom_train/15697131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String printPath(Directory[] path) { StringBuffer result = new StringBuffer(); for (Directory dir : path) { if (dir.getName() != null) { result.append(dir.getName()); result.append('/'); } } return result.toString(); } COM: <s> prints the path to the string </s>
funcom_train/19454294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFile(File file) { if(Main.getRecentFiles().indexOf(file) == -1) { if(Main.getRecentFiles().size() == 0) { recentMenu.remove(0); } Main.getRecentFiles().add(0, file); JMenuItem item = new JMenuItem(new RecentFileAction(file)); item.setText(file.getName()); recentMenu.add(item, 0); } } COM: <s> adds a feature to the file attribute of the menu bar object </s>
funcom_train/4859622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection connectServerDB(String envName, String username, String password) throws Exception { if(envName == null) throw new Exception("Please specify an environment to connect to."); if(!environments.containsKey(envName)) throw new Exception("Environment '" + envName + "' is not defined."); Environment env = environments.get(envName); return env.connectServerDB(username, password); } COM: <s> connect to the server in the specified environment </s>
funcom_train/16411552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem createMenuItem(String text,Color bg,Color fg,Color b,Border border){ JRadioButtonMenuItem item = new JRadioButtonMenuItem(text); item.setBackground(bg); item.setForeground(fg); item.setBorder(border); item.setUI(new AccessibleMenuUI(b)); item.addActionListener(this); item.setFont(ThemeManager.getTheme().getFont("ViewerControlFont")); setAccessibilityMenuItemSize(item, text); return item; } COM: <s> method to create accessibility menu item </s>
funcom_train/3713416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addComponent(Function component) { Function func = component; if (func == null) { func = FunctionFactory.GetFromWidget(); } if (func != null) { adjust(func); fsp.getContinuousIntensity().addComponent (func); buildList(); } if (func instanceof Polynomial) { Polynomial polynomial = (Polynomial) func; polynomial.setDependentObject(fsp); fsp.addObserver(func); } } COM: <s> add a new component from the factory </s>
funcom_train/20046719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean allViewportsDone() { boolean allDone = true; if ( vps.size() > 0 ) { ViewportStatus item; Enumeration items = vps.elements(); while ( items.hasMoreElements() ) { item = (ViewportStatus) items.nextElement(); if ( !item.isDone() ) { allDone = false; break; } } } else { allDone = false; } return allDone; } COM: <s> checks to see if all the viewports that weve been notified about </s>
funcom_train/28997343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public ContentNode getParent() { // for root node, parent is always null, // so only try the retrieve once if (!parentDefereredRetrieve && (parent == null)) { //only try deferred retrieve once parentDefereredRetrieve = true; parent = (ContentNode) retrieveDeferred("FK_ID_PARENT", ContentNode.class); } return parent; } COM: <s> return the parent content node of this content node </s>
funcom_train/44868061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features forWordsEClass = createEClass(FOR_WORDS); getWordEClass = createEClass(GET_WORD); readEClass = createEClass(READ); createEAttribute(readEClass, READ__TYPE); createEAttribute(readEClass, READ__REF); readMatrixEClass = createEClass(READ_MATRIX); skipWordEClass = createEClass(SKIP_WORD); } COM: <s> creates the meta model objects for the package </s>
funcom_train/32968354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInt() { System.out.println("getInt"); LLEvent instance = new LLEvent(); int expResult = -1; int result = instance.getInt(); assertEquals(expResult, result); instance.setInt(15); result = instance.getInt(); expResult = 15; assertEquals(expResult, result); } COM: <s> test of get int method of class org </s>
funcom_train/36767102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryData createSodaQuery(String name, String type) { Element elem = this.document.createElement( Constants.ELEM_QUERY ); elem.setAttribute( Constants.ATTR_KIND, Constants.ATTR_KIND_SODA); if( name != null ) { elem.setAttribute( Constants.ATTR_NAME, name); } if( type != null ) { elem.setAttribute( Constants.ATTR_TYPE, type); } return new SodaQueryImpl(elem); } COM: <s> creates an empty soda query data object </s>
funcom_train/20749944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _handleResponseMessage(PASTMessage msg) { // Look up the command waiting for this response Continuation command = (Continuation) commandTable.get(msg.getID()); if (command != null) { // Give response to the command command.receiveResult(msg); } else { // We don't recognize this response message, so ignore it. } } COM: <s> receives a response message after a request has been sent </s>