__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/39367128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getLongArray(String key, long values[]) { PropertyDescription property = getTraceProperty(key); setBufferPosition(property); int count = property.getCount(); for(int i = 0; i < count; i++) { values[i] = _buffer.getLong(); } } COM: <s> gets a trace property value as a long array </s>
funcom_train/39467246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Nullable public String getStringFromPrefs(@NotNull final String key) throws NullPointerException { String value = null; for (final Preferences pref : prefs) { value = pref.get(key, value); if (value != null) { return value; } } for (final ActionBuilder parent : parents) { value = parent.getStringFromPrefs(key); if (value != null) { return value; } } return null; } COM: <s> get a string from the preferences ignoring the resource bundles </s>
funcom_train/45491641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _init() throws Exception { ddTipoDocDefaultOptions.setOptions(new com.sun.webui.jsf.model.Option[]{new com.sun.webui.jsf.model.Option("CC", "Cédula de Ciudadania")}); validadorTelefono.setMaximum(1.0E20); validadorTelefono.setMinimum(0.0); validadorContrasena.setMinimum(4); } COM: <s> p automatically managed component initialization </s>
funcom_train/1542233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { if (closed) return -1; int b = RoutedInputStream.this.read(); if (b < 0) { closed = true; return b; } if (end == null) return b; buffer[index] = (byte) b; index = (index + 1) % buffer.length; closed = RoutedInputStream.equals(end, buffer, index); return b; } COM: <s> returns bytes of this specific route starting with the start marker </s>
funcom_train/41299235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { BorderLayout borderLayout = new BorderLayout(); borderLayout.setHgap(2); borderLayout.setVgap(2); jContentPane = new JPanel(); jContentPane.setLayout(borderLayout); jContentPane.add(getDownPanel(), BorderLayout.SOUTH); jContentPane.add(getUpPanel(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/25503221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(String name) throws IOException { assert name != null; if (this.resultRoot != null) { throw new RuntimeException("Scan already started"); } this.resultRoot = new FileScannerResultNode(new RootFileScannerInput(this, name)); this.listener.scanStarted(); this.listener.scanProgress(this.currentProgress, Double.POSITIVE_INFINITY); this.scannerStartTime = System.currentTimeMillis(); queueInput(this.resultRoot); } COM: <s> start the scan process </s>
funcom_train/45075630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addResourceName(String resourceName, String domain) { Hashtable<String, PolicyDecisionEvaluators> evaluators = domains.get(domain); PolicyDecisionEvaluators pde = null; if (evaluators == null) evaluators = new Hashtable(); else { pde = evaluators.get(resourceName); if (pde != null) return false; } evaluators.put(resourceName, pde); domains.put(domain, evaluators); return true; } COM: <s> add resource name without evaluators </s>
funcom_train/13482141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Graph graphIsomorphicCopy(Graph g){ Graph newG = new Graph(); for(Vertex v : g.getVertexList()){ Vertex w = new Vertex(v.getID()); newG.addVertex(w); v.setImage(w); // Use the variable "image" to record the isomorphism w.setImage(v); } for(Vertex v : g.getVertexList()){ for(Vertex w : v.getNeighborList()) newG.addEdge(v.getImage(),w.getImage()); } return newG; } COM: <s> makes new g a look like a copy of g </s>
funcom_train/43872408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeDialog(WindowEvent event) { int option = JOptionPane.showConfirmDialog(this.getParent(), "Closing the progress bar will close XTandem Viewer.\n" + "Do you still want to close the progress bar?", "Close XTandem Viewer?", JOptionPane.YES_NO_OPTION); if (option == JOptionPane.YES_OPTION) { System.exit(0); } } COM: <s> this method closes the dialog if possible </s>
funcom_train/6289514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importAttachmentsFromHeader(MessageHeader header) { for (int i = 0; i < header.getAttachementCount(); i++) { BodyPart bp = header.getAttachement(i); addAttachment(new BodyPart(header, bp, ContentStorage.CopyingModes.SHALLOW_COPY)); } if (DEBUG) System.out.println("Imported: " + getAttachments().size()); } COM: <s> adds attachments from given header to this attachments adder and displays </s>
funcom_train/28754710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubject(String newVal) { if ((newVal != null && this.subject != null && (newVal.compareTo(this.subject) == 0)) || (newVal == null && this.subject == null && subject_is_initialized)) { return; } this.subject = newVal; subject_is_modified = true; subject_is_initialized = true; } COM: <s> setter method for subject </s>
funcom_train/51782257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateTotalHeight() { double compartmentHeightSum = getMainCompartmentHeight(); if (showAttributes) { compartmentHeightSum += attributesCompartment.getMinimumSize().getHeight(); } if (showOperations) { compartmentHeightSum += operationsCompartment.getMinimumSize().getHeight(); } return Math.max(compartmentHeightSum, getSize().getHeight()); } COM: <s> determines the total height of this element </s>
funcom_train/3366870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transferable createTransferable(JComponent comp) { exportComp = (JTextComponent)comp; shouldRemove = true; p0 = exportComp.getSelectionStart(); p1 = exportComp.getSelectionEnd(); return (p0 != p1) ? (new TextTransferable(exportComp, p0, p1)) : null; } COM: <s> create a transferable to use as the source for a data transfer </s>
funcom_train/7646856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void useProtocolVersion(int version) throws IOException { if (version != ObjectStreamConstants.PROTOCOL_VERSION_1 && version != ObjectStreamConstants.PROTOCOL_VERSION_2) { throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg .getString("K00b3", version)); //$NON-NLS-1$ } protocolVersion = version; } COM: <s> sets the specified protocol version to be used by this stream </s>
funcom_train/40450335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMixingTypesInObjectArraySerialization() { Object[] array = new Object[] { 1, 2, new Object[] { "one", "two", 3 } }; assertEquals("[1,2,[\"one\",\"two\",3]]", gson.toJson(array)); } COM: <s> regression test for issue 205 </s>
funcom_train/25470714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setBounds(new Rectangle(15, 40, 160, 40)); jButton.setText("Hello World!"); jButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { JOptionPane.showMessageDialog( null, "it works" ); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/7427245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(final PNode node) { localBounds.setRect(bounds); node.globalToLocal(localBounds); final boolean boundsIntersects = node.intersects(localBounds); final boolean isMarquee = node == marquee; return node.getPickable() && boundsIntersects && !isMarquee && !selectableParents.contains(node) && !isCameraLayer(node); } COM: <s> returns true if the node is an acceptable selection </s>
funcom_train/34283713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startSearchSliceMap(String slice) { if ((slice == null)||(slice.length() == 0)) return; getChanges(); // start search rpc.findslice(settings.ttl, settings.latitude, settings.longitude, settings.altitude, settings.radius, datestarts, dateends, slice); } COM: <s> start search user service with slice </s>
funcom_train/39213270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String sendCmd(String cmd) throws IOException { if (!isLogin) return null; if (cmd.startsWith("LIST") || cmd.startsWith("RETR") || cmd.startsWith("APPE") || cmd.startsWith("STOR")) if (isPasv) datsocket.setPasvSocket(); else datsocket.setActiveSocket(); return ctlsocket.sendCmd(cmd); } COM: <s> send a command and return the reply string for server </s>
funcom_train/28170905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() { System.out.println("add"); Point2D.Double c0 = null; BezierPath instance = new BezierPath(); instance.add(c0); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of add method of class org </s>
funcom_train/8022208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetToUpdate() { System.out.println("getToUpdate"); Category instance = null; boolean expResult = true; boolean result = instance.getToUpdate(); 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 to update method of class vgrabber </s>
funcom_train/5373286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableColumn getColumn (int index) { checkWidget (); /* int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0); int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); if (count == 1 && columns [0] == null) count = 0; if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE); */ return columns [index]; } COM: <s> returns the column at the given zero relative index in the </s>
funcom_train/3378967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = super.toString() + "IssuerAlternativeName [\n"; if(names == null) { result += " null\n"; } else { for(GeneralName name: names.names()) { result += " "+name+"\n"; } } result += "]\n"; return result; } COM: <s> returns a printable representation of the issuer alternative name </s>
funcom_train/39981839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EnumColumnType convertStringToEnum(String name){ EnumColumnType determinedType; /*Set the determined type based off of the name paramater*/ if(name.equals("varchar")){ determinedType = EnumColumnType.varchar; } else if(name.equals("character")){ determinedType = EnumColumnType.character; } else if(name.equals("integer") || name.equals("int")){ determinedType = EnumColumnType.integer; } else if (name.equals("floating") || name.equals("float")){ determinedType = EnumColumnType.floating; } else if (name.equals("date")){ determinedType = EnumColumnType.date; } else{ throw new IllegalArgumentException("Unknown Enumeration Type: " + name); } return determinedType; } COM: <s> helper function used to determine a columns enum type </s>
funcom_train/40234332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomInit( double max_val){ Random rand = new Random(); for ( int i = 0; i < w.getRowDimension(); i++ ){ for ( int j = 0; j < w.getColumnDimension(); j++ ){ double val = max_val * rand.nextDouble(); w.set( i, j, val ); } } } COM: <s> initialize weight matrix with random numbers </s>
funcom_train/49200411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SlideTemplate_content_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SlideTemplate_content_feature", "_UI_SlideTemplate_type"), TransformedPackage.Literals.SLIDE_TEMPLATE__CONTENT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the content feature </s>
funcom_train/4285817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHasKeyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Column_hasKey_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Column_hasKey_feature", "_UI_Column_type"), RdbmsMMPackage.Literals.COLUMN__HAS_KEY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the has key feature </s>
funcom_train/15617037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String retrieveTarget(String raw) throws ParserException { if (StringUtils.isBlank(raw)) { return null; } Matcher m = REDIRECT_PATTERN.matcher(raw.trim()); String result = (m.matches()) ? Utilities.decodeAndEscapeTopicName(m.group(1).trim(), true) : null; if (result == null) { return null; } boolean colon = (result.length() > 1 && result.charAt(0) == ':'); if (colon) { result = result.substring(1); } return result; } COM: <s> use a regular expression to retrieve the redirection target from the </s>
funcom_train/45623329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutputAssembliesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResolveManifestFilesType_outputAssemblies_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResolveManifestFilesType_outputAssemblies_feature", "_UI_ResolveManifestFilesType_type"), MSBPackage.eINSTANCE.getResolveManifestFilesType_OutputAssemblies(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the output assemblies feature </s>
funcom_train/7368503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStateName(final KeyState keyState) { StringBuffer name; name = new StringBuffer(9); if (keyState.isPressed()) { name.append("Dn "); } if (keyState.isRepeated()) { name.append(".. "); } if (keyState.isReleased()) { name.append("Up "); } return name.toString(); } COM: <s> returns a string that describes the states held in the given key state </s>
funcom_train/18457772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullTitle() { DialogFinder finder = new DialogFinder(null); JDialog dialog = new JDialog(createJFrame(getName()), null); packAndShow(dialog); setWindow(dialog); // since all showing dialogs need to be returned... assertTrue("Finder is not working", finder.testComponent(dialog)); } COM: <s> tests the test component method for null title </s>
funcom_train/37148848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateGraphNodesInfo() { if (myTaskGraphNodes != null) { Iterator it = myTaskGraphNodes.iterator(); while (it.hasNext()) { TaskGraphNode tgn = (TaskGraphNode) it.next(); int id = tgn.getID(); if(getGraphicalNodeByID(id) != null) getGraphicalNodeByID(id).updateData(tgn); } } } COM: <s> updates the data for each nodes </s>
funcom_train/2368230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTabList() { Control [] controls = { fClassText, fFolderText, fFolderButton, fSubFolderCheck, fRecZipCheck, fOptionsGroup, fSearchForGroup, fSearchInGroup } ; this.setTabList( controls ) ; } COM: <s> forces tab order </s>
funcom_train/51808636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TravelingTournament cloneSolution() { TravelingTournament clone = new TravelingTournament(); clone.dayList = dayList; clone.teamList = teamList; List<Match> clonedMatchList = new ArrayList<Match>(matchList.size()); for (Match match : matchList) { clonedMatchList.add(match.clone()); } clone.matchList = clonedMatchList; return clone; } COM: <s> clone will only deep copy the matches </s>
funcom_train/28340006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDataRecord( final ITableRecord record ) throws AddRecordException { // Check if record would create inconsistent table if ( isConflictingRecord(record) ) { throw new AddRecordException(record); } for ( String key : this.schema.getPrimaryKeys() ) { PrimaryValueTable tblValue = getValueTable(key); tblValue.addDataRecord(record); } } COM: <s> add a new data record to the primary key table and index it </s>
funcom_train/21647747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TechIssue getTechIssue() { TechIssue result = new TechIssue(); result.setId( new Long(0) ); result.setDate( (Date)techIssuesEditor.getField( Issue.DATE_POS ) ); result.setDescription( (String)techIssuesEditor.getField( Issue.DESCR_POS ) ); return result; } COM: <s> returns technical issue edited now in editor attached to this panel </s>
funcom_train/5502645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePrompt(String path) { StringBuffer buff = new StringBuffer(); try { buff.append("[" + httpURL.getHost().toUpperCase() + ":"); buff.append(path + "] "); buff.append(dir.getCanonicalPath()); } catch (Exception e) { buff.append("[ Slide ]"); } buff.append(" $ "); commandPrompt = buff.toString(); } COM: <s> update the command prompt for the display </s>
funcom_train/23385282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printHeader(String title,PrintWriter out,HttpServletRequest req){ out.println("<html><head><link rel=stylesheet type=\"text/css\" href=style.css><title>"+title+"</title></head><body>"); String[] names=new String[]{"Gast","Admin","Superadmin"}; out.println("<div class=pageheader>"+title+"<br/><span class=smalldescribe>Eingeloggt als: "+names[userlevel]+"<br/><br/>"); createNavigZell(out, "Konfiguration", "configuration.png", EditConfigurationServlet.URI_EDIT_SERVLET); out.println("</div><br/>"); } COM: <s> prints the header </s>
funcom_train/39275741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { Element element = new Element(deepCopy(key), deepCopy(value), version); element.creationTime = creationTime; element.lastAccessTime = lastAccessTime; element.nextToLastAccessTime = nextToLastAccessTime; element.hitCount = hitCount; return element; } COM: <s> clones an element </s>
funcom_train/20885373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSimpleListForSet() { SimpleListWithSetField list = new SimpleListWithSetField(); list.set = new HashSet<String>(); for (int i = 0; i < 10; i++) { list.set.add("stringValue" + i); } JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, list); } COM: <s> tests a simple list for a field of type code set code csv </s>
funcom_train/32891997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startAction(View view, Point p) { Class[] sf = { Node.class }; Node clicked = (Node)Selection.selectObject(sf, model.getInfrastructure(), p); if (clicked != null) { alphaNode = clicked; startPoint = alphaPoint = alphaNode.getCoord(); mousePoint = p; return true; } return false; } COM: <s> starts creating a road at given point </s>
funcom_train/21507725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reset() { active = true; deactivating = false; checkForHits = true; hitEventType = "ProjectileHit"; outOfBoundsEventType = null; //"ProjectileOOB"; deactivatingEventType = null; GameWorldInfo.getGameWorldInfo().getRootNode().attachChild(projectileNode); // FIXME: Get rid of this in favor of attachTo() projectileNode.updateWorldVectors(); } COM: <s> basic implementation to set active and add back into the world </s>
funcom_train/2635952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String rightPad(String string, char character, int maxLength) { int padLength = maxLength - string.length(); if (padLength > 0) { char[] charPad = new char[padLength]; Arrays.fill(charPad, character); string = new StringBuilder(string).append(String.valueOf(charPad)). toString(); } return string; } COM: <s> right pad a </s>
funcom_train/8083449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyFormat() { if (isValidFormat()) { m_Format = new SimpleDateFormat(m_FormatText.getText()); m_propSupport.firePropertyChange(null, null, null); } else { throw new IllegalArgumentException( "Date format '" + m_FormatText.getText() + "' is invalid! Cannot execute applyFormat!"); } } COM: <s> sets the format but only if its a valid one </s>
funcom_train/98776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public ijResult JBMSPreparedStatementExec() throws ParseException, SQLException { Token s = null; jj_consume_token(EXECUTE); jj_consume_token(STATEMENT); s = jj_consume_token(STRING); {if (true) return executeImmediate(stringValue(s.image));} throw new Error("Missing return statement in function"); } COM: <s> hack to get the grammar to leave a </s>
funcom_train/34536660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValidation(String _reference) throws Exception { if (_reference!=null && !_reference.equals("")) { try { Integer.valueOf(_reference).intValue(); } catch (Exception ignore) { _reference = ComboTableQueryData.getValidationID(getPool(), _reference); } } setParameter(internalPrefix + "validation", _reference); } COM: <s> setter for the validation id </s>
funcom_train/12908701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addList (Element elem, List subElems) { Iterator iter = subElems.iterator(); while (iter.hasNext()) { ArchiveField field = (ArchiveField) iter.next() ; ArchiveFieldElement fieldElem = new ArchiveFieldElement (doc, field); Element subElem = fieldElem.toDOMElement(); elem.appendChild(subElem); } } COM: <s> takes a list of archive field elements converts them to dom elements </s>
funcom_train/14297338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNToMAssociation(Object association) { Association theAssociation = (Association) association; boolean n = getFirstMemberEnd(theAssociation).getUpper() > 1 || getFirstMemberEnd(theAssociation).getUpper() < 0; boolean m = getSecondMemberEnd(theAssociation).getUpper() > 1 || getSecondMemberEnd(theAssociation).getUpper() < 0; return n && m; } COM: <s> returns code true code if the association code association code is </s>
funcom_train/26402262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(PersistableDataObject input) throws IOException { System.out.println("*** SQLTablePersistenceStrategy Saving input"); //If input key is sequence-generated if (input.isInsert() && input.keyIsSequenced()) { setSequencedKey(input); } //Generate the SQL to Insert/Update the persistable String sql = SQLGenerator.createStoreSQL(input); //Execute the Insert/Update executeStore(input, sql); } COM: <s> saves the data for a code persistable data object code to the </s>
funcom_train/3369040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldOptimizeChange(int firstRow, int lastRow) { if (!isTransformed()) { // Not transformed, nothing to do. return false; } if (!sorted || (lastRow - firstRow) > viewToModel.length / 10) { // We either weren't sorted, or to much changed, sort it all sort(); return false; } return true; } COM: <s> returns true if we should try and optimize the processing of the </s>
funcom_train/32800387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPropertyPropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_AttributeContextDeclarationCS_property_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_AttributeContextDeclarationCS_property_feature", "_UI_AttributeContextDeclarationCS_type"), OclPackage.Literals.ATTRIBUTE_CONTEXT_DECLARATION_CS__PROPERTY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the property feature </s>
funcom_train/2358265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(CubePruneState another) { if (this.nodeStatesTbl.getExpectedTotalLogP() < another.nodeStatesTbl.getExpectedTotalLogP()) { return 1; } else if (this.nodeStatesTbl.getExpectedTotalLogP() == another.nodeStatesTbl.getExpectedTotalLogP()) { return 0; } else { return -1; } } COM: <s> compares states by expected total log p allowing states </s>
funcom_train/18524832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JLabel getOrientationLabel() { if (orientationLabel == null) { try { orientationLabel = new JLabel(); orientationLabel.setName("orientationLabel"); orientationLabel.setText("Ausrichtung"); stepLabel.setFont(ChartConstants.TEXT_FONT); stepLabel.setForeground(Color.black); } catch (Throwable exc) { handleException(exc); } } return orientationLabel; } COM: <s> return the orientation label property value </s>
funcom_train/42877199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDiscSpace() { logger.entering("de.axelwernicke.mypod.ipod.IPod", "getDiscSpace"); long spaceTotal = -1; spaceTotal = this.getDiscSpaceUsed() + this.getDiscSpaceFree(); logger.exiting("de.axelwernicke.mypod.ipod.IPod", "getDiscSpace"); return spaceTotal; } COM: <s> getter for property disc space </s>
funcom_train/2586038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDayCount30() { final SerialDate d1 = SerialDate.createInstance(1, MonthConstants.APRIL, 2002); final SerialDate d2 = SerialDate.createInstance(2, MonthConstants.APRIL, 2002); final int count = SerialDateUtilities.dayCount30(d1, d2); assertEquals(1, count); } COM: <s> problem 30 360 day count </s>
funcom_train/29418300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public int hashCode() { int i = (a==null) ? 0 : a.hashCode(); int j = (b==null) ? 0 : b.hashCode(); int k = (c==null) ? 0 : c.hashCode(); return i*173123 + j*131 + k; } COM: <s> returns a hashcode based on a null 0 a </s>
funcom_train/444576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitNegation(Negation expr) { if (!body) { addError(expr, ValidationError.AX_HEAD_ERR + ": Must not " + "contain a Negation:\n" + leSerializer.serialize(expr)); } else { addError(expr, ValidationError.AX_BODY_ERR + ": Must not " + "contain a Negation:\n" + leSerializer.serialize(expr)); body = false; } } COM: <s> checks if a negation is valid to wsml rule </s>
funcom_train/3381849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String str = ""; switch (orientation) { case HORIZONTAL: str = "orientation=horizontal, "; break; case VERTICAL: str = "orientation=vertical, "; break; } return getClass().getName() + "[" + str + super.toString() + "]"; } COM: <s> returns the string representation of this layouts values </s>
funcom_train/43502695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { // Collections.sort(comments, new Comparator() { // public int compare(Object o1, Object o2) { // Date d1 = ((Comment) o1).getDate(); // Date d2 = ((Comment) o2).getDate(); // return d2.compareTo(d1); // } // }); fireTableDataChanged(); } COM: <s> refreshes the comments </s>
funcom_train/13363580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List convertToNameValues(String[] src) { List trg = new ArrayList(); if (src != null) { for (int i = 0; i < src.length; i++) { String name = src[i]; trg.add(new LabelValueBean(name, name)); } } return trg; } COM: <s> converts an array of strings to a list of label value bean objects </s>
funcom_train/7293890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void TestWhiteSpaceParsing() { String DATA[] = { "yyyy MM dd", // pattern, input, expected parse or null if expect parse failure // Pattern space run should parse input text space run "MM d yy", " 04 01 03", "2003 04 01", null, " 04 01 03 ", "2003 04 01", }; expectParse(DATA, new Locale("en", "", "")); } COM: <s> test handling of white space </s>
funcom_train/47899177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocumentHandle revertDiff() { if (memeId == -1) { Logger.logWarn("WebWorkBook.revert: memeId not set"); return null; } try { // get most recent diff from db StringBuffer diff = new StringBuffer(getLatestDiff(memeId)); applyDiff(diff); } catch (Exception e) { Logger.logWarn("WebWorkBook.revert: " + e.toString()); } return this; } COM: <s> revert current workbook to the most recent previous version </s>
funcom_train/10655190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReplace02() { final int count = view.getViewCount(); view.replace(0, 0, null); assertEquals(count, view.getViewCount()); assertTrue(count > 0); view.replace(0, view.getViewCount(), null); // = removeAll() assertEquals(0, view.getViewCount()); } COM: <s> null pointer exception is thrown if code replace code </s>
funcom_train/18058762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFieldSupported(UID objectId, int fieldNumber) throws RemoteException { synchronized(SO) { SO.rmcCount++; try { CategorySource cat = (CategorySource) SO.objectMap.get(objectId); return cat.isFieldSupported(fieldNumber); } catch(PerformanceException e) { throw new RemoteException(e.getMessage()); } } } COM: <s> return boolean indication of whether the field in question is supported </s>
funcom_train/24118243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(SearchText.SELECTED_VALUE) || evt.getPropertyName().equals(ColorButton.SELECTED_VALUE)) { dataChanged(); } if (evt.getSource().toString().contains("JXDatePicker") && evt.getPropertyName().equals("date")) { dataChanged(); } } COM: <s> calls the data changed method when a component fires the property change </s>
funcom_train/4014979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DesignWidgetWrapper addNewTextArea(boolean select){ TextArea ta = new TextArea(); DOM.setStyleAttribute(ta.getElement(), "height","60"+PurcConstants.UNITS); DOM.setStyleAttribute(ta.getElement(), "width","200"+PurcConstants.UNITS); return addNewWidget(ta,select); } COM: <s> adds a new text area to the selected page </s>
funcom_train/31232397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object aValue, int rowIndex, int columnIndex) { if ((rowIndex < _ROWS.size()) && (columnIndex < ((ArrayList) _ROWS.get(rowIndex)).size())) { ((ArrayList) _ROWS.get(rowIndex)).set(columnIndex, (String) aValue); } this.fireTableDataChanged(); } COM: <s> sets the value at attribute of the results table model object </s>
funcom_train/12531263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T createInstance(String id) throws IllegalArgumentException, InvocationTargetException { if (!this.isRegistered(id)) throw new IllegalArgumentException(id); try { return this.associations.get(id).newInstance(); } catch (Exception e) { throw new InvocationTargetException(e); } } COM: <s> invokes the constructor for the type selected by the provided id </s>
funcom_train/46464772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void linkStations() { for(StationEntry se:stations) { clearFromEmpty(se.previuosStations); clearFromEmpty(se.nextStations); for(String prev: se.getPreviuosStations()) { if(entryMap.get(prev)==null) System.out.println(prev + " not registred"); else entryMap.get(prev).addNext(se.getName()); } } } COM: <s> call only after parsing times </s>
funcom_train/39911136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLocaleCharacterEncoding() { System.out.println("getLocaleCharacterEncoding"); ApplicationBean1 instance = new ApplicationBean1(); String expResult = ""; String result = instance.getLocaleCharacterEncoding(); 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 locale character encoding method of class timesheetmanagement </s>
funcom_train/9436714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public int count(Context context, Uri uri, String selection, String[] selectionArgs) { Cursor cursor = context.getContentResolver() .query(uri, COUNT_COLUMNS, selection, selectionArgs, null); try { if (!cursor.moveToFirst()) { return 0; } return cursor.getInt(0); } finally { cursor.close(); } } COM: <s> generic count method that can be used for any content provider </s>
funcom_train/3923739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasField(String name) { boolean ret = false; Field[] fields = getClass().getFields(); for ( int i = 0; !ret && i < fields.length; i++ ) { ret = name.equals( fields[i].getName() ); } return ret; } COM: <s> returns true if this object contains public field with this name </s>
funcom_train/18187227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getLog() { if (log == null) { log = new JMenuItem("Laplacian of Gaussian"); log.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { optionsPanel.removeAll(); ImageTransformation t = new LoGTransformation(); optionsPanel.add(new TransformationEditor(t,img)); optionsPanel.updateUI(); jSplitPane.updateUI(); } }); } return log; } COM: <s> this method initializes log </s>
funcom_train/48406938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUsedQualificationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TaskUse_usedQualification_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TaskUse_usedQualification_feature", "_UI_TaskUse_type"), SpemxtcompletePackage.eINSTANCE.getTaskUse_UsedQualification(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the used qualification feature </s>
funcom_train/25973963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick(Widget sender){ if(sender == this.cancel){ this.hide(); return; } if(sender == this.ok){ if(this.name.getText().equals("")){ SimpleDialog.displayDialog(SimpleDialog.TYPE_ERROR, "Error", "You must specify a name for the new keyword hierarchy"); }else{ JSONArray params = new JSONArray(); params.set(0, new JSONString(this.name.getText())); AuDoc.jsonCall.asyncPost2("recman.addKWH", params, new UpdateResponseHandler(this.parent)); this.hide(); } } } COM: <s> called when one of the buttons is clicked </s>
funcom_train/51418481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutputProjectNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProjectNode_outputProjectName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProjectNode_outputProjectName_feature", "_UI_ProjectNode_type"), JetsetPackage.Literals.PROJECT_NODE__OUTPUT_PROJECT_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the output project name feature </s>
funcom_train/32081101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText (int start, int end) { checkWidget (); if (!(start <= end && 0 <= end)) return ""; String text = getText (); int length = text.length(); end = Math.min (end, length - 1); if (start > end) return ""; start = Math.max (0, start); /* * NOTE: The current implementation uses substring () * which can reference a potentially large character * array. */ return text.substring (start, end + 1); } COM: <s> returns a range of text </s>
funcom_train/32740690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNullOption(Object nullOption) { if (nullOption instanceof String && ((String) nullOption).trim().length() > 0) { this.nullOption = (String) nullOption; } else { // if we got no / an empty value, we need to empty the fields due to the re-use of the editors this.nullOption = null; } } COM: <s> sets the value of the null option from the mak input tag </s>
funcom_train/34838250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GlueObject createGlueObject(String identifier, String content) throws GlueException { if ((identifier==null)||(identifier=="")) return null; if (langType.equalsIgnoreCase(wsml_lang)) return ((GlueObject)new WSML_GlueObject(identifier,content)); //if (langType.equalsIgnoreCase(rdf_lang)) return new (identifier); return null; } COM: <s> create a new generic glue object given its textual representation </s>
funcom_train/13586505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countDifferentPlans(Person person1, Person person2){ int diffCounter=0; if(person1.getPlans().size()!= person2.getPlans().size()){ log.warn("different number of plans in agent: " + person1.getId() ); } for (int i=0; i< person1.getPlans().size(); i++){ Plan plan1 = person1.getPlans().get(i); Plan plan2 = person2.getPlans().get(i); if (!compare (plan1, plan2)){ diffCounter++; } } return diffCounter; } COM: <s> compares all plan of given persons </s>
funcom_train/25523432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbLogin() { if(jbLogin == null) { jbLogin = new JButton("Login"); // Add an action listener. jbLogin.addActionListener(new ActionListener() { /** * Called when an action is performed. * * @param e The ActionEvent. */ @Override public void actionPerformed(ActionEvent e) { // Make sure we're disconnected. Whisper.getClient().disconnect(false); // Show the login window. Whisper.getClient().showLoginWindow(); } }); // Set the icon. jbLogin.setIcon(Resources.ICON_BUTTON_LOGIN); } return jbLogin; } COM: <s> get the login button </s>
funcom_train/48387795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addNodeSelectedHandler(com.smartgwt.client.widgets.grid.events.NodeSelectedHandler handler) { if (getHandlerCount(com.smartgwt.client.widgets.grid.events.NodeSelectedEvent.getType()) == 0) setupNodeSelectedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.NodeSelectedEvent.getType()); } COM: <s> add a on node selected handler </s>
funcom_train/15464380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(int intState) throws SRCPException { // shall we do a reset if (intState==intStateResetting){ objEventlog.println("SRCPDaemon.setState: pre reset",1); // reset already in progress? if (intServerState==intStateResetting ) { throw new ExcTemporarlyProhibited(); } intServerState=intStateResetting; // reset work is done asyonchronous ThreadReset tempThread = new SRCPDaemon.ThreadReset(this); tempThread.start(); } else { intServerState=intState; } } COM: <s> use this method to set the internal server state </s>
funcom_train/10238255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File inputFile(HttpURLConnection httpConnection) throws IOException{ String filePath = "temp"+File.separator+"model.tmp"; InputStream in = httpConnection.getInputStream(); try { OutputStream os = new FileOutputStream(filePath); int length = -1; long read = 0; byte[] buf = new byte[1024]; while ((length = in.read(buf)) != -1) { os.write(buf, 0, length); read += length; } in.close(); os.close(); } catch (IOException e) { e.printStackTrace(); } return new File(filePath); } COM: <s> receiving a file </s>
funcom_train/5462055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlExDateProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { List<Node> valueList = getMultipleRdfPropertyValues(rdfContainer, property, IcalDataType.NCAL_DATE_TIME); addMultipleStatements(rdfContainer, parentNode, NCAL.exdate, valueList); } COM: <s> crawls the exdate property </s>
funcom_train/39911825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRh5() { System.out.println("getRh5"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getRh5(); 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 rh5 method of class timesheetmanagement </s>
funcom_train/47103190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() { MapFile mf = MapFile.getInstance(); setType(mf.readInt()); setRow(mf.readInt()); setColumn(mf.readInt()); setCanBeDestroyed(mf.readByte() != 0); Obstruction o = new Obstruction(ObstructionLandType.values()[type], getCanBeDestroyed()); GameWorld.getInstance().setLandAt(row, column, o); } COM: <s> loads reads an individual entry from the map file </s>
funcom_train/48406992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPresentationNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContentDescription_presentationName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContentDescription_presentationName_feature", "_UI_ContentDescription_type"), SpemxtcompletePackage.eINSTANCE.getContentDescription_PresentationName(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the presentation name feature </s>
funcom_train/36799868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Role readRole(String role) throws DataAccessException { Role r = null; Log.write("Enter", Log.INFO, "readRole", KasaiFacade.class); r = RoleHandler.getInstance().read(role); Log.write("Exit", Log.INFO, "readRole", KasaiFacade.class); return r; } COM: <s> reads a role without checking permission </s>
funcom_train/6413062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateExample() { timer.update(); counter += timer.getTimePerFrame(); frames++; if (counter > 1) { final double fps = (frames / counter); counter = 0; frames = 0; System.out.printf("%7.1f FPS\n", fps); } // Update controllers/render states/transforms/bounds for rootNode. _root.updateGeometricState(timer.getTimePerFrame(), true); } COM: <s> update our scene </s>
funcom_train/12923269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString(final int length) throws IOException { final byte[] bytes = new byte[length]; readBytes(bytes); final int len; if (bytes[length - 1] == 0) { len = length - 1; } else { len = length; } return new String(bytes, 0, len, encoding); } COM: <s> read a string using the default character set defined in the decoder </s>
funcom_train/169363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLayout(boolean compare, boolean mixedLIneup) { LineupStylePanel panel; if (mixedLIneup) { panel = new MixedLineupPanel(this); } else { panel = new StandardLineupPanel(this); } if (compare) { panel.initCompare(); } else { panel.initSingle(); } removeAll(); setOpaque(false); add(panel); } COM: <s> sets the layout of the panel by delegating to the proper class </s>
funcom_train/51427185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeObjectPropertyTriple(javax.xml.stream.XMLStreamWriter writer,OT.OTProperty otproperty) throws Exception { writer.writeStartElement(OWL.getURI(),"ObjectProperty"); writer.writeAttribute(RDF.getURI(),"about",otproperty.getURI()); writer.writeEndElement(); } COM: <s> writes owl object property triple </s>
funcom_train/45248383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldTaxaJTT() { if (jNumberFloatFieldTaxaJTT == null) { jNumberFloatFieldTaxaJTT = new JNumberFloatField(); jNumberFloatFieldTaxaJTT.setLocation(new Point(345, 186)); jNumberFloatFieldTaxaJTT.setSize(new Dimension(65, 20)); } return jNumberFloatFieldTaxaJTT; } COM: <s> this method initializes j number float field taxa jtt </s>
funcom_train/37033949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean addMapping( String fullPath, PrintWriter objfile ) { if( debug > 0 ) log( "Adding map for " + fullPath ); objfile.println("NameTrans fn=\"assign-name\" from=\"" + fullPath + "\" name=\"" + objectName + "\""); return true; } COM: <s> add a fulling specified netscape mapping </s>
funcom_train/7619618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processKeyEventImpl(KeyEvent e, Collection<KeyListener> c) { for (KeyListener listener : c) { switch (e.getID()) { case KeyEvent.KEY_PRESSED: listener.keyPressed(e); break; case KeyEvent.KEY_RELEASED: listener.keyReleased(e); break; case KeyEvent.KEY_TYPED: listener.keyTyped(e); break; } } } COM: <s> process key event impl </s>
funcom_train/43096626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JScrollPane getBehavioralFeatureScroll() { if (behFeatureScroll == null) { if (behFeatureModel == null) { behFeatureModel = new UMLParameterBehavioralFeatListModel(); } JList list = new UMLLinkedList(behFeatureModel); list.setVisibleRowCount(1); behFeatureScroll = new JScrollPane(list); } return behFeatureScroll; } COM: <s> returns the behavioral feature scroll </s>
funcom_train/12171679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveIdentities() { triedToResolveIdentities = true; RolloverImagePolicy rollover = getPolicy(); if (rollover != null) { // Get references to the contained policies. normalReference = (RuntimePolicyReference) rollover.getNormalPolicy(); overReference = (RuntimePolicyReference) rollover.getOverPolicy(); } } COM: <s> this method resolves the provided policy identity using the </s>
funcom_train/12159357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFollowingSiblingsWithinContext() { state.beforeStartElement(); state.contextMatched(); state.afterEndElement(); for (int i = 0; i < 10; i += 1) { state.beforeStartElement(); assertTrue("Following sibling matches", state.hasDirectRelationship()); state.afterEndElement(); } } COM: <s> test that following nodes are within context </s>
funcom_train/31561135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConstantString READBLK(MaverickString var, ConstantString blksize) { try { byte[] buff = new byte[blksize.intValue()]; file.readFully(buff, 0, buff.length); var.set(new String(buff, 0 , buff.length)); return ConstantString.RETURN_SUCCESS; } catch (IOException ioe) { return ConstantString.RETURN_ELSE; } } COM: <s> read a set number of bytes from current file position </s>