__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46677223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean save() { if (coma.getData().getOpenFile().exists()) { Document saveDoc = coma.getData().getDocument(); ComaXMLOutputter outputter = new ComaXMLOutputter(); try { FileOutputStream out = new FileOutputStream(coma.getData() .getOpenFile()); outputter.output(saveDoc, out); out.close(); coma.xmlSaved(); return true; } catch (IOException e) { coma.status("saving failed: " + e); return false; } } else { return saveAs(); } } COM: <s> saves the open file </s>
funcom_train/18114437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildMenuBar() { menubar = new JMenuBar(); //menubar.setBorder(null); menubar.setMargin(new Insets(0, 0, 0, 0)); menubar.setBackground(menubackground); menubar.setBorder( new MatteBorder(0, 0, 1, 0, new Color(235, 235, 235))); for (int i = 0; i < menues.size(); i++) { JMenu menu = (JMenu) menues.elementAt(i); menu.setBackground(menubackground); menu.setForeground(menuforeground); menubar.add(menu); } } COM: <s> builds the menubar </s>
funcom_train/20629069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayVersion( String qs_name ) { try { QueryServer qs = ( QueryServer ) Class.forName( qs_name ).newInstance(); qs.printQueryServerVersion(); } catch ( Exception e ) { Categories.dataServer().error( "Unable to display version for query server " + qs_name, e ); displayNoQsToLoad(); } } COM: <s> this method displays the version number of a product </s>
funcom_train/41108994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Publisher getPublisher(Long id) { if(id == null){ throw new NullPointerException("author's id"); } Publisher publisher = em.find(Publisher.class, id); if (publisher == null) { throw new IllegalStateException("The given publisher doesn't exist"); } publisher.getBooks().size();//aby se přenesl a dalo pracovat i s listem return publisher; } COM: <s> it gets publisher with the specific id </s>
funcom_train/40621760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertRow(int beforeRow) { if (onRowInserted(beforeRow)) { // Fire listeners if (listeners != null) { listeners.fireRowInserted(beforeRow); } // Increment the row count int numRows = getRowCount(); if (numRows != UNKNOWN_ROW_COUNT) { setRowCount(numRows + 1); } } } COM: <s> insert a row and increment the row count by one </s>
funcom_train/11729184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRestoreProp() throws RepositoryException { try { p.getParent().checkout(); p.getParent().checkin(); fail("On checkin of N which has a property with OnParentVersion ABORT defined, an UnsupportedRepositoryOperationException must be thrown."); } catch (VersionException e) { // success } } COM: <s> test the restore of a on parent version abort property </s>
funcom_train/3463141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EntityInterface getObject(EntityInterface.Params params, EntityInterface parent) throws ObjectManagerException, BuildException { int size = (pool==null ? 0 : pool.size()); if(size>0) { EntityInterface p = (EntityInterface) pool.remove(size-1); p.doInitialise(params); if(parent!=null) parent.addChild(p); p.postInitialise(); p.setAlive(true); return p; } else return PROTOTYPE.newInstance(params,parent); } COM: <s> returns an initialised entity </s>
funcom_train/41837739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFormattedLatitudeString(String latitudeString) { float latitude = Float.parseFloat(latitudeString); String hemisphereString = ""; if (latitude > 0) hemisphereString = "N"; else if (latitude < 0) hemisphereString = "S"; String resultString = positionFormatter.format(Math.abs(latitude)); return resultString + DEGREE_SYMBOL + hemisphereString; } COM: <s> gets the formatted latitude string </s>
funcom_train/964435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component buildIndividualButtons(ButtonBarBuilder builder) { builder.addGridded(new JButton("One")); builder.addRelatedGap(); builder.addGridded(new JButton("Two")); builder.addRelatedGap(); builder.addGridded(new JButton("Three")); return builder.getPanel(); } COM: <s> builds and returns a button bar ignoring the builders button order </s>
funcom_train/119028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CellView createView(Object cell, CellMapper map) { CellView view = null; if (graphModel.isPort(cell)) view = createPortView(cell, map); else if (graphModel.isEdge(cell)) view = createEdgeView(cell, map); else view = createVertexView(cell, map); map.putMapping(cell, view); view.refresh(true); // Create Dependent Views view.update(); return view; } COM: <s> constructs a view for the specified cell and associates it </s>
funcom_train/11647519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMethod(Method method) { this.method = method; Class[] types = method.getParameterTypes(); if ( types == null || types.length <= 0 ) { throw new IllegalArgumentException( "The Method must have at least one parameter" ); } setValueType(types[0]); } COM: <s> sets the constant value of this expression </s>
funcom_train/36870147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContents(JPanel panel){ clearContents(); if(panel == null){ panel = new JPanel(); } contentsPanel = panel; contentsPanel.setMinimumSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT)); contentsPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); add(contentsPanel, BorderLayout.CENTER); repaint(); validate(); } COM: <s> set the contents panel to the panel passed </s>
funcom_train/438586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); listeners = new ArrayList<CellListener>(); // Reads extensions extensions = new HashMap<String, CellExtension>(); int extCount = stream.readInt(); for (int i = 0; i < extCount; i++) { try { CellExtension extension = (CellExtension)stream.readObject(); extensions.put(extension.getName(), extension); } catch (ClassNotFoundException e) {} } } COM: <s> customizes deserialization by recreating the listener list and by catching </s>
funcom_train/3462492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(boolean withGUI) throws SAXParseException,SAXException,ParserConfigurationException,IOException,ClassNotFoundException,BuildException,IllegalAccessException,InstantiationException,InvocationTargetException,NoSuchFieldException,CloneNotSupportedException { if (runtime!=null) runtime.terminate(); ancestor = loadFile(paramFile); runtime = new BiomasRuntime(ancestor); if (withGUI) { if (gui!=null) gui.dispose(); gui = new MainWindow(runtime).getMeInJFrame(); gui.show(); } else runtime.setRunning(true); } COM: <s> loads the file and starts the simulation or brings up the gui </s>
funcom_train/36977934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { String basedir = getServletContext().getRealPath("/"); try { Registry.getInstance() .setConfiguration(basedir, "WEB-INF/classes/registry.xml"); } catch (Exception re) { PrintStream stderr = System.err; stderr.println(re); } } COM: <s> initialize the servlet </s>
funcom_train/51575882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMediaState(final boolean stat) { if (gagCheck.getState()) { mediaCheck.setEnabled(false); mediaPath.setEnabled(false); mediaButton.setEnabled(false); } else { mediaCheck.setEnabled(true); mediaPath.setEnabled(stat); mediaButton.setEnabled(stat); } } COM: <s> toggle the state of the media related widgets </s>
funcom_train/35453853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDirectory(File dir) { try { if (dir.getPath().length() == 0) { this.getSearchPath().add(""); } else { this.getSearchPath().add(dir.getCanonicalPath()); } } catch (IOException e) { warning("skipping bad directory, '" + dir + "'"); } } COM: <s> add directory dir if exists to </s>
funcom_train/43910610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File findSchemaFile(String path) throws IOException { File file = new File(path); if (file.isAbsolute()) { return file; } if (schemaLookupDirectories != null) { for (int i = 0; i < schemaLookupDirectories.length; i++) { File dir = schemaLookupDirectories[i]; file = new File(dir, path); if (file.exists()) { return file; } } } return null; } COM: <s> attempts to locate a schema file by name by iterating through </s>
funcom_train/31462973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClasspath(String cp) { List l = new ArrayList(); StringTokenizer st = new StringTokenizer(cp, ":"); while (st.hasMoreTokens()) { String s = st.nextToken(); File f = new File(s); l.add(f); } setClasspath(l); } COM: <s> sets the classpath to the files denoted by code cp code </s>
funcom_train/32316297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPropertyExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyDomain_propertyExpression_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyDomain_propertyExpression_feature", "_UI_PropertyDomain_type"), OdmPackage.Literals.PROPERTY_DOMAIN__PROPERTY_EXPRESSION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the property expression feature </s>
funcom_train/3935296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteRelation(int inType1, long inID1, int inType2, long inID2) throws BOMException { try { delete(createKey(inType1, inID1, inType2, inID2), true); } catch (SQLException exc) { throw new BOMException(exc.getMessage()); } catch (VException exc) { throw new BOMException(exc.getMessage()); } } COM: <s> delete the relation that connects the items with the specified values </s>
funcom_train/3923436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAuthInfo( Client c ) throws Exception { if ( authInfo == null ) { authInfo = dispatcher.getAuthInfo( c ); if ( authInfo != null ) { authInfo.className = getClassName(); authInfo.id = db_id; dispatcher.put( this, authInfo ); } } } COM: <s> updates auth info </s>
funcom_train/13381803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeContradiction(long a, long b){ if(areContradictory(a, b)){ Integer cidA = elementToCid.get(a); Integer cidB = elementToCid.get(b); Set<Integer> contradictionsA = cidToContradictingCids.get(cidA); contradictionsA.remove(cidB); Set<Integer> contradictionsB = cidToContradictingCids.get(cidB); contradictionsB.remove(cidA); return true; } else return false; } COM: <s> removes a contradiction relation between two equivalence classes </s>
funcom_train/50311936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String substVars(String text, TextBlocks vars, Vector values) { StringBuffer retblock; String variable; int nvars; int i = 0, beginpos = 0, endpos = 0; if(vars == null) return ""; nvars= vars.size(); if(nvars == 0) retblock = new StringBuffer(text); else { retblock = new StringBuffer(); while (i < nvars) { beginpos = vars.beginOffsetAt(i); retblock.append(text.substring(endpos, beginpos)); variable = (String)values.elementAt(i); if(variable != null) retblock.append(variable); endpos = vars.endOffsetAt(i) + VAREND.length(); i++; } retblock.append(text.substring(endpos)); } return retblock.toString(); } COM: <s> used by subst block vars and subst trailer vars </s>
funcom_train/39953553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcessFactory transition(String transitionName) { if (exceptionHandler!=null) { exceptionHandler.setTransitionName(transitionName); } else { if (node==null) { throw new PvmException("no current node"); } transition = node.createOutgoingTransition(null, transitionName); observableElement = transition; event = null; eventListenerReference = null; exceptionHandler = null; } return this; } COM: <s> creates a named transition on the current node </s>
funcom_train/30005909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImageIcon getIcon(String path) { URL url = JIconMenu.class.getResource(path); if (url != null) { return new ImageIcon(url); } else { MainController.getInstance().handleException(new IconNotFoundException("The icon '" + path + "' was not found or is not readable.")); return null; } } COM: <s> loads an icon from an image file </s>
funcom_train/26572277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean isWin(Board b, int nextTurn){ boolean debug = false; // Check if all pieces lost except king if (onlyKingLeft(b, nextTurn)) return true; // check if king is checkmated if (debug) System.out.println ("iswin possible moves: \n"); if (getValidMoves(b,nextTurn).isEmpty() && kingInCheck(b, nextTurn)) return true; return false; } COM: <s> returns if a particular side has won </s>
funcom_train/10482208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String receiveLine() throws MessagingException { if (socket == null || !socket.isConnected()) { throw new MessagingException("no connection"); } try { String line = in.readLine(); if (line == null) { throw new MessagingException("Unexpected end of stream"); } return line; } catch (IOException e) { throw new MessagingException("Error reading from server", e); } } COM: <s> receives one line from the server </s>
funcom_train/35677751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDplarcht() { try { CComplexReflectBinding ccem = new CComplexReflectBinding( DplarchtCases.getFactory(), DplarchtCases.getJavaObject().getClass()); assertEquals(32025, ccem.getByteLength()); } catch (ReflectBindingException e) { fail(e.getMessage()); } } COM: <s> dplarcht has many combinations of complex elements arrays and redefines </s>
funcom_train/15467594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReadOnly(boolean readOnly) throws SQLException { logger.debug(" setReadOnly(boolean readOnly) throws SQLException "); String methodName = "setReadOnly"; ArrayList<Serializable> methodSignature = new ArrayList<Serializable>(); methodSignature.add(boolean.class); ArrayList<Serializable> methodParameters = new ArrayList<Serializable>(); methodSignature.add(new Boolean(readOnly)); remoteCall(Boolean.class, this.remoteObjectUuid, methodName, methodSignature, methodParameters); } COM: <s> sets the read only </s>
funcom_train/1194089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChoiceGroup getCityGrp() { if (cityGrp == null) {//GEN-END:|467-getter|0|467-preInit // write pre-init user code here cityGrp = new ChoiceGroup(LocalizationSupport.getMessage("PROVINCEGRP"), Choice.EXCLUSIVE);//GEN-LINE:|467-getter|1|467-postInit // write post-init user code here }//GEN-BEGIN:|467-getter|2| return cityGrp; } COM: <s> returns an initiliazed instance of city grp component </s>
funcom_train/28374983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSearchTermsToIndex(IndexedDocument indexDocument, Map<String, String[]> map) { for (String key : map.keySet()) { String[] vals = map.get(key); for (String val : vals) { indexDocument.add(key, val); } } } COM: <s> utility method particularly useful for putting output of </s>
funcom_train/22603432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean authorizeRole(String roleName, String operationName, boolean flushCache) throws AuthorizationException{ AuthorContext authorCtx = SecurityContextFactory.createAuthorContext(null, roleName, operationName); authorizeRole(authorCtx, flushCache); if(AuthorResponseCode.AUTHORIZED== authorCtx.getAuthorResponse().getStatus()) return true; else return false; } COM: <s> convenient method to check authorization for the role to the speficied operation </s>
funcom_train/32959770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIncludeDuplicateValueset() throws JAXBException, IOException { JAXBContext jc = setupJAXBContext("org.tolven.trim"); InputStream prescriptionMedStream = getClass().getResourceAsStream("PrescriptionMedications.trim.xml"); Trim trim = (Trim) unmarshalStream(jc, prescriptionMedStream, factory); SpecialIncludeScanner scanner = new SpecialIncludeScanner(); scanner.setTrim( trim ); scanner.setJc(jc); scanner.scan(); logger.info( marshal(jc, trim ) ); } COM: <s> test valueset binds with duplicates </s>
funcom_train/10980058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleRequest(HttpServletRequest request) throws ServletException { elements = new Hashtable(); Enumeration enumer = request.getParameterNames(); while (enumer.hasMoreElements()) { String key = enumer.nextElement().toString(); elements.put(key, request.getParameter(key)); } } COM: <s> p mock parsing of the servlet input stream </s>
funcom_train/21656342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtNuevoCronologia() { if (btNuevoCronologia == null) { btNuevoCronologia = new JButton(); btNuevoCronologia.setBounds(new Rectangle(669, 168, 100, 25)); btNuevoCronologia.setMnemonic('n'); btNuevoCronologia.setText("Nuevo"); btNuevoCronologia.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { limpiarTodo(); } }); } return btNuevoCronologia; } COM: <s> this method initializes bt nuevo cronologia </s>
funcom_train/33006604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte buffer[], int offset, int length) { DatagramPacket p = new DatagramPacket(buffer, offset, length, addr, port); try { sock.receive(p); } catch (IOException e){ return -1; } synchronized (this) { dataRead = true; notify(); } return p.getLength(); } COM: <s> read some data from the input stream </s>
funcom_train/14077200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void newAuthor(Citation c) { Paragraph authorHeader = new Paragraph(c.getBook().getAuthor().getName(), this.authorFont); try { this.document.add(authorHeader); //System.err.println("New AUTHOR: " + c.getBook().getAuthor().getName()); } catch (DocumentException de) { }; } COM: <s> respond to a change in author by outputting a new section header </s>
funcom_train/7272905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOs(String os) { _os = null; if (os != null) { os = os.trim(); if (os.equalsIgnoreCase("windows") || os.equalsIgnoreCase("linux") || os.equalsIgnoreCase("mac")) { _os = os.toLowerCase(); } else if (os.equals("*")) { _os = null; } } } COM: <s> if it receives a valid os string windows mac linux </s>
funcom_train/4957324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_toArray_typed() { Object[] intObjArray = new Integer[] { new Integer(0), new Integer(1), new Integer(2), new Integer(3)}; TestSupport.assertThat(Arrays.equals( defaultList().toArray(new Integer[] {}), intObjArray), "toArray(Integer[]) did not return the expected Integer[] array"); } COM: <s> tests to array object a </s>
funcom_train/48621569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IdentifierTypeDublinCoreMapping get(Long identifierTypeId) { Query q = hbCrudDAO.getSessionFactory().getCurrentSession().getNamedQuery("getIdentifierTypeDublinCoreMappingByIdentifierTypeId"); q.setParameter("identifierTypeId", identifierTypeId); return (IdentifierTypeDublinCoreMapping)q.uniqueResult(); } COM: <s> get a specified dublin core mapping by identifier type id </s>
funcom_train/5676071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ValidationException getExeption(){ try{ Class exception = Class.forName(exceptionClass); return (ValidationException)exception.getConstructor(new Class[]{Object[].class}).newInstance(new Object[]{null}); }catch(Exception e){ throw new RuntimeException(e.getClass().getName() + ":" + e.getMessage()); } } COM: <s> setter for property exception class </s>
funcom_train/31492934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() throws SQLException { try { Class.forName("org.gjt.mm.mysql.Driver"); } catch (Exception e) { e.printStackTrace(); } Connection conn=null; Statement statement=null; ResultSet myResultSet=null; String SQLStr=new String(); SQLStr="delete from associazione where id="+id; try { conn = DriverManager.getConnection(sqlConnectionString); statement=conn.createStatement(); statement.executeUpdate(SQLStr); } catch (SQLException se) { throw se; } finally { if (statement!=null) statement.close(); if (conn!=null) conn.close(); } } COM: <s> delete the associazione from the db </s>
funcom_train/4366203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void genPreambleImports() throws JasperException { Iterator iter = pageInfo.getImports().iterator(); while (iter.hasNext()) { out.printin("import "); out.print((String) iter.next()); out.println(";"); } out.println(); } COM: <s> generate preamble imports shared by servlet and tag handler preamble </s>
funcom_train/28116725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkImplements(Class type) throws Exception { Test[] tests = getTests(); for (int i = 0; i < tests.length; ++i) { Test test = tests[i]; if (!type.isAssignableFrom(test.getClass())) { throw new Exception("Test " + test + " doesn't implement " + type.getName()); } } } COM: <s> helper method to check that a test case or suite implements the </s>
funcom_train/3556330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String currentImage() throws TokenizerException { Token token = currentToken(); if (token.getType() == Token.EOF) { return null; } else if ( ! isFlagSet(Flags.F_TOKEN_POS_ONLY) || token.getImage() != null) { return token.getImage(); } else { return getText(token.getStartPosition(), token.getLength()); } } COM: <s> convenience method to retrieve only the token image of the </s>
funcom_train/38290436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateNamespaceMappings(Node node, boolean deepSearch) { if (node.getNodeType() == Node.ELEMENT_NODE) { final Map<String, String> namespaces = getNamespaces( (Element) node, deepSearch); final Element root = getFragmentElement(getFragment(node)); DOMMutils.createXmlnsAttributes(root, namespaces); } } COM: <s> updates namespaces in document fragments root element </s>
funcom_train/7619007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean register(E callback) { synchronized (mCallbacks) { if (mKilled) { return false; } IBinder binder = callback.asBinder(); try { Callback cb = new Callback(callback); binder.linkToDeath(cb, 0); mCallbacks.put(binder, cb); return true; } catch (RemoteException e) { return false; } } } COM: <s> add a new callback to the list </s>
funcom_train/33872277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isGroupValid(TokenGroup tokens, int syntaxLevel, String groupID) { List<SyntaxRule> ruleList = rules.get(groupID); for (SyntaxRule sRule : ruleList) { if (matchesRule(sRule, (TokenGroup) tokens.clone(), syntaxLevel)) { return true; } } return false; } COM: <s> checks to see if a group of a given id is valid </s>
funcom_train/36989152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConverter(String converterId, Class converterClass) { if (!Converter.class.isAssignableFrom(converterClass)) { String msg = "The class <" + converterClass.getName() + " specified for converterId <" + converterId + "> is not a javax.faces.converter.Converter !"; throw new InternalServerException(msg); } converterClassById.put(converterId, converterClass); } COM: <s> registers a converter with a converter id </s>
funcom_train/403328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IncludePath createIncludePath() { Project p = getProject(); if (p == null) { throw new java.lang.IllegalStateException("project must be set"); } if (isReference()) { throw noChildrenAllowed(); } IncludePath path = new IncludePath(p); includePaths.addElement(path); return path; } COM: <s> creates an include path </s>
funcom_train/10913226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BlockSequence endBlockSequence(Position breakPosition) { KnuthSequence temp = endSequence(breakPosition); if (temp != null) { BlockSequence returnSequence = new BlockSequence(startOn, displayAlign); returnSequence.addAll(temp); returnSequence.ignoreAtEnd = this.ignoreAtEnd; return returnSequence; } else { return null; } } COM: <s> finalizes a this </s>
funcom_train/29711996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(Object element) { Image im=null; if (element instanceof IFeed ) { Feed f=(Feed)element; im=f.getImage(); //return im; } return im; // if (element instanceof IFeed || element instanceof IFeedEntry) { // IAdaptable id= (IAdaptable) element; // ISomething is=(ISomething)id.getAdapter(ISomething.class); // Image im=is.getImage(); // return im; // } else { // return null; // } } COM: <s> returns the image of the element </s>
funcom_train/28763201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivityRequesterProcessId(java.lang.String value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_ActivityRequesterProcessId, jj_ActivityRequesterProcessId,kk_ActivityRequesterProcessId, com.intersys.objects.Database.RET_PRIM, "ActivityRequesterProcessId", dh); return; } COM: <s> sets new value for code activity requester process id code </s>
funcom_train/7880427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void subiu(String bin) { // get operands int r1 = Integer.parseInt(bin.substring(8, 11), 2); int r2 = Integer.parseInt(bin.substring(11, 14), 2); int imm = Integer.parseInt(bin.substring(16), 2); // perform arithmetic try { long temp = Long.parseLong(getBinReg(r2), 2) - imm; unsignedSetReg(r1, temp); } catch (NumberFormatException e) { // overflow occurs } } COM: <s> description subtract unsigned immediate br </s>
funcom_train/38236621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminate() { terminationFlag = true; synchronized(jobQueue) { // don't work anymore jobQueue.clear(); } //If thread is already in suspend, then resume that, for termination if (jobSuspendedFlag) resume(); // wake thread if sleeping so it would terminate. synchronized(monitorForJobsWait) { // release the waiting thread monitorForJobsWait.notifyAll(); } } COM: <s> terminate analysis task </s>
funcom_train/18183385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute(InteractionSpec ispec, Record input, Record output) throws ResourceException { if (log.isTraceEnabled()) { log.trace("ENTER/EXIT: execute(InteractionSpec [" + ispec + "], Record input[" + input + "], Record output[" + output + "])"); } throw new NotSupportedException("This method, execute input/output, not supported"); } COM: <s> this for of execute is not supported </s>
funcom_train/46676929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cloneSpeaker() { Element spC = data.getSelectedPersons().values().iterator().next(); Element cloned = (Element) spC.clone(); cloned.setAttribute("Id", "S" + new GUID().makeID()); cloned.getChild("Sigle").setText(spC.getChildText("Sigle") + "_cloned"); data.getDataElement().addContent(cloned); data.disableSpeakerFilters(); updateLists(); } COM: <s> clone selected speaker </s>
funcom_train/26318214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void nextToken() { nextArg(); if (argValue != null) { if (argValue.startsWith(OPTION_PREFIX)) { token = TOK_OPTION; tokenValue = argValue.substring(OPTION_PREFIX.length()); } else { token = TOK_LITERAL; tokenValue = argValue; } } else { tokenValue = null; token = TOK_EOF; } } COM: <s> reads the next available token </s>
funcom_train/18812510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debuggerAddressWrite(int addr, int data) { if (cartType == 0) { rom[addr] = (byte) data; } else { if (addr < 0x4000) { rom[addr] = (byte) data; } else { rom[pageStart + addr - 0x4000] = (byte) data; } } } COM: <s> writes a byte to an address in cpu address space </s>
funcom_train/3345219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileHandleImpl open(VMOpenMode mode) throws IOException { if (mode.canWrite()) { if (hasWriters) { throw new IOException("File is already open for writing"); } else { hasWriters = true; } } final FileHandleImpl handle = new FileHandleImpl(file, mode, FileHandleManager.this); handles.add(handle); return handle; } COM: <s> open an extra handle for this file </s>
funcom_train/12181309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttributeValue(String attributeName, String value) { Control control = getControl(attributeName); if (control != null) { AttributeAccessor aa = (AttributeAccessor) control.getData(ATTRIBUTE_ACCESSOR_KEY); if (aa != null) { aa.setValue(attributeName, value); } } } COM: <s> set the attribute using the attribute name and value </s>
funcom_train/7720711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doCopy() { Editor editor=getJPE().getEditor(); copyBuffer=editor.getSelectedText(); Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); cb.setContents( new StringSelection(copyBuffer), this); getJPE().say("Text Copy"); } COM: <s> copy the selected text to the buffer </s>
funcom_train/47751063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkServiceInformationsName() { ServiceInformations serviceInformations = dataManager .getServiceInformationsList().findServiceInformations( serviceInformationsCombo.getText()); if (serviceInformations == null) { Shell shell = new Shell(); MessageDialog.openWarning(shell, "Service not found !", "No currentServer in the database match"); disableAll(); // currentServerFind = false; } else { displayServiceInformations(serviceInformations); } } COM: <s> check service informations load the icon </s>
funcom_train/15861454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getLockScreenButton() { if (lockScreenButton == null) { lockScreenButton = new JToggleButton(); lockScreenButton.setText("Lock"); lockScreenButton.setName("lockScreenButton"); lockScreenButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { hub.sendLockScreenToAll(lockScreenButton.isSelected()); } }); } return lockScreenButton; } COM: <s> this method initializes j toggle button </s>
funcom_train/8208347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTable() { // Check whether the table has existed // If it is the case, delete the old table if (!announcementTable.exists()) // Create a new table announcementTable.create("announcement_id"); // Indicate primary key // get the bean factory to the table announcementFactory = announcementTable.getFactory(); } COM: <s> create an announcement bean table </s>
funcom_train/44588971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties readConfig(String filename) { BufferedInputStream stream = null; try { stream = new BufferedInputStream(new FileInputStream(new File(filename))); final Properties formatterOptions = new Properties(); formatterOptions.load(stream); return formatterOptions; } catch (IOException e) { Util.log(e, Messages.bind(Messages.ConfigFileReadingError)); } finally { if (stream != null) { try { stream.close(); } catch (IOException e) { /* ignore */ } } } return null; } COM: <s> return a java properties file representing the options that are in the </s>
funcom_train/44490016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSon ( Sbj a, Sbj b ) { return ( a.getFTH ( _fml ).equals ( b.getSBJ ( _fml ) ) || a.getMTH ( _fml ).equals ( b.getSBJ ( _fml ) ) || b.getFTH ( _fml ).equals ( a.getSBJ ( _fml ) ) || b.getMTH ( _fml ).equals ( a.getSBJ ( _fml ) ) ); } COM: <s> returns true if the one subject is the son of the other subject </s>
funcom_train/31681344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IExpr convertSymbolsInExpr(IExpr expr, HashMap<ISymbol, ISymbol> convertedSymbols) { IExpr result = expr; if (expr instanceof IAST) { result = convertSymbolsInList((IAST) expr, convertedSymbols); } else if (expr instanceof ISymbol) { ISymbol toSymbol = convertedSymbols.get((ISymbol) expr); if (toSymbol != null) { result = toSymbol; } } return result; } COM: <s> convert all symbols which are keys in code converted symbols code in </s>
funcom_train/375411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNameAndTwoVariables() { ConfigString string = new ConfigString("${jnp}.${name}_${company}", variables, properties); assertTrue("sub failed in expand", string.expand("mark", variables)); assertEquals(JNP + ".mark_" + COMPANY, string.toString()); string.reset(); // Reintialize } COM: <s> test name and two variables </s>
funcom_train/47989658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findSubtrees(List<Tree> list, Tree tree, int tokenType) { if(tree == null) { return; } if(tree.getType() == tokenType) { list.add(tree); } for(int i = 0; i < tree.getChildCount(); i++) { findSubtrees(list, tree.getChild(i), tokenType); } } COM: <s> find all ascendants of the specified type in the target tree </s>
funcom_train/48406333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMergedPackagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PackageMerge_mergedPackage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PackageMerge_mergedPackage_feature", "_UI_PackageMerge_type"), SpemxtcompletePackage.eINSTANCE.getPackageMerge_MergedPackage(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the merged package feature </s>
funcom_train/8628538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSQL(Value[] values) { StatementBuilder buff = new StatementBuilder(); for (Value v : values) { buff.appendExceptFirst(", "); if (v != null) { buff.append(v.getSQL()); } } return buff.toString(); } COM: <s> get the sql snippet of the value list </s>
funcom_train/50703020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCompletely(HiView v) { HashSet<HiEdge> topedges = new HashSet<HiEdge>(); for (HiNode n : v.getTopNodes()) { topedges.addAll(n.getInEdges()); removeCompletely(n); } Set<HiEdge> removeEdges = v.getIns().keySet(); removeEdges.removeAll(topedges); for (HiEdge e : removeEdges) removeEdge(e); } COM: <s> removes the view from the hi graph removing all internal edges and all </s>
funcom_train/8525560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSessionKey( HttpRequest request) { Cookie sessionCookie = null; for (Cookie c : request.getCookies()) { if (c.getName().equals(cookieId)) { sessionCookie = c; break; } } return sessionCookie == null ? null : sessionCookie.getValue(); } COM: <s> extracts a session key from the session cookie supplied with the request </s>
funcom_train/46826052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init (String username, String gameID) { this.username = username; this.gameID = gameID; // Set convience fields this.game = server.getGameList().getGame (gameID); this.userList = game.getUserList(); // link to userlist this.tableList = game.getTableList(); // link to table list } COM: <s> initilise this server connection thread with a username and a </s>
funcom_train/39534405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose(){ if(tabPanel!=null && changeListener!=null){ tabPanel.removeChangeListener(changeListener); SVGPropertiesWidget widget=null; //disposes the widgets for(Iterator it=widgets.iterator(); it.hasNext();){ try{widget=(SVGPropertiesWidget)it.next();}catch (Exception ex){} if(widget!=null){ widget.dispose(); } } //clears the maps tabMap.clear(); propertyItemsMap.clear(); widgets.clear(); tabPanel.removeAll(); tabPanel=null; } } COM: <s> removes all the listeners </s>
funcom_train/12335754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String val) { Enumeration<AbstractButton> buttonEnum = theButtons.getElements(); while (buttonEnum.hasMoreElements()) { AbstractButton button = buttonEnum.nextElement(); if (button.getText().equals(val)) theButtons.setSelected(button.getModel(), true); else theButtons.setSelected(button.getModel(), false); } } COM: <s> sets the value and the appearens of the set of radiobuttons called by </s>
funcom_train/19714818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadOriginalOntology(String path) throws OWLException, URISyntaxException{ if(hasPathOriginalOntology) { ontoManager.removeOntology(ontoManager.getOntology(ontologyID)); } pathOriginalOntology = path; hasPathOriginalOntology = true; ontology = ontoManager.loadOntology(IRI.create(pathOriginalOntology)); SimpleRenderer render = new SimpleRenderer(); String strWriter = new String(); strWriter = render.render(ontology ); ontologyID = ontology.getOntologyID(); this.originalOntologyAS = strWriter.toString(); } COM: <s> load original owl ontology </s>
funcom_train/7285528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disabled_testLargeCollectionSerialization() { int count = 1400000; List<CollectionEntry> list = new ArrayList<CollectionEntry>(count); for (int i = 0; i < count; ++i) { list.add(new CollectionEntry("name"+i,"value"+i)); } gson.toJson(list); } COM: <s> created in response to http code </s>
funcom_train/45933422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String step1(String word, String r1) { log.debug("Entered step1()"); String stem = deleteSuffix(word, r1, suffixes1); if (stem != null) { return stem; } // No suffix found, search for s-ending stem = deleteEnding1(word, r1); return stem == null ? word : stem; } COM: <s> performs step1 of the algorithm by removing suffixes </s>
funcom_train/21482708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isDistributed(Ehcache cache) { Set listeners = cache.getCacheEventNotificationService().getCacheEventListeners(); for (Iterator iterator = listeners.iterator(); iterator.hasNext();) { CacheEventListener cacheEventListener = (CacheEventListener) iterator.next(); if (cacheEventListener instanceof CacheReplicator) { return true; } } return false; } COM: <s> determine if the given cache is distributed </s>
funcom_train/22208838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBooleanValues() { try { // map prefix "xtm" to XTM 1.0 namespace PrefixResolver pr = new XTMPrefixResolver((Node) domDocument.getDocumentElement()); iterateBooleanValueTable(pr); } catch (Exception ex) { ex.printStackTrace(); fail("Unexpected exception: " + ex.toString()); } } COM: <s> tries a number of xpath queries returning boolean values and </s>
funcom_train/22232692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getPlane(int planeNum, Vector4d plane) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_PLANE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("ModelClip3")); ((ModelClipRetained)this.retained).getPlane(planeNum, plane); } COM: <s> retrieves the specified clipping plane from this model clip node </s>
funcom_train/34890186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readXML(String path) { SAXParserFactory factory = SAXParserFactory.newInstance(); try { // Parse the input SAXParser saxParser = factory.newSAXParser(); extractedTrks = extractedWpts = 0; ignoreElement = false; xmlFile = new File(path); saxParser.parse(xmlFile, handler); } catch (Throwable t) { if (Main.DEBUG) { t.printStackTrace(); } } DataManager.getInstance().addLoadedXML(path); } COM: <s> parses a gpx file </s>
funcom_train/28224708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onSelectionMade(final String selection) { Agent agent = null; String name = selection; for (Agent a : gui.getAgents()) { if (name.equals(a.getName())) { agent = a; break; } } if (agent == null) { throw new RuntimeException( "You selected a non existing element." + "And how did you do it if I may ask?"); } gui.getControlPanel().setSelected(agent); gui.setActiveTrackable(agent); } COM: <s> display the chosen action make him active and put a marker on him </s>
funcom_train/16174603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ticker getTicker() { if (ticker == null) {//GEN-END:|16-getter|0|16-preInit // write pre-init user code here ticker = new Ticker("Select a compatible Santur solo file (.santur, .mid, or .jts)");//GEN-LINE:|16-getter|1|16-postInit // write post-init user code here }//GEN-BEGIN:|16-getter|2| return ticker; } COM: <s> returns an initiliazed instance of ticker component </s>
funcom_train/14141621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed( KeyEvent e ) { if( e.getKeyCode() == KeyEvent.VK_DELETE ) { // Delete key pressed; delete the selected node. this.deleteCurrentNode(); } else if( e.getKeyCode() == KeyEvent.VK_F2 ) { // F2 key pressed (standard Windows rename key); rename the selected node. this.renameCurrentNode(); } } COM: <s> handles keypresses on a component tree for opening renaming and deleting </s>
funcom_train/49165149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGoogleWhereString() { String whereStr = null; if (location != null && !location.isEmpty()) { whereStr = location; } if (room != null && !room.isEmpty()) { if (whereStr == null) whereStr = room; else // We have both a Location and Room values whereStr = whereStr + " : " + room; } return whereStr; } COM: <s> lotus has both a location field and a room field </s>
funcom_train/1099414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doStart() { boolean startScanning = true; // if the initial deployments fail then // something is wrong with the bpr dir try { mFileHandler.handleInitialDeployments(); } catch (Throwable t) { startScanning = false; AeException.logError(t, AeMessages .getString("AeEngineLifecycleWrapper.ERROR_3")); //$NON-NLS-1$ } startBpelEngine(); // don't scan if initial deployments failed if (startScanning) { mFileHandler.startScanning(); } } COM: <s> start the server if the storage is ready </s>
funcom_train/26508650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getChannelDSConfig() { if(RAPDBConfig.getInstance().isMultiDS()) { //System.out.println("Default db: "+ DatabaseNames.PORTAL_CHANNELS); defaultDSName = DatabaseNames.PORTAL_CHANNELS; } else { //System.out.println("Default db: "+DatabaseNames.PORTAL); defaultDSName = DatabaseNames.PORTAL; } } COM: <s> this method determines if the forums have been configured two use multiple </s>
funcom_train/31500822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCapacity(int newCapacity) { if (newCapacity < 1) { throw new IllegalArgumentException(Integer.toString(newCapacity)); } synchronized (this) { capacity = newCapacity; // remove available objects if we are over capacity while ( capacity < objects.size() && ! availableObjects.isEmpty() ) { remove(availableObjects.iterator().next()); } } } COM: <s> sets the capacity of this object pool to a particular size </s>
funcom_train/9273960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void varchar1000() throws SQLException { PreparedStatement ps = getOrPrepareStatement( "SELECT VC1000 FROM T --DERBY-PROPERTIES index=T_VC1000"); ResultSet rs = ps.executeQuery(); while (rs.next()) { assertNotNull(rs.getString(1)); } rs.close(); } COM: <s> test the performance of an index scan on a varchar 1000 column </s>
funcom_train/12562226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { // White background g.setColor(255, 255, 255); g.fillRect(0, 0, getWidth(), getHeight()); if (splashScreen != null) { g.drawImage(splashScreen, 0, 0, Graphics.LEFT | Graphics.TOP); } } COM: <s> paint splash screen </s>
funcom_train/45803461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(String model, String view, String skin) { if (model != null && !model.equals("")) this.model = model; if (view != null && !view.equals("")) this.view = view; if (skin != null && !skin.equals("")) this.skin = skin; makePaths(); } COM: <s> updates the state of the object to include user preferences </s>
funcom_train/25291509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDecayTime(float decayTime) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DECAY_TIME_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes28")); ((AuralAttributesRetained)this.retained).setDecayTime(decayTime); } COM: <s> set decay time </s>
funcom_train/8022269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAverage(Integer time) { // Return zero if there's no data for this time. if (!time2data.containsKey(time)) { return 0; } // Otherwise there's data, so compute the average. int total = 0; for (Integer value : time2data.get(time)) { total += value; } return (double)total / (double)time2data.get(time).size(); } COM: <s> returns the average of all the entries for the specified time </s>
funcom_train/46125734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayMetadataEditor(UserRequest ureq) { editMetadataCtr = new CPMetadataEditController(ureq, getWindowControl(), currentPage, cp); listenTo(editMetadataCtr); dialogCtr = new CloseableModalController(getWindowControl(), getTranslator().translate("close"), editMetadataCtr.getInitialComponent()); listenTo(dialogCtr); dialogCtr.activate(); } COM: <s> displays the edit page editor </s>
funcom_train/30083942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void illegalOpOutputGen(HttpServletRequest request, HttpServletResponse response){ try{ String output = "{error: 'You do not have privilege to execute the operation'}"; PrintWriter out = response.getWriter(); out.write(output); }catch(Exception e){ logger.log(Level.SEVERE,"[ERROR]:In function illegalOpOutputGen:" + e); } } COM: <s> this function is invoked when the request is illegal which means the user </s>
funcom_train/5381237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point doComputeSize() { if (descriptionLabel != null && body != null) { Point bodySize = body.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); GridData gd = (GridData) descriptionLabel.getLayoutData(); gd.widthHint = bodySize.x; } return getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT, true); } COM: <s> computes the size needed by this pages ui control </s>