__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/39108856
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: final public boolean isSameDayAs(Date date) {
if (date == null) {
return false;
}
else {
LusidCalendar cal = new LusidCalendar();
cal.setTime(date);
return cal.get(ERA) == get(ERA) &&
cal.get(YEAR) == get(YEAR) &&
cal.get(DAY_OF_YEAR) == get(DAY_OF_YEAR);
}
}
COM: <s> returns true if the date is part of the same day as the </s>
|
funcom_train/2487810
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Boolean useSecurity() {
String templateValue = (String) getTemplateSettings().get(GragGenerator.TEMPLATE_USE_SECURITY);
if (templateValue == null || "false".equalsIgnoreCase(templateValue)) {
return new Boolean(false);
}
else {
return new Boolean(true);
}
}
COM: <s> check if the use security checkbox was checked to generate security </s>
|
funcom_train/18807693
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(final Object obj) {
if (obj != null) {
if (obj instanceof Week) {
final Week target = (Week) obj;
return ((this.week == target.getWeek()) && (this.year.equals(target.getYear())));
}
else {
return false;
}
}
else {
return false;
}
}
COM: <s> tests the equality of this week object to an arbitrary object </s>
|
funcom_train/17297659
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void invertScale(Point p) {
/* 1 - Recentering */
float nx = p.x - ((getWidth() / 2) * (1 - scale));
float ny = p.y - ((getHeight() / 2) * (1 - scale));
/* 2 - Scaling */
nx /= scale;
ny /= scale;
p.setLocation(nx, ny);
}
COM: <s> transforms a point coordinates accordingly to the view i scale i parameter invert </s>
|
funcom_train/45539831
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initializeFields() {
fLibraryBlock.setSelection(fVM);
fVMName.setText(fVM.getName());
File installLocation = fVM.getInstallLocation();
if (installLocation != null) {
fJRERoot.setText(installLocation.getAbsolutePath());
}
String vmArgs = fVM.getVMArgs();
if (vmArgs != null) {
fVMArgs.setText(vmArgs);
}
validateVMName();
validateJRELocation();
}
COM: <s> initialize the dialogs fields </s>
|
funcom_train/48858475
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void loadMessages() {
try {
String FOLDER = this.getParameter("folder");
if (FOLDER == null || FOLDER.equals("")) {
//
}else{
this.currentFolder = FOLDER;
this.currentMessageIndex = 0;
}
log.debug("Loading message from: "+ this.currentFolder);
this.messages = messageService.getConversationByOwner(this.getMember().getMemberId(), this.currentFolder,this.currentMessageIndex);
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> load the list of all messages </s>
|
funcom_train/3111367
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void mouseMoved(MouseEvent e) {
// Mouse moved is always called after highlighted so if we are on
// the object and we moved then say we're not ... if we still are
// it will happen again and again until we're not
if (stillOnObject) {
stillOnObject = false;
return;
}
// Turn it off
blinker.setBlinking(false, false);
}
COM: <s> tries to turn off the blinker </s>
|
funcom_train/136919
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void actionPerformed(ActionEvent evt) {
final Object src = evt.getSource();
if (src == this.serverPrefsB) {
// Go to server prefs tab.
if (PreferencesPanel.TAB_DATALOAD_PREFS != -1) {
PreferencesPanel pv = PreferencesPanel.getSingleton();
pv.setTab(PreferencesPanel.TAB_DATALOAD_PREFS); // Server preferences tab
JFrame f = pv.getFrame();
f.setVisible(true);
} else {
System.out.println("Data Load Preferences not instantiated");
}
}
}
COM: <s> handles clicking of server preferences button </s>
|
funcom_train/19155360
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testAxiom() {
IPatternRule[] rules = new IPatternRule[]{new ReplacementRule("f", "f+f")};
Axiom axiom = new Axiom("f", rules);
String result = axiom.permutate();
Assert.assertEquals("Axiom is rendering wrong on 1 permutation", result, "f+f");
}
COM: <s> simple tests to see if the axiom class is working </s>
|
funcom_train/198404
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Element getXMLElementForObject(Document d) {
Element e = d.createElement(getClass().getName());
e.setAttribute("x1", java.lang.Double.toString(x1));
e.setAttribute("y1", java.lang.Double.toString(y1));
e.setAttribute("x2", java.lang.Double.toString(x2));
e.setAttribute("y2", java.lang.Double.toString(y2));
return e;
}
COM: <s> returns a w3 c dom element with the attributes of this grid line </s>
|
funcom_train/42528566
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addDomainNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Direction_domainName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Direction_domainName_feature", "_UI_Direction_type"),
QvtcoredirectionPackage.Literals.DIRECTION__DOMAIN_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the domain name feature </s>
|
funcom_train/1546366
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double estimateError(final double[] scale) {
double error = 0;
if (currentDegree >= 5) {
for (int i = 0; i < scale.length; ++i) {
final double e = polynoms[currentDegree][i] / scale[i];
error += e * e;
}
error = FastMath.sqrt(error / scale.length) * errfac[currentDegree - 5];
}
return error;
}
COM: <s> estimate interpolation error </s>
|
funcom_train/14609804
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void dragFinished(DragSourceEvent event) {
if (!event.doit)
return;
//if the gadget was moved, remove it from the source viewer
if (event.detail == DND.DROP_MOVE) {
IStructuredSelection selection = (IStructuredSelection) viewer
.getSelection();
for (Iterator it = selection.iterator(); it.hasNext();) {
((ArchiveEntryAdaptor) it.next()).setParent(null);
}
viewer.refresh();
}
}
COM: <s> method declared on drag source listener </s>
|
funcom_train/23827484
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void checkSystem() {
checked(Category.COMPUTER, new StringBuffer("Running on system ")
.append(System.getProperty("os.name")).toString());
checked(Category.COMPUTER, new StringBuffer("Using java version ")
.append(System.getProperty("java.version")).toString());
checked(Category.COMPUTER, new StringBuffer("Using java home ").append(
System.getProperty("java.home")).toString());
}
COM: <s> check common properties </s>
|
funcom_train/513715
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int sendReply(int sendReplyCode, String sendReplyText) {
// Write a sendReply line to the PrintWriter and return the sendReply code
/*if (sendReplyText.endsWith("\n")) {
sendReplyText = sendReplyText.substring(0, sendReplyText.length() -1);
}*/
output.println(sendReplyCode + " " + sendReplyText);
return sendReplyCode;
}
COM: <s> used to send a send reply code and a send reply text </s>
|
funcom_train/31090210
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public WebResponse submit( SubmitButton button, int x, int y ) throws IOException, SAXException {
WebResponse result=null;
if (button == null) throw new IllegalSubmitButtonException( "?", "?" );
button.doOnClickSequence(x, y);
result=getCurrentFrameContents();
return result;
}
COM: <s> submits this form using the web client from which it was originally obtained </s>
|
funcom_train/49050792
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeAltToVisualAudioDescription(String inPrimaryURI) {
String audioDescription = getAltToVisualAudioDescLang(inPrimaryURI);
if (audioDescription != null) {
EquivalentType equiv = getEquivalentFor(inPrimaryURI);
JAXBPath.deleteJaxbObject ("/Content/AlternativesToVisual/AudioDescription", equiv);
}
}
COM: <s> remove the audio description element from the alt to visual metadata </s>
|
funcom_train/28955122
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setShemaFile(File shemaFile) {
if (shemaFile == null) throw new NullPointerException();
try {
logger.debug("PluginShema: " + shemaFile.getAbsolutePath());
SchemaFactory factory = SchemaFactory
.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
this.schema = factory.newSchema(shemaFile);
}
catch (Exception e) {
logger.fatal("wrong shemafile: " + shemaFile.getAbsolutePath());
this.schema = null;
}
}
COM: <s> sets the code file code containing the schema to load plugins </s>
|
funcom_train/23890375
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testConnectWithPublicKey() throws Exception {
log.trace("testConnectWithPublicKey()");
ConnectionFactory factory = newFactory();
if (!factory.isFeatureSupported(Features.AUTH_PUBLICKEY)) {
log.warn("Connection factory " + factory + " doesn't support '"
+ Features.AUTH_PUBLICKEY + "' feature");
return;
}
AuthenticationOptions authOptions = new PublicKeyAuthenticationOptions(
user, publickeyfile, publickeyphase);
testConnect(factory, authOptions);
}
COM: <s> test that it is possible to connect to test host using public key </s>
|
funcom_train/12145445
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected String getTranslatorTitle( Element theTranslation) {
String title = null;
//children should include one SAM:translation element
Element translator = theTranslation.getChild("translatorused", Namespace.getNamespace("SAM", SAM));
title = translator.getAttributeValue("title", Namespace.getNamespace("xlink", XLINK));
return title;
}
COM: <s> gets the translator title attribute of the samelnpage display object </s>
|
funcom_train/32635897
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void shutdown() {
// Shut down the science application.
SysLogger.println("Spot Check Thread: Shutting down Science Application.");
SpotCheckLogger.println("Spot Check Thread: Shutting down Science Application.");
System.out.println("Spot Check Thread: Shutting down Science Application.");
shutdownScienceApplication();
SysLogger.println("Spot Check Thread: Science Application Halted.");
SpotCheckLogger.println("Spot Check Thread: Science Application Halted.");
System.out.println("Spot Check Thread: Science Application Halted.");
// Interrupt the SpotCheckThread.
this.interrupt();
}
COM: <s> shuts down the spot check thread </s>
|
funcom_train/5012528
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void handleBegin(final Shell shell, final UpdateIndexEvent event) {
try {
if (helper.confirm(shell, "index.eventbegin",
event.getSource().getLocation())) {
return;
} else {
throw new AbortException(shell, this);
}
} catch (final IOException iox) {
throw new AbortException(shell, this, iox);
}
}
COM: <s> handle the begin index event </s>
|
funcom_train/2287107
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void clearOfflineEntries() {
if (!isEnabled()) {
return;
}
if (LOG.isInfoEnabled()) {
LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_OFFLINE_ENTRIES_0));
}
clearAccordingToSuffix(CACHE_OFFLINESUFFIX, true);
}
COM: <s> clears all entries from offline projects in the cache </s>
|
funcom_train/21850097
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ImageIcon loadImage(String imageName) {
try {
if (imageName != null)
imageName = imageName.replace('\\', '/');
ResourceLoader loader = (ResourceLoader) JETARegistry
.lookup(ResourceLoader.COMPONENT_ID);
return loader.loadImage(imageName);
} catch (Exception e) {
System.out.println("Error loading image: " + imageName);
e.printStackTrace();
return null;
}
}
COM: <s> utility method that loads an image from the classpath </s>
|
funcom_train/4742072
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setProperties(String username, String password, String cloudName) {
properties = new HashMap<String, Object>();
properties.put("username", username);
properties.put("password", password);
properties.put("cloudName", cloudName);
setRequiredRole(Role.SUPERADMIN);
}
COM: <s> sets the properties of the action it must be executed before the call </s>
|
funcom_train/1012668
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setColor(Color color) throws GLException {
// Get color's RGBA components as floats in the range [0,1].
if (compArray == null) {
compArray = new float[4];
}
color.getRGBComponents(compArray);
setColor(compArray[0], compArray[1], compArray[2], compArray[3]);
}
COM: <s> changes the current color of this texture renderer to the </s>
|
funcom_train/265858
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void drawStringRightAligned(Graphics2D g2, Font f, String s, float x, float y) {
FontRenderContext frc=g2.getFontRenderContext();
float width=(float)f.getStringBounds(s,frc).getWidth();
g2.drawString(s,x-width-CELLPADY,y);
}
COM: <s> draws a string right aligned at x y </s>
|
funcom_train/39382990
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void clear() {
if(DEBUG)
logger.debug("entering clear()");
DefaultTableModel model = (DefaultTableModel)table.getModel();
while(model.getRowCount() > 0)
model.removeRow(0);
if(DEBUG)
logger.debug("exiting clear()");
}
COM: <s> clears the content of the table </s>
|
funcom_train/35192786
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void stopServer() {
if(clients.size() != 0) {
disconnectClients();
}
if (writer != null)
writer.close(); //close the stream
try {
} finally { //close the sockets
try {
if (client != null)
client.close();
if (serverSocket != null)
serverSocket.close();
writer = null;
client = null;
serverSocket = null;
gui.prtMessage("<<< SERVER IS STOPPED >>>");
} catch (IOException e) {
gui.setWarnings("Error in closing sockets!", 1);
}
}
}
COM: <s> disconnects any clients and closes the streams </s>
|
funcom_train/5358557
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Pair expand(Scheme interpreter, Pair oldPair, Object args) {
Object expansion = apply(interpreter, args);
if (expansion instanceof Pair) {
oldPair.first = ((Pair)expansion).first;
oldPair.rest = ((Pair)expansion).rest;
} else {
oldPair.first = "begin";
oldPair.rest = cons(expansion, null);
}
return oldPair;
}
COM: <s> replace the old cons cell with the macro expansion and return it </s>
|
funcom_train/33512262
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int readGamma() {
int result = 0;
int unaryPart = readUnary();
int binaryPart = 0;
for (int i=0; i<unaryPart-1; i++) {
if ((inBuffer[(int)byteOffset] & (1 << (bitOffset))) != 0)
binaryPart = binaryPart + (1 << i);
readBitOffset++;
bitOffset++;
if (bitOffset == 8) {
bitOffset = 0;
byteOffset++;
}
}
result = binaryPart + (1 << (unaryPart-1));
return result;
}
COM: <s> reads and decodes a gamma encoded integer from the already read buffer </s>
|
funcom_train/1715900
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object put(Object key, Object value) {
Object oldValue = super.put(key, value);
// at deserialization lowerToRealCase is null
if (oldValue == null && lowerToRealCase != null) {
Object oldKey = lowerToRealCase.put(((String) key).toLowerCase(), key);
if (oldKey != null && !oldKey.equals(key)) {
return super.remove(oldKey);
} else {
return null;
}
}
return oldValue;
}
COM: <s> puts the key value pair in the hashtable </s>
|
funcom_train/20636944
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JRadioButton getTabRightRbn() {
if (rbnTabRight == null) {
rbnTabRight = new JRadioButton("Right Tabbed Pane", true);
rbnTabRight.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
actionPerformed_rbnTabRight(e);
}
});
}
return rbnTabRight;
}
COM: <s> get right tabbed pane radio button </s>
|
funcom_train/41385669
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JButton getBtGenerarPDF() {
if (btGenerarPDF == null) {
btGenerarPDF = new JButton();
btGenerarPDF.setText("Generar PDF");
btGenerarPDF.setBounds(new Rectangle(10, 5, 150, 30));
btGenerarPDF.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
listener.actionPerformed(e);
} });
}
return btGenerarPDF;
}
COM: <s> this method initializes bt generar pdf </s>
|
funcom_train/25028254
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void textSelection(TextPad t, int offset, int start, int end) {
if (end != -1 && start != end) {
t.setCaretPositionTop(offset + start);
t.moveCaretPosition(offset + end);
t.getCaret().setSelectionVisible(true);
// to ensure selection visibility
} else {
t.setCaretPositionTop(offset + start);
}
}
COM: <s> selects the given region of text </s>
|
funcom_train/46824534
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int cellsOwned(int seatNum) {
int count = 0;
for (int c = 0; c < this.cols; c++) {
for (int r = 0; r < this.rows; r++) {
if (this.data[c][r] != null && this.data[c][r].getOwnedBy() == seatNum)
count++;
}
}
return count;
}
COM: <s> get number of cells owned by seat number </s>
|
funcom_train/21343816
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void playInterval(int note, int interval) {
if (isFirst) {
return;
}
if (opts.ascn) {
notes.playNotes(new Note[] {notes.notes[note], notes.notes[note + interval]}, r.nextInt(500) + 200);
}
if (opts.descn) {
notes.playNotes(new Note[] {notes.notes[note + interval], notes.notes[note]}, r.nextInt(500) + 200);
}
}
COM: <s> plays interval by playing two given pitches in succession </s>
|
funcom_train/3341169
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object getFragmentListKey() {
final StringBuilder b = new StringBuilder();
b.append(identification);
b.append('-');
b.append(protocol);
b.append('-');
b.append(srcAddress);
b.append('-');
b.append(dstAddress);
return b.toString();
}
COM: <s> gets the key used to find the correct fragment list </s>
|
funcom_train/4924598
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testServiceNoMapping() throws Throwable {
// No mapping
this.mapping = null;
// Record servicing (with no mapping)
this.record_service(true);
// Test
this.replayMockObjects();
this.task.doTask(this.taskContext);
this.verifyMockObjects();
// Ensure service is initialised only once in servicing
assertEquals("Should only be initialised once", 1,
this.servlet.initCount);
assertTrue("HttpServlet should service", this.servlet.isServiceInvoked);
}
COM: <s> ensure can have no </s>
|
funcom_train/45260166
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public JSeparator getJSeparatorDCMutM14() {
if (jSeparatorDCMutM14 == null) {
jSeparatorDCMutM14 = new JSeparator();
jSeparatorDCMutM14.setLocation(new Point(251, 238));
jSeparatorDCMutM14.setOrientation(SwingConstants.VERTICAL);
jSeparatorDCMutM14.setSize(new Dimension(10, 26));
}
return jSeparatorDCMutM14;
}
COM: <s> this method initializes j separator dcmut m14 </s>
|
funcom_train/22435180
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run(IAction action) {
/*MessageDialog.openInformation(
window.getShell(),
"Gexpert GUI",
"Hello, Eclipse world");*/
try {
window.getActivePage().showView("cl.gexpert.gui.views.SampleView");
//window.getActivePage().showView("cl.gexpert.gui.views.SampleView2");
} catch (PartInitException e) {
e.printStackTrace();
}
}
COM: <s> the action has been activated </s>
|
funcom_train/6407678
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void performAction(InputActionEvent evt) {
node.getLocalRotation().getRotationColumn(0, tempV);
tempV.normalizeLocal();
incr.fromAngleNormalAxis(speed * evt.getTime(), tempV);
node.getLocalRotation().fromRotationMatrix(
incr.mult(node.getLocalRotation().toRotationMatrix(tempMa),
tempMb));
node.getLocalRotation().normalize();
}
COM: <s> code perform action code rotates the node towards the nodes </s>
|
funcom_train/9437090
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: static private long getDefaultAccountWhere(Context context, String where) {
Cursor cursor = context.getContentResolver().query(CONTENT_URI,
DEFAULT_ID_PROJECTION,
where, null, null);
try {
if (cursor.moveToFirst()) {
return cursor.getLong(0); // column 0 is id
}
} finally {
cursor.close();
}
return -1;
}
COM: <s> helper method for finding the default account </s>
|
funcom_train/9674685
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setGlobalActionHandlers(IActionBars actionBars) {
//XXX comprobar todas las acciones globales
actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteAction);
actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
}
COM: <s> sets the global action handlers </s>
|
funcom_train/44286618
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void update(FactorySession session) {
this.updatedBy = session.getOperatorName();
this.updated = new Date();
if (this.createdBy == null)
this.createdBy = this.updatedBy;
if (this.created == null)
this.created = this.updated;
++revision;
}
COM: <s> update last modified information </s>
|
funcom_train/28211943
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JTextField getJTFvmName() {
if (jTFvmName == null) {
jTFvmName = new JTextField();
jTFvmName.setPreferredSize(new Dimension(221, 19));
jTFvmName.setBounds(new Rectangle(71, 25, 221, 15));
}
return jTFvmName;
}
COM: <s> this method initializes j tfvm name </s>
|
funcom_train/43879463
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int estimateMultiPoint(MultiPoint geom) {
// int size
int result = 4;
if (geom.getNumGeometries() > 0) {
// We can shortcut here, compared to estimateGeometryArray, as all
// subgeoms have the same fixed size
result += geom.getNumGeometries() * estimateBytes(geom.getGeometryN(0));
}
return result;
}
COM: <s> estimate an array of fat points </s>
|
funcom_train/50850000
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void drawOrbitCircles(GL gl) {
gl.glDisable(GL.GL_TEXTURE_2D);
JoglibMaterial.setMaterialLighting(gl, JoglibMaterial.SILVER);
for (int pos = 1; pos < 10; pos++) {
drawCircle(gl, (float) (pos * 1));
}
gl.glEnable(GL.GL_TEXTURE_2D);
}
COM: <s> draws an orbit </s>
|
funcom_train/33943172
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public T getExistingDataSet(T dataset) {
// Search the list for an existing data set and return it
ArrayList<T> undeletedDatasets = getActiveDatasets();
for (T testdataset : undeletedDatasets) {
if (((UniDataSet) testdataset).isTheSameAs((UniDataSet) dataset)) { return testdataset; }
}
// nothing found
return null;
}
COM: <s> get an existing data set </s>
|
funcom_train/25333043
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testToString() {
DBSpecies instance = new DBSpecies();
assertTrue(instance.toString().equals(" () "));
instance.setCommonName("bob");
instance.setSpeciesBinomial("Nob bob");
assertTrue(instance.toString().equals("bob (Nob bob) "));
}
COM: <s> test of to string method of class dbspecies </s>
|
funcom_train/36989157
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addConverter(Class targetClass, Class converterClass) {
if (!Converter.class.isAssignableFrom(converterClass)) {
String msg =
"The class <"
+ converterClass.getName()
+ " specified for converter targetClass <"
+ targetClass.getName()
+ "> is not a javax.faces.converter.Converter !";
throw new InternalServerException(msg);
}
converterClassByTargetClass.put(targetClass, converterClass);
}
COM: <s> registers a converter with a target class </s>
|
funcom_train/31157040
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void nextState(int state) {
if (state == 0) {
player.decreaseGold(500 * player.getLookingFor().size());
game.setCurrentState(LOOKING_FOR_INFO);
} else if (state == 1) {
game.setCurrentState(ROWDY_CREW);
} else {
log.fatal("Unknown option: " + state);
System.exit(1);
}
}
COM: <s> goes to the next state </s>
|
funcom_train/37263912
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(final ModuleInfo aInfo) {
if (this.name != null &&
this.version != null) {
return this.name.equals(aInfo.name) &&
this.version.equals(aInfo.version);
} else {
logger.warning("Equality check for ModuleInfo failed for: \n" + this + "\n" + aInfo);
return false;
}
}
COM: <s> equality check based on the module name and version </s>
|
funcom_train/40871129
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
StringBuffer buffer = new StringBuffer();
String EOL = "\n";
buffer.append("ResourceInfo[");
buffer.append("resourceName = ").append(resourceName).append(EOL);
buffer.append("resourceCurrentUsage = ").append(resourceCurrentUsage)
.append(EOL);
buffer.append("price = ").append(price).append(EOL);
buffer.append("requiredUsage = ").append(requiredUsage).append(EOL);
buffer.append("]");
return buffer.toString();
}
COM: <s> to string method creates a string representation of the object </s>
|
funcom_train/48561398
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getCancelCommand5() {
if (cancelCommand5 == null) {//GEN-END:|454-getter|0|454-preInit
// write pre-init user code here
cancelCommand5 = new Command("\u041E\u0442\u043C\u0435\u043D\u0430", Command.CANCEL, 0);//GEN-LINE:|454-getter|1|454-postInit
// write post-init user code here
}//GEN-BEGIN:|454-getter|2|
return cancelCommand5;
}
COM: <s> returns an initiliazed instance of cancel command5 component </s>
|
funcom_train/7788520
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private TreeNode find(Comparable<Comparable<?>> element, TreeNode node) {
while (node != null) {
if (element.compareTo(node.getNodeElement()) < 0)
node = node.getLeftNode();
else if (element.compareTo(node.getNodeElement()) > 0)
node = node.getRightNode();
else
return node;
}
return null;
}
COM: <s> finds an item in a subtree </s>
|
funcom_train/21940642
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Field76 getField76() {
if (getSwiftMessage() == null) {
throw new IllegalStateException("SwiftMessage was not initialized");
}
if (getSwiftMessage().getBlock4() == null) {
log.info("block4 is null");
return null;
} else {
final Tag t = getSwiftMessage().getBlock4().getTagByName("76");
if (t == null) {
log.fine("field 76 not found");
return null;
} else {
return new Field76(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 76 </s>
|
funcom_train/41265730
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void logoffAccounts() throws ProtocolException {
for( int i = 0; i < this.accounts.size(); i++ ) {
BaseProtocol protocol = this.accounts.get( i ).getProtocol();
if( protocol != null && this.accounts.get( i ).isActive() && protocol.proto_isConnected() ) {
protocol.proto_logoff();
protocol.proto_disconnect();
}
}
ImRoster.getInstance().clearRoster();
}
COM: <s> logs off all enabled accounts </s>
|
funcom_train/20772693
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: synchronized public void setEventBufferLength (int eventBufferLength){
if ( eventBufferLength < 2 ){
eventBufferLength = 2;
} else if ( eventBufferLength > 1000 ){
eventBufferLength = 1000;
}
this.eventBufferLength = eventBufferLength;
getPrefs().putInt("MultiLineClusterTracker.eventBufferLength",eventBufferLength);
initBuffers();
}
COM: <s> sets tne number of events to consider for forming line segments for clustering </s>
|
funcom_train/21030662
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: final AsyncCallback<Boolean> callbackIsValidFolder = new AsyncCallback<Boolean>() {
public void onSuccess(Boolean result){
if (result.booleanValue()) {
// Opens document passed by parameter
Main.get().activeFolderTree.openAllPathFolder(Main.get().userHome.getHomePath(),"");
}
}
public void onFailure(Throwable caught) {
Main.get().showError("isValid", caught);
}
};
COM: <s> call back opens folder passed by url param </s>
|
funcom_train/12159329
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testInlineStyleMatcherMatches() {
MatcherContextMock matcherContextMock = new MatcherContextMock(
"MatcherContext", expectations);
matcherContextMock.expects.getElementId().returns(10);
InlineStyleMatcher matcher = new InlineStyleMatcher(10);
MatcherResult matcherResult =
matcher.matchesWithinContext(matcherContextMock);
assertEquals("MatcherResult should be MATCHED",
MatcherResult.MATCHED, matcherResult);
}
COM: <s> test the inline style matcher matches on elements with the same id </s>
|
funcom_train/19905685
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void flushBlock() throws IOException{
if(debug){
System.err.println("TarBuffer.flushBlock() called.");
}
if(outStream == null){
throw new IOException("writing to an input buffer");
}
if(currRecIdx > 0){
writeBlock();
}
}
COM: <s> flush the current data block if it has any data in it </s>
|
funcom_train/12773358
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void computeTypeReference() throws InvalidClassFileException {
String className = "L" + reader.get().getName();
ImmutableByteArray name = ImmutableByteArray.make(className);
typeReference = TypeReference.findOrCreate(getClassLoader().getReference(), TypeName.findOrCreate(name));
}
COM: <s> initialize the type reference field for this instance </s>
|
funcom_train/36982237
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void instrument(JiapiMethod m) throws InstrumentationException {
log.debug("Instrumenting " + m.getDeclaringClass().getName() + "#"
+ m);
HotSpotLocator hsl = new HotSpotLocator(m.getInstructionList());
HotSpot[] hsa = hsl.getHotSpots(hotSpots);
for (int i = 0; i < hsa.length; i++) {
HotSpot hs = hsa[i];
if (rule.match(hs.getName())) {
copyInstructions(hs);
}
}
}
COM: <s> instrument given method </s>
|
funcom_train/5260808
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addEffectsEnforcementLevelOfPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Tactic_effectsEnforcementLevelOf_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Tactic_effectsEnforcementLevelOf_feature", "_UI_Tactic_type"),
BmmPackage.Literals.TACTIC__EFFECTS_ENFORCEMENT_LEVEL_OF,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the effects enforcement level of feature </s>
|
funcom_train/1239439
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setReturnClass(Class cls) {
if (operationSetManually) {
throw new RuntimeException(
Messages.getMessage("operationAlreadySet"));
}
if (operation == null)
operation = new OperationDesc();
operation.setReturnClass(cls);
TypeMapping tm = getTypeMapping();
operation.setReturnTypeQName(tm.getTypeQName(cls));
parmAndRetReq = true;
}
COM: <s> sets the desired return java class </s>
|
funcom_train/45317249
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public long getCurrentReadyTime() {
long t = 0;
if (!agent.isPaused() &&
!agent.isInCall() &&
!agent.isAcw() &&
!agent.isManual()) {
t = (Calendar.getInstance().getTime().getTime() - lastEventTimestamp.getTime()) / 1000;
}
return t;
}
COM: <s> returns current ready idle time in seconds </s>
|
funcom_train/51358640
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double minY() {
if (values == null || values.size() == 0) {
System.out.println("MAXY Error");
return -1;
}
double min = ((Point)values.elementAt(0)).y;
for (int i = 0; i < values.size(); i++) {
if (((Point)values.elementAt(i)).y < min) {
min = ((Point)values.elementAt(i)).y;
}
}
return min;
}
COM: <s> returns the smallest y value in the database </s>
|
funcom_train/9366799
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void destroyDrawingCache() {
if (mDrawingCache != null) {
final Bitmap bitmap = mDrawingCache.get();
if (bitmap != null) bitmap.recycle();
mDrawingCache = null;
}
if (mUnscaledDrawingCache != null) {
final Bitmap bitmap = mUnscaledDrawingCache.get();
if (bitmap != null) bitmap.recycle();
mUnscaledDrawingCache = null;
}
}
COM: <s> p frees the resources used by the drawing cache </s>
|
funcom_train/3160849
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void createFrameAssociates(BaseInternalFrame frame) {
BaseToggleButton button = null;
BaseRadioButtonMenuItem menuButton = null;
button = desktopResizableToolbar.add(frame.getTitle());
button.setAssociatedFrame(frame);
frame.setAssociatedButton(button);
if (dMenu != null) {
dMenu.add(frame);
}
if (desktopScrollpane.getAutoTile()) {
desktopScrollpane.tileInternalFrames();
}
}
COM: <s> creates the associated frame components ie toggle and menu items </s>
|
funcom_train/15811686
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Context doSIPrspProcess(Context context, SIPTransactionUser tu) {
SIPResponse sipRsp = (SIPResponse) context.getCurrentMessage()
.getFlatMessage().getMessage();
MaxForwardsHeader hdr = sipRsp.getMaxForwards();
if (hdr == null) {
/*
* There is no Max-Forwards header
*/
return null;
}
/*
* There is Max-Forwards header. Them remove it.
*/
sipRsp.removeHeader(MaxForwardsHeader.NAME);
return null;
}
COM: <s> the process for sip response message </s>
|
funcom_train/25841631
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Intent createExtendedPreferenceActivityIntent(Context context, String extPerm) {
return ExtendedPreferenceActivity.createActivityIntent(context, mApiKey, mApiSecret,
mSession.getSession(), mSession.getSecret(), mSession.getUid(), extPerm);
}
COM: <s> load up the extended perms activity so that we can authorized an extended </s>
|
funcom_train/51103455
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public List getCallOutParameters() {
List outParams = new ArrayList(callParameters.size());
Iterator it = callParameters.iterator();
while (it.hasNext()) {
ProcedureParameter param = (ProcedureParameter) it.next();
if (param.isOutParam()) {
outParams.add(param);
}
}
return outParams;
}
COM: <s> returns a list of out and inout call parameters </s>
|
funcom_train/3349370
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ByteBuffer getBytecode() {
final Object bytecode = this.bytecode;
if (bytecode instanceof ByteBuffer) {
return ((ByteBuffer) bytecode).duplicate();
} else {
final ByteBuffer buf = ByteBuffer.wrap((byte[]) bytecode);
if (VmUtils.isRunningVm()) {
this.bytecode = buf;
}
return buf.duplicate();
}
}
COM: <s> gets the actual bytecode </s>
|
funcom_train/29682611
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void pad(int number) {
// new bitset of length number
BitSet n = new BitSet(number);
for (int i = 0; i < length; i++) {
if (bits.get(i)) {
n.set(number + i);
} else {
n.clear(number + i);
}
}
length += number;
bits = n;
}
COM: <s> add a list of 0s to front of list </s>
|
funcom_train/10213564
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void write(String level, Object o) {
String msg = getMsg(level, o).toString();
if (usingSystemOut || context == null) {
System.out.println(msg);
} else if (usingSystemErr) {
System.err.println(msg);
} else {
context.log(msg);
}
}
COM: <s> handles writing of log lines </s>
|
funcom_train/23753728
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setPropertyValue(Object id, Object value) {
if(LOCATION_ID_X.equals(id)){
String newLocationX = (String)value;
Point origLocation = locationObserver.getLocation();
locationObserver.setLocation(origLocation.newX(Double.valueOf(newLocationX))) ;
}
else if(LOCATION_ID_Y.equals(id)){
String newLocationY = (String)value;
Point origLocation = locationObserver.getLocation();
locationObserver.setLocation(origLocation.newY(Double.valueOf(newLocationY))) ;
}
}
COM: <s> dimension not currently editable from the property sheet </s>
|
funcom_train/10816253
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void shutdown() {
// clean-up activities
// TODO: reclaim scope to free up resources. Currently
// this is not implemented and throws an exception
// hence, for now, we won't call it.
//
// pigContext.getExecutionEngine().reclaimScope(this.scope);
FileLocalizer.deleteTempFiles();
}
COM: <s> reclaims resources used by this instance of pig server </s>
|
funcom_train/11103624
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String create() {
State state = getState();
state.setHost(null);
state.setMode("CREATE");
if (log.isTraceEnabled()) {
log.trace("subscription(" + state.getMode() + "," + state.getHost() + ")");
}
return "subscription";
}
COM: <s> p create a new subscription </s>
|
funcom_train/37805268
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateTreeNode(final AbstractFreetalkNode board) {
if( board == null ) {
return;
}
// fire update for node
getTreeModel().nodeChanged(board);
// also update all parents
TreeNode parentFolder = board.getParent();
while (parentFolder != null) {
getTreeModel().nodeChanged(parentFolder);
parentFolder = parentFolder.getParent();
}
}
COM: <s> fires a node changed redraw for this board and updates buttons </s>
|
funcom_train/36359960
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Spacer getSpacer7() {
if (spacer7 == null) {//GEN-END:|73-getter|0|73-preInit
// write pre-init user code here
spacer7 = new Spacer(16, 1);//GEN-LINE:|73-getter|1|73-postInit
// write post-init user code here
}//GEN-BEGIN:|73-getter|2|
return spacer7;
}
COM: <s> returns an initiliazed instance of spacer7 component </s>
|
funcom_train/26336145
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeItem( String id, int amount ) {
GameItem item = this.getItem( id );
if( item != null ) {
if( item.getQuantity() <= amount ) {
this.contains.remove( (Object) item );
this.dispatchChange( item );
this.removeChar( item );
}
else
item.setQuantity( item.getQuantity() - amount );
}
}
COM: <s> remove some of game items by item id and quantity </s>
|
funcom_train/36192223
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(/*@ nullable @*/ Object oth) {
if (oth == null || !(oth instanceof JMLValueBagEnumerator)) {
return false;
} else {
JMLValueBagEnumerator<E> jb = (JMLValueBagEnumerator<E>) oth;
return this.abstractValue().equals(jb.abstractValue());
}
}
COM: <s> return true just when this enumerator has the same state as </s>
|
funcom_train/20514455
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void save(Paciente entity) {
LogUtil.log("saving Paciente instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved paciente entity </s>
|
funcom_train/9164727
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Script createScript(List<Long> parentIndexes, File scriptFile) {
Version version = createVersion(parentIndexes, scriptFile);
String scriptContent = textFrom( new FileSystemResource(scriptFile));
String preprocessedScriptContent = preprocess(scriptContent);
return new Script(scriptFile.getName(), preprocessedScriptContent, version);
}
COM: <s> creates a script object for the given script files </s>
|
funcom_train/26392025
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean save_text_area(File f) {
boolean result = false;
if (save_to_file(f, get_text_area().getText())) {
result = true;
}
else {
StockDialog.fileNotSaved(my_frame, f.getAbsolutePath());
}
return result;
}
COM: <s> save the text area to a file if possible </s>
|
funcom_train/27817452
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void add(BufferElement item) {
log.debug("Add BufferElement");
if (okayForAdding(item)) {
lowerLimit = item.getValueToOrderBy();
v.add(item);
}
log.debug("vector size now: " + v.size() + ", number not to return: " + amountNotToReturn);
clean();
}
COM: <s> adds a buffer element to the buffer </s>
|
funcom_train/26413263
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Vector getSelectedComponents() {
Vector sel = new Vector();
/* multiple components */
if( selectMode ) {
sel = (Vector) multipleSelected.clone();
}
/* ..even one? */
else if( selectedComponent != null ) {
sel.add( (Object) selectedComponent );
}
/* return list, can be empty */
return sel;
}
COM: <s> get a list vector of currently selected sound components </s>
|
funcom_train/40386276
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String redirectUrl(String url, String loginUrl) {
//redirect
String redirectUrl = null;
if (url != null) {
redirectUrl = loginUrl + "?returnPath=" + url;
} else {
redirectUrl = loginUrl;
}
logger.debug("redirecting to " + redirectUrl);
return redirectUrl;
}
COM: <s> gets the redirect url when its needed to reauthenticate </s>
|
funcom_train/26276662
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateTableModel() {
if (this._queueItemList.size() != this._oldSizeOfList) {
this.fireTableDataChanged();
} else {
this.fireTableRowsUpdated(0, this._queueItemList.size() - 1);
}
this._oldSizeOfList = this._queueItemList.size();
}
COM: <s> updates this table model </s>
|
funcom_train/25065035
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean hasDataAt(int startIndex) {
for (int i = startIndex; i < startIndex + getRowsPerPage(); i++) {
//_logger.debug("checking for data at row" + i);
if (_model.get(i) == null) {
return false;
}
}
return true;
}
COM: <s> the method checks if the entire page is cached in the model </s>
|
funcom_train/22473553
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean play(int frames) throws JavaLayerException {
boolean ret = true;
while (frames-- > 0 && ret) {
ret = decodeFrame();
}
if (!ret) {
// last frame, ensure all data flushed to the audio device.
AudioDevice out = audio;
if (out != null) {
out.flush();
synchronized (this) {
complete = (!closed);
close();
}
}
}
return ret;
}
COM: <s> plays a number of mpeg audio frames </s>
|
funcom_train/34559225
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void update(String url, UrlLoadConfig params, UrlLoadCallback callback, boolean discardUrl) {
if (params == null) {
params = new UrlLoadConfig();
}
params.setUrl(url);
update(jsObj, params.getJsObj(), callback, discardUrl);
}
COM: <s> performs an async request updating this element with the response </s>
|
funcom_train/3820405
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean canModify(User user) {
SecurityContext sctx = cat.getProject().getSecurityContext();
// 2. Check permissions
try {
sctx.check(user, sctx.getModifyContentPermission(ctype));
sctx.check(user, sctx.getModifyCategoryPermission(cat));
return true;
} catch (SCMException ex) {
return false;
}
}
COM: <s> check modify permissions for this content </s>
|
funcom_train/4521124
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void save(ConstanciaVotacion entity) {
LogUtil.log("saving ConstanciaVotacion instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved constancia votacion </s>
|
funcom_train/5855627
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Member getMember(Member[] members, String name, String descriptor) {
for (int i = 0, n = members.length; i < n; i++) {
Member m = members[i];
if (m.getName().equals(name)
&& m.getDescriptor().equals(descriptor))
{
return m;
}
}
return null;
}
COM: <s> return the member matching the given name and descriptor </s>
|
funcom_train/450706
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean hasCondition (Creature creature, String condition) {
//Loop through the creature's behaviors, looking for the given condition.
Iterator behaviors = creature.behaviorIterator();
while (behaviors.hasNext()) {
Behavior behavior = (Behavior) behaviors.next();
Iterator conditions = behavior.conditionIterator();
while (conditions.hasNext()) {
Class currentClass = conditions.next().getClass();
if (currentClass.getName().endsWith(condition)) {return true;}
}
}
return false;
}
COM: <s> check for a given condition type </s>
|
funcom_train/50208574
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void handleJavaTaskDrop(IFile ifile) throws JavaModelException {
IPath classPath = Flow4JPlugin.getClassPath(ifile);
if (classPath == null)
return;
classPath = classPath.removeFileExtension();
String fqcn = classPath.toString().replace('/', '.');
JavaTaskWrapper taskWrapper = new JavaTaskWrapper();
try {
taskWrapper.getTaskFlowletInstance(fqcn);
} catch (ClassCastException e1) {
return;
} catch (Throwable e1) {
return;
}
factory.setTemplateType(taskWrapper);
super.handleDrop();
}
COM: <s> handles the dropping of java task file on the designer </s>
|
funcom_train/20535140
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JButton getBoton1() {
if (boton1 == null) {
boton1 = new JButton();
boton1.setBounds(new Rectangle(203, 32, 140, 30));
boton1.setText("Estudiante");
boton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
control.pedirArchivo("estudiante");
}
});
}
return boton1;
}
COM: <s> this method initializes boton1 </s>
|
funcom_train/37061266
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
return "Member@" + hashCode() +
" [number=" + getId() +
" name=" + getName() +
" surname=" + getSurname() +
" status=" + getStatus() +
" email=" + getEmail() +
" city=" + getCity() + "]";
}
COM: <s> custom to string </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.