__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/28473420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getSnaggingMacroPanel() { if (snaggingMacroPanel == null) { snaggingMacroPanel = new JPanel(); snaggingMacroPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); snaggingMacroPanel.add(getPopulationComboBox(), null); snaggingMacroPanel.add(getJButton(), null); snaggingMacroPanel.setAlignmentX(Component.LEFT_ALIGNMENT); } return snaggingMacroPanel; } COM: <s> this method initializes snagging macro panel </s>
funcom_train/5728643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAccessTypePermission(Course course) { logger.debug("changing course " + course.getName() + " (" + course.getId() + ") to " + course.getAccessType()); if (course.getAccessType() == AccessType.ANONYMOUS) { getSecurityService().setPermissions(Roles.ANONYMOUS, course, LectureAclEntry.READ); } else { getSecurityService().setPermissions(Roles.ANONYMOUS, course, LectureAclEntry.NOTHING); } } COM: <s> update access type permission of course </s>
funcom_train/7867574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toggleInfoPanel() { if (jpanStatus.isVisible()) { jpanStatus.setVisible(false); iStatusSplitPane.setDividerLocation(1); } else { jpanStatus.setVisible(true); iStatusSplitPane.setDividerLocation(0.85); } this.resize(this.getSize()); this.update(this.getGraphics()); } COM: <s> this method toggles the statuspanel in the bottom </s>
funcom_train/26550135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTrimTrailingSpaces() { final String testS = " RemoveAll trailing SpacesFromMe "; assertEquals(" RemoveAll trailing SpacesFromMe", ParserUtils.rTrim(testS)); assertEquals("", ParserUtils.rTrim(" ")); assertEquals("test", ParserUtils.rTrim("test")); } COM: <s> make sure all spaces are properly removed from the end of the string </s>
funcom_train/32056737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetActiveOffset() { System.out.println("testSetActiveOffset"); int i = 1; boolean b = true; JGraph g = new JGraph( new DefaultGraphModel() ); Rule x = new Rule(i, b, g); int j = 2; x.setActiveOffset(j); } COM: <s> test of set active offset method of class rule </s>
funcom_train/45713513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImagePlus deserialize(byte[] bytes) { ByteArrayInputStream stream = new ByteArrayInputStream(bytes); TiffDecoder decoder = new TiffDecoder(stream, "Untitled"); if (IJ.debugMode) decoder.enableDebugging(); FileInfo[] info = null; try { info = decoder.getTiffInfo(); } catch (IOException e) { return null; } FileOpener opener = new FileOpener(info[0]); ImagePlus imp = opener.open(false); if (imp==null) return null; imp.setTitle(info[0].fileName); imp = makeComposite(imp, info[0]); return imp; } COM: <s> deserialize a byte array that was serialized using the file saver </s>
funcom_train/1683755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showNameAlreadyUsed(){ labelWaitingForAnswer.setVisible(false); JOptionPane.showMessageDialog(this, "Sorry! This username is already in use: "+textFieldName.getText()+". Please choose another one.", "Username already in use", JOptionPane.ERROR_MESSAGE); activateAllElements(); } COM: <s> shows to the user a message that his username is already in use </s>
funcom_train/19543676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findChildPropertyIndex(Element element, String childPropertyName) { int index = 0; while ((index = findElementIndex(element, index)) >= 0) { Element child = (Element)element.getChildNodes().item(index); if (child.getNodeName().equals(childPropertyName)) return index; index += 1; } // endwhile return -1; } COM: <s> find the index of a child property element with the given name </s>
funcom_train/32213272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int addLine(StringTokenizer st, Vector args, StringBuffer cb) { if (!st.hasMoreTokens()) { return 1; } StringBuffer sb = new StringBuffer(st.nextToken()); while (st.hasMoreTokens()) { sb.append(" " + st.nextToken()); } args.add(sb.toString()); cb.append(" "+sb.toString()); return 0; } COM: <s> converts the remaining tokens to a string and adds to arg list </s>
funcom_train/2610654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveMap(MapTag map, String originID) { File file = new File(mapPath + "/" + originID); file.mkdirs(); String filename = new String(mapPath + "/" + originID + "/" + map.getID()); try { XMLFileIO.saveTag(map, filename); } catch (IOException e) {} } COM: <s> saves map into map directory for origin id </s>
funcom_train/13525266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getStretchX() { if (stretchX < 0.0) { Iterator iter = cells.iterator(); Cell cell; stretchX = getIntrinsicStretchX(); while (iter.hasNext()) { cell = (Cell) iter.next(); if (cell.isMultiColumnCell()) stretchX = Math.max(stretchX, cell.getStretchXPerColumn()); } } return stretchX; } COM: <s> gets the horizontal stretch value of this column </s>
funcom_train/34791784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void systemEnable(int state) { switch (state) { case TMEV.SYSTEM: setEnable(ActionManager.LOAD_FILE_COMMAND, true); setEnable(ActionManager.LOAD_DIRECTORY_COMMAND, true); setEnable(ActionManager.LOAD_EXPRESSION_COMMAND, true); break; case TMEV.DATA_AVAILABLE: setEnable(ActionManager.SAVE_IMAGE_COMMAND, true); setEnable(ActionManager.PRINT_IMAGE_COMMAND, true); setEnable(ActionManager.ANALYSIS_COMMAND, true); break; case TMEV.DB_AVAILABLE: break; case TMEV.DB_LOGIN: setEnable(ActionManager.LOAD_DB_COMMAND, true); break; } } COM: <s> enables some buttons according to specified state </s>
funcom_train/37071992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareStack(Node parent, int depth) { Node[] children = parent.children(); // we go backwards to preserve the ordering of the // children in the stack. for(int i = children.length - 1 ; i >= 0; i--) { if (children[i].isRevealed()) { stack.add(new NodeAndDepth(children[i], depth)); } } } COM: <s> adds only the revealed children onto the stack </s>
funcom_train/29914673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFileStore getStore(IPath path) { try { return getStore(new URI(scheme, path.toString(), null)); } catch (URISyntaxException e) { //TODO: return null File System ??? return null; // EFS.getNullFileSystem().getStore(path); } } COM: <s> this is implementation of </s>
funcom_train/35281936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3f multNormal(Vector3f vec, Vector3f store) { if (store == null) { store = new Vector3f(); } float vx = vec.x, vy = vec.y, vz = vec.z; store.x = m00 * vx + m01 * vy + m02 * vz; store.y = m10 * vx + m11 * vy + m12 * vz; store.z = m20 * vx + m21 * vy + m22 * vz; return store; } COM: <s> code mult normal code multiplies a vector about a rotation matrix but </s>
funcom_train/10364506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getPersistentAttributes() { List attrs = new ArrayList(); for (Iterator i = attributes.iterator(); i.hasNext();) { GAttributeInfo info = (GAttributeInfo) i.next(); if (info.isPersistent()) { attrs.add(info); } } return attrs; } COM: <s> returns a list where the elements are type gattribute info </s>
funcom_train/22447608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getPaintTestDrawingPanel(), java.awt.BorderLayout.CENTER); jContentPane.add(getJButton(), java.awt.BorderLayout.NORTH); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/25204214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringIndex(int sid) { int highestSID = T2StandardStrings.getHighestSID(); if (sid <= highestSID) { return T2StandardStrings.getString(sid); } if (sid - highestSID - 1 < stringIndex.size()) { return stringIndex.get(sid - highestSID - 1); } return null; } COM: <s> returns the string for the sid </s>
funcom_train/40551603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Pages add(PageEventHandler... pageEventHandlers) { for (PageEventHandler pageEventHandler : pageEventHandlers) { pageEventHandler.init(this); settings.pageEventHandlers.add(pageEventHandler); if (pageEventHandler instanceof PageErrorEventHandler) settings.pageErrorEventHandlers.add((PageErrorEventHandler) pageEventHandler); if (pageEventHandler instanceof PageRequestEventHandler) settings.pageRequestEventHandlers.add((PageRequestEventHandler) pageEventHandler); } return this; } COM: <s> add page lifecycle event handler </s>
funcom_train/42508255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRenderingErrorObserver(RenderingErrorObserver observer) { try { this.renderingErrorListener = RenderingErrorListenerManager.setRenderingErrorObserver( observer, this.renderingErrorListener); this.renderingErrorObserver = observer; } catch (LinkageError ex) { // As RenderingErrorListener and addRenderingErrorListener are available since Java 3D 1.5, // use the default rendering error reporting if Sweet Home 3D is linked to a previous version } } COM: <s> sets the current rendering error listener bound to code virtual universe code </s>
funcom_train/44557743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDecimalValue(int[] bits, int start, int stop, boolean printBits) { String dec = ""; for (int i = start; i >= stop; i--) { dec += bits[i]; } return Integer.parseInt(dec, 2); } COM: <s> returns the decimal value of a specified bumber of bytes from a specific </s>
funcom_train/50463347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processProperties(BLXProperties pProperties) { //Get Show Title Property this.setShowTitle(pProperties.getPropertyBoolean(SHOW_TITLE_ATTR)); this.setTitle(pProperties.getPropertyString(TITLE_ATTR)); this.setShortTitle(pProperties.getPropertyString(NAME_ATTR)); this.setDescription(pProperties.getPropertyString(DESC_ATTR)); } COM: <s> process properties from xml </s>
funcom_train/32329572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonOk() { if (jButtonOk == null) { jButtonOk = new JButton(); jButtonOk.setBounds(new Rectangle(418, 430, 80, 30)); jButtonOk.setActionCommand("Ok"); jButtonOk.setText(MessageUtils.getMessage(JWallpaperChanger.class, "button.ok")); jButtonOk.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { saveCommand(); } }); } return jButtonOk; } COM: <s> this method initializes j button ok </s>
funcom_train/44222650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage getDelineationScreenshot() { int w = this.imagePane.getWidth(); int h = this.imagePane.getHeight(); BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g2d = bi.createGraphics(); this.imagePane.paintDelineationOnly = true; this.imagePane.paint(g2d); this.imagePane.paintDelineationOnly = false; return bi; } COM: <s> get the screenshot of the current brain volume delineation </s>
funcom_train/3369245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBeforeIndex(int part, int index) { if (part == AccessibleText.CHARACTER) { String str = super.getBeforeIndex(part, index); return getEchoString(str); } else { // There is no word or sentence before the text // displayed in the JPasswordField. return null; } } COM: <s> returns the code string code before a given code index code </s>
funcom_train/39540509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void bindSearchLabel() { searchLabel.setText(getUIString(SEARCH_FIELD_LABEL)); String mnemonic = getUIString(SEARCH_FIELD_MNEMONIC); if (mnemonic != SEARCH_FIELD_MNEMONIC) { searchLabel.setDisplayedMnemonic(mnemonic.charAt(0)); } searchLabel.setLabelFor(searchField); } COM: <s> configures the search label </s>
funcom_train/458654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof Address)) { return false; } Address p = (Address) o; return p.mSrcAddr == mSrcAddr && p.mSrcPort == mSrcPort && p.mDstAddr == mDstAddr && p.mDstPort == mDstPort; } COM: <s> connections are identical if they have the same endpoints </s>
funcom_train/28375055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putMetadatumFactory(String type, MetadatumFactory metadatumFactory) { metadatumFactoryMap.put(type, metadatumFactory); for (Archive a : archives.values()) { try { a.registerMetadatumFactory(metadatumFactory); } catch (LowLevelStorageException ex) { log.error(null,ex); } } } COM: <s> register a metadatum factory this will normally be called by spring </s>
funcom_train/25506650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getDescription() { if (description == null) { description = new TextWidget(); description.setToolTipText(wordings.descriptionToolTip); description.addFocusListener(AutoSelectFocusListener.INSTANCE); description.addPropertyChangeListener(TextWidget.TEXT_PROPERTY, new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { checkConsistency(); } }); } return description; } COM: <s> this method initializes description </s>
funcom_train/25418612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ImsClient makeClient(RequestContext context, Publisher publisher) { ImsClient client = null; ImsService service = getService(); ImsHttpClient httpClient = new ImsHttpClient(); httpClient.setCredentials(getCredentials()); httpClient.setUrl(service.getFullServiceUrl()); httpClient.setTimeoutMillisecs(service.getTimeoutMillisecs()); client = httpClient; return client; } COM: <s> makes a suitable client for the service </s>
funcom_train/43098750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getOperations(Object classifier) { Collection result = new ArrayList(); if (classifier instanceof MClassifier) { MClassifier mclassifier = (MClassifier) classifier; Iterator features = mclassifier.getFeatures().iterator(); while (features.hasNext()) { MFeature feature = (MFeature) features.next(); if (feature instanceof MOperation) { result.add(feature); } } } return result; } COM: <s> this method returns all operations of a given classifier </s>
funcom_train/49630311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadImage(String imageFileName){ boolean success; // Load Image File imgFile = new File(imageFileName); BufferedImage newImage = null; try { newImage = ImageIO.read(imgFile); } catch (IOException e) { } finally { if (newImage != null) { canvas.setImage(newImage); scrollPane.getViewport().setView(canvas); success = true; draggable = canvas.isLarger(scrollPane.getSize()); } else { success = false; } } return success; } COM: <s> loads an image into the image viewer </s>
funcom_train/37231943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OBXSegment addFinding( CEElement ceFinding ) { OBXSegment obx = addOBX(); obx.setObservationResultStatus( "F" ); obx.setObservationIdentifier( Loinc.FINDINGS_NOM ); // try { obx.setObservationValueType( "CE" ); obx.setObservationValue( ceFinding ); // } // catch( MalformedFieldException mfe ) { // mfe.printStackTrace(); // } return obx; } COM: <s> add a finding as a predefined ce element </s>
funcom_train/34028470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnHide() { wbH.setSheetHidden(0, false); assertFalse(wbH.isSheetHidden(0)); assertFalse(wbH.isSheetHidden(1)); XSSFWorkbook wb2 = XSSFTestDataSamples.writeOutAndReadBack(wbH); assertFalse(wb2.isSheetHidden(0)); assertFalse(wb2.isSheetHidden(1)); } COM: <s> turn the sheet with one hidden into the one with </s>
funcom_train/46621002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultReferenceList() { StringBuffer referenceList = new StringBuffer(); for (int index = 0; index < DEFAULT_REFERENCE_LIST_DOTNET_10.length; index++) { referenceList.append(DEFAULT_REFERENCE_LIST_DOTNET_10[index]); referenceList.append(getReferenceDelimiter()); } return referenceList.toString(); } COM: <s> based on default reference list and get reference delimiter </s>
funcom_train/2806347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getItemSubTotalForShipping() { return (getBasePrice() * quantity) + OrderReadHelper.calcItemAdjustments(new Double(quantity), new Double(getBasePrice()), this.getAdjustments(), true, false, false, false, true); } COM: <s> returns the total line price for shipping calculation purposes </s>
funcom_train/925544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSubAttributes(int attributeType) { if (attributeType < 1 || attributeType > 255) throw new IllegalArgumentException( "sub-attribute type out of bounds"); LinkedList result = new LinkedList(); for (Iterator i = subAttributes.iterator(); i.hasNext();) { RadiusAttribute a = (RadiusAttribute) i.next(); if (attributeType == a.getAttributeType()) result.add(a); } return result; } COM: <s> returns all sub attributes of this attribut which have the given type </s>
funcom_train/43246005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDateRecordUpdated() { System.out.println("setDateRecordUpdated"); Calendar dateRecordUpdated = null; PatientDataObject instance = new PatientDataObject(); instance.setDateRecordUpdated(dateRecordUpdated); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set date record updated method of class org </s>
funcom_train/17502558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildConstantSummaries(List elements) { PackageDoc[] packages = configuration.packages; printedPackageHeaders = new HashSet<String>(); for (int i = 0; i < packages.length; i++) { if (hasConstantField(packages[i])) { currentPackage = packages[i]; //Build the documentation for the current package. build(elements); } } } COM: <s> build the summary for each documented package </s>
funcom_train/41152004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTestProportions(double[] prop) { if (prop == null) { m_TestProp = null; } else { m_TestProp = new double[prop.length]; for (int i = 0; i < prop.length; i++) m_TestProp[i] = prop[i]; } } COM: <s> sets the proportions of instances going down each branch </s>
funcom_train/42766138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSupportedType(Object obj) { if(obj instanceof UseCaseDTO) { return true; } else if(obj instanceof RequirementDTO) { return true; } else if(obj instanceof RequirementsPackageDTO) { return true; } else if(obj instanceof ActorDTO) { return true; } else if(obj instanceof ActorsPackageDTO) { return true; } else if(obj instanceof NotionDTO) { return true; } else if(obj instanceof NotionsPackageDTO) { return true; } else if(obj instanceof SystemElementDTO) { return true; } else if(obj instanceof SystemElementsPackageDTO) { return true; } return false; } COM: <s> determines if object is of supported type </s>
funcom_train/38415141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void merge( DataManager dataManager ) { Hashtable dest = dataManager.getScreenObjects(); synchronized( dest ) { Iterator it = screenObjects.values().iterator(); while( it.hasNext() ) { ScreenObject item = (ScreenObject ) it.next(); if( dest.containsKey( item.getPrimaryKey() ) ) continue; dest.put( item.getPrimaryKey(), item ); item.init( dataManager.getGraphicsDirector() ); } } } COM: <s> to merge our screen objects the data managers hashtable </s>
funcom_train/1752075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeEnd() { bytePos = writeInt4(0, bytePos); bytePos = writeBytes(IEND, bytePos); crc.reset(); crc.update(IEND); crcValue = crc.getValue(); bytePos = writeInt4((int) crcValue, bytePos); } COM: <s> write a png iend chunk into the png bytes array </s>
funcom_train/12962105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertLessThanOneThousand(int number) { String soFar; // Below 20 if (number % 100 < 20) { soFar = numNames[number % 100]; number /= 100; } else { soFar = numNames[number % 10]; number /= 10; soFar = tensNames[number % 10] + " " + soFar; number /= 10; } soFar = hundredNames[number % 10] + " "+ soFar; number /= 10; return soFar; } // convertLessThanOneThousand COM: <s> convert less than one thousand </s>
funcom_train/43203307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHandlesXML(int indent, float zoom) { String retStr = ""; for (Iterator iter = handles.iterator(); iter.hasNext();) { FlowHandle handle = (FlowHandle) iter.next(); retStr += XML.indent(indent); retStr += "<handle>" + (int)(handle.getX() / zoom) + "," + (int)(handle.getY() / zoom) +"</handle>"; retStr += XML.nl(); } return retStr; } COM: <s> creates the string for the save to rmd </s>
funcom_train/46189329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFilename(int year, int month, int day) { Calendar cal = blog.getCalendar(); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month-1); cal.set(Calendar.DAY_OF_MONTH, day); return filenameFormat.format(cal.getTime()); } COM: <s> determines the name of the log file </s>
funcom_train/4124465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element updateGameOptions(Element element) { Game game = getFreeColClient().getGame(); Element mgoElement = (Element) element.getElementsByTagName(GameOptions.getXMLElementTagName()).item(0); game.getGameOptions().readFromXMLElement(mgoElement); getFreeColClient().getCanvas().getStartGamePanel().updateGameOptions(); return null; } COM: <s> handles an update game options message </s>
funcom_train/29392881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String clean(String name) { StringBuffer buf = new StringBuffer(); for(int i = 0; i < name.length(); i++) { char ch = name.charAt(i); switch (ch) { case '&': buf.append("&amp;"); break; default: buf.append(ch); break; } } return buf.toString(); } COM: <s> buggy javascript sanitization routine </s>
funcom_train/32212450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit(ExitEvent event){ //this.globalData.write // (MessageData.makeOutOfBandMessage // ("gui", // ServerMux.SHUTDOWN_MSG)); String message = MessageData.makeOutOfBandMessage ("gui", ServerMux.SHUTDOWN_MSG); this.globalData.addToHistoryAndToDebugger(message); this.accessServer.broadcastMessage(message); System.exit(0); } COM: <s> the cca server has terminated its communication link with </s>
funcom_train/18745023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compareToNode(Node node) { int result; // for nodes, we just need to look at the source of this edge result = source().compareTo(node); // if the source equals the node, edges come later if (result == 0) { result++; } return result; } COM: <s> compares this edge to a node </s>
funcom_train/18960299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean ownsNeighbours(Country c) { Vector neighbours = c.getNeighbours(); int count = 0; for (int i=0; i<neighbours.size(); i++) { if ( ((Country) neighbours.elementAt(i)).getOwner() == player) count++; } if (count == neighbours.size()) return true; return false; } COM: <s> checks whether a country owns its neighbours </s>
funcom_train/21796747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if (getNote() < 0 || getNote() > 5) { errors.add("note", new ActionMessage("error.note.required")); // TODO: add 'error.name.required' key to your resources } return errors; } COM: <s> this is the action called from the struts framework </s>
funcom_train/18852646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDriverClassName( String database ) { String result = null; if ( database != null ) { if ( isDataSourceDriver(database) ) { result = (String)_dataSourceDrivers.get( database ); } else if( _drivers != null ) { result = (String)_drivers.get( database ); } } return result; } COM: <s> return the class name of the driver for the given database </s>
funcom_train/19661176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected long jar(String destFile, FileList files, String basePath) { long kb = zipOrJar(destFile, files, basePath, false, false, true); println("Jar " + destFile + " (" + kb + " KB)"); return kb; } COM: <s> create a jar file </s>
funcom_train/26138807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel23() { if (jPanel23 == null) { FlowLayout flowLayout23 = new FlowLayout(); flowLayout23.setVgap(0); flowLayout23.setAlignment(FlowLayout.LEFT); jPanel23 = new JPanel(); jPanel23.setPreferredSize(new Dimension(130, 30)); jPanel23.setLayout(flowLayout23); jPanel23.add(getJPanel33(), null); jPanel23.add(getJTextFieldTime(), null); } return jPanel23; } COM: <s> this method initializes j panel23 </s>
funcom_train/49084417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void withdraw (float amount) throws IOException { try{ if (this.getBalance()<amount) {throw new IOException("Not enough funds!");} else {Balance -= amount; this.addTransaction(new Transaction(this,"withdraw",amount)); }} catch(Exception e){ System.err.println(e.getMessage()); } } COM: <s> this method withdraws the account by the given amount </s>
funcom_train/22684209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDateShort() throws SynchronisationException, InvalidModelException, ParserException, RendererException{ String in = "A[hasDate hasValue _date(1967, 08, 16)]."; String expected = "value(a:hasDate \"1967-08-16\"^^<http://www.w3.org/2001/XMLSchema#date>)"; testValue(in, expected); } COM: <s> this test checks for transformation of wsml date short datavalue </s>
funcom_train/50505350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getTargetRelationships(IClassInfo bean) { List resultList = new LinkedList(); Iterator iter = relationships.iterator(); while(iter.hasNext()) { Relationship item = (Relationship) iter.next(); if(item.isTargetPartner(bean)) { resultList.add(item); } } return resultList; } COM: <s> gets the target relationships for the given bean from </s>
funcom_train/869870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupBuilder() { metadata = dom.createElementNS(Constants.XBRLAPINamespace,Constants.XBRLAPIPrefix + ":" + Constants.FragmentRootElementName); Element container = dom.createElementNS(Constants.XBRLAPINamespace,Constants.XBRLAPIPrefix + ":" + Constants.FragmentDataContainerElementName); setInsertionPoint(container); metadata.appendChild(container); } COM: <s> set up the data and metadata elements </s>
funcom_train/31406509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSimpleMetathesis(int metathesis1) { if (metathesis1 > 0) { Integer one = new Integer(1); _metathesis1 = new Integer(metathesis1); _length1 = one; _metathesis2 = new Integer(metathesis1 + 1); _length2 = one; } else { Integer zero = new Integer(0); _metathesis1 = zero; _length1 = zero; _metathesis2 = zero; _length2 = zero; } } COM: <s> compute and set metathesis and length values </s>
funcom_train/41727053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getPoiTypes() { PoiService .getPoiTypeService(new AsyncCallback<List<ObjectTypeSerializable>>() { public void onFailure(Throwable caught) { Window.alert(caught.toString()); } public void onSuccess(List<ObjectTypeSerializable> result) { objectTypeList = new ArrayList<ObjectTypeSerializable>(); objectTypeList = result; fillFiltersPanel(); } }); } COM: <s> gets the poi types </s>
funcom_train/43080361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDawn() { String hour = ""; String minutes = ""; int hourTemp = (int) this.timeofDawn; double temp = -(hourTemp - this.timeofDawn); int minutesTemp = (int) (temp * 60); if (hourTemp < 10) { hour = "0" + hourTemp; } else { hour = "" + hourTemp; } if (minutesTemp < 10) { minutes = "0" + minutesTemp; } else { minutes = "" + minutesTemp; } return hour + ":" + minutes; } COM: <s> returns the calculated time of dawn as a formatted string </s>
funcom_train/28768763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WsMockControl assertThat(String expression, Map<String, String> namespaceMap) { ExpressionAssertRequestValidator validator = new ExpressionAssertRequestValidator(); validator.setAssertExpression(expression); XPathExpressionResolver expressionResolver = new XPathExpressionResolver(); expressionResolver.setNamespaceMap(namespaceMap); validator.setExpressionResolver(expressionResolver); addRequestProcessor(validator, "assertThat(\"" + expression + "\")"); return this; } COM: <s> mock will fail if the expression evaluates to false </s>
funcom_train/16974978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map<? extends String, ? extends Object> m) { for (Iterator<? extends Map.Entry<? extends String, ? extends Object>> i = m.entrySet().iterator(); i.hasNext();) { Map.Entry<? extends String, ? extends Object> e = i.next(); put(e.getKey(), e.getValue()); } } COM: <s> call put key value for each entry in the provided map </s>
funcom_train/37587680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendExceptionResult(String message, String styleName) { // Note that there is similar code in InteractionsDocument. Something should be refactored. try { insertText(getLength(), message + "\n", styleName); } catch (EditDocumentException ble) { throw new UnexpectedException(ble); } } COM: <s> inserts the given exception data into the document with the given style </s>
funcom_train/25135919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGLDrawing(boolean drawGL) { if (this.drawGL != drawGL) { this.drawGL = drawGL; ((Component) canvas).setVisible(drawGL); setOpaque(drawGL); firePropertyChange("gldrawing", !drawGL, drawGL); repaint(); } } COM: <s> sets the drawing path </s>
funcom_train/44832654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JGMethod addMethod(JGMethod method) throws JGInvalidMethodException { if (!isMethodValid(method)) { logger.error(method.getName() + " is not valid method"); throw new JGInvalidMethodException(method.getName() + " is not valid method"); } method.setComponent(this); onAddMethod(method); methods.add(method); return method; } COM: <s> adds a method </s>
funcom_train/43213649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { try { User u = (User) o; String a = Base16.encode(getCertificate().getEncoded()); String b = Base16.encode(u.getCertificate().getEncoded()); return a.compareTo(b); } catch (CertificateEncodingException ex) { throw new RuntimeException("Can't encode certificates!", ex); } } COM: <s> p compare the certificates between user objects </s>
funcom_train/40801667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExtraImports(String packageList) { extraImportSet.clear(); if (null!=packageList) { packageList = packageList.trim(); if (packageList.length()>0) { Vector v = StringUtils.split(packageList,','); extraImportSet.addAll(v); } } } COM: <s> set the extra imports set </s>
funcom_train/2324583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double beta(double a, double b) throws ArithmeticException { double y; y = a + b; y = gamma(y); if (y == 0.0) return 1.0; if (a > b) { y = gamma(a) / y; y *= gamma(b); } else { y = gamma(b) / y; y *= gamma(a); } return (y); } COM: <s> returns the beta function of the arguments </s>
funcom_train/37596338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAllStacks(Throwable cause, String[][]extraStack) { StackTraceElement[] current = new Throwable().getStackTrace(); while (cause != null) { updateStack(cause, current, extraStack); cause = cause.getCause(); } } COM: <s> eliminate matching stack elements in </s>
funcom_train/49760494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonSaveBackEndInfo() { if (jButtonSaveBackEndInfo == null) { jButtonSaveBackEndInfo = new JButton(); jButtonSaveBackEndInfo.setBounds(new Rectangle(375, 210, 76, 31)); jButtonSaveBackEndInfo.setText("Save"); jButtonSaveBackEndInfo.addActionListener(this); } return jButtonSaveBackEndInfo; } COM: <s> this method initializes j button save back end info </s>
funcom_train/29706251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean foundASolution(State state_p) { // Is it the first one ? if (_solution == null) { // Yes it is, store it and look for another one _solution = new State(state_p); // Keep searching return true; } // No it's not, add a move to the original position and replay addAMoveToOriginalPosition(state_p); _solution = null; _noRemove = true; return false; } COM: <s> overriden for a builder </s>
funcom_train/16784966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvokingWorkflow() { // InvokingWorkflowDocument invokingWorkflowDoc = InvokingWorkflowDocument.Factory // .newInstance(); // InvocationType invocationType = invokingWorkflowDoc // .addNewInvokingWorkflow(); // // EntityTypeEnum entityType = EntityTypeEnum.WORKFLOW; // invocationHelper(invocationType, entityType); InvokingWorkflowDocument invokingWorkflowDoc = makeInvokingWorkflow(); try { ingester.ingestInvokingWorkflow(invokingWorkflowDoc); } catch (IngestException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> workflow invocation testers </s>
funcom_train/18489498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeDefaultPreferences(IPreferenceStore store) { store.setDefault(PreferenceConstants.ENABLE_AUTORUN, false); store.setDefault(PreferenceConstants.ENABLE_LOGGING, true); store.setDefault(PreferenceConstants.ENABLE_RUN_IN_STEP_MODE, false); store.setDefault(PreferenceConstants.ENABLE_SHOW_EVENTS, true); } COM: <s> there must be specified plugins default preferences </s>
funcom_train/22405115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { if ( ! maybeHaveMore ) { return false; } // Walk the iterators from bottom to top checking to see if any still have // any available values for ( int currentIterator = iterators.size() - 1; currentIterator >= 0; --currentIterator ) { Iterator it = (Iterator) iterators.get( currentIterator ); if ( it.hasNext() ) { return true; } } return false; } COM: <s> returns a new code permutation code containing the values of the next </s>
funcom_train/10912987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getActualBaselineOffset(int baselineIdentifier) { // This is the offset from the dominant baseline to the alignment baseline int offset = getTotalAlignmentBaselineOffset() - getTotalBaselineOffset(); // Add the offset to the actual baseline we want offset += actualBaselineTable.deriveScaledBaselineTable(alignmentBaselineIdentifier) .getBaseline(baselineIdentifier); return offset; } COM: <s> return the offset between the dominant baseline and </s>
funcom_train/39950059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButtonInformation() { if (jRadioButtonInformation == null) { jRadioButtonInformation = new JRadioButton(); jRadioButtonInformation.setText("Information"); jRadioButtonInformation.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setDeviceClass(); } }); } return jRadioButtonInformation; } COM: <s> this method initializes j radio button information </s>
funcom_train/47307884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void destroyShip() { hide(); // Make sure ship isn't drawn destroyed = true; // Mark as destroyed destructionAnimation.reset(); // Make sure the animation is restarted destructionAnimation.setPosition(getPosition()); // Set animation position destructionAnimation.show(); destructionAnimation.activate(); } COM: <s> destroy the ship and start its destruction animation </s>
funcom_train/327548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PamDataBlock getAncestorDataBlock(Class unitDataType) { PamDataBlock prevDataBlock = getParentDataBlock(); PamProcess prevProcess; while (prevDataBlock != null) { if (prevDataBlock.getUnitClass() == unitDataType) { return prevDataBlock; } //jump back one process up the chain. prevProcess = prevDataBlock.getParentProcess(); if (prevProcess == null) { return null; } prevDataBlock = prevProcess.getParentDataBlock(); } return null; } COM: <s> useful function to go back through the chain of data blocks </s>
funcom_train/18581193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUserCentricFunction(UserCentricFunction userCentricFunction, int n) { this.userCentricFunctions[n] = userCentricFunction ; addFunctionTab(userCentricFunction.getPanel(), userCentricFunction.getFunctionShortName(), userCentricFunction.getFunctionName(), n); } COM: <s> adds a user centric function to the function tab </s>
funcom_train/13534924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { startPoint = e.getPoint(); marqueeBounds = new Rectangle2D.Double(startPoint.getX(), startPoint.getY(), 0, 0); if (e != null) { if (!(e.getSource() instanceof JGraph)) throw new IllegalArgumentException( "MarqueeHandler cannot handle event from unknown source: " + e); } } COM: <s> we dont want special cursor </s>
funcom_train/4800014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initAppConfig() { appconfig = new AppConfig(getClass().getName().substring( getClass().getName().indexOf('.')+1 )+" settings", this, getConfigPath(getClass().getName()+".cfg") ); appconfig.defineField("audioenabled","Enable Sound","boolean"); appconfig.defineFields("key_","","","","key"); appconfig.loadFromFile(); appconfig.saveToObject(); } COM: <s> define appconfig for configuring keys </s>
funcom_train/12077696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawChars(char[] data, int offset, int length, int x, int y, int anchor) { int width = this.font.font.getAdvance( data, offset, length ); getGraphics().drawText(data, offset, length, x, y, translateAnchor(anchor), width ); } COM: <s> draws the specified characters using the current font and color </s>
funcom_train/45026815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LookAndFeelInfo getLookAndFeelInfo(final LookAndFeel laf) { for (LookAndFeelInfo lafi : UIManager.getInstalledLookAndFeels()) { if (lafi.getClassName().equals(laf.getClass().getName())) { return lafi; } } return null; } COM: <s> retrieve all the information about a given look and feel </s>
funcom_train/34268655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeSetup(Object p_aDomainObject, String p_aReadMethod, String p_aWriteMethod, boolean p_aCanEdit) { super.initializeSetup(p_aDomainObject, p_aReadMethod, p_aWriteMethod, p_aCanEdit); if (p_aDomainObject != null) { setText((String) getCVSWidgetController().invokeReadMethod()); } } COM: <s> initializes the cvsjtext field </s>
funcom_train/27943648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clear() { try { if( lock != null ) { lock.release(); lock = null; } if( channel != null ) { channel.close(); channel = null; } } catch( Exception e ) { System.err.println( "JApplicationMutex.clear() - " + e ); } } COM: <s> performs cleaning operation on mutex object </s>
funcom_train/13320845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopSapServer(String serverName) throws WebServiceException { try { final ISAPCommManager sapMgr = SpringMiddlewareContext.getSAPCommManager(); sapMgr.stopInstance(serverName); } catch (Throwable t) { logger.fatal("error in stopSapServer method", t); throw new WebServiceException(t); } } COM: <s> stops server if is working </s>
funcom_train/42841808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintValue(Graphics g, Rectangle rect) { Color oldColor = g.getColor(); g.setColor(Color.black); g.drawRect(rect.x, rect.y, rect.width-3, rect.height-3); g.setColor((Color) getValue()); g.fillRect(rect.x+1, rect.y+1, rect.width-4, rect.height-4); g.setColor(oldColor); } COM: <s> paints a representation of the value into a given area of screen </s>
funcom_train/41621762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGeometricState(float time, boolean initiator) { if(this.update) { if(!this.dependent) this.processJoints(); for(int i = 0; i < this.meshes.length; i++) { this.meshes[i].updateBatch(); } this.update = false; } super.updateGeometricState(time, initiator); } COM: <s> updates all the geometric information for the code model node code </s>
funcom_train/32156115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getMaxMeetingPerAgent() { if (maxMeetingPerAgent == null) { maxMeetingPerAgent = new JSpinner(new SpinnerNumberModel(7, 2, 20, 1)); maxMeetingPerAgent.setBounds(new Rectangle(340, 255, 60, 22)); } return maxMeetingPerAgent; } COM: <s> this method initializes max meeting per agent </s>
funcom_train/12561603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { // Stroke should already be SOLID g.setColor(TextFieldSkin.COLOR_FG); g.fillRect(x, y - yOffset - height + 2, TextFieldSkin.WIDTH_CARET, height - 3); g.setColor(0); // back to default black } COM: <s> paint this cursor in the given graphics context </s>
funcom_train/38536048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Number maxA() { if (aexpr==null) { NumberMath.abs(constVal, maxAbs); return maxAbs; } // Determine maximum absolute value of a NumberMath.abs(aexpr.getNumMin(), v1); NumberMath.abs(aexpr.getNumMax(), v2); NumberMath.max(v1, v2, maxAbs); return maxAbs; } COM: <s> returns max abs of node a </s>
funcom_train/22210484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popupForMember(AMMember member, MouseEvent ev) { removeAll(); if (previous != null) { previous.contributeToMenu(this, member); } if (getComponentCount() > 0) { show(ev.getComponent(), ev.getX(), ev.getY() - 10); } } COM: <s> builds a popup with respect to the given member and </s>
funcom_train/41164601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoSingleTextTeacher3 entity) { EntityManagerHelper.log("saving CoSingleTextTeacher3 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 co single text teacher3 </s>
funcom_train/45804623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createAssociationStylesMenuItem() { associationStylesMenuItem = new JMenuItem(Messages .getString("Viz.AssociationTypeConfiguration")); associationStylesMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent action) { menuOpenAssociationConfig(); } }); add(glPopup, associationStylesMenuItem, ITEM_ID_ASSOCIATION_STYLES); } COM: <s> creates association styles menu items </s>
funcom_train/4784151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Criteria createCriteria(T example, String[] excludeProperties) { Criteria crit = getSession().createCriteria(getPersistentClass()); Example sample = Example.create(example); if (excludeProperties != null) { for (String exclude : excludeProperties) { sample.excludeProperty(exclude); } } return crit.add(sample); } COM: <s> create criteria create criteria querry for given example </s>
funcom_train/2292211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildSelectFonts(String attributes) { List names = new ArrayList(); for (int i = 0; i < CmsDefaultPageEditor.SELECTBOX_FONTS.length; i++) { String value = CmsDefaultPageEditor.SELECTBOX_FONTS[i]; names.add(value); } return buildSelect(attributes, names, names, -1, false); } COM: <s> builds the html for the font face select box of a wysiwyg editor </s>
funcom_train/33855788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BugInstance addSourceLineRange(BytecodeScanningDetector visitor, int startPC, int endPC) { SourceLineAnnotation sourceLineAnnotation = SourceLineAnnotation.fromVisitedInstructionRange(visitor.getClassContext(), visitor, startPC, endPC); if (sourceLineAnnotation != null) add(sourceLineAnnotation); return this; } COM: <s> add a source line annotation describing the source line numbers for a </s>
funcom_train/18808225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOLSRegression1a() { final double[][] data = createSampleData1(); final double[] result1 = Regression.getOLSRegression(data); assertEquals(.25680930, result1[0], 0.0000001); assertEquals(0.72792106, result1[1], 0.0000001); } COM: <s> checks the results of an ols regression on sample dataset 1 </s>