__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13199590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resource get() throws TuboResourceException { Resource resource = null; try { resource = (Resource)getPool().borrowObject(); } catch (Exception e) { log.fatal(".get() - Error getting resource.",e); TuboResourceException ex = new TuboResourceException("Error getting resource",e); throw ex; } return resource; } COM: <s> get a resource from pool </s>
funcom_train/46840232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KException add(String attr, Object value) { m_contextData.put(attr, value); m_yamlMsg.append("\n ").append(attr).append(": ").append(value.toString()); return this; // to be returned to throw statement } COM: <s> this method adds attributes </s>
funcom_train/38531857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProjectMember addMember(ProjectMember member) { int index; index = listMembers.indexOf(member); if ( index > -1 ) { return (ProjectMember)listMembers.get(index); } listMembers.add(member); fireMemberAdded(member); setDirty(true); return member; } COM: <s> adds a source member to the project </s>
funcom_train/22278981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void center() { java.awt.Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle b = new Rectangle(this.bounds()); b.x = (int)Math.floor((double)(screenSize.width - b.width) / 2.0); b.y = (int)Math.floor((double)(screenSize.height - b.height) / 2.0); this.setBounds(b); } COM: <s> centers the external window as well as possible for a native window </s>
funcom_train/13366741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(Map<String, Object> aParameters, IViewSite aSite) { IActivity activity = new Activity(this, aSite); activity.nextAction(aParameters, new ActionDefinition.TargetMapping(CallType.FORWARD, firstAction, parameterMapping), null); } COM: <s> starts the activity </s>
funcom_train/130077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteSelection() { try { int startLocation = getCaretLocation()-getSelectionLength(); document.remove( startLocation, getSelectionLength() ); setCaretLocation( startLocation ); } catch (BadLocationException ble) { logger.throwing( getClass().getName(), "deleteSelection", ble ); } } COM: <s> deletes the text that falls within the selection </s>
funcom_train/43897864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getArea(Geometry geometry) { double area = 0.0d; if (geometry instanceof GeometryCollection) { area += getArea((GeometryCollection) geometry); } else if (geometry instanceof MultiPolygon) { area += getArea((MultiPolygon) geometry); } else if (geometry instanceof Polygon) { area += getArea((Polygon) geometry); } else { area += 0.0d; } return area; } COM: <s> calculates and returns the area of the specified geometry </s>
funcom_train/51102784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List buildFileList() { List projectFiles = new ArrayList(); Iterator nodes = treeNodes(); while (nodes.hasNext()) { ProjectPath nodePath = (ProjectPath) nodes.next(); Object obj = nodePath.getObject(); ProjectFile f = projectFileForObject(obj); if (f != null) { projectFiles.add(f); } } return projectFiles; } COM: <s> creates a list of project files </s>
funcom_train/2033665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuscarReserva() { System.out.println("buscarReserva"); int s = 0; Reserva instance = new Reserva(); Reserva expResult = null; Reserva result = instance.buscarReserva(s); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of buscar reserva method of class reserva </s>
funcom_train/1578398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawDirectedLink(final Color c, final int fromX, final int toX, final int fromY, final int toY) { drawInit(c); g2.drawLine(fromX, fromY, toX, toY); int dx = toX + (fromX - toX) / 6; int dy = toY + (fromY - toY) / 6; g2.fillRectangle(dx - 2, dy - 2, 5, 5); } COM: <s> draws a directed link a line with a square head from the specified </s>
funcom_train/37772286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GridModel getRelatedOutputCommandWM() { GridModel rows = (GridModel) getWidgetCache().getModel("relatedOutputCommand"); if (rows == null) { rows = new GridModel(); populateRelatedOutputCommand(rows); getWidgetCache().addModel("relatedOutputCommand", rows); } return rows; } COM: <s> getter for property related output command </s>
funcom_train/25441078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoUpdate(final Integer ms) { stopAutoUpdate(); updThread = new Thread(){ public void run() { try { while(!this.isInterrupted()) { update(); sleep(ms); } } catch (Exception e){ logger.error(e); } } }; updThread.start(); } COM: <s> enable autoupdate with given refresh rate </s>
funcom_train/16422934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(300, 200); this.setLayout(new BorderLayout()); this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); // Generated this.add(getFileStatusBar(), BorderLayout.SOUTH); // Generated this.add(getTopFileBarsPanel(), BorderLayout.PAGE_START); // Generated this.add(getScroolFilePane(), BorderLayout.CENTER); // Generated } COM: <s> this method initializes this </s>
funcom_train/48386043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WMEntity closePackage(WMConnectInfo connectInfo, final String packageId, final String packageVersion) { return (WMEntity) execute(connectInfo, new EnhydraSharkSessionCallback() { public Object doWithEnhydraSharkSession(SharkInterface sharkInterface, SharkConnection sharkConnection, WMSessionHandle sessionHandle) throws Exception { return getPackageAdministration().closePackage(sessionHandle, packageId, packageVersion); } }); } COM: <s> close a package given the package identifier and version </s>
funcom_train/9869540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFecpublicacion(java.util.Date newVal) { if ((newVal != null && this.fecpublicacion != null && (newVal.compareTo(this.fecpublicacion) == 0)) || (newVal == null && this.fecpublicacion == null && fecpublicacion_is_initialized)) { return; } this.fecpublicacion = newVal; fecpublicacion_is_modified = true; fecpublicacion_is_initialized = true; } COM: <s> setter method for fecpublicacion </s>
funcom_train/31079304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(DataOutput out) throws IOException { out.writeShort(_entries.size() + 1); Entry entry; for (Iterator itr = _entries.iterator(); itr.hasNext();) { entry = (Entry) itr.next(); if (entry != null) Entry.write(entry, out); } } COM: <s> write the constant pool to the given bytecode stream </s>
funcom_train/33425948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void complete(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate, Map result) throws WfException { WfAssignment assign = WfFactory.getWfAssignment(delegator, workEffortId, partyId, roleTypeId, fromDate); if (result != null && result.size() > 0) assign.setResult(result); assign.complete(); } COM: <s> complete an activity assignment and follow the next transition s </s>
funcom_train/20963860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initCommon () { this.fitness = problem.getDefaultFitness(); this.bestConfiguration = this.activeConfiguration; this.bestFitness = this.fitness.getValue(this.activeConfiguration); // calculate fitness this.activeFitness = this.fitness.getValue(this.activeConfiguration); this.activeNormalizedFitness = this.fitness.normalize(activeFitness); } COM: <s> part of init common to all initialization types </s>
funcom_train/2804817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evaluate(EngineInterface i) throws ExcptnRoot { i.printlnDebugInfo("Equals"); i.setCallback(this,"_evaluateLeft","java.lang.Object"); // During the input phase left.evaluate() is never returned from. left.evaluate(i); return value.booleanValue(); } COM: <s> compares two object and returns the result of that comparison </s>
funcom_train/4969173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tuple3d nextTuple3f(double minValue, double maxValue) { double a = nextDouble() * (maxValue - minValue) + maxValue; double b = nextDouble() * (maxValue - minValue) + maxValue; double c = nextDouble() * (maxValue - minValue) + maxValue; return new Tuple3d(a, b, c); } COM: <s> creates a new tuple3f with random values between given min and max </s>
funcom_train/34233287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void procResult(String ip, String data) { // Connects to database and enters results printLogMessage("RESULT from " + ip + " " + data); String[] resultsArray = data.split(","); try { for (String d : resultsArray) { resultsBuffer.add(d + "," + ip); } } catch (InterruptedException e) { printLogMessage(e.toString()); } }// Close procResult COM: <s> processing for a received result command </s>
funcom_train/7439707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SearchResultTable ( final Search search ) { super( new SearchResultTableModel( search ) ); changeLanguage(); // name the content columns int column = SearchResultTableModel.staticColumnount; for ( final Term term: ( (SearchResultTableModel) getModel() ).getTerms() ) { this.columnModel.getColumn( column++ ).setHeaderValue( term.text() ); } } COM: <s> a specific jtable </s>
funcom_train/25505622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getAuto() { if (auto == null) { auto = new JRadioButton(); auto.setText(LocalizationData.get("PreferencesDialog.AutoUpdate.atStartup")); //$NON-NLS-1$ auto.setToolTipText(LocalizationData.get("PreferencesDialog.AutoUpdate.atStartup.toolTip")); //$NON-NLS-1$ } return auto; } COM: <s> this method initializes auto </s>
funcom_train/18166357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IArchive manage(File f) throws Exception { String fileName = f.getName().toLowerCase(); if (fileName.endsWith(JAR_ARCHIVE)) { return new JarArchive(imd5, f); } else if (fileName.endsWith (ZIP_ARCHIVE)) { return new ZipArchive(imd5, f); } throw new Exception (fileName + " belongs to unsupported archive type."); } COM: <s> return an object capable of managing access to the given archive file </s>
funcom_train/1421052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadBombersTextures(final String[] bombers, final String tilePath) { mBomberTextures = new Texture[bombers.length]; for (int i = 0; i < bombers.length; i++) { builder.delete(0, builder.length()); builder.append(IMAGES_FOLDER).append(tilePath).append("/BombersOld/emo_im_happy.png"); mAtlas2.insert(mBomberTextures[i] = new Texture(builder.toString())); } } COM: <s> load bomberman textures and animations </s>
funcom_train/35607333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetHourCmbBoxColor() { List<HourTaskForm> list = cmbHourSelector.hourFormList; for (int i = 0; i < list.size(); i++) { HourTaskForm form = (HourTaskForm) list.get(i); form.setChecked(false); } cmbHourSelector.resetColor(); logger.info("[resetHourCmbBoxColor]"); } COM: <s> reset hour selector color to default </s>
funcom_train/22783044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { // get index clicked on int index = Integer.parseInt(e.getActionCommand()); // setup sorter Comparator<Image> newSorter = getSorter().get(index).comparator; // if sorter is selected twice => revert sorting if (newSorter == lastSorter) { ComparatorChainProxy<Image> chain = new ComparatorChainProxy<Image>(); chain.addComparator(newSorter, true); newSorter = chain; } // setup new sorter control.setSorting(newSorter); lastSorter = newSorter; } COM: <s> react on event </s>
funcom_train/44705224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: //public void actionPerformed(ActionEvent event) { //PageState state = event.getPageState(); //Component pane = m_tabbedPane.getCurrentPane(state); //if ( pane == m_browse ) { // MP: reset tasks pane //} else if ( pane == m_search ) { //m_search.reset(state); //} //} COM: <s> when a new tab is selected reset the state of the </s>
funcom_train/19064808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int encodeNextCharacter() throws IOException { int read = in.read(); if( read == -1) return -1; inBytes.clear(); inBytes.put(0,(char) read); outBytes.clear(); CoderResult result = encoder.encode( inBytes, outBytes, in.available() == 0 ); // If the character cannot be encoded add a dummy character if( result.isMalformed() || result.isUnmappable() ) { outBytes.put((byte)0); return outBytes.limit(); } return outBytes.position(); } COM: <s> read one character and encode it to the according charset </s>
funcom_train/26169220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream os, String crlf) throws IOException { os = new BufferedOutputStream(os); os.write(new String(version + " " + getStatusLine() + crlf).getBytes()); super.write(os,crlf); os.flush(); } COM: <s> writes the response to the supplied output stream using the provided crlf value </s>
funcom_train/21210007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String info() { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(name); sb.append(" - "); String info = getClientIdentifiable(this); if(info!=null) { sb.append("[ClientInfo: "); sb.append(info); sb.append(']'); } if(getSocket()==null || getSocket().isClosed()==true) { sb.append("[non-connected]"); } else if(info==null) { sb.append('['); sb.append(hostAddress); sb.append(':'); sb.append(port); sb.append(']'); } sb.append('}'); return sb.toString(); } COM: <s> returns the client handler detailed information </s>
funcom_train/9878227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBinColorRanges() { LEMColorRangeSelector selector = new LEMColorRangeSelector((JFrame)framework.getFrame(), this, this.lowestColor, this.lowerColor, this.higherColor, this.highestColor, this.cutoff1, this.cutoff2, this.midBinValue, this.cutoff3, this.cutoff4); selector.showModal(); } COM: <s> launches a code lemcolor range selector code to collect range and color information </s>
funcom_train/50911698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCMLValue(boolean[] bb) { checkValue(bb); this.bb = new boolean[bb.length]; for (int i = 0; i < bb.length; i++) { this.bb[i] = bb[i]; } this.setValue(Util.concatenate(bb, CMLConstants.S_SPACE)); } COM: <s> sets and checks value </s>
funcom_train/8717214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttributes(String definitions, int separator) { List<String> attrs = new ArrayList<String>(); CodeGenerator.getListOfArgumentsFromAction(definitions,0,-1,separator,attrs); for (String a : attrs) { Attribute attr = new Attribute(a); if ( !isReturnScope && attr.initValue!=null ) { ErrorManager.grammarError(ErrorManager.MSG_ARG_INIT_VALUES_ILLEGAL, grammar, derivedFromToken, attr.name); attr.initValue=null; // wipe it out } attributes.put(attr.name, attr); } } COM: <s> from a chunk of text holding the definitions of the attributes </s>
funcom_train/25753322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDate(GregorianCalendar cal, boolean fromDateField) { date = cal; date.setLenient(false); ready = true; monthLabel.setText(monthNames.get(cal.get(Calendar.MONTH))); yearLabel.setText("" + cal.get(Calendar.YEAR)); updateDayGrid(fromDateField); } COM: <s> updates the dialogs controls with the passed in date </s>
funcom_train/640231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void detectCycles(SGYElement element) { SGYElement nextElement; element.cycleDetectionVisited = 1; for (ArcModel arc : element.arcsOut) { nextElement = vertices.get(arc.getTargetId()); //checking if the following element was already visited. If this is the case, here is a cycle. if (nextElement.cycleDetectionVisited == 0) detectCycles(nextElement); else if (nextElement.cycleDetectionVisited == 1) cycleArcs.add(arc); } element.cycleDetectionVisited = 3; } COM: <s> cycle detection fills the </s>
funcom_train/25141201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSPNoParams() throws Exception { if (versionMeetsMinimum(5, 0)) { CallableStatement storedProc = null; createProcedure("testSPNoParams", "()\n" + "BEGIN\n" + "SELECT 1;\n" + "end\n"); storedProc = this.conn.prepareCall("{call testSPNoParams()}"); storedProc.execute(); } } COM: <s> tests parsing execution of stored procedures with no parameters </s>
funcom_train/47985357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Measurement convertToMeasurement(List<ScanResult> results) { BeaconMeasurement meas; if(results.size() == 0) { //no WifiScanResults available meas = new BeaconMeasurement(System.currentTimeMillis(),BeaconMeasurement.noWifiReadings); } else { //WifiScanResults available, so convert them meas = new BeaconMeasurement(System.currentTimeMillis()); for(ScanResult sr : results) { WiFiReading wifi = new WiFiReading(sr.BSSID,sr.SSID,sr.level,true,true); meas.addReading(wifi); } } return meas; } COM: <s> method for converting list scan result to place lab measurement </s>
funcom_train/42896951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDesiredCapacity(String autoScalingGroupName, int desiredCapacity) throws AutoScalingException { Map<String, String> params = new HashMap<String, String>(); params.put("AutoScalingGroupName", autoScalingGroupName); params.put("DesiredCapacity", ""+desiredCapacity); HttpGet method = new HttpGet(); // SetDesiredCapacityResponse response = makeRequestInt(method, "SetDesiredCapacity", params, SetDesiredCapacityResponse.class); } COM: <s> adjusts a auto scaling groups capacity </s>
funcom_train/47899893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocumentHandle revert() { // loaded from a file if(storeBookAsFile){ Logger.logWarn("WebWorkBook.update: resetting file-stored workbook:"+toString()); reset(); return this; } if (memeId==-1) Logger.logWarn("WebWorkBook.update: memeId not set"); else try { parseAndBind(this, memeId); } catch (Exception e) { Logger.logErr("WebWorkBook.update failed.",e); } return this; } COM: <s> retrieve the latest from the db and replaces current workbook </s>
funcom_train/1864794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw() throws IOException { synchronized (image) { if (debugDrawingArea == null) { for (int y = 0; y < LCD_HEIGHT ; ++y) { for (int x = 0; x < LCD_WIDTH ; ++x) { out.print(getChar(image.getRGB(x,y))); } } out.flush(); } else { debugDrawingArea.drawImage(image, 0, 0, LCD_WIDTH*myScale, LCD_HEIGHT*myScale, null); } } } COM: <s> draw to the screen </s>
funcom_train/43387993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class loadClassFromFile(String fileName) throws ClassNotFoundException { InputStream is; try { byte buf[] = getByteArray(fileName); Class c = super.defineClass(null, buf, 0, buf.length); if (c != null) { resolveClass(c); } if (c==null) throw new ClassNotFoundException(fileName); return c; } catch (Exception ex) { debug("LoadFromFile/caught "+ex+" when loading from file "+fileName); throw new ClassNotFoundException(fileName); } } COM: <s> helper function load a class from a file </s>
funcom_train/644434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchToOptionBehavior(DialogOptions dialogOptions) { this.dialogOptions = dialogOptions; CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout()); cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_BEHAVIOR.name()); dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_BEHAVIOR.name()); } COM: <s> switches to the behavior category in the option dialog </s>
funcom_train/37394885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancelButton() { if (cancelButton == null) { cancelButton = new JButton(); cancelButton.setText("Cancel"); cancelButton.setMnemonic(java.awt.event.KeyEvent.VK_CANCEL); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dispose(); } }); } return cancelButton; } COM: <s> this method initializes j button2 </s>
funcom_train/46377006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanup() { if (app == null) return; synchronized (app.getAppCleanupLock()) { synchronized (controlArbs) { controlArbs.remove(this); } listeners.clear(); } // Must be done outside the app cleanup lock. if (hasControl()) { releaseControl(); } } COM: <s> clean up resources held </s>
funcom_train/46758922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMedicationRefForMedItemRefId(final long medItemRefId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return MedData.getMedicationRefForMedItemRefId(medItemRefId, chain, call); }}; return (Long) call(method, call); } COM: <s> get the medication ref id </s>
funcom_train/35691944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPaginator() { if (_paginator != null) { return _paginator.booleanValue(); } ValueBinding vb = getValueBinding("paginator"); Boolean v = vb != null ? (Boolean) vb.getValue(getFacesContext()) : null; return v != null ? v.booleanValue() : false; } COM: <s> p return the value of the code paginator code property </s>
funcom_train/11745275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCallParameter(String name) { for (int i = 0; i < callParameters.size(); i++) { ProcedureParameter nextParam = callParameters.get(i); if (name.equals(nextParam.getName())) { callParameters.remove(i); break; } } } COM: <s> removes a named call parameter </s>
funcom_train/1802153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNptSecondsRepresentation() { if (isNow) { return "now"; } long seconds = ms / 1000l; long fraction = ms % 1000l; if (fraction == 0) { return Long.toString(seconds); } return String.format("%1$d.%2$03d", seconds, fraction); } COM: <s> gets the standard </s>
funcom_train/50155089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setErrFeed( Exception e ) { String err = "ERROR"; if ( e.getMessage() != null ) { err += ": " + e.getMessage(); } else { err += " (NOT FOUND)"; } if ( newsFeed[currentFeed].elements.get( "title" ) == null ) { newsFeed[currentFeed].elements.put( "title", err ); } } COM: <s> sets the err feed attribute of the rssfeed parser object </s>
funcom_train/4122042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startMetaServerUpdateThread() { if (!publicServer) { return; } Timer t = new Timer(true); t.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { updateMetaServer(); } catch (NoRouteToServerException e) {} } }, META_SERVER_UPDATE_INTERVAL, META_SERVER_UPDATE_INTERVAL); } COM: <s> starts the metaserver update thread if code public server true code </s>
funcom_train/6493111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int evalBoard(boolean isBlk) { int bval = 0 , wval = 0; // count black pieces MyListEnumerator piecesEnu = new MyListEnumerator(bkPieces); while (piecesEnu.hasMoreElements()) { bval += ((Piece) piecesEnu.nextElement()).value; } piecesEnu = new MyListEnumerator(whPieces); while (piecesEnu.hasMoreElements()) { wval += ((Piece) piecesEnu.nextElement()).value; } return (wval - bval) * (isBlk?1:-1); } COM: <s> evaluate the board position with respect to is blk pieces </s>
funcom_train/10906970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PDFOutline getOutlineRoot() { if (this.outlineRoot != null) { return this.outlineRoot; } this.outlineRoot = new PDFOutline(null, null, true); assignObjectNumber(this.outlineRoot); addTrailerObject(this.outlineRoot); this.root.setRootOutline(this.outlineRoot); return this.outlineRoot; } COM: <s> get the root outlines object </s>
funcom_train/5260805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MotivationElement_description_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MotivationElement_description_feature", "_UI_MotivationElement_type"), BmmPackage.Literals.MOTIVATION_ELEMENT__DESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the description feature </s>
funcom_train/39911144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSessionBean1() { System.out.println("getSessionBean1"); RequestBean1 instance = new RequestBean1(); SessionBean1 expResult = null; SessionBean1 result = instance.getSessionBean1(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get session bean1 method of class timesheetmanagement </s>
funcom_train/31156015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { super.mouseDragged(e); if (SwingUtilities.isLeftMouseButton(e)) { _currentPoint = new ScaledPoint(currentPixel.getX(), currentPixel .getY(), 1); dbg.say(dbg.pairln("mouseDragged after scaled: ", "" + _currentPoint.getX(), "" + _currentPoint.getY())); repaint(); } } COM: <s> implements a mouse event calls the mouse dragged of its parent class </s>
funcom_train/44161631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataSource getDataSource(String name) { Collection col = null; DataSource dataSource = null; try { col = prepareCollection("datasources"); XMLResource document = (XMLResource)col.getResource("datasources"); Document doc = makeDocument(document); dataSource = this.queryMethods.getDataSource(doc, name); if (col != null) { col.close(); } } catch (Exception e) { e.printStackTrace(); } return dataSource; } COM: <s> get data source gets datasource </s>
funcom_train/2325597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void idct2Slices(final boolean scale) { if (content instanceof DenseLargeFloatMatrix3D) { if (this.isNoView == true) { ((DenseLargeFloatMatrix3D) content).idct2Slices(scale); } else { DenseLargeFloatMatrix3D copy = (DenseLargeFloatMatrix3D) copy(); copy.idct2Slices(scale); assign(copy); } } else { throw new IllegalArgumentException("This method is not supported"); } } COM: <s> computes the 2 d inverse of the discrete cosine transform dct iii of </s>
funcom_train/11671548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long skip(long n) throws IOException { if (!fClosed) { // NOTE: This should be rewritten to be more efficient. -Ac for (long i = 0; i < n; i++) { int b = read(); if (b == -1) { return i + 1; } } return n; } return 0; } // skip(long):long COM: <s> skips the specified number of bytes from the input stream </s>
funcom_train/42570832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNodePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_CompartmentChildDesc_node_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_CompartmentChildDesc_node_feature", "_UI_CompartmentChildDesc_type"), DescPackage.Literals.COMPARTMENT_CHILD_DESC__NODE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the node feature </s>
funcom_train/36932899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CCColor colorFromBuffer(ByteBuffer theBuffer, int theIndex) { int[] myColorChannels = new int[_myPixelFormat.numberOfChannels]; for(int i = 0; i < _myPixelFormat.numberOfChannels;i++) { myColorChannels[i] = unsignedByteToInt(theBuffer.get(theIndex + _myPixelFormat.offsets[i])); } return new CCColor(myColorChannels); } COM: <s> read color from byte buffer </s>
funcom_train/30008578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNamedGroup() { System.out.println("namedGroup"); String groupName = ""; Pattern innerExpression = null; Pattern instance = null; Pattern expResult = null; Pattern result = instance.namedGroup(groupName, innerExpression); 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 named group method of class com </s>
funcom_train/11676096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hideDetailPane() { //may be called not currently visible on initial setup to ensure panel is not visible..only update divider location if hiding when currently visible if (isDetailPanelVisible) { lowerPanelDividerLocation = lowerPanel.getDividerLocation(); } lowerPanel.setDividerSize(0); detailPanel.setVisible(false); lowerPanel.repaint(); isDetailPanelVisible = false; } COM: <s> hide the detail pane holding the current divider location for later use </s>
funcom_train/20308947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DIGQueryTranslator getQueryTranslator( TriplePattern pattern, Model premises ) { for (int i = 0; i < s_queryTable.length; i++) { DIGQueryTranslator dqt = s_queryTable[i]; if (dqt.trigger( pattern, this, premises )) { return dqt; } } return null; } COM: <s> p answer the query translator that matches the given pattern if any p </s>
funcom_train/40927688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getAceptartCancelacionServicioCommand() { if (aceptartCancelacionServicioCommand == null) {//GEN-END:|189-getter|0|189-preInit // write pre-init user code here aceptartCancelacionServicioCommand = new Command("Aceptar", Command.OK, 0);//GEN-LINE:|189-getter|1|189-postInit // write post-init user code here }//GEN-BEGIN:|189-getter|2| return aceptartCancelacionServicioCommand; } COM: <s> returns an initiliazed instance of aceptart cancelacion servicio command component </s>
funcom_train/25644895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printJavadocOutput() { System.out.println(STANDARD_OUTPUT + " : \n" + getStandardOutput()); System.err.println(ERROR_OUTPUT + " : \n" + getErrorOutput()); System.err.println(WARNING_OUTPUT + " : \n" + getWarningOutput()); System.out.println(NOTICE_OUTPUT + " : \n" + getNoticeOutput()); } COM: <s> print the output stored in the buffers </s>
funcom_train/35050892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton_add() { if (jButton_add == null) { jButton_add = new JButton(); jButton_add.setText("ADD"); jButton_add.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { AddAction(); } }); } return jButton_add; } COM: <s> this method initializes j button add </s>
funcom_train/26401306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clientSetUp() throws Exception { super.setUp(); String urlString = "http://" + getProperties().getProperty("openfuture.bugbase.test.host") + "/" + getProperties().getProperty("openfuture.bugbase.test.context") + "/servlet/BugBaseServlet"; BugBaseServletClient client = new BugBaseServletClient(urlString); setClient(client); } COM: <s> setup before executing a test case </s>
funcom_train/16614789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConnectionPoolDataSource getPool() throws AdaptorException { if (pool == null) { try { pool = config.createPool(); } catch (IllegalArgumentException e) { throw new AdaptorException("Config = " + config, e); } catch (SQLException e) { throw new AdaptorException("", e); } catch (ClassNotFoundException e) { throw new AdaptorException("", e); } } return pool; } COM: <s> return lazily instantiated connection pool </s>
funcom_train/45623042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCodeAnalysisUpdateProjectPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_codeAnalysisUpdateProject_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_codeAnalysisUpdateProject_feature", "_UI_DocumentRoot_type"), MSBPackage.eINSTANCE.getDocumentRoot_CodeAnalysisUpdateProject(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the code analysis update project feature </s>
funcom_train/26529275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void maybeSetupDefaultMerge(Map allTaskKeys, EVTask task) { if (isDefaultMergeAppropriate(task) == false) return; // create a key to represent all the top-level tasks in the task list. TaskKey key = new TaskKey(); addTopLevelTasks(key, task); registerTaskKey(allTaskKeys, key); } COM: <s> some task lists have no task id information </s>
funcom_train/12160384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItems(PresentableItem[] items) { if (items == null || items.length == 0) { throw new IllegalArgumentException("Cannot be null nor empty: " + "items"); } combo.removeAll(); presentableItems = items; for (int i = 0; i < presentableItems.length; i++) { combo.add(presentableItems[i].presentableValue); } } COM: <s> sets the items for this combo viewer </s>
funcom_train/11023378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateWithNullInPathAndIgnoreTrue() { BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate("anotherNested.stringProperty","foo", true); try { assertTrue(!predicate.evaluate(new TestBean())); } catch (IllegalArgumentException e) { fail("Should not have throw IllegalArgumentException"); } } COM: <s> test evaluate with null in property path and ignore true </s>
funcom_train/8335028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setHidState(HidState hidState) { System.out.println("SOME hid state is being set to " + hidState); HidState oldHidState = this.hidState; this.hidState = hidState; propertyChangeSupport.firePropertyChange(PROP_HIDSTATE, oldHidState, hidState); } COM: <s> set the value of hid state </s>
funcom_train/30196889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAllegatiCvs() { System.out.println("setAllegatiCv"); AllegatiCv allegatiCvs = null; CurriculumVitae instance = new CurriculumVitae(); instance.setAllegatiCv(allegatiCvs); AllegatiCv result = instance.getAllegatiCv(); assertEquals(null, result); } COM: <s> test of set allegati cvs method of class com </s>
funcom_train/3409393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeed(long seed) { /* * Ignore call from super constructor (as well as any other calls * unfortunate enough to be passing 0). It's critical that we * ignore call from superclass constructor, as digest has not * yet been initialized at that point. */ if (seed != 0) { secureRandomSpi.engineSetSeed(longToByteArray(seed)); } } COM: <s> reseeds this random object using the eight bytes contained </s>
funcom_train/10590738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startDocumentInternal(boolean emitStartDocument) throws SAXException { if (emitStartDocument) { this.contentHandler.startDocument(); } this.contentHandler.startPrefixMapping(PREFIX, URI); attributes = new AttributesImpl(); attributes.addAttribute("", PREFIX, "xmlns:" + PREFIX, "CDATA", URI); startElement("mail", attributes); } COM: <s> emit start document sequence </s>
funcom_train/41593947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCodeSystemPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CD_codeSystem_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CD_codeSystem_feature", "_UI_CD_type"), V3Package.eINSTANCE.getCD_CodeSystem(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the code system feature </s>
funcom_train/2742368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SetValue visit(PowersetDomain domain) throws InputMismatchException { scanner.scan("{"); Domain baseDomain = (domain).getBaseDomain(); Set<Value> collection = new HashSet<Value>(); if (scanner.peekChar() != '}') { while (true) { Value elementValue = visit(baseDomain); collection.add(elementValue); if (scanner.peekChar() != ',') { break; } scanner.scan(","); } } scanner.scan("}"); COM: <s> converts the read input into a set value </s>
funcom_train/14158957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopEditing() { if(actualInterfaceRow!=INVALID_ROW){ //getActualDescInfo().setAddress(address.getText()); if(propertiesTable.getCellEditor()!=null ){ propertiesTable.getCellEditor().stopCellEditing(); } } } COM: <s> this method stop the cell editing </s>
funcom_train/7292418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int handleGetMonthLength(int extendedYear, int month) { int thisStart = handleComputeMonthStart(extendedYear, month, true) - EPOCH_JULIAN_DAY + 1; // Julian day -> local days int nextStart = newMoonNear(thisStart + SYNODIC_GAP, true); return nextStart - thisStart; } COM: <s> override calendar method to return the number of days in the given </s>
funcom_train/12933793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void zipFolder(File srcFolder, File destZipFile, String includesdir) { Zip zipper = new Zip(); zipper.setDestFile(destZipFile); zipper.setBasedir(srcFolder); zipper.setIncludes(includesdir); zipper.setUpdate(true); zipper.setCompress(true); zipper.setCaseSensitive(false); zipper.setFilesonly(false); zipper.setTaskName("zip"); zipper.setTaskType("zip"); zipper.setProject(new Project()); zipper.setOwningTarget(new Target()); zipper.execute(); System.out.println(destZipFile); } COM: <s> zip the src folder into the dest file zip file </s>
funcom_train/5522779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveCommaSeperator() { System.out.println(); log.info("testRemoveCommaSeperator"); X3dCanonicalizer.main(new String[] {testFilesDir + "TestRemoveCommaSeperator.x3d"}); X3dToolsXMLUnitTest.main(new String[] {testFilesDir + "TestRemoveCommaSeperator.x3d", testFilesDir + "TestRemoveCommaSeperatorCanonical.x3d"}); } COM: <s> test of correctly eliminating comma seperators between mf type array </s>
funcom_train/41975623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HyperLink getHyperLink(Element hyperLink) { String anchorText = "None"; if (hyperLink == null) { return null; } String href = hyperLink.getAttribute("href"); if (hyperLink.getFirstChild() != null) { anchorText = hyperLink.getFirstChild().toString(); } else { return null; } HyperLink myHyperLink = createValidHyperLink(href, anchorText); return myHyperLink; } COM: <s> i take a hyper link element and read the values in create </s>
funcom_train/17968184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Comparable getSeries(int series) { // check argument... if ((series >= getSeriesCount()) || (series < 0)) { throw new IllegalArgumentException( "DefaultCategoryDataset.getSeriesName(int): no such series."); } // return the value... return this.seriesKeys[series]; } COM: <s> returns the name of the specified series </s>
funcom_train/4347819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(int index) { Object o = get(index); try { return o instanceof Number ? ((Number) o).doubleValue() : Double.valueOf((String) o).doubleValue(); } catch (Exception e) { throw new JsonException("JsonArray[" + index + "] is not a number."); } } COM: <s> get the double value associated with an index </s>
funcom_train/26238464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConnectionConfiguration getConnection(String name) { for(Iterator it = _connections.iterator(); it.hasNext();) { ConnectionConfiguration connectionConfiguration = (ConnectionConfiguration)it.next(); if(connectionConfiguration.getId().equals(name)) { return connectionConfiguration; } } return null; } COM: <s> returns a connection configuration for a specific identifier </s>
funcom_train/28476810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VixVM open(String vmLocation) throws VixException { List result; VixHandle jobHandle = VixWrapper.VixVM_Open( hostHandle, vmLocation, null, null); List jobWaitProperties = new ArrayList(); jobWaitProperties.add(new Integer(VixWrapper.VIX_PROPERTY_JOB_RESULT_HANDLE)); try { result = VixWrapper.VixJob_Wait(jobHandle, jobWaitProperties); } finally { VixWrapper.Vix_ReleaseHandle(jobHandle); } return new VixVM(this, (VixHandle) result.get(0)); } COM: <s> this function opens a virtual machine on the host that is identified by </s>
funcom_train/34480214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Aa_double getDouble2Aggregate() throws SdaiException { if (tag == INDETERMINATE) { return null; } if (tag != PhFileReader.EMBEDDED_LIST) { throw new SdaiException(SdaiException.VT_NVLD); } CEntity inst = null; AggregationType a_type = (AggregationType)v_type; if (agg_owner instanceof CEntity) { inst = (CEntity)agg_owner; } else { a_type.shift = SdaiSession.PRIVATE_AGGR; } return prepareDouble2Aggregate(a_type, inst); } COM: <s> returns a double nesting aggregate of real values wrapped in an object </s>
funcom_train/48358549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertNode(Node source, Node dest, Node newNode) { String eid = generateEdgeID(source.getID(), dest.getID()); if (edges.containsKey(eid)) { addNode(newNode); source.replaceOutput(dest, newNode); dest.replaceInput(source, newNode); newNode.addInput(source); newNode.addOutput(dest); removeEdge(source, dest); addEdge(source, newNode); addEdge(newNode, dest); } else { logger.fatal("edges not found"); } } COM: <s> inserts a new node between two nodes source and dest </s>
funcom_train/18748680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VertexView vertexAt(double x, double y) { JCell jCell = (JCell) getJGraph().getFirstCellForLocation(x, y); if (jCell instanceof JVertex) { return (VertexView) getJGraph().getGraphLayoutCache().getMapping(jCell, false); } else { return null; } } COM: <s> returns the current vertex view at a given x and y coordinate </s>
funcom_train/50440089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doOperation() { // Method attributes IOrb m_orb=null; // Get refernece to orb m_orb=ADFOrb.getInstance(); Parameter parameter=Parameter.getInstance(); // Register parameter object w/orb m_orb.register("_PARAMETER",parameter); } COM: <s> abstract initialization method implemented by all subclasses </s>
funcom_train/50720959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDecodeToObject() throws Exception { fail("TODO decodeToObject"); String encodedObject = ""; Object expResult = null; Object result = Base64.decodeToObject(encodedObject); 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 decode to object method of class base64 </s>
funcom_train/43894581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Query namedQuery(Query query) { String typeName = getSchema().getTypeName(); if ((query.getTypeName() == null) || !query.getTypeName().equals(typeName)) { return new DefaultQuery(typeName, query.getFilter(), query.getMaxFeatures(), query.getPropertyNames(), query.getHandle()); } return query; } COM: <s> ensure query modified with type name </s>
funcom_train/19300736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendType(StringBuffer buffer) { if (!NULL_URI.equals(datatypeURI)) { buffer.append("^^<").append(datatypeURI).append('>'); } else if (language.length() > 0) { buffer.append('@').append(language); } } COM: <s> appends the datatype uri or language code of a literal </s>
funcom_train/18593143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { Color c = AWT.alpha(getComponent().getBackground(), 128); Rectangle r = getDecorationBounds(); g = g.create(); g.setColor(c); g.fillRect(r.x, r.y, r.width, r.height); g.dispose(); } COM: <s> the default dims the blocked component </s>
funcom_train/8084762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillOval(int x, int y, int width, int height){ setStateToLocal(); m_printstream.println(xTransform(xScale(x)) + " " + yTransform(yScale(y)) + " " + xScale(width) + " " + yScale(height) + " true Oval"); } COM: <s> draw a filled oval in current pen color </s>
funcom_train/12188905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringArgument() throws Exception{ Value result = function.invoke(context, new Value[] { factory.createStringValue("P0Y0M0DT1H15M0.0S") }); String resultString = result.stringValue().asJavaString(); assertEquals("Expected value: 4500 but was: " + resultString, resultString, "4500"); } COM: <s> tests string value as an argument </s>
funcom_train/1551168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String lookup(String curr) { if("".equals(curr)) return null; try { SortedSet tailSet = tailSet(curr); if(tailSet != null) { Object firstObj = tailSet.first(); if(firstObj != null) { String first = (String)firstObj; if(first.startsWith(curr)) return first; } } } catch (Exception e) { return null; } return null; } COM: <s> perform a lookup </s>
funcom_train/48122679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTermBuffer(String buffer, int offset, int length) { assert offset <= buffer.length(); assert offset + length <= buffer.length(); char[] newCharBuffer = growTermBuffer(length); if (newCharBuffer != null) { termBuffer = newCharBuffer; } buffer.getChars(offset, offset + length, termBuffer, 0); termLength = length; } COM: <s> copies the contents of buffer starting at offset and continuing </s>