__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32060921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInternalHeight() { FontMetrics aFontMetrics = m_aTextStyle.getFontMetrics(); return borderwidth + aFontMetrics.getMaxAscent() + aFontMetrics.getDescent() + aFontMetrics.getLeading() + aFontMetrics.getHeight() * ( linescount - 1); } COM: <s> returns the height of all the lines of text put together in pixels </s>
funcom_train/16648568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double readFixedPoint(int m, int n) throws IOException { final int bits = m+n; if((bits%8)!=0) throw new IllegalArgumentException("number of bits is not a multiple of 8: "+(m+n)); final long l = readBytes(bits/8); final double x = Math.pow(2, n); double d = ((double) l)/x; return d; } COM: <s> reads a fixed point number from the input </s>
funcom_train/16178028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert (BasicAction action) { if (!orderOk) { toss (action); return; } checkSize (); int hole = ++currentSize; if (hole != 1) { for (; action.nextTime < array[hole / 2].nextTime; hole /= 2) array[hole] = array[hole / 2]; } array[hole] = action; } COM: <s> insert the specified action into the heap </s>
funcom_train/34342443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getEncaBezado2() { if (encaBezado2 == null) {//GEN-END:|34-getter|0|34-preInit // write pre-init user code here encaBezado2 = new TextField("ingrese la fecha", null, 20, TextField.ANY);//GEN-LINE:|34-getter|1|34-postInit // write post-init user code here }//GEN-BEGIN:|34-getter|2| return encaBezado2; } COM: <s> returns an initiliazed instance of enca bezado2 component </s>
funcom_train/43237687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void request(String actionTarget, String[] data) { HPDocument toSend = new HPDocument(parent, "request", actionTarget, data); if (!toSend.isComplete()) toSend.writeHeaders(); output.writeDocument(toSend); } COM: <s> makes an code action target code request to the client and includes </s>
funcom_train/11379727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addExpected(long when, SimulatorEvent event) { Assert.assertNotNull(event); List<SimulatorEvent> expected = expectedEvents.get(when); if (expected == null) { expected = new ArrayList<SimulatorEvent>(); expectedEvents.put(when, expected); } expected.add(event); } COM: <s> auxiliary function for populating the expected events table if event is null </s>
funcom_train/45384828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void distributeThumbs(int min, int max) { int step = (max - min) / (getThumbNum() + 1); for (int i = 0; i < getThumbNum(); i++) { setValueAt(min + step * (i + 1), i); } fireStateChanged(); } COM: <s> evenly distributes thumbs in the slider </s>
funcom_train/3424736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node removeChild(Node oldChild) throws DOMException { super.removeChild(oldChild); // If remove succeeded, un-cache the kid appropriately int type = oldChild.getNodeType(); if(type == Node.ELEMENT_NODE) { docElement = null; } else if (type == Node.DOCUMENT_TYPE_NODE) { docType = null; } return oldChild; } // removeChild(Node):Node COM: <s> since insert before caches the doc element and currently doc type </s>
funcom_train/23044704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSubTermPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OperatorTerm_subTerm_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OperatorTerm_subTerm_feature", "_UI_OperatorTerm_type"), ConceptPackage.Literals.OPERATOR_TERM__SUB_TERM, false, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the sub term feature </s>
funcom_train/2516158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); drillDownAdapter = new DrillDownAdapter(viewer); List<User> userList = new ArrayList<User>(); // getUserList(); viewer.setContentProvider(new UserViewContentProvider(userList)); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setSorter(new NameSorter()); viewer.setInput(userList); makeActions(); hookContextMenu(); hookDoubleClickAction(); contributeToActionBars(); } COM: <s> this is a callback that will allow us </s>
funcom_train/3025257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeViewer createNodeViewer(Context context) { if (canDisplayNode(context.getNode())) { if (!reloader.isNecessary()) { reloader.setNecessary(true); reloader.reload(); } UMLNodeViewer viewer = new UMLNodeViewer(context, reloader); return viewer; } return null; } COM: <s> creates the node viewer </s>
funcom_train/18368056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other == null || !(other instanceof Explanation)) { return false; } Explanation otherExplanation = (Explanation) other; if (otherExplanation.parts.size() != this.parts.size()) { return false; } if (!otherExplanation.parts.containsAll(this.parts)) { return false; } if (!otherExplanation.triple.equals(this.triple)) { return false; } if (otherExplanation.policyName != this.policyName) { return false; } return true; } COM: <s> checks two explanations for equality </s>
funcom_train/35157367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int generateList(Object objID, GL gl, int howMany) { Integer list = null; list = listCache.get(objID); if(list == null){ list = new Integer(gl.glGenLists(howMany)); listCache.put(objID, list); } return list; } COM: <s> returns an integer identifier for an open gl display list based on the </s>
funcom_train/1910874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void txtValue_onUpdate() { // This is a helper that automatically converts from relative to // absolute or whatever, but bascially doesn't change the meaning of // the value when it does this, so it's exempt from making things dirty super.dirtyListener.setDirtyable(false); setText(getText()); validate(); super.dirtyListener.setDirtyable(true); } COM: <s> when focus leaves the text input reformat it </s>
funcom_train/42652549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTimeout() throws Exception { CustomClassLoaderCallable c = new CustomClassLoaderCallable(this.getClass().getClassLoader(), 10, TimeUnit.MILLISECONDS) { @Override public Object call() throws Exception { Thread.sleep(100); return null ; } }; try { assertNotNull(c.invokeSynchronously()) ; } catch(TimeoutException e) {} } COM: <s> tests that timeout works correctly </s>
funcom_train/39145780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AppointmentDTO endConsult(AppointmentDTO app) throws ConnectionException { AppointmentDTO ret = null; try { ret = getAppointmentService().changeStatus(app.getId(), AppointmentStatus.PROCESSED, null); } catch (RemoteException e) { logger.error("endConsult failed", e); throw new ConnectionException(e); } return ret; } COM: <s> invoked when double clicked on cabinet panel </s>
funcom_train/37589543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVariable(String name, String value) { Stack<VariableProperty> varStack = _variables.get(name); if ((varStack == null) || (varStack.empty())) { throw new IllegalArgumentException("Variable " + name + " does not exist."); } VariableProperty p = varStack.peek(); p.setValue(value); } COM: <s> mutate the value of a variable with the specified name </s>
funcom_train/38558555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAllCond() { for(ConditionPlaceView curPlaceView : _condPlaceViews) { // Update the 'change buffer' with a blank condition; this will remove the condition ((StateGroupEditor)parent).addStateElement(curPlaceView.getId(), "", ""); // Update the UI curPlaceView.removeCondition(); } } COM: <s> this method clears the marking on all states </s>
funcom_train/18229811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(String[] original, String[] newversion) { ArrayList root = new ArrayList(); for (int i = 0; i < original.length; i++) { placeString(root, original[i], i); } this.root = compress(root); this.results = newversion; } COM: <s> data structure to needed to store the </s>
funcom_train/39537130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disposeAllPictures(){ //disposes all the stored pictures for(SVGPicture picture : new LinkedList<SVGPicture>(pictures.values())){ if(picture!=null){ picture.dispose(); } } pictures.clear(); projectNameToViewPathsToUriMap.clear(); projectNameToUriToXMLPathMap.clear(); configurationDocuments.clear(); } COM: <s> disposes all the previously loaded canvases </s>
funcom_train/3927067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showLine(int line, String estr ) { if (line < 0) { return false; } else { if ( estr != null ) { System.out.println( "Line " + line + ": " + estr ); } else { System.out.println( "Line: " + line ); } viewer.showLine(line); Workspace w = getWorkspace(); if ( w != null ) { w.moveToFront(viewer); } return true; } } COM: <s> show a particular line on the string print error message on status line </s>
funcom_train/34139002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cancelAll(int pid) { boolean removed = false; synchronized (mTaskQueue) { if (mCurrentTask != null && mCurrentTask.mPid == pid) { mCurrentTask.requestStop(); } final ListIterator<OcrTask> it = mTaskQueue.listIterator(); while (it.hasNext()) { final OcrTask task = it.next(); if (task.pid == pid) { it.remove(); removed = true; } } } return removed; } COM: <s> cancels all jobs for a given process id </s>
funcom_train/29771265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSaveBackupFile() { System.out.println("saveBackupFile"); NanoDropData d = null; boolean expResult = true; boolean result = DataValidator.saveBackupFile(d); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of save backup file method of class io </s>
funcom_train/18858649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object other) { final Movie movie = (Movie) other; if (this.votes < movie.votes) { return -1; } if (this.votes > movie.votes) { return 1; } if (this.rank < movie.rank) { return -1; } if (this.rank > movie.rank) { return 1; } if (this.year < movie.year) { return -1; } if (this.year > movie.year) { return 1; } return 0; } COM: <s> compares this movie with the specified movie for order </s>
funcom_train/32961826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Act parseTemplate(MenuData placeholder ) throws JAXBException { String context = placeholder.getPath(); TrimHeader trimHeader = getTrimBean().findTrimHeader(getTemplate()); TrimEx templateTrim = getTrimBean().parseTrim(trimHeader.getTrim(), getAccountUser(), context, getNow(), null ); return templateTrim.getAct(); } COM: <s> find a trim and get its act </s>
funcom_train/26379749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String stripCarriageReturn(String str) { String tmpStr = new String(); for (int count = 0; count < str.length(); count++) { if (str.charAt(count) != '\n' && str.charAt(count) != '\r') tmpStr = tmpStr + str.charAt(count); } return tmpStr; } COM: <s> strings all carriage returns from a string </s>
funcom_train/25798269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGuiSettingBool(final DataResponse<Boolean> response, final int field, final boolean val, final Context context) { mHandler.post(new Command<Boolean>(response, this) { @Override public void doRun() throws Exception { response.value = info(context).setGuiSettingBool(InfoManager.this, field, val); } }); } COM: <s> sets an integer gui setting </s>
funcom_train/37887377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resolveForwardReferences() throws XPathException { while(!forwardReferences.empty()) { FunctionCall call = (FunctionCall)forwardReferences.pop(); UserDefinedFunction func = resolveFunction(call.getQName(), call.getArgumentCount()); if(func == null) throw new XPathException(call.getASTNode(), "Call to undeclared function: " + call.getQName().getStringValue()); call.resolveForwardReference(func); } } COM: <s> resolve all forward references to previously undeclared functions </s>
funcom_train/7998178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processVehiclePaths(NodeList vehicleList){ int length = vehicleList.getLength(); String vehicle_location = null; for(int i = 0; i < length; i++){ vehicle_location = vehicleList.item(i).getChildNodes().item(0).getNodeValue(); String p = UtilMethods.formatFilePath(vehicle_location); this.vehicles.add(new Vehicle(p)); } } COM: <s> take a node list representing file paths to vehicles and creates </s>
funcom_train/45933349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResponseObjectType tagKeywords(TagKeywordsRequest parameters) { ResponseObject responseObject = keywordService.tagKeywords( IdentificationSdoHelper.fromIdentificationType(parameters.getIdentification()), parameters.getRequestId(), parameters.getKeywordIds().getKeywordId()); return ResponseObjectSdoHelper.toRepsonseObjectType(responseObject); } COM: <s> interface to the tag keywords method in key word service </s>
funcom_train/34340399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSalir1() { if (Salir1 == null) {//GEN-END:|41-getter|0|41-preInit // write pre-init user code here Salir1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|41-getter|1|41-postInit // write post-init user code here }//GEN-BEGIN:|41-getter|2| return Salir1; } COM: <s> returns an initiliazed instance of salir1 component </s>
funcom_train/17942422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewImage(int width, int height) { try { originalHeightLabel2.setText("" + height); originalWidthLabel2.setText("" + width); imageWidth.setText("" + width); imageHeight.setText("" + height); imageScale.setSelectedIndex(DEFAULT_SCALE); performUpdatePreview(); } catch (Exception e) { log.error("an error ocurred while trying to set new image: " + e.fillInStackTrace()); } } COM: <s> resets the controls in this panel to the given values </s>
funcom_train/46833513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane1() { if (jScrollPane1 == null) { jScrollPane1 = new JScrollPane(); jScrollPane1.setBounds(new Rectangle(462, 71, 337, 100)); jScrollPane1.setViewportView(getJList()); } return jScrollPane1; } COM: <s> this method initializes j scroll pane1 </s>
funcom_train/48337776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long size(Tuple t) throws TupleException { if (null == t) { throw new NullPointerException("Null tuple"); } else if (! (t instanceof ClassData)) { throw new IllegalArgumentException("Not a class data tuple (" + t + ")"); } ClassData cd = (ClassData)t; cd.validate(); return cd.data.length; } COM: <s> size the specified tuple </s>
funcom_train/28420288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMessageExchangeReceiver() throws JBIException { try { // create message receiver this.mMsgExchReceiver = createMessageExchangeReceiver(); if ( this.mMsgExchReceiver != null ) { this.mMsgExchReceiver.initReceiver(); } } catch (Exception ex) { throw new JBIException(ex); } } COM: <s> creates a message receiver object as part of the component initialization </s>
funcom_train/23943449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeystoreManager singleKey(String alias, char[] password) { KeystoreManager result = new KeystoreManager(); result.create(); try { Certificate cert = keystore.getCertificate(alias); Key key = keystore.getKey(alias, password); result.keystore.setKeyEntry(alias, key, password, new Certificate[] { cert }); } catch (KeyStoreException ex) { throw new KeystoreFault(ex); } catch (NoSuchAlgorithmException ex) { throw new KeystoreFault(ex); } catch (UnrecoverableKeyException ex) { throw new KeystoreFault(ex); } return result; } COM: <s> create a managed keystore with the single key from this keystore </s>
funcom_train/36597153
/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 ((lockedMode & Spatial.LOCKED_BRANCH) != 0) return; updateWorldData(time); if ((lockedMode & Spatial.LOCKED_BOUNDS) == 0) { updateWorldBound(); if (initiator) { propagateBoundToRoot(); } } notifyListeners(); } COM: <s> code update geometric state code updates all the geometry information </s>
funcom_train/16524602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics g, int x, int y, double zoom) { if(sprite == null || sprite.getCurrentFrame() == null) return; sprite.getCurrentFrame().draw(g, x, y, zoom); //sprite.iterateFrame(); } COM: <s> handles drawing the correct frame </s>
funcom_train/42085893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String login() { if (userService.findByNameAndPass(userName, password) != null) { user.setUserName(userName); return BOARD_VIEW; } else { FacesMessage error = new FacesMessage(messageSource.getMessage( LOGIN_FAIL_MSG, (Object[]) null, FacesUtils.getLocale())); FacesContext.getCurrentInstance().addMessage(null, error); return FAIL_VIEW; } } COM: <s> logins the user by setting the respective user name in session </s>
funcom_train/8640035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteBodyRows() { ArrayList rows2 = new ArrayList(); for (int k = 0; k < headerRows; ++k) rows2.add(rows.get(k)); rows = rows2; totalHeight = 0; if (totalWidth > 0) totalHeight = getHeaderHeight(); } COM: <s> removes all of the rows except headers </s>
funcom_train/31101317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { fDeclaration = null; fTypeDecl = null; fNil = false; fSpecified = true; fNotation = null; fMemberType = null; fValidationAttempted = ElementPSVI.VALIDATION_NONE; fValidity = ElementPSVI.VALIDITY_UNKNOWN; fErrorCodes = null; fValidationContext = null; fNormalizedValue = null; } COM: <s> reset should be called in validator start element </s>
funcom_train/25289709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlaneS(Vector4f planeS) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_PLANE_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("TexCoordGeneration6")); if (isLive()) ((TexCoordGenerationRetained)this.retained).setPlaneS(planeS); else ((TexCoordGenerationRetained)this.retained).initPlaneS(planeS); } COM: <s> sets the s coordinate plane equation </s>
funcom_train/11725070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMoveTwice() throws RepositoryException { moveNode.addMixin(mixVersionable); superuser.save(); // move the node doMove(moveNode.getPath(), destinationPath); superuser.save(); // move second time String destinationPath2 = destParentNode.getPath() + "/" + nodeName3; doMove(destinationPath, destinationPath2); superuser.save(); } COM: <s> move a versionable referenceable node twice </s>
funcom_train/50557613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOrPredicate(String field, Object value, int operator) { if (result == null){ result = getPredicate(field, value, operator); }else{ Predicate predicate = getPredicate(field, value, operator); result = Predicates.getUnion(result, predicate); } } COM: <s> adds a feature to the or predicate attribute of the conditions object </s>
funcom_train/11019014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void GetChar() { // Check to see if we've walked off the end of the string. if (_pointer > _formulaLength) { throw new RuntimeException("too far"); } if (_pointer < _formulaLength) { look=_formulaString.charAt(_pointer); } else { // Just return if so and reset 'look' to something to keep // SkipWhitespace from spinning look = (char)0; } _pointer++; //System.out.println("Got char: "+ look); } COM: <s> read new character from input stream </s>
funcom_train/869905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDocumentURI(URI uri) throws XBRLException { documentURI = uri; String identifier = this.getHistory().getIdentifier(uri); if (identifier == null) { documentId = getStore().getId(uri.toString()); getHistory().addRecord(uri,documentId); } else { documentId = identifier; } } COM: <s> set the uri of the document now being parsed and set the </s>
funcom_train/25648233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTransitionListExecutable(List<Transition> tranList, StateMachine flagCtx) { boolean executable = true; for (Transition tran : tranList) { if (tran != null) { StateMachine stateMachine = flagCtx; if (!isTransitionEnabled(tran, stateMachine)) { executable = false; break; } } } return executable; } COM: <s> check if list of transitions are executable in given context </s>
funcom_train/16320019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openTemplateByPath(String fileName, boolean b) { // creates the TreeView try { TreeView frame = new TreeView(fileName, this, true, false); // displays it this.addInternalFrame(frame); // adds the file to the list of open ones // setup.addLastOpenFile(fileName); // Actualizamos la botonera this.updateToolBar(); } catch (Exception e) { } } COM: <s> create a new artefact based o a template given by path </s>
funcom_train/42116799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void partial(int indexFromLarge, int count) { dr = di = null; v = null; int upper = mat.nCol - indexFromLarge; int lower = upper - count + 1; if (upper > mat.nCol || lower < 0 || lower > upper) throw new IllegalArgumentException("The index of eigenvalues is illegal."); if (mat instanceof SymmetricMatrix) { SymmetricMatrix sy = (SymmetricMatrix) mat; calc(sy, lower, upper); } else { calc(mat); } } COM: <s> the partial evd method </s>
funcom_train/32075688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showWindow() { if (shell != null && !shell.isDisposed()) { if (!shell.isVisible()) shell.open(); else if (shell.isVisible()) shell.forceActive(); } else { createShell(); shell.open(); } } COM: <s> use this method for displaying the window to the user </s>
funcom_train/12741319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendDoubleClickEvent() { HashMap eventParameters = new HashMap(); eventParameters.put(TYPE, new Integer(COMPONENT_EVENT)); eventParameters.put(ACTION, new Integer(DOUBLE_CLICK)); sendEvent(eventParameters); invokeActionHandler(getOnDoubleClick(), eventParameters); } COM: <s> send a double click event for the current component </s>
funcom_train/12776915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SyntheticMethod getBypass(MethodReference m) { if (DEBUG) { System.err.println(("MethodBypass.getBypass? " + m)); } SyntheticMethod result = findOrCreateSyntheticMethod(m); if (result != null) { return result; } // first lookup failed ... try resolving target via CHA and try again. m = resolveTarget(m); return findOrCreateSyntheticMethod(m); } COM: <s> lookup bypass rules based on a method reference only </s>
funcom_train/21656245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtGuardarTabla() { if (btGuardarTabla == null) { btGuardarTabla = new JButton(); btGuardarTabla.setBounds(new Rectangle(704, 495, 85, 31)); btGuardarTabla.setText("Guardar"); btGuardarTabla.setVisible(false); btGuardarTabla.setMnemonic('g'); btGuardarTabla.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { //guardarTabla(); } }); } return btGuardarTabla; } COM: <s> this method initializes bt guardar tabla </s>
funcom_train/118951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getCellBounds(Object[] cells) { if (cells != null && cells.length > 0) { Rectangle ret = getCellBounds(cells[0]); if (ret != null) { ret = new Rectangle(ret); for (int i = 1; i < cells.length; i++) { Rectangle r = getCellBounds(cells[i]); if (r != null) SwingUtilities.computeUnion( r.x, r.y, r.width, r.height, ret); } return ret; } } return null; } COM: <s> returns the bounding rectangle of the specified cells </s>
funcom_train/32057493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSelectables() { System.out.println("testGetSelectables"); JGraph jp = new JGraph(); DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp); Object[] obj = new Object[5]; dg.addSelectionCell(obj); assertTrue(dg.getSelectables() != null); } COM: <s> this function tests get selecables function of default graph cell class </s>
funcom_train/31906798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleGeometryChanged() { super.handleGeometryChanged(); ShapeNode shapeNode = (ShapeNode)node; ShapePainter painter = PaintServer.convertFillAndStroke(e, shapeNode, ctx); shapeNode.setShapePainter(createShapePainter(ctx, e, shapeNode)); } COM: <s> invoked when the geometry of an graphical element has changed </s>
funcom_train/13722056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getTabDetails() { if (tabDetails == null) { tabDetails = new JTabbedPane(); tabDetails.addTab( Messages.getString("Main.DataTab"), null, getPanDaten(), null); //$NON-NLS-1$ tabDetails.addTab( Messages.getString("Main.MatrixTab"), null, getPanMatrix(), null); //$NON-NLS-1$ } return tabDetails; } COM: <s> this method initializes tab details </s>
funcom_train/31625832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isNodeTaggedForExport(Node targetNode) throws DBException { List targetTags = targetNode.getTags(); if (targetTags == null || targetTags.size() == 0) { return false; } for (int i = 0; i < targetTags.size(); i++) { NodeTag eachTag = (NodeTag) targetTags.get(i); if (tags.contains(eachTag.getTagValue())) { return true; } } return false; } COM: <s> checks to see if the given target node contains the tags necessary for </s>
funcom_train/974202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(){ if(getDelegate().getHasErrors()){ showDialog(getUpdateDialog()); return; } Category category = getCategoryDAO().findById(getSelectedCategoryId()); if(!isCategoryUnique(category.getName())){ showDialog(getUpdateDialog()); return; } getCategoryDAO().merge(category); setSelectedCategoryId(null); setMessage(getMessages().getMessage("admin.categoryadmin.update.success.message")); hideDialog(getUpdateDialog()); updateComponents(NEW_CATEGORY_DIV, CATEGORY_LIST); } COM: <s> listener method to update the currently selected category </s>
funcom_train/3427297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); final int getName = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_NAME, GET_NODE_NAME_SIG); super.translate(classGen, methodGen); il.append(new INVOKEINTERFACE(getName, 2)); } COM: <s> translate code that leaves a nodes qname as a string on the stack </s>
funcom_train/12553857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled(boolean enabled) { if(!enabled) { newData.setEnabled(enabled); oldData.setEnabled(enabled); //generatorButton.setEnabled(enabled); visualizerButton.setEnabled(enabled); algorithmComboBox.setEnabled(enabled); } else { algorithmComboBox.setEnabled(enabled); setStateForAlgorithm(controller.getSelectedAlgorithm()); } } COM: <s> sets the state of the buttons to enabled or disabled </s>
funcom_train/4755655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int index, ArrayFieldVector<T> v) { try { System.arraycopy(v.data, 0, data, index, v.data.length); } catch (IndexOutOfBoundsException e) { checkIndex(index); checkIndex(index + v.data.length - 1); } } COM: <s> set a set of consecutive elements </s>
funcom_train/29617665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisTextField getJCodeCollecteField() { if (jCodeCollecteField == null) { jCodeCollecteField = new MgisTextField(); jCodeCollecteField.setDocument(jCodeCollecteField.new JTextFieldLimit(7, true)); jCodeCollecteField.setBounds(328, 20, 52, 20); } return jCodeCollecteField; } COM: <s> this method initializes j email field </s>
funcom_train/31658421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findResourcesFromModel() { listOfResources = new TreeSet<Object>(resourceComparator); if (model == null) { loadModel(); } if (model != null) { ResIterator resIt = model.listSubjects(); while (resIt.hasNext()) { Resource resource = resIt.nextResource(); if (!resource.isAnon()) { listOfResources.add(resource); } } } } COM: <s> find resources from model </s>
funcom_train/17892825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 5)); jPanel2.setBorder(BorderFactory.createEmptyBorder( LayoutConstants.OKCANCEL_BORDER_TOP, LayoutConstants.OKCANCEL_BORDER_LEFT, LayoutConstants.OKCANCEL_BORDER_BOTTOM, LayoutConstants.OKCANCEL_BORDER_RIGHT)); jPanel2.add(getJButtonOK(), null); jPanel2.add(getJButtonCancel(), null); } return jPanel2; } COM: <s> this method initializes j panel2 </s>
funcom_train/17677322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLastExecParamsString(int batchEntry) { int n = lastRows == null ? 0 : lastRows.size(); return "<batch " + batchEntry + "> " + (batchEntry < n ? lastRows.get(batchEntry).toString() : getLastExecParamsString()); } COM: <s> get parameter data for the last execute batch entry in a string </s>
funcom_train/39184672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void returnToReady(){ for(int i=0; i<tasks.size(); i++){ Task t = (Task)tasks.elementAt(i); if(t.getStatus()==t.WAITING){ t.setStatus(t.READY); } } this.fireContentsChanged(this,0,tasks.size()); } COM: <s> returns the status of all tasks which are waiting back to ready </s>
funcom_train/17094354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int extractMaxCardinal(Graph sizeGraph) { int max = 0; Node node; PrefData pd; for (Iterator<Node> it = sizeGraph.getNodes().iterator(); it.hasNext();) { node = it.next(); pd = (PrefData) node.data; if (pd.isCardinal()) { max = Math.max(max, pd.runningValue); } } return max; } COM: <s> returns the largest pref data </s>
funcom_train/1240030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Long assignMessageId(MessageContext messageContext) { Long id = null; synchronized(SOAPMonitorConstants.SOAP_MONITOR_ID) { id = new Long(next_message_id); next_message_id++; } messageContext.setProperty(SOAPMonitorConstants.SOAP_MONITOR_ID, id); return id; } COM: <s> assign a new message id </s>
funcom_train/4780376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessRule addServerAccessRuleForGroup(String groupName, String level) throws AppException { Validator.validateGroupName(groupName); Validator.validateLevelOfAccess(level); Group group = findGroup(groupName); if (group == null) { throw new ValidatorException("application.error.groupmissing"); } Path path = addPath(null, "/"); AccessRule accessRule = new AccessRule(path, group, level); path.addAccessRule(accessRule); accessRules.add(accessRule); group.addAccessRule(accessRule); setUnsavedChanges(); return accessRule; } COM: <s> adds a new server level access rule specifying group authorization </s>
funcom_train/24597358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fixZipCodeLength() { String zipCode = this.getZipCode(); if (zipCode == null) { zipCode = ""; } if (zipCode.length() != 6) { while (zipCode.length() < 6) { zipCode = zipCode.concat(" "); } this.setZipCode(zipCode); } } COM: <s> fixes the length of the zipcode to 6 chars </s>
funcom_train/21850528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBean(JETABean bean) { try { m_bean = bean; if (bean != null) { Class c = bean.getDelegate().getClass(); m_getter = c.getMethod(m_getter_name, new Class[0]); m_setter = c.getMethod(m_setter_name, new Class[] { int.class }); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> sets the bean this property is bound to </s>
funcom_train/24050155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reorder(int hole_) { int child; int hole = hole_; Comparable tmp = items.get(hole); for (; hole * 2 <= size; hole = child) { child = hole * 2; if (child != size && items.get(child + 1).compareTo(items .get(child)) < 0) child++; if (items.get(child).compareTo(tmp) < 0) items.set(hole, items.get(child)); else break; } items.set(hole, tmp); } COM: <s> internal method to percolate down in the heap </s>
funcom_train/31689438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getProperties() { ArrayList props = new ArrayList(this.m_aHREFs.size()); Iterator itor = this.m_aHREFs.iterator(); while(itor.hasNext()) { PropertyGroup propGroup = PropertyCache.getInstance().getPropertyGroup((String)itor.next()); if(propGroup!=null) { props.addAll( propGroup.getChildren() ); } } return props; } COM: <s> returns a list of the properties that are part of this range </s>
funcom_train/13631045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void xformDir(Vec3f src, Vec3f dest) { for (int rc = 0; rc < 3; rc++) { float tmp = 0.0f; for (int cc = 0; cc < 3; cc++) { tmp += get(rc, cc) * src.get(cc); } dest.set(rc, tmp); } } COM: <s> transforms src using only the upper left 3x3 </s>
funcom_train/32220416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AdlrObject getAdlrObjectByObjectId(String objectId) { Session hs = HibernateUtil.getSession(); hs.beginTransaction(); Query q = hs.createQuery("from AdlrObject where object_id='"+objectId+"'"); List list = q.list(); if (list.size() > 1) Log.info("Table 'AdlrObject' has contain multiple "+objectId); if (list.size() > 0 && list.get(0) instanceof AdlrObject) return (AdlrObject) list.get(0); return null; } COM: <s> get an adl r model object given the asset id </s>
funcom_train/50464902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void uninstallGlassPane() { if(busyGlassPane != null) { busyGlassPane.stop(new Runnable() { public void run() { busyGlassPane.setVisible(false); if(orgGlassPane != null) { restoreFrameMenu(); setGlassPane(orgGlassPane); } } }); } } COM: <s> uninstall the glass pane </s>
funcom_train/50076364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTreeFrameVisible(boolean isVisible) { treeF.setVisible(isVisible); Iterator iter = mainFrames.iterator(); while(iter.hasNext()) { MainFrame mf = (MainFrame) iter.next(); mf.getMainMenuBar().setTreeCheckBox(isVisible); } if(isVisible) { treeF.refresh(); } } COM: <s> changes the status of tree frame </s>
funcom_train/35668991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLookAndFeel(Object lookAndFeel) { try { if (lookAndFeel instanceof String) { UIManager.setLookAndFeel((String) lookAndFeel); } else if (lookAndFeel instanceof LookAndFeel) { UIManager.setLookAndFeel((LookAndFeel) lookAndFeel); } SwingUtilities.updateComponentTreeUI(this); repaint(); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> a convenience method for setting the look feel </s>
funcom_train/42068161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPositionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CuePoint_position_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CuePoint_position_feature", "_UI_CuePoint_type"), WavPackage.Literals.CUE_POINT__POSITION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the position feature </s>
funcom_train/11945624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearBSplines() { double radius = Math.min(w,h)/2.5; double xCenter = w/2; double yCenter = h/2; for(int i = 0; i < w; i++) for(int j = 0; j < h; j++) { levelSet[i][j] = Math.sqrt( (i - xCenter)*(i - xCenter) + (j - yCenter)*(j - yCenter)) - radius; } repaint(); } COM: <s> clears all the level sets in this panel </s>
funcom_train/35845913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertSuccessor(Object m, Object s, int p) { List successors = new ArrayList(Model.getFacade().getSuccessors(m)); if (successors.size() > p) { successors.add(p, s); } else { successors.add(s); } Model.getCollaborationsHelper().setSuccessors(m, successors); } COM: <s> inserts message s as the pth successor of message m </s>
funcom_train/8347892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTxtProvincia() { if (txtProvincia == null) {//GEN-END:|203-getter|0|203-preInit // write pre-init user code here txtProvincia = new TextField("Provincia:", null, 32, TextField.ANY);//GEN-LINE:|203-getter|1|203-postInit // write post-init user code here }//GEN-BEGIN:|203-getter|2| return txtProvincia; } COM: <s> returns an initiliazed instance of txt provincia component </s>
funcom_train/13759798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRowBreak(int row) { CTPageBreak pgBreak = worksheet.isSetRowBreaks() ? worksheet.getRowBreaks() : worksheet.addNewRowBreaks(); if (! isRowBroken(row)) { CTBreak brk = pgBreak.addNewBrk(); brk.setId(row); } } COM: <s> sets a page break at the indicated row </s>
funcom_train/3527323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getETag(ResourceInfo resourceInfo, boolean strong) { if (strong) return "\"" + getETagValue(resourceInfo, strong) + "\""; else return "W/\"" + getETagValue(resourceInfo, strong) + "\""; } COM: <s> get the etag associated with a file </s>
funcom_train/26344866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GridBagConstraints makegbc(int x, int y, int width, int height) { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = x; gbc.gridy = y; gbc.gridwidth = width; gbc.gridheight = height; gbc.weightx = 100; gbc.weighty = 0; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(1, 1, 1, 1); return gbc; } COM: <s> method to help making grid bag constraints </s>
funcom_train/34038612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { if (ra_!=null) { ra_.close(); ra_ = null; if (fileb_!=null) fileb_.delete(); } //getLogger() System.out.println("PDFReader.close() "+getURI()); } COM: <s> close use and free up resources including file descriptors </s>
funcom_train/4643002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectRow(int row) { // When a row (other than the first one, which is used as a header) is // selected, display its associated MailItem. MailItem item = MailItems.getMailItem(startIndex + row); if (item == null) { return; } selectedRowIndex = startIndex + row; styleRow(selectedRow, false); styleRow(row, true); item.read = true; selectedRow = row; Mail.get().displayItem(item); } COM: <s> selects the given row relative to the current page </s>
funcom_train/3284585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendScheduledMessages() { if (schedMsgs == null) return; for (Iterator<MessageParser> i = schedMsgs.iterator(); i.hasNext(); ) { MessageParser mpr = (MessageParser) i.next (); this.implSendMessage(mpr); i.remove(); } schedMsgs=null; } COM: <s> sends all scheduled messages </s>
funcom_train/5524518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateDir () { File dir=new File(DirField.getText()+File.separatorChar); if (!dir.isDirectory()) return false; try { DirField.setText(dir.getCanonicalPath()); Chosen.setText( DirField.getText()+File.separatorChar+ PatternField.getText()); } catch (Exception e) { return false; } return true; } COM: <s> update the directory list </s>
funcom_train/25491940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getString(byte[] data, int offset, int length) { byte[] stringData = new byte[length]; System.arraycopy(data, offset, stringData, 0, length); // Convert byte array to char array char[] charArray = new char[length]; for (int i = 0; i < length; i++) { charArray[i] = (char) stringData[i]; } return String.valueOf(charArray); } COM: <s> returns a string representation of this byte array </s>
funcom_train/22919093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceActionArgument getInputActionArgument( String argumentName ) { if ( orderedInputActionArguments == null ) return null; for ( Iterator i = orderedInputActionArguments.iterator(); i.hasNext(); ) { ServiceActionArgument arg = (ServiceActionArgument)i.next(); if ( arg.getName().equals( argumentName ) ) return arg; } return null; } COM: <s> look for an input service action argument for a given name </s>
funcom_train/45116332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTest(Test arg0) { // try { // doc = // DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); // } catch (ParserConfigurationException e) { // log.log(Level.WARNING, "Fail getting Document", e); // } // // Element root = doc.createElement("testGraphs"); // doc.appendChild(root); closeForm(); graphs.removeAllElements(); mtf.clearGraphs(); clearAllTabs(); } COM: <s> the actions that performed when a test will start </s>
funcom_train/3085923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHidingAlignment(int newHidingAlignment) { if (newHidingAlignment != EchoConstants.LEFT && newHidingAlignment != EchoConstants.TOP) throw new IllegalArgumentException("Hiding alignment must be either EchoConstants.LEFT or EchoConstants.TOP"); int oldValue = hidingAlignment; hidingAlignment = newHidingAlignment; firePropertyChange(HIDING_ALIGMENT_CHANGED_PROPERTY, oldValue, newHidingAlignment); _setUpIcons(oldValue != hidingAlignment); } COM: <s> sets the hiding alignment of the panel </s>
funcom_train/34813630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double interpolate(int startIndex, double dist2NextPoint) { return dist2NextPoint * y[startIndex + 1] - ((dist2NextPoint - 1.0) * dist2NextPoint * ((dist2NextPoint - 2.0) * y2[startIndex] - (dist2NextPoint + 1.0) * y2[startIndex + 1])) / 6.0 + y[startIndex] - dist2NextPoint * y[startIndex]; } COM: <s> returns a cubic spline interpolated value y for the point between </s>
funcom_train/11533235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map makeSnapshot(Map mbeans) { Map workCopy; workCopy = new HashMap(mbeans.size()); for (Object elem: mbeans.entrySet()) { Map.Entry entry = (Map.Entry) elem; workCopy.put(entry.getKey(), entry.getValue()); } return workCopy; } COM: <s> my faces 2 </s>
funcom_train/555263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pushOpenedSnapshots() { Hashtable<String, Snapshot> openedSnapshots = Snapshot.getOpenedSnapshots(); if (openedSnapshots == null) { return; } Iterator<Snapshot> it = openedSnapshots.values().iterator(); int size = openedSnapshots.values().size(); SnapshotData[] rows = new SnapshotData[size]; int i = 0; while (it.hasNext()) { Snapshot nextSnapshot = it.next(); rows[i] = nextSnapshot.getSnapshotData(); i++; } SnapshotListTableModel model = SnapshotListTableModel.getInstance(); model.setRows(rows); } COM: <s> displays onscreen the opened state of snapshots contained in this </s>
funcom_train/37073894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIdentical(RangeI range) { if (this == range) return true; // Features have to have same type,range, AND name return (range.getFeatureType().equals(getFeatureType()) && sameRange(range) && range.getName().equals(getName())); } COM: <s> returns true if same start end type and name </s>
funcom_train/28293030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGlobalObjectivesScope() { if (logger.isDebugEnabled()) { logger.debug(" :: SeqActivityTree --> BEGIN - " + "getScopeID"); logger.debug(" ::--> " + mScopeID); logger.debug(" :: SeqActivityTree --> END - " + "getScopeID"); } return mScopeID; } COM: <s> retrieves id of the course associated with the scope of this activity </s>
funcom_train/11746459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initDocument(String rootTag, String type) { this.document = XMLUtil.newBuilder().newDocument(); this.parent = document; // create a "synthetic" root Element root = push(rootTag); if (type != null) { root.setAttribute("type", type); } inProgress = true; } COM: <s> resets the encoder to process a new object tree </s>