__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50983658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color parseColor( final String value ) { if( value.startsWith("#") ) { return Color.decode("0x"+value.substring(1)); } final Color color = (Color)colors_.get(value); if( color == null ) { throw new IllegalArgumentException("Unexpected color: "+value); } return color; } COM: <s> return the color that corresponds to the specified string </s>
funcom_train/10928034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean existsObject(String objectId) { try { ObjectData object = getObject(objectId, PropertyIds.OBJECT_ID, Boolean.FALSE, IncludeRelationships.NONE, null, Boolean.FALSE, Boolean.FALSE, null); assertNotNull(object); assertNotNull(object.getId()); } catch (CmisObjectNotFoundException e) { return false; } return true; } COM: <s> returns code true code if the object with the given id exists </s>
funcom_train/25647813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeSystemEvent(List<TestCommand> commands) { if (this.nextUserEvent == null) { this.nextUserEvent = new ArrayList<TestCommand>(); } final StepExecution execution = new StepExecution(dynamicRunID, adapter, scriptBuilder, this.nextUserEvent, commands); this.executionQueue.add(execution); this.nextUserEvent = null; } COM: <s> execute keywords of a system event </s>
funcom_train/9364556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onKeyUp(int keyCode, KeyEvent event) { if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.isTracking() && !event.isCanceled()) { return handleBack(true); } return doMovementKey(keyCode, event, MOVEMENT_UP); } COM: <s> override this to intercept key up events before they are processed by the </s>
funcom_train/13441930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void change(double r, double g, double b) { r = Math.min(Math.round(r), 255); g = Math.min(Math.round(g), 255); b = Math.min(Math.round(b), 255); c = new Color((int) r, (int) g, (int) b); } COM: <s> changes the color using r g b </s>
funcom_train/21435650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasUncertainLinkagePosition() { if(getPosition1().size() > 1) { return(true); } if(containsPosition1(0)) { return(true); } if(hasPosition2()) { if(getPosition2().size() > 1) { return(true); } if(containsPosition2(0)) { return(true); } } return(false); } COM: <s> check if this modification has an uncertain linkage position i </s>
funcom_train/9234810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reconnect(final String reason) { synchronized (myState) { if (myState == ServerState.CLOSING) { return; } } disconnect(reason); connect(serverInfo.getHost(), serverInfo.getPort(), serverInfo.getPassword(), serverInfo.getSSL(), profile); } COM: <s> reconnects to the irc server with a specified reason </s>
funcom_train/25657349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void search(String qfile) throws Exception { BufferedReader br = new BufferedReader(new FileReader(qfile)); String line = ""; int limit = reader.maxDoc(); List<String> queries = new ArrayList<String>(); while ((line = br.readLine()) != null) { line = line.trim(); if (line.length() == 0) { continue; } String[] s = line.split("\\t"); queries.add(s[0]); } time = 0; for (String query : queries) { search(query, limit); } System.out.println("Total search time " + time); } COM: <s> search queries print aggregate and individual query timings </s>
funcom_train/19424327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ActionForm getBlankForm() { TableEditForm form = new TableEditForm(); HttpSession ses = EaasyStreet.getServletRequest().getSession(); String tableName = (String) ses.getAttribute("table.name"); String keyField = EaasyStreet.getServletRequest().getParameter(Constants.RPK_RECORD_KEY); form.setTableDefinition(TableUtils.getTableDefinition(tableName)); form.setKeyField(keyField); return form; } COM: <s> returns a blank struts code action form code </s>
funcom_train/45623465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPhysicalPathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AspNetCompilerType_physicalPath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AspNetCompilerType_physicalPath_feature", "_UI_AspNetCompilerType_type"), MSBPackage.eINSTANCE.getAspNetCompilerType_PhysicalPath(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the physical path feature </s>
funcom_train/42536014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class Nowhere extends Control{ protected String name(){ return "NoWhere"; } public boolean skip(Class<?> c, String f){ return true; } public boolean skip(Edge e){ return true; } public boolean ignore(Class<?> c, String f){ return false; } public boolean ignore(Edge e){ return false; } } COM: <s> bypass all edges immutable i </s>
funcom_train/12199915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleEvent(ServerPDUEvent event) { PDU pdu = event.getPDU(); if (pdu != null) { if (pdu.isRequest()) { debug.write(DUTL, "receiver listener: handling request " + pdu.debugString()); } else if (pdu.isResponse()) { debug.write(DUTL, "receiver listener: handling response " + pdu.debugString()); } else { debug.write(DUTL, "receiver listener: handling strange pdu " + pdu.debugString()); } } } COM: <s> handles the event generated for received pdus just logs </s>
funcom_train/50189013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireLeaveInstructionNode(AbstractInstruction inst, SAXEvent event) { if (hasTraceListeners()) { // count of registered tracelisteners int countListener = traceListeners.size(); for (int i = 0; i < countListener; i++) { TraceListener currentListener = (TraceListener) traceListeners.elementAt(i); // call the according method on tracelistener currentListener.leaveInstructionNode(inst, event); } } } COM: <s> fire after an element of the stylesheet got processed </s>
funcom_train/3709052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void call(Method m, String a, String b) { try { m.invoke(this, new Object[]{ a, b }); } catch (java.lang.reflect.InvocationTargetException ite) { ite.printStackTrace(System.out); } catch (IllegalAccessException iae) { iae.printStackTrace(System.out); } } COM: <s> insert the methods description here </s>
funcom_train/17269321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsNew_NonnullFile() throws Exception { System.out.println("isNew_NonnullFile"); StyledEditorImpl instance = new StyledEditorImpl(testEAM, desktopManager); File testFile = File.createTempFile("tempFile", "txt"); instance.setFile(testFile); boolean expResult = false; boolean result = instance.isNew(); assertEquals(expResult, result); } COM: <s> t c se 8 </s>
funcom_train/40360072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeLargeFile(String fname) throws IOException { File largeFile = new File(fname); if (!largeFile.exists()) { byte[] text = "abcdefghijklmnopqrstuvwxyz\n".getBytes(); FileOutputStream os = new FileOutputStream(largeFile); for (int i = 0; i < 100000; i++) { os.write(text); } os.close(); } } COM: <s> initialize a large file used for tests </s>
funcom_train/9279678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertFailedExecuteUpdateForColumnName(SQLException ex) { // Derby client complains that the array is too long. // Embedded is smart enough to know which column caused the problem. if (usingDerbyNetClient()) { assertSQLState("X0X0D", ex); } else { assertSQLState("X0X0F", ex); } } COM: <s> assert execute update for column name failed </s>
funcom_train/14599045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countMarks() { int c = (penArray == null ? 0 : penArray.length); int count = 0; while (c-- > 0) { if (penArray[c] != null && !penArray[c].isDestroyed()) { ++count; } } return count; } COM: <s> count how many marks have been made by users </s>
funcom_train/3100344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void demo1() throws IOException, UnknownHostException, CycApiException { Log.current.println("Demonstrating getKnownConstantByName api function.\n"); CycFort snowSkiing = cycAccess.getKnownConstantByName("SnowSkiing"); Log.current.println("\nThe obtained constant is " + snowSkiing.cyclify()); } COM: <s> demonstrates get known constant by name api function </s>
funcom_train/28366988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getJavaDeclarationSnippet( final BeanNode<T, ? extends BeanProxy<T>> node ) { final StringBuffer buffer = new StringBuffer(); buffer.append( node.getShortClassName() ); buffer.append( " the" ); buffer.append( getShortName() ); buffer.append( ";" ); return buffer.toString(); } COM: <s> get the java declaration snippet </s>
funcom_train/19865717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshCurrentViewer() { if (currentViewMode != UNCONFIGURED_MODE) { final LockerBrowserViewPanel currentPanel = lockerPanels[currentViewMode]; if (currentPanel.getLockerViewer().isDirty()) { Runnable runnable = new Runnable() { public void run() { currentPanel.getLockerViewer().updateContent(); } }; BusyIndicator.showWhile(getDisplay(), runnable); } } } COM: <s> updates the content of the current viewer </s>
funcom_train/45608818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Tree createTree() { final Tree treeAux = new Tree(); treeAux.setModelType(TreeModelType.PARENT); treeAux.setNameProperty("Name"); treeAux.setIdField("EmployeeId"); treeAux.setParentIdField("ReportsTo"); treeAux.setShowRoot(true); return treeAux; } COM: <s> create a new tree </s>
funcom_train/38512847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAvailable(boolean available) { if (isAvailable != available) { isAvailable = available; if (mChildren != null) { for (Iterator it = mChildren.iterator(); it.hasNext();) { Feature feature = (Feature) it.next(); feature.setAvailable(isAvailable); } } fireItemChanged(); } } COM: <s> marks the feature as in available regarding project scheduling </s>
funcom_train/32947850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear( int value ) throws PropertyVetoException { if ( value >= target.getMinimum( Calendar.YEAR ) && value <= target.getMaximum( Calendar.YEAR ) ) { target.set( value, month, day, hour, minute, 0 ); year = value; } else { throw new PropertyVetoException( "cannot set year", new PropertyChangeEvent( this, "target change", new Integer( year ), new Integer( value ) ) ); } } COM: <s> sets the year </s>
funcom_train/17269349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeactivate() { System.out.println("deactivate"); EditorActionManager instance = jwp.getEditorActionManager(); Editor editor = instance.getActiveEditor(); //1. test the case when editor is active instance.deactivate(editor); assertFalse(instance.isActiveEditor()); //2. test the case when editor is inactive instance.deactivate(editor); assertFalse(instance.isActiveEditor()); } COM: <s> t c eam 5 </s>
funcom_train/28902167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VariableBindingBase createVariableBindingBase(SetOfStatements sts) { CloseableIterator<Statement> it = sts.getStatements(); while (it.hasNext()) { Statement s = it.next(); if (s.getSubject().equals(VariableBindingBase.vbbBNode) && s.getPredicate() .equals(VariableBindingBase.vbbPredicate)) { return (VariableBindingBase) CheatingInMemoryObjectStore .getInstance().get(s.getObject().stringValue()); } } return null; } COM: <s> todo gets variable bindings for the set of statements fixme this is using </s>
funcom_train/22570540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumVisibleButtons() { checkWidget(); int num = 0; for (int i = 0; i < mButtons.size(); i++) { CustomButton b = (CustomButton) mButtons.get(i); if (b.isPresented()) num++; } return num; } COM: <s> returns the number of currently visible buttons </s>
funcom_train/12119493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { BitString result = null; try { result = (BitString) super.clone(); } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } result.bits = new int[bits.length]; System.arraycopy(bits, 0, result.bits, 0, result.bits.length); return result; } COM: <s> clones the bit string </s>
funcom_train/5341570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleSelection(int row) { UploadDataLine dataLine = (UploadDataLine)DATA_MODEL.get(row); _chatEnabled = dataLine.isChatEnabled(); _browseEnabled = dataLine.isBrowseEnabled(); setButtonEnabled(UploadButtons.KILL_BUTTON, !TABLE.getSelectionModel().isSelectionEmpty()); setButtonEnabled(UploadButtons.BROWSE_BUTTON, _browseEnabled); } COM: <s> handles the selection of the specified row in the download window </s>
funcom_train/42186360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createScrollMenu(ElementalList list, int pageSize, Vector2D vector) { ViewCompositeComponentWrapper vcc = new ViewCompositeComponentWrapper(list); ScrollDecorator scroll = new ScrollDecorator(vcc, pageSize * 20, 50); scroll.setLocation(vector.getX().intValue() - scroll.getWidth()/2, vector.getY().intValue() - scroll.getHeight()/2); view.addViewComponent(scroll); prepareContextStack(); contextStack.add(scroll); } COM: <s> in a context menu shows a scrollable menu capable of displaying mass </s>
funcom_train/43667236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getCutItem() { if (cutItem == null) { cutItem = new JMenuItem("Cut"); cutItem.setFont(new Font(Constants.FONT, Constants.FONT_STYLE_TOOL, 12)); cutItem.setAccelerator(KeyStroke.getKeyStroke( KeyEvent.VK_X, ActionEvent.CTRL_MASK)); } cutItem.setEnabled(false); return cutItem; } COM: <s> this method initializes cut item </s>
funcom_train/25059391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Process submitAsynchJob(IProcessData processData, String submissionKey) throws SubmitJobException { //logger.debug(getClass().getSimpleName() + " Process Data : " + processData); try { init(processData); return submitAsynchronousJob(submissionKey); } catch (Exception e) { throw new SubmitJobException(e); } } COM: <s> this method is invoked from grid submit and wait mdb </s>
funcom_train/42068239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSegmentsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkPlayList_segments_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkPlayList_segments_feature", "_UI_ChunkPlayList_type"), WavPackage.Literals.CHUNK_PLAY_LIST__SEGMENTS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the segments feature </s>
funcom_train/4232659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeChannels(List<String> channelNames) { synchronized(channels) { Iterator<LocalChannel> i = channels.iterator(); while (i.hasNext()) { LocalChannel channel = i.next(); if (channelNames.contains(channel.getName())) { i.remove(); } } } RBNBController.getInstance().updateMetadata(); } COM: <s> removes the code local channel code s with code channel names code from </s>
funcom_train/50327821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int totalLength() { int result = length(); List<SdfMacro> l = getChildren(); if (l == null) return result; for (int i=0; i<l.size(); i++) result += l.get(i).totalLength(); return result; } COM: <s> total length including contained instructions </s>
funcom_train/21844493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final InstructionContext env) throws JBasicException { /* * We don't want to pop this item off the stack (too inefficient) since * we really don't want to disturb the top item anyway; just duplicate * it. So see how big the stack is, and get a reference to the top * item. */ final int tos = env.codeStream.stackSize(); final Value value = env.codeStream.getStackElement(tos-1); /* * Now add the reference to the same item to the stack again. */ env.push(value); return; } COM: <s> duplicates the top stack item </s>
funcom_train/31416179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void statistics() { m_err.println("***** HitMe Test Summary *****"); m_err.println("Succeeded: " + m_successCount + " Failed: " + m_failCount + " Aborted: " + m_abortCount + " Skipped: " + m_skipCount + " Missing: " + m_missingCount); } COM: <s> output statistics on tests passed failed etcetera </s>
funcom_train/20997901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initControls() { // Create panel for statusstrip and toolbar status = new StatusStrip(); tools = new ToolBar(); buttons = new ButtonStrip(); // Create a panel for the StatusStrip and the ToolBar Panel bottomPanel = new Panel(); bottomPanel.setLayout(new BorderLayout()); bottomPanel.add(BorderLayout.NORTH, status); bottomPanel.add(BorderLayout.CENTER, tools); // Add contents to the frame add(BorderLayout.NORTH, buttons); add(BorderLayout.CENTER, view); add(BorderLayout.SOUTH, bottomPanel); pack(); } COM: <s> create and set the controls of the frame </s>
funcom_train/40424577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LatLng getRandomPoint() { double lat = 48.25 + (Math.random() - 0.5) * 14.5; double lng = 11.00 + (Math.random() - 0.5) * 36.0; return LatLng.newInstance(Math.round(lat * 10) / 10, Math.round(lng * 10) / 10); } COM: <s> retrieves a random map point </s>
funcom_train/46165127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBackgroundImagePath(String name, String path) { // Check parameters if (name == null && path == null) { throw new NullPointerException( "Parameters name and path can not be null."); } else if (name == null) { throw new NullPointerException("Parameter name can not be null."); } else if (path == null) { throw new NullPointerException("Parameter path can not be null."); } backgroundImagePaths.put(name, path); activeBackgroundImagePath = path; } COM: <s> adds a named background image to this location </s>
funcom_train/18149964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConveyedAcknowledgement(Acknowledgement conveyedAcknowledgement) { // create the association set if it doesn't exist already if(_conveyedAcknowledgement == null) _conveyedAcknowledgement = new AssociationSetImpl<Acknowledgement>(); // add the association to the association set getConveyedAcknowledgement().add(conveyedAcknowledgement); // make the inverse link conveyedAcknowledgement.setConveyingTransmission(this); } COM: <s> adds an association conveyed acknowledgement </s>
funcom_train/50346638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkFile(String name) { File fp = new File(name); if (fp.exists()) return true; fp = new File(prefsDir()+name); if (fp.exists()) { return true; } else { File fx = new File(xmlDir()+name); if (fx.exists()) { return true; } else { return false; } } } COM: <s> check if a file of the given name exists </s>
funcom_train/5461819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlAttendeeProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Resource blankNode = crawlParameterList(property, rdfContainer); addStatement(rdfContainer, parentNode, NCAL.attendee, blankNode); processAttendeeOrOrganizer(property, blankNode, rdfContainer); addStatement(rdfContainer, blankNode, RDF.type, NCAL.Attendee); } COM: <s> crawls the attendee property </s>
funcom_train/22791735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showMessage(String msg, Object aType) { TrayIcon.MessageType type = (TrayIcon.MessageType) aType; if (type==null) { type = TrayIcon.MessageType.ERROR; } String title = TrayIcon.MessageType.ERROR.equals(type) ? "Error" : "Info" ; trayIcon.displayMessage ( title , msg , type ); } COM: <s> show an message </s>
funcom_train/46858455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getBtnRemoveSelection() { if (btnRemoveSelection == null) { btnRemoveSelection = new JToggleButton(); btnRemoveSelection.setIcon(new ImageIcon(getClass().getResource("/resources/icons/selectionremove.png"))); btnRemoveSelection.setToolTipText("Subtract from selection"); btnRemoveSelection.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { SetRemoveFromSelection(); } }); } return btnRemoveSelection; } COM: <s> this method initializes btn remove selection </s>
funcom_train/13260297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double fact(int n) { double ans = 1; if (Double.isNaN(n) || n < 0) { ans = Double.NaN; } else if (n > 170) { // The 171! is too large to fit in a double. ans = Double.POSITIVE_INFINITY; } else { for (int k = 2; k <= n; k++) { ans *= k; } } return ans; } COM: <s> returns the factorial of an integer </s>
funcom_train/32905735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void myCreateClass(String classList[]) { for (int i=0 ; i < classList.length ; i++) { OntClass myClass = model.createClass(nameSpace + classList[i]); // System.out.println("<owl:Class rdfs:ID=\"" + classList[i] + "\">"); // System.out.println("</owl:Class>"); // System.out.println(""); } } COM: <s> add new classes to the model </s>
funcom_train/26323483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCom(String[] parts,int com){ this.parts=parts; this.com=com; try{ byte[] temp=Utils.getBytes(parts,com); out.write(temp); }catch(IOException e){ System.out.println("ClientT.setCom(): Error sending bytes"); } } COM: <s> send encoded message for number of strings </s>
funcom_train/12157522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GGeoString getZoomInGeoString(GGeoString geoString){ GImage image = this.fromGeoStringToGImage(geoString); image.setImgX(image.getImgX() << 1); image.setImgY(image.getImgY() << 1); image.setZoom(image.getZoom() - 1); return this.fromGImageToGeoString(image); } COM: <s> in extended version for simplicity zoom on photo will be done </s>
funcom_train/42535468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof Meth))return false; if(o == this)return true; Meth oo = (Meth)o; return (((Object)ret).equals(oo.ret))&&(((Object)name).equals(oo.name))&&(((Object)args).equals(oo.args)); } COM: <s> is the given object equal to this meth </s>
funcom_train/19385828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckParams08() { jcc.setJcHome(jcHome); jcc.setPackageName("my.package"); jcc.setPackageAID(aid1); jcc.setVersion("1.0"); jcc.setMajorVersion(1); jcc.setMinorVersion(0); try { jcc.checkParams(); failNoException(); } catch(BuildException e) {} } COM: <s> version set and major minor version set too </s>
funcom_train/11070083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDialogExecutor(FacesContext context, SCXMLExecutor exec) { assert context != null; assert exec != null; Map map = context.getExternalContext().getSessionMap(); String key = getDialogKey(context); assert key != null; map.put(key, exec); } COM: <s> p set the </s>
funcom_train/22582024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll (Collection c) { // First, ensure that we'll have enough space for these. ensureCapacity (size() + c.size()); // Need to store a result if any changes have been made. boolean changed = false; // Now we iterate through it all, adding each object to // this collection. Iterator itr = c.iterator(); while (itr.hasNext()) { // I've never written a line of code that looks // like this before. :) changed |= add (itr.next()); } // Return the result. return changed; } COM: <s> appends all of the elements in the specified collection to the end of </s>
funcom_train/3362911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRootPane(JRootPane root) { if(rootPane != null) { remove(rootPane); } rootPane = root; if(rootPane != null) { boolean checkingEnabled = isRootPaneCheckingEnabled(); try { setRootPaneCheckingEnabled(false); add(rootPane, BorderLayout.CENTER); } finally { setRootPaneCheckingEnabled(checkingEnabled); } } } COM: <s> sets the new code root pane code object for this window </s>
funcom_train/45395137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderHeaders (PrintStream out, IUITableModel model, int totalWidth, int[] widths) { this.renderBorderHorizontal(out, widths); out.print("|"); for (int c=0; c<widths.length; c++) this.renderColumnData(out, model.getHeader(c), widths[c], this.getAlignment(model, c)); out.println(); this.renderBorderHorizontal(out, widths); } COM: <s> render the table headers </s>
funcom_train/22939892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCameraPayAmt(){ double answer = 0; //Price p = new Price(); try { answer = p.getCameraPayWithPayType(camera, this.payType); } catch (OurExceptions.InvalidWorkType ex) { ex.printStackTrace(); } return answer; } COM: <s> returns the amount paid towards the camera </s>
funcom_train/37086062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void zoomBy(int pixels) { if (pixels > 20) pixels = 20; else if (pixels < -20) pixels = -20; float deltaPercent = pixels * zoomPercentSetting / 50; if (deltaPercent == 0) deltaPercent = (pixels > 0 ? 1 : (deltaPercent < 0 ? -1 : 0)); zoomRatio = (deltaPercent + zoomPercentSetting) / zoomPercentSetting; zoomPercentSetting += deltaPercent; } COM: <s> standard response to user mouse vertical shift drag </s>
funcom_train/37009514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double greyMean() { double mean=0.f; for (int v = 0; v < getHeight(); v++) { for (int u = 0; u < getWidth(); u++) { mean += grey(u, v); } } mean /= getWidth()*getHeight(); return mean; } COM: <s> returns the mean pixel value in band 0 </s>
funcom_train/14395590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getAllQualifiers() { ArrayList result =new ArrayList(qualifiers); Hashtable names=new Hashtable(); for(int i=0;i<result.size();i++){ UMLQualifier q=(UMLQualifier)result.get(i); names.put(q.name.toLowerCase(),""); } if (parentElement != null) { ArrayList parent=parentElement.getAllQualifiers(); for(int i=0;i<parent.size();i++){ UMLQualifier q=(UMLQualifier)parent.get(i); if(names.put(q.name.toLowerCase(),"")==null){ result.add(q); } } } return result; } COM: <s> getter for local and inherited qualifiers </s>
funcom_train/3315023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertConsistency(){ super.assertConsistency(); assertEqualSequence("SubMap iterator not equal to Map iterator.", getTestObject().entrySet().iterator(), new FilterIterator<Entry<K,V>>(parent.entrySet().iterator(), subMapFilter)); } COM: <s> checks consistency of all reading sortedmap methods </s>
funcom_train/35837472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scaleArrow(AffineTransform trans) { if (trans == null) CURRENT_ARROW_WIDTH = ARROW_WIDTH; else { Point p1 = new Point(ARROW_WIDTH, ARROW_WIDTH); try { p1 = (Point)trans.transform(p1, new Point(0, 0)); } catch(Exception e) { System.out.println("can't convert arrow width\n\n"+e.getMessage()); } if (p1.x < 7) p1.x = p1.x+1; CURRENT_ARROW_WIDTH = p1.x; } } COM: <s> scale the arrow with with the given transform </s>
funcom_train/5459905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getMessageArea() { if (messageArea == null) { messageArea = new JTextArea(); messageArea.setOpaque(false); messageArea.setLineWrap(true); messageArea.setWrapStyleWord(true); messageArea.setEditable(false); } return messageArea; } COM: <s> this method initializes message area </s>
funcom_train/14166289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUpdateInterval(int uI){ if (uI > Math.pow(2, 20)) return; this.updateInterval = uI; if (uI == DEFAULT_UPDATE_INTERVAL) fastForward.setText(new String("Fast Forward")); else fastForward.setText(new String(uI + "X")); st.changeUpdateInterval(this, uI); } COM: <s> update interval setter </s>
funcom_train/25460773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected final String TEXT_25 = NL + "\t{" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @see junit.framework.TestCase#tearDown()" + NL + "\t */" + NL + "\tprotected void tearDown()" + NL + "\tthrows "; COM: <s> protected final string text 24 nl t nl t nl t </s>
funcom_train/42670230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createUsersPanels(){ this.setJMenuBar(new MainMenu(comName, userStatus)); JPanel globalPanel=new JPanel(new BorderLayout()); globalPanel.add(new MainTitle(comName), BorderLayout.NORTH); globalPanel.add(new PanelCenter_Users(comName, userStatus), BorderLayout.CENTER); globalPanel.add(new PanelBottom(comName), BorderLayout.SOUTH); pane.add(globalPanel); this.setSize(700, 300); this.setVisible(true); this.pack(); } COM: <s> created all users related panels </s>
funcom_train/19399148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long handleCommit() { if (metadata != null && (root == null || !root.dirty && metadata.getRootAddr() == root.getIdentity())) { /* * There have not been any writes on this btree. */ return metadata.addrMetadata; } /* * Flush the btree, write its metadata record, and return the address of * that metadata record. */ return write(); } COM: <s> handle request for a commit by </s>
funcom_train/2294812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPartialMatch(Pattern pattern, String path) { Matcher matcher = pattern.matcher(path); if (matcher.matches()) { return true; } if (!path.endsWith("/")) { matcher = pattern.matcher(path + "/"); return matcher.matches(); } return false; // return matcher.hitEnd(); } COM: <s> returns if the given path matches or partially matches the pattern </s>
funcom_train/47751393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWebSiteUser(String ipUser,String siteName,String ipSiteName,double sizeFirstPacket){ UserWebSitesInfo uwsi=hashUsersMonitor.get(ipUser); if (uwsi!=null){ WebSiteInfo website=new WebSiteInfo(siteName,ipSiteName); website.setByteDebit(sizeFirstPacket); uwsi.addWebSite(website); } } COM: <s> add a website for an user </s>
funcom_train/3381596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if ((obj instanceof KeepAliveKey) == false) return false; KeepAliveKey kae = (KeepAliveKey)obj; return host.equals(kae.host) && (port == kae.port) && protocol.equals(kae.protocol) && this.obj == kae.obj; } COM: <s> determine whether or not two objects of this type are equal </s>
funcom_train/39881116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public X500Principal getIssuerX500Principal() { try { // TODO if there is no X.509 certificate provider installed // should we try to access Harmony X509CRLImpl via classForName? CertificateFactory factory = CertificateFactory .getInstance("X.509"); X509CRL crl = (X509CRL) factory .generateCRL(new ByteArrayInputStream(getEncoded())); return crl.getIssuerX500Principal(); } catch (Exception e) { throw new RuntimeException("Failed to get X500Principal issuer", e); } } COM: <s> returns the issuer distinguished name of this crl </s>
funcom_train/31401423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTypeDeclarationCount() { int count = 0; if (members != null) { for (int i = members.size() - 1; i >= 0; i -= 1) { if (members.get(i) instanceof TypeDeclaration) { count += 1; } } } if (getTypeParameters() != null) count += getTypeParameters().size(); return count; } COM: <s> get the number of type declarations in this container </s>
funcom_train/33859741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelOutput() { if (jPanelOutput == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.weightx = 1.0; jPanelOutput = new JPanel(); jPanelOutput.setLayout(new GridBagLayout()); jPanelOutput.add(getResultsMainPane(), gridBagConstraints); } return jPanelOutput; } COM: <s> this method initializes j panel output </s>
funcom_train/46764361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileText() throws Exception { if (file == null) return ""; FileInputStream fis = new FileInputStream(file); byte[] bytes = new byte[(int) file.length()]; fis.read(bytes); fis.close(); return new String(bytes); } COM: <s> this returns the text contained in the file </s>
funcom_train/46734940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsertDt(DateTimeModel insertDt) { if (Converter.isDifferent(this.insertDt, insertDt)) { DateTimeModel oldinsertDt= DateTimeModel.getNow(); oldinsertDt.copyAllFrom(this.insertDt); this.insertDt.copyAllFrom(insertDt); setModified("insertDt"); firePropertyChange(String.valueOf(RECORDITEMS_INSERTDT), oldinsertDt, insertDt); } } COM: <s> date the record item was created </s>
funcom_train/41344300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void schedule() { if (this.mapView != null) { while (!this.jobQueue1.isEmpty()) { this.jobQueue2.offer(this.mapView.setJobPriority(this.jobQueue1.poll())); } // swap the two job queues this.tempQueue = this.jobQueue1; this.jobQueue1 = this.jobQueue2; this.jobQueue2 = this.tempQueue; } } COM: <s> schedules all jobs in the queue </s>
funcom_train/2537025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MTColor getBackgroundColor() { MTColor newColor = new MTColor(this.backgroundColor.getR(), this.backgroundColor.getG(), this.backgroundColor.getB(), this.backgroundColor.getAlpha() * this.getOpacity() / 255f); return newColor; } COM: <s> gets the background color </s>
funcom_train/27947555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFocusedSwingEditor(SwingEditor editor) { if (getFocusedSwingEditor() != editor) { SwingEditor oldDecorator = getFocusedSwingEditor(); SwingEditor newDecorator = editor; focusedEditor = newDecorator; if (oldDecorator != null) oldDecorator.getComponent().setBorder(false); if (newDecorator != null) newDecorator.getComponent().setBorder(true); fireFocusChangeEvent(oldDecorator,newDecorator); } } COM: <s> call for change focus </s>
funcom_train/42811567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showWaiting(final Activity activity) { if (logging == true) Log.v(TAG, "entered showWaiting"); final AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setTitle(R.string.waiting_title); builder.setMessage(R.string.waiting_body); builder.setPositiveButton(R.string.waiting_dismiss_button, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { ; } }); builder.create().show(); } COM: <s> displays waiting for position page </s>
funcom_train/19976403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedIndex(int itemindex) { if (getComboBox().getItemCount() > 0) { if (itemindex < getComboBox().getItemCount()) { getComboBox().setSelectedIndex(itemindex); } else { throw new IndexOutOfBoundsException(itemindex + " must be lower than " + getComboBox().getItemCount()); } } } COM: <s> delegates to get combo box </s>
funcom_train/36258875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexPosition(@NotNull final String searchString) { if (sortIndexChars == null || searchString.length() < 1) { return -1; } final char c = searchString.charAt(0); for (int n = 0; n < sortIndexChars.length; n++) { if (c == sortIndexChars[n]) { return n; } } return -1; } COM: <s> get the index position of a display section of a search string </s>
funcom_train/11104207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionListener(ActionListenerBean bean) { if (bean.getJsfid() != null) { actionListeners.add(bean); } else { log.error(messages.getMessage("missing.jsfid.error", new Object[] {"ActionListenerBean.jsfid", getJsfid()})); } } COM: <s> p adds an </s>
funcom_train/31432301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimedMessage(String msg) { setUserMessage(msg); final int delay = 8000; final ActionListener eraser = new ActionListener() { public void actionPerformed(ActionEvent evt) { setUserMessage(""); } }; final javax.swing.Timer delayer = new javax.swing.Timer(delay, eraser); delayer.setRepeats(false); delayer.start(); } COM: <s> give the user a message and erase it after a few seconds </s>
funcom_train/40760897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVirtualDirectory(String realDirectoryP) { for (Entry<String, String> entry : directories.entrySet()) { String value = entry.getValue(); if (realDirectoryP.startsWith(value)) { String virtual = entry.getKey(); return virtual + realDirectoryP.substring(entry.getValue().length()); } } return null; } COM: <s> try to transform a real directory to a virtual directory </s>
funcom_train/269235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { Thread t = this.threadVar.get(); // log.Applidebug("Start worker"); if (t != null) {//log.Applidebug("Starting worker"); t.start(); } //else log.Applidebug("no thread worker"); } COM: <s> start the worker thread </s>
funcom_train/21954401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIconToDisconnected() { if (getDisconnectedIcon() != null) setIcon(getDisconnectedIcon()); else { // create the new Icon. ImageIcon icon = Pooka.getUIFactory().getIconManager().getIcon("FolderTree.Disconnected"); if (icon != null) { setDisconnectedIcon(icon); setIcon(getDisconnectedIcon()); } } } COM: <s> sets the icon to the disconnected icon </s>
funcom_train/22166186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onSelected(int menuId) { boolean selected = menuId == m_MenuId; if (selected && m_Listeners != null) { ActionEvent evt = new ActionEvent(this,0,""); for (Enumeration enum = m_Listeners.elements(); enum.hasMoreElements(); ) { ActionListener listener = (ActionListener)enum.nextElement(); listener.actionPerformed(evt); } } return selected; } COM: <s> callback when user selects menu item find it by comparing menu ids </s>
funcom_train/19270117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Weekday getPrevious() { switch (this) { case MONDAY: return SUNDAY; case TUESDAY: return MONDAY; case WEDNESDAY: return TUESDAY; case THURSDAY: return WEDNESDAY; case FRIDAY: return THURSDAY; case SATURDAY: return FRIDAY; case SUNDAY: return SATURDAY; default : throw new IllegalCaseException(Weekday.class, this); } } COM: <s> this method gets the previous </s>
funcom_train/3561578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getResizeOption(int numComponent) throws IndexOutOfBoundsException { if (numComponent >= 0 && numComponent < resizeChoiceList.size()) return ((Integer) resizeChoiceList.get(numComponent)).intValue(); else throw new IndexOutOfBoundsException("Component number not valid!"); } COM: <s> returns the resize option for a component </s>
funcom_train/34795752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double toDouble(List<Boolean> list, int begin, int end) { // this is very efficient since only integers and bit operations are // used int b = 1; int sum = 0; for (int i = end - 1; i >= begin; i--) { if (list.get(i)) { sum |= b; } b <<= 1; } return (double) sum / b; } COM: <s> converts a sublist of boolean values to an integer in 0 1 </s>
funcom_train/12781777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expand(int newOffset, int newCapacity) { int wordDiff = wordDiff(newOffset, offset); int[] oldbits = bits; bits = new int[subscript(newCapacity) + 1]; for (int i = 0; i < oldbits.length; i++) { bits[i - wordDiff] = oldbits[i]; } offset = newOffset; } COM: <s> expand this bit vector to size new capacity </s>
funcom_train/28343816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testArchiveLoad() { try { Probe probe = ProbeXmlParser.parse(TestTwissProbe.STR_FILE_LOAD); Assert.assertTrue(probe instanceof TwissProbe); } catch (ParsingException e) { e.printStackTrace(); Assert.fail("TestTwissProbe#testArchiveLoad() - unable to parse file " + STR_FILE_LOAD); return; } } COM: <s> test the ability to recover a code twiss probe code object from </s>
funcom_train/49608830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteCountries(String username,EntityManager em,List<Country> vos) throws Throwable { try { for(Country vo: vos) { vo.setDeleted(Consts.FLAG_Y); JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo); } } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> delete logically a country </s>
funcom_train/45543507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IJSCProject javaProject) { fJavaProject= javaProject; fPackageExplorer.addPostSelectionChangedListener(fHintTextGroup); fActionGroup.getResetAllAction().setBreakPoint(javaProject); if (Display.getCurrent() != null) { doUpdateUI(); } else { Display.getDefault().asyncExec(new Runnable() { public void run() { doUpdateUI(); } }); } } COM: <s> initialize the controls displaying </s>
funcom_train/51646543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enforceNotEmpty() { boolean hasPosition= false; for (Iterator it= fGroups.iterator(); it.hasNext(); ) if (!((LinkedPositionGroup) it.next()).isEmpty()) { hasPosition= true; break; } if (!hasPosition) throw new IllegalStateException("must specify at least one linked position"); //$NON-NLS-1$ } COM: <s> asserts that there is at least one linked position in this linked mode </s>
funcom_train/19105624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filter(byte mask) { filterChoice = mask; switch (mask) { case ALL: current = matches; //System.out.println("Showing all matches"); break; case OFFERS_ONLY: current = offers; //System.out.println("Showing offers only"); break; case INTERESTS_ONLY: current = interests; //System.out.println("Showing interests only"); break; default: // runtime error! throw new IllegalArgumentException("Invalid filter mask"); } // update panel if (matchesPanel != null) matchesPanel.updateTable(); } COM: <s> filters the results that are displayed in the table </s>
funcom_train/16524465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swapLayerDown(int index) { if (index - 1 < 0) { throw new RuntimeException( "Can't swap down when already at the bottom."); } MapLayer hold = (MapLayer)layers.get(index - 1); layers.set(index - 1, getLayer(index)); layers.set(index, hold); } COM: <s> moves the layer at code index code down one in the vector </s>
funcom_train/44216718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getTabbedPane() { tabbedPane = new JTabbedPane(); tabbedPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), " ID3v2 Chapter Frames ")); tabbedPane.setPreferredSize(new Dimension(250, 520)); return tabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/22678613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int moveDown(int index) { if (index < options.size() - 1) { Option opt1 = options.get(index); Option opt2 = options.get(index + 1); options.set(index, opt2); options.set(index + 1, opt1); Object o1 = objects.get(index); Object o2 = objects.get(index + 1); objects.set(index, o2); objects.set(index + 1, o1); return index + 1; } return index; } COM: <s> move an item down </s>
funcom_train/23971363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Expression readNullIfExpression() { read(); readThis(Tokens.OPENBRACKET); Expression c = XreadValueExpression(); readThis(Tokens.COMMA); Expression alternative = new ExpressionOp(OpTypes.ALTERNATIVE, new ExpressionValue((Object) null, (Type) null), c); c = new ExpressionLogical(c, XreadValueExpression()); c = new ExpressionOp(OpTypes.CASEWHEN, c, alternative); readThis(Tokens.CLOSEBRACKET); return c; } COM: <s> reads a nullif expression </s>
funcom_train/36106673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getScriviCommand() { if (scriviCommand == null) {//GEN-END:|83-getter|0|83-preInit // write pre-init user code here scriviCommand = new Command("Scrivi", Command.OK, 0);//GEN-LINE:|83-getter|1|83-postInit // write post-init user code here }//GEN-BEGIN:|83-getter|2| return scriviCommand; } COM: <s> returns an initiliazed instance of scrivi command component </s>