__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9279421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteQueryWithNoDynamicResultSets() throws SQLException { Statement stmt = createStatement(); try { stmt.executeQuery("CALL RETRIEVE_DYNAMIC_RESULTS(0)"); fail("executeQuery() didn't fail."); } catch (SQLException sqle) { assertNoResultSetFromExecuteQuery(sqle); } } COM: <s> tests that code statement </s>
funcom_train/43399991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void add(String word, Object factor) { if (dict.containsKey(word)) { Object newFactor = sum(dict.get(word), factor); if (!isObjectZero(newFactor)) { dict.put(word, newFactor); } else { dict.remove(word); } } else if (!isObjectZero(factor)) { dict.put(word, factor); } } COM: <s> add string code word code with factor code factor code to this </s>
funcom_train/39793799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompareEqual() { System.out.println("compare"); Object obj = GenerateTestPlayer1(); Object obj1 = GenerateTestPlayer1(); DefenderComparator instance = new DefenderComparator(); int expResult = 0; int result = instance.compare(obj, obj1); assertEquals(expResult, result); } COM: <s> test of compare method of class team sheet creator </s>
funcom_train/40513810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ // TODO brackets ("()") are not tested String result = new String(); for(Iterator<GTGOr> iter = ors.iterator(); iter.hasNext(); ){ GTGOr tmp=iter.next(); if(tmp.ands.size()>1 || tmp.ands.get(0).variables.size()>1){ result+="("; } result+=tmp.toString(); if(tmp.ands.size()>1 || tmp.ands.get(0).variables.size()>1){ result+=")"; } if(iter.hasNext()){ result+=" ^ "; } } return result; } COM: <s> returns readable form of gtgxor expression </s>
funcom_train/40515870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startBlinkLoop() { blinking = true; new Thread() { public void run() { while (blinking) { blinkToBlack();//sends commands that will take 50ms to run //sleep 1 BLINK_TIME for the on, sleep 1 BLINK_TIME for off. Util.sleep(BLINK_TIME * 2); } } }.start(); } COM: <s> start blinking until code stop blink loop code called </s>
funcom_train/51197135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testgetHeightReduction() { System.out.println("getHeightReduction"); try { jjil.algorithm.GrayReduce instance = new GrayReduce(5,10); int expectedResult = 10; int result = instance.getHeightReduction(); assertEquals(expectedResult, result); } catch (Exception ex) { ex.printStackTrace(); fail(ex.toString() + " thrown"); } } COM: <s> test of get height reduction method of class jjil </s>
funcom_train/24052203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String objectToString(T object) { StringBuilder sb = new StringBuilder(64); sb.append(object.getClass().getSimpleName()); for (FieldType fieldType : fieldTypes) { sb.append(' ').append(fieldType.getColumnName()).append("="); try { sb.append(fieldType.extractJavaFieldValue(object)); } catch (Exception e) { throw new IllegalStateException("Could not generate toString of field " + fieldType, e); } } return sb.toString(); } COM: <s> return a string representation of the object </s>
funcom_train/7269553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setText(String tip) { String foreHex = GUIUtils.colorToHex(_foreground); tipPane.setText("<html><font face='arial,helvetica,sanserif' color='#" + foreHex + "'>" + tip + "</font>"); tipPane.setCaretPosition(0); } COM: <s> sets the text of the tip to a new tip </s>
funcom_train/49704381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SortField getSortField() { SortField sf = null; switch (orderType) { case FLOAT: sf = new SortField(fieldName, SortField.FLOAT, reversed.booleanValue()); break; case STRING: sf = new SortField(fieldName, SortField.STRING, reversed.booleanValue()); break; case INT: sf = new SortField(fieldName, SortField.INT, reversed.booleanValue()); break; case LONG: sf = new SortField(fieldName, SortField.LONG, reversed.booleanValue()); break; } return sf; } COM: <s> return a single sort field </s>
funcom_train/7751449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton4() { if (jButton4 == null) { jButton4 = new JButton(); jButton4.setText("Save"); jButton4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { new DirectorySaver((Enumeration<String>) listModel .elements()); // Aggiorna il server dei cambiamenti if (server != null) server.updateSharedFiles(); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } }); } return jButton4; } COM: <s> this method initializes j button4 </s>
funcom_train/38501089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResultListFileName(String resultListFileName) { if (_status != Status.STOPPED) { throw new IllegalStateException(); } File f = new File(resultListFileName); if (!f.exists()) { throw new IllegalArgumentException("File " + resultListFileName + " does not exist."); } _resultListFileName = resultListFileName; } COM: <s> sets the name of the result file name </s>
funcom_train/13938254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void includeVertex(CSG_Vertex v){ minX = Math.min(minX, v.getX()); maxX = Math.max(maxX, v.getX()); minY = Math.min(minY, v.getY()); maxY = Math.max(maxY, v.getY()); minZ = Math.min(minZ, v.getZ()); maxZ = Math.max(maxZ, v.getZ()); } COM: <s> update the bounds min max to include a csg vertex </s>
funcom_train/39468715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @NotNull private JPanel createSettingsPanel() { final JPanel settingsPanel = new JPanel(); settingsPanel.setBorder(BorderFactory.createTitledBorder(ACTION_BUILDER.getString("border.settings.title"))); settingsPanel.add(createEncodingPanel()); return settingsPanel; } COM: <s> creates the panel which holds the settings </s>
funcom_train/13969885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ejbCreate() { try { Context context = new InitialContext(); backgroundJobLoginContext = ServiceLocator.initBackgroundJobLoginContext(); regulatorFacadeLocal = ((RegulatorFacadeLocalHome) ServiceLocator.getEjbLocalHome(RegulatorFacadeLocalHome.JNDI_NAME)).create(); } catch (Exception e) { logger.error(e,e); throw new RuntimeException("Caught Exception: "+e); } } COM: <s> required creation method for message driven beans </s>
funcom_train/3839757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receivedChat(String chatmsg) throws ServerErrorMessage { checkState(false); /* Is it game or hall chat?? */ if (hasGame()) { _rg.playerChats(_playerName, chatmsg); _nlogger.debug("Game chat = " + chatmsg); } else { _gs.playerChats(_playerName, chatmsg); _nlogger.debug("Hall chat = " + chatmsg); } } COM: <s> sending the players chat to other players </s>
funcom_train/8065196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doIt() { Editor ed = (Editor) Globals.curEditor(); if (ed == null) return; if (_magnitude > 0.0) { ed.setScale(ed.getScale() * _magnitude); } else { ed.setScale(1.0); } ed.damageAll(); } COM: <s> adjust the scale factor of the current editor </s>
funcom_train/2333639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int maxBin(DoubleIHistogram1D h) { int maxBin = -1; double maxValue = Double.MIN_VALUE; for (int i = h.xAxis().bins(); --i >= 0;) { double value = h.binHeight(i); if (value > maxValue) { maxValue = value; maxBin = i; } } return maxBin; } COM: <s> returns the index of the in range bin containing the max bin height </s>
funcom_train/44665205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteActionComment(Comment comment){ Object[] params = new Object[1]; params[0] = new Integer(comment.getCommentId()); logger.debug("Delete action comment commentId[" + comment.getCommentId() + "]"); MySQLDataAccess.execSQL(DELETE_COMMENT_ACTION,params,DELETE_REVIEW_COMMENT,params); } COM: <s> delete an actoin comment from the database </s>
funcom_train/8132525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFrom(Object data) { // get the property fro the data objecrt String dataForText = (data==null)? "" : PropertyAccessor.retrieveString(data, getProperty() , getConverter()); // move to contxt if (dataForText==null) dataForText = ""; setValue(dataForText); } COM: <s> compound is giving the instruction to load from this dataobject </s>
funcom_train/23713757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsInstance(String instance) { if (roleNames == null) return false; if (instance.lastIndexOf('/') > -1) { instance = instance.substring(instance.lastIndexOf('/') + 1); } for (int i = 0; i < roleNames.length; i++) { String roleName = roleNames[i]; if (roleName.equals(instance)) { return true; } } return false; } COM: <s> check if an instance exists in the part spec </s>
funcom_train/20205845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFromItems() { List localItems = getItems(); if (localItems == null) { throw new IllegalStateException("Items have not been set."); } for (int i = 0; i < localItems.size(); i++) { Object item = localItems.get(i); copyFrom(item); } } COM: <s> copy the values of each item in the </s>
funcom_train/42765488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IDiffMarkedConstrainedLanguageSentence genSentenceAsAdded(ConstrainedLanguageSentenceDTO missingSentence) { IDiffMarkedConstrainedLanguageSentence diffMarkedSentence = genDiffMarkedSentence(missingSentence); String[] words = sentenceToWords.splitSentenceToWords(missingSentence); if (words != null) { for (String word : words) { diffMarkedSentence.addDiffMarkedWord(genDiffMarkedWord(DiffType.ADDED, word)); } } return diffMarkedSentence; } COM: <s> mark all words from sentence as </s>
funcom_train/41770988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void incWaitTime() { if (dataLoadInt == -1 && dynamicWaitTime < MAX_WAIT_TIME) { dynamicWaitTime *= 2; if (dynamicWaitTime > MAX_WAIT_TIME) { dynamicWaitTime = MAX_WAIT_TIME; } } else if (dataLoadInt > -1) { dataLoadInt--; } } COM: <s> increases the waiting time between file reading </s>
funcom_train/39102263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create() { JPasswordField field = new JPasswordField(); setJComponent(field); field.getDocument().addDocumentListener(new MyDocumentListener()); field.addFocusListener(new MyFocusListener()); field.addKeyListener(new KeyAdapter()); field.setEchoChar(getPasswordModel().getEchoChar()); update(); } COM: <s> creates the actual swing component jpassword field </s>
funcom_train/4853203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRootHrefs (String hrefs) throws MalformedURLException { Vector v = new Vector (); StringTokenizer tok = new StringTokenizer (hrefs); while (tok.hasMoreElements ()) v.addElement (new Link (tok.nextToken())); roots = new Link[v.size()]; v.copyInto (roots); } COM: <s> set starting points of crawl as a string of whitespace delimited urls </s>
funcom_train/18015466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getFlags() { int ps=0x20; if(N) ps |= 0x80; if(V) ps |= 0x40; if(B) ps |= 0x10; if(D) ps |= 0x08; if(I) ps |= 0x04; if(!notZ) ps |= 0x02; if(C) ps |= 0x01; return ps; } COM: <s> retrieves the flag values as if they were part of a single byte </s>
funcom_train/9994034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getAboutMenuItem() { if (aboutMenuItem == null) { aboutMenuItem = new JMenuItem(); aboutMenuItem.setText("About"); aboutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JDialog theHelpDlg = new HelpDlg(ListCopyApp.this, ContentHelpType.CONTENT_ABOUT); theHelpDlg.pack(); theHelpDlg.setVisible(true); } }); } return aboutMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/25738925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPLTheoMSnPeakList getPeakList(JPLIConditionalExpression condition) { // filter list if if (peakList == null || !condition.equals(lastAppliedCondition)) { /** separate all selected peaks to the left of the * {@code lastSelectedIonTypes} cursor in temporary list of peaks */ filterList(condition); /* sort all selected peaks in ascending order and convert to peaklist */ peakList = toPeakList(sortPeakArrayList()); } return peakList; } COM: <s> get the peaklist of given ion peaks created from the temporary list </s>
funcom_train/43245220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEmpPhoneNumber() { System.out.println("getEmpPhoneNumber"); EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); String expResult = ""; String result = instance.getEmpPhoneNumber(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get emp phone number method of class org </s>
funcom_train/973234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Boolean addParentId(final Document document, final Element root, final String parentId) { if (!parentId.equals("")) { Element element; element = document.createElement("parentID"); element.appendChild(document.createTextNode(parentId)); root.appendChild(element); return true; } else { return false; } } COM: <s> adds the parent id to the xml file </s>
funcom_train/27699820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildHTML(String preText, String linkText, String postText) { mBegin = preText.length(); mEnd = mBegin + linkText.length(); StringBuffer sb = new StringBuffer(); sb.append("<html>"); sb.append(escapeChars(preText)); sb.append("<font color=\"blue\"><u>"); sb.append(escapeChars(linkText)); sb.append("</u></font>"); sb.append(escapeChars(postText)); sb.append("</html>"); return sb.toString(); } COM: <s> creates an html formatting for the specified text </s>
funcom_train/3000429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(Properties p) { // create widget driver try { // creat the WidgetDriver widgetDriver = (WidgetDriver)Class.forName( p.getProperty(Constants.CONF_KEY_WIDGET_DRIVER) ).newInstance(); // initialize it widgetDriver.initialize(this); // o chit! } catch(Exception e) { log.fatal("Could not create or initialize WidgetDriver!", e); throw new RuntimeException(e); } // create core classes layoutManager = new LayoutManager(); eventDispatcher = new EventDispatcher(); widgetFactory = new WidgetFactory(); widgetFactory.setApplicationContext(this); } COM: <s> initializes the context </s>
funcom_train/33480795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDOMTree() { // create the root element <ElementTypes> Element rootEle = getRootElement(); dom.appendChild(rootEle); // No enhanced for Iterator it = myData.iterator(); while (it.hasNext()) { ElementType b = (ElementType) it.next(); // For each object create <ElementType> element and attach it to // root Element e = createElement(b); rootEle.appendChild(e); } } COM: <s> the real workhorse which creates the xml structure </s>
funcom_train/3834626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GM_Envelope getMBRByRecNo( int recNo ) throws IOException { SHPEnvelope shpenv = shp.getRecordMBR( recNo ); double xmin = shpenv.west; double xmax = shpenv.east; double ymin = shpenv.south; double ymax = shpenv.north; return GeometryFactory.createGM_Envelope( xmin, ymin, xmax, ymax ); } COM: <s> returns the minimum bound rectangle of rec noth geometrie br </s>
funcom_train/49046162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonMenuButtEquiCol() { //if (buttEquiCol == null) { buttEquiCol = new JRadioButtonMenuItem(); buttEquiCol.setText("Equidistant colors"); buttEquiCol.setToolTipText("equidistant colors are used as output colors "); buttEquiCol.addActionListener(this); buttEquiCol.setActionCommand("parameter"); //} return buttEquiCol; } COM: <s> this method initializes the option equidistant colors </s>
funcom_train/16398203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPropertyPuzzleTiny() { System.out.println("testPropertyPuzzleTiny"); Puzzle puzzle = new TinyPuzzle(); panel.setPuzzle(puzzle); assertSame("Same puzzle not returned", puzzle, panel.getPuzzle()); assertNotNull("Painter not set", panel.getPainter()); } COM: <s> test of puzzle property of class net </s>
funcom_train/35418388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3 rotate( Vector3 v ) { // PBA Theorem 18.42 p'= qpq* // p is quaternion [0,(x,y,z)] // p' is the rotatet result // q is the unit quaternion representing a rotation // q* is the conjugated q Quaternion vq = new Quaternion(0.0f, v); Quaternion rotatet = this.multiply(vq).multiply( this.conjugate() ); return new Vector3(rotatet.v); } COM: <s> apply this quaternion as a rotation to the vector v </s>
funcom_train/2414756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void optimizeSolution() throws Exception { Vector<Point> vec = new Vector<Point>(); //create a new solution vector vec.add(new Point(0,0)); vec.add(new Point(0,0)); vec.add(new Point(1,0)); vec.add(new Point(2,0)); vec.add(new Point(0,1)); vec.add(new Point(0,1)); vec.add(new Point(0,0)); //optimized should be: (0,0) vec = SolveMaze.optimizeSolution(vec); assertEquals(new Point(0,0), vec.get(0)); assertEquals(1, vec.size()); } COM: <s> removes loops to optimize length of solution </s>
funcom_train/13815719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TIFFField getMetadataField( int tag ) { if ( metadata == null ) { load( false, true, Integer.MAX_VALUE, Integer.MAX_VALUE, false ); } TIFFField ret = null; if ( exifData != null ) { ret = exifData.getTIFFField( tag ); } if ( ret == null && metadata != null ) { ret = metadata.getTIFFField( tag ); } return ret; } COM: <s> get a tiff metadata field </s>
funcom_train/50017088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Date parseTime(String time) throws CalDAV4JException { if (time != null && !"".equals(time)) { if ("NOW".equals(time)) { return new DateTime(true); } else { try { if (time.length()>8) { return new DateTime(time); } else { return new Date(time); } } catch (ParseException e) { e.printStackTrace(); throw new CalDAV4JException("Unparsable date format in query:"+time, e); } } } return null; } COM: <s> parses a string to a date using the following syntax </s>
funcom_train/50041415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getRegionScore(String chr, int start, int end, int zoom, RegionScoreType type, ReferenceFrame frame) { float score = -Float.MAX_VALUE; for (Track track : tracks) { if (track.isVisible()) { score = Math.max(score, track.getRegionScore(chr, start, end, zoom, type, frame)); } } return score; } COM: <s> return a composite score for the entire group </s>
funcom_train/46753532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameterRef(DisplayModel parameterRef) { if (Converter.isDifferent(this.parameterRef, parameterRef)) { DisplayModel oldparameterRef= new DisplayModel(this); oldparameterRef.copyAllFrom(this.parameterRef); this.parameterRef.copyAllFrom(parameterRef); setModified("parameterRef"); firePropertyChange(String.valueOf(PARAMETERS_PARAMETERREFID), oldparameterRef, parameterRef); } } COM: <s> parameter name used for name in isparameter </s>
funcom_train/48001509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveData(String pathToFile) { try { if (pathToFile.equals("")) { fileChooser.showOpenDialog(null); pathToFile = fileChooser.getSelectedFile().getPath(); System.out.println("Selected file: " + pathToFile); } FileOutputStream out = new FileOutputStream(pathToFile); for (int i = 0; i < data.length; i++) { out.write(data[i]); } out.close(); } catch (IOException e) { } catch(NullPointerException e) { } } COM: <s> save the audio data in the specified location </s>
funcom_train/4033129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeLibe(GLMaterial[] mtls, String filename) { try { PrintWriter mtlfile = new PrintWriter(new FileWriter(filename)); writeLibe(mtls, mtlfile); mtlfile.close(); } catch (IOException e) { System.out.println("GLMaterialLib.writeLibe(): IOException:" + e); } } COM: <s> write an array of glmaterial objects to a </s>
funcom_train/5510983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToResourceUpdater(ResourceUpdater resourceUpdater) throws BuildException{ boolean setExists; try { setExists = resourceUpdater.hasRepositorySet( getId() ); } catch (Exception e) { throw new BuildException("Unable to query for repository set", e, getLocation() ); } if( setExists ) { checkExistingSetIsEquivalent( resourceUpdater ); } else { createSet( resourceUpdater ); } } COM: <s> add this set to the supplied resource updater </s>
funcom_train/37048546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mouseOver(MouseEvent me) { if (DEBUG) { Debug.output("mouseOver(MAP) at " + me.getX() + ", " + me.getY()); } if (grp != null && grp.receivesMapEvents() && me instanceof MapMouseEvent) { return grp.mouseOver((MapMouseEvent) me); } return false; } COM: <s> notification that the mouse is not over an omgraphic but over </s>
funcom_train/20889648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setNode(Node node) { boolean result = this.node == null; if (result) { this.node = node; this.id = node.getId(); this.sender = new Address(node.getId(), getLayerType()); suspendMsgP = "Layer " + id + "." + getLayerType() + " suspended. Cannot send packet ["; suspendMsgE = "Layer " + id + "." + getLayerType() + " suspended. Cannot send event ["; } return result; } COM: <s> method to update the node for a layer </s>
funcom_train/23272001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void print() { try { fileLocation = new File(fileLocation).getName(); MessageFormat headerFormat = new MessageFormat(language.translate(fileLocation)); MessageFormat footerFormat = new MessageFormat("{0}"); transcript.print(headerFormat, footerFormat); } catch (PrinterException error) { ErrorLog.instance().addEntry(error); } } COM: <s> prints the transcript </s>
funcom_train/276257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(Font font) { super.setFont(normalFont = font); fm = getFontMetrics(font); if (fm != null) { charWidth = fm.charWidth('@'); charHeight = fm.getHeight(); charDescent = fm.getDescent(); } if (buffer.update != null) buffer.update[0] = true; redraw(); } COM: <s> set the font to be used for rendering the characters on screen </s>
funcom_train/43390906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkParameters() throws BuildException { if (_cpxFile == null) { throw new BuildException("A name for the merged CPX file must be supplied in the destfile attribute"); } if (_filesets.isEmpty()) { throw new BuildException("The names of the files to merge must be supplied"); } } COM: <s> simple check for the existence of the required parameters </s>
funcom_train/41452048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isAckReceived(long cSeq) { Boolean ackReceived = acksReceived.get(cSeq); if(logger.isDebugEnabled()) { logger.debug("isAckReceived for CSeq " + cSeq +" : " + ackReceived); } if(ackReceived == null) { // if there is no value for it it means that it is a retransmission return true; } return ackReceived; } COM: <s> check if the ack has been received for the cseq in param </s>
funcom_train/21954420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatusString() { if (mStatus == RENDERING) { return Pooka.getProperty("PrintDisplay.status.rendering", "Rendering"); } else if (mStatus == PAGINATING) { return Pooka.getProperty("PrintDisplay.status.paginating", "Paginating"); } else { return Pooka.getProperty("PrintDisplay.status.printing", "Printing"); } } COM: <s> gets the string representation of the current status </s>
funcom_train/15491118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getInterpolatedPixel(double x, double y) { if (x<0.0) x = 0.0; if (x>=width-1.0) x = width-1.001; if (y<0.0) y = 0.0; if (y>=height-1.0) y = height-1.001; return getInterpolatedPixel(x, y, pixels); } COM: <s> uses bilinear interpolation to find the pixel value at real coordinates x y </s>
funcom_train/36012014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { String key = ResourceBundleKey.ITEM_KEY_STATUS_UNRESOLVED; assertEquals("Testing the key of UNRESOVLED", key, unresolved.getKey()); key = ResourceBundleKey.ITEM_KEY_STATUS_RESOLVED; assertEquals("Testing the key of RESOVLED", key, resolved.getKey()); } COM: <s> tests for to string method </s>
funcom_train/8913182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Properties getTestProperties() { Properties testProperties = new Properties(); testProperties.put(ProjectBrowserProperties.SENSORBASE_HOST_KEY, getSensorBaseHostName()); testProperties.put(ProjectBrowserProperties.DAILYPROJECTDATA_HOST_KEY, getDailyProjectDataHostName()); testProperties.put(ProjectBrowserProperties.TELEMETRY_HOST_KEY, getTelemetryHostName()); return testProperties; } COM: <s> returns a properties instance with the sensor base dpd and telemetry services </s>
funcom_train/16915096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NeuronNode findNeuronNode(final Neuron n) { for (Iterator i = getNeuronNodes().iterator(); i.hasNext();) { NeuronNode node = ((NeuronNode) i.next()); if (n == node.getNeuron()) { return node; } } return null; } COM: <s> find the neuron node corresponding to a given model neuron </s>
funcom_train/45232004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getTxpInfoCliente() { if (txpInfoCliente == null) { txpInfoCliente = new JTextPane(); txpInfoCliente.setText(EnvProperties.getInstance().getProperty( EnvProperties.INFOCLIENTE)); txpInfoCliente.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { EnvProperties.getInstance().setProperty( EnvProperties.INFOCLIENTE,txpInfoCliente.getText()); } }); } return txpInfoCliente; } COM: <s> this method initializes txp info cliente </s>
funcom_train/34282562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireHyperlinkUpdate(HyperlinkEvent e) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==HyperlinkListener.class) { ((HyperlinkListener)listeners[i+1]).hyperlinkUpdate(e); } } } COM: <s> notifies all listeners that have registered interest for notification </s>
funcom_train/45903784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void linkDeferredFleetTargets(Map<Fleet, Integer> deferredTargets) { for (Map.Entry<Fleet, Integer> ft : deferredTargets.entrySet()) { outer: for (Player p : players.values()) { for (Fleet f : p.ownFleets()) { if (f.id == ft.getValue().intValue()) { ft.getKey().targetFleet = f; break outer; } } } } } COM: <s> link the fleets target fleet value with the fleet given by the id </s>
funcom_train/4936624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleProjectLocal() throws Exception { launchEulerGUIWithArgument( "examples/book.n3p" ); new JButtonOperator( mainFrame, "book.n3" ).push(); printSecondWindowTitle(); JFrameOperator n3EditorFrame = new JFrameOperator( new FrameTitleComponentChooser( ".*book\\.n3$|.*book\\.n3 .*", true )); new JComponentOperator( n3EditorFrame, new GetTextComponentChooser( "PhilipKDick" ) ); } COM: <s> test local project with n3 sources </s>
funcom_train/3472771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMenuItemEnabled(String customizationName, boolean isEnabled) { while (menuItems.containsKey(customizationName)) { JComponent menuComponent = menuItems.get(customizationName); if (menuComponent != null) { menuComponent.setEnabled(isEnabled); customizationName = "_" + customizationName; } } } COM: <s> en and disables all menu items with the given customization </s>
funcom_train/17772499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialog(){ int result = JOptionPane.showConfirmDialog( owner, new JScrollPane(this), "", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); if(result == JOptionPane.OK_OPTION){ /* due to the specific way in which filename patterns are saved * it is not necessary to clear the pref node first */ save(); } } COM: <s> shows this filename pattern module in a modal </s>
funcom_train/33513900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyHFile() throws IOException { Path f = new Path(ROOT_DIR, getName()); Writer w = new Writer(this.fs, f); w.close(); Reader r = new Reader(fs, f, null, false); r.loadFileInfo(); assertNull(r.getFirstKey()); assertNull(r.getLastKey()); } COM: <s> test empty hfile </s>
funcom_train/12069300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBt_newgame() { if (bt_newgame == null) { bt_newgame = new JButton(); bt_newgame.setBounds(new Rectangle(368, 475, 115, 20)); bt_newgame.setText("Neu einstellen"); bt_newgame.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { settingsframe.setVisible(true); setVisible(false); } }); } return bt_newgame; } COM: <s> this method initializes bt newgame </s>
funcom_train/46994696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try{ this.stream = new TCPStream(cs,sp); } catch(Exception e) { if ((stream != null) && (stream.queue != null) && (!stream.queue.closed)) Logger.logStream(Logger.WARNING,"Tor.StreamThread.run(): " + e.getMessage() ); this.stream = null; } this.finished = true; } COM: <s> build stream in background and return </s>
funcom_train/14069484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getExecutorList() { if (executorList == null) { executorList = new JList(); executorList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); executorList.setModel(new DefaultListModel()); executorList.setCellRenderer(new MyListRenderer()); } return executorList; } COM: <s> the list of executors commands </s>
funcom_train/27866397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid(Date d) throws InitializationException { if (x509Cert == null) { throw new InitializationException("Not yet initialized."); } boolean ret = false; try { x509Cert.checkValidity(d); ret = true; } catch (CertificateExpiredException e) {} catch (CertificateNotYetValidException e) {} return ret; } COM: <s> checks whether the certificate is valid in the specified time </s>
funcom_train/22909458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeSelectedImages() { List<ImageInfo> images = new ArrayList<ImageInfo>(); for (int index = 0; index < selectedRows.length; index++) { images.add(tableModel.getImageInfo(selectedRows[index])); } TaskExecutor.execute(new RemoveImagesTask(REMOVE_IMAGES, REMOVE_SELECTED_IMAGES, tableModel, images)); } COM: <s> remove selected images from the table </s>
funcom_train/4532331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readNextValue() throws IOException { DataInputBuffer nextValueBytes = in.getValue(); valueIn.reset(nextValueBytes.getData(), nextValueBytes.getPosition(), nextValueBytes.getLength()); value = valDeserializer.deserialize(value); } COM: <s> read the next value </s>
funcom_train/536434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendResponse(MservConnection connection) { List<String> lines; if (connection.isModeHuman()) { if (this.isBroadcasted) { // The human have already gotten the broadcast, // don't send this message also. return; } lines = getHumanResponse(); } else { lines = getComputerResponse(); } for (String line : lines) { connection.sendRawLine(line); } } COM: <s> send this response to a connection </s>
funcom_train/33848347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean balanced(State state) { int consumedCount = state.getObligationSet().getCount(consumed.getId()); int producedCount = state.getObligationSet().getCount(produced.getId()); return (consumedCount + producedCount == 0) && (consumedCount == 1 || producedCount == 1); } COM: <s> determine whether the state has balanced obligation counts for the </s>
funcom_train/17788872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumPrecincts() { int WTLevels = getWTLevels(); int numPrecincts = 0; for (int r = 0; r < WTLevels + 1; r++) { numPrecincts += resolutionLevels.get(r).getNumPrecinctsWide() * resolutionLevels.get(r).getNumPrecinctsHeigh(); } return numPrecincts; } COM: <s> returns the maximum number of precincts in the tile component </s>
funcom_train/26411419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File dir, String name) { File completeFile = new File(dir + File.separator + name); if (completeFile.isDirectory()) return false; for (Iterator i = sourceFileExtensions.iterator(); i.hasNext(); ) { String ext = (String)i.next(); if (name.endsWith("." + ext)) return true; } return false; } COM: <s> test if a file is a source file which implies that it </s>
funcom_train/9278992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void xtestCommitWillReleaseActiveSavepoints() throws SQLException { Connection con = getConnection(); Savepoint savepoint1 = con.setSavepoint(); con.commit(); try { con.rollback(savepoint1); fail("FAIL 42a Rollback after commit."); } catch (SQLException se) { // Expected exception. assertSQLState("3B001", se); } } COM: <s> test42a commit on a connection will release all the savepoints created </s>
funcom_train/27864085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Glyph unstickLastGlyph(){ if (stickedGlyphs.length>0){ Glyph g = stickedGlyphs[stickedGlyphs.length - 1]; g.setSensitivity(true); //make it sensitive again (was automatically disabled when glyph was sticked to mouse) g.stickedTo = null; Glyph[] newStickList = new Glyph[stickedGlyphs.length - 1]; System.arraycopy(stickedGlyphs, 0, newStickList, 0, stickedGlyphs.length - 1); stickedGlyphs = newStickList; return g; } return null; } COM: <s> unstick glyph that was last sticked to mouse </s>
funcom_train/3786376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short getStateValue(String key, short def) { /* getStateValue */ String sVal= getStateValue(key, null); short val; if(sVal==null) return(def); try { Short valP= new Short(sVal); val= valP.shortValue(); } catch(NumberFormatException e) { val= def;} return(val); } /* getStateValue */ COM: <s> get state value get short param and use default if not found </s>
funcom_train/31702958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollBegin(int iX, int iY) { if (!swingPane.isZoomed()) { return; } isScrollOngoing = true; scrollPoint.x = iX; scrollPoint.y = iY; // The scroll rect has been set when zooming so it is already here. gOffscreenBackup = swingPane.gOffscreen; swingPane.gOffscreen = swingPane.getTopZoomImage(); swingPane.repaint(); } COM: <s> begins scrolling at given position </s>
funcom_train/124761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSymbolName(String symbolName) { JSCConstants.checkNameThrowEx(symbolName); this.symbolName = symbolName; if (symbolTable != null) setModelForSymbolName(symbolTable, symbolName); else { SymbolTable sTableFromScope = symbolScope.getSymbolTable(this); if (sTableFromScope != null) setModelForSymbolName(sTableFromScope, symbolName); } } COM: <s> sets the name of the symbol to display </s>
funcom_train/18142811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPropertiesString() { StringBuffer result = new StringBuffer(); int[] known = getKnownPropertyTypes(); for (int i=0;i<known.length;++i) { if (i!=0) result.append(", "); try {result.append(getPropertyAsString(known[i]));} catch (UnknownPropertyException e) {result.append(e.toString());} } return result.toString(); } COM: <s> get a string representation of all this objects properties </s>
funcom_train/32128701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == null) { return false; } if (!(obj instanceof CIMValue)) { return false; } CIMValue cv = (CIMValue) obj; if (dataType == null) { if (cv.dataType != null) { return false; } } else { if (!dataType.equals(cv.dataType)) { return false; } } if (data != null) { return (data.equals(cv.data)); } return true; } COM: <s> returns true if the object obj equals this cimvalue </s>
funcom_train/22678836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPartnerCertState(String alias) { try { if (keymanager.getCertificate(alias) != null) { partnerCert.setText(labels.get("configtool_local_present")); partnerCert.setForeground(DARK_GREEN); } else { partnerCert.setText(labels.get("configtool_local_absent")); partnerCert.setForeground(Color.RED); } } catch (KeystoreFault ex) { showError(labels.format("configtool_keystore_error", ex.toString()), partnerFrame); } } COM: <s> set partner certificate availability </s>
funcom_train/51000131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInventoryItem(InventoryVO vo) throws BusinessLogicException, SQLException { checkAccess(INVENTORY_ITEM,ACCESS_UPDATE); boolean commit = false; InventoryDAO dao = getInventoryDAO(); try { dao.openConnection(); // set dates Timestamp now = new Timestamp(System.currentTimeMillis()); vo.setDtLastUpdate(now); dao.updateInventory(vo); commit = true; } finally { dao.closeConnection(commit); } } COM: <s> updates an inventory item </s>
funcom_train/1661842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKey(int key) { Entry tab[] = table; int hash = key; int index = (hash & 0x7FFFFFFF) % tab.length; for (Entry e = tab[index]; e != null; e = e.next) { if (e.hash == hash) { return true; } } return false; } COM: <s> p tests if the specified object is a key in this hashtable </s>
funcom_train/7511561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemAvailableFilters() { if (jMenuItemAvailableFilters == null) { jMenuItemAvailableFilters = new JMenuItem(); jMenuItemAvailableFilters.setText(Messages.getString("MainFrame.menu.filters")); //$NON-NLS-1$ registerAction(jMenuItemAvailableFilters, Actions.FILTER_LIST); } return jMenuItemAvailableFilters; } COM: <s> this method initializes j menu item available filters </s>
funcom_train/20439902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addComponentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFDeploymentUnit_component_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFDeploymentUnit_component_feature", "_UI_ESMFDeploymentUnit_type"), ESMFPackage.Literals.ESMF_DEPLOYMENT_UNIT__COMPONENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the component feature </s>
funcom_train/44709295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPoolSize( Class c, int num ) { _pool p = (_pool) m_pools.get(c.getName()); if ( p == null ) { p = new _pool(); m_pools.put(c.getName(), p); } p.setPoolSize(c, num); } COM: <s> sets the pool size for components of class code c code </s>
funcom_train/19055025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultProperties() { String UIDString = "0x"; for(int i=0; i<8; i++) { UIDString += String.valueOf((int) (Math.random()*9)); } properties.clear(); properties.setProperty("Name", "Untitled"); properties.setProperty("UID", UIDString); properties.setProperty("Width", "208"); properties.setProperty("Height", "320"); } COM: <s> sets the default settings in a project including a random uid value </s>
funcom_train/20774878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getViterbiPathString(int seqNum){ ArrayList<String> path = getViterbiPath(seqNum); String out = ""; for(int i=0; i<path.size(); i++){ String element = path.get(i); out = out + "," +element; } return out; } COM: <s> returns viterbi path in string format </s>
funcom_train/37406173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatusDescription() { String description = null; UserStatus status = UserStatus.OFFLINE; for (ProtocolUser protocolUser : protocolUsers) if ((status.value() > protocolUser.getStatus().value() || description == null) && protocolUser.getStatusDescription() != null && protocolUser.getStatusDescription().length() > 0) { status = protocolUser.getStatus(); description = protocolUser.getStatusDescription(); } return description; } COM: <s> returns status description for the most active status </s>
funcom_train/18246166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeleteElements_size() throws MutableGenericSequenceException{ sequence.prependElement(0, 'a'); assertEquals(sequence.getSize(), 1); sequence.deleteElements(1,1); assertEquals(sequence.getSize(), 1); } COM: <s> keeping func with short list and charlist delete size does nothing </s>
funcom_train/3415068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean attemptMark(V expectedReference, boolean newMark) { ReferenceBooleanPair<V> current = atomicRef.get(); return expectedReference == current.reference && (newMark == current.bit || atomicRef.compareAndSet (current, new ReferenceBooleanPair<V>(expectedReference, newMark))); } COM: <s> atomically sets the value of the mark to the given update value </s>
funcom_train/23942804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(XElement root) throws Exception { attributesSet = new HashMap<String, SelectedAttributes>(); parse(attributesSet, root); if (!attributesSet.containsKey("default")) { attributesSet.put("default", createDefault()); } } COM: <s> loads selected attributes form an xml element </s>
funcom_train/38251136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addNewRepeatTimeTask(String taskName,String user_id,int access_id,String description, String parameter_info,String className, RepeatTimeMask repeatTimeMask) throws OmnigeneException,RemoteException { return daoInstance.addNewRepeatTimeTask( taskName, user_id,access_id, description, parameter_info, className, repeatTimeMask) ; } COM: <s> to create a new repeat time task </s>
funcom_train/21619861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckPassword() throws Exception { System.out.println("checkPassword"); String pass = "changeme"; user.setPassword(pass); String passHash = user.getPassword(); System.out.println("PassHash: " + passHash); assertEquals(true, user.checkPassword(pass)); } COM: <s> test of check password method of class edu </s>
funcom_train/14093243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateStartsString3() { String leftside = "ABC"; String rightside = "BC"; int operation = Operator.Operation.STARTSWITH; boolean ignoreCase = false; boolean expectedReturn = false; boolean actualReturn = Operator.evaluate(leftside, rightside, operation, ignoreCase); assertEquals("return value", expectedReturn, actualReturn); } COM: <s> test startswith false </s>
funcom_train/45237091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JRadioButton getJRadioButtonParcimonia() { if (jRadioButtonParcimonia == null) { jRadioButtonParcimonia = new JRadioButton(); jRadioButtonParcimonia.setText("Parcimônia"); jRadioButtonParcimonia.setSize(new Dimension(111, 24)); jRadioButtonParcimonia.setLocation(new Point(358, 265)); jRadioButtonParcimonia.setBackground(new Color(173, 200, 226)); } return jRadioButtonParcimonia; } COM: <s> this method initializes j radio button parcimonia </s>
funcom_train/34784624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSet() { theList.add("Hello"); theList.set(0, "Bye"); assertEquals(1, theList.size()); assertEquals("Bye", theList.get(0)); assertEquals(1, listener.nItemsAdded); assertEquals(0, listener.nItemsRemoved); assertEquals(1, listener.nItemsChanged); } COM: <s> test of set method of class com </s>
funcom_train/20244017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdOkListInvest() { if (cmdOkListInvest == null) {//GEN-END:|308-getter|0|308-preInit // write pre-init user code here cmdOkListInvest = new Command("Ok", Command.OK, 0);//GEN-LINE:|308-getter|1|308-postInit // write post-init user code here }//GEN-BEGIN:|308-getter|2| return cmdOkListInvest; } COM: <s> returns an initiliazed instance of cmd ok list invest component </s>
funcom_train/50299711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPan(int key, int pan) { PresetsPanelData data=(PresetsPanelData)presets.get(key); if (key<presetCount) { if (pan<(int)settings.getInputsAnalogPanpositionValuelow()) pan=(int)settings.getInputsAnalogPanpositionValuelow(); if (pan>(int)settings.getInputsAnalogPanpositionValuehigh()) pan=(int)settings.getInputsAnalogPanpositionValuehigh(); data.pan=pan; } } COM: <s> changes the preset pan position </s>
funcom_train/44559740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize(byte[] xml) throws InvalidModuleXmlException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); try { DocumentBuilder db = dbf.newDocumentBuilder(); ByteArrayInputStream bis = new ByteArrayInputStream(xml); document = db.parse(bis); load(); } catch(Exception e) { throw new InvalidModuleXmlException(getName(), e); } } COM: <s> parses the provided xml byte content </s>