__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/12170155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Styles getUnfoldedMarkerStyles(VolantisProtocol protocol, MCSAttributes attributes){
Styles styles = attributes.getStyles();
Styles unfoldedStyles = styles.findNestedStyles(StatefulPseudoClasses.MCS_UNFOLDED);
Styles markerStyles = null;
if(null != unfoldedStyles){
markerStyles = unfoldedStyles.findNestedStyles(PseudoElements.MARKER);
}
return markerStyles;
}
COM: <s> retrieve marker styles when folding item unfolded </s>
|
funcom_train/4920175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOverrideDefaultTeam() throws Exception {
// Override the default team
AutoWireTeam defaultTeam = this.source
.assignDefaultTeam(OnePersonTeamSource.class.getName());
defaultTeam.addProperty("name", "value");
// Record
this.registerOfficeTeam(DEFAULT_TEAM);
this.recordOffice();
this.recordTeam(OnePersonTeamSource.class, DEFAULT_TEAM, "name",
"value");
this.recordLinkTeamToOffice(DEFAULT_TEAM, DEFAULT_TEAM);
// Test
this.doSourceOfficeFloorTest();
}
COM: <s> ensure able to override the default </s>
|
funcom_train/13815888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VolumeBase getVolumeOfFile( File f ) throws IOException {
Iterator iter = volumes.iterator();
VolumeBase v = null;
while ( iter.hasNext() ) {
VolumeBase candidate = (VolumeBase) iter.next();
if ( candidate.isFileInVolume( f ) ) {
v = candidate;
break;
}
}
return v;
}
COM: <s> tries to find the volume into which a fiel belongs i </s>
|
funcom_train/34005925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSaleHead(SalesHeadBean salesHead) throws CommonException{
try {
this.getConfig().startTransaction();
this.getConfig().update("sales.udpSalesHeadById", salesHead);
this.getConfig().commitTransaction();
} catch (SQLException e) {
throw new CommonException(e);
} finally {
try {
this.getConfig().endTransaction();
} catch (SQLException e) {
e.printStackTrace();
throw new CommonException(e);
}
}
}
COM: <s> update a header record </s>
|
funcom_train/49994983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStyledSnipName(String snipName) {
String result = "";
if (snipName.contains("/") && snipName.length() > 23) {
result = snipName.substring(snipName.lastIndexOf("/") + 1, snipName.length());
} else {
result = snipName;
}
return result;
}
COM: <s> gets the styled snip name </s>
|
funcom_train/4540540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printProperties() {
Enumeration e;
String key;
String value;
// Avoid the waste of generating each description,
// only for trace() to silently discard it
if (isSilent()) {
return;
}
e = serverProperties.propertyNames();
while (e.hasMoreElements()) {
key = (String) e.nextElement();
value = serverProperties.getProperty(key);
printWithThread(key + "=" + value);
}
}
COM: <s> prints a description of the server properties iff is silent </s>
|
funcom_train/7844318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e){
if(e.getSource() == downloadResultsBtn){
int returnVal = fileChooser.showSaveDialog(openFilePanel);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
//This is where a real application would save the file.
JOptionPane.showMessageDialog(null, "Saving: " + file.getName() + "." + "\n");
writeFile(file);
}
}
}
COM: <s> method required for action listeners </s>
|
funcom_train/9562631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteAnnouncement(int aid) {
boolean ok = false;
try {
PreparedStatement stmt = getCon().prepareStatement("delete from announcment where aid=?");
stmt.setInt(1, aid);
int num = stmt.executeUpdate();
if (num == 1) {
ok = true;
}
stmt.close();
} catch (SQLException ex) {
ex.printStackTrace();
}
return ok;
}
COM: <s> deletes an announcement </s>
|
funcom_train/16524474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireMapChanged() {
Iterator iterator = mapChangeListeners.iterator();
MapChangedEvent event = null;
while (iterator.hasNext()) {
if (event == null) event = new MapChangedEvent(this);
((MapChangeListener) iterator.next()).mapChanged(event);
}
}
COM: <s> notifies all registered map change listeners about a change </s>
|
funcom_train/28113838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
socket = new Socket(server, port);
input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
output = new NetworkOutputStream(socket.getOutputStream());
inputListener = new InputListener();
inputListener.start();
login();
connected = true;
}
COM: <s> actually make the connection to the server and log in </s>
|
funcom_train/24448660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton_open() {
if (jButton_open == null) {
jButton_open = new JButton();
jButton_open.setBounds(new Rectangle(10, 5, 81, 29));
jButton_open.setActionCommand("打开");
jButton_open.setFont(new Font("\u5b8b\u4f53", Font.BOLD, 12));
jButton_open.setText("打开...");
jButton_open.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
openFile();
}
});
}
return jButton_open;
}
COM: <s> this method initializes j button open </s>
|
funcom_train/9119174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTo(Element element) throws InvalidDDMSException {
for (Attribute attribute : getAttributes()) {
if (element.getAttribute(attribute.getLocalName(), attribute.getNamespaceURI()) != null)
throw new InvalidDDMSException("The extensible attribute with the name, "
+ attribute.getQualifiedName() + " conflicts with a pre-existing attribute on the element.");
element.addAttribute(attribute);
}
}
COM: <s> convenience method to add these attributes onto an existing xom element </s>
|
funcom_train/18950474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyModificationsInOrder( SectionSet pSectionSet, PropertySet pPropertySet ) throws ModifierException {
int numModifiers = super.iObjects.size();
for( int modifierI = 0; modifierI < numModifiers; modifierI++ ) {
((Modifier) super.iObjects.elementAt( modifierI )).modify( pSectionSet, pPropertySet );
}
}
COM: <s> apply stored modifications in order to all sections in specified section set </s>
|
funcom_train/19645354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInitialize() throws RecordStoreNotOpenException, RecordStoreException {
if(getRecordCount() >= 3) {
for(int i=1; i<=3; i++){
if(rs.getRecord(i) == null)
return false;
}
return true;
}
else {
addRow(); // username
addRow(); // phone no
addRow(); // password
return false;
}
}
COM: <s> check if the record store is initialize </s>
|
funcom_train/39244132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreState(FacesContext context, Object state) {
Object[] values = (Object[]) state;
super.restoreState(context, values[0]);
this.completionMethod = (String) values[1];
this.onchoose = (String) values[2];
this.ondisplay = (String) values[3];
}
COM: <s> to restore the state of the textfield </s>
|
funcom_train/15408799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resendPacket(Packet packet) {
try {
++totalPacketsResent;
totalBytesResent += localSender.sendPacket(packet);
} catch (IOException e) {
String msg = "Error trying to resend packet "+packet.getPacketId();
logger.log(Level.SEVERE, msg, e);
}
}
COM: <s> re send a packet that a member didnt seem to receive </s>
|
funcom_train/9473186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date parse(String string) throws ParseException {
ParsePosition position = new ParsePosition(0);
Date date = parse(string, position);
if (position.getIndex() == 0) {
// text.19=Unparseable date: {0}
throw new ParseException(
Messages.getString("text.19", string), position.getErrorIndex()); //$NON-NLS-1$
}
return date;
}
COM: <s> parses a date from the specified string using the rules of this date </s>
|
funcom_train/39179740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logout(String repositoryID) throws GateOntologyException {
if(debug) print("logout");
// mapToRepositoryDetails.remove(repositoryID);
service.logout();
if(shutDownOnLogout) {
service.shutDown();
}
currentRepository = null;
sail = null;
// System.gc();
}
COM: <s> end the session by logging out </s>
|
funcom_train/37610587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() throws ConsoleException {
for (Property property : m_propertyList) {
property.setToProperties();
}
try {
m_properties.save();
}
catch (GrinderProperties.PersistenceException e) {
throw new DisplayMessageConsoleException(
m_resources, "couldNotSaveOptionsError.text", e);
}
}
COM: <s> save to the associated file </s>
|
funcom_train/2557485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean write(Type type, Object value, NodeMap<OutputNode> node, Map map) throws Exception {
boolean reference = strategy.write(type, value, node, map);
if(!reference) {
return write(type, value, node);
}
return reference;
}
COM: <s> this is used to serialize a representation of the object value </s>
|
funcom_train/20139400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ControlGroup addGroup(String theName, int theX, int theY, int theW) {
ControlGroup myController = new ControlGroup(controlP5, (ControllerGroup) controlP5.controlWindow.tabs().get(1), theName, theX, theY, theW, 9);
controlP5.register(myController);
return myController;
}
COM: <s> add a group to control p5 </s>
|
funcom_train/35976153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char[] buf, int start, int count) throws SAXParseException {
if (wrapper == null) {
try {
ProjectHelper.addText(helperImpl.project, task, buf, start, count);
} catch (BuildException exc) {
throw new SAXParseException(exc.getMessage(), helperImpl.locator, exc);
}
} else {
wrapper.addText(buf, start, count);
}
}
COM: <s> adds text to the task using the wrapper if one is </s>
|
funcom_train/9688582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
JScrollPane scrollpane = new JScrollPane(list);
scrollpane.setMaximumSize(scrollpaneSize);
scrollpane.setMinimumSize(scrollpaneSize);
scrollpane.setPreferredSize(scrollpaneSize);
scrollpane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
add(scrollpane, BorderLayout.CENTER);
add(createButtonsPanel(), BorderLayout.EAST) ;
}
COM: <s> must get called before using but not in constructor because contains calls </s>
|
funcom_train/48400527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy(GameElement element) {
if (element.getType() < 128)
{
layers.insert(createExplosion(element.getPos().X(), element.getPos().Y()),0);
num_of_bullets++;
MakeCrater(getTileX(element), getTileY(element));
}
layers.remove(element.getSprite());
SCREEN_CHANGED = true;
}
COM: <s> removes a game element from the dispaly </s>
|
funcom_train/6490897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColours(Settings colours) {
this.colours = colours;
setBackground(colours.getColour("background"));
// set new colours on buttons
Component[] components = getComponents();
for (int i=0; i<components.length; i++) {
if (components[i] instanceof PolarNode) {
PolarNode node = (PolarNode)components[i];
node.setColours(colours);
}
}
}
COM: <s> set the colours of this graph </s>
|
funcom_train/14011756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getComponentIndex(int column, int row) {
if (horizontalOrientation) {
Cell cell = getCellArray(row, false)[column];
return cell == null ? -1 : cell.index;
} else {
Cell cell = getCellArray(column, false)[row];
return cell == null ? -1 : cell.index;
}
}
COM: <s> returns the index of the code component code that should be rendered </s>
|
funcom_train/3168089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrimIntegerArray string(String string) throws UnsupportedEncodingException {
if (this == PrimSpec.int8()) {
return Int8Array.asciiString(string);
}
throw new UnsupportedOperationException();
/*
udanax-top.st:34561:PrimIntegerSpec methodsFor: 'making'!
{PrimIntegerArray} string: string {char star}
"Make an array the contents of the string"
self == (PrimSpec uInt8 basicCast: Heaper star) ifTrue: [^UInt8Array string: string].
self unimplemented.
^NULL "fodder"!
*/
}
COM: <s> make an array the contents of the string </s>
|
funcom_train/28761930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCsscalendarfont(String newVal) {
if ((newVal != null && this.csscalendarfont != null && (newVal.compareTo(this.csscalendarfont) == 0)) ||
(newVal == null && this.csscalendarfont == null && csscalendarfont_is_initialized)) {
return;
}
this.csscalendarfont = newVal;
csscalendarfont_is_modified = true;
csscalendarfont_is_initialized = true;
}
COM: <s> setter method for csscalendarfont </s>
|
funcom_train/802606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCvLabelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CvParamType_cvLabel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CvParamType_cvLabel_feature", "_UI_CvParamType_type"),
MzdataPackage.Literals.CV_PARAM_TYPE__CV_LABEL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the cv label feature </s>
|
funcom_train/30181284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean treeExists(String project, String type) {
boolean exists = false;
for (int i = 1; i < Fenix.projectManager.container.getWidgetCount(); i++) {
Tree tree = (Tree) ((HorizontalPanel) Fenix.projectManager.container.getWidget(i)).getWidget(0);
if (tree.getRootItem().getItem(0).getText().equals(project))
exists = true;
}
return exists;
}
COM: <s> check if the given project already exists into the project manager </s>
|
funcom_train/13745934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMaritalStatusCombo() {
maritalStatusCombo = new Combo(composite2, SWT.NONE);
maritalStatuses = new MaritalStatusList();
maritalStatusComboViewer = new ComboViewer(maritalStatusCombo);
maritalStatusComboViewer.setContentProvider(
new MaritalStatusComboContentProvider(maritalStatuses));
maritalStatusComboViewer.setInput(maritalStatuses);
maritalStatusComboViewer.setLabelProvider(new MaritalStatusComboLabelProvider());
}
COM: <s> this method initializes marital status combo </s>
|
funcom_train/47835158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createNullAnnotations() {
String source = null;
addAnnotation
(slaTemplateEDataType,
source,
new String[] {
});
addAnnotation
(slaTemplateEDataType,
source,
new String[] {
});
addAnnotation
(slaTemplateEDataType,
source,
new String[] {
});
addAnnotation
(slaTemplateEDataType,
source,
new String[] {
});
addAnnotation
(slaTemplateEDataType,
source,
new String[] {
});
}
COM: <s> initializes the annotations for b null b </s>
|
funcom_train/11074807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object functionSubstringBefore(EvalContext context) {
assertArgCount(2);
String s1 = InfoSetUtil.stringValue(getArg1().computeValue(context));
String s2 = InfoSetUtil.stringValue(getArg2().computeValue(context));
int index = s1.indexOf(s2);
if (index == -1) {
return "";
}
return s1.substring(0, index);
}
COM: <s> substring before implementation </s>
|
funcom_train/34340116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCodigo1() {
if (codigo1 == null) {//GEN-END:|33-getter|0|33-preInit
// write pre-init user code here
codigo1 = new TextField("COD1", null, 6, TextField.NUMERIC);//GEN-LINE:|33-getter|1|33-postInit
// write post-init user code here
}//GEN-BEGIN:|33-getter|2|
return codigo1;
}
COM: <s> returns an initiliazed instance of codigo1 component </s>
|
funcom_train/50182414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDamager(Damager d) {
double dist;
double damage;
int radius = d.getRadius();
double pow = d.getPower();
Point dCent = d.getCenter();
Point tCent;
for(int i = 0; i < activeTanks; i++) {
tCent = tanks[i].getCenter();
dist = dCent.distance(tCent);
damage = pow - pow / radius * (dist - 15);
if(damage >= 0)
tanks[i].setDamage(damage, d);
}
//parent.updateStatus();
}
COM: <s> special adding method for a damager type object to </s>
|
funcom_train/45697789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setId(final String id) {
// clean out attributes of name "iD", "ID", "Id", "id"
for (Attribute attribute : (List<Attribute>) getContent().getAttributes()) {
if (attribute.getName().equalsIgnoreCase(ID)) {
getContent().removeAttribute(attribute);
break;
}
}
getContent().getAttributes().add(new Attribute(ID, id));
}
COM: <s> set the id attribute of this element </s>
|
funcom_train/4470401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePlayer(StrategoPlayer player) {
logger.log(Level.INFO, "{0} leaves {1}",
new Object[] { player, this });
DataManager dataManager = AppContext.getDataManager();
dataManager.markForUpdate(this);
players.remove(player.getName());
}
COM: <s> removes a player from this room </s>
|
funcom_train/45622797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDocumentationFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_documentationFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_documentationFile_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_DocumentationFile(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the documentation file feature </s>
|
funcom_train/50312990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector readGivenTasks(int projectId, String ownerName, int taskType, String orderBy, String sort) throws CmsException {
return (m_rb.readGivenTasks(m_context.currentUser(), m_context.currentProject(), projectId, ownerName, taskType, orderBy, sort));
}
COM: <s> reads all given tasks from a user for a project </s>
|
funcom_train/22114605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean registerEventClass(Class eventClass) {
assertClassIsZevent(eventClass);
synchronized (_listenerLock) {
if (_listeners.containsKey(eventClass))
return false;
_listeners.put(eventClass, new ArrayList());
if (_log.isDebugEnabled()) {
_log.debug("Register ZEvent " + eventClass);
}
return true;
}
}
COM: <s> register an event class </s>
|
funcom_train/3389221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
vset = right.checkValue(env, ctx, vset, exp);
int tm = right.type.getTypeMask();
selectType(env, ctx, tm);
if (((tm & TM_ERROR) == 0) && type.isType(TC_ERROR)) {
env.error(where, "invalid.arg", opNames[op]);
}
return vset;
}
COM: <s> check a unary expression </s>
|
funcom_train/2585789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIterateDomainBounds() {
XYDataset dataset = createXYDataset1();
Range r = DatasetUtilities.iterateDomainBounds(dataset);
assertEquals(1.0, r.getLowerBound(), EPSILON);
assertEquals(3.0, r.getUpperBound(), EPSILON);
}
COM: <s> some tests for the iterate domain bounds method </s>
|
funcom_train/1376799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int revive(Color col) {
int index = -1;
for (int i = 0; i < list.size(); i++){
Player p = list.get(i);
if (p.getColor().equals(col)) {
System.out.println(p.getName() + " revived");
p.revive();
list.set(i, p);
index = i;
}
}
return index;
}
COM: <s> revive a player that was killed unmark as dead </s>
|
funcom_train/40544045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String separate(String str) {
String ret = str;
if (ret.indexOf('/') >= 0) {
ret = str.substring(str.lastIndexOf('/') + 1, str.length());
ret += "\\n" + str.substring(0, str.lastIndexOf('/'));
}
return ret;
}
COM: <s> splits the string at the last replacing it with a new line and </s>
|
funcom_train/40689532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
String s = createSample().toString();
assertTrue(s.equals("{foo=[3, -1, 2, 4, 1], bar=[1, 2, 3, 1]}")
|| s.equals("{bar=[1, 2, 3, 1], foo=[3, -1, 2, 4, 1]}"));
}
COM: <s> test calling to string on the multimap which does not have a </s>
|
funcom_train/23789011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void warning(String msg, Object classobject) {
openLogFile();
try {
outputStream.write(new Date().toString()+"\t"+classname+"\t[WARNING] "+msg+"\n");
} catch (IOException ex) {
System.out.println("Couldn't write into the logfile!");
}
closeLogFile();
}
COM: <s> writes the given warning message into the logfile </s>
|
funcom_train/25028706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node external_cos(Node startAt) throws Exception {
startAt.isGoodArgsCnt(1);
MathContext mc=context.get();
return ExternalTK.createAExtVObject(null, External_Decimal.class.getName(), new External_Decimal(BigDecimalMath.cos(number.get(),mc),mc));
}
COM: <s> retourne le cosinus du decimal courant </s>
|
funcom_train/44869097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMVectorFieldBean getSlopeField() {
if (slopeField == null) {
slopeField = new WCMVectorFieldBean();
slopeField.setStyle(WCMVectorFieldBean.LINES);
slopeField.setXFunction(new SimpleFunction(getParser().parse("1"),
new Variable[] { xVar, yVar }));
slopeField.setYFunction(getFInput());
if (presentation) {
slopeField.setLineWidth(3);
}
}
return slopeField;
}
COM: <s> this method initializes slope field </s>
|
funcom_train/10207940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Address getByNumber(final String number, final boolean fails) throws StoreException {
final byte[] res = findFirst(new AddressFilterByNumber(number));
if (res == null) {
if (fails) { throw new MessageHandlerException(MessageHandlerException.ERR_NOADDRESS); }
return null;
}
else {
return new Address(res);
}
}
COM: <s> gets the by number </s>
|
funcom_train/7468877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLegalXml(){
assertEquals("hello",OpenSearchServlet.getLegalXml("hello"));
assertEquals("hello",OpenSearchServlet.getLegalXml("he\u0000llo"));
assertEquals("hello",OpenSearchServlet.getLegalXml("\u0000he\u0000llo"));
assertEquals("hello",OpenSearchServlet.getLegalXml("\u0000he\u0000llo\u0000"));
}
COM: <s> test removing of illegal xml chars from string </s>
|
funcom_train/44011684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCustomer() throws Exception {
System.out.println("getCustomer");
TransactionBO instance = new TransactionBO();
CustomerBO expResult = null;
CustomerBO result = instance.getCustomer();
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 get customer method of class edu </s>
|
funcom_train/4879385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play() {
MP3File mp3File = playlistManager.getCurrentMP3File();
try {
File file = mp3File.getTheFile();
playerManager.playFile(file);
playerManager.addControllerListener(this);
} catch (MalformedURLException ex) {
// TODO not sympathic!
errorMessage(ex.getMessage());
} catch (NoPlayerException ex) {
// TODO not sympathic!
errorMessage(ex.getMessage());
} catch (IOException ex) {
// TODO not sympathic!
errorMessage(ex.getMessage());
}
playButton.setText("Pause");
stopButton.setEnabled(true);
playlistManager.repaintComponent();
}
COM: <s> starts playing the current audio file pointed by the playlist </s>
|
funcom_train/15608092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadXmlFile(String xmlFile) throws Exception {
// Build and apply the loader.
//
if(facadeManager instanceof XmlInSessionLoadFacadeManager){
XmlInSessionLoadFacadeManager inSessionFeatureMgr = (XmlInSessionLoadFacadeManager)facadeManager;
inSessionFeatureMgr.addSource(xmlFile);
} // Got right manager
} // End method: loadXmlFile
COM: <s> loads the xml file by producing a loader using that loader to </s>
|
funcom_train/44832534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeight(java.lang.Integer height) {
Integer result = (Integer) ComponentUtils.invokeMethod(getPage().getHandler(),
getMethod("onSetHeight"), new Object[] {height});
this.height = (result != null) ? result : height;
}
COM: <s> setter for property height </s>
|
funcom_train/11664096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document readCommandsDocument() throws XindiceException, FileNotFoundException {
// Absolute path to the commands.xml file, relative to $XINDICE_HOME
File xindiceHome = new File(System.getProperty(Xindice.PROP_XINDICE_HOME, "."));
File commandsFile = new File(xindiceHome, "config/commands.xml");
return DOMParser.toDocument(new FileInputStream(commandsFile));
}
COM: <s> reads commands document from config directory </s>
|
funcom_train/1104179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMinuzunlukPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Alan_minuzunluk_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Alan_minuzunluk_feature", "_UI_Alan_type"),
HarzemliPackage.eINSTANCE.getAlan_Minuzunluk(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_validasyonPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the minuzunluk feature </s>
|
funcom_train/17824927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void draw(Graphics g, int hh, int v,double scale) {
// if(imScale != scale) {
// if(scaledImage!=null) scaledImage.flush();
// scaledImage = bmp.getScaledImage(hoff,voff,scale);
// imScale = scale;
// }
// //if(scaledImage==null)System.out.println("no scaled image!");
// g.drawImage(scaledImage,
// hh-(int)(hoff*scale+1.),v-(int)(voff*scale+1.),null);
// }
COM: <s> draws a scaled version of the glyph </s>
|
funcom_train/48151307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustmentValueChanged(AdjustmentEvent event) {
for (int i = 0; i < 4; i++) {
prob[i] = getValueSetter(i).getValue();
}
forest.setProbabilities(prob[0], prob[1], prob[2], prob[3]);
reset();
}
COM: <s> this method handles the scrollbar events associated with changes in the </s>
|
funcom_train/47730718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSkillTotalBonus(ISkill skill) {
int bonus = getSkillRankBonus(skill);
bonus += getSkillcategoryTotalBonus(getSkillcategory(skill));
/* special bonus and magicalitems */
if (skillRanks.containsKey(skill.getId())) {
Rank rank = skillRanks.get(skill.getId());
if (rank.getSpecialBonus() != null) {
bonus += rank.getSpecialBonus().intValue();
}
}
return bonus;
}
COM: <s> returns the sum of rank bonus skillgroup total bonus special skill bonus </s>
|
funcom_train/21953957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachWindow() {
if (Pooka.getMainPanel().getContentPanel() instanceof MessagePanel) {
MessagePanel mp = (MessagePanel) Pooka.getMainPanel().getContentPanel();
ReadMessageInternalFrame rmif = new ReadMessageInternalFrame(mp, this);
getMessageProxy().setMessageUI(rmif);
rmif.openMessageUI();
this.dispose();
}
}
COM: <s> attaches the window to a message panel </s>
|
funcom_train/11657817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() {
// Release references to allocated collections
applicationScope = null;
header = null;
headerValues = null;
initParam = null;
param = null;
paramValues = null;
cookieValues = null;
requestScope = null;
sessionScope = null;
// Release references to Servlet API objects
context = null;
request = null;
response = null;
}
COM: <s> p release references to allocated resources acquired in </s>
|
funcom_train/10953304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFieldInjectorWithSecurityEnabled() throws Exception {
System.setSecurityManager(new SecurityManager());
FieldCheck fieldCheck = new FieldCheck();
try {
c.inject(fieldCheck);
assertEquals(fieldCheck.getName(), "Lukasz");
fail("Exception should be thrown!");
} catch (DependencyException expected) {
// that was expected
}
}
COM: <s> inject values into field under security manager </s>
|
funcom_train/44341762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncomeEdges(ArrayList vedges) {
this.incomeVEdges = vedges;
ArrayList edges = new ArrayList();
VisualEdge vedge;
for (Iterator i = vedges.iterator(); i.hasNext();) {
vedge = (VisualEdge) i.next();
edges.add(vedge.getEdge());
}
this.getNode().setIncomeEdges(edges);
}
COM: <s> set the income visual edges linked to the current visual node </s>
|
funcom_train/5711952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSerialNumber() throws Exception{
RCapi capi = new RCapi();
String serialNumber = capi.getSerialNumber();
assertNotNull("check existance of serial number");
assertTrue("check length of serial number not being 0", serialNumber.trim().length() != 0);
System.out.println("Serial Number: " + serialNumber);
}
COM: <s> tests the retrieval of the serial number of the device </s>
|
funcom_train/17592358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameClass(String oldName, String newName) {
LongVector v = items;
int size = numOfItems;
classes = new HashMap(classes.size() * 2);
for (int i = 1; i < size; ++i) {
ConstInfo ci = v.elementAt(i);
ci.renameClass(this, oldName, newName);
ci.makeHashtable(this);
}
}
COM: <s> replaces all occurrences of a class name </s>
|
funcom_train/51537365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lAddCommand(Command cmd, int i) {
super.lAddCommand(cmd, i);
// restore the value of the original appearanceMode
if ((imgItem.numCommands >= 1) && (appearanceMode == Item.PLAIN)) {
appearanceMode = imgItem.appearanceMode == Item.BUTTON ?
Item.BUTTON : Item.HYPERLINK;
drawsTraversalIndicator = true;
lRequestInvalidate(true, true);
}
}
COM: <s> notifies l f of a command addition in the corresponding image item </s>
|
funcom_train/50617542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object evaluate() throws EvaluationException {
Object object = getRoot();
for (Iterator i = getPath().getElements().iterator(); i.hasNext(); ) {
PathElement elm = (PathElement)i.next();
Handler eval = createHandler(elm.getEvaluatorId());
if (eval == null)
throw new EvaluationException("No handler with id: " + elm.getEvaluatorId());
object = eval.evaluate(object, elm);
}
return object;
}
COM: <s> evaluate the current path with respect to the root </s>
|
funcom_train/6293569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void post_init(ORBInitInfo info) {
try{
Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
(byte) 1, (byte) 0);
Codec codec = info.codec_factory().create_codec(encoding);
slot_id = info.allocate_slot_id();
info.add_server_request_interceptor
(new ServerContextTransferInterceptor(codec, slot_id));
}catch (Exception e){
org.jacorb.util.Debug.output(2, e);
}
}
COM: <s> registers the interceptor with a codec and a slot id </s>
|
funcom_train/45623186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBuildInParallelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MSBuildType_buildInParallel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MSBuildType_buildInParallel_feature", "_UI_MSBuildType_type"),
MSBPackage.eINSTANCE.getMSBuildType_BuildInParallel(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the build in parallel feature </s>
|
funcom_train/13714441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transitionCopied(MTransition original, MTransition copy) {
PathWitness witness = witnessMap.get(original);
copy.setStage(original.getStage());
if (original != null) {
witnessMap.put(copy, witness);
} else {
throw new IllegalArgumentException("transition must not be copied");
}
}
COM: <s> associates the copy to the </s>
|
funcom_train/25075292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStandardLabelStylePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RichReferenceFigure_standardLabelStyle_feature"),
getString("_UI_RichReferenceFigure_standardLabelStyle_description"),
GraphdescPackage.Literals.RICH_REFERENCE_FIGURE__STANDARD_LABEL_STYLE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_AppearancePropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the standard label style feature </s>
|
funcom_train/29405002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BflowSymbol_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BflowSymbol_id_feature", "_UI_BflowSymbol_type"),
BflowPackage.Literals.BFLOW_SYMBOL__ID,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/9792214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closedown() throws Exception{
//This needs to be done methodically. References are not destroyed properly.
SwingUtilities.invokeLater(new Runnable(){
public void run(){
if(jcf!=null){
jcf.setVisible(false);
jcf.dispose();
}
jcps.setVisible(false);
jcps.dispose();
}
});
}
COM: <s> closes down the resources associated with the conversation </s>
|
funcom_train/51590718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void display(ColdType instance)
// {
// /* search for the instance in the mapping */
// Editor editor = (Editor)this.entitiesMapping.get(instance);
//
// /* else show the right editor */
// this.display(editor);
//
// /* if the editor does not exist for the moment, we have to create it and to display it on the tab pane */
// if (editor == null) this.add(instance);
// }
COM: <s> try to display the corresponding editor of instance and </s>
|
funcom_train/1904663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Version anotherVersion) {
for (int i = 0; i < allowedVersionLevels; i++) {
if (this.getSubversion(i) < ((Version)anotherVersion).getSubversion(i)) {
return -1;
} else if (this.getSubversion(i) > ((Version)anotherVersion).getSubversion(i)) {
return 1;
}
}
return 0;
}
COM: <s> compare this version object to another </s>
|
funcom_train/42472644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getName() {
ArrayList person = new ArrayList();
person = pl.getPersonList();
for (int i = 0; i < person.size(); i++) {
p = (Person)person.get(i);
this.pName.add(p.getName());
}
//Sort names alpabeticaly.
Collections.sort(pName);
}
COM: <s> this creats an array holding nothing but the name </s>
|
funcom_train/16178433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModelParameter(SimModel model) throws RepastException {
for (int i = 0, n = childConsts.size(); i < n; i++) {
RPLParameter parameter = (RPLParameter) childConsts.get(i);
parameter.setModelParameter(model);
}
RPLParameter parameter = (RPLParameter) childParams.get(curIndex);
parameter.setModelParameter(model);
}
COM: <s> sets the model parameter to the current values of the child rplparameter </s>
|
funcom_train/27758534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrevEntryText(int pid) {
if (prevEntry == null) {
if (id == pid) {
nextEntry.prevEntry = null;
return entryText;
} else {
return ""; //No previous IMtext object
}
} else
if (id == pid) {
/* Relink the previous relation to get the last
* message from either the receiver or transmitter
*/
nextEntry.prevEntry = this.prevEntry;
prevEntry.nextEntry = this.nextEntry;
return entryText;
} else
return prevEntry.getPrevEntryText(pid);
}
COM: <s> when erasing the last character the imtext objects need </s>
|
funcom_train/51698953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseSubElement(String uri, String localName, XMLEventParser parser) throws XMLParseException {
try {
XMLSerializable sub = parser.getFactory().createObject(uri, localName, parser);
parser.delegateParsingTo(sub);
addSubElement(sub);
} catch (Exception e) {
parser.throwParseException("Unable to parse sub-element <" + localName + ">", e);
}
}
COM: <s> parse a sub element defined in the parser factory </s>
|
funcom_train/44161699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDriver(String name) {
Collection col = null;
try {
col = prepareCollection("datasources");
XMLResource document = (XMLResource)col.getResource("datasources");
Document doc = makeDocument(document);
this.queryMethods.addDriver(doc, name);
document.setContentAsDOM(doc);
col.storeResource(document);
if (col != null) {
col.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> add driver adds driver </s>
|
funcom_train/50154302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTypeValue() {
String typeValue = "";
String type = typeBox.getSelectedItem().toString();
if ("type".equals(type)) {
typeValue = typeCombo.getSelectedItem().toString();
}
else {
typeValue = forwardIncludeField.getText();
}
return typeValue;
}
COM: <s> method get type value </s>
|
funcom_train/3436835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Name getURLSuffix(String prefix, String url) throws NamingException {
String suffix = url.substring(prefix.length());
if (suffix.length() == 0) {
return new CompositeName();
}
if (suffix.charAt(0) == '/') {
suffix = suffix.substring(1); // skip leading slash
}
try {
return new CompositeName().add(UrlUtil.decode(suffix));
} catch (MalformedURLException e) {
throw new InvalidNameException(e.getMessage());
}
}
COM: <s> returns the suffix of the url </s>
|
funcom_train/32744614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void beforeObject() {
parent = MakumbaDataContext.getDataContext().getCurrentCreateObject();
MakumbaDataContext.getDataContext().setCurrentCreateObject(this);
initQueryAnalysis();
if (FacesContext.getCurrentInstance().getCurrentPhaseId() == PhaseId.UPDATE_MODEL_VALUES) {
initObjectInputValue();
}
}
COM: <s> sets the currently running </s>
|
funcom_train/4845003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayParametersSearchData() {
ArrayList<Integer> XVals = (ArrayList<Integer>)this.parameterSet.getXValues();
ArrayList<Double> YVals = (ArrayList<Double>)this.parameterSet.getYValues();
this.UI.setNewChart(XVals,YVals);
}
COM: <s> display the parameter sets default functions </s>
|
funcom_train/45254078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createClientComposite() {
final Composite parent = window.getPageComposite();
StartupThreading.runWithoutExceptions(new StartupRunnable() {
public void runWithException() {
composite = new Composite(parent, SWT.NONE);
composite.setVisible(false); // Make visible on activate.
// force the client composite to be layed out
parent.layout();
}
});
}
COM: <s> creates the client composite </s>
|
funcom_train/50961595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeFromReader(Reader r) {
try {
BufferedReader theReader = new BufferedReader(r);
String thisWord = theReader.readLine();
while(thisWord != null) {
wordSet.add(thisWord);
thisWord = theReader.readLine();
}
}
catch(IOException e) {
Debug.reportError("Error reading stoplist " + e);
}
}
COM: <s> adds words to the stoplist from a reader </s>
|
funcom_train/16750668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coordinate transform(Coordinate coordinate) {
Coordinate result = new Coordinate();
double worldsize = 1.0;
switch(type){
case MERCATOR_TO_WGS_84:
result.x = EarthMath.tile2lon(coordinate.x, worldsize);
result.y = EarthMath.tile2lat(coordinate.y, worldsize);
break;
case WGS84_TO_MERCATOR:
result.x = EarthMath.lon2tile(coordinate.x, worldsize);
result.y = EarthMath.lat2tile(coordinate.y, worldsize);
break;
}
return result;
}
COM: <s> convert a single coordinate </s>
|
funcom_train/20773760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDisparityLimit(int id) {
int ret = -size;
if(id == -1){
ret = globalDisparity.getDisparityLimit();
} else if(id >= 0){
if(clusterDisparity.get(id) != null)
ret = clusterDisparity.get(id).getDisparityLimit();
} else {
}
return ret;
}
COM: <s> returns disparity limit </s>
|
funcom_train/171593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookupDouble(double n) {
long bits = Double.doubleToLongBits(n);
for(int i=1; i < index; i++) {
if(constants[i] instanceof ConstantDouble) {
ConstantDouble c = (ConstantDouble)constants[i];
if(Double.doubleToLongBits(c.getBytes()) == bits)
return i;
}
}
return -1;
}
COM: <s> look for constant double in constant pool </s>
|
funcom_train/15491520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveAsText(String path) {
try {
Calibration cal = imp.getCalibration();
int precision = Analyzer.getPrecision();
TextEncoder file = new TextEncoder(imp.getProcessor(), cal, precision);
DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(path)));
file.write(out);
out.close();
}
catch (IOException e) {
showErrorMessage(e);
return false;
}
return true;
}
COM: <s> save the image as tab delimited text using the specified path </s>
|
funcom_train/4912325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTermTrieDictionary(Object[] terms, String termType) {
TrieDictionary<String> dict = new TrieDictionary<String>();
this.terms.put(termType, dict);
for (int i = 0; i < ((String[]) terms[0]).length; i++)
for (String term : ((String[][]) terms[1])[i])
dict.addEntry(new DictionaryEntry<String>(term,
((String[]) terms[0])[i]));
}
COM: <s> creates a new </s>
|
funcom_train/927355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAvt() {
if (!(getPath()[0] instanceof ConfigurationNode)) {
return 0;
}
ArrayList list = new ArrayList();
PTNodeUtil.getComponentsByName(getName(), getRootNode(), list);
double sum = 0;
Iterator iter = list.iterator();
while(iter.hasNext()) {
ComponentNode c = (ComponentNode)iter.next();
sum+=c.getAv();
}
return NumberUtil.roundUp(sum);
}
COM: <s> get total family annual volume </s>
|
funcom_train/596833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitInnerClass(final String aname, final String outerName, final String innerName, final int attr_access) {
if ((name != null) && name.equals(aname)) {
this.access = attr_access;
}
super.visitInnerClass(aname, outerName, innerName, attr_access);
}
COM: <s> handle a bizarre special case </s>
|
funcom_train/37000250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AppThreadPool createThreadPool(String name) {
AppThreadPool pool = null;
int maxSize = 20;
try { maxSize = Integer.parseInt(Util.THREAD_POOL_MAX_SIZE); } catch (Throwable t) {/*ignore*/}
if(maxSize>0) pool = new AppThreadPool(name, maxSize);
return pool;
}
COM: <s> same as util </s>
|
funcom_train/40539667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void signalToken(final ProcessInstance processInstance, final String tokenName) {
execute(new BpmCallback() {
public Object doInBpm(JbpmContext context) {
Token token = processInstance.getRootToken().findToken(tokenName);
if (token == null) {
processInstance.signal();
} else {
token.signal();
}
return null;
}
});
}
COM: <s> signals a specific token in a process instance </s>
|
funcom_train/28929222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean outputChanged() {
// Update buffer size if needed
if (lastOuts.length < size()) {
double[] newBuf = new double[size()];
for (int i = 0; i < lastOuts.length; i++)
newBuf[i] = lastOuts[i];
lastOuts = newBuf;
}
boolean changed = false;
int i = 0;
for (Unit u : units) {
if (lastOuts[i] < Param.significant_input &&
u.out >= Param.significant_input)
changed = true;
lastOuts[i] = u.out;
i++;
}
return changed;
}
COM: <s> tests if the activity in this layer has changed in order to determine </s>
|
funcom_train/3923772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addObserver( Observer o ) {
super.addObserver(o);
if ( o instanceof VRObject && o instanceof HasTransform ) {
observers.add( ((VRObject) o).getClassName()+((VRObject) o).getId() );
((HasTransform)o).transform().addObserver(this);
notifyOwners( o );
}
active=true;
}
COM: <s> adds observer o to the observer list and calls start o </s>
|
funcom_train/39171409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() {
// First call cleanup in the parent, in case any clean up needs to be done
// there.
super.cleanup();
// So long as an ML Engine (wrapper) is associated with the processing
// resource, call its cleanup method.
if (engine!=null) {
engine.cleanUp();
}
}
COM: <s> this will make sure that any resources allocated by an ml wrapper get </s>
|
funcom_train/41152006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringNode() {
String result;
result = super.toStringNode();
result += "Dist.-Test..: " + Utils.arrayToString(getTestDistribution()) + "\n";
result += "Props.-Test.: " + Utils.arrayToString(getTestProportions()) + "\n";
return result;
}
COM: <s> returns detailed information about the node </s>
|
funcom_train/1917694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOrReplace(ContentDescriptor descriptor) {
assert descriptor != null : "Argument must not be null";
if (getDescriptor(descriptor.getName()) != null) {
/*
* Just remove if exists. Will prevent the indexmap being rebuild.
*/
remove(descriptor.getName());
}
addDescriptor(descriptor);
}
COM: <s> this method adds or replaces an existing content descriptor </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.