__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/19071062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Layer findOutputLayer(Synapse aSynapse) {
Layer myLayer;
for(int i = 0; i < net.getLayers().size(); i++) {
myLayer = (Layer)net.getLayers().get(i);
if(myLayer.getAllInputs().contains(aSynapse)) {
return myLayer;
}
}
return null;
}
COM: <s> finds the output layer of a synapse </s>
|
funcom_train/10482446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream getContentStream() throws MessagingException {
// no content loaded yet?
if (content == null) {
// make sure we're still valid
checkValidity();
// make sure the content is fully loaded
loadContent();
}
// allow the super class to handle creating it from the loaded content.
return super.getContentStream();
}
COM: <s> return an input stream instance for accessing the </s>
|
funcom_train/2581969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod previous() {
Month result;
if (this.month != MonthConstants.JANUARY) {
result = new Month(this.month - 1, this.year);
}
else {
if (this.year > 1900) {
result = new Month(MonthConstants.DECEMBER, this.year - 1);
}
else {
result = null;
}
}
return result;
}
COM: <s> returns the month preceding this one </s>
|
funcom_train/31662559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTransmission() {
Unit yunit = yData.getUnit();
if (yunit.equals(CommonUnit.percentTransmittance) || yunit.equals(CommonUnit.transmittance))
return true;
if (yunit.equals(CommonUnit.percentAbsorbance) || yunit.equals(CommonUnit.absorbance))
return false;
return isTransmission(yData);
}
COM: <s> heuristical check for transmission spectrum </s>
|
funcom_train/48528511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Observable o, Object arg) {
// if the proximity is initialized for the time, insert the handle
if (((Integer) arg) == NodeHandle.PROXIMITY_CHANGED) {
put((NodeHandle) o);
} else if (((Integer) arg) == NodeHandle.DECLARED_DEAD) {
// changed to remove dead handles - AM
remove((NodeHandle) o);
}
}
COM: <s> is called by the observer pattern whenever the liveness or proximity of a </s>
|
funcom_train/3083877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void synchroniseWithTarget() {
Component target = getTarget();
if (target != null) {
String oldValue = super.getText();
String newValue = (String) ReflectionKit.invokeIfPresent("getText", new Class[0], String.class, target, new Object[0]);
if (newValue != null && (!newValue.equals(oldValue))) {
setText(newValue);
}
}
}
COM: <s> this method is called internally to synchronise the value of the </s>
|
funcom_train/15609206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FeatureFacade getFeatureFacade() {
FacadeManagerBase theFacadeManger = this.getLoaderManager();
FeatureFacade theFeatureFacade = null;
// theFacadeManager.
try {
theFeatureFacade = (FeatureFacade) theFacadeManger.getFacade(
getEntityType());
} catch (Exception ex) {
// Don't really want to do anything.
}
return theFeatureFacade;
}
COM: <s> get the feature facade for this feature </s>
|
funcom_train/13993394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBorder(JTable table, boolean hasFocus) {
Border border = BorderFactory.createEmptyBorder(1, 1, 1, 1);
if (hasFocus) {
border = BorderFactory.createLineBorder(table
.getSelectionBackground(), 1);
}
setBorder(border);
}
COM: <s> sets the boder of the cells </s>
|
funcom_train/22432550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuItemPluginMonitor() {
if (menuItemPluginMonitor == null) {
menuItemPluginMonitor = new JMenuItem();
menuItemPluginMonitor.setText(MessageText.getString(
"master.gui.SessionCustomer.MenuItem.PluginMonitor"));
menuItemPluginMonitor.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
mSessionCust.loadPluginMonitor();
}
});
}
return menuItemPluginMonitor;
}
COM: <s> diese methode initialisiert das menu item monitor </s>
|
funcom_train/11344856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Boolean value) {
synchronized (ProvidedService.this) {
if (value.booleanValue() != m_value) {
// If there is a change to the ServiceController value then
// we will
// need to modify the registrations.
m_value = value.booleanValue();
unregisterService();
if (getServiceSpecificationsToRegister().length != 0) {
registerService();
}
}
}
}
COM: <s> sets the value </s>
|
funcom_train/32191277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
try {
mainDirectory = FSDirectory.getDirectory(MAIN_INDEX_FILE);
searchWordsDirectory = FSDirectory.getDirectory(SEARCH_WORDS_INDEX_FILE);
} catch (CorruptIndexException e) {
logger.error("[CR-ERROR] " + e.getLocalizedMessage());
} catch (IOException e) {
logger.error("[IO-ERROR] " + e.getLocalizedMessage());
}
dateFormat = new SimpleDateFormat("dd/MM/yyyy");
// This is to being able to reconverts from string to date
dateFormat.setLenient(true);
formatter = new SimpleHTMLFormatter();
}
COM: <s> initialize the main static objects </s>
|
funcom_train/18807606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object object) {
if (object != null) {
if (object instanceof Day) {
final Day d = (Day) object;
return (this.serialDate.equals(d.getSerialDate()));
}
else {
return (this.serialDate.equals(object));
}
}
else {
return false;
}
}
COM: <s> tests the equality of this day object to an arbitrary object </s>
|
funcom_train/34460213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getClosenessCentrality(Node n) {
if(closenessCentrality == null)
{
closenessCentrality = new double[numNodes];
Arrays.fill(closenessCentrality,Double.NaN);
}
int idx = n.getIndex();
if(Double.isNaN(closenessCentrality[idx]))
closenessCentrality[idx] =computeClosenessCentrality(idx);
return closenessCentrality[idx];
}
COM: <s> get closeness centrality for node n </s>
|
funcom_train/37751351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add_replacement_graphic(GraphicAttribute graphic) {
// Build a new chunk
Map<AttributedCharacterIterator.Attribute, Object> map
= new HashMap<AttributedCharacterIterator.Attribute, Object>(1);
map.put(TextAttribute.CHAR_REPLACEMENT, graphic);
Chunk<AttributedCharacterIterator.Attribute, Object> chunk
= new Chunk<AttributedCharacterIterator.Attribute, Object>
(REPLACEMENT_CHAR_STR, map);
}
COM: <s> adds an embedded graphic object to the </s>
|
funcom_train/12662873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties getProperties() {
// get it from the corresponding module
if (depot.getModuleLookup().existsCmdModule(getName())) {
return depot.getModuleLookup().getCmdModule(getName()).getTypeProperties();
} else {
return new Properties();
}
}
COM: <s> returns the type </s>
|
funcom_train/15487676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenuRegEx() {
if (jMenuRegEx == null) {
jMenuRegEx = new JMenu();
jMenuRegEx.setText(Application.messages.getString("MENU_REGEX"));
jMenuRegEx.add(getJUndo());
jMenuRegEx.add(getJRedo());
jMenuRegEx.addSeparator();
jMenuRegEx.add(getJApplyRegEx());
}
return jMenuRegEx;
}
COM: <s> this method initializes j menu reg ex </s>
|
funcom_train/3078865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel(IRequestCycle cycle) {
getBasicTab().ensureCurrentTab();
setSaveOrCancelTriggered(true);
if (getProjectPage().getProject().getId() == 0){ // creating new project
Home home = (Home)cycle.getPage("Home");
home.activateExternalPage(null, cycle);
cycle.activate(home);
} else{
getBasicTab().setAction(null);
}
}
COM: <s> cancels the editing action </s>
|
funcom_train/1222712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeInt(int v) throws IOException {
out.write((v >>> 24) & 0xff);
out.write((v >>> 16) & 0xff);
out.write((v >>> 8) & 0xff);
out.write((v >>> 0) & 0xff);
incCount(4);
}
COM: <s> writes an code int code to the underlying output stream as four </s>
|
funcom_train/48110415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean setOutTop(Object arg) {
if (!(arg instanceof Local))
return false;
Local local = (Local) arg;
if (!ourType(local))
return false;
out.forEachAllocationSite(
allocationSiteHandler.getUseAllocationSites(node, local),
new ASInfoVisitor() {
@Override
public void visit(AllocationSiteSet allocSite,
ASInfo asInfo) {
asInfo.setTop();
}
});
return true;
}
COM: <s> check whether the argument is of our class and if so set its </s>
|
funcom_train/14660969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ResultField getParseField() {
if (parseField == null) {
parseField = new ResultField();
parseField.setBorder(BorderFactory.createTitledBorder(null,
getTitleParse(), TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog",
Font.BOLD, 12), new Color(51, 51, 51)));
}
return parseField;
}
COM: <s> this method initializes shock parse field </s>
|
funcom_train/39998481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeContents(Object window, Object contents) {
// TODO Auto-generated method stub
try {
((JEditorPane) window).write(new FileWriter(new File(contents.
toString())));
} catch (Exception ex) {
System.out.println("Error writing to file: " + contents.toString());
}
}
COM: <s> writes the contents of the window to the contents </s>
|
funcom_train/17936065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAccuracy(Integer c,Integer run) {
return (getTruePositives(c,run)+getTrueNegatives(c,run))/(double)(getTruePositives(c,run)+getTrueNegatives(c,run)+getFalsePositives(c,run)+getFalseNegatives(c,run));
}
COM: <s> tp tn tp tn fp fn </s>
|
funcom_train/20874433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countFreeTimeOverlaps(TimeLocation time) {
int ret = 0;
for (Request r: iRequests) {
if (r instanceof FreeTimeRequest) {
TimeLocation freeTime = ((FreeTimeRequest)r).getTime();
if (time.hasIntersection(freeTime))
ret += freeTime.nrSharedHours(time) * freeTime.nrSharedDays(time);
}
}
return ret;
}
COM: <s> count number of free time slots overlapping with the given time </s>
|
funcom_train/50812231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveClientInfo (ClientInfo c) {
final Properties p = c.convertToProperties();
final File file = new File (dataDir, c.getUID()+".dat");
try {
p.store (new FileOutputStream(file, false), "ClientInfo Data");
} catch (IOException e) {
errorMessage("Problems when saving user data file: " + file);
e.printStackTrace();
}
}
COM: <s> saves a specified client info data to a file in user data directory </s>
|
funcom_train/7533739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node search(Session session, Row row) throws HsqlException {
Object[] d = row.getData();
Node x = getRoot(session);
while (x != null) {
int c = compareRowForInsert(session, row, x.getRow());
if (c == 0) {
return x;
} else if (c < 0) {
x = x.getLeft();
} else {
x = x.getRight();
}
}
return null;
}
COM: <s> find a node with matching data </s>
|
funcom_train/47594884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Channel getChannel(String name) {
if (name == null)
throw new NullPointerException("Can't get a null channel");
Channel chan = null;
for (Channel curChan : _userChanInfo.getBValues())
if (curChan.getName().equals(name))
chan = curChan;
if (chan == null)
//User does not exist, create one
_userChanInfo.putB(chan = new Channel(this, name));
return chan;
}
COM: <s> gets a channel or creates a u new u one </s>
|
funcom_train/16181266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMonthlyCosts() {
int laundryCosts = laundry.getMonthlyCosts();
int kitchenCosts = kitchen.getMonthlyCosts();
int reeferCosts = reefer.getMonthlyCosts();
int facilityCosts = facilities.getMonthlyCosts();
int diningCosts = dininghall.getMonthlyCosts();
int sumCosts = laundryCosts + kitchenCosts + reeferCosts + facilityCosts + diningCosts;
int costs = sumCosts + getFixedCosts();
return costs;
}
COM: <s> calculates the sum of all costs for this restaurant </s>
|
funcom_train/49406681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toBase(final String word){
int lastIndex = -1;
String lastSeq = null;
for (int i = 0; i < UMLAUT_SEQ.length; i++) {
String umlaut = UMLAUT_SEQ[i];
int index = word.lastIndexOf(umlaut);
if (lastIndex == -1 || index >= ( lastIndex + lastSeq.length() - umlaut.length())){
lastIndex = index;
lastSeq = umlaut;
}
}
if (lastIndex == -1){
return word;
}
return replaceFromUmlaut(word, lastSeq, lastIndex);
}
COM: <s> converts the umlaut flected form to the base </s>
|
funcom_train/27835174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void save() throws IOException {
FileOutputStream ostream = new FileOutputStream(_fileName);
ObjectOutputStream objectStream = new ObjectOutputStream(ostream);
objectStream.writeObject(_connection);
objectStream.writeObject(_resources);
objectStream.writeObject(_resourceNames);
objectStream.flush();
ostream.close();
}
COM: <s> save the project to the project file </s>
|
funcom_train/9743128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidTable() {
boolean result = true;
PreparedStatement stmt = null;
try
{
stmt = Common.hostList.getHost(getHostID()).getConnection(getSessionID()).prepareStatement("select * from " + getTableName() + " where 1 = 2");
stmt.executeQuery();
}
catch (Exception ex)
{
result = false;
}
try
{
stmt.close();
}
catch (Exception ex)
{
}
return result;
}
COM: <s> method is valid table </s>
|
funcom_train/8065261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSourceFigNode(FigNode fn) {
// assert fn != null
try {
if (sourceFigNode != null) {
sourceFigNode.removeFigEdge(this);
}
sourceFigNode = fn;
fn.addFigEdge(this);
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> set the fig node representing this fig edges from node </s>
|
funcom_train/16791243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildContextMenu() {
ActionResources res = this.resources.getActionResources(this, this.ACTION_RESOURCES);
this.contextAction = (ActionMenu) (ActionMenu) res.getChild(this.CONTEXT_MENU);
this.contextMenu = (Menu) this.contextAction.getWidget(this.canvas);
this.canvas.setMenu(this.contextMenu);
}
COM: <s> build the context menu for use with the panel </s>
|
funcom_train/3464398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void customize() {
showFinishButton(false);
setFrameLabel1("Set Project Info");
setTitle("New Project Wizard");
centerPanel.setLayout(new BorderLayout());
JLabel image = new JLabel(ImageHandler.getImageIcon("cdt.gif"));
centerPanel.add(image, BorderLayout.WEST);
JPanel panel = new JPanel(new GridLayout(0, 1));
JPanel name = new JPanel();
name.add(new JLabel("Enter Project Name: "));
name.add(projectName);
panel.add(name);
centerPanel.add(panel, BorderLayout.CENTER);
}
COM: <s> sets up the gui layout for this frame in the wizard </s>
|
funcom_train/38950555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ESBServicesPort".equals(portName)) {
setESBServicesPortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/25587220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancelCommand() {
if (cancelCommand == null) {//GEN-END:|26-getter|0|26-preInit
// write pre-init user code here
cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|26-getter|1|26-postInit
// write post-init user code here
}//GEN-BEGIN:|26-getter|2|
return cancelCommand;
}
COM: <s> returns an initiliazed instance of cancel command component </s>
|
funcom_train/1883746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLowValue(int lowValue) {
int e = (this.model.getValue() - lowValue) + this.model.getExtent();
this.model.setRangeProperties(lowValue, e, this.model.getMinimum(),
this.model.getMaximum(), false);
this.model.setValue(lowValue);
}
COM: <s> sets the low value shown by this range slider </s>
|
funcom_train/13396098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopPlayer() {
if (player!=null && isPlaying()) {
player.close();
System.out.println("Tras parar el player, el trhead esta vivo?: " + thread.isAlive());
player = null;
audioStream = null;
setPlaying(false);
}
}
COM: <s> stops the audio player </s>
|
funcom_train/28368363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVarSubtype(final String n) {
if (!variables.containsKey(n) && (this != world.getSpecies())) { return world
.getSpecies().getVarSubtype(n); }
if (variables.containsKey(n)) { return variables.get(n).getSubtype(); }
return null;
}
COM: <s> get var subtype created 22 ao t 07 by drogoul </s>
|
funcom_train/2628489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetParent() {
System.out.println("getParent");
ComponentTypeWrapper instance = new ComponentTypeWrapper(new ComponentType());
ComponentTypeWrapper expResult =new ComponentTypeWrapper(new ComponentType());
instance.parent = expResult;
ComponentTypeWrapper result = instance.getParent();
assertEquals(expResult, result);
}
COM: <s> test of get parent method of class component type wrapper </s>
|
funcom_train/34580516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSgSaveCommand () {
if (sgSaveCommand == null) {//GEN-END:|82-getter|0|82-preInit
// write pre-init user code here
sgSaveCommand = new Command (lang.getProperty("command.save"), Command.OK, 0);//GEN-LINE:|82-getter|1|82-postInit
// write post-init user code here
}//GEN-BEGIN:|82-getter|2|
return sgSaveCommand;
}
COM: <s> returns an initiliazed instance of sg save command component </s>
|
funcom_train/27711179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValidationEnabled(boolean flag) throws Exception {
fValidationEnabled = flag;
fValidationEnabledByDynamic = false;
if (fValidationEnabled) {
if (fDynamicDisabledByValidation) {
fDynamicValidation = true;
fDynamicDisabledByValidation = false;
}
} else if (fDynamicValidation) {
fDynamicValidation = false;
fDynamicDisabledByValidation = true;
}
fValidating = fValidationEnabled;
}
COM: <s> turning on validation dynamic turns on validation if it is off and </s>
|
funcom_train/48712980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookUpdate(long key, int value) {
int hash = hash(key);
int i = indexFor(hash, index.length);
int v = index[i];
if (v >= 0) {
do {
if (keys[v] == key) {
return values[v];
}
if (nexts[v] < 0) {
break;
}
v = nexts[v];
}
while (true);
nexts[v] = size;
}
else {
index[i] = size;
}
keys[size] = key;
values[size] = value;
size++;
return value;
}
COM: <s> look for the given key if it exists return the value otherwise create </s>
|
funcom_train/7661480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSubmitRunnable2() {
try {
ExecutorService e = new DirectExecutorService();
Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING);
String result = future.get();
assertSame(TEST_STRING, result);
}
catch (ExecutionException ex) {
unexpectedException();
}
catch (InterruptedException ex) {
unexpectedException();
}
}
COM: <s> completed submit runnable result returns result </s>
|
funcom_train/14266825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReplyToMulticastQuery() throws BadPacketException {
parseResults();
switch (_replyToMulticast) {
case UNDEFINED:
throw new BadPacketException();
case TRUE:
return true;
case FALSE:
return false;
default:
Assert.that(false, "Bad value for replyToMulticast: "
+ _replyToMulticast);
return false;
}
}
COM: <s> returns true iff the reply was sent in response to a multicast query </s>
|
funcom_train/25186868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean parseBoolean(String value) throws ParseException {
if (value == null) {
throw new ParseException("Null can't be converted to boolean", 0);
} else if (value.equals("true")) {
return true;
} else if (value.equals("false")) {
return false;
} else {
throw new ParseException("Invalid boolean value: " + value, 0);
}
}
COM: <s> tries to parse value as boolean and throws exception if failed </s>
|
funcom_train/21739951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkCompiler() {
if (EclihxCore.getDefault().getPluginPreferences().getString(
CorePreferenceInitializer.HAXE_COMPILER_PATH).isEmpty()) {
MessageDialog.openWarning(getShell(), "Missing Compiler Path",
"Please, define haXe compiler first " +
"(Preferences->EclihX->Compiler).");
}
}
COM: <s> check the compiler field </s>
|
funcom_train/50577077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String formatSeconds(long secs) {
long mins = secs / 60;
long ssecs = secs % 60;
if (ssecs == -1) ssecs = 0;
String str = Long.toString(mins) + ":" + ((ssecs < 10) ? "0" : "") + Long.toString(ssecs);
if (mins < 10) str = " " + str;
return str;
}
COM: <s> returns a string with a nicely formatted string representing the </s>
|
funcom_train/10503559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToSortList(List sortedList) {
for (Iterator it = loopElements.iterator(); it.hasNext();) {
ModuleInSort moduleInLoop = (ModuleInSort) it.next();
moduleInLoop.addToSortList(sortedList);
}
if (!this.isSorted()) {
sortedList.add(module);
this.isSorted = true;
}
}
COM: <s> add this module to the sorted list </s>
|
funcom_train/7537312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object call(String method, Object p0, Object p1, Object p2, Object p3, Object p4) throws XMLRPCException {
Object[] params = {
p0, p1, p2, p3, p4,
};
return callEx(method, params);
}
COM: <s> convenience method call with five parameters </s>
|
funcom_train/46702966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void useLimitAndOffset() {
Order order = session.createQuery(Order.class)
.setLimit(1)
.setOffset(0) // The default value can't be specified
.orderBy(Order.CREATED.descending())
.uniqueResult()
;
System.out.println("The latest Order: " + order);
}
COM: <s> how to get the latest order by the limit attribute </s>
|
funcom_train/32831337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDifference_notEqualsCollectionDifferentSize() {
Collection<?> collectionDifferentSize = Arrays.asList(arrayDifferentSize);
Difference result = reflectionComparator.getDifference(arrayA, collectionDifferentSize);
assertSame(arrayA, result.getLeftValue());
assertSame(collectionDifferentSize, result.getRightValue());
}
COM: <s> test for an array and a collection having a different size array collection </s>
|
funcom_train/47690933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(GenomeLoc loc, double value) {
String bedLine = String.format("%s\t%d\t%d\t%.2f\n",loc.getContig(), loc.getStart(), loc.getStop(), value);
try {
mWriter.write(bedLine);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> add a record to the file </s>
|
funcom_train/21609833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processHeader() throws IOException {
httpRequest req = new httpRequest(conn,request,url,httpver,header);
if (DEBUG) System.err.println("httpPacketReader: Pushing req to user");
if (!compQ.enqueue_lossy(req)) {
System.err.println("httpPacketReader: WARNING: Could not enqueue_lossy to user: "+req);
}
}
COM: <s> process the header possibly pushing an http request to the user </s>
|
funcom_train/2586248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelectedStyle() {
if (this.bold.isSelected() && this.italic.isSelected()) {
return Font.BOLD + Font.ITALIC;
}
if (this.bold.isSelected()) {
return Font.BOLD;
}
if (this.italic.isSelected()) {
return Font.ITALIC;
}
else {
return Font.PLAIN;
}
}
COM: <s> returns the selected style </s>
|
funcom_train/3471753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addKeyStroke(KeyStroke keyStroke, String keyStrokeName) {
keyStringToName.put(keyStrokeToHashtableKey(keyStroke), keyStrokeName);
String keyString = KeyEvent.getKeyText(keyStroke.getKeyCode());
nameToKeyString.put(keyStrokeName, keyString);
}
COM: <s> registers a key stroke with a specified name </s>
|
funcom_train/21677745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getIgnoredColumnsInError() {
List answer = new ArrayList();
Iterator iter = ignoredColumns.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
if (Boolean.FALSE.equals(entry.getValue())) {
answer.add(entry.getKey());
}
}
return answer.iterator();
}
COM: <s> this method returns an iterator of strings </s>
|
funcom_train/46628579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String register(String email, String password) throws ValidationFailedException, UserException {
User dbUser = userService.getByUsername(email);
if (dbUser != null) {
throw new UserException(getMessage("validation.security.credentials.duplicate"));
}
User user = new User(email, password);
userService.save(user);
return requestToken(email, password);
}
COM: <s> registers a new user within the portal and authenticate directly after the request </s>
|
funcom_train/37740994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResourceAssignmentService resourceAssignmentService () {
RequestScope scope = RequestLog.enterScope
(this, "resourceAssignmentService", new Object[] {});
ResourceAssignmentService res = null;
try {
res = getRas ();
} catch (RemoteException e) {
throw new EJBException (e);
} finally {
scope.leave (res);
}
return res;
}
COM: <s> return the resource assignment service used by the </s>
|
funcom_train/5342290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handlePopupMenu(MouseEvent e) {
Point p = e.getPoint();
handleRightMouseClick(e);
JPopupMenu menu = createPopupMenu();
if(menu != null) {
try {
menu.show(TABLE, p.x+1, p.y-6);
} catch(IllegalComponentStateException icse) {
// happens occasionally, ignore.
}
}
}
COM: <s> shows the popup menu at point p </s>
|
funcom_train/4922880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAliasStringedTogetherProperty() {
MockObjectOne objectOne = this.record_instantiate(MockObjectOne.class);
this.object.setObjectOne(objectOne);
this.mapAlias("AliasOne", "ObjectOne");
this.mapAlias("AliasA", "PropertyA");
objectOne.setPropertyA("VALUE");
this.doTest("AliasOne.AliasA", "VALUE");
}
COM: <s> ensure can load a stringed together property via aliases </s>
|
funcom_train/45018402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAxesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXdataData_axes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXdataData_axes_feature", "_UI_NXdataData_type"),
NexusPackageImpl.Literals.NXDATA_DATA__AXES,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the axes feature </s>
|
funcom_train/11750707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCopy1() throws Exception {
Expression e1 = ExpressionFactory.matchExp("k1", "v1");
e1 = e1.orExp(ExpressionFactory.matchExp("k2", "v2"));
e1 = e1.orExp(ExpressionFactory.matchExp("k3", "v3"));
Expression e2 = e1.expWithParameters(new HashMap(), true);
TstTraversalHandler.compareExps(e1, e2);
}
COM: <s> tests how parameter substitution algorithm works on an expression with no </s>
|
funcom_train/39285712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createComboWizardCodeType() {
comboWizardCodeType = new Combo(compositeUIWizard, SWT.NONE);
comboWizardCodeType.setText("openlazlo");
comboWizardCodeType.setBounds(new Rectangle(137, 80, 115, 18));
//comboWizardCodeType.setEnabled(false);
}
COM: <s> this method initializes combo wizard code type </s>
|
funcom_train/3176654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Registry getRegistry(Gedcom gedcom) {
String name = gedcom.getName();
if (name.endsWith(".ged"))
name = name.substring(0, name.length()-".ged".length());
name = name + ".geo.properties";
return Registry.get(gedcom.getOrigin().getFile(name));
}
COM: <s> find a registry for gedcom file geo </s>
|
funcom_train/35716049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adaptToInsert() {
int myStart= fPosition.offset;
int myEnd= fPosition.offset + fPosition.length -1;
myEnd= Math.max(myStart, myEnd);
int yoursStart= fOffset;
int yoursEnd= fOffset + fReplaceLength -1;
yoursEnd= Math.max(yoursStart, yoursEnd);
if (myEnd < yoursStart)
return;
if (myStart <= yoursStart) {
fPosition.length += fReplaceLength;
return;
}
if (myStart > yoursStart)
fPosition.offset += fReplaceLength;
}
COM: <s> if an insertion happens at the selections start offset </s>
|
funcom_train/37013261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void update(T domainObject) {
boolean merge = false;
if ( updateMode == UpdateMode.MERGE ) {
merge = true;
} else if ( updateMode == UpdateMode.CONDITIONALLY_MERGE ) {
T persistenObject = getHibernateTemplate().get(type,
getPrimaryKey(domainObject));
if ( persistenObject != domainObject ) {
merge = true;
}
}
if ( merge ) {
getHibernateTemplate().merge(domainObject);
} else {
getHibernateTemplate().update(domainObject);
}
}
COM: <s> update a persisted domain object </s>
|
funcom_train/25893241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printInstructions() {
String fullString = instructionString + getExampleInstructions();
String[] instructionLines = fullString.split("\n");
int currentLine = parent.getHeight() - instructionLines.length*textLineHeight;
for (int i=0; i<instructionLines.length; ++i) {
m_debugDraw.drawString(5, currentLine, instructionLines[i], white);
currentLine += textLineHeight;
}
}
COM: <s> prints default instructions specific example instructions </s>
|
funcom_train/39984630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ITagPlugin addTagPlugin(String namespace, String className) {
ITagPlugin plugin = null;
try {
if (namespace != null && className != null) {
plugin = (ITagPlugin) loader.loadClass(className).newInstance();
plugins.put(namespace, plugin);
return plugin;
}
} catch (Exception ecc) {
System.out.println("Error while loading tag plugin");
ecc.printStackTrace();
}
return null;
}
COM: <s> this method is used to add a plugin to the toolbox plusing manager </s>
|
funcom_train/37003061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void offsetSet(Map value, Object pos, Object val) {
Class type = value.getClass().getComponentType();
if(type!=null) val = coerce(type, val, request.response);
if (pos == null) {
pos = new Integer(value.size());
}
value.put(pos, val);
}
COM: <s> set an object at position </s>
|
funcom_train/7273643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleNewRequest(ReplyHandler handler, RequestType type) {
if(LOG.isDebugEnabled())
LOG.debug("Adding request to handler: " + handler);
synchronized(requests) {
// We're done.
if(finished) {
LOG.debug("Already reached maximum failure point, ignoring.");
return;
}
addRequest(handler, type);
}
}
COM: <s> stores knowledge that weve requested a network updatable component </s>
|
funcom_train/16849979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldExpl() {
if (jTextFieldExpl == null) {
jTextFieldExpl = new JTextField();
jTextFieldExpl.setText(strComment);
jTextFieldExpl.moveCaretPosition(0);
jTextFieldExpl.setBounds(new Rectangle(74, 136, 160, 42));
}
return jTextFieldExpl;
}
COM: <s> this method initializes j text field expl </s>
|
funcom_train/29619310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JScrollPane getJDescriptorNotesScrollPane() {
if (jDescriptorNotesScrollPane == null) {
jDescriptorNotesScrollPane = new JScrollPane();
jDescriptorNotesScrollPane.setViewportView(getJDescriptorNotesField());
jDescriptorNotesScrollPane.setBounds(77, 316, 207, 73);
jDescriptorNotesScrollPane.setVisible(false);
}
return jDescriptorNotesScrollPane;
}
COM: <s> this method initializes j descriptor notes scroll pane </s>
|
funcom_train/36188112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save_colour_settings() {
ColourSettings settings = new ColourSettings(label, colours);
PIM_GUI.getInstance(null).setColourSettings(settings);
// try {
// new File(colour_settings_file_name).delete();
// ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(colour_settings_file_name));
// out.writeObject(label);
// out.writeObject(colours);
// out.close();
// }
// catch (Exception b) {
// b.printStackTrace();
// }
}
COM: <s> saves the predefined colours and attached colour labels </s>
|
funcom_train/3158458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNodeNameIndex(String name) {
if (_nodeNameList != null) {
for (int i = 0; i < _nodeNameList.size(); i++) {
String nodeName = (String) _nodeNameList.get(i);
if (nodeName.equalsIgnoreCase(name)) {
return i;
}
}
}
return -1;
}
COM: <s> gets the index for the given node name </s>
|
funcom_train/32749168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map propertiesForNode( final AcceleratorNode aNode ) throws SynchronizationException {
if (aNode == null)
throw new IllegalArgumentException(
"node cannot be null getting property values");
try {
return syncManager.propertiesForNode(aNode);
} catch (ProxyException e) {
throw new SynchronizationException("ProxyException getting properties for: " +
aNode);
}
}
COM: <s> returns a map of property values key string property name value </s>
|
funcom_train/28763244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() {
try {
System.out.println("Connecting to " + url + " as " + username);
//connection = CacheDatabase.getDatabase (url, username, password, CacheDatabase.NONE);
connection = CacheDatabase.getLightDatabase (url, username, password);
} catch (CacheException ce) {
String exMessage = ce.getClass().getName() + ": CacheException. Failed to connect. " + ce.getMessage();
System.out.println(exMessage);
}
}
COM: <s> creates a connection to the cache database </s>
|
funcom_train/35275715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Spatial pickWorldSpatial(Camera cam, Vector2f mouseLoc, JmeNode jmeRootNode) {
Node rootNode = jmeRootNode.getLookup().lookup(Node.class);
CollisionResult cr = pick(cam, mouseLoc, rootNode);
if (cr != null) {
return cr.getGeometry();
} else {
return null;
}
}
COM: <s> given the mouse coordinates pick the geometry that is closest to the camera </s>
|
funcom_train/31464450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addShortOption(char name, String paramName, String description) {
Option o = new Option();
o.name = String.valueOf(name);
o.parameterName = paramName;
o.description = description;
m_shortOptions.add(o);
m_optionNameToOption.put(o.name, o);
}
COM: <s> adds a short option </s>
|
funcom_train/2289271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isDisabled() {
if (m_disableTimeStart > 0) {
// check if the disable time is already over
long currentTime = System.currentTimeMillis();
if ((currentTime - m_disableTimeStart) > m_disableMillis) {
// disable time is over
m_disableTimeStart = 0;
}
}
return m_disableTimeStart > 0;
}
COM: <s> returns code true code in case this user has been temporarily disabled </s>
|
funcom_train/50385705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateProfileCellEditor() {
String[] names = getProfileList().getProfileNames();
if (names == null || names.length == 0) {
return false;
}
StringComboBoxCellEditor editor = new StringComboBoxCellEditor(
getTable(), names);
CellEditor[] editors = getCellEditors();
editors[getColumnFor(PROFILE)] = editor;
setCellEditors(editors);
return editor != null;
}
COM: <s> dynamically update the cell editor for selecting security profiles </s>
|
funcom_train/1091809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IAeBpelExpressionLanguageFactory getFactory(String aBpelNamespace) throws AeException {
IAeBpelExpressionLanguageFactory factory = mFactoryMap.get(aBpelNamespace);
if (factory == null)
throw new AeException(
AeMessages.format(
"AeExpressionLanguageFactory.ERROR_MISSING_EXPRESSION_LANGUAGE_FACTORY", aBpelNamespace)); //$NON-NLS-1$
return factory;
}
COM: <s> gets the configured factory for the given bpel namespace uri </s>
|
funcom_train/51814657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
synchronized(this) {
// first set the flag
timerStopped = true;
// then notify all threads waiting on the waitset
notifyAll(); // must be called under lock
}
// now is the time for the thread to terminate
// wait for termination
// the following line was removed becuse it would hang when the timedExecution Task would call stopTimer()
// while( thread.isAlive() );
sv_numInstances--;
}
COM: <s> stops this timer thread </s>
|
funcom_train/22848655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Spinner createSpinnerControl(Composite parent, int min, int max) {
Spinner spinner = new Spinner(parent, SWT.BORDER);
spinner.setMinimum(min);
spinner.setMaximum(max);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 1;
spinner.setLayoutData(gridData);
return spinner;
}
COM: <s> creates the spinner </s>
|
funcom_train/22047937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNetURL(String url) {
jEditorPane1.setEditable(false);
try {
labelWebURL.setText("");
jEditorPane1.setPage(url);
labelWebURL.setText(url);
} catch (IOException e) {
org.jma.util.Misc.printStackTrace(e);
}
}
COM: <s> set the net url to display on this page </s>
|
funcom_train/25811222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startBlinking(SpriteState sprite, int numFrames) {
if (sprite == null || numFrames < 0) return;
AnimData data = beginPrepare(sprite);
data.mNext = mCounter + numFrames;
data.xDeltaX = numFrames;
synchronized(sprite) {
sprite.setVisible(false);
endPrepare(sprite, AnimType.BLINKING, data);
}
}
COM: <s> starts a blinking animation with the corresponding repeat interval </s>
|
funcom_train/31689244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean compareAllValues(ArrayList aPropertyInstances) {
boolean bSame = true;
Iterator itor = aPropertyInstances.iterator();
while (itor.hasNext()) {
boolean bFound = false;
PropertyInstance propInst = (PropertyInstance) itor.next();
Iterator itor2 = this.m_aPropertyInstances.iterator();
while (itor2.hasNext()) {
PropertyInstance myPropInst = (PropertyInstance) itor2.next();
if(myPropInst.equals(propInst)) {
bFound = true;
break;
}
}
if(!bFound) {
bSame=false;
break;
}
}
return bSame;
}
COM: <s> compares a given list of </s>
|
funcom_train/3026869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkProtection(MethodSummary other) {
//ModifierHolder mh1 = getModifiers();
//ModifierHolder mh2 = other.getModifiers();
return (isPublic() == other.isPublic()) &&
(isProtected() == other.isProtected()) &&
(isPackage() == other.isPackage()) &&
(isPrivate() == other.isPrivate());
}
COM: <s> determines if they have the same protections </s>
|
funcom_train/9485143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTargetSetClass(Class targetSetClass) {
if (targetSetClass == null) {
throw new IllegalArgumentException("'targetSetClass' must not be null");
}
if (!Set.class.isAssignableFrom(targetSetClass)) {
throw new IllegalArgumentException("'targetSetClass' must implement [java.util.List]");
}
this.targetSetClass = targetSetClass;
}
COM: <s> set the class to use for the target set </s>
|
funcom_train/8057005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getMinimapLocation() {
final int cX = Bot.methods.getClient().getBaseX()
+ (c.getPosX() / 32 - 2) / 4;
final int cY = Bot.methods.getClient().getBaseY()
+ (c.getPosY() / 32 - 2) / 4;
return Calc.worldToMinimap(cX, cY);
}
COM: <s> gets the minimap location of the character </s>
|
funcom_train/5082105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDynamic() {
if (widget instanceof MenuItem) {
//Optimization. Only recreate the item is the check style has changed.
boolean itemIsCheck = (widget.getStyle() & SWT.CHECK) != 0;
boolean actionIsCheck = getAction() != null && getAction().getStyle()
== IAction.AS_CHECK_BOX;
return itemIsCheck != actionIsCheck;
}
return false;
}
COM: <s> the action item implementation of this code icontribution item code </s>
|
funcom_train/8437025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddArgumentAuto() {
System.out.println("addArgumentAuto");
String name = "name";
Class clasz = Boolean.class;
boolean necessary = false;
GetOpts instance = new GetOpts();
instance.addArgumentAuto(name, clasz, necessary);
assertEquals(instance.getArgumentClass(name), Boolean.class);
}
COM: <s> test of add argument auto method of class get opts </s>
|
funcom_train/3409012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int digest(byte[] buf, int offset, int len) throws DigestException {
if (buf == null) {
throw new IllegalArgumentException("No output buffer given");
}
if (buf.length - offset < len) {
throw new IllegalArgumentException
("Output buffer too small for specified offset and length");
}
int numBytes = engineDigest(buf, offset, len);
state = INITIAL;
return numBytes;
}
COM: <s> completes the hash computation by performing final operations </s>
|
funcom_train/50346139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPickupId(String id){
if (_pickupList.contains(id))
return;
_pickupList.add(id);
log.debug("track " +getName()+ " add pick up id "+id);
setDirtyAndFirePropertyChange (PICKUP_CHANGED_PROPERTY, null, id);
}
COM: <s> add train or route id to this track </s>
|
funcom_train/29516990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float get_coverage(int first, int last) {
int y = 0;
for (int x = first - 1; x < last - 1; x++) {
if (baseScore[0][x] + baseScore[1][x] + baseScore[2][x]
+ baseScore[3][x] > 0) {
y++;
}
}
return (float) y / (float) (last - first);
}
COM: <s> this function returns the fraction of bases covered in a region </s>
|
funcom_train/25134885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int nextInt(StringTokenizer tok, String errorMsg) throws SAXException {
if (!tok.hasMoreTokens()) {
throw new SAXException(errorMsg);
}
try {
return Integer.parseInt(tok.nextToken());
} catch (NumberFormatException nfe) {
throw new SAXException(errorMsg);
}
}
COM: <s> convenience method to return the next int or throw if there are no </s>
|
funcom_train/35349470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRGB(int rgb) {
Color color = new Color(rgb);
setColor(color, false, true, true);
settingColor = true;
hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
saturationSpinner.setValue(Integer.valueOf((int)(saturation * 255)));
valueSpinner.setValue(Integer.valueOf((int)(brightness * 255)));
settingColor = false;
}
COM: <s> resets the rgb values </s>
|
funcom_train/21413826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GroceryOrder createOrder() {
GregorianCalendar orderCal = new GregorianCalendar(2006, 7, 13);
ArrayList<Grocery> groceryList = new ArrayList<Grocery>();
groceryList.add(new Grocery(GroceryItem.Bread, 2, "kg"));
groceryList.add(new Grocery(GroceryItem.Caviar, 1, "kg"));
GroceryOrder order = new GroceryOrder(
new Integer(138989),
"SleepingBeauty Hawaii",
orderCal.getTime(),
groceryList
);
return order;
}
COM: <s> creates a grocery order </s>
|
funcom_train/22168701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Info getValue() throws DataModelException {
try {
return (Info)getFenixObject(0);
} catch(DataModelException ex) {
throw new DataModelException("The Fenix object '" + getRef() +
"' is a SimpleItem and, so, must contain an Info element.", ex);
} catch(ClassCastException ex) {
throw new DataModelException("The Fenix object '" + getFenixObject(0).getRef() + "' is not a Info element.");
}
}
COM: <s> return the info of this simple item </s>
|
funcom_train/25314509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setState(State nextState){
if(nextState==null){
return false;
}
int nextID=nextState.getID();
if(nextID>=0 && nextID<stateList.size()
&& stateList.get(nextID)==nextState){
if(nextState!=currentState){
if(currentState!=null){
currentState.onForcedLeave();
currentState.onLeave();
}
nextState.onEnter();
currentState=nextState;
return true;
}
}
return false;
}
COM: <s> this function sets a new state as current state and invokes callbacks </s>
|
funcom_train/15981663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents()
{ //GEN-BEGIN:initComponents
nameGenPanel1 =
new pcgen.gui2.doomsdaybook.NameGenPanel(new File("./Data/"), false);
setTitle("The Doomsday Book Name Generator");
addWindowListener(new java.awt.event.WindowAdapter()
{
@Override
public void windowClosing(java.awt.event.WindowEvent evt)
{
exitForm(evt);
}
});
getContentPane().add(nameGenPanel1, java.awt.BorderLayout.CENTER);
pack();
}
COM: <s> this method is called from within the constructor to </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.