__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2904499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addThreadTags(XMLTag parent){ if((parent!=null) && (param!=null) && (param.size()>0)){ boolean any = false; Vector v = (Vector)parent.value; Object[] data = param.toArray(); for(int i=0; i<data.length; i++){ if(data[i] instanceof String){ XMLTag.addTag(parent, "thread", data[i].toString()); any = true; } } return any; } return false; } COM: <s> add thread tags </s>
funcom_train/15617145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseProcess(ParserInput parserInput, ParserOutput parserOutput, String raw, int mode) throws ParserException { if (mode < JFlexParser.MODE_PROCESS) { return raw; } if (StringUtils.isBlank(raw)) { return ""; } Reader reader = toReader(raw, false); JAMWikiLexer lexer = new JAMWikiLexer(reader); return this.lex(lexer, parserInput, parserOutput, mode); } COM: <s> third stage of the parser this method parses most wiki syntax validates </s>
funcom_train/45916079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doMoneyAdjustTrigger() { Point pt = MouseInfo.getPointerInfo().getLocation(); Point cpt = getLocationOnScreen(); Point rel = new Point(pt.x - cpt.x, pt.y - cpt.y); if (btnMoneyAdjust.rect.contains(rel)) { doMoneyAdjust(rel); } else { btnMoneyAdjust.down = false; moneyAdjuster.stop(); } } COM: <s> the money adjust trigger </s>
funcom_train/23791872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subscribeAll() { if(isRegistered) { Object[] arg = {incoming_port, name}; OSCMessage msg = new OSCMessage("/subscribe/all", arg); out.send(msg); } else { if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot subscribe to nodes."); } } COM: <s> subscribes to all nodes present on the network </s>
funcom_train/20891437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBoxXAxis() { if ((jComboBoxXAxis == null) || (this.reconstruct)) { if (this.xAxes != null) { jComboBoxXAxis = new JComboBox(this.xAxes); jComboBoxXAxis.setSelectedIndex(0); } else { jComboBoxXAxis = new JComboBox(); } } return jComboBoxXAxis; } COM: <s> this method initializes j combo box xaxis </s>
funcom_train/45250795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageDescriptor getImageDescriptor() { if (imageDescriptor != null) { return imageDescriptor; } String imageName = getConfigurationElement().getAttribute(IWorkbenchRegistryConstants.ATT_ICON); if (imageName != null) { String contributingPluginId = pluginId; imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(contributingPluginId, imageName); } return imageDescriptor; } COM: <s> returns the image descriptor for this node </s>
funcom_train/2385975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { IChatSender newSender = new IChatSender(iIpAddress, iNetbiosName, iLogin); assertEquals(iSender, newSender); IChatSender newSender2 = new IChatSender("127.0.0.2", "BARFOO", "REUSE"); assertTrue(!iSender.equals(newSender2)); } COM: <s> tests equals method </s>
funcom_train/19543938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void repaintComponents() { if (repaintComponents != null) { Component[] repaints = null; synchronized (repaintComponents) { repaints = repaintComponents.toArray(new Component[repaintComponents.size()]); repaintComponents.clear(); repaintComponents = null; } for (Component component : repaints) { component.repaint(); } } } COM: <s> repaint all of the components due to a change in the icon </s>
funcom_train/11105280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireAttributeRemoved(String key, Object value) { if (attributeListeners.size() < 1) { return; } ServletContextAttributeEvent event = new ServletContextAttributeEvent(this, key, value); Iterator listeners = attributeListeners.iterator(); while (listeners.hasNext()) { ServletContextAttributeListener listener = (ServletContextAttributeListener) listeners.next(); listener.attributeRemoved(event); } } COM: <s> p fire an attribute removed event to interested listeners </s>
funcom_train/18088869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(final Component component) { int index = 0; // Walk the list of components until we find it. final Enumeration e = components.elements(); while (e.hasMoreElements()) { final Component c = (Component) e.nextElement(); if (c == component) { // This is the component. break; } index++; } // Set the component as the selected one. if (index < size()) { setSelected(index); } } COM: <s> sets the selected component </s>
funcom_train/30196836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNomeTitoloScolastico() { System.out.println("setNomeTitoloScolastico"); String nomeTitoloScolastico = "test"; TitoloScolastico instance = new TitoloScolastico(); instance.setNomeTitoloScolastico(nomeTitoloScolastico); String result = instance.getNomeTitoloScolastico(); assertEquals("test", result); } COM: <s> test of set nome titolo scolastico method of class com </s>
funcom_train/27823278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(SetPropertyInstanceValue event) throws KAONException { PropertyInstance propertyInstance=event.getPropertyInstance(); loadEntity(propertyInstance.getProperty()); loadEntity(propertyInstance.getSourceInstance()); if (propertyInstance.getTargetValue() instanceof Instance) loadEntity((Instance)propertyInstance.getTargetValue()); } COM: <s> visits an event for setting the value of a property instance </s>
funcom_train/12687162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKeyEntry(PrivateKey key, Certificate[] certificateChain, String alias) throws Exception { keyStore.setKeyEntry(alias, key, unwrapKeyPassword(), certificateChain); logger.info("Added new key entry for: " + alias); // must re-write SSL keystores createSSLKeystore(true, true, unwrapStorePassword(), unwrapKeyPassword()); rehashKeystoreEntries(); } COM: <s> adds a key entry to the key store </s>
funcom_train/1413562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendUrlParam(StringBuffer sb, String key, String value) { sb.append(BoxConstant.AND_SIGN_STRING); sb.append(key); sb.append(BoxConstant.EQUALS_SIGN_STRING); if (value != null) { sb.append(value); } else { sb.append(""); } } COM: <s> append url param e </s>
funcom_train/50703313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubView() { // perform add // update display if necessary if (node.hasSubGraph()) { // already existed System.out.println("Error: there is a subgraph, trying to add extra node"); } else { node.newSubGraph(higraph); HiView subView = node.getSubView(); HiGraphPanel newSubGraphPanel = new HiGraphPanel(higraph, subView, viewControl, this, app); addSubGraphPanel(newSubGraphPanel); viewControl.updateView(); } } COM: <s> adds a subgraph to this node </s>
funcom_train/101300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIndexed() { switch(super.getSampleType()) { case INDEX: return true; // nice and easy // we don't know? guess. and save our guess. case UNKNOWN: String type = (String) getMeta("format"); if (type != null && Character.toUpperCase(type.charAt(0)) == 'I') { setSampleType(SampleType.INDEX); return true; } return false; default: return false; } } COM: <s> return true if the sample is indexed else false </s>
funcom_train/14099136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAdjacency(Node removeMe) { if (adjacent == null) { return false; } boolean removed = false; if (adjacent.listDeleteItem(removeMe)) { removed = true; adjacencyCount --; // make sure the symmetry is preserved if (!((x == removeMe.getX()) && (y == removeMe.getY()))) { removeMe.removeAdjacency(this); } } return removed; } COM: <s> searches this nodes adjacency list for the given node </s>
funcom_train/2903569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean importData(JComponent c, Transferable t){ if(canImport(c, t.getTransferDataFlavors())){ try{ String str = (String)t.getTransferData(DataFlavor.stringFlavor); importString(c, str); return true; } catch(Exception e){ new JXError(getClass(), "Drag and drop import data error", e.getStackTrace()); } } return false; } COM: <s> attempt to import the data string </s>
funcom_train/10790418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDroppable(Table table) { return _openjpaTables || (!DBIdentifier.toUpper(table.getIdentifier()).getName().startsWith("OPENJPA_") && !DBIdentifier.toUpper(table.getIdentifier()).getName().startsWith("JDO_")); // legacy } COM: <s> return true if the table is droppable </s>
funcom_train/28634868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getClientId(HttpServletRequest req) { String path = req.getPathInfo(); if (path.equals("")) { return ""; } if (path.charAt(0) == '/') { path = path.substring(1); } int endPos = path.indexOf('/'); if (endPos != -1) { path = path.substring(0, endPos); } return path; } COM: <s> return the client id from a url like send 123456 12 123456 </s>
funcom_train/8483689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATObject meta_eval(ATContext ctx) throws InterpreterException { ATMessage msg = message_.meta_eval(ctx).asMessage(); ATObject rcvr = rcvExp_.meta_eval(ctx); ATObject result = null; InvocationStack stack = InvocationStack.getInvocationStack(); ATTable args = msg.base_arguments(); try { stack.methodInvoked(this, rcvr, args); result = msg.base_sendTo(rcvr, ctx.base_receiver()); } finally { stack.methodReturned(result); } return result; } COM: <s> to evaluate a message send evaluate the receiver expression into an object </s>
funcom_train/9769548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testSingleNetworkStringToScore() { assertNotNull(Scoreentry.getScoreentryByString("DOUBLE_SEQUENCE 1(1(BAMBOO(1)),2(BAMBOO(2)),3(BAMBOO(3))) 2(4(CIRCLE(1)),5(CIRCLE(2)),6(CIRCLE(3))) 1")); } COM: <s> test if a valid string can be converted to a score </s>
funcom_train/15411607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLoadedReference(Set<String> loadedProps) { if (loadedProps != null) { if (loadedProps.size() == propertiesId.length) { for (int i = 0; i < propertiesId.length; i++) { if (!loadedProps.contains(propertiesId[i].getName())) { return false; } } return true; } } return false; } COM: <s> return true if the loaded properties is just the id property and therefore </s>
funcom_train/27940228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextMessage() { String thisLine = null; try { thisLine = reader.readLine(); } catch (IOException e) { logger.log("Failure reading from server: " + e); close(); } if(thisLine == null) { close(); thisLine = "" + LSGP.ERR_NOT_CONNECTED + " : Forged by library."; } return thisLine; } COM: <s> returns the next message received from the server </s>
funcom_train/33006366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregister() { if(sipMeetingManager.getRegisterStatus().equalsIgnoreCase(RegisterStatus.NOT_REGISTERED)){ log.error("Not registered"); } else { this.unregistrationInProgress = true; this.setCurrentStatus(CommunicationLayerInterface.OFFLINE); sipMeetingManager.setRegisterStatus(RegisterStatus.NOT_REGISTERED); sipMeetingManager.unRegister(); new StopMessenger(sipMeetingManager.getMessageListener()); this.setRegistered(false); } } COM: <s> unregister method send an unregister request to the proxy </s>
funcom_train/19628308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int searchSubnet(String netID, String netMask) { for (int i = 0; i < subnetList.size(); ++i) { if (netID.compareTo(subnetList.get(i).getSubnetname()) == 0 && netMask.compareTo(subnetList.get(i).getSubnetmask()) == 0) { return i; } } return -1; } COM: <s> searches a subnet inside the subnet list </s>
funcom_train/37071728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countNonobsoleteTerms() { try { String query = "select count(*) from pub_term where is_obsolete='n'"; PreparedStatement stmt = conn.prepareStatement(query); try { ResultSet rs = stmt.executeQuery(); rs.next(); return rs.getInt(1); } finally { stmt.close(); } } catch (SQLException e) { throw new RuntimeException(e); } } COM: <s> returns a total count of all nonobsolete terms in the database </s>
funcom_train/12807870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float writeSelectedRows(final int colStart, final int colEnd, final int rowStart, final int rowEnd, final float xPos, final float yPos, final PdfContentByte[] canvases) { return writeSelectedRows(colStart, colEnd, rowStart, rowEnd, xPos, yPos, canvases, true); } COM: <s> writes the selected rows and columns to the document </s>
funcom_train/9437155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateMessageFields() throws MessagingException { MimeMessage message = buildTestMessage(RECIPIENT_TO, RECIPIENT_CC, RECIPIENT_BCC, REPLY_TO, SENDER, SUBJECT, null); EmailContent.Message localMessage = new EmailContent.Message(); boolean result = LegacyConversions.updateMessageFields(localMessage, message, 1, 1); assertTrue(result); checkProviderMessage("testUpdateMessageFields", message, localMessage); } COM: <s> test basic conversion from store message to provider message </s>
funcom_train/13187529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegularTimePeriod previous() { Month result; if (this.month != MonthConstants.JANUARY) { result = new Month(this.month - 1, this.year); } else { Year prevYear = (Year) this.year.previous(); if (prevYear != null) { result = new Month(MonthConstants.DECEMBER, prevYear); } else { result = null; } } return result; } COM: <s> returns the month preceding this one </s>
funcom_train/24364621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxConstructionIndex() { if (algoParent == null) { // independent object: // index must be less than every dependent algorithm's index int min = cons.steps(); int size = algorithmList.size(); for (int i = 0; i < size; ++i) { int index = ((AlgoElement) algorithmList.get(i)).getConstructionIndex(); if (index < min) min = index; } return min - 1; } else // dependent object return algoParent.getMaxConstructionIndex(); } COM: <s> returns the largest possible construction index for this object in its construction </s>
funcom_train/23633558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add20Objects() { for (int i = 0; i < 20; i++) { objects.add(new Object()); objects.get(i).setLocation(((int) (Math.random() * 4200)), ((int) (Math.random() * 600))); objects.get(i).setSize(158, 155); } } COM: <s> temporarily parked this generate objects on random positions code here </s>
funcom_train/12368325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean resolveNextRegionCollision(LinkedList<Region> regionsList) { for (Region r1 : regionsList) { for (Region r2 : regionsList) { if (r1.getId() != r2.getId()) { for (Node curNode : r1.getMemberNodes()) { if (r2.containsNode(curNode)) { r2.mergeRegion(r1); regionsList.remove(r1); return true; } } } } } return false; } COM: <s> checks for the existence of a region collision and if one exists merges </s>
funcom_train/44528489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace() { super.printStackTrace(); System.err.println("printStackTrace(): " + this.getClass().getName()); if (this.originalException != null) { System.err.println( "STACK TRACE FOR INNER EXCEPTION: " + this.originalException.getClass().getName()); this.originalException.printStackTrace(); } else { System.err.println( "No stack trace to print, as there was no original exception thrown."); } // if } // printStackTrace COM: <s> print the stack trace of the original exception </s>
funcom_train/37016131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable findVWESites() { Hashtable result = new Hashtable(); Collection sites = findBusinessImplementing(tModels); Iterator sitesIter = sites.iterator(); while (sitesIter.hasNext()) { BusinessInfo bInfo = (BusinessInfo)sitesIter.next(); //String name = bInfo.getName().getText(); String name = bInfo.getDefaultName().getText(); String key = bInfo.getBusinessKey(); // Yes this is reversed result.put(name, key); } return result; } COM: <s> finds all business which implements all four vwe services </s>
funcom_train/44626792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int isGeneric(String className) { if ("java.util.LinkedList".equals(className)) return 1; if ("java.util.AbstractQueue".equals(className)) return 1; if ("java.util.ArrayDeque".equals(className)) return 1; if ("java.util.Deque".equals(className)) return 1; return 0; } COM: <s> returns the number of generic type arguments </s>
funcom_train/100773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateResult() { String rangeAndSpan; if (r == null) { rangeAndSpan = I18n.getText("error"); cellModifier.updateRange(s.getRange()); } else { rangeAndSpan = r + " (n=" + r.span() + ")"; cellModifier.updateRange(r); } result.setText(I18n.getText("truncate.afterTruncating") + ": " + rangeAndSpan); } COM: <s> update after text with resultant range </s>
funcom_train/37837200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Sprite modifySprite(Sprite base, Color color, Composite blend, Object ref) { int width = base.getWidth(); int height = base.getHeight(); BufferedImage image = gc.createCompatibleImage(width, height, Transparency.BITMASK); Graphics2D g = image.createGraphics(); base.draw(g, 0, 0); g.setColor(color); g.setComposite(blend); g.fillRect(0, 0, width, height); g.dispose(); Sprite sprite = new ImageSprite(image, ref); SpriteCache cache = SpriteCache.get(); cache.add(ref, sprite); return sprite; } COM: <s> get a modified variant of a sprite </s>
funcom_train/17479628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Angle azimuthBetween(Point p) { double x = p.getX() - this.x; double y = p.getY() - this.y; double azimuth = (Math.atan2(y, x)) * 180.0/Math.PI; if (azimuth < 0) azimuth = 360 + azimuth; return new Angle(azimuth); } COM: <s> calculates the azimuth between this point and another point </s>
funcom_train/49079709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTextBox() { this.midpTextBox = new javax.microedition.lcdui.TextBox( this.title, getText(), this.maxSize, this.constraints ); this.midpTextBox.addCommand(StyleSheet.OK_CMD); this.midpTextBox.addCommand(StyleSheet.CANCEL_CMD); this.midpTextBox.setCommandListener( this ); } COM: <s> creates the text box used for the actual input mode </s>
funcom_train/4151531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStats(PlayerInfo info) { exp.setText(""+info.exp); exp.update(); h.setText(""+info.getMaxHp()); h.update(); g.setText(""+info.getGaugeRate()); g.update(); s.setText(""+info.getStrength()); s.update(); mi.setText(""+info.getMinGauge()); mi.update(); ma.setText(""+info.getMaxGauge()); ma.update(); } COM: <s> changes displayed statistics </s>
funcom_train/42527883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (gatc1CreateDataTypeItemProvider != null) gatc1CreateDataTypeItemProvider.dispose(); if (gatc1CreateElementItemProvider != null) gatc1CreateElementItemProvider.dispose(); if (gatc1GetFeatureItemProvider != null) gatc1GetFeatureItemProvider.dispose(); if (gatc1GetSubElementsItemProvider != null) gatc1GetSubElementsItemProvider.dispose(); if (gatc1IsOfTypeItemProvider != null) gatc1IsOfTypeItemProvider.dispose(); if (gatc1SetFeatureItemProvider != null) gatc1SetFeatureItemProvider.dispose(); } COM: <s> this disposes all of the item providers created by this factory </s>
funcom_train/3923360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendResponse( Request r, String response ) { //session.sendResponse( r.getClassName() + " " + response ); Request resp = new Request( r, response ); //Logger.logDebug( "Response to "+r+" is "+resp ); session.sendResponse( resp ); } COM: <s> sends the b response b back to the client br </s>
funcom_train/31361066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startClient(String host, int port) { if (!demo) { log.info("Connect to Server as a Client"); try { serverPort = port; server = CommFactory.getInstance().createServerProxy(host, port, EventController.getInstance()); } catch (CommException e) { log.error("Client-Connection to Server failed: " + e); JOptionPane.showMessageDialog(MainFrame.getInstance(), "No Connection to Server"); System.exit(5); } } } COM: <s> method start client </s>
funcom_train/2267897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandResponse doSIZE(CommandRequest request) { if (!request.hasArgument()) { return StandardCommandManager.genericResponse("RESPONSE_501_SYNTAX_ERROR"); } InodeHandle file; User user = request.getSession().getUserNull(request.getUser()); try { file = request.getCurrentDirectory().getInodeHandle(request.getArgument(), user); return new CommandResponse(213, Long.toString(file.getSize())); } catch (FileNotFoundException ex) { return StandardCommandManager.genericResponse("RESPONSE_550_REQUESTED_ACTION_NOT_TAKEN"); } } COM: <s> code size lt sp gt lt pathname gt lt crlf gt code br </s>
funcom_train/45192557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendSetStyle(String style) { StringBuilder out = openScriptBuffer(); if (out != null) { out.append("wa.setStyle('"); out.append(elementId); out.append("','"); out.append(WUtil.escapeSQuote(style)); out.append("');\n"); } } COM: <s> send a set style command to the browser </s>
funcom_train/13524242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubordination() { try{ Organization org = Unmarshaller.unmarshallOrgParam("test/staticParameters/StaticMathXML/exemple_org.xml","test/staticParameters/StaticMathXML/exemple_param.xml").getOrganization(); Actor a=org.getActor("A1"); float subordination=StaticMath.subordination(org, a); assertTrue(subordination==8); } catch(Exception e){ System.err.println("Binding error: "+e.getMessage()); assertTrue(false); } } COM: <s> test the subordination function </s>
funcom_train/33797983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushAll(OSEvent ev) { for (Iterator i = allocTable.keySet().iterator(); i.hasNext();) { BufferCacheKey key = (BufferCacheKey)i.next(); // Allocate a fresh event for each block flush(key.block, new OSEvent(ev)); } } COM: <s> flush every entries in the buffer cache to disk </s>
funcom_train/14658829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getGenerateClassFiles() { if (generateClassFiles == null) { generateClassFiles = new JButton(); generateClassFiles.setText("GenerateClass files"); generateClassFiles .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { center.generateClassFiles("12345"); } }); } return generateClassFiles; } COM: <s> this method initializes generate class files </s>
funcom_train/11648465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AuthenticationInfo doAuthenticate(AuthenticationToken authenticationToken) throws AuthenticationException { assertRealmsConfigured(); Collection<Realm> realms = getRealms(); if (realms.size() == 1) { return doSingleRealmAuthentication(realms.iterator().next(), authenticationToken); } else { return doMultiRealmAuthentication(realms, authenticationToken); } } COM: <s> attempts to authenticate the given token by iterating over the internal collection of </s>
funcom_train/4484491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SwagSwapUser findCurrentUserByEmail() { if (getCurrentUser()==null) { return null; } //emails stored in lowercase String email = getCurrentUser().getEmail().toLowerCase(); if (isBlackListed(email)) { throw new AccessDeniedException("User " + email + " is blacklisted"); } return userDao.findByEmail(email); } COM: <s> gets email from current user </s>
funcom_train/50611316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String s; s = "If \n"; for(int i=0;i<antecedents.size()-1;i++){ String cond = "\t(" + ((FuzzySet)antecedents.get(i)).getName()+ ") and \n"; s = s + cond; } s = s + "\t("+ ((FuzzySet)antecedents.get(antecedents.size()-1)).getName()+ ")\n" + "then\n"+ "\t" + consequent.getName(); return s; } COM: <s> return a string representation of this rule </s>
funcom_train/46015224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSellItemsText() { Iterator it = serverSellItems.iterator(); StringBuffer strb = new StringBuffer(); while (it.hasNext()) { strb.append(it.next()); if (it.hasNext()) { strb.append("\n"); } } return strb.toString(); } COM: <s> get all sell items in text format for printing in gui </s>
funcom_train/44137380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { g.setColor(Color.GREEN); g.drawRect(0, 0, getWidth() - 1, getHeight() - 1); g.drawRect(1, 1, getWidth() - 3, getHeight() - 3); super.paint(g); } COM: <s> to paint the component </s>
funcom_train/24538501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getColumnStartPosition(int x) { if (columnStartModelPositions != null) { for (int i = 0; i < columnModelPositions.length; i++) { int xpos = columnModelPositions[i]; if ((x >= xpos - ROW_COLUMN_SENSITIVITY) && (x <= xpos + ROW_COLUMN_SENSITIVITY)) return columnStartModelPositions[i].getCopy(); } } return new Point(0,0); } COM: <s> get column start position in model coordinates </s>
funcom_train/1066766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled(boolean value) { if (!value) disabled++; else if (--disabled == 0 && pendingSelection != null) { if( pendingSelection instanceof EditPartViewer) { // synchronize from EditPartViewer syncSelection((EditPartViewer)pendingSelection, pendingSelection.getSelection()); } else { syncSelection(pendingSelection, pendingSelection.getSelection()); } pendingSelection = null; } } COM: <s> enables or disabled synchronization between viewers </s>
funcom_train/24592430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getWaterQuality() { double waterQuality; if(groundwater < WATER_MIN_PRODUCTIVE) // not enough water but still producible waterQuality = groundwater / WATER_MIN_PRODUCTIVE; else if(groundwater < WATER_MAX_PRODUCTIVE) // good amount of water waterQuality = 1; else if(groundwater < WATER_MAX_USEFUL) // too much water but still producible waterQuality = (WATER_MAX_USEFUL - groundwater) / (WATER_MAX_USEFUL - WATER_MAX_PRODUCTIVE); else // totally too much water waterQuality = 0; return waterQuality; } COM: <s> calculate the quality of water which is used to calculate current productivity </s>
funcom_train/11663964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getContentLength() { // Check to see if this document has already been resolved, if not call getInputStream if (!inputstreamset) { try { this.getInputStream(); } catch (IOException e) { return 0; } } // Return the lenght of this document/XMLObject call return urlresult.length(); } COM: <s> returns the value of the content length header field </s>
funcom_train/44448738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToModels(SunAu sound, String text) { if (sound != null && text != "") { File f = new File(config.getAudioDir()); for (int i = 0; f.exists(); i++) { filename = config.getAudioDir() + "\\" + text + "[" + i + "]" + ".au"; f = new File(filename); } sound.save(filename); Log.println("Added recorded audio to the models"); } else { Log.println("Nothing recorded"); } } COM: <s> adds the recorded audio to the model directory </s>
funcom_train/48338355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() throws TupleException { super.validate(); if (destination == null) { throw new InvalidTupleException("Null destination for remote event (" + this + ")"); } else if (event == null) { throw new InvalidTupleException("Null event for remote event (" + this + ")"); } // Validate the embedded event. event.validate(); } COM: <s> validate this remote event </s>
funcom_train/8959689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStructure(Structure structure){ structureChangingNotify(); if (StructureMap.keySet().contains(structure.getStructureName())){ StructureMap.remove(structure.getStructureName()); } StructureMap.put(structure.getStructureName(), structure); structureChangedNotify(); } COM: <s> add a structure to the structure manager </s>
funcom_train/34950131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { if (!optimizeTransform) { return; } transform.setRotationQuaternion(worldRotation); transform.setTranslation(worldTranslation); transform.scale(worldScale); if (this.children != null) { for (Spatial child : children) { try { ((Bone) child).update(); } catch (Throwable t) { //Lazily catch class cast exception } } } } COM: <s> updates this bones use transform and then calls its children recursively </s>
funcom_train/19099675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ActionListener updateJLibSysAction( final String downloadURL ) { return new ActionListener() { public void actionPerformed(ActionEvent e) { // http://www.centerkey.com/java/browser/ Runnable r = new Runnable() { public void run() { BareBonesBrowserLaunch.openURL( downloadURL ); printString( "Opening \"" + downloadURL + "\" in web browser." ); } }; new Thread( r ).start(); } }; } COM: <s> performs the actual act of getting the new version </s>
funcom_train/7971863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension forReviewButton(ReviewButton rb, Object... param) { int size = 1; int fontsize = (int) ((size + .5) * (FONT_SIZE_MULTIPLE - 2)); return RenderingUtils.getButtonSize(rb.getText(), fontsize, rb .isBold()); } COM: <s> calculates the size of the review button </s>
funcom_train/19830157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws Exception{ synchronized (MynaThread.class){ if (this.environment.get("isCommandline") == null){ try { openidConsumerManager = new ConsumerManager(); } catch(Exception e){ handleError(e); } } loadGeneralProperties(); int max_running_threads = Integer.parseInt(generalProperties.getProperty("max_running_threads")); threadPermit = new Semaphore(max_running_threads); manageLocksPermit = new Semaphore(1,true); this.threadHistorySize = Integer.parseInt(generalProperties.getProperty("thread_history_size")); loadDataSources(); //createSharedScope(); this.isInitialized = true; } } COM: <s> init loads stanard objects settings etc </s>
funcom_train/42276941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printState() { int index = 0; for (int i = 0; i < worldHeight - 1; i++) { for (int j = 0; j < worldWidth; j++) { System.out.print(worldState[i * worldWidth + j]); } System.out.print("\n"); } System.out.println("-------------"); } COM: <s> utility methd for debuggin </s>
funcom_train/25742900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query prepScript(String filename, SqlName... fixed) throws SQLException, IOException { String sql = readScript(filename); for(SqlName sn : fixed) sql = sql.replace("@" + sn.name, sn.value); return prepStatement(sql.toString()); } COM: <s> reads a sql script from web inf scripts sql database type </s>
funcom_train/48527697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writePrimitive(double d, String field) throws IOException { writer.start("primitive"); if (field != null) writer.attribute("field", field); writer.attribute("type", "double"); writer.attribute("value", d); writer.end("primitive"); } COM: <s> method which writes a double to the stream as the given field name </s>
funcom_train/48068880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToContentEnsurePreallocating(String content, boolean safeMode) throws Exception { //checkSizeOfBodyPart(content.length()); ensurePrealocating(); long sizeAdded = 0; try { sizeAdded = addToContent(content, safeMode); } catch (Exception exception) { throw exception; } finally { handleAfterAdding(sizeAdded, Functions.getStringByteSize(content)); } } COM: <s> do the work of adding the content to the storage </s>
funcom_train/8481286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component getDraggedOverComponent(Rectangle intersect, Iterable<Component> components) { Component result = null; int highestArea = 0; for(Component component : components) { Rectangle bounds = component.getBounds(); Rectangle intersection = bounds.intersection(intersect); if(intersection.width > 0 && intersection.height > 0) { int area = intersection.width * intersection.height; if(area > highestArea) { result = component; highestArea = area; } } } return result; } COM: <s> find the component whose intersection with a given rectangle has the highest area </s>
funcom_train/2292711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllContent() { if (m_metadata.isSelfManaged()) { if (m_filteredItems != null) { return Collections.unmodifiableList(m_filteredItems); } else { return Collections.EMPTY_LIST; } } else { if (m_originalItems != null) { return Collections.unmodifiableList(m_originalItems); } else { return Collections.EMPTY_LIST; } } } COM: <s> returns all list items in the list may be not visible and sorted </s>
funcom_train/15610232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPropertyIncludedInTooltip(String targetProperty) { PropertyElement targetElement; if (propertyElements.get(targetProperty)!=null) { targetElement = (PropertyElement)propertyElements.get(targetProperty); return targetElement.getPropTooltipFlag().equalsIgnoreCase(YES); } return false; } COM: <s> method checks the setting file and returns a boolean whether the property is </s>
funcom_train/28753166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBytes(Long newVal) { if ((newVal != null && this.bytes != null && (newVal.compareTo(this.bytes) == 0)) || (newVal == null && this.bytes == null && bytes_is_initialized)) { return; } this.bytes = newVal; bytes_is_modified = true; bytes_is_initialized = true; } COM: <s> setter method for bytes </s>
funcom_train/22233613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScope(Group scope, int index) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_SCOPE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Fog7")); if (isLive()) ((FogRetained)this.retained).setScope(scope, index); else ((FogRetained)this.retained).initScope(scope, index); } COM: <s> replaces the node at the specified index in this fog nodes </s>
funcom_train/35282603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateViewProjection() { if (projectionMatrixOverride != null) { viewProjectionMatrix.set(projectionMatrixOverride).multLocal(viewMatrix); } else { //viewProjectionMatrix.set(viewMatrix).multLocal(projectionMatrix); viewProjectionMatrix.set(projectionMatrix).multLocal(viewMatrix); } } COM: <s> updates the view projection matrix </s>
funcom_train/16706823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(String filebase) throws IOException { for (int type = 0; type < keyExtensions.length; type++) { if (data[type] != null) { // System.out.println(String.format( // "writing key type %d '%s' length = %d", type, // keyNames[type], data[type].length)); write(filebase, type); } } } COM: <s> write all key information loaded to the filebase </s>
funcom_train/31022324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSeparator(Composite container, String name, String description) { factory.createLabel(container,""); Label label = factory.createHeadingLabel(container,name); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 3; label.setLayoutData(gd); label = factory.createSeparator(container,SWT.HORIZONTAL); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 3; label.setLayoutData(gd); if ( description != null ) { label = factory.createLabel(container,description,SWT.WRAP); gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 3; label.setLayoutData(gd); } } COM: <s> add a separator with description </s>
funcom_train/2886187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void injectTestContext(TestSuite tests, HashMap<String, Object> context) { Enumeration<?> t = tests.tests(); while (t.hasMoreElements()) { Test test = (Test) t.nextElement(); injectTestContext(test, context); } } COM: <s> inject the test context into every test that expects it </s>
funcom_train/13536970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeBounds(Object cell, Map propertyMap, Rectangle r) { AttributeMap map; if (propertyMap == null || !propertyMap.containsKey(cell)) { map = new AttributeMap(); GraphConstants.setBounds(map, r); propertyMap.put(cell, map); } else { map = (AttributeMap) propertyMap.get(cell); GraphConstants.setBounds(map, r); } } COM: <s> replaces bounding rectangle of given cell in property map object with </s>
funcom_train/48661473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Section getSection(String handle) throws ITunesUException { String xml = this.showTree(handle); String pattern = "//Section[Handle=" + handle + "]"; Element element = getElementByXPath(xml, pattern); if (element == null) { throw new ITunesUException("not a Section handle"); } return Section.fromXmlElement(element); } COM: <s> retrieves a section by its handle </s>
funcom_train/42262365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void leaveBallAndBackOnField() { if (!ball.isVisible()) { // one of the robot possess ball, has to live it int robotWithABall = Camera.getInstance().whoHasABall(); Robot robot = robots.get(robotWithABall); robot.liveBall(); ball.setVisible(); } backOnField(); } COM: <s> checks if some robot is out of play with a ball </s>
funcom_train/9055074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllCoefficientEntries() { return mDb.query(COEFFICIENTS_DATABASE_TABLE, new String[] {KEY_COEFFICIENTS_ROWID, KEY_COEFFICIENTS_TABLEID, KEY_COEFFICIENTS_NITROLEVEL, KEY_COEFFICIENTS_DEPTH, KEY_COEFFICIENTS_ADDEDTIME, KEY_COEFFICIENTS_MAXTIME}, null, null, null, null, null); } COM: <s> return a cursor over the list of all coefficient entries in the database </s>
funcom_train/30164183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compress(boolean vebose) throws FileNotFoundException, IOException { ZipOutputStream zos = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(archiveFile))); ZipEntry entry = null; File [] files = sourceDir.listFiles(); for (int i = 0; i < files.length; i++) { if(files[i].isDirectory())compress(zos,files[i],vebose); else { if(vebose)System.out.println(files[i]); entry = new ZipEntry(getPath(files[i])); zos.putNextEntry(entry); compress(zos,files[i]); } } zos.finish(); zos.close(); } COM: <s> opens up the zip and extracts the files to the temp dir </s>
funcom_train/3785682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getStateValue(String key, int def) { /* getStateValue */ String sVal= getStateValue(key, null); int val; if(sVal==null) return(def); try { Integer valP= new Integer(sVal); val= valP.intValue(); } catch(NumberFormatException e) { val= def;} return(val); } /* getStateValue */ COM: <s> get state value get int param and use default if not found </s>
funcom_train/18024170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintBorder(Graphics g) { super.paintBorder(g); if (onHover) { Graphics2D g2 = (Graphics2D)g.create(); Stroke thick = new BasicStroke(3.0f); g2.setStroke(thick); g2.setColor(Color.GRAY); g2.drawRect(1, 1, getWidth() - 2, getHeight() - 2); g2.dispose(); } } COM: <s> paints the components border </s>
funcom_train/18067836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatusText(String newMsg) { newMsg = truncateText(newMsg); newStatusText = newMsg; if(textFader.isRunning()) { textFader.stop(); } textFading = true; // System.out.println("text fader isRunning? "+textFader.isRunning()); textFader.start(); } COM: <s> updates the status text </s>
funcom_train/43895735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDescendedFrom(URI nsURI, String typeName1) { for (int i = 0, ii = ancestors.length; i < ii; i++) { if (((nsURI == null) || ancestors[i].getNamespace().equals(nsURI)) && ancestors[i].getTypeName().equals(typeName1)) { return true; } } return false; } COM: <s> test to determine whether this feature type is descended from the given </s>
funcom_train/41246176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attributeRemoved(HttpSessionBindingEvent event) { if (event.getName().equals(EVENT_KEY) && !isAnonymous()) { SecurityContext securityContext = (SecurityContext) event .getValue(); UserDetails userDetails = (UserDetails) securityContext .getAuthentication().getPrincipal(); // User user = (User) userDetails; removeUsername(new User(userDetails.getUsername())); } } COM: <s> when users logout remove their name from the hash map </s>
funcom_train/17361239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRightHandSide() { System.out.println("getRightHandSide"); MathematicalFormulaDto instance = new MathematicalFormulaDto(); BigDecimal expResult = null; BigDecimal result = instance.getRightHandSide(); 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 right hand side method of class mathematical formula dto </s>
funcom_train/29018170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deselect (int index) { checkWidget (); /* * An index of -1 will apply the change to all * items. Ensure that index is greater than -1. */ if (index < 0) return; LVITEM lvItem = new LVITEM (); lvItem.stateMask = OS.LVIS_SELECTED; ignoreSelect = true; OS.SendMessage (handle, OS.LVM_SETITEMSTATE, index, lvItem); ignoreSelect = false; } COM: <s> deselects the item at the given zero relative index in the receiver </s>
funcom_train/15741488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeStream(Stream stream) { if (stream.isClosed()) return; StreamSession session = stream.getSession(); StreamClose closeDescription = new StreamClose( stream instanceof InputStream, stream.streamID()); if (sender != null) sender.sendPacket(session.getTransferDescription(), StreamMetaPacketData.CLOSE.serializeInto(closeDescription), null); } COM: <s> closes the given stream and marks at the sink source at receiver that </s>
funcom_train/24038716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { try { clientsManager.done(); clientsManager.close(); database.closeDatabaseJoint(); serverSocket.close(); started = false; ui.newMessage("Server succesfully stopped"); } catch (IOException ex) { ui.newMessage("Error closing server resources..."); } } COM: <s> stop the server </s>
funcom_train/3381760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(File file2) { if (file2 == null || !(file2 instanceof ShellFolder) || ((file2 instanceof ShellFolder) && ((ShellFolder)file2).isFileSystem())) { if (isFileSystem()) { return super.compareTo(file2); } else { return -1; } } else { if (isFileSystem()) { return 1; } else { return getName().compareTo(file2.getName()); } } } COM: <s> compares this shell folder with the specified shell folder for order </s>
funcom_train/18131552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeUsesRelation(WorkflowDataModel dataModel, Uses uses) { EBioFlowGraphModel model = EBioFlowUIGraphCorePlugin.getInstance() .getGraphModelController().getGraphModel( dataModel.getWorkflow()); GraphCell cell = model.getGraphCell(uses); model.edit(null, new Object[] { cell }, null, null, null, null); } COM: <s> method for removing the use relation </s>
funcom_train/3872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean write(BufferedWriter writer, String tag) throws IOException { if (doc == null) { logger.warn("Attempt to write a null XML document."); return false; } writer.write(tag); writer.write(NEW_LINE); writer.write(getDocTypeString()); writer.write(getDocumentNode(doc.getDocumentElement(), "")); return true; } COM: <s> write the document to an output writer </s>
funcom_train/25351853
/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 ("progress" == evt.getPropertyName()) { int progress = (Integer) evt.getNewValue(); progressBar.setIndeterminate(false); progressBar.setValue(progress); taskOutput.append(String.format( "Completed %d%% of task.\n", progress)); } } COM: <s> invoked when tasks progress property changes </s>
funcom_train/42134409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getContentLength() { String len = getHeader(Headers.RTSP_CONTENT_LENGTH); if ((len == null) || (len.length() == 0)) { contentLength = 0; } else { contentLength = Integer.valueOf(len).intValue(); } return contentLength; } COM: <s> returns the content length header </s>
funcom_train/51068603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleRoutingTableAvailable( RoutingTable.Available msg ) { final String tag = class_tag+".handleRoutingTableAvailable"; if( DEBUG ) { Debug.printtagln( tag, "called with: \n" + msg.table ); if( routing_table != null ) { Carp.die( "got two versions of the routing table." ); } } routing_table = msg.table; faults = new LinkedList(); digits_per_guid = routing_table.digits_per_guid(); digit_values = routing_table.digit_values(); } COM: <s> save a reference to the routing table </s>
funcom_train/14329401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_tcpNoDelay() { String fieldName = "tcpNoDelay"; String messageKey = Driver.TCPNODELAY; String expectedValue = DefaultProperties.TCP_NODELAY; assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, expectedValue); if (!isOnlySqlServerTests()) { assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, expectedValue); } } COM: <s> test the code tcp no delay code property </s>
funcom_train/16849340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteQuake(long quakeid) { PreparedStatement ps = null; try { ps = DB.prepare(DELETE_DUPLICATE); ps.setLong(1, quakeid); ps.executeUpdate(); } catch (SQLException ex) { throw new SeismoException(ex); } finally { DB.cleanUp(ps); } } COM: <s> deletes the quake record with the given id </s>