__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/15487574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonLoad() {
if (jButtonLoad == null) {
jButtonLoad = new JButton();
jButtonLoad.setText(Application.messages.getString("BUTTON_LOAD"));
jButtonLoad.setBounds(new java.awt.Rectangle(10,5,90,25));
jButtonLoad.setName("jButtonLoad");
jButtonLoad.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
openTextFile();
}
});
}
return jButtonLoad;
}
COM: <s> this method initializes j button load </s>
|
funcom_train/12641473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureCapacity(int minCapacity) {
modCount++;
int oldCapacity = elementData.length;
if (minCapacity > oldCapacity) {
Object oldData[] = elementData;
int newCapacity = (oldCapacity * 3)/2 + 1;
if (newCapacity < minCapacity)
newCapacity = minCapacity;
elementData = new Object[newCapacity];
/* IAI - 15 */
CVM.copyObjectArray(oldData, 0, elementData, 0, size);
/* IAI - 15 */
}
}
COM: <s> increases the capacity of this tt array list tt instance if </s>
|
funcom_train/16454059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrameSize(JFrame frame) {
if (userPrefs.containsKey(PREF_APP_WIDTH) &&
userPrefs.containsKey(PREF_APP_HEIGHT)) {
frame.setSize(getIntValue(PREF_APP_WIDTH),
getIntValue(PREF_APP_HEIGHT));
}
}
COM: <s> sets the size of the frame based on the values set </s>
|
funcom_train/35185318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPdf(String filename) throws IOException, DocumentException {
// step 1
Document document = new Document(new Rectangle(350, 842));
// step 2
PdfWriter.getInstance(document, new FileOutputStream(filename));
// step 3
document.open();
// step 4
showEncodings(document, FONT[0]);
showEncodings(document, FONT[1]);
document.newPage();
showEncodings(document, FONT[2]);
// step 5: we close the document
document.close();
}
COM: <s> creates a pdf document </s>
|
funcom_train/31102483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIdAttribute(int attrIndex) {
int chunk = attrIndex >> CHUNK_SHIFT;
int index = attrIndex & CHUNK_MASK;
int extra = getChunkIndex(fNodeExtra, chunk, index);
extra = extra | IDATTRIBUTE;
setChunkIndex(fNodeExtra, extra, chunk, index);
}
COM: <s> sets type of attribute </s>
|
funcom_train/17201246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBuffer(int[] buffer) {
// ensure buffer is proper length
if (VM.VerifyAssertions) {
VM._assert(buffer.length % 3 == 0);
}
if (DEBUG) {
VM.sysWrite("EdgeListener.setBuffer(", buffer.length, "): enter\n");
}
this.buffer = buffer;
desiredSamples = buffer.length / 3;
resetBuffer();
}
COM: <s> setup buffer and buffer size </s>
|
funcom_train/21304522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createConfigurationGroup(Composite pParent) {
Group configurationGroup = WidgetUtils.createGroup(pParent,
Localization.get("struts2.title.configPage.templateEngine"), 2);
templateEngineCombo = WidgetUtils.createLabelComboPair(configurationGroup,
Localization.get("struts2.label.configPage.templateEngine"),
Struts2ModuleConfig.TEMPLATE_ENGINES );
}
COM: <s> this method initializes id configuration group </s>
|
funcom_train/35180377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void insertAttributes(StringBuilder elementString) {
elementString.append(" ");
for(IAttribute attribute : this.elementAttributes) {
elementString.append(attribute.printAttribute());
elementString.append(" ");
}
elementString = new StringBuilder(elementString.substring(0, elementString.length() - 2));
}
COM: <s> inserts all attributes into the </s>
|
funcom_train/45255848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showPerspectiveBar() {
switch (currentLocation) {
case TOP_LEFT:
topBar.setRight(null);
topBar.setBottom(perspectiveCoolBarWrapper.getControl());
break;
case TOP_RIGHT:
topBar.setBottom(null);
topBar.setRight(perspectiveCoolBarWrapper.getControl());
topBar.setRightWidth(getDefaultWidth());
break;
case LEFT:
topBar.setBottom(null);
topBar.setRight(null);
LayoutUtil.resize(topBar);
getTrimManager().addTrim(SWT.LEFT, this);
break;
default:
return;
}
LayoutUtil.resize(perspectiveBar.getControl());
}
COM: <s> make the perspective bar visible in its current location </s>
|
funcom_train/17260231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* public void testSaveReparacio() throws Exception {
System.out.println("saveReparacio");
NotaReparacio notaReparacio = null;
ReparacioController instance = null;
instance.saveReparacio(notaReparacio);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}*/
COM: <s> test of save reparacio method of class reparacio controller </s>
|
funcom_train/31414495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(ComparisonLevel compLevel) {
switch(compLevel) {
case NAMEFORLIST : return getName();
case SHORTNAMEFORLIST : return getShortName();
case CODEFORLIST : return getCode();
case FULLDETAILSFORLIST : return getName() + " (" + getCode() + ")";
default : return getName();
}
}
COM: <s> returns a string representation of the coded type </s>
|
funcom_train/12164038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNestedContextsWithExpression() throws Exception {
AppManager mgr = new AppManager(volantis, servletContext);
mgr.setAppConf(new DefaultAppConfigurator() {
public void setUp(ConfigValue config) throws Exception {
super.setUp(config);
}
});
mgr.useAppWith(new AppExecutor() {
public void execute(AppContext context) throws Exception {
doNestedContextsWithExpression();
}
});
}
COM: <s> tests that an existing expression context is copied to a nested context </s>
|
funcom_train/20307227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkAll(Iterator candidates, TriplePattern goal, List matchingRules) {
while (candidates.hasNext()) {
Rule r = (Rule)candidates.next();
if ( ((TriplePattern)r.getHeadElement(0)).compatibleWith(goal) ) {
matchingRules.add(r);
}
}
}
COM: <s> helper method to extract all matching clauses from an </s>
|
funcom_train/18647562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String processFileName(String name) {
StringBuffer ret=new StringBuffer(name);
for (int i=0; i < ret.length(); i++) {
char ch=ret.charAt(i);
if (Character.isLetterOrDigit(ch) == false) {
ret.deleteCharAt(i);
i--;
}
}
if (ret.length() == 0) {
ret.append(DEFAULT_FILENAME);
}
return(ret.toString());
}
COM: <s> this method returns a suitable name that can be used as </s>
|
funcom_train/19267837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDatabaseValue(ResultSet resultSet) throws BuildException {
try {
return resultSet.getString(getColumn());
} catch (SQLException e) {
log("Error loading column " + getColumn() + " from result test: " + e.getMessage(), Project.MSG_ERR);
throw new BuildException("Column " + getColumn() + " not found");
}
}
COM: <s> retrieve the database value of the parameter </s>
|
funcom_train/25419452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGptToCswXsltPath(String path){
this.setGptToCswXsltTemplate(null);
if(path == null || "".equals(path.trim())) {
path = "gpt/search/gpt2csw_OGCCORE.xslt";
}
this.gptToCswXsltPath = Val.chkStr(path);
}
COM: <s> sets the gpt to csw xslt </s>
|
funcom_train/46455384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMouseButton() {
switch(mouseEvent.getModifiers()) {
case java.awt.event.InputEvent.BUTTON1_MASK :
return 1;
case java.awt.event.InputEvent.BUTTON2_MASK :
return 2;
case java.awt.event.InputEvent.BUTTON3_MASK :
return 3;
default :
return 0;
}
}
COM: <s> gets the mouse button of the last mouse event </s>
|
funcom_train/44458799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXMLCallingConvention() throws Throwable {
String randomLong = HexConverter.toHexString(CallingConventionTests.RANDOM.nextLong());
String randomFive = randomLong.substring(0, 5);
// Successful call
postXMLRequest(randomFive, true);
// Unsuccessful call
postXMLRequest(randomFive, false);
}
COM: <s> test the xml calling convention </s>
|
funcom_train/21225295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHours(final int hours) {
switch (getFormat()) {
case VALIDITY_PERIOD_HH_MM_SS:
/* First octet */
data[0] = hours;
break;
default:
throw new IllegalStateException(
"The VP format does not correspond to VALIDITY_PERIOD_HH_MM_SS, "
+ "see the method setFormat() for more information.");
}
}
COM: <s> this will set the validity period in hours </s>
|
funcom_train/41516895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object obj) {
if (obj instanceof NumberValue) {
return compareToNumber(((NumberValue) obj).value);
} else if (obj instanceof Number) {
return compareToNumber((Number) obj);
} else {
return toString().compareTo(obj.toString());
}
}
COM: <s> compares this object with the specified object for order </s>
|
funcom_train/23365385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Region getRegion(Region[] regionArr, RegionType type) {
if (regionArr == null) {
throw new IllegalArgumentException("Region arr is null");
}
if (type == null) {
throw new IllegalArgumentException("Type is null.");
}
for (Region region : regionArr) {
if (region.getRegionType() == type) {
return region;
}
}
return null;
}
COM: <s> identifies a specific region in the given region array </s>
|
funcom_train/44296949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URI getJavadocURL() {
String method = methodName;
final int s = method.indexOf('[');
if (s >= 0) {
method = method.substring(0, s);
}
return URI.create(JAVADOC_BASEURL + className.replace('.', '/') + ".html#" + method + "()");
}
COM: <s> returns the url to the javadoc of the test method </s>
|
funcom_train/2538616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
if (fboID > 0) {
final IntBuffer id = ToolsBuffers.createIntBuffer(1);
id.put(fboID);
id.rewind();
gl.glDeleteFramebuffers(id.limit(), id);
fboID = 0;
}
if (depthRBID > 0) {
final IntBuffer id = ToolsBuffers.createIntBuffer(1);
id.put(depthRBID);
id.rewind();
gl.glDeleteRenderbuffers(id.limit(), id);
depthRBID = 0;
}
this.textures.clear();
}
COM: <s> destroys and deallocates this fbo </s>
|
funcom_train/4916475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildParameter() {
// Obtain the type of the parameter
Class<?> parameterType = this.parameterTypes[this.parameterIndex];
// Link parameter and setup to return
this.taskBuilder.linkParameter(this.objectIndex, parameterType);
this.parameterFactories[this.parameterIndex] = new ObjectParameterFactory(
this.objectIndex);
// Set for next object and parameter
this.objectIndex++;
this.parameterIndex++;
}
COM: <s> builds the parameter </s>
|
funcom_train/22431350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processSnacResponse(RvSnacResponseEvent event) {
for (Iterator it = listeners.iterator(); it.hasNext();) {
RvSessionListener listener = (RvSessionListener) it.next();
try {
listener.handleSnacResponse(event);
} catch (Throwable t) {
handleException(ERRTYPE_RV_SESSION_LISTENER, t, listener);
}
}
}
COM: <s> handles an incoming snac response event passing the event to this </s>
|
funcom_train/18009037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean undoHit() {
Game lastGame=getCurrentGame();
if (lastGame!=null) {
if (lastGame.undoHit()) {
//undo ok
return true;
}
else if (games.size()>1) {
//rollback to previous game
games.removeElementAt(games.size() - 1);
//signal events
new GameEvent(this, GameEvent.MATCH_GAME_CHANGED, "undo hit: game changed").signal();
return undoHit();
}
}
//no games, so undo failed
return false;
}
COM: <s> p undo the last hit of the match </s>
|
funcom_train/18868533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BudgetPeriodResults getResults(final AccountGroup accountGroup) {
cacheLock.lock();
try {
BudgetPeriodResults results = accountGroupResultsCache.get(accountGroup);
if (results == null) {
results = buildResults(accountGroup);
accountGroupResultsCache.put(accountGroup, results);
}
return results;
} finally {
cacheLock.unlock();
}
}
COM: <s> gets summary result by account group corner summary </s>
|
funcom_train/11654446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEnded(String host) {
hosts.remove(host);
if (hosts.size() == 0) {
runningIndicator.setIcon(stoppedIcon);
JMeterContextService.endTest();
}
menuBar.setRunning(false, host);
if (stoppingMessage != null) {
stoppingMessage.dispose();
stoppingMessage = null;
}
}
COM: <s> called when a test is ended on the remote system </s>
|
funcom_train/22844142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendSelfMadeMessage(Serializable obj) {
Petition petition = (Petition)obj;
if(petition.parameter[0].equals("Could you make me rich?")){
try{
Customer petitioner = database.getKunde(this.getActualClient());
int added = getRandomNumber(50,100);
petitioner.money += added;
client.sendSelfMadeMessage(new PetitionAnwer("Good bless you. You get " + added + " money"));
}catch(IOException e){
e.printStackTrace();
}
}
}
COM: <s> this method is to override if you want to send your own objects </s>
|
funcom_train/33265102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean keyDown( Event evt, int key ) {
if ( ( key == '\t' ) &&
( statusBar != null ) ) {
/*
if ( evt.shiftDown() ) {
statusBar.prevFocus();
}
else {
*/
statusBar.nextFocus();
/*
}
*/
}
return true;
}
COM: <s> catch key down event and if tab go to next focus component </s>
|
funcom_train/37508400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createTempDir() {
String dir = "pixe" + System.currentTimeMillis();
File file = new File(dir);
if (!file.mkdir()) {
JOptionPane.showMessageDialog(m_dialog,
"Failed to create temporary directory `" +
dir +
"`",
"Error",
JOptionPane.ERROR_MESSAGE);
return null;
}
return dir;
}
COM: <s> creates a temporary directory for building the slideshow </s>
|
funcom_train/18243353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCollectionID() {
if (this.collectionID == null) {
synchronized(this) {
if (this.collectionID == null) {
int intID = idGenerator.generateID();
this.collectionID = ResourceUtil.getResource(TDBCollection.class, "text.id_template",
new Integer(intID));
}
}
}
return this.collectionID;
}
COM: <s> returns numeric id of this collection as used for communicating </s>
|
funcom_train/44554463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File file) {
if (file.isDirectory()) {
return true;
} else {
String filename = file.toString().toLowerCase();
for (int i = 0; i < extensions.length; i++) {
if (filename.endsWith(extensions[i].toLowerCase()))
return true;
}
}
return false;
}
COM: <s> check the file with the filter </s>
|
funcom_train/45320608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJt21() {
if (jt21 == null) {
jt21 = new JTextField();
jt21.setBounds(6, 30, 28, 25);
jt21.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent e) {
jugadorColoca(jt21, (byte) 1, (byte) 0);
}
});
}
return jt21;
}
COM: <s> this method initializes j text field3 </s>
|
funcom_train/49007544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showById(int id) {
try{
Rect shapeToCenter = idToRect_.get(id);
this.requestRectangleOnScreen(shapeToCenter, true);
}catch(Exception e){
if(currentFloor+1<MapHandler.getInstance().getCurrentMap().getFloor().size()){
currentFloor=currentFloor+1;
this.setFloor(MapHandler.getInstance().getCurrentMap().getFloor().get(currentFloor));
this.printPath(lastnode1, lastnode2);
this.showById(id);
}
}
}
COM: <s> centers the view on a node </s>
|
funcom_train/46860138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMnuitmSave() {
if (mnuitmSave == null) {
mnuitmSave = new JMenuItem();
mnuitmSave.setText("Save");
mnuitmSave.setIcon(new ImageIcon(getClass().getResource("/resources/icons/save.png")));
mnuitmSave.setEnabled(false);
mnuitmSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SaveProject();
}
});
}
return mnuitmSave;
}
COM: <s> this method initializes mnuitm save </s>
|
funcom_train/51336923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doStressTest(final int ntrials, final int nnodes) {
/*
* Some branching factors to choose from.
*/
final int[] branchingFactors = new int[] { 3, 4, 8, 16, 27, 32, 48, 64,
96, 99, 112, 128, 256, 512, 1024};//, 4096};
COM: <s> run a stress test </s>
|
funcom_train/13099261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int getCountryId(String isoCountryCode) {
if (countries == null) {
countries = MCountry.getCountries(Env.getCtx());
}
for (int i = 0; i < countries.length; i++) {
if (isoCountryCode.equalsIgnoreCase(countries[i].getCountryCode())) {
return countries[i].get_ID();
}
}
return 0;
}
COM: <s> returns id for given country code </s>
|
funcom_train/3549865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHashCodeWithDifferentNodeTypes() {
try {
VocabNode test = new StubAbstractVocabNode(new Integer(1), "test", "noun", Locale.ENGLISH);
VocabNode test2 = new StubAbstractVocabNode(new Integer(1), "test", "verb", Locale.ENGLISH);
Assert.assertFalse(test.hashCode() == test2.hashCode());
}
catch (VocabException ve) {
Assert.fail("VocabException produced");
}
}
COM: <s> tests hash code with objects that are identical except for node type </s>
|
funcom_train/9363270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onLocationChanged(Location location) {
// Callbacks from the system location sevice are queued to this thread, so it's possible
// that we receive callbacks after unregistering. At this point, the native object will no
// longer exist.
if (mIsRunning) {
nativeNewLocationAvailable(mNativeObject, location);
}
}
COM: <s> location listener implementation </s>
|
funcom_train/19424124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map getBeanParameters(HttpServletRequest req) {
Map parameters = new HashMap();
if (req.getParameter(Constants.RPK_RECORD_KEY) != null) {
if (keyNumeric) {
parameters.put(DataConnector.RECORD_KEY_PARAMETER, new Integer(StringUtils.intValue(req.getParameter(Constants.RPK_RECORD_KEY))));
} else {
parameters.put(DataConnector.RECORD_KEY_PARAMETER, req.getParameter(Constants.RPK_RECORD_KEY));
}
}
return parameters;
}
COM: <s> returns a hash map object containing the required parameters for the data </s>
|
funcom_train/51117655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modelUpdated(MolModel scene, int opType, Object opValue) {
if ( (opType & ModelListener.ATOM_REMOVED) != 0 ) {
if ( scene.contains(myAtom) ) {
// TODO - is this a remove from scene?
Group g = (Group)getParent();
g.removeChild(0);
}
}
}
COM: <s> checks to see if the atom removed from the model belonged to </s>
|
funcom_train/21460666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double response( double[] sample ) {
if( sample.length != A.numCols )
throw new IllegalArgumentException("Expected input vector to be in sample space");
DenseMatrix64F dots = new DenseMatrix64F(numComponents,1);
DenseMatrix64F s = DenseMatrix64F.wrap(A.numCols,1,sample);
CommonOps.mult(V_t,s,dots);
return NormOps.normF(dots);
}
COM: <s> computes the dot product of each basis vector against the sample </s>
|
funcom_train/32114473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasAnnotation(D declaration, String annotationName) {
for (AnnotationMirror mirror : declaration.getAnnotationMirrors()) {
AnnotationTypeDeclaration annotation = mirror.getAnnotationType().getDeclaration();
if ((annotation != null) && (annotation.getQualifiedName().equals(annotationName))) {
return true;
}
}
return false;
}
COM: <s> whether the given declaration is annotated with an annotation that has the given </s>
|
funcom_train/11808620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeNameAttribute(URI uri, int type) {
try {
String value = uri.toString();
String attName = Namespaces.MOD.toString();
if (value.startsWith(writer.getXMLBase())) {
writer.writeAttribute(attName, value.substring(writer.getXMLBase().length(), value.length()));
}
else {
// writer.writeAttribute(attName, value);
writer.writeAttribute(value,type);
}
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> write name attribute </s>
|
funcom_train/32055392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getRendererComponent(JGraph jgraph, boolean flag, boolean flag1, boolean flag2) {
CellViewRenderer cellviewrenderer = getRenderer();
if(cellviewrenderer != null) {
return cellviewrenderer.getRendererComponent(jgraph, this, flag, flag1, flag2);
} else {
return null;
}
}
COM: <s> retrieves a renderer component object </s>
|
funcom_train/25093487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxWcdoBase() {
if (jComboBoxWcdoBase == null) {
jComboBoxWcdoBase = new JComboBox(baseAlgos);
jComboBoxWcdoBase.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
fireAlgoChanged();
}
});
}
return jComboBoxWcdoBase;
}
COM: <s> this method initializes j combo box wcdo base </s>
|
funcom_train/36147516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object next() {
String str = readString();
if (str == null || "".equals(str)) {
return null;
}
StringTokenizer stk = new StringTokenizer(str,
StringUtils.nextCharacterSeparator(getBuffer().getDelimiter()));
String className = stk.next();
String value = stk.next();
return getObject(className, value, getBuffer().getDelimiter());
}
COM: <s> gets the next object </s>
|
funcom_train/32061827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSize() {
System.out.println("setSize");
IntPoint2D newsize = newIP(121,42);
ContainerView instance =
ContainerView.createNewWithFlow("cv", Right, Down, 0,
newIP(10, 100));
try {
instance.setSize(newsize);
fail("No excption was thrown on setSize().");
} catch (RuntimeException re) {
// success
}
}
COM: <s> test of set size method of class container view </s>
|
funcom_train/51166691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getNextCellForLocation(Object current, int x, int y) {
x /= scale; y /= scale; // FIX: Consistency with other methods?
CellView cur = graphView.getMapping(current, false);
CellView cell = getNextViewAt(cur, x, y);
if (cell != null)
return cell.getCell();
return null;
}
COM: <s> returns the cell at the specified location that is behind the </s>
|
funcom_train/2422440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Port setPort(Port port) {
Port old = getPort();
if (Objects.equal(old, port)) {
return port;
}
if (port != null) {
data.setProperty(propertyName, port.getPort());
} else {
data.setProperty(propertyName, null);
}
return old;
}
COM: <s> sets the port </s>
|
funcom_train/46577776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertString(int offset, String s, AttributeSet a) throws BadLocationException {
if (offset + s.length() <= maxLength) {
super.insertString(offset, s, a);
} else {
if (beep) Toolkit.getDefaultToolkit().beep();
}
}
COM: <s> overridden to check and limit the number of characters </s>
|
funcom_train/48045978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (other instanceof ZoneOffsetTransition) {
ZoneOffsetTransition d = (ZoneOffsetTransition) other;
return transition.equals(d.transition) &&
transitionAfter.getOffset().equals(d.transitionAfter.getOffset());
}
return false;
COM: <s> checks if this object equals another </s>
|
funcom_train/8011960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int insertMenuItemAt(int menu, String title, String href, String target, int horizPadding, int iLocation) throws Exception {
return insertMenuItemAt(menu, title, href, target, horizPadding, true, iLocation);
}
COM: <s> inserts a menu item into navigation menu at specified location </s>
|
funcom_train/42977936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBaseUrlPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Repository_baseUrl_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Repository_baseUrl_feature", "_UI_Repository_type"),
UnitPackage.Literals.REPOSITORY__BASE_URL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the base url feature </s>
|
funcom_train/4096270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNewPkgName(String newPkgName) throws Exception {
log.info("newPkgName came in as [" + newPkgName + "]");
this.newPkgName = stripUnwantedDots(newPkgName.trim());
validatePackageName(this.newPkgName);
if (this.newPkgName.length() == 0) {
throw new Exception("Unimplemented operation");
}
}
COM: <s> set the new package name </s>
|
funcom_train/42668589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getNext() {
if (Next == null) {//GEN-END:|25-getter|0|25-preInit
// write pre-init user code here
Next = new Command("Proximo", Command.SCREEN, 0);//GEN-LINE:|25-getter|1|25-postInit
// write post-init user code here
}//GEN-BEGIN:|25-getter|2|
return Next;
}
COM: <s> returns an initiliazed instance of next component </s>
|
funcom_train/18999149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSystem(AS400 system) // @C1A
{ // @C1A
if (system == null) // @C1A
throw new NullPointerException("system"); // @C1A
m_as400 = system; // @C1A
m_pcmlDoc.setAs400(m_as400); // @C1A
} // @C1A
COM: <s> sets the system on which to call programs </s>
|
funcom_train/44445099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkColumnIndex(final int columnIndex) throws IndexOutOfBoundsException {
if (columnIndex >= 0 && columnIndex < getColumnCount()) { return; }
throw new IndexOutOfBoundsException("Column index '" + columnIndex + "' is invalid. Column count is '" + getColumnCount() + "'.");
}
COM: <s> if the given column index is valid this method will complete normally if </s>
|
funcom_train/3463137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObject() throws ObjectManagerException {
int size = (pool==null ? 0 : pool.size());
if(size>0) return pool.remove(size-1);
else try {return PROTOTYPE.clone();}
catch (CloneNotSupportedException e) {throw new ObjectManagerException(e,"ObjectManager: "+PROTOTYPE.getClass().getName()+" is not Cloneable");}
}
COM: <s> returns an un initialised entity </s>
|
funcom_train/48152807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e){
if (e.getSource() == betScroll.getSlider()){
bet = (int)betScroll.getValue();
}
else if (e.getSource() == pScroll.getSlider()){
p = pScroll.getValue();
reset();
}
else if (e.getSource() == initialScroll.getSlider()){
initial = (int)initialScroll.getValue();
rbGraph.setParameters(initial, target);
reset();
}
}
COM: <s> this method handles the scroll events associated with changing the initial </s>
|
funcom_train/11088446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIdleInvokerCount() {
int count = 0;
for (Iterator it = this.scheduledInvokers.iterator(); it.hasNext();) {
AsyncMessageListenerInvoker invoker = (AsyncMessageListenerInvoker) it.next();
if (invoker.isIdle()) {
count++;
}
}
return count;
}
COM: <s> determine whether this listener container currently has more </s>
|
funcom_train/10914637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createShading(int x, int y, int w, int h, Color col) {
currentPageObject.createShading(x, y, w, h, col.getRed(), col.getGreen(), col.getBlue());
}
COM: <s> this method will create shading on the page using the specified </s>
|
funcom_train/7367872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getItem(final int row, final int col) {
try {
return board[0][row * nbrCol + col];
} catch (Throwable e) {
e.printStackTrace();
//#ifdef DLOGGING
logger.severe("getItem error row,col,board[0].length=" + row + "," + col + "," + board[0].length, e);
//#endif
return 0;
}
}
COM: <s> get the player for the coordinates </s>
|
funcom_train/44478737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource findReification(URI context, Resource subject, URI predicate, Node object) {
Statement statement = modelSet_.createStatement(context, subject, predicate, object);
Collection<Resource> resources = modelSet_.getAllReificationsOf(statement);
Resource resource = null;
if (resources.iterator().hasNext()) {
resource = resources.iterator().next();
}
return resource;
}
COM: <s> gets a resource with a reification from the model </s>
|
funcom_train/47523061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean register(Entity entity) throws HibernateException {
if (entity.getLogin() == null) {
session.finish();
session = null;
return new Boolean(false);
}
try {
dao.setSession(session.getSession());
Entity e = ((EntityDAO) dao).findByLogin(entity.getLogin());
if(e != null) { // user is already registered
session.finish();
session = null;
return null;
}
dao.insert(entity);
} catch (HibernateException e) {
throw e;
} finally {
if(session != null)
session.finish();
}
return new Boolean(true);
}
COM: <s> register a new user in the application </s>
|
funcom_train/17768126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConnectionStatus ready(long timeout) {
// If the user closed this connection, return CLOSED.
if (!this.connectionStatus.getValue())
return ConnectionStatus.CLOSED;
// Otherwise, return the channel status
synchronized (this.channelStatus) {
if (this.channelStatus.connectionStatus ==
ConnectionStatus.CONNECTED)
return ConnectionStatus.CONNECTED;
try {
this.channelStatus.wait(timeout);
} catch (InterruptedException e) {
}
return this.channelStatus.connectionStatus;
}
}
COM: <s> block until this connection is ready or until it fails </s>
|
funcom_train/22278890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font fontFromAttributes(Hashtable attr,TextView textView) {
Font f = (Font)attr.get(TextView.FONT_KEY);
if( f == null ) {
attr = textView.defaultAttributes();
f = (Font)attr.get(TextView.FONT_KEY);
if( f == null )
f = Font.defaultFont();
}
return f;
}
COM: <s> convenience to extract a font from a text view attribute dictionary </s>
|
funcom_train/7641084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SocketChannel openAdbConnection() {
Log.d("DeviceMonitor", "Connecting to adb for Device List Monitoring...");
SocketChannel adbChannel = null;
try {
adbChannel = SocketChannel.open(AndroidDebugBridge.sSocketAddr);
adbChannel.socket().setTcpNoDelay(true);
} catch (IOException e) {
}
return adbChannel;
}
COM: <s> attempts to connect to the debug bridge server </s>
|
funcom_train/6268517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String number() throws ParseException {
StringBuffer retval = new StringBuffer();
try {
if (!isDigit(lookAhead(0))) {
throw new ParseException(
buffer + ": Unexpected token at " + lookAhead(0),
ptr);
}
retval.append(lookAhead(0));
consume(1);
while (true) {
char next = lookAhead(0);
if (isDigit(next)) {
retval.append(next);
consume(1);
} else
break;
}
return retval.toString();
} catch (ParseException ex) {
return retval.toString();
}
}
COM: <s> get and consume the next number </s>
|
funcom_train/5855926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processEvent (Event e) {
// History ////////////////////////////////////////////////
// Before calling any Abstractors or Notification Setters on
// the event, add it's pre-modification state to the history.
// Null stands for the original event, but since this is the
// original event we set this to null.
app_abstraction_history.add(e); // copy of event is made in history.add
EventPriorityQueue epq;
epq = ((EventPriorityQueue)serverQabstraction.get(0));
epq.insert(e);
}
COM: <s> called by recieve this method is the beginning of event </s>
|
funcom_train/46458817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXY(double x, double y) {
super.setXY(x, y);
double cos = origin.cos(this);
double sin = origin.sin(this);
int n = vidPanel.getFrameNumber();
vidPanel.getCoords().setCosineSine(n, cos, sin);
}
COM: <s> overrides tpoint set xy method </s>
|
funcom_train/34475019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SdaiModel findModel(SdaiRepository repository, String findModelName) throws SdaiException {
SdaiModel model = testAndFindModel(repository, findModelName);
if(model != null) return model;
throw new SdaiException(SdaiException.MO_NVLD, repository,
"Model not found: " + findModelName);
}
COM: <s> finds model with given name </s>
|
funcom_train/2022642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasForeignKey(RelaggsTable ref_table) {
Enumeration enm = ref_table.getPrimaryKeys();
while (enm.hasMoreElements()) {
RelaggsAttribute prim_key = (RelaggsAttribute)enm.nextElement();
if (this.attributes.get(prim_key.getName()) != null) {
return true;
}
}
return false;
}
COM: <s> returns whether the table references the given table by </s>
|
funcom_train/2624479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testCaseGenerator() {
Project project = ((ProjectListModel) projectManagement.getListModel()).getList().get(list.getSelectedIndex());
projectManagement.saveTemporary(project);
TestCaseGenerator testCaseGenerator = new TestCaseGenerator(projectManagement);
testCaseGenerator.showDialog();
}
COM: <s> loads the test case creator dialog </s>
|
funcom_train/27844088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGetDefaultFormat() throws Exception {
java.text.Format[] tests = {
new java.text.SimpleDateFormat(),
null
};
for (int i = 0; i < tests.length; i++) {
_multipleformat.setDefaultFormat(tests[i]);
assertEquals(tests[i], _multipleformat.getDefaultFormat());
}
}
COM: <s> method test set get default format is testing set default format </s>
|
funcom_train/33072078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String openTypeSelectionDialog(){
try {
IJavaProject project = getProject();
if(project!=null){
Shell shell = treeViewer.getControl().getShell();
SelectionDialog dialog = JavaUI.createTypeDialog(
shell,new ProgressMonitorDialog(shell),
SearchEngine.createJavaSearchScope(new IJavaElement[]{project}),
IJavaElementSearchConstants.CONSIDER_CLASSES,false);
if(dialog.open()==SelectionDialog.OK){
Object[] result = dialog.getResult();
return ((IType)result[0]).getFullyQualifiedName();
}
}
} catch(Exception ex){
Util.logException(ex);
}
return null;
}
COM: <s> opens the type selection dialog and returns a selected class name </s>
|
funcom_train/3668571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(String msg, int severityLevel, String owner) {
if (pw != null) {
if (severityLevel <= logLevel) {
pw.println("[" + new java.util.Date() + "] " + getSeverityString(severityLevel) + ": " + owner + ": " + msg);
}
}
}
COM: <s> log message here with the messages level and the messages owner </s>
|
funcom_train/23870264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updatePrimitiveList(){
primitiveList.clear();
if(currTile == null || currTile.getPrimitiveSites() == null) return;
for(PrimitiveSite ps : currTile.getPrimitiveSites()){
QTreeWidgetItem treeItem = new QTreeWidgetItem();
treeItem.setText(0, ps.getName());
treeItem.setText(1, ps.getType().toString());
primitiveList.insertTopLevelItem(0, treeItem);
}
}
COM: <s> this will update the primitive list window based on the current </s>
|
funcom_train/18185584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBitLength() {
System.out.println("GetBitLength");
BitStream instance = new BitStream();
int expResult = 0;
int result = instance.GetBitLength();
assertEquals(expResult, result);
instance.Append("0");
expResult = 1;
result = instance.GetBitLength();
assertEquals(expResult, result);
}
COM: <s> test of get bit length method of class ftc </s>
|
funcom_train/44878236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getSpaceWidth() {
if (spaceWidth < 0) {
Graphics2D g = getGraphics2D();
FontRenderContext frc = getFontRenderContext();
GlyphVector gv = font.createGlyphVector(frc, " ");
GlyphMetrics metrics = gv.getGlyphMetrics(0);
spaceWidth = (int) metrics.getAdvanceX();
}
return spaceWidth;
}
COM: <s> returns the width of the ascii space character in pixels drawn </s>
|
funcom_train/9556890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addressMatches(BAddressImpl pattern, String from) {
Pattern pat = Pattern.compile("<[^>]*@[^>]*>");
Matcher mat =
pat.matcher(from);
while (mat.find()) {
String adr = mat.group();
if (debugEnabled) {
System.out.println("Comparing " + pattern.toString() +
" with " + adr);
}
if (Pattern.matches(".*" + pattern.toString() + ".*", adr)) {
return true;
}
}
return false;
}
COM: <s> checks if in the from string exists a mail which matches the pattern </s>
|
funcom_train/46265218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void EventReceived(Event e) {
newEvent = e;
//Repaintthe GUI table
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
//add the incoming event to the vector of events
vecEvents.addElement(newEvent);
//add this Event to the displaying GUI.
drawEvents(newEvent,vecEvents.indexOf(newEvent));
}
});
}
COM: <s> automatically called by packet processor when event arrived </s>
|
funcom_train/42638928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector calcDeviationVector(AEProblem problem, Vector x) {
try {
LinAEProblem linProblem = (LinAEProblem) problem;
if (isCheckProblem()) getTau().checkProblem(linProblem);
Number parameter = getTau().calcParameter(x, -1, linProblem); //Abstract parameter.
return problem.calcSystem(x).product(parameter.copy().minus());
} catch (ClassCastException e) {
throw new UnsupportedOperationException("Use simple iterative AE algorithm only with linear problems.");
}
}
COM: <s> calculation of deviation vector </s>
|
funcom_train/8670557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
NamespaceMappings clone = new NamespaceMappings();
clone.m_nodeStack = (NamespaceMappings.Stack) m_nodeStack.clone();
clone.count = this.count;
clone.m_namespaces = (Hashtable) m_namespaces.clone();
clone.count = count;
return clone;
}
COM: <s> this method makes a clone of this object </s>
|
funcom_train/174321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean linkFirst(Object e) {
if (count >= capacity)
return false;
++count;
Node f = first;
Node x = new Node(e, null, f);
first = x;
if (last == null)
last = x;
else
f.prev = x;
notEmpty.signal();
return true;
}
COM: <s> links e as first element or returns false if full </s>
|
funcom_train/32964836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MenuLocator findMenuLocator( String name ) {
Query query = em.createQuery("SELECT md FROM MenuLocator md " + "WHERE md.path = :p");
query.setParameter("p", name);
java.util.List<MenuLocator> menuLocators = query.getResultList();
if (menuLocators.size()==1) return menuLocators.get(0);
return null;
}
COM: <s> find a menu location </s>
|
funcom_train/43894214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AdaptingResolve wrap(Resolve resolve) {
if (resolve instanceof AdaptingResolve) {
return (AdaptingResolve) resolve;
}
if (resolve instanceof Catalog) {
return new AdaptingCatalog((Catalog) resolve, finder);
}
if (resolve instanceof Service) {
return new AdaptingService((Service) resolve, finder);
}
if (resolve instanceof GeoResource) {
return new AdaptingGeoResource((GeoResource) resolve, finder);
}
return null;
}
COM: <s> wraps a resove handle in an adapting resolve handle </s>
|
funcom_train/28120229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResourceTemplate(String filePath) throws IOException {
File file = new File(BUProject.getCurrentProject().getSettings().getFullPath(Settings.DIRECTORY_TEMPLATES_ROOT));
String relName = filePath.substring(Utils.getRoot(file).getCanonicalPath().length());
return relName.replace(File.separatorChar, '/');
}
COM: <s> returns the relative path to the template as a resource name </s>
|
funcom_train/19055030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DnDTabbedPane getM_bottomTabbedPane() {
if (m_bottomTabbedPane == null) {
m_bottomTabbedPane = new DnDTabbedPane();
m_bottomTabbedPane.setUI(new TabbedPaneCloseButtonUI());
m_bottomTabbedPane.setBackground(Color.white);
m_bottomTabbedPane.setTabPlacement(JTabbedPane.TOP);
}
return m_bottomTabbedPane;
}
COM: <s> this method initializes m bottom tabbed pane </s>
|
funcom_train/26282814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFaceImagePath(Card card) {
if (card.isFaceCard() ||
card.equals(new Card(Rank.ACE, Suit.SPADES))) {
return "faces/" + card.toString().replace(' ', '_') + extension;
} else {
return null;
}
}
COM: <s> gets the relative path to the face image of a given face card </s>
|
funcom_train/27958048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDataDir() {
String pluginDirectory = MiscUtilities.expandRelativePath(MiscUtilities.getGMGenOption("pluginDir", MiscUtilities.getGMGenOption("gmgenDir", System.getProperty("user.dir")) + File.separator + "plugins"));
return pluginDirectory + File.separator + getName();
}
COM: <s> gets the name of the data directory for plugin object </s>
|
funcom_train/637991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructors() {
Population population = new Population();
assertEquals(population.getSize(), 0);
population.add(new Chromosome(0));
Population copyPopulation = new Population(population);
assertEquals(population.getSize(), 1);
assertEquals(copyPopulation.getSize(), 1);
for (int i = 0; i < population.getSize(); i++) {
assertEquals(population.get(i), copyPopulation.get(i));
}
}
COM: <s> tests all constructors </s>
|
funcom_train/8343659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
undoTexts = new ArrayList<String>();
textArea.getDocument().addUndoableEditListener(this);
scrollPane = new JScrollPane(textArea);
mainPanel = new JPanel(new GridBagLayout());
mainPanel.add(scrollPane, LayoutUtils.createConstraintsFillBoth());
scrollPane.setBorder(new BevelBorder(BevelBorder.LOWERED));
setLayout(new GridBagLayout());
add(mainPanel, LayoutUtils.createConstraintsFillBoth());
}
COM: <s> initialize the component scroller and undo store </s>
|
funcom_train/25858525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SummaryGraphElement getElemFromUri(String uri, boolean scoring) {
if (uri.equals(NamedConcept.TOP.getUri())) {
SummaryGraphElement elem = getElem(NamedConcept.TOP.getUri(),
SummaryGraphElement.CONCEPT);
if (scoring)
elem.setEF(para.TOP_ELEMENT_SCORE);
return elem;
} else {
SummaryGraphElement elem = getElem(uri, SummaryGraphElement.CONCEPT);
if (scoring) {
double EF;
Integer i = conceptCount.get(uri);
if (i == null)
EF = Double.MIN_VALUE;
else
EF = i.doubleValue() / indivSize;
elem.setEF(EF);
}
return elem;
}
}
COM: <s> get graph element from uri which maybe new an element or return an </s>
|
funcom_train/7524473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void block() {
for(Iterator it=membership_listeners.iterator(); it.hasNext();) {
MembershipListener listener=(MembershipListener)it.next();
try {
listener.block();
}
catch(Throwable t) {
if(log.isErrorEnabled())
log.error("failed calling block() on " + listener, t);
}
}
}
COM: <s> blocks the channel until the view accepted is invoked </s>
|
funcom_train/49995987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parametersToLog(List<IModel> parameters) {
StringBuffer sb = new StringBuffer(500);
for (IModel im : parameters) {
sb.append(IDNT + IDNT2 + im.getClass() + ": " + im.getObject() + CR);
}
return sb.toString();
}
COM: <s> helps to format parameters list </s>
|
funcom_train/50605290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadsTestApplication () {
Engine engine = new Engine(
getClass().getClassLoader(), "com/lonniepryor/blues/test-application.xml");
try {
Session handle = new Session(engine);
try {
checkApplication();
} finally {
handle.dispose();
}
} finally {
engine.dispose();
}
}
COM: <s> ensures the blues framework is capable of loading the test application </s>
|
funcom_train/34810740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bin findBin(Sgr sgr){
double score = sgr.getScore();
//run thru bins
for (int i=0; i<numberBins; i++){
if (bins[i].contains(score))return bins[i];
}
System.out.println("\nERROR: no bin found for score "+score);
System.out.println("Line: "+sgr.toString());
System.exit(0);
return null;
}
COM: <s> finds an appropriate bin given an sgr object </s>
|
funcom_train/47673465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getJdkVersionValue() {
ObjectName objectName = null;
try {
objectName = new ObjectName(muleDomain + ":type=org.mule.MuleContext,name=MuleServerInfo");
return (String) server.getAttribute(objectName, "JdkVersion");
} catch (Exception ex) {
return "ERROR";
}
}
COM: <s> gets the jdk version from mules mbean server </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.