__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/43827743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStructurePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HLDeclaration_structure_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HLDeclaration_structure_feature", "_UI_HLDeclaration_type"), ModelPackage.Literals.HL_DECLARATION__STRUCTURE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the structure feature </s>
funcom_train/27849871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setNewStep (final JPanel step) { stepContainer.removeAll(); stepContainer.add(step, BorderLayout.CENTER); stepContainer.repaint(); stepContainer.revalidate(); getContentPane().repaint(); ((JPanel)getContentPane()).revalidate(); } COM: <s> switches the wizard to a new step </s>
funcom_train/8010204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String translateSiteMapURL(String url) { if (url == null) return null; String logical = getSiteMapEntryName(url); if (logical != null) { int pos = logical.length() + 1; String extraParms = null; if (pos < url.length()) extraParms = url.substring(pos); String u = getPage().getSiteMapURL(logical,extraParms,false); if (u != null) url = u; } return url; } COM: <s> translates a site map url preceeded by a sign to an actual url </s>
funcom_train/10526263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPrimarySort(String sortExpression) { if(sortExpression == null) return false; /* optimizing for the case where the sortExpression *is* the primary sort */ if(_sorts != null && _sorts.size() > 0 && ((Sort)_sorts.get(0)).getSortExpression().equals(sortExpression)) { return true; } else return false; } COM: <s> check to see if a sort expression is the first </s>
funcom_train/26483337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readMetadataFrom(String urlString) throws Exception { try { metadataURL = urlString; new MetadataReader(this).read(new InputSource(urlString)); } catch (IOException ioe) { ErrorHandler.error(I18N.get("DataSource.metadata_err"), ioe, I18N.get("DataSource.metadata_err_title")); } } COM: <s> reads metadata from a url </s>
funcom_train/4378412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialPositionIsSet() { initialKingFile = getFile(bitscanForward(getPieceBB(WHITE, KING))); long rookBB = getPieceBB(WHITE, ROOK); int firstRook = getFile(bitscanForward(rookBB)); rookBB = bitscanClear(rookBB); int secondRook = getFile(bitscanForward(rookBB)); if (firstRook < initialKingFile) { initialLongRookFile = firstRook; initialShortRookFile = secondRook; } else { initialLongRookFile = secondRook; initialShortRookFile = firstRook; } } COM: <s> this method should be invoked after the initial position is setup </s>
funcom_train/39015606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateAtmosphere(float tpf){ if(!isAtmosphereEnabled()) return; setCloudsTranslation(windFactor, tpf); float c = lightAmount+0.1f; cloudsTex.getBlendColor().set(c, c, c, 1.0f); atmosphereFogState.setColor(new ColorRGBA(lightAmount,lightAmount,lightAmount,1.0f)); float k = 0.1f*lightAmount; atmosphereMaterialState.getEmissive().set(k,k,k,1.0f); atmosphereMaterialState.getAmbient().set(0f,0f,k,1.0f); atmosphereMaterialState.getDiffuse().set(0f,0f,k,1.0f); atmosphereMaterialState.getSpecular().set(0f,0f,k,1.0f); } COM: <s> modify fog sky material and clouds blending for the atmosphere </s>
funcom_train/28125215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleStartTimespan(Attributes attrs) throws ParseException { Date startDate = _dateFormat.parse(attrs.getValue("start")); Date endDate = _dateFormat.parse(attrs.getValue("end")); _resultGroup.addTimeSpan (_currentProject, new TimeSpan(startDate, endDate)); } COM: <s> handles the start of a timespan element </s>
funcom_train/13298186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCreationDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Negotiation_creationDate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Negotiation_creationDate_feature", "_UI_Negotiation_type"), NegotiationPackage.Literals.NEGOTIATION__CREATION_DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the creation date feature </s>
funcom_train/23327536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object createObject(String cn,Object[] args) throws ClassNotFoundException,InstantiationException, NoSuchMethodException,IllegalAccessException, InvocationTargetException { Class cl = classFinder.findClass(cn); if (isAbstract(cl)) { throw new RuntimeException("Can not instantiate abstract class. : "+cn); } return getInstanceId(cl,args); } COM: <s> create an instance and return the object key </s>
funcom_train/23273209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeParameters(int paramNumber) { if (paramNumber == params.size()) { executeTarget(); } else { ParamSet paramSet = (ParamSet) params.elementAt(paramNumber); Enumeration values = paramSet.getValues(project); while (values.hasMoreElements()) { String val = (String) values.nextElement(); buildProperty(paramSet.getName(), val); executeParameters(paramNumber + 1); } } } COM: <s> this method is used to recursively iterate through each parameter set </s>
funcom_train/4722532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResponseName() { final StringBuffer responseName = new StringBuffer(); responseName.append("Convert to "); responseName.append(this.getName().trim()); responseName.append(" "); responseName.append(this.getResponseType().getName()); return responseName.toString(); } COM: <s> gets the response name </s>
funcom_train/37831382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ChatCondition getCondition(final ConfigurableFactoryContext ctx) { String value = ctx.getString("condition", null); if (value == null) { return null; } Binding groovyBinding = new Binding(); final GroovyShell interp = new GroovyShell(groovyBinding); try { String code = "import games.stendhal.server.entity.npc.condition.*;\r\n" + value; return (ChatCondition) interp.evaluate(code); } catch (CompilationFailedException e) { throw new IllegalArgumentException(e); } } COM: <s> extract the quest name from a context </s>
funcom_train/28751773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLane(Long newVal) { if ((newVal != null && this.lane != null && (newVal.compareTo(this.lane) == 0)) || (newVal == null && this.lane == null && lane_is_initialized)) { return; } this.lane = newVal; lane_is_modified = true; lane_is_initialized = true; } COM: <s> setter method for lane </s>
funcom_train/48876854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getNewDiagramMenu() { if (newDiagramMenu == null) { newDiagramMenu = new JMenu(); newDiagramMenu.setIcon(new ImageIcon("resources/images/new.png")); newDiagramMenu.setText("New"); newDiagramMenu.add(newUseCaseDiagramAction); newDiagramMenu.add(newClassDiagramAction); newDiagramMenu.add(newStateMachineDiagramAction); //newDiagramMenu.add(newActivityDiagramAction); newDiagramMenu.add(newTimingDiagramAction); newDiagramMenu.add(newDomainAction); } return newDiagramMenu; } COM: <s> this method initializes new diagram menu </s>
funcom_train/2757897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVCard(Person person) { boolean found = false; Enumeration<Person> en = list.elements(); while (en.hasMoreElements()) { Person p = (Person) en.nextElement(); if (p.getStandardTelephoneNumber().getIntNumber().equals( person.getStandardTelephoneNumber().getIntNumber()) || p.getLastName().equals("")) { //$NON-NLS-1$ found = true; break; } } if (!found) { list.add(person); } } COM: <s> add person to vcard list </s>
funcom_train/49403730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printHeaders(final BufferedWriter out) throws IOException { for (final Header h : this.headers) { out.append(MAJOR_HEADER_PREFIX); out.append(h.getClass().getName()); out.newLine(); out.append(MINOR_HEADER_PREFIX); out.append(h.toString()); out.newLine(); } } COM: <s> prints the headers into the provided print writer </s>
funcom_train/28649004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void ByteRepresentation() throws ParseException { jj_consume_token(HEXNUMBER); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 107: jj_consume_token(107); jj_consume_token(HEXNUMBER); break; default: jj_la1[197] = jj_gen; ; } } COM: <s> byte representation of an instruction </s>
funcom_train/27747114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContents(Object[] data, Transfer[] dataTypes){ if (data == null || dataTypes == null || data.length != dataTypes.length) { DND.error(SWT.ERROR_INVALID_ARGUMENT); } if (display.isDisposed() ) DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD); if (dataTypes.length == 0) return; ClipboardProxy proxy = ClipboardProxy._getInstance(display); if (!proxy.setData(data, dataTypes)) { DND.error(DND.ERROR_CANNOT_SET_CLIPBOARD); } } COM: <s> place data of the specified type on the system clipboard </s>
funcom_train/42858737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HeadReadings getLastEntry(){ Cursor c = db.rawQuery("select * from " + DATABASE_TABLE + " order by " + KEY_ID + " desc limit 1", null); c.moveToLast(); if (c.getPosition() >= 0){ HeadReadings entry = new HeadReadings(c); c.close(); return entry; } else { Log.i("getLastEntry", "cursor.getPosition < 0"); c.close(); return null; } } COM: <s> gets the last entry </s>
funcom_train/37621047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { for (Iterator it = params.iterator(); it.hasNext(); ) { Param param = (Param) it.next(); MacroDef.Attribute attribute = new MacroDef.Attribute(); attribute.setName(param.getName()); macro.addConfiguredAttribute(attribute); } } COM: <s> init this task </s>
funcom_train/46459213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCoordinateString(DrawingPanel panel, MouseEvent e) { if (!(panel instanceof VideoPanel)) return super.getCoordinateString(panel, e); VideoPanel vidPanel = (VideoPanel)panel; Point2D pt = vidPanel.getWorldMousePoint(); return getCoordinateString(pt.getX(), pt.getY()); } COM: <s> converts the pixel coordinates in a mouse event into world coordinates and </s>
funcom_train/23617017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findb(LPart f, LPart t, int steps) throws InterruptedException { super.checkError(f, t); // initialise the copies super.resetOps(f); // FILL OUT COPIES applyDivMerge(f.getScope().getValue()); // PO.p("parts = ",op); // fill the distance measures judgeDistances(t); // find the closest // return super.findClosest(steps); } COM: <s> there are 6 copies that will be evaluate using the number of </s>
funcom_train/12181617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean policyExists(String fullPolicyName) { StringBuffer fullPolicyPathName = new StringBuffer( getProject().getLocation().toOSString()); fullPolicyPathName.append(File.separatorChar).append(getPolicySourcePath()). append(File.separatorChar).append(fullPolicyName); return new File(fullPolicyPathName.toString()).exists(); } COM: <s> return true if the policy with the specified name exists in this project </s>
funcom_train/1164851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Status destroyStatus(long statusId) throws WeiboException { /*return new Status(http.post(getBaseURL() + "statuses/destroy/" + statusId + ".xml", new PostParameter[0], true), this);*/ return new Status(http.post(getBaseURL() + "statuses/destroy/" + statusId + ".json", new PostParameter[0], true)); } COM: <s> destroys the status specified by the required id parameter </s>
funcom_train/927030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML() { StringBuffer sb = new StringBuffer(); sb.append("<param name=\"" + StringUtil.toXML(toString()) + "\">"); //Add Children Enumeration enumer = children(); while(enumer.hasMoreElements()) { PTNode node = (PTNode)enumer.nextElement(); sb.append(node.toXML()); } sb.append("</param>"); return sb.toString(); } COM: <s> convert this node to xml </s>
funcom_train/49798663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addPlayer() { try { this.setPlayer(this.multiUserGame.addPlayer(this.name)); // Maybe the name was adapted this.setName(this.getPlayer().getName()); this.multiUserGame.push(); } catch (NotEnoughCountriesException e) { this.getPlayerNotAddedMessage().setRendered(true); } return null; } COM: <s> player tries to become part of the game </s>
funcom_train/46824968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawBoardSpacer(Graphics g) { int x = 1 + (this.model.getBoardSize() * (CELL_SIZE + CELL_SPACING)); int y = 0; g.setColor(GameProperties.getBackgroundColour()); g.fillRect(x, y, CELL_SIZE, 1 + (this.model.getBoardSize() * (CELL_SIZE + CELL_SPACING))); } COM: <s> draw middle spacer between boards </s>
funcom_train/13774524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean backtrack(ChoicePointLabel label) { ChoicePoint cp = backtrackStack(label); if (cp != null) { _undoStack.backtrack(cp.undoStackSize()); pushGoal(cp.goal()); return true; } else { _undoStack.backtrack(undoStackSize()); return false; } } COM: <s> backtracks this goal stack and the undo stack to the most recent labeled </s>
funcom_train/32328237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getDistance(final Vertex vertex, final Point point) { final Point vertexPoint = plotter.getPanel().logicalToPhysical( vertex.getX(), vertex.getY()); final int deltaX = point.x - vertexPoint.x; final int deltaY = point.y - vertexPoint.y; return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)); } COM: <s> the distance is measured in pixels </s>
funcom_train/8228824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBillingPlanName(String billingPlanID) { try { String q = "SELECT name FROM billingPlans WHERE billPlanID = '" + billingPlanID + "';"; PreparedStatement stat = conn.prepareStatement(q); ResultSet rs = stat.executeQuery(); if (rs.next()) return rs.getString("name"); } catch (SQLException e) { e.printStackTrace(); } return null; } COM: <s> get a billing plan name based on id </s>
funcom_train/7620003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onReceive(Context context, Intent intent) { if (intent.getAction().equals( mWifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { if (Config.LOGV) { Log.v(TAG, "Wifi scan resulst available"); } onUpdateAvailable(mWifiManager.getScanResults(), mNativeObject); } } COM: <s> this method is called when the android wifi data provider is receiving an </s>
funcom_train/7720338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startDiff(String oldJar, String newJar) throws DiffException { Element tmp = doc.createElementNS(XML_URI, "diff"); tmp.setAttribute( "old", oldJar); tmp.setAttribute( "new", newJar); doc.appendChild(tmp); currentNode = tmp; } COM: <s> start the diff </s>
funcom_train/32127748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MenuManager createHelpMenu(IWorkbenchWindow window) { MenuManager menu = new MenuManager(message.getString("helpMenu.name"), IWorkbenchActionConstants.M_HELP); menu.add(ActionFactory.INTRO.create(window)); menu.add(new Separator()); menu.add(ActionFactory.HELP_CONTENTS.create(window)); menu.add(ActionFactory.HELP_SEARCH.create(window)); menu.add(ActionFactory.DYNAMIC_HELP.create(window)); menu.add(new Separator()); menu.add(new Separator()); menu.add(aboutAction); return menu; } COM: <s> creates and returns the help menu </s>
funcom_train/13812527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(boolean reverse, Application a1, Application a2) { Enumeration e = closure.elements(); while (e.hasMoreElements()) { PrecedencePair pp = (PrecedencePair) e.nextElement(); if (pp.lesser.equals(a1) && pp.greater.equals(a2)) { return reverse?1:-1; } if (pp.greater.equals(a1) && pp.lesser.equals(a2)) { return reverse?-1:1; } } return 0; } COM: <s> use the precedence rule set to determine the order </s>
funcom_train/2845882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBasicForm(String prefix) { if (prefix.toLowerCase().equals("kal-a")) return "kal-eo"; else if (prefix.toLowerCase().equals("cap-a")) return "cap-eo"; else if (prefix.toLowerCase().equals("heul-reo")) return "heu-reu-eo"; else return prefix; } COM: <s> this function is supposed to return the basic form of some korean text </s>
funcom_train/18118052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStandardMailbox(MessageHolder mailbox, int type) { if (type == Mailbox.DRAFTS) drafts = mailbox; else if (type == Mailbox.SENT) sent = mailbox; else if (type == Mailbox.TRASH) trash = mailbox; else if (type == Mailbox.INBOX) { if (inbox != null) inbox.setRemote(false); inbox = mailbox; mailbox.setRemote(true); } } COM: <s> method for setting a standard mailbox </s>
funcom_train/35288385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Calendar calendar) { int position = 0; if (!this.intervals.isEmpty()) { position = indexOf(calendar); if (position != 0 && this.intervals.get(position - 1).contains(calendar)) { return true; } else if (position != intervals.size() && this.intervals.get(position).contains(calendar)) { return true; } } return false; } COM: <s> returns true if any interval in the calendar contains the specified date </s>
funcom_train/9804343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title, String font, int size) { String fontname = ""; if (font != null) { fontname = " font '" + font + ((size > 1) ? "," + size : "") + "'"; } set("title", "'" + title + "'" + fontname); } COM: <s> set the graph title and the title font </s>
funcom_train/34992852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String downloadHtml() throws IOException { String html = ""; URLConnection connection = url.openConnection(proxy); //Connection to IMDb fails with a 403 if we don't set a User Agent connection.setRequestProperty("User-Agent", "None/0.0 (None)"); BufferedReader in = new BufferedReader(new InputStreamReader( connection.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) html = html+" "+inputLine; in.close(); return html; } COM: <s> downloads a html file and returns it as one huge string </s>
funcom_train/45382832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PropertyDescriptor createPropertyDescriptor (String name, String gett, String sett, String group) { PropertyDescriptor pd=null; try { pd = new PropertyDescriptor (name, hudspeth_lewis_model_1988.class, gett, sett); pd.setShortDescription(group); } catch (IntrospectionException ex) {} return pd; } COM: <s> create a new property descriptor </s>
funcom_train/35321183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeVetoableChangeListener(VetoableChangeListener listener) { if (listener == null) { return; } if (listener instanceof VetoableChangeListenerProxy) { VetoableChangeListenerProxy proxy = (VetoableChangeListenerProxy)listener; // Call two argument remove method. removeVetoableChangeListener(proxy.getPropertyName(), proxy.getListener()); } else { this.map.remove(null, listener); } } COM: <s> remove a vetoable change listener from the listener list </s>
funcom_train/27899327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clickRadioOption(String radioGroup, String radioOption) { HtmlRadioButtonInput rb = getRadioOption(radioGroup, radioOption); if (!rb.isChecked()) { try { rb.click(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("checkCheckbox failed", e); } } } COM: <s> clicks a radio option </s>
funcom_train/7655516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public X509CRLEntry getRevokedCertificate(BigInteger serialNumber) { if (!entriesRetrieved) { retirieveEntries(); } if (entries == null) { return null; } for (int i=0; i<nonIndirectEntriesSize; i++) { X509CRLEntry entry = (X509CRLEntry) entries.get(i); if (serialNumber.equals(entry.getSerialNumber())) { return entry; } } return null; } COM: <s> method searches for crl entry with specified serial number </s>
funcom_train/18846484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OWLNamedClass getDirectSuperClass(OWLNamedClass cls) { String className = null; OWLNamedClass superClass = null; Collection superCls = cls.getNamedSuperclasses(); Iterator clsIterator = superCls.iterator(); while(clsIterator.hasNext()) { superClass = (OWLNamedClass)clsIterator.next(); className = superClass.getName(); } if(log.isDebugEnabled()) { log.debug(componentID + ":: Super class of class " + cls + " = " + className); } return superClass; } COM: <s> get super class </s>
funcom_train/50085292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeElectronContainer(IElectronContainer electronContainer) { if (electronContainer instanceof IBond) removeBond((IBond) electronContainer); else if (electronContainer instanceof ILonePair) removeLonePair((ILonePair) electronContainer); else if (electronContainer instanceof ISingleElectron) removeSingleElectron((ISingleElectron) electronContainer); } COM: <s> removes this electron container from this container </s>
funcom_train/41979576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateProgressBar (JProgressBar bar, int val, String s) { bar.setValue (val); if (s != null) { bar.setString (s); bar.setStringPainted (true); } bar.paintImmediately (0, 0, 600, 100); } COM: <s> updates the progress bar to a specified value </s>
funcom_train/7276684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scheduleServices() { backgroundExecutor.scheduleWithFixedDelay(new IncomingValidator(), acceptor.get().getTimeBetweenValidates(), acceptor.get().getTimeBetweenValidates(), TimeUnit.MILLISECONDS); backgroundExecutor.scheduleWithFixedDelay(new PeriodicPinger(), 0, PING_PERIOD, TimeUnit.MILLISECONDS); } COM: <s> schedules incoming validator periodic pinger for periodic use </s>
funcom_train/3286199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void linkToGuestbook(Cloud aCloud, Node aNode, RunData runData) { Node aGuestbookNode = aCloud.getNode(runData.getRequest().getParameter("guestbookid")); RelationManager aRelationManager = aCloud.getRelationManager("related"); Relation aRelation = aRelationManager.createRelation(aNode, aGuestbookNode); aRelation.commit(); } COM: <s> link the entry to the guestbook </s>
funcom_train/36006263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean processModelUpdateEvent(String property) { if (dataProvider != null && hasBindInstruction()) { boolean success = false; for (BindInstruction bindInstruction = (BindInstruction) bindInstructions.getFirst(); bindInstruction != null; bindInstruction = bindInstruction.next) { if (bindInstruction.hasProperty(property)) { bindInstruction.process(); invalidate(); success = true; } } return success; } return false; } COM: <s> process a model update event </s>
funcom_train/17379653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endTransaction(SessionScope sessionScope) throws SQLException { try { try { sqlExecutor.cleanup(sessionScope); } finally { txManager.end(sessionScope); } } catch (TransactionException e) { throw new NestedSQLException("Error while ending transaction. Cause: " + e, e); } } COM: <s> end the transaction on a session </s>
funcom_train/46063229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUmCreateUser() throws Exception { // search for user u1 manually. SetUp puts the user in the database // so we look if we can find the user in the database log.debug("Entering testUmCreateUser()"); UserManager um = UserManager.getInstance(); User found = um.findUserByEmail("judihui"); assertTrue(u1.getKey().equals(found.getKey())); } COM: <s> test if usermanager </s>
funcom_train/41768214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { g.setColor(getColor()); if (isFilled()) g.fillRect((int) getX(), (int) getY(), (int) width, (int) height); else g.drawRect((int) getX(), (int) getY(), (int) width, (int) height); } COM: <s> paints the code shape code </s>
funcom_train/20769116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void translateEvents(UsbIoBuf b) { if ((monitor.getPID() == PID_USBAERmini2) && (monitor.getDID() > 0)) { translateEventsWithCPLDEventCode(b); // CypressFX2MonitorSequencer seq=(CypressFX2MonitorSequencer)(CypressFX2.this); // seq.mapPacket(captureBufferPool.active()); } else { translateEventsFromOriginalUSB2AERmini2WithOriginalFirmware(b); } } COM: <s> this method overrides the super implementation to </s>
funcom_train/30008582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createElement(String elementName, ContentHandler handler, AttributesImpl atts, char[] characters) { try { // Append the given characters to a new element with the given element name and attributes provided handler.startElement("", "", elementName, atts); handler.characters(characters, 0, characters.length); handler.endElement("", "", elementName); } catch (SAXException ex) { ex.printStackTrace(); } } COM: <s> creates an xml element entry using the definition of node </s>
funcom_train/43885939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSchema() throws IOException, SeException { FeatureType schema; schema = store.getSchema(testData.getTempTableName()); assertNotNull(schema); // ROW_ID is not included in TEST_TABLE_COLS assertEquals(TestData.TEST_TABLE_COLS.length, schema.getAttributeCount()); } COM: <s> tests that the schema for the defined tests tables are returned </s>
funcom_train/21188423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setActiveBranch(String branch) throws IOException, CruiseControlException { ManagedCommandline cmdLine = buildCommonCommand(); cmdLine.createArguments("setactivebranch", branch); LOG.debug("Executing: " + cmdLine.toString()); cmdLine.execute(); cmdLine.assertExitCode(0); } COM: <s> sets the active branch to the provided branch name </s>
funcom_train/17201877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endScratchInterval(Register r, Instruction end) { if (DEBUG) { System.out.println("endScratchInterval " + r + " " + end.scratch); } PhysicalInterval p = (PhysicalInterval) pending.get(r); p.end = end; pending.remove(r); } COM: <s> end an interval of scratch ness for a physical register </s>
funcom_train/41399737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getEditButton() { if ((editButton == null) && (action != null)) { editButton = new JFancyButton(); editButton.setAction(action); editButton.setText("edit"); editButton.setRolloverEnabled(true); } return editButton; } COM: <s> gets the edit button for this panel </s>
funcom_train/18506555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getInputStream() throws IOException { if (url == null) throw new IOException("JV-1000-001: URL Value is Null"); logger.finest("JV-1000-002: Obtaining Input Stream: " + toString()); return getURL().openStream(); } COM: <s> client is responsible for closing inputstream on failure </s>
funcom_train/36461801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getObservationEditorAsString() { String observationEditorList = ""; String tmpUser = ""; for(Object o: this.observationEditor) { if (tmpUser != null) { tmpUser = (String) o; observationEditorList+= tmpUser+this.attributesDefinition.getSeparatorValues(); } } //Cut of the last ';' int listLength = observationEditorList.length(); if(listLength>0) listLength = observationEditorList.length()-1; return observationEditorList.substring(0, listLength); } COM: <s> returns all editors of an observation as list e </s>
funcom_train/29579875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupSlide9() { pwslide9 = new PWizardPanel9(PWizard.finishWizard.policyDocument); pwslide9.refreshPanel(new XMLChangeEvent(PWizard.finishWizard.policyDocument, "NEW_XML")); pwslide9.count = pwslide9.tabbedPane.getTabCount()+1; if (pwslide9.tabbedPane.getTabCount() > 0) bbp.nextButton.setEnabled(true); } COM: <s> sets up slide9 </s>
funcom_train/26018921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if (logger.isActivated()) { logger.info("Stop the IMS module"); } // Stop call monitoring callManager.stopCallMonitoring(); // Terminate the connection manager connectionManager.terminate(); // Terminate the service dispatcher serviceDispatcher.terminate(); if (logger.isActivated()) { logger.info("IMS module has been stopped"); } } COM: <s> stop the ims module </s>
funcom_train/18097793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawStrings( Item parent, String[] textLines, int textColor, int x, int y, int leftBorder, int rightBorder, int lineHeight, int maxWidth, int layout, Graphics g ) { drawStrings(textLines, textColor, x, y, leftBorder, rightBorder, lineHeight, maxWidth, layout, g); } COM: <s> paints the text and applies the text effect </s>
funcom_train/2860288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractField (DataDir dir, int fieldTag) { String fieldValue = null; DataDir subdir = dir.child().child(); while(subdir !=null){ if (subdir.fldid() == fieldTag){ fieldValue = subdir.child().getString(); break; } subdir = subdir.next(); } return fieldValue; } COM: <s> extract field from current record </s>
funcom_train/28477780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void upgradeVirtualHardware() throws VixException { VixHandle jobHandle = VixWrapper.VixVM_Suspend(vmHandle, 0, null, null); try { /*List result =*/ VixWrapper.VixJob_Wait(jobHandle, Collections.EMPTY_LIST); } finally { VixWrapper.Vix_ReleaseHandle(jobHandle); } } COM: <s> upgrades the virtual hardware version of the virtual machine to match </s>
funcom_train/3471034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeController(BlockType type) { assert(type != null); assert(this.blockMap.containsKey(type)); if (type.equals(BlockType.AUDIO) || type.equals(BlockType.VIDEO)) { this.controllerMap.remove(BlockType.AUDIO); this.controllerMap.remove(BlockType.VIDEO); } else { this.controllerMap.remove(type); } } COM: <s> removes the sync controller for the given block type </s>
funcom_train/29768705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String mapToSelectColumn(String fieldName, boolean addFieldPrefixIfNecessary) { int fieldInx = MapBeanUtils.findByName(getFields(), fieldName, addFieldPrefixIfNecessary); if (fieldInx < 0) { throw new JdbcMapException(JdbcMapErrors.CannotFindColumnForField, fieldName); } String column = getSelectColumns().get(fieldInx); return column; } COM: <s> maps a field to a select column </s>
funcom_train/44890601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveSourceFolder(IPath projectRelativeFromPath, IPath fullToPath) { boolean includeInSystemPath = includesSourceFolder(projectRelativeFromPath); List foldersToRemove = new ArrayList(); foldersToRemove.add(projectRelativeFromPath); SystemPath newSystemPath = systemPath.copy(); newSystemPath.removeSourceFolders(foldersToRemove); newSystemPath.addSourceFolder(getProjectRelativePath(fullToPath), includeInSystemPath); setSystemPath(newSystemPath); } COM: <s> move the given source folder in the receiver to the given destination </s>
funcom_train/13995071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValues(String propertyName, Map values) { for (Iterator it = values.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); setValue((Key) entry.getKey(), propertyName, entry.getValue()); } } COM: <s> sets the values for a complete property </s>
funcom_train/5437073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void savePacket(PacketCaptureEvent event) { Packet p = (Packet)event.getPayload(); if(pcapOut != null) { try { pcapOut.write(p); } catch (IOException e) { view.showMessage("Error saving packet [" + p.getSerialNo() + "]"); e.printStackTrace(); closePcapOut(); } catch (PcapException e) { view.showMessage("Error saving packet [" + p.getSerialNo() + "]"); e.printStackTrace(); closePcapOut(); } } } COM: <s> saves the packet that is present in the payload of the given </s>
funcom_train/29698023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLegal() { // A step is legal if it's static movement type is not illegal, // and it is either a valid end position, or not an end position. return ( movementType != IEntityMovementType.MOVE_ILLEGAL && (isLegalEndPos() || !isEndPos) ); } COM: <s> determine if this is a legal step </s>
funcom_train/16176376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRoundRect(Color c) { drawInit(c); if (roundRect == null) { roundRect = new RoundRectangle2D.Float(curX, curY, curWidth, curHeight, 3, 3); } roundRect.setFrame(curX, curY, curWidth, curHeight); g2.fill(roundRect); } COM: <s> draws a rounded rectangle of the specified color </s>
funcom_train/11102682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendNotFound(FacesContext context, String resourceId) throws IOException { if (servletRequest(context)) { HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse(); response.sendError(HttpServletResponse.SC_NOT_FOUND, resourceId); } else { throw new IllegalArgumentException(resourceId); } } COM: <s> p send a not found http response if possible </s>
funcom_train/37433551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { Socket s = new Socket(this._host, this._port, this._boundIP, this._boundPort); if (useNagle) { s.setTcpNoDelay(true); } else { s.setTcpNoDelay(false); } sock = s; } catch (IOException ioe) { exception = ioe; } } COM: <s> main processing method for the connect thread object </s>
funcom_train/29538323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonTools() { if (jButtonTools == null) { jButtonTools = new JButton(); jButtonTools.setIcon(new ImageIcon(getClass().getResource("/g/tools.gif"))); jButtonTools.setToolTipText("Configure options"); jButtonTools.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { commandDispatcher.dispatch(CommandDispatcher.Command.SHOW_PREFERENCES_DIALOG); } }); } return jButtonTools; } COM: <s> this method initializes j button tools </s>
funcom_train/4306062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoreImage filter(CoreImage input) { CoreImage oldInput = getInput(); // Set input so that getWidth(), etc. is correct. setInput(input); CoreImage newOutput = ImageCache.instance.get(getWidth(), getHeight(), isOpaque()); filter(input, newOutput); setInput(oldInput); return newOutput; } COM: <s> performs this filter on the input image onto a newly created output image </s>
funcom_train/18189837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showDialog(boolean canStick,Game game){ this.game = game; cancelled = true; jcbStick.setEnabled(canStick); jcbStick.setSelected(canStick); updateMarkerNames(); updateColors(); loadDialogParameters(game); getRootPane().requestFocus(); setVisible(true); if( !cancelled ){ saveDialogParameters(game); } return cancelled==false; } COM: <s> show the dialog </s>
funcom_train/35678192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNewJaxbObjectFactory() { try { Object factory = BindingUtil .newJaxbObjectFactory("com.legstar.test.coxb.mock"); assertTrue(factory != null); assertTrue(factory instanceof com.legstar.test.coxb.mock.ObjectFactory); } catch (CobolBindingException e) { e.printStackTrace(); fail(e.getMessage()); } } COM: <s> test ability to create new jaxb object factories dynamically </s>
funcom_train/2537556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setSizeXYGlobal(float width, float height){ if (width > 0 && height > 0){ Vector3D centerPoint = this.getCenterPointGlobal(); this.scaleGlobal( (1f/this.getWidthXYGlobal())* width , (1f/this.getHeightXYGlobal()) * height, 1, centerPoint); return true; }else return false; } COM: <s> scales this shape to the given width and height in the xy plane </s>
funcom_train/22054544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoomImage(int modifier) { int newval = Math.min(Math.max(m_iZoomLevel + modifier, 1), 10); m_iZoomLevel = newval; if (m_container != null) { m_container.setZoomLevelText(getZoom()); } Misc.debug(this, "Setting Zoom Level - " + getZoom() + "%"); } COM: <s> zooms the image in or out by number of steps shown </s>
funcom_train/39396398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHeader(String name, String value) { synchronized (headers) { int len = headers.size(); for (int i = len - 1; i >= 0; i--) { InternetHeader header = headers.get(i); if (header.nameEquals(name)) { headers.add(i + 1,new InternetHeader(name,value)); return; } if (header.nameEquals(":")) { len = i; } } headers.add(len,new InternetHeader(name,value)); } } COM: <s> adds the specified header </s>
funcom_train/11010434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addIdentifier() { if (!propsPart.getIdentifierProperty().hasValue()) return; Element elem = xmlDoc.getRootElement().element( new QName(KEYWORD_IDENTIFIER, namespaceDC)); if (elem == null) { // missing, we add it elem = xmlDoc.getRootElement().addElement( new QName(KEYWORD_IDENTIFIER, namespaceDC)); } else { elem.clearContent();// clear the old value } elem.addText(propsPart.getIdentifierProperty().getValue()); } COM: <s> add identifier property element if needed </s>
funcom_train/3391553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkPrevious() { if (prev == null) { printText("doclet.Prev_Class"); } else { printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, prev, "", configuration.getText("doclet.Prev_Class"), true)); } } COM: <s> print previous package link </s>
funcom_train/49993032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String downloadDataset(String sessionId, Long datasetId) throws SessionException, NoSuchObjectFoundException, InsufficientPrivilegesException { //for user bean get userId String userId = user.getUserIdFromSessionId(sessionId); return DownloadManager.downloadDataset(userId, sessionId, datasetId, manager); } COM: <s> generates the download url for the download of a data set </s>
funcom_train/32239058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MJButton getJobListButton() { if (jobListButton == null) { jobListButton = new MJButton(); jobListButton.setPreferredSize(new Dimension(100, 26)); jobListButton.setMnemonic(KeyEvent.VK_J); jobListButton.setText("Job list"); } return jobListButton; } COM: <s> this method initializes job list button </s>
funcom_train/16855787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Integer searchValue(String value) { if (value != null) { ListBox component = getComponent(); int l = component.getItemCount(); for (int i = 0; i < l; i++) { String val = component.getValue(i); if (value.equals(val)) { return i; } } } return -1; } COM: <s> search a value in the list box </s>
funcom_train/5380929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int convertHorizontalDLUsToPixels(Control control, int dlus) { GC gc = new GC(control); gc.setFont(control.getFont()); int averageWidth = gc.getFontMetrics().getAverageCharWidth(); gc.dispose(); double horizontalDialogUnitSize = averageWidth * 0.25; return (int) Math.round(dlus * horizontalDialogUnitSize); } COM: <s> returns the number of pixels corresponding to the </s>
funcom_train/43889745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nextBandDone() { int skip = sourceBands[bandIndex]; if (++bandIndex >= sourceBands.length) { return true; } skip = sourceBands[bandIndex] - skip; if (skip < 0) { iterator.startBands(); skip = sourceBands[bandIndex]; } while (--skip >= 0) { if (iterator.nextBandDone()) { return true; } } return false; } COM: <s> sets the iterator to the next band in the image and returns </s>
funcom_train/42864165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeVFromRoad(Vehicle v_) { _vehiclesOnRoad.remove(v_); int segIdx; segIdx = getSegIdx(v_.getRoadLine(), v_.getLocation()); Line2D seg = _segmentList.get(v_.getRoadLineIdx()).get(segIdx); if (_vehicleOnSeg.get(seg).contains(v_)) { _vehicleOnSeg.get(seg).remove(v_); } } COM: <s> remove vehicle from this road </s>
funcom_train/8484719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATObject meta_newInstance(ATTable initargs) throws InterpreterException { int len = initargs.base_length().asNativeNumber().javaValue; if (len != 1) throw new XArityMismatch("init method of mirror", 1, len); ATObject reflectee = initargs.base_at(NATNumber.ONE); return atValue(reflectee); } COM: <s> this method makes a new mirror object </s>
funcom_train/19416994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGlobaleLanguage() throws Throwable { // System.out.println("testGlobaleLanguage start"); final AnnotationHandlerImpl handler = this.createHandler("annotation.namespace.test.xml"); // System.out.println("testGlobaleLanguage end"); final String language = handler.getGlobalLanguage(); assertEquals("de", language); } COM: <s> tests the startglobal language </s>
funcom_train/8483628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATBoolean base__opeql__opeql_(ATObject comparand) throws InterpreterException { if (comparand.isTypeTag()) { return NATBoolean.atValue(comparand.asTypeTag().base_typeName().equals(typeName_)); } else { return NATBoolean._FALSE_; } } COM: <s> identity of types is based on their name </s>
funcom_train/18898645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoadApi1() throws Exception { // log that we're executing the test log.debug("Starting load API test 1"); URI sourceURI = new URI("http://purl.org/dc/elements/1.1"); URI modelURI = new URI(testModel); // execute the load remotely long statements = bean.load(null, sourceURI, modelURI); this.assertEquals("Incorrect number of statements inserted", 146, statements); } COM: <s> test the interpreter using a load api remotely </s>
funcom_train/2558922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getConversion(Class require) throws Exception { if(require.isAssignableFrom(ArrayList.class)) { return ArrayList.class; } if(require.isAssignableFrom(HashSet.class)) { return HashSet.class; } if(require.isAssignableFrom(TreeSet.class)) { return TreeSet.class; } throw new InstantiationException("Cannot instantiate %s for %s", require, type); } COM: <s> this is used to convert the provided type to a collection type </s>
funcom_train/1773950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MultiLineString parseMultiLineString(JSONObject obj){ JSONArray _c = obj.getJSONArray("coordinates"); LineString[] _lines = new LineString[_c.size()]; for (int i = 0; i < _lines.length; i++) { _lines[i] = this.parseCoordinateLineString(_c.getJSONArray(i)); } return this.geometryFactory.createMultiLineString(_lines); } COM: <s> parse multi line string </s>
funcom_train/16146517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertBefore(final AbstractInsnNode location, final AbstractInsnNode insn) { ++size; AbstractInsnNode prev = location.prev; if (prev == null) { first = insn; } else { prev.next = insn; } location.prev = insn; insn.next = location; insn.prev = prev; cache = null; insn.index = 0; // insn now belongs to an InsnList } COM: <s> inserts the given instruction before the specified instruction </s>
funcom_train/40507292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findTrackFrameIndex(float time) { int frameNum = 0; while ((frameNum < (frames.length - 1)) && (Math.abs(time - frames[frameNum].pitchmarkTime) > Math.abs(time - frames[frameNum + 1].pitchmarkTime))) { frameNum++; } return frameNum; } COM: <s> finds the index of the frame closest to the given time </s>
funcom_train/15625180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isMatching(@NotNull final Iterable<G> mapSquare, @NotNull final GameObjectMatcher matcher) { for (final GameObject<G, A, R> gameObject : mapSquare) { if (matcher.isMatching(gameObject.getHead())) { return true; } } return false; } COM: <s> returns whether a map square contains a game object matching a given </s>
funcom_train/44822221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerContentPane(String paneName, Object contentPane) { JPanel panel = (JPanel) contentPane; // Content Pane must be a JPanel for Swing ContentPaneDef pDef = getPaneDefByName (paneName); if (pDef != null) pDef.setUserObject (panel); } COM: <s> set the content panes jcomponent container object for a given content pane definition </s>