__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2901982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getExtensions() { try { Session hSession = HibernateSession.openSession(); List extensions = hSession.find("from Extension as e"); HibernateSession.closeSession(hSession); return extensions; } catch (HibernateException e) { log.error("Unable to get extensions!", e); } return Collections.EMPTY_LIST; } COM: <s> returns list of all extensions saved in compotes database </s>
funcom_train/3440629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transmitter getTransmitterReferenceCounting() throws MidiUnavailableException { /* Keep this order of commands! If getTransmitter() throws an exception, openInternal() should not be called! */ Transmitter transmitter; synchronized (traRecLock) { transmitter = getTransmitter(); AbstractMidiDevice.this.openInternal(transmitter); } return transmitter; } COM: <s> retrieve a transmitter and open the device implicitly </s>
funcom_train/12560745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTimer(int displayId, int duration) { cancelTimer(); try { task = new TimerClient(displayId); /* flash every <tt>BLINK_RATE</tt> miliseconds */ flashCount = duration / BLINK_RATE; timerService.schedule(task, BLINK_RATE, BLINK_RATE); } catch (IllegalStateException e) { cancelTimer(); } } COM: <s> set a new timer </s>
funcom_train/32057874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetButtonZoomArea() { System.out.println("testGetButtonZoomArea"); GPGraphpad pad = new GPGraphpad(); GPMarqueeHandler handler = new GPMarqueeHandler(pad); assertEquals("getButtonZoomArea failed", handler.getButtonZoomArea() != null, true); //pad.getFrame().dispose(); } COM: <s> test of get button zoom area method of class gpmarquee handler </s>
funcom_train/19308941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveGraphicsState() { this.write("q"); /* Create a new state with the same settings as the current state. */ final PDFGraphicsState newState = new PDFGraphicsState( this.getGraphicsState()); /* Push it onto the stack. */ this.graphicsStateStack.push(newState); } COM: <s> saves the current pdf graphics state by pushing it onto the stack </s>
funcom_train/31350000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printErrorMessage(HttpServletResponse response, String message) { try{ response.setContentType(CONTENT_TYPE); PrintWriter out = response.getWriter(); out.println("<font color=red>"+message+"</font>"); } catch(IOException oops){} } COM: <s> prints out a string in red to your browser </s>
funcom_train/17526702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHashCode() { Coordonnee c; for (int i = 0; i < 20; i++) { for (int j = 0; j < 20; j++) { c = new Coordonnee(i, j); int hash = 3; hash = 59 * hash + c.getX(); hash = 59 * hash + c.getY(); assertEquals(c.hashCode(), hash); } } } COM: <s> test hash code </s>
funcom_train/9027025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProgressListener(DenguesProgressListener listener) { DenguesProgressListener[] newProgressListeners = new DenguesProgressListener[progressListeners.length + 1]; System.arraycopy(progressListeners, 0, newProgressListeners, 0, progressListeners.length); progressListeners = newProgressListeners; progressListeners[progressListeners.length - 1] = listener; } COM: <s> add a new code zprogress listener code for this browser </s>
funcom_train/48089019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStatusField() { if (statusField == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code here statusField = new StringItem("Status", null);//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here }//GEN-BEGIN:|24-getter|2| return statusField; } COM: <s> returns an initiliazed instance of status field component </s>
funcom_train/21039133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConfig_3() throws Exception { String path = DBREVISION_CONFIGS+File.separatorChar+"config-3"; LocalDatabase localDatabaseAdapter = new LocalDatabase(null); boolean isCorrect=false; try { new DbRevisionManager(localDatabaseAdapter, path); } catch (InitStructureFileNotFoundException e) { isCorrect=true; } assertTrue(isCorrect); } COM: <s> test in version directory missing webmill 5 </s>
funcom_train/3410854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropActionChanged(DragSourceDragEvent dsde) { DragSourceListener dsl = listener; if (dsl != null) { dsl.dropActionChanged(dsde); } getDragSource().processDropActionChanged(dsde); updateCurrentCursor(getSourceActions(), dsde.getTargetActions(), CHANGED); } COM: <s> calls code drop action changed code on the </s>
funcom_train/3810967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isThrowing(JavaQName e) { if (e == null) { throw new NullPointerException("The exception argument must not be null."); } for (Iterator iter = exceptions.iterator(); iter.hasNext(); ) { if (e.equals(iter.next())) { return true; } } return false; } COM: <s> p returns whether the method is throwing the given exception </s>
funcom_train/8250138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Plugin getPluginManifestInfo(File pluginManifest) throws PluginException { if(!pluginManifest.exists() || !pluginManifest.canRead()) { log.error("Could not read plugin manifest: " + pluginManifest.getAbsolutePath()); throw new PluginException("Could not read plugin manifest: " + pluginManifest.getAbsolutePath()); } return pluginManifestReader.parsePluginManifest(pluginManifest); } COM: <s> parses and validates a manifest file </s>
funcom_train/12809001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Chunk createChunk(final String content, final ChainedProperties chain) { Font font = getFont(chain); Chunk ck = new Chunk(content, font); if (chain.hasProperty(HtmlTags.SUB)) ck.setTextRise(-font.getSize() / 2); else if (chain.hasProperty(HtmlTags.SUP)) ck.setTextRise(font.getSize() / 2); ck.setHyphenation(getHyphenation(chain)); return ck; } COM: <s> creates an i text chunk </s>
funcom_train/35722903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final protected IRegion getExtent(int start, int end) { if (end > 0 && start < end) { Rectangle bounds= fTextWidget.getTextBounds(start, end - 1); return new Region(bounds.x, bounds.width); } return new Region(fTextWidget.getLocationAtOffset(start).x, 0); } COM: <s> returns the region covered by the given start and end offset </s>
funcom_train/27817240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseAValidSlashdotXML() { NewsParserSlashdot slashdotParser = new NewsParserSlashdot(); Vector returnVector = slashdotParser.parse(validReader3elements); assertNotNull("Valid XML should not result in null", returnVector); assertEquals("Valid XML should result in vector with 3 elements", 3, returnVector.size()); } COM: <s> see if the buffer allows simple parsing of a valid slashdot document </s>
funcom_train/18876003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position getPositionFromLocalPoint(Point p) { //add the offset. p.x = (int) (p.x / zoomFactor) + offsetX; p.y = (int) (p.y / zoomFactor) + offsetY; //return the Position computed from point relative to the whole map //the result is in chart referential Position res = getAbsolutePositionFromPoint(p); res = toWG84(res); return res; } COM: <s> the chart transform is done in the local referential eg eur 50 </s>
funcom_train/41163359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgAnnouncement update(AgAnnouncement entity) { EntityManagerHelper.log("updating AgAnnouncement instance", Level.INFO, null); try { AgAnnouncement result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved ag announcement entity and return it or a copy </s>
funcom_train/44612828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean canInherit() { return !isStatic && !methodDecl.isConstructor() && (hasExplicitDirectSuperclass() || (typeDecl.superInterfaces != null && typeDecl.superInterfaces.length > 0)); // // && methodDecl.binding.isOverriding(); // // The above does not work for an interface; a class implementing // an interface does not seem to be viewed as overriding the // methods declared in the interface. } COM: <s> indicates whether the assertion method should try to </s>
funcom_train/17255421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RenderState setRenderState(RenderState rs) { if (rs == null) { return null; } if (renderStateList == null) { renderStateList = new RenderState[RenderState.RS_MAX_STATE]; } RenderState oldState = renderStateList[rs.getType()]; renderStateList[rs.getType()] = rs; return oldState; } COM: <s> code set render state code sets a render state for this node </s>
funcom_train/47033074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performOk() { IWorkspaceRunnable wr = new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { doStore(); } }; try { ResourcesPlugin.getWorkspace().run(wr, null, 0, null); } catch (CoreException e) { DebugUiPlugin.errorDialog(Messages.JSLineBreakpointPropertyPage_ExceptionWhileSavingBreakpointProperties, e); DebugUiPlugin.log(e); } return super.performOk(); } COM: <s> store the breakpoint properties </s>
funcom_train/39533740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point2D getTranslationFactors(int keyCode, int delta){ int x=0; int y=0; switch (keyCode){ case KeyEvent.VK_UP : case KeyEvent.VK_KP_UP : y=-delta; break; case KeyEvent.VK_DOWN : case KeyEvent.VK_KP_DOWN : y=delta; break; case KeyEvent.VK_LEFT : case KeyEvent.VK_KP_LEFT : x=-delta; break; case KeyEvent.VK_RIGHT : case KeyEvent.VK_KP_RIGHT : x=delta; break; } return new Point(x, y); } COM: <s> returns the translation factors corresponding to the </s>
funcom_train/44830101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getFitness(SampleData[] in, SampleData[] out) { System.out.println("Inputs received at simple getfitness:"); System.out.println("iss = " + in[ 0 ].getSampleSeparation() ) ; System.out.println(es.ESLib.sampleDatasToString( in, out ) ); return -1; } COM: <s> returns a fitness associated to a given input output pair for </s>
funcom_train/15742660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveLazy(final SPath path) throws FileNotFoundException { if (!isDirty(path)) { return; } try { Utils.runSWTSync(new Callable<Object>() { public Object call() throws Exception { saveText(path); return null; } }); } catch (Exception e) { log.error("Unexpected exception: " + e); } } COM: <s> save file denoted by the given project relative path if necessary </s>
funcom_train/11674548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTilingType(int tilingType) { if (! ((tilingType <= 3) && (tilingType >= 1))) { throw new IllegalArgumentException("Parameter tilingType must not be " + tilingType + " (only 1, 2 or 3)"); } this.tilingType = tilingType; } COM: <s> sets a code that controls adjustments to the spacing of tiles relative to </s>
funcom_train/25138844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean is_append(Path path) { if (path._absolute) { return false; } else { // path kind (absolute or relative) is unchanged. for (int i = 0; i < path._names.size(); i++) { _names.add(path._names.get(i)); } return true; } } COM: <s> append a path to this one </s>
funcom_train/1560766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasEmptyCells(){ boolean hasEmptyCells = false; for (int col = minColumn; col <= maxColumn; ++col) { for (int row = minRow; row <= maxRow; ++row) { GeoElement geo = RelativeCopy.getValue(table, col, row); if (geo == null){ return true; } } } return hasEmptyCells; } COM: <s> returns true if at least one cell is empty has no geo </s>
funcom_train/21057759
/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 ("Echo".equals(portName)) { setEchoEndpointAddress(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/34590885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListView(IListView listView) { this.listViewComponents.add(listView); Component listViewComponent = listView.getListComponent(); listViewComponent.addPropertyChangeListener("list_data_updated", this); listViewComponent.addPropertyChangeListener("list_selection_changed", this); } COM: <s> adds the list view and registers listeners to listend to required events </s>
funcom_train/19249628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerBeanMappings(InputSource inputSource) throws BeanMappingException { List newBeanMappings = getConfigurator().getMappings(inputSource); for (Iterator iterator = newBeanMappings.iterator(); iterator.hasNext();) { BeanMapping beanMapping = (BeanMapping)iterator.next(); beanMappings.put(beanMapping.getSourceClass(), beanMapping); } } COM: <s> register the bean mappings specified in the mapping domcument in the input source </s>
funcom_train/7661018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSchedule1_RejectedExecutionException() { ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1); try { se.shutdown(); se.schedule(new NoOpRunnable(), MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS); shouldThrow(); } catch(RejectedExecutionException success){ } catch (SecurityException ok) { } joinPool(se); } COM: <s> execute throws rejected execution exception if shutdown </s>
funcom_train/44185838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importFrom(Reader r) { BufferedReader reader = new BufferedReader(r); String s; Iterator<String> iter = new RegexLineIterator( new LineReadingIterator(reader), RegexLineIterator.COMMENT_LINE, RegexLineIterator.NONWHITESPACE_ENTRY_TRAILING_COMMENT, RegexLineIterator.ENTRY); while (iter.hasNext()) { s = (String) iter.next(); add(s.toLowerCase()); } } COM: <s> read a set of surt prefixes from a reader source keep sorted and </s>
funcom_train/51297678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getData() { if (dateCompliance()) { extendedModel.initGoods(); for (int i = 0; i < this.getGoodsTable().getRowCount(); i++) { extendedModel.addGoods(((GoodsListTableModel) this .getGoodsTable().getModel()).getRow(i)); } return SUCCESS; } return FAILURE; } COM: <s> forms data vector in the model </s>
funcom_train/25218221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean match(StringBuilder s, String x) { int j = 0; for (int i = 0; i < x.length(); i++) { if (s.length() == 0 || s.charAt(j) != x.charAt(i)) { return false; } j++; } s.delete(0, j); return true; } COM: <s> match a string at all positions in a string builder and delete all </s>
funcom_train/15802185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Machine:\n"); sb.append("id = " + this.id); sb.append(", name = " + this.name); sb.append(", os = " + this.os); sb.append(", ip = " + this.ipAddress); sb.append(", ip nat = " + this.ipNatAddress); sb.append(", notes = " + this.notes); return sb.toString(); } COM: <s> prints this machine details in a human readable form </s>
funcom_train/2585782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetColumnKey() { TaskSeriesCollection c = createCollection1(); assertEquals("Task 1", c.getColumnKey(0)); assertEquals("Task 2", c.getColumnKey(1)); assertEquals("Task 3", c.getColumnKey(2)); } COM: <s> some tests for the get column key method </s>
funcom_train/16475867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fieldIsNamed(FieldStructureIdentifier field) { if((type_of_instructions == InstructionType.IT_FULL_COMPLIANCE) || (type_of_instructions == InstructionType.IT_NO_COMPLIANCE)) throw new IllegalStateException("This instruction type does not have named fields."); if(key_fields == null) return true; // a null list of fields will match all fields else return key_fields.contains(field); } COM: <s> return true if the given field is listed </s>
funcom_train/32057723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetGraphUndoManager() { System.out.println("testGetGraphUndoManager"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); assertEquals("getGraphUndoManager failed", newDoc.getGraphUndoManager() != null, true); } COM: <s> test of get graph undo manager method of class gpdocument </s>
funcom_train/12212937
/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 ("TestWsPort".equals(portName)) { setTestWsPortEndpointAddress(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/20071211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readLine() throws IOException { // synchronized (lock) { // String l = super.readLine(skipLF); // skipLF = false; // if (l != null) // lineNumber++; // return l; // } if(lineNumber<lines.length){ return lines[lineNumber++]; } else return null; } COM: <s> read a line of text </s>
funcom_train/32081641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMenu (Menu menu) { checkWidget (); if (menu != null) { if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if ((menu.style & SWT.POP_UP) == 0) { error (SWT.ERROR_MENU_NOT_POP_UP); } if (menu.parent != menuShell ()) { error (SWT.ERROR_INVALID_PARENT); } } this.menu = menu; OS.FrameworkElement_ContextMenu(handle, menu != null ? menu.handle : 0); } COM: <s> sets the receivers pop up menu to the argument </s>
funcom_train/43099484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAssociations(Object oclassifier) { Collection col = new ArrayList(); if (oclassifier instanceof MClassifier) { MClassifier classifier = (MClassifier) oclassifier; Iterator it = classifier.getAssociationEnds().iterator(); while (it.hasNext()) { col.add(((MAssociationEnd) it.next()).getAssociation()); } } return col; } COM: <s> returns all associations for some classifier </s>
funcom_train/31801169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public LoginHome getLoginHome() throws Exception { if(loginEjb == null) { try { // create and get the ejb Context initial = new InitialContext(); Object objref = initial.lookup("java:/comp/env/ejb/Login"); LoginHome home = (LoginHome) PortableRemoteObject.narrow(objref, LoginHome.class); /* Save this interface */ loginEjb = home; } catch (Exception e) { throw new ServletException(e); } /* try */ } /* if */ return loginEjb; } /* getloginHome() */ COM: <s> get home interface for login ejb </s>
funcom_train/4347857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String key) { Object o = get(key); try { return o instanceof Number ? ((Number) o).doubleValue() : Double.valueOf((String) o).doubleValue(); } catch (Exception e) { throw new JsonException("JsonObject[" + quote(key) + "] is not a number."); } } COM: <s> get the double value associated with a key </s>
funcom_train/6507427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showFieldEditor(final FieldGrid spf) { showBusy(Message.say("Start", "mLoadFieldEditor")); new Thread(new Runnable() { public void run() { if (fieldEditor == null) { fieldEditor = new FieldEditor(Start.this, spf); getContentPane().add(fieldEditor, FIELD_EDITOR); } else { fieldEditor.spf.addTileClickListener(fieldEditor); fieldEditor.fuerSpf.add(fieldEditor.spf); } facade.saveTileRaster(); switchCard(FIELD_EDITOR); stopBusy(); } }).start(); } COM: <s> displays the layoutcard where u can build your board </s>
funcom_train/19398743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnisolatedIndexWriteRate() throws IOException { // register named index that can support isolation. String name = "abc"; journal.registerIndex(name, new UnisolatedBTree(journal,getBranchingFactor(),UUID.randomUUID())); journal.commit(); // NOT isolated. long tx = 0L; // run test. doIndexWriteRateTest(name, tx, 128); } COM: <s> test the index write rate using an index that supports transactional </s>
funcom_train/10626653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContainsObject() { // Create an instance and add a child BeanContextSupport sup = new BeanContextSupport(); BeanContextChildSupport ch = new BeanContextChildSupport(); sup.add(ch); BeanContextSupport.BCSChild bcs = (BeanContextSupport.BCSChild) sup .bcsChildren().next(); // We should find the child now if (!sup.contains(bcs)) { // fail("True should be returned"); } } COM: <s> test method contains with object parameter </s>
funcom_train/21324716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object ind) { if (!(this.getClass().equals(ind.getClass()))) return false; // SimpleRuleIndividuals are special. FloatVectorIndividual i = (FloatVectorIndividual) ind; if (genome.length != i.genome.length) return false; for (int j = 0; j < genome.length; j++) if (genome[j] != i.genome[j]) return false; return true; } COM: <s> adapted from float vector individual </s>
funcom_train/28670160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJHistoryButton() { if (this.jHistoryButton == null) { this.jHistoryButton = new JButton(); fillTabButton(this.jHistoryButton, "History", getJHistoryPanel().getName()); } return this.jHistoryButton; } COM: <s> this method initializes j history button </s>
funcom_train/4347842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String join(String separator) { int len = length(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < len; i += 1) { if (i > 0) { sb.append(separator); } sb.append(JsonObject.valueToString(this.myArrayList.get(i))); } return sb.toString(); } COM: <s> make a string from the contents of this json array </s>
funcom_train/43884700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParse() throws Exception { validateValues("-1", new BigInteger("-1")); validateValues("0", new BigInteger("0")); validateValues("12678967543233", new BigInteger("12678967543233")); validateValues("+100000", new BigInteger("100000")); } COM: <s> integer has a lexical representation consisting of a finite length </s>
funcom_train/51222579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void activateGlassPane() { // Mount the glass pane on the component window GlassPane aPane = GlassPane.mount(getAComponent(), true); // keep track of the glass pane as an instance variable setGlassPane(aPane); if (getGlassPane() != null) { // Start interception UI interactions getGlassPane().setVisible(true); } } COM: <s> activate the capabilities of glasspane </s>
funcom_train/24121065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream in) throws IOException { // Size and type already read short numberOfPoints = WMFConstants.readLittleEndianShort(in); this.points = new PointS[numberOfPoints]; for(int i=0; i<numberOfPoints; i++) { this.points[i] = new PointS(in); } } COM: <s> reads the polyline record from a stream </s>
funcom_train/37146671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getAllChildTask(DefaultMutableTreeTableNode base) { ArrayList res = new ArrayList(); if (base == null || !(base instanceof TaskNode)) return res; Enumeration e = base.children(); while (e.hasMoreElements()) { Object next = e.nextElement(); if (next instanceof TaskNode) res.add(next); } return res; } COM: <s> return all sub task for the tree node base </s>
funcom_train/44852504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getGroupID(Long inCompletionID) throws VException { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(CompletionHome.KEY_ID, inCompletionID); ReadOnlyDomainObject lEntry = findByKey(lKey); return new Long(lEntry.get(QuestionHome.KEY_GROUP_ID).toString()); } COM: <s> returns the groups id the specified completion belongs to </s>
funcom_train/46760660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationPanelModel getApplicationPanel(final long applicationPanelId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SecurityData.getApplicationPanel(applicationPanelId, chain, call); }}; return (ApplicationPanelModel) call(method, call); } COM: <s> same transaction return the single application panel model for the primary key </s>
funcom_train/22233346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSharpenTextureFunc(float[] lod, float[] pts) { checkForLiveOrCompiled(); if (((lod != null) && (pts != null) && (lod.length == pts.length)) || ((lod == null) && (pts == null))) { ((TextureRetained)this.retained).initSharpenTextureFunc(lod, pts); } else { throw new IllegalStateException( J3dI18N.getString("Texture22")); } } COM: <s> sets the sharpen texture lod function for this texture object </s>
funcom_train/44594837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int retrieveEllipsisStartPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch(token) { case TerminalTokens.TokenNameELLIPSIS: return this.scanner.startPosition - 1; } } } catch(InvalidInputException e) { // ignore } return -1; } COM: <s> this method is used to retrieve the start position of the ellipsis </s>
funcom_train/20978496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getTopPreferredSize() { Dimension dimension = null; if (skina.getFrame() != null) { dimension = skina.getFrame().getTopPreferredSize(); } if ((dimension == null) && (skinb.getFrame() != null)) { dimension = skinb.getFrame().getTopPreferredSize(); } return dimension; } COM: <s> gets the top preferred size attribute of the compound frame object </s>
funcom_train/9700526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initModelGenerator(IGeneratedJavaClassBuilder modelB) { // modelB.generatorClassPathInPlugin(true); String generatorClassName = page.getGenerationClass(); Map<String,String> selections = Generator.getGenerator4DisplaySelection(); for (Entry<String,String> entry : selections.entrySet()){ if (entry.getKey().indexOf(generatorClassName)>-1){ String[] parts = entry.getKey().split("@"); modelB.generatorClassPath(parts[1]); modelB.generatorPluginID(parts[0]); } } } COM: <s> initialize the generator data </s>
funcom_train/46332088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { super.paintComponent(g); // paint background // Draw image at its natural size first. int w = getWidth(); int h = getHeight(); if (itsImage != null) { g.drawImage(itsImage, 0, 0, w, h, this); } } COM: <s> paints this object onto the window </s>
funcom_train/10858236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testOverwriteFalse() { // assertU(adoc("id", "overwrite", "val_s", "AAA")); // assertU(commit()); // assertU(add(doc("id", "overwrite", "val_s", "BBB") // ,"allowDups", "false" // ,"overwriteCommitted","false" // ,"overwritePending","false" // )); // assertU(commit()); // assertQ(req("id:overwrite") // ,"//*[@numFound='1']" // ,"//str[.='AAA']" // ); // } COM: <s> this doesnt work but if it did this is how wed test it </s>
funcom_train/39884369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object readResolve() { synchronized (levels) { for (Level level : levels) { if (value != level.value) { continue; } if (!name.equals(level.name)) { continue; } if (Objects.equal(resourceBundleName, level.resourceBundleName)) { return level; } } // This is a new value, so add it. levels.add(this); return this; } } COM: <s> serialization helper method to maintain singletons and add any new </s>
funcom_train/130300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getFOV () { try { sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */ os.writeByte (PLAYER_FIDUCIAL_GET_FOV); os.flush (); } catch (Exception e) { System.err.println ("[Fiducial] : Couldn't send PLAYER_FIDUCIAL_GET_FOV " + "command: " + e.toString ()); } } COM: <s> configuration request get sensor field of view </s>
funcom_train/3462094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Creature createCreature(RealValueGenome genome) { int offset = body_plan.develop(genome.getValues(), 0); if (offset != body_plan.getNumValues()) { System.out.println("Offset value is mistaken"); } // create Creature object to represent creature from now on Creature creature = new Creature(body_plan, genome); return creature; } COM: <s> factory method to create a creature </s>
funcom_train/16914652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editSensors() { Collection<Sensor> sensors = selectionModel.getSelection(); if (!sensors.isEmpty()) { EditSensorsDialog d = new EditSensorsDialog(sensors); d.setBounds(100, 100, 450, 500); d.setVisible(true); } } COM: <s> edit the selected sensors if any </s>
funcom_train/3740223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkPasswd(String userName, String userPasswd) throws Exception { sess=HibernateUtil.currentSession(); try { boolean retVal = uman.checkPasswd(userName, userPasswd); log.info("checkPasswd(userName, userPasswd): Sprawdzenie czy podano prawidlowe haslo " +"userPasswd dla usytkownika userName"); log.info("WYnik: "+retVal); HibernateUtil.closeSession(); return retVal; } catch (Exception e) { HibernateUtil.closeSession(); throw e; } } COM: <s> checks whether user of given login exists is active and has given password </s>
funcom_train/18837379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { if (bi != null) g.drawImage(bi, 0, 0, null); if(croppedArea != null) { g.setXORMode(Color.WHITE); g.drawRect(croppedArea.x, croppedArea.y, croppedArea.width, croppedArea.height); } } COM: <s> paint the image </s>
funcom_train/36259141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectMVC() { view.setDataModel(dataModel); view.addListSelectionListener(this); view.addDatabaseFocusListener(this); dataModel.connectModel(librarian); valueChanged(new ListSelectionEvent(view, -1, -1, false)); } COM: <s> connect the control center to its view and setup the mvc pattern </s>
funcom_train/10564016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Representation createRepresentation(String id) { if (id == null) { id = String.format("urn:org.apache.stanbol:entityhub.yard.%s:%s.%s", getClass().getSimpleName(), yardId, ModelUtils.randomUUID().toString()); } return InMemoryValueFactory.getInstance().createRepresentation(id); } COM: <s> only used to create a representation if the yard is currently not available </s>
funcom_train/33901378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChild( FamilyMember child ){ if ( _children.isEmpty() ) { _children.add(child); return; } int i=1; for( FamilyMember kid: _children ) { if ( kid.getKey().compareTo( child.getKey() ) > 0 ) { _children.add(i-1, child ); return; } i++; } _children.add(_children.size(), child); } COM: <s> ads a child </s>
funcom_train/38724769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String algorithmType(Algorithm algo) { if (algo instanceof CombinationAlgorithm) { return "Combination Algorithm"; } else if (algo instanceof FilterAlgorithm) { return "Filter Algorithm"; } else if (algo instanceof MatchAlgorithm) { return "Matching Algorithm"; } else { return "<i>unknown</i>"; } } COM: <s> returns a html formatted string containing the type of the given </s>
funcom_train/27975424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getInt(byte[] ba) { return (((((int)ba[3]) << 24) & 0xFF000000) | ((((int)ba[2]) << 16) & 0x00FF0000) | ((((int)ba[1]) << 8) & 0x0000FF00) | (((int)ba[0]) & 0x000000FF)); } COM: <s> gets an integer from a little endian byte array </s>
funcom_train/5725196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof ApplicationInfo)) { return false; } final ApplicationInfo that = (ApplicationInfo) object; if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) { return false; } return true; } COM: <s> returns code true code if the argument is an application info instance </s>
funcom_train/2321047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSizePlace() { if (getWindowContainer().getMainWindow() != null) { Window.Changes wc = new Changes(); wc.x(getWindowContainer().getX()); wc.y(getWindowContainer().getY()); wc.width(getWindowContainer().getWidth()); wc.height(getWindowContainer().getHeight()); wc.border_width(0); getWindowContainer().getMainWindow().configure(wc); getWindowContainer().sendConfigureNotify(); } } COM: <s> update the client windows size and or position as well as the </s>
funcom_train/43479392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(Command command) { // parse command into table cells Object[] newRow = new Object[columnNames.length]; for (int i = 0; i < columnNames.length; i++) newRow[i] = command.get(columnNames[i]); // add to current model model.addRow(newRow); // manage size, push out oldest if (model.getRowCount() > records) model.removeRow(0); // simply re-draw the table table.repaint(); last = System.currentTimeMillis(); } COM: <s> add new data to the bottom of the text are </s>
funcom_train/38488736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, value); } COM: <s> add a named output property </s>
funcom_train/44170593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findIndex(String name) { for (int i = 0; i < elements.size(); i++) { Element element = elements.get(i); if (element instanceof TaggedElement) { if (((TaggedElement)element).getName().equals(name)) return i; } } return -1; } COM: <s> finds the index of a named child tagged element </s>
funcom_train/35682219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws RequestException { if (getHttpClient() != null) { getHttpClient().getHttpConnectionManager().getConnection( getHttpClient().getHostConfiguration()).close(); } _isOpen = false; _lastUsedTime = System.currentTimeMillis(); } COM: <s> terminates a connection with the host </s>
funcom_train/50936825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setErrorTask(Task t) throws VgridException { try { InputStream in = null; try { this.srv.setErrorTask(this.sutil.serialize(t)); } finally { if (in != null) in.close(); } } catch (IOException e) { throw new VgridException(e); } } COM: <s> sends an error task to the server </s>
funcom_train/49656932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String pattern() { StringBuilder sb = new StringBuilder(); sb.append(description); if (name instanceof String) { sb.append(name); } sb.append(" "); for (int i = 0, n = children.length; i < n; i++) { sb.append(children[i].childPattern()); } return sb.toString(); } COM: <s> returns the tree pattern expression from which the pattern was </s>
funcom_train/50864527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeSettlementNames() { try { SettlementConfig settlementConfig = SimulationConfig.instance().getSettlementConfiguration(); settlementNames = settlementConfig.getSettlementNameList(); } catch (Exception e) { throw new IllegalStateException("settlement names could not be loaded: " + e.getMessage(), e); } } COM: <s> initializes the list of possible settlement names </s>
funcom_train/26474328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signalProblems() { this.problems = new ArrayList(); this.perform(); if (this.problems.size() == 0) return; StringWriter text = new StringWriter(); text.write("The following problems are unresolved:\n"); for (int i = 0; i < this.problems.size(); i++) { text.write("Problem "); text.write(Integer.toString(i + 1)); text.write(": "); ((Problem)problems.get(i)).print(text); text.write("\n"); } throw new RuntimeException(text.toString()); } COM: <s> peform the check and throw a code java </s>
funcom_train/13803444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computePositions(Graph graph) { logger.log(Priority.DEBUG, "computePositions("+graph+")"); this.complete = true; if (!meetsRequirements(graph)) { throw new PropertyMismatch("Graph with label \"" + graph.getLabel() + "\" does not meet the requirements of the specified layout: " + this); } this.complete &= computeDependentPositions(graph); this.complete &= computeIndependentPositions(graph); } COM: <s> first ask our containing layout to give us the </s>
funcom_train/3381283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZipEntry getEntry(String name) { ZipEntry ze = super.getEntry(name); if (ze != null) { if (ze instanceof JarEntry) return new URLJarFileEntry((JarEntry)ze); else throw new InternalError(super.getClass() + " returned unexpected entry type " + ze.getClass()); } return null; } COM: <s> returns the code zip entry code for the given entry name or </s>
funcom_train/16631533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAttribute(Content content, String name, Number value, boolean isKey){ if ( value!=null ){ String sValue = value.toString(); if (! StringUtils.isEmpty(sValue)){ content.addAttribute(new Attribute(name, sValue, Attribute.ATTRIBUTE_TYPE_NUMBER, isKey)); } } } COM: <s> adds an number attribute </s>
funcom_train/13749214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCombopersotype() { GridData gridData36 = new GridData(); gridData36.widthHint = 150; gridData36.horizontalSpan = 2; combopersotype = new Combo(composite2, SWT.NONE); combopersotype.setText("Type"); combopersotype.setItems (new String []{"","Analgésie/Antiinflammatoire","Amélioration articulaire", "Amélioration musculaire", "Proprioception/Coordination", "Fonction CV", "Fonction Circulatoire", "Autres"}); combopersotype.setLayoutData(gridData36); } COM: <s> this method initializes combopersotype </s>
funcom_train/34633187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResultMergeRole(final ResultMergeNode resultMergeRole) { if (resultMergeRole == null) throw new ArgumentNullException("resultMergeRole"); if ((this.tMergeRole != null) || (this.baseMergeRole != null) || (this.resultMergeRole != null)) throw new RuntimeException("one node can only be associated to one merge role"); this.resultMergeRole = resultMergeRole; } COM: <s> sets the result merge role </s>
funcom_train/212928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transferable createTransferable(JComponent c) { boolean dirCopy = db.getWorker().getGridFileFromTreePath(db.getSelectedItemsTreePath()).isDirectory(); return new DirectoryBrowserTransferable(db.getSelectedURI(), db.getSelected(), db.getFileTransferObject().getSessionId(), dirCopy); } COM: <s> this creates the object that is getting transferred from one component to another </s>
funcom_train/18489527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(final Integer value) { if (value == null) { this.value = null; return; } if (!Integer.class.equals(type)) { throw new ClassCastException("expected argument type was " + type + ", but given argument is of type " + type.getClass().getName()); } this.value = value; } COM: <s> set code integer code parameter value </s>
funcom_train/27747430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getVisible () { checkWidget (); int scrolledHandle = parent.scrolledHandle; int [] hsp = new int [1], vsp = new int [1]; OS.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp); if ((style & SWT.HORIZONTAL) != 0) { return hsp [0] != OS.GTK_POLICY_NEVER; } else { return vsp [0] != OS.GTK_POLICY_NEVER; } } COM: <s> returns code true code if the receiver is visible and </s>
funcom_train/20269988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean areNodesEqualForInlining(Node n1, Node n2) { /* Our implementation delegates to the compiler. We provide this * method because we don't want to expose Compiler to PeepholeOptimizations. */ Preconditions.checkNotNull(currentTraversal); return currentTraversal.getCompiler().areNodesEqualForInlining(n1, n2); } COM: <s> are the nodes equal for the purpose of inlining </s>
funcom_train/22279639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FontChooser fontChooser() { if (fontChooser == null) { InternalWindow fontWindow = new InternalWindow(0, 0, 1, 1); fontWindow.setRootView(this); fontChooser = new FontChooser(); fontChooser.setWindow(fontWindow); fontWindow.center(); } return fontChooser; } COM: <s> returns a reference to the shared font chooser </s>
funcom_train/12737949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void synchronizeData() { // no need to sync in the future needsSyncData(false); // we don't want to generate any event for this so turn them off boolean orig = ownerDocument.mutationEvents; ownerDocument.mutationEvents = false; // attributes setupDefaultAttributes(); // set mutation events flag back to its original value ownerDocument.mutationEvents = orig; } // synchronizeData() COM: <s> synchronizes the data name and value for fast nodes </s>
funcom_train/18755860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu setupWindowMenu() { JMenu w = new JMenu(MerlotResource.getString(UI, "window")); MerlotUtils.addActionToMenu(_actions._windowCascadeAction, w); MerlotUtils.addActionToMenu(_actions._windowTileHorizontalAction, w); MerlotUtils.addActionToMenu(_actions._windowTileVerticalAction, w); // For Window Menu w.addSeparator(); return w; } COM: <s> creates the windows menu from actions in xmleditor actions </s>
funcom_train/41747668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTotalIncomeActualAmount() { long total = 0; for (Iterator iterator = categories.iterator(); iterator.hasNext();) { Account account = (Account) iterator.next(); Integer accNum = new Integer(account.getAccountNum()); DetailedBudgetItem item = (DetailedBudgetItem)detIncomeItems.get(accNum); if (item != null) total += item.actualAmount; } return total; } COM: <s> total actual amount for income accounts </s>
funcom_train/5362461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(KeyObject key) { if (key instanceof VariableStringKey) { int comp = m_key.trim().compareTo(((VariableStringKey) key).m_key.trim()); if (comp == 0) { return KEY_EQUAL; } else if (comp < 0) { return KEY_LESS; } else { return KEY_MORE; } } else { return KEY_ERROR; } } COM: <s> compares the invoking code variable string key code to code key code </s>
funcom_train/20067022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runCommitHandlers() { try { // permanent for (Runnable r: onCommit) { r.run(); } // temporary for (Runnable r: onCommitOnce) { r.run(); } onCommitOnce.clear(); onValidateOnce.clear(); } catch (Exception ex) { throw new PanicException(ex); } } COM: <s> call methods registered to be called on commit </s>
funcom_train/42869491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addGlyph(FontDefinition.Glyph glyph) { int idx = glyphs.size(); if (glyph.getCode() > 0) { Integer codeI = new Integer(glyph.getCode()); indices.put(codeI, new Integer(idx)); glyphs.put(codeI, glyph); } glyphList.add(glyph); return idx; } COM: <s> add a glyph and return the index </s>
funcom_train/32190723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFolder(String name) { Tree.Item newFolder = new Tree.Item(); newFolder.setText(name); newFolder.setImage(MailClient.IMG_PATH + "folderclose.gif"); newFolder.setUserObject(new ArrayGrid()); folderMap.put(name, newFolder); root.getChildren().add(newFolder); } COM: <s> provides a simple interface for adding folders to the mail box viewers </s>