__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5082003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getConstraintForClone(GraphicalEditPart part, ChangeBoundsRequest request) { IFigure figure = part.getFigure(); RectD2D bounds = new PrecisionRectangle(figure.getBounds()); figure.translateToAbsolute(bounds); bounds = request.getTransformedRectangle(bounds); ((GraphicalEditPart)getHost()).getContentPane().translateToRelative(bounds); bounds.translate(getLayoutOrigin().getNegated()); return getConstraintFor(bounds); } COM: <s> returns the correct rectangle bounds for the new clones location </s>
funcom_train/41722555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseStateGraph(String[] word) throws DuplicatedElementException { if (!stateLineIsCorrect(word)) return; String name = null; try { name = eventToName(word[1], word[2]); } catch (NumberFormatException e) { e.printStackTrace(); return; } Node state = new Node(name); graph.addNode(name,state); //System.out.println("Added node " + name); } COM: <s> parse a state and add the corresponding node to the graph </s>
funcom_train/7851540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: //private String formatTag(QName qname) { // String prefix = qname.getPrefix(); // String suffix = qname.getLocalPart(); // if (StringUtils.isBlank(prefix)) { // return suffix; // } else { // return StringUtils.join(new String[] {prefix, suffix}, ":"); // } //} COM: <s> format the xml tag </s>
funcom_train/9202675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean insertSubtree(Node node) { // check for null if (node == null) return false; // get an iterator to go through all the nodes Iterator<E> iterator = new TreeIterator(node); // iterate over the nodes while (iterator.hasNext()) { // create a copy of the node Node newNode = new Node(iterator.next()); // insert the node this.insert(newNode); } // the inserts were successful return true; } COM: <s> inserts the given subtree into this binary tree </s>
funcom_train/50499225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finalize() { if(databaseConnection != null) { log4j.warn("DatabaseManager object was disposed with open resources, check your code"); try { this.disconnect(); } catch ( DatabaseManagerException e ) { log4j.fatal("Failed to release resources for Garbage Man."); } } } COM: <s> release all resources that were reserved and print out warning since this </s>
funcom_train/3427554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reduce() { final Vector newPatterns = new Vector(); final int count = _patterns.size(); for (int i = 0; i < count; i++) { final LocationPathPattern pattern = (LocationPathPattern)_patterns.elementAt(i); // Reduce this pattern pattern.reduceKernelPattern(); // Is this pattern fully reduced? if (pattern.isWildcard()) { _default = pattern.getTemplate(); break; // Ignore following patterns } else { newPatterns.addElement(pattern); } } _patterns = newPatterns; } COM: <s> reduce the patterns in this test sequence </s>
funcom_train/17095891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuView() { if (jMenuView == null) { jMenuView = new JMenu(); jMenuView.setText("View"); jMenuView.add(getJCheckBoxMenuItemShowColor()); jMenuView.add(new JSeparator()); jMenuView.add(getJCheckBoxMenuItemShowRange()); jMenuView.add(getJMenuItemSetRange()); jMenuView.add(new JSeparator()); jMenuView.add(getJMenuItemDeepness()); } return jMenuView; } COM: <s> this method initializes j menu view </s>
funcom_train/26091588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getMenuAdmin() { if (menuAdmin == null) { menuAdmin = new JMenu(); menuAdmin.setActionCommand("Admin"); menuAdmin.setPreferredSize(new Dimension(100, 19)); menuAdmin.setBounds(new Rectangle(0, 0, 100, 19)); //menuAdmin.setVisible(true); //TODO: Alteracao para a ativ. 3 menuAdmin.setText(I18nManager.getInstance().getPropriedadeString("menu.administrativo")); } return menuAdmin; } COM: <s> this method initializes menu admin </s>
funcom_train/46691009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addObjectNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Instance_objectName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Instance_objectName_feature", "_UI_Instance_type"), MMUnitPackage.Literals.INSTANCE__OBJECT_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the object name feature </s>
funcom_train/12306268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProtection(int protection) { switch(protection) { case GridFTPSession.PROTECTION_CLEAR: throw new IllegalArgumentException("Unsupported protection: " + protection); case GridFTPSession.PROTECTION_SAFE: case GridFTPSession.PROTECTION_CONFIDENTIAL: case GridFTPSession.PROTECTION_PRIVATE: break; default: throw new IllegalArgumentException("Bad protection: " + protection); } this.protection = protection; } COM: <s> sets data channel protection level </s>
funcom_train/3389548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression makeLocalReference(Environment env, Context ctx) { if (ctx.field.getClassDefinition() != client) { throw new CompilerError("makeLocalReference"); } if (localArgumentAvailable(env, ctx)) { return new IdentifierExpression(0, localArgument); } else { return makeFieldReference(env, ctx); } } COM: <s> assuming note reference is all taken care of </s>
funcom_train/50085559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameters(Object[] params) throws CDKException { if (params.length != 1) { throw new CDKException("PiContactDetectionDescriptor expects 1 parameters"); } if (!(params[0] instanceof Boolean)) { throw new CDKException("The first parameter must be of type Boolean"); } checkAromaticity = (Boolean) params[0]; } COM: <s> sets the parameters attribute of the pi contact detection descriptor object </s>
funcom_train/22112568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disassociateResource(Resource r) { AlertDefinitionDAO aDao = getAlertDefDAO(); List adefs = aDao.findAllByResource(r); for (Iterator i = adefs.iterator(); i.hasNext(); ) { AlertDefinition alertdef = (AlertDefinition) i.next(); alertdef.setResource(null); alertdef.setDeleted(true); } aDao.getSession().flush(); } COM: <s> set resource to null on entitys alert definitions </s>
funcom_train/26483571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String makeSafe(String str) { StringBuffer buf = new StringBuffer(); int len = str.length(); for (int i = 0; i < len; ++i) { char c = str.charAt(i); switch (c) { case '\\': buf.append("$\\backslash$"); break; case '~': buf.append("\\textasciitilde"); break; case '#': case '$': case '%': case '&': case '_': case '^': case '{': case '}': buf.append('\\'); buf.append(c); break; default: buf.append(c); break; } } return buf.toString(); } COM: <s> returns a new string with all la te x2e special characters replaced </s>
funcom_train/318692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectNestedArchive(Object dialog, Object archiveList) { Object selected = thinlet.getSelectedItem(archiveList); // If an archive was selected: if (selected != null) { selectedFileName = thinlet.getString(selected, "text"); thinlet.remove(dialog); } // Extracts the selected archive. panel.extractArchive(); } COM: <s> handles the event of a selection of a nested archive </s>
funcom_train/1111117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CellView findViewForPoint(Point2D pt) { double snap = graph.getTolerance(); Rectangle2D r = new Rectangle2D.Double(pt.getX() - snap, pt.getY() - snap, 2 * snap, 2 * snap); for (int i = 0; i < views.length; i++) if (views[i].intersects(graph, r)) return views[i]; return null; } COM: <s> hook for subclassers to return a different view for a mouse click at </s>
funcom_train/32057343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRect() { System.out.println("testGetRect"); String s = new String(); Rectangle r = new Rectangle(); UserProperties y; String t = new String(); y = UserProperties.getInstance(t); y.setRect("tr", r); assertEquals(r,y.getRect("tr")); } COM: <s> test of get rect method of class user properties </s>
funcom_train/37049769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAt() { sch.scheduleActionAt(3.45, action); sch.execute(); assertEquals(3.45, action.at, 0.0); assertEquals(3.45, results.get(0), 0.0); } COM: <s> tests simple action at with a double </s>
funcom_train/29900231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableTestOptions(boolean enabled) { mTestProjectNameLabel.setEnabled(enabled); mTestProjectNameText.setEnabled(enabled); mTestApplicationLabel.setEnabled(enabled); mTestApplicationText.setEnabled(enabled); mTestPackageLabel.setEnabled(enabled); mTestPackageText.setEnabled(enabled); } COM: <s> controls whether the options for creating a paired test project should be enabled </s>
funcom_train/45112516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreStopParams() throws Exception { setCaptureFilesDirectoryName(wireSharkDefaultValues.getCaptureFilesDirectoryName()); setCaptureFileName(wireSharkDefaultValues.getCaptureFileName()); setDumpToScreen(wireSharkDefaultValues.getDumpToScreen()); setPacketTreeOutput(wireSharkDefaultValues.isPacketTreeOutput()); setReadFilter(wireSharkDefaultValues.getReadFilter()); setTimeout(wireSharkDefaultValues.getTimeout()); } COM: <s> this function restores to default params </s>
funcom_train/18484497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(Object key, Object val) { if (hashMap == null) { outError.fireOutPin("put: map not initialized"); return; } if (key == null || val == null) { outError.fireOutPin("put: parameter is null"); return; } hashMap.put(key, val); } COM: <s> associates the specified value with the specified key in this map </s>
funcom_train/3290105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector searchMultiLevelVector(int snode,Vector fields,String pdistinct,Vector tables,String where, Vector orderVec,Vector direction) { Vector v=new Vector(); v.addElement(""+snode); return searchMultiLevelVector(v,fields,pdistinct,tables,where,orderVec,direction, SEARCH_EITHER); } COM: <s> return all the objects that match the searchkeys </s>
funcom_train/16691689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mouseDown(Event e, int x, int y){ motor.resumeThread(); NodeView nodeView = getContains(x, y); if(nodeView != null){ //remove long label: if(longLabeledNodeView!=null){ longLabeledNodeView.setLongLabel(false); longLabeledNodeView=null; } long click = System.currentTimeMillis(); if(click - prevClick < deltaBetweenClicks){ doubleClickOnNode(e, nodeView); } else{ prevClick = click; nodeView.oldx = x; nodeView.oldy = y; draggedNode = nodeView; setState(DRAG); } } return true; } COM: <s> standard mouse event handler </s>
funcom_train/21176942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoBook() { setMode(BOOK_VIEW); // Go to the last viewed page and location in the textbook tabbed.getContent().addNotationEventListener( new LocationChangeListener(currentItem.getHref(), PAGE_LOCATION, currentItemAddress, LocationChangeListener.PAGE_TOP, "GOTO BOOK")); tabbed.setPage(currentItem.getHref()); } // method gotoBook COM: <s> returns to the last viewed location in the book </s>
funcom_train/8985092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(){ if(!Utility.isEmpty(this.getAltLabel())){ SessionContainer sessionContainer = (SessionContainer)pageContext.getSession().getAttribute(GlobalConstant.SESSION_CONTAINER_KEY); String altStr=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(),this.altLabel); this.setAlt(altStr); } } COM: <s> init the tag </s>
funcom_train/6202426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setApplicationFont(final Font newFont) { m_font = newFont; Preferences.setPreference(OConsts.TF_SRC_FONT_NAME, newFont.getName()); Preferences.setPreference(OConsts.TF_SRC_FONT_SIZE, newFont.getSize()); CoreEvents.fireFontChanged(newFont); } COM: <s> set new font to application </s>
funcom_train/1557229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAxes(boolean xAxis, boolean yAxis) { /* if (xAxis == showAxes[0] && yAxis == showAxes[1]) return; showAxes[0] = xAxis; showAxes[1] = yAxis; updateBackgroundImage(); */ setShowAxis(AXIS_X, xAxis, false); setShowAxis(AXIS_Y, yAxis, true); } COM: <s> sets the visibility of x and y axis </s>
funcom_train/19165452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDoActionMethod(Method method) { return ( method.getReturnType() == void.class && method.getParameterTypes().length==1 && JFrame.class.isAssignableFrom(method.getParameterTypes()[0]) && method.getName().startsWith("do") && method.getName().endsWith("FrameAction") ); } COM: <s> to expose a certain frame action to the user through raptor </s>
funcom_train/14449217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceResponse persist(T obj) { ServiceResponse retorno = new ServiceResponse(this.getLocale()); try { // Auto organizar as listas? if(oneToManyOrganize) obj = oneToMany(obj); if(autoCommit) manager.getTransaction().begin(); manager.persist(obj); if(autoCommit) manager.getTransaction().commit(); retorno.setObject(obj); } catch (Exception e) { if(autoCommit && manager.getTransaction().isActive()) manager.getTransaction().rollback(); retorno.setErrorMessage(e.getMessage()); retorno.setErrorNumber(1); } retorno.translateMessage(); return retorno; } COM: <s> persist a entity </s>
funcom_train/14639674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDdlGenerator(DdlGenerator gen) { DatabaseMethodGenerator c_gen =(DatabaseMethodGenerator) getMethodGenerator(); c_gen.setDdlGenerator(gen); c_gen =(DatabaseMethodGenerator) getFinderMethodGenerator(); c_gen.setDdlGenerator(gen); ddlGenerator=gen; } COM: <s> will tell the method generator which ddl gen to use </s>
funcom_train/2939371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setButtonEnabled(int id, boolean enabled) { Integer buttonId = new Integer(id); Object b = buttons.get(buttonId); if (b != null) { ((Button) b).setEnabled(enabled); } else { initEnabled.put(buttonId, new Boolean(enabled)); } } COM: <s> sets the specified button enabled </s>
funcom_train/24327018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResourceBundle getBundle(final Locale specificLocale) { Locale localeToUse = specificLocale; if (null == specificLocale) { localeToUse = Locale.getDefault(); } return ResourceBundle.getBundle("javafxdoc-report", localeToUse, getClass().getClassLoader()); } COM: <s> gets the resource bundle for the specified locale </s>
funcom_train/30343732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("webservice".equals(portName)) { setwebserviceEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/7901713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInput(Object bean) { for (String fieldName : form.getFields().keySet()) { try { Object value = BeanSupport.getProperty(bean, fieldName); setInput(fieldName, value); } catch (Exception e) { // PropertyNotFoundException etc. /* simply do not set a value for this field in input map */ } } } COM: <s> sets the forms input from the specified bean </s>
funcom_train/3393933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getColumnNumber(int pos) { if (findLine(pos)) { int column = 0; for (bp = lineStart; bp < pos; bp++) { if (bp >= buf.length) return 0; if (buf[bp] == '\t') column = (column / TabInc * TabInc) + TabInc; else column++; } return column + 1; // positions are one-based } return 0; } COM: <s> return the one based column number associated with a given pos </s>
funcom_train/22654947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { this.notifyStartup(); while(hasMoreEvents() || isTailing()) { if (this.state == EXIT || this.state == IDLE) { break; } LogEvent[] events = getNextEvents(); if (events != null) { for (int i = 0; i < events.length; i++) { fireEventReceived(events[i]); } } else if (isTailing()) { synchronized (this) { try { wait(SLEEP_DURATION); } catch (InterruptedException ie) { // do nothing } } } } this.notifyShutdown(); } COM: <s> overriden thread super class method </s>
funcom_train/41265824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void search() { if(searchLeft) { if(hAngle > 0) { hAngle -= 10; } else { searchLeft = false; vAngle += ((searchUp)?(10):(-10)); } } else { if(hAngle < 90) { hAngle += 10; } else { searchLeft = true; vAngle += ((searchUp)?(10):(-10)); } } if(vAngle > 130) { searchUp = false; } else if(vAngle < 70) { searchUp = true; } } COM: <s> a fnuction to search for the target </s>
funcom_train/10745272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyLocalizedPattern(String pattern) { dform.applyLocalizedPattern(pattern); super.setMaximumFractionDigits(dform.getMaximumFractionDigits()); super.setMaximumIntegerDigits(dform.getMaximumIntegerDigits()); super.setMinimumFractionDigits(dform.getMinimumFractionDigits()); super.setMinimumIntegerDigits(dform.getMinimumIntegerDigits()); } COM: <s> changes the pattern of this decimal format to the specified pattern which </s>
funcom_train/20889547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLinkToPacket(Packet packet, Link link) { CastType castType = CastType.getCastType(packet.getReceiver()); DownwardsLLCMetaInfo mi = null; if (castType == CastType.BROADCAST) { mi = new DownwardsLLCMetaInfo(link, castType); } else { mi = new DownwardsLLCMetaInfo(link, castType, packet.getReceiver()); } packet.getMetaInfos().addMetaInfo(mi); } COM: <s> helper method to add a link to a packet </s>
funcom_train/2552144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Lane findByName(String name) { String query = "from lane as lane where lane.name = ?"; Lane lane = null; Object[] parameters = {name}; List list = this.getHibernateTemplate().find(query, parameters); if (list.size() > 0) { lane = (Lane) list.get(0); } return lane; } COM: <s> finds an instance of lane in the database by the lane email address </s>
funcom_train/11341160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean implies(Permission permission) { if (!(permission instanceof DmtPrincipalPermission)) return false; DmtPrincipalPermission other = (DmtPrincipalPermission) permission; Iterator i = perms.iterator(); while (i.hasNext()) if (((DmtPrincipalPermission) i.next()).impliesPrincipal(other)) return true; return false; } COM: <s> check whether this set of permissions implies the permission specified in </s>
funcom_train/16797324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(ImageProcessor ip) { double sigmaX = sigmaScaled ? sigma/imp.getCalibration().pixelWidth : sigma; double sigmaY = sigmaScaled ? sigma/imp.getCalibration().pixelHeight : sigma; double accuracy = (ip instanceof ByteProcessor || ip instanceof ColorProcessor) ? 0.002 : 0.0002; Rectangle roi = ip.getRoi(); blurGaussian(ip, sigmaX, sigmaY, accuracy); } COM: <s> this method is invoked for each slice during execution </s>
funcom_train/28957581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invalidate() { /* * Don't use Iterator here, might produce a ConcurrentModificationException. */ String[] prjNames = (String[]) configurationCache.keySet().toArray( new String[0]); for (int i = 0; i < prjNames.length; i++) { invalidate(prjNames[i]); } configurationCache.clear(); } COM: <s> invalidates all cached configuration information </s>
funcom_train/1902929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long performCount() { String countQueryString = baseQuery.toString(false, false); Map<String, Object> parameters = baseQuery.getParameterMap(); if(logger.isLoggable(Level.FINE)) logger.info("Executing count query: " + countQueryString + " " + parameters); Query countQuery = manager.newQuery(countQueryString); countQuery.setClass(baseQuery.getKind()); countQuery.setResult("count(this)"); Number count = (Number) countQuery.executeWithMap(parameters); return count.longValue(); } COM: <s> perform the count query </s>
funcom_train/9408435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPark3() { Thread t = new Thread(new Runnable() { public void run() { try { LockSupport.park(); } catch(Exception e){ threadUnexpectedException(); } } }); try { t.start(); Thread.sleep(SHORT_DELAY_MS); t.interrupt(); t.join(); } catch(Exception e) { unexpectedException(); } } COM: <s> park is released by interrupt </s>
funcom_train/19911805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton_Clear() { if(jButton_Clear == null) { jButton_Clear = new JButton("Clear"); jButton_Clear.setText(LangageManager.getProperty("clear")); jButton_Clear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { onClear(); } }); } return jButton_Clear; } COM: <s> this method initializes j button clear </s>
funcom_train/34138948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getVersion() { PackageManager manager = mSelf.getPackageManager(); PackageInfo info = new PackageInfo(); try { info = manager.getPackageInfo(mSelf.getPackageName(), 0); } catch (NameNotFoundException e) { e.printStackTrace(); return -1; } return info.versionCode; } COM: <s> returns the version number of the ocr package </s>
funcom_train/2961820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SConstraint makeConstraint(Solver solver, IntegerVariable[] variables, Object parameters, List<String> options) { if (solver instanceof CPSolver) { if (parameters == null) { return BooleanFactory.xor(solver.getVar(variables)); } } throw new ModelException("Could not found a constraint manager in " + this.getClass() + " !"); } COM: <s> build a constraint for the given solver and model variables </s>
funcom_train/46261832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endOfWorld(String s, MobileColor color){ // remove listeners and set worldExists to false if(mytime != null){ mytime.cancel(); } this.worldExists = false; System.out.println("The end of the world: " + s); // draw the final scene of the world with the end of world message this.theCanvas.clear(this.background); if(!this.dead){ this.draw(); } this.theCanvas.drawString(new Posn(10, theCanvas.getHeight() * 9 / 10),s, color); this.theCanvas.repaint(); this.dead = true; } COM: <s> end the interactions of this world and graphically display </s>
funcom_train/18319784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentCommandStack(AdvancedCommandStack stack) { if (currentCommandStack == stack) return; // remove from old command stack if (null != currentCommandStack) { currentCommandStack.removeCommandStackListener(this); currentCommandStack.removeAdvancedCommandStackListener(this); } // set new command stack currentCommandStack = stack; // watch new command stack currentCommandStack.addCommandStackListener(this); currentCommandStack.addAdvancedCommandStackListener(this); // the command stack changed notifyListeners(); } COM: <s> sets the current code command stack code </s>
funcom_train/27929461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AddressCollection filter(String id, String filter, boolean exact) { if (filter.trim().length() == 0) { return this; } AddressCollection adrcol = new AddressCollection(); for (int i = 0; i < this.size(); i++) { Address adr = (Address) this.get(i); ItemIf item = adr.get(id); if (exact && item.findExactString(filter)) { adrcol.add(adr); } else if (!exact && item.findString(filter)) { adrcol.add(adr); } } return adrcol; } COM: <s> gets a filtered address collection </s>
funcom_train/20773808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getBins(BinocularEvent.Eye eye, int xPos){ double outBins = 0.0; switch(eye){ case LEFT: outBins = histogramLeft.get(xPos).getMassNow(lastTimestamp); break; case RIGHT: outBins = histogramRight.get(xPos).getMassNow(lastTimestamp); break; default: break; } return outBins; } COM: <s> returns the bins of the specified x axis point </s>
funcom_train/3091340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printUserActivity(String message) { Iterator consoleIterator = consoles.iterator(); while(consoleIterator.hasNext()){ ConsoleHandler next = (ConsoleHandler)consoleIterator.next(); if (ConsoleLevel.USER_ACTIVITY.compareTo(next.getMaximumLevel()) <= 0) { next.printUserActivity(message); } } log(message, ConsoleLevel.USER_ACTIVITY); } COM: <s> prints the given message at the user activity console level in </s>
funcom_train/21352142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Options set(String name, Object value, boolean overwrite) { if (!overwrite && options_.containsKey(name)) { return this; } if ((value == null) && options_.containsKey(name)) { options_.remove(name); } options_.put(name, value); return this; } COM: <s> set an option </s>
funcom_train/18718719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { KeyAndMask km1 = (KeyAndMask) o1; KeyAndMask km2 = (KeyAndMask) o2; String s1 = km1.getKey(); String s2 = km2.getKey(); int result = comp.compare(s1, s2); return result; } COM: <s> semi case insensitive locale aware comparator of key n mask objects </s>
funcom_train/37838520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression getNumeral() { // if (getNumeralCount() == 1) { // return getNumeral(0); // } else { // return null; // } Expression num = null; for(final Expression w : expressions) { if (w.isNumeral()) { if (num == null) { num = w; } else { return null; // more than one numeral present } } } return num; } COM: <s> return the single numeral of the parsed sentence </s>
funcom_train/7722673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startReading() throws IOException { if(myListener == null) { throw new IOException("No CommandLineListener set. "); } String cmd = null; while(true) { cmd = br.readLine(); if(cmd.startsWith(prompt)) { cmd = cmd.substring(prompt.length()); } myListener.cmdEntered(cmd); } } COM: <s> start the command line </s>
funcom_train/32779905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(JPanel panel, String fileName){ Rectangle rect = new Rectangle(0,0,size.width, size.height); BufferedImage img = this.paintNotVisibleComponent(panel, new Container(), rect); this.savePicture(img, "png", path, fileName); } COM: <s> save panel as png file in path file name </s>
funcom_train/51179214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeCustomEntryType(CustomEntryType tp, int number) { String nr = ""+number; put(CUSTOM_TYPE_NAME+nr, tp.getName()); put(CUSTOM_TYPE_REQ+nr, tp.getRequiredFieldsString());//tp.getRequiredFields()); putStringArray(CUSTOM_TYPE_OPT+nr, tp.getOptionalFields()); } COM: <s> stores all information about the entry type in preferences with </s>
funcom_train/44308713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int isAlreadyLogged(String i, String c, int pattern) { String entry = i+","+c+","+pattern; Iterator e = autoLog.iterator(); while (e.hasNext()) { String next = new String((String)e.next()); if (next.startsWith(entry)) { // Hits bestimmen und zur?ckliefern, damit korrektes Gewicht berechnet werden kann String [] tokens = next.split(","); if (tokens.length == 4) return Integer.parseInt(tokens[3]); } } return -1; } COM: <s> test if a pattern is already in auto log </s>
funcom_train/9278987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void xtestRollbackWillReleaseActiveSavepoints() throws SQLException { Connection con = getConnection(); Savepoint savepoint1 = con.setSavepoint(); con.rollback(); try { con.rollback(savepoint1); fail("FAIL 42 release of rolled back savepoint"); } catch (SQLException se) { // Expected exception. assertSQLState("3B001", se); } } COM: <s> test42 rollback on a connection will release all the savepoints created </s>
funcom_train/21907142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String editAction() { logger.debug("editAction is invoked"); Note noteToEdit = (Note) noteDataTable.getRowData(); try { setNote(noteToEdit); } catch (Exception e) { String msg = "could not edit note"; this.logger.error(msg, e); FacesUtils.addErrorMessage(msg + INTERNAL_ERROR); return NavigationResults.FAILURE; } String msg = "note with id of " + noteToEdit.getId() + " was edited successfully."; logger.debug(msg); return NavigationResults.EDIT_NOTE; } COM: <s> edits a note </s>
funcom_train/9443422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHashableName() { StringBuilder result = new StringBuilder(); result.append(name()); for (ParameterInfo pInfo : mParameters) { result.append(":").append(pInfo.type().fullName()); } return result.toString(); } COM: <s> returns a name consistent with the </s>
funcom_train/13753205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isBeforeComment() { int peekNum; int len = currentLine.length(); boolean foundComment = false; for (peekNum = charNum + 1; peekNum < len && isWhiteSpace(currentLine.charAt(peekNum)); ++peekNum) ; if (peekNum < len) { foundComment = currentLine.regionMatches(peekNum, AS_OPEN_COMMENT, 0, 2) || currentLine.regionMatches(peekNum, AS_OPEN_LINE_COMMENT, 0, 2); } return foundComment; } COM: <s> check if current placement is before a comment or line comment </s>
funcom_train/43100490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JToolBar getViewToolbar() { if (viewToolbar == null) { viewToolbar = new ToolBar("View Toolbar"); viewToolbar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); viewToolbar.add(new ActionFind()); viewToolbar.add(new ZoomSliderButton()); } return viewToolbar; } COM: <s> getter for the view toolbar </s>
funcom_train/5079707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setViewer(EditPartViewer viewer) { if (viewer == currentViewer) return; setCursor(null); currentViewer = viewer; if (currentViewer != null) { org.eclipse.swt.graphics.Point p = currentViewer.getControl().toControl( Display.getCurrent().getCursorLocation()); getCurrentInput().setMouseLocation(p.x, p.y); } refreshCursor(); } COM: <s> sets the active edit part viewer </s>
funcom_train/41875448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRefid(Reference reference) { super.setRefid(reference); ArtifactType art = (ArtifactType) reference.getReferencedObject(getProject()); this.group = art.getGroup(); this.name = art.getName(); this.project = art.getProjectname(); this.type = art.getType(); this.version = art.getVersion(); } COM: <s> copy everything from the reference into this object rather than delegate </s>
funcom_train/34506640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(File file) throws IOException { FileWriter writer = null; try { writer = new FileWriter(file); writer.write(text); } finally { if (writer != null) { try { writer.close(); } catch (IOException e) { System.err.println(e); } } } } COM: <s> writes this code text diagram code to file using a </s>
funcom_train/86264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlockGroup(Object compatabilitySpace, Object group) { if (SanityManager.DEBUG) { if (SanityManager.DEBUG_ON(Constants.LOCK_TRACE)) { D_LockControl.debugLock("Lock Unlock Group: ", compatabilitySpace, group); } } LockSpace ls = (LockSpace) get(compatabilitySpace); if (ls == null) return; ls.unlockGroup(lockTable, group); } COM: <s> unlock a group of objects </s>
funcom_train/26630571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConversion() throws Exception { String classMustExtend = CallsReport.classMustExtend; File in = new File( TestData.XML_SIMPLE_OUTPUT ); File out = new File( TestData.XML_CALLS_OUTPUT ); CallChainer myProcessor = new CallChainer(); myProcessor.addCallChainInformation( in, out, classMustExtend); } COM: <s> test the conversion of the xml tree </s>
funcom_train/37820375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameTerminal(TerminalSymbol terminalSymbol, String newLabel) { try { actionStack.perform(new RenameTerminalAction(terminalSymbol, newLabel)); synDiaSystem.notifyObservers(); } catch (Exception e) { mainController.showErrorDialog( Messages.getString("ebnf", "SynDiaEditor.Error_InternalError") + Messages.getString("ebnf", "SynDiaEditor.Error_Appendix"), false); } } COM: <s> renames a terminal symbol </s>
funcom_train/9178387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GlobalConfiguration createGlobalConfiguration(String providerUrl) { Class<? extends RegistryConfigurator> registryConfiguratorClass = null; if (this.registryConfigurator != null) { registryConfiguratorClass = registryConfigurator.getClass(); } return new GlobalConfiguration(providerUrl, debug, gsonBuilderConfiguratorClass, registryConfiguratorClass, minify, batchRequestsMultithreadingEnabled, batchRequestsMinThreadsPoolSize, batchRequestsMaxThreadsPoolSize, batchRequestsThreadKeepAliveSeconds, batchRequestsMaxThreadsPerRequest); } COM: <s> return the global configuration using by direct jngine api </s>
funcom_train/44791428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GeoPolygon geOxygenePolygonToGeoPolygon(int id, IGeometry geom) { GM_Polygon geOxyPolygon = (GM_Polygon) geom; IDirectPositionList dpl = geOxyPolygon.coord(); int nbPts = dpl.size(); GeoPolygon geoPoly = new GeoPolygon(id, dpl.toArrayX(), dpl.toArrayY(), nbPts); return geoPoly; } COM: <s> convert a gm polygon single without holes to a polygon </s>
funcom_train/2322712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Color oldColor = g.getColor(); int i; g.setColor(lineColor); for(i = 0; i < thickness; i++) { g.drawLine(x+i, y+i, width+x+i, (y+i)); } g.setColor(oldColor); } COM: <s> paints the border for the specified component with the </s>
funcom_train/29632222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putHolderName(String iName, String iSurname) throws OpenPGPCardException { byte[] data = (iSurname+"<<"+iName).getBytes(); putGenericData(TLV_HOLDER_NAME[0],TLV_HOLDER_NAME[1], data,MAX_NAME_LEN); } COM: <s> stores the holder name and surname on the card </s>
funcom_train/19537834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(Token token, String stateName, Object value) throws ParserException { if (stateName.equals(ALL_STATES)) { for (Object sname : MapTool.getCampaign().getTokenStatesMap().keySet()) { setState(token, sname.toString(), value); } } else { setBooleanTokenState(token, stateName, value); } } COM: <s> sets the state of the specified token </s>
funcom_train/10486021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SslFilter createSSLFilter() throws GeneralSecurityException { SSLContext context = request.getSSLContext(); if (context == null) { // if the caller did not provide an SSL context // create a default SSL context context = createDefaultSSLContext(); } SslFilter sslFilter = new SslFilter(context); sslFilter.setUseClientMode(true); return sslFilter; } COM: <s> create an ssl filter instance for this client </s>
funcom_train/28763219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivityDefinitionId(java.lang.String value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_ActivityDefinitionId, jj_ActivityDefinitionId,kk_ActivityDefinitionId, com.intersys.objects.Database.RET_PRIM, "ActivityDefinitionId", dh); return; } COM: <s> sets new value for code activity definition id code </s>
funcom_train/2615330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getAmountDisks(int color) { int disks = 0; for (int i = 0; i < diskColor[0].length; i++) { for (int j = 0; j < diskColor[0].length; j++) { if (diskColor[i][j].getColor() == color){ disks++; } } } return disks; } COM: <s> get the amount of how many disk of a particular color </s>
funcom_train/8525599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimedPermit issuePermit(Object o) { PermitEntry permit; synchronized (lock) { permit = new PermitEntry(o); if (isEmpty()) { head = tail = permit; lock.notify(); // notify when move from empty to non empty } else { tail.entryAfter = permit; permit.entryBefore = tail; tail = permit; } } return permit; } COM: <s> issues a new code timed permit code for the target object </s>
funcom_train/7635003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Mode getInitialMode() { final SimCard.State simState = mUpdateMonitor.getSimState(); if (stuckOnLockScreenBecauseSimMissing() || (simState == SimCard.State.PUK_REQUIRED)) { return Mode.LockScreen; } else if (mUpdateMonitor.isKeyboardOpen() && isSecure()) { return Mode.UnlockScreen; } else { return Mode.LockScreen; } } COM: <s> given the current state of things what should be the initial mode of </s>
funcom_train/38493567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pictureCaptions_pressed () { // Hides main frame gmFrame.setVisible(false); // Runs slideshow showSlideShow (gallDirectory, skipCaptions.isSelected(), slideshowSizeWidth, slideshowSizeHeight, gmFrame); // Shows main frame gmFrame.setVisible(true); // Resets caption text pictureCaptions.setText ("Change Picture Captions"); } COM: <s> runs the slideshow getting captions for all of the pictures </s>
funcom_train/7270414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(ComboBoxModel model) { ComboBoxModel oldModel = this.model; if (oldModel != null) { oldModel.removeListDataListener(modelListener); } this.model = model; model.addListDataListener(modelListener); firePropertyChange("model", oldModel, model); } COM: <s> sets the underlying data model </s>
funcom_train/39911089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBirthdate() { System.out.println("setBirthdate"); String birthdate = ""; Employee instance = new Employee(); instance.setBirthdate(birthdate); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set birthdate method of class buissness </s>
funcom_train/46061929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canSubscribeForAssessmentNotification(Identity ident, ICourse course) { if (ident == null) return false; CourseGroupManager grpMan = course.getCourseEnvironment().getCourseGroupManager(); return grpMan.isIdentityCourseAdministrator(ident) || grpMan.isIdentityCourseCoach(ident) || grpMan.hasRight(ident, CourseRights.RIGHT_ASSESSMENT); } COM: <s> assessment notification rights check </s>
funcom_train/9057282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showCourse() throws IOException { while (courseCheck() != INPUT_ACCEPTED) { try { if(indtastet[1]!=null){ indtastet[1].trim(); } } catch (Exception e) { } if (indtastet[1] == null || indtastet.equals("")) { System.out.println("Indtast venligst et kursus nummer:"); } else { System.out.println("+---------------------------------------------------------+"); System.out.println("|Det indtastede kursus nummer var ikke korrekt, prøv igen:|"); System.out.println("+---------------------------------------------------------+"); } input(1); } try { Course course = getCore().findCourse(indtastet[1]); System.out.println(course); } catch (CourseDoesNotExistException e) { System.out.println(e); } } COM: <s> presents the data associated with a certain course given its id </s>
funcom_train/16467394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String parseString(int length) throws IOException { byte[] bytes = new byte[length]; input.readBytes(bytes); int size = bytes.length; for (int i = 0; i < bytes.length; i++) { if (bytes[i] == 0) { size = i; break; } } return new String(bytes, 0, size, "UTF-8"); } COM: <s> parses a string out of a fixed number of bytes </s>
funcom_train/33134095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(BinaryData data) { if (data == null) { throw new NullPointerException("The data must not be null"); } final int length = Math.min(length(), data.length()); final ByteIterator ti = iterator(); final ByteIterator oi = data.iterator(); for (int i = 0; i < length; i++) { final int d = ti.next() - oi.next(); if (d != 0) { return d; } } return length() - data.length(); } COM: <s> compare an object to another binary data </s>
funcom_train/251777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetQueueAdmissionsController() throws InterruptedException, TaskQueueException { Queue queue = new Queue(); assertTrue(queue.size() ==0); queue.enqueue("1"); assertTrue(queue.size() ==1); String result = (String) queue.getNextTask(1000); assertNotNull(result); assertTrue(queue.size()==0); queue.addQueueAdmissionsController(new QueueAdmissionsControllerImpl(false)); try { queue.enqueue("This should fail"); fail("Should not have got here."); } catch (TaskQueueException e) { } } COM: <s> test that can set queue admission controllers </s>
funcom_train/6267924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String encode() { if (this.addressType == WILD_CARD) return "*"; StringBuffer encoding = new StringBuffer(); if (displayName != null) { encoding.append(DOUBLE_QUOTE).append(displayName).append( DOUBLE_QUOTE).append( SP); } if (address != null) { if (addressType == NAME_ADDR || displayName != null) encoding.append(LESS_THAN); encoding.append(address.encode()); if (addressType == NAME_ADDR || displayName != null) encoding.append(GREATER_THAN); } return encoding.toString(); } COM: <s> encode the address as a string and return it </s>
funcom_train/47465625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHex() { String hexString = new String(); String hex; hex = Integer.toHexString(r); if(hex.length() == 1) hex = "0" + hex; hexString += hex; hex = Integer.toHexString(g); if(hex.length() == 1) hex = "0" + hex; hexString += hex; hex = Integer.toHexString(b); if(hex.length() == 1) hex = "0" + hex; hexString += hex; return Integer.parseInt(hexString, 16); } COM: <s> converts the rgb integers to hex strings and concatenates </s>
funcom_train/37722205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildAddress(int rowIndex) { String address = Integer.toHexString(rowIndex * NUM_HEX_COLS); StringBuilder padBuilder = new StringBuilder("0x"); int padRequired = 4 - address.length(); for(int i=0; i<padRequired; i++) { padBuilder.append('0'); } return padBuilder.toString() + address; } COM: <s> conver the row index into and address </s>
funcom_train/34247226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getWorkTaskLinkChildrenCount() { if (this.isWorkTaskLinkNode()) { return 1; } int count = 0; for (int i = 0; i < getChildCount(); ++i) { FmmTreeNode node = (FmmTreeNode) getChildAt(i); count += node.getWorkTaskLinkChildrenCount(); } return count; } COM: <s> recursive method for finding the number of work task link children </s>
funcom_train/42398835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String serialize(final int command, final Object object) { try { ServerSerializationStreamWriter streamWriter = new ServerSerializationStreamWriter(this.createSerializationPolicy()); streamWriter.prepareToWrite(); streamWriter.writeInt(command); streamWriter.writeObject(object); return streamWriter.toString(); } catch (final SerializationException serializationException) { throw new RuntimeException("Unable to serialize object, message: " + serializationException.getMessage()); } } COM: <s> uses the gwt serialization sub system to convert the given object into a </s>
funcom_train/9365073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public InputMethodManager getInstance(Looper mainLooper) { synchronized (mInstanceSync) { if (mInstance != null) { return mInstance; } IBinder b = ServiceManager.getService(Context.INPUT_METHOD_SERVICE); IInputMethodManager service = IInputMethodManager.Stub.asInterface(b); mInstance = new InputMethodManager(service, mainLooper); } return mInstance; } COM: <s> internally the input method manager cant be context dependent so </s>
funcom_train/3394777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateAnnotation(JCAnnotation a, Symbol s) { validateAnnotation(a); if (!annotationApplicable(a, s)) log.error(a.pos(), "annotation.type.not.applicable"); if (a.annotationType.type.tsym == syms.overrideType.tsym) { if (!isOverrider(s)) log.error(a.pos(), "method.does.not.override.superclass"); } } COM: <s> check an annotation of a symbol </s>
funcom_train/15819869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(ObjectName mBean, String name, Object value) throws InstanceNotFoundException, AttributeNotFoundException { checkAndConnect(); try { getMBeanServerConnection().setAttribute(mBean, new Attribute(name, value)); } catch (InvalidAttributeValueException ex) { } catch (MBeanException ex) { } catch (ReflectionException ex) { } catch (IOException ex) { } } COM: <s> set the specified parameter from the mbean </s>
funcom_train/37062608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommPortIdentifier getPort( String pname ) throws ErgoPortException { try { return CommPortIdentifier.getPortIdentifier(pname); } catch (NoSuchPortException e) { // port does not exist in system (why it exists in our list?) String err = "given port '" + pname + "' does not exist; " + e.getMessage(); LOGGER.error( err ); throw new ErgoPortException( err ); } } COM: <s> returns the identifier for the given port </s>
funcom_train/22847348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int attack() { switch(getWeaponType()) { case BLADE_ONE: case BLADE_TWO: return SkillHandler.check(this, Skill.BLADE); case BLUNT_ONE: case BLUNT_TWO: return SkillHandler.check(this, Skill.BLUNT); case AXE_ONE: case AXE_TWO: return SkillHandler.check(this, Skill.AXE); case SPEAR: return SkillHandler.check(this, Skill.SPEAR); case BOW: case CROSSBOW: case THROWN: return SkillHandler.check(this, Skill.ARCHERY); default: return SkillHandler.check(this, Skill.UNARMED); } } COM: <s> does an attack roll </s>
funcom_train/43892609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getButton(final String path, final String description, final String fallback) { final Icon icon = getIcon(path, description); final JButton button; if (icon != null) { button = new JButton(icon); } else { button = new JButton(fallback); } button.setToolTipText(description); return button; } COM: <s> returns a button with the specified image </s>