__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/23267846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetApellidoP() {
System.out.println("getApellidoP");
Cliente instance = new Cliente();
String expResult = "";
String result = instance.getApellidoP();
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 apellido p method of class capa negocios </s>
|
funcom_train/2550491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkflowRunReportRow getSingleWorkflowRun(Integer workflowRunSWID) {
WorkflowRunService ws = BeanFactory.getWorkflowRunServiceBean();
WorkflowRun workflowRun = (WorkflowRun)testIfNull(ws.findBySWAccession(workflowRunSWID));
logger.debug("Found workflow run: " + workflowRun.getSwAccession());
return fromWorkflowRun(workflowRun);
}
COM: <s> using a workflow run swid report on the files samples and processing </s>
|
funcom_train/45018504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFileUpdateTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXroot_fileUpdateTime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXroot_fileUpdateTime_feature", "_UI_NXroot_type"),
NexusPackageImpl.Literals.NXROOT__FILE_UPDATE_TIME,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the file update time feature </s>
|
funcom_train/4530433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reportStatus(String msg, boolean rightNow) {
long curTime = now();
if(!rightNow && (curTime - lastStatusReport < 20 * 1000))
return;
NameNode.stateChangeLog.info(msg + " \n" + getTurnOffTip());
lastStatusReport = curTime;
}
COM: <s> print status every 20 seconds </s>
|
funcom_train/37587838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void currentInteraction() {
// if (!hasCurrentInteraction()) {
// throw new IllegalStateException("There is no current interaction!");
// }
// try {
// _doc.clearCurrentInteraction();
// String text = _interactions.get(_currentInteraction);
// _doc.insertText(_doc.getLength(), text, _doc.DEFAULT_STYLE);
// }
// catch (EditDocumentException dae) {
// throw new UnexpectedException(dae);
// }
// }
COM: <s> enters the current interaction into the interactions pane </s>
|
funcom_train/39127748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBoardSize(int rows, int cols, int mines)
{
this.rows = rows;
this.cols = cols;
this.minesLeft = mines;
this.totalMines = mines;
this.mineField = new int[rows + 2][cols + 2];
this.flagged = new boolean[rows][cols];
this.revealed = new boolean[rows][cols];
}
COM: <s> changes the number of rows columns and mines on the game board </s>
|
funcom_train/4430814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDirty(final boolean dirty) {
this.dirty = dirty;
mainPanel.fireMainPanelListener();
if (dirty&&isConsistent())
mainPanel.setStatusInfo(new ImageIcon(FIXPusher.class.getResource("/net/sourceforge/fixpusher/view/images/16x16/documentinfo.png")),
"Hit save or Ctrl-S to store changes.");
else if (!dirty&&isConsistent())
mainPanel.setStatusInfo(new ImageIcon(FIXPusher.class.getResource("/net/sourceforge/fixpusher/view/images/16x16/documentinfo.png")),
"Hit the green button or Ctrl-F6 to start the session.");
else
mainPanel.setStatusInfo(null, null);
}
COM: <s> sets the dirty </s>
|
funcom_train/46654759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showUserQuestions(String alias) {
String noElementString;
if (alias.equalsIgnoreCase(Global.currentUser.getAlias())) {
noElementString = Global.constantsTest.noQuestionsByMe();
} else {
noElementString = Global.constantsTest.noQuestionsUser(alias);
}
SearchOptions searchOptions = new SearchOptions();
searchOptions.setAuthor(alias);
Global.content.add(new QuestionsPaging(searchOptions, noElementString));
}
COM: <s> show user questions </s>
|
funcom_train/44431782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addChannel(PersistChanGrpMgr agroup, String label, String url) {
Channel achannel;
logger.info("Adding channel: " + label + " to " + agroup + " " + url);
achannel = agroup.addChannel(url);
agroup.notifyChannelsAndItems(achannel);
runPersistChanGrpTask(agroup, 3);
}
COM: <s> helper to add a channel to an existing group </s>
|
funcom_train/19325594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean traitEndsRow(final FObj fobj, final FoContext context) {
final PdEndsRow property = (PdEndsRow) getProperty(
FoProperty.ENDS_ROW);
if (property != null) {
return property.getValue(context, fobj);
}
return PdEndsRow.getValueNoInstance();
}
COM: <s> returns the ends row property </s>
|
funcom_train/10671072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testRemoveListenerMethod() {
try {
if (!eventSetDescriptor[0].getRemoveListenerMethod().getName()
.equals("removeFredListener")) {
throw new Exception("mistake in getRemoveListenerMethod");
}
return passed();
} catch (Exception e) {
e.printStackTrace();
return failed(e.getMessage());
}
}
COM: <s> verify that get remove listener method returns correct remove listener </s>
|
funcom_train/5380187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createCancelButton(Composite parent) {
cancel = createButton(parent, IDialogConstants.CANCEL_ID,
IDialogConstants.CANCEL_LABEL, true);
if (arrowCursor == null)
arrowCursor = new Cursor(cancel.getDisplay(), SWT.CURSOR_ARROW);
cancel.setCursor(arrowCursor);
setOperationCancelButtonEnabled(enableCancelButton);
}
COM: <s> creates the cancel button </s>
|
funcom_train/880645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUserPropertyDescriptorGen(Object object) {
itemPropertyDescriptors.add
(new LDAPItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LDAPDirectory_user_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LDAPDirectory_user_feature", "_UI_LDAPDirectory_type"),
LdapPackage.eINSTANCE.getLDAPDirectory_User(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the user feature </s>
|
funcom_train/35177223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int substringWidth(String str, int offset, int length) {
if (isBitmapFont) {
//#sijapp cond.if modules_GFONT="true" #
return ((BitmapFont)font).substringWidth(str, offset, length);
//#sijapp cond.else#
//# return 0;
//#sijapp cond.end#
} else {
return ((Font)font).substringWidth(str, offset, length);
}
}
COM: <s> gets the substring width </s>
|
funcom_train/20239741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdListTipoGR() {
if (cmdListTipoGR == null) {//GEN-END:|147-getter|0|147-preInit
// write pre-init user code here
cmdListTipoGR = new Command("Item", Command.ITEM, 0);//GEN-LINE:|147-getter|1|147-postInit
// write post-init user code here
}//GEN-BEGIN:|147-getter|2|
return cmdListTipoGR;
}
COM: <s> returns an initiliazed instance of cmd list tipo gr component </s>
|
funcom_train/31468071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(ShiftLeftAssignExpression node) {
Node left = node.getLeftExpression();
LeftHandSideModifier mod = NodeProperties.getModifier(left);
Object lhs = mod.prepare(this, context);
// Perform the operation
Object result = InterpreterUtilities.shiftLeft
(NodeProperties.getType(node),
lhs,
node.getRightExpression().acceptVisitor(this));
// Cast the result
result = performCast(NodeProperties.getType(left), result);
// Modify the variable and return
mod.modify(context, result);
return result;
}
COM: <s> visits a shift left assign expression </s>
|
funcom_train/29869994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJSearchAdvancedExactTextField() {
if (jSearchAdvancedExactTextField == null) {
jSearchAdvancedExactTextField = new JTextField();
jSearchAdvancedExactTextField.addActionListener(new java.awt.event.ActionListener(){
public void actionPerformed(ActionEvent e){
actionJSearchAdvancedSearchButton();
}
});
}
return jSearchAdvancedExactTextField;
}
COM: <s> this method initializes j search advanced exact text field </s>
|
funcom_train/40927581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand() {
if (okCommand == null) {//GEN-END:|186-getter|0|186-preInit
// write pre-init user code here
okCommand = new Command("Aceptar", Command.OK, 0);//GEN-LINE:|186-getter|1|186-postInit
// write post-init user code here
}//GEN-BEGIN:|186-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/8568829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assignWeights(int[] vector, int minWeight, int maxWeight) {
int index = 0;
for (int l = 1; l < layers; l++) {
index = assignLayerWeights(l, vector, index, minWeight, maxWeight);
}
}
COM: <s> assigns the weights from the vector into the layers </s>
|
funcom_train/50389922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String sendTo(InetAddress server, int port)throws IOException{
Socket s=new Socket(server,port);
logger.info("Sending to "+server.getHostAddress()+":"+port+" : "+this);
writeEncoded(s.getOutputStream());
String res=readResponse(s.getInputStream());
s.close();
logger.debug("Finished sending request, got response '"+res+"'");
return res;
}
COM: <s> utility method to send this job to a server </s>
|
funcom_train/46381519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CellTransform getWorldTransform(CellTransform result) {
if (!live)
throw new IllegalStateException("Unsupported Operation, only valid for a live Cell "+this.getClass().getName());
return UniverseManagerFactory.getUniverseManager().getWorldTransform(this, result);
}
COM: <s> get the world transform of this cells origin </s>
|
funcom_train/2575737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBoolean(int parameterIndex, boolean x) throws SQLException {
if (this.useTrueBoolean) {
setInternal(parameterIndex, x ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
setInternal(parameterIndex, x ? "'t'" : "'f'"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
COM: <s> set a parameter to a java boolean value </s>
|
funcom_train/32720491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OctetString removeEngineID(Address address) {
OctetString engineID = (OctetString) engineIDs.remove(address);
if ((engineID != null) && (snmpEngineListeners != null)) {
fireEngineChanged(new SnmpEngineEvent(this,
SnmpEngineEvent.REMOVED_ENGINE_ID,
engineID, address));
}
return engineID;
}
COM: <s> removes an engine id association from the local storage and fires the </s>
|
funcom_train/45113474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean envSet(String envvariable, String value) throws Exception {
Map<?, ?> result = null;
if (value == null) {
result = runRemoteScript(commandCreate("EnvSet", envvariable));
} else {
result = runRemoteScript(commandCreate("EnvSet", envvariable, value));
}
processResult("Environment Set ", result);
return !"0".equals(result.get(STDOUT).toString());
}
COM: <s> writes an environment variable </s>
|
funcom_train/18135358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActive(String caseid, boolean active) {
caseid = getMainCaseId(caseid);
Integer activeCounter = this.active.get(caseid);
if (activeCounter == null) activeCounter = new Integer(0);
if (active)
activeCounter = new Integer(activeCounter.intValue()+1);
else {
activeCounter = new Integer(activeCounter.intValue()-1);
}
if (activeCounter.intValue()<0) activeCounter = new Integer(0);
this.active.put(caseid,activeCounter);
}
COM: <s> method for setting this task active or inactive for the given caseid </s>
|
funcom_train/46874256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EdgeType inverse(final EdgeType type) {
EdgeType inverted = EdgeType.OTHER;
/* invert EdgeType */
if (type == EdgeType.NORTH) {
inverted = EdgeType.SOUTH;
} else if (type == EdgeType.SOUTH) {
inverted = EdgeType.NORTH;
} else if (type == EdgeType.WEST) {
inverted = EdgeType.EAST;
} else if (type == EdgeType.EAST) {
inverted = EdgeType.WEST;
}
return inverted;
} // inverse()
COM: <s> returns the inverse of the given code edge type code </s>
|
funcom_train/25567295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() {
setSize(320, 320);
setDefaultCloseOperation(HIDE_ON_CLOSE);
buttonPane = new ButtonPane(ButtonPane.OK_CANCEL);
getContentPane().add(buttonPane, BorderLayout.SOUTH);
////buttonPane.getButton(ButtonPane.OK).addActionListener(closer);//if OK is pressed, closed will be called in this.Listener() by choice
buttonPane.getButton(ButtonPane.CANCEL).addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event){
close();
}
});
}
COM: <s> initializes buttons and model </s>
|
funcom_train/16544453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(){
messageField.setEnabled( contact.isAvailable() );
this.statusLabel1.updateLabel(this.contact);
//Update the statusLabel icon
this.getTabbedChat().setIconAt(this.getTabIndex()
, this
.statusLabel1
.getIcon());
}
COM: <s> update the chatframe the contact might be disconnected after a roster up </s>
|
funcom_train/18892932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getBaseTime(File directory) {
for (int i = 0; i < dirs.length; i++) {
if (dirs[i].getAbsolutePath().equals(directory.getAbsolutePath())) return baseTime[i];
}
throw new IllegalArgumentException("'" + directory + "' is not under control of the poller");
}
COM: <s> return the current base time for the given directory </s>
|
funcom_train/50481613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NsSet select_1row(String sql, NsSet set) throws SQLException {
String setPointer;
if(this.handle == null) {
this.handle = this.gethandle(this.poolname);
}
setPointer = this._select_1row(this.handle,sql,set.getPointer());
if (setPointer.length() > 0) {
return new NsSet(setPointer);
} else {
return null;
}
}
COM: <s> method which performs 1row operation </s>
|
funcom_train/4532689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
try {
getDFS().delete(this.path, true);
} catch (IOException e) {
e.printStackTrace();
MessageDialog.openWarning(null, "Delete file",
"Unable to delete file \"" + this.path + "\"\n" + e);
}
}
COM: <s> does a recursive delete of the remote directory tree at this node </s>
|
funcom_train/22024168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLinearVel(float fx, float fy, float fz) {
lvel.set(fx, fy, fz);
lmom.set(fx * mass.getMass(), fy * mass.getMass(), fz * mass.getMass());
}
COM: <s> sets the linear velocity by altering the angular momentum </s>
|
funcom_train/44495666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getRemoveOrder(TransactionID transactionID, CacheReference cacheReference) throws CacheEntryNotFoundException, TransactionNotActiveException {
if (cacheReference == null) {
throw new IllegalArgumentException("CacheReference is null");
}
synchronized (transactionID) {
currentTransaction(transactionID);
return depot.getRemoveOrder(cacheReference);
}
}
COM: <s> returns the order for removing the given code cache reference code </s>
|
funcom_train/2539202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeFromCache(IFont font) {
int in = this.fonts.indexOf(font);
if (in != -1){
// IFont removedFont =
fonts.remove(in);
// if (removedFont != null){ //DOESENT DESTROY THE FONT, font would get destroyed 2 times if font.destroy is called, which calls removeFromCache
// removedFont.destroy();
// }
return true;
}else{
return false;
}
}
COM: <s> removes the font from the cache </s>
|
funcom_train/27750979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerInstanceForClass(Class klass, Object instance) {
if (_child != null) {
_child.registerInstanceForClass(klass, instance);
return;
}
// check that it is an instance of the right class
if (!klass.isInstance(instance))
throw new IllegalArgumentException(instance.toString() +
" is not an instance of " +
klass.getName());
_classToInstanceMap.put(klass, instance);
}
COM: <s> register an instance for a class </s>
|
funcom_train/2856543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendData (ByteBuffer buff, Address target) {
if (target == null)
throw new IllegalArgumentException("null target address");
if (!(target instanceof IPAddress))
throw new IllegalArgumentException(
"not an IPAddress: " + target.toString());
addressee = ((IPAddress)target).getSocketAddress();
sendData (buff);
}
COM: <s> called by the packet port listener to initiate a write to an </s>
|
funcom_train/14462127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public col getCol(String colstr){
int cx = -1;
try{
cx = ExcelTools.getIntVal(colstr);
return cols[cx];
}catch(ArrayIndexOutOfBoundsException ex) {
throw new WorkBookException("Column Reference out of Bounds: " + cx,WorkBookException.NOT_BIFF8_FILE);
}
}
COM: <s> get a handle to a specific column of cells in this sheet </s>
|
funcom_train/27757418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doCommand(Client cl, Element cmd) {
if(cmd.hasAttribute(Keywords.CODE))
cl.writeResponse(cmd.getAtt(Keywords.CODE),cmd.firstChild());
else
cl.writeResponse(Constants.OK,cmd.firstChild());
}
COM: <s> write a message when asked to do so from the connection </s>
|
funcom_train/37648512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDuplicateRegister() {
RuleSet ruleSet = new RuleSet();
this.ruleSetManager.registerRuleSet(ruleSet);
this.ruleSetManager.registerRuleSet(ruleSet);
assertEquals("Only one rule set should have been registered", 1, this.ruleSetManager.getRegisteredRuleSets().size());
}
COM: <s> registering twice the same rule set results in no addition </s>
|
funcom_train/41641117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDockPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UIComponent_dock_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UIComponent_dock_feature", "_UI_UIComponent_type"),
CfcuiPackage.Literals.UI_COMPONENT__DOCK,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the dock feature </s>
|
funcom_train/50700199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private byte getClassImplFromFileSystem(String className)[] {
//System.out.println(" >>>>>> Fetching the implementation of "+className);
byte result[];
try {
FileInputStream fi = new FileInputStream(className);
result = new byte[fi.available()];
fi.read(result);
return result;
} catch (Exception e) {
/*
* If we caught an exception, either the class wasnt found or it
* was unreadable by our process.
*/
return null;
}
}
COM: <s> this sample function for reading class implementations reads </s>
|
funcom_train/19387906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEditable(AdapterNode node) {
if (node != null) {
int nodeType = node.getNodeType();
return (nodeType == Node.ELEMENT_NODE || nodeType == Node.PROCESSING_INSTRUCTION_NODE);
} else {
return false;
}
}//}}}
//{{{ isExpanded()
COM: <s> indicates if a node is capable of being edited in </s>
|
funcom_train/8352650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User createUser() {
BaseUser user = new BaseUser();
user.setName(name);
user.setPassword(password);
user.setHomeDirectory(homeDir);
user.setEnabled(isEnabled);
user.setAuthorities(authorities);
user.setMaxIdleTime(maxIdleTimeSec);
return user;
}
COM: <s> creates a user based on the configuration set on the factory </s>
|
funcom_train/25130320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetToDefaultUIMap(UIDefinition uidef) {
if (uidef.getUIMap() != null) {
Iterator<String> it = uidef.getUIMap().keySet().iterator();
while (it.hasNext()) {
String uiClassID = it.next();
if (defaultUIClassIDs.containsKey(uiClassID)) {
UIManager.getDefaults().remove(uiClassID);
}
}
}
}
COM: <s> reset the to the default ui defaults mapping before switching to another ui </s>
|
funcom_train/18804296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTickUnit(NumberTickUnit unit, boolean notify, boolean turnOffAutoSelect) {
if (unit == null) {
throw new IllegalArgumentException("Null 'unit' argument.");
}
this.tickUnit = unit;
if (turnOffAutoSelect) {
setAutoTickUnitSelection(false, false);
}
if (notify) {
notifyListeners(new AxisChangeEvent(this));
}
}
COM: <s> sets the tick unit for the axis and if requested sends an </s>
|
funcom_train/46161745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeometryUpdateMessage getGeometryUpdateMessage() {
Collection<com.jme.scene.Geometry> geometries = new Vector<com.jme.scene.Geometry>();
synchronized(changingGeometries) {
for (GeometryConverter converter : changingGeometries) {
geometries.add(converter.getJMEGeometry());
}
}
return new GeometryUpdateMessage(getNodeID(), geometries);
}
COM: <s> get the non persistent geometries for this model e </s>
|
funcom_train/14464368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCell(CellHandle c) {
c.setFormatHandle(this);
// this.addCell(c.getCell()); 20071022 KSC: Done in setFormatHandle already!
// this will add a new font record, no wanna do that here, else every time you add
// a cell to the format handle you will create a new font record.
//c.setFont(this.getFont());
}
COM: <s> add a cell to this format handle </s>
|
funcom_train/50156598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ComplexTypeLabel getComplexTypeLabelObj() {
ComplexTypeLabel labelObj = new ComplexTypeLabel();
if (getLevel() == 0) {
labelObj.setLabelClass("main-element-label");
}
else {
labelObj.setLabelClass("complex-element-label");
if (sh.isRequiredBranch(schemaNode)) {
labelObj.isRequiredBranch = true;
}
}
labelObj.setText(XPathUtils.getNodeName(normalizedXPath));
return labelObj;
}
COM: <s> create a complex type label instance and populate it according to whether the </s>
|
funcom_train/48522896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deliver(Topic topic, ScribeContent content) {
logger.log("MyScribeClient.deliver("+topic+","+content+")");
if (((MyScribeContent)content).from == null) {
new Exception("Stack Trace").printStackTrace();
}
}
COM: <s> called whenever we receive a published message </s>
|
funcom_train/34136740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectAttributeValue(String name, String value) {
Tag startTag = getCurrentStartTag();
if (startTag != null) {
int start = startTag.getStart();
int offset = startTag.getAttributeValueOffset(name);
getEditor().select(start + offset, start + offset + value.length());
}
}
COM: <s> selects the attrubte value of the current tag </s>
|
funcom_train/37571949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFilingSubmissionResponse() throws Exception {
startOpenEFM();
SOAPAdapterServlet servlet = new SOAPAdapterServlet();
servlet.m_callbackURI = "";
InternalLxmlFiling filing = getInternalLxmlFiling();
filing.setRemoteId("boolywoggle");
LxmlResponse response = new LxmlResponseImpl();
servlet.m_messageWrapperFactory = new MessageWrapperFactory();
servlet.filingSubmissionResponse(filing, response);
}
COM: <s> test the filing submission response method </s>
|
funcom_train/23367318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addressForGeocode(double lat, double lon, boolean sensor) throws IOException {
String url = enhanceUrlByPlatform(
"http://maps.google.com/maps/geo?q="+ lat +","+ lon +
"&output=csv&sensor="+ sensor +"&key="+ apiKey);
String[] data = callGeocode(url);
return data[2];
}
COM: <s> return the closest address of the given lat lon </s>
|
funcom_train/7311094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object initForContext(Context context, ArgumentList args, List<Index> indexes) throws Redirection {
if (initContext == null || !initContext.equals(context)) {
return new CountDefinition(def, context, this.args, this.indexes);
} else {
return this;
}
}
COM: <s> returns a copy of this count definition initialized for the specified context </s>
|
funcom_train/5552127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIntegerProperty(String sectionName, String propertyName, int pintVal) {
INISection section = null;
section = (INISection) listSections.get(sectionName);
if (section == null) {
section = new INISection(sectionName);
listSections.put(sectionName, section);
}
section.setProperty(propertyName, Integer.toString(pintVal));
}
COM: <s> sets the specified integer property </s>
|
funcom_train/43808869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FreeType getFreeType(String typeName) {
if (typeName == null)
return null;
for (FreeType ft : system.getFreeType())
if (ft.getType().equals(typeName))
return ft;
FreeType t = ModelFactory.eINSTANCE.createFreeType();
t.setName(typeName);
t.setDescription("FreeType enclosure for type " + typeName);
t.setSystem(system);
t.setType(typeName);
return t;
}
COM: <s> get the free type for the type name </s>
|
funcom_train/47549714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextAntialias(int antialias) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.cairo == 0 && antialias == SWT.DEFAULT) return;
switch (antialias) {
case SWT.DEFAULT: break;
case SWT.OFF: break;
case SWT.ON: break;
default:
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
data.textAntialias = antialias;
}
COM: <s> sets the receivers text anti aliasing value to the parameter </s>
|
funcom_train/28405204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTkInterruptEvent(TkInterruptEvent interruptEvent) {
EventListener[] listeners = list.getListeners(CommandTaskLI.class);
// Process the listeners last to first, notifying
if (listeners != null) {
for (int i = listeners.length - 1; i >= 0; i--) {
((CommandTaskLI) listeners[i]).taskInterrupted(interruptEvent);
}
}
}
COM: <s> fire a task interruption event </s>
|
funcom_train/12155931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double sigma(final double lat, final double lon, final Node node) {
LatLonTimeZone lltz = node.getTz();
return (lltz.getLatitude() - lat) * (lltz.getLatitude() - lat)
+ (lltz.getLongitude() - lon) * (lltz.getLongitude() - lon);
}
COM: <s> return estimated error </s>
|
funcom_train/16565264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Function getFunction(String funcName, int numParam) {
for (int i = 0; i < numFunc; i++) {
if (func[i].acceptNumParam(numParam) && (caseSensitive && name[i].equals(funcName) || !caseSensitive && name[i].equalsIgnoreCase(funcName)))
return func[i];
}
throw new RuntimeException("function not found: " + funcName + " " + numParam);
}
COM: <s> returns a function based on the name and the specified number of parameters </s>
|
funcom_train/21417875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem7() {
if (jMenuItem7 == null) {
jMenuItem7 = new JMenuItem();
jMenuItem7.setText("Presentzia Kontrolatu");
jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
presKontr.setLocationRelativeTo(null);
presKontr.setVisible(true);
}
});
}
return jMenuItem7;
}
COM: <s> this method initializes j menu item7 </s>
|
funcom_train/34529870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addJars(String[] jars) throws Exception {
for ( int i = 0; i < jars.length; i++ ) {
File file = new File( jars[ i ] );
String urlPath = "jar:file:///" + jars[ i ].replace( '\\', '/' ) + "!/";
addURL ( new URL( urlPath ) );
}
}
COM: <s> loads jars into the current jvm instance </s>
|
funcom_train/45038564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResolveQnWithPrefix() {
ModelPackage uml = new UmlMDRepository(UmlMDRepository.UML_V14).getMetamodel();
QualifiedNameResolver qnr = new QualifiedNameResolver(uml);
try {
qnr.resolveQn(
new QualifiedName(
"org.omg.uml.Foundation.Core.ModelElement",
QualifiedName.DOT_SEPERATOR));
} catch(NameNotResolvedException nnre) {
fail("testResolveQnWithPrefix: ModelElement can't be resolved.");
}
}
COM: <s> tests the resolution of prefixed qualified names in the context </s>
|
funcom_train/17296253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canMoveH(int x) {
if (type == VERTICAL) {
return false;
}
for (ControlPoint avoid : avoiders) {
if (Math.abs(avoid.getLocationOnScreen().x - x) <= 1) {
return false;
}
}
if (x > annotation.getLocationOnScreen().x && x + DEFAULT_SIZE < annotation.getLocationOnScreen().x + annotation.getWidth() - Annotation.MARGINS) {
return true;
}
else {
return false;
}
}
COM: <s> verifies that a control point can be moved horizontally </s>
|
funcom_train/3131744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToSet(Link l) {
// TODO Currently, exemplar is the first equivalence. It should be the...
// most general...
if (exemplar == null) {
exemplar = l;
System.out.println(exemplar + " new equivalence");
} else {
System.out.println(exemplar + " => " + l);
}
equivs.add(l);
l.setEquivalent(this);
}
COM: <s> add this link to the set and update variables </s>
|
funcom_train/14499858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(File file) throws Exception {
this.optimize();
if (!isRootDocument() && mRootDocument != null) {
mRootDocument.save(file);
} else {
if (!mCachedDocuments.isEmpty()) {
for (String odfDocPath : mCachedDocuments.keySet()) {
mCachedDocuments.get(odfDocPath).saveEmbeddedDoc();
}
}
insertDOMsToPkg();
mPackage.save(file);
}
}
COM: <s> save the document to given file </s>
|
funcom_train/7623725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder result = new StringBuilder(mResponse.toString());
switch (mResultCode) {
case OK:
appendWithCrlf(result, OK_STRING);
break;
case ERROR:
appendWithCrlf(result, ERROR_STRING);
break;
}
return result.toString();
}
COM: <s> generate the string response ready to send </s>
|
funcom_train/18846426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void serializeSemiAutomatedPTCT(ArrayList ptctCollObj, SemiAutomatedProcessTaskContextType saptct) {
String serObj = null;
int idx = ptctCollObj.indexOf(saptct);
saptct = new SemiAutomatedProcessTaskContextType();
saptct = (SemiAutomatedProcessTaskContextType) ptctCollObj.get(idx);
serObj = saptct.serializePTCT();
if(log.isDebugEnabled()) {
log.debug(componentID + ":: Serialized SemiAutomated PTCT = " + serObj);
}
ptctCollObj.set(idx, serObj);
}
COM: <s> serialize semi automated process task context type </s>
|
funcom_train/38883076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DictionaryIterator getDictionaries() throws DictionaryException {
try {
org.osid.dictionary.DictionaryManager manager = (org.osid.dictionary.DictionaryManager)OsidLoader.getManager("org.osid.dictionary.DictionaryManager", "org.campusproject.component.osid.dictionary", context, configuration);
DictionaryIterator result = manager.getDictionaries();
return result;
} catch (DictionaryException e) {
throw e;
} catch (OsidException e) {
throw new ExtendedDictionaryException(e);
} catch (Exception e) {
throw new ExtendedDictionaryException(e);
}
}
COM: <s> provides a list of all dictionaries </s>
|
funcom_train/4470259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeItem(FlowPanel item) {
Title t = (Title)item.getWidget(0);
HandlerRegistration hr = titleRegistration.get(t);
if ( hr != null) {
hr.removeHandler();
titleRegistration.remove(t);
}
map.remove(t);
layout.remove(item);
}
COM: <s> removes the given item from the stack </s>
|
funcom_train/28666541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateTransformationPage(String alphabetName) {
TransformData myTransformation;
if(alphabetName.equals("no transformation")) myTransformation = new TransformData(); //$NON-NLS-1$
else myTransformation = AbstractClassicTransformationPage.getTransformFromName(alphabetName);
((AbstractClassicTransformationPage) super.getNextPage()).setTransformData(myTransformation);
}
COM: <s> updates the transformation wizard page to load the transformation </s>
|
funcom_train/33149684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Change getChange(int index) {
int curIDX = -1;
Change c = null;
Iterator<Change> i = m_Elements.iterator();
while (i.hasNext()) {
c = i.next();
curIDX++;
if (curIDX == index)
return c;
}
throw new IndexOutOfBoundsException();
}
COM: <s> return the code change code object at index code index code </s>
|
funcom_train/12734885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMaxOutlineLevel() {
int max = Integer.MIN_VALUE;
for (int i = 0; i < dataSet.getChildCount(); i++) {
XComponent row = (XComponent) dataSet.getChild(i);
if (row.getOutlineLevel() > max) {
max = row.getOutlineLevel();
}
}
return max;
}
COM: <s> returns the maximum outline level in the underlying dataset </s>
|
funcom_train/10684419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseLayout() throws IOException {
if (attributeLayoutElements == null) {
attributeLayoutElements = new ArrayList();
StringReader stream = new StringReader(attributeLayout.getLayout());
AttributeLayoutElement e;
while ((e = readNextAttributeElement(stream)) != null) {
attributeLayoutElements.add(e);
}
resolveCalls();
}
}
COM: <s> tokenise the layout into attribute elements </s>
|
funcom_train/28298106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int fromFile(String file) {
Parser p=new Parser();
if (p.Init(file)) {
Object o=p.Parse("");
if (o!=null && o instanceof TransSibGameState) {
TransSibGameState gs=(TransSibGameState)o;
this.copy(gs);
return 0;
}
}
return -10705;
}
COM: <s> reads the game from the given file </s>
|
funcom_train/20875481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getPropertyDouble(String key, double defaultValue) {
try {
if (containsPropery(key))
return Double.parseDouble(getProperty(key));
if (iSaveDefaults)
setProperty(key, String.valueOf(defaultValue));
return defaultValue;
} catch (NumberFormatException nfe) {
if (iSaveDefaults)
setProperty(key, String.valueOf(defaultValue));
return defaultValue;
}
}
COM: <s> returns double property </s>
|
funcom_train/51189386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJSpeedField() {
if (jSpeedField == null) {
jSpeedField = new JTextField();
jSpeedField.setLocation(new Point(159, 9));
jSpeedField.setSize(new Dimension(55, 20));
jSpeedField.setText("50");
jSpeedField.addActionListener(new SpeedFieldHandler());
}
return jSpeedField;
}
COM: <s> this method initializes j speed field </s>
|
funcom_train/44782379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void remove_actionPerformed(ActionEvent e) {
// remove selected index
int pos=destinationList.getSelectedIndex();
if ((destinationList.getSelectedIndex()>=0)&&(destinationList.getSelectedValue()!="")) {
destinationElements.remove(destinationList.getSelectedIndex());
loadDestinationList();
destinationList.setSelectedIndex(pos);
}
realNameLabel.setText("<none>");
}
COM: <s> action method of the remove button </s>
|
funcom_train/22267637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BlockIdentifier getBlockIdentifier(final int block) {
int track = 0, lastSPT = 0, block_ = block;
while (block_ >= 0) {
lastSPT = SECTORS_PER_TRACK[track++];
block_ -= lastSPT;
}
return new BlockIdentifier(track, block_ + lastSPT);
}
COM: <s> get the track and sector for a given block id </s>
|
funcom_train/15581173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValueForOption(String selectName, String option) {
String[] opts = getOptionsFor(selectName);
for (int i = 0; i < opts.length; i++) {
if (opts[i].equals(option))
return getOptionValuesFor(selectName)[i];
}
throw new RuntimeException("Unable to find option " + option + " for " + selectName);
}
COM: <s> get the value for a given option of a select box </s>
|
funcom_train/4110810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void playOnce(boolean forward) throws InterruptedException {
int n = animation.getFrameCount();
for (int i = 0; i < n; i++) {
int frame = forward ? i : n - i - 1;
animation.showFrame(frame);
if (Thread.interrupted()) {
throw new InterruptedException("Play job interrupted.");
}
Thread.sleep(animation.getFrameDisplayTime(frame));
}
}
COM: <s> plays the animation once </s>
|
funcom_train/25309569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ApplicationPluginModelDTO createObject(String id) {
ApplicationPluginModelDTO model = new ApplicationPluginModelDTO();
model.setClassName("fr.cnes.sitools.applications.basic.BasicApp");
model.setId(id);
model.setLabel("new Application");
model.setUrlAttach("/testApp");
model.setCategory(Category.USER);
return model;
}
COM: <s> create an object application plugin model </s>
|
funcom_train/24627715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getContentBounds() {
// Rectangle r = new Rectangle(bbox.x+1,bbox.y+titleh+1,
// bbox.width-2,bbox.height-titleh-2);
Rectangle r = new Rectangle(bbox.x, bbox.y + titleh, bbox.width,
bbox.height - titleh);
if (lampshade)
r.setSize(0, 0);
// Document doc=getDocument();
// if (!pinned_) r.translate(-doc.getHsb().getValue(),
// -doc.getVsb().getValue());
// if (pir!=null) r.translate(-pir.x,-pir.y);
return r;
}
COM: <s> returns new rectangle sized and positioned to cover content not title </s>
|
funcom_train/25420824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Directory newDirectory() throws IOException {
File fDir = new File(this.luceneConfig.getIndexLocation());
NativeFSLockFactory nativeLockFactory = this.getNativeLockFactory();
if (nativeLockFactory != null) {
return FSDirectory.open(fDir,nativeLockFactory);
} else {
return FSDirectory.open(fDir);
}
}
COM: <s> gets the lucene directory the has been configured to store the index </s>
|
funcom_train/17362447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnArhive() {
if (btnArhive == null) {
btnArhive = new JButton();
btnArhive.setBounds(new Rectangle(237, 6, 64, 48));
btnArhive.setText("Arhive");
btnArhive.setToolTipText("Arhive");
btnArhive.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Arhive();
}
});
}
return btnArhive;
}
COM: <s> this method initializes btn arhive </s>
|
funcom_train/17459216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadProperties(final String propFile) {
// load defaults
properties.putAll(DEFAULT_PROPERTIES);
try {
LOG.debug("Reading propery file:" + propFile);
properties.load(Bootstrap.class
.getResourceAsStream(propFile));
} catch (IOException e) {
LOG.warn("Unable to load application properties from application.properties file",e);
LOG.warn("Using defaults");
}
if (LOG.isDebugEnabled()) {
LOG.debug("Using following properties:" + properties);
}
}
COM: <s> load non default properties from </s>
|
funcom_train/17413307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean getBoolean(String column) {
Boolean bool = null;
if (get(column) instanceof Boolean) {
bool = (Boolean) get(column);
} else {
String str = getString(column);
try {
int intVal = Integer.parseInt(str);
bool = intVal == 1 ? Boolean.TRUE : Boolean.FALSE;
} catch (NumberFormatException e) {
// Could not be parsed, see if the string is "true"
bool = Boolean.valueOf(str);
}
}
return bool;
}
COM: <s> gets the boolean representation of the specified column </s>
|
funcom_train/24624977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFieldAfter(String fieldName, LemansysSQLFormField newField) {
if (newField == null)
return;
if (fields == null)
resetFields();
Enumeration<LemansysSQLFormField> enm = fields.elements();
LemansysSQLFormField fld = null;
while (enm.hasMoreElements()) {
fld = enm.nextElement();
if (fld.getName().equals(fieldName)) {
newField.setOrder(fld.getOrder() + 10);
break;
}
}
fields.add(newField);
}
COM: <s> add field to form after field name field </s>
|
funcom_train/17010337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplicateLenMismatchedBlock() throws Exception {
MiniDFSCluster cluster = new MiniDFSCluster(new Configuration(), 2, true, null);
try {
cluster.waitActive();
// test truncated block
changeBlockLen(cluster, -1);
// test extended block
changeBlockLen(cluster, 1);
} finally {
cluster.shutdown();
}
}
COM: <s> test if replication can detect mismatched length on disk blocks </s>
|
funcom_train/48959595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getData(List<OpenClosed> data, int max, boolean open) {
StringBuilder values = new StringBuilder();
for (OpenClosed openClosed : data) {
values.append(percentage(max, open ? openClosed.getOpen() : openClosed.getClosed())).append(",");
}
return values.deleteCharAt(values.length() - 1).toString();
}
COM: <s> converts open or closed data into a comma separated string of percentages </s>
|
funcom_train/41441018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean profileExists(String profileName) {
boolean result = component.getProfileEntityFramework().findProfile(this.getProfileTableName(), profileName) != null;
if (logger.isDebugEnabled()) {
logger.debug("Profile named "+profileName+(result ? "" : " does not")+" exists on table named " + this.getProfileTableName());
}
return result;
}
COM: <s> determines if profile is in back end storage visible to other </s>
|
funcom_train/19438163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int sRT(int i){
int Index = i;
int ergb = 0;
if(Index>0&&(!pruef((Element) liste.get(Index-1)))){
ergb = 1;
}
else{
if(Index>1&&(!pruef((Element) liste.get(Index-1)))){
ergb = 2;
}
}
return ergb;
}
COM: <s> checks if one of the two last elements is a free command </s>
|
funcom_train/25270068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeExtension(final ExtensionPoint ep) {
if (null == ep.getType()) {
throw new IllegalArgumentException("The certain extension point " + ep.toString() + " has not type.");
}
final List<Rule> rules = getRulesPerType(ep.getType());
for (Rule rule : rules) {
applyRule(rule, ep);
}
}
COM: <s> make extensions through </s>
|
funcom_train/17209542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem quit() {
if (quitMenuItem == null) {
quitMenuItem = new JMenuItem("Quit");
quitMenuItem.setMnemonic(KeyEvent.VK_Q);
quitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,
ActionEvent.CTRL_MASK));
quitMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
setStatus("Quitting...");
dispose();
System.exit(0);
}
});
}
return quitMenuItem;
}
COM: <s> this method initializes quit menu item </s>
|
funcom_train/40460356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getJTA_CURE_HIS() {
if (jTA_CURE_HIS == null) {
jTA_CURE_HIS = new JTextArea();
jTA_CURE_HIS.setSize(new Dimension(336, 80));
jTA_CURE_HIS.setWrapStyleWord(true);
jTA_CURE_HIS.setLineWrap(true);
}
return jTA_CURE_HIS;
}
COM: <s> this method initializes j ta cure his </s>
|
funcom_train/48498824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update (RoleDTO role) {
// All the data has been set in the role object, either in the
// business logic layer, or at the front-end at role's request.
new UpdateQuery (super.getDataSource()).update(new Object[] {
role.getDescription(), new Integer(role.getId())
});
}
COM: <s> update an existing role </s>
|
funcom_train/9644993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Color getColorForNode(CausalSGNode node) {
ExtendedSGCausalGraphBuilder builder = cell.getBuilder();
if (!builder.isUseColors()) {
return Color.lightGray;
} else if (node instanceof TargetSGNode) {
return builder.getTargetNodeColor();
} else if (node instanceof NonCausalSGNode) {
return builder.getNonCausalNodeColor();
} else if (node instanceof CausalACausalSGNode) {
return builder.getACausalNodeColor();
} else {
return builder.getStandardNodeColor();
}
}
COM: <s> gets the color for node </s>
|
funcom_train/20245349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectElement(int x, int y) {
for (Iterator iter = actionsList.iterator(); iter.hasNext();) {
MillingAction action = (MillingAction) iter.next();
if (action.containsPoint(x, y) && action.matches(selectionMask)) {
action.setSelected(true);
surface.drawAction(action);
}
}
fireSelectionChanged();
}
COM: <s> highlights the current trace as the selected trace </s>
|
funcom_train/3461291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleAction() {
String beanText = this.textfield.getText();
try {
Object obj = Beans.instantiate(this.getClass().getClassLoader(), beanText);
setValue(obj);
} catch (Exception ex) {
JOptionPane.showMessageDialog(getPanel(), "Can't find or load\n" + beanText);
}
}
COM: <s> callback method which gets handled for action performed </s>
|
funcom_train/13864676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEffectiveL2MaxSize(int effectiveL2MaxSize) {
if (isL2Available()) {
this.effectiveL2MaxSize = effectiveL2MaxSize;
this.effectiveMaxSize = this.effectiveL1MaxSize + this.effectiveL2MaxSize;
} else if (effectiveL2MaxSize > 0) {
throw new IllegalStateException("L2 caching is not allowed. Check that you have write acces to the temp directory.");
}
}
COM: <s> sets the effective l2 disk maximum size </s>
|
funcom_train/8486912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Noeud_LA node(int val){
if(val==valeur){// on se trouve dans le bon noeud
return this;
} else{//sinon on recherche au noeud suivant...
Iterator<Noeud_LA> iter = liste_fils.iterator();
while (iter.hasNext()) {
Noeud_LA fils = iter.next();
if(fils.node(val)!=null) {
return fils.node(val);
}
}
}
return null;
}
COM: <s> get a node from its value </s>
|