__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/14448419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processEvent(GenericEvent event) throws EventsManagerException {
try {
List list = new ArrayList();
list.add(event);
list.add(this);
list = session.executeRules(list);
if (event.getErrorMessage()!=null)
throw new EventsManagerException(event.getErrorMessage());
}
catch (Throwable ex) {
throw new EventsManagerException(ex.getMessage());
}
}
COM: <s> method called by a business object when starting the b </s>
|
funcom_train/1174440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void moveCard(final CardPanel placeholder) {
UI.invokeLater(new Runnable() {
public void run() {
EventQueue.invokeLater(new Runnable() {
public void run() {
if (placeholder != null) {
placeholder.setDisplayEnabled(true);
//placeholder.setImage(imagePanel);
placeholder.setCard(placeholder.gameCard);
}
}
});
}
});
}
COM: <s> p move card </s>
|
funcom_train/21888699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnl_plan() {
if (pnl_plan == null) {
jLabel10 = new JLabel();
jLabel10.setText("2D plan");
jLabel10.setBounds(new Rectangle(210, 225, 42, 16));
pnl_plan = new JPanel();
pnl_plan.setLayout(null);
pnl_plan.setBounds(new Rectangle(0, 0, 525, 706));
pnl_plan.add(jLabel10, null);
}
return pnl_plan;
}
COM: <s> this method initializes pnl plan </s>
|
funcom_train/16914170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double computeAngle(final double val) {
//TODO: This will not work for vals greater or less than 360
double retVal = val;
if (val >= DEGREES_IN_A_CIRCLE) {
retVal -= DEGREES_IN_A_CIRCLE;
}
if (val < 0) {
retVal += DEGREES_IN_A_CIRCLE;
}
return retVal;
}
COM: <s> ensures that value lies between 0 and 360 </s>
|
funcom_train/7733907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void error(String message, Throwable throwable) {
LogService logService = (LogService) logServiceTracker.getService();
if (logService != null) {
logService.log(LogService.LOG_ERROR, message, throwable);
} else {
LOG.log(Level.SEVERE, message, throwable);
}
}
COM: <s> publish error message </s>
|
funcom_train/18788190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MdrUmlClass findClass(MdrUmlClass context, String unqualifiedName) {
assert (context != null) && (unqualifiedName != null);
MdrUmlClass mClass = null;
for (MdrUmlClass clazz : context.getInnerClasses()) {
if (unqualifiedName.equals(clazz.getName())) {
mClass = clazz;
break;
}
mClass = null;
}
return mClass;
}
COM: <s> finds a class in the given context </s>
|
funcom_train/28292824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getSequencingCollection() {
if (logger.isDebugEnabled()) {
logger.debug(" :: SeqNavParser --> BEGIN - " +
"getSequencingCollection");
logger.debug(" ::--> " + mSequencingCollection);
logger.debug(" :: SeqNavParser --> END - " +
"getSequencingCollection");
}
return mSequencingCollection;
}
COM: <s> retrieves the code sequencing collection code node if one exists </s>
|
funcom_train/37434694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HashMap getKey(String name) {
HashMap key = (HashMap)keys.get(name);
if (key == null) {
System.out.println("creating new key: " + name);
key = new HashMap();
keys.put(name, key);
}
return key;
}
COM: <s> returns the key with given name </s>
|
funcom_train/46702457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAliasName() {
try {
final String result = TABLE.of(this)
.getDatabase()
.getDialect()
.printColumnAlias(this, new StringBuilder(32))
.toString()
;
return result;
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
COM: <s> returns an alias of table and column name </s>
|
funcom_train/20483252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChange(ChangeCapsule changeCapsule) throws IOException {
File newChangeFile = changeWriter.writeChange(changeCapsule); //write change to file
changes.add(newChangeFile); //store change file reference in memory for future access (don't store the change object itself to save memory, otherwise, with lots of change, this might be far too big in terms of memory requirements, if we loaded and stored all changes)
}
COM: <s> writes a new change to the list of changes </s>
|
funcom_train/16140840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color darker(Color c, double factor) {
return new Color(Math.max((int) (c.getRed() * factor), 0),
Math.max((int) (c.getGreen() * factor), 0),
Math.max((int) (c.getBlue() * factor), 0),
c.getAlpha());
}
COM: <s> calculates a darker color which also supports alpha values </s>
|
funcom_train/9207093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getMainToolBar() {
if (mainToolBar == null) {
mainToolBar = new JToolBar();
mainToolBar.setComponentOrientation(java.awt.ComponentOrientation.UNKNOWN);
mainToolBar.add(getAddBuddyItem());
mainToolBar.add(getHelpAboutItem());
String l = mainToolBar.getLayout().toString();
}
return mainToolBar;
}
COM: <s> this method initializes main tool bar </s>
|
funcom_train/32069294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAccountingEntrys(Collection<AccountingEntry> accountingEntrys) {
boolean addOk = getAccountingEntrys().addAll(accountingEntrys);
if (addOk) {
for(AccountingEntry accountingEntry : accountingEntrys) {
accountingEntry.setAccounting((Accounting)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed accounting entrys collection to the accounting collection </s>
|
funcom_train/7618665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isLetterOrDigit(char ch) {
if (ch >= '0' && ch <= '9')
return true;
if (ch >= 'a' && ch <= 'z')
return true;
if (ch >= 'A' && ch <= 'Z')
return true;
return false;
}
COM: <s> if it is a letter or digit </s>
|
funcom_train/18245036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSequenceID() throws SeqdataException {
String name = ResourceUtil.getResource(DefaultNonUniqueUnitigPseudoread.class, "text.id",
new Integer(this.assembly.getDatastoreAssemblyID()).toString(),
new Integer(this.feature.getDatastoreID()).toString());
return name;
}
COM: <s> get the identifier for this sequence quite possibly not the </s>
|
funcom_train/46997013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MDate parse(String source) throws ParseException {
TimeZone timeZone = dateFormat.getTimeZone();
Date instant = dateFormat.parse(source);
if (MDate.isOutsideRange(timeZone, instant)) {
throw new ParseException("Date is outside CalendarDate range", 0);
}
return new MDate(timeZone, instant);
}
COM: <s> parses the given string to produce a calendar date </s>
|
funcom_train/23411007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLeftPathFormulaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PathDisjunction_leftPathFormula_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PathDisjunction_leftPathFormula_feature", "_UI_PathDisjunction_type"),
OMPackage.Literals.PATH_DISJUNCTION__LEFT_PATH_FORMULA,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the left path formula feature </s>
|
funcom_train/22277713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFromSuperview() {
if (_superview != null) {
//- RootView rView = rootView();
//- if (rView != null) {
//- rView.updateCursorLater();
//- }
//-
ancestorWillRemoveFromViewHierarchy(this);
_superview.removeSubview(this);
_superview = null;
//- if(rView != null)
//- rView.viewHierarchyChanged();
}
}
COM: <s> removes the view from the applications view hierarchy setting its </s>
|
funcom_train/50160609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertXML(String xml,ServletContext context) {
//return Dom4jUtils.localizeXml(xml.replaceFirst("<\\?xml.+version=.+encoding=.+\\?>", ""), "itemRecord");
return Dom4jUtils.localizeXml(xml, "itemRecord");
}
COM: <s> performs xml conversion from adn to adn localized </s>
|
funcom_train/37226324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream loadResourceFromZipfile(File file, String name) {
try {
ZipFile zipfile = new ZipFile(file);
ZipEntry entry = zipfile.getEntry(name);
if (entry != null) {
return zipfile.getInputStream(entry);
} else {
return null;
}
} catch(IOException e) {
return null;
}
}
COM: <s> loads resource from a zip file </s>
|
funcom_train/33238161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(getClass().getName());
sb.append("[");
sb.append(getName());
sb.append(",");
sb.append(getActions());
sb.append("]");
return sb.toString();
}
COM: <s> generates string representation of class information </s>
|
funcom_train/9184088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DracoTuple deepCopy() {
ByteArrayOutputStream bo = new ByteArrayOutputStream();
ObjectOutputStream oo;
try {
oo = new ObjectOutputStream(bo);
oo.writeObject(this);
ByteArrayInputStream bi = new ByteArrayInputStream(bo.toByteArray());
ObjectInputStream oi = new ObjectInputStream(bi);
oo.close();
oi.close();
return (DracoTuple)oi.readObject();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return null;
}
COM: <s> generate a deep copy through serialization </s>
|
funcom_train/19160565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createUserNew( ) {
addUserConfirmButton.setEnabled(true);
addUserCancelButton.setEnabled(true);
addUserNewButton.setEnabled(false);
usernameTextField.setEditable(true);
confirmPasswordTextField.setEditable(true);
this.userState = NEW_USER_STATE;
}
COM: <s> starts the process of creating a new user </s>
|
funcom_train/23233587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MidhedavaRPZone getZoneAt(int level, int wx, int wy, Entity entity) {
for (IRPZone izone : this) {
MidhedavaRPZone zone = (MidhedavaRPZone) izone;
if (zone.isInterior()) {
continue;
}
if(zone.getLevel() != level) {
continue;
}
if (zone.contains(entity.getArea(wx, wy))) {
logger.debug("Contained at :" + zone.getID());
return zone;
}
}
return null;
}
COM: <s> find the zone that would contain an entity at global coordinates </s>
|
funcom_train/20789659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(Locale locale) {
// only date fields are currently localizable
if (getCustomField().getFieldType() == Type.DATE) {
return getValue(ITrackerResources.getBundle(locale));
} else if (getCustomField().getFieldType() == Type.INTEGER) {
return String.valueOf(getIntValue());
}
return getStringValue();
}
COM: <s> gets the custom field value as a string </s>
|
funcom_train/16490197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void uninstallWindowListeners(JRootPane root) {
if (this.window != null) {
this.window.removeMouseListener(this.substanceMouseInputListener);
this.window
.removeMouseMotionListener(this.substanceMouseInputListener);
}
if (this.titlePane != null) {
this.titlePane
.removeMouseListener(this.substanceTitleMouseInputListener);
this.titlePane
.removeMouseMotionListener(this.substanceTitleMouseInputListener);
}
}
COM: <s> uninstalls the necessary listeners on the code window code the </s>
|
funcom_train/13913817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMultipleHeader(String headerName) throws NullPointerException {
boolean retVal = false;
Object theHeader = this.headers.get(headerName.toLowerCase().trim());
if (theHeader == null)
throw new NullPointerException("Attempting to check the multiplicity of an unexisting header: " + headerName);
else if (theHeader instanceof LinkedList)
retVal = true;
return retVal;
}
COM: <s> checks whether the specified header has multiple values </s>
|
funcom_train/20294227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItems(ArrayList array, String valueProperty, String displayProperty) {
Iterator i = array.iterator();
while (i.hasNext()) {
Object object = i.next();
addItem(ObjectUtils.getParam(object, valueProperty), ObjectUtils.getParam(object, displayProperty));
}
}
COM: <s> appends an array of objects as html select items using recursion to determine </s>
|
funcom_train/1961837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkExternal(GPerson user) {
try {
GInstitution institution = this.getInstitution(user
.getInstitution());
LDAPConnection con = this.ldaps.get(institution.getID());
String userDN = institution.getLookup().replaceFirst(
"\\$\\{USERID\\}", user.getUserid());
con.bind(3, userDN, user.getPasswordBytes());
} catch (Exception e) {
return false;
}
return true;
}
COM: <s> try ldap bind on external ldap directory </s>
|
funcom_train/320127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasMatchingDo() {
Assert.isTrue(fToken == Symbols.TokenWHILE);
nextToken();
switch (fToken) {
case Symbols.TokenRBRACE:
skipScope(); // and fall thru
case Symbols.TokenSEMICOLON:
skipToStatementStart(false, false);
return fToken == Symbols.TokenDO;
}
return false;
}
COM: <s> while condition is ambiguous when parsed backwardly as it is a valid </s>
|
funcom_train/9653829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActivityDesigner createDesigner(){
Class activityCls = getClass();
//String clsName = UEngineUtil.getComponentClassName(activityCls, "designer");
designer = null;
try{
//Class designerCls = Class.forName(clsName);
designer = (ActivityDesigner)UEngineUtil.getComponentByEscalation(activityCls, "designer");
designer.setActivity(this);
}catch(Exception e){
e.printStackTrace();
}
return designer;
}
COM: <s> request a swing component for design support for this activity type </s>
|
funcom_train/41164351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoQuestion entity) {
EntityManagerHelper.log("deleting CoQuestion instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoQuestion.class, entity.getQuestionId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co question entity </s>
|
funcom_train/31077153 | /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 creates image model."
});
bd.setValue("hidden-state", Boolean.TRUE);
bd.setValue("helpSetName", "net/jbeans/j3d/modeler/scene/resources/ImageModeler/jhelpset.hs");
return bd;
}
COM: <s> returns a bean descriptor for imagemodeler bean </s>
|
funcom_train/9104665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("Ayuda en linea", null, getJPanel1(), null);
jTabbedPane.addTab("Acerca de", null, getJPanel(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/2459511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWordAppropriateness(String lexicalItemId, float appropriateness, String userType) throws UMException {
DoubleKey key = new DoubleKey(userType, lexicalItemId);
boolean added = s.approprLexical.add(key, new Float(appropriateness)); //fails if key already exists
if ( ! added) s.approprLexical.updateVal(new Float(appropriateness), key);
}
COM: <s> set the appropriateness of a word for a user type </s>
|
funcom_train/36359290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|34-getter|0|34-preInit
// write pre-init user code here
backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|34-getter|1|34-postInit
// write post-init user code here
}//GEN-BEGIN:|34-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/24294556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrganizationViewInterface getOrganization(UserInfoInterface userInfo, String orgId) {
OrganizationViewInterface [] result = getOrganizations(userInfo, orgId);
if(result.length > 0) return result[0];
return new OrganizationView(new HashMap<String,String>());
}
COM: <s> get an organization </s>
|
funcom_train/24534831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTreeState() {
Object[] topLevel = treeRoot.getChildren();
if (topLevel != null)
for (int i = 0; i < topLevel.length; i++)
if (topLevel[i] instanceof CategoryModel)
styleTreeViewer.setExpandedState(topLevel[i], ((CategoryModel) topLevel[i]).getDefaultExpand());
}
COM: <s> sets the expanded collapased state of each node </s>
|
funcom_train/34237923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int levelDown(Character c, int downLevel) {
if (downLevel <= 0 || !isLevelDownEnabled(c.getLevel())) {
return 0;
}
int adjustUpLevel = (c.getLevel() - downLevel < 1 ? c.getLevel() - 1 : downLevel);
levelDownImp(c, adjustUpLevel);
return adjustUpLevel;
}
COM: <s> make a character level decreasing the given number </s>
|
funcom_train/40937764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processRollDiceRequest() {
if (myCurrentTableRef != null) {
myCurrentTableRef.get().processPlayerDiceRollRequest(this);
} else {
logger.log(Level.SEVERE, "Player " + getName() + " is attempting to roll the dice, but is not assigned a table!");
}
}
COM: <s> this method sends the request to the table to roll the dice </s>
|
funcom_train/8065620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLayer(Layer lay) {
_layers.remove(lay);
lay.removeEditor(_editor);
if (_activeLayer == lay) {
if (_layers.size() >= 1)
_activeLayer = (Layer) _layers.get(0);
else
_activeLayer = null;
}
}
COM: <s> remove a sublayer to this layer </s>
|
funcom_train/45700673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(int index) {
int backingListSize = this.backingList.size();
Object element = null;
if (index < backingListSize) {
element = this.backingList.get(index);
if (element == null) {
element = this.elementFactory.createElement(index);
this.backingList.set(index, element);
}
}
else {
for (int x = backingListSize; x < index; x++) {
this.backingList.add(null);
}
element = this.elementFactory.createElement(index);
this.backingList.add(element);
}
return element;
}
COM: <s> get the element at the supplied index creating it if there is </s>
|
funcom_train/45602255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readQuestRequirements(Quest quest, BufferedReader reader) throws ParseException, IOException {
String number = getLine(reader);
try {
int amt = Integer.parseInt(number);
List<String> questReqs = new LinkedList<String>();
while (amt-- > 0) {
String questName = getLine(reader);
questReqs.add(questName);
}
quest.setRequiredQuests(questReqs);
} catch (NumberFormatException e) {
throw new ParseException("Expected a number: " + number);
}
}
COM: <s> read the quest requirements of a quest </s>
|
funcom_train/2761009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GeneratedSql generateSql(Query query, Map args) throws SQLException {
Properties subst = new Properties();
subst.putAll(new Mapifier(_config, new MapifierCallbackProperties(subst)));
subst.put("ROOT_PROGRESS_OID", _jdbcFlowStore.getRootProgressOid());
subst.put("ROOT_FLOW_PROGRESS_OID", _jdbcFlowStore.getRootFlowProgressOid());
return generateSql(query, subst, args);
}
COM: <s> helper method that generates sql based on the </s>
|
funcom_train/4089323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(REAmodelVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/18105107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setKeepRMSAnswer(boolean keepRMS) {
// redisplay the progress form
display.setCurrent(progressForm);
// We need to prevent "flashing" on fast development platforms.
while (System.currentTimeMillis() - lastDisplayChange <
ALERT_TIMEOUT);
backgroundInstaller.continueInstall = keepRMS;
synchronized (backgroundInstaller) {
backgroundInstaller.notify();
}
}
COM: <s> tell the background installer to keep the rms data </s>
|
funcom_train/18886094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getRealSpaceCoordsForScreenPoint(Point2D screen_point) {
if (mScreenSpaceToRealSpace != null && screen_point != null) {
Point2D.Double transformedPoint = new Point2D.Double();
AffineTransform at2 = new AffineTransform(mScreenSpaceToRealSpace);
return at2.transform(screen_point, transformedPoint);
}
else return new Point2D.Double();
}
COM: <s> returns the realspace coordinates in meters of the point in </s>
|
funcom_train/10267920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelTask(YPersistenceManager pmgr, String taskID) {
YAtomicTask task = (YAtomicTask) getNetElement(taskID);
try {
task.cancel(pmgr);
_busyTasks.remove(task);
busyTaskNames.remove(task.getID());
}
catch (YPersistenceException ype) {
logger.fatal("Failure whilst cancelling task: " + taskID, ype);
}
}
COM: <s> cancels the specified task </s>
|
funcom_train/3391571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeMemberSummaryHeader(ClassDoc classDoc) {
printedSummaryHeader = true;
writer.println("<!-- =========== FIELD SUMMARY =========== -->");
writer.println();
writer.printSummaryHeader(this, classDoc);
}
COM: <s> write the fields summary header for the given class </s>
|
funcom_train/47192093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
int resp = loadChooser.showOpenDialog(this);
if (resp == JFileChooser.APPROVE_OPTION) {
lastSelected = loadChooser.getSelectedFile();
saveChooser.setCurrentDirectory(loadChooser.getCurrentDirectory());
try {
BufferedImage image = ImageIO.read(lastSelected);
imagePanel.setImage(image);
} catch (Exception e) {
e.printStackTrace();
JOptionPane.showMessageDialog(this, "Unable to load image "+lastSelected.getName()+" ");
}
}
}
COM: <s> load the current image </s>
|
funcom_train/47161110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinor(int minor)
{ if ( minor < 0 )
throw new IllegalArgumentException("minor is to be greater or equal to 0");
int oldValue = this.getMinor();
this.minor = minor;
this.support.firePropertyChange(PROPERTY_MINOR, oldValue, this.getMinor());
}
COM: <s> set the minor number of the version </s>
|
funcom_train/3391438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeMemberSummaryHeader(ClassDoc classDoc) {
writer.println("<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->");
writer.println();
writer.printSummaryHeader(this, classDoc);
}
COM: <s> write the annotation type member summary header for the given class </s>
|
funcom_train/47575991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPatternPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PatternedBPDComponent_pattern_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PatternedBPDComponent_pattern_feature", "_UI_PatternedBPDComponent_type"),
ArtifactsPackage.Literals.PATTERNED_BPD_COMPONENT__PATTERN,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the pattern feature </s>
|
funcom_train/48558370 | /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:|201-getter|0|201-preInit
okCommand1 = new Command("OK", Command.OK, 0);//GEN-LINE:|201-getter|1|201-postInit
}//GEN-BEGIN:|201-getter|2|
return okCommand1;
}
COM: <s> returns an initiliazed instance of ok command1 component </s>
|
funcom_train/34504897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void navigateBackward() {
if (backwardStack.size()==0) {
navigationCallback.navigateBackwardStateChanged(false);
return;
}
URL u=backwardStack.pop();
try {
forwardStack.push(helpEditor.getPage());
navigationCallback.navigateForwardStateChanged(true);
helpEditor.setPage(u);
if (backwardStack.size()==0) {
navigationCallback.navigateBackwardStateChanged(false);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> go one step backward </s>
|
funcom_train/35273741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTerrainEditToolAlternateActivated() {
if (terrainTool != null) {
Vector3f point = cameraController.getTerrainCollisionPoint();
if (point != null) {
terrainTool.actionSecondary(point, selectedTextureIndex, jmeRootNode, editorController.getCurrentDataObject());
}
}
}
COM: <s> alternate mouse button hit </s>
|
funcom_train/29771214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadData() {
System.out.println("readData");
Workbook w = null;
ExcelFile instance = new ExcelFile();
ArrayList<HashMap> expResult = null;
ArrayList<Properties> result = instance.readData(w);
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 read data method of class names </s>
|
funcom_train/22402530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("Copy", null, getJPanelCopy(), null);
jTabbedPane.addTab("MediaPlayer", null, getJPanelMediaPlayer(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/19177657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDiscSpace() {
logger.entering("de.axelwernicke.mypod.ipod.IPod", "getDiscSpace");
long spaceTotal = -1;
try {
spaceTotal = this.getDiscSpaceUsed() + this.getDiscSpaceFree();
} catch (Exception ex) {
logger.warning("Exception raised: " + ex.getMessage());
ex.printStackTrace();
}
logger.exiting("de.axelwernicke.mypod.ipod.IPod", "getDiscSpace");
return spaceTotal;
}
COM: <s> getter for property disc space </s>
|
funcom_train/50306116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportModuledata(String exportFile, String[] exportChannels, String[] exportModules, I_CmsReport report) throws CmsException {
m_rb.exportModuledata(m_context.currentUser(), m_context.currentProject(), exportFile, exportChannels, exportModules, this, report);
}
COM: <s> exports channels and moduledata to zip </s>
|
funcom_train/2677383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object newInstance(String className) {
log.info("Loading class: {}", className);
Object instance = null;
try {
Class<?> clazz = Thread.currentThread().getContextClassLoader()
.loadClass(className);
instance = clazz.newInstance();
} catch (Exception ex) {
log.error("Error loading class: {}", className, ex);
}
return instance;
}
COM: <s> creats a new instance of the class name parameter and </s>
|
funcom_train/24000501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOrderedSetType() {
OclType result = OclTypeRegistry.getOrderedSetType(OclTypeRegistry.OclBooleanType);
assertTrue(result.isCollectionType());
assertEquals(OclTypeRegistry.OclBooleanType,((OclCollectionBase)result).getCollectionType());
assertEquals("OrderedSet< Boolean >",result.getPathName());
}
COM: <s> test of get ordered set type method of class ocl type registry </s>
|
funcom_train/19081225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIdColor(int oldIdColor) {
if (activated) {
if (next != null) {
return ((ColorModifier) next).getIdColor(op.process(oldIdColor, idColor
.getValue(ability, to, null)));
}
return op.process(oldIdColor, idColor.getValue(ability, to, null));
}
if (next != null) {
return ((ColorModifier) next).getIdColor(oldIdColor);
}
return oldIdColor;
}
COM: <s> return the modified id color </s>
|
funcom_train/25204895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createIncSty() throws IOException {
BufferedWriter out =
new BufferedWriter(new FileWriter(getOutdir() + File.separator
+ encname + ".inc"));
for (String key : glyphmap.keySet()) {
out.write(glyphmap.get(key).toString());
out.newLine();
}
out.close();
}
COM: <s> create the include file for the package </s>
|
funcom_train/10010771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String clean(String segment) {
List<String> wordList = splitAlgorithm.split(segment);
StringBuilder resultSegment = new StringBuilder();
for (String word : wordList) {
if (resultSegment.length() > 0) {
resultSegment.append(" ");
}
if (vocabulary.containsWord(word)) {
resultSegment.append(word);
} else {
resultSegment.append(otherWord);
}
}
return resultSegment.toString();
}
COM: <s> cleans a segment </s>
|
funcom_train/18094564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeBTState(Graphics g, String state){
g.setColor(0,0,0);
g.drawString(state, this.getWidth()-20, this.getHeight()-20, Graphics.TOP | Graphics.RIGHT);
}
COM: <s> from the code key sender code interface </s>
|
funcom_train/38310870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String alternateRowStyle() {
String style = this.style;
if (style != null) {
return style;
}
boolean evenRow = isEvenRow();
if (evenRow) {
if (evenStyle != null) {
style = evenStyle;
}
} else {
if (oddStyle != null) {
style = oddStyle;
}
}
return style;
}
COM: <s> alternates the row style </s>
|
funcom_train/45864100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillMissingCells() {
for (int y = 0; y < peerRows; y++) {
for (int x = 0; x < peerCols; x++) {
if (x >= cols || y >= rows) {
peer.setCell(x, y, peer.getCell(x % cols, y % rows));
}
}
}
}
COM: <s> sets tile indices in the backing tiled layer to ensure a constant </s>
|
funcom_train/24216601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String pieceName, boolean isWhite) {
HashMap<String, Integer> h = getMap(isWhite);
int value = h.containsKey(pieceName)? h.get(pieceName).intValue() + 1 : 1;
h.put(pieceName, new Integer(value));
}
COM: <s> add a piece to this count list when it has been taken </s>
|
funcom_train/37444212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getInteger(final String key) {
CDebug.checkParameterNotEmpty(key, "key");
Integer resource = null;
final String stringResource = getString(key);
if (stringResource != null) {
try {
resource = Integer.valueOf(stringResource);
} catch (final NumberFormatException exception) {
LOGGER.warn(createNotAnIntegerMessage(key, stringResource));
}
}
return resource;
}
COM: <s> gets an integer resource from the list of resource bundles </s>
|
funcom_train/18257189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build() {
drawSelection = new DrawFeatureSelection(scape);
scape.getDrawFeaturesObservable().addObserver(drawSelection);
getScape().getDrawFeaturesObservable().addObserver(this);
updateDrawFeatures();
drawFeatureObservable.setChanged();
drawFeatureObservable.notifyObservers();
}
COM: <s> called to create and layout the components of the component view once </s>
|
funcom_train/4403453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public LightSensor addLightSensorRight(Agent agent) {
Vector3d front = new Vector3d(agent.getRadius() + 0.5, 0, 0);
Transform3D t3d = new Transform3D();
t3d.rotY(-Math.PI / 4);
Vector3d right = new Vector3d(front);
t3d.transform(right);
return RobotFactory.addLightSensor(agent, right, (float) -Math.PI / 4, "left");
}
COM: <s> adds a prebuild light sensor on the right of the agent </s>
|
funcom_train/2889271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVariable(Variable variable) throws CdlXmlParsingException {
String nameValue = variable.getNameValue();
if (lookupVariable(nameValue) != null) {
throw new CdlXmlParsingException(this,
ErrorMessages.ERROR_DUPLICATE_VALUE + nameValue);
}
variables.put(nameValue, variable);
}
COM: <s> add a variable </s>
|
funcom_train/30195042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(JxplElement atom, int multiplicity){
int[] a=(int[])atoms.get(atom);
if(a!=null){
if(a[0]-multiplicity>0)
a[0]-=multiplicity;
else{
atoms.remove(atom); //this step is in question...do we completely remove from the set once no more occurances exist?
}
return true;
}
else return false;
}
COM: <s> remove atom from list </s>
|
funcom_train/12527980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTimeToLive() throws IOException {
checkClosedAndBind(false);
if (impl == null) {
try {
return (int)(System.Int32)netSock.GetSocketOption(SocketOptionLevel.IP, SocketOptionName.IpTimeToLive);
} catch (Throwable t) {
throw new SocketException(t.getMessage());
}
} else
return impl.getTimeToLive();
}
COM: <s> gets the time to live ttl for multicast packets sent on this socket </s>
|
funcom_train/22279332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultConstraints(PackConstraints constraints) {
if(!constraints.equals(defaultConstraints())) {
int i, count;
count = viewVector.count();
for(i = 0; i < count; i++) {
/// This will automatically add the view to the hashtable with
/// the current default constraints.
constraintsFor((View)viewVector.elementAt(i));
}
}
defaultConstraints = constraints;
}
COM: <s> sets the default constraints </s>
|
funcom_train/14395054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void filterRASDsByResourceType(List rasds, UnsignedInteger16 resourceType) {
for (int i = rasds.size() - 1; i >= 0; i--) {
CIM_ResourceAllocationSettingData rasd = (CIM_ResourceAllocationSettingData) rasds.get(i);
if (rasd.get_ResourceType().intValue() != resourceType.intValue()) {
rasds.remove(i);
}
}
}
COM: <s> removes all the rasds from the list rasds that are having the wrong </s>
|
funcom_train/37711490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceFacade() {
String facade = "Facade";
jetf.setDisplayText(facade);
String expect = "real mccoy";
jetf.selectAll();
getHelper().sendString(new StringEventData(this,
jetf,
expect));
assertEquals("Input did not reach text field",
expect, jetf.getText());
assertEquals("Input did not reach buffer",
expect, jetf.getEnteredText());
}
COM: <s> user has entered data </s>
|
funcom_train/43895098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FeatureReader reader() throws IOException {
FeatureReader reader = featureSource.getDataStore().getFeatureReader(query, getTransaction());
int maxFeatures = query.getMaxFeatures();
if (maxFeatures != Integer.MAX_VALUE) {
reader = new MaxFeatureReader(reader, maxFeatures);
}
if (transform != null) {
reader = new ReprojectFeatureReader(reader, schema, transform);
}
return reader;
}
COM: <s> retrieve a feature reader for this query </s>
|
funcom_train/9872398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCountOfLines(File file) throws IOException {
int count = 0;
BufferedReader reader = new BufferedReader(new FileReader(file));
String currentLine;
while ((currentLine = reader.readLine()) != null) {
count++;
}
reader.close();
return count-TMEV.getHeaderRowCount();
}
COM: <s> returns number of lines in the specified file </s>
|
funcom_train/43852735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expression parseFilter() throws ParseException {
Expression e = parsePrimary();
consumeWS();
while(curr('[')) {
checkNodesReturned(e);
final Preds preds = new Preds();
preds.add(parsePred());
e = new Filter(e, preds);
}
return e;
}
COM: <s> parses a filter expr </s>
|
funcom_train/46759285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChargeAlgorithmModel getChargeAlgorithm(final long chargeAlgorithmId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return BillingData.getChargeAlgorithm(chargeAlgorithmId, chain, call);
}}; return (ChargeAlgorithmModel) call(method, call);
}
COM: <s> same transaction return the single charge algorithm model for the primary key </s>
|
funcom_train/584784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean deleteTableCommand( Setup setup, String tableName ) {
if( JComponents.confirm( setup, "Confirm table erase ( table " + tableName + " )" ) != JComponents.CONFIRM ) {
return false;
}
setup.getTableDefinitionManager().removeTable( tableName );
File toDelete = TableDefinitionFile.getTableFileName( setup, tableName );
if( toDelete.exists() ) {
toDelete.delete();
}
return true;
}
COM: <s> see also refer to depracate table command </s>
|
funcom_train/40655208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentDir(File currentDir) {
Object oldValue = this.currentDir;
Object newValue = currentDir;
this.currentDir = currentDir;
listDirectory(currentDir, currentFilter);
firePropertyChange(DIRECTORY_CHANGED_PROPERTY, oldValue, newValue);
// Scroll to the first row
table.scrollRectToVisible(table.getCellRect(0, 0, true));
}
COM: <s> set the current dir and update the view </s>
|
funcom_train/36186096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateRemoteDevice(String id) {
Device dev = getNotYetJoinedDevice(id);
if (dev == null) {
if (exists(id)) {
log.debug("Peer " + id + " has already been added to valid devices.");
}
else {
log.warn("Peer " + id + " not found");
}
return;
}
add(dev);
}
COM: <s> make the device visible by most methods i </s>
|
funcom_train/28252366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tryRandomValues(int tests) throws Exception {
float[] data = new float[tests];
for (int i = 0; i < tests; i++) {
float val = rnd.nextFloat();
val = val * val * val; // skew the data set so that most points fall at the begining of the [0-1] range.
data[i] = val;
}
verify(data,0f,1f,true);
}
COM: <s> test storing random values skewed so the histogram adaptability feature can be tested </s>
|
funcom_train/22497974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void colorChanged(final ColorPanel.ColorPanelEvent e) {
final ColorPanel source = (ColorPanel) e.getSource();
if (source.getAttributeKey() == CSS.Attribute.COLOR) {
sample.setForeground(source.getColor());
}
else if (source.getAttributeKey() == CSS.Attribute.BACKGROUND_COLOR) {
sample.setBackground(source.getColor());
}
}
COM: <s> handle color change events from one of our color panels </s>
|
funcom_train/32362544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyValidationResult(boolean valid) {
if (isHighlightInvalid()) {
control.setForeground(valid ? foreground : redcolor);
}
for (Iterator i = ValidationFactory.getDependencies(control).iterator(); i.hasNext();)
((JComponent) i.next()).setEnabled(valid);
}
COM: <s> called when after validation completed </s>
|
funcom_train/44820745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String string) {
checkWidget();
if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
int index = doControlIndexOf(string);
if (index == -1) {
doControlDeselectAll();
doSetText(string);
return;
}
doSetText(string, true);
doControlSetSelectionIndex(index);
doControlShowSelection();
}
COM: <s> sets the contents of the receivers text field to the </s>
|
funcom_train/18788215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MdrUmlAttribute findAttribute(MdrUmlClass context, String name) {
assert (context != null) && (name != null);
MdrUmlAttribute mAttribute = null;
for (MdrUmlAttribute candidate : context.getAttributes()) {
mAttribute = candidate;
if (name.equals(mAttribute.getName())) {
break;
}
mAttribute = null;
}
return mAttribute;
}
COM: <s> finds an attribute by name </s>
|
funcom_train/39024102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRetainAll() {
System.out.println("retainAll");
Collection<?> c = null;
FilteredCollection instance = null;
boolean expResult = false;
//boolean result = instance.retainAll(c);
//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 retain all method of class filtered collection </s>
|
funcom_train/7751208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
jSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
jSplitPane.setOneTouchExpandable(true);
jSplitPane.setResizeWeight(0.6D);
jSplitPane.setBottomComponent(getJScrollPane1());
jSplitPane.setTopComponent(getJPanel3());
}
return jSplitPane;
}
COM: <s> this method initializes j split pane </s>
|
funcom_train/23997845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Entity getTreeSelectionEntity() {
if ( jTreeEntities.getSelectionCount() == 0 )
return null;
DefaultMutableTreeNode treenode = ( DefaultMutableTreeNode )jTreeEntities.getLastSelectedPathComponent();
if ( treenode.getUserObject() instanceof Entity )
return ( Entity )treenode.getUserObject();
return null;
}
COM: <s> get currently selected entity in tree </s>
|
funcom_train/23269521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLinkRewritingHyperLinksToChannelDisabled(final Page.Request pageRequest) throws WWWeeePortal.Exception {
return getConfigProp(LINK_REWRITING_HYPER_LINKS_TO_CHANNEL_DISABLE_PROP, pageRequest, RSProperties.RESULT_BOOLEAN_CONVERTER, Boolean.FALSE, false, false).booleanValue();
}
COM: <s> is the rewriting of hyperlinks within proxied documents back to this channel </s>
|
funcom_train/33509925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getClearBtn() {
if (clearBtn == null) {
clearBtn = new JButton();
clearBtn.setBounds(new Rectangle(167, 70, 74, 20));
clearBtn.setText("Cancel");
clearBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);// TODO Auto-generated Event stub actionPerformed()
}
});
}
return clearBtn;
}
COM: <s> this method initializes clear btn </s>
|
funcom_train/4447884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getUserNameLetterMap() {
Map results = new HashMap();
try {
Weblogger roller = WebloggerFactory.getWeblogger();
UserManager umgr = roller.getUserManager();
results = umgr.getUserNameLetterMap();
} catch (Exception e) {
log.error("ERROR: fetching username letter map", e);
}
return results;
}
COM: <s> get map with 26 entries one for each letter a z and </s>
|
funcom_train/48391027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addNodeClickHandler(com.smartgwt.client.widgets.tree.events.NodeClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.tree.events.NodeClickEvent.getType()) == 0) setupNodeClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.tree.events.NodeClickEvent.getType());
}
COM: <s> add a node click handler </s>
|
funcom_train/43225955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AI getAI(int ID) {
if (ID == 0) return new AI_human(pg);
else if (ID == 1) return new AI_random(pg);
else if (ID == 2) return new AI_lhd(pg,0);
else if (ID == 4) return new AI_lhd(pg,1);
else if (ID == 3) return new AI_forgetting(pg);
else if (ID == 5) return new AI_normal(pg);
else if (ID == 6) return new AI_enhanced(pg);
else if (ID == 7) return new AI_snc(pg);
else return new AI_random(pg);
}
COM: <s> creates ai object from selection of combobox </s>
|
funcom_train/48104695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void imageGalleryRequest(Intent data) {
Log.d(LOG, "handling image gallery request: " + data);
if (data != null && data.getData() != null) {
Uri uri = data.getData();
Log.d(LOG, uri.toString());
setActiveImageUri(uri);
} else {
finish();
}
}
COM: <s> when a request comes in from the gallery this code should initiate the </s>
|
funcom_train/43629138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateStringValueRegistryColumnClasses() {
getStringValueRegistry().setColumnClasses(null);
for (int i = 0; i < getModel().getColumnCount(); i++) {
getStringValueRegistry().setColumnClass(getModel().getColumnClass(i), i);
}
}
COM: <s> updates per column class in string value registry </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.