__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14228756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callInvalid(CallId id, int cause) { CallHolder ch = new CallHolder(id, this.getSub()); MuxCallId logicalCall = this.getMux().findCall(ch); if (logicalCall != null) { if (logicalCall.removeCall(ch)) // true if last sub-call this.getReal().callInvalid(logicalCall, cause); this.getMux().removeCall(logicalCall); } } COM: <s> one sub call has died </s>
funcom_train/47450441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMemberTypeNull() { this.model.getPackages().get(packageName).getMembers().get(id).setType( null); Set<ValidationException> validate = sav.validate(model); assertEquals(1, validate.size()); for (ValidationException ve : validate) { assertEquals("Member type cannot be null.", ve.getMessage()); } } COM: <s> test a case where the class member is null </s>
funcom_train/22442664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String printTime(long timeMillis) { long round = timeMillis/1000; long remaind = (timeMillis % 1000)/10; StringBuffer buff = new StringBuffer(10); buff.append(round); buff.append("."); buff.append(remaind); buff.append("s"); return buff.toString(); } // printTime COM: <s> an auxiliary routine printing time in nnn </s>
funcom_train/3413153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCompatibleSampleModel(SampleModel sm) { if (!(sm instanceof ComponentSampleModel)) { return false; } // Must have the same number of components if (numComponents != sm.getNumBands()) { return false; } if (sm.getTransferType() != transferType) { return false; } return true; } COM: <s> checks whether or not the specified code sample model code </s>
funcom_train/45918714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readTripleStorageConfiguration(XMLConfiguration conf, Configuration res) { if( conf.configurationsAt(tripleStorage).size() != 1) { return; } BeanDeclaration tripleStorageConfigDecl = new XMLBeanDeclaration(conf, tripleStorage); TripleStorageBeanConfig tripleStorageBeanConfig = (TripleStorageBeanConfig) BeanHelper.createBean(tripleStorageConfigDecl); res.setTripleStorageBeanConfig(tripleStorageBeanConfig); } COM: <s> reads the i triple storage i configuration </s>
funcom_train/38476867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void coerceData (boolean isAlphaPremultiplied) { if (colorModel.hasAlpha() && colorModel.isAlphaPremultiplied() != isAlphaPremultiplied) { bitmap2Raster(); this.currentBuffer = BUFFER_RASTER; // Make the color model do the conversion colorModel = colorModel.coerceData (raster, isAlphaPremultiplied); } } COM: <s> forces the data to match the state specified in the </s>
funcom_train/31773570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveComponents(Container target, int x, int y, int width, int height, int rowStart, int rowEnd) { switch (align) { case LEFT: break; case CENTER: x += width / 2; break; case RIGHT: x += width; break; } for (int i = rowStart ; i < rowEnd ; i++) { Component m = target.getComponent(i); if (m.visible) { m.move(x, y + (height - m.height) / 2); x += hgap + m.width; } } } COM: <s> centers the elements in the specified row if there is any slack </s>
funcom_train/1460707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { screen = new ScreenManager(); DisplayMode displayMode = screen.findFirstCompatibleMode(POSSIBLE_MODES); screen.setFullScreen(displayMode); Window window = screen.getFullScreenWindow(); window.setFont(new Font("Dialog", Font.PLAIN, FONT_SIZE)); window.setBackground(Color.blue); window.setForeground(Color.white); isRunning = true; } COM: <s> sets full screen mode and initiates and objects </s>
funcom_train/31626349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRef(Element elem, String order) throws DBException { elem.addElement(REFERENCE) .addAttribute(REF_ID, getGlobalId()) .addAttribute(Node.NODE_TITLE, getNodeTitle()); if (order != null) { elem.addAttribute(Relation.RELATION_ORDER, order); } } COM: <s> add a reference id tag to the xml for this node </s>
funcom_train/3395500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WildcardType makeSuperWildcard(Type bound, TypeVar formal) { if (bound.tag == BOT) { return new WildcardType(syms.objectType, BoundKind.UNBOUND, syms.boundClass, formal); } else { return new WildcardType(bound, BoundKind.SUPER, syms.boundClass, formal); } } COM: <s> create a wildcard with the given lower super bound create an </s>
funcom_train/14070766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendRoomLevel(String roomName,int level) { HouseCommand msg = new HouseCommand(); msg.setType(HouseCommand.Type.ROOM); msg.setCommand(DeviceCommand.On); msg.setIdentifier(roomName); msg.setDeviceLevel(level); sender.send(msg); } COM: <s> sends a command to change the status of the room </s>
funcom_train/3497090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSureType() { if (sureType != null) return sureType; // over/under : total score if ("4".equals(typeId)) return typeId+":"+doubleParameter; // Asian handicap : winner participant id : handicap else if ("6".equals(typeId)) return typeId+":"+integerParameter+":"+doubleParameter; return typeId; } COM: <s> returns the outcomes sure type a unique identifier of betbrainss bet type </s>
funcom_train/22384910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit() throws IOException { if (!startCommit()) return; byte[] ba = new byte[startLine.length()]; for (int i = 0; i < ba.length; i++) ba[i] = (byte)startLine.charAt(i); os.write(ba); os.flush(); commitFields(); } COM: <s> start sending this message </s>
funcom_train/244030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTextAsXML() { String res = ""; if (!subject.equals("")) { res = "<subject>"+Util.escapeCDATA(subject)+"</subject>"; } if (!body.equals("")) { res = res + "<body>"+Util.escapeCDATA(body)+"</body>"; } return res; } COM: <s> returns the subject and the body in xml </s>
funcom_train/19142490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Group getPropertyGroupByName(String name) { for (Iterator iter = propertyGroups.iterator(); iter.hasNext();) { Group group = (Group) iter.next(); if (StringUtils.equalsIgnoreCase(name, group.getName())) { return group; } } return null; } COM: <s> returns a given property group by name </s>
funcom_train/37578066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocations(Vector l) { this.locations = l; this.deleteAll(); Location location = null; for(int i = 0; i < locations.size(); i++) { location = (Location)locations.elementAt(i); this.append(location.getName(), null); } } COM: <s> set the locations </s>
funcom_train/30136585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(String key, String secret) { for (Iterator<OAuthConsumer> it = store.iterator(); it.hasNext() ;) { OAuthConsumer data = it.next(); if (key.equals(data.consumerKey) && secret.equals(data.consumerSecret)) { return true; } } return false; } COM: <s> check whether the key secret pair has been used </s>
funcom_train/26393261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SuperString append(SuperString str) { int len = str.length(); ensureCapacity(count + str.count); copyWhenShared(); System.arraycopy(str.getValue(), 0, value, count, len); count += len; return this; } COM: <s> appends one super string to another so they can be merged with no </s>
funcom_train/8094786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Matrix getDominantEigenVector(Matrix m) { EigenvalueDecomposition eigendecomp; double[] eigenvalues; int index; Matrix result; eigendecomp = m.eig(); eigenvalues = eigendecomp.getRealEigenvalues(); index = Utils.maxIndex(eigenvalues); result = columnAsVector(eigendecomp.getV(), index); return result; } COM: <s> determines the dominant eigenvector for the given matrix and returns it </s>
funcom_train/33814589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getMovimentacaoMenu() { if (movimentacaoMenu == null) { movimentacaoMenu = new JMenu(); movimentacaoMenu.setText("Movimentação"); movimentacaoMenu.add(getMovimentacaoCalculoMensalMenuItem()); movimentacaoMenu.add(getMovimentacaoFolhaComplementarMenuItem()); movimentacaoMenu.add(getMovimentacaoFeriasMenuItem()); movimentacaoMenu.add(getMovimentacaoRecisaoMenuItem()); movimentacaoMenu.add(getMovimentacao13oSalarioMenuItem()); movimentacaoMenu.add(getMovimentacaoOcorrenciaMenuItem()); movimentacaoMenu.add(getMovimentacaoTransferenciaFuncionarioMenuItem()); } return movimentacaoMenu; } COM: <s> this method initializes movimentacao menu </s>
funcom_train/20572279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanel() { if (panel == null) { panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.setBorder(new EmptyBorder(3, 3, 3, 3)); panel.add(getPanelSelectorReporte(), BorderLayout.NORTH); panel.add(getPanelReporte(), BorderLayout.CENTER); } return panel; } COM: <s> this method initializes panel </s>
funcom_train/16222168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt( String key ) { verifyIsNull(); Object o = get( key ); if( o != null ){ return o instanceof Number ? ((Number) o).intValue() : (int) getDouble( key ); } throw new JSONException( "JSONObject[" + JSONUtils.quote( key ) + "] is not a number." ); } COM: <s> get the int value associated with a key </s>
funcom_train/46975030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getJarredFilename(String filenameIn) { String ret=null; try { //get current classLoader ClassLoader cl = this.getClass().getClassLoader(); //create String of filename ret = cl.getResource(filenameIn).toString(); } catch(Exception e) { log.error("MetricUtility: getJarredFilename() for " + filenameIn + " error: " + e); } return ret; } COM: <s> returns the fully qualified name of resource inside a jar </s>
funcom_train/22528144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void savePreferences() { IPreferenceStore store = LDAuthorPlugin.getDefault().getPreferenceStore(); store.setValue(ILDAuthorPreferenceConstants.PREFS_BROWSER_VIEW_RESTORE_URL, fRestoreLastUrl); store.setValue(ILDAuthorPreferenceConstants.PREFS_BROWSER_VIEW_URL, fStoredUrl); } COM: <s> save local view preferences </s>
funcom_train/46262867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public GLVector3D div(GLVector3D v1, GLVector3D v2, GLVector3D target) { if (target == null) { target = new GLVector3D(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z); } else { target.set(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z); } return target; } COM: <s> divide each element of one vector by the individual elements of another </s>
funcom_train/36827707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logout() { writer.println("Logging Out Now"); writer.flush(); writer.close(); try { reader.close(); } catch (IOException ex) { ex.printStackTrace(); errorMsg = "Error communicating with server"; } System.out.println("requesting logout"); } COM: <s> when the user wants to logout informs server of logout and closes connection </s>
funcom_train/46761602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final JobModel job, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long jobId = store(job, chain, call); chain.execute(); // return primary key return jobId; } catch (Exception ex) { Log.exception(ex); Log.error(job); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the job model model creating a new job or updating existing rows </s>
funcom_train/42442338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCookieExpiry( Hashtable ht, syslogLogger syslog, String sVal ){ dbUtils dbu = new dbUtils( syslog ); dbu.runGeneralUpdateSQL( "update `web_sessions` set `expires` = TIMESTAMPADD(MINUTE,15,NOW() ) where `token` = '" + sVal + "'" ); dbu.dbDisconnect(); } COM: <s> updates an existing cookie in the db </s>
funcom_train/49700794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Formula traces() { final Variable t1 = Variable.unary("t"); final Expression t2 = t1.join(tord); final Variable p = Variable.unary("p"); final Formula f = step(t1, t2, p).or(step(t1, t2, succ.join(p))).or(skip(t1, t2, p)); final Formula fAll = f.forAll(p.oneOf(Process)).forAll(t1.oneOf(Time.difference(tlast))); return init(tfirst).and(fAll); } COM: <s> returns the traces fact </s>
funcom_train/25415307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder result = new StringBuilder(); for (int row = 0; row < getRowDimension(); row++) { for (int column = 0; column < getColumnDimension(); column++) { result.append(board[row][column] == null ? " " : board[row][column]); } result.append("\n"); } return result.toString(); } COM: <s> gets a string representation of the board </s>
funcom_train/7523592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) throws ClassCastException { if (!(o instanceof JMSAddress)) throw new ClassCastException("Cannot compare different classes."); JMSAddress that = (JMSAddress)o; if (that.isMCast != this.isMCast) throw new ClassCastException( "Addresses are different: one is multicast, and one is not"); return this.address.compareTo(that.address); } COM: <s> compare this object to code o code </s>
funcom_train/41958618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redirectStdStreams() { try { System.setOut(new PrintStream(redirectedSystemOut, false, LOG_ENCODING)); System.setErr(new PrintStream(redirectedSystemErr, false, LOG_ENCODING)); } catch (UnsupportedEncodingException e) { new RuntimeException(e); } } COM: <s> initializes the redirection of stdout and stderr so they can be accessed </s>
funcom_train/37468887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrimaryAc( String primaryAc ) { if ( primaryAc == null ) { throw new IllegalArgumentException( "Primary Ac cannot be null." ); } if ( primaryAc.trim().length() == 0 ) { throw new IllegalArgumentException( "Primary Ac cannot be empty." ); } this.primaryAc = primaryAc; } COM: <s> sets primary accession number </s>
funcom_train/18643755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isNodesOverlapping(Node n1, Node n2) { boolean ret=true; int ygap=Math.abs(n1.getY()-n2.getY()) - (n1.getHeight()/2) - (n2.getHeight()/2); int xgap=Math.abs(n1.getX()-n2.getX()) - (n1.getWidth()/2) - (n2.getWidth()/2); if (xgap > X_MINIMUM_GAP || ygap > Y_MINIMUM_GAP) { ret = false; } return(ret); } COM: <s> this method determines if the two supplied nodes are </s>
funcom_train/25420839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String returnNewUserDN(String username) { username = Val.chkStr(username).toLowerCase(); if (username.length() == 0) { return ""; } else if (hasSpecialDNCharacter(username)) { return ""; } else { return replace(getUserDNPattern(),username).toLowerCase(); } } COM: <s> returns the dn for a user about to be registered </s>
funcom_train/45278801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScrollBarValue(int i, double value) { if (i < 0 || i >= this.SBtotal || this.scrollbars[i] == null) { return; } this.scrollbars[i].setValue((int) Math.round(value * this.SBscales[i])); this.SBcurValues[i] = value; this.SBcurValueLabels[i].setText(IJ.d2s(this.SBcurValues[i], this.SBdigits[i])); } COM: <s> sets the contents of scrollbar field i to value </s>
funcom_train/3672173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getOutputType(String aName) { for (int i = 0; i < outputNames.length; i++) { if (aName.equalsIgnoreCase(outputNames[i])) { return outputClasses[i]; } } throw new IllegalArgumentException(aName + " is not an output of the operator " + name + "."); } COM: <s> returns the code class code es of the output with the specified name </s>
funcom_train/48579526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1() { if (okCommand1 == null) {//GEN-END:|215-getter|0|215-preInit // write pre-init user code here okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|215-getter|1|215-postInit // write post-init user code here }//GEN-BEGIN:|215-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/27903985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void evalTerm(Node node) { String value = node.getValue(); if(value.equals("term")) { Node factor = node.getChild("factor"); Node more = node.getChild("moreFactors"); evalFactor(factor); evalMoreFactors(more); } else { syntaxError(node,"evalTerm()"); } } COM: <s> evaluates a term production </s>
funcom_train/49006492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseInstructions( ) throws IOException { int codeSize = in.readInt(); byte[] bytecode = new byte[ codeSize ]; in.readFully( bytecode ); instructionData = new CountingDataInput( new DataInputStream( new ByteArrayInputStream( bytecode ))); while( instructionData.count < codeSize ) { parseInstruction(); } } COM: <s> parse the instructions </s>
funcom_train/50585414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newScenario() { InputDialog inputDialog = new InputDialog( getViewer().getControl().getShell(), "new Scenario", "insert the qualified-name", "", null); inputDialog.open(); if (InputDialog.OK == inputDialog.getReturnCode()) { try { tsContentProvider.newScenario(inputDialog.getValue()); } catch (Exception ex) { showErrorMessage(ex.getMessage()); } } } COM: <s> this method will open an input dialog for the qualified name of the </s>
funcom_train/39062109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingNode_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingNode_name_feature", "_UI_IMarkingNode_type"), MarkingPackage.eINSTANCE.getIMarkingNode_Name(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/12126257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintAsGreek( Graphics2D g2 ) { Color background = component.getBackground(); Color foreground = component.getForeground(); Rectangle2D rect = getBounds(); if( background != null ) { g2.setColor( background ); } g2.fill( rect ); if( foreground != null ) { g2.setColor( foreground ); } g2.draw( rect ); } COM: <s> paints the swing component as greek </s>
funcom_train/3393094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genStat(JCTree tree, Env<GenContext> env) { if (code.isAlive()) { code.statBegin(tree.pos); genDef(tree, env); } else if (env.info.isSwitch && tree.getTag() == JCTree.VARDEF) { // variables whose declarations are in a switch // can be used even if the decl is unreachable. code.newLocal(((JCVariableDecl) tree).sym); } } COM: <s> derived visitor method generate code for a statement </s>
funcom_train/21172431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CustomImageView (Element elem, ContentPane contentPane) { super (elem); /* * contentPane might be null if we were installed into a straight JEditorPane, rather than * a ContentPane object. If this is the case, then we will call sets load synchronously to true * to ensure that we avoid the race condition involving image loading */ setLoadsSynchronously(contentPane != null ? contentPane.isPageContainedReference() : true); } COM: <s> constructs a new view of the image element i elem i </s>
funcom_train/14336513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(int mx, int my){ if(rectangle.contains(mx-x, my-y)){ return true; } for(int i = 0; i < inputAnchorDisplays.size(); i++){ if(inputAnchorDisplays.get(i).contains(mx-x, my-y)){ return true; } } for(int i = 0; i < outputAnchorDisplays.size(); i++){ if(outputAnchorDisplays.get(i).contains(mx-x, my-y)){ return true; } } return false; } COM: <s> returns true if the point mx my is inside the display false otherwise </s>
funcom_train/31096198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanDescriptor getBeanDescriptor() { BeanDescriptor bd = createBeanDescriptor(beanClass, new Object[] { "preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "A component that acts as a constant." }); bd.setValue("hidden-state", Boolean.TRUE); // needed for Studio. bd.setValue("helpSetName", "jh9gpz/math/resources/Constant/jhelpset.hs"); return bd; } COM: <s> returns a bean descriptor for constant bean </s>
funcom_train/28963553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StreamContext resolve(Expression[] arguments, int depth) { StreamContext resolved = new StreamContext(); boolean anyChanges = false; for (StreamExpression oldExpr: streamList) { StreamExpression newExpr = oldExpr.resolve(arguments, depth); resolved.addStream(newExpr); anyChanges |= (newExpr != oldExpr); } if (anyChanges) { return resolved; } return this; } COM: <s> resolve the stream expressions in this stream context like expression </s>
funcom_train/983374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int makeModelPtr (int index, double sizeArray [], int count) { MODELPTR newModel; newModel = new MODELPTR (); newModel.list = JavaGL.glGenLists (1); newModel.numParam = count; newModel.params = sizeArray; newModel.ptr = lists [index]; lists [index] = newModel; return (newModel.list); } COM: <s> gluint make model ptr int index gldouble size array int count </s>
funcom_train/33831493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageAssert isNotEqualTo(BufferedImage image) { if (areEqual(actual, image)) fail(errorMessageIfEqual(actual, image)); if (image == null) return this; if (areEqual(sizeOf(actual), sizeOf(image)) && hasEqualColor(image)) fail("images are equal"); return this; } COM: <s> verifies that the actual image is not equal to the given one </s>
funcom_train/45623502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRemovedDirectoriesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RemoveDirType_removedDirectories_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RemoveDirType_removedDirectories_feature", "_UI_RemoveDirType_type"), MSBPackage.eINSTANCE.getRemoveDirType_RemovedDirectories(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the removed directories feature </s>
funcom_train/13274447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getCanvas3DBorderedPanel(Component component3D) { JPanel canvasPanel = new JPanel(new GridLayout(1, 1)); canvasPanel.add(component3D); component3D.setFocusable(false); canvasPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)); return canvasPanel; } COM: <s> returns a bordered panel that includes code component3 d code </s>
funcom_train/16392421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void medianPlacement(){ VisualVertex vvertex; List finalplacedvertices = new ArrayList(); int i, count = this.vgraph.getGraph().getVerticesCount(); for( i = 0; i < count; i++ ) { vvertex = (VisualVertex) this.vgraph.getVisualVertices().get( i ); this.medianPlacement( vvertex, finalplacedvertices ); finalplacedvertices.add( vvertex ); } } COM: <s> positions all vertices in median placement starting with the </s>
funcom_train/30044892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CredentialBean createCredBean(GSSCredential aproxy) { CredentialBean credBean=new CredentialBean(); GlobusCredential globcred= ((GlobusGSSCredentialImpl)aproxy).getGlobusCredential(); credBean.setProxyCred(aproxy); credBean.setIssuer(globcred.getIssuer()); credBean.setStrength(globcred.getStrength()); credBean.setSubject(globcred.getSubject()); credBean.setTimeLeft(globcred.getTimeLeft()); return credBean; } COM: <s> creates a bean that contains the credentials metadata </s>
funcom_train/5395384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindElementType() { System.out.println("findElementType"); String data = ""; TableManager instance = new TableManager(); SimpleType expResult = null; SimpleType result = instance.findElementType(data); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of find element type method of class org </s>
funcom_train/5442568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopRecording() { Address[] a = m_terminal.getAddresses(); int iHandle; if(m_bRecURL = true) iHandle = ((XAddress)a[0]).m_lineHandle; else iHandle = -1; //final int handle = iHandle; m_provider.stopRecording(((XAddress)a[0]).m_lineHandle); } COM: <s> stop the recording </s>
funcom_train/35195032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(E[] newEs, int off, int len) { final Class<?> e = newEs.getClass().getComponentType(); if (!JoeE.isSubtypeOf(e, Powerless.class)) { throw new ClassCastException(Reflection.getName(e) + " is not Powerless"); } appendInternal(newEs, off, len); } COM: <s> appends a range of elements from a java array to the array </s>
funcom_train/23390986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map getAdditionals(IXMLElement f) throws CompilerException { Iterator<CompilerListener> i = compilerListeners.iterator(); Map retval = null; try { while (i != null && i.hasNext()) { retval = (i.next()).reviseAdditionalDataMap(retval, f); } } catch (CompilerException ce) { parseError(f, ce.getMessage()); } return (retval); } COM: <s> calls the revise additional data map method of all registered compiler listeners </s>
funcom_train/38315605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sessionDestroyed(HttpSessionEvent se) { if (activeSessions > 0) { if (activeUsers.containsKey(se.getSession().getId())) { activeUsers.remove(se.getSession().getId()); activeUserCount = activeUsers.size(); } else if (activeGuestCount > 0) activeGuestCount--; activeSessions--; } } COM: <s> our implementation of session listener it </s>
funcom_train/33019784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { // create argument array Object[] args_array = { _args }; // invoke target method, starting the target application _targetMethod.invoke(null, args_array); } catch (InvocationTargetException e) { //System.out.println("Invocation target exception: "+e); //e.getTargetException().printStackTrace(); } catch (Exception e) { e.printStackTrace(); //System.out.println(e); //throw new RuntimeException(e.getMessage()); } } COM: <s> should not be called directly </s>
funcom_train/44850851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer render(final GeneralDomainObjectHome inDomainObjectHome) { for (SortableItem lKeyCriterion : getItems2()) { criteriaStack.addOperator(((KeyCriterion)lKeyCriterion).getBinaryBooleanOperator()); criteriaStack.addCriterium(((KeyCriterion)lKeyCriterion).render(inDomainObjectHome)); } return new StringBuffer(criteriaStack.render()); } COM: <s> renders the key to a valid part in an sql statement </s>
funcom_train/2033661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuscarCategoria() { System.out.println("BuscarCategoria"); Material material = new Material(); Categoria instance = new Categoria(); Categoria expResult = null; Categoria result = instance.BuscarCategoria(material); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of buscar categoria method of class categoria </s>
funcom_train/7751081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(File file) throws IOException, ClassNotFoundException { ObjectInputStream in = new ObjectInputStream(new FileInputStream(file)); entries = (ArrayList<Entry>) in.readObject(); in.close(); System.out.println("PB load complete"); edited = false; } COM: <s> loads an existing phone book </s>
funcom_train/43094602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canAddNode(Object node) { if (node == null) { return false; } if (containsNode(node)) { return false; } return (Model.getFacade().isAClassifierRole(node) || Model.getFacade().isAMessage(node) || Model.getFacade().isAComment(node)); } COM: <s> return true if the given object is a valid node in this graph </s>
funcom_train/5419847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentId(String contentId) { String result; int i = contentId.indexOf('<'); if( i >= 0 ) { int j =contentId.indexOf('>'); result = contentId.substring(i+1,j); } else result = contentId; this.contentId = result; } COM: <s> the mime attach identifier </s>
funcom_train/29710298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePostSelectionChanged(final SelectionChangedEvent event) { Object[] listeners = _postSelectionChangedListeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.selectionChanged(event); } }); } } COM: <s> notifies any post selection listeners that a post selection event has </s>
funcom_train/10628298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBitLengthPositive3() { byte aBytes[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = 1; BigInteger aNumber = new BigInteger(aSign, aBytes); assertEquals(81, aNumber.bitLength()); } COM: <s> bit length of a positive number which is a power of 2 </s>
funcom_train/49040582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createNotificationManager() { this.nmf = Notification.createNotificationManagerFactory("edu/intec/ilka/resources/notification.properties"); if (DEBUG && this.nmf != null) { logger.info("*** Notification Manager started at " + new java.util.Date()); } else if (nmf == null) { logger.error("*** Error starting Notification Manager at " + new java.util.Date()); } } COM: <s> creates the notification manager object with the configuration properties </s>
funcom_train/4283306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getRegisteredObject(String path) { Object o = map.get( path ); if ( o == null && dynamicRegister != null ){ // System.out.println( "Calling dynamic register: " + path ); return dynamicRegister.invoke_( ("." + path).replaceAll( "%20", " " ).split( "/" ) ); } return o; } COM: <s> return the object associated with the supplied path </s>
funcom_train/4151571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { // Load basics try { p1 = (MajorCharacter) LoadingQueue.push((MajorCharacter) (Class.forName(baseURL + p1s).getConstructors()[1].newInstance(false))); p2 = (MajorCharacter) LoadingQueue.push((MajorCharacter) (Class.forName(baseURL + p2s).getConstructors()[1].newInstance(false))); } catch (Exception e) { e.printStackTrace(); } LoadingQueue.push(stage); loadAttributes(); } COM: <s> load all attacks abilities and stage from data </s>
funcom_train/39314635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetLineStroke() { System.out.println("testSetLineStroke"); lineTool myLine=new lineTool(); myLine.setLineStroke(4); BasicStroke bs=new BasicStroke(4); assertEquals(myLine.getLineStroke(), bs); } COM: <s> test of set line stroke method of class line tool </s>
funcom_train/5461598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlJournalComponent(Component component, Resource parentNode) { RDFContainer rdfContainer = prepareDataObjectRDFContainer(component); rdfContainer.add(RDF.type, NCAL.Journal); VJournal vjournal = (VJournal) component; crawlPropertyList(vjournal, rdfContainer); addStatement(rdfContainer, parentNode, NCAL.component, rdfContainer.getDescribedUri()); passComponentToHandler(rdfContainer, component); } COM: <s> crawls a single vjournal component </s>
funcom_train/43567895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getSplitVert() { if (splitVert == null) { splitVert = new JSplitPane(); splitVert.setDividerLocation(0.5d); splitVert.setDividerSize(3); splitVert.setOrientation(JSplitPane.VERTICAL_SPLIT); splitVert.setPreferredSize(new Dimension(400,400)); splitVert.setResizeWeight(0.5D); splitVert.setTopComponent(getConsole()); splitVert.setContinuousLayout(false); splitVert.setBottomComponent(getPanelView()); } return splitVert; } COM: <s> this method initializes j split pane </s>
funcom_train/25597833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getTargetAnchorShapeRotation () { int size = controlPoints.size (); if (size <= 1) return 0.0; Point point1 = controlPoints.get (size - 1); Point point2 = controlPoints.get (size - 2); return Math.atan2 (point2.y - point1.y, point2.x - point1.x); } COM: <s> returns the rotation of the target anchor shape </s>
funcom_train/29597326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawBoundingBox(final GC gc) { final PixelRectangle rect = drawingArea.absRect2PixelRect(getBoundingBox()); final int x = rect.getUpperLeft().x; final int y = rect.getUpperLeft().y; final int width = rect.getWidth(); final int height = rect.getHeight(); final Color color = new Color(gc.getDevice(), 255, 0, 0); gc.setLineWidth(1); gc.setForeground(color); gc.drawRectangle(x, y, width, height); color.dispose(); } COM: <s> draws a line which indicates the objects bounding box </s>
funcom_train/42181039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModelRotation(float [][] modelRotation) { if (modelRotation != this.modelRotation) { float [][] oldModelRotation = this.modelRotation; this.modelRotation = modelRotation; this.propertyChangeSupport.firePropertyChange(Property.MODEL_ROTATION.toString(), oldModelRotation, modelRotation); } } COM: <s> sets the orientation pitch angle of the imported piece model </s>
funcom_train/13442155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuBar load() { JMenuBar barraDeMenu = new JMenuBar(); barraDeMenu.setPreferredSize(new Dimension(500, 30)); List<JMenu> loadedBar = new MenuBuilder(controller).init("menus.txt"); barraDeMenu.add(loadedBar.get(0)); barraDeMenu.add(loadedBar.get(1)); barraDeMenu.add(loadedBar.get(2)); barraDeMenu.add(loadedBar.get(3)); barraDeMenu.add(pluginManager.getMenu()); return barraDeMenu; } COM: <s> loads a menu bar </s>
funcom_train/46682047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanUp() { for(int i=0; i<epoch; i++) error_vector[i] = 0; epoch = 0; start = 0; end = 0; Collection<FcmConnection> cons = map.getConnections().values(); for(FcmConnection f : cons){ if(f instanceof LearningWeightedConnection){ LearningWeightedConnection w = (LearningWeightedConnection) f; w.setChangeInWeight(0); } } } COM: <s> reset the data structures after the training </s>
funcom_train/24537885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test12() { CodeExpressionRef exp = createExpression(new BeanPart(decl1), false, true, true, getPriority(3,true)); try { method.updateExpressionOrder(); } catch (CodeGenException e) { e.printStackTrace(); } assertEquals("Failed to add low priority expression to bp1",exp,getExp(8)) ; } COM: <s> add a brand new bean with order priority of 3 </s>
funcom_train/46194223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStoreValidation () { RepositoryManager manager = RepositoryManager.getInstance(); Repository repository = manager.openRepository("TestRepo", true); repository.addStoreValidator("store", Student.class, new PersonStoreValidator()); try { Student s = TestUtils.newStudent(); s.setAge(0); repository.store(s, Repository.INDEX_YES); } catch (ValidationException e) { assertEquals ("store", e.getValidatorName()); } manager.closeRepository("TestRepo"); } COM: <s> test the store validation </s>
funcom_train/20825599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SelectionInterval up(final LList<E> list, final int[] indexes) { SelectionInterval selection = null; if (indexes.length > 0) { int insert = indexes[0] - 1; if (insert >= 0) { selection = move(list, indexes, insert); } } return selection; } COM: <s> moves elements up </s>
funcom_train/48385872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector2D nearestCardDir() { Vector2D val = quantizeDegrees(90).normalize(); if(val.equals(Vector2D.ZERO)) return Vector2D.ZERO; if(val.equals(Vector2D.NORTH)) return Vector2D.NORTH; if(val.equals(Vector2D.EAST)) return Vector2D.EAST; if(val.equals(Vector2D.SOUTH)) return Vector2D.SOUTH; if(val.equals(Vector2D.WEST)) return Vector2D.WEST; else return val; } COM: <s> rounded to nearest b cardinal unit direction b from the cur vector </s>
funcom_train/2546956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSourceDataConnections() { ArrayList connList = new ArrayList(); for (int i = 0; i < sourceConnections.size(); i++) { if (sourceConnections.get(i) instanceof DataConnectionModel) { connList.add(sourceConnections.get(i)); } } return connList; } COM: <s> gets a list of data connections for which this activity is the source </s>
funcom_train/35048469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean _validateATTOUT(List<DBAttributeConfig> attributes){ int cant = 0; boolean validate = true; for(DBAttributeConfig a : attributes){ if (a.getArg("type").equalsIgnoreCase(DataTypes.BLOB.toString()) || a.getArg("type").equalsIgnoreCase(DataTypes.CLOB.toString())){ cant++; } } if (cant != 1){ validate = false; } return validate; } COM: <s> validates that there is a single output attribute of type clob or blob </s>
funcom_train/8421053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void step(){ int x = point.getX(); int y = point.getY(); int z = point.getZ(); point = new Point3D(x + this.direction.getA(), y + this.direction.getB(), z + this.direction.getC()); } COM: <s> steps this ball by adding the directional vector to the currrent </s>
funcom_train/28438267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNameString(){ StringBuffer str=new StringBuffer(); if(nameString==null){ for(int i=0;i<name.size();i++){ Vector rdn=(Vector)name.elementAt(i); if(i>0) str.append(","); for(int j=0;j<rdn.size();j++){ String[] ava=(String[])rdn.elementAt(j); if(j>0) str.append("+"); str.append(ava[0]+"="+ava[1]); } } nameString=str.toString(); } return nameString; } COM: <s> get the name in a string form </s>
funcom_train/1684001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotPlayerNames(String[] players){ ArrayList<String> playerNames=new ArrayList<String>(); Collections.addAll(playerNames, players); gameLogic=new GameLogic(playerNames, localPlayer); NetworkInIngameListener.addListener(gameLogic); netOut.sendGetXmlMap(); } COM: <s> first message received by start ingame gui got player names </s>
funcom_train/47434375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Int2 eObject2CommentPositionIn(EObject object, Int2 limits) { if (object == null) return Int2.NOT_FOUND; if (!commit) commit(); List positions = (List) eObject2CommentPositions.get(object); if (positions != null) { Iterator it = positions.iterator(); while (it.hasNext()) { Int2 pos = (Int2) it.next(); if (pos.b() >= limits.b() && pos.e() <= limits.e()) { return pos; } } } return Int2.NOT_FOUND; } COM: <s> returns the first comment position of the given object </s>
funcom_train/9235485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveHandler(final String protocol, final String handler) { if (handler.isEmpty()) { IdentityManager.getConfigIdentity().unsetOption("protocol", protocol); } else { IdentityManager.getConfigIdentity().setOption("protocol", protocol, handler); } } COM: <s> saves or updates a handler to the config </s>
funcom_train/25329964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BranchGroup getSceneGroup() { if (scene == null) { scene = new BranchGroup(); for (int i = 0; i < objects.length; i++) { javax.media.ding3d.Node j3dNode; if ((j3dNode = objects[i].getImplNode()) != null) { ; scene.addChild(j3dNode); } } } return scene; } COM: <s> gets the scene group attribute of the vrml scene object </s>
funcom_train/1958954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRestriction() throws Throwable { Enumeration e = services.keys(); while(e.hasMoreElements()) { String service = (String) e.nextElement(); Enumeration impls = ((Hashtable) services.get(service)).keys(); do { String impl = (String) impls.nextElement(); System.out.println(service+": "+impl); try { Document restricted = doRestrict(node, service, impl); out.output(restricted, System.out); } catch(Throwable t) { t.printStackTrace(); } System.out.println("******************"); } while(impls.hasMoreElements()); } } COM: <s> run all tests in the hashtable </s>
funcom_train/39315777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLine2ActionPerformed() { System.out.println("testLine2ActionPerformed"); f.currentTool=f.toolLine; f.line2ActionPerformed(actionEvent); assertEquals(f.curLine,f.line2); t.currentTool=t.toolCurve; t.line2ActionPerformed(actionEvent); assertEquals(t.curCurve,t.line2); } COM: <s> test of line2 action performed method of class terp paint </s>
funcom_train/44152254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String rpad(String value, int desiredLength, char padChar) { StringBuffer sb = new StringBuffer(); // Determine the current length of the string. int currentLength; if (value == null) { currentLength = 0; } else { currentLength = value.length(); } sb.append(value); for (int i = currentLength; i < desiredLength; i++) { sb.append(padChar); } return sb.toString(); } COM: <s> right pad the string by the specified number of spaces </s>
funcom_train/37557727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillRoundRectangle (int x, int y, int width, int height, int arcWidth, int arcHeight) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); int nullPen = OS.GetStockObject(OS.NULL_PEN); int oldPen = OS.SelectObject(handle, nullPen); OS.RoundRect(handle, x,y,x+width,y+height,arcWidth, arcHeight); OS.SelectObject(handle,oldPen); } COM: <s> fills the interior of the round cornered rectangle specified by </s>
funcom_train/5372791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLineBackgroundListener(LineBackgroundListener listener) { checkWidget(); if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (userLineBackground == false) { removeLineBackgroundListener(defaultLineStyler); defaultLineStyler.setLineBackground(0, logicalContent.getLineCount(), null); userLineBackground = true; } StyledTextListener typedListener = new StyledTextListener(listener); addListener(LineGetBackground, typedListener); } COM: <s> adds a line background listener </s>
funcom_train/11703009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean endOfProcessingReached() { // Special case, -1 means all entities in the corpus if (maxToProcess == -1) { return false; } else if (maxToProcess == 0) { return true; } else { // check if exceeded or matched the configured max number of // entities return (entityCount >= maxToProcess); } } COM: <s> determines if the cpm has processed configured number of entities </s>
funcom_train/10978503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidRfc2616(String value) { if (value == null || value.length() == 0) { return false; } for (int i = 0; i < value.length(); i++) { char c = value.charAt(i); if (!(Character.isLetter(c) || c == '-')) { return false; } } return true; } COM: <s> check whether the value contains valid characters for the </s>
funcom_train/5659731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int val) { // value is valid? if (val < minValue) val = minValue; // value is greater than default maxinum value? too big. if (val > maxValue) val = maxValue; // set value this.value = val; adjustThumbPos(); // repaint the canvas repaint(); } COM: <s> set the slider value </s>
funcom_train/23754442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RenderedImage getNewRenderedImage(RenderInfo info) { if (!getRenderInfo().equals(info)) { RenderedImage rndImg = RenderedImageFactory.getRelatedInstance(this, info); if (rndImg != null) { return rndImg; } else { return RenderedImageFactory.getInstance(getBuffer(), info); } } return this; } COM: <s> implementation of the resizable image interface that will allow the svg </s>
funcom_train/47395677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InetAddress getInetAddress(String name, InetAddress def) { String v = getProperty (name, null); InetAddress ret = def; if ( v != null ) { try { ret = InetAddress.getByName(v); } catch (Exception e) {} } if (ret == def) Messages.warn(0, BPR04_ + def, name); return ret; } COM: <s> get this property value as an inet address </s>