__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/491002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delIpOk() {
try {
user.deleteIp(dbc, chgIp);
} catch (Exception e) {
String em = "error deleting ip: " + e.getMessage();
syslog.warn(em);
FacesUtils.addErrorMessage(em);
}
ips = null;
chgIp = null;
}
COM: <s> deletes selected ip from list for this user </s>
|
funcom_train/27702234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCountry(String country) {
if (country.length() == 2) {
this.country = country.toUpperCase();
} else {
logger.warn("malformed country code '" + country + "', setting to default (de)");
this.language = "de";
}
}
COM: <s> setter for property country </s>
|
funcom_train/51705460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setText(" S E N D M E S S A G E ");
jButton1.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.blue,5));
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
sendMessage();
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/45547026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws IOException, IllegalStateException {
super.start();
serverSocket.register(ioProcessors[0].selector, SelectionKey.OP_ACCEPT);
logger.info(
"[" + serverSocket.socket().getInetAddress() + "]: started " +
"on port " + serverSocket.socket().getLocalPort());
}
COM: <s> starts the server </s>
|
funcom_train/15581099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickLinkWithText(String linkText) {
WebLink link = null;
try {
link = resp.getLinkWith(linkText);
} catch (SAXException e) {
throw new RuntimeException(ExceptionUtility.stackTraceToString(e));
}
if (link == null)
throw new RuntimeException("No Link found for \"" + linkText + "\"");
submitRequest(link);
}
COM: <s> navigate by submitting a request based on a link containing the specified text </s>
|
funcom_train/39070265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Image getCompareImage(Image base, int kind) {
switch (kind & SyncInfo.DIRECTION_MASK) {
case SyncInfo.OUTGOING :
kind = (kind & ~SyncInfo.OUTGOING) | SyncInfo.INCOMING;
break;
case SyncInfo.INCOMING :
kind = (kind & ~SyncInfo.INCOMING) | SyncInfo.OUTGOING;
break;
}
return compareConfig.getImage(base, kind);
}
COM: <s> returns the image decorated by the diff node overlays depending on </s>
|
funcom_train/10212618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeEnd() {
if (!this.isEnd) {
this.isEnd = true;
try {
this.out.write("</logcrawler>\n");
this.out.flush();
} catch (IOException e) {
LOG.error("Could not write xml end tag " + e.getMessage());
}
}
}
COM: <s> writes the closing tag for the log crawler tag </s>
|
funcom_train/15922569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldInstance fieldNamed(Name name) {
for (Iterator<FieldInstance> i = fields().iterator(); i.hasNext(); ) {
FieldInstance fi = (FieldInstance) i.next();
if (fi.name().equals(name)) {
return fi;
}
}
return null;
}
COM: <s> get a field of the class by name </s>
|
funcom_train/51186294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unbind(final Class signalClass, final BusListener listener) {
final DefaultBusMember proxy = (DefaultBusMember) listeners.get(listener);
if (proxy != null) {
proxy.unbind(signalClass.getName());
/**
* If we are not registered on any buses we can free some objects in
* memory *
*/
if (proxy.getRegisteredBuses().isEmpty()) {
listeners.remove(listener);
}
}
}
COM: <s> unbinds the specified instance for the signal class </s>
|
funcom_train/32381983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void incrFinishedUnits() {
this.finishedUnits += 1;
if (this.dialogs != null) {
// Copying set of dialogs to avoid ConcurrentModificationException
// (even though it's very unlikely):
Set<IProgressMonitorDialog> lvDialogsCopy = new HashSet<IProgressMonitorDialog>(
this.dialogs);
for (IProgressMonitorDialog lvDialog : lvDialogsCopy) {
lvDialog.advance(this);
}
}
}
COM: <s> is called any time the action finished a working unit </s>
|
funcom_train/4014290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date getDaysGridOrigin(Date displayedMonth) {
int currentYear = displayedMonth.getYear();
int currentMonth = displayedMonth.getMonth();
Date monthFirstDay = new Date(currentYear, currentMonth, 1);
int indice = DateUtil.getWeekDayIndex(monthFirstDay);
Date origineTableau;
if (indice > 4) {
origineTableau = DateUtil.getWeekFirstDay(monthFirstDay);
} else {
origineTableau = DateUtil.getWeekFirstDay(DateUtil.addDays(
monthFirstDay, -7));
}
return origineTableau;
}
COM: <s> return the first day to display </s>
|
funcom_train/41016740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyUp() {
int row = current/optionsPerRow;
int col = current%optionsPerRow;
if (row == 0) {
row = optionRows-1;
col = (col+optionsPerRow-1)%optionsPerRow;
}
else
row--;
current = row*optionsPerRow + col;
if (current >= numOptions)
current = numOptions-1;
}
COM: <s> up arrow key press </s>
|
funcom_train/4738290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFromHeap() {
int now = (int) (System.currentTimeMillis() / 1000);
HostQueue q = hostQueue.peek();
if (q == null)
return null;
if (q.priority < now) {
q = hostQueue.remove();
totalUrlCount.decrementAndGet();
return q.popUrl();
}
return null;
}
COM: <s> return url from heap or null if none exists </s>
|
funcom_train/25599804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createNew() {
sDoc = new Document(new Element("phymote"));
sDoc.getRootElement().setAttribute("version", SETTINGSVERSION);
sDoc.getRootElement().addContent(new Element("motes"));
sDoc.getRootElement().addContent(new Element("settings"));
try {
new XMLOutputter().output(sDoc, new FileWriter(settingsFile));
} catch (IOException e) {
System.err.println("Error writing settings file.");
}
}
COM: <s> creates new plain settings xml file </s>
|
funcom_train/3945767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateHrefType1_MaxLength(String hrefType1, DiagnosticChain diagnostics, Map context) {
int length = hrefType1.length();
boolean result = length <= 2000;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImscpRootv1p1p2Package.eINSTANCE.getHrefType1(), hrefType1, length, 2000, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em href type1 em </s>
|
funcom_train/17882087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() throws ObjectIOException {
synchronized (this) {
stateMap.clear();
stateMapByIdentifier.clear();
key.clear();
// clear queue
referencedQueueHead = null;// NOPMD
referencedQueueTail = null;// NOPMD
referencedQueueSize = 0;
if (exclusiveAccessSession) {
// clear queue
queueHead = null;// NOPMD
queueTail = null;// NOPMD
queueSize = 0;
queueNumberOfWeakRef = 0;
}
}
}
COM: <s> clear all informations </s>
|
funcom_train/43245573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDispositioningEmployeeName() {
System.out.println("getDispositioningEmployeeName");
ApplicationObject instance = new ApplicationObject();
String expResult = "";
String result = instance.getDispositioningEmployeeName();
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 dispositioning employee name method of class org </s>
|
funcom_train/11103210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prerender() {
Locale locale =
FacesContext.getCurrentInstance().getViewRoot().getLocale();
if (log.isTraceEnabled()) {
log.trace(messages.getMessage("select.prerender",
new Object[] { locale }));
}
setLocale(locale.toString());
}
COM: <s> p set the value of the code locale code property based on the </s>
|
funcom_train/39189324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserProject getFocusedProject () {
if ( focusedProjectCache == null ) {
focusedProjectCache = getProject( focusedProjectId );
}
if ( focusedProjectCache == null ) {
//Logger.getInstance().log( Logger.NOTE, "No focused project exists!" );
return NULL_PROJECT;
}
return focusedProjectCache;
}
COM: <s> returns focused project </s>
|
funcom_train/34596130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Button createThumbButton(Slider slider) {
Button btn = new Button() {
public void updateAppearance() {
setAppearance(new SimpleButtonAppearance(this) {
protected RoundedRectangle createRoundedBounds() {
return new RoundedRectangle(0f, 0f, 0f, 0f, 3f, 50);
}
});
}
};
btn.setSize(26, 26);
return btn;
}
COM: <s> this is the knob or thumb button whic appears on the slider </s>
|
funcom_train/8476477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadContent() {
delayTestFinish(GENERATOR_TIMEOUT);
prepareEnvironment();
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void onUncaughtException(Throwable e) {
Log.debug("Uncaught exception", e);
finishTest();
}
});
initializeService();
count.value = 0;
offlineContentProvider = new HtmlFilesHandler(getModuleName(), generatorService);
contentProvider = getContentProvider();
loadTokensForProcessing();
}
COM: <s> parse a url and return a map of query parameters </s>
|
funcom_train/8967274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTransitionType() {
if(this.getClass().getPackage().equals(TransitionFactory.class.getPackage())){
String[] str = this.getClass().getName().split("[.]"); //$NON-NLS-1$
return str[str.length - 1];
}else{
return this.getClass().getName();
}
}
COM: <s> get the name of transition relative to transition factory </s>
|
funcom_train/45612316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSupported(String feature, String version) {
String myVersion = userData.getProperty("features." + feature + ".version", version);
String myFeature = userData.getProperty("features." + feature);
return myVersion == null || myFeature == null;
}
COM: <s> simply looks in the user data </s>
|
funcom_train/45763416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize( TestParameters tParam, PrintWriter log ) {
String srcUrl = utils.getFullTestURL("SfxStandaloneDocInfoObject.sdw") ;
destUrl = utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()) +
"SfxStandaloneDocInfoObject.sdw";
utils.overwriteFile((XMultiServiceFactory)tParam.getMSF(), srcUrl, destUrl) ;
}
COM: <s> copies file sfx standalone doc info object </s>
|
funcom_train/19035839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAccounts(AccountCollection accounts) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ServerMessageCode.UPDATEACCOUNTS.getIndex());
accounts.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> updates the admin with new accounts to look at </s>
|
funcom_train/3493045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(HashMapVector vector) {
Iterator mapEntries = vector.iterator();
while (mapEntries.hasNext()) {
Map.Entry entry = (Map.Entry)mapEntries.next();
// An entry in the HashMap maps a token to a Weight
String token = (String)entry.getKey();
// The weight for the token is in the value of the Weight
double weight = ((Weight)entry.getValue()).getValue();
increment(token, weight);
}
}
COM: <s> destructively add the given vector to the current vector </s>
|
funcom_train/44535913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCc(String s) {
StringTokenizer str = new StringTokenizer(s, ",;");
cc = new String[str.countTokens()];
int index = 0;
while (str.hasMoreTokens()) {
cc[index++] = str.nextToken();
}
}
COM: <s> parses a cc string to set field array </s>
|
funcom_train/1173530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOnlyManaCost() {
return !sacCost && !exileCost && !exileFromHandCost && !exileFromGraveCost && !exileFromTopCost && !tapCost &&
!tapXTypeCost && !untapCost && !subtractCounterCost && !addCounterCost && !lifeCost && !discardCost && !returnCost;
}
COM: <s> p is only mana cost </s>
|
funcom_train/34199272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void wrap(Rectangle rect){
if(x > rect.right()) { x = rect.left();} else
if(x < rect.left() ) { x = rect.right();}
if(y > rect.bottom()) { y = rect.top();} else
if(y < rect.top() ) { y = rect.bottom();}
}
COM: <s> wraps the point within the given rectangle </s>
|
funcom_train/23747666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_exitMenuItemActionPerformed
{//GEN-HEADEREND:event_exitMenuItemActionPerformed
LOGIT.severe("Client closed - User exit");
System.exit(0);
}//GEN-LAST:event_exitMenuItemActionPerformed
COM: <s> quite simply exit the application </s>
|
funcom_train/20440040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDayPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFTime_day_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFTime_day_feature", "_UI_ESMFTime_type"),
ESMFPackage.Literals.ESMF_TIME__DAY,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the day feature </s>
|
funcom_train/21850055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateFocusKeys(FormComponent root, FocusPolicyMemento memento) {
Iterator iter = memento.getFocusPolicyKeys().iterator();
while (iter.hasNext()) {
FocusKey fkey = (FocusKey) iter.next();
Component comp = fkey.getComponent(root);
assert (comp != null);
System.out.print("Focuskey validated: ");
fkey.print();
System.out.println(" comp: " + comp.getClass());
}
}
COM: <s> checks that all focuskeys reference the correct components </s>
|
funcom_train/43326493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyDataFrom(Monomer q) {
super.copyDataFrom(q);
if (q instanceof ProfResPSI) {
ProfResPSI qq = (ProfResPSI)q;
if (qq.JMCPhiPsi != null) JMCPhiPsi = new DMatrix(qq.JMCPhiPsi);
if (qq.JMCAlphaTau != null) JMCAlphaTau = new DMatrix(qq.JMCAlphaTau);
if (qq.posScore != null) posScore = new DVector(qq.posScore);
}
}
COM: <s> copy another prof res psi </s>
|
funcom_train/9082691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processPostSignerResponse(IQ iq) {
String key = genCallbackKey(iq, false /* response */);
if (requestCallbacks.containsKey(key)) {
requestCallbacks.remove(key).run(iq);
} else {
logger.warning("unexpected submit response:\n" + iq);
}
}
COM: <s> reads a post signer response off the wire sends it to the remote </s>
|
funcom_train/35721951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeViewportUpdate() {
if (fViewportGuard != null)
return;
if (fTextWidget != null) {
fViewportGuard= new ViewportGuard();
fLastTopPixel= -1;
fTextWidget.addKeyListener(fViewportGuard);
fTextWidget.addMouseListener(fViewportGuard);
fScroller= fTextWidget.getVerticalBar();
if (fScroller != null)
fScroller.addSelectionListener(fViewportGuard);
}
}
COM: <s> initializes all listeners and structures required to set up view port listeners </s>
|
funcom_train/10870468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Automaton naiveLev1(String s) {
Automaton a = BasicAutomata.makeString(s);
a = BasicOperations.union(a, insertionsOf(s));
MinimizationOperations.minimize(a);
a = BasicOperations.union(a, deletionsOf(s));
MinimizationOperations.minimize(a);
a = BasicOperations.union(a, substitutionsOf(s));
MinimizationOperations.minimize(a);
return a;
}
COM: <s> return an automaton that accepts all 1 character insertions deletions and </s>
|
funcom_train/8607199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Item getSelfRezStone(Player player) {
Item item = null;
item = tryStone(161001001);
if (item == null)
item = tryStone(161000003);
if (item == null)
item = tryStone(161000004);
if (item == null)
item = tryStone(161000001);
return item;
}
COM: <s> stone use order determined by highest inventory slot </s>
|
funcom_train/28686322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short getSeg(byte index) {
switch (index) {
case 0:
return m_state.getES();
case 1:
return m_state.getCS();
case 2:
return m_state.getSS();
case 3:
return m_state.getDS();
case 4:
return m_state.getES();
case 5:
return m_state.getCS();
case 6:
return m_state.getSS();
case 7:
return m_state.getDS();
default:
throw new RuntimeException();
}
}
COM: <s> returns the value of the segment register whose index is given </s>
|
funcom_train/2582479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DefaultWindDataset)) {
return false;
}
DefaultWindDataset that = (DefaultWindDataset) obj;
if (!this.seriesKeys.equals(that.seriesKeys)) {
return false;
}
if (!this.allSeriesData.equals(that.allSeriesData)) {
return false;
}
return true;
}
COM: <s> checks this code wind dataset code for equality with an arbitrary </s>
|
funcom_train/7313355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
System.out.println("testEquals");
if(!(c1.equals(c2) && c1.equals(c7)))
fail("Same coins seen different");
if(c1.equals(c3) || c1.equals(c4) || c1.equals(c5) || c1.equals(c6))
fail("Different coins seen equal");
}
COM: <s> test of equals method of class nl </s>
|
funcom_train/19326566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean traitZIndexIsAuto(final FObj fobj, final FoContext context) {
final PdZIndex property = (PdZIndex) getProperty(FoProperty.Z_INDEX);
if (property != null) {
return property.getValueIsAuto(context, fobj);
}
return PdZIndex.getValueIsAutoNoInstance();
}
COM: <s> indicates whether the z index property value is auto </s>
|
funcom_train/9277828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validTable(String[][] expected, String tableName) throws SQLException {
String sql = getSelectSql(tableName);
Statement st = createStatement();
ResultSet rs = st.executeQuery(sql);
JDBC.assertFullResultSet(rs, expected);
st.close();
}
COM: <s> valid content in defined table </s>
|
funcom_train/35152311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeConv(File fileProperties) throws JWNLException {
try {
readEWNParamsConv(new FileInputStream(fileProperties));
//JWNL.initialize(new FileInputStream(fileProperties));
} catch (Exception ex) {
throw new JWNLException("JWNL_EXCEPTION_002", ex);
}
}
COM: <s> this method prepare the structures that will be used during the </s>
|
funcom_train/25291628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getReverbOrder() {
if (!this.getCapability(ALLOW_REVERB_ORDER_READ))
if (isLiveOrCompiled())
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes9"));
return ((AuralAttributesRetained)this.retained).getReverbOrder();
}
COM: <s> retrieve reverberation order </s>
|
funcom_train/23013577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRawOutput() {
String action;
switch(state) {
case Connecting:
action = "Connection in progress...";
break;
case Error:
action = "Error";
break;
case Done:
action = "Done";
break;
case Idle:
action = "Idle";
break;
default:
action = "Something";
break;
}
return action + " (" + status + ")";
}
COM: <s> returns the current status of whatever this is attached to </s>
|
funcom_train/51819508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnWidth(){
int usableWidth = page.getWidth()-getLeftMargin().intValue()-getRightMargin().intValue()-((getColumnsPerPage().intValue()-1)*getColumnSpace().intValue());
return usableWidth / getColumnsPerPage().intValue();
}
COM: <s> gives the printable width between the page margins that also considers the br </s>
|
funcom_train/35562222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String formatLog(LogRecord record) {
String message =
record.getSourceClassName()
+ " "
+ record.getSourceMethodName()
+ ": "
+ record.getMessage();
return formatLog(record.getMillis(), record.getLevel().getName(), message);
}
COM: <s> formats the log </s>
|
funcom_train/40866321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURL(String uri, boolean secure) {
final StringBuffer url = new StringBuffer();
url.append(!secure ? "http://" : "https://");
url.append(request.getServerName());
if( (!secure && port != 80) || ( secure && securePort != 443) ) {
url.append(':');
url.append(secure ? securePort : port);
}
url.append(uri);
return encodeURL(url.toString());
}
COM: <s> returns a fully qualified url for the given uri </s>
|
funcom_train/48210776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fixMappingNewChildInParent(SQLColumn col) {
if (!getParent().isMagicEnabled()){
logger.debug("Magic disabled; not fixing mapping for " + col);
return;
}
try {
if (col.isPrimaryKey()) {
ensureInMapping(col);
} else {
ensureNotInMapping(col);
}
} catch (SQLObjectException ex) {
logger.warn("Couldn't add/remove mapped FK columns", ex);
}
}
COM: <s> when a child is added to the parent table this method must be </s>
|
funcom_train/3925184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getInterfaceTypeStr( int itype ) {
if ( itype == field ) {
return( "field" );
} else if ( itype == exposedField ) {
return( "exposedField" );
} else if ( itype == eventIn ) {
return( "eventIn" );
} else if ( itype == eventOut ) {
return( "eventOut" );
} else {
return( "unknown interface type" );
}
}
COM: <s> convert an interface type constant into a string </s>
|
funcom_train/2500220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
GridLayout gridLayout = new GridLayout();
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = GridData.CENTER;
this.setLayout(gridLayout);
this.setSize(new Point(476, 200));
}
COM: <s> this method initializes this </s>
|
funcom_train/7681860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() {
// Protect against null-pointer exceptions
if (mPopup != null) {
mPopup.dismiss();
}
Handler handler = getHandler();
if (handler != null) {
handler.removeCallbacks(mDismissPopup);
}
// Turn off redraw
mRemeasure = false;
mRedrawScreen = false;
}
COM: <s> cleanup the pop up </s>
|
funcom_train/7295662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReplacer(int ch) {
// Note that we cannot use data.lookup() because the
// set array has not been constructed yet.
int i = ch - data.variablesBase;
if (i >= 0 && i < variablesVector.size()) {
return variablesVector.elementAt(i) instanceof UnicodeReplacer;
}
return true;
}
COM: <s> return true if the given character is a replacer standin or a plain </s>
|
funcom_train/36463018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
// we can do a simple 'request/response'
// invocation here in our separated thread
DaiosOutputMessage output =
requestResponseInvocation(input);
if(interceptor != null)
interceptor.finishedInvocation("SOAP", "callback",
input, NativeServiceInvoker.this, output);
// notify the callback listener
callback.onComplete(output);
} catch (Exception e) {
log.severe("There was an error while executing your request.");
e.printStackTrace();
callback.onError(e);
}
}
COM: <s> run the thread </s>
|
funcom_train/4506579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void imagesChanged() {
// Note: The update to the DB is useless except for updating the last modified date though
// the actual modification took place in another table. But we could say that images are
// an internal component of this object. :) The last modified date will be sent in the
// broadcasted presence
if (updateWorkgroup()) {
broadcastPresence();
}
}
COM: <s> notification message that the some images of the workgroup has changed </s>
|
funcom_train/3869417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseInternalFrame add(DesktopListener dListener, String title, ImageIcon icon, JPanel frameContents, boolean isClosable, int x, int y) {
BaseInternalFrame f = new BaseInternalFrame(title, icon, frameContents, isClosable);
f.addComponentListener(dListener);
f.addInternalFrameListener(dListener);
initAndAddFrame(f, x, y);
return f;
}
COM: <s> creates a base internal frame and adds it to the virtual desktop </s>
|
funcom_train/43899781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
originallyIndexedCoverage = GridCoverageExamples.getExample(0);
indexedCoverage = GridCoverageExamples.getExample(2);
indexedCoverageWithTransparency = GridCoverageExamples.getExample(3);
floatCoverage = GridCoverageExamples.getExample(4);
}
COM: <s> set up common objects used for all tests </s>
|
funcom_train/40403799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("TargetingIdeaServiceInterfacePort".equals(portName)) {
setTargetingIdeaServiceInterfacePortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/39563649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void store(String smid, Workspace ws) {
// TTL strategy to be implemented here
logger.debug("Storing proxy in cache, SMID: " + smid);
ProxyObject proxyObject = new ProxyObject(ws, new Date().getTime());
getCache().put(smid, proxyObject);
}
COM: <s> stores the proxy to the cache </s>
|
funcom_train/38957633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInZaehlrichtungPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Signal_inZaehlrichtung_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Signal_inZaehlrichtung_feature", "_UI_Signal_type"),
ModelrailwayPackage.Literals.SIGNAL__IN_ZAEHLRICHTUNG,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the in zaehlrichtung feature </s>
|
funcom_train/37823287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeSuccessors() {
// remember top queue and its owner for undo
removedFinishedNodes = algo.getStack().getFinished();
removedQueueOwner = algo.getStack().getOwner();
// remove top queue and set its owner finished
algo.getStack().removeTopQueueAndFinishOwner();
// update status map
algo.getStatusPerNode().put(removedQueueOwner, NodeStatus.FINISHED);
algo.setCurrentNode(removedQueueOwner);
topQueueRemoved = true;
}
COM: <s> removes the top queue and sets its owner em finished em </s>
|
funcom_train/38629071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAxes () {
addAxis("x", 1, true);
addAxis("y", 2, true);
addAxis("throttle", 3, false);
getAxis("y").setReversed(true);
} // addAxes()
COM: <s> adds and names the axes for this type of joystick </s>
|
funcom_train/46837135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldExample() {
if (jTextFieldExample == null) {
jTextFieldExample = new JTextField();
jTextFieldExample.setBounds(new java.awt.Rectangle(5, 110, 120, 22));
jTextFieldExample.setText("Textfield");
}
return jTextFieldExample;
}
COM: <s> this method initializes j text field example </s>
|
funcom_train/7990996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class Util {
private static UserServiceAsync instance;
public static UserServiceAsync getInstance(){
if (instance == null) {
instance = (UserServiceAsync) GWT.create(UserService.class);
ServiceDefTarget target = (ServiceDefTarget) instance;
target.setServiceEntryPoint(GWT.getModuleBaseURL() + "rpc/UserService");
target.setRpcRequestBuilder(new CSRFAwareRpcRequestBuilder());
}
return instance;
}
}
COM: <s> utility class for simplifying access to the instance of async service </s>
|
funcom_train/22261064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int handle_rnfr(String line, StringTokenizer st) {
if (checkLogin() && checkWrite()) {
String filename = line.substring(5);
File file = new File(createNativePath(filename));
if (!file.exists())
return sendReply(550, "\"" + filename + "\": already exists.");
rnfrFilename = filename;
return sendReply(350, "File exists, ready for destination name");
} else
return sendReply(530, "Please login with USER and PASS.");
}
COM: <s> handler for the rnfr command specify the file to be renamed </s>
|
funcom_train/14070436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws DataException {
try {
for (GroupVO g: getAllGroups()) {
primaryIndex.delete(g.getName());
}
}
catch (DatabaseException e) {
logger.log(Level.SEVERE,"Flushing groups",e);
throw new DataException("Unable to flush groups");
}
}
COM: <s> completely wipe all the group records </s>
|
funcom_train/41522695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(){
try {
if (conn == null){
conn = ConnectionPool.getInstance().getConnection();
} else {
logger.info("Please use ::start() only once! Using existing connection.");
}
} catch (SQLException sqlex){
logger.error("SQLException while getting connection: " + sqlex.getMessage());
}
}
COM: <s> use this method to open the connection to the database </s>
|
funcom_train/15686368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMyKeeper(int line) {
JPanel m_clTorwart;
constraints.gridx = 2;
constraints.gridy = line;
constraints.gridwidth = 1;
m_clTorwart = mainPanel.getMyTeam().getKeeperPanel();
m_clTorwart.setOpaque(false);
layout.setConstraints(m_clTorwart, constraints);
centerPanel.add(m_clTorwart);
}
COM: <s> sets a lineup line in the proper line on the grid bag grid </s>
|
funcom_train/31100417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createInternalLinkGoTo(String id, int objectNumber) {
IDNode node = (IDNode)idReferences.get(id); // retrieve id node
node.createInternalLinkGoTo(objectNumber); // create Internal Link GoTo object
return node.getInternalLinkGoToReference(); // return Internal Link Go To object reference
}
COM: <s> creates an internal link go to object for this id </s>
|
funcom_train/7532296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newMessage(Message message, Peer origin) {
String str="";
try {
str = new String(message.getData(), "ISO-8859-1");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
tv.append("Received message: " + str + " from " + origin.toString()+"\n");
Log.v("MyMessage", "Received message: " + str + " from " + origin.toString()+"\n");
}
COM: <s> implementation of the p2 plistener interface </s>
|
funcom_train/37805402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractFreetalkNode getSelectedNode() {
final TreePath selectedPath = selectionModel.getSelectionPath();
AbstractFreetalkNode node;
if (selectedPath != null) {
node = (AbstractFreetalkNode) selectedPath.getLastPathComponent();
} else {
// nothing selected? unbelievable! so select the root ...
node = getRoot();
selectionModel.setSelectionPath(new TreePath(node));
}
return node;
}
COM: <s> this method returns the last node of the first selected path </s>
|
funcom_train/49465715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String firstStandard() throws RaciException {
try {
return raciRulesFilter.firstFilterOn(inputRaci, RaciObjectType.STANDARD);
} catch (Exception e) {
RaciException eOut = new RaciException("An error occur whilst retrieving the first standard for a rule (e: "+e.getMessage()+")");
_logger.error(eOut);
throw eOut;
}
}
COM: <s> returns the first filter on standard </s>
|
funcom_train/20945968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws IOException, JMException {
// Registers the ScanManagerMXBean singleton in the
// platform MBeanServer
//
proxy = ScanManager.register();
// Registers a NotificationListener with the ScanManagerMXBean in
// order to receive state changed notifications.
//
((NotificationEmitter)proxy).addNotificationListener(listener,null,null);
}
COM: <s> initialize the application by registering a scan manager mxbean in </s>
|
funcom_train/33551837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QBool (String op, QBool first, QBool second) {
if (!(op.equals("and") || op.equals("or") || op.equals("nand") || op.equals("nor"))) {
throw new IllegalArgumentException(op + " is not a valid operator. Use 'and', 'or', 'nand', or 'nor'.");
}
this.op = op;
this.first = first;
this.second = second;
}
COM: <s> overloaded constructor for binary boolean operators or and nor nand </s>
|
funcom_train/34989820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMaxComboBoxModelDisplayWidth() {
int maxWidth = 0;
for (int i = 0; i < comboBox.getModel().getSize(); i++) {
int itemWidth = getDisplayWidth(comboBox.getModel().getElementAt(i));
maxWidth = Math.max(maxWidth, itemWidth);
}
return maxWidth;
}
COM: <s> gets the max display width in pixels of all entries in the </s>
|
funcom_train/15625869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLightSource(@NotNull final MapSquare<G, A, R> mapSquare) {
if (lightSources.isEmpty()) {
lightSources = new ArrayList<MapSquare<G, A, R>>();
}
notifyBeginChange();
try {
lightSources.add(mapSquare);
} finally {
notifyEndChange();
}
}
COM: <s> adds a light emitting game object that affects this map square </s>
|
funcom_train/17027336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void collectExternalNamespaces() {
Map<String, String> nsDefs = new HashMap<String, String>();
for(BPMNElement el : this.bpmnElements.values()) {
nsDefs.putAll(el.getExternalNamespaceDefinitions());
nsDefs.putAll(el.getNode().getExternalNamespaceDefinitions());
}
this.definitions.externalNSDefs = nsDefs;
}
COM: <s> collects the namespace definitions provided by xml elements from </s>
|
funcom_train/43267233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getToggleButton() {
if (toggleButton == null) {
toggleButton = new JToggleButton(listIcon);
toggleButton.setSelected(false);
/**
* ON click swap the editor. Selected means use the list, unselected
* means use the textfield
*/
toggleButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
update();
}
});
}
return toggleButton;
}
COM: <s> toggle which editor to use </s>
|
funcom_train/38589876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRadioGridAction(EnumGridAction radioGridAction) {
log.debug(radioGridAction);
EnumGridAction old = getRadioGridAction();
this.radioGridAction = radioGridAction;
this.firePropertyChange(MainModel.PROPERTY_RadioGridAction, old, this.radioGridAction );
refreshColRowPanel();
refreshRadioGridActionEnableContain();
refreshRadioGridActionEnableRange();
}
COM: <s> set type of compare action </s>
|
funcom_train/42422441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintLevelStart(){
Graphics2D g = (Graphics2D)strategy.getDrawGraphics();
Image image=null;
ImageCache ic = new ImageCache();
image=ic.getImage("backgroundImage"+/*level*/1+".png"); //TODO
g.drawImage(image, 0, 0, getWidth(), getHeight(), null, null);
g.setColor(Color.white);
g.setFont(new Font("Arial",Font.BOLD,40));
g.drawString("LEVEL "+level,Stage.WIDTH/2-60,Stage.HEIGHT/3);
g.drawString("Survive \n "+levelTime.get(level-1)+" seconds",Stage.WIDTH/2-200,(Stage.HEIGHT/3)*2);
strategy.show();
}
COM: <s> prints level number </s>
|
funcom_train/47906401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocused(boolean focused) {
super.setFocused(focused);
if (leftButton != null) {
leftButton.setFocused(focused);
} else {
if (rightButton != null) {
rightButton.setFocused(focused);
}
}
if (!focused) {
if (rightButton != null) {
rightButton.setFocused(focused);
}
}
}
COM: <s> sets the focused status of the title bar </s>
|
funcom_train/27820462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
// update the activation buffer in the Connections
//
Iterator itr = connections.iterator();
while (itr.hasNext()) {
Connection cnnt = (Connection) itr.next();
cnnt.update();
}
itr = nodes.values().iterator();
while (itr.hasNext()) {
Node node = (Node) itr.next();
node.update();
}
}
COM: <s> update the state of the network </s>
|
funcom_train/29685509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMetaInt(Class<? extends Directory> dirClass, int tagType) {
Directory dir = this.exif.getDirectory(dirClass);
if (dir == null || !dir.containsTag(tagType)) {
return -1;
}
try {
return dir.getInt(tagType);
} catch (MetadataException e) {
log.warn("Metadata exception getting Exif int type " + tagType
+" from Directory type " +dirClass.getName()
+ ": " + e.getMessage());
}
return -1;
}
COM: <s> get an exif integer value from an arbitrary exif directory </s>
|
funcom_train/2287025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String resource, Map parameters) {
if (m_completed) {
return;
}
if (m_redirectTarget == null) {
// Add only if not already redirected
m_elements.add(resource);
if (parameters == null) {
parameters = Collections.EMPTY_MAP;
}
m_elements.add(parameters);
m_byteSize += CmsMemoryMonitor.getMemorySize(resource);
}
}
COM: <s> add an include call target resource to this cache entry </s>
|
funcom_train/47636723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void swap(List<SparePart> list, int i, int j) {
SparePart temp = list.get(i);// temp SparePart on index "i".
list.set(i, list.get(j)); // Replaces SparePart on index "i" with
// SparePart on index "j".
list.set(j, temp);// Puts the temp SparePart to SparePart on index
// "j".
}
COM: <s> swaps spare part index i with spare part index j in the list </s>
|
funcom_train/43753161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AxisTable span(int rowSpan, int colSpan) {
checkTargettingTableCell();
FlexCellFormatter cf = getFlexCellFormatter();
cf.setRowSpan(targetRow, targetColumn, rowSpan);
cf.setColSpan(targetRow, targetColumn, colSpan);
return this;
}
COM: <s> changes target row span and col span for the target cell </s>
|
funcom_train/41593324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassCodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_POCDMT000040Material_classCode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_POCDMT000040Material_classCode_feature", "_UI_POCDMT000040Material_type"),
V3Package.eINSTANCE.getPOCDMT000040Material_ClassCode(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the class code feature </s>
|
funcom_train/42473198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getValuesAsString(NodeList nodeList){
StringBuffer buffer = new StringBuffer();
for ( int iii = 0, length = nodeList.getLength(); iii < length; iii++ ) {
String nodeValue = nodeList.item(iii).getNodeValue();
if( nodeValue!=null )
buffer.append(nodeValue);
}
return buffer.toString();
}
COM: <s> iterates over all the nodes and gets the values of the childnodes </s>
|
funcom_train/28297820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNrScores(TransSibGameState game) {
if (game!=null) {
if (game.getRulePoint()) return game.getRuleMax();
// if round based, get the maximum points that a player has
int max=game.getMaxPoints();
int factor=(int)(max/TransBaseSettings.stdPoints)+1;
return factor*TransBaseSettings.stdPoints;
}
return 0;
}
COM: <s> returns the number of scores that are drawn </s>
|
funcom_train/29267100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasicUpdate() {
Table table = getPrimaryKeyTable();
UpdateStatement updateStatement = table.getUpdateStatement();
SQLGenerator generator = getSQLGenerator();
generator.setLineTerminator("\n");
String s = generator.getQuery(updateStatement);
assertEquals("UPDATE MySchema.MyTable SET MyName=?, MyDate=? WHERE MyIndex=?", s);
}
COM: <s> p basic test for creating an code update code statement </s>
|
funcom_train/43431910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCyclePossible(orientationCycleTypes cycleType) {
boolean cyclePossible = false;
String newOrientation = "";
if (cycleType == orientationCycleTypes.ROTATE) {
newOrientation = orientation.getNextRotateOrientation();
} else if (cycleType == orientationCycleTypes.MIRROR) {
newOrientation = orientation.getNextMirrorOrientation();
}
if (newOrientation.equals(orientation.getOrientationId())) cyclePossible = false;
else {
if (isOrientationPossible(newOrientation)) cyclePossible = true;
}
return cyclePossible;
}
COM: <s> determines whether or not a particular cycle rotation or mirroring is possible based </s>
|
funcom_train/17396555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ThreadCallStack_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ThreadCallStack_id_feature", "_UI_ThreadCallStack_type"),
TracePackage.Literals.THREAD_CALL_STACK__ID,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/22020725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConnection(ConnectionElement conn) {
if (conn == null || conn.getSource() == conn.getEndPoint()) {
throw new IllegalArgumentException();
}
if (conn.getSource() == this) {
sourceConnections.add(conn);
firePropertyChange(SOURCE_CONNECTIONS_PROP, null, conn);
} else if (conn.getEndPoint() == this) {
targetConnections.add(conn);
firePropertyChange(TARGET_CONNECTIONS_PROP, null, conn);
}
}
COM: <s> add an incoming or outgoing connection to this shape </s>
|
funcom_train/46278934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveChanges() throws SOAPException {
if (mAttachments != null && 0 < mAttachments.getAttachmentCount()) {
try {
headers.setHeader("Content-Type",mAttachments.getContentType());
} catch (AxisFault af){
log.error(Messages.getMessage("exception00"), af);
}
}
saveRequired = false;
}
COM: <s> updates this code soapmessage code object with all the </s>
|
funcom_train/39314392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOk() {
System.out.println("testGetOk");
Frame f=new Frame("hello");
Text myText=new Text(f, true, 10, 10);
assertEquals(myText.getOk(),"Ok");
System.out.println(myText.getOk());
}
COM: <s> test of get ok method of class text </s>
|
funcom_train/32769386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Update upd) {
Update old = (Update)map_.get(upd.lname);
if (old != null) {
/* ###=> Should compare and figure out which is later. */
plasmid.Log.exception("UpdateSet.add(" + upd + ") old " + old);
}
map_.put(upd.lname, upd);
}
COM: <s> add the specified update to this update set </s>
|
funcom_train/5342644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeLimeXMLDocument(LimeXMLDocument toRemove) {
if( _limeXMLDocs.size() == 0 )
return false;
List newDocs = new ArrayList(_limeXMLDocs);
boolean removed = newDocs.remove(toRemove);
_limeXMLDocs = newDocs;
if(_license != null && toRemove.isLicenseAvailable())
_license = null;
return removed;
}
COM: <s> removes a lime xmldocument from the file desc </s>
|
funcom_train/12812905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void execStatement(Statement stmt, String query, boolean batch_mode) throws Exception {
if( !forced_mode ) {
if( batch_mode ) {
stmt.addBatch(query);
}
else {
stmt.executeUpdate(query);
}
}
else {
Database.get_connection().setAutoCommit(true);
try {
stmt.executeUpdate(query);
}
catch (Exception e) {
Messenger.printMsg(Messenger.WARNING, "SQL error (ignored in transaction in forced mode) " + e.getMessage());
}
}
}
COM: <s> wrap the statement execution according to the transaction mode </s>
|
funcom_train/5734523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPEGEncodeParam getJPEGEncodeParam() {
if(jpegEncodeParam == null) {
jpegEncodeParam = new JPEGEncodeParam();
jpegEncodeParam.setWriteTablesOnly(false);
jpegEncodeParam.setWriteImageOnly(true);
jpegEncodeParam.setWriteJFIFHeader(false);
}
return jpegEncodeParam;
}
COM: <s> retrieves the jpeg compression parameters </s>
|
funcom_train/44493361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertSelectFieldOptionValueEquals(final String fieldName, final String value) {
String msg = "assertSelectFieldOptionValueEquals: " + fieldName;
int assertLevel = AssertLevel.NO_LEVEL;
assertSelectFieldOptionValueEquals(msg, fieldName, value, assertLevel);
}
COM: <s> checks that the given select field has the provided value selected </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.