__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3702663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Tuple getGroupsTuple() {
Tuple tGroups = getTuple().getTupleByType(Group.TUPLE_GROUPS);
if (tGroups == null) {
tGroups = new Tuple(Group.TUPLE_GROUPS);
getTuple().addTuple(tGroups);
}
return (tGroups);
} // of method
COM: <s> get or create the groups tuple </s>
|
funcom_train/37062057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void jButtonTryActionPerformed() {
jTextResult.setText( "" );
jProgressBarTime.setValue(0);
jButtonTry.setEnabled(false);
jButtonClose.setEnabled(false);
if ( !processBarThread.isAlive() ) {
processBarThread = new Thread( this, "ThreadProcessBar" );
processBarThread.start();
}
}
COM: <s> try a connection </s>
|
funcom_train/35087476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSampleLabel(boolean includeGroup) {
if (includeGroup) {
StringBuffer sb = new StringBuffer(threadName.substring(0,threadName.lastIndexOf(" "))); //$NON-NLS-1$
return sb.append(":").append(label).toString(); //$NON-NLS-1$
}
return label;
}
COM: <s> get the sample label for use in summary reports etc </s>
|
funcom_train/31209573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteRow(int row) {
rowCount--;
Object[][] newdata=new Object[rowCount][];
if(row>0) {
System.arraycopy(data,0,newdata,0,row);
}
if(rowCount-row>0) {
System.arraycopy(data,row+1,newdata,row,rowCount-row);
}
data=newdata;
reset();
}
COM: <s> delete a specific row and reset the cursor </s>
|
funcom_train/5343477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRecordLength() {
return 12 // header
+ getOptionsLength() + calculatePaddingLength(getOptionsLength())
+ getIdLength() + calculatePaddingLength(getIdLength())
+ getTypeLength() + calculatePaddingLength(getTypeLength())
+ getDataLength() + calculatePaddingLength(getDataLength());
}
COM: <s> determines the length of the full record </s>
|
funcom_train/19704585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEndTagForbidden() {
if (getStartTagType()!=StartTagType.NORMAL)
return getStartTagType().getCorrespondingEndTagType()==null;
if (HTMLElements.getEndTagForbiddenElementNames().contains(name)) return true;
if (HTMLElements.getElementNames().contains(name)) return false;
return isEmptyElementTag();
}
COM: <s> indicates whether a matching end tag is forbidden </s>
|
funcom_train/17201131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reportCompilationRate(int compiler, double rate) {
if (Controller.options.LOGGING_LEVEL >= 1) {
synchronized (log) {
log.println(getTime() +
" Compilation Rate (bytecode/msec) for " +
CompilerDNA.getCompilerString(compiler) +
" compiler: " +
rate);
}
}
}
COM: <s> this method reports the basic compilation rate for a compiler </s>
|
funcom_train/34127945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMnemonics(char ok,char cancel) {
//System.out.println(okButton.getMnemonic());
if(okButton.getMnemonic()==0) {
okButton.setMnemonic(ok);
}
if(cancelButton.getMnemonic()==0) {
cancelButton.setMnemonic(cancel);
}
//turn off the automatic mnemonics
this.useMnemonics = false;
}
COM: <s> sets the mnemonic of the ok and cancel button </s>
|
funcom_train/22163476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createUI() {
handleLabel = new JLabel("Handle:");
passwordLabel = new JLabel("Password:");
handleField = new JTextField();
passwordField = new JPasswordField();
passwordStore = new JCheckBox("Store password");
autologin = new JCheckBox("Autologin");
serversBox = new JComboBox(serversBoxModel);
}
COM: <s> creates the components of this panel </s>
|
funcom_train/44589856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void matchReportImportRef(ImportReference importRef, Binding binding, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
if (locator.encloses(element)) {
// default is to report a match as a regular ref.
this.matchReportReference(importRef, element, null/*no binding*/, accuracy, locator);
}
}
COM: <s> reports the match of the given import reference </s>
|
funcom_train/45129483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean buyFactory(Factory purch) {
if (purch != null && purch.canBeBought(this)
&& getTotalCash() >= purch.getCost()) {
researchNeeded += purch.researchNeeded();
factories.add(purch);
paymentAmount += purch.getCost();
return true;
}
else {
return false;
}
}
COM: <s> handle a purchase of person robot or factory </s>
|
funcom_train/49639804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCharToCharArray() {
try {
ReplaceFactory factory = new ReplaceFactory(
RuleParser.parse(RuleParser.sanitize("", true, Rules.ALL_TRANSLITERATIONS)));
ReplaceReader replacer = factory.getReplacer();
assertNotNull(replacer);
} catch (Exception e) {
e.printStackTrace();
fail("Exception thrown");
}
}
COM: <s> test char to char array </s>
|
funcom_train/14653539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeVariable(List<Object[]> list, String variable) {
Object[] removeObject = null;
for (Object[] x : list) {
if (x[0].toString().equals(variable)) {
removeObject = x;
break;
}
}
list.remove(removeObject);
}
COM: <s> remove a variable with </s>
|
funcom_train/45542766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTypeParameterIntroducer(String identifier) {
return identifier.length() > 0
&& (Character.isUpperCase(identifier.charAt(0))
|| identifier.startsWith("final") //$NON-NLS-1$
|| identifier.startsWith("public") //$NON-NLS-1$
|| identifier.startsWith("public") //$NON-NLS-1$
|| identifier.startsWith("protected") //$NON-NLS-1$
|| identifier.startsWith("private")); //$NON-NLS-1$
}
COM: <s> returns code true code if code identifier code is an identifier </s>
|
funcom_train/50169102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keepValue() {
if (isDirty() == false) {
return;
} //end if ()
String selectedValue = (String) comboBox.getSelectedItem();
String none
= PedroResources.getMessage("globalConstants.none");
if ( selectedValue.equals(none) == true) {
groupFieldModel.setValue(PedroResources.EMPTY_STRING);
} //end if ()
else {
groupFieldModel.setValue(selectedValue);
} //end else
}
COM: <s> commits the value in the combination box to the value in </s>
|
funcom_train/39973796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Sphere getBoundingSphere() {
float radius = 0;
getCentroid();
for (Vertex v : vertices.values()) {
radius = MathUtils.max(radius, v.distanceToSquared(centroid));
}
return new Sphere(centroid, (float) Math.sqrt(radius));
}
COM: <s> computes returns the bounding sphere of the mesh </s>
|
funcom_train/40540318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetStringForEach() {
JsRpcSetString set = JsRpcSetString.create();
set.add("");
set.add("watch");
final boolean[] result = new boolean[2];
assertTrue(set.forEach(new JsRpcStringProcedure() {
public boolean execute(String value) {
if (value.equals("")) {
result[0] = true;
} else if (value.equals("watch")) {
result[1] = true;
} else {
fail("Unexpected value: " + value);
}
return true;
}
}));
assertTrue(result[0]);
assertTrue(result[1]);
}
COM: <s> tests the for each method over a set </s>
|
funcom_train/33901341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InfoType get (Key key){
if( _head == null ) { return null; }
Node<InfoType> holder = _head;
while ( holder != null ) {
if ( holder.getData().getKey().equals(key) ) {
return holder.getData();
}
holder = holder.getNext();
}
return null;
}
COM: <s> returns the instance with given key </s>
|
funcom_train/36258973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Database synchDatabase(@NotNull final Database database) throws IOException, SQLException, IllegalArgumentException, DBValueException {
synchronized (inventory) {
returnDatabase(database);
final InventoryEntry entry = findEntryForDatabase(database);
if (entry == null) {
throw new IllegalArgumentException("this database is not in the inventory");
}
return entry.borrowDatabase();
}
}
COM: <s> synchronize the borrowed database into the inventory and give it back </s>
|
funcom_train/7867245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void treeNodeSelection() {
Object o = iTree.getLastSelectedPathComponent();
if (o instanceof PeptideIdentification) {
if (iTabbedPane.getTabCount() != 0) {
iTable.setColumnSelectionInterval(1, 1);
}
iTabbedPane.addTabID((PeptideIdentification) o);
}
}
COM: <s> sync handling table tabs of the mediator when a tree node is selected </s>
|
funcom_train/3576534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JProgressBar getBarraProgreso() {
if (barraProgreso == null) {
barraProgreso = new JProgressBar();
barraProgreso.setUI(new BasicProgressBarUI());
barraProgreso.setBounds(122,200,200,17);
barraProgreso.setValue(20);
barraProgreso.setBorder(BorderFactory.createLineBorder(SwingFtolConstantes.AMARILLO_OSCURO));
barraProgreso.setForeground(SwingFtolConstantes.AMARILLO);
barraProgreso.setStringPainted(true);
}
return barraProgreso;
}
COM: <s> returns the barra progreso </s>
|
funcom_train/3562520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getPortField() {
if (portField == null) {
portField = new JTextField();
portField.setEditable(false);
portField.setText("10099");
portField.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
login();
}
});
}
return portField;
}
COM: <s> this method initializes j text field1 </s>
|
funcom_train/42548468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSiteIndex(Site site) {
int turnedOffAdjust = 0;
int i = 0;
for (Site oSite : sites) {
if (turnedOffSites.contains(oSite)) {
turnedOffAdjust++;
continue;
}
if (site.equals(oSite)) {
return i - turnedOffAdjust;
}
i++;
}
System.err.println("Can't find index of site " + site);
return -1;
}
COM: <s> returns the index for the given category </s>
|
funcom_train/26098299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getTxtProxyChainSkipName() {
if (txtProxyChainSkipName == null) {
txtProxyChainSkipName = new JTextArea();
txtProxyChainSkipName.setFont(new Font("Dialog", Font.PLAIN, 11));
txtProxyChainSkipName.setMinimumSize(new Dimension(0,32));
txtProxyChainSkipName.setRows(2);
}
return txtProxyChainSkipName;
}
COM: <s> this method initializes txt proxy chain skip name </s>
|
funcom_train/16758955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performAction(InputActionEvent evt) {
vehicle.drift(evt.getTime());
Vector3f loc = vehicle.getLocalTranslation();
loc.addLocal(vehicle.getLocalRotation().getRotationColumn(2, tempVa)
.multLocal(vehicle.getVelocity() * evt.getTime()));
vehicle.setLocalTranslation(loc);
}
COM: <s> the action calls the vehicles drift command which adjusts its velocity </s>
|
funcom_train/9748156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValve(boolean valveOpen) throws IOException {
if(valvePulseTime < 0)
return;
if(!wasAvailable())
{
Debug.d("Attempting to control or interrogate non-existent extruder for " + material);
return;
}
if(valveOpen)
Debug.d("Opening valve.");
else
Debug.d("Closing valve.");
waitTillNotBusy();
communicator.lock();
try {
OutgoingMessage request =
new OutgoingByteMessage(valveOpen ? MSG_ValveOpen : MSG_ValveClosed,
(byte)valvePulseTime);
communicator.sendMessage(snap, request);
}
finally {
communicator.unlock();
}
}
COM: <s> open or close the valve </s>
|
funcom_train/46265228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void EventReceived(Event e){
connectionEvent = e;
if (e instanceof ConnStateEvent){
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
connLogs.setText(connectionEvent.getDetails()+"\n");
}
});
} else if (e instanceof MassSpectrometerStateEvent){
lastEventLogs.setText(e.toString());
}
}
COM: <s> called when packet processor encounters a server related event </s>
|
funcom_train/26257053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MappingClass getMappingClass(String name) {
MappingClass x = (MappingClass) myClasses.get(name);
if (x == null) {
x = new MappingClass(name);
ChangeLog.makeNote("new Class " + name + " added.");
x.setModel(this);
x.setId(IdGenerator.getInstance().getNext());
if (name.length() > 0) {
myClasses.put(name, x);
}
} // end of if (x == null)
return x;
}
COM: <s> getting a mapping class if it is not there create it and </s>
|
funcom_train/44021068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getOptionsRendereringForceBulletColorCheckBox() {
if (optionsRendereringForceBulletColorCheckBox == null) {
optionsRendereringForceBulletColorCheckBox = new JCheckBox("Make all bullets white");
optionsRendereringForceBulletColorCheckBox.setMnemonic('M');
optionsRendereringForceBulletColorCheckBox.addActionListener(eventHandler);
}
return optionsRendereringForceBulletColorCheckBox;
}
COM: <s> return the options renderering force bullet color box </s>
|
funcom_train/26020356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Uri addOneToOneChatError(String contact, String sessionId){
return addMessage(EventsLogApi.TYPE_CHAT_SYSTEM_MESSAGE, sessionId, null, contact, null, InstantMessage.MIME_TYPE, null, 0, new Date(), EventsLogApi.STATUS_FAILED);
}
COM: <s> a one to one chat session had an error </s>
|
funcom_train/3740143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLogin(AllUser user) throws UserManagerException {
String ret=null;
try {
Session sess= HibernateUtil.currentSession();
if (user.getUser()==null) {
ret = user.getDeletedUser().getLogin();
} else {
ret = user.getUser().getLogin(); }
} catch (HibernateException e) {
throw new UserManagerException();
}
return ret;
}
COM: <s> return login field of the given user </s>
|
funcom_train/38384863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void mouseClick(int gap, int which, int clickCount) {
REDView view = (REDView) fEditor.getView();
REDViewPosition vp = view.locatePosition(gap, null);
MouseEvent m = new MouseEvent(view, MouseEvent.MOUSE_PRESSED, now(), which,
vp.getUpperLeftPoint().x, vp.getUpperLeftPoint().y, clickCount, false);
fEditor.getController().mousePressed(m);
}
COM: <s> simulate mouse click </s>
|
funcom_train/20029353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand1() {
if (exitCommand1 == null) {//GEN-END:|47-getter|0|47-preInit
// write pre-init user code here
exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|47-getter|1|47-postInit
// write post-init user code here
}//GEN-BEGIN:|47-getter|2|
return exitCommand1;
}
COM: <s> returns an initiliazed instance of exit command1 component </s>
|
funcom_train/37740823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String workflowEngineInstanceKey () {
if (installationId == null) {
installationId = (String)confProps.get("InstallationId");
if (installationId == null) {
installationId = getDbId() + ";" + System.currentTimeMillis();
confProps.put("InstallationId", installationId);
modified = true;
}
}
return installationId;
}
COM: <s> returns an installation id for the component </s>
|
funcom_train/37803541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAll(Collection toRemove) {
for (Iterator iterator = toRemove.iterator(); iterator.hasNext();) {
Object obj = iterator.next();
if (obj instanceof EdgedGraphNode) {
EdgedGraphNode node = (EdgedGraphNode)obj;
remove(node);
} else {
removeEdge((GraphEdge)obj);
}
}
}
COM: <s> removes objects collected in code to remove code </s>
|
funcom_train/23855161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calcPosition() {
posY = (model.getDissimilarity() * normalizingFactor);
// x-pos is in the middle between child nodes
posX = Math.round((getLeftChild().getPosX() + getRightChild().getPosX()) / 2);
treeWidth = OFFSETX + getLeftChild().getTreeWidth() + getRightChild().getTreeWidth();
}
COM: <s> calculates the own position in relation to the child nodes </s>
|
funcom_train/21157488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidDatasource1() {
try {
JSSPConfigFile cfgFile = new JSSPConfigFile("tests/jssp/jssp_hsqldb_datasource.xml",
Locale.getDefault(), System.getProperty("file.encoding"), "1.0");
} catch (SAXException e) {
e.printStackTrace();
fail();
} catch (IOException e) {
e.printStackTrace();
fail();
}
}
COM: <s> test file with invalid datasource specification </s>
|
funcom_train/15694819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void preSelect(Population<T> pop, Filter filter) {
this.filter = filter;
this.population = pop;
this.matingPool.clear();
for (Iterator<Individual<T>> it = pop.iterator(this.filter); it.hasNext();) {
this.matingPool.add(it.next());
}
}
COM: <s> sets up the selection state according a populations state </s>
|
funcom_train/8088402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities getCapabilities() {
Capabilities result = new Capabilities(this);
result.disableAll();
// attributes
result.enable(Capability.NOMINAL_ATTRIBUTES);
result.enable(Capability.NUMERIC_ATTRIBUTES);
result.enable(Capability.MISSING_VALUES);
// class
result.enable(Capability.NO_CLASS);
//result.enable(Capability.NUMERIC_CLASS);
//result.enable(Capability.NOMINAL_CLASS);
return result;
}
COM: <s> returns default capabilities of hot spot </s>
|
funcom_train/22962545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void identifiedKey(String keyName, int startIndex, int endIndex) {
if (stringPosition == null) {
stringPosition = new ArrayList<StringPosition>();
}
String key = new String(buffer, startIndex + 2, endIndex - startIndex - 3);
StringPosition pos = new StringPosition(key, startIndex, endIndex);
stringPosition.add(pos);
indexes.reset();
}
COM: <s> as for search key listener </s>
|
funcom_train/25563296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Plot createSolutionPlot(){
Plot plot = createPlot();
plot.setToolTipText(getString("FuncTooltip"));
plot.setXName("x"); plot.setYName("f");
plot.addCurve(createHCurve(Color.RED, 0, null)); //interpolating function
plot.addCurve(createCurve(Color.BLUE, 0, null)); //data function
return plot;
}
COM: <s> creates an empty code plot code used as a solution plot </s>
|
funcom_train/24628587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void link(INode p, String txt, int eoff, Object target) {
Leaf l = new LeafAscii(txt,null, p);
HyperlinkSpan hspan = (HyperlinkSpan)Behavior.getInstance("uri","HyperlinkSpan",null, null, getLayer());
hspan.setTarget(target);
hspan.moveq(l,0, l,l.size()-eoff);
}
COM: <s> add the passed text making it a hyperlink </s>
|
funcom_train/46278420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte[] b, int off, int len) throws java.io.IOException {
if (closed) {
throw new java.io.IOException(Messages.getMessage("streamClosed"));
}
if (eos) {
return -1;
}
int read = soapStream.read(b, off, len);
if (read < 0) {
eos = true;
}
return read;
}
COM: <s> read the root stream </s>
|
funcom_train/43352622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
if (selection.hasSelection()) {
textContent.delete(selection);
selection.resetTo(selection.from());
} else {
textContent.deleteLeft(cursor);
cursor.left();
selection.resetTo(cursor);
}
isSaved = false;
markDamaged();
}
COM: <s> delete the character to the left of the cursor </s>
|
funcom_train/25637791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassUse(Content contentTree) throws IOException {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.addStyle(HtmlStyle.blockList);
if (configuration.packages.length > 1) {
addPackageList(ul);
addPackageAnnotationList(ul);
}
addClassList(ul);
contentTree.addContent(ul);
}
COM: <s> add the class use documentation </s>
|
funcom_train/27947124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAtomPropertiesFromFile(String propertiesFile) {
try {
AtomTypeSet ats1 = new AtomTypeSet();
ats1.load(new java.io.FileInputStream(propertiesFile));
} catch(Exception e1) {
e1.printStackTrace ();
}
typesReady = true;
displayIfAreWeReady();
}
COM: <s> takes the argument reads it as a file and allocates this as </s>
|
funcom_train/14296172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ElementSet RequiredAttribute() {
if (myRequiredAttribute == null) {
myRequiredAttribute = new ElementSet();
for (Iterator iter = Requirement().iterator(); iter.hasNext();) {
Dependency d = (Dependency) iter.next();
if (d instanceof Cm3RequiresDependency) {
myRequiredAttribute.add(d);
}
}
}
return myRequiredAttribute;
}
COM: <s> returns the value of field required attribute </s>
|
funcom_train/51299725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMenuSpecificationIdASGoodsId(int mi_id) {
String sql = "SELECT ref_goods FROM menu_tree WHERE id = " + mi_id;
ResultSet res = null;
try {
res = DBAccessor.getInstance().makeSelect(sql);
if (res.next()) {
return res.getInt("ref_goods");
}
} catch (SQLException ex) {
ex.printStackTrace();
} finally {
DBAccessor.getInstance().releaseConnection(res);
}
return 0;
}
COM: <s> retrieve goods id by menu item description </s>
|
funcom_train/42822173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getDetails() {
if (details == null) {//GEN-END:|25-getter|0|25-preInit
// write pre-init user code here
details = new TextField("Details", null, 32, TextField.ANY);//GEN-LINE:|25-getter|1|25-postInit
// write post-init user code here
}//GEN-BEGIN:|25-getter|2|
return details;
}
COM: <s> returns an initiliazed instance of details component </s>
|
funcom_train/17006477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLink(Node n1, Node n2, int linkId, String linkType) {
// first check if the pair of nodes is present in the list
LinkDetails link = getLinkDetails(n1, n2);
if (link == null) {
// first insert the new LinkDetails record
link = new LinkDetails(n1, n2);
link.linkColor = getLinkColor(n1, n2);
links.add(link);
}
link.insertLinkForNode(linkId, linkType);
linkCount++;
}
COM: <s> adds a link between the specified node pair </s>
|
funcom_train/3370575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setApproveButtonToolTipText(String toolTipText) {
if(approveButtonToolTipText == toolTipText) {
return;
}
String oldValue = approveButtonToolTipText;
approveButtonToolTipText = toolTipText;
firePropertyChange(APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY, oldValue, approveButtonToolTipText);
}
COM: <s> sets the tooltip text used in the code approve button code </s>
|
funcom_train/11297010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Integer toInteger(Object arg) {
if (arg == null) {
return null;
}
if (arg instanceof Number) {
return Integer.valueOf(((Number) arg).intValue());
}
try {
return Integer.valueOf(arg.toString());
} catch (NumberFormatException xnumber) {
return null;
}
}
COM: <s> coerce an object to an integer </s>
|
funcom_train/48407559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addImportedPackagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PackageImport_importedPackage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PackageImport_importedPackage_feature", "_UI_PackageImport_type"),
SpemxtcompletePackage.eINSTANCE.getPackageImport_ImportedPackage(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the imported package feature </s>
|
funcom_train/41761671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prev() {
if (hasPrev()) {
currentPage = pagesIterator.previous();
if(viewAnimator != null && cachedContext != null) {
viewAnimator.setInAnimation(cachedContext,R.anim.slide_from_left);
viewAnimator.setOutAnimation(cachedContext,R.anim.slide_to_right);
viewAnimator.showPrevious();
}
}
}
COM: <s> goes back to the previous page in the sequence </s>
|
funcom_train/2994121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void allocate(int n) {
if (n < 10) n = 10;
points = new Vector(n,10);
for (int k=0; k<GraphSettings.N_AXES; k++) {
maxValue[k] = -GraphSettings.INF;
minValue[k] = GraphSettings.INF;
lowestNonZeroValue[k] =GraphSettings.INF;
}
}
COM: <s> allocation of memory for the data points </s>
|
funcom_train/44854796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() throws VException {
VIFContext lContext = (VIFContext)getContext();
ViewStack lStack = lContext.getViewStack();
if (!lStack.empty()) {
Object lView = lStack.pop();
if (lView instanceof IPage) {
IPage lPage = (IPage)lView;
lPage.clearStatusMessage();
lPage.clearErrorMessage();
lContext.set(AbstractContext.VIEW, lPage);
}
}
}
COM: <s> displays the view from the view stack </s>
|
funcom_train/34339774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand9() {
if (okCommand9 == null) {//GEN-END:|57-getter|0|57-preInit
// write pre-init user code here
okCommand9 = new Command("Enviar", Command.OK, 0);//GEN-LINE:|57-getter|1|57-postInit
// write post-init user code here
}//GEN-BEGIN:|57-getter|2|
return okCommand9;
}
COM: <s> returns an initiliazed instance of ok command9 component </s>
|
funcom_train/49159843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newSeason() {
teamStats = new Vector<TeamStats>();
teamStatsGroup = new Vector<TeamStats>();
teamStatsLeague = new Vector<TeamStats>();
this.teamStatsTotal = new TeamStats(this, null);
this.getSponsoring().newSeason();
}
COM: <s> reset team stats etc </s>
|
funcom_train/43645855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createNsString(int... namespaces) {
String namespaceString = "";
if (namespaces != null && namespaces.length != 0) {
namespaceString = new String();
for (int nsNumber : namespaces) {
namespaceString += nsNumber + "|";
}
// remove last '|'
if (namespaceString.endsWith("|")) {
namespaceString = namespaceString.substring(0, namespaceString
.length() - 1);
}
}
return namespaceString;
}
COM: <s> helper method generating a namespace string as required by the mw api </s>
|
funcom_train/8408120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object toReference(int type, Object referent, int hash) {
switch (type) {
case HARD: return referent;
case SOFT: return new SoftRef(hash, referent, parent.queue);
case WEAK: return new WeakRef(hash, referent, parent.queue);
default: throw new Error();
}
}
COM: <s> constructs a reference of the given type to the given referent </s>
|
funcom_train/4852795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItemResult() {
if (stringItemResult == null) {//GEN-END:|51-getter|0|51-preInit
// write pre-init user code here
stringItemResult = new StringItem("Resultado:", null);//GEN-LINE:|51-getter|1|51-postInit
// write post-init user code here
}//GEN-BEGIN:|51-getter|2|
return stringItemResult;
}
COM: <s> returns an initiliazed instance of string item result component </s>
|
funcom_train/13699298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshVisuals() {
Point loc = getWorkflowSubpart().getLocation();
Dimension size= getWorkflowSubpart().getSize();
Rectangle r = new Rectangle(loc ,size);
((NodeFigure) this.getFigure()).setText(((WorkflowSubpart) this.getModel()).getName());
((GraphicalEditPart) getParent()).setLayoutConstraint(
this,
getFigure(),
r);
}
COM: <s> updates the visual aspect of this </s>
|
funcom_train/9186241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PackageSymbol enterPackage(Name fullname) {
PackageSymbol p = packages.get(fullname);
if (p == null) {
Assert.check(!fullname.isEmpty(), "rootPackage missing!");
p = new PackageSymbol(
Convert.shortName(fullname),
enterPackage(Convert.packagePart(fullname)));
p.completer = this;
packages.put(fullname, p);
}
return p;
}
COM: <s> make a package given its fully qualified name </s>
|
funcom_train/6401810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processController(controllerType controller) throws Exception {
// skin and morph are mutually exclusive.
if (controller.hasskin()) {
// there can only be one skin per controller
processSkin(controller.getid().toString(), controller.getskin());
} else if (controller.hasmorph()) {
// more not currently supported.
}
}
COM: <s> controllers define how one object interacts with another </s>
|
funcom_train/38536244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEarliestEndTime() {
int eet = Integer.MAX_VALUE;
for (int i=0; i<possibleResourceIndexList.size(); i++) {
int thisEet = ((ActResourceDomain)resources.get(possibleResourceIndexList.get(i))).getEarliestEndTime();
if (thisEet < eet) {
eet = thisEet;
}
}
return eet;
}
COM: <s> returns the earliest time that this operation could end </s>
|
funcom_train/45741043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem1 () {
if (stringItem1 == null) {//GEN-END:|55-getter|0|55-preInit
// write pre-init user code here
stringItem1 = new StringItem ("Instruction:", "Touch the tag you want to write to...");//GEN-LINE:|55-getter|1|55-postInit
// write post-init user code here
}//GEN-BEGIN:|55-getter|2|
return stringItem1;
}
COM: <s> returns an initiliazed instance of string item1 component </s>
|
funcom_train/47546734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont (Font font) {
checkLayout ();
if (font != null && font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (this.font == font) return;
if (font != null && font.equals(this.font)) return;
this.font = font;
OS.pango_layout_set_font_description(layout, font != null ? font.handle : 0);
}
COM: <s> sets the default font which will be used by the receiver </s>
|
funcom_train/40873678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getXMLGraphical() {
Element result = new Element(XMLObjectName.GRAPHICAL);
graphicalFactory.setGraphicalInformations(graphicalInformations);
for(Entry<IFormatable, PointList> e : graphicalInformations.entrySet()) {
Element xml = (Element) e.getKey().getFormator(graphicalFactory).format(e.getKey());
result.addContent(xml);
}
return result;
}
COM: <s> return the xml representation of the graphical informations </s>
|
funcom_train/49463638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccessMode(int _privilege) throws Exception {
if (folder != null)
_logger.warn("Trying to set Folder access mode when it is already connected.");
switch (_privilege) {
case Folder.READ_ONLY : privilege = Folder.READ_ONLY; break;
case Folder.READ_WRITE : privilege = Folder.READ_WRITE; break;
default : throw new Exception("Undefined Folder access mode ("+_privilege+")");
}
}
COM: <s> sets the access mode to the folder </s>
|
funcom_train/1728826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configureRandomSongSelector() {
String randomizer = props.getProperty("streamsicle.randomizer");
try {
randomSongSelector = (IRandomSelector) Class.forName(randomizer)
.newInstance();
} catch (Exception e) {
log
.error("IRandomSelector could not be configured, using the default");
e.printStackTrace();
randomSongSelector = new RandomSelector();
}
}
COM: <s> configures the random song selector object </s>
|
funcom_train/43753019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getItemIndexInCart(String itemName) {
for(int i=0; i<itemCartTable.getRowCount(); i++) {
String rowItemName = itemCartTable.getText(i, 1);
if (rowItemName.equals(itemName)) {
return i;
}
}
return -1;
}
COM: <s> returns 1 if none found </s>
|
funcom_train/3516697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void spaceNotFoundException(SpaceNotFoundException snfe) {
logger.log(Level.WARNING, snfe.getLocalizedMessage(), snfe);
JOptionPane.showMessageDialog(jpmDDSO, Resources.getI18NString(Constants.MANAGER_NOT_AVAILABLE_MSG), Resources.getI18NString(Constants.MANAGER_UNAVAILABLE), JOptionPane.WARNING_MESSAGE);
}
COM: <s> this method displays a dialog box when a space not found exception occurs </s>
|
funcom_train/46767497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScriptModel getScript(final long scriptId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
if (call.isStoreAudit()) {
BaseData.getSecurity().storeAudit(call.getUserRefId(), scriptId, "Viewed Script", call);
}
return SecurityData.getScript(scriptId, call);
}}; return (ScriptModel) call(method, call);
}
COM: <s> return the single script model for the primary key </s>
|
funcom_train/45018413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNXfermiChopperPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXinstrument_nXfermiChopper_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXinstrument_nXfermiChopper_feature", "_UI_NXinstrument_type"),
NexusPackageImpl.Literals.NXINSTRUMENT__NXFERMI_CHOPPER,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the nxfermi chopper feature </s>
|
funcom_train/5593021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void add(User user) {
// If a user already exists, remove him and add him again
// to catch any mode changes.
String nick = user.getVisibleNick();
if (users.containsKey(nick)) {
// an existing user has been promoted/demoted;
// remove his existing entry,
// re-add this user with his new modes
remove(user);
}
// a new user has joined
GuiUser thisUser = new GuiUser(user);
users.put(nick, thisUser);
listModel.add(thisUser);
updateUserCountLabel();
}
COM: <s> adds all the users in the specified array to the list </s>
|
funcom_train/11723984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void skip(long skipNum) throws NoSuchElementException {
if (skipNum < 0) {
throw new IllegalArgumentException("skipNum must not be negative");
}
if (skipNum == 0) {
// do nothing
} else {
rows.skip(skipNum - 1);
pos += skipNum - 1;
fetchNext();
}
}
COM: <s> skip a number of code node code s in this iterator </s>
|
funcom_train/3420548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setSawFallback(int depth, boolean val) {
if (depth >= fSawFallback.length) {
boolean[] newarray = new boolean[depth * 2];
System.arraycopy(fSawFallback, 0, newarray, 0, fSawFallback.length);
fSawFallback = newarray;
}
fSawFallback[depth] = val;
}
COM: <s> records that an lt fallback gt was encountered at the specified depth </s>
|
funcom_train/14636482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminate()
{ retransmission_to.halt();
m_timerClearingTo.halt();
end_to.halt();
if (stateIs(STATE_TRYING)) m_sipProvider.removeSipProviderListener(new TransactionIdentifier(SipMethods.INVITE));
else m_sipProvider.removeSipProviderListener(m_transactionID);
changeState(STATE_TERMINATED);
transaction_listener=null;
}
COM: <s> method used to drop an active transaction </s>
|
funcom_train/51193541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handlePipeletException( MessageContext messageContext, Exception e ) {
e.printStackTrace();
if( messageContext.getErrors() == null || messageContext.getErrors().size() == 0) {
ErrorDescriptor ed = new ErrorDescriptor("Pipelet processing aborted: " + e.getMessage() );
ed.setCause( e );
messageContext.addError( ed );
}
}
COM: <s> convenience method to avoid duplicate code </s>
|
funcom_train/43473798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send (String recipient, String message) {
try {
AccIm im = session.createIm(message,null);
recipient = recipient.split("@")[0];
AccImSession imSession = session.createImSession(recipient, AccImSessionType.Im);
imSession.sendIm(im);
} catch (Exception ex) {System.out.println(new Date() + "\tCaught in AIMBot.send()");ex.printStackTrace();}
}
COM: <s> send a message to a recipient </s>
|
funcom_train/5713463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetterMethods(){
KeypadFacility kf = new KeypadFacility();
kf.setKeypadInformation("hallo".toCharArray());
KeypadFacility test = kf;
assertEquals("check keypadInformation", "hallo", String.valueOf(test.getKeypadInformation()));
}
COM: <s> tests the correct functionality of the setter methods </s>
|
funcom_train/22354218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
JPanel mainPanel = new JPanel(new BorderLayout());
planner = createTable();
mainPanel.add(createMenuBar(), BorderLayout.NORTH);
mainPanel.add(new JScrollPane(planner), BorderLayout.CENTER);
this.add(mainPanel);
setPreferredSize(new Dimension(800, 500));
pack();
}
COM: <s> create and initialize gui </s>
|
funcom_train/49319693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnselectedColor(Color color) {
if (color != fUnselectedColor) {
Color oldColor = fUnselectedColor;
try {
fUnselectedColor = color;
fChangeSupport.fireVetoableChange(TimeLineNode.UNSELECTED_COLOR,
oldColor, color);
} catch (DetailedPropertyVetoException ex) {
fUnselectedColor = oldColor;
} catch (PropertyVetoException ex) {
ex.printStackTrace();
}
}
}
COM: <s> set the unselected color for the time line node </s>
|
funcom_train/29985216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTTPHeader get400 (Exception exception) {
// in most cases we should have a header out already, but to be sure...
HTTPHeader header = getHeader ("HTTP/1.0 400 Bad Request ");
StringBuilder accreq =
new StringBuilder (HTMLPage.getPageHeader (con, "400 Bad Request") +
"Unable to handle request:<br><b><XMP>\n" +
exception +
"</XMP></b></body></html>\n");
header.setContent (accreq.toString ());
return header;
}
COM: <s> get a 400 bad request header for the given exception </s>
|
funcom_train/25072320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Session getSessionForPacket(byte[] packet) {
Session session = new Session(Session.getPacketSessionId(packet));
int idx = Collections.binarySearch(this.sessions,
session,
SESSION_ID_COMPARATOR);
if (idx >= 0) {
session = (Session) this.sessions.elementAt(idx);
} else {
this.sessions.insertElementAt(session, -idx - 1);
}
return session;
}
COM: <s> receives a non code null code code byte code containing valid </s>
|
funcom_train/3760201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAveragePrice(UserId exclude, double cost) {
double ab = getAverageBid(exclude,cost);
double aa = getAverageAsk(exclude,cost);
double ap = (ab + aa)/2;
//System.out.println("AvgBid=" + ab + " AvgAsk=" + aa +
// " AvgPrice=" + ap);
return ap;
}
COM: <s> return the average of get average bid and get average cost </s>
|
funcom_train/32761963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateProgressBar(){
try{
int progress = (int) (100.0*ws.getPos()/scanLength);
wsProgressBar.setValue(progress);
}
catch(ConnectionException ce){
wsProgressBar.setValue(0);
hasToStop = true;
messageTextLocal.setText("Cannot scan! Connection to WS is lost!");
}
catch(GetException ge){
wsProgressBar.setValue(0);
hasToStop = true;
messageTextLocal.setText("Cannot scan! Cannot read the wire position!");
}
}
COM: <s> updates the progress bar </s>
|
funcom_train/38499848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerToJMSTopic(String msgSelector) {
try {
Topic t = _sl.getTopic("topic/raceNotificationTopic");
_ts = _tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
TopicSubscriber subscriber = _ts.createSubscriber(t, msgSelector, true);
subscriber.setMessageListener(this);
} catch (Exception e) {
e.printStackTrace();
}
_suspended = false;
}
COM: <s> register ourself to the jms system </s>
|
funcom_train/2325708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DenseLargeFComplexMatrix2D getFftColumns() {
if (content instanceof DenseLargeFloatMatrix2D) {
if (this.isNoView == true) {
return ((DenseLargeFloatMatrix2D) content).getFftColumns();
} else {
return ((DenseLargeFloatMatrix2D) copy()).getFftColumns();
}
} else {
throw new IllegalArgumentException("This method is not supported");
}
}
COM: <s> returns new complex matrix which is the discrete fourier transform dft </s>
|
funcom_train/22437612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getPartitionOffset(int lineNumber, int columnNumber) {
if(document == null) {
return unknownOffset;
}
try {
int lineStartOffset = document.getLineOffset(lineNumber - 1);
int currentOffset = getOffset(lineNumber, columnNumber);
if (currentOffset != unknownOffset) {
ITypedRegion typedRegion = document.getPartition(currentOffset-2);
return typedRegion.getOffset();
}
else
return lineStartOffset;
}
catch (BadLocationException e) {
//XML parser often returns non-existent location when file ended prematurely
return unknownOffset;
}
}
COM: <s> finds the start offset of a partition given by coordinates </s>
|
funcom_train/9504755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel4() {
if (jPanel4 == null) {
GridLayout gridLayout1 = new GridLayout();
gridLayout1.setRows(1);
gridLayout1.setHgap(10);
jPanel4 = new JPanel();
jPanel4.setName("jPanel4");
jPanel4.setBounds(new Rectangle(113, 271, 156, 26));
jPanel4.setLayout(gridLayout1);
jPanel4.add(getJButton11(), null);
jPanel4.add(getJButton2(), null);
}
return jPanel4;
}
COM: <s> this method initializes j panel4 </s>
|
funcom_train/7497290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getNeighbourhoodAreaIDs(int area) {
Vector rtn = new Vector();
Vector row = (Vector) data.get(area);
for (int i = 0; i < row.size(); i++) {
if (areNeighbours(area, i)) {
rtn.add(new Integer(i));
}
}
return rtn;
}
COM: <s> get the ids of areas on the map </s>
|
funcom_train/45623215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUpdateProjectPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CodeAnalysisType_updateProject_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_updateProject_feature", "_UI_CodeAnalysisType_type"),
MSBPackage.eINSTANCE.getCodeAnalysisType_UpdateProject(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the update project feature </s>
|
funcom_train/17015010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupJob(JobContext context) throws IOException {
if (outputPath != null) {
Path tmpDir = new Path(outputPath, FileOutputCommitter.TEMP_DIR_NAME);
FileSystem fileSys = tmpDir.getFileSystem(context.getConfiguration());
if (!fileSys.mkdirs(tmpDir)) {
LOG.error("Mkdirs failed to create " + tmpDir.toString());
}
}
}
COM: <s> create the temporary directory that is the root of all of the task </s>
|
funcom_train/28660328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLayout() {
GridLayout objectLayout = new GridLayout();
object.setLayout(objectLayout);
GridData objectLData = new GridData();
objectLData.verticalAlignment = GridData.FILL;
objectLData.grabExcessHorizontalSpace = true;
objectLData.horizontalAlignment = GridData.FILL;
objectLData.grabExcessVerticalSpace = true;
object.setLayoutData(objectLData);
}
COM: <s> sets layout specification for this graph </s>
|
funcom_train/19523079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasChanged() {
File file = getFile();
if (!file.exists()) {
if (log.isDebugEnabled()) {
log.debug("File does not exist: " + file);
}
return false;
}
boolean result = (file.lastModified() > lastModified);
lastChecked = System.currentTimeMillis();
return result;
}
COM: <s> check if the configuration has changed since the last time it was loaded </s>
|
funcom_train/10792513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Index getIndex(Discriminator discrim, Column[] cols, boolean adapt) {
Index idx = null;
if (cols.length > 0)
idx = discrim.getMappingRepository().getMappingDefaults().
getIndex(discrim, cols[0].getTable(), cols);
return createIndex(discrim, null, idx, cols, adapt);
}
COM: <s> return the index to set on the discriminator columns or null if none </s>
|
funcom_train/35691631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getNospan() {
if (nospan != null) {
return nospan.booleanValue();
}
ValueBinding vb = getValueBinding("nospan");
Boolean boolVal =
vb != null ? (Boolean) vb.getValue(getFacesContext()) : null;
return boolVal != null ? boolVal.booleanValue() : false;
}
COM: <s> p return the value of the code nospan code property </s>
|
funcom_train/15488670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ZType findTypeLocal(String name) {
if(ZUtils.DEBUG) {
ZUtils.assert_(name != null);
}
ZType t = (ZType) name2type.get(name);
if(t != null) return t;
ZClass c = (ZClass) name2class.get(name);
if(c != null) return c.getType();
ZInterface intf = (ZInterface) name2intf.get(name);
if(intf != null) return intf.getType();
return null;
}
COM: <s> searches a type </s>
|
funcom_train/22233357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderOnce() {
checkViewState("View28", "View29");
synchronized (startStopViewLock) {
if (isRunning) {
throw new IllegalStateException(J3dI18N.getString("View30"));
}
renderOnceFinish = false;
VirtualUniverse.mc.postRequest(MasterControl.RENDER_ONCE, this);
while (!renderOnceFinish) {
MasterControl.threadYield();
}
renderOnceFinish = true;
}
}
COM: <s> renders one frame for a stopped view </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.