__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29618369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getJPlantProtectionField() { if (jPlantProtectionField == null) { jPlantProtectionField = new MgisTextArea(); //jPlantProtectionField.setLineWrap(true); //jPlantProtectionField.setWrapStyleWord(true); //jPlantProtectionField.setFont(MgisLabel.m_font); //jPlantProtectionField.setBorder(new EmptyBorder(0, 2, 0, 2)); } return jPlantProtectionField; } COM: <s> this method initializes j plant protection field </s>
funcom_train/40361387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File locateWebInf(File dir) { String path = cmDirsMap.get(dir.getName().toLowerCase()); if (path != null) { File webinf = new File(dir, path); if (webinf.exists() && webinf.isDirectory()) { return webinf.getAbsoluteFile(); } } return null; } COM: <s> locate the connector manager web inf directory relative to dir </s>
funcom_train/3368721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _processMouseDragged(MouseEvent e) { JComponent component = (JComponent)e.getComponent(); boolean stop = true; if (component.isShowing()) { Rectangle visibleRect = component.getVisibleRect(); stop = visibleRect.contains(e.getX(), e.getY()); } if (stop) { _stop(component); } else { start(component, e); } } COM: <s> mouse listener method invokes start stop as necessary </s>
funcom_train/20101088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resolution login() { boolean loginUser = myIsernModel.login(this.username, this.password); if (loginUser) { return new ForwardResolution("/view_collaboration.jsp"); } else { this.errorMessage = "Error: Incorrect username or password entered."; return new ForwardResolution("/index.jsp"); } } COM: <s> a handler that performs an action when the login button is pressed </s>
funcom_train/2293902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CmsLockFilter getBlockingFilter() { CmsLockFilter blockingFilter = CmsLockFilter.FILTER_ALL; blockingFilter = blockingFilter.filterNotLockableByUser(getCms().getRequestContext().currentUser()); if (!isDirectPublish()) { blockingFilter = blockingFilter.filterProject(new CmsUUID(getParamProjectid())); } return blockingFilter; } COM: <s> returns the filter to identify blocking locks </s>
funcom_train/37829565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onFinishQuest(Player player) { getAndCheckAchievementsInCategory(player, Category.QUEST); getAndCheckAchievementsInCategory(player, Category.QUEST_ADOS_ITEMS); getAndCheckAchievementsInCategory(player, Category.QUEST_SEMOS_MONSTER); getAndCheckAchievementsInCategory(player, Category.QUEST_KIRDNEH_ITEM); getAndCheckAchievementsInCategory(player, Category.FRIEND); getAndCheckAchievementsInCategory(player, Category.OBTAIN); getAndCheckAchievementsInCategory(player, Category.PRODUCTION); } COM: <s> check all achievements for a player that are relevant on finishing a quest </s>
funcom_train/50962568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isGreater(Term t) { t = t.getTerm(); if (t instanceof Number) { return value>((Number)t).intValue(); } else if (t instanceof Struct) { return false; } else if (t instanceof Var) { return true; } else { return false; } } COM: <s> returns true if this integer term is grater that the term provided </s>
funcom_train/22371603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void savePosition(final ComponentEvent event) { final int x = event.getComponent().getX(); final int y = event.getComponent().getY(); if (abstractSingleFrame.isVisible()) { // Task submitted after canceling previous ones to avoid executing task after each call to component listener if (positionFuture != null) { positionFuture.cancel(false); } positionFuture = taskService.submitOnce("Save Frame Position", 1, new SaveFramePositionTask(stateUI, x, y)); } } COM: <s> called to save position when an event is detected in single frame </s>
funcom_train/29874117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getm_SideOneNameLabel() { if (m_SideOneNameLabel == null) { m_SideOneNameLabel = new JLabel(); m_SideOneNameLabel.setPreferredSize(new Dimension(200,25)); m_SideOneNameLabel.setBorder(BorderFactory.createEtchedBorder()); } return m_SideOneNameLabel; } COM: <s> this method initializes m side one name label </s>
funcom_train/47186393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddPrescription3() throws Exception { action = new EditPrescriptionsAction(factory, 9000000000L, "2", "952"); assertEquals(0, action.getPrescriptions().size()); PrescriptionBean bean = new PrescriptionBean(); MedicationBean med = factory.getNDCodesDAO().getNDCode("664662530"); bean.setMedication(med); bean.setDosage(10); bean.setStartDateStr("01/31/2011"); bean.setEndDateStr("02/12/2011"); bean.setInstructions("Take as needed"); bean.setVisitID(952); bean.setReason("00006"); action.addPrescription(bean); assertEquals(1, action.getPrescriptions().size()); } COM: <s> test add prescription for scenario 3 </s>
funcom_train/42407319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int wantsToCatch (CompilerEnvironment env, DataType throwable) throws IOException, CompilerError { if (throwable.isSubtypeOf (env,catchVariable.dataType())) {catchesAnything=true; return 2;} if (catchVariable.dataType().isSubtypeOf (env,throwable)) {catchesAnything=true; return 1;} return 0; } COM: <s> return 0 if this cant catch the given throwable </s>
funcom_train/653747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void performAction(org.openide.nodes.Node[] activatedNodes) { Collection elements = getElements(activatedNodes); if (elements.isEmpty() == false) { try { JMIUtils.beginTrans(true); Element.showAddTagWindow(elements); } finally { JMIUtils.endTrans(false); } } } COM: <s> perform the action based on the currently activated nodes </s>
funcom_train/13211310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel createGameStatisticsPanel(PlayerProfiles playerProfiles, GameStatistics statistics, GameConfig config) { GamePlayer[] player = playerProfiles.getPlayers(); JPanel pnStats = new JPanel(new GridLayout(player.length, 1)); placeStatisticsRows(pnStats, playerProfiles, statistics, config); return pnStats; } COM: <s> create the panel displaying the game statistics played and won games </s>
funcom_train/41164576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(AgStatusQuestion entity) { EntityManagerHelper.log("saving AgStatusQuestion instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ag status question entity </s>
funcom_train/3818303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List listPaymentDatesForPaymentPeriod(CalendarDate periodStart) { CalendarInterval interval = CalendarInterval.startingFrom(periodStart, _paymentPeriod); Iterator paymentDateIter = _compositePaymentDaySpecification.iterateOver(interval); List paymentDates = new ArrayList(); while(paymentDateIter.hasNext()) { paymentDates.add(paymentDateIter.next()); } return paymentDates; } COM: <s> lists all the payment dates for the period starting on the specified </s>
funcom_train/29790528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createHashmap(MessageNode rootNode) { hashtable = new HashMap(rootNode.getChildCount()); // save every message-id in hashtable for later reference for (Enumeration enumeration = rootNode.children(); enumeration .hasMoreElements();) { MessageNode node = (MessageNode) enumeration.nextElement(); String id = getMessageID(node); hashtable.put(id, node); } } COM: <s> save every message node in hash map for later reference </s>
funcom_train/35842918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageNode getNode(int position) { if (position < linkPositions.size()) { return linkPositions.get(position); } MessageNode node = null; for (int cnt = position - linkPositions.size(); cnt >= 0; cnt--) { node = new MessageNode(this); linkPositions.add(node); } calcBounds(); return node; } COM: <s> gets a node that has the given position creates new nodes if needed </s>
funcom_train/37517519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void typecheck( CContextType context ) throws PositionedError { for( int i=0; i < externalMethods.length; i++ ) { MJTopLevelMethodDeclaration method = externalMethods[i]; CClass receiverClass = method.getOpenClassType().getCClass(); CExtMethodContext methodContext = context.createExtMethodContext( sourceClass, receiverClass ); method.typecheck( methodContext ); } super.typecheck( context ); } COM: <s> typechecks this generic function declaration in the context in which it </s>
funcom_train/5343847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out, byte[] buf) throws IOException { for (int i=0; i<16; i++) //TODO3: can optimize buf[i]=guid[i]; buf[16]=func; buf[17]=ttl; buf[18]=hops; ByteOrder.int2leb(length, buf, 19); out.write(buf); writePayload(out); } COM: <s> writes a message out using the buffer as the temporary header </s>
funcom_train/10180538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initDefinitionsMapping() throws ServletException { // Retrieve and set factory for this modules definitionsFactory = ( (TilesUtilStrutsImpl) TilesUtil .getTilesUtil()) .getDefinitionsFactory( getServletContext(), moduleConfig); if (definitionsFactory == null) { // problem ! log.info( "Definition Factory not found for module '" + moduleConfig.getPrefix() + "'. " + "Have you declared the appropriate plugin in struts-config.xml ?"); return; } log.info( "Tiles definition factory found for request processor '" + moduleConfig.getPrefix() + "'."); } COM: <s> read component instance mapping configuration file </s>
funcom_train/19143318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getSolutionVector(double[] X_solution, Vector X_var){ Vector X_calculated = new Vector(X_solution.length); for (int i=0; i<X_solution.length; i++) { try { int original_index = ((Integer)X_var.get(i)).intValue(); VectorDetails element = new VectorDetails(original_index, new Double(X_solution[i])); X_calculated.add(element); } catch (Exception e2) { } } return X_calculated; } COM: <s> code get solution vector code returns a vector of vector details objects </s>
funcom_train/3524242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getSuggestedComponents(Element element) { String tagName = element.getTagName(); if (tagName.equals("input")) tagName += "-" + element.getAttribute("type"); String id = element.getAttribute("id"); return getSuggestedComponents(tagName, id, element); } COM: <s> returns a vector of suggested component class names for given element </s>
funcom_train/35716710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void adaptToInsert() { int myStart= fPosition.offset; int myEnd= fPosition.offset + fPosition.length; myEnd= Math.max(myStart, myEnd); int yoursStart= fOffset; int yoursEnd= fOffset + fReplaceLength;// - 1; yoursEnd= Math.max(yoursStart, yoursEnd); if (myEnd < yoursStart) return; if (myStart <= yoursStart) fPosition.length += fReplaceLength; else fPosition.offset += fReplaceLength; } COM: <s> if an insertion happens at a positions offset the </s>
funcom_train/32202982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testAlert() { System.out.println("==== Test Alert ===="); System.out.println("Opening native alert window"); Sys.alert("SysTest", "Hello World!"); System.out.println("---- Test Alert ----\n"); } COM: <s> tests the alert </s>
funcom_train/40633459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shareDirectory(File dir, String rootPath) throws IOException { for (File file : dir.listFiles()) { if (file.isDirectory()) { shareDirectory(file, rootPath); } else if (file.isFile()) { shareFile(file, rootPath+file.getVirtualPath()); } } } COM: <s> shares all files in a directory and all sub directories </s>
funcom_train/37448920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initNodeDisplay(BasicGraphI aNode) { aNode.put( Constants.ATTRIBUTE_COLOR_NODE, NODE_COLOR ); aNode.put( Constants.ATTRIBUTE_COLOR_LABEL, LABLE_COLOR ); // all nodes are visible // replaces new Boolean(true) with Boolean.TRUE which is a object // reprasentation of the true value aNode.put( Constants.ATTRIBUTE_VISIBLE, Boolean.TRUE ); } COM: <s> initialisation of one node about its color its visible attribute </s>
funcom_train/5863309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List doInit(Page page) { if (_initdefs == null) return Collections.EMPTY_LIST; final List inits = new LinkedList(); for (Iterator it = _initdefs.iterator(); it.hasNext();) { final InitiatorInfo def = (InitiatorInfo)it.next(); try { final Initiator init = def.newInitiator(getEvaluator(), page); if (init != null) inits.add(init); } catch (Throwable ex) { throw UiException.Aide.wrap(ex); } } return inits; } COM: <s> returns a list of all </s>
funcom_train/2639830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forEach(TLongProcedure procedure) { byte[] states = _states; long[] set = _set; for (int i = set.length; i-- > 0;) { if (states[i] == FULL && ! procedure.execute(set[i])) { return false; } } return true; } COM: <s> executes tt procedure tt for each element in the set </s>
funcom_train/11730133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBinarySession() throws RepositoryException, IOException { property1.setValue(value); superuser.save(); InputStream in = property1.getValue().getStream(); try { compareStream(data, in); } finally { try { in.close(); } catch (IOException ignore) {} } } COM: <s> test the persistence of a property modified with an binary value parameter </s>
funcom_train/123797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object that) { if (that instanceof CharSequenceImpl) { return equals((CharSequenceImpl) that); } else if (that instanceof String) { // J2ME: String not a CharSequence. return equals((String) that); } else if (that instanceof CharSequence) { return equals((CharSequence) that); } else { return false; } } COM: <s> compares this character sequence against the specified object </s>
funcom_train/13275413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloorPaint(RoomPaint floorPaint) { if (floorPaint != this.floorPaint) { RoomPaint oldFloorPaint = this.floorPaint; this.floorPaint = floorPaint; this.propertyChangeSupport.firePropertyChange(Property.FLOOR_PAINT.name(), oldFloorPaint, floorPaint); } } COM: <s> sets whether the floor is colored textured or unknown painted </s>
funcom_train/7751841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Column getSubColumnFromRow(final String rowKey, final String columnFamily, final byte[] superColName, final String subColName, final ConsistencyLevel cLevel) throws Exception { return getSubColumnFromRow(rowKey, columnFamily, superColName, toBytes(subColName), cLevel); } COM: <s> retrieve a sub column from a super column in a row </s>
funcom_train/11653163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HashTree getReplacementSubTree() { HashTree tree = new ListedHashTree(); if (selectedNode != null) { if (!selectedNode.isEnabled()) { selectedNode = cloneTreeNode(selectedNode); selectedNode.setEnabled(true); } HashTree subtree = tree.add(selectedNode); createSubTree(subtree, selectedNode); } return tree; } COM: <s> copies the controllers subelements into the execution tree </s>
funcom_train/7446220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long insert(Route dto) { Connection conn = null; try { // get the user-specified connection or get a connection from the // ResourceManager conn = ResourceManager.getConnection(TRACE_ID); return insert(dto, conn); } catch (SQLException _e) { _e.printStackTrace(); // throw _e; } catch (Exception _e) { _e.printStackTrace(); // throw new SQLException( "Exception: " + _e.getMessage()); } finally { try { } catch (Exception e) { } ResourceManager.freeConnection(conn); } return -1; } COM: <s> inserts a new row in the route table </s>
funcom_train/18068614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String retrieveFormat(IDfSession session, String name, String extension) { String format = "binary"; try { IDfFormatRecognizer formatRecognizer = new DfFormatRecognizer(session, name, extension); String suggestedFormat = formatRecognizer.getDefaultSuggestedFileFormat(); if(suggestedFormat != null && suggestedFormat.length() > 0) { format = suggestedFormat; } } catch (DfException e) { log.warn("Error retrieving format from " + name + extension); } return format; } COM: <s> retrieves the format from documentum </s>
funcom_train/50941161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component prepareEditor(TableCellEditor editor, int row, int column) { Component retValue; retValue = super.prepareEditor(editor, row, column); if ( EBConstants.DEBUG ) System.out.println("TxnTable.prepareEditor: Editor"+editor + " col="+column+" row="+row); return retValue; } COM: <s> prepares the editor by querying the data model for the value and </s>
funcom_train/33640495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Style getNextStyle(FeatureCollection fc, GeomType gtype, Rule rule) { if (rule == null) { rule = createRule(fc, gtype, defaultLineColor[colorIter], defaultFillColor[colorIter++]); } FeatureTypeStyle fts = sf.createFeatureTypeStyle(); fts.rules().add(rule); Style style = sf.createStyle(); style.featureTypeStyles().add(fts); return style; } COM: <s> create a default style for feature display </s>
funcom_train/13958717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WOActionResults flushComponentCacheAction() { WOResponse response = new WOResponse(); if (canPerformActionWithPasswordKey("er.extensions.ERXFlushComponentCachePassword")) { WOApplication.application()._removeComponentDefinitionCacheContents(); response.setContent("OK"); } return response; } COM: <s> flushes the component cache to allow reloading components even when wocaching enabled true </s>
funcom_train/21198428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handlesinglepixel(int x, int y, int pixel) { int alpha = (pixel >> 24) & 0xff; int red = (pixel >> 16) & 0xff; int green = (pixel >> 8) & 0xff; int blue = (pixel ) & 0xff; System.out.println("RGB: "+red+", "+green+", "+blue); } COM: <s> testing code to display color data of a pixel </s>
funcom_train/439234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMuscle(LevelOrder level) { String tileString = "images/tiles/tile1.png"; if(level == LevelOrder.NewGame ) { tileString = "images/tiles/tile1.png"; } else if (level == LevelOrder.Student) { tileString = "images/tiles/bg_01.png"; } else if (level == LevelOrder.Resident) { tileString = "images/tiles/bg_02.png"; } else if (level == LevelOrder.Attending) { tileString = "images/tiles/bg_05.png"; } else if (level == LevelOrder.Surgeon) { tileString = "images/tiles/bg_04.png"; } addTiles(tileString, SpriteTypes.Muscle, Layers.Muscle, 1.0f); } COM: <s> adds layer to the manager </s>
funcom_train/30158292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHitPoints(int hp) { int oldHP = getHitPoints(); if (oldHP != hp) { postUndoEdit(MSG_HIT_POINTS_UNDO, ID_HIT_POINTS, new Integer(oldHP), new Integer(hp)); startNotify(); mHitPoints = hp - (getStrength() + mHitPointBonus); mNeedAttributePointCalculation = true; notifyOfBaseHitPointChange(); endNotify(); } } COM: <s> sets the hit points hp </s>
funcom_train/20644397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildMe() { Border border = new TitledBorder(PANEL_NAME); this.setBorder(border); this.setName(PANEL_NAME); JScrollPane jsp = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JTable table = new JTable(m_paramTable); jsp.setViewportView(table); this.setLayout(new BorderLayout()); this.add(jsp, BorderLayout.CENTER); m_refreshButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { retreiveParams(); }}); // set content retreiveParams(); this.add(m_refreshButton, BorderLayout.SOUTH); } COM: <s> build the panel </s>
funcom_train/1345442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvent7() { Trajectory mapper = new Trajectory(); ArrayList<Float> coords = new ArrayList<Float>(); coords.add((float) 11); coords.add((float) 5); coords.add((float) 10); coords.add((float) 5); mapper.plot(coords); ArrayList<RawEvent> events = mapper.getEvents(); assertEquals(1, events.size()); RawEvent event = events.get(0); assertEquals(10, event.getX()); assertEquals(5, event.getY()); assertEquals(1, event.getLength()); } COM: <s> 1 backwards event of length 1 </s>
funcom_train/22535947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearScreen() { planNameText.setText(""); planDescriptionText.setText(""); decisionRuleText.setText(""); populationCombo.removeAll();//.setText(""); traitsList.removeAll(); policyText.setText(""); scenarioList.removeAll(); sessionList.removeAll(); activityList.removeAll(); indicatorNameText.setText(""); indicatorList.removeAll(); //assessmentTypeCombo.removeAll(); populationCombo.removeAll(); isNumericButton.setSelection(false); loadPopulationsFromDB(); } COM: <s> todo load initial data to this tab </s>
funcom_train/9674345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteConnections() { // store all connections that have the element as source connections.addAll(child.getConnections()); for (int i = 0; i < connections.size(); i++) { //we detach each wire, so it becomes deleted Wire wire = connections.get(i); wire.detachSource(); wire.detachTarget(); wire.getParent().getWires().remove(wire); } } COM: <s> deletes the connections of the child </s>
funcom_train/4574384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int parseEndOfLine(String headerPart, int end) { int index = end; for (;;) { int offset = headerPart.indexOf('\r', index); if (offset == -1 || offset + 1 >= headerPart.length()) { throw new IllegalStateException( "Expected headers to be terminated by an empty line."); } if (headerPart.charAt(offset + 1) == '\n') { return offset; } index = offset + 1; } } COM: <s> skips bytes until the end of the current line </s>
funcom_train/45422089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getElement(Document owner) { Element query = owner.createElement("ebss-query"); for (Iterator<Map.Entry<String, String>> iter = this.properties .entrySet().iterator(); iter.hasNext();) { Map.Entry<String, String> entry = iter.next(); Element property = owner.createElement("property"); property.setAttribute("key", entry.getKey()); property.setAttribute("value", entry.getValue()); query.appendChild(property); } return query; } COM: <s> return the query as a dom element </s>
funcom_train/16831216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tree readTree() throws IOException { Tree tr = null; while (tr == null) { if (!st.hasNext()) { return null; } tr = readTreeHelper(); if (DEBUG) { if (tr == null) { System.err.println("readTreeHelper returned null tree; continuing."); } } } return tr; } COM: <s> reads a single tree in standard penn treebank format </s>
funcom_train/34967660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InsertFromValues generateInsertFromValues(CreateTable table) { InsertFromValues insert = new InsertFromValues(table.getName(), table.getColumns()); // find table columns that are NOT NULL and make sure they have values // make sure values are generated within getSize() limit // TODO: do something if there are references. Maybe accept create table array return insert; } COM: <s> generates a valid insert statement </s>
funcom_train/12023849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { ListenerCallFilterProperties.init(); jdbcIncludes = getPatterns( ListenerCallFilterProperties.getJDBCInclude()); jdbcExcludes = getPatterns( ListenerCallFilterProperties.getJDBCExclude()); appIncludes = getPatterns( ListenerCallFilterProperties.getAppInclude()); appExcludes = getPatterns( ListenerCallFilterProperties.getAppExclude()); } COM: <s> configure the filter based on defined properties </s>
funcom_train/3100349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void demo4() throws IOException, UnknownHostException, CycApiException { Log.current.println("Demonstrating getIsas api function.\n"); CycList isas = cycAccess.getIsas(cycAccess.getKnownConstantByName("BillClinton")); Log.current.println("\nThe obtained isas are:\n" + isas.cyclify()); } COM: <s> demonstrates get isas api function </s>
funcom_train/25332458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetResult_CallableStatement_int() throws Exception { final CallableStatement cs = this.context.mock(CallableStatement.class); int columnIndex = 0; CoordinateSystemDefaultVersionTypeHandler instance = new CoordinateSystemDefaultVersionTypeHandler(); Object result = instance.getResult(cs, columnIndex); assertNull(result); } COM: <s> test of get result method of class coordinate system default version type handler </s>
funcom_train/1355950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MonitorDsl observe(ObservedResource res) { if(res == null) throw new IllegalArgumentException("Unable to observe a null object."); ObservedBean bean = (ObservedBean)res; if(StringUtils.isBlank(bean.getId())) throw new IllegalArgumentException("An alias/id must be provided for observed object."); getInternalMonitorResCollector().putResource(bean.getId(), bean.getValue()); return this; } COM: <s> use this method to add a resource which is being monitored </s>
funcom_train/26481662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PostedHeldTransaction findHeldTransaction(String idstring) throws LowlevelLedgerException, UnknownTransactionException { try { final PostedHeldTransaction t = (PostedHeldTransaction) prevayler.execute(new FindHeldTransaction(idstring)); return t; } catch (Exception e) { if (e instanceof UnknownTransactionException) throw (UnknownTransactionException) e; throw new LowlevelLedgerException(e); } } COM: <s> searches for a held transaction based on its transaction id </s>
funcom_train/41331644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCloseButtonState(JComponent c, int tabIndex, boolean tabIsMousedOver) { if (!c.isEnabled()) { return DISABLED; } else if (tabIndex == closeButtonArmedIndex) { return PRESSED; } else if (tabIndex == closeButtonHoverIndex) { return FOCUSED; } else if (tabIsMousedOver) { return MOUSE_OVER; } return ENABLED; } COM: <s> get the state for the specified tabs close button </s>
funcom_train/5598466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(final Font font) { super.setFont(font); axis.setRenderingHint(Graduation.AXIS_TITLE_FONT, font); final int size = font.getSize(); axis.setRenderingHint(Graduation.TICK_LABEL_FONT, font.deriveFont(Font.PLAIN, size-(size>=14 ? 2 : 1))); clearCache(); } COM: <s> set the font for labels and graduations </s>
funcom_train/43338488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadParams() { FileInputStream fis = null; try { fis = new FileInputStream(new File(this.pathIni)); } catch (FileNotFoundException fex) { //throw new GeneralException("Error: Could not load file astaweb.properties. Class: de.fhweingarten.zebra.applicationparam.ApplicationParam", fex); } try { this.prop.load(fis); } catch (IOException ioex) { //handle later on } } COM: <s> loads the properties from the file system </s>
funcom_train/25616284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Mapper createMapper() throws BuildException { if (isReference()) { throw noChildrenAllowed(); } if (mapper != null) { throw new BuildException("Cannot define more than one mapper", getLocation()); } setChecked(false); mapper = new Mapper(getProject()); return mapper; } COM: <s> define the mapper to map source to destination files </s>
funcom_train/16148073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWatershedColor(final Color color) { watershedColor = color; if (imageIconWatershed.getImage() != null) { final Graphics2D graphics = (Graphics2D) imageIconWatershed .getImage().getGraphics(); graphics.setColor(color); graphics.setComposite(AlphaComposite.SrcIn); graphics.fillRect(0, 0, width, height); labelWatershed.repaint(); } } COM: <s> sets the color of the watershed lines </s>
funcom_train/17849537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNewsPane() { ExtendedHTMLDocument doc = (ExtendedHTMLDocument) mNewsPane.getDocument(); mNewsPane.setText(createHtmlText(doc)); SwingUtilities.invokeLater(new Runnable() { public void run() { mScrollPane.getVerticalScrollBar().setValue(0); } }); } COM: <s> updates the news pane </s>
funcom_train/44493145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getCsvFile(){ File csvFile = null; if (csvFileName != null && csvFileName.length() > 0) { csvFile = new File(tct.getCsvDir(false), csvFileName); }else{ csvFile = new File(tct.getCsvDir(true), name+".csv"); } return csvFile; } COM: <s> gets the file that will be used as a data source </s>
funcom_train/3621304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isFormSubmission(HttpServletRequest request) { if (this.submitConditions.isEmpty()) return super.isFormSubmission(request); for (Enumeration e = this.submitConditions.keys(); e.hasMoreElements(); ) { String key = (String) e.nextElement(); String value = this.submitConditions.getProperty(key); String requestParam = request.getParameter(key); if (requestParam != null) if ("*".equals(value) || value.equals(requestParam)) return true; } return false; } COM: <s> determine if the given request represents a form submission </s>
funcom_train/46164205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logP4Env() { List<String> cmd = new ArrayList<String>(); cmd.add("p4"); cmd.add("set"); final String headMsg = "'p4 set' output:"; final String errMsg = "Attempted to log Perforce environment information," + " but caught Exception:"; logInfo(cmd, headMsg, errMsg); } COM: <s> log the perforce environment information to the logger </s>
funcom_train/11733381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(long previousRevision) throws IOException { if (isNew) { DataOutputStream out = new DataOutputStream( new BufferedOutputStream(new FileOutputStream(logFile), 128)); try { writeHeader(out); out.writeLong(previousRevision); } finally { close(out); } this.previousRevision = previousRevision; this.lastRevision = previousRevision; isNew = false; } } COM: <s> initialize this record log by writing a header containing the </s>
funcom_train/19316420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FoValue getForcePageCount(final FObj fobj, final FoContext context) { final PdForcePageCount property = (PdForcePageCount) getProperty(FoProperty.FORCE_PAGE_COUNT); if (property != null) { return property.getValue(context, fobj); } return PdForcePageCount.getValueNoInstance(); } COM: <s> returns the force page count property </s>
funcom_train/1444241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getLast(int beforeLast) { if (this.index == -1 || beforeLast > this.a.length - 1 || beforeLast < 0) throw new IndexOutOfBoundsException(); beforeLast = this.index - beforeLast; beforeLast = (beforeLast < 0) ? beforeLast + this.a.length : beforeLast; return (T) this.a[beforeLast]; } COM: <s> gets the item inserted on the specified position before the last item </s>
funcom_train/28726214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashMap getInputHashMap(String message) { HashMap<String, String> parameter = new HashMap<String, String>(); Matcher matcher = inputsPattern.matcher(message); while (matcher.find()) { if (!parameter.containsKey(matcher.group(1))) { parameter.put(matcher.group(1), matcher.group(2)); } } return parameter; } COM: <s> gets the input hash map </s>
funcom_train/15717720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "[id: "+id+", contextSize: "+contextSize+", context: "+context+", definingText: "+definingText+", definedTerm: "+definedTerm+", prevSentences: "+prevSentences+", defSentences: "+defSentences+", nextSentences: "+nextSentences+", definingTexts: "+definingTexts+"]"; } COM: <s> convert definition builder into printable string </s>
funcom_train/40619429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRuntimePart() { String actorname = "actor1"; graph.addIEdge(actorname, "Actor"); graph.addIEdge(actorname+"behaviorExecution", "BehaviorExecution"); graph.addEdge(actorname, "execution", actorname+"behaviorExecution"); graph.addEdge(actorname+"behaviorExecution", "host", actorname); } COM: <s> create the edges needed for the runtime part of the graph </s>
funcom_train/15831235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElement(Element element) { if (size == data.length) { Element[] newarray = new Element[size + 20]; System.arraycopy(data, 0, newarray, 0, size); data = newarray; } data[size++] = element; } // addElement(Element) COM: <s> adds an element to list resizing if necessary </s>
funcom_train/10589909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { try { // Start buffering events this.bufferEvents = true; super.initialize(); // Fire events, still buffering them: this ensures they will be handled in the same // order as they were added. fireEvents(); } finally { // Stop buffering events this.bufferEvents = false; } } COM: <s> initialize the form by recursively initializing all its children </s>
funcom_train/45692148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPositionOriginalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongPattern_positionOriginal_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongPattern_positionOriginal_feature", "_UI_SongPattern_type"), EsxPackage.Literals.SONG_PATTERN__POSITION_ORIGINAL, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the position original feature </s>
funcom_train/31733623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { if (debug) System.out.println("Sender: code: "+ getResponseCode() + " message: " + getResponseMessage()); if (getResponseCode() != 200 && parent != null) parent.eventHandler(SENDFAILURE,messageID); else parent.eventHandler(SENDSUCCESS,messageID); // stop(); } COM: <s> shutdown this thread </s>
funcom_train/374883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findUTF8String(int index, char... delimeter) { final int size = size(); int searchedLength = 0; int match = 0; for (int i = index; i < size; i++) { char c = getUTF8Char(i); char d = delimeter[match]; if (Character.isDefined(c) == false) { break; } if (d == c) { match++; if (match == delimeter.length) { searchedLength = i - index + 1; break; } } else { match = 0; } } return searchedLength; } COM: <s> find the delimiter array of chars within the buffer </s>
funcom_train/32945063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(final Object anObject) { txTemplate.execute( new TransactionCallback() { public Object doInTransaction(TransactionStatus ts) { try { log.debug("Before Delete"); getSession().delete(anObject); log.debug("After Delete"); } catch(Exception ex) { log.error("Setting Rollback Only", ex); ts.setRollbackOnly(); throw new WCTRuntimeException("Failed to delete object", ex); } return null; } } ); } COM: <s> delete all objects in the collection </s>
funcom_train/21154398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readHrefName(InputStreamReader is) throws Exception { // the stream is at first char after >. We just read the string until we find "</a>" String ret = readString(is, (char) 0, "</a>", false); return ret; } COM: <s> simplified parser to find blabla of a a href xyz blablabla a statement </s>
funcom_train/46136346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createOutputFilePath() { try { this.outputFilePath = File.createTempFile( Utility.extractFileName(getSourceFilePath()) + Constants.DOT + OUTPUT_FORMAT + Constants.DOT, Constants.EMPTY).getAbsolutePath(); } catch (final IOException e) { Console.debug(e); } } COM: <s> creates the output file path </s>
funcom_train/40877770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistance(Ball b) { return Math.sqrt((position.getX() - b.getPosition().getX()) * (position.getX() - b.getPosition().getX()) + (position.getY() - b.getPosition().getY()) * (position.getY() - b.getPosition().getY())); } COM: <s> returns the distance between this ball and another </s>
funcom_train/6277140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrimble(Frimble f) { f.setTitle("Hey this really works"); // you can now setTitle, setJMenuBar agaist this // and do not need to worry whether you are contained // within a JFrame from your main method below or // some gui-container from <i>jesktop</> } COM: <s> method set frimble </s>
funcom_train/25811362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doExecChain() { if (mExecChain != null) { if (DEBUG) Log.d(TAG, "Exec Chain: " + mExecChain.toString()); // TODO deal with powerups mActionThread.queueEvent(Events.EXEC_POWERUP); } mActionThread.queueEvent(Events.REMOVE_CHAIN1); } COM: <s> exec chain action </s>
funcom_train/9569105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { GetData getData; getData = new GetData(); getData.getConnection(); readTableData(tempVec, getData); // System.out.println("after run of this thread"); ThrdCnt--; // System.out.println("ThrCnt==="+ThrdCnt); if (ThrdCnt == 0) System.out.println("everything is finished sruthi"+new Date()); } COM: <s> the run method executes the body of a thread </s>
funcom_train/10867060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBounds() { while (startBounds < length && (isSubwordDelim(charType(text[startBounds])))) { startBounds++; } while (endBounds > startBounds && (isSubwordDelim(charType(text[endBounds - 1])))) { endBounds--; } if (endsWithPossessive(endBounds)) { hasFinalPossessive = true; } current = startBounds; } COM: <s> set the internal word bounds remove leading and trailing delimiters </s>
funcom_train/21842158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getShares(){ int i=0; if(shareList.getSize() < 1){ while( shareList.getSize() < 1 && i < 10){ System.out.println(i+" #Shares = "+shareList.getSize()); getGlobalInfo(); try{ Thread.sleep(200); }catch(Exception e){ } i++; } //JOptionPane.showMessageDialog(null,"Shares not Enumerated!"); } return shareList.elements(); } COM: <s> get a listing of the shares each element will of </s>
funcom_train/9184640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ITuple doRead(ITuple t) { ITuple[] candidates = doReadg(t); if (candidates == null || candidates.length == 0) return null; else { logger.info("read: " + candidates[0]); return candidates[0]; } // ITuple result = null; // try { // result = ts.rdp(t); // } catch (TupleSpaceException tse) { // throw new LimeRuntimeException("tuplespace engine error", tse); // } // // TODO if (result == null), need search in ops? // return result; } COM: <s> reads a tuple returns a deep copy see i tuple space proxy i </s>
funcom_train/4920380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testManagedObjectAvailable() throws Exception { // Add the Managed Object this.source.addManagedObject(ClassManagedObjectSource.class.getName(), null, new AutoWire(String.class)); // Test this.replayMockObjects(); assertTrue("Added type should be available", this.source.isObjectAvailable(new AutoWire(String.class))); assertFalse("Type not added should not be available", this.source.isObjectAvailable(new AutoWire(Integer.class))); this.verifyMockObjects(); } COM: <s> ensure the added </s>
funcom_train/24524993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tag getSibling(final Tag t, final int i) throws NoSiblingException { Tag sibling = null; try { List<Tag> siblings = t.getParent().getChildren(); sibling = siblings.get(siblings.indexOf(t)+i); } catch(IndexOutOfBoundsException e) { throw new NoSiblingException(String.format(LocaleMessages.getInstance().getMessage(LocaleMessages.NO_SIBLING),t.getName(), i), e); } return sibling; } COM: <s> method used for retrieving a sibling of the given tag t </s>
funcom_train/32789771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AnalysisConsumer (String sFileName) { super (); if (sFileName.indexOf (".java") > -1) { m_sFileName = sFileName.substring (0, sFileName.indexOf (".java")); } else { m_sFileName = sFileName; } } COM: <s> creates new analysis consumer </s>
funcom_train/44975321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void freeResources() { if (stockImages != null) { for (int i = 0; i < stockImages.length; ++i) { final Image image = stockImages[i]; if (image != null) image.dispose(); } stockImages = null; } if (iconCache != null) { for (Enumeration it = iconCache.elements(); it.hasMoreElements(); ) { Image image = (Image) it.nextElement(); image.dispose(); } } } COM: <s> frees the resources </s>
funcom_train/11730889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nodeAdded(Path path) { acquire(); try { PathMap.Element<LockInfo> parent = lockMap.map(path.getAncestor(1), true); if (parent != null) { refresh(parent); } } catch (RepositoryException e) { log.warn("Unable to determine path of added node's parent.", e); } finally { release(); } } COM: <s> invoked when some node has been added </s>
funcom_train/3115450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleSingleStroke(SingleStrokeEvent evt) { DenimSheet sheet = (DenimSheet)getAttachedGraphicalObject().getSheet(); double curscale = sheet.getAbsScale(); if (curscale >= INTERPRETER_TRANSITION) { setDeep(); } else { setShallow(); } super.handleSingleStroke(evt); sheet.setModified(true); } // of handleSingleStroke COM: <s> change how the interpreter behaves depending on the zoom level </s>
funcom_train/4397426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPersonLocation(GeoPoint personGeoPoint, int radius) { // Clean the previous person location, if any. List<Overlay> overlays = mapView.getOverlays(); if (overlays.contains(personOverlay)) { int index = overlays.indexOf(personOverlay); overlays.remove(index); } // Setup the person overlay personOverlay = new PersonOverlay(personGeoPoint, radius, this); // Add to the map overlays.add(personOverlay); } COM: <s> set the person overlay </s>
funcom_train/4972030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComplexArray multiply(ComplexArray rhs) { ComplexArray result = new ComplexArray(this.getLength()); for (int i = 0; i < this.re.length; i++) { result.setElement(this.getElement(i).multiply(rhs.getElement(i)), i); } return result; } COM: <s> multiply this complex array by a complex array </s>
funcom_train/786251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void index(Tuple t, String field) { String s; if ( (s=t.getString(field)) == null ) return; StringTokenizer st = new StringTokenizer(s,m_delim); while ( st.hasMoreTokens() ) { String tok = st.nextToken(); addString(tok, t); } } COM: <s> indexes the given field of the provided tuple instance </s>
funcom_train/29618384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisRadioButton getJRadioInVitro() { if (jRadioInVitro == null) { jRadioInVitro = new MgisRadioButton(); jRadioInVitro.setValue("2"); m_maintenance.add(jRadioInVitro); jRadioInVitro.setText(AppTextsDAO.get("LABEL_IN_VITRO")); jRadioInVitro.setBounds(355, 114, 84, 19); } return jRadioInVitro; } COM: <s> this method initializes j radio in vitro </s>
funcom_train/4125982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateIndianSettlementInformation(Player player) { if (player.isIndian()) { return; } PlayerExploredTile playerExploredTile = getPlayerExploredTile(player); IndianSettlement is = (IndianSettlement) getSettlement(); playerExploredTile.setSkill(is.getLearnableSkill()); playerExploredTile.setWantedGoods(is.getWantedGoods()); playerExploredTile.setVisited(); } COM: <s> updates the information about the code indian settlement code located </s>
funcom_train/21619858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetState() { System.out.println("setState"); assertEquals(false, store.isDirty()); String state = "thestate"; store.setState(state); assertEquals(state, store.getState()); assertEquals(true, store.isDirty()); } COM: <s> test of set state method of class edu </s>
funcom_train/24429129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatBackupIndex(final int pBackupIndex) { if (mBackupIndexFormatter == null) { mBackupIndexFormatter = new DecimalFormat("0000000000".substring(0, String.valueOf(mMaxBackupIndex).length())); } return mBackupIndexFormatter.format(pBackupIndex); } COM: <s> answer a formatted backup index representation </s>
funcom_train/35095081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int next(int bits) { long oldseed, nextseed; AtomicLong seed = this.seed; do { oldseed = seed.get(); nextseed = (oldseed * multiplier + addend) & mask; } while (!seed.compareAndSet(oldseed, nextseed)); return (int)(nextseed >>> (48 - bits)); } COM: <s> generates the next pseudorandom number </s>
funcom_train/48337546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stop(Event e) { synchronized (lock) { if (state != INACTIVE) { sourceLogic.stop(); state = INACTIVE; } } if (DEBUG) { SystemUtilities.debug("Audio source stopped"); } if (e != null) { respond(e, new ControlEvent(this, null, ControlEvent.STOPPED)); } } COM: <s> stops the audio source logic </s>
funcom_train/20366082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasEquipment(Equipment equip ) { if ( getArmor().contains( equip ) ) { return true; } if ( getEquipment().contains( equip ) ) { return true; } if ( getExplosives().contains( equip ) ) { return true; } if ( getMeleeWeapons().contains( equip ) ) { return true; } if ( getRangedWeapons().contains( equip ) ) { return true; } return false; } COM: <s> checks this person for a given piece of equipment </s>