__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44079892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D getLabelPosition(EdgeView view) { Rectangle2D tmp = getPaintBounds(view); Point2D pos = view.getLabelPosition(); int unit = GraphConstants.PERCENT; if (pos != null && tmp != null) { double x = tmp.getX() + tmp.getWidth() * pos.getX() / unit; double y = tmp.getY() + tmp.getHeight() * pos.getY() / unit; return GraphConstants.createPoint(x, y); } return null; } COM: <s> returns the label position of the specified view in the given graph </s>
funcom_train/21641619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWindowListener(WindowListener l) { getEventListenerList().removeListener(WindowListener.class, this); getEventListenerList().addListener(WindowListener.class, l); firePropertyChange(WINDOW_LISTENERS_CHANGED_PROPERTY, null, l); } COM: <s> adds the specified window listener removing the default window listener behaviour </s>
funcom_train/18429089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent e) { // if we've been panning, we need to reset now that the mouse is // released... if (this.panLast != null) { ChartPanel panel = (ChartPanel) e.getSource(); this.panLast = null; panel.setCursor(Cursor.getDefaultCursor()); panel.clearLiveMouseHandler(); } } COM: <s> handles a mouse released event </s>
funcom_train/36171396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { //if it is a directory -- we want to show it so return true. if (f.isDirectory()) return true; //get the extension of the file String extension = getExtension(f); //check to see if the extension is equal to "java" if ((extension.equals("java"))) return true; //default -- fall through. False is return on all //occasions except: //a) the file is a directory //b) the file's extension is what we are looking for. return false; } COM: <s> determines whether or not to display the file </s>
funcom_train/42341478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double asinh(double xx) throws ArithmeticException { double x; int sign; if (xx == 0.0) { return xx; } if (xx < 0.0) { sign = -1; x = -xx; } else { sign = 1; x = xx; } return sign * Math.log(x + Math.sqrt(x * x + 1)); } COM: <s> compute the hyperbolic arc sine </s>
funcom_train/29377638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNode( String path, String name ) { DataModel model = (DataModel)( path.length() > 0 ? rootModel.get( path ) : rootModel ); DataModel newNode = (DataModel)model.append( name ); newNode.setTagName( "data" ); currentProject.setModified( true ); } COM: <s> add a new node to the model </s>
funcom_train/50370436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(XmlObject entry, Calendar leaseTime)throws Exception{ WriteEntryRequestDocument in = WriteEntryRequestDocument.Factory.newInstance(); if(signOutgoing){ entry=getDSigUtil().sign(entry); } in.addNewWriteEntryRequest().addNewEntry().set(entry); if(leaseTime!=null){ in.getWriteEntryRequest().setLeaseTime(leaseTime); } space.write(in); if(carbonCopy!=null){ carbonCopy.mkdirs(); entry.save(new File(carbonCopy,String.valueOf(System.currentTimeMillis()))); } } COM: <s> write the given xml into the space </s>
funcom_train/4882157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand2 () { if (itemCommand2 == null) {//GEN-END:|207-getter|0|207-preInit // write pre-init user code here itemCommand2 = new Command ("Item", Command.ITEM, 0);//GEN-LINE:|207-getter|1|207-postInit // write post-init user code here }//GEN-BEGIN:|207-getter|2| return itemCommand2; } COM: <s> returns an initiliazed instance of item command2 component </s>
funcom_train/46884536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireSquareSelected(final int sq) { Iterator iter = listeners.iterator(); SquareSelectEvent ev = new SquareSelectEvent(this, sq); while (iter.hasNext()) { SquareSelectListener l = (SquareSelectListener) iter.next(); l.squareSelected(ev); } } COM: <s> fire a square selected event </s>
funcom_train/36247269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayLoadingMessageLabel() { if (loadingLabel == null) { statusBarGridLayout.horizontalSpacing = 5; GridData gridData = new GridData(); progressImageLabel = new Label(this, SWT.NONE); progressImageLabel.setImage(progressImage); progressImageLabel.setLayoutData(gridData); loadingLabel = new Label(this, SWT.NONE); loadingLabel.setText("Loading..."); } } COM: <s> displays the loading message label in this status bar </s>
funcom_train/48337992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openAt(final int x, final int y) { if (SwingUtilities.isEventDispatchThread()) { GuiUtilities.place(this, x, y); setVisible(true); } else { SwingUtilities.invokeLater(new Runnable() { public void run() { GuiUtilities.place(Window.this, x, y); setVisible(true); } }); } } COM: <s> show this window at the specified location </s>
funcom_train/23617149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findb(LPart f, LPart t, int steps) throws InterruptedException { //PO. // initialise seven copies of f, into op[] super.resetOps(f); // PO.p("r1"); // transform each part in op[] by factors in VAL applyRate(f.getScope().getValue()); // PO.p("r2"); // PO.p("1"); // use the average rate and the pitch contour metric // to judge the distances of co [] to t. judgeDistances(t); //PO.p("r3"); } COM: <s> make 7 copies of f </s>
funcom_train/26490899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void destroyChatroom(String roomid) { coffeeCollection.remove(roomid); for (Enumeration e = getAllCategories().elements(); e.hasMoreElements(); ) { ChatCategory cat = (ChatCategory)e.nextElement(); cat.removeChatroom(roomid); } logDebug2("-- (community) killing chatroom " + roomid); } COM: <s> destroy a chatroom </s>
funcom_train/17250623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fireEvent(int eventNumber) { if (event != null && (allowInterrupt || !isPlaying())) { for (int i = 0; i < event.length; i++) { if (event[i] == eventNumber) { stop(); play(); return true; } } } return false; } COM: <s> used internally for firing an event on this sound playing object </s>
funcom_train/22100702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVersion() { String sVersion; switch (getType()) { case TYPE_SERVICE: sVersion = ((ServiceTypeInfo)this).getServerVersion(); break; case TYPE_SERVER: sVersion = ((ServerTypeInfo)this).getVersion(); break; default: throw new IllegalArgumentException("not a server or service"); } return sVersion; } COM: <s> get the version for a server </s>
funcom_train/4032375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateFormBean(ActionMapping mapping, HttpServletRequest request, ActionForm form) { // Update the obsolete form bean if (mapping.getAttribute() != null) { if ("request".equals(mapping.getScope())) { request.setAttribute(mapping.getAttribute(), form); } else { HttpSession session = request.getSession(); session.setAttribute(mapping.getAttribute(), form); } } } COM: <s> convenience method to update a form bean in its scope </s>
funcom_train/10929134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CmisServiceFactory getServiceFactory(WebServiceContext wsContext) { ServletContext servletContext = (ServletContext) wsContext.getMessageContext().get( MessageContext.SERVLET_CONTEXT); // get services factory CmisServiceFactory factory = (CmisServiceFactory) servletContext .getAttribute(CmisRepositoryContextListener.SERVICES_FACTORY); if (factory == null) { throw new CmisRuntimeException("Service factory not available! Configuration problem?"); } return factory; } COM: <s> returns the services factory </s>
funcom_train/19729158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawNoResultMessage() { if (bar != null) {bar.dispose(); bar = null; fSash.dispose(); fSash = null; fSashNav.dispose(); fSashNav=null;} if (label == null) label = new Label(parent, SWT.CENTER); label.setText("No result, sorry ;-)"); parent.layout(); } COM: <s> display a message indicating that there is no result </s>
funcom_train/7275010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out, byte[] buf) throws IOException { System.arraycopy(guid, 0, buf, 0, guid.length /* 16 */); buf[16]=func; buf[17]=ttl; buf[18]=hops; ByteOrder.int2leb(length, buf, 19); out.write(buf); writePayload(out); } COM: <s> writes a message out using the buffer as the temporary header </s>
funcom_train/33705714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDeveloper(String developer) { LOGGER.entering("Team", "addDeveloper", developer); if (developer == null) { throw new IllegalArgumentException("Developer should not be null"); } developers.add(developer); LOGGER.exiting("Team", "addDeveloper"); } COM: <s> adds a new developer to this </s>
funcom_train/10190712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StatusLine getStatusLine() { String version = getString(4); if (!version.equalsIgnoreCase("SIP/")) { m_nIndex = m_strString.length(); return null; } skipString().skipWSP(); // "SIP/2.0 " int code = getInt(); int begin = getPos(); int end = indexOfEOH(); String reason = getString(end - begin).trim(); goToNextLine(); return new StatusLine(code, reason); } COM: <s> returns the status line or null if it doesnt start with sip </s>
funcom_train/14296065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStereotype(Element pModelElement) { if (MetaApiFactory.getFactory().getModelHelper().hasStereotype( pModelElement)) { return "<<" + MetaApiFactory.getFactory().getModelHelper() .getStereotype(pModelElement) + ">> "; } else { return ""; } } COM: <s> returns the stereotype of the model element including the </s>
funcom_train/48640711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String res = "[\n"; AbstractSymbol sym = null; for (int i = 0; i < tbl.size(); i++) { try { sym = (AbstractSymbol)tbl.elementAt(i); } catch (ArrayIndexOutOfBoundsException ex) { Utilities.fatalError("Unexpected exception: " + ex); } res += " " + sym.toString() + "\n"; } res += "]\n"; return res; } COM: <s> produces a printable representation of the string table </s>
funcom_train/15902970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInfo(String description, String connection, String email, String shareSize) { _description = description; _connection = connection; _email = email; try { _shareSize = Long.parseLong(shareSize); _shareSize = _shareSize/1024/1024/1024; // to gigabytes } catch(NumberFormatException nfe) { _shareSize = 0; } _hasInfo = true; } COM: <s> set the user info </s>
funcom_train/6343547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void introspect() { try { BeanInfo bi = Introspector.getBeanInfo(obj.getClass()); props = bi.getPropertyDescriptors(); } catch (IntrospectionException ex) { log.error("Failed to introspect "+obj+": " + ex.getMessage()); props = new PropertyDescriptor[0]; } } COM: <s> uses java beans </s>
funcom_train/31947670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocalIpAddress() { try { InetAddress addr = InetAddress.getLocalHost(); // Get IP Address String ipAddr = addr.getHostAddress(); System.err.println("local IP: " + ipAddr); return ipAddr; } catch (UnknownHostException e) { e.printStackTrace(); } return null; } COM: <s> gets ip of the local client </s>
funcom_train/21087565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStereotypePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_UD_stereotype_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_UD_stereotype_feature", "_UI_UD_type"), SNI_Package.Literals.UD__STEREOTYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the stereotype feature </s>
funcom_train/19911844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void concat(String s, int index) { this.l[index].setContent(this.l[index].getContent() + s); this.l[index].setTrackNumber(index); if (!this.l[index].isModified()) this.validElements++; this.l[index].setModified(); } COM: <s> concatenates a bit of string in the given box and set the modified </s>
funcom_train/1241384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readCode() throws IOException { readShort(); // max stack readShort(); // max locals skipFully(readInt()); // code skipFully(8 * readShort()); // exception table // read the code attributes (recursive). This is where // we will find the LocalVariableTable attribute. readAttributes(); } COM: <s> read a code attribute </s>
funcom_train/25371504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInstances(Instances data) { ArffSortedTableModel model; m_Filename = TAB_INSTANCES; createTitle(); model = new ArffSortedTableModel(data); model.setShowAttributeIndex(m_ShowAttributeIndex); m_TableArff.setModel(model); clearUndo(); setChanged(false); createName(); } COM: <s> displays the given instances i </s>
funcom_train/22232357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setApplicationBoundingLeaf(BoundingLeaf region) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Clip2")); if (isLive()) ((ClipRetained)this.retained).setApplicationBoundingLeaf(region); else ((ClipRetained)this.retained).initApplicationBoundingLeaf(region); } COM: <s> set the clips application region to the specified bounding leaf </s>
funcom_train/18518171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOpenCommand1() { if (openCommand1 == null) {//GEN-END:|157-getter|0|157-preInit // write pre-init user code here openCommand1 = new Command("Open", Command.OK, 0);//GEN-LINE:|157-getter|1|157-postInit // write post-init user code here }//GEN-BEGIN:|157-getter|2| return openCommand1; } COM: <s> returns an initiliazed instance of open command1 component </s>
funcom_train/28199546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IMarker addProblemMessage(String title, String message, int severity){ IWorkspace workspace = ResourcesPlugin.getWorkspace(); IResource resource = workspace.getRoot(); IMarker marker=null; try { marker = (IMarker) resource.createMarker(IMarker.PROBLEM); marker.setAttribute(IMarker.MESSAGE,title+ ":"+" "+message); marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING); } catch (CoreException e) { // TODO Auto-generated catch block e.printStackTrace(); } return marker; } COM: <s> add a message to the problems view </s>
funcom_train/48889787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showLogTimeForm() { if (statusAlertTask != null) { statusAlertTask.run(); } else { this.logTimeForm.prepare(this.projects); if (Display.getInstance().getCurrent() != logTimeForm && Display.getInstance().getCurrent() != statusAlert) this.previousScreen = Display.getInstance().getCurrent(); logTimeForm.show(); } } COM: <s> prepares and shows the form that asks the user to log time </s>
funcom_train/8583030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getTravelDistance() { float result = 0f; int size = Math.abs(toIndex-fromIndex)+1; List<MapNode> nodes = way.getNodes(); Position pos = new Position(nodes.get(fromIndex)); for (int i = 1; i < size; i++) { MapNode next = nodes.get(fromIndex < toIndex ? fromIndex+i : fromIndex-i); result+= pos.getDistKM(next); pos = new Position(next); } return result; } COM: <s> returns the distance in km </s>
funcom_train/37571577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDescription(String description) throws SOAPException { SOAPElement manifest = findOrMakeBodyChild("eb:Manifest"); SOAPElement descriptor = findOrMakeChild(manifest, "eb:Description"); descriptor.removeContents(); if (description != null) descriptor.addTextNode(description); } COM: <s> set a textual description for my message </s>
funcom_train/16707442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CosignPrincipal getCosignPrincipal() { // Check if a principal already exists. Iterator iterator = subject.getPrincipals().iterator(); Object object; CosignPrincipal principal = null; while (iterator.hasNext()) { object = iterator.next(); if (object instanceof CosignPrincipal) { principal = (CosignPrincipal) object; break; } } return principal; } COM: <s> this method attempts to retrieve the cosign principal from the </s>
funcom_train/3459985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readID3v2Header(InputStream in) throws IOException { byte[] id3header = new byte[4]; int size = -10; in.read(id3header,0,3); // Look for ID3v2 if ( (id3header[0]=='I') && (id3header[1]=='D') && (id3header[2]=='3')) { in.read(id3header,0,3); int majorVersion = id3header[0]; int revision = id3header[1]; in.read(id3header,0,4); size = (int) (id3header[0] << 21) + (id3header[1] << 14) + (id3header[2] << 7) + (id3header[3]); } return (size+10); } COM: <s> parse id3v2 tag header to find out size of id3v2 frames </s>
funcom_train/32891641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Selectable selectBest(LinkedList items, Point p) { Selectable obj = null, best = null; int dist = Integer.MAX_VALUE; for (ListIterator it = items.listIterator(); it.hasNext(); ) { obj = (Selectable)it.next(); if (!selectedObjects.contains(obj) && obj.getDistance(p) < dist) { dist = obj.getDistance(p); best = obj; } } return best; } COM: <s> selects the selectable from given list that is most likely </s>
funcom_train/10602060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean belongsTo(AccreditableManager manager) throws AccessControlException { User user = getUser(); if (user == null) { return true; } else { String thisId = user.getAccreditableManager().getId(); String otherId = manager.getId(); return thisId.equals(otherId); } } COM: <s> checks if this identity belongs to a certain accreditable manager </s>
funcom_train/41576035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getStoreSettingsCommand() { if (storeSettingsCommand == null) {//GEN-END:|74-getter|0|74-preInit storeSettingsCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|74-getter|1|74-postInit // write post-init user code here }//GEN-BEGIN:|74-getter|2| return storeSettingsCommand; } COM: <s> returns an initiliazed instance of store settings command component </s>
funcom_train/4755081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ss() { double total = sserr; rss[nvars - 1] = sserr; for (int i = nvars - 1; i > 0; i--) { total += d[i] * rhs[i] * rhs[i]; rss[i - 1] = total; } rss_set = true; return; } COM: <s> calculates the sum of squared errors for the full regression </s>
funcom_train/19417527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNeighBour(ObjectGraphNode node) { ListIterator lTmp = nodes.listIterator(); boolean found = false; while (!found && lTmp.hasNext()) { // test just references, not values found = (node == (lTmp.next())); } return found; } COM: <s> method to verify if a node is a neighbour of this one </s>
funcom_train/12776434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void advanceOuter() { innerDelegate = null; while (outerKeyDelegate.hasNext()) { currentOperator = outerKeyDelegate.next(); IBinaryNaturalRelation R = implicitUnaryMap.get(currentOperator); Iterator it = R.iterator(); if (it.hasNext()) { innerDelegate = it; return; } } } COM: <s> advance to the next operator </s>
funcom_train/50453427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getDependencies () { // gets the dependencies of _this_chunkdb_only_ int i; ConfigChunk ch; ChunkDependEntry cde; List dep = new ArrayList(); for (i = 0; i < chunks.size(); i++) { cde = null; ch = (ConfigChunk)chunks.get(i); cde = new ChunkDependEntry(); cde.chunk = ch; addDependsForChunk (ch, cde.propdepends, ""); if (cde.propdepends.size() > 0) dep.add (cde); } return dep; } COM: <s> gets dependencies of all config chunks in self </s>
funcom_train/22442933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playPreviousFile(){ // analyze playlist if (jList.getModel().getSize()!=0){ if (!jList.isSelectionEmpty()){ // get index of the first selected file int firstSelected = jList.getSelectedIndex(); int nextSelected = firstSelected; // decrease index with carry over if (firstSelected == 0){ nextSelected = jList.getModel().getSize()-1; }else{ nextSelected --; } // select new index jList.setSelectedIndex(nextSelected); // start playing file at new position playSelectedFile(); } } } COM: <s> play previous file of the playlist </s>
funcom_train/8033899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getSourceUpdateInterval(String sourceParam) { // Create a source from the string in args and get the update property. try { Source source = client.getSource(sourceParam); return source.getProperty("updateInterval"); } // Catch Exception if anything goes wrong during the recursion process. catch (Exception e) { return "Error retrieving update interval."; } } COM: <s> returns a string representation of a sources update interval property </s>
funcom_train/35005403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean ObjectSetText(String name, String text, int font_size, String font, Color text_color) { IChartObject chartObject = null; if (chart != null) { chartObject = chart.get(name); } if (chartObject != null) { chartObject.setText(text); return true; } return false; } COM: <s> changes the object description </s>
funcom_train/9247924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialiseDefaults() { // use Passive FTP FtpFileSystemConfigBuilder.getInstance().setPassiveMode(this, true); try { SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking( this, "no"); } catch (final FileSystemException ex) { LOG.warn("Unable to disable SFTP strict host key checking", ex); } } COM: <s> initialises the set of default vfs file system options to be used </s>
funcom_train/15884558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getExceptionPanel() { if (exceptionPanel == null) { exceptionPanel = new JPanel(); exceptionPanel.setLayout(new BoxLayout(getExceptionPanel(), BoxLayout.Y_AXIS)); exceptionPanel.add(getExceptionMessagePanel(), null); exceptionPanel.add(getDetailPanel(), null); } return exceptionPanel; } COM: <s> this method initializes exception panel </s>
funcom_train/50096333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testReactionSMILES() throws Exception { Reaction reaction = new Reaction(); Molecule methane = new Molecule(); methane.addAtom(new Atom("C")); reaction.addReactant(methane); Molecule magic = new Molecule(); magic.addAtom(new PseudoAtom("magic")); reaction.addAgent(magic); Molecule gold = new Molecule(); gold.addAtom(new Atom("Au")); reaction.addProduct(gold); SmilesGenerator sg = new SmilesGenerator(); String smiles = sg.createSMILES(reaction); //logger.debug("Generated SMILES: " + smiles); Assert.assertEquals("C>[*]>[Au]", smiles); } COM: <s> test generation of a reaction smiles </s>
funcom_train/28122401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean receiveDrop(Visualiser DraggedVisualiser) { if (isDropCandidateFor(DraggedVisualiser)) { while (DraggedVisualiser.getConnectionCount()>0) DraggedVisualiser.getConnection(0).setVisualiser(this); DraggedVisualiser.getModel().removeVisualiser(DraggedVisualiser); return true; } return false; } COM: <s> drop a visualiser on this one </s>
funcom_train/38628449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visualizeSubHeading(PrintStream out, PageInfo pageInfo, String text) { printSubHeading(out, -60, pageInfo.yStart + 1.2*pageInfo.subheadingFontSize, text, pageInfo.subheadingFontSize); pageInfo.lastItemSize = pageInfo.subheadingFontSize-0.5*pageInfo.ySpacing; advancePage(pageInfo); } COM: <s> visualize a sub heading </s>
funcom_train/46327647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(Long attributeID) { if (attributeID == null) { throw new IllegalArgumentException("primary key null."); } // Set the whereArgs to null here. return database.delete(DATABASE_TABLE, KEY_EXTERNALATTRIBUTEID + "=" + attributeID, null) > 0; } COM: <s> delete a external attribute record </s>
funcom_train/42864168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D findIntersection(Road b_) { Point2D intersectPoint = null; for (Line2D bLine : b_.getLineList()) { for (Line2D thisLine : getLineList()) { if (thisLine.intersectsLine(bLine)) { intersectPoint = findIntersection(thisLine.getP1(), thisLine.getP2(), bLine.getP1(), bLine.getP2()); } } } return intersectPoint; } COM: <s> find the intersection point between this and another road </s>
funcom_train/32948615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performFinish(IProgressMonitor monitor) throws CoreException, InterruptedException { try { monitor.beginTask( "NewProjectCreationWizardPage.createproject.desc", 3); if (fCurrProject == null) { updateProject(true, new SubProgressMonitor(monitor, 1)); } configureJavaProject(new SubProgressMonitor(monitor, 2)); } finally { monitor.done(); fCurrProject= null; } } COM: <s> called from the wizard on finish </s>
funcom_train/20535156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBoton3() { if (boton3 == null) { boton3 = new JButton(); boton3.setBounds(new Rectangle(200, 138, 140, 30)); boton3.setText("Carrera"); boton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { control.pedirArchivo("carrera"); } }); } return boton3; } COM: <s> this method initializes boton3 </s>
funcom_train/7777710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFoodItem (MenuItemBean menuItem, FoodItemBean foodItem) throws ErrorBean { try { PreparedStatement stmt = getDeleteFoodItemSQL(); stmt.setInt(1, menuItem.getId()); stmt.setInt(2, foodItem.getId()); stmt.executeUpdate(); } catch (SQLException e) { throwError( BROKER_DELETE_ERROR, e.getMessage(), this); } } COM: <s> removes a food item from a menu in the database </s>
funcom_train/17142680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testMultiLineForBeingWholeCircle() { MultiLine multiLine = getPolygon().getCurrentMultiLine(); ObjectAnnotator<MultiLine> circleFinder = new CircleFinder(multiLine); if (circleFinder.isAnnotationsFound()) showMessage("","Circle found. With center: " + multiLine.getCenterForCircle()); } COM: <s> simpler circle finder </s>
funcom_train/1926579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntertypeFieldDecl liftInit(AJNodeFactory nf, AJTypeSystem ts) { List args = new LinkedList(); if (!(flags().isStatic())) { Special targetThisRef = nf.Special(position(),Special.THIS,host); targetThisRef = (Special) targetThisRef.type(host.type()); args.add(targetThisRef); } Call c = nf.Call(position,host,initmi.name(),args); c = c.methodInstance(initmi); return (IntertypeFieldDecl) init(c); } COM: <s> replace init by method call </s>
funcom_train/35136564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOAIIdentifier(Object nativeItem) { /*String xmlRec = (String)nativeItem; int startOffset = xmlRec.indexOf(identifierStart); int endOffset = xmlRec.indexOf(identifierEnd); return xmlRec.substring(startOffset + identifierStart.length(), endOffset);*/ return "oai:test:id"; } COM: <s> construct an oai identifier from the native item </s>
funcom_train/4291132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferencesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IdentifierDef_references_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IdentifierDef_references_feature", "_UI_IdentifierDef_type"), IdentificationPackage.Literals.IDENTIFIER_DEF__REFERENCES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the references feature </s>
funcom_train/13672987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1() { String baseName = getBaseName(); String userDirectory = OdbSystem.getProperty("user.dir"); println("User directory = " + userDirectory); println("base name = " + baseName); ODB odb = open(baseName); odb.store(new Function("test")); File f = new File(userDirectory); File[] files = f.listFiles(new MyFilter(baseName)); assertEquals(0, files.length); odb.close(); deleteBase(baseName); } COM: <s> test if the transaction file is created in the same directory if database </s>
funcom_train/31078194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanDescriptor getBeanDescriptor() { BeanDescriptor bd = createBeanDescriptor(beanClass, new Object[] { "preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "A component that creates a standing wave of a thing drum surface." }); bd.setValue("helpSetName", "net/jbeans/physics/model/standingwave/resources/StandingWave/jhelpset.hs"); return bd; } COM: <s> returns a bean descriptor for standing wave bean </s>
funcom_train/18118288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { testAddMailAddress(); String full = namedList.toString(); String wanted = "\"Kevin Pors\" <krpors@yahoo.co.uk>; " + "\"Stig Tanggaard\" <stig@stofanet.dk>; " + "\"Pete Kirk\" <pete@kirk.fu>"; assertEquals(full, wanted); } COM: <s> method to test for string to string </s>
funcom_train/20612572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefinedByDescriptorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ComponentInstance_definedByDescriptor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ComponentInstance_definedByDescriptor_feature", "_UI_ComponentInstance_type"), ClPackage.Literals.COMPONENT_INSTANCE__DEFINED_BY_DESCRIPTOR, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the defined by descriptor feature </s>
funcom_train/51502445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButton3() { if (rbDo == null) { rbDo = new JRadioButton(); rbDo.setText("Donnerstag"); rbDo.setActionCommand("Do"); rbDo.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); rbDo.setPreferredSize(new java.awt.Dimension(78,14)); } return rbDo; } COM: <s> this method initializes j radio button3 </s>
funcom_train/19035709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePostWatch(StoredPost storedPost) { if (storedPost != null) { synchronized (this.postWatches) { StoredPost post = this.getPostWatch(storedPost.getPid()); if(post != null) { post.removePostWatch(this); this.postWatches.remove(post); } } } } COM: <s> removes a particular post watch from the collection </s>
funcom_train/29985424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write (byte[] buf, int off, int len) throws IOException { if (ischunked) { String chunksize = Long.toHexString (len); is.write (chunksize.getBytes ()); crlf (is); if (len > 0) { is.write (buf, off, len); crlf (is); } } else { is.write (buf, off, len); } } COM: <s> write a byte array to the underlying stream </s>
funcom_train/2673856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream openContentStreamConflictXSD(String xsdfileName) { // gets the Conflict XSD file template // args: <none> String xsdcontents = MessageFormat.format(AJavaResourceDefinitions.getString("ConflictXSDFile.template"), new Object[] { }); if (xsdcontents.equals("!ConflictXSDFile.template!")) { xsdcontents = "<!-- no XSD template found -->"; } return new ByteArrayInputStream(xsdcontents.getBytes()); } COM: <s> initialize conflict validation file with a template text </s>
funcom_train/22232667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScope(Group scope, int index) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_SCOPE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ModelClip7")); if (isLive()) ((ModelClipRetained)this.retained).setScope(scope, index); else ((ModelClipRetained)this.retained).initScope(scope, index); } COM: <s> replaces the node at the specified index in this model clip nodes </s>
funcom_train/46729727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setup() throws Exception { wizardPanel.removeAll(); if (getWizardScreen().getInkImage() == null) { wizardPanel.add(new ISScrollPane(getCurrentPanel()), BorderLayout.CENTER); } else { wizardPanel.add(getCurrentPanel(), BorderLayout.CENTER); } wizardPanel.revalidate(); setDefaultFocus(); if (postSetupListener != null) { postSetupListener.actionExecuted(null); } } COM: <s> setup the panel </s>
funcom_train/4478156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpURLConnection openConnection(String url) throws IOException { if (isDebugMode()) System.out.println("open: " + url); URL u = new URL(url); HttpURLConnection urlConnection; if (proxy != null) urlConnection = (HttpURLConnection) u.openConnection(proxy); else urlConnection = (HttpURLConnection) u.openConnection(); urlConnection.setRequestProperty("User-Agent", userAgent); return urlConnection; } COM: <s> creates a new </s>
funcom_train/30207670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onToday(final java.awt.event.ActionEvent evt) { selectedDate = getToday(); setVisible(!hideOnSelect); if (isVisible()) { // don't bother with calculation if not visible monthAndYear.setText(formatDateText(selectedDate.getTime())); calculateCalendar(); } } COM: <s> event handler for the today button that sets the currently selected </s>
funcom_train/36959682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int inferIndentationLevel(String reference, int tabSize) { StringBuffer expanded= expandTabs(reference, tabSize); int referenceWidth= expanded.length(); if (tabSize == 0) return referenceWidth; int spaceWidth= 1; int level= referenceWidth / (tabSize * spaceWidth); if (referenceWidth % (tabSize * spaceWidth) > 0) level++; return level; } COM: <s> infer the indentation level based on the given reference indentation </s>
funcom_train/5347694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringUtilsReplace() { String _testString = "test_"; String[] old_strs = { "old0", "old1", "old2", "old3", "old4", }; String[] new_strs = { "new0", "new1", "new2", "new3", "new4", }; for(int i=0; i<old_strs.length; i++) { String str = StringUtils.replace(_testString+old_strs[i], old_strs[i], new_strs[i]); assertEquals("unexpected string", _testString+new_strs[i], str); } } COM: <s> tests the method that replaces sections of a string with a new </s>
funcom_train/49050382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemType getItem (String inIdentifier) { ItemType item = null; // return value. // Start with the default organization, and search the // tree recursively. // OrganizationType defOrg = getDefaultOrganization(); return getItem (inIdentifier, defOrg); } // end getItem(). COM: <s> retrieve an item based on its identifier </s>
funcom_train/35669638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBaseCLPTLinePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CLPTLineFragment_baseCLPTLine_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CLPTLineFragment_baseCLPTLine_feature", "_UI_CLPTLineFragment_type"), FragmentsPackage.Literals.CLPT_LINE_FRAGMENT__BASE_CLPT_LINE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the base clpt line feature </s>
funcom_train/24523433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInside(Time time) { float startTime = (start.getHour() * 60) + start.getMinutes(); float endTime = (end.getHour() * 60) + end.getMinutes(); float thisTime = (time.getHour() * 60) + time.getMinutes(); if(thisTime >= startTime && thisTime <= endTime) { return true; } return false; } COM: <s> checks if the given time is inside this period </s>
funcom_train/51296032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean faInUse(int id) { String sql; sql = "select * from fa_in where fa_unit_id=" + id + ";\n"; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); return res.next(); } catch (Exception e) { e.printStackTrace(); } finally { DBAccessor.getInstance().releaseConnection(res); } return false; } COM: <s> check whether fa is used in docs </s>
funcom_train/43245905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetReligiousPreference() { System.out.println("getReligousPreference"); PatientDataObject instance = new PatientDataObject(); String expResult = ""; String result = instance.getReligiousPreference(); 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 religous preference method of class org </s>
funcom_train/13957011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static Constant constantForClassNamed(Object value, String clazzName) { synchronized (_store) { Map classMap = keyMap(clazzName, false); Constant result = (Constant) classMap.get(value); if(log.isDebugEnabled()) { log.debug("Getting " + result + " for " + clazzName + " and " + value); } return result; } } COM: <s> retrieves the constant for the given class name and value </s>
funcom_train/37908160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryService clone(NamespaceMap nsBindingsOverride, Map<String,Object> varBindingsOverride) { try { QueryService that = (QueryService) super.clone(); that.namespaceBindings = nsBindingsOverride != null ? nsBindingsOverride : that.namespaceBindings.clone(); that.bindings = varBindingsOverride != null ? varBindingsOverride : new HashMap<String, Object>(that.bindings); return that; } catch (CloneNotSupportedException e) { throw new RuntimeException("unexpected exception", e); } } COM: <s> clone this query service optionally overriding the clones namespace and variable bindings </s>
funcom_train/21982746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JBarcode createCode39(){ JBarcode jbc = new JBarcode(Code39Encoder.getInstance(), WideRatioCodedPainter.getInstance(), BaseLineTextPainter.getInstance()); jbc.setBarHeight(17); try { jbc.setXDimension(0.264583333); } catch (InvalidAtributeException e) {} jbc.setShowText(true); jbc.setCheckDigit(false); jbc.setShowCheckDigit(false); return jbc; } COM: <s> creates a new jbarcode instance to code39 barcode type </s>
funcom_train/5580810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void listChange(String list, ListChangeEvent lce) { switch (lce.getType()) { case ListChangeEvent.DATABASE_REQUEST: _logger.log("MainFrame", list + " DATABASE_REQUEST", Logger.DEBUG); _workbar.setIndeterminate(true); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); break; case ListChangeEvent.DATABASE_REQUEST_DONE: _logger.log("MainFrame", list + " DATABASE_REQUEST_DONE", Logger.DEBUG); _workbar.setIndeterminate(false); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); break; } } COM: <s> sets the progress bar to inderminate if database actions </s>
funcom_train/20079737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAt(int x, int y) { if (showing || !isEnabled()) { return; } BaseEvent be = new BaseEvent(); be.x = x; be.y = y; if (!fireEvent(Events.BeforeOpen, be)) { return; } showing = true; onShowToolTip(x, y); } COM: <s> displays the tool tip at the specified location </s>
funcom_train/1662746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean saveConfiguration() { NodeManagerPage nodeManagerPage = (NodeManagerPage) pages.get(PageType.PAGE_NODE_MANAGER); configuration.setNodes(nodeManagerPage.getNodes()); if (selectedNode != null) { configuration.setSelectedNode(selectedNode); } ProjectPage projectPage = (ProjectPage) pages.get(PageType.PAGE_PROJECTS); configuration.setProjects(projectPage.getProjects()); return configuration.save(); } COM: <s> saves the configuration </s>
funcom_train/3032193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redrawCurPF() { stopEditing(); // checking if we lose any edits... if (getIndiModified()) udebug.dprintln("redrawCurPF: INDI modified"); if (getFamsModified()) udebug.dprintln("redrawCurPF: FAMS modified"); dataFill(curPF); } COM: <s> calls data fill with the current person family to refresh the page </s>
funcom_train/2660852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setFactory() { _tokenizerFactory = new ITokenizerFactory() { public IQueryTokenizer getTokenizer() { return new DerbyQueryTokenizer( DerbyQueryTokenizer.this._querySep, DerbyQueryTokenizer.this._lineCommentBegin, DerbyQueryTokenizer.this._removeMultiLineComment); } }; } COM: <s> sets the itokenizer factory which is used to create additional instances </s>
funcom_train/43873810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void preventCacheResponse(final HttpServletResponse response) { response.setHeader(HttpHeader.PRAGMA.toString(), "no-cache"); response.setHeader(HttpHeader.CACHE_CONTROL.toString(), "no-cache"); response.setDateHeader(HttpHeader.EXPIRES.toString(), 0); } COM: <s> prevent the response to be cached by browser by adding some header attributes </s>
funcom_train/4965633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeCommand(Command cmd) throws IOException, ServiceException { if(sessionToken == null) { handshake(); } doRequest( RequestType.NOTIFY, SERVICE_BASEURL + "radio/" + "control.php" + "?session=" + sessionToken.getSessionId() + "&command=" + cmd.toString() + "&debug=0" ); } COM: <s> executes a command to control the code buffered input stream code </s>
funcom_train/1379020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ContextChangeEvent createEvent(javax.jms.TextMessage message){ try{ String text = message.getText(); log.info("Receive remote context change: " + text); String[] textArr = text.split("="); if(textArr.length == 2){ String[] prefix = textArr[0].split("/"); if(prefix.length == 2){ return new ContextChangeEvent(this, prefix[1], textArr[1], this.ontName, prefix[0]); }else{ return null; } }else{ return null; } } catch(Exception e){ e.printStackTrace(); return null; } } COM: <s> create context change event object based on the message received from subscribed topic </s>
funcom_train/21438603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage getImage(Glycan structure, boolean opaque, boolean show_masses, boolean show_redend) { Vector<Glycan> structures = new Vector<Glycan>(); if( structure!=null ) structures.add(structure); return getImage(structures,opaque,show_masses,show_redend,1.); } COM: <s> return a graphical representation of a structure as an image </s>
funcom_train/25107955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CheckNode addObject(Object child) { CheckNode parentNode = null; TreePath parentPath = tree.getSelectionPath(); if (parentPath == null) { parentNode = rootNode; } else { parentNode = (CheckNode) (parentPath.getLastPathComponent()); } return addObject(parentNode, child, true); } COM: <s> add child to the currently selected node </s>
funcom_train/3169295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restrictTo(ScruSet other) { MuSet tmp = (MuSet) copy(); try { tmp.wipeAll(other); wipeAll(tmp); } finally { tmp.destroy(); } /* udanax-top.st:45846:MuSet methodsFor: 'operations'! {void} restrictTo: other {ScruSet} "Sort of intersect. Wipe from myself all elements that I don't have in common with other. Turn myself into the intersection of my current self and other." | tmp {MuSet} | tmp _ self copy cast: MuSet. tmp wipeAll: other. self wipeAll: tmp. tmp destroy.! */ } COM: <s> sort of intersect </s>
funcom_train/19072429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean vLineClear(int x) { int w = drawImage.getWidth(this); int h = drawImage.getHeight(this); for ( int i=0;i<h;i++ ) { if ( pixelMap[(i*w)+x] !=-1 ) return false; } return true; } COM: <s> this method is called to determine </s>
funcom_train/1872456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSkewness() { int n = this.getN(); double m3 = (((double)n) / (n-1)) * (cubicsum/n - Math.pow(getAverage(), 3) ); return ( m3 / Math.pow(getStD(), 3 ) ); } COM: <s> computes the skewness on the node values distribution and </s>
funcom_train/50479139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object doCreateObject(String aName) throws CheckstyleException { try { return doMakeObject(aName); } catch (CheckstyleException ex) { //try again with suffix "Check" try { return doMakeObject(aName + "Check"); } catch (CheckstyleException e) { throw new CheckstyleException("Unable to instantiate " + aName, e); } } } COM: <s> creates a object with the given name </s>
funcom_train/32947613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSetSize( int setSize ) throws PropertyVetoException { if ( setSize > 0 ) { this.setSize = setSize; } else { throw new PropertyVetoException( "setSize must be > 0", new PropertyChangeEvent( this, "setSize", new Integer( this.setSize ), new Integer( setSize ) ) ); } } COM: <s> sets the number of individuals to be created </s>
funcom_train/28956694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void simplify(FieldPolynomial fp) { if (fp.coefficients.size() > 0) { int last = fp.coefficients.size() - 1; while ((last > 0) && (fp.coefficients.get(last).value() == 0)) { last--; } if (last < fp.coefficients.size() - 1) { fp.coefficients.subList(last + 1, fp.coefficients.size()) .clear(); } } } COM: <s> simplify a field polynomial by removing all the prefixed 0 terms </s>