__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/22268022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void suspend() { final boolean wasSuspended = saveState(SUSPENDFILE_NAME); if (wasSuspended) { setVisible(false); System.exit(0); } else { JOptionPane.showMessageDialog(this, this.commonResources.getString("FailedToStoreState"), this.commonResources.getString("SuspendFailed"), JOptionPane.WARNING_MESSAGE); } } COM: <s> save the emulator state to a file and exit </s>
funcom_train/32824988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVariable(String name, String value) { // Handle things in a case insensitive manner... String caseSpecificName = (String) nameMap.get(name.toUpperCase()); if (caseSpecificName == null) { caseSpecificName = name; nameMap.put(caseSpecificName, caseSpecificName); } variables.setProperty(caseSpecificName, value); } COM: <s> set the specified environment variable to the specified </s>
funcom_train/18497464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killAllNonCrucialTasks() { // weed out and remove all noncrucial tasks from the task list, but // leave crucial tasks alive for(Iterator<Task> iter = tasks.iterator(); iter.hasNext(); ) { Task task = iter.next(); if(task.isCrucial()) { continue; } iter.remove(); } if(focusedTask != null) { crucialTasks.remove(focusedTask); focusedTask = null; } } COM: <s> removes all non crucial tasks from the kernel </s>
funcom_train/20885346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrimitiveBooleanFLR() { PrimitiveBooleanDTO dto = new PrimitiveBooleanDTO(); dto.primitiveBooleanField = false; assertTrue(JSefaTestUtil.serialize(FLR, dto).indexOf("false") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(FLR, dto); } COM: <s> tests primitive boolean flr </s>
funcom_train/7647012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildSlots(ObjectStreamField[] fields) { slotsToSerialize = new ObjectSlot[fields.length]; for (int i = 0; i < fields.length; i++) { ObjectSlot s = new ObjectSlot(); slotsToSerialize[i] = s; s.field = fields[i]; } // We assume the slots are already sorted in the right shape for dumping } COM: <s> build emulated slots that correspond to emulated fields </s>
funcom_train/3290675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean process(scanpage sp, Hashtable cmds,Hashtable vars) { String cmdline,token; for (Enumeration h = cmds.keys();h.hasMoreElements();) { cmdline=(String)h.nextElement(); StringTokenizer tok = new StringTokenizer(cmdline,"-\n\r"); token = tok.nextToken(); if (token.equals("CACHEDELETE")) { log.debug("process(): DELETE ON CACHES"); InsRel.deleteNodeCache(); InsRel.deleteRelationCache(); } } return(false); } COM: <s> execute the commands provided in the form values </s>
funcom_train/31208228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxRows() throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); int result=maxRows; if(Trace.isEnabled()) Trace.traceResult(result); return result; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> gets the maximum number of rows for a result set </s>
funcom_train/11641798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(final Object proxy, final Method method, final Object[] parameters) throws Throwable { if (eventTypes.isEmpty() || eventTypes.contains(method.getName())) { if (hasMatchingParametersMethod(method)) { return MethodUtils.invokeMethod(target, methodName, parameters); } else { return MethodUtils.invokeMethod(target, methodName); } } return null; } COM: <s> handles a method invocation on the proxy object </s>
funcom_train/24262167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFieldValidationN10() { try { User user = (User) jenineHawthorn.clone(); user.setEmail(""); curationService.addUser(admin, user); fail(); } catch(MacawException exception) { int totalNumberOfErrors = exception.getNumberOfErrors(); assertEquals(1, totalNumberOfErrors); int numberOfErrors = exception.getNumberOfErrors(MacawErrorType.INVALID_USER); assertEquals(1, numberOfErrors); } } COM: <s> ensure that the email of the address has a value </s>
funcom_train/40409368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllForAd() throws Exception { // Create selector. AdExtensionOverrideSelector selector = new AdExtensionOverrideSelector(); selector.setAdIds(new long[] {adIdWithExtension}); AdExtensionOverridePage page = service.get(selector); assertNotNull(page); assertNotNull(page.getEntries()); assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1); } COM: <s> test getting all ad extension override for an ad </s>
funcom_train/8085046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pattern(String pattern) { for (int i = 0; i < m_Selected.length; i++) m_Selected[i] = Pattern.matches( pattern, m_Instances.attribute(i).name()); fireTableRowsUpdated(0, m_Selected.length); } COM: <s> applies the perl regular expression pattern to select the attribute </s>
funcom_train/11692832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Cluster[] newModels) { // compute new model parameters based upon observations and update models for (int i = 0; i < newModels.length; i++) { newModels[i].computeParameters(); clusters.get(i).setModel(newModels[i]); } // update the mixture mixture = UncommonDistributions.rDirichlet(totalCounts(), alpha0); } COM: <s> update the receiver with the new models </s>
funcom_train/47027547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TemplateStore getTemplateStore() { if (fStore == null) { fStore= new ContributionTemplateStore(getContextTypeRegistry(),DbUIPlugin.getInstance().getPreferenceStore(), CUSTOM_TEMPLATES_KEY); try { fStore.load(); } catch (IOException e) { DatabaseLog.logError("Unable to load template store", e); } } return fStore; } COM: <s> returns this plug ins template store </s>
funcom_train/22554321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConnectionToOldDisallowed() { Connection c= new Connection("127.0.0.1", SERVER_PORT); try { c.initialize(new Properties(), new EmptyResponder(), 1000); fail("handshake should not have succeeded"); } catch (IOException e) { } } COM: <s> tests to make sure that connections to old hosts are not allowed </s>
funcom_train/18770644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure() throws CoreException { if (DEBUG) { System.out.println("configuring Spring project nature"); } IProject project = getProject(); IProjectDescription desc = project.getDescription(); ICommand builderCommand = getBuilderCommand(desc, SpringCore.BUILDER_ID); if (builderCommand == null) { // Add a new build spec ICommand command = desc.newCommand(); command.setBuilderName(SpringCore.BUILDER_ID); // Commit the spec change into the project setBuilderCommand(desc, command); project.setDescription(desc, null); } } COM: <s> adds spring builder to projects list of external builders </s>
funcom_train/50847809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRowUpdated() throws Exception { if (!isTestUpdates()) { return; } try { ResultSet rs = this.newUpdateableJdbcResultSet(); rs.next(); assertEquals(false, rs.rowUpdated()); rs.updateObject(1, new Integer(1), java.sql.Types.INTEGER); assertEquals(true, rs.rowUpdated()); } catch (Exception e) { fail(e.toString()); } } COM: <s> test of row updated method of interface java </s>
funcom_train/8858346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkHTTPSession() { Map<String, Object> session = FacesContext.getCurrentInstance().getExternalContext().getSessionMap(); if (session.containsKey("applicationStatusMessage")) { Message message = (Message) session.get("applicationStatusMessage"); displayStatusMessage(message); session.remove("applicationStatusMessage"); } } COM: <s> checks the current http session for messages which could be originated </s>
funcom_train/5466363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void tellPosSizeChange(Rectangle oldPos) { if (NetworkView.paintMethod != NetworkView.UNPAINT_EACH) throw new GuiException("call to GraphElement.tellPosSizeChange with wrong paintMethod"); if (oldPos != null) unpaint(oldPos, NetworkView.getMyGraphics()); paint(NetworkView.getMyGraphics()); } COM: <s> paint manager for graph elements when paint method is unpaint each </s>
funcom_train/36620333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHandlerClass(Class handlerClass) { this.handlerClass=handlerClass; if (!PlugInCallback.class.isAssignableFrom(handlerClass)) { this.handlerClass=defaultCallback.getClass(); throw new ClassCastException("The specified class, \""+ handlerClass.getName()+"\", is not an instance of \"" +PlugInCallback.class.getName()+"\"."); } } COM: <s> sets the class instances of which will handle incoming requests </s>
funcom_train/3393413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void enterTypevars(Type t) { if (t.getEnclosingType() != null && t.getEnclosingType().tag == CLASS) enterTypevars(t.getEnclosingType()); for (List<Type> xs = t.getTypeArguments(); xs.nonEmpty(); xs = xs.tail) typevars.enter(xs.head.tsym); } COM: <s> enter type variables of this classtype and all enclosing ones in </s>
funcom_train/13994631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertNoMenuItems(MockInternalFrame internalFrame) { assertNotInMenu("frame menu", internalFrame.getSystemMenu()); for (int i = 0; i < internalFrame.getMaxItems().length; i++) { assertNotInMenu("maximum state items", internalFrame.getMaxItems()[i]); } } COM: <s> asserts that no items from code internal frame code are contained in </s>
funcom_train/3177062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vertex getVertexAt(Point point) { if (graph2d==null) return null; // adjust point for graph (graph space doesn't start at 0,0) point = getPoint(point); for (Vertex v : graph2d.getVertices()) { if (graph2d.getShape(v).contains(point.x, point.y)) return v; } return null; } COM: <s> return vertex by point </s>
funcom_train/3733773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeIOHelpers() { try { OutputFormat outformat = new OutputFormat(); // Obtain the active encoding from the central preference instance. this.encoding = TPreference.getInstance().getEncoding(); // Set the encoding on the outputter. outformat.setEncoding(this.encoding); // For serialization encoding attribute shall be included. outformat.setOmitEncoding( false ); this.outputter = new XMLWriter(outformat); } catch (UnsupportedEncodingException uee) { System.err.println("WARNING: "+uee.getMessage()); } } COM: <s> initializes the io output helpers </s>
funcom_train/45247372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldRelacaoF81() { if (jNumberFloatFieldRelacaoF81 == null) { jNumberFloatFieldRelacaoF81 = new JNumberFloatField(); jNumberFloatFieldRelacaoF81.setLocation(new Point(345, 90)); jNumberFloatFieldRelacaoF81.setFont(new Font("Arial", Font.PLAIN, 12)); jNumberFloatFieldRelacaoF81.setSize(new Dimension(65, 20)); } return jNumberFloatFieldRelacaoF81; } COM: <s> this method initializes j number float field relacao f81 </s>
funcom_train/7674907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(Type type) { if (type == null) { throw new NullPointerException("type == null"); } throwIfNotPrepared(); TypeIdItem item = typeIds.get(type); if (item == null) { throw new IllegalArgumentException("not found: " + type); } return item.getIndex(); } COM: <s> gets the index of the given type which must have </s>
funcom_train/22499321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceTextRange(int start, int length, String text) { checkWidget(); if (text == null) { SWT.error(SWT.ERROR_NULL_ARGUMENT); } int contentLength = getCharCount(); int end = start + length; if (start > end || start < 0 || end > contentLength) { SWT.error(SWT.ERROR_INVALID_RANGE); } Event event = new Event(); event.start = start; event.end = end; event.text = text; modifyContent(event, false); } COM: <s> replaces the given text range with new text </s>
funcom_train/45718817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LowLevelHttpTransport getLowLevelHttpTransport() { LowLevelHttpTransport lowLevelHttpTransportInterface = this.lowLevelHttpTransport; if (lowLevelHttpTransportInterface == null) { // TODO: specify this in the metadata of the packaged jar? this.lowLevelHttpTransport = lowLevelHttpTransportInterface = NetGData.HTTP_TRANSPORT; } return lowLevelHttpTransportInterface; } COM: <s> returns the low level http transport to use </s>
funcom_train/43245189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpStreetAddr3() { System.out.println("getEmpStreetAddr3"); EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); String expResult = ""; String result = instance.getEmpStreetAddr3(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get emp street addr3 method of class org </s>
funcom_train/16513740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { if (firstSelectedObject instanceof ICommandContainer) { ICommandContainer container = (ICommandContainer) firstSelectedObject; IScenario scenario = container.getScenario(); IUserAction newAction = ScenarioFactory.createUserAction(scenario); ExecuteAddition.addScenarioObjekt(container, newAction); setDirty(scenario); } } COM: <s> this method adds a new action to an existing behaviour </s>
funcom_train/18007804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawBorder(float lineWidth, Color color, float llx, float lly, float urx, float ury) { setLineWidth(lineWidth); setColorStroke(color); rectangle(llx, lly, urx - llx, ury - lly); stroke(); resetRGBColorStroke(); } COM: <s> draws a border </s>
funcom_train/43424240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroySession() throws SQIFault{ if (spark!=null){ this.sessionOpened = false; // to be able to reconnecte when there is a problem of connection. spark.destroySession(sessionId); this.userName = ""; this.password = ""; } cacheManager.removeAll(); // remove all results System.gc(); } COM: <s> close the connection with the provider of learning objects </s>
funcom_train/4757128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(final Vector2D p, final double alpha) { this.angle = MathUtils.normalizeAngle(alpha, FastMath.PI); cos = FastMath.cos(this.angle); sin = FastMath.sin(this.angle); originOffset = cos * p.getY() - sin * p.getX(); } COM: <s> reset the instance as if built from a line and an angle </s>
funcom_train/39000947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort(java.util.Comparator comp) throws Exception { Vector key = new Vector(pools.keySet()); int poolId = -1; for (int loop = 0; loop < key.size(); loop++) { poolId = (Integer) key.elementAt(loop); getPool(poolId).sort(comp); } } COM: <s> sort all the pools </s>
funcom_train/2659166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDatabaseFolder() { if (jbuttonDatabaseDirectory.isEnabled() && jtextfieldDatabaseDirectory.getText().trim().length() == 0) { if (sessionPreferencesBean.getDatabaseFolder().length() > 0) { jtextfieldDatabaseDirectory.setText(sessionPreferencesBean.getDatabaseFolder()); } else { jtextfieldDatabaseDirectory.setText(globalPreferencesBean.getDatabaseFolder()); } } } COM: <s> set the database target folder from the global preferences </s>
funcom_train/42085970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expectAll(final Client client, final String channel, final boolean expected) { assertEquals(expected, boardPolicy.canCreate(client, channel, null)); assertEquals(expected, boardPolicy.canPublish(client, channel, null)); assertEquals(expected, boardPolicy.canSubscribe(client, channel, null)); } COM: <s> test for equality of all methods except can handshake and allow user </s>
funcom_train/12838754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getImagePath(String appName) throws ApplicationFacilitiesException { if (StringUtils.isBlank(appName)) { throw new ApplicationFacilitiesException("Null or blank ApplicationName argument."); } String imagePath = getPropertyValue(PropertyEnum.IMAGE_PATH.getName()); imagePath = FileAndPathUtils.trimTrailingFileSeparatorFromDirectoryName(imagePath); String theme = getApplicationTheme(appName).getName(); return imagePath + "/" + theme; } COM: <s> constructs and returns the image path to be used for resolving images </s>
funcom_train/33281886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDefaultHeaders(final WebRequest wrs) { // Add standard HtmlUnit headers. if (!wrs.isAdditionalHeader("Accept-Language")) { wrs.setAdditionalHeader("Accept-Language", getBrowserVersion().getBrowserLanguage()); } // Add user-specified headers last so that they can override HtmlUnit defaults. wrs.getAdditionalHeaders().putAll(requestHeaders_); } COM: <s> adds the headers that are sent with every request to the specified </s>
funcom_train/45453613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAccomplishment() throws Exception { RemovedAccomplishmentEntry removedAccomplishmentEntry = new RemovedAccomplishmentEntry( baseAccomplishmentEntry, TestDates.FEB_01_2004); /* * Attempt to get the Accomplishment. */ try { removedAccomplishmentEntry.getAccomplishment(); fail("Accomplishment obtained from RemovedAccomplishmentEntry"); } catch (UnsupportedOperationException e) { } } COM: <s> test get accomplishment </s>
funcom_train/40360675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWrappedFormatter() { String simpleOutput = simpleFormatter.format(logRecord); LayoutPattern layout = new LayoutPattern("%-4N [%T %t] %f", simpleFormatter); String output = layout.format(logRecord); String expected = "11 [" + threadId + " Armstrong] " + simpleOutput; assertEquals(output, expected); } COM: <s> test wrapped formatter f </s>
funcom_train/126819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JsonType toJson(Object obj) { if (obj == null) { return JsonLiteral.NULL; } Map map = (Map) obj; Map json = new HashMap(map.size()); for (Object key : map.keySet()) { Object value = map.get(key); Converter con = null; if (value == null) { con = Json.getConverter(Object.class); } else { con = Json.getConverter(value.getClass()); } json.put(new JsonString(key.toString()), con.toJson(value)); } return new JsonObject(json); } COM: <s> converts a java </s>
funcom_train/8034476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getGroups() throws Exception { Session session = HibernateUtils.currentSession(); try { List li=new Vector(); Criteria criteria=session.createCriteria(UserGroup.class); User user=(User)getParam().get("user"); criteria.add(Restrictions.eq("user",user)); List userGroups=criteria.list(); for (int i=0; i<userGroups.size(); i++) { UserGroup us= (UserGroup)userGroups.get(i); Group group=us.getGroup(); group.getGroupName(); li.add(group); } return li; } finally { HibernateUtils.closeSession(); } } COM: <s> lay danh sach nhom cua 1 user </s>
funcom_train/31906710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canDisplayGivenName(String name) { for (int i = 0; i < glyphNames.length; i++) { if (glyphNames[i] != null && glyphNames[i].equals(name) && languageMatches(glyphLangs[i]) && orientationMatches(glyphOrientations[i])) { return true; } } return false; } COM: <s> indicates whether or not the specified glyph can be displayed by this </s>
funcom_train/1958924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document translateNode(Element node) throws VerinecException { if (! "node".equals(node.getName())) throw new IllegalArgumentException("The element is not a node: "+node.getName()); Element configuration = new Element("configuration", VerinecNamespaces.SCHEMA_CONFIGURATION); configuration.addNamespaceDeclaration(VerinecNamespaces.NS_NODE); configuration.addNamespaceDeclaration(VerinecNamespaces.NS_TRANSLATION); process(node,configuration,true); return new Document(configuration); } COM: <s> translate a single expanded and resolved node </s>
funcom_train/23172600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeGraphTraverser() { String path = "impl.visitor."; try { Class c = jarLoader.loadClass (path + this.graphTraverserConf, true); this.traverser = (AbstractGraphTraverserVisitor)c.newInstance(); } catch(ClassNotFoundException ex) { ex.printStackTrace(); } catch(InstantiationException ex) { ex.printStackTrace(); } catch(IllegalAccessException ex) { ex.printStackTrace(); } catch(Exception ex) { ex.printStackTrace(); } } COM: <s> a method to load the traverser </s>
funcom_train/5668639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createNew(File aNewFile) { Vector tableData = fMain.getTableData(); ArchiveTable table = fMain.getArchiveTable(); // clear if there is any open file close(); tableData.clear(); table.updateUI(); fFile = aNewFile; return true; } COM: <s> create new and empty zip file on the fs </s>
funcom_train/9689942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMultiNodeTraverseTrees() { List result=new ArrayList(); for (int i = 0; i < traverseTrees.size(); ++i) { List element = (List) traverseTrees.get(i); if ( element.size() > 1 ) { result.add(element); } } return result; } COM: <s> list of multinode traverse trees </s>
funcom_train/50140766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IClassMolder getContentClassMolder() { if (contentMolder != null) { return contentMolder; } else { throw new RuntimeException("Unresolved field molder proxy '" + contentMolderClassName + "' in '" + parentMolder.getClassDescriptor().getClassClassName() + "." + this.fieldDesc.getName() + "'"); } } COM: <s> get the contained referenced class molder </s>
funcom_train/43122927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setStartRow(int startRow) throws QueryExecutionException { try { this.rs.absolute(startRow); this.startRow = startRow; this.rowIndex = startRow; } catch (SQLException se) { LOGGER.error("Error setting the start index for Result Set", se); throw new QueryExecutionException( "Error setting the start index for Result Set", se); } } COM: <s> this method is required to set the starting row </s>
funcom_train/20774889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getViterbiPathString(int seqNum, String state){ Object[] objs = getDelta(("" + seqNum), state); ArrayList<String> path = (ArrayList<String>) objs[1]; String out = ""; for(int i=0; i<path.size(); i++){ String element = path.get(i); out = out + "," +element; } return out; } COM: <s> returns viterbi path which is ended with the specified state in string format </s>
funcom_train/34749356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object createKey(String sql, int resultSetType, int resultSetConcurrency) { String catalog = null; try { catalog = getCatalog(); } catch (SQLException e) {} return new PStmtKey(normalizeSQL(sql), catalog, resultSetType, resultSetConcurrency); } COM: <s> create a pstmt key for the given arguments </s>
funcom_train/45459520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRadio(String categoryName, String radioName, String radioUrl) { CategoryRadioItem parentCategory = (CategoryRadioItem) _rootCategory.getChild(categoryName); if (parentCategory == null) { parentCategory = new CategoryRadioItem(_rootCategory, categoryName); _rootCategory.add(parentCategory); } RadioItem newRadio = new RadioItem(parentCategory, radioName, radioUrl); parentCategory.add(newRadio); } COM: <s> add a new radio to the radio list </s>
funcom_train/4207272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireUserHasLeft(final ChatRoom room, final String userid) { SwingUtilities.invokeLater(new Runnable() { @SuppressWarnings("unchecked") public void run() { final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasLeft(room, userid); } } }); } COM: <s> notifies users that a user has left a code chat room code </s>
funcom_train/41026594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJRow1Panel() { if (jRow1Panel == null) { FlowLayout flowLayout2 = new FlowLayout(); flowLayout2.setVgap(0); flowLayout2.setAlignment(FlowLayout.LEFT); jRow1Panel = new JPanel(); jRow1Panel.setLayout(flowLayout2); jRow1Panel.add(jRobotTypeLabel, null); jRow1Panel.add(getJRobotTypeComboBox(), null); } return jRow1Panel; } COM: <s> this method initializes j row1 panel </s>
funcom_train/31805388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAllItems(){ StringBuffer buf = new StringBuffer(100); Enumeration elements = this._listModel.elements(); while(elements !=null && elements.hasMoreElements()){ buf.append(" "); buf.append((String)elements.nextElement()); } return new String(buf); } COM: <s> gets the list of all elements as a single string space separated </s>
funcom_train/5244602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeliefBase getBB(StringTerm dbnumt) { String dbnum = getDefaultBBname(); if (dbnumt.getString() != null) { dbnum = dbnumt.getString(); } if (dbnum.equals(getDefaultBBname())) { return getBB(); } else { return bbmap.get(dbnum); } } COM: <s> get a beliefbase indexed by a stringterm </s>
funcom_train/33532512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BlogPostDetails next() { if (blogPostFiles == null) { blogPostFiles = getAllBlogPostFiles(); } current++; try { return makeBlogPostDetails(blogPostFiles.get(current - 1)); } catch (Exception e) { throw new RuntimeException("Failed to convert blog post", e); } } COM: <s> returns the next blog post </s>
funcom_train/43479430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateConnectionTab() { GoogleChart connection = charts[charts.length-1]; if(connection.getState().size() < 5 ) return; if(connection.getName().equals(PrototypeFactory.connection)){ connection.getState().update(api.getDelta()); } else { constants.error("can't locate connection tab", this); constants.shutdown("can't locate connection tab"); } } COM: <s> add new data points to connection tab </s>
funcom_train/21650101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configurate(){ //Set the SMUX in halted mode: 0x10 0x20 0x00 sendData(0x20, (byte)0x00); // Wait 50 ms for SMUX to clean up try{Thread.sleep(50);}catch(Exception e){} //# Send auto-scan command: 0x10 0x20 0x01 sendData(0x20, (byte)0x01); //# wait 500ms for auto-scan to complete try{Thread.sleep(600);}catch(Exception e){} //# Set the SMUX in normal mode: 0x10 0x20 0x02 sendData(0x20, (byte)0x02); } COM: <s> this method is necessary to execute to connect sensors on it </s>
funcom_train/48106086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addList(String name) { if(allWordLists.get(name) != null) return false; WordList set = new WordList(); wordLists.put(name, set); allWordLists.put(name, set); allWordSets.put(name, this); return true; } COM: <s> add a new list to this set of word lists </s>
funcom_train/10749970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetUncaughtExceptionHandler() { ThreadGroup tg = new ThreadGroup("test thread group"); Thread t = new Thread(tg, "test thread"); ExceptionHandler eh = new ExceptionHandler(); t.setUncaughtExceptionHandler(eh); assertSame("the handler has not been set", eh, t.getUncaughtExceptionHandler()); } COM: <s> test for set uncaught exception handler </s>
funcom_train/31877097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void netStopped(NeuralNetEvent arg0) { if (saveNNToFile) { saveNeuralnet(savedNNFileName); //logger.debug("NN saved to file:"+savedNNFileName); } else if (listener != null) { listener.nnTrainingComplete(this, service); listener = null; } } COM: <s> saves nn to file if option is on </s>
funcom_train/3137673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectionChanged(IAction action, ISelection selection) { super.selectionChanged(action, selection); if (javaProject != null) { try { IProjectDescription descr = javaProject.getProject().getDescription(); action.setEnabled(!descr.hasNature(SQLJNature.NATURE_ID) && descr.hasNature(JavaCore.NATURE_ID)); } catch (CoreException e) { action.setEnabled(false); } } } COM: <s> this action is enabled only for projects that dont already </s>
funcom_train/50142657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintWriter getWriter() throws IOException { if (printWriter == null) { if (outputStream != null) { throw new IllegalStateException(); } if (printWriter == null) { captureWriter = new CharArrayWriter(); printWriter = new MultiplexPrintWriter( captureWriter, super.getWriter()); } } return printWriter; } COM: <s> get a print writer </s>
funcom_train/7294200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataMap nextSettings() { if (settings != null && sx < settings.length) { cx = 0; NamedArray na = NamedArray.create((Object[][])settings[sx++]); if (na.count() < 0) { m.log.errln("Bad settings data for settings " + (sx-1)); return null; } else { return new RBDataMap(m.log, na, false); } } stopIteration(); return null; } COM: <s> returns data map with next settings and resets case iteration </s>
funcom_train/44222036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void importPdf(final File srcPdf) { final File targetPdf = this.doc; Runnable r = new Runnable() { public void run() { mainControl.copyFile(srcPdf, targetPdf); initDocPageCount(); try { load(null); } catch (Exception ex) { ex.printStackTrace(); } } }; new Thread(r).start(); } COM: <s> import the pdf file into the system folder and render it </s>
funcom_train/10238282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneQueryResult() { if (jScrollPaneQueryResult == null) { jScrollPaneQueryResult = new JScrollPane(getJTable()); jScrollPaneQueryResult.setBounds(new Rectangle(22, 106, 745, 220)); jScrollPaneQueryResult.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); } return jScrollPaneQueryResult; } COM: <s> this method initializes j scroll pane query result </s>
funcom_train/4509900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConnectionURI(String uri) { if (!uri.endsWith("/")) { uri = uri + "/"; } this.uri = uri; properties.put("clearspace.uri", uri); //Updates the host/port attributes updateHostPort(); if (isEnabled()) { startClearspaceConfig(); } } COM: <s> sets the uri of the clearspace service e </s>
funcom_train/39004694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseTree(TreeItem item, ArrayList roles) { if (item.getChecked() && (item.getData() != null) ) { roles.add( (Role) item.getData()); } if (item.getItems().length > 0) { TreeItem[] items = item.getItems(); for (int i = 0; i < items.length; i++) { parseTree(items[i], roles); } } } COM: <s> parses the tree and adds the roles to the arraylist roles </s>
funcom_train/8640590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrefix(String key, String prefix) { PdfName fieldname = new PdfName(key); PdfObject o = get(fieldname); if (o == null) throw new IllegalArgumentException("You must set a value before adding a prefix."); PdfDictionary dict = new PdfDictionary(PdfName.COLLECTIONSUBITEM); dict.put(PdfName.D, o); dict.put(PdfName.P, new PdfString(prefix, PdfObject.TEXT_UNICODE)); put(fieldname, dict); } COM: <s> adds a prefix for the collection item </s>
funcom_train/48709708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int buy (int amount) { if (exchangeRate > 0) { if (onStockAvailable >= amount) { onStockAvailable -= amount; exchangeRate += amount*0.1f; return amount; } else { int ret = onStockAvailable; onStockAvailable = 0; exchangeRate += ret*0.1f; return ret; } } else { //share is worth nothing, don't sell any more of these shares return 0; } } COM: <s> buy a certain amount of the share will lower the availability and higher </s>
funcom_train/20153690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws IOException { System.out.println("Starting USCL-Bot..."); System.out.println(); conn = new Connection(hostName, hostPort, loginName, loginPass); conn.addDatagramListener(conn, Datagram.DG_PERSONAL_TELL); conn.addDatagramListener(conn, Datagram.DG_NOTIFY_STATE); conn.addDatagramListener(conn, Datagram.DG_MY_GAME_RESULT); conn.addDatagramListener(conn, Datagram.DG_STARTED_OBSERVING); conn.addDatagramListener(conn, Datagram.DG_MOVE_LIST); conn.addDatagramListener(conn, Datagram.DG_SEND_MOVES); conn.addDatagramListener(conn, Datagram.DG_PLAYERS_IN_MY_GAME); conn.initiateConnect(hostName, hostPort); } COM: <s> start the bot and connect it to the chess server </s>
funcom_train/9827820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dtbParamsUpdated( Object[][] params ) { Object[] newValues = new Object[params.length]; for ( int ind = 0; ind < newValues.length; ++ind ) newValues[ind] = params[ind][1]; _paramPanel.updateValues( newValues ); } // end method dtbParamsUpdated COM: <s> implementation of the param listener interface to </s>
funcom_train/44773235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mouseDrag(MouseEvent ev, int x, int y) { int dx = x - lastx; int dy = lasty - y; if(nudge(ev, (x - lastx) / (double)cam.winx, (lasty - y) / (double)cam.winy, (int)(ev.getWhen() - lastt))) { toRepaint.repaint(); } lastx = x; lasty = y; lastt = ev.getWhen(); return true; } COM: <s> process a mouse drag event </s>
funcom_train/45770036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean _refresh(){ xCellForChange.setValue(changeValue); double oldData = xCellForCheck.getValue(); oObj.refresh(); double newData = xCellForCheck.getValue(); log.println("Old data:" + oldData + "; new data:" + newData); return oldData != newData; } COM: <s> test sets new value of the cell obtained by object relation </s>
funcom_train/37190392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryEditor open(String databaseName, String schemaName, String name, boolean isSelectStatement) { fromCode = true; final QueryEditor queryEditor = new QueryEditor(algorithms, this, databaseName, schemaName, isSelectStatement); if(!isSelectStatement) { queryEditor.setTitle(name); queryEditor.setName(name); } fromCode = false; return queryEditor; } COM: <s> creates a new query editor object </s>
funcom_train/3100112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displaySolution(ArrayList solution) { System.out.println("Variables and solution value:"); ArrayList orderedSolution = (ArrayList) solution.clone(); Collections.sort(orderedSolution); for (int i = 0; i < orderedSolution.size(); i++) System.out.println(orderedSolution.get(i)); } COM: <s> displays the bindings in a given solution to the constraint problem </s>
funcom_train/42876996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void shutdown() { logger.entering("DataPool", "shutdown()"); try { serializeData(); logger.info("data object serialized"); } catch (Exception e) { logger.warning("Exception raised: " + e.getMessage()); e.printStackTrace(); } logger.exiting("DataPool", "shutdown()"); } COM: <s> shuts the datapool down </s>
funcom_train/43440939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toDate(String dateString) throws Exception { if (SOSString.isEmpty(dateString)) throw new Exception(SOSClassUtil.getMethodName() + ": dateString has no value."); return "to_date('" + dateString + "','YYYY-MM-DD HH24:MI:SS')"; } COM: <s> liefert oracle timestamp funktion zur ck </s>
funcom_train/37079285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameter(String name) { name = name.toLowerCase(); if ((parameters == null) || (parameters.get(name) == null)) { return ""; } else { Vector values = (Vector) parameters.get(name); return (String) values.lastElement(); } } COM: <s> returns the last value even if there are many </s>
funcom_train/43320738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateEditorActivated(@Nullable SPath path) { this.locallyActiveEditor = path; if (path != null) this.locallyOpenEditors.add(path); editorListenerDispatch.activeEditorChanged(sarosSession.getLocalUser(), path); fireActivity(new EditorActivity(sarosSession.getLocalUser(), Type.Activated, path)); } COM: <s> sets the local editor opened and fires an </s>
funcom_train/28427192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBlockSize(int blocksize) { if (getState() != UNINITIALIZED) throw new IllegalStateException(getAlgorithm() + ": Cipher not in UNINITIALIZED state"); if (blocksize != 8 && blocksize != 16 && blocksize != 32) throw new IllegalArgumentException(getAlgorithm() + ": Invalid block size"); block_size = blocksize; } COM: <s> sets the block size in bytes for this cipher </s>
funcom_train/41139726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration listOptions () { Vector newVector = new Vector(3); newVector.addElement(new Option("\tTreat missing values as a seperate " + "value.", "M", 0, "-M")); newVector.addElement(new Option("\tDon't include locally predictive attributes" + ".", "L", 0, "-L")); return newVector.elements(); } COM: <s> returns an enumeration describing the available options </s>
funcom_train/27844400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetModelWrapper() throws Exception { org.scopemvc.impl.model.ModelWrapper[] tests = { new MockModelWrapper(), null }; for (int i = 0; i < tests.length; i++) { _feedbackbinding.setModelWrapper(tests[i]); assertEquals(tests[i], _feedbackbinding.getModelWrapper()); } } COM: <s> method test set model wrapper is testing set model wrapper </s>
funcom_train/9851893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test() { System.out.println("SessionID: " + this.getThreadLocalRequest().getSession().getId()); System.out.println("MessageID: " + this.getThreadLocalRequest().getSession().getAttribute("id")); } COM: <s> simple testing service </s>
funcom_train/51204630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formWindowIconified(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowIconified {//GEN-HEADEREND:event_formWindowIconified if (trayIcon != null && enableTray) { setState(java.awt.Frame.NORMAL); this.setVisible(false); if (iconifiedMessageFromTray) { trayIcon.displayMessage("Mooch Minimized", "Click icon to restore Mooch", TrayIcon.MessageType.INFO); iconifiedMessageFromTray = false; } } }//GEN-LAST:event_formWindowIconified COM: <s> this method is called when the minimize button is pressed on the window </s>
funcom_train/20270748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node tryFoldGetElem(Node n, Node left, Node right) { Preconditions.checkArgument(n.getType() == Token.GETELEM); if (left.getType() == Token.OBJECTLIT) { return tryFoldObjectPropAccess(n, left, right); } if (left.getType() == Token.ARRAYLIT) { return tryFoldArrayAccess(n, left, right); } return n; } COM: <s> try to fold array element </s>
funcom_train/9143658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasAllGetInstanceProperties(MethodNode method) { if (method.isStatic() && (method.getVisibility().equals(Modifier.PUBLIC) || method.getVisibility().equals(Modifier.PROTECTED))) { Set<FieldNode> fields = method.getAccessedFields(); for (FieldNode field : fields) { if (this.instanceField.equals(field)) { return true; } } } return false; } COM: <s> verifies if the </s>
funcom_train/37757324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Thread thisThread = Thread.currentThread(); while (thisThread == watcher) { try { Thread.sleep(interval); } catch (InterruptedException e) { // can't do much from here with Exception watcher = null; } try { checkURLFile(); } catch (Exception e) { ErrorReporter.getErrorHandler().reportError("This is an IOException in disguise.", e); // can't do much from here with Exception watcher = null; } } } COM: <s> start the thread to call check file </s>
funcom_train/48221200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Message sendMessage(String recipient, String text) throws TwitterException { if (text.length() > 140) throw new IllegalArgumentException("Message is too long."); Map<String, String> vars = asMap("user", recipient, "text", text); String result = post("http://twitter.com/direct_messages/new.json", vars, true); try { return new Message(new JSONObject(result)); } catch (JSONException e) { throw new TwitterException(e); } } COM: <s> sends a new direct message to the specified user from the </s>
funcom_train/47254894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restorePartialView(FacesContext facesContext) { PartialViewRoot partialView = (PartialViewRoot) facesContext.getViewRoot(); for (int i = 0; i < partialView.getChildCount(); i++) { UIComponent kid = partialView.getChildren().get(i); kid.setParent(partialView.getParents().get(i)); } facesContext.setViewRoot(partialView.getBase()); partialView = null; } COM: <s> restore to original for rendering </s>
funcom_train/13596903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getCpNewGrapheme() { if (cpNewGrapheme == null) { cpNewGrapheme = new JPanel(); cpNewGrapheme.setLayout(new BorderLayout()); cpNewGrapheme.add(getPnlInput(), BorderLayout.NORTH); // Generated cpNewGrapheme.add(getPnlButtons(), BorderLayout.SOUTH); // Generated } return cpNewGrapheme; } COM: <s> this method initializes cp new grapheme </s>
funcom_train/11678281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stopListeningForService(AxisService service) { JMSConnectionFactory cf = getConnectionFactory(service); if (cf != null) { // remove from the serviceNameToEprMap serviceNameToEPRMap.remove(service.getName()); String destination = JMSUtils.getJNDIDestinationNameForService(service); cf.removeDestination(destination); } } COM: <s> stops listening for messages for the service thats undeployed or stopped </s>
funcom_train/51144772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRating(int rating) throws IllegalArgumentException { if ((rating > 7) || (rating < 1)) { if( rating != 99 ) { throw new IllegalArgumentException("Rating value cannot be smaller then 1 or greater then 7. Or it must be 99 for unknown value."); } } if( rating == 7 ) { // Object was not seen super.setSeen(false); } else { super.setSeen(true); // Object was seen } this.rating = rating; } COM: <s> sets the rating of the observed object </s>
funcom_train/30158494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showFrame() { frame.getContentPane().add(createToolBar(), BorderLayout.CENTER); frame.getContentPane().add(rootWindow, BorderLayout.SOUTH); // frame.setJMenuBar(createMenuBar()); frame.setSize(900, 700); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } COM: <s> initializes the frame and shows it </s>
funcom_train/46520334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element findServiceReferance(Element ele){ if("service-ref".equals((ele).getLocalName())){ //System.out.println((ele).getLocalName()); return ele; }else{ NodeList nodes = ele.getChildNodes(); for(int i=0;i<nodes.getLength();i++){ Node node = nodes.item(i); if(node instanceof Element){ return findServiceReferance((Element)node); } } return null; } } COM: <s> find the service ref element from the xml file </s>
funcom_train/34813262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fetchData(){ //merge chromPlus = null; if (plusPointData.containsKey(chromosome)) chromPlus = PointData.combinePointData(plusPointData.get(chromosome), true); chromMinus = null; if (minusPointData.containsKey(chromosome)) chromMinus = PointData.combinePointData(minusPointData.get(chromosome), true); if (chromPlus == null && chromMinus== null) return false; return true; } COM: <s> fetch the data for a particular chromosome </s>
funcom_train/11097159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void enqueuePacket(MessageExchangeImpl me) throws JBIException { ComponentNameSpace cns = me.getDestinationId(); SedaQueue queue = queueMap.get(cns); if (queue == null) { queue = createQueue(cns); } try { queue.enqueue(me); } catch (InterruptedException e) { throw new MessagingException(queue + " Failed to enqueue exchange: " + me, e); } } COM: <s> put the packet in the queue for later processing </s>
funcom_train/49960414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { GXT.setDefaultTheme(Theme.GRAY, true); GXT.hideLoadingPanel("loading"); Dispatcher dispatcher = Dispatcher.get(); dispatcher.addController(new AppController()); dispatcher.addController(new SearchController()); dispatcher.addController(new MyDataController()); dispatcher.addController(new PreferenceController()); dispatcher.dispatch(AppEvents.Login); } COM: <s> the entry point method called automatically by loading a module </s>
funcom_train/17680270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSameColumns(JdbcIndex x) { int n = cols.length; if (n != x.cols.length) return false; for (int i = 0; i < n; i++) { if (!cols[i].equals(x.cols[i])) return false; } return true; } COM: <s> do we have the same columns as x </s>
funcom_train/40684760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMakeTransliteratable() { LanguageUtils.loadTransliteration(new Runnable() { public void run() { initialize(); TextArea[] textAreas = {textArea1, textArea2}; control.makeTransliteratable(textAreas); finishTest(); } }); delayTestFinish(MAX_TEST_FINISH_DELAY); } COM: <s> just to verify that make transliteratable does not throw any exceptions </s>