__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18739001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBinders(RuleElement element) { for (TypeGuard guard : element.getTypeGuards()) { LabelVar var = guard.getVar(); addKey(this.varMap, var).add(element); addKey(this.binderMap, var).add(element); } } COM: <s> adds a given rule element to the variable binding map </s>
funcom_train/10911004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point transformPoint(Point p, CTM ctm) { Rectangle2D r = new Rectangle2D.Double(p.x, p.y, 0, 0); CTM nctm = refineCTM(ctm); r = nctm.transform(r); return new Point((int) r.getX(), (int) r.getY()); } COM: <s> transforms code point code using code ctm code </s>
funcom_train/43245125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKTwoStreetAddr1() { System.out.println("setNOKTwoStreetAddr1"); String nOKTwoStreetAddr1 = ""; EmergencyContactDG2Object instance = new EmergencyContactDG2Object(); instance.setNOKTwoStreetAddr1(nOKTwoStreetAddr1); // 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 noktwo street addr1 method of class org </s>
funcom_train/50248121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { super.createPartControl(parent); fPaintManager = new PaintManager(getSourceViewer()); if (isBracketHighlightingEnabled()) { startBracketHighlighting(); } if (isCurrentLineHighlightingEnabled()) { startLineHighlighting(); } if (fPreferences == null) { fPreferences = PythonPlugin.getDefault().getPluginPreferences(); fPreferences.addPropertyChangeListener(fPropertyChangeListener); } } COM: <s> creates all part controlls to use with this editor </s>
funcom_train/7347679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeDir(String dirName) { String command; com.ibm.network.ftp.Response response; if (state == LOGEDIN) { response = executeCommand("MKD", dirName); // REPLYCODECHECK // 257 // 500, 501, 502, 421, 530, 550 } else { if (state == IDLE) { printText("Not connected to any FTP server \r\n"); return; } if (state == CONNECTED) { printText("Not loged in to any FTP server \r\n"); return; } } } COM: <s> make dir method comment </s>
funcom_train/28702539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getElementValue(Element root, String elementName) { List children = root.getChildren(); for (Iterator iter = children.iterator(); iter.hasNext();) { Element element = (Element) iter.next(); if (element.getName().equals(elementName)) { logger.info("Found title: " + element.getText()); return element.getText(); } else { return getElementValue(element, elementName); } } return null; } COM: <s> recursively scan for an element to get its name </s>
funcom_train/23262320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FuGECommonOntologyOntologySourceType classAlreadyPresent( FuGECollectionOntologyCollectionType finalOntologyCollection, String ontologySourceURI ) { for ( FuGECommonOntologyOntologySourceType ontologySource : finalOntologyCollection.getOntologySource() ) { if ( ontologySource.getOntologyURI().equals( ontologySourceURI ) ) { return ontologySource; } } return null; } COM: <s> a class is already present if and only if it fulfils the following </s>
funcom_train/19033623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRanges() { String result = null; Enumeration enumeration = m_RangeStrings.elements(); while (enumeration.hasMoreElements()) { if (result == null) { result = (String)enumeration.nextElement(); } else { result += ',' + (String)enumeration.nextElement(); } } return (result == null) ? "" : result; } COM: <s> gets the string representing the selected range of values </s>
funcom_train/40710498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWidth(String width) { width = width.trim().toLowerCase(); super.setWidth(width); // Width validation if (getWidth().equals(width)) { // throw new RuntimeException("CSS widths should not be negative"); if (isSWFInjected) { Element elem = DOM.getFirstChild(getElement()); DOM.setElementAttribute(elem, "width", width); } } } COM: <s> sets the swf objects width </s>
funcom_train/375069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean compareJBuffer(JBuffer b1, JBuffer b2) { if (b1.size() != b2.size()) { return false; } for (int i = 0; i < b1.size(); i++) { if (b1.getByte(i) != b2.getByte(i)) { return false; } } return true; } COM: <s> compare j buffer </s>
funcom_train/19609840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean hasCollaboration(String orgId) { String methodName = ".hasCollaboration(): "; connect(); String id = Id.build(orgId); Boolean found = (get(id) != null); Log.enter(className + methodName + found.toString()); return found; } COM: <s> checks database to see if collaboration with id already exists </s>
funcom_train/29397143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(byte[] bytes) throws java.io.IOException { if (bytes == null) return; if ((current + bytes.length) > size) throw new java.io.IOException("BufferedMSILInputStream.read: Premature EOF"); for (int i = 0; i < bytes.length; i++) bytes[i] = data[current++]; } COM: <s> reads from the current file pointer into the given array </s>
funcom_train/18565609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispatchParent2(int caller, boolean isSelected) { if (isSelected) { commandAll(Calculation.cmdResetBest, caller); commandAll(Calculation.cmdResetParent2, caller); command(Calculation.cmdSetParent2, caller); } else { command(Calculation.cmdResetParent2, caller); } toggleButtons(); } COM: <s> method dispatch parent2 </s>
funcom_train/1042077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector2f add(Vector2f vec, Vector2f result) { if (null == vec) { logger.warning("Provided vector is null, null returned."); return null; } if (result == null) result = new Vector2f(); result.x = x + vec.x; result.y = y + vec.y; return result; } COM: <s> code add code adds this vector by code vec code and stores the </s>
funcom_train/29041137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Resource findRightResource() { if (rightResource == null) { final MatchModel match = ((ModelInputSnapshot)EcoreUtil.getRootContainer(diff)).getMatch(); final Iterator<MatchElement> matchIterator = match.getMatchedElements().iterator(); while (matchIterator.hasNext()) { final Match2Elements element = (Match2Elements)matchIterator.next(); if (element.getRightElement() != null) { rightResource = element.getRightElement().eResource(); } } } return rightResource; } COM: <s> returns the right resource </s>
funcom_train/30037208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAction(String id) { // get the core animation CalCoreAnimation coreAnimation = model.getCoreModel().getCoreAnimation(id); // remove any active animation actions of this model for (Iterator<CalAnimationAction> i = listAnimationAction.iterator(); i.hasNext(); ) { if (i.next().getCoreAnimation() == coreAnimation) i.remove(); } } COM: <s> clears an active animation action </s>
funcom_train/43467910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkArgs(ArrayList pcolArgs, int pintNmRqrdArgs) throws ZXException { int intSize = 0; if (pcolArgs != null) { intSize = pcolArgs.size(); } if (intSize != pintNmRqrdArgs) { throw new ZXException("Arguments " + intSize + ", expected " + pintNmRqrdArgs); } return true; } COM: <s> check whether a expression has the correct number of arguments </s>
funcom_train/35833175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mineFieldChanged() { byte[][] newStates = new byte[squaresW][squaresH]; for (int x=0; x<squaresW; x++) for (int y=0; y<squaresH; y++) newStates[x][y] = squareStates[x][y]; try{ if (isClient) register.updateClientView(new MinesweeperUpdate(newStates)); else register.updateServerView(new MinesweeperUpdate(newStates)); }catch(Exception ex){ ex.printStackTrace(); } } COM: <s> tell the register that the other player needs </s>
funcom_train/29916258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getStartCardCreateButton() { if (startCardCreateButton == null) { startCardCreateButton = new JButton(UIHelper.getText("createcard.startcreate")); startCardCreateButton.setBounds(ToLiMaGUI.getNextButtonPos()); startCardCreateButton.setIcon(UIHelper.getImage("forw.gif")); startCardCreateButton.setHorizontalTextPosition(SwingConstants.LEFT); } return startCardCreateButton; } COM: <s> this method initializes start card create button </s>
funcom_train/40354992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean waitForReportReady() throws RemoteException, InterruptedException { ReportJobStatus status = reportService.getReportJob(reportJobId).getReportJobStatus(); while (status == ReportJobStatus.IN_PROGRESS) { Thread.sleep(SLEEP_TIMER); status = reportService.getReportJob(reportJobId).getReportJobStatus(); } return status == ReportJobStatus.COMPLETED; } COM: <s> blocks and waits for a report to be ready </s>
funcom_train/8667224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processingInstruction(String target, String data) { final Node last = (Node)_nodeStk.peek(); ProcessingInstruction pi = _document.createProcessingInstruction( target, data); if (pi != null){ if (last == _root && _nextSibling != null) last.insertBefore(pi, _nextSibling); else last.appendChild(pi); _lastSibling = pi; } } COM: <s> adds processing instruction node to dom </s>
funcom_train/12604963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDelta(ReceiverChangeEvent e, double current, double end) { switch (e.getParm()) { case DELTA_AMPLITUDE: case DELTA_ENTRAINMENT_FREQUENCY: case DELTA_FREQUENCY: case DELTA_PINK_NOISE_AMPLITUDE: case DELTA_PINK_ENTRAINER_MULTIPLE: case DELTA_PINK_PAN_AMPLITUDE: double delta = e.getDoubleValue(); boolean forward = delta >= 0; if (forward) { if (delta + current > end) { return end - current; } } else if (delta + current < end) { return end - current; } return delta; default: return -Double.MAX_VALUE; } } COM: <s> implementation to return the correct delta for a changing property </s>
funcom_train/28754225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRefsample(Long newVal) { if ((newVal != null && this.refsample != null && (newVal.compareTo(this.refsample) == 0)) || (newVal == null && this.refsample == null && refsample_is_initialized)) { return; } this.refsample = newVal; refsample_is_modified = true; refsample_is_initialized = true; } COM: <s> setter method for refsample </s>
funcom_train/23453123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValueDataPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Binding_valueData_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Binding_valueData_feature", "_UI_Binding_type"), ProcessPackage.Literals.BINDING__VALUE_DATA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the value data feature </s>
funcom_train/27674565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callTrinary0( final Function f, final Object x, final Object y, final Object z ) { final FunctionCall fc = this.newFunctionCall(); fc.setFunction( f ); fc.addArg( x ); fc.addArg( y ); fc.addArg( z ); fc.invoke0(); } COM: <s> calls the specified function with the three specified arguments </s>
funcom_train/51413351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { try { Table.saveSecure(new Table[] { TableCompiereAspectCWFNode.getTable(), TableCompiereAspectSCriteria.getTable(), TableCompiereAspectSDef.getTable(), TableCompiereAspectSDefForm.getTable(), TableCompiereAspectSDefWin.getTable(), TableCompiereAspectSDefProcess.getTable() }, true); } catch (CMException e) { e.addContextInfo("Error on saving tables which defines success-definitions of a WFNode."); GUITools.showException(e); } } COM: <s> saves all relevant tables </s>
funcom_train/11024201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteWithSimpleIntPropertyAndStringValue() { try { new BeanPropertyValueChangeClosure("intProperty", "123").execute(new TestBean()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException e) { /* this is what we expect */ } } COM: <s> test execute with simple int property and string value </s>
funcom_train/18847016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createInvalidProcessTaskTypeException(String tscToken, String connectableNodeID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80080"; propertyMap.addPropertyValuePair("connectableNodeID", connectableNodeID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> create invalid process task type exception </s>
funcom_train/20147406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { if (getCause() == null) { return super.getMessage(); } else { return super.getMessage() + "; nested exception is " + getCause().getClass().getName() + ": " + getCause().getMessage(); } } COM: <s> return the detail message including the message from the nested exception </s>
funcom_train/43093864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addClassDiagram(Object ns, String name) { Project p = ProjectManager.getManager().getCurrentProject(); try { ArgoDiagram d = DiagramFactory.getInstance().createDiagram( UMLClassDiagram.class, ns, null); d.setName(getDiagramName(name)); p.addMember(d); setCurrentDiagram(d); } catch (PropertyVetoException pve) { } } COM: <s> add a new class diagram for a package to the project </s>
funcom_train/1116570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getChangebutton1() { if (changebutton1 == null) { changebutton1 = new JButton(); changebutton1.setIcon(new ImageIcon(getClass().getResource( "/resource/Edit16.gif"))); changebutton1.setText(Resource.getPlainResourceString("Change")); changebutton1 .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { changeActionPerformed(e); } }); } return changebutton1; } COM: <s> this method initializes changebutton1 </s>
funcom_train/44458669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recompute(long date) { // Store the cached date _cachedDate = date; _cachedMinutes = date / 60000L; long seconds = date / 1000L; _cachedJustSeconds = (int) (seconds % 60L); // Format the date synchronized (_formatter) { String s = _formatter.format(new Date(_cachedDate)); s.getChars(0, _length, _cachedDateBuffer, 0); } } COM: <s> recomputes the cached formatted date </s>
funcom_train/36254259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OVFWrapper createCompute(OVFWrapper ow) throws VRMMSchedulerException { String ovfxml = createCompute(ow.toString()); OVFWrapper ovf = null; try { ovf = new OVFWrapper(ovfxml); } catch (Exception ex) { System.err.println("[DRPClient]: Error parsing returned OVF."); ex.printStackTrace(); } return ovf; } COM: <s> creates a new virtual machine </s>
funcom_train/21505505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPage ( String docInfoFileName, String docContentsFileName ) throws Exception { System.out.println ( now() + " Testing page: " + docInfoFileName ); // read the document info out of the file SimulatedPageInfo pageInfo = readPageInfo ( docInfoFileName ); // read all the binary contents of dataFileName byte[] docContents = readPageContents( docContentsFileName ); // test the function testUserFunction ( pageInfo, docContents ); } COM: <s> tests a single document </s>
funcom_train/50076536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex(){ int count = mainF.getCurrentWorkPanel().getTabCount(); for(int t = 0; t < count; t++) { WorkTab cur = mainF.getCurrentWorkPanel().getWorkTab(t); if(cur==this) return t; } return -1; } COM: <s> gets the index of this worktab in the workpanel </s>
funcom_train/49790101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWithoutRole1() throws Exception { // create a new user IFile sitemap = createRole(); // we cannot access the 'requires role 1' page, since we // only have 'default role' try { gotoSitemapWithProblem(sitemap, "requires role 1"); fail("Should not be able to access page"); } catch (FailingHttpStatusCodeException e) { // expected checkExceptionContains(e, "could not be translated into 'additional role 1'"); } } COM: <s> without adding role 1 to the user we cannot access </s>
funcom_train/37831031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activityDone(final Player player) { /* * Verify that the player is still standing next to this, else their * activity fails. */ if (nextTo(player)) { if (isPenalized(player)) { onFinished(player, false); } else { onFinished(player, isSuccessful(player)); } } else { player.sendPrivateText("You are too far away from the "+this.getName()+ ", try to come closer."); onFinished(player, false); } } COM: <s> process the results of the activity </s>
funcom_train/29680891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnswered(Long id, boolean answered){ log4j.debug("setAnswered invitationID: " + id); InvitationEntity ie = null; if(id != null) ie = (InvitationEntity)em.find(InvitationEntity.class,id); ie.setAnswered(answered); em.persist(ie); } COM: <s> can set an invitation to answered or non answered state </s>
funcom_train/2852867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContentEncoding() throws Exception { String encoding = "gzip"; header = new ContentEncodingHeader(encoding); assertTrue (header instanceof EntityHeader); assertEquals ("Content-Encoding: " + encoding + "\n", header.toString()); assertEquals (encoding, ((ContentEncodingHeader)header).getValue()); assertEquals ("Content-Encoding", header.getTag()); } COM: <s> content encoding 14 </s>
funcom_train/25309517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitForActivating(String osId) throws IOException, InterruptedException { String status = null; for (int i = 0; i < nbMaxIteration && !"ACTIVE".equals(status); i++) { Thread.sleep(timeToWait); status = checkStatus(osId); } } COM: <s> wait until the opensearch is activated </s>
funcom_train/45483461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object execute(ExecutionEvent event) throws ExecutionException { logger.debug("Entering execute"); Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell(); CheckEncryptionResult result = checkEncryption(); MessageBox messageBox = new MessageBox(shell, result.getMessageStyle()); messageBox.setMessage(result.getMessage()); messageBox.setText(result.getTitle()); messageBox.open(); logger.debug("Exiting execute"); return null; } COM: <s> tests your jce settings and displays a message dialog </s>
funcom_train/46402540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteUserNotes(String userId) { Session session = sessionFactory.getCurrentSession(); Query qry = session.createQuery("delete org.openiam.idm.srvc.user.dto.UserNote un " + " where un.userId = :userId "); qry.setString("userId", userId); qry.executeUpdate(); } COM: <s> delete all the notes associated with a user </s>
funcom_train/12860880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addable(File file) { // check if the file exists if ((file == null) || (!file.exists()) || (!file.isFile())) { return false; } // check if the file is in the list for (Document currentDocument : elements) { if (currentDocument.getFile().equals(file)) { return false; } } return true; } COM: <s> checks if the is addable to the repository </s>
funcom_train/22402915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemSaveIndex() { if (jMenuItemSaveIndex == null) { jMenuItemSaveIndex = new JMenuItem(); jMenuItemSaveIndex.setText("Save Indexations"); jMenuItemSaveIndex.addActionListener(new SaveIndex()); } return jMenuItemSaveIndex; } COM: <s> this method initializes j menu item save index </s>
funcom_train/7626350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean persistString(String value) { if (shouldPersist()) { // Shouldn't store null if (value == getPersistedString(null)) { // It's already there, so the same as persisting return true; } SharedPreferences.Editor editor = mPreferenceManager.getEditor(); editor.putString(mKey, value); tryCommit(editor); return true; } return false; } COM: <s> attempts to persist a string to the </s>
funcom_train/546614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveCurrent(String defaultDir) { if (currentFileName.length() == 0) { showSaveFileDialog(defaultDir,null); } else { try { saveNetFile(currentFileName); } catch (IOException ex) { error("Error during saving file:" + currentFileName + "\n" + ex.getMessage()); } } } COM: <s> save the current scheme </s>
funcom_train/16900623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDuration(long duration, long actual) { long oldDuration = _duration; this._duration = duration; long oldActualDuration = _actualDuration; this._actualDuration = actual; _finishTime = Utils.countFinishTime(_startTime, _duration, getWorkload()); _finishTimeForTooltip = _finishTime-1; if( (oldDuration != _duration) || (oldActualDuration != _actualDuration) ){ _builder.setDirty(); } } COM: <s> sets task duration </s>
funcom_train/17417092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stringToString(String inbuf) { md5Init(); md5Update(inbuf.getBytes(), inbuf.length()); md5Final(); digestHexStr = ""; for (int i = 0; i < 16; i++) { digestHexStr += byteHEX(digest[i]); } return digestHexStr; } COM: <s> encode md5 string to string </s>
funcom_train/37721713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel createLabelForColumn(ColumnView colView) { if (colView.column.isPrimaryKey()) return new JLabel("*" + colView.getName(), JLabel.RIGHT); else return new JLabel(colView.getName(), JLabel.RIGHT); } COM: <s> creates a label for the specified column view </s>
funcom_train/2960742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filterLT() throws ContradictionException { v0.updateInf(v1.getInf() - cste + 1, this, false); v0.updateSup(v1.getSup() + cste - 1, this, false); v1.updateInf(v0.getInf() - cste + 1, this, false); v1.updateSup(v0.getSup() + cste - 1, this, false); } COM: <s> in case of a lt </s>
funcom_train/10910800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getBufferedImageTypeFor(String compressionName) { if (compressionName.equalsIgnoreCase(TIFFConstants.COMPRESSION_CCITT_T6)) { return BufferedImage.TYPE_BYTE_BINARY; } else if (compressionName.equalsIgnoreCase(TIFFConstants.COMPRESSION_CCITT_T4)) { return BufferedImage.TYPE_BYTE_BINARY; } else { return BufferedImage.TYPE_INT_ARGB; } } COM: <s> determines the type value for the buffered image to be produced for rendering </s>
funcom_train/12562225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commandAction(Command c, Displayable s) { if (c == confirmCmd) { confirmChanges(); return; } if (c == exitCmd) { parent.exit(); return; } if (c == saveCmd) { save(); return; } if (c == cancelCmd) { display.setCurrent(this); return; } } COM: <s> respond to a command issued on any screen </s>
funcom_train/973184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Boolean addQuantity(final Document document, final Element root, int quantity) { Element element; try { Integer n = new Integer(quantity); element = document.createElement("quantity"); element.appendChild(document.createTextNode(n.toString())); root.appendChild(element); return true; } catch (NumberFormatException nfe) { return false; } } COM: <s> adds the quantity to the xml file </s>
funcom_train/4879286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MP3File getPreviousMP3File() { int index = playListContents.getDataVector().indexOf( getVector(currentMP3File)); int previousMP3FileIndex; if (isShuffleOn()) { previousMP3FileIndex = getRandomIndexFromPlaylist(); } else { previousMP3FileIndex = index - 1; } if (previousMP3FileIndex < 0) { previousMP3FileIndex = playListContents.getRowCount() - 1; } setCurrentMP3File(previousMP3FileIndex); return getCurrentMP3File(); } COM: <s> gets the mp3 file that played just before the current one </s>
funcom_train/33149471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getSetUpCode ( String objName, StringBuilder buffer, FinderSet finderSet ) { JspUtility.getObjectCreationCode ( objName, DEFAULT_COMPONENT_CLASS, buffer ) ; buffer.append ( objName + ".setHtml ( " + JspUtility.makeSafeQuoted ( getValue () ) + " ) ;\n" ) ; } COM: <s> create the code to set up this object </s>
funcom_train/609732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCard(Card[] cardArray, Card c, int i) { if(i<cardArray.length) cardArray[i] = c; else { System.out.println("Tried to put card on position " + i + " but arrays length is only " + cardArray.length); //do nothing. } } COM: <s> add a specified card </s>
funcom_train/38865041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean insert(IonoObs o) { Ninsert = 0; Nskip = 0; if (getIndex(o) == -1) { int x = getInsertIndex(o); if (x >= 0) { this.add(x,o); } else { this.add(o); } Ninsert++; return true; } else { Nskip++; } return false; } COM: <s> insert a data element into the vector if it does not exist </s>
funcom_train/19166420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String composeSequence() { StringBuffer sequencestring = new StringBuffer(); for (int i = 1; i <= getSequenceCount(); i++) { NucleotideSequence si = getSequence(i); sequencestring.append(si == null ? "" : si.seqString()); //$NON-NLS-1$ } return sequencestring.toString(); } COM: <s> assemble the parts subsequences of the probe </s>
funcom_train/7469296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String normalizeUrl(String url) { String normalized = null; if (urlNormalizers != null) { try { // normalize and trim the url normalized = urlNormalizers.normalize(url, URLNormalizers.SCOPE_DEFAULT); normalized = normalized.trim(); } catch (Exception e) { LOG.warn("Skipping " + url + ":" + e); normalized = null; } } return normalized; } COM: <s> normalizes and trims extra whitespace from the given url </s>
funcom_train/32018741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getJMenuOpen() { if (jMenuOpen == null) { jMenuOpen = new JMenuItem("Ouvrir...", new ImageIcon(getClass().getResource("/Icon/open_bar.png"))); jMenuOpen.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK)); } return jMenuOpen; } COM: <s> this method initializes j menu join server </s>
funcom_train/18378867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IEditPolicyAction keyPressed(IEditPolicyRequest r, KeyEvent e) { if (mouseDownPoint != null && e.character == SWT.ESC) { Composite parent = mouseDownEditor.getWidgetPeer().getComposite(); parent.removePaintListener(this); parent.redraw(); resetGlobalState(); r.getPalette().selectSelectionTool(); r.setHandled(true); } return null; } COM: <s> stop drag dropping a control if esc is pressed while dragging </s>
funcom_train/30275705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkClientVersion(BuildVersion clientVersion) throws LoginException { LOG.info("Dashboard Server version: " + SERVER_VERSION); LOG.info("Dashboard Client version: " + clientVersion); if (!SERVER_VERSION.equals(clientVersion)) { throw new LoginException("The server and client build versions aren't equal", LoginException.NOT_EQUAL_BUILD_VERSIONS, SERVER_VERSION); } } COM: <s> check client build version </s>
funcom_train/44457807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataSection(Element dataSection) { // Store the data section _dataSection = dataSection; // Add the data section to the HTTP parameter list if (dataSection != null) { String xmlDataSection = ElementFormatter.format(dataSection); _httpParams.put("_data", xmlDataSection); } } COM: <s> sets the data section for the input </s>
funcom_train/38828314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject( java.io.ObjectOutputStream out ) throws IOException { // Call the default write object method. out.defaultWriteObject(); // Write out the number of methods we are going to write out. int size = theDB.size(); out.writeInt( size ); // Now loop over all the methods and write out each one. for (Param<?> theParam : this) { out.writeObject( theParam ); } } COM: <s> during serialization this will write out each parameter </s>
funcom_train/30009195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveRoot() { System.out.println("removeRoot"); File root = null; RootList instance = new RootList(); int expResult = 0; int result = instance.removeRoot(root); 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 remove root method of class papyrus </s>
funcom_train/28922315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJmniOpen() { if (jmniOpen == null) { jmniOpen = new JMenuItem(); jmniOpen.setText("Open"); jmniOpen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() } }); } return jmniOpen; } COM: <s> this method initializes j menu item1 </s>
funcom_train/7281247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMisroutedPong() throws Exception { Message m = pingReplyFactory.createExternal(GUID.makeGuid(), (byte)6, 7399, IP, false); ULTRAPEER_1.send(m); ULTRAPEER_1.flush(); assertTrue("should not have drained ultrapeer successfully", !BlockingConnectionUtils.drain(ULTRAPEER_2)); assertTrue("should not have drained leaf successfully", !BlockingConnectionUtils.drain(LEAF)); } COM: <s> tests to make sure that pongs that had no entry in the routing </s>
funcom_train/2626763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getID_bak() { if (xAccessible == null) { Debugger.pause("Accessible null"); return null; } XAccessibleContext xContext = xAccessible.getAccessibleContext(); if (xContext == null) { Debugger.pause("Context null"); return null; } String id = xContext.getAccessibleName() + GUITARConstants.NAME_SEPARATOR + xContext.getAccessibleRole(); return id; } COM: <s> back up method </s>
funcom_train/16696429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnclosingScope(final Scope enclosingScope) { if (this.enclosingScope != null && enclosingScope != this.enclosingScope) { throw new JaninoRuntimeException( "Enclosing scope already set for type \"" + this.toString() + "\" at " + this.getLocation() ); } this.enclosingScope = enclosingScope; } COM: <s> sets the enclosing scope for this object and all subordinate </s>
funcom_train/12074732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAbsoluteCombatPool() { int pool = 0; if (getProficiencyUsed() == null) { return 0; } if (getHealth() == 1) { pool = (getReflex() +(int)Math.floor(getProficiencyUsed().getProficiencyLevel()) / 2); } else { pool = getReflex() + getProficiencyUsed().getProficiencyLevel(); } return pool; } COM: <s> returns the absolute maximum combat pool of this combatant </s>
funcom_train/22577505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLinesOfCodeBinary() throws Exception { fileman.setLinesOfCode("binaryfile", 100); builder.buildFile("binaryfile", true, false, new HashMap(), new HashMap()); buildRevisionInitial("1", date11); finishBuilder(); // get "binaryfile" file = (VersionedFile) builder.createRepository().getFiles().first(); assertEquals(0, file.getCurrentLinesOfCode()); rev0 = (Revision) file.getRevisions().first(); assertRevisionLines(rev0, 0, 0, 0); } COM: <s> test to make sure that loc count for binary files is 0 </s>
funcom_train/1722576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchToTab(int tabIx) { if (mCurrentTabIx == tabIx) return; //getCurrentTab().onPause(); //Will be called by OnTabChangedListener //resumeTab(tabIx); //Will be called by OnTabChangedListener mTabHost.setCurrentTab(tabIx); } COM: <s> change tabs programmatically </s>
funcom_train/27825513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireProgramChanged(Collection addedRules,Collection removedRules) { Object[] listeners=m_listenerList.getListenerList(); for (int i=listeners.length-2;i>=0;i-=2) if (listeners[i]==ProgramChangeListener.class) ((ProgramChangeListener)listeners[i+1]).programChanged(this,addedRules,removedRules); } COM: <s> notifies listeners that the rule was removed </s>
funcom_train/10948392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNextWithException() throws Exception { Reader reader = new BufferedReader(new StringReader("")) { @Override public String readLine() throws IOException { throw new IOException("hasNext"); } }; try { new LineIterator(reader).hasNext(); fail("Expected IllegalStateException"); } catch (IllegalStateException e) { // expected } } COM: <s> tests has next when it throws an exception </s>
funcom_train/15605982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSequence(int index) { if (index > dataVector.size()) { throw new java.lang.IndexOutOfBoundsException("Index: " + index + ", Size: " + dataVector.size()); } labelVector.remove(index); dataVector.remove(index); rangeVector.remove(index); validateRange(); } COM: <s> removes a sequence from this code default seq table model code </s>
funcom_train/17492537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class setProperties(SimpleAllocation node, Class c, Class[] cargs) { Constructor cons = null; try { cons = lookupConstructor(c, cargs); } catch (Exception e) { throw new CatchedExceptionError(e, node); } // Set the properties of this node node.setProperty(NodeProperties.TYPE, c); node.setProperty(NodeProperties.CONSTRUCTOR, cons); return c; } COM: <s> sets the properties of a simple allocation node </s>
funcom_train/51407494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { AnalyzerProxy[] proxies = EclintPlugin.getAnalyzers(); String [][] values = new String[proxies.length][2]; for (int i = 0; i < proxies.length; i++) { values[i][0] = proxies[i].getName(); values[i][1] = proxies[i].getId(); } addField(new RadioGroupFieldEditor(PreferenceConstants.P_LINT_OPTION, SELECT_YOUR_LINT, 1, values, getFieldEditorParent())); } COM: <s> creates the field editors </s>
funcom_train/21995262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh(Vector keys) throws RpcException { try { authorize(Playlists.REFRESH); getBus().refresh(keys); } catch (JRecSecurityException e) { throw new RpcException("security-problem refreshing playlists", e); } catch (BusException e) { throw new RpcException("bus-problem refreshing playlists", e); } } COM: <s> refresh the tunes in a playlist </s>
funcom_train/14652737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select(String ug, String ne) throws EWSDException, IOException, InterruptedException { synchronized(answerWait) { os.write(("GW-SET-UGNE:"+ug+","+ne+";\r\n").getBytes()); os.flush(); answerWait.wait(); } if (answerNumber != 1) throw new EWSDException("Select UG & NE : "+answers[answerNumber]); } COM: <s> select user group and network element </s>
funcom_train/42755580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String state(int state) { switch (state) { case STATE_COMMENT: return "COMMENT"; case STATE_COMMENT_STACKED: return "COMMENT_STACKED"; case STATE_ALPHANUM: return "ALPHANUM"; case STATE_VARIABLE: return "VARIABLE"; case STATE_VARIABLE_APPEND: return "VARIABLE_APPEND"; case STATE_VARIABLE_DEFINE: return "VARIABLE_DEFINE"; case STATE_TARGET: return "TARGET"; case STATE_AFTER_TARGET: return "AFTER_TARGET"; case STATE_COMMAND: return "COMMAND"; default: return "NONE"; } } COM: <s> used internally for debugging purposes </s>
funcom_train/8688732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDynamicAttribute(String name, String value) { ScriptDef definition = getScript(); if (!definition.isAttributeSupported(name)) { throw new BuildException("<" + getTaskType() + "> does not support the \"" + name + "\" attribute"); } attributes.put(name, value); } COM: <s> set a task attribute </s>
funcom_train/32139257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number aggregate(Number[] column) { if(column == null || column.length == 0) return null; double num = Double.POSITIVE_INFINITY; for(int i=0; i<column.length; i++) { if(num > column[i].doubleValue()) num = column[i].doubleValue(); } return NumberType.getNumber(column[0], num); } COM: <s> ensure column isnt empty then get the minimum of all the columns values </s>
funcom_train/3703993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DefaultMutableTreeNode createSelfStatus() { DefaultMutableTreeNode root; DefaultMutableTreeNode node; Map props = selfProperties.asStringMap(); //// 1. Setup the root. root = new DefaultMutableTreeNode(new NodeEntity("Status for - " + settings.getSelfEntityName()), true); //// 2. Add the properties. addPropertiesToEntity(root, props); return (root); } // of method COM: <s> create the display that shows our status </s>
funcom_train/20751025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeParentForTopic(NodeHandle parent, NodeId topicId){ Set set = m_distinctParentTable.keySet(); HashTableEntry entry; if( set.contains(parent)){ entry = (HashTableEntry)m_distinctParentTable.get(parent); entry.removeTopicId(topicId); if(entry.size() == 0) m_distinctParentTable.remove(parent); } else { // We need not do anything here. } } COM: <s> removes a parent for a topic fromthe distinct parent table </s>
funcom_train/22402102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillJList( JList jList) { if( jList != null) { Iterator it = searches.keySet().iterator(); while( it.hasNext()) { String key = (String) it.next(); if( ((Boolean)searchesEnabled.get(key)).booleanValue()) ((Search)searches.get(key)).fillJList( jList); } } } COM: <s> fills the j list with the result of the search </s>
funcom_train/43521424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Update (final String s, String charset_name) throws java.io.UnsupportedEncodingException { if (charset_name == null) charset_name = "ISO8859_1"; final byte chars[] = s.getBytes(charset_name); this.Update(chars, chars.length); } COM: <s> update buffer with given string using the given encoding </s>
funcom_train/48256725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void AddMacroPair( Interval1d f, Interval1d g ) { if( (parameters & Parameters.SUPERCOMPOSITION) != 0 && macroPairs.size() > 0 ) { for( Tuple2<Interval1d,Interval1d> p : this.macroPairs ) { if( p.fst.ProperlyIntersects( f ) && p.snd.ProperlyIntersects( g ) ) return; } } this.macroPairs.addLast( new Tuple2<Interval1d,Interval1d>( f, g ) ); } COM: <s> adds pair to macro pair list </s>
funcom_train/2999457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command createSetSpeedCommand(TrainModel train, int speed) { switch (train.getSpeedSteps()) { case 14 : return new TrainCommand(train.getAddress(), speed, train.getDirection() == Direction.FORWARD, train.getFL()); case 28 : return new DccSpeedCommand(train.getAddress(), speed, train.getDirection() == Direction.FORWARD); default : throw new IllegalArgumentException("Unsupported speedsteps: " + train.getSpeedSteps()); } } COM: <s> create the set train speed command </s>
funcom_train/12170445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushContentValueProcessor(WBSAXValueProcessor processor) { // Currently we only store one value processor for content, so we need // to reject attempts to register more than one at a time. if (contentValueProcessor != null) throw new IllegalStateException( "Can't register content value processor (" + processor + ") as (" + contentValueProcessor + ") already registered"); contentValueProcessor = processor; } COM: <s> push the content value processor provided onto the stack of content </s>
funcom_train/29380196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int sum(String isbn) { int total = 0; for (int i = 0; i < 9; i++) { int weight = 10 - i; total += (weight * toInt(isbn.charAt(i))); } total += toInt(isbn.charAt(9)); // add check digit return total; } COM: <s> returns the sum of the weighted isbn characters </s>
funcom_train/13558687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean implies(Permission other) { switch (this) { case READ_ACCESS_NONE: return other == READ_ACCESS_NONE; case READ_ACCESS_DG3: return other == READ_ACCESS_DG3; case READ_ACCESS_DG4: return other == READ_ACCESS_DG4; case READ_ACCESS_DG3_AND_DG4: return other == READ_ACCESS_DG3 || other == READ_ACCESS_DG4 || other == READ_ACCESS_DG3_AND_DG4; } return false; } COM: <s> whether this permission implies the other permission </s>
funcom_train/28753248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Long newVal) { if ((newVal != null && this.value != null && (newVal.compareTo(this.value) == 0)) || (newVal == null && this.value == null && value_is_initialized)) { return; } this.value = newVal; value_is_modified = true; value_is_initialized = true; } COM: <s> setter method for value </s>
funcom_train/3361452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setMessage(byte[] data, int length) throws InvalidMidiDataException { if (length < 0 || (length > 0 && length > data.length)) { throw new IndexOutOfBoundsException("length out of bounds: "+length); } this.length = length; if (this.data == null || this.data.length < this.length) { this.data = new byte[this.length]; } System.arraycopy(data, 0, this.data, 0, length); } COM: <s> sets the data for the midi message </s>
funcom_train/7981260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PaddingStringBuffer append(String string) { buffer.append(string); if ( string.indexOf('\n') == -1 ){ linePos+=string.length(); } else { while ( string.indexOf('\n') == -1 ){ string = string.substring(string.indexOf('\n')); } linePos=string.length(); } return this; } COM: <s> append a string directly to the buffer </s>
funcom_train/4085861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Widget createSelectedCell( Vec2i loc, String... styleNames ) { Widget widget = GWT.create( FlowPanel.class ); widget.addStyleName( resources.style().selectedCell() ); for( String style : styleNames ) widget.addStyleName( style ); addCellWidget( loc, widget ); return widget; } COM: <s> creates a standard selected cell widget and adds it at a specific cell </s>
funcom_train/13754315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendHeaderFooter(String text, StringBuffer out) { if(text == null || text.length() == 0) return; text = text.replace('\r', '\n'); if(! text.endsWith("\n")) { out.append(text); out.append('\n'); return; } if(text.endsWith("\n\n")) { out.append(text.substring(0, text.length()-1)); return; } out.append(text); return; } COM: <s> add the header footer text if its not empty </s>
funcom_train/29312970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEmptySubgraphs() { if ( (graphdict == null || graphdict.size() == 0) && (nodedict == null || nodedict.size() == 0) && (edgedict == null || edgedict.size() == 0) ) { delete(); return; } if (graphdict != null) { Enumeration enu = graphdict.elements(); while (enu.hasMoreElements()) { ((Subgraph) enu.nextElement()).removeEmptySubgraphs(); } } } COM: <s> delete this subgraph or any contained subgraph at any depth if the </s>
funcom_train/38224062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List process( List tokens, Markups markups ) { if ( log.isDebugEnabled() ) log.debug( "RuleProcessor.process()" ); // Reset the rule network ruleNetwork.initialise( tokens.size() ); // Fire the tokens at the leaf dictionary, and in turn the rules processTokens( tokens ); // Fire markups at the rules processMarkups( markups ); // Evaluate the network ruleNetwork.evaluate(); // Extract results return extractResults(); } COM: <s> process the tokenised document against the ontology </s>
funcom_train/5522767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWhitespaceNormalization() { System.out.println(); log.info("testWhitespaceNormalization"); X3dCanonicalizer.main(new String[] {testFilesDir + "TestWhitespaceNormalization.x3d"}); X3dToolsXMLUnitTest.main(new String[] {testFilesDir + "TestWhitespaceNormalization.x3d", testFilesDir + "TestWhitespaceNormalizationCanonical.x3d"}); } COM: <s> test of correct processing of whitespace normalization in scenes </s>
funcom_train/3176698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(GeoLocation other) { for (Iterator<Property> it = other.properties.iterator(); it.hasNext(); ) { Property prop = it.next(); if (!properties.contains(prop)) properties.add(prop); } Collections.sort(properties, new PropertyComparator(".:DATE")); } COM: <s> add poperties from another instance </s>