__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/18203605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoomRatio( double zoomRatio ) {
String newValStr = zoomDoubleToString( zoomRatio );
if( !newValStr.equals( m_zoomRatio ) ) {
m_zoomRatio = newValStr;
m_gridPanel.getViewport().setZoomRatio( zoomRatio );
zoomComboBox.setSelectedItem( m_zoomRatio );
}
}
COM: <s> sets the zoom ratio of the simulation rendering </s>
|
funcom_train/46336334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddParameter() {
System.out.println("addParameter");
PlsqlCallParameter p = null;
PlsqlCall instance = new PlsqlCall();
try {
instance.addParameter(p);
fail();
} catch (NullPointerException exception) {
}
p = new PlsqlCallParameter("", "date", false, false);
instance.addParameter(p);
}
COM: <s> test of add parameter method of class plsql call </s>
|
funcom_train/29711137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasColumnSpanElement(int columnIndex) {
List cells = getColumnCells(columnIndex);
if (cells != null) {
Iterator itr = cells.iterator();
while (itr.hasNext()) {
Element cell = (Element) itr.next();
int value = DOMUtil.getIntAttributeIgnoreCase(cell,
IHTMLConstants.ATTR_COLSPAN, 1);
if (value > 1) {
return true;
}
}
}
return false;
}
COM: <s> judge whether there is columnspan 1 cell in the column </s>
|
funcom_train/33912565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillBuffer() throws Exception {
Token t = getToken();
// boolean pass = false; // pass through info for debugging
// if (pass) { add(t); return; }
// Process tokens after NEWLINEs and LEADING_WS and EOF
if (t.getType() == FireLexer.NEWLINE) {
add(t);
t = getToken();
process(t);
} else if (t.getType() == FireLexer.LEADING_WS
|| t.getType() == FireLexer.EOF) {
process(t);
} else {
add(t);
}
}
COM: <s> fills up the output buffer by filtering the input buffer from the lexer </s>
|
funcom_train/33142356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getToolBar() {
if (toolBar == null) {
toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.add(getAddRuleButton());
toolBar.add(getRemoveRuleButton());
toolBar.add(getMoveRuleDownButton());
toolBar.add(getMoveRuleUpButton());
}
return toolBar;
}
COM: <s> this method initializes tool bar </s>
|
funcom_train/48617188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String changePassword() {
IrUser admin = userService.getUser(adminUserId, false);
if( !admin.hasRole(IrRole.ADMIN_ROLE))
{
return "accessDenied";
}
irUser = userService.getUser(id, false);
userService.updatePassword(password, irUser);
irUser.setPasswordChangeRequired(true);
userService.makeUserPersistent(irUser);
if (emailPassword) {
userService.emailNewPassword(irUser, password, emailMessage);
}
return SUCCESS;
}
COM: <s> reset password and send email to the user </s>
|
funcom_train/18741248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getConnectCount(SearchItem item) {
int result = 0;
for (RuleNode node : item.bindsNodes()) {
if (!this.remainingNodes.contains(node)) {
result++;
}
}
for (LabelVar var : item.bindsVars()) {
if (!this.remainingVars.contains(var)) {
result++;
}
}
return result;
}
COM: <s> returns the number of nodes and variables bound by the item that have </s>
|
funcom_train/28403886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDefinitionForRequest(ServletRequest request) {
if (alternateDefinitions.size() < 1) {
return definitionName;
}
String base = getRequestBase(request);
for (Map.Entry<String, String> pair : alternateDefinitions.entrySet()) {
if (base.startsWith(pair.getKey())) {
return pair.getValue();
}
}
return definitionName;
}
COM: <s> returns the final definition to render for the given request </s>
|
funcom_train/25374626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Item comp) {
if (m_frequency == comp.getFrequency()) {
// sort by name
return -1 * m_attribute.name().compareTo(comp.getAttribute().name());
}
if (comp.getFrequency() < m_frequency) {
return -1;
}
return 1;
}
COM: <s> ensures that items will be sorted in descending order of frequency </s>
|
funcom_train/33465470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incrementModCounts() {
if (externalMessageList != null) {
externalMessageList.incrementModCount();
}
if (externalBuilderList != null) {
externalBuilderList.incrementModCount();
}
if (externalMessageOrBuilderList != null) {
externalMessageOrBuilderList.incrementModCount();
}
}
COM: <s> increments the mod counts so that an concurrent modification exception can </s>
|
funcom_train/39353266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void launch() throws MalformedURLException {
SecurityManager sm = System.getSecurityManager();
if(sm == null) {
Logger logger = Logger.getLogger(PlatformInit.class.getName());
logger.warning("launch(): Security manager not set!");
}
String[] startupURLs = this.generalSettings.getStartupURLs();
for(String url : startupURLs) {
this.launch(url);
}
}
COM: <s> opens as many browser windows as there are startup urls in </s>
|
funcom_train/7808172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBookmarkCommand() {
if (BookmarkCommand == null) {//GEN-END:|80-getter|0|80-preInit
// write pre-init user code here
BookmarkCommand = new Command("Bookmark", Command.OK, 0);//GEN-LINE:|80-getter|1|80-postInit
// write post-init user code here
}//GEN-BEGIN:|80-getter|2|
return BookmarkCommand;
}
COM: <s> returns an initiliazed instance of bookmark command component </s>
|
funcom_train/49331385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Simulation copy() {
mutex.lock("copy");
try {
Simulation copy = (Simulation) super.clone();
copy.mutex = SafetyMutex.newInstance();
copy.status = Status.NOT_SIMULATED;
copy.options = this.options.clone();
copy.simulationListeners = this.simulationListeners.clone();
copy.listeners = new ArrayList<EventListener>();
copy.simulatedConditions = null;
copy.simulatedMotors = null;
copy.simulatedData = null;
copy.simulatedRocketID = -1;
return copy;
} catch (CloneNotSupportedException e) {
throw new BugException("Clone not supported, BUG", e);
} finally {
mutex.unlock("copy");
}
}
COM: <s> returns a copy of this simulation suitable for cut copy paste operations </s>
|
funcom_train/13439863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void bringOutThread() {
Thread t = new Thread() {
public void run() {
PTimeItem ti = getFocusedItem();
if (ti!=null) {
ti.setBringOut(!ti.isBringOut());
contentChanged();
loadContent(ti);
}
}
};
t.start();
}
COM: <s> is necessary for the list view to bring out a new entry </s>
|
funcom_train/33726446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendSOCreationFailed(RTMPConnection conn, String name, boolean persistent) {
SharedObjectMessage msg = new SharedObjectMessage(name, 0, persistent);
msg.addEvent(new SharedObjectEvent(
ISharedObjectEvent.Type.CLIENT_STATUS,
"error", SO_CREATION_FAILED));
conn.getChannel((byte) 3).write(msg);
}
COM: <s> create and send so message stating that a so could not be created </s>
|
funcom_train/35184993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resizeFromDrawPanel(int newWidth, int newHeight) {
super.resize(newWidth, newHeight);
if (drawPanel != null)
SwingUtilities.invokeLater(new Runnable() {
public void run() {
synchronized (JPAZUtilities.getJPAZLock()) {
// preferred size of draw panel is always set to last
// known
// size of the pane
drawPanel.setPreferredSize(new Dimension(getWidth(),
getHeight()));
}
}
});
}
COM: <s> special method called when the resize request is coming from draw panel </s>
|
funcom_train/17269372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEditorNew() {
System.out.println("editorNew");
DocumentManager instance = (DocumentManager)_desktop.getDesktopManager();
int count = _desktop.getAllFrames().length;
instance.editorNew();
assertTrue(_desktop.getAllFrames().length == (count + 1));
}
COM: <s> test of editor new method of class com </s>
|
funcom_train/22593777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadInstance(ProblemInstance inst) {
if (inst == null)
return;
this.problemInstance = inst;
this.popInfo = this.problemInstance.getPopInfo();
this.geneticSettings = this.problemInstance.getGeneticSettings();
this.geneticator = new Geneticator(this.problemInstance);
setChanged();
notifyObservers(new RunMessage("load", this.problemInstance.getId(),
RunMessage.Type.LOAD_INSTANCE, 0, 0));
}
COM: <s> load the given instance </s>
|
funcom_train/44019236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getEditFindMenuItem() {
if (editFindMenuItem == null) {
editFindMenuItem = new JMenuItem();
editFindMenuItem.setText("Find...");
editFindMenuItem.setMnemonic('F');
editFindMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, MENU_SHORTCUT_KEY_MASK));
editFindMenuItem.addActionListener(eventHandler);
}
return editFindMenuItem;
}
COM: <s> return the edit find menu item </s>
|
funcom_train/49160068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPlayersOnTransferList(int position) {
Player[] players = getPlayers();
for (int i = 0; i < players.length; i++) {
if (players[i].getPlayerAttributes().getPosition() == position && players[i].isOnTransferList()) {
return true;
}
}
return false;
}
COM: <s> returns true if team has a player on the transferlist on this position </s>
|
funcom_train/51072000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MaintenanceBandwidthCalculation () {
event_types = new Class []
{
seda.sandStorm.api.StagesInitializedSignal.class,
soss.core.MaintenanceBandwidthCalculation.StatAlarmEvent.class,
soss.core.MaintenanceBandwidthCalculation.PlacementAlarmEvent.class,
soss.core.MaintenanceBandwidthCalculation.HibernatingAlarmEvent.class,
soss.core.MaintenanceBandwidthCalculation.RevivingAlarmEvent.class,
soss.core.MaintenanceBandwidthCalculation.CreationAlarmEvent.class
};
}
COM: <s> constructor creates a new code placement bandwidth calculation code </s>
|
funcom_train/33447804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Field createDateField(int fieldConstant, Date value, Store store) {
if (value == null)
return null;
String valueText = DateTools.dateToString(value, Resolution.DAY);
return new Field(String.valueOf(fieldConstant), valueText, store, Index.UN_TOKENIZED);
}
COM: <s> creates a new code field code from the given date value </s>
|
funcom_train/41517406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node exitNumberString(Token node) {
String str = node.getImage();
Number value;
if (str.length() < 10) {
value = new Integer(str);
} else if (str.length() < 19) {
value = new Long(str);
} else {
value = new BigInteger(str);
}
node.addValue(value);
return node;
}
COM: <s> adds the number as a node value </s>
|
funcom_train/38293033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbsObject fromObject(Object obj) throws OntologyException {
if (obj == null) {
return null;
}
try {
return fromObject(obj, this);
}
catch (UnknownSchemaException use) {
// If we get this exception here, the schema is globally unknown
// (i.e. is unknown in the reference ontology and all its base
// ontologies) --> throw a generic OntologyException
throw new OntologyException("No schema found for class "+obj.getClass().getName());
}
}
COM: <s> converts a java object into a proper abstract descriptor </s>
|
funcom_train/12804395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Topic lookupTopic(String topicName) {
Topic topic = null;
// Note: do not attempt to make the InitialContext a singleton. It
// would introduce unpleasant threading issues.
Context ctx =
BaseServicesProvider.getProvider().getBaseServices().getContext();
try {
topic = (Topic)ctx.lookup(topicName);
}
catch(NamingException ne) {
return null;
}
return topic;
}
COM: <s> lookup the specified topic </s>
|
funcom_train/8343569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addComponents() {
GridBagConstraints gbc = new GridBagConstraints();
setLayout(new GridBagLayout());
gbc.weightx = 5;
gbc.fill = GridBagConstraints.BOTH;
add(leftTree, gbc);
gbc = new GridBagConstraints();
gbc.weightx = 1;
gbc.fill = GridBagConstraints.NONE;
add(buttonPanel, gbc);
gbc = new GridBagConstraints();
gbc.weightx = 5;
gbc.fill = GridBagConstraints.BOTH;
add(rightTree, gbc);
}
COM: <s> add the components which make up this field </s>
|
funcom_train/251873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection(){
String jdbc_class="com.mysql.jdbc.Driver";
String jdbc_url="jdbc:mysql://localhost/zip";
String jdbc_user="zip";
String jdbc_pass="password";
try{
Class.forName(jdbc_class);
return DriverManager.getConnection(jdbc_url, jdbc_user, jdbc_pass);
}catch(Exception ex){
ex.printStackTrace();
return null;
}
}
COM: <s> returns a connection object to use for the database query </s>
|
funcom_train/17902812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTextAtOffset(int offset, String text) {
try {
fireTextUpdateStarting();
loadDummyDocument();
try {
// clear the contents of we have any
int length = document.getLength();
if (offset > length || offset < 0) {
offset = 0;
}
document.insertString(offset, text, null);
} catch (BadLocationException e) {}
setDocument(document);
} finally {
fireTextUpdateFinished();
setCaretPosition(offset);
}
}
COM: <s> inserts the specified text at the offset </s>
|
funcom_train/46382008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void localMoveRequest(Vector3f location, Quaternion rotation) {
// System.out.println("********************** LocalAvatar.localMoveRequest");
if (viewCell!=null) {
viewCell.localMoveRequest(new CellTransform(rotation, location));
}
}
COM: <s> a request from this client to move the avatar </s>
|
funcom_train/15620559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataRow next() {
DataRow row = super.next();
if (row != null) {
Attribute[] allAttribs = attributes;
double[] rowValues = new double[allAttribs.length];
for (int i=0; i<rowValues.length; i++) {
rowValues[i] = row.get(allAttribs[i]);
}
row = new DoubleArrayDataRow(rowValues);
}
return row;
}
COM: <s> the method code next code of class code database data row reader code </s>
|
funcom_train/47680387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfInstances() {
if (isEmpty()) {
return 0;
}
if (isRoot()) {
return 1;
}
if (!this.attributes.isArray()) {
return getParent().getChildInstances(getName()).size();
} else {
return this.values.size();
}
}
COM: <s> provides the number of instances of this field in the current branch </s>
|
funcom_train/14096809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkXMLRules(Document doc, Document instruction) throws Exception {
if (doc == null || doc.getDocumentElement() == null)
return false;
Element e = instruction.getDocumentElement();
PrintWriter logger = new PrintWriter(System.out);
Document parsedDoc = parse(doc, e, logger);
return (parsedDoc != null);
}
COM: <s> a method to validate a pool of schemas outside of the request element </s>
|
funcom_train/5522774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testApostropheResolution() {
System.out.println();
log.info("testApostropheResolution");
X3dCanonicalizer.main(new String[] {testFilesDir + "TestApostropheResolution.x3d"});
X3dToolsXMLUnitTest.main(new String[] {testFilesDir + "TestApostropheResolution.x3d",
testFilesDir + "TestApostropheResolutionCanonical.x3d"});
}
COM: <s> test of correct processing of apostrophes within sfstring and mfstring </s>
|
funcom_train/50703260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SmallXMLObj getSubObj(String name, int i) throws NoSuchSubObjExp {
// - if the hash exists and has an entry, return it's size, else null
if (containsSub(name)) return mSubObjT.get(name).elementAt(i);
else throw new NoSuchSubObjExp(name,i);
}
COM: <s> returns a member of the hashs vector entry at a position </s>
|
funcom_train/15411262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateConnection(PooledConnection conn) {
try {
if (heartbeatsql == null) {
logger.info("Can not test connection as heartbeatsql is not set");
return false;
}
testConnection(conn);
return true;
} catch (Exception e) {
String desc = "heartbeatsql test failed on connection[" + conn.getName() + "]";
logger.warning(desc);
return false;
}
}
COM: <s> make sure the connection is still ok to use </s>
|
funcom_train/9921857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlayer(AI ai, String name, int buyIn) {
Player[] newPlayers= new Player[players.length+1];
for(int player= 0; player<players.length; player++) newPlayers[player]= players[player];
newPlayers[players.length]= new Player(ai, buyIn, name);
players= newPlayers;
players[players.length-1].state= State.CALLED;
}
COM: <s> add a player to the game </s>
|
funcom_train/8815815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BoundingBoxDTO intersect(BoundingBoxDTO b) {
return new BoundingBoxDTO(Math.max(x1, b.x1), Math.max(y1, b.y1), Math.min(x2, b.x2), Math.min(y2, b.y2));
}
COM: <s> calculates the intersection of this bounding box dto with given </s>
|
funcom_train/3112438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem1() {
if (jMenuItem1 == null) {
jMenuItem1 = new JMenuItem();
jMenuItem1.setText("Config GnGeo...");
jMenuItem1.setMnemonic(KeyEvent.VK_C);
jMenuItem1.addActionListener(new ConfigListener(this, ggcp, rlp));
}
return jMenuItem1;
}
COM: <s> this method initializes j menu item1 </s>
|
funcom_train/4377696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getResource(String path) throws MalformedURLException {
if (path == null || path.length() == 0 || path.charAt(0) != '/')
throw new MalformedURLException("Path " + path + " is not in acceptable form.");
File resFile = new File(getRealPath(path));
if (resFile.exists()) // TODO get canonical path is more robust
return new URL("file", "localhost", resFile.getPath());
return null;
}
COM: <s> returns a url to the resource that is mapped to a specified path </s>
|
funcom_train/444309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Variable createVariable(String varName) {
if (varName == null
|| varName.trim().length() == 0) {
throw new IllegalArgumentException();
}
if (varName.startsWith("?")) {
varName = varName.substring(1);
}
return new VariableImpl(varName);
}
COM: <s> creates a new variable instance </s>
|
funcom_train/3113872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDashArray(float[] fArray) {
//// 1. Set the value. Creating a new object because BasicStroke is
//// missing modifier methods.
drawStroke = new
SatinStroke(getLineWidth(), getEndCap(), getLineJoin(),
getMiterLimit(), fArray, getDashPhase());
} // of method
COM: <s> set the dash array for the pen used to draw with this style </s>
|
funcom_train/36708613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
while (true) {
Socket sock = sSock.accept();
InetAddress ip = sock.getInetAddress();
appendToDisplay("Got a client connection" + ip);
Thread newClient = new Thread(new ServerHandler(sock, spielDoubles));
newClient.start();
}
} catch (IOException ex) {
appendToDisplay("Unable to handle new client");
}
}
COM: <s> this is the function server listener </s>
|
funcom_train/18569868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasMatchingArgsWithDefaultArgMatcherReturnsTrue() {
RecordedCall recordedCall =
new RecordedCall(signature, argValues, exception);
InvokedCall invokedCall =
new InvokedCall(signature, argValues, exception);
// NOTE: this cannot mock up EqualsMatcher, because it is instantiated
boolean hasMatchingArgs = recordedCall.hasMatchingArgs(invokedCall);
assertTrue(hasMatchingArgs);
}
COM: <s> test that the has matching args method works if no arg matchers are </s>
|
funcom_train/47677290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDelimiter(int p_level, String p_fieldDelimiter, String p_repDelimiter) {
getDelimiter().put(p_level, new String[]{p_fieldDelimiter, (p_repDelimiter == null ? "" : p_repDelimiter)});
}
COM: <s> adds a new delimiter set that consists of the corresponding level the </s>
|
funcom_train/20210550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeToken(Token<?> t) {
if (null != this.tokens && this.tokens.contains(t)) {
this.tokens.remove(t);
EventManager.getInstance().dispatchEvent(
new PlaceEvent(this, PlaceEventType.TOKEN_DELETED));
}
// else ignore silently
}
COM: <s> removes the specified </s>
|
funcom_train/38828124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getUnitCode(PointVehicle geometry) {
GeomPoint point = geometry.getBoundsMin();
Unit<Length> unit = point.getUnit();
int unitCode=0;
if (unit.equals(SI.METER))
unitCode = 1;
else if (unit.equals(NonSI.INCH))
unitCode = 2;
else if (unit.equals(SI.CENTIMETER))
unitCode = 3;
else {
// Convert to a locale specific option.
if (java.util.Locale.getDefault().equals(java.util.Locale.US)) {
unit = NonSI.INCH;
unitCode = 2;
} else {
unit = SI.METER;
unitCode = 1;
}
}
setFileUnits(unit);
return unitCode;
}
COM: <s> returns the unit code for the input geoemtry </s>
|
funcom_train/35626578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRegistration(Iq iq, IQResultListener listener, int duration) {
synchronized (iqs) {
if (duration < 0) duration = this.maxPermTime;
listener.expireTime = System.currentTimeMillis() + duration;
iqs.put(iq.getAttribute(Iq.ATT_ID), listener);
// #mdebug
//System.out.println("IQM Added: " + iq.getAttribute(Iq.ATT_ID));
// #enddebug
}
}
COM: <s> adds the registration </s>
|
funcom_train/14464456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFontName(String fn) {
// 200708207 KSC
// see if can find font with this, if not, duplicate it
Font f= cloneFont(myxf.getFont());
f.setFontName(fn);
updateFont(f); // 20071010 KSC: update font for this FormatHandle + handing all necessary links ...
/* old way // 20070820 KSC
myfont.setFontName(fn);
//this.getFont().setFontName(fn);
*/ }
COM: <s> set the fonts name </s>
|
funcom_train/14229867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCallTransferFailure(ExtendedCall call, String reason, Message notify) {
LOGGER.fine("onCallTransferFailure()");
if (call!=this.call) {
LOGGER.fine("NOT the current call");
return;
}
LOGGER.info("Transfer failed");
}
COM: <s> callback function called when a call transfer is not sucessfully completed </s>
|
funcom_train/3414456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private V putForNullKey(V value) {
for (Entry<K,V> e = table[0]; e != null; e = e.next) {
if (e.key == null) {
V oldValue = e.value;
e.value = value;
e.recordAccess(this);
return oldValue;
}
}
modCount++;
addEntry(0, null, value, 0);
return null;
}
COM: <s> offloaded version of put for null keys </s>
|
funcom_train/25282728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rearingNow(final boolean rearing) {
if (rearing) {
rearing_now = true;
configs.rearing_thresh = (normal_rat_area + current_rat_area) / 2;
System.out.print("Rearing threshold: " + configs.rearing_thresh
+ "\n");
} else {
rearing_now = false;
final Thread th_rearing = new Thread(new NormalRatAreaThread());
th_rearing.start();
System.out.print("Rearing Training Started" + "\n");
}
}
COM: <s> used to train the filter of the white area of the rat when </s>
|
funcom_train/24118316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doShow1Day(Event event) throws InterruptedException {
this.cal.setMold("default");
btn_Show1Day.setStyle(btnPressedColor);
btn_Show5Days.setStyle(btnOriginColor);
btn_ShowWeek.setStyle(btnOriginColor);
btn_Show2Weeks.setStyle(btnOriginColor);
btn_ShowMonth.setStyle(btnOriginColor);
this.cal.setDays(1);
try {
synchronizeModel();
} catch (ParseException e) {
e.printStackTrace();
}
}
COM: <s> changes the view for 1 day view </s>
|
funcom_train/49747519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parseCodeDescCol() {
String colName = null;
if (codeDescCol != null) {
String[] result = codeDescCol.trim().split("\\s");
if (result != null && result.length > 0) {
colName = result[result.length-1];
}
}
return colName;
}
COM: <s> return code description column name </s>
|
funcom_train/22027409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VariableSelector getChild(String name) {
//This is by no means efficient, but it works
for(int i=0;i<children.size();i++) {
if(((VariableSelector)children.elementAt(i)).getName().equals(name)) {
return (VariableSelector)children.elementAt(i);
}
}
return null;
}
COM: <s> get child code name code if it exists </s>
|
funcom_train/28756587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRegeneration(String newVal) {
if ((newVal != null && this.regeneration != null && (newVal.compareTo(this.regeneration) == 0)) ||
(newVal == null && this.regeneration == null && regeneration_is_initialized)) {
return;
}
this.regeneration = newVal;
regeneration_is_modified = true;
regeneration_is_initialized = true;
}
COM: <s> setter method for regeneration </s>
|
funcom_train/31071333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printEdges(boolean complete, boolean sort) {
if (sort) Collections.sort(edges, edgeComparator);
for (Iterator it = edges.iterator(); it.hasNext(); ) {
Edge edge = (Edge) it.next();
if (!complete || edge.complete())
out.println(edge.toString());
}
out.flush();
}
COM: <s> prints chart edges using the complete edges filter according to the given flag </s>
|
funcom_train/33150229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean copy(File sourcename, File destname) {
if (!sourcename.exists())
return false;
/*
* ln options. -R: Recursive copy of directory and contents, no effect
* when source is a file
*/
String[] progarray = new String[4];
progarray[0] = "cp";
progarray[1] = "-R";
progarray[2] = sourcename.getAbsolutePath();
progarray[3] = destname.getAbsolutePath();
return exec(progarray);
}
COM: <s> make a copy of a file or directory link </s>
|
funcom_train/39276046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LAView setView(LAView newView) {
LAView oldView = this.view;
if (oldView != null) {
getContentPane().remove(oldView);
}
this.view = (LAView) newView;
getContentPane().add(this.view);
view.setViewContainer(this);
return oldView;
}
COM: <s> sets the contained view </s>
|
funcom_train/2447932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPopupInvokeMode(int mode) {
switch (mode) {
case SHOW_POPUP_ON_MOUSE_OVER:
case SHOW_POPUP_ON_CLICK:
invokeMode = mode;
break;
default:
throw new IllegalArgumentException("mode must be one of SHOW_POPUP_ON_MOUSE_OVER or SHOW_POPUP_ON_CLICK."); //$NON-NLS-1$
}
}
COM: <s> controls how the popup menu will be invoked </s>
|
funcom_train/31909179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected short acceptNode(Node n) {
if ((whatToShow & (1 << n.getNodeType() - 1)) != 0) {
if (filter == null) {
return NodeFilter.FILTER_ACCEPT;
} else {
return filter.acceptNode(n);
}
} else {
return NodeFilter.FILTER_SKIP;
}
}
COM: <s> whether or not the given node is accepted by this tree walker </s>
|
funcom_train/20996045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createOldExecutable(IExecutable method, String target) {
// (1) escape name
String nameSuffix = escape(target);
// (2) create contract method
IContractExecutable tmp = new ContractExecutableElement(method.getSimpleName() +
Helper.SEPARATOR + OLD + Helper.SEPARATOR + nameSuffix ,
"java.lang.Object", target);
method.getEnclosingElement().removeEnclosedElement(tmp);
method.getEnclosingElement().addEnclosedElement(tmp);
}
COM: <s> creates a new method which represents the value of </s>
|
funcom_train/50913010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEqualTo(CMLMatrix matrix, double eps) {
return (this.getRows() == matrix.getRows()
&& this.getColumns() == matrix.getColumns() && Util.isEqual(
this.getDoubleArray(), matrix.getDoubleArray(), eps));
}
COM: <s> are two matrices equal </s>
|
funcom_train/45622893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addModuleAssemblyNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_moduleAssemblyName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_moduleAssemblyName_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_ModuleAssemblyName(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the module assembly name feature </s>
|
funcom_train/32080926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage (Image image) {
checkWidget();
if (image != null && image.isDisposed ()) {
error (SWT.ERROR_INVALID_ARGUMENT);
}
this.image = image;
if (image != null) {
OS.Image_Source (imageHandle, image.handle);
OS.UIElement_Visibility (imageHandle, OS.Visibility_Visible);
} else {
OS.Image_Source (imageHandle, 0);
OS.UIElement_Visibility (imageHandle, OS.Visibility_Collapsed);
}
resize (width, height);
}
COM: <s> sets the image that the receiver will use to paint the caret </s>
|
funcom_train/2903814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(XMLTag spec){
if(spec.tag.compareTo("color")==0){
try{
int rgb = Integer.parseInt(spec.value.toString());
color = new Color(rgb);
}
catch(Exception e){
new JXError(getClass(), "Invalid color tag paring", e.getStackTrace());
}
}
else if(spec.tag.compareTo("font")==0){
font = spec.value.toString();
}
}
COM: <s> initialize title bar with a single property tag </s>
|
funcom_train/18141402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String key, String value) {
// store
if (parent==null) {
// 20040523 removed check for old value - don't need it imho
if (value==null)
properties.remove(key);
else
properties.put(key,value);
} else {
parent.put(view+"."+key,value);
}
}
COM: <s> remembers a string value </s>
|
funcom_train/2558256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object read(InputNode node) throws Exception {
Class expect = type.getType();
String name = entry.getValue();
if(!entry.isInline()) {
if(name == null) {
name = context.getName(expect);
}
return readElement(node, name);
}
return readAttribute(node, name);
}
COM: <s> this method is used to read the value value from the node </s>
|
funcom_train/3527693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IBasicResultSet execute () throws SearchException {
Iterator iterator = getRequestedResourcePool().getPool().iterator();
while (iterator.hasNext()) {
ComparableResource item =
(ComparableResource)iterator.next();
if (compare (item))
resultSet.add (item);
}
return resultSet;
}
COM: <s> executes the expression </s>
|
funcom_train/48909137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtBorrar() {
if (btBorrar == null) {
btBorrar = new JButton();
btBorrar.setBounds(new Rectangle(272, 59, 72, 29));
btBorrar.setText("Borrar");
btBorrar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
((MiTabla)tabla).borrar();
}
});
}
return btBorrar;
}
COM: <s> this method initializes bt borrar </s>
|
funcom_train/9285782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PropertiesMap filterProperties(PropertiesMap inputSet) {
PropertiesMap limited = new PropertiesMap();
// filter out any derby.* properties, only
// JDBC attributes can be set this way
for (Iterator e = inputSet.propertyNames(); e.hasNext(); ) {
String key = (String) e.next();
// we don't allow properties to be set this way
if (key.startsWith("derby."))
continue;
limited.put(key, inputSet.getProperty(key));
}
return limited;
}
COM: <s> filter out properties from the passed in set of jdbc attributes </s>
|
funcom_train/13492562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void release(Connection con) {
try {
if (con!=null && closeConnection) {
con.close();
if (LOG_SQL.isDebugEnabled()) LOG_SQL.debug("JDBC connection released by SQLFunction " + this);
}
}
catch (SQLException x) {
LOG_SQL.error("Exception closing jdbc connection in SQLFunction " + this,x);
}
}
COM: <s> release the connection used to invoke the function </s>
|
funcom_train/20440055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSecondPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFTime_second_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFTime_second_feature", "_UI_ESMFTime_type"),
ESMFPackage.Literals.ESMF_TIME__SECOND,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the second feature </s>
|
funcom_train/12646209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hide() {
synchronized (ownedWindows) {
for (int i = 0; i < ownedWindows.size(); i++) {
Window child = (Window) ownedWindows.elementAt(i);
if (child != null) {
child.hide();
}
}
}
super.hide();
}
COM: <s> hide this window its subcomponents and all of its owned children </s>
|
funcom_train/4779868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
if (event.getActionCommand().equals(ActionConstants.SAVE_ACTION)) {
try {
AccessRule rule = getAccessRuleForm().editAccessRule();
message.setUserObject(rule);
message.setState(Message.SUCCESS);
dispose();
}
catch (AppException ex) {
displayError(ex.getMessage());
}
}
else if (event.getActionCommand().equals(ActionConstants.CANCEL_ACTION)) {
message.setState(Message.CANCEL);
dispose();
}
}
COM: <s> action performed event handler </s>
|
funcom_train/41523805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alUpdateGroupSelected(ActionEvent event) {
getSession().setGroup(null);
Group group = (Group) selectRowFromEvent(event, Group.class);
if (group != null) {
Command cmd = getCommand(LoadGroup.class);
((LoadGroup) cmd).setGroupId(group.getCode());
cmd = runCommand(cmd);
getSession().setGroup(((LoadGroup) cmd).getResult());
}
}
COM: <s> it retrieves group from action event and update selected group into session </s>
|
funcom_train/8900981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel3() {
if (jPanel3 == null) {
jPanel3 = new JPanel();
jPanel3.setName("");
jPanel3.setPreferredSize(new java.awt.Dimension(100, 22));
jPanel3.add(getJButton2(), null);
jPanel3.add(getJButton(), null);
jPanel3.add(getJButton5(), null);
}
return jPanel3;
}
COM: <s> this method initializes j panel3 </s>
|
funcom_train/9286120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long calculateSIfromFI() {
//Fill information obtained from the log buffer.
int fi;
//shipping interval derived from the fill information.
long si;
fi = logBuffer.getFillInformation();
if (fi >= FI_HIGH) {
si = -1;
} else if (fi > FI_LOW && fi < FI_HIGH) {
si = minShippingInterval;
} else {
si = maxShippingInterval;
}
return si;
}
COM: <s> will be used to calculate the shipping interval based on the fill </s>
|
funcom_train/196657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getValue(Object srcObject, String memberName) throws MatchException {
Object objectValue = getObjectValue(srcObject, memberName);
try {
return ((Number)objectValue).doubleValue();
} catch (ClassCastException cce) {
throw new MatchException("Error while retrieving number data", cce);
} catch (NullPointerException npe) {
throw new MatchException("Error while retrieving number data", npe);
}
}
COM: <s> returns the value of the given member when executed on the given object </s>
|
funcom_train/16177239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMatrix(DenseDoubleMatrix2D m) {
int rows = m.rows();
int cols = m.columns();
matrix = new ByteMatrix2D(rows, cols);
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
matrix.set(i, j, (byte)m.getQuick(i, j));
}
}
}
COM: <s> copies the matrix elements from the specified dense double matrix2 d and </s>
|
funcom_train/3475464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNewName (Component component, ComponentHandler compHandler, String prefix) {
int number = 0;
String result;
String compName = compHandler.getName (component);
do {
number++;
result = prefix + compName + numberPrefix + number + numberSuffix;
} while (nameToItem.containsKey (result) && (getComponent (result) != component));
return result;
}
COM: <s> returns a name for a new component to be added </s>
|
funcom_train/44289726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear (int index) {
checkWidget ();
if (!(0 <= index && index < getItemCount())) {
error(SWT.ERROR_INVALID_RANGE);
}
TableItem item = (TableItem) getVisibleItem(index);
item.clear();
int y = getRedrawY(item);
redraw(0, y, getClientArea().width, getItemHeight(), false);
}
COM: <s> clears the item at the given zero relative index in the receiver </s>
|
funcom_train/4505366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scheduleAtFixedRate(TimerTask task, long delay, long period) {
TimerTaskWrapper taskWrapper = new TimerTaskWrapper(task);
synchronized (wrappedTasks) {
wrappedTasks.put(task, taskWrapper);
}
timer.scheduleAtFixedRate(taskWrapper, delay, period);
}
COM: <s> schedules the specified task for repeated i fixed rate execution i </s>
|
funcom_train/21643176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WizardCardPanel getWizardPanel() {
if (wizardPanel == null) {
wizardPanel = new WizardCardPanel(this);
wizardPanel.add(getRobotSelectionPanel(), "Select robot");
wizardPanel.add(getPackagerOptionsPanel(), "Select options");
wizardPanel.add(getFilenamePanel(), "Select filename");
wizardPanel.add(getConfirmPanel(), "Confirm");
}
return wizardPanel;
}
COM: <s> return the tabbed pane </s>
|
funcom_train/37217961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File artifactDir(Artifact a, boolean createDirs) {
String[] groupParts = a.getGroupId().split("\\.");
File groupDir = base;
for (String part : groupParts) {
groupDir = new File(groupDir, part);
}
File artifactDir = new File(groupDir, a.getArtifactId());
File versionDir = new File(artifactDir, a.getVersion());
if (createDirs) {
versionDir.mkdirs();
}
return versionDir;
}
COM: <s> local base directory for the specified artifact in the </s>
|
funcom_train/1238796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshGlobalOptions() throws ConfigurationException {
Hashtable globalOptions = config.getGlobalOptions();
if (globalOptions != null)
setOptions(globalOptions);
normaliseOptions(this);
// fixme: If we change actorURIs to List, this copy constructor can
// go away...
actorURIs = new ArrayList(config.getRoles());
}
COM: <s> re load the global options from the registry </s>
|
funcom_train/32621734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propagateSCC() {
Set visited = new HashSet();
visited.add(this);
// Scan predecessors not including ourselves
doVisitPredecessors(new Visitor() {
public void visit(GraphNode node, Object arg1, Object arg2) {
Set sc = (Set)arg1;
// Add closure
node.succClosed.addAll(sc);
// Scan for redundant links
for (Iterator i = node.succ.iterator(); i.hasNext();) {
GraphNode s = (GraphNode)i.next();
if (sc.contains(s)) {
i.remove();
s.pred.remove(node);
}
}
}
}, succClosed, null, visited);
}
COM: <s> propagate the results of creating a new scc with this </s>
|
funcom_train/18703271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getImageDescriptor(String name) {
try {
URL installURL = getDefault().getDescriptor().getInstallURL();
URL url = new URL(installURL, name);
return ImageDescriptor.createFromURL(url);
} catch (MalformedURLException _ex) {
return ImageDescriptor.getMissingImageDescriptor();
}
}
COM: <s> generates an image descriptor </s>
|
funcom_train/48929640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBuddy(String buddyName){
// Later this will present a YES_NO_DIALOG box to ask if you want to add the buddy
myBuddies.add(new Buddies(buddyName));
String output2 = buddyName + " has been added to your buddy list!";
JOptionPane.showMessageDialog(null, output2, "New Buddy", JOptionPane.INFORMATION_MESSAGE);
}
COM: <s> this will add a new buddy to your buddy list </s>
|
funcom_train/43372080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Long findParentEbiCollection(String parentName) throws Exception {
DBObject dbo = new DBObject();
String sql = "SELECT id from ebiCollection where name like \""
+ parentName + "\"";
ResultSet resultSet = dbo.sqlExecuteSelect(sql);
Long parentId = null;
if (resultSet.next()) {
parentId = resultSet.getLong("id");
}
resultSet.getStatement().close();
resultSet.close();
dbo.closeConnection();
return parentId;
}
COM: <s> find an ebicollection based on the scientific name </s>
|
funcom_train/28875542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insertRep(int rowIndex, int columnIndex, int value) {
// we must have another free space
if (!insert(rowIndex, columnIndex+1, value)) return false;
Shared.tracks[actTune][rowIndex].setValueAt(rowIndex, Track.PATTERN_REP);
return true;
}
COM: <s> insert s rep command if it is allowed </s>
|
funcom_train/15600949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(300, 274);
this.setForeground(new Color(0, 204, 255));
this.setBackground(new Color(153, 204, 255));
this.addTab(null, null, getGCFriendListGUI(), null);
this.addTab(null, null, getGCGroupListGui(), null);
}
COM: <s> this method initializes this </s>
|
funcom_train/3151966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerShowEventId(int showEventId, String childName) {
if( showMap == null) {
showMap = new HashMap();
}
showMap.put( childName, new Integer(showEventId));
showMap.put( new Integer(showEventId), childName);
this.register( showEventId, showProcessor);
}
COM: <s> register an event id with to this </s>
|
funcom_train/21796471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVoucher(long idVoucher) throws VoucherException{
VoucherEntity voucher = voucherEntityFacade.find(idVoucher);
if(voucher!=null){
//this.order.setVoucherEntity(voucher);
this.voucherEntity = voucher;
//this.orderEntityFacade.edit(order);
}else{
throw new VoucherException("voucher invalide");
}
}
COM: <s> permet de d finir un bon dachat </s>
|
funcom_train/31936110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinutes(int newMinutes) {
if (newMinutes < 0 || 59 < newMinutes)
throw new IllegalArgumentException("minutes are out of range");
int oldMinutes= getMinutes();
m_minute.setText(Integer.toString(newMinutes));
firePropertyChange("minutes", oldMinutes, newMinutes);
}
COM: <s> set the minutes </s>
|
funcom_train/45896267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Page copy(Page p) {
byte[] tmp = new byte[headerLen];
System.arraycopy(headerBase, header, tmp, 0, headerLen);
p.headerLen = headerLen;
p.headerBase = tmp;
p.header = 0;
tmp = new byte[bodyLen];
System.arraycopy(bodyBase, body, tmp, 0, bodyLen);
p.bodyLen = bodyLen;
p.bodyBase = tmp;
p.body = 0;
return p;
}
COM: <s> copies the values of this page into the supplied page </s>
|
funcom_train/7442291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNext(org.restlet.Uniform next) {
if (next instanceof Restlet) {
Restlet nextRestlet = (Restlet) next;
if (nextRestlet.getContext() == null) {
nextRestlet.setContext(getContext());
}
}
this.next = next;
// If true, it must be updated after calling this method
this.nextCreated = false;
}
COM: <s> sets the next handler such as a restlet or a filter </s>
|
funcom_train/5395406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsRequired() {
System.out.println("isRequired");
TableAttribute instance = null;
boolean expResult = true;
boolean result = instance.isRequired();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of is required method of class org </s>
|
funcom_train/47085714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Context getContext(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
ServletContext application = request.getSession().getServletContext();
Context context = new ServletWebContext(application, request, response);
return context;
}
COM: <s> creates a new web context </s>
|
funcom_train/32862871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element convertResult(Object result) throws JAXBException {
if (result == null)
return null;
Document doc = m_docBuilder.newDocument();
Class<?> type = result.getClass();
Element root = doc.createElement("result");
if (type.getAnnotation(XmlRootElement.class) != null) {
m_marshaller.marshal(result, root);
return root;
}
else if(result instanceof Collection){
return convertCollection((Collection) result, doc);
}
String str = result.toString();
Text text = doc.createTextNode(str);
root.appendChild(text);
return root;
}
COM: <s> todo add support for collection process return </s>
|
funcom_train/3738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLicenceText() {
URL url = getClass().getResource("/resources/licence.html");
try {
informationArea.setPage(url);
}
catch (IOException e) {
informationArea.setText("Unable to open licence page. This program is copyrighted. Please do not use and re-install.");
}
}
COM: <s> set the text in the licence area </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.