__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21800077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enterContainer() { if ( element == null ) { throw new IllegalStateException( "the current element is not available" ); } if ( element.isTouched() ) { throw new IllegalStateException( "the current element data was already processed" ); } element.touch(); containers.addFirst( container ); container = element; element = null; } COM: <s> instructs the reader to parse the current element data as sub elements </s>
funcom_train/44161594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getDataSources() { Collection col = null; ArrayList dataSources = null; try { col = prepareCollection("datasources"); XMLResource document = (XMLResource)col.getResource("datasources"); Document doc = makeDocument(document); dataSources = this.queryMethods.getDataSources(doc); if (col != null) { col.close(); } } catch (Exception e) { e.printStackTrace(); } return dataSources; } COM: <s> get data sources gets list with datasources </s>
funcom_train/16678648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Sensor getSensor(Sensorgroup group) { if (group != null) { List<Sensor> sensors = group.getSensors( ); if (!sensors.isEmpty( )) { if (sensors.size( ) > 1) { logClass.info(robotName, I18n.getString("AbstractSensorPlugin.onlyone.sensor", this.getName( ), sensors.size( )) //$NON-NLS-1$ + Constants.LINE_SEPARATOR); } return sensors.get(0); } } return null; } COM: <s> gets the sensor from this sensor group </s>
funcom_train/17849296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDefaultSettings() { mAddresses = new ArrayList<WebAddress>(); final WebAddress test = new WebAddress("Test", "http://akas.imdb.com/Tsearch?title={urlencode(title, \"UTF-8\")}", null, true, false); mAddresses.addAll(Arrays.asList(DEFAULT_ADRESSES)); mAddresses.add(test); } COM: <s> create the default settings </s>
funcom_train/3772141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { if (useChunking) { // Write the final chunk. stream.write(zero, 0, zero.length); stream.write(crlf, 0, crlf.length); stream.write(endChunk, 0, endChunk.length); } super.close(); } COM: <s> close this output stream causing any buffered data to be flushed and </s>
funcom_train/38087354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocumentSet getDocumentSet() { if(cachedDocuments != null) return cachedDocuments; cachedDocuments = new DocumentSet(partCount); sort(); for (int i = 0; i < partCount; i++) { cachedDocuments.add(parts[i].getDocument(), false); } isSorted = true; return cachedDocuments; } COM: <s> the method code get document set code </s>
funcom_train/17773466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calc(int layer, int mpegVersion, int sampleRate) { float tpf = SAMPLES_PER_FRAME[layer] / sampleRate; if (mpegVersion != MPEGAudioFrameHeader.MPEG_V_1){ tpf /= 2; } playingTime = Math.round(tpf * getNumFrames()); avgBitRate = Math.round(getNumBytes() * 8/(tpf * getNumFrames() * 1000)); } COM: <s> calculates the playing time and the average bitrate </s>
funcom_train/45017806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float yData2Screen(float y) { float[] frame = getFrame(); float plotY = parent.getCanvas().getSize().y; if (twoDPlotScale != null) { return plotY - PlotColors.loggify((y - frame[1]) / frame[3], twoDPlotScale.getLogY()) * plotY; } else { return plotY - ((y - frame[1]) / frame[3]) * plotY; } } COM: <s> converts y data coordinates to y screen coordinates </s>
funcom_train/13850739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object run() { try { Long value = Long.getLong(theProp); if (value != null) { return value; } } catch (SecurityException e) { if (logger.isLoggable(Levels.HANDLED)) { LogUtil.logThrow(logger, Levels.HANDLED, GetLongAction.class, "run", "security exception reading \"{0}\", returning {1}", new Object[] { theProp, defaultValue() }, e); } } return defaultValue(); } COM: <s> determines the code long code value of the system property </s>
funcom_train/22279201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void describeClassInfo(ClassInfo info) { info.addClass("netscape.application.HTMLParsingRules", 1); info.addField(RULES_KEY, OBJECT_TYPE); info.addField(DEFAULT_CONTAINER_CLASS_NAME_KEY, OBJECT_TYPE); info.addField(DEFAULT_MARKER_CLASS_NAME_KEY, OBJECT_TYPE); } COM: <s> describes the htmlparsing rules classs information </s>
funcom_train/45458217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object otherScheme) { if (!(otherScheme instanceof SyntaxHighlightingColorScheme) || otherScheme==null) return false; SyntaxScheme[] otherSchemes = ((SyntaxHighlightingColorScheme)otherScheme).syntaxSchemes; int length = syntaxSchemes.length; for (int i=0; i<length; i++) { if (syntaxSchemes[i]==null) { if (otherSchemes[i]!=null) return false; } else if (!syntaxSchemes[i].equals(otherSchemes[i])) return false; } return true; } COM: <s> tests whether this color scheme is the same as another color scheme </s>
funcom_train/50186125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String makeAbsolute(String sysid) { URL local = null; sysid = fixSlashes(sysid); try { local = new URL(base, sysid); } catch (MalformedURLException e) { Debug.message(1, "Malformed URL on system identifier", sysid); } if (local != null) { return local.toString(); } else { return sysid; } } COM: <s> p construct an absolute uri from a relative one using the current </s>
funcom_train/32820485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExecutorBuilder linkFrom(IOAutomaton<IOTransitionBuilder>... b) { Vertex to = getVertex(currentMachine); for (IOAutomaton<IOTransitionBuilder> automaton : b) { AsynchIOAutomatonSMAdapter sm = machineFor(builtMachines, automaton); Vertex from = getVertex(sm); graph.addEdge(from, to); } return this; } COM: <s> symetric operation to </s>
funcom_train/41077210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWhenNoDataType(java.lang.String whenNoDataType) { if ((this.whenNoDataType == null) ? whenNoDataType == null : this.whenNoDataType.equals(whenNoDataType)) return; this.whenNoDataType = whenNoDataType; incrementReportChanges(); } COM: <s> setter for property when no data type </s>
funcom_train/10282028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { Object src = e.getSource(); if (src instanceof JTabbedPane) { JTabbedPane tabPane = (JTabbedPane) src; int index = tabPane.getSelectedIndex(); String lTab = tabPane.getTitleAt(index); if (lTab.equals(ProductionView.TAB_XML)) { loadXMLEditor(); } } } COM: <s> be notified of changes </s>
funcom_train/50803223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector all() { try { System.out.println("XMLRPC: planet.all()"); Vector v = new Vector(); ToXmlRpcValueVisitor convertor = new ToXmlRpcValueVisitor(true); for (Iterator it = data.getAllPlanets().iterator(); it.hasNext();) { ((Planet)it.next()).visit(convertor); v.add(convertor.popResult()); } return v; } catch (RuntimeException e) { e.printStackTrace(); throw e; } } COM: <s> retrieve all planet informations </s>
funcom_train/45623520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGenerateDocumentationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VbcType_generateDocumentation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VbcType_generateDocumentation_feature", "_UI_VbcType_type"), MSBPackage.eINSTANCE.getVbcType_GenerateDocumentation(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the generate documentation feature </s>
funcom_train/37077732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void orientEvidencePanels() { if (orientation == Orientations.HORIZONTAL) { setHorizontalLayout(); } else if (orientation == Orientations.VERTICAL) { setVerticalLayout(); } // change name of menu item getAction().putValue(Action.NAME,getOrientationMenuString()); } COM: <s> for orientation change or initialization redo layout </s>
funcom_train/3091604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminateCurrentYear() throws TarlException { int i; int numCreationAuthors; authorManager.terminateCurrentYear(); publicationManager.terminateCurrentYear(); offsetYear++; if ((offsetYear % (executerParameters.getNumCreationYears())) == 0) { numCreationAuthors = executerParameters.getNumCreationAuthors(); for (i = 0; i < numCreationAuthors; i++) authorManager.addAuthor(topicManager.getRandomTopic()); } } COM: <s> terminates the current year for the system </s>
funcom_train/29419574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void skipComments(final LineNumberReader in) throws IOException { int c; do { in.mark(4); c = in.read(); if (c == 'c') { in.readLine(); } else { in.reset(); } } while (c == 'c'); } COM: <s> skip comments at the beginning of the input stream </s>
funcom_train/16476118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireProjectOpenedEvent(BenchmarkProject e) { // System.out.println("Fire ProjectOpenedEvent: " + e.toString()); // DEBUG final BenchmarkProjectEvent event = new BenchmarkProjectEvent(e); fireEvent( new EventHandler<BenchmarkProjectEvent>(event) { @Override protected void dispatch(ProjectEventListener listener, BenchmarkProjectEvent event) { listener.projectOpened(event); } }); } COM: <s> fire an event to note that the given project was opened or created </s>
funcom_train/51604812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJListIndex() { if (jListIndex == null) { Vector<Statistic> statistics=new Vector<Statistic>(); statistics.add(new Statistic_EnvironmentMedium()); jListIndex = new JList(statistics); jListIndex .addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { statisticShow(); } }); } return jListIndex; } COM: <s> this method initializes j list index </s>
funcom_train/10914699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTo(OutputStream out, int offset, int length) throws IOException { if (offset < 0) { throw new IllegalArgumentException(); } if (length < 0) { throw new IllegalArgumentException(); } if (offset + length > this.length) { throw new IllegalArgumentException(); } out.write(bytes, this.offset + offset, length); } COM: <s> write code length code bytes from code offset code to the output stream </s>
funcom_train/26345197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writePrioList() { try { if (!new File(settings).isDirectory()) { new File(settings).mkdirs(); } BufferedWriter writer = new BufferedWriter(new FileWriter( prioListFile)); for (int i = 0; i < prioList.size(); i++) { writer.write(prioList.elementAt(i)); writer.newLine(); } writer.close(); } catch (IOException e) { } } COM: <s> this method writes the skiplist entries to a file </s>
funcom_train/45505654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rasterize() { try { ArrayList<T> alertDoors = new ArrayList<>(); // Don't use for(T e: this) here - The edge replacements will screw up our iterator for( T e : getEdges() ) { int oldLength = e.length(); int newLength = 0; newLength = rasterEdge( e, false ); if( oldLength - 199 > newLength ) alertDoors.add( e ); } recomputeBounds( ); } finally { } } COM: <s> this method rasters a plan polygon </s>
funcom_train/10906859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupFilterList() { if (!getFilterList().isInitialized()) { getFilterList().addDefaultFilters( getDocumentSafely().getFilterMap(), getDefaultFilterName()); } prepareImplicitFilters(); getDocument().applyEncryption(this); } COM: <s> sets up the default filters for this stream if they havent been set </s>
funcom_train/24434758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteFile(Long fileId) { boolean operationResult = false; try { Connection c = ConnectionSource.getConnection(); String sql = "DELETE FROM shared_files WHERE id=:id"; NamedParameterStatement s = new NamedParameterStatement(c, sql); s.setLong("id", fileId); int numAffected = s.executeUpdate(); if (numAffected == 1) operationResult = true; s.close(); c.close(); } catch (SQLException ex) { logger.error(ex.getMessage(), ex); } return operationResult; } COM: <s> deletes a file indentified by its id from database </s>
funcom_train/17052136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNeighbor(short id, byte[] mac, boolean parent) { if (containsKey(id)) { return; } byte[] new_mac = Arrays.copyOf(mac, mac.length); if (parent) { markAsParent(id, new_mac); } put(id, new_mac); } COM: <s> adds a neighbor to the set of neighbors </s>
funcom_train/16675825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final Timestamp t) { int compare = super.compareTo(t); if (compare == 0) { int n1 = getNanos(); int n2 = t.getNanos(); compare = (n1 == n2 ? 0 : (n1 < n2 ? -1 : 1)); } return compare; } COM: <s> compares this timestamp with the argument timestamp </s>
funcom_train/48257153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rightRotate( Node x ) { Node y = x.left; // handle y's right child x.left = y.right; if( y.right != nil ) y.right.parent = x; // move up y y.parent = x.parent; if( x.parent == null ) root = y; else { if( x == x.parent.left ) x.parent.left = y; else x.parent.right = y; } // make x right child of y y.right = x; x.parent = y; } COM: <s> performs a right rotation on node x </s>
funcom_train/50082347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testGetInchiFromChlorineAtom() throws Exception { IAtomContainer ac = new AtomContainer(); ac.addAtom(new Atom("Cl")); gen.setHydrogensNotAdded(true); Assert.assertEquals(gen.generateInchi(ac).getInChI(), "InChI=1S/Cl"); gen.setHydrogensNotAdded(false); } COM: <s> tests element name is correctly passed to in ch i </s>
funcom_train/19267767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConfiguredEntry(Entry entry) { if (!uniqueEntriesInTestSet.contains(entry.getKey())) { uniqueEntriesInTestSet.add(entry.getKey()); } else { log(entry.getKey() + " already defined as entry ", Project.MSG_WARN); } entries.add(entry); } COM: <s> add a entry to the testset </s>
funcom_train/23678349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedElement_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"), MetadataPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/49608795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RollState getRollState(String username,EntityManager em,String code) throws Throwable { try { Query query = em.createQuery( "select rs from RollState rs where rs.deleted = ?1 and rs.code = ?2" ); List<Object> params = new ArrayList<Object>(); params.add(Consts.FLAG_N); params.add(code); return (RollState)JPAMethods.getSingleResult(username, query, params); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> retrieve a specific roll state starting from its code </s>
funcom_train/15399643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { super.paintComponent(g); _nameIcon.paintIcon(this,g,getWidth()-_nameIcon.getIconWidth()-WHITESPACE,(getHeight()-_nameIcon.getIconHeight())/2); if (hasFocus()&&isFocusPainted()) { g.setColor(UIManager.getColor("RadioButton.focus")); g.drawRect(0,0,getSize().width-1,getSize().height-1); } } COM: <s> method paint component </s>
funcom_train/350159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point converttoxyMeters(Point3d translatePoint, double fieldofView, double translateHeight, double ratio){ double x; double y; Point p=new Point(); x=-(translatePoint.getX()*Math.tan( fieldofView/2.0)*translateHeight);//*(50/9.45); y=-(translatePoint.getY()*Math.tan( fieldofView/2.0)*translateHeight)*ratio;//*(50/9.35); p.setLocation(x, y); return p; } COM: <s> converts virtual world points to real meters </s>
funcom_train/44733678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawSquareFill(Vector2i pos, Vector2i sz) { float[] color = new float[4]; baseColor.set(color); float[] baseColorValues = new float[3]; baseColor.get(baseColorValues); glColor4fv(baseColorValues, 0); displayTex1(pos, sz); } COM: <s> fill the defined square with the default texture and default base color </s>
funcom_train/12120236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoM7(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end getVediAutorita().show(); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto m7 autorita jbutton </s>
funcom_train/14456009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean issetVIERDE() { return (isset1B1() ? 1 : 0) + (isset1B2() ? 1 : 0) + (isset1B3() ? 1 : 0) + (isset1B4() ? 1 : 0) + (isset1B5() ? 1 : 0) >= 4; // 4 or more trees have to be visited } COM: <s> checks whether attribute vierde is set </s>
funcom_train/45254775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Perspective findPerspective(IPerspectiveDescriptor desc) { Iterator itr = perspList.iterator(); while (itr.hasNext()) { Perspective mgr = (Perspective) itr.next(); if (desc.getId().equals(mgr.getDesc().getId())) { return mgr; } } return null; } COM: <s> returns the first view manager with given id </s>
funcom_train/37451072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isOnHold( Experiment experiment ) { boolean onHold = false; for ( Iterator iterator = experiment.getAnnotations().iterator(); iterator.hasNext() && !onHold; ) { Annotation annotation = (Annotation) iterator.next(); if ( onHoldCvTopic.equals( annotation.getCvTopic() ) ) { onHold = true; } } return onHold; } COM: <s> check if an experiment as been annotated as on hold </s>
funcom_train/32723539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Method getReadMethod(String name, boolean caseInsensitiveSearch) { if (name.length() > 3) { if (name.startsWith("get")) name = name.substring(3); else if (name.startsWith("is")) { name = name.substring(2); } } PropertyDescriptor p = getPropertyDescriptor(name,caseInsensitiveSearch); return (p == null ? null:p.getReadMethod()); } COM: <s> returns get method name </s>
funcom_train/43326078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DMatrix toDMatrix() { int r = n(); int c = minDimension; if ((r <= 0) || (c <= 0)) return null; DMatrix rv = new DMatrix(c,r); for (int i=0; i<r; i++) { DVector pt = p(i); for (int j=0; j<c; j++) { rv.data[j][i] = pt.data[j]; } } return rv; } COM: <s> return the dvector set expressed as a matrix with one row </s>
funcom_train/31105702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fire (IReteSession session, Collection results ) { IBindingList bindingList = session.getBindingList(this); for ( IBindingIterator bindings = bindingList.getBindingsAndClear(); bindings.hasNext(); ) { IBinding binding = bindings.nextBinding(); mRule.fire(binding, results); } } COM: <s> fires the associated rule for all the bindings </s>
funcom_train/14598286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PortSecurityPolicy createPortSecurityPolicy(Properties conf) { String policyList = conf.getProperty( getSecurePortRangesPropertyName()); if (policyList != null) { return new PortRangeSecurityPolicy(policyList); } return new PortSecurityPolicy() { public boolean isSecure(InetAddress address, int port) { return false; } }; } COM: <s> create a code port security policy code based on </s>
funcom_train/19814013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createTable(String name, List<String> columns) { String[] columnNames = new String[columns.size()]; int i = 0; for (Iterator<String> names = columns.iterator(); names.hasNext();) columnNames[i++] = names.next(); Table newTable = TableFactory.create(name, columnNames); tables.put(name, newTable); } COM: <s> create a new table </s>
funcom_train/37508582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void browseForIndexPattern() { JFileChooser fc = new JFileChooser(); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setFileFilter(new HtmlFileFilter()); if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { getTextIndexPattern().setText( fc.getSelectedFile().getAbsolutePath()); } } COM: <s> lets the user select the index pattern file </s>
funcom_train/16498185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getAnnotationElement(int offset) { Element anno = getDefaultRootElement(); while (!anno.isLeaf() && !anno.getAttributes().getAttribute(StyleConstants.NameAttribute) .equals(AnnotationTags.ANNOTATION)) { anno = anno.getElement(anno.getElementIndex(offset)); } if (anno.isLeaf()) return null; else return anno; } COM: <s> returns the annotation element spanning the given element offset </s>
funcom_train/41302757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(double x, double y) { double mx = getX(); double my = getY(); double w = getWidth(); double h = getHeight(); return w > 0 && h > 0 && x >= mx && x < mx + w && y >= my && y < my + h; } COM: <s> test if the given point is contained in the rectangle </s>
funcom_train/47624504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Text createSingleTextField(Composite parent, String value) { // Create the text field final Text text = new Text(parent, SWT.SINGLE | SWT.BORDER); // Layout the text field GridData grid = new GridData(); grid.grabExcessHorizontalSpace = true; grid.horizontalAlignment = GridData.FILL; grid.widthHint = 200; text.setLayoutData(grid); // Set the initial text text.setText(value); // Return the text field return text; } COM: <s> create a single text entry field </s>
funcom_train/40544300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(JavaScriptObject object) { if (object != null) { try { Element elem = (com.google.gwt.user.client.Element)Element.as(object); super.setPopupPosition(elem.getAbsoluteLeft(), elem.getAbsoluteBottom()); } catch (Exception e) { } } super.show(); } COM: <s> show the modal dialog containing the color picker beside the especified element </s>
funcom_train/7279740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillSlots() throws Exception { int maxLeaves = UltrapeerSettings.MAX_LEAVES.getValue(); RoutedConnection[] mc = new RoutedConnection[maxLeaves]; for(int i = 0; i < mc.length; i++) { mc[i] = new RoutedConnectionStub(); } PrivilegedAccessor.setValue(connectionManager, "_initializedClientConnections", Arrays.asList(mc)); } COM: <s> fills all available slots of connection manager so that </s>
funcom_train/3792708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWanIp() { try { return ((WanIpProvider)(_myProviders.get(_myProviders.lastKey()))).getWanIp(); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); return null; } } COM: <s> this method is best delivery sevice </s>
funcom_train/18570053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanSetAndGetTestCase() throws Exception { mockCallManager.setTestCase(this); mockCallManager.getTestCase(); controlCallManager.setReturnValue(this); controlCallManager.replay(); vm.setTestCase(this); TestCase testCase = vm.getTestCase(); assertEquals(this, testCase); } COM: <s> test the test case getters and setters </s>
funcom_train/5867871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object resolveVariable(String name) { if ("springContext".equals(name)) { return getApplicationContext(); } // Object o = _vars.get(name); // if (o == null) { try { return getApplicationContext().getBean(name); } catch (NoSuchBeanDefinitionException ex) { return null; } // if (o != null) // _vars.put(name, o); // } // return o; } COM: <s> get the spring bean by the specified name </s>
funcom_train/10805664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBulkDelete() { EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); int c = count(PObject.class); int d = em.createQuery("DELETE FROM PObject p").executeUpdate(); assertEquals(c, d); em.getTransaction().commit(); c = count(PObject.class); assertEquals(0, c); } COM: <s> delete in bulk by query </s>
funcom_train/32649360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createWidthTextThemeTextField() { RowData rowData7 = new org.eclipse.swt.layout.RowData(); rowData7.width = 30; widthTextThemeTextField = new ThemeTextField(globalComposite, SWT.NONE); widthTextThemeTextField.setEmbeddedInBindableGroup(false); widthTextThemeTextField.setIntValued(true); widthTextThemeTextField.setBindingSubPath("spacingText"); widthTextThemeTextField.setLayoutData(rowData7); } COM: <s> this method initializes width text theme text field </s>
funcom_train/44472109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseCommand(String cmd) { String desc = cmds.get(cmd); try { String query = "SELECT cmd_output FROM static_cmds WHERE cmd_name='" + cmd + "'"; //System.out.println("Upit:"+query); if (stmt != null) { ResultSet rs = stmt.executeQuery(query); if (rs.first() == false) return ""; //nije komanda uopste nadjena desc = rs.getString("cmd_output"); return desc; } else { return (desc == null ? "Command Not Found" : desc); } } catch (SQLException e) { displaySQLErrors(e); return ""; } } COM: <s> tries to get command output from database </s>
funcom_train/28545908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadRabbitParser() { parserLoader.setName("RabbitParserLoader"); if (!parserLoader.isDaemon()) parserLoader.setDaemon(true); synchronized (parserLoader) { // only load the parser once, so if the loading thread is still // alive it is already loading the parser. If the parserLoader has // terminated, the parser has already been loaded. if (!parserLoader.isAlive() && !Thread.State.TERMINATED.equals(parserLoader.getState())) { parserLoader.start(); } } } COM: <s> load the rabbit parser in a separate thread </s>
funcom_train/19065154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSupportedMechanisms(String authCapa) { List list = new LinkedList(); Matcher matcher = authTokenizerPattern.matcher( authCapa ); // First token is AUTH matcher.find(); // Search for a supported Authentication by both // client and server while( matcher.find() ) { if( isSupported( matcher.group(1) )) { list.add( matcher.group(1) ); } } return list; } COM: <s> gets a list of the supported mechanisms from server and client </s>
funcom_train/31688378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WebPageEngine getWebPageEngine(String sessionId) throws CacheException { sessionId = Session.removeSessionIdPrefix(sessionId); final WebPageEngine cached_object = (WebPageEngine) this.getObject( sessionId); if (cached_object == null) { throw new RuntimeException( "Cached WebPageEngine was returned as null."); } return cached_object; } COM: <s> return code web page engine code associated with code object id code </s>
funcom_train/33819338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { boolean result = false; if (o instanceof NaturalDomain) { NaturalDomain other = (NaturalDomain) o; if(space.equals(other.space)){ if(isContinuous() && other.isContinuous()){ result = (min == other.min && max == other.max); } else { if(map().equals(other.map())) { result = true; } } } } return result; } COM: <s> tests for the two code natural domain code objects are equal </s>
funcom_train/1041240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(Object obj) throws org.apache.commons.pipeline.StageException { try { Object result = method.invoke(obj, arguments); this.emit(result); } catch (IllegalAccessException e) { throw new StageException(this, e); } catch (InvocationTargetException e) { throw new StageException(this, e); } } COM: <s> calls the specified method on the object being processed and exqueues the result </s>
funcom_train/21021559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void preventFolderInconsitences(TreeItem item) { GWTFolder folderItem = (GWTFolder) item.getUserObject(); // Case that must remove all items node if (item.getChildCount() > 0 && !folderItem.getHasChilds()) { while (item.getChildCount() > 0) { item.getChild(0).remove(); } } if (item.getChildCount()< 1 && !folderItem.getHasChilds()) { folderItem.setHasChilds(false); } } COM: <s> prevents folder incosistences between server multi user deletes folder and tree </s>
funcom_train/35837438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkProgress(boolean bCancelled, String sType) { if (!bCancelled && isCancelled()) { int result = JOptionPane.showConfirmDialog(this, "Do you want to Cancel this "+sType+"?", "Cancel "+sType, JOptionPane.YES_NO_OPTION); if (result == JOptionPane.YES_OPTION) { setVisible(false); return true; } else { setCancelled(false); return false; } } return false; } COM: <s> checks the state of the progress dialog </s>
funcom_train/8135571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleDisconnectedState(DetailedState newState, boolean disableInterface) { if (mDisconnectPending) { cancelDisconnect(); } mDisconnectExpected = false; resetConnections(disableInterface); setDetailedState(newState); sendNetworkStateChangeBroadcast(mLastBssid); mLastBssid = null; mLastSsid = null; mDisconnectPending = false; } COM: <s> reset our ip state and send out broadcasts following a disconnect </s>
funcom_train/20309012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsValue( Object value ) { for (Iterator values = m_table.values().iterator(); values.hasNext(); ) { Object x = values.next(); if (x.equals( value )) { return true; } else if (x instanceof List && ((List) x).contains( value )) { return true; } } return false; } COM: <s> answer true if the map contains the given object as a value </s>
funcom_train/26216895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTempVertexVector(){ tempVertexVector.trimToSize(); tempVertexList = new JDVertex3DTex[tempVertexVector.size()]; for(int i=0; i< tempVertexVector.size(); i++) tempVertexList[i] = new JDVertex3DTex((JDVertex3D)tempVertexVector.elementAt(i)); tempVertexVector = null; calculateTexCoordinates(); } // END addTempVertexVector COM: <s> this method inserts the temporarily stored vertices into the array </s>
funcom_train/4958588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scanBreadth(TreeNode node) { if (node.getChildren().size() == 0) // if it's a leaf { // it beongs to the next column iBreadth++; node.setLeafColumn(iBreadth); node.setLocation(0, (int)(node.getLocation().getY())); } else { // traverse... for (TreeNode child : node.getChildren()) { scanBreadth(child); } } } COM: <s> recursive function for traversing </s>
funcom_train/22236041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInitialVertexAttrIndex(int vertexAttrNum) { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_COUNT_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray91")); } } return ((GeometryArrayRetained)this.retained).getInitialVertexAttrIndex( vertexAttrNum); } COM: <s> gets the initial vertex attribute index for the specified </s>
funcom_train/50894854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void dispatch(Handler handler, Event event) { try { handler.handle(event); } catch (java.rmi.MarshalException e) { if (e.detail instanceof java.io.NotSerializableException && event.object != null) { try { event.object = defaultObjectFormat.format(event); handler.handle(event); } catch (Exception ee) { Log.internal("bad connection to handler; removing: " + ee.getMessage()); removeHandler(handler); } } } catch (Exception e) { Log.internal(e); Log.internal("bad connection to handler; removing..."); removeHandler(handler); } } COM: <s> this function calls the handler </s>
funcom_train/5734985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(String path) throws FileSystemException{ try{ ftpClient.delete(path); } catch (FTPException ftpe){ checkFileSystemConnectionStatus(); throw new FileSystemException(X_GENERAL_ERROR,ftpe); } catch (IOException ioe){ checkFileSystemConnectionStatus(); throw new FileSystemException(X_IO_ERROR,ioe); } } COM: <s> removes a file from the file system </s>
funcom_train/5522046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCanonical() { // now ready to begin parsing and replacing excess whitespace processHeaderAndDOCTYPE(); /* Recursively process comments, CDATA sections and elements. Start * indentation at index 0. */ processNodes(EMPTY_STRING); boolean ret = getSceneString().equals(getFinalC14nScene()); // diagnostic provided by invoking method // if (ret) { // log.info(C14N_COMPLIANT); // } else { // log.info(C14N_NON_COMPLIANT); // } return ret; } COM: <s> enabler method to check for c14n compliance and must be called </s>
funcom_train/49627918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element deserializeToJDOM() { Element entry = new Element("entry").setAttribute("name", this.elementName).setAttribute("text", this.txt); if (this.quality != null) { entry.setAttribute("quality", this.quality.toPlainString()); } else { entry.setAttribute("quality", "0"); } return entry; } COM: <s> returns a jdom representation of the outline element </s>
funcom_train/17434071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResIterator getResultsIterator() { QueryTemplate template = new QueryTemplate(dataSource); template.setAscending(ascending); template.setLimit(limit); template.setOffset(offset); template.setOrderBy(orderBy); template.setPrefixes(prefixes); template.setResultVariableName(resultVariableName); return template.queryForIterator(selectExpression,componentManager.getServletRequest().getParameterMap() ); } COM: <s> return an iterator over the resources selected by the query </s>
funcom_train/24472260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { int index = this.list.getSelectedIndex(); MyleadWorkflowMetadata template = this.workflowTemplates.get(index); QName resouceID = new QName(template.getId(), XRegistryUtils.getFormattedWorkflowId(template.getName())); hide(); // Non blocking call this.loader.load(resouceID, false); } COM: <s> loads the selected workflow </s>
funcom_train/16883114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validate() throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA); factory.setAttribute(JAXP_SCHEMA_SOURCE, new File(ClassLoader .getSystemResource(MY_SCHEMA).getFile())); DocumentBuilder builder = factory.newDocumentBuilder(); builder.setErrorHandler(errorHandler); document = builder.parse(file); if (getErrorMessages().size() != 0) { throw new SAXException(); } } COM: <s> validates file according to xml schema </s>
funcom_train/10928933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatDate(long millis) { if (dateFormater == null) { dateFormater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); dateFormater.setTimeZone(TimeZone.getTimeZone("UTC")); } return dateFormater.format(millis); } COM: <s> formats a date time </s>
funcom_train/27676049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject( final ObjectOutputStream stream ) throws IOException { // Write the default stuff stream.defaultWriteObject(); // Save the number of elements in the array stream.writeInt( this.size() ); // Save the elements in the array for ( int i = 0; i < this.nextFree; i++ ) { stream.writeObject( this.store[ i ] ); } } COM: <s> writes this object to the specified </s>
funcom_train/28473764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLocus5UtrPanel() { if (locus5UtrPanel == null) { locus5UtrLabel = new JLabel(); locus5UtrLabel.setText("5' UTR Score (0-1):"); locus5UtrLabel.setPreferredSize(new Dimension(180, 16)); locus5UtrPanel = new JPanel(); locus5UtrPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); locus5UtrPanel.add(locus5UtrLabel, null); locus5UtrPanel.add(getLocus5UtrTextField(), null); } return locus5UtrPanel; } COM: <s> this method initializes locus5 utr panel </s>
funcom_train/26322910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhysicalPageDefinition findPhysicalPageDefinition(String name) { PhysicalPageDefinition returnValue = null; for (int i = 0; i < this.getPhysicalPageDefinitions().size(); i++) { returnValue = (PhysicalPageDefinition) this.getPhysicalPageDefinitions().get(i); if (returnValue.getName().equals(name)) { return returnValue; } } return null; } COM: <s> find the physical page definition belonging to this name </s>
funcom_train/1050616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void chooseDir(ActionEvent e) { chooseAction.actionPerformed(e); String chosenFolder = chooseAction.getChosenFolder(); if ((chosenFolder != null) &! chosenFolder.equals(UserConfig.libraryFolder)) { UserConfig.setLibraryFolder(chooseAction.getChosenFolder()); Config.fireConfigChangedEvent(PreferenceKeys.LIBRARY_FOLDER); changed = true; ok.setEnabled(true); this.setDefaultCloseOperation(HIDE_ON_CLOSE); } } COM: <s> is called when the choose button was pressed </s>
funcom_train/33280715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean doClickStateUpdate() throws IOException { final DomNode parent = getParentNode(); // needed for instance to perform link doClickActoin when a nested element is clicked // it should probably be changed to do this at the event level but currently // this wouldn't work with JS disabled as events are propagated in the host object tree. if (parent instanceof HtmlElement) { return ((HtmlElement) parent).doClickStateUpdate(); } return false; } COM: <s> this method implements the control state update part of the click action </s>
funcom_train/21953084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showEditorWindow(String title, String property, String template) { JDialog jf = (JDialog)getEditorFactory().createEditorWindow(title, property, template); jf.pack(); Component currentFocusedComponent = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); applyNewWindowLocation(jf); jf.setVisible(true); } COM: <s> shows an editor window with the given title which allows the user </s>
funcom_train/29919565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeAction(String action, Object object) { if (action.equals("updatevalues")) updateValues((Response) object); else if (action.equals("showboundsql")) showBoundSQLStatement((Boolean) object); else if (action.equals("reset")) reset(); } COM: <s> this method decides actions in the table </s>
funcom_train/24376570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendContent(String text) { synchronized (this) { if (POS != null) { POS.print(text); }else { this.txaContent.append(text); } this.ContentChanged = true; txaContent.setCaretPosition(txaContent.getDocument().getLength()); } } COM: <s> append the given text to the content in the text area </s>
funcom_train/51634865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeProfilesToFile(Collection profiles, File file, String encoding) throws CoreException { final OutputStream stream; try { stream= new FileOutputStream(file); try { writeProfilesToStream(profiles, stream, encoding); } finally { try { stream.close(); } catch (IOException e) { /* ignore */ } } } catch (IOException e) { throw createException(e, FormatterMessages.CodingStyleConfigurationBlock_error_serializing_xml_message); } } COM: <s> write the available profiles to the internal xml file </s>
funcom_train/51631951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ITextSelection getCurrentTextSelection() { IWorkbenchPart part= JavaPlugin.getActivePage().getActivePart(); if (part instanceof IEditorPart) { ISelectionProvider selectionProvider= part.getSite().getSelectionProvider(); if (selectionProvider != null) { ISelection selection= selectionProvider.getSelection(); if (selection instanceof ITextSelection) { return (ITextSelection) selection; } } } return null; } COM: <s> returns the text selection of the current editor </s>
funcom_train/35671687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAlternative(Key original, Key alter){ for(ingWithAlters sub : alters){ //checks if original already exists in alters if(sub.getBaseIng().equals(original)){ //if found original if(!sub.getAllAlters().contains(alter)) sub.addAlter(alter); //add it to the set return; } } //if we are here, original does not exists yet alters.add(new ingWithAlters(original,alter)); } COM: <s> adds an alternative alter to an ingredient original </s>
funcom_train/172780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopTiming(String name) { long stopTime = Calendar.getInstance().getTimeInMillis(); if (currentlyTiming.containsKey(name)) { Long startTimeL = (Long) this.currentlyTiming.get(name); long resultingTime = stopTime - startTimeL.longValue(); this.timedObjects.put(name, new Long(resultingTime)); } } COM: <s> stops the clock for the measurement called code name code </s>
funcom_train/27955007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(Object object) { AccessType3 labelValue = ((HierarchyGrantType)object).getAccess(); String label = labelValue == null ? null : labelValue.toString(); return label == null || label.length() == 0 ? getString("_UI_HierarchyGrantType_type") : getString("_UI_HierarchyGrantType_type") + " " + label; } COM: <s> this returns the label text for the adapted class </s>
funcom_train/43213068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(long timestamp, byte action, BigHash hash) throws IOException, Exception { final long start = TimeUtil.getTrancheTimestamp(); try { return containsBinary(timestamp, action, hash); } finally { long total = TimeUtil.getTrancheTimestamp() - start; synchronized (countLock) { timeReading += total; readCount++; } } } COM: <s> p performs search to find whether contains an entry representing parameters </s>
funcom_train/33133840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void acceptConnections(final AResolver<Void> resolver) { // initiate accepting a connection new When<ASocket, Void>(serverSocket.accept()) { @Override public Promise<Void> resolved(ASocket o) { // connection came in, process it serviceRequest(o); acceptConnections(resolver); return null; } @Override public Promise<Void> smashed(Throwable t) throws Throwable { log.log(java.util.logging.Level.SEVERE, "server socket accept failed", t); resolver.smash(t); return null; } }; } COM: <s> this method forms connection accepting loop </s>
funcom_train/16564581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { // final ParameterDescriptorGroup descriptor = // getParameterDescriptors(); // if (descriptor != null) { // final Identifier identifier = descriptor.getName(); // if (identifier != null) { // final String code = identifier.getCode(); // if (code != null) { // return code; // } // } // } // return Classes.getShortClassName(this); return toString(); } COM: <s> returns a name for this math transform never </s>
funcom_train/27826031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SetTracker getPropertyInstancesTracker() { if (m_propertyInstances==null) m_propertyInstances=new SetTracker() { protected Set loadSet() throws KAONException { return getVirtualPropertyInstances(getProperty().getPropertyInstances(),true); } }; return m_propertyInstances; } COM: <s> returns the set tracker of instances of this property </s>
funcom_train/11097154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected EndpointChooser getServiceChooser(MessageExchangeImpl exchange) { EndpointChooser chooser = null; ActivationSpec activationSpec = exchange.getActivationSpec(); if (activationSpec != null) { chooser = activationSpec.getServiceChooser(); } if (chooser == null) { chooser = defaultServiceChooser; } return chooser; } COM: <s> returns the endpoint chooser for endpoints found by service which will </s>
funcom_train/45143372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWarningLevel3() { ForteCCCompiler compiler = ForteCCCompiler.getInstance(); Vector args = new Vector(); compiler.addWarningSwitch(args, 3); assertEquals(1, args.size()); assertEquals("+w", args.elementAt(0)); } COM: <s> tests command line switches for warning 3 </s>
funcom_train/26400288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean login() { if (loggedIn) { return true; } harvest = new JCaHarvest(broker); logstream = new JCaHarvestLogStream(); logstream.addLogStreamListener(new MyLogStreamListener()); harvest.setStaticLog(logstream); harvest.setLog(logstream); if (harvest.login(username, password) != 0) { log.error("Login failed: " + harvest.getLastMessage()); return false; } loggedIn = true; return true; } COM: <s> internal method which connects to harvest using the details provided </s>
funcom_train/50544982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutput (OutputStream out, String encoding) throws IOException { this.encoding = encoding == null ? "UTF-8" : encoding; this.out = out; buf = new ByteArrayOutputStream(); stringTableBuf = new ByteArrayOutputStream(); headerSent = false; // ok, write header } COM: <s> set to use binary output stream with given encoding </s>
funcom_train/14328471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkOpen() throws SQLException { if (closed) { throw new SQLException(Messages.get("error.generic.closed", "ResultSet"), "HY010"); } if (cancelled) { throw new SQLException(Messages.get("error.generic.cancelled", "ResultSet"), "HY010"); } } COM: <s> check that this connection is still open </s>