__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/31873090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void punish(Machine machine, int punishment) {
List machine_instructions = machine.instructions;
for (int i=0;i<machine_instructions.size();i++) {
IntList instruction = ((Program)machine_instructions.get(i)).program;
for (int j=0;j<instruction.size();j++) {
decrementInstruction(i,j,instruction.get(j),punishment);
}
}
}
COM: <s> will punish all the instructions of the successless machine </s>
|
funcom_train/1589190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DateTimeField getField(int index, Chronology chrono) {
switch (index) {
case YEAR:
return chrono.year();
case MONTH_OF_YEAR:
return chrono.monthOfYear();
case DAY_OF_MONTH:
return chrono.dayOfMonth();
default:
throw new IndexOutOfBoundsException("Invalid index: " + index);
}
}
COM: <s> gets the field for a specific index in the chronology specified </s>
|
funcom_train/47086509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveSettings(){
Properties prop = new Properties();
prop.setProperty("name",name);
prop.setProperty("sound",Integer.toString(sound));
prop.setProperty("levelsCount",Integer.toString(levelsCount));
prop.setProperty("fullscreen",Integer.toString(fullscreen));
prop.setProperty("levelStage",Integer.toString(levelStage));
saveProperties("com/golden/lemmings/resources/settings.txt", prop);
}
COM: <s> saves the global settings to settings </s>
|
funcom_train/40618536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readLine(long wait) {
long start = System.currentTimeMillis();
while (true) {
synchronized (list) {
if (list.size() > 0) {
return list.removeFirst();
}
try {
list.wait(wait);
} catch (InterruptedException e) {
// ignore
}
long time = System.currentTimeMillis() - start;
if (time >= wait) {
return null;
}
}
}
}
COM: <s> read a line from the output </s>
|
funcom_train/10840065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void releaseProviders() {
if ( this.providerCache != null ) {
for(int i=0; i<this.providerCache.length; i++) {
if ( this.cache[i] != null ) {
this.providerCache[i].release(this.cache[i]);
}
}
}
}
COM: <s> free used class loader providers </s>
|
funcom_train/26069679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
File dir = new File(mDirectory);
FileFilter filter = new ImageFilter();
File[] files = dir.listFiles(filter);
mFiles = new String[files.length];
for(int i=0; i < files.length; i++) {
Log.i(TAG, "Image found:" + files[i].toString());
mFiles[i] = files[i].toString();
}
}
COM: <s> loads image paths </s>
|
funcom_train/10617197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCertStoreException04() {
Throwable cause = null;
CertStoreException tE = new CertStoreException(cause);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code cert store exception throwable code constructor </s>
|
funcom_train/42637371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Number getConstantValue() {
Argument a = ((Dependent)getDependence()).getArgument();
//TO DO: to simplify expression before checking whether it as Parameter or not.
if (a instanceof Parameter) {
Number value = ((Parameter)a).getValue();
if (!Double.isNaN(value.doubleValue())) return value; //NaN could be sometimes if dependence is single variable(?).
}
return null;
}
COM: <s> getting value of function in case the function is constant one </s>
|
funcom_train/51142683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List deserializeChildren(Element parent) throws Exception {
List objects = new LinkedList();
if (parent != null && parent.hasChildren()) {
for (Iterator itr = parent.getChildren().iterator(); itr.hasNext();) {
objects.add(deserialize((Element)itr.next()));
}
}
return objects;
}
COM: <s> deserialize the children of the given elements children </s>
|
funcom_train/24137175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillTableWithFileContent() throws IOException {
RECORD record;
long index = 0L;
try {
while ((record = readRecord(table.size())) != null) {
record.setRecordNumber(Long.valueOf(index++));
table.put(record.getRecordNumber(), record);
}
}
catch (final EOFException ignored) {}
}
COM: <s> fills the data with the saved content in the file if any </s>
|
funcom_train/45640925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyPostAction(ProviderEvent event) {
ProviderListener listeners[] = this.listeners;
for (int i = 0; i < listeners.length; i++) {
ProviderListener listener = listeners[i];
if (log.isDebugEnabled()) {
log.debug("Notify postAction to " + listener + " event = " + event);
}
listener.postAction(event);
}
}
COM: <s> send the given event as a post event to all registered provider listeners </s>
|
funcom_train/21656299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTfProContrato() {
if (tfProContrato == null) {
tfProContrato = new JTextField();
tfProContrato.setBounds(new Rectangle(193, 476, 200, 25));
ValidadorNumero v = new ValidadorNumero(lbErrorProContrato,false);
tfProContrato.setInputVerifier(v);
tfProContrato.setText("");
}
return tfProContrato;
}
COM: <s> this method initializes tf pro contrato </s>
|
funcom_train/18191081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawToPostscriptAsSquare(EPSOutputPrintStream pw, PositionTransformation pt, double size, Color c) {
pt.translateToGUIPosition(getPosition());
pw.setColor(c.getRed(), c.getGreen(), c.getBlue());
pw.drawFilledRectangle(pt.guiXDouble - (size/2.0), pt.guiYDouble - (size/2.0), size, size);
}
COM: <s> draw this node in ps as a square </s>
|
funcom_train/10858340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String r(String s, String u) throws Exception {
Date d = parser.parse(s);
Calendar c = Calendar.getInstance(UTC, Locale.US);
c.setTime(d);
DateMathParser.round(c, u);
return fmt.format(c.getTime());
}
COM: <s> macro round parses s rounds with u fmts </s>
|
funcom_train/2538781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Quaternion fromAngleNormalAxis(float angle, Vector3D axis) {
if (axis.x == 0 && axis.y == 0 && axis.z == 0) {
loadIdentity();
} else {
float halfAngle = 0.5f * angle;
float sin = ToolsMath.sin(halfAngle);
w = ToolsMath.cos(halfAngle);
x = sin * axis.x;
y = sin * axis.y;
z = sin * axis.z;
}
return this;
}
COM: <s> code from angle normal axis code sets this quaternion to the values </s>
|
funcom_train/30075629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
Url url = (Url) command;
// delegate the insert to the Business layer
getGpir().storeUrl(url);
return new ModelAndView(getSuccessView(), "resourceId", Integer.toString(url.getResource().getId()));
}
COM: <s> method inserts a new code url code </s>
|
funcom_train/47509386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Aciona entity) {
EntityManagerHelper.log("saving Aciona instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved aciona entity </s>
|
funcom_train/20342137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getNextNoteCommand() {
if (nextNoteCommand == null) {//GEN-END:|16-getter|0|16-preInit
// write pre-init user code here
nextNoteCommand = new Command("Next note", Command.OK, 0);//GEN-LINE:|16-getter|1|16-postInit
// write post-init user code here
}//GEN-BEGIN:|16-getter|2|
return nextNoteCommand;
}
COM: <s> returns an initiliazed instance of next note command component </s>
|
funcom_train/536925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPopulateTwice() {
Album album = new Album(0);
album.populateAlbum(this.albumTracks);
assertTrue(album.getTracks() == this.albumTracks);
try {
album.populateAlbum(this.albumTracks);
} catch (IllegalStateException e) {
return;
}
fail("IllegalStateException excpected when populating twice");
}
COM: <s> test that we cant populate an album twice </s>
|
funcom_train/45775458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void documentPreview() {
try {
if (docPreview == null)
docPreview = new TOCPreview(xMSF, settings, resources, stylePreview.tempDir, myFrame);
docPreview.refresh(settings);
} catch (Exception ex) {
unexpectedError(ex);
}
}
COM: <s> the user clicks the preview button </s>
|
funcom_train/17976626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonClear() {
if (jButtonClear == null) {
jButtonClear = new JButton();
jButtonClear.setText("Clear");
jButtonClear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if(listener != null){
listener.clear();
}
}
});
}
return jButtonClear;
}
COM: <s> this method initializes j button clear </s>
|
funcom_train/34534892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StateBox retrieveStateBox(Node node) {
StateBox result=StateBox.getExistingInstance(node.getName());
if (result==null) {
StateKey state=retrieveStateKey(node.getName());
if (state!=null) {
result=StateBox.getInstance(state,node);
}
}
return result;
}
COM: <s> retrieve or build as needed as state box for the given node </s>
|
funcom_train/12244879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteEmotion(String emoName) {
List emotions = emotionsRoot.getChildren();
for (Iterator iter = emotions.iterator(); iter.hasNext();) {
Element emotion = (Element) iter.next();
String emotionName = emotion.getAttribute("name").getValue();
debugLogger.debug(emotionName);
if (emotionName.compareTo(emoName) == 0) {
emotionsRoot.removeContent(emotion);
break;
}
}
}
COM: <s> remove an emotion description from content root </s>
|
funcom_train/11319757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderChildren(HtmlStringBuffer buffer) {
if (hasControls()) {
for (int i = 0; i < getControls().size(); i++) {
Control control = getControls().get(i);
int before = buffer.length();
control.render(buffer);
int after = buffer.length();
if (before != after) {
buffer.append("\n");
}
}
}
}
COM: <s> render this container children to the specified buffer </s>
|
funcom_train/14597533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeBackLink(BaseNode dtn, boolean mirror) {
int oldCount = backLinks.length();
backLinks = backLinks.baseNodeMinus(dtn);
if (mirror) {
dtn.removeForeLink(this, false);
}
return oldCount != backLinks.length();
}
COM: <s> removes a backlink to this node </s>
|
funcom_train/16695764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store(DataOutputStream dos) throws IOException {
dos.writeShort(this.accessFlags); // access_flags
dos.writeShort(this.nameIndex); // name_index
dos.writeShort(this.descriptorIndex); // descriptor_index
ClassFile.storeAttributes(dos, this.attributes); // attributes_count, attributes
}
COM: <s> write this object to a </s>
|
funcom_train/26201827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printStaticAndType(boolean isStatic, Type type) {
writer.printTypeSummaryHeader();
if (isStatic) {
print("static");
}
writer.space();
if (type != null) {
printTypeLink(type);
}
writer.printTypeSummaryFooter();
}
COM: <s> print static if static and type link </s>
|
funcom_train/3543191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextMode(boolean editable) {
if (controller != null) {
if (editable && (controller instanceof EditableTC)) {
return;
}
if (!editable && (controller instanceof NonEditableTC)) {
return;
}
controller.detach();
}
if (editable) {
controller = new EditableTC();
} else {
controller = new NonEditableTC();
}
updateParser();
}
COM: <s> sets the text mode and editable flag </s>
|
funcom_train/3589292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSetSpecCount() throws OAIException {
int ret = 0;
try {
Namespace oains = Namespace.getNamespace("oai","http://www.openarchives.org/OAI/2.0/");
XPath xpath = XPath.newInstance("//oai:setSpec");
xpath.addNamespace(oains);
List list = xpath.selectNodes(xmlRecord);
ret = list.size();
} catch (JDOMException te) {
throw new OAIException(OAIException.CRITICAL_ERR, te.getMessage());
}
return ret;
}
COM: <s> return the number of set spec strings for the record </s>
|
funcom_train/20871892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SQLiteContact getContact(long cid, String protocol, String uin) {
SQLiteContact c;
if ((c = contactList.get(cid)) != null) {
return c;
} else {
c = new SQLiteContact(this, cid, protocol, uin);
contactList.put(cid, c);
return c;
}
}
COM: <s> checks if there is already a sqlite contact instance representing this </s>
|
funcom_train/21953253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void searchMessage() {
String searchString = getMessageUI().showInputDialog(Pooka.getProperty("message.search", "Find what"), Pooka.getProperty("message.search.title", "Find"));
if (searchString != null && searchString.length() > 0)
findRegexp(searchString);
}
COM: <s> shows a dialog that asks for a string ok actually a regexp to </s>
|
funcom_train/45933534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResponseObject bookmarkKeywords(Identification id, String requestId, List<String> keywordIds) {
userProfileService.addBookmarkedKeywords(id.getUserId(), keywordIds);
//TODO: make this responseobject reflect the success or failiure of the operation
return new ResponseObject(requestId);
}
COM: <s> adds a list of keywords as bookmarked </s>
|
funcom_train/2579839 | /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 (obj == this) {
return true;
}
if (!(obj instanceof CombinedRangeXYPlot)) {
return false;
}
CombinedRangeXYPlot that = (CombinedRangeXYPlot) obj;
if (this.gap != that.gap) {
return false;
}
if (!ObjectUtilities.equal(this.subplots, that.subplots)) {
return false;
}
return super.equals(obj);
}
COM: <s> tests this plot for equality with another object </s>
|
funcom_train/10591260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSourceProperty(SourceProperty property) throws SourceException {
if (m_delegate instanceof InspectableSource) {
((InspectableSource) m_delegate).setSourceProperty(property);
} else if (m_descriptor != null) {
m_descriptor.setSourceProperty(m_delegate, property);
}
}
COM: <s> set the source property on the wrapped source </s>
|
funcom_train/48104180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Directory getSaveIndexDirectory() throws IOException {
File file = new File(BaseIndex.saveIndePath);
if (!file.exists()) {
file.mkdirs();
log.debug("into getSaveIndexFile this file real path is :" + file.getAbsoluteFile());
}
log.debug("into getSaveIndexFile this file real path is :" + file.getAbsoluteFile());
Directory directory = FSDirectory.open(file);
return directory;
}
COM: <s> get file for save lucene index from the system file </s>
|
funcom_train/34811610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveIntensities(){
int numColumns = intensities.length;
celpFiles = new File[numColumns];
for (int i=0; i<numColumns; i++){
String name = Misc.replaceEnd(celaMapFiles[i].getName(), "celaMap", "celp");
celpFiles[i] = new File(celaMapFiles[i].getParentFile(),name);
if (useMMData) IO.saveObject(celpFiles[i], transformPMMM(intensities[i]));
else IO.saveObject(celpFiles[i], intensities[i]);
}
}
COM: <s> saves intensities one float for each replica </s>
|
funcom_train/47958555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNodeName(Node node){
if (node.getNodeType()==1){
String nodeName = node.getNodeName();
if (nodeName.contains(":")) nodeName = nodeName.substring(nodeName.indexOf(":")+1);
return nodeName;
}
return "";
}
COM: <s> used to return a name of an xml node </s>
|
funcom_train/26279180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() throws JGimpProxyException, JGimpProcedureNotFoundException, JGimpInvalidDataCoercionException, JGimpIncorrectArgCountException, JGimpProcedureExecutionException, JGimpException {
m_App.callProcedure("gimp_display_delete", this);
}
COM: <s> deletes this display </s>
|
funcom_train/50846383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNCharacterStream() throws Exception {
String sval = "setNCharacterStream";
Reader value = new StringReader(sval);
long length = sval.length();
PreparedStatement stmt = queryBy("c_longvarchar");
stmt.setNCharacterStream(1, value, length);
stmt.executeQuery();
}
COM: <s> test of set ncharacter stream method of interface java </s>
|
funcom_train/18315716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInstance()
throws Throwable
{
try
{
assertNotNull( EJBServiceLocator.getInstance() );
}
catch( Throwable exc )
{
FrameworkBaseObject.logMessage( "EJBServiceLocatorTest.testGetInstance() failed - " + exc.toString() );
throw exc;
}
FrameworkBaseObject.logMessage( "EJBServiceLocatorTest:testGetInstance() - passed..." );
COM: <s> tests get instance on ejbservice locator </s>
|
funcom_train/17805140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBandwith_in_MbitPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RemoteRuntimeConnection_Bandwith_in_Mbit_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RemoteRuntimeConnection_Bandwith_in_Mbit_feature", "_UI_RemoteRuntimeConnection_type"),
CtbPackage.Literals.REMOTE_RUNTIME_CONNECTION__BANDWITH_IN_MBIT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the bandwith in mbit feature </s>
|
funcom_train/50504850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TARequirement getTransactionType() {
EJBMethodSettings methodInfo = (EJBMethodSettings) this.getProperty().getGetterMethod().getSettings(EJBMethodSettings.class);
if(methodInfo != null) {
return methodInfo.getTransactionType();
}
else {
return TARequirement.NONE;
}
}
COM: <s> gets the ta requirement attribute of the ejbproperty descriptor object </s>
|
funcom_train/42199690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getBreakEven() {
if(this.degree != 0) {
double maxBias = this.getMaxBias();
double valueWithMaxP = this.evaluate(maxBias);
double valueAtZero = this.evaluate(0);
double valueAtOne = this.evaluate(1);
return getBestValue(valueWithMaxP, valueAtZero, valueAtOne);
}
return 0.0;
}
COM: <s> gets the maximum bias value for this polynomial </s>
|
funcom_train/50617712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateFrom(User user) {
clearAccounts();
setCustomerName(user.getName());
for (Iterator iter = user.getAccounts().iterator(); iter.hasNext(); ) {
Account acc = (Account)iter.next();
if (!isAccountNumberExcluded(acc.getAccountNumber()))
getAccounts().add(new AccountDetailForm(acc));
}
}
COM: <s> populate the receiver from the given model object </s>
|
funcom_train/7601382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseArgs(String[] args) {
if (args.length < 1) {
return;
}
File f = new File(args[0]);
if (!f.exists()) {
f = new File(System.getProperty("user.dir")
+ System.getProperty("path.separator")
+ args[0]);
}
if (f.exists()) {
try {
FileInputStream fis = new FileInputStream(f);
props = new Properties();
props.load(fis);
fis.close();
loadParams();
} catch (IOException e) {
}
}
}
COM: <s> finds configuration file in arguments and creates a properties object from </s>
|
funcom_train/3290957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(String fieldName) {
// get the value from the values table
Object o = retrieveValue(prefix+fieldName);
// routine to check for indirect values
// this are used for functions for example
// its implemented per builder so lets give this
// request to our builder
if (o==null) return parent.getValue(this,fieldName);
// return the found object
return o;
}
COM: <s> get a value of a certain field </s>
|
funcom_train/37739511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void wrapAdditionalNamespaces(Element element) {
List additionalNsList = new ArrayList();
Iterator iterator = element.getAdditionalNamespaces().iterator();
while(iterator.hasNext()) {
Namespace namespace = (Namespace)iterator.next();
additionalNsList.add(new NamespaceWrapper(namespace.getPrefix(),
namespace.getURI()));
}
if (additionalNsList.size() != 0) {
// all the founded namespaces saved in the map
additionalNsByElement.put(element, additionalNsList);
}
}
COM: <s> wrap all the founded additional namespaces of the given element </s>
|
funcom_train/42988998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hookContextMenu() {
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
SCSView.this.fillContextMenu(manager);
}
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
getSite().registerContextMenu(menuMgr, viewer);
}
COM: <s> will be used for properties dialog </s>
|
funcom_train/10908194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BorderInfo getBorderAfter(int which) {
switch (which) {
case ConditionalBorder.NORMAL:
return borderAfter.normal.getBorderInfo();
case ConditionalBorder.LEADING_TRAILING:
return borderAfter.leadingTrailing.getBorderInfo();
case ConditionalBorder.REST:
return borderAfter.rest.getBorderInfo();
default:
assert false;
return null;
}
}
COM: <s> returns the resolved border after of this grid unit in the collapsing border </s>
|
funcom_train/18065791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uml_remove_class(UmlClassCell c){
UmlClass classToRem = null;
classToRem = c.getRepresentedElement();
try {
UmlModel.removeChild(classToRem);
interfacemanager.getGraphManager().removeGUIElement(c);
interfacemanager.getGraphManager().getRepresentation().remove(classToRem);
} catch (InvalidOperationException e){
interfacemanager.bottomMessage("Invalid operation: unable to remove the selected class");
}
}
COM: <s> this method removes the selected class </s>
|
funcom_train/50296705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Timestamp encodeTimestamp(java.sql.Timestamp value, Calendar cal, boolean invertTimeZone){
if (cal == null) {
return value;
}
else {
long time = value.getTime() +
(invertTimeZone ? -1 : 1) * (cal.getTimeZone().getRawOffset() -
Calendar.getInstance().getTimeZone().getRawOffset());
return new Timestamp(time);
}
}
COM: <s> encode a code timestamp code using a given code calendar code </s>
|
funcom_train/50274474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadURL(String urlStr) {
if (urlStr!=null) {
try {
URL url = Urls.guessURL(urlStr);
loadURL(url);
} catch (MalformedURLException e) {
log.info("loadURL() not possible with urlStr="+urlStr+", "+e);
}
} else {
log.info("loadURL() not possible with null urlStr");
}
}
COM: <s> load a new url in the frame </s>
|
funcom_train/18320420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConnectionAnchor createAnchor(EditPart otherEndEditPart) {
IFigure otherEndFigure = null;
if (otherEndEditPart instanceof GraphicalEditPart) {
GraphicalEditPart graphicalEditPart = (GraphicalEditPart) otherEndEditPart;
otherEndFigure = graphicalEditPart.getFigure();
}
return new IntersectionCenterAnchor(getFigure(), otherEndFigure);
}
COM: <s> fetches figure from other end edit part and creates new intersection center anchor </s>
|
funcom_train/18086951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoom(int zoom) {
zoomChanging = true; // Avoids update from slider
mainMap.setZoom(zoom);
//miniMap.setZoom(mainMap.getZoom() + 4); // Updated through listener (but for speed)
if (sliderReversed) {
zoomSlider.setValue(zoomSlider.getMaximum() - zoom);
} else {
zoomSlider.setValue(zoom);
}
zoomChanging = false;
}
COM: <s> set the current zoomlevel for the main map </s>
|
funcom_train/44626157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJML() {
helpTCX("tt.TestJava","package tt; public class TestJava { public static void main(String[] args) { //@ ghost int i = 0; \n //@ set i = 1; \n //@ set System.out.println(i); \n System.out.println(\"END\"); }}"
,"1"
,"END"
);
}
COM: <s> simple test of output from a jml set statement </s>
|
funcom_train/45623617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDeploymentUrlPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateDeploymentManifestType_deploymentUrl_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateDeploymentManifestType_deploymentUrl_feature", "_UI_GenerateDeploymentManifestType_type"),
MSBPackage.eINSTANCE.getGenerateDeploymentManifestType_DeploymentUrl(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the deployment url feature </s>
|
funcom_train/25142251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug16169() throws Exception {
createTable("testBug16169", "(field1 smallint)");
this.stmt.executeUpdate("INSERT INTO testBug16169 (field1) VALUES (0)");
this.pstmt = this.conn.prepareStatement("SELECT * FROM testBug16169");
this.rs = this.pstmt.executeQuery();
assertTrue(this.rs.next());
assertEquals(0, ((Integer) rs.getObject("field1")).intValue());
}
COM: <s> tests fix for bug 16169 result set </s>
|
funcom_train/45122131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateIDBasicType_Pattern(String idBasicType, DiagnosticChain diagnostics, Map<Object, Object> context) {
return validatePattern(DictionaryPackage.Literals.ID_BASIC_TYPE, idBasicType, ID_BASIC_TYPE__PATTERN__VALUES, diagnostics, context);
}
COM: <s> validates the pattern constraint of em id basic type em </s>
|
funcom_train/43903962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode(final Object metadata) {
assert type.isInstance(metadata);
int code = 0;
for (int i = 0; i < getters.length; i++) {
final Object value = get(getters[i], metadata);
if (!isEmpty(value)) {
code += value.hashCode();
}
}
return code;
}
COM: <s> returns a hash code for the specified metadata </s>
|
funcom_train/48667180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleStartSession() {
try {
this.viewContainer.getAppWorker().runJob(new UIWorkerJobDefault(
viewContainer.getAppFrame(),
Cursor.WAIT_CURSOR,
MessageRepository.get(Msg.TEXT_STARTINGSESSION)) {
public void work() throws Exception {
rmsMonitoringSession.startAllAgents();
}
public void finished(Throwable ex) {
if(ex == null) {
actionStopSession.setEnabled(true);
actionStartSession.setEnabled(false);
}
}
});
} catch(Exception e) {
UIExceptionMgr.userException(e);
}
}
COM: <s> handles the start session event </s>
|
funcom_train/23236482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireAdded(RPObject object, boolean user) {
// TEST CODE:
//System.err.println("fireAdded()");
//dumpObject(object);
gameObjects.onAdded(object);
// NEW CODE:
// /*
// * Walk each slot
// */
// for(RPSlot slot : object.slots()) {
// for(RPObject sobject : slot) {
// fireAdded(sobject, user);
// }
// }
}
COM: <s> notify listeners that an object was added </s>
|
funcom_train/48579220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTxtAmount() {
if (txtAmount == null) {//GEN-END:|208-getter|0|208-preInit
// write pre-init user code here
txtAmount = new TextField("Expense Amount", null, 32, TextField.NUMERIC);//GEN-LINE:|208-getter|1|208-postInit
// write post-init user code here
}//GEN-BEGIN:|208-getter|2|
return txtAmount;
}
COM: <s> returns an initiliazed instance of txt amount component </s>
|
funcom_train/16911568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connect(){
//Standard all to all connections
AllToAll connect = new AllToAll(network);
//No self connection
AllToAll.setAllowSelfConnection(false);
//TODO: Way to set weight ranges and excitatory probability?
connect.connectNeurons(inputLayer, hiddenLayer, -1.0, 1.0, 0.5);
connect.connectNeurons(contextLayer, hiddenLayer, -1.0, 1.0, 0.5);
connect.connectNeurons(hiddenLayer, outputLayer, -1.0, 1.0, 0.5);
}
COM: <s> connects srn layers </s>
|
funcom_train/3370601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChoosableFileFilter(FileFilter filter) {
if(filter != null && !filters.contains(filter)) {
FileFilter[] oldValue = getChoosableFileFilters();
filters.addElement(filter);
firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, oldValue, getChoosableFileFilters());
if (fileFilter == null && filters.size() == 1) {
setFileFilter(filter);
}
}
}
COM: <s> adds a filter to the list of user choosable file filters </s>
|
funcom_train/10787617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDynamicInstrumentConfig() {
InstrumentationManager mgr = emf.getConfiguration().getInstrumentationManagerInstance();
assertNotNull(mgr);
Set<InstrumentationProvider> providers = mgr.getProviders();
assertNotNull(providers);
assertEquals(1, providers.size());
InstrumentationProvider provider = providers.iterator().next();
assertEquals(provider.getClass(), SimpleProvider.class);
verifyBrokerLevelInstrument(provider);
}
COM: <s> verifies configuring and adding an instrument to a provider after the provider </s>
|
funcom_train/21619999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTaxAmount() {
System.out.println("getTaxAmount");
double rate = 0.06;
trans.getTaxCalcList().add(new FlatTax(rate));
assertEquals(trans.getSubTotal() * rate, trans.getTaxAmount());
}
COM: <s> test of get tax amount method of class edu </s>
|
funcom_train/5266191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void backPropagate(Vec expectedOutput) {
MlpOutputLayer outputLayer = (MlpOutputLayer)layers.get(layers.size() - 1);
outputLayer.setExpectedOutputToNeurons(expectedOutput);
for (int i = layers.size() - 1; i >= 0; i--) {
layers.get(i).backPropagateFromNextLayerOrExpectedOutput();
}
}
COM: <s> backpropagate layer to layer </s>
|
funcom_train/18501650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCaseValue(Object value, String attribute, double weight) {
// TODO: this is not so good
SimpleIndividual i = new SimpleIndividual("Empty");
SimpleIndividual[] arr = new SimpleIndividual[1];
arr[0] = i;
caseValues.add(new SimpleCaseValue(value, attribute, weight, arr));
}
COM: <s> add case value </s>
|
funcom_train/46732573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFacilityAccountId(Long facilityAccountId) {
if (!(this.facilityAccountId.longValue() == facilityAccountId.longValue())) {
Long oldfacilityAccountId= 0L;
oldfacilityAccountId = this.facilityAccountId.longValue();
this.facilityAccountId = facilityAccountId.longValue();
setModified("facilityAccountId");
firePropertyChange(String.valueOf(INVOICECHARGES_FACILITYACCOUNTID), oldfacilityAccountId, facilityAccountId);
}
}
COM: <s> account this charge will be applied to </s>
|
funcom_train/1878094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean deleteResource(File path) {
if (path.exists()) {
File[] files = path.listFiles();
for (File file : files) {
if (file.isDirectory()) {
deleteResource(file);
} else {
LOG.info("Deleting " + path.getName());
file.delete();
}
}
}
return path.delete();
}
COM: <s> delete the resource of this file object </s>
|
funcom_train/3272945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int peekChar() throws IOException {
// If the last character read has not yet been
// popped from the stream, return its type.
if (currentCharValid) {
return currentChar;
}
// Else, the last character parsed from the stream
// has already been popped, and we parse the next
// character from the stream.
currentChar = read();
currentCharValid = true;
advancePosition(currentChar);
return currentChar;
}
COM: <s> peek at the next character but do not </s>
|
funcom_train/3362062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(int parameterIndex, java.sql.Date x) throws SQLException {
checkParamIndex(parameterIndex);
if(params == null){
throw new SQLException("Set initParams() before setDate");
}
params.put(new Integer(parameterIndex - 1), x);
}
COM: <s> sets the designated parameter to the given code java </s>
|
funcom_train/36811723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getElement(int i, int j) {
if (i < 0 || i >= rows || j < 0 || j >= columns) {
throw new IllegalArgumentException("cannot get element ("
+ i + ", " + j + ") from a "
+ rows + 'x' + columns
+ " matrix");
}
return data[i * columns + j];
}
COM: <s> get a matrix element </s>
|
funcom_train/13994343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitialization() {
assertEquals(5, model.getSize());
assertEquals("1", model.getElementAt(0));
assertEquals("11", model.getElementAt(1));
assertEquals("12", model.getElementAt(2));
assertEquals("121", model.getElementAt(3));
assertEquals("3", model.getElementAt(4));
}
COM: <s> tests that the model is sorted and has the correct size after </s>
|
funcom_train/31504968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRelationsContaining( ReasoningObject object ) {
ReasoningRelationList relationsToRemove = new ReasoningRelationList();
int size = this.size();
for( int i = 0; i < size; i++ ) {
ReasoningRelation nextRelation = (ReasoningRelation) this.get(i);
if( nextRelation.getFirstObject() == object
|| nextRelation.getSecondObject() == object ) {
relationsToRemove.add(nextRelation);
}
}
this.removeAll(relationsToRemove);
}
COM: <s> remove all relations that are associated with the given </s>
|
funcom_train/23234030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyExited(RPEntity entity, int oldX, int oldY) {
Rectangle2D eArea;
eArea = entity.getArea(oldX, oldY);
for (MovementListener l : movementListeners) {
if (l.getArea().intersects(eArea)) {
l.onExited(entity, this, oldX, oldY);
}
}
}
COM: <s> notify anything interested in when an entity exited </s>
|
funcom_train/1058617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize(int wHint, int hHint) {
if (prefSize == null)
return adjustToAspectRatio(getBounds().getSize(), false);
Dimension preferredSize = adjustToAspectRatio(prefSize.getCopy(), true);
if (maxSize == null)
return preferredSize;
Dimension maximumSize = adjustToAspectRatio(maxSize.getCopy(), true);
if (preferredSize.contains(maximumSize))
return maximumSize;
else
return preferredSize;
}
COM: <s> returns the preferred size of this thumbnail </s>
|
funcom_train/30075713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
// the edited object
Url resourceUrl = (Url) command;
// delegate the update to the Business layer
getGpir().storeUrl(resourceUrl);
return new ModelAndView(getSuccessView(), "resourceId", Integer.toString(resourceUrl.getResource().getId()));
}
COM: <s> method updates an existing code url code when the form is committed </s>
|
funcom_train/9504184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoVector Vector(String label, GeoPoint P, GeoPoint Q) {
AlgoVector algo = new AlgoVector(cons, label, P, Q);
GeoVector v = algo.getVector();
v.setEuclidianVisible(true);
v.update();
notifyUpdate(v);
return v;
}
COM: <s> vector named label from point p to q </s>
|
funcom_train/46767729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void HighlightTab(String name){
try{
System.out.println("highlighted "+name);
consolePanel.setTitleAt(((consolePanel.indexOfTab(name))),"<html><font color=\"#FF0000\">"+name+"<font></html>");
if (name.equalsIgnoreCase("Console")){
this.consoleHighlighted=true;
}
else{
this.errorsHighlighted=true;
}
}
catch(Exception e){
AppendToConsole("highlight excption in Gui::HighlightTab:"+e.getMessage(),1);
e.printStackTrace();
}
}
COM: <s> change the color of the named tab to red </s>
|
funcom_train/41139411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String globalInfo() {
return "SubsetReliefFAttributeEval :\n\nEvaluates the worth of an attribute by "
+ "repeatedly sampling an instance and considering the value of the "
+ "given attribute for the nearest instance of the same and different "
+ "class. Can operate on both discrete and continuous class data.\n\n"
+ "For more information see:\n\n"
+ getTechnicalInformation().toString();
}
COM: <s> returns a string describing this attribute evaluator </s>
|
funcom_train/10791666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCastForParam(String oper, Val val) {
if (_sql.charAt(_sql.length() - 1) == '?') {
String castString = _dict.addCastAsType(oper, val);
if (castString != null)
_sql.replace(_sql.length() - 1, _sql.length(), castString);
}
}
COM: <s> replace sql with cast string if required by db platform </s>
|
funcom_train/36106703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getLastTextCommand() {
if (lastTextCommand == null) {//GEN-END:|94-getter|0|94-preInit
// write pre-init user code here
lastTextCommand = new Command("Testo ultimo SMS", Command.SCREEN, 2);//GEN-LINE:|94-getter|1|94-postInit
// write post-init user code here
}//GEN-BEGIN:|94-getter|2|
return lastTextCommand;
}
COM: <s> returns an initiliazed instance of last text command component </s>
|
funcom_train/20885204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithoutNamespacesAndWithoutPublicId() {
String xml = createXML(QName.create("test"), null, "http://www.jsefa.org/xml/dtd/test");
assertTrue(xml.indexOf("<!DOCTYPE test SYSTEM \"http://www.jsefa.org/xml/dtd/test\">") > -1);
}
COM: <s> tests it with no namespace and no public id </s>
|
funcom_train/1961620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void fallback(GEnterprisePackage pkg) throws Exception {
FileDevice bakTarget = new FileDevice();
bakTarget.setFilename("unsent-ims_");
if (!new File("unsent").exists())
new File("unsent").mkdirs();
bakTarget.setDirectory("unsent");
bakTarget.setZipped(true);
bakTarget.setAppendUnique(true);
GEnterprisePackage mpkg = bakTarget.write(pkg);
ArrayList<GMessage> msgs = mpkg.getMessages();
for (int i = 0; i < msgs.size(); i++) {
log.info(msgs.get(i).toString());
}
}
COM: <s> write as zipped package to unsent directory </s>
|
funcom_train/1373260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putChessman(Message msg){
if(ptocFlag==false){
bpanel.updateBoard(msg.coordinateX,msg.coordinateY);
bpanel.drawChess(msg.coordinateX,msg.coordinateY);
beginFlag = true;
return;
}else{
// update native board
// search position to put chessman
}
}
COM: <s> precondition get a msg from competitor of puting a chessman </s>
|
funcom_train/32057642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetModel() {
System.out.println("testGetModel");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
assertEquals("getModel failed", newDoc.getModel() != null, true);
}
COM: <s> test of get model method of class gpdocument </s>
|
funcom_train/24934784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawDashedLine(int x, int y1, int y2, Graphics2D g) {
Stroke oldStroke = g.getStroke();
g.setStroke(DASHEDSTROKE);
g.drawLine(x, y1, x, y2);
g.setStroke(oldStroke);
}
COM: <s> draws the lifeline as a dashed line </s>
|
funcom_train/41234287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCommandEntered(InterpreterType type, String script) {
content.remove(commandPrompt.panel());
Widget enteredScript = commandPrompt.createImmutablePanel();
content.add(enteredScript);
commandPrompt.clearInputArea();
Window.scrollTo(0, 100000);
try {
api.eval(type, script, new ScriptCallback());
} catch (InterpreterException e) {
setResult(e.getMessage(), false);
}
}
COM: <s> the command entered handler does a little switch a roo </s>
|
funcom_train/51483003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(StorableInput dr) throws IOException {
// test for number being next; if it's a number this is
// an old-format file with no attributes on this figure type
if (dr.testForNumber())
return;
String s = dr.readString();
if (s.toLowerCase().equals("attributes")) {
fAttributes = new FigureAttributes();
fAttributes.read(dr);
}
}
COM: <s> reads the figure from a storable input </s>
|
funcom_train/46824443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point toScreenPoint(int i, int j, int offset) {
if (reverseFlag) {
return new Point (
((CamelotModel.COLS - 1 - i) * basicSize) + offset,
((CamelotModel.ROWS - 1 - j) * basicSize) + offset
);
} else {
return new Point (
(i * basicSize) + offset,
(j * basicSize) + offset
);
}
}
COM: <s> convert a logical board location i j to a screen point x y </s>
|
funcom_train/14660769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AutoEnableMenu getSpecMenu() {
if (specMenu == null) {
specMenu = new AutoEnableMenu();
specMenu.setText("Specify");
specMenu.add(loadModelDefAction);
specMenu.add(modelSpecAction);
specMenu.add(paramSpecAction);
specMenu.add(shockDistSpecAction);
specMenu.add(steadyStateDefAction);
}
return specMenu;
}
COM: <s> this method initializes spec menu </s>
|
funcom_train/8686003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate(int comparisonResult) {
if (getIndex() == -1) {
throw new BuildException("Comparison value not set.");
}
int[] i = comparisonResult < 0 ? LESS_INDEX
: comparisonResult > 0 ? GREATER_INDEX : EQUAL_INDEX;
return Arrays.binarySearch(i, getIndex()) >= 0;
}
COM: <s> evaluate a comparison result as from comparator </s>
|
funcom_train/10864047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearIndex() throws IOException {
synchronized (modifyCurrentIndexLock) {
ensureOpen();
final Directory dir = this.spellIndex;
final IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(
Version.LUCENE_CURRENT,
null)
.setOpenMode(OpenMode.CREATE));
writer.close();
swapSearcher(dir);
}
}
COM: <s> removes all terms from the spell check index </s>
|
funcom_train/47947433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getZAxisMaxValueAsString() {
CoordinateAxis axis = getZAxis();
if (axis == null) {
return null;
}
MAMath.MinMax minMax = NetCdfWriter.getMinMaxSkipMissingData(axis, null);
return NetCdfReader.getStandardZAsString(minMax.max, axis.getUnitsString());
}
COM: <s> gets the maximum value of the z axis </s>
|
funcom_train/34354721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyDiscoveryServerChanged() {
DiscoveryServerEvent ev = new DiscoveryServerEvent(searchResults);
// iterate over a copy of listener collection (a listener may decide to deregister itself in pipelineChanged()
// method; a copy prevents a concurrent modification exception)
for (DiscoveryServerListener l : new LinkedList<DiscoveryServerListener>(listeners)) {
l.searchResultsChanged(ev);
}
}
COM: <s> notifies all listeners about a change </s>
|
funcom_train/16975352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() {
synchronized (this) {
if (this.jroveFactory == null) {
AssertUtil.notNull(configurator);
if (logger.isInfoEnabled()) {
logger.info("Initializing View Handler");
}
Compiler c = this.createCompiler();
c.initialize(configurator);
this.jroveFactory = this.createJroveFactory(configurator, c);
logger.info("Initialization Successful");
}
}
}
COM: <s> initialize the view handler during its first request </s>
|
funcom_train/10268556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUploaded(String workletName) {
// refresh list of specifications loaded into the engine
getLoadedSpecs();
// check if any loaded specids match the worklet spec selected
for (int i=0;i<_loadedSpecs.size();i++) {
SpecificationData spec = (SpecificationData) _loadedSpecs.get(i) ;
if (workletName.equals(spec.getID())) return true ;
}
return false ; // no matches
}
COM: <s> checks if a worklet spec has already been loaded into engine </s>
|
funcom_train/8088608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
Iterator iter = this.enumerateLiterals();
if (!iter.hasNext()) {
return "TRUE";
}
StringBuffer text = new StringBuffer();
while (iter.hasNext()) {
text.append(iter.next().toString());
if (iter.hasNext()) {
text.append(" and ");
}
}
return text.toString();
}
COM: <s> gives a string representation of this set of literals as a conjunction </s>
|
funcom_train/4347882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLong(String key) {
Object object = get(key);
try {
return object instanceof Number ? ((Number) object).longValue() : Long.parseLong((String) object);
} catch (Exception e) {
throw new JsonException("JSONObject[" + quote(key) + "] is not a long.");
}
}
COM: <s> get the long value associated with a key </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.