__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/2808316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelGroupReader getModelGroupReader() {
if (keepLocalReaders) {
return this.modelGroupReader;
} else {
try {
return ModelGroupReader.getModelGroupReader(delegatorName);
} catch (GenericEntityException e) {
Debug.logError(e, "Error loading entity group model", module);
return null;
}
}
}
COM: <s> gets the instance of model group reader that corresponds to this delegator </s>
|
funcom_train/11734956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String safeGetJCRPath(Path path) {
try {
return context.getJCRPath(path);
} catch (NamespaceException e) {
log.error("failed to convert {} to a JCR path", path);
// return string representation of internal path as a fallback
return path.toString();
}
}
COM: <s> failsafe conversion of internal code path code to jcr path for use in </s>
|
funcom_train/2385526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doRefreshImage() {
Cache cache = main.getCache();
cache.remove(record);
cache.getRecordBySource(record.getSource());
cache.write(record);
picture.setIcon(record.getMediumIcon());
Browser browser = main.getBrowser();
if (browser != null)
browser.redrawCurrent();
}
COM: <s> refresh the image after editing </s>
|
funcom_train/49789451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGeneratedLogoutPage() throws Exception {
root = loadAndInfer(LoginHandlerInstance.class);
Session session = assertHasSession(root, "my session");
// a generated 'logout' page
Frame page = assertHasFrame(session, "logout");
assertGenerated(page);
// this page will have been generated
Frame target = assertHasFrame(root, "Logout Successful");
assertGenerated(target);
Event access = page.getOnAccess();
ECARule nav = assertHasNavigateAction(session, access, target);
assertGenerated(nav);
}
COM: <s> a default logout page should be created this will </s>
|
funcom_train/13246593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SudokuCell getCell(int x, int y) {
SudokuCell result = null;
if (validCellPos(x, y)) {
result = board[x][y];
} else {
throw new ArrayIndexOutOfBoundsException(
"Invalid coordinates: getCell(" + x + ", " + y + ")");
}
return result;
}
COM: <s> gets the cell at the specified position on the grid </s>
|
funcom_train/10748339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAnnotations() throws Throwable {
Annotation[] an = getElement1().getAnnotations();
assertNotNull(an);
assertEquals("number of Annotations", 1, an.length);
assertSame(TagAntn.class, an[0].annotationType());
}
COM: <s> get annotations should return </s>
|
funcom_train/2716103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Console addConsole() {
String consoleName = "Console " + getNextConsoleSequence();
Console console = new Console(consoleName);
this.consoles.add(console);
this.outputTabbedPane.addTab(TabUtil.newTab(consoleName, null, console.
getConsoleScrollPane(),
consoleName, new OutputTabComponent(outputTabbedPane,
consoleName, OUTPUT_WINDOW_TAB_ICON)));
return console;
}
COM: <s> creates a console and add to the list </s>
|
funcom_train/30251637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectRow(int row) {
// When a row (other than the first one, which is used as a header) is
// selected, display its associated MailItem.
MailItem item = MailItems.getMailItem(startIndex + row);
if (item == null)
return;
styleRow(selectedRow, false);
styleRow(row, true);
item.read = true;
selectedRow = row;
displayItem(item);
}
COM: <s> selects the given row relative to the current page </s>
|
funcom_train/4483029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File latestSnapshot() throws IOException {
File[] files = _directory.listFiles();
if (files == null) throw new IOException("Error reading file list from directory " + _directory);
File latestSnapshot = null;
long latestVersion = 0;
for (int i = 0; i < files.length; i++) {
File candidateSnapshot = files[i];
long candidateVersion = snapshotVersion(candidateSnapshot);
if (candidateVersion > latestVersion) {
latestVersion = candidateVersion;
latestSnapshot = candidateSnapshot;
}
}
return latestSnapshot;
}
COM: <s> find the latest snapshot file </s>
|
funcom_train/32777667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimTime toSimTime(double duration, int unit) {
// transform duration in sim time
// - because SimTime doesn't distinguish between points in time and
// durations of time, a duration is interpreted as the interval between
// sim time 0.0 and the corresponding duration sim time.
// - the given duration is in the given unit -> just has to be converted
// to reference unit
double simDuration = duration * unitFactors[unit]
/ unitFactors[this._unit];
return new SimTime(simDuration);
}
COM: <s> converts the given duration with the given time unit into a sim time </s>
|
funcom_train/6288972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureRecipient(String defaultRecipient) {
if (recipients.startsWith("+")) {
// TODO (Betlista): what is the difference between this call and
// addRecipient(defaultRecipient)
// I know, the result is different, there is missing " *" at the end
// but is that important ?
recipients = defaultRecipient;
}
}
COM: <s> ensures whether there is a recipient specified </s>
|
funcom_train/20019763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addItem(SwordWorldObject item) {
logger
.log(Level.INFO, "{0} placed in {1}",
new Object[] { item, this });
// NOTE: we can't directly save the item in the list, or
// we'll end up with a local copy of the item. Instead, we
// must save a ManagedReference to the item.
DataManager dataManager = AppContext.getDataManager();
dataManager.markForUpdate(this);
return items.add(dataManager.createReference(item));
}
COM: <s> adds an item to this room </s>
|
funcom_train/461144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHeader(String headerName, int i) {
if (headerName == null)
return null;
String lcHeaderName = headerName.toLowerCase();
int which = 0;
for (int j=0; j<headers.size(); j++) {
if (lcHeaderName.equals(headers.get(j).lcname)) {
if (which == i)
return headers.get(j).name + ": " + headers.get(j).value;
which++;
}
}
return null;
}
COM: <s> get the ith header with name header name </s>
|
funcom_train/39871005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserData(final Account account, final String key) {
if (account == null) throw new IllegalArgumentException("account is null");
if (key == null) throw new IllegalArgumentException("key is null");
try {
return mService.getUserData(account, key);
} catch (RemoteException e) {
// will never happen
throw new RuntimeException(e);
}
}
COM: <s> gets the user data named by key associated with the account </s>
|
funcom_train/17192377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reachable(Set s) {
for (Iterator i = this.succ.iterator(); i.hasNext(); ) {
IdentityHashCodeWrapper ap = (IdentityHashCodeWrapper)i.next();
if (!s.contains(ap)) {
s.add(ap);
((AccessPath)ap.getObject()).reachable(s);
}
}
}
COM: <s> adds the set of wrapped access path objects that are reachable from this </s>
|
funcom_train/7929395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Query like(File f) throws IOException {
if (fieldNames == null) {
// gather list of valid fields from lucene
Collection fields = ir.getFieldNames( IndexReader.FieldOption.INDEXED);
fieldNames = (String[]) fields.toArray(new String[fields.size()]);
}
return like(new FileReader(f));
}
COM: <s> return a query that will return docs like the passed file </s>
|
funcom_train/1098008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void scheduleAlarms(List aAlarms) throws AeException {
Iterator iter = aAlarms.iterator();
while (iter.hasNext()) {
IAePersistedAlarm alarm = (IAePersistedAlarm) iter.next();
internalScheduleAlarm(alarm.getProcessId(),
alarm.getLocationPathId(), alarm.getGroupId(),
alarm.getAlarmId(), alarm.getDeadline());
}
}
COM: <s> does the work of scheduling a list of alarms </s>
|
funcom_train/9552955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveFile(String sourceDir, String destinationDir, long bytesToMove) {
synchronized(mutex) {
DirlogEntry de = entries.get(sourceDir);
if (de != null) {
de.delFile(bytesToMove);
de = entries.get(destinationDir);
if (de != null) {
de.addFile(bytesToMove);
lastUpdate = System.currentTimeMillis();
}
}
}
}
COM: <s> moves a file from one dir to another in the dirlog </s>
|
funcom_train/17492499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void declareClassImport(String cname) throws ClassNotFoundException {
importationManager.setClassLoader(new PseudoClassLoader());
try {
importationManager.declareClassImport(cname);
} catch (PseudoError e) {
} finally {
if (classLoader == null) {
importationManager.setClassLoader(interpreter.getClassLoader());
} else {
importationManager.setClassLoader(classLoader);
}
}
}
COM: <s> declares a new single type import clause </s>
|
funcom_train/1958920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document restrict(Element nodes) throws VerinecException {
Element restriction = new Element("restrictions", VerinecNamespaces.SCHEMA_RESTRICTION);
restriction.addNamespaceDeclaration(VerinecNamespaces.NS_NODE);
restriction.addNamespaceDeclaration(VerinecNamespaces.NS_TRANSLATION);
Element exp = DataUtil.expandVariables(nodes);
Iterator lstNodes = exp.getChildren("node", VerinecNamespaces.NS_NODE).iterator();
while(lstNodes.hasNext()) {
Element node = (Element)lstNodes.next();
Element resolved = resolveNodeType(node, exp);
process(resolved,restriction,false);
}
return new Document(restriction);
}
COM: <s> creates the restriction information for a set of network nodes </s>
|
funcom_train/43245860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetIVVStatus() {
System.out.println("getIVVStatus");
InsuranceBufferObject instance = new InsuranceBufferObject();
String expResult = "";
String result = instance.getIVVStatus();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get ivvstatus method of class org </s>
|
funcom_train/22783395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beanPropertyChanged(BeanChangeEvent<Album> event) {
// get source
Album source = event.getSource();
// to be save
if (source != album) {
source.removeListener(this);
}
// it is the right source
if (event.getProperty() == BeanProperty.ALBUM_NAME) {
setTitel(album.getName());
}
// inform TreeModel listener
// done by root
}
COM: <s> if the album changes its name update the titel of this node </s>
|
funcom_train/3294415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPath() {
String result = cwd.toString();
Iterator i = extraDirs.iterator();
while (i.hasNext()) {
Entry entry = (Entry) i.next();
result += File.pathSeparatorChar + entry.getDir().getAbsolutePath();
}
return result;
}
COM: <s> creates a path string which is a list of directories </s>
|
funcom_train/45245059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComboBox getJComboBoxAvaliacao() {
if (jComboBoxAvaliacao == null) {
jComboBoxAvaliacao = new JComboBox();
jComboBoxAvaliacao.setLocation(new Point(38, 136));
jComboBoxAvaliacao.setSize(new Dimension(201, 24));
jComboBoxAvaliacao.addItem("EXTENDED MAJORITY RULE");
jComboBoxAvaliacao.addItem("STRICT");
jComboBoxAvaliacao.addItem("MAJORITY");
jComboBoxAvaliacao.addItem("ML");
jComboBoxAvaliacao.setCursor(new Cursor(Cursor.HAND_CURSOR));
}
return jComboBoxAvaliacao;
}
COM: <s> this method initializes j combo box avaliacao </s>
|
funcom_train/47022185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getImportBookmark() {
if (importBookmark == null) {//GEN-END:|216-getter|0|216-preInit
// write pre-init user code here
importBookmark = new Command(getLocalizedString("Import"), Command.OK, 4);//GEN-LINE:|216-getter|1|216-postInit
// write post-init user code here
}//GEN-BEGIN:|216-getter|2|
return importBookmark;
}
COM: <s> returns an initiliazed instance of import bookmark component </s>
|
funcom_train/46359377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkUserLogin(String DataValue) {
try {
Query query = em.createQuery("select c from Users as c where c.login = :DataValue AND c.deleted <> :deleted");
query.setParameter("DataValue", DataValue);
query.setParameter("deleted", "true");
int count = query.getResultList().size();
if (count != 0) {
return false;
}
} catch (Exception ex2) {
log.error("[checkUserData]", ex2);
}
return true;
}
COM: <s> check for duplicates </s>
|
funcom_train/14653009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateActorDraw2(boolean emptyBuffer) {
if (emptyBuffer) {
emptySamBuffer();
}
undressSam(sam);
detectSymbolChanges();
if (radii_change) {
radii = ic.createRadii(visual_radius, speech_radius, aural_radius,
ROSE_SIZE, true);
}
// sams_in_range(VISUAL_RANGE);
}
COM: <s> update the actor draw drawing of the graphics </s>
|
funcom_train/20311232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(boolean quoting) {
StringBuffer b = new StringBuffer();
if (quoting) b.append('"');
b.append(getLexicalForm());
if (quoting) b.append('"');
if (lang != null && !lang.equals( "" )) b.append( "@" ).append(lang);
if (dtype != null) b.append( "^^" ).append(dtype.getURI());
return b.toString();
}
COM: <s> answer a human acceptable representation of this literal value </s>
|
funcom_train/32069327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAccountingMovement(AccountingMovement accountingMovement) {
boolean addOk = getAccountingMovements().add(accountingMovement);
if (addOk) {
accountingMovement.setAccounting((Accounting)this);
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed accounting movement to the accounting collection </s>
|
funcom_train/6202719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveWindowLayout() {
Preferences.setPreference(Preferences.HELPWINDOW_WIDTH, getWidth());
Preferences.setPreference(Preferences.HELPWINDOW_HEIGHT, getHeight());
Preferences.setPreference(Preferences.HELPWINDOW_X, getX());
Preferences.setPreference(Preferences.HELPWINDOW_Y, getY());
}
COM: <s> saves the size and position of the help window </s>
|
funcom_train/36198124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String pseudoPhrase(String str) {
String result = "";
String[] words = str.split(" ");
if (reorder) {
Arrays.sort(words);
}
for (String word : words) {
if (stopwords != null) {
if (stopwords.isStopword(word)) {
continue;
}
}
int apostr = word.indexOf('\'');
if (apostr != -1) {
word = word.substring(0, apostr);
}
if (stemmer != null) {
word = stemmer.stem(word);
}
result += word + " ";
}
return result.trim();
}
COM: <s> generates the preudo phrase from a string </s>
|
funcom_train/37263868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getProgressLine(int percent) {
if(percent > 100) percent = 100;
String line = " |";
for(int i=0; i < percent / 2; i++){
line += "#";
}
for(int i=percent / 2; i < 50; i++){
line += " ";
}
line += "| ["+percent+"%]";
return line;
}
COM: <s> prepares the hash line for a given progress percentage </s>
|
funcom_train/45771390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String currencyRemoveSign() {
String number = data;
// TODO - only works with US currencies
if (data.endsWith("$")) {
number = data.substring(0, data.length()-1);
} else if (data.startsWith("$")) {
number = data.substring(1, data.length());
}
return number;
}
COM: <s> this method removes the currency sign from the mini calc data </s>
|
funcom_train/26020369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Uri addGroupChatError(List<String> participants, String sessionId){
String contacts = "";
for(String contact : participants){
contacts += contact+";";
}
return addMessage(EventsLogApi.TYPE_GROUP_CHAT_SYSTEM_MESSAGE, sessionId, null, contacts, null, InstantMessage.MIME_TYPE, null, 0, new Date(), EventsLogApi.STATUS_FAILED);
}
COM: <s> a group chat session had an error </s>
|
funcom_train/32236444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChildToParentOrganization(Organization organization, Organization parentOrganization) {
List<Organization> children = parentOrganization.getChildrenOrganizations();
if (children == null){
children = new ArrayList<Organization>();
parentOrganization.setIsParentOrganization(true);
}
children.add(organization);
parentOrganization.setIsParentOrganization(true);
parentOrganization.setChildrenOrganizations(children);
daoSupport.update(parentOrganization);
}
COM: <s> adds a child organization organization to a parent organization parent organization </s>
|
funcom_train/5395899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNewElement() {
System.out.println("getNewElement");
TableElement instance = null;
Element expResult = null;
Element result = instance.getNewElement();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get new element method of class org </s>
|
funcom_train/14228711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CallId reserveCallId(String address) {
InverterListener il = this.getListener();
try {
Call call = this.getJtapiProv().createCall();
// ensure we monitor this call
call.addCallListener(il);
call.addObserver(il);
// return its id
return this.getCallMap().getId(call);
} catch (Exception e) {
// ResourceUnavailableException, InvalidStateException,
// PrivilegeViolationException, MethodNotSupportedException
return null;
}
}
COM: <s> create a call object and map it to a call id </s>
|
funcom_train/2760649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getType() {
if(_progressChange instanceof ExplicitChange) {
return TYPE_EXPLICIT_CHANGE;
} else if(_progressChange instanceof EventInvocation) {
return TYPE_EVENT_INVOCATION;
} else if(_progressChange instanceof TriggerException) {
return TYPE_TRIGGER_EXCEPTION;
} else if(_progressChange instanceof SharedChange) {
return TYPE_SHARED_CHANGE;
} else {
throw new IllegalStateException("Failed to determine type of progress change:" + _progressChange.getClass().getName());
}
}
COM: <s> returns the type of change that this instance wrapps </s>
|
funcom_train/8039383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDottedLowerI() {
Locale defaultLocale = Locale.getDefault();
Locale turkey = new Locale("tr", "TR");
Locale.setDefault(turkey);
Level level = Level.toLevel("info");
Locale.setDefault(defaultLocale);
assertEquals("INFO", level.toString());
}
COM: <s> test that dotted lower i nfo is recognized as info </s>
|
funcom_train/42367922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cross( Vector3d v1, Vector3d v2 ) {
this.x = v1.y*v2.z - v1.z*v2.y;
this.y = v1.z*v2.x - v1.x*v2.z;
this.z = v1.x*v2.y - v1.y*v2.x;
}
COM: <s> calculates the cross product of vector3d v1 and v2 and sets the result </s>
|
funcom_train/21678046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRenamedColumnNameForResultMap() {
if (StringUtility.stringHasValue(tableAlias)) {
StringBuffer sb = new StringBuffer();
sb.append(tableAlias);
sb.append('_');
sb.append(actualColumnName);
return sb.toString();
} else {
return actualColumnName;
}
}
COM: <s> the renamed column name for a select statement </s>
|
funcom_train/25778998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramElement_next_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_next_feature", "_UI_DiagramElement_type"),
CoveragepackagePackage.Literals.DIAGRAM_ELEMENT__NEXT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the next feature </s>
|
funcom_train/41164581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(ToForum entity) {
EntityManagerHelper.log("deleting ToForum instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(ToForum.class, entity.getForumId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent to forum entity </s>
|
funcom_train/810852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSpotIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SpectrumType_spotID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SpectrumType_spotID_feature", "_UI_SpectrumType_type"),
MzmlPackage.Literals.SPECTRUM_TYPE__SPOT_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the spot id feature </s>
|
funcom_train/51604853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelHeaderLabel() {
if (jPanelHeaderLabel == null) {
jPanelHeaderLabel = new JPanel();
jPanelHeaderLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
jPanelHeaderLabel.setLayout(new BorderLayout());
jPanelHeaderLabel.add(getJLabelTitle(), BorderLayout.WEST);
}
return jPanelHeaderLabel;
}
COM: <s> this method initializes j panel header label </s>
|
funcom_train/27929444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initGUI(SplashScreen splash) {
Container container = this.getContentPane();
_adressesPanel = new AddressCollectionPanel(this, _addresses);
splash.setProgress(70);
container.add(_adressesPanel);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
exit();
}
});
_menu = new Menubar(this);
this.setIconImage(new ImageIcon(BlackSheep.class.getResource("images/icon.gif")).getImage());
this.setJMenuBar(_menu);
splash.setProgress(80);
}
COM: <s> create the gui </s>
|
funcom_train/50418077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Decision apply(SpiderContext context, Site currentSite, URL url) {
String path = url.getPath();
Decision decision = new DecisionInternal();
if (matches(url, forbiddenPath)) {
decision = new DecisionInternal(Decision.RULE_FORBIDDEN, "access to '" + path + "' forbidden");
}
return decision;
}
COM: <s> applies the rule to a given url </s>
|
funcom_train/15411521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeThread(PooledThread thread) {
synchronized (freeList) {
busyList.remove(thread);
freeList.remove(thread);
freeList.notify();
// if (ThreadPoolManager.getDebugLevel()>0){
//Log.debug("PooledThread stopped [" + getName() + "]");
// }
}
}
COM: <s> remove the thread from the pool </s>
|
funcom_train/7681717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyContactListCreated(ContactList list) {
synchronized (this) {
if (list.isDefault()) {
for (ContactList l : mContactLists) {
l.setDefault(false);
}
mDefaultContactList = list;
}
mContactLists.add(list);
}
for (ContactListListener listener : mContactListListeners) {
listener.onContactChange(ContactListListener.LIST_CREATED,
list, null);
}
}
COM: <s> notify that a contact list has been created </s>
|
funcom_train/269202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isURL() {
String src =
(String) this.fElement.getAttributes().getAttribute(HTML.Attribute.SRC);
return src.toLowerCase().startsWith("file") ||
src.toLowerCase().startsWith("http")||
src.toLowerCase().startsWith("https");
}
COM: <s> determines if path is in the form of a url </s>
|
funcom_train/37006253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource convert(Resource r) throws RDFException {
if (r == null) return null;
if (r.getModel() == this && (r instanceof ResourceImplRDB || r instanceof StatementImplRDB)) {
return r;
} else if (supportsJenaReification() && r instanceof Statement) {
return StatementImplRDB.createFrom((Statement)r, this);
} else {
return new ResourceImplRDB(r, this);
}
}
COM: <s> convert a resource to a database implementation </s>
|
funcom_train/8090480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setField(Object o, String name, int index, Object value) {
Field f;
try {
f = o.getClass().getField(name);
Array.set(f.get(o), index, value);
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> sets the specified field in an array </s>
|
funcom_train/21736480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getShortDescription() {
StringBuffer sb = new StringBuffer();
sb.append("Author: " + entry.getAuthor() + "; ");
if (entry.getPublishedDate() != null) {
sb.append("Published: ").append(entry.getPublishedDate().toString());
}
return sb.toString();
}
COM: <s> making a tooltip out of the entrys description </s>
|
funcom_train/49789935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSourceTarget() throws Exception {
IFile sitemap = beginAtSitemapThenPage("Home");
String test1 = "test1 " + new Date();
String source = getLabelIDForText("source");
assertLabeledFieldEquals(source, "");
setLabeledFormElementField(source, test1);
gotoSitemapThenPage(sitemap, "page2");
String target = getLabelIDForText("target");
assertLabeledFieldEquals(target, test1);
}
COM: <s> test that setting source will set target </s>
|
funcom_train/1156743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDocument(StyledDocument doc, boolean layoutForward) {
((MovingEditorKit) pane.getEditorKit()).setLayoutForward(layoutForward);
isDirty = !layoutForward;
((AbstractDocument) doc).setDocumentProperties(((AbstractDocument) buffer).getDocumentProperties());
pane.setDocument(doc);
}
COM: <s> sets the document with a order of layout </s>
|
funcom_train/25772558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getAlertclean_okCommand() {
if (alertclean_okCommand == null) {//GEN-END:|96-getter|0|96-preInit
// write pre-init user code here
alertclean_okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|96-getter|1|96-postInit
// write post-init user code here
}//GEN-BEGIN:|96-getter|2|
return alertclean_okCommand;
}
COM: <s> returns an initiliazed instance of alertclean ok command component </s>
|
funcom_train/13690229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getStatistikButton() {
if (statistikButton == null) {
statistikButton = new JButton();
statistikButton.setText(Helper.getMessage("general.btnStatistics"));
statistikButton.setPreferredSize(new java.awt.Dimension(116,26));
statistikButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
StatisticsDialog sd = new StatisticsDialog(questions.get(questionNr));
sd.setVisible(true);
}
});
}
return statistikButton;
}
COM: <s> gets statistics button </s>
|
funcom_train/9415143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Certificate cert) {
try {
if (signature != null) {
signature.initVerify(cert);
} else if (cipher != null) {
cipher.init(Cipher.DECRYPT_MODE, cert);
}
} catch (InvalidKeyException e){
throw new AlertException(AlertProtocol.BAD_CERTIFICATE,
new SSLException("init - invalid certificate", e));
}
}
COM: <s> initiate signature type by certificate </s>
|
funcom_train/41319909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scores getScoreFromFile(GameLevelType gameLevelType) {
File file = new File(System.getProperty("user.dir") + "/"
+ gameLevelType.toString());
if (file.canRead()) {
Scores data = retrieve(file);
return data;
} else {
Scores scores = new Scores();
return scores;
}
}
COM: <s> loads the scores into a scores object </s>
|
funcom_train/48630658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetVilleArrivee() {
System.out.println("getVilleArrivee");
Itineraire instance = new Itineraire();
String expResult = "";
String result = instance.getVilleArrivee();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get ville arrivee method of class itineraire </s>
|
funcom_train/26188234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getResourceAsStream( String name ) {
ZipEntry ze = null;
if( archive != null ) {
ze = archive.getEntry(name);
}
if( ze == null ) {
// System.err.println("no zip entry for " + name +
// ", get system resource ");
return getSystemResourceAsStream( name );
}
try {
return archive.getInputStream(ze);
} catch (IOException e ) {
return null;
}
}
COM: <s> return a resource from the archive as an input stream </s>
|
funcom_train/18358007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEvaPlan(ExtraVehicularActivityPlan plan) {
Waypoint startWpt = plan.getStartWaypoint();
// check the first waypoint of the eva is one of our waypoints.
if (getRoute().findWaypointByName(startWpt.getName()) != null) {
plannedEVAs.put(plan.getName(),plan);
attrmgr.attributeUpdate("plannedEVAs",plan.getName());
} else {
throw new IllegalArgumentException("EVAPlan starting waypoint is not correct");
}
}
COM: <s> adds an eva plan to the route plan </s>
|
funcom_train/12182968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showWarningDialog(String title, String message) {
StringBuffer messageBuffer = new StringBuffer();
if (message != null) {
messageBuffer.append(message);
}
Shell shell = Display.getCurrent().getActiveShell();
MessageDialog.openWarning(shell, title, message);
}
COM: <s> displays a warning dialog with the specified title and message </s>
|
funcom_train/6420662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(String fileName) throws java.io.IOException {
//This will allow the property file to reside anywhere along the CLASSPATH.
InputStream in = this.getClass().getClassLoader().getSystemResourceAsStream(fileName);
if(in != null)
{
System.out.println("Loading property file " + fileName);
load(in);
}
else
System.out.println("Unable to find property file " + fileName);
}
COM: <s> look for a property file on the classpath that matches the file name </s>
|
funcom_train/20978381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getCheckBoxIconSize() {
Dimension dimension = null;
if (skina.getButton() != null) {
dimension = skina.getButton().getCheckBoxIconSize();
}
if ((dimension == null) && (skinb.getButton() != null)) {
dimension = skinb.getButton().getCheckBoxIconSize();
}
return dimension;
}
COM: <s> gets the check box icon size attribute of the compound button object </s>
|
funcom_train/18790252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWorkAddress(Address workAddress) {
if (((this.workAddress != null) && !this.workAddress.equals(workAddress)) ||
((this.workAddress == null) && (workAddress != null))) {
this.workAddress = workAddress;
setModified(true);
}
}
COM: <s> sets the new value of the simple property work address </s>
|
funcom_train/1443602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PConf cloned() {
PConf p = new PConf();
p.DASH_POWER_RATE = this.DASH_POWER_RATE;
p.EFFORT_MAX = this.EFFORT_MAX;
p.EFFORT_MIN = this.EFFORT_MIN;
p.EXTRA_STAMINA = this.EXTRA_STAMINA;
p.INERTIA_MOMENT = this.INERTIA_MOMENT;
p.KICK_RAND = this.KICK_RAND;
p.KICKABLE_MARGIN = this.KICKABLE_MARGIN;
p.PLAYER_ACCEL_MAX = this.PLAYER_ACCEL_MAX;
p.PLAYER_DECAY = this.PLAYER_DECAY;
p.PLAYER_SIZE = this.PLAYER_SIZE;
p.PLAYER_SPEED_MAX = this.PLAYER_SPEED_MAX;
p.STAMINA_INC_MAX = this.STAMINA_INC_MAX;
p.id = this.id;
return p;
}
COM: <s> clones this pconf object and returns it </s>
|
funcom_train/17394764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBounds(Rectangle r, String text) {
editWidget.setText(text);
editWidget.setBounds(r.x, r.y, r.width, r.height);
editWidget.setVisible(true);
editWidget.selectAll();
editWidget.requestFocus();
}
COM: <s> positions the overlay </s>
|
funcom_train/44825389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort (String propertyName, boolean desc) {
java.util.Comparator comparator = new RowComparator (propertyName, desc);
if (mode == ARRAY_MODE) {
java.util.Arrays.sort(arrayDataRows, comparator);
} else {
java.util.Collections.sort (listDataRows, comparator);
}
this.fireTableDataChanged();
}
COM: <s> sort the table based on a property name either ascending or descending </s>
|
funcom_train/41282014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer(100) ;
buf.append('[') ;
for(int i=0;i<keys.length;i++) {
if(keys[i]==null)
continue ;
buf.append(keys[i]) ;
buf.append('=') ;
buf.append(values[i]) ;
buf.append(' ') ;
}
buf.append(']') ;
return buf.toString() ;
}
COM: <s> creates a string representation of the dictionary </s>
|
funcom_train/16652238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setWeblogicSettings() {
authenticationMode = AuthenticationMode.LDAP;
String path = "";
if (System.getProperty(WEBLOGIC_USERDIR) != null
&& !"".equals(System.getProperty(WEBLOGIC_USERDIR))) {
path = System.getProperty(WEBLOGIC_USERDIR) + "/";
serverPropsPath = path + this.getPropertyFileName();
}
log.debug("Using configuration path: '#0'", path);
}
COM: <s> set authentication mode and paths for weblogic </s>
|
funcom_train/20978425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getRadioIcon(AbstractButton b) {
Icon icon = null;
if (skina.getButton() != null) {
icon = skina.getButton().getRadioIcon(b);
}
if ((icon == null) && (skinb.getButton() != null)) {
icon = skinb.getButton().getRadioIcon(b);
}
return icon;
}
COM: <s> gets the radio icon attribute of the compound button object </s>
|
funcom_train/41379504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleHit(String event) {
String[] strings = event.split(" ");
if (strings.length == 4) {
String fv = strings[3];
int j = fv.indexOf("::");
if (j > 0) {
String var = fv.substring(j + 2);
try {
if (getVariableName().equals(var)) {
setSuspendType(strings[2]);
notifyThread();
}
} catch (CoreException e) {
}
}
}
}
COM: <s> determines if this breakpoint was hit and notifies the thread </s>
|
funcom_train/37018828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canVerify() {
MPanel MP=M.findMPanel("Main");
if (verifyType==atEnd&&MP.numberOfCards()>1) {
boolean can=true;
for (int i=0;i<MP.numberOfCards();i++) {
if (!canVerify(i)) {
showVerificationMessage(true);
return false;
}
}
} else {
if (!canVerify(MP.getActiveCardNumber())) {
showVerificationMessage(false);
return false;
}
}
return true;
}
COM: <s> indicates if the actual exercise can be verified </s>
|
funcom_train/46790359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cosPrependContents(COSStream content) {
COSObject contents = cosGetField(DK_Contents);
if (contents.isNull()) {
cosSetField(DK_Contents, content);
}
if (contents instanceof COSStream) {
COSArray array = COSArray.create(2);
array.add(content);
array.add(contents);
cosSetField(DK_Contents, array);
}
if (contents instanceof COSArray) {
COSArray array = (COSArray) contents;
array.add(0, content);
}
}
COM: <s> prepend contents to the pages content </s>
|
funcom_train/33637261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void passToAudio(byte[] audioData, int length) {
//String testString = new String(audioData, 0, audioData.length);
//System.out.println(testString);
//int checkSum = 0;
/*for (int i = 0; i < audioData.length; i++) {
checkSum = checkSum + audioData[i];
}*/
System.out.println("Sending packet to decoder.");
audio.decodeData(audioData, length);
}
COM: <s> this method will pass the audio data from this class to the decoder </s>
|
funcom_train/41704247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String attribute) {
try {
if (rs != null) {
return rs.getString(attribute);
} else {
throw new NullPointerException();
}
} catch (Exception ex) {
System.out.println("DB.getString() ran into an error " + ex.getMessage());
ex.printStackTrace();
}
throw new NullPointerException();
}
COM: <s> returns the string data under the stated column name </s>
|
funcom_train/49461599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCorrectAuditStatusId(Db db, String status) throws Exception{
try {
db.enter();
st_get_audit_status.setString(1, status);
Integer ret = DbHelper.getKey(st_get_audit_status);
if(ret != null)
return ret.intValue();
//the status doesn't exists
_logger.warn("Recommendation status "+status+" not found. Using default status");
return DEFAULT_rec_status;
}
finally {
db.exit();
}
}
COM: <s> get the audit status id corresponding to this label </s>
|
funcom_train/7310628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Definition getDefinition(Context context, Definition resolver) {
if (externalDef != null) {
return externalDef;
} else if (explicitDef != null) {
return explicitDef;
}
try {
return getInstanceDef(context, true, resolver);
} catch (Redirection r) {
return null;
}
}
COM: <s> returns the definition associated with this instance in the given context </s>
|
funcom_train/40850810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void testHeaderParser() {
// List<String> lines = lp.readFileByLinesInList("/home/ddefrancesco/workspace/aod_c/lotti/L0906301.30062009");
// TreeMap<String, String> _tmap = lp.headerParser(lines);
// assertEquals("APTV0002", _tmap.get("01"));
// assertEquals("FAPTV002", _tmap.get("02"));
// assertEquals("FTLA7001", _tmap.get("03"));
// assertEquals("FTLA7001", _tmap.get("04"));
//
// }
COM: <s> test method for </s>
|
funcom_train/19089936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected short compareOrder (int[] date1, int[] date2) {
for ( int i=0;i<TOTAL_SIZE;i++ ) {
if ( date1[i]<date2[i] ) {
return -1;
}
else if ( date1[i]>date2[i] ) {
return 1;
}
}
return 0;
}
COM: <s> given normalized values determines order relation </s>
|
funcom_train/593424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int incrementIndex(PageContext pageContext) {
String key = getClass().getName() + "#" + toStringWithoutIndex();
Integer index = (Integer) pageContext.getAttribute(key);
if (index == null)
index = 0;
else
++index;
pageContext.setAttribute(key, index);
return index;
}
COM: <s> get the next index for this path from the specified page context </s>
|
funcom_train/47608013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(Region r) {
assert mapping[r.getId()]==null : "Region: "+r.getId();
regs.add(r); // add it to the local reg list
mapping[r.getId()] = this; // update the mapping
polysNeedUpdate = true;
doRecount = true;
if(r.isCapital()) ++capitals;
}
COM: <s> adds a new region to this group </s>
|
funcom_train/48150845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRate(double r) {
if (r <= 0) r = 1;
this.rate = r;
//super.setParameters(1, 1 / rate);
double upperBound = 1.0/rate + 5.0/rate; // getMean() + 4*getSD();
super.setParameters(shift, upperBound + shift, 0.01 * (upperBound), CONTINUOUS);
super.setMGFParameters(0, this.rate);
}
COM: <s> this method sets the rate parameter </s>
|
funcom_train/24196081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getQoP(int payload, int targetValue, double MAX_QOP) {
// if the two values differ by 1, or are equal, returns the maximum
// quality: MAX_QOP
double payloadd = Double.parseDouble(Integer.toString(payload));
double targetValued = Double.parseDouble(Integer.toString(targetValue));
double q = (payloadd >= targetValued ? MAX_QOP : MAX_QOP * payloadd
/ targetValued);
return q;
}
COM: <s> p returns quality of pasture for a given payload and target value </s>
|
funcom_train/18785090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parse(String plainContent, IWikiModel model) {
if (plainContent == null || plainContent.length() == 0) {
return "";
}
StringBuilder buf = new StringBuilder(plainContent.length() * 2);
try {
TemplateParser.parse(plainContent, model, buf, false);
} catch (IOException e) {
e.printStackTrace();
}
return buf.toString();
}
COM: <s> parse the given plain content string with the template parser </s>
|
funcom_train/26543839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void submitRenumerateIrp() throws UsbException {
try
{
UsbControlIrp usbControlIrp = getRenumerateIrp();
assertNotNull("usbControlIrp should not be null", usbControlIrp);
usbDevice.syncSubmit(usbControlIrp);
numSubmits++;
} catch ( IllegalArgumentException e )
{
e.printStackTrace();
fail("IllegalArgumentException was not expected.");
}
}
COM: <s> sends a reset and binary upload call to the cypress board </s>
|
funcom_train/39948271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sitPlayer(String sender) {
if (users.numOfPlayers() != numOfPlayers) {
users.newPlayer(sender, BOARD_LOCATIONS[numOfPlayers][users.numOfPlayers()]);
if (!started && (users.numOfPlayers() == numOfPlayers)) {
deck = new TockDeck(numOfPlayers);
deck.deal();
jacked = false;
started = true;
nextTurn();
}
users.removeChatter(sender);
} else {
users.newChatter(sender);
}
}
COM: <s> registers a new person to play the game if there are seats left </s>
|
funcom_train/32757221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged( final AveragingChannelMonitor source, final Channel channel, final double value ) {
if ( source == X_AVERAGING_CHANNEL_MONITOR ) {
EVENT_PROXY.xRunningAverageValueChanged( this, value );
}
else if ( source == Y_AVERAGING_CHANNEL_MONITOR ) {
EVENT_PROXY.yRunningAverageValueChanged( this, value );
}
}
COM: <s> event indicating that the double value has changed </s>
|
funcom_train/24262147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFieldValidationN5() {
try {
User user = (User) jenineHawthorn.clone();
user.setAddressLine1("");
curationService.addUser(admin, user);
fail();
}
catch(MacawException exception) {
int totalNumberOfErrors
= exception.getNumberOfErrors();
assertEquals(1, totalNumberOfErrors);
int numberOfErrors
= exception.getNumberOfErrors(MacawErrorType.INVALID_USER);
assertEquals(1, numberOfErrors);
}
}
COM: <s> ensure that the first line of the address has a value </s>
|
funcom_train/6333293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OzoneCompatible fetch(OzoneProxy rObj, int lockLevel) throws Exception,org.ozoneDB.ObjectNotFoundException, IOException, java.lang.ClassNotFoundException, org.ozoneDB.TransactionException, org.ozoneDB.core.TransactionError {
return null;
}
COM: <s> returns the actual target of the given proxy if the actual implementation </s>
|
funcom_train/23703743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void menuFileExit_actionPerformed(ActionEvent e) {
if (JOptionPane.showConfirmDialog(this, Options.getInstance()
.getResource("quit application?"), Options.getInstance()
.getResource("attention"), JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE) == 0) {
if (this.collectorUI != null) this.collectorUI.stop();
if (this.database != null) this.database.close();
System.exit(0);
}
}
COM: <s> menu file exit action performed </s>
|
funcom_train/32743624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean shouldIndex(String fieldName) {
if (getFieldDefinition(fieldName).getIntegerType() == FieldDefinition._text
|| getFieldDefinition(fieldName).getIntegerType() == FieldDefinition._binary) {
return should_text_Index(fieldName);
} else {
return true;
}
}
COM: <s> tell whether this type of field should be indexed </s>
|
funcom_train/2627175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test14( ) {
ComponentListType l_list = m_ripper.lCloseWindowComp;
assertSame( m_ripper.getlCloseWindowComp( ), l_list );
m_ripper.lCloseWindowComp = null;
assertEquals( m_ripper.getlCloseWindowComp( ), null );
m_ripper.lCloseWindowComp = l_list;
}
COM: <s> this function tests the ripper getl close window comp function </s>
|
funcom_train/37854670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char[] ch, int start, int length) throws SAXException {
myCharacters = true;
try {
String cdata = SVNEncodingUtil.xmlEncodeCDATA(new String(ch, start, length));
myWriter.write(cdata);
} catch (IOException e) {
throw new SAXException(e);
}
}
COM: <s> handles cdata characters </s>
|
funcom_train/22848248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(String filename, int format) {
Image image = new Image(Display.getDefault(), getBounds());
renderOffscreenImage(image);
ImageData data = image.getImageData();
ImageLoader loader = new ImageLoader();
loader.data = new ImageData[] { data };
loader.save(filename, format);
image.dispose();
}
COM: <s> saves to file with given format </s>
|
funcom_train/50995953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onChannelJoin(ChatEngineEvent event) {
RCTest.println("ChatApp.onChannelJoin("+event+")");
Channel chan = event.getChannel();
ChatChannelWindow chatWin = new ChatChannelWindow(chan);
_mdiPanel.addClientFrame(chatWin);
_framesByPanel.put(chatWin.getChatChannelPanel(),chatWin);
}
COM: <s> create channel window for this new channel </s>
|
funcom_train/50769945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConditionBinding(Vector name, int line) {
cb = new ConditionBinding();
split.splitConcernElemReference(name, true);
cb.setSelector(addSelectorRef(split.getPack(), split.getConcern(), split.getConcernelem(), line));
cb.setParent(si);
si.addConditionBinding(cb);
this.addToRepository(cb);
}
COM: <s> creates a new condition binding i </s>
|
funcom_train/49317274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
try {
HTMLViewer viewer = HTMLViewerMenuBar.getCurrentHTMLViewer();
URL url = null;
if (urlStr != null) {
url = new URL(urlStr);
}
if (url != null) {
viewer.setPage(url);
}
} catch (Exception e) {
DialogUtil.error(e);
}
}
COM: <s> display the catalog </s>
|
funcom_train/25098857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAllocatedElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FunctionAllocation_allocatedElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FunctionAllocation_allocatedElement_feature", "_UI_FunctionAllocation_type"),
FunctionmodelingPackage.Literals.FUNCTION_ALLOCATION__ALLOCATED_ELEMENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the allocated element feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.