__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/43132085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasFinishedAnimation(){
//tests all the illegal states of command and current command
Command last = getLastCommand();
if(last == null
||currentAnimationCommand == null
||currentAnimationCommandIndex < 0
||currentAnimationCommandIndex >= commandList.size())
return true;
else{
//tests if the last comment is the current and it is completed
Command posLast = currentAnimationCommand;
return posLast == last && last.hasCompleted();
}
}
COM: <s> returns if the animation is finished </s>
|
funcom_train/40699447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Trip getTripForKey(String tripKey) {
final String tripSerial = LocalDbService.getPersistent(tripKey);
if (tripSerial == null) {
return null;
}
final JsoTrip jsoTrip = (JsoTrip) JSONParser.parse(tripSerial).isObject().getJavaScriptObject();
return jsoTrip.getTrip();
}
COM: <s> get trip by key from local db </s>
|
funcom_train/43989361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void observeChanged(Object bean, String propertyName) {
if (bean == null)
throw new NullPointerException("The bean must not be null.");
if (propertyName == null)
throw new NullPointerException("The property name must not be null.");
BeanUtils.addPropertyChangeListener(bean, propertyName, changedUpdateHandler);
}
COM: <s> observes the specified readable bound bean property in the given bean </s>
|
funcom_train/43403554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(SimpleDenotator other) {
int c = getForm().compareTo(other.getForm());
if (c == 0) {
c = nameCompareTo(other);
if (c == 0) {
c = getModuleMorphismMap().compareTo(other.getModuleMorphismMap());
}
}
return c;
}
COM: <s> compares two simple denotators </s>
|
funcom_train/43683379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User getUser(String loginId, String password) {
List<User> users = getDao().query(
"from User user where user.loginId=? and user.password=?",
new Object[] { loginId, password });
if (users.isEmpty()) {
return null;
}
return users.get(0);
}
COM: <s> code user code </s>
|
funcom_train/39358910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel basicPanel(){
//we create the panel we are going to retrn
JPanel result = new JPanel();
//we set the layout
result.setLayout(new BoxLayout(result, BoxLayout.X_AXIS));
//we add the components
result.add(findLabel);
result.add(findText);
//we add some space around it
result.setBorder(BorderFactory.createEmptyBorder(15,15,15,15));
//we return the panel
return result;
}
COM: <s> this method creates the basic panel with the text field and the label </s>
|
funcom_train/1564394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getDocument() {
// TODO - Consider actually imposing one parse limit on rewriter pipeline
if (document != null) {
return document;
}
try {
document = contentParser.parseDom(getContent());
document.setUserData(MUTABLE_CONTENT_LISTENER, this, null);
} catch (GadgetException e) {
// TODO: emit info message
return null;
}
return document;
}
COM: <s> retrieves the object contents in parsed form if a </s>
|
funcom_train/44309269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyHeuristic() {
Set keys;
String element1,element2;
keys = termList.keySet();
for (Iterator j = keys.iterator(); j.hasNext(); )
{
element1=(String) j.next();
for (Iterator i = keys.iterator(); i.hasNext();)
{
element2 = (String) i.next();
if (element1.matches("^\\w+ "+element2+"$"))
{
updateEvidence(element1,element2,"isa");
updateEvidence(element2,element1,"asi");
// System.out.print("Heuristic: isa("+element1+","+element2+")\n");
}
}
}
}
COM: <s> applies the heuristic and updates the evidence vector </s>
|
funcom_train/14655138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table getTable(String name, String id) {
Iterator iter = tableIterator();
while (iter.hasNext()) {
Table table = (Table) iter.next();
if (table.getAttribute("tableName").getValue().equals(name)
&& table.getAttribute("tableID").getValue().equals(id)) {
return table;
}
}
return null;
}
COM: <s> get a table with the name and id </s>
|
funcom_train/39168435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (!(o instanceof PhraseQuery))
return false;
PhraseQuery other = (PhraseQuery)o;
return (this.getBoost() == other.getBoost())
&& (this.slop == other.slop)
&& this.terms.equals(other.terms);
}
COM: <s> returns true iff code o code is equal to this </s>
|
funcom_train/22562763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openViewPart(final Page page, final Object input) {
switch (page) {
case LIST_SUPPORT_QUESTION_PAGE:
viewPart = new SupportListViewPart(this, getCtx());
break;
case NEW_SUPPORT_QUESTION_PAGE:
viewPart = new NewSupportQuestionViewPart(this, getCtx());
break;
case VIEW_SUPPORT_QUESTION_PAGE:
viewPart = new ViewSupportQuestionViewPart(this, getCtx());
break;
default:
PortletUtils.handleError(LOG, new Exception("Unknown page encountered"));
}
if (viewPart != null) {
viewPart.setInput(input);
}
activePage = page;
}
COM: <s> open the specified view part and pass the input to it </s>
|
funcom_train/3583651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CopyAction getUserDatumCopyAction(Object key) {
Pair value_pair = this.getUserDatumValuePair(key);
if (value_pair == null) return null;
// Pair p = (Pair) getStorage().get(key);
return (CopyAction) value_pair.getSecond();
}
COM: <s> returns the copy action associated with this key </s>
|
funcom_train/23328404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
this.modulesById = new HashMap<String, ModuleTreeItem>();
this.moduleSortKeys = new LinkedList<String>();
this.subModulesById = new HashMap<String, SubModuleTreeItem>();
this.subModuleSortKeys = new HashMap<String, LinkedList<String>>();
this.removeAll();
}
COM: <s> resets all fields and removes all elements from the tree </s>
|
funcom_train/19309619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process() {
final String[] filesToProcess = this.sourceDir.list(this.fileFilter);
for (int i = 0; i < filesToProcess.length; i++) {
final String baseFileName = IOUtil.baseFileName(filesToProcess[i]);
processFile(baseFileName);
}
}
COM: <s> serialize the selected files </s>
|
funcom_train/168565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPDataLessThanMin() {
double delta = (axis.min - axis.max) * scalefactorValue;
axis.p(390, plot, true);
assertEquals(400 + delta, axis.getNodeRecursive("min").getValue(), 0.0);
assertEquals(800 + delta, axis.getNodeRecursive("max").getValue(), 0.0);
}
COM: <s> tests the p method of the axis class with the starting condition data </s>
|
funcom_train/4900203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void penButtonEvent(PButtonEvent ev) {
if (penButtonEventMethod != null) {
try {
penButtonEventMethod.invoke(parent, new Object[] { this });
} catch (Exception e) {
System.err.println("error, disabling penButtonEvent()");
e.printStackTrace();
penButtonEventMethod = null;
}
}
}
COM: <s> invokes pen button event method in the processing applet if exists when a </s>
|
funcom_train/36799641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getStopCommand () {
if (stopCommand == null) {//GEN-END:|108-getter|0|108-preInit
// write pre-init user code here
stopCommand = new Command ("Stop", Command.STOP, 0);//GEN-LINE:|108-getter|1|108-postInit
// write post-init user code here
}//GEN-BEGIN:|108-getter|2|
return stopCommand;
}
COM: <s> returns an initiliazed instance of stop command component </s>
|
funcom_train/27840035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean logout() throws LoginException {
// Need privileged permission to doAs,
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
mSubject.getPrincipals().removeAll(mPrincipals);
return null;
}
}); // end of doPrivileged
mSucceeded = false;
mSucceeded = mCommitSucceeded;
cleanOutState();
return true;
}
COM: <s> logout the user </s>
|
funcom_train/37506878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean match(Event event) {
String eventSubject = event.getSubject();
// Silly case but check anyway
if (eventSubject == null || eventSubject.length() == 0) {
return false;
}
// Test if one of the subjects matches
for (int i = 0; i < subjects.length; i++) {
if (eventSubject.startsWith(subjects[i])) {
return true;
}
}
// No match
return false;
}
COM: <s> determine if event matches subscription </s>
|
funcom_train/20307087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCloning() {
initCache();
TransitiveGraphCache clone = cache.deepCopy();
// Mess with the original to check cloning
cache.addRelation(new Triple(a, closedP, d));
cache.addRelation(new Triple(g, closedP, a));
doBasicTest(clone);
}
COM: <s> test the clone operation </s>
|
funcom_train/31661201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeKeyboard() {
if (getContentPane().isAncestorOf(DSKeyboardPanel1)) {
getContentPane().remove(DSKeyboardPanel1);
validate();
setSize(getWidth(), getHeight()-DSKeyboardPanel1.getPreferredSize().height);
DSContainer1.repaint();
}
}
COM: <s> closes the keyboard panel </s>
|
funcom_train/13847741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tell(List bad) {
for (Iterator iter = bad.iterator(); iter.hasNext(); ) {
Entry e = (Entry) iter.next();
if (e.renewalsDone()) {
final DesiredExpirationListener del =
e.desiredExpirationListener();
if (del != null) {
del.expirationReached(new LeaseRenewalEvent(this, e.lease,
e.expiration, null));
}
continue;
}
e.listener.notify(new LeaseRenewalEvent(this, e.lease,
e.expiration, e.ex));
}
}
COM: <s> notify the listener for each lease </s>
|
funcom_train/18896838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeHeader(PrintWriter out) throws IOException {
//validate
if (out != null) {
//print opening tags
out.println("<?xml version=\"1.0\"?>");
//print the opening RDF tag (including namespaces)
this.writeRDFHeader(out);
}
else {
throw new IllegalArgumentException("Cannot write to null Writer.");
}
}
COM: <s> writes the xml declaration and the opening rdf tag to the print writer </s>
|
funcom_train/27786265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Money subtract(TradingDate date, Money destinationMoney, Money sourceMoney) {
if(!destinationMoney.getCurrency().equals(sourceMoney.getCurrency()))
sourceMoney = sourceMoney.exchange(destinationMoney.getCurrency(),
getRate(date,
sourceMoney.getCurrency(),
destinationMoney.getCurrency()));
return destinationMoney.subtract(sourceMoney);
}
COM: <s> subtract the two given monies </s>
|
funcom_train/49791511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getInferenceTags(EList<DroolsRule> rules) {
Set<String> rulesWithInferenceTags = new HashSet<String>();
for (DroolsRule r : rules) {
for (JavadocTagElement j : r.getJavadocs()) {
if ("@inference".equals(j.getName())) {
rulesWithInferenceTags.add(r.getName());
}
}
}
return rulesWithInferenceTags.size();
}
COM: <s> get a count of all tags that are of type </s>
|
funcom_train/11344523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bundle getBundle(String name) {
Bundle[] bundles = context.getBundles();
for (int i = 0; i < bundles.length; i++) {
if (name.equals(bundles[i].getSymbolicName())) {
return bundles[i];
}
}
fail("No bundles with the given symbolic name " + name);
return null; // should not happen
}
COM: <s> gets a bundle by its symbolic name </s>
|
funcom_train/36916318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillFilteredFileList(String directory) {
fileList = new ArrayList();
String[] directories = new String[1];
directories[0] = directory;
ArrayList objectFileArray = listFilesRecursively(directories,
fileFilter);
for (int i = 0; i < objectFileArray.size(); i++) {
File f = (File) objectFileArray.get(i);
add(f);
}
}
COM: <s> obtain all the </s>
|
funcom_train/46590866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getEntry(SoundEvent key) throws IOException {
if (!mapping.containsKey(key)) {
throw new IllegalArgumentException("No sound defined for " + key);
}
List<SoundMapping> entrylist = mapping.get(key);
SoundMapping entry = entrylist.get(randomNumberGenerator.nextInt(entrylist.size()));
try {
return new BufferedInputStream(
rep.getStream(entry.getDirectory(), entry.getFile(), ResourceType.SOUND));
} catch (FileNotFoundException e) {
throw new IOException(e);
}
}
COM: <s> get a random entry for a given event </s>
|
funcom_train/34342520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand4() {
if (backCommand4 == null) {//GEN-END:|96-getter|0|96-preInit
// write pre-init user code here
backCommand4 = new Command("Back", Command.BACK, 0);//GEN-LINE:|96-getter|1|96-postInit
// write post-init user code here
}//GEN-BEGIN:|96-getter|2|
return backCommand4;
}
COM: <s> returns an initiliazed instance of back command4 component </s>
|
funcom_train/367071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Entity focus) {
boolean remove;
synchronized ( this ) {
remove = m_foci.remove(focus);
}
if ( remove && m_listener != null ) {
m_listener.focusChanged(new FocusEvent(this,
FocusEvent.FOCUS_REMOVED, null, new Entity[] {focus}));
}
} //
COM: <s> removes an entity from this focus set </s>
|
funcom_train/20079871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(ToolItem item, int index) {
if (fireEvent(Events.BeforeAdd, this, item, index)) {
items.add(index, item);
if (rendered) {
renderItem(item, index);
}
fireEvent(Events.Add, this, item, index);
}
}
COM: <s> inserts a item into the tool bar </s>
|
funcom_train/12188896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTwoArgumentsStartGreaterThanLength() throws ExpressionException {
final Function function = new SubstringFunction();
Value result = function.invoke(expressionContextMock,
new Value[]{factory.createStringValue("123456"), factory.createIntValue(10)});
assertTrue(result instanceof StringValue);
assertEquals("", ((StringValue) result).asJavaString());
}
COM: <s> tests if function works correctly when substring start is greater </s>
|
funcom_train/5421488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void call(final Method method, final Object obj) {
try {
method.setAccessible(true);
method.invoke(obj);
} catch (IllegalAccessException e) {
throwAssertionErrorFor(method, e);
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
if (e != null) {
Thrower.provoke(t);
} else {
throwAssertionErrorFor(method, e);
}
}
}
COM: <s> calls the method but throws an assertion error if an exception happens </s>
|
funcom_train/19212484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentAnswerPage getNextPage() throws Exception {
List<HtmlAnchor> anchors = nextPageLinkRow
.getHtmlElementsByTagName("a");
for (HtmlAnchor anchor : anchors) {
if ("nästa >".equals(anchor.asText())) {
return new DocumentAnswerPage((HtmlPage) anchor.click());
}
}
return null;
}
COM: <s> gets the next page </s>
|
funcom_train/51571867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void excludeFile(String file) {
String toExclude = replaceTilde(stripQuotes(replaceTokens(file)));
if (checkFileName(toExclude)) {
currentNamespace.getCurrentFileSet().exclude(new File(toExclude));
log.log(Level.FINER, "exclude file " + toExclude);
}
}
COM: <s> exclude a file in the current file set </s>
|
funcom_train/28489886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deAllocateVoice() {
ProgressLogger.getInstance().debug("Enter deallocateVoice()");
if (voiceMode) {
try {
if (synth != null) {
if (synth.testEngineState(synth.ALLOCATED))
synth.deallocate();
voiceMode = false;
}
} catch (Exception e) {
ProgressLogger.getInstance().error(
"Failed to deallocate voice", e);
e.printStackTrace();
}
}
ProgressLogger.getInstance().debug("exit deallocateVoice()");
}
COM: <s> deallocates voice resources </s>
|
funcom_train/26415915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEnterText() throws Exception {
JTextComponentPilotImpl pilot = new JTextComponentPilotImpl(comp);
final JFrame frame = new JFrame();
try {
EventQueue.invokeAndWait(new Runnable() {
public void run() {
frame.getContentPane().add(comp);
frame.pack();
frame.setVisible(true);
}
});
Droid.waitOnEventQueue2();
pilot.enterText("Testing... Testing...");
Droid.waitOnEventQueue();
assertEquals("text not entered correctly",
"Testing... Testing...", comp.getText());
} finally {
frame.dispose();
}
}
COM: <s> see that enter text works </s>
|
funcom_train/44489611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IToken getNextToken(final Map<Object, IToken> register) {
this.skipSpaces();
if (!this.in.hasMoreChars()) {
this.current = new EOFToken();
final int pos = this.in.getCursor();
this.current.initPosition(new TextPosition(pos, pos));
} else {
this.current = advanceToken(register);
}
return this.current;
}
COM: <s> returns the next token from the input </s>
|
funcom_train/7840695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addToGroup(String username, String groupname) {
boolean result = false;
HibernateUser user = getUserDAO().findUserByUsername(username);
HibernateGroup group = getGroupDAO().findGroupByGroupname(groupname);
if ((user != null) && (group != null)) {
user.addGroup(group);
result = getUserDAO().updateUser(user);
}
return result;
}
COM: <s> add user to group </s>
|
funcom_train/51204499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formWindowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosing
{//GEN-HEADEREND:event_formWindowClosing
int res = JOptionPane.showConfirmDialog(this, "Are you sure you wish to end the screen sharing session?",
"End Session", JOptionPane.YES_NO_OPTION);
if(res == JOptionPane.YES_OPTION)
dispose();
}//GEN-LAST:event_formWindowClosing
COM: <s> p called when the window is closing </s>
|
funcom_train/9919164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endUpdateIndices() {
if (tmpIndexArray != null) {
indices.put(tmpIndexArray);
tmpIndexArray = null;
}
indices.position(0);
gl.glUnmapBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER);
gl.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER, 0);
}
COM: <s> cleans up index updating </s>
|
funcom_train/6404771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calcForces(float dt) {
for (int x = 0, nSize = nodes.size(); x < nSize; x++) {
SpringPoint node = nodes.get(x);
node.acceleration.zero();
// apply external forces
for (int y = externalForces.size(); --y >= 0;) {
SpringPointForce force = externalForces.get(y);
if (force.isEnabled()) {
force.apply(dt, node);
}
}
}
}
COM: <s> calculate all external forces to be applied on the system nodes </s>
|
funcom_train/21764596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEventStream(String event) throws RemoteException {
try {
EventsCounter.setInEventCount();
for (String aip : accIpArray) {
String result = EventProcessor.getInstance().processEvent(event);
DeriveEventSender.sendDeriveEvent(aip, result.getBytes());
}
} catch (Exception e) {
Logger.error("error adding event in cluster node", e);
}
}
COM: <s> events from cluster leaders </s>
|
funcom_train/10907123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextRenderingMode(int mode) {
if (mode < 0 || mode > 7) {
throw new IllegalArgumentException(
"Illegal value for text rendering mode. Expected: 0-7");
}
if (mode != this.textRenderingMode) {
writeTJ();
this.textRenderingMode = mode;
write(this.textRenderingMode + " Tr\n");
}
}
COM: <s> sets the text rendering mode </s>
|
funcom_train/1548057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PolynomialSplineFunction polynomialSplineDerivative() {
PolynomialFunction derivativePolynomials[] = new PolynomialFunction[n];
for (int i = 0; i < n; i++) {
derivativePolynomials[i] = polynomials[i].polynomialDerivative();
}
return new PolynomialSplineFunction(knots, derivativePolynomials);
}
COM: <s> returns the derivative of the polynomial spline function as a polynomial spline function </s>
|
funcom_train/7738469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(City start, City destination) {
Logger.getLogger(Dijkstra.class.getName()).info("Executing Dijkstra on: " + start + " " + destination);
init(start);
// the current node
City u;
// extract the node with the shortest distance
while ((u = unsettledNodes.poll()) != null) {
settledNodes.add(u);
relaxNeighbors(u);
}
}
COM: <s> run dijkstras shortest path algorithm on the map </s>
|
funcom_train/5806780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUserOnDuty(String user, Calendar time) throws IOException, MarshalException, ValidationException {
update();
// if the user has no duty schedules then he is on duty
if (!m_dutySchedules.containsKey(user))
return true;
for (DutySchedule curSchedule : m_dutySchedules.get(user)) {
if (curSchedule.isInSchedule(time)) {
return true;
}
}
return false;
}
COM: <s> determines if a user is on duty at a given time </s>
|
funcom_train/2812685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getStartY() {
double y = 0.0;
if (bcBean.hasQuietZone()) {
y += bcBean.getVerticalQuietZone();
}
if (bcBean.getMsgPosition() == HumanReadablePlacement.HRP_TOP) {
y += bcBean.getHumanReadableHeight();
}
return y;
}
COM: <s> returns the start y position of the bars </s>
|
funcom_train/8094967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initInputLocators(Instances data, int[] indices) {
if (indices == null) {
m_InputStringAtts = new StringLocator(data);
m_InputRelAtts = new RelationalLocator(data);
}
else {
m_InputStringAtts = new StringLocator(data, indices);
m_InputRelAtts = new RelationalLocator(data, indices);
}
}
COM: <s> initializes the input attribute locators </s>
|
funcom_train/31625151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WizardFactory buildMockWizardFactory() {
wizardMock = new Mock(Wizard.class);
wizardMock.expects(never());
wiz = (Wizard) wizardMock.proxy();
wizardFactoryMock = new Mock(WizardFactory.class);
wizardFactoryMock.expects(once()).method("buildWizard").withNoArguments().will(returnValue(wiz));
return (WizardFactory) wizardFactoryMock.proxy();
}
COM: <s> builds a mock object wizard factory to test the wizard repository </s>
|
funcom_train/27719211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHtmlBody(String htmlBody) {
String newHtmlBody = htmlBody;
//newHtmlBody = newHtmlBody.replaceAll("\n", "");
//newHtmlBody = newHtmlBody.replaceAll(" +", " ");
this.htmlBody = newHtmlBody;
configureHtmlText();
}
COM: <s> sets the html body </s>
|
funcom_train/32355310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUserInfo(HashMap<String, String> userInfo) {
long userId = Long.parseLong(userInfo.get(UserConstants.USERID));
String name = userInfo.get(UserConstants.NAME);
String password = userInfo.get(UserConstants.PASS);
int flag = Integer.parseInt(userInfo.get(UserConstants.FLAG));
String emailAddress = userInfo.get(UserConstants.EMAIL);
user.setId(userId);
user.setName(name);
user.setPass(password);
user.setFlag(flag);
user.setEmailAddress(emailAddress);
}
COM: <s> sets the user information to the user object </s>
|
funcom_train/11702231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(Socket use_me) throws IOException {
setRetry(false);
socket = use_me;
socket.setSoTimeout(socketTimeout);
socket.setKeepAlive(isSocketKeepAliveEnabled());
is = new BufferedInputStream(socket.getInputStream());
os = new BufferedOutputStream(socket.getOutputStream());
}
COM: <s> make this client use an already established socket connection </s>
|
funcom_train/1099413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initFileUtil(ServletContext aConfig) {
File servletHome = initServletHome(aConfig);
File deploymentDir = getFile(servletHome, BPR_DIR_PARAM,
DEFAULT_DEPLOYMENT_DIR, aConfig);
File stagingDir = getFile(servletHome, STAGING_DIR_PARAM,
DEFAULT_STAGING_DIR, aConfig);
AeDeploymentFileInfo.setDeploymentDirectory(deploymentDir.getPath());
AeDeploymentFileInfo.setStagingDirectory(stagingDir.getPath());
}
COM: <s> initialize the static contents of the code ae active bpel file util code </s>
|
funcom_train/16891333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IEditorPart createEditor(String editorId, IEditorInput input, Composite editorComposite) throws CoreException {
final IEditorPart editor = createEditor(editorId, input);
Composite composite = new Composite(editorComposite, SWT.NONE);
composite.setLayout(new FillLayout());
editor.createPartControl(composite);
// This is the fundamental part of our implementation.
// Editors are activated when we get an Activate
// event from the editor's composite.
associate(editor, composite);
return editor;
}
COM: <s> creates an embedded editor corresponding to the given editor id </s>
|
funcom_train/45720251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showDialog (String[] texts, Media[] media, String btn1, String btn2, LuaClosure callback) {
this.callback = callback;
this.texts = texts;
this.media = media;
button1.setText(btn1 == null ? "OK" : btn1);
button2.setText(btn2);
button2.setVisible(btn2 != null);
page = -1;
flipPage();
}
COM: <s> shows a dialog </s>
|
funcom_train/18029121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo( Datum a ) throws IllegalArgumentException {
if ( this.units != a.units ) {
a= a.convertTo(this.units);
}
double d= this.getValue().doubleValue() - a.getValue().doubleValue();
if (d==0.) {
return 0;
} else if ( d<0. ) {
return -1;
} else {
return 1;
}
}
COM: <s> compare this to another datum </s>
|
funcom_train/2893589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Feature createSiteFeature (String id, String name, double x, double y) {
GeometryFactory gf = new GeometryFactory();
Point loc = gf.createPoint(new Coordinate(x, y));
Object[] featureAttributes = { loc, name };
Feature f = null;
try {
f = new SiteFeature(featureAttributes, id);
} catch (IllegalAttributeException e) {
e.printStackTrace();
}
return f;
}
COM: <s> create a single site feature </s>
|
funcom_train/30005982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDurationAsString() {
String result = new String();
int h = this.getHours();
int m = this.getRemainingMinutes();
if (h < 10 && h >= 0) {
result += "0";
}
result += h + ":";
if (m < 10) {
result += "0";
}
result += m;
return result;
}
COM: <s> returns the duration as string </s>
|
funcom_train/40338686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DirectedRelationFinder getSelectedRelations() {
MultipleDirectedRelationFinder finder =
new MultipleDirectedRelationFinder();
for (DirectedRelation relation : contentMap.values()) {
finder.addOrReplaceRelation(relation.getRelation(),
relation.matchForward(), relation.matchBackward());
}
return finder;
}
COM: <s> because this gui class is a maintain informations about directions for </s>
|
funcom_train/29698531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEntitiesOwnedBy(Player player) {
int count = 0;
for (Enumeration<Entity> i = entities.elements(); i.hasMoreElements();) {
Entity entity = i.nextElement();
if (entity.getOwner().equals(player)) {
count++;
}
}
return count;
}
COM: <s> returns the number of entities owned by the player regardless of </s>
|
funcom_train/20746566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteActivity(Activity activity) {
// delete activity from the database
DbHelper db = new DbHelper(DbHelper.REF_ITS_DATASOURCE);
db.prepareStatement("delete from activity where activity_id = ?");
db.setInt(1, activity.getId());
db.executeUpdate();
db.close();
// remove activity from cache
activityCache.remove(new Integer(activity.getId()));
}
COM: <s> deletes given code activity code from the persistance layer </s>
|
funcom_train/3411095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustmentValueChanged(AdjustmentEvent e) {
Adjustable adj = e.getAdjustable();
int value = e.getValue();
ScrollPanePeer peer = (ScrollPanePeer) scroller.peer;
if (peer != null) {
peer.setValue(adj, value);
}
Component c = scroller.getComponent(0);
switch(adj.getOrientation()) {
case Adjustable.VERTICAL:
c.move(c.getLocation().x, -(value));
break;
case Adjustable.HORIZONTAL:
c.move(-(value), c.getLocation().y);
break;
default:
throw new IllegalArgumentException("Illegal adjustable orientation");
}
}
COM: <s> invoked when the value of the adjustable has changed </s>
|
funcom_train/33427252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Blog getBlog(String idBlog) throws ArgumentInvalidException {
Iterator<Blog> it = iteradorBlog();
while(it.hasNext()){
Blog blog = it.next();
if (blog.getId().equals(idBlog))
return blog;
}
Iterator<Blog> itSub = iteradorSubBlog();
while(itSub.hasNext()){
Blog subBlog = itSub.next();
if (subBlog.getId().equals(idBlog))
return subBlog;
}
throw new ArgumentInvalidException(Constantes.BLOG_INVALIDO.getName());
}
COM: <s> metodo que recupera um </s>
|
funcom_train/37592826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int c) {
try { _doc.insertString(_doc.getLength(), String.valueOf((char)c), _attributes); }
catch (BadLocationException canNeverHappen) {
throw new RuntimeException("Internal error: bad location in OutputWindowStream");
}
}
COM: <s> writes a character to the stream </s>
|
funcom_train/48190507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(PosIntfposmain entity) {
LogUtil.log("deleting Intfposmain instance", Level.INFO, null);
try {
entity = entityManager.getReference(PosIntfposmain.class, entity
.getPolicyno());
entityManager.remove(entity);
LogUtil.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent intfposmain entity </s>
|
funcom_train/50814027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMember( IBusMember member ) {
synchronized( memberSet ) {
// XXX lets hope we don't do too much removing. Yuck...
for( int i = 0 ; i < memberSet.length ; i++ ) {
if( memberSet[ i ] == null ) continue ;
memberSet[ i ].remove( member ) ;
}
}
}
COM: <s> remove a member from the bus </s>
|
funcom_train/41262464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPaneConversa() {
if (jScrollPaneConversa == null) {
jScrollPaneConversa = new JScrollPane();
jScrollPaneConversa.setBounds(new Rectangle(6, 17, 742, 291));
jScrollPaneConversa.setEnabled(false);
jScrollPaneConversa.setViewportView(getJTextAreaConversa());
}
return jScrollPaneConversa;
}
COM: <s> this method initializes j scroll pane conversa </s>
|
funcom_train/22981927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(LogRecord record) {
StringBuffer buffer = new StringBuffer( );
buffer.append ( new Date().toString() );
buffer.append ( " " );
buffer.append ( record.getLevel() );
buffer.append ( "\t" );
buffer.append ( record.getMessage() );
buffer.append ( "\n" );
return buffer.toString();
}
COM: <s> this method is called for every log records </s>
|
funcom_train/12153465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleBrowse() {
ContainerSelectionDialog dialog = new ContainerSelectionDialog(
getShell(),
ResourcesPlugin.getWorkspace().getRoot(),
false,
Messages.getString("GenericWizardPage.containerBrowseDialog.title")); //$NON-NLS-1$
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path) result[0]).toString());
}
}
}
COM: <s> uses the standard container selection dialog to choose the new value for </s>
|
funcom_train/15410990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dmlBind(BindableRequest request, boolean checkIncludes, Object bean, boolean bindNull) throws SQLException {
Object value = gen.getInsertValue(prop, bean);
// generated value should be the correct type
if (bean != null){
// support PropertyChangeSupport
prop.setValueIntercept(bean, value);
request.registerAdditionalProperty(prop.getName());
}
//value = prop.getDefaultValue();
request.bind(value, prop, prop.getName(), bindNull);
}
COM: <s> bind a value in a insert set clause </s>
|
funcom_train/23852691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void lenghtToBitFingerprint(short length, byte[] bitFingerprint) {
ByteBuffer bb = ByteBuffer.allocate(2);
bb.order(ByteOrder.LITTLE_ENDIAN);
bb.putShort(length);
bitFingerprint[0] = bb.get(0);
bitFingerprint[1] = bb.get(1);
}
COM: <s> set the length in the bit fingerprint first two bytes </s>
|
funcom_train/22133007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node copyFile(Node dest) throws CopyException {
InputStream in;
try {
in = createInputStream();
getWorld().getBuffer().copy(in, dest);
in.close();
return dest;
} catch (IOException e) {
throw new CopyException(this, dest, e);
}
}
COM: <s> overwrites dest if it already exists </s>
|
funcom_train/3651279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
super.connect();
writeXML("<stream:stream to=\"" + url.getHost() + "\" " +
"xmlns=\"jabber:client\" " +
"xmlns:stream=\"http://etherx.jabber.org/streams\">");
}
COM: <s> opens the connection then initiates the jabber session with an </s>
|
funcom_train/19685806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepareData() {
addInt(RREQ_ID);
addInt(HOP_COUNT);
addInt(DestOfRREQseqnb);
addInt(IDandSEQNBpairs.size());
for (int i=0;i<IDandSEQNBpairs.size();i++){
IDandSEQNBpair objIDandSEQNBpair=(IDandSEQNBpair)IDandSEQNBpairs.get(i);
addLong(objIDandSEQNBpair.getNODE_ID());
addInt(objIDandSEQNBpair.getNODE_SEQNB());
}
addInt(SrcOfRREQseqnb);
}
COM: <s> serialize the data in the rreq message </s>
|
funcom_train/9303991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String printDueDate() {
String output = "";
output = output.concat("" + (this.duedate.get(Calendar.MONTH) + 1));
output = output.concat("-" + this.duedate.get(Calendar.DATE));
output = output.concat("-" + this.duedate.get(Calendar.YEAR));
return output;
}
COM: <s> return the due date in a printable string form </s>
|
funcom_train/29687332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelWest() {
if (jPanelWest == null) {
jPanelWest = new JPanel();
jPanelWest.setLayout(new BoxLayout(getJPanelWest(), BoxLayout.X_AXIS));
jPanelWest.add(getJButtonOpen(), null);
jPanelWest.add(getJButtonSample(), null);
jPanelWest.add(getJButtonSettings(), null);
}
return jPanelWest;
}
COM: <s> this method initializes j panel west </s>
|
funcom_train/24364765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNameDescription() {
sbNameDescription.setLength(0);
String label = getLabel();
String typeString = translatedTypeString();
if (app.isReverseNameDescriptionLanguage()) {
// reverse order: "A point"
sbNameDescription.append(label);
sbNameDescription.append(' ');
sbNameDescription.append(typeString);
}
else {
// standard order: "point A"
sbNameDescription.append(typeString);
sbNameDescription.append(' ');
sbNameDescription.append(label);
}
return sbNameDescription.toString();
}
COM: <s> returns type and label of a geo element </s>
|
funcom_train/18738433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOutjarInAspectpath () {
String[] args = new String[] {"-aspectpath", aspectjarName, "-inpath", injarName, "-outjar", aspectjarName};
Message error = new Message(WeaverMessages.format(WeaverMessages.OUTJAR_IN_INPUT_PATH));
Message fail = new Message("Usage:");
MessageSpec spec = new MessageSpec(null,null,newMessageList(error),newMessageList(fail),null);
CompilationResult result = ajc(baseDir,args);
// System.out.println(result);
assertMessages(result,spec);
}
COM: <s> aim check that outjar does not coincide with a member of aspectpath </s>
|
funcom_train/24434884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unbindFromRegistry(int port, String name, Remote remoteObject) {
try {
LocateRegistry.getRegistry(port).unbind(name);
UnicastRemoteObject.unexportObject(remoteObject, true);
} catch (RemoteException ex) {
logger.error("Exception when unbinding '" + name + "' from registry.", ex);
} catch (NotBoundException ex) {
logger.error("Exception when unbinding '" + name + "' from registry.", ex);
}
}
COM: <s> unbinds a service from a local registry </s>
|
funcom_train/10795838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addImport(ClassName name) {
String pkgName = name.getPackageName();
if ("java.lang".equals(pkgName))
return false;
for (Import i : imports) {
if (i.getClassName().hides(name)) {
i.getClassName().useFullName();
name.useFullName();
}
}
return imports.add(new Import(name));
}
COM: <s> adds import to this source code </s>
|
funcom_train/51341038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CommitRecordIndex _getCommitRecordIndex() {
assert _fieldReadWriteLock.writeLock().isHeldByCurrentThread();
assert _rootBlock != null;
final long addr = _rootBlock.getCommitRecordIndexAddr();
try {
return getCommitRecordIndex(addr);
} catch (RuntimeException ex) {
/*
* Log the root block for post-mortem.
*/
log.fatal("Could not read the commit record index:\n" + _rootBlock,
ex);
throw ex;
}
}
COM: <s> read and return the </s>
|
funcom_train/13500746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getInputStream(String filename) {
try {
return (new URL(getCodeBase(), filename)).openStream();
} catch (IOException ioe) {
System.err.println("IOException in SIPCreator#getInputStream: " + ioe.getMessage());
return null;
}
}
COM: <s> this method takes a relative path in string form resolves it against </s>
|
funcom_train/9759687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void catchupWithMarkers() throws CoreException {
for (Iterator e=getAnnotationIterator(false); e.hasNext();) {
Annotation a= (Annotation) e.next();
if (a instanceof MarkerAnnotation)
removeAnnotation(a, false);
}
IMarker[] markers= retrieveMarkers();
if (markers != null) {
for (int i= 0; i < markers.length; i++)
addMarkerAnnotation(markers[i]);
}
}
COM: <s> re populates this model with annotations for all markers retrieved </s>
|
funcom_train/41876563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPitchMod(float modulation) {
if ( modulation < 0.0f || modulation > 127.0f) {
throw new IllegalArgumentException("Pitch modulation must be in the range 0.0 - 127.0");
}
setProperty(SpeechProperty.PitchModProperty, NSNumber.CLASS.numberWithFloat(modulation));
}
COM: <s> set the pitch modulation for the synthesizer </s>
|
funcom_train/44665288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteInitiativeComment(CommentForm review){
int actionParam = Integer.parseInt(review.getActionParam());
logger.debug("About to delete initiative comment number - " + actionParam);
Comment comment = review.removeInitiativeComment(actionParam);
logger.debug("Deleting initiative comment - " + comment);
//Delete comment from the database
getCommentAccess().deleteComment(comment);
}
COM: <s> delete the initiative commment indicated by the form </s>
|
funcom_train/34627341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String resolveLatestWord(String doc, int offset) {
int index = 1;
while (offset - index >= 0) {
if (Character.isWhitespace(doc.charAt(offset - index)))
break;
index++;
}
index--;
if (index > 0)
return doc.substring(offset - index, offset);
return "";
}
COM: <s> resolves the latest word immediately before the cursor position and returns it </s>
|
funcom_train/35164686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean shouldResize(MouseEvent e) {
if ( !_resizing && Note.isHidingEnabled() ) {
return false;
}
// only respond to drag events if CTRL is pressed too
if ( !_resizing && (e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != InputEvent.CTRL_DOWN_MASK) {
return false;
}
return true;
}
COM: <s> helper method that checks a few parameters to determine if a resize </s>
|
funcom_train/16454465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String key) {
// strip the leading $ if present
key = key.startsWith("$") ? key.substring(1) : key;
String value = null;
if (props.containsKey(key)) {
value = (String) props.get(key);
}
// if not in props map then check for value in system properties
else {
value = System.getProperty(key, null);
}
return value;
}
COM: <s> returns the property associated with the key or null if </s>
|
funcom_train/28438890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File resolveFile(final String s) {
if(getProject() == null) {
// Note FileUtils.getFileUtils replaces FileUtils.newFileUtils in Ant 1.6.3
return (File)FileUtils.newFileUtils().resolveFile(null, s);
} else {
return (File)FileUtils.newFileUtils().resolveFile(getProject().getBaseDir(), s);
}
}
COM: <s> resolves the relative or absolute pathname correctly </s>
|
funcom_train/20830372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultKeysContainer processReturnClause(XQueryFLWOR op) throws XQueryException{
ResultKeysContainer result = null;
List<KeyModifierContainer> keys = null;
if(op.hasOrderBy()) keys = processOrderBy(op.getOrderBy());
result = new ResultKeysContainer(op.getReturnExpression().evaluate(this), keys);
return result;
}
COM: <s> method process return clause </s>
|
funcom_train/19542552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getBottomPanel(), java.awt.BorderLayout.SOUTH);
jContentPane.add(getCenterPanel(), java.awt.BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/11074697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Pointer getSingleNodePointerForSteps(EvalContext context) {
if (steps.length == 0) {
return context.getSingleNodePointer();
}
if (isSimplePath()) {
NodePointer ptr = (NodePointer) context.getSingleNodePointer();
return SimplePathInterpreter.interpretSimpleLocationPath(
context,
ptr,
steps);
}
return searchForPath(context);
}
COM: <s> given a root context walks a path therefrom and finds the </s>
|
funcom_train/14463131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureCapacity(int minCapacity) {
modCount++;
int oldCapacity = elementData.length;
if (minCapacity > oldCapacity) {
Object oldData[] = elementData;
int newCapacity = (oldCapacity * 3)/2 + 1;
if (newCapacity < minCapacity)
newCapacity = minCapacity;
elementData = new Object[newCapacity];
System.arraycopy(oldData, 0, elementData, 0, size);
}
}
COM: <s> increases the capacity of this tt array list tt instance if </s>
|
funcom_train/45076144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calcUCL(double fit) {
double result;
if(coefficients[0] == 1) {
fit = Math.log(fit) / Math.log(10);
result = Math.pow(10, (fit + 2 * errStdDev));
}
else {
result = fit + 2 * errStdDev;
}
return result;
}
COM: <s> calculate the upper control limit for the given daily fit </s>
|
funcom_train/20283046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateRecordType() throws Exception {
Map<String, RecordProperty> properties =
new HashMap<String, RecordProperty>();
properties.put("hello", new RecordProperty(NUMBER_TYPE, null));
JSType recordType = registry.createRecordType(properties);
assertEquals("{hello: number}", recordType.toString());
}
COM: <s> tests the factory method </s>
|
funcom_train/32753432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyColorForRange( final double start, final double end ) {
if ( Z >= start && Z <= end ) {
// color value is in the range from 0 to 1 and maps to the red to blue spectrum
final float colorValue = (float)( ( Z - start ) / ( end - start ) );
CURVE_DATA.setColor( ColorSpectrumPanel.getColor( colorValue ) );
}
else {
CURVE_DATA.setColor( Color.BLACK );
}
}
COM: <s> apply the color for the specified z range </s>
|
funcom_train/14520338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean changeAdminPreference(Admin admin, String certificatefingerprint, AdminPreference adminpreference){
if (log.isTraceEnabled()) {
log.trace(">changeAdminPreference(fingerprint : " + certificatefingerprint + ")");
}
return updateAdminPreference(admin, certificatefingerprint, adminpreference, true);
} // changeAdminPreference
COM: <s> changes the admin preference in the database </s>
|
funcom_train/19829288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findColumnIndex(String columnName) throws SQLException {
for (int i = 0; i < this.currentRow.length; i++) {
int c = i + 1;
if (this.metaData.getColumnName(c).equalsIgnoreCase(columnName)) {
return c;
}
}
throw new SQLException(columnName + " is not a valid column name.");
}
COM: <s> returns the column index for the given column name </s>
|
funcom_train/18790000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWorkUrl(URL workUrl) {
if (((this.workUrl != null) && !this.workUrl.equals(workUrl)) ||
((this.workUrl == null) && (workUrl != null))) {
this.workUrl = workUrl;
setModified(true);
}
}
COM: <s> sets the new value of the simple property work url </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.