__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/3343409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getDDC1Bit() {
ports.outPortByte(SRX_SEQUENCER_INDEX, SR8_DDC2B);
int data = ports.inPortByte(SRX_SEQUENCER_DATA) & 0xFF;
if ((data & 0x40) == 0) {
log.error("DDC2B/I2C configured in EEPROM mode!");
return false;
}
// Anything else to check?
return (data & (1 << 7)) != 0;
}
COM: <s> not implemented by kvms cirrus emulation </s>
|
funcom_train/39911077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetComment() {
System.out.println("setComment");
String comment = "";
Timesheet_hour instance = new Timesheet_hour();
instance.setComment(comment);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set comment method of class buissness </s>
|
funcom_train/1096116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveChanges() {
/*
AeDefaultEngineConfiguration config = getRawConfig();
AeIdentityConfig.setOnConfig(getFileConfig(), config);
StringWriter sw = new StringWriter();
try {
config.save(sw);
getAdmin().setRawConfig(sw.toString());
} catch (AeException e) {
// FIXME Auto-generated catch block
e.printStackTrace();
}*/
}
COM: <s> saves the current config settings to the database </s>
|
funcom_train/107121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTableFromList(String pKey) {
for (int i = 0; i < table.getItemCount(); i++) {
if(table.getItem(i).getText(HIDDEN_KEY_COLUMN).equals(pKey)){
table.remove(i);
break;
}
}
}
COM: <s> removes poker table from the list </s>
|
funcom_train/47942633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParamOutStartVertex(Collection<T> paramOutStartVertex) {
if (LOG.isDebugEnabled()) {
LOG.debug("setParamOutStartVertex(Collection<T>) - entering");
}
this.paramOutStartVertex = paramOutStartVertex;
if (LOG.isDebugEnabled()) {
LOG.debug("setParamOutStartVertex(Collection<T>) - exiting");
}
}
COM: <s> sets the param out start vertex </s>
|
funcom_train/34794239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHeadTimeString() {
Date d = new Date(this.head_time * 1000);
if (null == fmt) {
fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.MEDIUM);
fmt.setTimeZone(TimeZone.getTimeZone("EST"));
}
return fmt.format(d);
}
COM: <s> returns the head revision time as a code string code for this file </s>
|
funcom_train/4533660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleHangupRequest(Interlocutor interlocutor) {
boolean hangupOk = true;
try {
sipManager.endCall(interlocutor.getID());
}
catch (CommunicationsException exc) {
guiManager.remove(interlocutor);
hangupOk = false;
Log.error("handleHangupRequest", exc);
}
return hangupOk;
}
COM: <s> handle a hangup request </s>
|
funcom_train/20479711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SiteUpdateThread getUpdateThread(SiteUpdateData upd, Context ctx) {
if (mUpdates.containsKey(upd.getName())
&& mUpdates.get(upd.getName()).isAlive()) {
return mUpdates.get(upd.getName());
} else {
//Log.v(Constants.LOG_TAG, "creating new thread for " + upd.getName());
SiteUpdateThread uThread = new SiteUpdateThread(upd, ctx);
return uThread;
}
}
COM: <s> get the update thread for the site </s>
|
funcom_train/45623356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetZonePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateTrustInfoType_targetZone_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateTrustInfoType_targetZone_feature", "_UI_GenerateTrustInfoType_type"),
MSBPackage.eINSTANCE.getGenerateTrustInfoType_TargetZone(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the target zone feature </s>
|
funcom_train/4366374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int peekChar() throws IOException {
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
load(0, true);
}
// peek at character
int c = fCurrentEntity.ch[fCurrentEntity.position];
// return peeked character
if (fCurrentEntity.isExternal()) {
return c != '\r' ? c : '\n';
}
else {
return c;
}
} // peekChar():int
COM: <s> returns the next character on the input </s>
|
funcom_train/36493925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasData() {
/* If the Executor is not running, remove it from the session */
if ((this.executor != null) && (! this.executor.isRunning()))
TASK_INSTANCE = null;
/* Return wether we had an executor at the time we were created */
return this.executor != null;
}
COM: <s> p return whether the </s>
|
funcom_train/20342597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getClearCommand() {
if (clearCommand == null) {//GEN-END:|89-getter|0|89-preInit
// write pre-init user code here
clearCommand = new Command("Clear", Command.OK, 0);//GEN-LINE:|89-getter|1|89-postInit
// write post-init user code here
}//GEN-BEGIN:|89-getter|2|
return clearCommand;
}
COM: <s> returns an initiliazed instance of clear command component </s>
|
funcom_train/19326013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FoValue traitWhiteSpace(final FObj fobj, final FoContext context) {
final PdWhiteSpace property = (PdWhiteSpace) getProperty(
FoProperty.WHITE_SPACE);
if (property != null) {
return property.getValue(context, fobj);
}
return PdWhiteSpace.getValueNoInstance(context, fobj);
}
COM: <s> returns the white space property </s>
|
funcom_train/5723003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String editWikiVersion() {
LOGGER.debug("editing WikiSiteVersion");
WikiSiteInfo siteInfo = data.getRowData();
if (siteInfo == null) {
return Constants.FAILURE;
}
siteVersionInfo = wikiService.getWikiSiteContent(siteInfo.getId());
setRequestBean(Constants.WIKI_CURRENT_SITE_VERSION, siteVersionInfo);
if (siteVersionInfo == null) {
addWarning(i18n("error_wikisite_not_found"));
return Constants.FAILURE;
} else {
LOGGER.debug("selected siteVersionInfo " + siteVersionInfo.getName());
return Constants.WIKI_EDIT_PAGE;
}
}
COM: <s> retrieves a specific version and returns wiki edit page </s>
|
funcom_train/15605960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals (Object obj) {
if (!(obj instanceof SwingRange)) {
return false;
}
SwingRange objRange = (SwingRange)obj;
if (this.startRange == objRange.startRange &&
this.endRange == objRange.endRange) {
return true;
}
else {
return false;
}
}
COM: <s> compares two swing ranges for equality </s>
|
funcom_train/9503451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteValue( long value ) throws InvalidValueException {
/* Get the index of the value to delete */
int index = findValue( value);
/* Copy everything infront of it one step back */
for ( int i = index; i < numElements - 1; i++) {
array[i] = array[i + 1];
}
/* Decrement numElements */
numElements--;
}
COM: <s> deletes a value from the array </s>
|
funcom_train/36168065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HTTPServlet getHTTPServlet(String requestFile){
httpServlet = null;
int loadSize = this.load.size();
String alias = this.getAlias(requestFile);
for(int i=0 ; i< loadSize ; i++){
ServletLoaded servlet = (ServletLoaded) this.load.elementAt(i);
if(servlet.alias.equals(alias)){
return servlet.httpServlet;
}
}
return this.loadServlet(alias);
}
COM: <s> get the code httpservlet code corresponding to a reques file </s>
|
funcom_train/25291257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlignmentMode(int mode) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_MODE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("OrientedShape3D0"));
if (isLive())
((OrientedShape3DRetained)retained).setAlignmentMode(mode);
else
((OrientedShape3DRetained)retained).initAlignmentMode(mode);
}
COM: <s> sets the alignment mode </s>
|
funcom_train/22362829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getItemTransferRelations(ItemType type) {
List ret = CollectionFactory.createArrayList(getRelations().size());
for(Iterator iter = getRelations(ItemTransferRelation.class).iterator(); iter.hasNext();) {
ItemTransferRelation rel = (ItemTransferRelation) iter.next();
if(rel.itemType.equals(type)) {
ret.add(rel);
}
}
return ret;
}
COM: <s> returns a collection of the itemrelations concerning the given item </s>
|
funcom_train/20821827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parse(final String string, final float expectedValue) {
assertTrue(new SyntaxLevel().syntax(string), string + " syntax");
float value = ParserLevel.parse(string);
assertTrue(Math.abs(value - expectedValue) < 0.001, string + " value");
}
COM: <s> converts string value to float and assert that the </s>
|
funcom_train/22564928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportModelEntity(final ICompetence competence) throws Exception {
final ServiceContext ctx = PortletUtils.getServiceContext();
competenceLevel = CompetenceLevelFactory.createCompetenceLevel(competence, ctx);
competenceLevel.setDescription(getDescription());
competenceLevel.setTitle(getTitle());
competenceLevel.setVersionTag(getCompetence().getVersionTag());
competenceLevel.save();
List<ICompetenceLevel> levels = competence.getLevels();
levels.add(competenceLevel);
competence.setLevels(levels);
competence.save();
}
COM: <s> export model entity to tencompetence domain model implementation in liferay </s>
|
funcom_train/41880884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(ArrayList<Edge> left, ArrayList<Edge> right) {
double flightCostLeft = totalTimeOfPath(left);
double flightCostRight = totalTimeOfPath(right);
if (flightCostLeft > flightCostRight) {
return +1;
} else if (flightCostLeft < flightCostRight) {
return -1;
} else // equal
{
return 0;
}
}
COM: <s> compare two trips by time </s>
|
funcom_train/29082103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRowHeights(Collection<? extends Row> rows) {
List<Column> columns = mModel.getColumns();
boolean needRevalidate = false;
for (Row row : rows) {
int height = row.getHeight();
int prefHeight = row.getPreferredHeight(columns);
if (height != prefHeight) {
row.setHeight(prefHeight);
needRevalidate = true;
}
}
if (needRevalidate) {
contentSizeMayHaveChanged();
revalidateView();
}
}
COM: <s> causes row heights to be recalculated </s>
|
funcom_train/36819629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupSerial(){
String source = "serial@"+device+":"+baudrate;
try {
PhoenixSource phoenix;
if (source == null) {
phoenix = BuildSource.makePhoenix(PrintStreamMessenger.err);
}
else {
phoenix = BuildSource.makePhoenix(source, PrintStreamMessenger.err);
}
System.out.print(phoenix);
//This line terminates the program if there is not a valid device
mif = new MoteIF(phoenix);
setMoteIF(mif);
}catch (Exception e){
System.out.println("Error: could not connect to hub mote.\nPlease verify it is connected.\nIf currently connected and still not detecting, disconnect and reconnect the mote.");
}
}
COM: <s> begins execution of the mote bridge should be called on initialization </s>
|
funcom_train/38543230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackgroundColors(Color[] bgColors) {
if (((bgColors == null) && (this.backgroundColors != null))
|| ((bgColors != null) && ((this.backgroundColors == null) || (!this.backgroundColors
.equals(bgColors))))) {
this.backgroundColors = bgColors;
fireTableColorModelChanged(new TableColorModelEvent(this));
}
}
COM: <s> this method enables to change the colors used in the background cycle </s>
|
funcom_train/3431699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addReader(String mimeType, CatalogReader reader) {
if (readerMap.containsKey(mimeType)) {
Integer pos = (Integer) readerMap.get(mimeType);
readerArr.set(pos.intValue(), reader);
} else {
readerArr.add(reader);
Integer pos = new Integer(readerArr.size()-1);
readerMap.put(mimeType, pos);
}
}
COM: <s> add a new catalog reader to the catalog </s>
|
funcom_train/43258261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Transfer t){
//System.out.println("SftpPlugin::remove(), removing transfer object, it's finished");
for(int a=0;a<m_transfer.size();a++){
Transfer tmp = (Transfer)m_transfer.get(a);
if(t.getKey() == tmp.getKey()){
//System.out.println("SftpPlugin::remove(), found transfer object, removing");
m_transfer.remove(a);
}
}
}
COM: <s> removes a transfer object from the queue of objects currently running </s>
|
funcom_train/2903540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void importString(JComponent c, String str){
int fx=0, fy=0;
fx = pc.getX();
fy = pc.getY();
ContainerInterface dndParent = null;
if(pc instanceof ContainerInterface){
dndParent = (ContainerInterface)pc;
}
if((str!=null) && (manager!=null)){
XMLTag spec = XMLHandler.parseXML(new StringReader(str));
if(dndParent != null){
spec.attribute.put("parent", dndParent.getID());
}
else{
spec.attribute.remove("parent");
}
setXY(spec, fx, fy, findDimension(spec));
manager.add(spec);
}
}
COM: <s> importing a new xml component </s>
|
funcom_train/44383142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDialog getEffectsDialog() {
if (effectsDialog == null) {
effectsDialog = new JDialog();
effectsDialog.setSize(new Dimension(352, 264));
effectsDialog.setTitle("Choose the effects to add");
effectsDialog.setModal(true);
effectsDialog.setContentPane(getEffectsDialogContentPane());
}
return effectsDialog;
}
COM: <s> this method initializes effects dialog </s>
|
funcom_train/51358636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double maxX() {
if (values == null || values.size() == 0) {
System.out.println("MAXX Error");
return -1;
}
double max = ((Point)values.elementAt(0)).x;
for (int i = 0; i < values.size(); i++) {
if (((Point)values.elementAt(i)).x > max) {
max = ((Point)values.elementAt(i)).x;
}
}
return max;
}
COM: <s> returns the largest x value in the database </s>
|
funcom_train/7615362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getMaxValue(int component) {
if (component < 0 || component > numComponents - 1) {
// awt.16A=Invalid component index: {0}
throw new IllegalArgumentException(Messages.getString("awt.16A", component)); //$NON-NLS-1$
}
return 1;
}
COM: <s> gets the maximum normalized color component value for the specified </s>
|
funcom_train/41705029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
Node keys[] = new Node[node.getChildren().length];
for(int i = 0; i < node.getChildren().length;i++) {
keys[i] = node.getChildren(i);
}
setKeys(keys);
}
COM: <s> listen to children change events of the wrapped node </s>
|
funcom_train/4153145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getImageDescriptor(String relativePath) {
String iconPath = "icons/";
try {
URL installURL = getDescriptor().getInstallURL();
URL url = new URL(installURL, iconPath + relativePath);
return ImageDescriptor.createFromURL(url);
} catch (MalformedURLException e) {
// should not happen
return ImageDescriptor.getMissingImageDescriptor();
}
}
COM: <s> returns the image descriptor with the given relative path </s>
|
funcom_train/37077537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reformat(boolean isRecursive) {
this.setBackground(Color.red);
this.setBorder(null);
this.setOpaque(true);
int width = tier.getReference().getLength() * getBaseWidth();
int height = getBaseHeight();
setPreferredSize(new Dimension(width, height));
}
COM: <s> set the preferred size for this panel </s>
|
funcom_train/38310615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateCalendar() throws Exception {
Calendar cal = DateUtils.createCalendar(2008, 02, 29);
assertEquals(df.parse("2008-02-29"), cal.getTime());
Calendar cal2 = DateUtils.createCalendar(2008, 02, 29, 8, 30, 1);
assertEquals(preciseDf.parse("2008-02-29 08:30:01"), cal2.getTime());
}
COM: <s> tests the create calendar method </s>
|
funcom_train/10481909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isProtocolPropertyTrue(String name) {
// the name we're given is the least qualified part of the name. We
// construct the full property name
// using the protocol ("pop3").
String fullName = "mail." + protocol + "." + name;
return isSessionPropertyTrue(fullName);
}
COM: <s> process a session property as a boolean value returning either true or </s>
|
funcom_train/29286831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillStereotypeTable(Table table, List stereotypes) {
for (Iterator iter = stereotypes.iterator(); iter.hasNext();) {
Stereotype stereo = (Stereotype) iter.next();
final TableItem item = new TableItem(table, SWT.NONE);
item.setText(new String[] { stereo.getName()});
item.setData(stereo);
item.setImage(image);
}
}
COM: <s> fills the table with all the existing stereotypes from the given list </s>
|
funcom_train/21799831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTab( Tab tab ) {
if ( tab == null ) {
throw new IllegalArgumentException( "tab is null" );
}
int index = tabbedPane.indexOfComponent( tab );
if ( index < 0 ) {
throw new IllegalArgumentException( "tab does not belong to this pane" );
}
removeTab( index );
}
COM: <s> removes the specified tab </s>
|
funcom_train/11730739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InternalValue createCopy() throws RepositoryException {
if (type != PropertyType.BINARY) {
// for all types except BINARY it's safe to return 'this' because the
// wrapped value is immutable (and therefore this instance as well)
return this;
}
// return a copy of the wrapped BLOBFileValue
return new InternalValue(((BLOBFileValue) val).copy());
}
COM: <s> create a copy of this object </s>
|
funcom_train/39273650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValues(DTO valueObject) {
if (LOG.isDebugEnabled()) {
LOG.debug("setValues: Updating the object using these values "
+ valueObject);
}
if (valueObject == null) {
LOG.error("Unable to setValues using a null DTO");
throw new NullPointerException("Unable to setValues using a null"
+ " DTO");
}
}
COM: <s> update the value beans values </s>
|
funcom_train/8311791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String prefix = getPrefix();
String qName = "".equals(prefix) ? getLocalName() : ((getPrefix()) + ":") + (getLocalName());
return ("[(DefaultNameStep): " + qName) + "]";
}
COM: <s> returns a full information debugging string </s>
|
funcom_train/40929353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSiCommand1() {
if (siCommand1 == null) {//GEN-END:|291-getter|0|291-preInit
// write pre-init user code here
siCommand1 = new Command("Si", Command.OK, 0);//GEN-LINE:|291-getter|1|291-postInit
// write post-init user code here
}//GEN-BEGIN:|291-getter|2|
return siCommand1;
}
COM: <s> returns an initiliazed instance of si command1 component </s>
|
funcom_train/17934720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int isEqual(String num) {
if (getChapt(this.num) > getChapt(num)) {
return 1;
} else {
if (getChapt(this.num) < getChapt(num)) {
return -1;
}
if (getSection(this.num) > getSection(num)) {
return 1;
} else {
if (getSection(this.num) < getSection(num)) {
return -1;
}
return 0;
}
}
}
COM: <s> this method compares to numbers string num with each other </s>
|
funcom_train/16080405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MetsDocumentID getMetsDocumentID() throws METSException
{
if (this.metsDocumentID != null)
{
return this.metsDocumentID;
}
List<Node> l = super.getChildElements(Constants.ELEMENT_METSDOCUMENTID);
if (!l.isEmpty())
{
return new MetsDocumentID(l.get(0));
}
return null;
}
COM: <s> obtain the mets document id </s>
|
funcom_train/3102233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void restoreHistoryFilters(final IMemento memento) {
Assertion.valid(memento);
fHistory.clear();
final IMemento history= memento.getChild(TAG_HISTORY);
if (history != null) {
final IMemento[] children= history.getChildren(TAG_CHILD);
String id= null;
for (int index= 0; index < children.length; index++) {
id= children[index].getString(TAG_ID);
if (fFilterDescriptors.containsKey(id) && !fHistory.contains(id)) {
fHistory.push(id);
}
}
}
}
COM: <s> restores the state of the history filters </s>
|
funcom_train/45081546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillDynamicBoxes(String projectKey) {
List list = null;
logger.debug("Filling person beans with " + projectKey.toString());
try {
list = TPersonPeer.loadManagers(projectKey); // Load Managers
fillBoxes(list, tableManagers);
list = TPersonPeer.loadResponsibles(projectKey); // Load
// Responsibles
fillBoxes(list, tableResponsibles);
}
catch (Exception e) {
logger.error("Exception loading dynamic person tables " + e);
}
}
COM: <s> the detail objects of person beans depend on the selected project </s>
|
funcom_train/19073258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetInputListeners() {
int currentSize = inputPatternListeners.size();
for (int index = 0; index < currentSize; index++) {
InputPatternListener tempListener =
(InputPatternListener) inputPatternListeners.elementAt(index);
if (tempListener != null){
tempListener.reset();
}
}
}
COM: <s> reset all the input listeners </s>
|
funcom_train/44342327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CG parseCG(String strgCG) throws ParsingException {
if (strgCG == null || strgCG.equals(""))
return null;
else if (this.lexicon == null)
throw new ParsingException("lexicon is null");
// Parse the text strgCG treated by txtTokenizer to produce a CG
return parseCG(new TextTokenizer(strgCG));
}
COM: <s> parse the textual formulation of a cg parameter strg cg and produce its </s>
|
funcom_train/10628304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBitLengthNegative1() {
byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91};
int aSign = -1;
BigInteger aNumber = new BigInteger(aSign, aBytes);
assertEquals(108, aNumber.bitLength());
}
COM: <s> bit length of a negative number </s>
|
funcom_train/33723799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintErrorImage(Graphics g, int x, int y, boolean hasFocus, ImageObserver observer) {
if (g == null) {
return;
}
ImageIcon icon = hasFocus ? errorIconFocused : errorIcon;
g.drawImage(icon.getImage(), x, y, observer);
}
COM: <s> paints the error icon onto the given </s>
|
funcom_train/26611276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeProcessor createProcessor (Datum xmlOp)
{
NodeProcessor processor = null;
if (xmlOp != null)
{
Class opClass = lookup (xmlOp.getType ());
if (opClass != null)
{
processor = instantiateClass (opClass, xmlOp);
}
else
{
_logger.warn (
"Unable to find a processor for this operation:\n" +
xmlOp);
}
}
return processor;
COM: <s> instantiates a processor from the settings in the given transform xml </s>
|
funcom_train/50045049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAlleleFreq() {
double alleleFreq = Double.parseDouble(variantContext.getAttributeAsString("AF", "-1"));
if (alleleFreq < 0) {
alleleFreq = Double.parseDouble(variantContext.getAttributeAsString("GMAF", "-1"));
}
return alleleFreq;
}
COM: <s> return the allele frequency as annotated with an af or gmaf attribute </s>
|
funcom_train/26354628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Packet createEndOfGamePacket() {
Object[] array = new Object[3];
array[0] = getDetailedVictoryReport();
array[1] = new Integer(game.getVictoryPlayerId());
array[2] = new Integer(game.getVictoryTeam());
return new Packet(Packet.COMMAND_END_OF_GAME, array);
}
COM: <s> creates a packet indicating end of game including detailed unit status </s>
|
funcom_train/17680237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SqlExp createOrderByPKList(SelectExp se) {
SqlExp ans = pkSimpleCols[0].toSqlExp(se);
int nc = pkSimpleCols.length;
if (nc > 1) {
SqlExp e = ans;
for (int i = 1; i < nc; i++) {
e = e.next = pkSimpleCols[i].toSqlExp(se);
}
}
return ans;
}
COM: <s> get an order by list to order by our primary key </s>
|
funcom_train/3025802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
String root = System.getProperty("user.home");
FileSettings.setSettingsRoot(root);
// Make sure everything is installed properly
(new RefactoryInstaller(false)).run();
VisualCafe vc = VisualCafe.getVisualCafe();
// Add sample submenus to Visual Cafe MenuBar
MenuBar mb = vc.getMenuBar();
Menu subMenu = getSubMenu();
mb.add(subMenu);
}
COM: <s> initializes visual cafe settings </s>
|
funcom_train/38473268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFieldInputs() {
if (property != null && property.isValid()) {
// FIXME: Need to support valid values for things other than list boxes/radio groups
Object data = property.get();
Iterator i = awareFields.iterator();
while (i.hasNext()) {
IAwareWidget awareField = (IAwareWidget) i.next();
awareField.setValue(data);
}
}
}
COM: <s> method set field inputs </s>
|
funcom_train/18894505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showAboutDialog() {
Icon icon = IconLoader.getIcon(IconLoader.MUSIC_FILE_24);
JOptionPane.showMessageDialog(application, getAboutMessage(),
"About " + Mp3Application.getApplicationName(), JOptionPane.OK_OPTION,
icon);
}
COM: <s> shows help about dialog </s>
|
funcom_train/35723999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyFilter(TestStoreItem item) {
checkNotNull(item);
checkNotNull(itemStore.get(item.getKey()));
if (item instanceof TestSuiteModel) {
filterResultStore.put(item.getKey(), Boolean.TRUE);
} else {
TestCaseModel testCase = (TestCaseModel) item;
filterResultStore.put(testCase.getKey(), filter.match(testCase));
}
}
COM: <s> applys the filter to the test item </s>
|
funcom_train/20142004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(byte[] input) {
for (int i = input.length - 1; i >= 0; --i) {
int a = pool[(index + i) % POOL_SIZE] & 0xff;
int b = input[i] & 0xff;
int sum = a + b + carry;
carry = sum >>> 8;
pool[(index + i) % POOL_SIZE] = (byte) (sum & 0xff);
index++;
newbytes++;
}
}
COM: <s> add code byte code data to the pool </s>
|
funcom_train/44871001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getCenterCenter() {
if (centerCenter == null) {
centerCenter = new JRadioButton();
centerCenter
.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
centerCenter
.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
centerCenter.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (labelLocation != DrawString.CENTER_CENTER) {
firePropertyChange("labelposition", labelLocation,
DrawString.CENTER_CENTER);
labelLocation = DrawString.CENTER_CENTER;
}
}
});
}
return centerCenter;
}
COM: <s> this method initializes center center </s>
|
funcom_train/24311003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IndexReader getFromQueryContextOrOpenIndexReader(ILogResource log) throws IOException {
IndexReader reader = null;
if (queryContext != null) {
reader = queryContext.getIndexReader();
if (reader == null) {
reader = openReader(log);
logger.info("Binding index reader to query context " + queryContext.toString()); //$NON-NLS-1$
queryContext.setIndexReader(reader);
}
return reader;
}
return openReader(log);
}
COM: <s> obtains a index reader from the query context or opens a new one </s>
|
funcom_train/51269839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Literal createCompareTerm(CompareIterator iter, List startVars, List endVars){
ValueLiteral leftLiteral = createValueTerm(iter.getLeftPart(), startVars, endVars);
ValueLiteral rightLiteral = createValueTerm(iter.getRightPart(), startVars, endVars);
CompareLiteral term = new CompareLiteral(iter, iter.getComparator(), iter.getCompareType(), leftLiteral, rightLiteral);
return term;
}
COM: <s> creates a new compare literal </s>
|
funcom_train/15914261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int conceptIdGet( String conceptName ) throws NotFoundException {
Integer idObj = (Integer)conceptIds.get( conceptName );
if ( null == idObj ) {
throw new NotFoundException("no id for concept \""+conceptName+"\"");
}
return idObj.intValue();
}
COM: <s> get id for concept name </s>
|
funcom_train/42390811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RSInterfaceChild getInventoryInterface() {
if (getInterface(Constants.INVENTORY_COM_X).isValid()) {
return RSInterface.getChildInterface(Constants.INVENTORY_COM_X,
Constants.INVENTORY_COM_Y);
}
// Tab needs to be open for it to update it's content -.-
if (getCurrentTab() != Constants.TAB_INVENTORY) {
openTab(Constants.TAB_INVENTORY);
wait(random(900, 1500));
}
return RSInterface.getChildInterface(Constants.INVENTORY_X,
Constants.INVENTORY_Y);
}
COM: <s> gets the inventory interface accessor </s>
|
funcom_train/42089853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected final String TEXT_78 = NL + "\t@Override";
protected final String TEXT_79 = NL + "\tpublic Object getImage(Object object)" + NL + "\t{" + NL + "\t\treturn overlayImage(object, getResourceLocator().getImage(\"full/obj16/";
protected final String TEXT_80 = "\"));";
protected final String TEXT_81 = NL + "\t}" + NL;
COM: <s> protected final string text 76 nl t nl t this returns </s>
|
funcom_train/3102306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleSelectionChanged(final boolean selection) {
if (fSelected != selection) {
fSelected= selection;
if (fDependencies != null) {
boolean focus= false;
for (int index= 0; index < fDependencies.length; index++) {
fDependencies[index].setEnabled(fSelected);
if (fSelected && !focus) {
focus= fDependencies[index].setFocus();
}
}
}
fireDialogFieldChanged();
} else if (fButtonStyle == SWT.PUSH) {
fireDialogFieldChanged();
}
}
COM: <s> handles the selection changed event </s>
|
funcom_train/38492350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canBuy(Construction c) {
switch (c) {
case STREET: return affords(Street.getCost());
case VILLAGE: return affords(Village.getCost());
case CITY: return affords(City.getCost());
case DEVELOPMENT: return affords(Development.getCost());
}
return false; // duh!
}
COM: <s> checks if the player can afford a given construction </s>
|
funcom_train/269280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void repaint( long delay ) {
if( this.fContainer != null && this.fBounds!=null ) {
this.fContainer.repaint(delay,
this.fBounds.x,this.fBounds.y,this.fBounds.width,this.fBounds.height);
}
}
COM: <s> request that this view be repainted </s>
|
funcom_train/11512947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIntersectNonEmptySubset() {
// create a copy
final List<String> other = new ArrayList<String>(fullList);
// remove a few items
assertNotNull(other.remove(0));
assertNotNull(other.remove(1));
// make sure the intersection is equal to the copy
assertEquals(other, ListUtils.intersection(fullList, other));
}
COM: <s> tests intersecting a non empty list with an subset of iteself </s>
|
funcom_train/1011662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(Property prop) {
switch (prop.type) {
case NurbsConsts.N_DISPLAY:
display_method = (int) prop.value;
break;
case NurbsConsts.N_ERRORCHECKING:
errorchecking = (int) prop.value;
break;
case NurbsConsts.N_SUBDIVISIONS:
subdivisions = (int) prop.value;
break;
default:
// abort - end program
break;
}
}
COM: <s> set property value </s>
|
funcom_train/38807709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int index, Content obj) {
if (filter.matches(obj)) {
int adjusted = getAdjustedIndex(index);
contentList.add(adjusted, obj);
expected++;
count++;
} else
throw new IllegalAddException("Filter won't allow the "
+ obj.getClass().getName() + " '" + obj
+ "' to be added to the list");
}
COM: <s> inserts the specified object at the specified position in this list </s>
|
funcom_train/3079895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void print(String msg, String style) {
try {
outputDocument.insertString(outputDocument.getLength(),
msg,
outputArea.getStyle(style));
} catch (javax.swing.text.BadLocationException e) {
System.err.println("Unable to insert text into output area");
}
int pos = outputDocument.getLength();
outputArea.setCaretPosition(pos-1);
}
COM: <s> prints a message in the text window </s>
|
funcom_train/8085566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setButtons() {
int index;
index = m_TabbedPane.getSelectedIndex();
m_ButtonClose.setEnabled(index > -1);
m_ButtonCloseAll.setEnabled(m_TabbedPane.getTabCount() > 0);
m_ButtonCopyQuery.setEnabled(index > -1);
m_ButtonOptWidth.setEnabled(index > -1);
}
COM: <s> sets the state of the buttons </s>
|
funcom_train/25290801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGeometry(BranchGroup branch) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_GEOMETRY_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("Background5"));
if (isLive())
((BackgroundRetained)this.retained).setGeometry(branch);
else
((BackgroundRetained)this.retained).initGeometry(branch);
}
COM: <s> sets the background geometry to the specified branch group node </s>
|
funcom_train/12194072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPut() {
tree.put("http://mat/cars", "http://mat/cars");
String s = (String) tree.get("http://mat/cars");
assertTrue("put operation did not work", s.equals("http://mat/cars"));
}
COM: <s> test of put method of class com </s>
|
funcom_train/803694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(Parse p) {
for(WordRule r : wordRuleList) {
if(r.regex.matcher(p.name).matches()) {
p.wordRule = r.name;
String [] wordArray = p.name.split(" ");
for(int i=0;i<wordArray.length;i++) {
ParseWord pw = new ParseWord();
pw.word = wordArray[i];
pw.wordType = r.wordTypes.get(i);
p.words.add(pw);
}
return;
}
}
}
COM: <s> takes a chemical name breaks it up into words and works out which </s>
|
funcom_train/43873921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseHeader(final String header) {
LOG.debug("parseHeader: " + header);
final String headerName = header.substring(0, header.indexOf(":"));
if (!headersMap.containsKey(headerName)) {
headersMap.put(headerName, header.substring(header.indexOf(":") + 1));
}
}
COM: <s> parse header value puts the found values in headers map field </s>
|
funcom_train/14395073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSystemDevices(final Class[] filterClasses) throws WbemsmtException {
List result = new ArrayList();
result.addAll(getSystemDevices());
if (filterClasses != null) {
CollectionUtils.filter(result, new Predicate() {
public boolean evaluate(Object arg0) {
for (int i = 0; i < filterClasses.length; i++) {
Class cls = filterClasses[i];
if (cls.isAssignableFrom(arg0.getClass())) {
return true;
}
}
return false;
}
});
}
return result;
}
COM: <s> get all system devices </s>
|
funcom_train/41331849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paint(SeaGlassContext context, Graphics g) {
int selectedIndex = tabPane.getSelectedIndex();
ensureCurrentLayout();
// Paint content border.
paintContentBorder(tabContentContext, g, tabPlacement, selectedIndex);
paintTabArea(g, tabPlacement, selectedIndex);
}
COM: <s> paint the tabbed pane </s>
|
funcom_train/124338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent e) {
if (e.getPropertyName().equals("enabled")) {
boolean __enabled = false;
int n = getItemCount();
int i = 0;
while (!__enabled && i < n) {
JMenuItem item = getItem(i++);
if (!item.equals(this)) {
__enabled = item.isEnabled();
}
}
setEnabled(__enabled);
}
}
COM: <s> checks whether there are any enabled items </s>
|
funcom_train/13503124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyPropertiesOverParameters(Map<String, String> parameters) {
Properties properties = System.getProperties();
for (Object object : properties.keySet()) {
String key = (String) object;
if (key.startsWith(SYSTEM_PROPERTY_PREFIX)) {
parameters.put(key.substring(SYSTEM_PROPERTY_PREFIX.length()),
properties.getProperty(key));
}
}
}
COM: <s> augment and perhaps override the server parameters using any system </s>
|
funcom_train/18566226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getAgreePanel() {
if (agreePanel == null) {
agreePanel = new JPanel();
agreePanel.setLayout(new BoxLayout(agreePanel, BoxLayout.Y_AXIS));
agreePanel.add(getAgreeRadioButton(), null);
agreePanel.add(getNotAgreeRadioButton(), null);
}
return agreePanel;
}
COM: <s> this method initializes agree panel </s>
|
funcom_train/48528769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
for (int r = 0; r < routingTable.length; r++) {
for (int c = 0; c < routingTable[r].length; c++) {
if (routingTable[r][c] != null) {
routingTable[r][c].destroy();
routingTable[r][c] = null;
}
}
}
}
COM: <s> unregisters as an observer on all nodehandles </s>
|
funcom_train/2911719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Person getLoggedPerson(HttpServletRequest request) {
Person person = null;
Principal principal = request.getUserPrincipal();
if (principal != null) {
try {
Method m = principal.getClass().getMethod("getPerson",
(Class[]) null);
if (m != null) {
person = (Person) m.invoke(principal, (Object[]) null);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
return person;
}
COM: <s> gets the logged person attribute of the foaf manage helper object </s>
|
funcom_train/37571007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
if (m_broker != null)
try {
m_broker.remove();
}
catch (RemoveException exception) {
throw new RuntimeException("The EJBIdFactory could not remove its ID broker bean.", exception);
}
catch (RemoteException exception) {
throw new RuntimeException("The EJBIdFactory had RMI trouble removing its ID broker bean.", exception);
}
}
COM: <s> decomission this factory removing any jndi ejb handles from it so that </s>
|
funcom_train/12560626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void streamConnect() throws IOException {
streamConnection = connect();
/*
* Because StreamConnection.open*Stream cannot be called twice
* the HTTP connect method may have already open the streams
* to connect to the proxy and saved them in the field variables
* already.
*/
if (streamOutput != null) {
return;
}
streamOutput = streamConnection.openDataOutputStream();
streamInput = streamConnection.openDataInputStream();
}
COM: <s> find a previous connection in the pool or try to connect to the </s>
|
funcom_train/20825634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Point v = scrollPane.getViewport().getViewPosition();
Point h = scrollPane.getRowHeader().getViewPosition();
if (v.y != h.y) {
scrollPane.getViewport().setViewPosition(new Point(v.x, h.y));
}
}
COM: <s> implements the code runable code interface to adjust the </s>
|
funcom_train/17047289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParseInterpretation getTheInterpretation() {
if (_theInterpretation == null) {
final Set<ParseInterpretation> allInterpretations = getAllInterpretations();
if (allInterpretations.size() == 1) {
_theInterpretation = allInterpretations.iterator().next();
_theExtraction = extractions.get(0);
}
}
return _theInterpretation;
}
COM: <s> get the single interpretation for this extraction if it exists otherwise </s>
|
funcom_train/10927804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean supportsPolicies() {
TypeDefinition relType = null;
try {
relType = getBinding().getRepositoryService().getTypeDefinition(getTestRepositoryId(), "cmis:policy", null);
} catch (CmisObjectNotFoundException e) {
return false;
}
return relType != null;
}
COM: <s> returns if the test repository supports policies </s>
|
funcom_train/3464204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
fTreeNode node1 = (fTreeNode)o1;
fTreeNode node2 = (fTreeNode)o2;
// Directories come first
if (node1.isDir() != node2.isDir()) {
if(node1.isDir())
return -1;
return 1;
}
// Both directories or both files -
// compare based on pathname
return node1.getName().compareToIgnoreCase(node2.getName());
}
COM: <s> compares to objects </s>
|
funcom_train/41165620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AgStatusActivity update(AgStatusActivity entity) {
EntityManagerHelper.log("updating AgStatusActivity instance", Level.INFO, null);
try {
AgStatusActivity result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved ag status activity entity and return it or a </s>
|
funcom_train/124362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showNextCard() {
if (getComponentCount() <= 0) {
return;
}
int index = getVisibleChildIndex();
if (index == -1) {
showCard(getComponent(0));
} else if (index == (getComponentCount() - 1)) {
showCard(getComponent(0));
} else {
showCard(getComponent(index + 1));
}
}
COM: <s> show the card that was added to this card panel after the currently </s>
|
funcom_train/13599341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSignalling(Token token) {
if (taskInstances!=null) {
Iterator iter = taskInstances.iterator();
while (iter.hasNext()) {
TaskInstance taskInstance = (TaskInstance) iter.next();
if ( (token!=null)
&& (token.equals(taskInstance.getToken()))
) {
taskInstance.setSignalling(false);
}
}
}
}
COM: <s> removes signalling capabilities from all task instances related to the given token </s>
|
funcom_train/11720948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ImportContext getImportContext(InputContext inputCtx, String systemId) throws IOException {
return new ImportContextImpl(
node, systemId, inputCtx,
(inputCtx != null) ? inputCtx.getInputStream() : null,
new DefaultIOListener(log), config.getDetector());
}
COM: <s> returns a new code import context code </s>
|
funcom_train/47610864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getTpnMain() {
if (tpnMain == null) {
tpnMain = new JTabbedPane();
tpnMain.addTab("Split", null, getPanSplit(), null);
tpnMain.addTab("Merge", null, getPanMerge(), null);
}
return tpnMain;
}
COM: <s> this method initializes tpn main </s>
|
funcom_train/25828745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AgentSubject getAgentSubjectById(long id) {
List<AgentSimulator> agtSimulators = this.simulator.getAgentSimulators();
AgentSubject agentSubject = null;
// find the right agent subject.
for (AgentSimulator agtSim : agtSimulators) {
if(agtSim.getAgentId() == id) {
agentSubject = agtSim.getAgentSubject();
break;
}
}
return agentSubject;
}
COM: <s> get an agent subject for the given id </s>
|
funcom_train/35056990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Invite invite) {
try {
String sql = "insert into invite(user,code,createdOn) values (?,?,now())";
PreparedStatement pStmt = conn.prepareStatement(sql);
pStmt.setString(1,invite.getUser());
pStmt.setString(2,invite.getCode());
pStmt.executeUpdate();
pStmt.close();
} catch (Exception e) { e.printStackTrace(); }
}
COM: <s> saves the existing invite if it does not already exist </s>
|
funcom_train/35838468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllComponents() {
Component [] array = getComponentsInLayer((UIViewPane.NODE_LAYER).intValue());
for(int i=0;i<array.length;i++) {
JComponent object = (JComponent)array[i];
remove(object);
}
Component [] array1 = getComponentsInLayer((UIViewPane.LINK_LAYER).intValue());
for(int i=0;i<array1.length;i++) {
JComponent object = (JComponent)array1[i];
remove(object);
}
repaint();
}
COM: <s> removes all components from this view </s>
|
funcom_train/28871187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void overflow() {
if (devicePrinter != null) {
boolean enabled = xTIMSK_reg.readBit(TOIEn);
devicePrinter.println("Timer" + n + ".overFlow (enabled: " + enabled + ')' + " ");
}
// set the overflow flag for this timer
xTIFR_reg.flagBit(TOVn);
}
COM: <s> flags the overflow interrupt for this timer </s>
|
funcom_train/15685138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNewElement(Object parent, Object newData) {
if (addRemoveLogic == null)
new IllegalStateException(
"you should provide an add/Remove logic by calling method setAddRemoveLogic !");
treeViewer.getTree().setRedraw(false);
addRemoveLogic.addChild(parent, newData);
treeViewer.refresh(parent);
treeViewer.getTree().setRedraw(true);
}
COM: <s> adds a new data to the provided parent object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.