__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/2951728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
PropertyDecl other = (PropertyDecl) o;
int thisWeight = this.getWeight();
int otherWeight = other.getWeight();
if (thisWeight != otherWeight) {
return thisWeight - otherWeight;
}
int thisSpec = this.getRule().getSpecificity();
int otherSpec = other.getRule().getSpecificity();
return thisSpec - otherSpec;
}
COM: <s> implementation of code comparable </s>
|
funcom_train/51592174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processScript(String filename, String oldfilename) {
Document doc = readScript(filename);
if (writeScriptBackup == true) {
// write original script backup
writeScript(doc, oldfilename);
System.out.println("Wrote " + oldfilename);
}
// modify script
modifyScriptMetadata(doc);
insertCallLegSessionIdGcc(doc);
insertCallLegSessionIdMpcc(doc);
removeStoreBnumberAttribute(doc);
// write modified script
writeScript(doc, filename);
System.out.println("Wrote " + filename);
}
COM: <s> process script write backup if requested </s>
|
funcom_train/37041790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String adjustURLPattern(String urlPattern) {
if (urlPattern == null)
return (urlPattern);
if (urlPattern.startsWith("/") || urlPattern.startsWith("*."))
return (urlPattern);
if (!isServlet22())
return (urlPattern);
log(sm.getString("standardContext.urlPattern.patternWarning",
urlPattern));
return ("/" + urlPattern);
}
COM: <s> adjust the url pattern to begin with a leading slash if appropriate </s>
|
funcom_train/20678466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumnList(String columnList) {
int listSize = SmithList.ListLen(columnList);
for (int i = 1; i <= listSize; i++) {
String columnName = SmithList.ListGetAt(columnList, i).trim();
addColumn(columnName, new QueryColumn(smithQuery, columnName));
}
}
COM: <s> adds empty columns to recordset specified in list </s>
|
funcom_train/24418642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void xeq(String cmd, int arg) {
// ARCL,ASTO,CATALOG,ENG,FIX,RCL,SCI,SIZE,STO,STO-,STO*,STO/,STO+,SumREG,
// TONE,VIEW
message = false;
Double res;
res = x;
lastx = x;
x = res;
}
COM: <s> handle all functions with integer arguments </s>
|
funcom_train/2880202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSecurityPolicyFile(ProjectComponent owner, Java process, File securityFile, boolean delete) {
Environment.Variable settings = new Environment.Variable();
settings.setFile(securityFile);
settings.setKey("java.security.policy=");
process.addSysproperty(settings);
owner.log("Security policy file: " + securityFile, Project.MSG_VERBOSE);
fileToDelete = delete ? securityFile : null;
}
COM: <s> set the security policy file </s>
|
funcom_train/18936638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openFileChooser(ActionEvent e) {
OurGridFileChooser fileChooser = new OurGridFileChooser("Properties file", "properties");
File propertiesFile = fileChooser.getFile();
if (propertiesFile != null) {
Properties prop = CommonUtils.loadProperties(propertiesFile);
peerPubKeyTextArea.setText(prop.getProperty(SignatureProperties.PROP_PUBLIC_KEY));
}
}
COM: <s> opens a file chooser that permites define the peer public key </s>
|
funcom_train/18393027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExcludes(String[] excludes) {
if (excludes == null) {
_excludes = null;
} else {
_excludes = new String[excludes.length];
for (int i = 0; i < excludes.length; i++) {
String pattern;
pattern = excludes[i];
if (pattern.endsWith("/")) {
pattern += "**";
}
_excludes[i] = pattern;
}
}
}
COM: <s> sets the list of exclude patterns to use </s>
|
funcom_train/9389353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateButtonsState() {
ISelection sel = mTableViewerPackages.getSelection();
boolean hasSelection = sel != null && !sel.isEmpty();
mUpdateButton.setEnabled(mTablePackages.getItemCount() > 0);
mDeleteButton.setEnabled(hasSelection);
mRefreshButton.setEnabled(true);
}
COM: <s> enable or disable buttons depending on list content and selection </s>
|
funcom_train/129918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Graphics getBufferedGraphics() {
// This ensures that this method only creates the BufferStrategy once
if (bufferStrategy != null) {
return bufferStrategy.getDrawGraphics();
}
try {
createBufferStrategy(2);
bufferStrategy = getBufferStrategy();
}
catch (IllegalStateException ise) {
bufferStrategy = null;
return null;
}
return getBufferedGraphics();
}
COM: <s> returns the appropriate code graphics code context to paint on </s>
|
funcom_train/22277260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void archiveTo(Archive archive) {
Archiver archiver;
Hashtable documentValues;
archiver = new Archiver(archive);
documentValues = new Hashtable();
encodeDocumentInformation(documentValues);
try {
archiver.archiveRootObject(documentValues);
archiver.archiveRootObject(targetProxyManager());
} catch (CodingException e) {
e.printStackTrace();
}
}
COM: <s> stores the currect document information into b archive b </s>
|
funcom_train/16786756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultFilename(String filename, java.util.List<LanguageVariant> languageVariants) throws RQLException {
Project project = getProject();
LanguageVariant currentLv = project.getCurrentLanguageVariant();
try {
// update an lv dependent element
for (LanguageVariant lv : languageVariants) {
project.setCurrentLanguageVariant(lv);
setDefaultFilename(filename);
}
} finally {
// restore language variant
project.setCurrentLanguageVariant(currentLv);
}
}
COM: <s> sets the default filename on this template element in all given language variants </s>
|
funcom_train/50697105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection get(String id, String qry) throws HibernateException {
Session session = null;
List list = null;
try {
session = HibernateUtil.currentSession();
list = session.find(qry, id, Hibernate.STRING);
} catch (HibernateException e) {
log.log(Level.WARNING, "HibernateException caught", e);
} finally {
HibernateUtil.closeSession();
}
return list;
}
COM: <s> get an object </s>
|
funcom_train/1953117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSCLPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_I2CBusSegment_SCL_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_I2CBusSegment_SCL_feature", "_UI_I2CBusSegment_type"),
I2cPackage.Literals.I2C_BUS_SEGMENT__SCL,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the scl feature </s>
|
funcom_train/8221118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isKeyUnlocked(int keystoreIndex, int aliasIndex) {
KeyStore ks = (KeyStore) _keyStores.get(keystoreIndex);
String alias = getAliasAt(keystoreIndex, aliasIndex);
Map pwmap = (Map) _aliasPasswords.get(ks);
if (pwmap == null)
return false;
return pwmap.containsKey(alias);
}
COM: <s> checks if is key unlocked </s>
|
funcom_train/44163385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element diplomaticTrade(DummyConnection connection, Element element) {
DiplomacyMessage message
= new DiplomacyMessage(freeColServer.getGame(), element);
DiplomaticTrade agreement = message.getAgreement();
boolean accept = getAIPlayer().acceptDiplomaticTrade(agreement);
agreement.setStatus((accept) ? TradeStatus.ACCEPT_TRADE
: TradeStatus.REJECT_TRADE);
return message.toXMLElement();
}
COM: <s> handles an diplomatic trade message </s>
|
funcom_train/24364821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getXML() {
String type = getXMLtypeString();
StringBuffer sb = new StringBuffer();
sb.append("<element");
sb.append(" type=\"");
sb.append(type);
sb.append("\" label=\"");
sb.append(Util.encodeXML(label));
sb.append("\">\n");
sb.append(getXMLtags());
// caption text
if (caption != null && caption.length() > 0 && !caption.equals(label)) {
sb.append("\t<caption val=\"");
sb.append(Util.encodeXML(caption));
sb.append("\"/>\n");
}
sb.append("</element>\n");
return sb.toString();
}
COM: <s> save object in xml format </s>
|
funcom_train/13525944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getShrinkY() {
if (shrinkY < 0.0) {
Iterator iter = cells.iterator();
Cell cell;
shrinkY = getIntrinsicShrinkY();
while (iter.hasNext()) {
cell = (Cell) iter.next();
if (cell.isMultiRowCell())
shrinkY = Math.max(shrinkY, cell.getShrinkYPerRow());
}
}
return shrinkY;
}
COM: <s> gets the vertical shrink value of this row </s>
|
funcom_train/43479400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serviceSearchCompleted(int transID, int arg1) {
/** done, so remove your request id */
synchronized(requests){
requests.remove(new Integer(transID));
if( requests.isEmpty() ) {
serviceSearch = false;
constants.info( "no more requests", this);
} else {
constants.info( "requests now = " + requests, this);
}
}
}
COM: <s> this method is called by the blue tooth control when service search has </s>
|
funcom_train/16976067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotInserir() {
if (botInserir == null) {
botInserir = new JButton();
botInserir.setBounds(new Rectangle(260, 20, 100, 20));
botInserir.setText("Inserir");
botInserir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
cadastrarAtributosNaTabela();
JOptionPane.showMessageDialog(null, "Dados inseridos na Tabela!");
}
});
}
return botInserir;
}
COM: <s> this method initializes bot inserir </s>
|
funcom_train/49425966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(final NiftyRenderEngine r) {
if (isHoverEffect()) {
effectImpl.execute(element, timeInterpolator.getValue(), falloff, r);
} else {
effectImpl.execute(element, timeInterpolator.getValue(), null, r);
}
}
COM: <s> execute the effect </s>
|
funcom_train/12190647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAttachmentsForChannel() throws Exception {
MessageAttachments sameChannel =
attachments.getAttachmentsForChannel("two");
Iterator itr = sameChannel.iterator();
assertTrue("First attachment for channel two is not " +
"the expected object",
two == itr.next());
assertTrue("Second attachment for channel two is not " +
"the expected object",
three == itr.next());
}
COM: <s> test the retrieval of attachments for a specific channel </s>
|
funcom_train/31651690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerDatabase(String driver, boolean create) throws Exception {
Class cl = Class.forName(driver);
Database database = (Database) cl.newInstance();
if(create)database.setProperty("create-database", "true");
DatabaseManager.registerDatabase(database);
databases.add(database);
}
COM: <s> register driver with the database manager </s>
|
funcom_train/44822157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Action getControlAction (String actionName) {
try {
IControlFactory controlFactory = (IControlFactory) Finder.findService(
IControlFactory.class, null);
IControl control = controlFactory.getControl(actionName);
return (Action) control.asType(Action.class);
// If there are any exceptions, this method explicitly returns null
} catch (Exception x) {
return null;
}
}
COM: <s> gets an action object for use in constructing a pushbutton </s>
|
funcom_train/50336854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getTableCellRendererComponent(JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column) {
setSelected(value!=null && ((Boolean)value).booleanValue());
setEnabled(table.isCellEditable(row, column));
return this;
}
COM: <s> override this method from the parent class </s>
|
funcom_train/50817635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
setLayout(new BorderLayout());
this.fontList = createFontList();
JScrollPane listScroll = createFontListScroll(this.fontList);
add(listScroll, BorderLayout.CENTER);
JPanel buttons = createButtonPanel();
add(buttons, BorderLayout.PAGE_END);
}
COM: <s> initializes the graphics </s>
|
funcom_train/10175177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HelpListener getHelpListener() {
return new HelpListener() {
public void helpRequested(HelpEvent e) {
final IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
helpSystem.displayHelp(HelpSystem.getContext(XAwareConstants.CONTEXT_ID_SELECT_EXAMPLES_DIALOG));
}
};
}
COM: <s> returns the help listener instance </s>
|
funcom_train/23235432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCross(Graphics g, int x, int y, Color color) {
int size = 2;
g.setColor(color);
g.drawLine(x - size, y, x + size, y);
g.drawLine(x, y + size, x, y - size);
}
COM: <s> draws a cross at the given position </s>
|
funcom_train/20060966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyTo(Pointer<?> destination, long elementCount) {
PointerIO<T> io = getIO("Cannot copy untyped pointer without byte count information. Please use copyTo(offset, destination, destinationOffset, byteCount) instead");
copyBytesAtOffsetTo(0, destination, 0, getValidElements() * io.getTargetSize());
}
COM: <s> copy remaining elements from this pointer to a destination using the </s>
|
funcom_train/32833443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object unwrapValueToReturnIfNeeded(Object valueToReturn) {
if (valueToReturn != null && valueToReturn instanceof ObjectToInjectHolder) {
ObjectToInjectHolder objectToInjectHolder = (ObjectToInjectHolder) valueToReturn;
return objectToInjectHolder.getObjectToInject();
}
return valueToReturn;
}
COM: <s> if the value to return is an wrapper object e </s>
|
funcom_train/38542378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertSubCache(final Cache cache, final int position) {
if (cache != null) {
synchronized (this.subCaches) {
if (!this.subCaches.contains(cache)) {
if ((position < 0) || (position >= this.subCaches.size())) {
this.subCaches.add(cache);
} else {
this.subCaches.add(position, cache);
}
}
}
}
}
COM: <s> adds a cache at the given position of the list of cache </s>
|
funcom_train/3545229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveBankNodeToRight(Node node) {
if (targetTreeContainsNode(node)) {
// This bank node is already in target tree
return;
}
if (!targetTreeContainsParent(node)) {
// Node parent isn't in target tree. Adding the parent.
addParentToTargetTree(node);
}
// Adding the node to target tree
addBankNodeToTargetTree(node);
}
COM: <s> moves a given bank node to right </s>
|
funcom_train/51069605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handle_ping_msg (PingMsg msg) {
final String tag = this.tag + ".handle_ping_msg";
if (DEBUG) Debug.printtagln (tag, "processing PingMsg " + msg);
// TODO: think about flood attacks, timeouts, sequence numbers...
handle_tapestry_route_msg (new PongMsg (msg.peer));
}
COM: <s> implements the functionality of network latency req </s>
|
funcom_train/12162617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderWhenColorRepresentedUsingRBGValues() {
StyleValue color = StyleValueFactory.getDefaultInstance().
getColorByRGB(null, COLOR_ORANGE);
String expectedRendering = "border-top-color:#ffa500;";
testRender(color, "border-top-color", expectedRendering);
}
COM: <s> tests that the color style value is rendered correctly </s>
|
funcom_train/14202208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DialogRunner findDialogRunnerByID(String id) throws UnknownIDException {
DialogRunner retval = null;
Iterator<DialogRunner> it = dialogRunners.iterator();
while (it.hasNext() && (retval == null)) {
DialogRunner currentRunner = it.next();
if (id.equals(currentRunner.getId())) {
retval = currentRunner;
}
}
if (retval == null)
throw new UnknownIDException("Cannot find DialogRunner: ID=" + id);
return retval;
}
COM: <s> helper method searches for the dialog runner with the given id </s>
|
funcom_train/5268744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreFromArray(byte[] data) {
index1 = SaveGameHandler.byteArrayToInt(data, 0);
index2 = SaveGameHandler.byteArrayToInt(data, 4);
activeWords.removeAllElements();
for(int i= 8; i < data.length; i+= 16) {
activeWords.addElement(new Word(data, i, this));
}
}
COM: <s> resets the list of active words from a byte array </s>
|
funcom_train/9873681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAnalysisMenu(JMenu menu, ActionManager manager) {
String[] category={"Clustering","Statistics","Classification","Data Reduction","Meta Analysis","Visualization","Miscellaneous"};
for(int i=0;i<category.length;i++){
menu.add(createJMenuItem(category[i],manager));
}
}
COM: <s> adds analysis menu items </s>
|
funcom_train/21998880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if (e.getSource() == okButton) {
// Save preferences from all pages
for (Iterator iterator = pages.iterator(); iterator.hasNext();) {
Module page = (Module) iterator.next();
page.save(false);
}
// Flush preference changes to backing store
PreferencesManager.flush();
}
// ok or cancel button closes window
propertySupport.firePropertyChange(ModuleFrame.WINDOW_CLOSE_PROPERTY,
0,
1);
}
COM: <s> called when the user clicks on the save or cancel button </s>
|
funcom_train/546708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getFileMenuItem(int which) {
switch(which) {
case FILE_NEW:
return jMenuItemNew;
case FILE_LOAD:
return jMenuItemLoad;
case FILE_SAVE:
return jMenuItemSave;
case FILE_SAVEAS:
return jMenuItemSaveAs;
case FILE_EXIT:
return jMenuItemExit;
}
return null;
}
COM: <s> returns a reference to the specified menu item of the file menu </s>
|
funcom_train/21761961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadService(String serviceName) throws MalformedURLException, RemoteException, ClassNotFoundException, IllegalAccessException, InstantiationException {
Hashtable<String, String> ht = this.serviceMap.get(serviceName);
Remote r = (Remote) Class.forName(ht.get(Constants.Class)).newInstance();
Naming.rebind(ht.get("url"), r);
}
COM: <s> loads the service with the given name </s>
|
funcom_train/27749558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void centerScreen(Component com) {
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
Rectangle abounds = com.getBounds();
com.setLocation((dim.width - abounds.width) / 2,
(dim.height - abounds.height) / 2);
com.requestFocus();
}
COM: <s> centers the frame </s>
|
funcom_train/46735746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTermName(String termName) {
if (Converter.isDifferent(this.termName, termName)) {
String oldtermName= null;
oldtermName = this.termName;
this.termName = termName;
setModified("termName");
firePropertyChange(String.valueOf(TERMS_TERMNAME), oldtermName, termName);
}
}
COM: <s> full name of term </s>
|
funcom_train/3710246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countHDUs() throws FitsException, IOException {
int count = 0;
BasicHDU hdu = fits_file.getHDU(0);
while (hdu != null) {
try {
count++;
hdu = fits_file.getHDU(count);
if (command != null && hdu != null) {
command.execute (hdu);
}
} catch (TruncatedFileException e) {
count--;
}
}
return count;
}
COM: <s> count the hdus in the file by brute force </s>
|
funcom_train/51719451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SLcreate(java.net.Socket sock) {
if (slave == null) {
slave = new T_IP(this);
if (sock != null) {
((T_IP) slave).setTCPsocket(sock);
} //if listen create client socket, P_Thread follow for blocking reading
}
}
COM: <s> create slave for ipl4 connection </s>
|
funcom_train/22206487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupBasicArgs(CmdLineParser parser) {
nomergemap = parser.addBooleanOption('-', "no-mergemap");
nomergeref = parser.addBooleanOption('-', "no-mergeref");
consistent = parser.addBooleanOption('c', "consistent");
}
COM: <s> adds the basic command line options to the specified commandline </s>
|
funcom_train/49626762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String prepareBundleName(final Bundle b) {
if ((b != null) && ((b.getName() == null) || b.getName().equals(""))) {
throw new IllegalArgumentException("The name of the given Bundle"
+ " is either null or an empty String.");
}
if (b == null) {
return JobletScheduler.BUNDLE_NULL_STRING;
}
return b.getName();
}
COM: <s> returns the name of the given </s>
|
funcom_train/5445061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSocket(Socket newSocket) {
try {
if (newSocket == null) {
if (currentSocket != null) currentSocket.close();
setSocketState(SOCKET_NOTCONNECTED);
} else setSocketState(SOCKET_CONNECTED);
currentSocket = newSocket;
} catch (Exception e) {
ErrorLog.out("Could not (dis)connect socket: " + e);
}
}
COM: <s> set the socket to be used by this connection </s>
|
funcom_train/15512950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadForm(FARForm form, boolean overwrite) {
if( overwrite || (dataModel.getSearchStringContent().length() == 0)) {
dataModel.setSearchStringContent( form.getSearchStringContent() );
contentPattern.setText( form.getSearchStringContent() );
regexFlag.setSelected( form.isRegexContentPattern() );
ignoreCaseFlag.setSelected( form.isIgnoreCase() );
}
}
COM: <s> copies the content of the specified form into this component </s>
|
funcom_train/15552191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxOn() {
if (jCheckBoxOn == null) {
jCheckBoxOn = new JCheckBox();
jCheckBoxOn.setToolTipText("Toggle filter on/off");
jCheckBoxOn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
regex.setActive(getJCheckBoxOn().isSelected());
}
});
}
return jCheckBoxOn;
}
COM: <s> this method initializes j check box on </s>
|
funcom_train/50392643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handlePreProcessing() throws ProcessingException {
try{
//get id of stage in sub action
String stageInActionID=(String)action.getProcessingContext().get(subactionkey_in);
if(stageInActionID!=null){
handleStagingIn(stageInActionID);
}
}catch(Exception ex){
LogUtil.logException("Error processing stage-in.", ex, logger);
String reason=LogUtil.createFaultMessage("Error processing stage-in.", ex);
setToDoneAndFailed(reason);
}
}
COM: <s> handle state pre processing aka staging in </s>
|
funcom_train/21953299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showLoadError(MessagingException me) {
final MessagingException fme = me;
Runnable runMe = new Runnable() {
public void run() {
setLabel(Pooka.getProperty("AttachmentPopupMenu.errorloading.title", "Error loading attachments"));
fme.printStackTrace();
}
};
if (SwingUtilities.isEventDispatchThread())
runMe.run();
else
SwingUtilities.invokeLater(runMe);
}
COM: <s> shows a load error for this popup menu </s>
|
funcom_train/7620962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addJavascriptInterface(Object obj, String interfaceName) {
// Use Hashmap rather than Bundle as Bundles can't cope with Objects
HashMap arg = new HashMap();
arg.put("object", obj);
arg.put("interfaceName", interfaceName);
mWebViewCore.sendMessage(EventHub.ADD_JS_INTERFACE, arg);
}
COM: <s> use this function to bind an object to javascript so that the </s>
|
funcom_train/39063601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validatePage() {
if (super.validatePage()) {
// Make sure the file ends in ".xms".
//
String requiredExt = InstructorPlugin.getDefault().getString("xms");
String enteredExt = new Path(getFileName()).getFileExtension();
if (enteredExt == null || !enteredExt.equals(requiredExt)) {
setErrorMessage("The file must end with '.xms'");
return false;
}
else {
return true;
}
}
else {
return false;
}
}
COM: <s> the framework calls this to see if the file is correct </s>
|
funcom_train/37822154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean back() {
if (current.prev != null) {
Entry<State,Action> e = current.successors.get(current.current);
current = current.prev;
// arguments: ex-current state, action which got us there, ex-previous state
notifyAll(new NotifyBack(e.getKey(), e.getValue(),
current.successors.get(current.current).getKey()));
return true;
}
else
return false;
}
COM: <s> go backwards in the derivation triggering code back code </s>
|
funcom_train/43097519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveAction() {
Object action =
Model.getCommonBehaviorFactory().createUninterpretedAction();
Model.getCollaborationsHelper().setAction(elem, action);
Model.getCollaborationsHelper().setAction(elem, null);
Model.getPump().flushModelEvents();
assertEquals(0, model.getSize());
assertTrue(model.isEmpty());
}
COM: <s> test set action for removing </s>
|
funcom_train/11007891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUtfDecode() {
CTRst st = CTRst.Factory.newInstance();
st.setT("abc_x000D_2ef_x000D_");
XSSFRichTextString rt = new XSSFRichTextString(st);
//_x000D_ is converted into carriage return
assertEquals("abc\r2ef\r", rt.getString());
}
COM: <s> test that unicode representation x hhhh is properly processed </s>
|
funcom_train/22232687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlanes(Vector4d[] planes) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_PLANE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ModelClip2"));
if (isLive())
((ModelClipRetained)this.retained).setPlanes(planes);
else
((ModelClipRetained)this.retained).initPlanes(planes);
}
COM: <s> sets the clipping planes of this model clip node to the </s>
|
funcom_train/20939280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getShippingRecevied(String deliveryAgent_agentCode) {
List dbShippings = null;
try {
ShippingFacadeLocal _shipping = ShippingFacadeUtil.getLocalHome().create();
// Retrieve information from DB
dbShippings = (List)_shipping.findByDeliveryAgentAgentCode(deliveryAgent_agentCode);
}
catch (CreateException cex) {
cex.printStackTrace();
}
catch (NamingException nex) {
nex.printStackTrace();
}
catch (FinderException fex) {
fex.printStackTrace();
}
return dbShippings;
}
COM: <s> get shipping recevied </s>
|
funcom_train/32656156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeEntry getAttribute(String name, ConstPool constPool) {
for(short i=0; i < attributes.size(); i++) {
AttributeEntry attribute = (AttributeEntry)attributes.get(i);
String attributeName = attribute.resolve(constPool);
if(attributeName.equals(name)) {
return attribute;
}
}
return null;
}
COM: <s> gets an attribute with the specified name on base of the information </s>
|
funcom_train/11677743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSession(String id) {
if (isClusteringEnable) { // if this is a clustering env.
if (keyPrefix != null) {
//Removes the endpoint name and then replicates the current
//state so that all instances
removeAndReplicateState(keyPrefix + id);
}
} else {
synchronized (sessionMap) {
sessionMap.remove(id);
}
}
}
COM: <s> removes the endpoint for the given session </s>
|
funcom_train/5573549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(BundleContext context) throws Exception {
super.start(context);
// TODO a lazy approach would be more appropriate here... test only
// TODO what the hell is this all about?
Set all = getAvailableMetaModels();
Iterator it = all.iterator();
String msg = "start(..): Registered Metamodels:";
while (it.hasNext())
msg += "\n\t-> " + ((IMetaModel) it.next()).getName();
logger.info(msg);
}
COM: <s> this method is called upon plug in activation </s>
|
funcom_train/43826077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addProcessActivity(String processId, Activity a) {
if (activities.get(processId) == null)
activities.put(processId, new HashMap<String, Activity>());
activities.get(processId).put(a.getId(), a);
activityToProcess.put(a.getId(), processId);
}
COM: <s> method adds an activity to the process to activity mapping and activity </s>
|
funcom_train/44594537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void visitType(IType type, ASTVisitor visitor) {
ASTParser parser = ASTParser.newParser(AST.JLS3);
parser.setSource(type.getTypeRoot());
parser.setResolveBindings(true);
ASTNode result = parser.createAST(null);
result.accept(visitor);
}
COM: <s> visit the specified type with the specified visitor </s>
|
funcom_train/15462271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public ForeignObjectBase construct(Pid _pid, Class _class, List _params) throws Exception, RemoteException {
MemoryNodeDefinition client = MemoryNodeDirectory.getInstance().findClient();
// System.out.println("I found an available client at " + client);
return client.getClientStorage().construct(_pid, _class, _params);
}
COM: <s> manages the creation of a remote object </s>
|
funcom_train/8165534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void read() throws IOException {
curr = reader.read();
// Maintain actual line and character numbers
if(curr == '\n') { cpos.charno = 0; cpos.lineno++; } // New line
else if(curr == '\t') { cpos.charno += TAB_LENGTH; } // Tab
else if(curr >= 0) { cpos.charno++; } // Not end of file
}
COM: <s> read next character from stream and increment character count </s>
|
funcom_train/43288797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void valueChanged(String oldValue) {
setNullValue(false);
// set_Changed(true);
ModelEvent me = new ModelEvent(ModelEvent.E_CHANGED, get_ParentPart(),
this);
me.setOldValue(oldValue);
// notify the listeners of the parent model part
// that this has changed
if (notifyParent && get_ParentPart() != null) {
get_ParentPart().notifyModelListeners(me);
}
// notify my own listeners
notifyModelListeners(me);
}
COM: <s> value has changed notify listeners if enabled </s>
|
funcom_train/5325648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXMLPath(String tmpFilePath){
this.getContentPane().removeAll();
appletPanel.removeAll();
newFilePath = null;
newFile = true;
XMLImportfilePath =tmpFilePath;
XMLImport=true;
init();
this.getContentPane().validate();
appletPanel.validate();
}
COM: <s> loads a new xml document into the existing applet window </s>
|
funcom_train/36678657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void playerUnitChange(PropertyChangeEvent evt) {
Player player = (Player) evt.getSource();
// If the player is still playing and lost all of his units destroy it.
if (player.isActive() && player.areAllUnitsDestroyed()) {
player.destroy(map.getNeutralPlayer());
}
}
COM: <s> a unit is added or removed from a player </s>
|
funcom_train/46278677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Deserializer getGeneralPurpose(String mechanismType) {
if (javaType == null || xmlType == null) {
return super.getGeneralPurpose(mechanismType);
}
if (deserClass == EnumSerializer.class) {
return super.getGeneralPurpose(mechanismType);
}
return new BeanDeserializer(javaType, xmlType, typeDesc, propertyMap);
}
COM: <s> optimize construction of a bean deserializer by caching the </s>
|
funcom_train/48336655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataObject toDataObject() {
Vector v = new Vector();
v.addElement(new DataObject(FUNCTION_NAME,name));
v.addElement(new DataObject(FUNCTION_DESCRIPTION,description));
v.addElement(new DataObject(FUNCTION_TIMING,timing));
return new DataObject(FUNCTION, v);
}
COM: <s> this method converts the service function info to a data object </s>
|
funcom_train/49654919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String printDateTime() throws Exception {
DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT,
new Locale("en", "US"));
return formatter.format(this.getTimestamp().toGregorianCalendar().getTime());
}
COM: <s> returns a printable string of the date and time of the comment </s>
|
funcom_train/11014346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener(HSSFListener lsnr, short sid) {
List<HSSFListener> list = _records.get(Short.valueOf(sid));
if (list == null) {
list = new ArrayList<HSSFListener>(1); // probably most people will use one listener
_records.put(Short.valueOf(sid), list);
}
list.add(lsnr);
}
COM: <s> add an event listener for a particular record type </s>
|
funcom_train/20508345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUsername(HttpServletRequest request) throws ServletRequestBindingException {
String page = ServletRequestUtils.getStringParameter(request, PARAM_PAGE);
if ( (StringUtils.contains(page, PARAMSUB_USER)) ||
(StringUtils.contains(page, PARAMSUB_USER_TALK))) {
String username = StringUtils.substringAfter(page,":");
return username;
}
return null;
}
COM: <s> get the username from the session </s>
|
funcom_train/20989270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableAllNewOptionsForAllStreams() {
for(int i=0; i< streamVector.capacity(); i++) {
//if "-o version" is set switch to "-o larger"
if(streamVector.get(i).completeCB == 0) {
streamVector.get(i).completeCB = 1;
}
}
}
COM: <s> disable all options that are newer than streamripper 1 </s>
|
funcom_train/32734137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Task t) {
if (this.getTimeStamp() < t.getTimeStamp()) {
return -1;
} else if (this.getTimeStamp() > t.getTimeStamp()) {
return 1;
} else {
return this.getID() - t.getID();
}
}
COM: <s> higher priority is based on time stamp property with ties broken </s>
|
funcom_train/18829842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class findClass(String name) throws ClassNotFoundException {
byte[] data = (byte[]) this.classes.get(name);
if (data == null) throw new ClassNotFoundException(name);
return super.defineClass(
name, // name
data, 0, data.length // b, off, len
);
}
COM: <s> implements code java </s>
|
funcom_train/27825357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getInstances() throws KAONException {
synchronized (getLock()) {
Set set=new HashSet();
EntityID[] entityIDs=m_oimodelSource.getInstances();
for (int i=0;i<entityIDs.length;i++) {
Instance instance=getInstance(entityIDs[i]);
set.add(instance);
}
return set;
}
}
COM: <s> returns all instances of this ontology </s>
|
funcom_train/7354797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getTabAtLocation(int x, int y) {
ensureCurrentLayout();
int tabCount = tabPane.getTabCount();
for (int i = 0; i < tabCount; i++) {
if (rects[i].contains(x, y)) {
return i;
}
}
return -1;
}
COM: <s> returns the tab index which intersects the specified point </s>
|
funcom_train/36004878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isShortcutKeyCodeCompatible(int kuixKeyCode, byte eventType) {
switch (eventType) {
case KuixConstants.KEY_PRESSED_EVENT_TYPE:
return (NumberUtil.toInt(pressedShortcutActions, 0) & kuixKeyCode) == kuixKeyCode;
case KuixConstants.KEY_REPEATED_EVENT_TYPE:
return (NumberUtil.toInt(repeatedShortcutActions, 0) & kuixKeyCode) == kuixKeyCode;
case KuixConstants.KEY_RELEASED_EVENT_TYPE:
return (NumberUtil.toInt(releasedShortcutActions, 0) & kuixKeyCode) == kuixKeyCode;
}
return false;
}
COM: <s> check if a code kuix key code code is compatible with widgets shortcuts </s>
|
funcom_train/6488775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPoint(double x, double y) {
LogTools.trace(logger, 25, "MapperPanel.setPoint("+x+", "+y+")");
if (x < 0.0 || x > 1.0 || y < 0.0 || y > 1.0) {
x = -1.0;
y = -1.0;
return;
}
_xval = x;
_yval = y;
repaint();
}
COM: <s> set graph point values </s>
|
funcom_train/43894457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void encode(FeatureType type) {
AttributeType[] attributes = type.getAttributeTypes();
try {
startSchemaType(type.getTypeName(), type.getNamespace());
for (int i = 0; i < attributes.length; i++) {
encode(attributes[i]);
}
endSchemaType();
} catch (SAXException e) {
throw new RuntimeException(e);
}
}
COM: <s> encode the supplied feature type </s>
|
funcom_train/786959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent evt) {
int scale = slider.getValue();
value.setText("x"+String.valueOf(scale));
size.setText("Image Size: "+(width*scale)+" x "+(height*scale)+" pixels");
preview.repaint();
}
COM: <s> monitor changes to the scale slider </s>
|
funcom_train/28353054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Simulation run() {
try {
_isRunning = true;
_probe.reset();
_scenario.resync();
_scenario.run();
return new Simulation( _probe, _evaluationNodes );
}
catch( Exception exception ) {
Logger.global.log( Level.SEVERE, "Exception running the online model.", exception );
exception.printStackTrace();
System.out.println( "online model calculation failed..." );
return null;
}
finally {
_isRunning = false;
}
}
COM: <s> run the simulation </s>
|
funcom_train/43237712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteOut() {
System.out.println("\tRunning testWriteOut()");
HPDocument testDoc = HobbesProtocol.toDocument(SAMPLE_DOC);
assertNull(source.getOutput());
source.writeOut(testDoc);
assertEquals(source.getOutput(), testDoc);
}
COM: <s> tests whether the document sent through code write out code is the </s>
|
funcom_train/37837074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createSelector(final SelectorModel model, OutfitLabel label) {
JComponent row = SBoxLayout.createContainer(SBoxLayout.HORIZONTAL, SBoxLayout.COMMON_PADDING);
JButton button = new JButton("<");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
model.scrollDown();
}
});
row.add(button);
row.add(label);
button = new JButton(">");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
model.scrollUp();
}
});
row.add(button);
return row;
}
COM: <s> create a selector for outfit part </s>
|
funcom_train/47867309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getMenuNewton() {
if (menuNewton == null) {
menuNewton = new JMenu();
menuNewton.setText("Newton");
menuNewton.setMnemonic(KeyEvent.VK_N);
menuNewton.add(getMenuBackup());
menuNewton.add(getMenuRestore());
menuNewton.add(getMenuInstall());
menuNewton.add(getMenuKeyboard());
menuNewton.addSeparator();
menuNewton.add(getMenuSettings());
}
return menuNewton;
}
COM: <s> this method initializes menu newton </s>
|
funcom_train/3759856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Method resolveAttributeSetMethod(Object obj, String nodeName) {
Method setMethod = null;
String[] setters = getSetMethodNames(nodeName);
for (int i = 0; i < setters.length; i++) {
setMethod = resolvePropertySetter(obj, setters[i]);
if (setMethod != null) return setMethod;
}
return null;
}
COM: <s> method resolve attribute set method </s>
|
funcom_train/36491922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateChildren () {
// only directories have children
if (_file.isDirectory()) {
_children = new ArrayList<FilesystemObject>();
for (File child : _file.listFiles()) {
if (!child.isHidden()) {
_children.add(new FilesystemNode(child));
}
}
_numChildren = _children.size();
}
}
COM: <s> populates the nodes list of children </s>
|
funcom_train/45643145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
try{
String path = openFile();
if(path == null)
return;
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.openEditor(new HexEditorInput(path), HexEditor.ID);
}
catch(PartInitException e){
MessageDialog.openError(null, "Unable to open editor", e.getLocalizedMessage());
}
}
COM: <s> performs this action </s>
|
funcom_train/3092030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void btnClusteringCoefficientsActionPerformed(ActionEvent evt) {
if (clusteringCoefficientsDialog == null) {
clusteringCoefficientsDialog = new ClusteringCoefficientsDialog(
(Frame) this);
clusteringCoefficientsDialog.setVisible(true);
clusteringCoefficientsDialog.update(this.network) ;
} else
clusteringCoefficientsDialog
.setVisible(!clusteringCoefficientsDialog.isVisible());
}
COM: <s> auto generated event handler method </s>
|
funcom_train/14245216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllAttributes(MClassifier clazz) {
if (clazz == null) return new ArrayList();
List list = new ArrayList();
Iterator it = clazz.getFeatures().iterator();
while (it.hasNext()) {
MFeature element = (MFeature)it.next();
if (element instanceof MAttribute) {
list.add(element);
}
}
it = clazz.getGeneralizations().iterator();
while (it.hasNext()) {
list.addAll(getAllAttributes((MClassifier)it.next()));
}
return list;
}
COM: <s> returns all attributes of some classifier clazz and of its parents </s>
|
funcom_train/48909545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfPlazo() {
if (txfPlazo == null) {
txfPlazo = new JTextField();
txfPlazo.setBounds(new Rectangle(82, 200, 119, 22));
txfPlazo.addKeyListener(new KeyAdapter(){
public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==KeyEvent.VK_ENTER)
jbtAceptar.grabFocus();
}
});
}
return txfPlazo;
}
COM: <s> this method initializes txf plazo </s>
|
funcom_train/15491013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int isHandle(int sx, int sy) {
if (!(xSpline!=null||type==POLYGON||type==POLYLINE||type==ANGLE||type==POINT)||clipboard!=null)
return -1;
int size = HANDLE_SIZE+5;
int halfSize = size/2;
int handle = -1;
int sx2, sy2;
for (int i=0; i<nPoints; i++) {
sx2 = xp2[i]-halfSize; sy2=yp2[i]-halfSize;
if (sx>=sx2 && sx<=sx2+size && sy>=sy2 && sy<=sy2+size) {
handle = i;
break;
}
}
return handle;
}
COM: <s> returns a handle number if the specified screen coordinates are </s>
|
funcom_train/19830055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetURL() throws SQLException, MalformedURLException {
assertEquals(null, rs.getURL(1));
assertTrue(rs.wasNull());
assertEquals(null, rs.getURL("column"));
assertTrue(rs.wasNull());
// Set what gets returned to something other than the default
URL u = new URL("http://www.apache.org");
rs2.setNullURL(u);
assertEquals(u, rs.getURL(1));
assertEquals(u, rs.getURL("column"));
}
COM: <s> tests the get url implementation </s>
|
funcom_train/37104455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean titlesAreEqual( String title1, String title2 ) {
String stripped_title1 = title1.replaceAll("[\\s,.:\\-]", "");
String stripped_title2 = title2.replaceAll("[\\s,.:\\-]", "");
return stripped_title1.equalsIgnoreCase(stripped_title2);
}
COM: <s> the method to check is the title strings are equal </s>
|
funcom_train/41724597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toClassName(String filename) {
String result = filename.replace(File.separatorChar, '.');
int startIdx = result.indexOf(INITIAL_PREFIX);
int endIdx = result.length() - ".class".length();
if (startIdx < 0 || endIdx < 0 || endIdx < startIdx) {
throw new IllegalArgumentException("Invalid class file name.");
}
result = result.substring(startIdx, endIdx);
return result;
}
COM: <s> converts the given class filename into a class name ready for instantiation i </s>
|
funcom_train/29932774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumn(String name, Integer type, Integer length, Integer precision, Integer scale, boolean nullable,boolean unique, Object defaultValue) throws IESException {
this.addColumn(new Column(name,type,length,precision,scale,nullable,unique,defaultValue, this.getDBVendor()));
}
COM: <s> not recommended add a column to the tables column collection but does </s>
|
funcom_train/29554400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setCashManager(final ICashManager theCashManager) {
notNull(theCashManager, "Cash Manager must be set");
this.cashManager = theCashManager;
if (cashManager instanceof IObserveBook) {
book.removeAllObservers();
book.addObserver((IObserveBook) cashManager);
}
}
COM: <s> sets the cash manager </s>
|
funcom_train/9944448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getFileForClass(String name) {
// convert to file system path
StringBuffer buf = new StringBuffer(name);
for (int i=0; i<buf.length(); i++)
if (buf.charAt(i)=='.')
buf.replace(i, i+1, "/");
buf.append(".class");
File file = new File(rootDir, buf.toString());
return file;
}
COM: <s> get file path for class name </s>
|
funcom_train/28977408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void kill() {
if (killed == false) {
logger.info("emergency shutdown was forced by user!");
logger.info("killing node");
report.report(getName(), Reports.STOP, NodeReports.NODE);
if (currentMessage != null) {
logger.info("send message back");
try {
sendMessageBack(currentMessage);
} catch (final Exception e) {
logger.error(e.getMessage(), e);
}
}
logger.info("calling post shutdown actions...");
shutdownCompleteAction();
logger.info("done");
killed = true;
}
}
COM: <s> shuts down the system in case of an emergency </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.