__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/24926179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startMotion() { stopMotion(); new Thread(new Runnable() { public void run() { moving = true; while (!stop && moving) { rotate(getYaw() + direction.getX(), getPitch() + direction.getY()); setHfov(getHfov() + direction.getZ()); try { Thread.sleep(10); } catch (InterruptedException e) { } } moving = false; } }).start(); } COM: <s> start the auto panning in the current direction </s>
funcom_train/3858538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { if (! (myCanvas instanceof Layoutable) ) { myLayoutButton.setVisible(false); } else { myLayoutButton.setVisible(true); if ( ((Layoutable)myCanvas).getPossibleLayouts().size() == 0 ) { myLayoutButton.setEnabled(false); } else { myLayoutButton.setEnabled(true); } } } COM: <s> updates the representation of the panel </s>
funcom_train/48407382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProcessKindPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProcessElement_processKind_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProcessElement_processKind_feature", "_UI_ProcessElement_type"), SpemxtcompletePackage.eINSTANCE.getProcessElement_ProcessKind(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the process kind feature </s>
funcom_train/16530351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBrightness(float multiple) { float[] brightKernel = { multiple }; RenderingHints hints = new RenderingHints(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); BufferedImageOp bright = new ConvolveOp(new Kernel(1, 1, brightKernel), ConvolveOp.EDGE_NO_OP, hints); bright.filter(originalImage, convolvedImage); repaint(); } COM: <s> changes the image luminosity </s>
funcom_train/4010249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addGameMouseMotionListener() { addMouseMotionListener(new MouseMotionAdapter() { int x = X_VAL, y = Y_VAL, w = WIDTH, h = HEIGHT; public void mouseMoved(MouseEvent e) { if (e.getX() > x && e.getX() < x + w && e.getY() > y && e.getY() < y + h) { mouseOver = true; } else { mouseOver = false; } repaint(); } }); } COM: <s> adds mouse motion listener </s>
funcom_train/7602170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Panel getPnlAvailable() { if (pnlAvailable == null) { pnlAvailable = new Panel(); pnlAvailable.setLayout(new BoxLayout(getPnlAvailable(), BoxLayout.Y_AXIS)); pnlAvailable.setMinimumSize(new Dimension(200, 150)); pnlAvailable.setPreferredSize(new Dimension(200, 150)); pnlAvailable.add(getPnlOperation(), null); pnlAvailable.add(getPanel(), null); } return pnlAvailable; } COM: <s> this method initializes pnl available </s>
funcom_train/16176566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToHeader(String s) { if (header.length() == 0) { header += "\"" + s + "\""; }else if(s.equalsIgnoreCase("run")){ header = "\"" + s + "\"" + delimiter + header; } else { header += delimiter + "\"" + s + "\""; } } COM: <s> adds the specified string to the header associated with this data </s>
funcom_train/5551646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double evaluate(final double[] values, final int begin, final int length) { double product = Double.NaN; if (test(values, begin, length)) { product = 1.0; for (int i = begin; i < begin + length; i++) { product *= values[i]; } } return product; } COM: <s> returns the product of the entries in the specified portion of </s>
funcom_train/9667089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addButtonActionPerformed1(ActionEvent e) { closing = true; this.hide(); AddActsFrame af = new AddActsFrame(cm, jTabbedPane1.getSelectedIndex(), dayDates, this); //todo: pass in cm af.show(); refreshTables(); } COM: <s> displays a window to allow the staff to add an activity </s>
funcom_train/6423845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect(String s){ send("QUIT :"+s); try{ sockOut.write(("\n\n\n").getBytes());//might help flush the quit msg sockOut.flush(); }catch(Exception e){} IRCListener[] arry = listenersToArray(listeners); for(int x = 0; x<arry.length; x++) arry[x].handleDisconnect(this); connected = false; } COM: <s> disconnectes from the irc server with the specified string </s>
funcom_train/20109911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetActiveSiteEnrollment_ReturnsCommandResult() { Collection result = service.getActiveSiteEnrollment(userContext1); GetActiveSiteEnrollmentInvoker cmd = (GetActiveSiteEnrollmentInvoker) service.getExecuteSiteServiceCall_CommandArg(); assertEquals(service.siteResultCollection(cmd.getResult()), result); } COM: <s> verifies that collection returned from get active site enrollment </s>
funcom_train/49207029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace(String regex,String replacement) throws IOException, OperationsException{ if ( null == regex || "".equals(regex) || null == replacement ) throw new OperationsException("String is null"); lock(); String result = readAll(false).replaceAll(regex, replacement); byte[] b = result.getBytes(); int size = b.length; fc.truncate(size); write(0,size,b); release(); } COM: <s> replace what user want to erase or rewrite </s>
funcom_train/25753705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char readChar() { // (?s) for DOTALL mode so . matches any character, including a line termination character // 1 says look only one character ahead // consider precompiling the pattern String s = scanner.findWithinHorizon("(?s).", 1); return s.charAt(0); } COM: <s> read and return the next character </s>
funcom_train/14375761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyTo(Whiteboard whiteboard) { for (ChangeEvent change : changeEvents) { try { change.applyTo(whiteboard); } catch (UnknownThingException err) { Log.warn("Failed to apply change to whiteboard: " + change + ". Ignoring it and moving on.", err); } } } COM: <s> applies all my changes to the given whiteboard </s>
funcom_train/50322903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readEntityRef() throws ParseException, IOException { readChar('&'); String name = readName(); String result = (String) entities_.get(name); // http://www.w3.org/TR/2000/REC-xml-20001006#vc-entdeclared if (result == null) { result = ""; if (isExtDtd_) log_.warning("&" + name + "; not found -- possibly defined in external DTD)", systemId_, getLineNumber()); else log_.warning("No declaration of &" + name + ";", systemId_, getLineNumber()); } readChar(';'); return result; } COM: <s> 68 entity ref name </s>
funcom_train/19418662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Session getMailSession() { // mailSession may be null if session persistance had to be used, since // it is a transient member. if (mailSession == null) { final SessionProvider sessionProvider = DAOFactory.getInstance().getSessionProvider(); final Authenticator auth = sessionProvider.getAuthenticator(this); mailSession = sessionProvider.getSession(auth); } return mailSession; } COM: <s> getter for property mail session </s>
funcom_train/9082630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() throws ComponentException { componentManager = managerFactory.connect(serverIP, serverPort); componentManager.setDefaultSecretKey(serverSecret); componentManager.setServerName(serverHostname); componentJID = componentName + "." + serverHostname; componentManager.addComponent(componentName, this); } COM: <s> bind the component to the xmpp server </s>
funcom_train/9705175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSize() throws SOAPException { if (dataHandler == null) { return 0; } ByteArrayOutputStream bout = new ByteArrayOutputStream(); try { dataHandler.writeTo(bout); } catch (Exception ex) { throw new SOAPException(ex); } return bout.size(); } COM: <s> returns the number of bytes in this code attachment part code object </s>
funcom_train/15616186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildDnsLookupAddress(String ipAddress) { String dnsAddress = Environment.getValue(Environment.PROP_HONEYPOT_ACCESS_KEY) + '.'; // per Honeypot rules, reverse the IP address (10.20.30.40 becomes 40.30.20.10) String[] octets = ipAddress.split("\\."); for (int i = (octets.length - 1); i >= 0; i--) { dnsAddress += octets[i] + '.'; } dnsAddress += PROJECT_HONEYPOT_DOMAIN; return dnsAddress; } COM: <s> generate the dns lookup address for the current user request </s>
funcom_train/19406834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map genRules(Grammar in_Grammar) throws Exception { Map rules = new TreeMap(String.CASE_INSENSITIVE_ORDER); Iterator it = m_Transitions.iterator(); while (it.hasNext()) { Transition t = (Transition) it.next(); if (!t.getOperation().isImplemented()) { // Operation not yet implemented. Rule r = t.genRule(in_Grammar, this.name()); rules.put(r.getName(), r); } } m_Rules.putAll(rules); return rules; } COM: <s> generates the rules from the statechart </s>
funcom_train/9235835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireSubstitutionInsert(final ActionSubstitution substitution) { final Object[] listenersList = listeners.getListenerList(); for (int i = 0; i < listenersList.length; i += 2) { if (listenersList[i] == SubstitutionsPanelListener.class) { ((SubstitutionsPanelListener) listenersList[i + 1]).substitutionInsert(substitution); } } } COM: <s> informs listeners when a substitution needs inserting </s>
funcom_train/23854601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VNode getAnticlockwiseSibling() { if (parent == null) return this; int index = parent.getTreeChildren().indexOf(this) - 1; if (index < 0) index = parent.getTreeChildren().size() - 1; return parent.getTreeChildren().get(index); } COM: <s> returns the next sibling in counterclockwise order of this node </s>
funcom_train/25541597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoad_raw() { TSDcDft dcdft = new TSDcDft( observations); double mags[] = dcdft.getMags(); double weights[] = dcdft.getWeights(); assertEquals(3.9, mags[1]); assertEquals(1.0, weights[1]); assertEquals(3.9, mags[mags.length - 1]); assertEquals(1.0, weights[weights.length - 1]); } COM: <s> load raw data test and do a few simple checks </s>
funcom_train/19273827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParentAccess(AbstractSyncControlAccess<? extends Control> newParentAccess) { if (getDelegate() == null) { this.parentAccess = newParentAccess; if (this.parentAccess.getDelegate() != null) { assert (checkReady()); create(); } } else { // parent of dialog can not be changed! } } COM: <s> this method sets the parent sync access of the dialog </s>
funcom_train/10817416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Operator getOperator(LogicalPlan plan, Class<? extends Operator> c) throws IOException { Iterator<Operator> ops = plan.getOperators(); while( ops.hasNext() ) { Operator op = ops.next(); if( op.getClass().equals(c)) { return op; } } return null; } COM: <s> returns first operator that is an instance of given class c </s>
funcom_train/44121316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPackage(File pFile, boolean pProcessSubPackages) { for (File lFile : pFile.listFiles(fileFilter)) { fileData.addFile(lFile); } // for lFile if (pProcessSubPackages) { for (File lFile : pFile.listFiles(packageFilter)) { addPackage(lFile, true); } // for lFile } // if } // MainWindow.addPackage() COM: <s> adds a package to the file list </s>
funcom_train/36784213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectLoader() { materials = new HashMap(); vertices = new ArrayList(); parsers = new HashMap(); parsers.put("obj", new ObjLineParser()); parsers.put("mtl", new MtlLineParser()); currentMaterial = null; currentMaterialAttrib = new TextureAttributes(); setLights(new ArrayList(), 1); } COM: <s> creates a new object loader </s>
funcom_train/31010434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProcessData_2() { LinkGrabber lg = new LinkGrabber(100); String url1 = "http://www.google.com"; String url2 = "http://www.sourceforge.net"; String link1 = genLink(url1, "link1"); String link2 = genLink(url2, "link2"); String data = "<html><body><p>" + link1 + link2 + "</p></body></html>"; lg.readData(data, null); assertEquals(url1, lg.getNextUrl()); assertEquals(url2, lg.getNextUrl()); assertEquals(null, lg.getNextUrl()); } COM: <s> test data with two a tags under p tag </s>
funcom_train/47928165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pauseGame() { try { isPaused = true; loginScreen.getLoginScreen().getMenu().getMain().getGame().getDrawer().pauseThreads(); t.suspend(); executorAI.pause(); executorPlyr.pause(); } catch (Exception e) { System.out.println(e); } } COM: <s> pauses the current match </s>
funcom_train/44827873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSubstitutedPojoCollectionProperty(String bindParam) { int bpPos = pojoCollectionProperty.indexOf('?'); if (bpPos > 0) { return pojoCollectionProperty.substring(0, bpPos) + bindParam + pojoCollectionProperty.substring(bpPos+1); } else { return pojoCollectionProperty; } } COM: <s> get the pojo collection property after the bind parameter has been replaced </s>
funcom_train/11086994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Destination getDestination(MessageExchange exchange, Object message, Session session) throws JMSException { Destination dest = chooseDestination(exchange, message, session, destinationChooser, destination != null ? destination : destinationName); if (dest == null) { throw new IllegalStateException("Unable to choose a destination for exchange " + exchange); } return dest; } COM: <s> retrieve the destination where the jms message should be sent to </s>
funcom_train/1382321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanelDay getJPanelDay() { if (jPanelDay == null) { try { jPanelDay = new JPanelDay(dbm, "camera", (JFrame)this.getParent()); jPanelDay.setName("Planning giornaliero"); // Generated } catch (java.lang.Throwable e) { // TODO: Something } } return jPanelDay; } COM: <s> this method initializes j panel day </s>
funcom_train/9184131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outBroad(DracoTuple dt) { // parameter checking if (dt == null) throw new IllegalArgumentException("null value"); if(LimeConstants.TREE_MULTICAST) outToMulti(dt, null); else { //send one-by-one LimeServerID[] hosts = getAllEngagedHosts(); for (int i = 0; i < hosts.length; i++) { dt.setDest(new Location(hosts[i])); out(dt); } } } COM: <s> out a group of tuples to all other engaged hosts </s>
funcom_train/7615497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextLayout nextLayout(float wrappingWidth, int offsetLimit, boolean requireNextWord) { if (position == maxpos) { return null; } int nextPosition = nextOffset(wrappingWidth, offsetLimit, requireNextWord); if (nextPosition == position) { return null; } TextLayout layout = tm.getLayout(position, nextPosition); position = nextPosition; return layout; } COM: <s> returns the next line of text updates current position in this </s>
funcom_train/48189313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(long key, String subkey, Object data) { // Does storage slot exist? HashMap<String, Object> folder = storage.get(key); if (folder == null) { folder = new HashMap<String, Object>(); storage.put(key, folder); } if (data != null) folder.put(subkey, data); else folder.remove(subkey); } COM: <s> stores data in storage </s>
funcom_train/8284390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WireFeed build(File file) throws FileNotFoundException,IOException,IllegalArgumentException,FeedException { WireFeed feed; Reader reader = new FileReader(file); if (_xmlHealerOn) { reader = new XmlFixerReader(reader); } feed = build(reader); reader.close(); return feed; } COM: <s> builds an wire feed rss or atom from a file </s>
funcom_train/45545068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image get(ImageDescriptor descriptor) { if (descriptor == null) descriptor= ImageDescriptor.getMissingImageDescriptor(); Image result= fRegistry.get(descriptor); if (result != null) return result; Assert.isTrue(fDisplay == SWTUtil.getStandardDisplay(), "Allocating image for wrong display."); //$NON-NLS-1$ result= descriptor.createImage(); if (result != null) fRegistry.put(descriptor, result); return result; } COM: <s> returns the image assiciated with the given image descriptor </s>
funcom_train/45054569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void postop(Component currentNode) { Component thisLevel = (componentStack.empty()) ? null : (Component) componentStack.peek(); if ((thisLevel != null) && (thisLevel.getName().equals(currentNode.getName()))) { componentStack.pop(); } } COM: <s> this is called after all the children of a component have been </s>
funcom_train/19810687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testGetResearcherViolations() { Set<Entry<String,String>> violations = this.myIsern.getResearcherViolations(); for (Entry<String,String> violation : violations) { assertTrue("Violation's key should be a existed name of Researcher", this.myIsern.hasResearcher(violation.getKey())); } } COM: <s> test get researcher violations </s>
funcom_train/8815161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getClientSideId() { // Server-side id. Integer id = (Integer) get("id"); if (id == null) { // Client-side id. id = (Integer) get("tmpid"); // Generates the client-side id once. if (id == null) { id = generateClientSideId(); } } return id; } COM: <s> gets the client side id for this entity </s>
funcom_train/21418796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addComment(){ User user = (User)session.get("user"); if(user==null){ GsonUtil.writeMessageToClient(response, "not login"); } else{ int userID = user.getId(); productService.addComment(productID, userID, comment); GsonUtil.writeMessageToClient(response, "success"); } return NONE; } COM: <s> add comment to the product </s>
funcom_train/18288778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAddToJADSelectionControl(Composite parent, int numColumns) { new Label(parent, SWT.NONE); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 1; composite.setLayout(layout); GridData gridData = new GridData(); gridData.grabExcessHorizontalSpace = true; gridData.horizontalSpan = numColumns - 1; composite.setLayoutData(gridData); addToJadButton = new Button(composite, SWT.CHECK); addToJadButton.setText("Add To Application Descriptor?"); } COM: <s> create the add to jad selection control </s>
funcom_train/15415656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LogFileSharing getLogFileSharing(ConfigPropertyMap p) { if (p.get("logging.logfilesharing", null) != null) { return p.getEnum(LogFileSharing.class, "logging.logfilesharing", LogFileSharing.EXPLICIT); } // additionally support the old property setting return p.getEnum(LogFileSharing.class, "logsharing", LogFileSharing.EXPLICIT); } COM: <s> return the log file sharing with support for the previous logsharing </s>
funcom_train/28340167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tableAdded(TableGroup group, DataTable table) { // Get the name of the group and the table String strGrpName = group.getGroupName(); String strTblName = table.getTableName(); System.out.println("Table group '" + strGrpName + "' had the following table added: " + strTblName); } COM: <s> response to the add table event </s>
funcom_train/50982867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetLocale_Null() { final AbstractUIController controller = new AbstractUIController() { protected void localeChanged( final Locale locale ) { } protected void runImpl() { } }; try { controller.setLocale( null ); fail( "Expected exception" ); } catch( final NullPointerException e ) { // Expected path } } COM: <s> test set locale with a null locale </s>
funcom_train/17855121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showConsole() { getConsole(); final String id = IConsoleConstants.ID_CONSOLE_VIEW; final IWorkbench wb = PlatformUI.getWorkbench(); Display.getDefault().asyncExec(new Runnable() { public void run() { IWorkbenchWindow win = wb.getActiveWorkbenchWindow(); IWorkbenchPage page = win.getActivePage(); IConsoleView view = null; try { view = (IConsoleView) page.showView(id); } catch (PartInitException e) { logException("Exception showing build console", e); } view.display(console); } }); } COM: <s> make sure the console is visible </s>
funcom_train/40475794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testAddTag() { String rooTagName = "newRoot"; String tagName = "newTag"; String expResult = "<newRoot><newTag>newTag</newTag></newRoot>"; String result = XmlBuilder.newRoot(rooTagName).addTag(tagName, tagName).buildXml(); assertEquals(expResult, result); } COM: <s> test of add tag method of class xml builder </s>
funcom_train/41768235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveFile(String[] commands) { int error; if (commands.length > 1) error = bookcollection.saveToFile(commands[1]); else error = bookcollection.saveToFile(); if (error < 0) System.out.println("Error while saving!"); else { System.out.println("Saved collection!"); } } COM: <s> saves the file </s>
funcom_train/48563049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRuleSpec(String newSpec) { IWInformation content2 = getHasContent();; if (content2 != null) { // v2 content2.setPropertyByLocalName("hasRawString", newSpec); } else { // v1 if (isPropertyRangeByLocalName(ruleSpecPropName, "String")) { // check if v1 setPropertyByLocalName(ruleSpecPropName, newSpec); } } } COM: <s> sets the rule specification </s>
funcom_train/43326020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String blastGetInitial(Printf outfile) { String rv = null; if (query==null) return null; String proteinSequence = query.sequence(); if (proteinSequence==null) return null; try { URL url = new URL(getBaseURL()+"blast/blast.cgi"); String query = "ADV_LAB=++&PROGRAM=blastp&DATALIB=nr&FILTER=L&INPUT_TYPE=Sequence+in+FASTA+format&SEQUENCE="+ URLEncoder.encode(proteinSequence)+ "&ALIGNMENT_VIEW=0&DESCRIPTIONS=100&ALIGNMENTS=50&PATH="; rv = IO.getURLData(url, query, "BLAST", outfile); } catch (Exception e) { System.err.println(e.getMessage()); rv = null; } return rv; } COM: <s> query the blast server for the queue data </s>
funcom_train/25282455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runModules(final boolean run) { if (run & !run_modules) { run_modules = true; th_modules = new Thread(runnable_modules); th_modules.start(); } else if (!run & run_modules) { run_modules = false; try { Thread.sleep(33); } catch (final InterruptedException e) { e.printStackTrace(); } th_modules = null; for (final Module mo : modules) mo.deInitialize(); ExperimentManager.getDefault().saveRatInfo(); } } COM: <s> starts stops running all modules </s>
funcom_train/12156744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleTokenize() { byte[] array = { 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0 }; byte[] separator = { 1 }; byte[][] expectedResults = { { 0 }, { 0, 0 }, { 0, 0, 0 }, { 0, 0 }, }; doTokenizationTest(array, separator, expectedResults); } COM: <s> test a simple tokenization process with the simplest possible separator </s>
funcom_train/28297053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEntryChangeDataExistent() throws Exception { Entry entry = dvm.new Entry(Package.class, Sphere.class, Package.NAME, Sphere.NAME); dvm.set(entry); TestListener listener = new TestListener(); dvm.addListener(listener); entry.changeData(Package.class, Package.NAME); assertEquals(Package.class, entry.getDataClass()); assertEquals(Package.NAME, entry.getDataName()); assertFalse(listener.wasPropertyChanged()); } COM: <s> test entry change data existent </s>
funcom_train/12778387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testObjInit() { MethodReference m = MethodReference.findOrCreate(TypeReference.JavaLangObject, MethodReference.initSelector); Collection<IMethod> c = cha.getPossibleTargets(m); for (IMethod method : c) { System.err.println(method); } Assert.assertEquals(1, c.size()); } COM: <s> test that calls to init methods are treated specially </s>
funcom_train/42977640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProviderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConstraintDescription_provider_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ConstraintDescription_provider_feature", "_UI_ConstraintDescription_type"), ConstraintPackage.Literals.CONSTRAINT_DESCRIPTION__PROVIDER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the provider feature </s>
funcom_train/9352390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final T o1, final T o2) throws IllegalArgumentException { if (o1 == null) { throw new IllegalArgumentException("Argument 1 must not be null"); } if (o2 == null) { throw new IllegalArgumentException("Argument 2 must not be null"); } return o1.toString().compareTo(o2.toString()); } COM: <s> compares both objects by their </s>
funcom_train/16743898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getHaplotype(int phase, Chrom chrom, DArrayInteger indices, BitSetByUnit b, int individual, Hashtable<Integer, BitSetByUnit> exceptions, long[] entry) { mChr[chrom.getCode() - 1].accessHaplotype(phase, indices, b, entry, individual, exceptions); } COM: <s> throws null pointer exception on failure </s>
funcom_train/51412872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Style createStyle(boolean isBold, boolean isItalic, boolean isUnderlined, int size) { Style style = tPane.addStyle(""+isBold+isItalic+isUnderlined+size, null); StyleConstants.setFontFamily(style, "Arial"); StyleConstants.setBold(style, isBold); StyleConstants.setItalic(style, isItalic); StyleConstants.setUnderline(style, isUnderlined); StyleConstants.setFontSize(style, size); return style; } COM: <s> creates a style </s>
funcom_train/1600507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponent(Component newComponent) { if( component == null ) { component = new Component[1]; component[0] = newComponent; } else { int newSize = 1 + component.length; Component [] newComponentList = new Component[newSize]; for(int i = 0; i < component.length ; i++ ) { newComponentList[i] = component[i]; } newComponentList[newSize - 1] = newComponent; component = newComponentList; } numberOfComponents += 1 + newComponent.numberOfComponents(); } COM: <s> adds one component to the composite and stores it in an array </s>
funcom_train/6318149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRemoteWorkingDirectory(String remoteWorkingDirectory) throws GridBrokerException { if (status != JobStatus.READY) { throw new GridBrokerException("Job's remote working directory can only be changed while in (" +JobStatus.stringValue(JobStatus.READY) +") state. Current Job state is (" +JobStatus.stringValue(status)+")"); } this.remoteWorkingDirectory = remoteWorkingDirectory; } COM: <s> sets name of the remote working directory for this job default remote </s>
funcom_train/34675778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMarkedForSubjectivity() { if (assessmentSheet==null) { return false; } else if (assessmentSheet.isMarkedForSubjectivity()) { return true; } for(Iterator<Section> it=section.iterator() ; it.hasNext() ; ) { if (it.next().getAssessmentSheet().isMarkedForSubjectivity()) { return true; } } return false; } COM: <s> check if this policy is marked with a subjectivity </s>
funcom_train/4194403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Message updateProxingResponse(Message resp) { printLog("inside updateProxingResponse(resp)",LogLevel.MEDIUM); ViaHeader vh=new ViaHeader((Header)resp.getVias().getHeaders().elementAt(0)); if (vh.getHost().equals(sip_provider.getViaAddress())) resp.removeViaHeader(); return resp; } COM: <s> processes the proxy headers of the response </s>
funcom_train/39973251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getJStatusPanel(), BorderLayout.SOUTH); jContentPane.add(getJToolBar(), BorderLayout.NORTH); jContentPane.add(getJSplitPane(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/46158704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Entity createEntity() { Entity childEntity = new Entity(String.format("%s_%s", getClass().getName(), getOwnerName())); sceneRoot = createSceneGraph(childEntity); addComponents(childEntity, sceneRoot); return childEntity; } COM: <s> create a new entity to represent the child component </s>
funcom_train/1304162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean splitAndPositionAtFirst(SplitFunction splitFunction) { boolean result = false; if (curSegment != null) { final SegmentSequence splitSequence = segmentSequence.splitSegment(curSegment, splitFunction); if (splitSequence != null) { curSegment = splitSequence.getSegment(0); result = true; } } return result; } COM: <s> split the current segment with the split function </s>
funcom_train/46477817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContainsDomainPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Domain_ContainsDomain_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Domain_ContainsDomain_feature", "_UI_Domain_type"), SecurityContextPackage.Literals.DOMAIN__CONTAINS_DOMAIN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the contains domain feature </s>
funcom_train/32057437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInstallUI() { System.out.println("testInstallUI"); JGraph jg=new JGraph(); BasicGraphUI x = new BasicGraphUI(); GraphLayoutCache g = new GraphLayoutCache( new DefaultGraphModel(),jg ); x.installUI(jg); assertNotNull(jg.getUI()); } COM: <s> test of install ui method of class basic graph ui </s>
funcom_train/37445708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteInteractor(String shortlabel) throws IntactException { Collection interactors = helper.search(Interactor.class.getName(), "shortlabel", shortlabel); for (Iterator iterator = interactors.iterator(); iterator.hasNext();) { Interactor interactor = (Interactor) iterator.next(); helper.delete(interactor); } } COM: <s> delete a interactor or more specified by the shortlabel </s>
funcom_train/21111885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkLoopAssignment(Vector holders, Entry issuer) { int size = holders.size(); for (int i = 0; i < size; i++) { Entry e = (Entry) holders.get(i); if (e.getEntryName().getName().equals(issuer.getEntryName().getName())) return true; } return false; } COM: <s> this function checks for loop assignment </s>
funcom_train/27787563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean wakeIfPresent(JInternalFrame frame) { // If we have already opened the frame, and it hasn't been closed // then move it to the front, deiconify it and select it. if(frame != null && !frame.isClosed()) { frame.toFront(); try { frame.setIcon(false); frame.setSelected(true); } catch(PropertyVetoException e) { // No frame should veto this action. assert false; } return true; } return false; } COM: <s> checks to see if the current frame is open </s>
funcom_train/8090863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModelFile(File value) { m_ModelFile = value; if (value.exists() && value.isFile()) { try { initModel(); } catch (Exception e) { throw new IllegalArgumentException("Cannot load model from file '" + value + "': " + e); } } } COM: <s> sets the file containing the serialized model </s>
funcom_train/50136665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRunning() { Layer ly = null; for (int i=0; i < layers.size(); ++i) { ly = (Layer)layers.elementAt(i); if (ly.isRunning()) return true; } if (teacher != null) if (teacher.getTheLinearLayer().isRunning()) return true; return false; } COM: <s> returns true if at least one layer is running </s>
funcom_train/3811735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Table getComposedKeyTable() { Table table = getPrimaryKeyTable(); Column verNumColumn = table.newColumn("VerNum", Column.Type.INTEGER); assertTrue(!verNumColumn.isStringColumn()); assertTrue(!verNumColumn.isBinaryColumn()); Index index = table.getPrimaryKey(); index.addColumn("VerNum"); return table; } COM: <s> p creates a table with a composed primary key </s>
funcom_train/44420836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installQuitMenu(){ menuItem_quit = new JMenuItem("Quit"); menuItem_quit.addActionListener(this); menuManager.registerMenuItem("OpenRPG", menuItem_quit, 1.1); //registering as 1.1 to ensure its last in the menu. } COM: <s> generates the default system quit menu </s>
funcom_train/18255326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeOccupant() { if (occupant != null) { /*for (int i = 0; i < neighbors.size(); i++) { ((HostCell) neighbors[i]).removeNeighborOccupant(occupant); }*/ occupant = null; } else { throw new RuntimeException("No occupant to remove."); } requestUpdate(); } COM: <s> evict the supplied occupant </s>
funcom_train/21856227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSearchBrowserComposite() { GridLayout gridLayout = new GridLayout(); gridLayout.marginHeight = 0; gridLayout.verticalSpacing = 3; gridLayout.horizontalSpacing = 3; gridLayout.marginWidth = 0; searchBrowserComposite = new Composite(browserDetailsSash, SWT.NONE); createSearchGroup(); searchBrowserComposite.setLayout(gridLayout); createBrowserGroup(); } COM: <s> this method initializes search browser composite </s>
funcom_train/1973543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(TableRow row) { if (rowList.add(row)) { fireTableChanged(new TableModelEvent(this, rowList.size() - 1, rowList.size() - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT)); } } COM: <s> adds a row to the end of the list of rows </s>
funcom_train/50552265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDebugEntry(Object debugEntry) { try { Iterator it = loggers.iterator(); while (it.hasNext()) { Logger cur = (Logger) it.next(); cur.writeDebugEntry(debugEntry); } } catch (Exception e) { /* we don't want any exceptions due to logging */ } } COM: <s> writes the entry to all loggers listening using </s>
funcom_train/10687244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDisplayName(boolean daylightTime, int style, Locale locale) { if(icuTimeZone == null || !ID.equals(icuTimeZone.getID())){ icuTimeZone = com.ibm.icu.util.TimeZone.getTimeZone(ID); } return icuTimeZone.getDisplayName( daylightTime, style, locale); } COM: <s> gets the specified style of name </s>
funcom_train/49847971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createLicencePanel() { JPanel licencePanel = new JPanel(new BorderLayout()); JTextArea area = new JTextArea(this.licence); area.setLineWrap(true); area.setWrapStyleWord(true); area.setCaretPosition(0); area.setEditable(false); licencePanel.add(new JScrollPane(area)); return licencePanel; } COM: <s> creates a panel showing the licence </s>
funcom_train/3516498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdditionalModels(Collection<File> additionalModels) { DefaultListModel dlm = (DefaultListModel) jListAdditionalModels.getModel(); this.additionalModels = new Vector<File>(); dlm.removeAllElements(); if (additionalModels == null) return; for (File model : additionalModels) { dlm.addElement(model); this.additionalModels.add(model); } } COM: <s> set the file objects of additional models used by the underlying dss </s>
funcom_train/18256924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RectangularShape getShape(Object entity) { Class shapeClass = getShapeClass(entity); try { return (RectangularShape) shapeClass.newInstance(); } catch (IllegalAccessException iae) { } catch (InstantiationException ie) { } catch (ExceptionInInitializerError eiie) { } catch (SecurityException se) { } return new Ellipse2D.Float(); } COM: <s> code get shape code returns a new instance of the entitys shape </s>
funcom_train/2291940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsLock getLock() { if (m_lock == null) { try { m_lock = getCms().getLock(m_resource); } catch (Throwable e) { m_lock = CmsLock.getNullLock(); LOG.error(e.getLocalizedMessage(), e); } } return m_lock; } COM: <s> returns the the lock for the given resource </s>
funcom_train/7641224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean init(String filePath) { try { BufferedReader reader = new BufferedReader(new FileReader(filePath)); String line = null; do { line = reader.readLine(); if (line != null) { processTagLine(line); } } while (line != null); return true; } catch (IOException e) { return false; } } COM: <s> inits the parser with a specified event log tags file </s>
funcom_train/46118325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocumentRoots (String newDocumentsRoot) { // Set and normalize root File file = new File(newDocumentsRoot); documentsRoot = file.toURI().getPath(); documentsRoot = documentsRoot.replace('\\', '/'); // Make sure it ends with a '/' if ( !documentsRoot.endsWith("/") ) { documentsRoot += "/"; } } COM: <s> sets the root of the documents to process </s>
funcom_train/44852493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ucNew(String inQuestionID, Long inMemberID, String inBookmarkText) throws VException, SQLException { DomainObject lSubscription = create(); lSubscription.set(BookmarkHome.KEY_QUESTIONID, new Integer(inQuestionID)); lSubscription.set(BookmarkHome.KEY_MEMBERID, inMemberID); lSubscription.set(BookmarkHome.KEY_BOOKMARKTEXT, inBookmarkText); lSubscription.insert(true); } COM: <s> creates a new bookmark with the specified values </s>
funcom_train/8080323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String printClass(double[] dist) throws Exception { StringBuffer text = new StringBuffer(); if (m_Instances.classAttribute().isNominal()) { text.append(m_Instances.classAttribute().value(Utils.maxIndex(dist))); } else { text.append(dist[0]); } return text.toString() + "\n"; } COM: <s> prints a classification </s>
funcom_train/825163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void doNext() { if ((animSchedule != null) && (animSchedule.size() > 0)) { animSchedule.remove(0); } if ((globalAnimSchedule != null) && (globalAnimSchedule.size() > 0)) { globalAnimSchedule.remove(0); } } COM: <s> calls the next animation </s>
funcom_train/18787714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extractPackage(MetaPackage source, MdrUmlModel context) { assert (source != null) && (context != null); String qualifiedName = source.getName(); MdrUmlPackage mPackage = createPackage(context, qualifiedName); elements.put(source, mPackage); extractTags(source, mPackage); extractStereotypeAndVisibility(source, mPackage); } COM: <s> extracts the information from the mda package and overwrites the ones of </s>
funcom_train/45050116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(final String keyName, final Object attributeValue) { Map threadAttrs = (Map) attributes.get(); if (threadAttrs == null) { threadAttrs = new HashMap(); attributes.set(threadAttrs); } threadAttrs.put(keyName, attributeValue); } COM: <s> allow an object to be persisted instead of just a string </s>
funcom_train/18099830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get( int key ) { int index; if (this.isPowerOfTwo) { index = (key & 0x7FFFFFFF) & (this.buckets.length - 1); } else { index = (key & 0x7FFFFFFF) % this.buckets.length; } Element element = this.buckets[ index ]; if (element == null) { return null; } do { if (element.key == key ) { return element.value; } element = element.next; } while (element != null); return null; } COM: <s> retrieves the value that has been stored for the given key </s>
funcom_train/36060656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createOther(String name, String description, String unit) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_NAME, name); initialValues.put(KEY_DESCRIPTION, description); initialValues.put(KEY_UNIT, unit); return mDb.insert(OTHER_TABLE, null, initialValues); } COM: <s> create a new misc ingredient </s>
funcom_train/28763277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsslinkheadssize(String newVal) { if ((newVal != null && this.csslinkheadssize != null && (newVal.compareTo(this.csslinkheadssize) == 0)) || (newVal == null && this.csslinkheadssize == null && csslinkheadssize_is_initialized)) { return; } this.csslinkheadssize = newVal; csslinkheadssize_is_modified = true; csslinkheadssize_is_initialized = true; } COM: <s> setter method for csslinkheadssize </s>
funcom_train/3385399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getClosedAdvance(double a, boolean preceding) { if (etype.isClosed()) { a -= data[2]; int count = (int)(a/length()); a -= count * length(); if (a < 0 || (a == 0 && preceding)) { a += length(); } a += data[2]; } return a; } COM: <s> get the modulus of an advance on a closed path </s>
funcom_train/28872173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class AddressOutOfBoundsException extends Util.Error { public final int data_addr; protected AddressOutOfBoundsException(int da) { super("Segment access error", "illegal access of "+ StringUtil.quote(name) + " at " + StringUtil.addrToString(da)); this.data_addr = da; } } COM: <s> the code address out of bounds exception code class represents an error when </s>
funcom_train/40500583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void process(List<SimulationRunState> chunks) { SimulationRunState last = chunks.get(chunks.size() - 1); final SimulationRunState newState = new SimulationRunState(last); javax.swing.SwingUtilities.invokeLater( new Runnable() { public void run() { for (StateChangeListener schl : stateListeners) schl.StateChanged(newState); } } ); } COM: <s> invoked in event thread </s>
funcom_train/20307863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int flagFor(ReasonerFactory rf) { if (rf.equals(OWLFBRuleReasonerFactory.theInstance())) { return FB; } else if (rf.equals(OWLMiniReasonerFactory.theInstance())) { return MINI; } else if (rf.equals(OWLMicroReasonerFactory.theInstance())) { return MICRO; } else { throw new ReasonerException("Unrecognized OWL reasoner config in unit test"); } } COM: <s> return the bitflag corresponding to the given reasoner factory </s>
funcom_train/3835765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJCP_Quit() { if (jCP_Quit == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(3); gridLayout.setColumns(1); jCP_Quit = new JPanel(); jCP_Quit.setLayout(gridLayout); jCP_Quit.add(getJButtonSaveAndExit(), null); jCP_Quit.add(getJButtonDontSaveExit(), null); jCP_Quit.add(getJButtonDontExit(), null); } return jCP_Quit; } COM: <s> this method initializes j cp quit </s>
funcom_train/44136416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getSlideParent(Node node) { int type = -1; NamedNodeMap map = node.getAttributes(); if(map.getLength() > 0) { Node n = map.getNamedItem(OSMFile.OSM_SLIDE_ATT_PARENT); if(n != null) type = parseInt(getStringCleaned(n.getNodeValue())); } return type; } COM: <s> it gets the id of the slide parent </s>
funcom_train/19453841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUsable() { String[] neededHeaders = new String[] { // lower case! "subject", "from", "date", "message-id", "references","lines","bytes" }; for (int i = 0; i < neededHeaders.length; i++) { if (headers.get(neededHeaders[i]) == null) return false; } return true; } COM: <s> checks whether this overview contains all fields required by rfc2980 </s>