__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19615454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Point[] polygon, int fillColor, boolean stroke) { int[] x = new int[polygon.length]; int[] y = new int[polygon.length]; m_applet.fill(fillColor); if (!stroke) { m_applet.noStroke(); } m_applet.beginShape(); for (int i = 0; i < polygon.length; i++) { x[i] = (int) polygon[i].coord(0); y[i] = (int) polygon[i].coord(1); m_applet.vertex(x[i], y[i]); } m_applet.endShape(); } COM: <s> draw a polygon </s>
funcom_train/40334804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double pdf(double x) { if (x >= 0) { return (x / Math.pow(params[ALPHA], 2d) * Math.exp(-Math.pow(x, 2d)) / (2 * Math.pow(params[ALPHA], 2d))); } else { return 0; } } COM: <s> returns the value of the probability distribution function at x </s>
funcom_train/37565855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addFile(UTF8 src, Block blocks[]) { waitForReady(); // Always do an implicit mkdirs for parent directory tree mkdirs(new File(src.toString()).getParent()); if (unprotectedAddFile(src, blocks)) { logEdit(OP_ADD, src, new ArrayWritable(Block.class, blocks)); return true; } else { return false; } } COM: <s> add the given filename to the fs </s>
funcom_train/2583714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forceRedraw() { Event ev = new Event(); ev.gc = new GC(this.canvas); ev.x = 0; ev.y = 0; ev.width = this.canvas.getBounds().width; ev.height = this.canvas.getBounds().height; ev.count = 0; this.canvas.notifyListeners(SWT.Paint, ev); ev.gc.dispose(); } COM: <s> forces a redraw of the canvas by invoking a new paint event </s>
funcom_train/44819376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateByListForm(IListForm listForm) throws ApplicationException { // ONLY FOR ADD OR COPY MODE if (! (listForm.isAddMode() || listForm.isCopyMode())) { return; } Object itemEntity = getItemEntityFromListForm(listForm); doUpdateItem(itemEntity, listForm.getMode()); } COM: <s> update this form by list form </s>
funcom_train/43501765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIncluded(String rePattern) { try { this.includeRE = (rePattern == null) ? null : new RE(rePattern); log.info("Setting includes regular expression to: " + rePattern); } catch (RESyntaxException rese) { log.error("Error parsing regular expression: " + rese); } } COM: <s> sets the include regular expression </s>
funcom_train/17622999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void acceptTraverser(IGraphTraverser<KT, NI, LI> traverser) { traverser.acceptGraph(this); for (INode<NI, LI> n : this.nodes.values()) { traverser.acceptNode(n); for (ILink<LI, NI> l : n.getLinks()) { traverser.acceptLink(l, n); } } } COM: <s> accepts a graph traverser and has that traverser visit this graph </s>
funcom_train/9819377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { cycle_count = 0; msg = ""; if (verbosity == 2) System.out.print("\nReset cycle :"); for (int input_index=0; input_index<input_vectors.length; input_index++) { driveInput(input_index, 0, 0); } if (verbosity == 2) System.out.println(); cycle_count++; } COM: <s> performs the reset cycle test behavior of the library test </s>
funcom_train/44844631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String toString = ""; if (_subject == null) { toString += "*"; } else { toString += _subject.toString(); } toString += ", "; if (_predicate == null) { toString += "*"; } else { toString += _predicate.toString(); } toString += ", "; if (_object == null) { toString += "*"; } else { toString += _object.toString(); } return toString; } COM: <s> returns string representation of bmstatement </s>
funcom_train/3683417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParameterEncoding() throws PortletContainerException { HttpServletRequest request = new MockServletRequest(new MockHttpSession(), Locale.US,false); HttpServletResponse response = new MockServletResponse(new EmptyResponse()); ((ExoWindowID)input.getWindowID()).setPortletName("PortletToTestParameterEncoding"); RenderOutput o = portletContainer.render(request, response, input); assertTrue(new String(o.getContent()).startsWith("Everything is ok")); } COM: <s> test xxx the portlet container must x www form urlencoded encode parameter </s>
funcom_train/3830171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate( double[] d ) { try { for ( int i = 0; i < segments.size(); i++ ) { GM_Position[] pos = getCurveSegmentAt( i ).getPositions(); for ( int j = 0; j < pos.length; j++ ) { pos[j].translate( d ); } } } catch ( Exception e ) { } setValid( false ); } COM: <s> translate each point of the curve with the values of the submitted </s>
funcom_train/11650564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createPortPanel() { JPanel portPanel = new JPanel(new BorderLayout(5, 0)); JLabel label = new JLabel(JMeterUtils.getResString("port")); // $NON-NLS-1$ label.setLabelFor(port); portPanel.add(label, BorderLayout.WEST); portPanel.add(port, BorderLayout.CENTER); return portPanel; } COM: <s> this will create the port panel in the ldap config gui </s>
funcom_train/37062760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRearCWString() { StringBuffer buf = new StringBuffer(50); int num = simulationGears.getRearChainWheels().length; for ( int i=0; i<num; i++ ) { buf.append( simulationGears.getRearChainWheels()[i] ); if ( i< num-1) buf.append( DELIM_1 ); } return buf.toString(); } COM: <s> get the string with gears rear chainwheels </s>
funcom_train/33150194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteFileOrDirectory ( Set deletedSet, Set addedSet, Set modifiedSet ) throws IOException { String fn = selectFile () ; if ( fn == null ) return ; File f = new File ( fn ) ; deleteFileOrDirectory ( f, deletedSet, addedSet, modifiedSet ) ; } COM: <s> select a file import directory to delete </s>
funcom_train/41878156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addStatesToReachable(int check) { for (int j = 0; j < inputAlphabet.getSizeOfAlphabet(); j++) { Transition tr = getTransition(transitionTable[check][j]); if (!reachableStates.contains(tr.getToState())) { reachableStates.add(tr.getToState()); } } } COM: <s> if state reachable then each state which is reachable from given state </s>
funcom_train/8011989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPopupLookupComponentRow() { String callingController = getParameter(HtmlLookUpComponent.PARAM_LOOKUP_CONTROLLER); int luRow = -1; if (callingController != null) { try { JspController otherCont = (JspController) getSession().getAttribute(callingController); if (otherCont != null) { luRow = Integer.parseInt(getParameter(HtmlLookUpComponent.PARAM_LOOKUP_ROW)); } } catch (Exception ex) { } } return luRow; } COM: <s> obtains the lookup component row that called this page </s>
funcom_train/46337033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OpbGroupMemberWrapper wrapArg(final Object o) { final String methodName = "wrapArg(Object)"; if (o instanceof OpbGroupMemberWrapper) { logger.logp(Level.FINER, CLASS_NAME, methodName, "found wrapper"); return (OpbGroupMemberWrapper) o; } else { logger.logp(Level.FINER, CLASS_NAME, methodName, "wrapping object"); reUseableArgWrapper.setValue(o); return reUseableArgWrapper; } } COM: <s> used to optionally wrap o with re useable arg wrapper </s>
funcom_train/25202430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeGroup(String tag) throws GeneralException { State state = stack.pop(); fontNo = state.getFont(); color = state.getColor(); fontSize = state.getFontSize(); try { put(tag); put("}"); } catch (IOException e) { throw new GeneralException(e); } COM: <s> emit the instruction to close a rtf group and restore the </s>
funcom_train/42818596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initForTracking() throws Exception { captureWidth = Integer.parseInt(prop.getProperty("webcam.width")); captureHeight = Integer.parseInt(prop.getProperty("webcam.height")); framerate = Integer.parseInt(prop.getProperty("webcam.frameRate")); doInit(); } COM: <s> initialises the webcam with a small image capture </s>
funcom_train/2603404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNumber() { String strNum = ""; if (Double.compare(Math.floor(number), number) == 0) { int intNum = (int)number; strNum = Integer.toString(intNum); } else { strNum = Double.toString(number); } return strNum; } COM: <s> returns the number </s>
funcom_train/47184333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addNDCode(MedicationBean med) throws FormValidationException { validator.validate(med); try { if (ndDAO.addNDCode(med)) { return "Success: " + med.getNDCode() + " - " + med.getDescription() + " added"; } else return "The database has become corrupt. Please contact the system administrator for assistance."; } catch (DBException e) { e.printStackTrace(); return e.getMessage(); } catch (iTrustException e) { return e.getMessage(); } } COM: <s> adds a new nd code prescription to the list </s>
funcom_train/26104361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showSoftKeyboard(View triggerView) { if (Log.DEBUG) Log.v("showSoftKeyboard()"); if (inputManager == null) { inputManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); } inputView = triggerView; inputManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); } COM: <s> show the soft keyboard and store the view that triggered it </s>
funcom_train/45863894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { errorCount = 0; if (con != null) { running = true; } if (DEBUG) { if (running) { System.out.println("Server thread running"); } else { System.out.println("Server thread NOT started"); } } while (running) { try { if (USE_L2CAP) { l2capCon.receive(recvBuffer); } else { streamRecv.readFully(recvBuffer); } errorCount = 0; } catch (Exception e) { errorCount++; } if (errorCount > MAX_ERRORS) { running = false; } } close(); } COM: <s> reads the blocking client data </s>
funcom_train/1303119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveChildrenTo(Tree<T> newParent) { if (this.children != null && this.children.size() > 0) { final List<Tree<T>> children = new ArrayList<Tree<T>>(this.children); for (Tree<T> child : children) { child.prune(true, true); newParent.addChild(child); } } } COM: <s> move this nodes children to another parent </s>
funcom_train/36105616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem1() { if (stringItem1 == null) {//GEN-END:|46-getter|0|46-preInit // write pre-init user code here stringItem1 = new StringItem("Destinatario :", getMemory("last_dest"));//GEN-LINE:|46-getter|1|46-postInit // write post-init user code here }//GEN-BEGIN:|46-getter|2| return stringItem1; } COM: <s> returns an initiliazed instance of string item1 component </s>
funcom_train/1174184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getKeywordMagnitude(String k) { int count = 0; ArrayList<String> keywords = getKeyword(); for (String kw : keywords) { if (kw.startsWith(k)) { String[] parse = kw.split(" "); String s = parse[1]; count += Integer.parseInt(s); } } return count; } COM: <s> p get keyword magnitude </s>
funcom_train/14421616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreePath getPathFromString(String stringPath, Display display) { String[] elements = stringPath.split("//"); if (elements.length <= 1) return null; Widget[] treePath = new Widget[elements.length - 1]; Object parent = display; for (int i = 1; i < elements.length; i++) { String token = elements[i]; String[] pathElements = token.split("/"); parent = getParent(treePath, parent, i, pathElements); } return new TreePath(treePath); } COM: <s> converts the string to an object representation </s>
funcom_train/17828180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStyle() { /* * If there is a connection, then the connection is the definitive * source of the style name. */ if (this.connection != null) { return connection.getStyle().getName(); } else { return getRendererManager().getDefaultRenderer(); } } COM: <s> returns the current display style </s>
funcom_train/14245136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MMessage buildMessage(MCollaboration collab, MAssociationRole role) { MInteraction inter = null; if (collab.getInteractions().size() == 0) { inter = buildInteraction(collab); } else { inter = (MInteraction)(collab.getInteractions().toArray())[0]; } return buildMessage(inter, role); } COM: <s> builds a message within some collaboration </s>
funcom_train/41431189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAvatarHash() { byte[] bytes = getAvatar(); if (bytes == null) { return null; } MessageDigest digest = null; try { digest = MessageDigest.getInstance("SHA-1"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } digest.update(bytes); return StringUtils.encodeHex(digest.digest()); } COM: <s> returns the sha 1 hash of the avatar image </s>
funcom_train/7722515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object key) { if(key == null) { return null; } Class clss = null; if(key instanceof Class) { clss = (Class)key; } else { clss = key.getClass(); } Object obj = super.get(clss); if(obj == null) { // if this is null, let's go up the inheritence tree obj = getInterfaces(clss); if(obj == null) { obj = getSuperclass(clss); } } return obj; } COM: <s> get the object from the map </s>
funcom_train/23730969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertCrop (){ convertCommand = configurationReader.getConvertDir()+slash+convert+space+convertCrop+space+ rectangle.width+ics+rectangle.height+plus+rectangle.x+plus+ rectangle.y+space+sourceFile+space+ configurationReader.getJOcradDir()+slash+tempFile; return convertCommand; } COM: <s> the methos is called only when is used ocr on selection </s>
funcom_train/48407361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOwnedProcessMemberPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProcessPackage_ownedProcessMember_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProcessPackage_ownedProcessMember_feature", "_UI_ProcessPackage_type"), SpemxtcompletePackage.eINSTANCE.getProcessPackage_OwnedProcessMember(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the owned process member feature </s>
funcom_train/13187547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLastMillisecond(Calendar calendar) { int eom = SerialDate.lastDayOfMonth(this.month, this.year.getYear()); Day last = new Day(eom, this.month, this.year.getYear()); return last.getLastMillisecond(calendar); } COM: <s> returns the last millisecond of the month evaluated using the supplied </s>
funcom_train/11728235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPathColumn() throws Exception { setUpFullTextTest(); QueryResult result = execute(getFullTextStatement()); RowIterator rows = result.getRows(); if (getSize(rows) < 1) { fail("Query result did not return any nodes"); } // re-aquire rows rows = result.getRows(); // test mere existence rows.nextRow().getValue(jcrPath); } COM: <s> test if the jcr path pseudo property is contained in result </s>
funcom_train/31028200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killSession(SessionID sessionID) { if(this.isConnected()) { try { RMISessionManager sessionManager = (RMISessionManager)this.getSubSystemCore(); sessionManager.killSession(sessionID); } catch (RemoteException e) { Connector.reportLostCore(this.getSubSystemID()); } } } COM: <s> tells the listener to kills the session with the specific session id </s>
funcom_train/35310902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { int tabCount = getTabCount(); StringBuilder buffer = new StringBuilder("[ "); for(int counter = 0; counter < tabCount; counter++) { if(counter > 0) buffer.append(" - "); buffer.append(getTab(counter).toString()); } buffer.append(" ]"); return buffer.toString(); } COM: <s> returns the string representation of the set of tabs </s>
funcom_train/2969928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAll() { System.out.println("addAll"); addAllAssert(Arrays.asList("1", "2")); assertEquals(2, instance.size()); addAllAssert(Arrays.asList("3")); assertEquals(3, instance.size()); addAllAssert(Arrays.asList("4", "5")); } COM: <s> test of add all method of class limited sorted set </s>
funcom_train/8322635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDataSource() { jdbcDriverClassName = workbenchProperties.getProperty("jdbcDriverClassName"); jdbcConnectionUrl = workbenchProperties.getProperty("jdbcConnectionUrl"); jdbcUsername = workbenchProperties.getProperty("jdbcUsername"); jdbcPassword = workbenchProperties.getProperty("jdbcPassword"); } COM: <s> initialize the data source from a property file </s>
funcom_train/177307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringStats() { String stats = ""; if (!Double.isNaN(bestFitness)) { stats += "Best fitness: " + bestFitness + "\nBest position: \t["; for (int i = 0; i < bestPosition.length; i++) stats += bestPosition[i] + (i < (bestPosition.length - 1) ? ", " : ""); stats += "]\nNumber of evaluations: " + numberOfEvaliations + "\n"; } return stats; } COM: <s> return a string with some very basic statistics </s>
funcom_train/24380397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createMathMLObjectFactory() throws JAXBException { MQMain.logger.info("Creating MathML object factory."); mathmlObjectFactory = new org.w3._1998.math.mathml.ObjectFactory(); mathmlJC = JAXBContext.newInstance("org.w3._1998.math.mathml", getClass().getClassLoader()); } COM: <s> creates the math ml object factory </s>
funcom_train/37742856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected WfAuditEvent auditEventBase(String eventType) { return new DefaultAuditEvent (toProcess(), eventType, getPaKey(), getPaName(), getPaProcessMgrName(), getPaProcessMgrVersion(), getPaAuditEventSelection(), getPaStoreAuditEvents()); } COM: <s> returns an audit event object with process relevant information </s>
funcom_train/4305183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move(Sprite sprite, double startP, double endP, int duration) { moveAsFixed(null, sprite, false, CoreMath.toFixed(startP), CoreMath.toFixed(endP), duration, null, 0); } COM: <s> moves a sprite along this path </s>
funcom_train/168992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer("--- NtPlayerPosition - " + name + " (" + playerId + ") ---"); sb.append("\n\trole / posi / behaviour: " + roleId + " / " + positionCode + " / " + behaviour); sb.append("\n\tRatingstars: " + ratingStars); return sb.toString(); } COM: <s> overwritten to string </s>
funcom_train/24090098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanParameter(String parameterName) { final String parameterValue = this.parameterMap.get(parameterName) .getValue(); if (parameterValue == null) { throw new NoSuchElementException(String.format("Could not find a " + "parameter with the name '%s'", parameterName)); } return Boolean.parseBoolean(parameterValue); } COM: <s> read a boolean parameter value from the parameter with the name specified </s>
funcom_train/42641394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(UimaContext aContext) throws ResourceInitializationException { super.initialize(aContext); String modelFile; modelFile = (String) aContext.getConfigParameterValue(MODEL_FILE_PARAM); try { tokenizer = new opennlp.tools.lang.english.Tokenizer(modelFile); } catch (IOException e) { throw new ResourceInitializationException(e); } } COM: <s> initialize the annotator </s>
funcom_train/7684053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyParse() { Address[] result; // null input => empty array result = Address.parse(null); assertTrue("parsing null address", result != null && result.length == 0); // empty string input => empty array result = Address.parse(""); assertTrue("parsing zero-length", result != null && result.length == 0); } COM: <s> simple quick checks of empty input edge conditions for parse </s>
funcom_train/4852748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here okCommand = new Command("Calcular", Command.OK, 0);//GEN-LINE:|49-getter|1|49-postInit }//GEN-BEGIN:|49-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/36759080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRootIndex(String semanticsTableName, int sentenceID) throws Exception{ String sql = "SELECT DISTINCT root_index FROM "+semanticsTableName+" WHERE sentence_id = " + sentenceID; ResultSet srs = executeQuery(sql); srs.first(); String root_index = srs.getString("root_index"); return root_index; } COM: <s> return the individual associated with the root of the derivation for a sentence </s>
funcom_train/2921598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(final String[] args) throws IOException { // args[0] is the class name final int port = findPort(args); try { connection.connect(port); } catch (final ConnectException e) { throw new IOException("Couldn't establish connection to Debugger on port " + port); } try { final RuntimeHandlerManager handler = new RuntimeHandlerManager(this); handler.setConnection(connection); handler.startListener(); } catch (final Exception e) { connection.close(); if (e instanceof RuntimeException) throw (RuntimeException) e; throw (IOException) e; } } COM: <s> open the connection to a debug server framework e </s>
funcom_train/4150919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStats() { // create stats based on PlayerInfo if (info == null) info = PlayerInfoManager.get(name); maxHp = info.getMaxHp(); strengthMult = info.getAttackMultiplier(); minGauge = info.getMinGauge(); maxGauge = info.getMaxGauge(); gaugeRate = info.getScaledGauge(); } COM: <s> set traits for all characters of this type based on </s>
funcom_train/42069596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initGUI(){ f = new JFrame(); l = new JLabel(); f.getContentPane().add(l); f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); f.setVisible(true); f.setSize(IMAGE_WIDTH, IMAGE_HEIGHT); } COM: <s> creates the graphical interface components and initialises them </s>
funcom_train/37822187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColumnWidth() { for (JTable table : p0Tables) { table.getColumnModel().getColumn(0).setPreferredWidth(200); for (int i = 1; i < table.getModel().getColumnCount(); i++) { table.getColumnModel().getColumn(i).setPreferredWidth(120); } } } COM: <s> sets all table columns to a predefined width </s>
funcom_train/17292391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() throws JspException { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String[] result = roles.split(ROLE_DELIMITER); for (String string : result) { if (!request.isUserInRole(string.trim())) { return SKIP_BODY; } } return EVAL_BODY_INCLUDE; } COM: <s> need to have all the roles specified for the body to be evaluated </s>
funcom_train/46456023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveObject(XMLControl control, Object obj) { super.saveObject(control, obj); InteractiveCircle circle = (InteractiveCircle) obj; control.setValue("interaction enabled", circle.enableInteraction); control.setValue("measure enabled", circle.enableInteraction); } COM: <s> saves the interactive circles data in the xml control </s>
funcom_train/43531672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Shipping entity) { Logger.info(getClass(),"deleting Shipping instance"); try { entity = entityManager.getReference(Shipping.class, entity.getSid()); entityManager.remove(entity); Logger.info(getClass(),"delete successful"); } catch (RuntimeException re) { Logger.error(getClass(),"delete failed"); throw re; } } COM: <s> delete a persistent shipping entity </s>
funcom_train/3097872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Format getCacheFormat() { if (this.cacheFormat == null) { if (this.cacheFormatStr == null) { throw new IllegalStateException( "Cache Format is null: should not be possible"); } this.cacheFormat = new Format(this.cacheFormatStr); this.cacheFormat.setProject(getTaskInfo().getProject()); } return this.cacheFormat; } COM: <s> returns the caches format which may be lazy loaded </s>
funcom_train/6217696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspException{ HttpSession session = pageContext.getSession(); // forwarded ? if (_forward){ //remove Validation pageContext.getSession().removeAttribute(VALIDATION); } else{ //save Validation into session pageContext.getSession().setAttribute(VALIDATION, _validation); //print closing form tag try{ pageContext.getOut().write("</form>"); } catch (Exception e){ throw new JspException(e.getMessage()); } } return super.doEndTag(); } COM: <s> finalize validation or put parmeter validation into session </s>
funcom_train/51647564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getDPI() { checkDevice(); int resolution = OS.gtk_print_settings_get_resolution(settings); if (DEBUG) System.out.println("print_settings.resolution=" + resolution); //TODO: Return 72 (1/72 inch = 1 point) until gtk bug 346245 is fixed //TODO: Fix this: gtk_print_settings_get_resolution returns 0? (see gtk bug 346252) if (true || resolution == 0) return new Point(72, 72); return new Point(resolution, resolution); } COM: <s> returns a point whose x coordinate is the horizontal </s>
funcom_train/34898889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFocusPIPElet(PIPElet gwaplet) { //for each tab (the first tab is the bossWindow for(int i = 1; i < root.getWidgetCount(); i++){ //get the widget/Composite/PIPEletView's controller PIPElet g = pipeletViews.get(i - 1).getController(); //check the controller of it against this gwaplet //if it's the same, then select this tab if(g == gwaplet){ root.selectTab(i); break; } } } COM: <s> puts the focus of the screen on this gwaplets view </s>
funcom_train/39561083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int destroy() { int returnValue = 0; for (int retries=0; retries<3; retries++) { process.destroy(); try { process.waitFor(); } catch (InterruptedException e) { // Don't care } try { returnValue = process.exitValue(); end = true; break; } catch (Throwable t) { t.printStackTrace(); waitSome(); } } return returnValue; } COM: <s> destroy the process </s>
funcom_train/12186964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String asString(Calendar calendar) { String result = ""; if (calendar != null) { final TimeZone tz = calendar.getTimeZone(); if (UTC.equals(tz)) { result = "Z"; } else { int offsetMillis = calendar.get(Calendar.ZONE_OFFSET); result = createZone(offsetMillis); } } return result; } COM: <s> convert the provided calendar to the string representation of its </s>
funcom_train/17206592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void send(int event, int numTiles) { if (changed) { serverSpace.startCommunication(); for (int i = 0; i < MAX_STREAMS; i++) if (streams[i] != null) streams[i].send(event, numTiles); serverSpace.sendControls(this, numTiles); serverSpace.endCommunication(); } } COM: <s> send all the streams for this space if it has changed </s>
funcom_train/7674821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProtoIdItem intern(Prototype prototype) { if (prototype == null) { throw new NullPointerException("prototype == null"); } throwIfPrepared(); ProtoIdItem result = protoIds.get(prototype); if (result == null) { result = new ProtoIdItem(prototype); protoIds.put(prototype, result); } return result; } COM: <s> interns an element into this instance </s>
funcom_train/42157155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getContentPanel() { if (contentPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.anchor = GridBagConstraints.NORTHWEST; gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; contentPanel = new JPanel(); contentPanel.setPreferredSize(new Dimension(400, 300)); contentPanel.setLayout(new GridBagLayout()); contentPanel.add(getMainHorizontalSplitPane(), gridBagConstraints); } return contentPanel; } COM: <s> this method initializes content panel </s>
funcom_train/44715164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyAddDependency(Task task) { if ( s_log.isDebugEnabled() ) { s_log.debug("Adding finish listener for " + task.getID() + " for task " + getID()); } task.addFinishedListener(this); if (this.isNew()) { this.save(); } task.save(); } COM: <s> notify that dependency has been added </s>
funcom_train/41794769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildClassifier(Instances data) throws Exception { // can classifier tree handle the data? getCapabilities().testWithFail(data); // remove instances with missing class data = new Instances(data); data.deleteWithMissingClass(); Random random = new Random(m_seed); data.stratify(numSets); buildTree(data.trainCV(numSets, numSets - 1, random), data.testCV( numSets, numSets - 1), false); if (pruneTheTree) { prune(); } if (m_cleanup) { cleanup(new Instances(data, 0)); } } COM: <s> method for building a pruneable classifier tree </s>
funcom_train/2901940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTable(String t, Vector fields) { DefaultMutableTreeNode child = new DefaultMutableTreeNode(t); rootNode.add(child); for(int i = 0; i < fields.size(); i++) { DefaultMutableTreeNode newField = new DefaultMutableTreeNode(fields.elementAt(i)); child.add(newField); } } //}}} //{{{ addTable() COM: <s> adds a table to the tree </s>
funcom_train/19323114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCoreMoudleConfig() { CoreModuleConfiguration coreModuleConfig = null; CoreModuleConfiguration coreModuleConfig2 = null; try { coreModuleConfig = ConfigurationManager.getCoreMoudleConfiguration(); coreModuleConfig2 = ConfigurationManager.getCoreMoudleConfiguration(); assertEquals(coreModuleConfig, coreModuleConfig2); } catch (CoreModuleConfigurationException e) { e.printStackTrace(); } } COM: <s> class to test for core module configuration get core moudle config </s>
funcom_train/49199769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LinkLinkAssociation_target_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LinkLinkAssociation_target_feature", "_UI_LinkLinkAssociation_type"), ExhibitionPackage.Literals.LINK_LINK_ASSOCIATION__TARGET, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the target feature </s>
funcom_train/38514201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJrdoRetentionFactor() { if (jrdoRetentionFactor == null) { jrdoRetentionFactor = new JRadioButton(); jrdoRetentionFactor.setBounds(new Rectangle(8, 108, 201, 17)); jrdoRetentionFactor.setText("Retention factor of:"); jrdoRetentionFactor.setActionCommand("Plot retention factor"); jrdoRetentionFactor.setBackground(Color.white); } return jrdoRetentionFactor; } COM: <s> this method initializes jrdo retention factor </s>
funcom_train/4364247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getDefaultConfigFile() { String basename = null; String path = getPath(); if (path.equals("")) { basename = "ROOT"; } else { basename = path.substring(1).replace('/', '#'); } return (basename + ".xml"); } COM: <s> given a context path get the config file name </s>
funcom_train/42068298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSmpteFormatPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkSampler_smpteFormat_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkSampler_smpteFormat_feature", "_UI_ChunkSampler_type"), WavPackage.Literals.CHUNK_SAMPLER__SMPTE_FORMAT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the smpte format feature </s>
funcom_train/4194734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void listen() { ua.printLog("UAS: WAITING FOR INCOMING CALL"); if (!ua.user_profile.audio && !ua.user_profile.video) ua.printLog("ONLY SIGNALING, NO MEDIA"); ua.listen(); printOut("digit the callee's URL to make a call or press 'enter' to exit"); } COM: <s> receives incoming calls auto accept </s>
funcom_train/13586878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeKml(final String filename, final KmlType kml) { try { ZipEntry ze = new ZipEntry(filename); ze.setMethod(ZipEntry.DEFLATED); this.zipOut.putNextEntry(ze); try { marshaller.marshal(kmlObjectFactory.createKml(kml), out); } catch (JAXBException e) { e.printStackTrace(); } this.out.flush(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> internal routine that does the real writing of the data </s>
funcom_train/24516141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int dataBegin(byte[] src, int i){ int newLine=0; int offset=i; for(;offset<src.length;offset++){ if(src[offset]==13 && src[offset+1]==10){ newLine++; if(newLine==4){ offset+=2; break; } } } return offset; } COM: <s> method that looks through byte array and figure out where boundaries are </s>
funcom_train/16893976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ReferenceVariable getReferenceVariable(String name) { ReferenceVariable result = (ReferenceVariable)nameToVariable.get(name); if (result != null) return result; for (int i = 0; i < variables.length; i++) { if (name.equals(variables[i].getName())) { nameToVariable.put(name, variables[i]); return variables[i]; } } return null; // should never happen } COM: <s> returns a variable from its name </s>
funcom_train/32057614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPaintCell() { System.out.println("testPaintCell"); // Add your test code below by replaGraphics g = new Graphics(); Graphics g = null; CellView c = null; Rectangle r = new Rectangle(); boolean b = true; BasicGraphUI x = new BasicGraphUI(); x.paintCell(g, c, r, b); } COM: <s> test of paint cell method of class basic graph ui </s>
funcom_train/17204773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean definitelyDifferent(TypeReference that) { if (this == that) return false; if (name != that.name) return true; RVMType mine = peekType(); RVMType theirs = that.peekType(); if (mine == null || theirs == null) return false; return mine != theirs; } COM: <s> do this and that definitely refer to the different types </s>
funcom_train/22525026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerAction(String actionId, IAction action) { IAction oldAction= getAction(actionId); if (oldAction instanceof OperationHistoryActionHandler) ((OperationHistoryActionHandler)oldAction).dispose(); setAction(actionId, action); IActionBars actionBars= getEditorSite().getActionBars(); if (actionBars != null) actionBars.setGlobalActionHandler(actionId, action); } COM: <s> registers the given undo redo action under the given id and </s>
funcom_train/1676661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { if (cursor == null) { return false; } try { if (toNext != 0) { OperationStatus status = move(toNext); if (status == OperationStatus.SUCCESS) { toNext = 0; toPrevious = MOVE_PREV; toCurrent = MOVE_PREV; } } return (toNext == 0); } catch (Exception e) { throw StoredContainer.convertException(e); } } COM: <s> returns true if this iterator has more elements when traversing in the </s>
funcom_train/40466912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPmdData(String fileName) { if (this.pmdData.containsKey(fileName)) { this.pmdData.put(fileName, this.pmdData.get(fileName) + 1); } else { this.pmdData.put(fileName, 1); } } COM: <s> adds the pmd data to the map </s>
funcom_train/9853105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calcP(ISampleSet sampleSet) { // reallocate only if size of sample set has changed if(pSample.length != sampleSet.size()) pSample = new double[sampleSet.size()]; for(int i=0; i<sampleSet.size(); i++) pSample[i] = logP(sampleSet.sample(i)); } COM: <s> calculates the probabilites for each sample and stores them in an </s>
funcom_train/15627303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEditType(final int newType) { for (final MapControl<G, A, R> mapControl : mapManager.getOpenedMaps()) { mapControl.getMapModel().addActiveEditType(newType); // calculate new type } refreshAllMaps(); } COM: <s> calculate a new type for all opened maps </s>
funcom_train/1209451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object jsFunction_getReader() { if (reader == null) return null; // Here we use toObject() to "wrap" the BufferedReader object // in a Scriptable object so that it can be manipulated by // JavaScript. Scriptable parent = ScriptableObject.getTopLevelScope(this); return Context.javaToJS(reader, parent); } COM: <s> get the java reader </s>
funcom_train/3600376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reload() throws ParserConfigurationException, SAXException, IOException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); //factory.setValidating(true); DocumentBuilder builder = factory.newDocumentBuilder(); doc = builder.parse(Resolver.solveSource(propertiesFilename), propertiesFilename); } COM: <s> reloads the properties </s>
funcom_train/181994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawStimuli(Graphics g){ /* get the current environment */ Environment env = ClientGUIEngine.getEnvironment(); if (field.isDrawingStimuli()) { for (int i = 0; i < env.numberOfDrawableObjects(); i++) { try { BaseObject curr = env.getDrawableObject(i); GUIFunctionFactory.getSmallDrawFunction(curr.getClass()).execute( curr, g); } catch (Exception e) { } } } } COM: <s> draws all the stimuli in the environment </s>
funcom_train/21873391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getColor(int r, int g, int b){ float[] hsbvals = Color.RGBtoHSB( 0, 0, 0, null ); return Color.getHSBColor( hsbvals[0], hsbvals[1], hsbvals[2] ); } COM: <s> creates a color from the red green and blue component </s>
funcom_train/11768487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { getEventLock().lock(); try { _shutdownTriggered = true; if (_zk != null) { _zk.close(); _zk = null; } } catch (final InterruptedException e) { throw new RuntimeException("unable to close zookeeper"); } finally { getEventLock().unlock(); } } COM: <s> closes down the connection to zookeeper </s>
funcom_train/37591004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { if (_force) { @SuppressWarnings("unchecked") T item = _matchList.getSelectedValue(); return (item == null) ? "" : _currentStrategy.force(item,_textField.getText()); } return _textField.getText(); } COM: <s> return the string that was entered in the text field </s>
funcom_train/44871593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void apply(StackOfDouble stack, Cases cases) { double[] d = new double[getArity()]; for (int i = getArity() - 1; i >= 0; i--) d[i] = stack.pop(); stack.push(getVal(d)); } COM: <s> evaluate the function applied to argument values popped from the stack </s>
funcom_train/4641108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadGameFromConsole() { Scanner scanner = new Scanner(System.in); if(printSavedGames()){ System.out.print("Insert game name: "); } else { return false; } File file = new File(Configuration.homeDir + File.separator + scanner.nextLine() + ".data"); if(!file.exists()){ System.err.println("You enterded a worng file name."); return false; } GameMngr tempGame = loadGame(file); if(tempGame == null){ return false; } else { copyFields(tempGame); return true; } } COM: <s> loads a game mngr instance saved on a file </s>
funcom_train/8408290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List extractList() { List result = new ArrayList(); Iterator i = uniqueSet().iterator(); while (i.hasNext()) { Object current = i.next(); for (int index = getCount(current); index > 0; index--) { result.add(current); } } return result; } COM: <s> create a list for use in iteration etc </s>
funcom_train/10766655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RValue compileExtensionVal(ExtensionVal extVal) { OAssign.DirectRef dref = new OAssign.DirectRef(_context.getOProcess()); dref.variable = _context.resolveVariable(extVal.getVariable()); dref.elName = extVal.getExtension(); return dref; } COM: <s> compile an extension to from spec </s>
funcom_train/28672786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EntryType_keyRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EntryType_keyRef_feature", "_UI_EntryType_type"), BeansPackage.Literals.ENTRY_TYPE__KEY_REF, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the key ref feature </s>
funcom_train/45112379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getElement(String key, Object... arguments) { if (autoMapEnabled) { // Check that key start with prefix if (key.startsWith(autoMapPrefix, 0)) { // Check that key has a "." after the prefix if (key.charAt(autoMapPrefix.length()) == '.') { return getLink(key, arguments); } } } return key; } COM: <s> returns the formalized link after checking it </s>
funcom_train/802756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCountPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AcqSpecificationType_count_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AcqSpecificationType_count_feature", "_UI_AcqSpecificationType_type"), MzdataPackage.Literals.ACQ_SPECIFICATION_TYPE__COUNT, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the count feature </s>
funcom_train/18427929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServoKeyFrames getServoKeyFrames(int servoId) { Iterator it = motionDefinition.iterator(); int pos = 0; while (it.hasNext()) { if (((ServoKeyFrames) it.next()).servoId == servoId) return (ServoKeyFrames) motionDefinition.elementAt(pos); pos++; } return new ServoKeyFrames(servoId); } COM: <s> returns the servo key frames for a given servo </s>
funcom_train/19742485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkForModification (String path) { long newLastModified = _file.lastModified(); if (newLastModified > _lastModified) { _resourceModifiedOp.init(path, _lastModified = newLastModified); observers.apply(_resourceModifiedOp); } else { // remove any observers that have been garbage-collected observers.prune(); } return observers.isEmpty(); } COM: <s> checks for a modification to the observed resource notifying the observers if </s>
funcom_train/26227942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSameSignature(CMethod other, CReferenceType[] substitution) { if (parameters.length != other.parameters.length) { return false; } else { for (int i = 0; i < parameters.length; i++) { if (!parameters[i].equals(other.parameters[i], substitution)) { return false; } } return true; } } COM: <s> has this method the same signature as the one given as argument </s>