__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10606926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getChars(long buf, long buflen, String str, int start, int len) { String substr = str.substring(start, start + len); long addr = getChars(substr); Malloc.memcpy(buf, addr, Math.min(buflen, (substr.length() + 1) * 2)); Malloc.free(addr); return buf; } COM: <s> copies len utf16 unicode encoded chars or buflen bytes whichever is </s>
funcom_train/3360423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Socket createSocket() throws IOException { // // bug 6771432: // The Exception is used by HttpsClient to signal that // unconnected sockets have not been implemented. // UnsupportedOperationException uop = new UnsupportedOperationException(); SocketException se = new SocketException( "Unconnected sockets not implemented"); se.initCause(uop); throw se; } COM: <s> creates an unconnected socket </s>
funcom_train/46336594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOpb_field() { System.out.println("opb_field"); instance.opb_field("K_y"); assertEquals("KY", instance.getMappedTo()); assertEquals("kY", instance.getMappedToProperty()); } COM: <s> test of opb field method of class plsql call parameter </s>
funcom_train/3024668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPackage(SimpleNode root) { SimpleNode first = (SimpleNode) root.jjtGetFirstChild(); ASTPackageDeclaration pack = new ASTPackageDeclaration(JavaParserTreeConstants.JJTPACKAGEDECLARATION); pack.jjtAddChild(name, 0); if (first instanceof ASTPackageDeclaration) { root.jjtAddChild(pack, 0); } else { root.jjtInsertChild(pack, 0); } } COM: <s> adds a feature to the package attribute of the change package transform </s>
funcom_train/19793396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resolution editOrganization() { loadModel(); Map<String,String> map = model.getOrganizations(); List<String> list = new ArrayList<String>(); list.addAll(map.values()); getContext().getRequest().getSession().setAttribute("organizations", list); return new RedirectResolution("/selectOrganization.jsp"); } COM: <s> transfers user to new page edit organization </s>
funcom_train/16987968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TSection intersection(TSection ts){ TSection is = null; float isx, isz, iex, iez; if(ez < ts.sz || ts.ez < sz || ex < ts.sx || ts.ex < sx) return null; isx = Math.max(sx, ts.sx); iex = Math.min(ex, ts.ex); isz = Math.max(sz, ts.sz); iez = Math.min(ez, ts.ez); is = new TSection(isx,isz,iex,iez); return is; } COM: <s> calculate and return a tsection representing the intersection with </s>
funcom_train/39543811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document loadDocument(String uri) throws IOException { Document ret = checkCache(uri); if (ret != null) return ret; SVGDocument document = documentFactory.createSVGDocument(uri); DocumentDescriptor desc = documentFactory.getDocumentDescriptor(); DocumentState state = new DocumentState(uri, document, desc); synchronized (cacheMap) { cacheMap.put(uri, state); } return state.getDocument(); } COM: <s> returns a document from the specified uri </s>
funcom_train/40618637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Time randomTime() { if (random.nextInt(10) == 0) { return null; } StringBuilder buff = new StringBuilder(); buff.append(getInt(24)); buff.append(':'); buff.append(getInt(24)); buff.append(':'); buff.append(getInt(24)); return Time.valueOf(buff.toString()); } COM: <s> get a random time value </s>
funcom_train/32051877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mergeCase(final ProfileCase caze) { outputWriter.startCase(caze.getCaseClass()); while (mergeReader.hasScenarios()) { mergeReader.nextScenario(); final ProfileScenario scenario = caze.getScenario(mergeReader.currentScenarioName()); if (scenario==null) { copyScenario(); continue; } mergeScenario(caze, scenario); caze.removeScenario(scenario); } writeMissingScenarios(caze); } COM: <s> merges a case </s>
funcom_train/2955292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAttribute(String attributeName) { try { Element element = this.getCurrentElement(); if (element.getAttribute(attributeName) != null) { this.addEdit( element.removeAttribute(attributeName), this.getCaretOffset()); } } catch (DocumentValidationException ex) { Toolkit.getDefaultToolkit().beep(); } } COM: <s> removes an attribute from the current element </s>
funcom_train/8279147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getClosestPoint() { float min = Float.MAX_VALUE; int point = 0; if (distances != null) { for (int i = length; --i >= 0;) { float val = distances[i]; if (val < min) { min = val; point = i; } } } return point; } COM: <s> returns the point that has the smallest associated distance value </s>
funcom_train/2558144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputNode node, Object source) throws Exception { Collection list = (Collection) source; if(group.isInline()) { if(!list.isEmpty()) { write(node, list); } else if(!node.isCommitted()){ node.remove(); } } else { write(node, list); } } COM: <s> the code write code method uses the name of the xml element to </s>
funcom_train/29030989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void RemoveComponent(String aMainId) throws RemoveExposedComponentException { // Verify if the component was not already added if ( this._chmExposedComponents.containsKey(aMainId) == false ) { throw new RemoveExposedComponentException(new Exception("The component ID " + aMainId + " is unknown")); } // Remove the component this._chmExposedComponents.remove(aMainId); this._ilcComponent.removeCalledComponent(aMainId); } COM: <s> remove a component exposition </s>
funcom_train/3749322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMailHostIMAP() { if (logger.isDebugEnabled()) { logger.debug("getMailHostIMAP() - start"); } if (logger.isDebugEnabled()) { logger.debug("getMailHostIMAP() - end - return value = " + mailHostIMAP); } return mailHostIMAP; } COM: <s> name or ip address of the host used to receive strong imap strong </s>
funcom_train/9810579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Player createPlayer(DataSource source) throws IOException, NoPlayerException { Player newPlayer; try { // First try and create one using the source // as the content identifier ... newPlayer = createPlayer(source, source.getContentType()); } catch (NoPlayerException e) { // ... if that doesn't work use the unknown-content type. newPlayer = createPlayer(source, UNKNOWN_CONTENT_NAME); } return newPlayer; } COM: <s> create a code player code for the code data source code </s>
funcom_train/44162859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doMission() { String reason = invalidReason(); if (reason != null) { logger.finest(tag + " broken(" + reason + "): " + this); return; } Direction d = Direction.getRandomDirection(tag, getAIRandom()); while ((d = moveRandomly(tag, d)) != null); } COM: <s> performs the mission </s>
funcom_train/41781928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public Type getType() { InvocationContext ctx= Meteor.getInvocationContext(); Object objType= ctx.proceed(); if (objType == null || !(objType instanceof Type)) { Type type= RepositoryImpl.findResourceByURI(_scope, _self._typeURI, Type.class); if (type != null) { _self.setType(type); return type; } } return (Type) objType; } COM: <s> lazily set the type when requested </s>
funcom_train/38277301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGroups_role(long group_id, long role_id) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException { Communities_groups_role communities_groups_roles = new Communities_groups_role(); communities_groups_roles.setCommunitie_id(this.getCommunitie_id()); communities_groups_roles.setGroup_id(group_id); communities_groups_roles.setRole_id(role_id); Communities_groups_rolesCollection.delete(communities_groups_roles); }; COM: <s> delete groups role attributes related to the communitie </s>
funcom_train/41826143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushBase64() throws java.io.IOException { if (position > 0) { if (encode) { out.write(Base64.encode3to4(b4, buffer, position, options)); position = 0; } // end if: encoding else { throw new java.io.IOException("Base64 input not properly padded."); } // end else: decoding } // end if: buffer partially full } // end flush COM: <s> method added by phil </s>
funcom_train/28684451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVariables(Map variables, Token token) { Iterator iter = variables.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Object value = entry.getValue(); setVariable(name, value, token); } } COM: <s> adds all the variable instances to the scope of the given token </s>
funcom_train/51119734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponent(Component component) { // Find first available place from the grid Area area; boolean done = false; while (!done) try { area = new Area(component, cursorX, cursorY, cursorX, cursorY); checkExistingOverlaps(area); done = true; } catch (OverlapsException ignored) { space(); } // Extend the grid if needed width = cursorX >= width ? cursorX + 1 : width; height = cursorY >= height ? cursorY + 1 : height; addComponent(component, cursorX, cursorY); } COM: <s> add a component into this container to the cursor position </s>
funcom_train/20590090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int span(int row, int column) { Object current_box = table_model.getValueAt(row, column); // If the current item at ROW and COLUMN is a timetable screening box if(current_box instanceof TimetableScreeningBox){ TimetableScreeningBox box = (TimetableScreeningBox)current_box; // Returns the box's size (the size of the cell) return box.getBoxSize(); } return 1; } COM: <s> returns how many cells a timetable item should span </s>
funcom_train/32079860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForeground (Color color) { checkWidget (); if (color != null && color.isDisposed ()) { SWT.error (SWT.ERROR_INVALID_ARGUMENT); } Color oldColor = foreground; if (oldColor == color) return; foreground = color; if (oldColor != null && oldColor.equals (color)) return; if ((parent.style & SWT.VIRTUAL) != 0) cached = true; redrawItem (); } COM: <s> sets the receivers foreground color to the color specified </s>
funcom_train/21633765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getMinValue(final int index) { double result = Double.MAX_VALUE; final long count = this.set.getRecordCount(); final MLDataPair pair = BasicMLDataPair.createPair( this.set.getInputSize(), this.set.getIdealSize()); for (int i = 0; i < count; i++) { this.set.getRecord(index, pair); result = Math.min(result, pair.getInputArray()[index]); } return result; } COM: <s> get the minimum over all the data for the specified index </s>
funcom_train/40560538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFirstWeekdayOfFirstWeekOfYear() throws Exception { runRecurrenceIteratorTest( "RRULE:FREQ=YEARLY;BYWEEKNO=1;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1", IcalParseUtil.parseDateValue("19990101"), 4, "19990104,20000103,20010101,20020101,..."); } COM: <s> find the first weekday of the first week of the year </s>
funcom_train/18727913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void export(final String fileName) { setFailure(null); if (fileName.length() == 0) { return; } try { exportTo(fileName); } catch (JaxoPluginExecutionException e) { setFailure(e); // this logs in debug mode if (e.getMessage() != null) { showErrorDialog(e.getMessage()); } } } COM: <s> export the current graph to the given nonempty file name </s>
funcom_train/39220379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDividers(JSplitPane splitpane, int dividerLoction) { BasicSplitPaneUI bspui = (BasicSplitPaneUI)splitpane.getUI(); bspui.getDivider().setVisible(true); splitpane.setEnabled(true); if (splitpane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) { tabbedPaneV.setVisible(true); setVDividerLocation(dividerLoction); } else { tabbedPaneH.setVisible(true); setHDividerLocation(dividerLoction); } } COM: <s> shows the dividers from the jsplitpane </s>
funcom_train/34531612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMenu() { gameMenu.setText(bundle.getString("gameMenu")); newGameMenu.setText(bundle.getString("newGameMenuItem")); exitGameMenu.setText(bundle.getString("exitMenuItem")); gameMenu.add(newGameMenu); gameMenu.add(exitGameMenu); mainMenuBar.add(gameMenu); setJMenuBar(mainMenuBar); } COM: <s> initializes the menu of the frame </s>
funcom_train/46631210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alg_Move_Pallet_Right(){ internal_rate.value = 10; Out_Pallet_X.value = Temp_X.value + internal_rate.value ; Out_Pallet_Y.value = Temp_Y.value ; Pist_X_C.value = Out_Pallet_X.value; Pist_Y_C.value = Out_Pallet_Y.value; Temp_X.value = Out_Pallet_X.value; Temp_Y.value = Out_Pallet_Y.value; } COM: <s> algorithm move pallet right in java </s>
funcom_train/48558243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand3() { if (backCommand3 == null) {//GEN-END:|151-getter|0|151-preInit backCommand3 = new Command("\u041D\u0430\u0437\u0430\u0434", Command.BACK, 0);//GEN-LINE:|151-getter|1|151-postInit }//GEN-BEGIN:|151-getter|2| return backCommand3; } COM: <s> returns an initiliazed instance of back command3 component </s>
funcom_train/36470063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLogFileName(String newName) { if (fLog != null) { try { fLog.close(); } catch (IOException ex) { new ReportException(ex).execute(); } fLog = null; } fileLogName = newName; myTrack.vPoints.setSize(0); } COM: <s> set the log file name </s>
funcom_train/10873611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token reinit(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset, String newType) { clearNoTermBuffer(); copyBuffer(newTermBuffer, newTermOffset, newTermLength); payload = null; positionIncrement = 1; startOffset = newStartOffset; endOffset = newEndOffset; type = newType; return this; } COM: <s> shorthand for calling </s>
funcom_train/28174815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDrawingEditor(DrawingEditor newValue) { DrawingEditor oldValue = drawingEditor; if (drawingEditor != null) { drawingEditor.removePropertyChangeListener(eventHandler); } this.drawingEditor = newValue; if (drawingEditor != null) { drawingEditor.addPropertyChangeListener(eventHandler); } updateActiveView(); } COM: <s> attaches the figure attribute editor handler to the specified drawing editor </s>
funcom_train/26391690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bump(int delta) { interpretation.index = Math.min( Math.max(interpretation.index + delta, 0)/* Maybe throw on <0?*/ , interpretation.definition.lastIndex() + 1 /* Past end.*/ ); /* No real reason to min() it, 'while' loop just exits.*/ } COM: <s> add positive or negative delta to the instruction pointer </s>
funcom_train/30040992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDigibots(int count) { for (int i = 0; i < count; i++) { float posX = rnd.nextFloat() * terrAttr.getSizeX(); float posY = rnd.nextFloat() * terrAttr.getSizeY(); float angle = rnd.nextFloat() * 360f; addDigibot(posX, posY, angle); } } COM: <s> create several digibots </s>
funcom_train/18525281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JProgressBar getThreadProgressBar() { try { if (threadProgressBar == null) { threadProgressBar = new JProgressBar(0, maxWidth); threadProgressBar.setValue(0); threadProgressBar.setStringPainted(true); threadProgressBar.setBorder(BorderFactory.createRaisedBevelBorder()); threadProgressBar.setBorderPainted(true); threadProgressBar.setForeground(java.awt.Color.blue); } } catch (Throwable exc) { handleException(exc); } return threadProgressBar; } COM: <s> return the thread progress bar property value </s>
funcom_train/9910773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillPojoDefinitionBySelf(PojoDefinition pojoDefinition) { List<ClassDefinition> classDefList = pojoDefinition.getClassDefList(); String strPackage = pojoDefinition.getStrPackage(); for (ClassDefinition classDef : classDefList) { if (classDef.getPackage() == null) { classDef.setPackage(strPackage); } fillClassDefinitionBySelf(classDef); } } COM: <s> fill pojo definition by itself </s>
funcom_train/39315355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRight1ActionPerformed() { System.out.println("testRight1ActionPerformed"); f.right1ActionPerformed(actionEvent); assertEquals(f.curBrush,f.right1); assertEquals(f.toolBrush.getBrushType(), f.toolBrush.RIGHT1); //t.right1ActionPerformed(actionEvent); //assertEquals(t.curBrush,t.right1); } COM: <s> test of right1 action performed method of class terp paint </s>
funcom_train/19306027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int recomputeProgressionDimension() { final CharSequence text = getText(); final Font font = this.getPrimaryFont().getFont(); final int pd = font.width(text, this.traitFontSize(), this.traitLetterSpacingOpt(), this.traitWordSpacingOpt(), true); return pd; } COM: <s> recomputes and resets from scratch the progression dimension of this </s>
funcom_train/29619910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMiCountryMaps() { if (miCountryMaps == null) { miCountryMaps = new JMenuItem(); miCountryMaps.setText(AppTextsDAO.get("MENUITEM_COUNTRY_MAPS")); miCountryMaps.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { FindCountryMapFrame fcmf = new FindCountryMapFrame(); getJDesktop().addAndShow(fcmf); } }); } return miCountryMaps; } COM: <s> this method initializes mi country maps </s>
funcom_train/12118036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC52(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.scadIncassiJMenuItem_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c52 scad incassi jmenu item </s>
funcom_train/4481282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTable(StockPrice[] prices) { for (int i = 0; i < prices.length; i++) { updateTable(prices[i]); } // Display timestamp showing last refresh. lastUpdatedLabel.setText("Last update : " + DateTimeFormat.getMediumDateTimeFormat().format(new Date())); } COM: <s> update the price and change fields all the rows in the stock table </s>
funcom_train/35073118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRefIdToRequst(BasicXmlDocument document, Subscription subscription) { if(subscription.getRefId() != null){ Element ref_id_el = document.createElement(AuthNetField.ELEMENT_REFID.getFieldName()); ref_id_el.appendChild(document.getDocument().createTextNode(subscription.getRefId())); document.getDocumentElement().appendChild(ref_id_el); } } COM: <s> add the ref uid to the subscription request </s>
funcom_train/2284217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initPredefinedVarsOfBaseSer() { if (_baseSer instanceof QuoteSer) { final QuoteSer quoteSer = (QuoteSer)_baseSer; O = quoteSer.getOpen(); H = quoteSer.getHigh(); L = quoteSer.getLow(); C = quoteSer.getClose(); V = quoteSer.getVolume(); } } COM: <s> override this method to define your own pre defined vars if necessary </s>
funcom_train/23867335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateGiroIsNumeric(final String giro) { if (!CString.isNumeric(giro)) { final FacesMessage message = hasMessage() ? getFormattedErrorMessage(giro) : JsfMessageUtil.getJosefErrorMessage(JsfMessages.NON_NUMERIC_DATA, giro); throw new ValidatorException(message); } } COM: <s> validates that the supplied giro account number is numeric </s>
funcom_train/14181171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onSubmit() { game.setSpectateable(getSpectatable()); if (started || DataProvider.getInstance().getGameList().add(game)) { started = true; getRequestCycle().setRequestTarget( (new JNLPCreator(game, getBGOSession().getUser(), true, getBGOSession().getId()).getTarget())); } } COM: <s> add the game to the list and start the client </s>
funcom_train/46633357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBrowseExportButton() { if (browseExportButton == null) { browseExportButton = new JButton(); browseExportButton.setBounds(new Rectangle(202, 62, 25, 19)); browseExportButton.setText("Browse"); browseExportButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { browseExport(); } }); } return browseExportButton; } COM: <s> this method initializes browse export button </s>
funcom_train/7531997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatistics(int commonLen, int currentLen, int lLen, int rLen) { int l = currentLen; while ((l <= commonLen) && (lLen > currentLen) && (rLen > currentLen)) { mStats.incCount(l + 1); if (commonLen > l) { mStats.incSamePath(l + 1, rLen); } else { mStats.incCompPath(l + 1, rLen); } l++; } } COM: <s> updates the statistics during an exchange </s>
funcom_train/20044834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getInputStream() { requiredMethod("setInputStream()") ; Object oldStream = oObj.getInputStream() ; XInputStream newStream = oldStream == null ? iStream : null ; oObj.setInputStream(newStream) ; Object getStream = oObj.getInputStream() ; tRes.tested("getInputStream()", getStream != oldStream) ; } COM: <s> first retrieves current input stream then sets to new </s>
funcom_train/21035032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doMouseDragged(MouseEvent e) { // System.out.println ("Dragged " + "(" + e.getX() + "," + e.getY() + ")" + " detected on " + e.getComponent().getClass().getName() + " "); } COM: <s> does something if mouse was dragged </s>
funcom_train/4126077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getProductivity(Unit... additionalUnits) { if (getGoodsOutputType() == null) { return 0; } int productivity = 0; for (Unit unit : units) { productivity += getUnitProductivity(unit); } for (Unit unit : additionalUnits) { if (canAdd(unit)) { productivity += getUnitProductivity(unit); } } return productivity; } COM: <s> returns the maximum productivity of worker s currently working </s>
funcom_train/1926348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (!(other instanceof MethodSig)) return false; MethodSig os = (MethodSig)other; //System.err.print("Comparing "+this+" against "+os+": "); boolean result = cl.equals(os.cl) && rtype.equals(os.rtype) && name.equals(os.name) && formals.equals(os.formals); //System.err.println(result); return result; } COM: <s> checks whether the two method signatures refer to the same method </s>
funcom_train/19214749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { if (logger.isDebugEnabled()) { logger.debug("compare(Object, Object) - start"); //$NON-NLS-1$ } int returnint = ((ILocation) o1).getName().compareToIgnoreCase(((ILocation) o2).getName()); if (logger.isDebugEnabled()) { logger.debug("compare(Object, Object) - end"); //$NON-NLS-1$ } return returnint; } COM: <s> vergleicht zwei uebergebene code ilocation code auf ihre alphabetische reihenfolge </s>
funcom_train/34570643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDsIndex(String dsName) throws IOException { for (int i = 0; i < datasources.length; i++) { if (datasources[i].getDsName().equals(dsName)) { return i; } } throw new IllegalArgumentException("Unknown datasource name: " + dsName); } COM: <s> returns internal index number for the given datasource name </s>
funcom_train/46825666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String checkContentType(String possibleType) { // If there is no type, then default to plain text if (possibleType == null) { return ("text"); } // If it isn't HTML or RTF, then default to plain text if ( !(possibleType.equals("text/html")) && !(possibleType.equals("text/rtf"))) { return ("text"); } return (possibleType); } COM: <s> check the content type string to make sure it is a known type </s>
funcom_train/28984254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCbFruehlingAussen() { if (cbVegPeriodAussen == null) { cbVegPeriodAussen = new JCheckBox(); cbVegPeriodAussen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { farbenAussen[0] = new Filling(labelVegPeriodAussen.getBackground(), cbVegPeriodAussen.isSelected()); } }); } return cbVegPeriodAussen; } COM: <s> this method initializes cb fruehling aussen </s>
funcom_train/50703166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jMenuFileExit_actionPerformed(ActionEvent e) { //saveNote(); if (editor.getText().length() > 0) { book.setNote(date,editor.getText()); book.finalSave(); } if (evPanel.saveData()) { events.finalSave(); } books.setDefaultBook(book); System.exit(0); } COM: <s> file exit action performed </s>
funcom_train/40944011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Calendar getCalendar() { // Makes sure we have an calendar instance if (calendar == null) { calendar = Calendar.getInstance(); } // Clone the instance final Calendar newCal = (Calendar) calendar.clone(); // Assigns the current time tom calendar. final Date currentDate = (Date) getValue(); if (currentDate != null) { newCal.setTime(currentDate); } return newCal; } COM: <s> returns new instance calendar used in date conversions </s>
funcom_train/12804406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit() { try { getSession().commit(); } catch(TransactionRolledBackException e) { throw new EnvironmentalException( "Failed to commit the Session transaction due to an" + "internal error.", e); } // due to some internal error. catch(JMSException e) { throw new EnvironmentalException( "Failed to commit the Session transaction due to an" + "internal JMS error.", e); } } COM: <s> commit all messages done in this transaction and releases any locks </s>
funcom_train/48497470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object mapRow (ResultSet rs, int rowNumber) throws SQLException { ProjectProgressDTO project = new ProjectProgressDTO(); project.setProject_id(rs.getInt("project_id")); project.setName(rs.getString("name")); project.setInitialEstimation(rs.getInt("estimation")); project.setOngoing(rs.getBoolean("ongoing")); project.setHidden(rs.getBoolean("hidden")); project.setFinalEstimation(rs.getInt("final")); return project; } COM: <s> map the resulted row to a project dto object </s>
funcom_train/3111388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisible(boolean visible) { if (this.visible != visible) { // Get the appearance Appearance boxAppearance = getAppearance(); // Get the rendering attributes RenderingAttributes boxRenderingAttributes = boxAppearance.getRenderingAttributes(); boxRenderingAttributes.setVisible(visible); boxAppearance.setRenderingAttributes(boxRenderingAttributes); this.visible = visible; } } COM: <s> sets whether the box is visible </s>
funcom_train/46744644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisitId(Long visitId) { if (!(this.visitId.longValue() == visitId.longValue())) { Long oldvisitId= 0L; oldvisitId = this.visitId.longValue(); this.visitId = visitId.longValue(); setModified("visitId"); firePropertyChange(String.valueOf(ORDERS_VISITID), oldvisitId, visitId); } } COM: <s> visit for this order </s>
funcom_train/9140411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet getResultSet(int start, int length) { length = length < docids.length ? length : docids.length; QueryResultSet resultSet = new QueryResultSet(length); System.arraycopy(docids, start, resultSet.getDocids(), 0, length); System.arraycopy(scores, start, resultSet.getScores(), 0, length); System.arraycopy(occurrences, start, resultSet.getOccurrences(), 0, length); return resultSet; } COM: <s> crops the existing result file and extracts a subset </s>
funcom_train/44852696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOpenFromRequested(WorkflowAwareContribution inQuestion, Object[] inArgs) throws WorkflowException, VException, SQLException { inQuestion.doTransition(WorkflowAwareContribution.TRANS_ADMIN_REOPEN2, inArgs); reopenAncestors(new ReopenFromAnsweredProcessor(inArgs), inQuestion, inArgs); } COM: <s> reopens a question after this state change has been requested </s>
funcom_train/43915718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void encodePlacemarkLookAt(Coordinate centroid) { start("LookAt"); element("longitude", Double.toString(centroid.x)); element("latitude", Double.toString(centroid.y)); element("range", "700"); element("tilt", "10.0"); element("heading", "10.0"); end("LookAt"); } COM: <s> encods a kml placemark look at from a geometry centroid </s>
funcom_train/44010019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int handleWrite(int fileId, int bufAdd, int count) { OpenFile file = (OpenFile) openFiles.get(fileId); if (file == null) return -1; byte[] buffer = new byte[count]; int num = readVirtualMemory(bufAdd, buffer); return file.write(buffer, 0, num); } COM: <s> handle write system call </s>
funcom_train/21218251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rlca() { // Backup copy of register int temp = reg; // Shift register left reg = (reg << 1) & 0xff; // Transfer Original Bit 7 to Bit 0 and Carry Flag if ((temp & 0x80) == 0x80) { f.carryOn(); reg |= 0x01; } else { f.carryOff(); } f.negativeOff(); f.halfCarryOff(); } COM: <s> rlca operation rotate left with carry accumulator </s>
funcom_train/10009533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startRange(Date startDate) { int rangeIndex = rangeIndexOf(startDate); if (rangeIndex < 0) { DateRange range = new DateRange(startDate, null); rangeIndex = ranges.size(); ranges.add(range); } lastStartRangeIndex = rangeIndex; } COM: <s> starts a new range of dates </s>
funcom_train/11729589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPath() throws RepositoryException { Node n1 = testRootNode.addNode(nodeName1, testNodeType); testRootNode.save(); String expected = testRootNode.getPath() + "/" + nodeName1; assertEquals("Wrong path for created node.", expected, n1.getPath()); } COM: <s> tests if the path of the created node is correct </s>
funcom_train/7615420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle intersection(Rectangle r) { int x1 = Math.max(x, r.x); int y1 = Math.max(y, r.y); int x2 = Math.min(x + width, r.x + r.width); int y2 = Math.min(y + height, r.y + r.height); return new Rectangle(x1, y1, x2 - x1, y2 - y1); } COM: <s> returns the intersection of the original rectangle with the specified </s>
funcom_train/31069557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getFloatProperty(String name) throws PropertyNotFoundException { float f; try { String value = (String) getStringProperty(name); f = org.embedlet.lang.Float.parseFloat(value); } catch (Exception ex) { throw new PropertyNotFoundException(ex, name); } return f; } COM: <s> retrieve the float property keyed by name throw an exception if not found </s>
funcom_train/51299260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showRoleDictionary() { int role_id; int row; JList tmp; tmp = lsRoles; row = tmp.getSelectedIndex(); Role role = ((RolesListModel) tmp.getModel()).getElementAtRow(row); role_id = role.getRootId(); switch (role_id) { case 1: case 2: called = new PartnersGuide(this, (Partner) role); called.setVisible(true); return; case 3: called = new EmployeeGuide(this, (Employee) role); called.setVisible(true); } } COM: <s> display roles for selected contractor </s>
funcom_train/17004653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processMessageFromNetwork(SOAPMessage soapMessage) { try { int position = 1; SOAPContext soapContext = soapContextFactory.newSOAPContext(soapMessage); propagateMessageTowardsApplication(soapContext, position); } catch (DeploymentException de) { System.out.println(moduleName + de.toString() + "\n"); de.printStackTrace(); } } COM: <s> process a message received over the network </s>
funcom_train/22438017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gettingDependencies( DBDependencyEvent e ) { this.setMessage( "Getting " + (e.isDependees() ? "dependees":"dependents") + " of " + e.getDBObject().owner + "." + e.getDBObject().objectname + "..." ); } COM: <s> this method is called during the process of determining the dependencies </s>
funcom_train/15602648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date parseRequestDate(String requestDate) { Date dt = null; try { String[] tokens = requestDate.split("-"); int day = Integer.parseInt(tokens[0]); int month = Integer.parseInt(tokens[1]) - 1; int year = Integer.parseInt(tokens[2]); dt = new GregorianCalendar(year,month,day).getTime(); } catch (Throwable ignored) { // I am ignoring any errors !!! } return dt; } COM: <s> given a string dd mm yyyy returns the corresponding date object </s>
funcom_train/14307847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireDirectoryRemoved(ProjectDirectory aDirectory, int index) { if (!fireEvents) return; ProjectEvent evt = new ProjectEvent(this, aDirectory, index); for(int i = 0; i < listeners.size(); i++) ((ProjectListener)listeners.get(i)).directoryRemoved(evt); } COM: <s> fire notification that a project directory has been removed </s>
funcom_train/26489058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int handlesinglepixel(int red,int green,int blue,int alpha) { red = MediaToolBox.signedByteToUnsigned(red); green = MediaToolBox.signedByteToUnsigned(green); blue = MediaToolBox.signedByteToUnsigned(blue); alpha = MediaToolBox.signedByteToUnsigned(alpha); if(red*green*blue/3>128){ return 0; } else{ return 1; } } COM: <s> method used to convert a pixel to black or white pixel </s>
funcom_train/35750478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Transactional resolveAnnotation(final MethodInvocation methodInvocation) { Transactional annotation = null; Method method = methodInvocation.getMethod(); Class<?> targetClass = methodInvocation.getThis().getClass().getSuperclass(); if (method.isAnnotationPresent(Transactional.class)) { annotation = method.getAnnotation(Transactional.class); } else if (targetClass.isAnnotationPresent(Transactional.class)) { annotation = targetClass.getAnnotation(Transactional.class); } return annotation; } COM: <s> returns the transactional annotation if it exists and null if it does not </s>
funcom_train/5255027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFirstNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Person_firstName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Person_firstName_feature", "_UI_Person_type"), CompanytracPackage.eINSTANCE.getPerson_FirstName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the first name feature </s>
funcom_train/25659686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putInCache(BLoMoDTO dto, Object id) { Map<Object,BLoMoDTO> cacheForClass=fullcache.get(dto.getClass()); if ( cacheForClass==null ) { cacheForClass = new Hashtable<Object,BLoMoDTO>(); fullcache.put(dto.getClass(), cacheForClass); } cacheForClass.put(id, dto); } COM: <s> stores a dto with a certain id </s>
funcom_train/27899554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid(TagData data) { Object mode = data.getAttribute("mode"); if ( mode != null && mode != TagData.REQUEST_TIME_VALUE ) { String smode = (String)mode; if ( smode.equals("viewing") || smode.equals("editing") || smode.equals("project") || smode.equals("none") ) { return true; } } return false; } COM: <s> checks the validity of the mode attributes value </s>
funcom_train/8249181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPassPhraseFromFile() throws IOException { if(isPassphraseFileCorrect()) { FileReader fr = null; BufferedReader br = null; try { StringBuffer buffer = new StringBuffer(); fr = new FileReader(passphraseFile); br = new BufferedReader(fr); String line = null; while((line = br.readLine()) != null) { buffer.append(line); } return buffer.toString(); } finally { if(fr != null) { fr.close(); } if(br != null) { br.close(); } } } else { return null; } } COM: <s> retrieves the passphrase from the file </s>
funcom_train/37508228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTextImageWidth() { if (m_textImageWidth == null) { m_textImageWidth = new JTextField(); m_textImageWidth.setPreferredSize(new Dimension(50, m_textImageWidth.getPreferredSize().height)); } return m_textImageWidth; } COM: <s> returns the textfield for the image width </s>
funcom_train/37033533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void release() { entries = null; if (base != null) { try { base.close(); } catch (IOException e) { System.out.println ("Exception closing WAR File " + base.getName()); e.printStackTrace(System.out); } } base = null; super.release(); } COM: <s> release any resources allocated for this directory context </s>
funcom_train/36385352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity( int capacity ) { if ( capacity > _data.length ) { int newCap = Math.max( _data.length << 1, capacity ); char[] tmp = new char[ newCap ]; System.arraycopy( _data, 0, tmp, 0, _data.length ); _data = tmp; } } COM: <s> grow the internal array as needed to accommodate the specified number of elements </s>
funcom_train/17927546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node cloneNode(boolean forceDuplicate) { TruncatedCone c = /* , bDrawCaps */new TruncatedCone(radius1, radius2, height, flags, xdivisions, ydivisions, getAppearance()); c.duplicateNode(this, forceDuplicate); return c; } COM: <s> used to create a new instance of the node </s>
funcom_train/39146831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCanvas(Canvas canvas) { if (this.canvas != canvas && this.canvas != null && !this.canvas.isDisposed()) { this.canvas.removeKeyListener(this); this.canvas.removeMouseListener(this); this.canvas.removeMouseMoveListener(this); } this.canvas = canvas; if (canvas != null) { canvas.addKeyListener(this); canvas.addMouseListener(this); canvas.addMouseMoveListener(this); } } COM: <s> set canvas to listen to input events </s>
funcom_train/18749276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean handlePreview(String okOption) { AspectJModel previewedModel = showPreviewDialog(toView(), okOption); if (previewedModel != null) { setSelectInsertedCells(false); getModel().replace(GraphJModel.newInstance(previewedModel.toPlainGraph(), getOptions())); setSelectInsertedCells(true); return true; } else { return false; } } COM: <s> shows a preview dialog and possibly replaces the edited graph by the </s>
funcom_train/28672772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultMergePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BeansType_defaultMerge_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BeansType_defaultMerge_feature", "_UI_BeansType_type"), BeansPackage.Literals.BEANS_TYPE__DEFAULT_MERGE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the default merge feature </s>
funcom_train/28353883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSelectedCavs() { tunePending.clear(); theDoc.deselectAllCavities(); for (int i=0; i < summaryTableModel.getRowCount(); i++) { String name = ((SCLCavity) theDoc.theSCLCavs.get(i)).getId(); if(summaryTable.isRowSelected(i)) { tunePending.add( name); theDoc.useCavities.put(name, new Boolean(true)); } } updateSummaryTable(); } COM: <s> set the selected cavities as ones you want to automatically tune </s>
funcom_train/34141958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void playEarcon(String earcon, int queueMode, HashMap<String, String> params) { if (mTts != null) { mTts.playEarcon(earcon, queueMode, params); } else if (mTtsExtended != null) { mTtsExtended.playEarcon(earcon, queueMode, params); } } COM: <s> abstraction that calls play earcon on either tts or tts extended </s>
funcom_train/50395998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createMetadata(String resourceName, Map<String,String>meta)throws Exception{ CreateMetadataDocument req=CreateMetadataDocument.Factory.newInstance(); req.addNewCreateMetadata().setResourceName(resourceName); req.getCreateMetadata().setMetadata(convert(meta)); CreateMetadataResponseDocument res=metadataManagement.CreateMetadata(req); return res.getCreateMetadataResponse().getMetadataCreated(); } COM: <s> create new metadata for the given resource </s>
funcom_train/18125053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("TrustReputationServicePortTypePort".equals(portName)) { setTrustReputationServicePortTypePortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/8096715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMissingClass() { int i; for (i = FIRST_CLASSTYPE; i <= LAST_CLASSTYPE; i++) { // does the Associator support this type of class at all? if (!canPredict(i)) continue; // 20% missing checkMissingClass(i, 20, true); // 100% missing if (m_handleMissingClass[i]) checkMissingClass(i, 100, true); } } COM: <s> tests whether the associator can handle missing class values 20 and </s>
funcom_train/29830042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getPrefTabs(Vector components, Vector names) { components.clear(); names.clear(); Enumeration pluginEnum = plugins.elements(); while (pluginEnum.hasMoreElements()) { BSPlugin p = (BSPlugin) pluginEnum.nextElement(); p.getPreferencesTab(components, names); } } COM: <s> gets tabs for preferences and their names </s>
funcom_train/21295897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int calculateLowestSurface( int[] surface, int start, int end ) { /* We have to start somewhere */ int lowest = surface[ start ]; /* Find the lowest surface value */ for( int index = start+1; index < end; index++ ) { if( surface[ index ] < lowest ) { lowest = surface[ index ]; } } /* There ya go */ return lowest; } COM: <s> finds the lowest surface height in the given surface </s>
funcom_train/12603717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getChannelStrengthWithCalibration() { double cs = channelStrengthWithCalibration == 0 ? channelStrength : channelStrengthWithCalibration; if(getNormalizedFactor() > 0) { return new BigDecimal(cs).divide(new BigDecimal(getNormalizedFactor()), new MathContext(5, RoundingMode.HALF_UP)).doubleValue(); } return cs; } COM: <s> this is the calibrated value </s>
funcom_train/1558021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean isCommandAvailable(Command cmd) { StringBuilder sbCASCommand = new StringBuilder(); sbCASCommand.append(cmd.getName()); sbCASCommand.append("."); sbCASCommand.append(cmd.getArgumentNumber()); if (cas.isCommandAvailable(sbCASCommand.toString())) return true; sbCASCommand.setLength(0); sbCASCommand.append(cmd.getName()); sbCASCommand.append(".N"); if (cas.isCommandAvailable(sbCASCommand.toString())) return true; else return false; } COM: <s> returns whether the given command is available in the underlying cas </s>
funcom_train/31900502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { if (updated != null) { if (updated.getRunning() == true) { int result = JOptionPane.showConfirmDialog(mainFrame, StringResources.getString("updater.running"), StringResources.getString("updater.running.title"), JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE); if (result == JOptionPane.YES_OPTION) { mainFrame.dispose(); //System.exit(0); } } else { mainFrame.dispose(); //System.exit(0); } } else { mainFrame.dispose(); //System.exit(0); } } COM: <s> a convenience method to check for certain things before we close </s>
funcom_train/37268278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component add(Component comp){ Component added = null; if(getComponentCount() < 1){ added = super.add(comp); } else{ try { throw new Exception("Component already added, can only contain one component"); } catch (Exception e) { logger.warn(Util.getStackTrace(e)); } } return added; } COM: <s> overrides the super implementation so </s>