__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24926369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(String key, String... parameters) {
String returnValue = null;
try {
returnValue = getBundle().getString(key);
if (parameters.length > 0) {
for (int i = 0; i < parameters.length; i++) {
returnValue = returnValue.replaceAll("%"+i, parameters[i]);
}
}
} catch (MissingResourceException e) {
LOG.debug(e.getMessage());
returnValue = key;
}
return returnValue;
}
COM: <s> gets the localized label </s>
|
funcom_train/28750492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setApprovecharge(Long newVal) {
if ((newVal != null && this.approvecharge != null && (newVal.compareTo(this.approvecharge) == 0)) ||
(newVal == null && this.approvecharge == null && approvecharge_is_initialized)) {
return;
}
this.approvecharge = newVal;
approvecharge_is_modified = true;
approvecharge_is_initialized = true;
}
COM: <s> setter method for approvecharge </s>
|
funcom_train/925990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readExternal(DataInput in) throws IOException {
super.readExternal(in);
int blockHashCount = in.readInt();
blockHashes = new Hashes[blockHashCount];
for(int i=0; i<blockHashCount; i++) {
blockHashes[i] = new Hashes();
blockHashes[i].readExternal(in);
}
}
COM: <s> reads the contents from given input into this code file hash code </s>
|
funcom_train/43213368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deserialize(InputStream in) throws IOException {
setVersion(RemoteUtil.readInt(in));
if (getVersion() == VERSION_ONE) {
deserializeVersionOne(in);
} else {
throw new IOException("Unrecognized version: " + getVersion());
}
setVersion(VERSION_LATEST);
}
COM: <s> p sets the table based on the given serialized table </s>
|
funcom_train/28340264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildDocType(String strName, String strDtdUri) {
String strDocType = "";
if (strName == null)
return strDocType;
strDocType = "<!DOCTYPE " + strName;
strDocType += " SYSTEM \"" + strDtdUri;
strDocType += "\">";
strDocType += ElementFormatter.XML_NEWLINE;
return strDocType;
}
COM: <s> build the document type entry for xml documents </s>
|
funcom_train/35848702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassifierRoleThrows() {
Object cr;
cr = Model.getCollaborationsFactory().createClassifierRole();
checkThrowsClassifierRole(cr, nclro01, true, false, false);
checkThrowsClassifierRole(cr, nclro02, true, false, false);
checkThrowsClassifierRole(cr, nclro03, true, false, false);
checkThrowsClassifierRole(cr, nclro04, true, false, false);
}
COM: <s> test if parsing a classifier role throws exceptions </s>
|
funcom_train/9702548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IFormHidden createHiddenField(Element elem, int elemCounter) {
IFormHiddenBuilder hiddenB = (IFormHiddenBuilder) ModelBuilderFactory.newBuilder(IFormHidden.class);
initElement(elem, elemCounter, hiddenB);
if (elem.getAttributeValue("value") != null) //$NON-NLS-1$
hiddenB._default(elem.getAttributeValue("value")); //$NON-NLS-1$
return (IFormHidden) hiddenB.build();
}
COM: <s> create a new hidden field a simple variable </s>
|
funcom_train/32763426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(double newValue) {
value = newValue;
updateScaleSlider();
if ( value != valueFromField() ) {
updateValueField();
}
if ( value != valueFromSlider() ) {
updateValueSlider();
}
changeProxy.stateChanged( new ChangeEvent(ScaleControl.this) );
}
COM: <s> set the value </s>
|
funcom_train/9577347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerMathFunction(GeneMath gMath, String name) {
if (gMath == null || name == null) {
try {
throw new IllegalArgumentException("RegisterMathFunction: GeneMath class parameter or name is null");
}
catch (Exception e) {
e.printStackTrace();
}
}
// add the gene math to the function list
mathMap.put(name, gMath);
}
COM: <s> register a math function with the register </s>
|
funcom_train/28138337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveAndShowSelectedItems(float dx, float dy) {
List<Object> selectedItems = this.home.getSelectedItems();
if (!selectedItems.isEmpty()) {
moveItems(selectedItems, dx, dy);
((PlanComponent)getView()).makeSelectionVisible();
postItemsMove(selectedItems, dx, dy);
}
}
COM: <s> moves and shows selected items in plan component of code dx code </s>
|
funcom_train/28368293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LatLonPoint getRandomPosition(final String terrain) {
final OMGraphicHandlerLayer layer = getLayer(terrain);
if (layer == null) { return null; }
final Integer index = Random.uniform.nextIntFromTo(0, layer.getList().size() - 1);
return gisReader.getCenter(layer.getList().getOMGraphicAt(index));
}
COM: <s> gets a ramdom position knowing the name of the terrain </s>
|
funcom_train/212405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rotateButtonPushed() {
String angleString = (String) JOptionPane.showInputDialog(null,
"Angle (in degrees):", "Rotate", JOptionPane.QUESTION_MESSAGE);
int angle;
try {
angle = Integer.parseInt(angleString);
}
catch (NumberFormatException e) {
// If they've given us a bad number do nothing:
return;
}
rotate(angle);
}
COM: <s> gets the angle of rotation desired and calls the code rotate angle code </s>
|
funcom_train/491251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDouble(int index) throws JSONException {
Object o = get(index);
try {
return o instanceof Number ?
((Number)o).doubleValue() :
Double.valueOf((String)o).doubleValue();
} catch (Exception e) {
throw new JSONException("JSONArray[" + index +
"] is not a number.");
}
}
COM: <s> get the double value associated with an index </s>
|
funcom_train/1530962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String getAlgebraDescription() {
if (strAlgebraDescriptionNeedsUpdate) {
if (isDefined()) {
strAlgebraDescription = toString();
} else {
StringBuilder sbAlgebraDesc = new StringBuilder();
sbAlgebraDesc.append(label);
sbAlgebraDesc.append(' ');
sbAlgebraDesc.append(bApp.getPlain("undefined"));
strAlgebraDescription = sbAlgebraDesc.toString();
}
strAlgebraDescriptionNeedsUpdate = false;
}
return strAlgebraDescription;
}
COM: <s> returns algebraic representation of this geo element </s>
|
funcom_train/24336878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean covers(InstanceShort datum) {
boolean isCover = true;
for(int i = 0; i < m_Antds.size(); i++){
Antd antd = (Antd)m_Antds.elementAt(i);
if(!antd.covers(datum)){
isCover = false;
break;
}
}
return isCover;
}
COM: <s> whether the instance covered by this rule </s>
|
funcom_train/10616822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProtectionDomainCodeSourcePermissionCollectionClassLoaderPrincipalArray() {
new ProtectionDomain(null, null, null, null);
new ProtectionDomain(cs, null, null, null);
new ProtectionDomain(null, perms, null, null);
new ProtectionDomain(null, null, classldr, null);
new ProtectionDomain(null, null, null, principals);
new ProtectionDomain(cs, perms, classldr, principals);
}
COM: <s> test for protection domain code source permission collection class loader principal </s>
|
funcom_train/41165088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ToAssistenceMetadata update(ToAssistenceMetadata entity) {
EntityManagerHelper.log("updating ToAssistenceMetadata instance", Level.INFO, null);
try {
ToAssistenceMetadata result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved to assistence metadata entity and return it or a </s>
|
funcom_train/16188558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getChargeCount() {
if(charge != null) {
float cvol = Float.parseFloat(charge.getAttribute("volume", "1"));
float cap = Float.parseFloat(getAttribute("capacity", "0"));
return (int)(cap / cvol);
}
return 0;
}
COM: <s> get the maximum charges that the module can hold </s>
|
funcom_train/11358220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCurrentPath() {
String p = "";
// find the element at each level
for (Stack<String> h : path) {
String element = h.get(h.size() - 1);
Integer index = -1;
// find the element's index
for (String e : h) {
if (e.equals(element)) {
index++;
}
}
// path with the index at each level
p += "/" + element + "[" + index + "]";
}
return p;
}
COM: <s> computes the current path by crossing the path stack </s>
|
funcom_train/39406244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextField2() {
if (jTextFieldMiddleName == null) {
jTextFieldMiddleName = new JTextField();
jTextFieldMiddleName.setName("jTextField2");
jTextFieldMiddleName.addFocusListener(new FocusStyle());
jTextFieldMiddleName.setToolTipText(getMainFrame().getI18N().translate("Tussenvoegsels"));
jTextFieldMiddleName.addActionListener(new ActionNextFocusListener());
}
return jTextFieldMiddleName;
}
COM: <s> this method initializes j text field2 </s>
|
funcom_train/39482793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasWaitersIAE () {
final ReentrantLock lock = new ReentrantLock(fairness);
final Condition c = (lock.newCondition());
final ReentrantLock lock2 = new ReentrantLock(fairness);
try {
lock2.hasWaiters(c);
shouldThrow();
} catch (IllegalArgumentException success) {
} catch (Exception ex) {
unexpectedException();
}
}
COM: <s> has waiters throws iae if not owned </s>
|
funcom_train/37427859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object receiveResponsesOrException(InputStream inputStream) throws IOException, ClassNotFoundException {
Object object;
ObjectInputStream objectis=new ObjectInputStream(inputStream);
try {
object=objectis.readObject();
} catch (IOException deserializeFailure) {
throw deserializeFailure;
} catch (ClassNotFoundException deserializeFailure) {
throw deserializeFailure;
} finally {
objectis.close();
}
return object;
}
COM: <s> internal method which decodes a stream of incoming responses or </s>
|
funcom_train/31980821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDocumentURI(){
Pattern docuri = Pattern.compile("up2p:[a-f0-9]+/[a-f0-9]+"); //todo: figure out how to say : 32 times a pattern.
Matcher mmm = docuri.matcher(stringValue);
return (mmm.matches() && stringValue.substring(QMARK-1, QMARK).equals("/")); }
COM: <s> check if this uri identifies a up2 p document if its well formed </s>
|
funcom_train/36852021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadConstant(String value) {
int index = constantPool.addString(value);
if (index <= Byte.MAX_VALUE) {
writeOpCode(0x12); // ldc
write1(index);
} else {
writeOpCode(0x13); // ldc_w
write2(index);
}
incrementStack(1);
}
COM: <s> opcode to load a string constant </s>
|
funcom_train/28169163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ConnectionFigure findConnection(Point2D.Double p, Drawing drawing) {
for (Figure f : drawing.getFiguresFrontToBack()) {
Figure fInside = f.findFigureInside(p);
if (fInside != null && (fInside instanceof ConnectionFigure)) {
return (ConnectionFigure) fInside;
}
}
return null;
}
COM: <s> finds an existing connection figure </s>
|
funcom_train/41737572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getInitStateBtn() {
if (initStateBtn == null) {
initStateBtn = new JButton();
initStateBtn.setText("");
initStateBtn.setName("initbtn");
initStateBtn.setIcon(new ImageIcon(getClass().getResource("/icon/gexing_012.png")));
initStateBtn.setToolTipText("Restart");
initStateBtn.setPreferredSize(new Dimension(70, 70));
initStateBtn.addActionListener(VRMUIEventHandler.get());
}
return initStateBtn;
}
COM: <s> this method initializes init state btn </s>
|
funcom_train/1003586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getResourceAsStream(String name) {
if (name.charAt(0) == '/') {
name = name.substring(1);
}
if (s_Resources.containsKey("/" + name)) {
return new ByteArrayInputStream((byte[]) s_Resources.get("/" + name));
}
return super.getResourceAsStream(name);
}
COM: <s> get resource as stream </s>
|
funcom_train/18755098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element createXML(Document doc) {
Element node = doc.createElement("node");
node.setAttribute("id", label);
Element x = doc.createElement("data");
x.setAttribute("key", "x");
x.appendChild(doc.createTextNode(""+position.getX()));
node.appendChild(x);
Element y = doc.createElement("data");
y.setAttribute("key", "y");
y.appendChild(doc.createTextNode(""+position.getX()));
node.appendChild(y);
return node;
}
COM: <s> creates an xml tag for this node </s>
|
funcom_train/34111496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFromTemplate() {
if (table.isDocumentSelected() && table.getDocument() != null) {
Main.get().activeFolderTree.folderSelectPopup.setEntryPoint(FolderSelectPopup.ENTRYPOINT_BROWSER);
Main.get().activeFolderTree.folderSelectPopup.setToCreateFromTemplate(table.getDocument());
Main.get().activeFolderTree.showDirectorySelectPopup();
}
}
COM: <s> copy file or folder on file browser </s>
|
funcom_train/45320586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJt12() {
if (jt12 == null) {
jt12 = new JTextField();
jt12.setBounds(34, 5, 28, 25);
jt12.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent e) {
jugadorColoca(jt12, (byte) 0, (byte) 1);
}
});
}
return jt12;
}
COM: <s> this method initializes j text field1 </s>
|
funcom_train/26370449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireVehicleEvent(VehicleEvent event){
Object[] listeners = (Object[])eventListenerList.getListeners(VehicleEventListener.class);
for(int i=0; i<listeners.length; i++){
Object listener = listeners[i];
((VehicleEventListener)listeners[i]).vehicleScanned(event);
}
}
COM: <s> this method is used to fire a vehicle event to all registered </s>
|
funcom_train/35361892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPrefixInteger(String prefix, String key, int Default) {
String v = getPrefixProperty(prefix, key, null);
if (v == null) {
return Default;
}
try {
int i = Integer.decode(v);
return i;
} catch (NumberFormatException e) {
LOG.log(Level.WARNING, null, e);
return Default;
}
}
COM: <s> gets a prefixed integer from the properties </s>
|
funcom_train/31292470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyRemainigNodes() {
final Collection<XmlNode> nodes = menu.getChildren();
for (XmlNode node : nodes) {
if (!(node instanceof Prompt) && !(node instanceof Choice)
&& !(node instanceof Enumerate)) {
final Node clonedNode = node.cloneNode(true);
field.appendChild(clonedNode);
}
}
}
COM: <s> copy everything except enumerate choices and prompts from the </s>
|
funcom_train/16981699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void routesMaintenance() {
if (this.getNetwork().size() > 0) {
for (int i = 0; i < this.getNetwork().size(); i++) {
RouterAODV ra = (RouterAODV) this.getNetwork().elementAt(i);
HelloAODV hello = new HelloAODV(ra.getStation(), ra
.getNoSequence(), 0, ra.getNoRequest(), 1);
ra.sendToAllNeighbors(hello);
}
}
}
COM: <s> send hello of each station in the network to its neighbors </s>
|
funcom_train/18589022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTotals() {
String temp = songs.size() > 0 ? "Songs: " + songs.size() + " Total size: " + songs.getTotalSize() : "Empty playlist";
infoLabel.setText(temp);
sendButton.setEnabled(songs.size() > 0);
}
COM: <s> updates the total number of songs and the size of the playlist and </s>
|
funcom_train/44626803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGhostForwardReference() {
addMockFile("$A/A.jml","public class A { \n//@ ghost int i = j; ghost int j; \n}");
helpTCF("A.java","public class A { }"
,"/$A/A.jml:2: illegal forward reference",19
);
}
COM: <s> flow checks for ghost fields </s>
|
funcom_train/2689678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendDefinitionMessage() {
ProtocolHandler ph = this.handlers
.getProtocolHandler(SSProtocolConstants.SEND_DEFINITION_MESSAGES);
((SendDefinitionMessagesHandler) ph)
.sendDefinitionMessage(this.session);
try {
this.getSF()
.setTitle(
(String) this.session
.get(SessionConstants.SUPRA_SPHERE)
+ " : "
+ (String) this.session
.get(SessionConstants.REAL_NAME));
this.getSF().getWelcomeScreen().closeFromWithin();
} catch (Throwable ex) {
logger.error("Error while setting supraSphereFrame title");
}
}
COM: <s> send reques to server to recevie start up spheres </s>
|
funcom_train/22782412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Image o1, Image o2) {
if (o1 == null || o1.getTitle() == null) {
if (o2 == null || o2.getTitle() == null)
return 0;
return -1;
}
if (o2 == null || o2.getTitle() == null)
return 1;
return o1.getTitle().compareToIgnoreCase(o2.getTitle());
}
COM: <s> comparator that compares the titles of two images using the compare to </s>
|
funcom_train/656085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspException {
// Remove the page scope attributes we created
pageContext.removeAttribute(Constants.SELECT_KEY);
// Render a tag representing the end of our current form
StringBuffer results = new StringBuffer();
if (saveBody != null) {
results.append(saveBody);
}
results.append("</select>");
ResponseUtils.write(pageContext, results.toString());
return (EVAL_PAGE);
}
COM: <s> render the end of this form </s>
|
funcom_train/46628532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int count() {
if (out instanceof StringBuilder) {
return ((StringBuilder)out).length()-initOutLength;
} else if (out instanceof StringBuffer) {
return ((StringBuffer)out).length()-initOutLength;
} else {
// Cannot happen, since out can only be a
// StringBuffer or StringBuilder
return 0;
}
}
COM: <s> returns the number of characters written through this backend </s>
|
funcom_train/27863402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MenuItem getItemForGlyph(Glyph glyph){
int idx = elems.indexOf(glyph);
if(idx == -1){
return null;
}
assert(elems.get(idx).getOwner() instanceof MenuItem);
return (MenuItem)(elems.get(idx).getOwner());
}
COM: <s> returns the menu item associated to a given glyph if </s>
|
funcom_train/1539089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean multipleOf( ExpVector V ) {
byte[] u = val;
byte[] v = ((ExpVectorByte)V).val;
boolean t = true;
for (int i = 0; i < u.length; i++ ) {
if ( u[i] < v[i] ) {
return false;
}
}
return t;
//return EVMT(this, V);
}
COM: <s> exp vector multiple test </s>
|
funcom_train/4425661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String selectNetwork(Vertex vertex, Shell shell) {
IProject project = getProject(vertex);
FilteredRefinementDialog dialog = new FilteredRefinementDialog(project,
shell, "xdf");
dialog.setTitle("Select network");
dialog.setMessage("&Select existing network:");
String refinement = getRefinement(vertex);
if (refinement != null) {
dialog.setInitialPattern(refinement);
}
int result = dialog.open();
if (result == Window.OK) {
return (String) dialog.getFirstResult();
}
return null;
}
COM: <s> selects the qualified identifier of a network </s>
|
funcom_train/944453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFriendlyLabel (String uri, boolean signalMissingLabel) {
String label = this.getLabel(uri);
if (label == null) label = this.getTitle(uri);
if ((label == null) || "".equals(label)) {
label = Util.getLocalnameForURI(uri);
if (signalMissingLabel) label = "[" + label + "]";
}
return label;
}
COM: <s> return a real or synthetic label for term </s>
|
funcom_train/29773976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleEvent(VimEvent ve) throws VimException {
String event = ve.getEvent();
if (event.equals("save") == true || event.equals("unmodified") == true) {
for (AbstractVimEditor veditor : VimPlugin.getDefault()
.getVimserver(ve.getConnection().getVimID()).getEditors()) {
if (veditor.getBufferID() == ve.getBufferID())
veditor.setDirty(false);
}
}
}
COM: <s> removes the star from the editors title on save or unmodified </s>
|
funcom_train/33133682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dereference(AResolver<? super T> l) {
switch (state) {
case UNRESOLVED:
if (firstListener == null) {
firstListener = l;
} else {
if (listeners == null)
listeners = new LinkedList<AResolver<? super T>>();
listeners.addLast(l);
}
break;
case RESOLVED:
try {
l.resolve(value());
} catch (Throwable t) {
log.log(java.util.logging.Level.SEVERE,
"promise listener thrown an error", t);
}
break;
case SMASHED:
try {
l.smash(Promise.this.problem());
} catch (Throwable t) {
log.log(java.util.logging.Level.SEVERE,
"promise listener thrown an error", t);
}
break;
default:
throw new IllegalStateException("Promise is in unknown state: "
+ state);
}
}
COM: <s> register resolver for the promise </s>
|
funcom_train/51704241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void columnChanged(Object source, int columnIndex, int rowCount){
if (hasTDListeners){
notifyTableDataChanged(new TableDataEvent(
source, TYPE_COLUM_EDITED, 0, columnIndex, rowCount-1, columnIndex));
}
if (hasTMListeners){
notifyTableModelChanged(new TableModelEvent2(
source, 0, rowCount-1, columnIndex));
}
}
COM: <s> notifies all listeners that the content of a table column changed </s>
|
funcom_train/13969783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performAttachmentRemovedEvent (AttachmentEvent event) {
File file = removeAttachment(event.getIncident(), event.getAttachment());
fireIncidentProcessedEvent(event.getIncident(), (file != null && file.exists()), "Persistency: Store operation on incident '" + event.getIncident().getIncidentSignature() + "' (attachment removed).");
}
COM: <s> removes the removed code attachment code from the fs </s>
|
funcom_train/2894120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateSitePropertySelectBox(String name, List properties, int iSize, String curValue) {
List values = new ArrayList();
if (curValue != null && curValue.trim().length() > 0) {
values.add(curValue);
}
return generateSitePropertySelectBox(name, properties, iSize, values, false);
}
COM: <s> site property select box with multiple select disabled </s>
|
funcom_train/10671284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*
* public Result testGetVetoableChangeListeners05() { VetoableChangeSupport
* propertyChangeSupport = new VetoableChangeSupport( "bean1");
* propertyChangeSupport.addVetoableChangeListener(new SimpleProxy(
* "property1", new SimpleListener()));
* assertEquals(propertyChangeSupport.getVetoableChangeListeners()[0]
* .getClass(), SimpleListener.class); return passed(); }
COM: <s> verify that get vetoable change listeners method returns </s>
|
funcom_train/29837434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComponent getComponent() {
// textField = new JTextField(displayable.getValue().toString());
// textField.setEditable(false);
// textField.setColumns(30);
// panel.add(textField);
textField.setMinimumSize(new Dimension(0, 20));
textField.setPreferredSize(new Dimension(50, 30));
textField.setMaximumSize(new Dimension(2000, 40));
// textField.setSize(100, 30);
return textField;
}
COM: <s> return the component used to display the displayable </s>
|
funcom_train/8222263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Comparator getComparator(int column) {
Class columnType = tableModel.getColumnClass(column);
Comparator comparator = (Comparator) columnComparators.get(columnType);
if (comparator != null) {
return comparator;
}
if (Comparable.class.isAssignableFrom(columnType)) {
return COMPARABLE_COMPARATOR;
}
return LEXICAL_COMPARATOR;
}
COM: <s> gets the comparator </s>
|
funcom_train/48505838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printModelListenerFields(Printer printer) {
String modelListenerClassName =
modelMetaDesc.getModelListenerClassName();
if (modelListenerClassName != null
&& !modelListenerClassName.equals(ModelListener)) {
printer.println(
"private static final %1$s slim3_modelListener = new %1$s();",
modelListenerClassName);
printer.println();
}
}
COM: <s> generates model listener fields </s>
|
funcom_train/23245377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LatLon getLatLon(final int x, final int y) {
EastNorth eastNorth = new EastNorth(
center.east() + (x - getWidth() / 2.0) * scale,
center.north() - (y - getHeight() / 2.0) * scale);
return getProjection().eastNorth2latlon(eastNorth);
}
COM: <s> warning the returned coordinates may be illegal if the </s>
|
funcom_train/43244966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCalendarFromVistADate() {
System.out.println("getCalendarFromVistADate");
String dateAsString = "";
Calendar expResult = null;
Calendar result = DateHandler.getCalendarFromVistADate(dateAsString);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get calendar from vist adate method of class org </s>
|
funcom_train/46862066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getSplitPaneRight() {
if (splitPaneRight == null) {
splitPaneRight = new JSplitPane();
splitPaneRight.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPaneRight.setResizeWeight(1.0D);
splitPaneRight.setDividerLocation(200);
splitPaneRight.setDividerSize(8);
splitPaneRight.setContinuousLayout(true);
splitPaneRight.setTopComponent(getPnlLayers());
splitPaneRight.setBottomComponent(getPnlProperties());
splitPaneRight.setOneTouchExpandable(true);
}
return splitPaneRight;
}
COM: <s> this method initializes split pane right </s>
|
funcom_train/11708387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long extractInputPears() throws IOException {
long totalSize = 0;
for (int i = 0; i < _inpPearFiles.length; i++) {
JarFile pearFile = new JarFile(_inpPearFiles[i]);
totalSize += FileUtil.extractFilesFromJar(pearFile, _outDlgRootDirs[i]);
}
return totalSize;
}
COM: <s> extracts all specified input pears to their corresponding folders inside the output root </s>
|
funcom_train/35157670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPoint(int x, int y) {
_xPos = x;
_yPos = y;
if (x > _width - _dropSize)
x = _width - _dropSize;
if (y > _height - _dropSize)
y = _height - _dropSize;
if (x < 0)
x = 0;
if (y < 0)
y = 0;
_waveDeform.drop(x, y, 300, _dropSize);
}
COM: <s> set a pick point to deform </s>
|
funcom_train/33480279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdLogout() {
if (cmdLogout == null) {//GEN-END:|63-getter|0|63-preInit
// write pre-init user code here
cmdLogout = new Command("Logout", Command.ITEM, 1);//GEN-LINE:|63-getter|1|63-postInit
// write post-init user code here
}//GEN-BEGIN:|63-getter|2|
return cmdLogout;
}
COM: <s> returns an initiliazed instance of cmd logout component </s>
|
funcom_train/5023676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMarqueeBehavior(int type) {
if ((type != BEHAVIOR_CONNECTIONS_TOUCHED) && (type != BEHAVIOR_NODES_CONTAINED) && (type != BEHAVIOR_NODES_AND_CONNECTIONS)) {
throw new IllegalArgumentException("Invalid marquee behaviour specified."); //$NON-NLS-1$
}
marqueeBehavior = type;
}
COM: <s> sets the type of parts that this tool will select </s>
|
funcom_train/15954485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsertBoolean() throws BMLException{
String lsValue = "Good";
DataString ldString = new DataString(fBlank);
ldString.setString(lsValue);
boolean lValue = true;
ldString.insert(1,lValue);
assertEquals("Gtrueood",ldString.toString());
}
COM: <s> test of insert method using offset boolean </s>
|
funcom_train/5395723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteFiltered() {
System.out.println("writeFiltered");
File input = null;
File output = null;
FISerializer instance = null;
instance.writeFiltered(input, output);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of write filtered method of class org </s>
|
funcom_train/19177006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Transaction txn, Database database) throws DaapException {
if (!txn.isOpen()) {
throw new DaapException("Transaction is not open");
}
LibraryTxn obj = (LibraryTxn) txn.getAttribute(this);
if (obj == null) {
throw new DaapException();
}
obj.add(database);
}
COM: <s> adds database to this library b note b only one database per library </s>
|
funcom_train/50863495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAssociatedSettlement(Settlement newSettlement) {
if (associatedSettlement != newSettlement) {
Settlement oldSettlement = associatedSettlement;
associatedSettlement = newSettlement;
fireUnitUpdate(ASSOCIATED_SETTLEMENT_EVENT, associatedSettlement);
if (oldSettlement != null)
oldSettlement.fireUnitUpdate(
Settlement.REMOVE_ASSOCIATED_PERSON_EVENT, this);
if (newSettlement != null)
newSettlement.fireUnitUpdate(
Settlement.ADD_ASSOCIATED_PERSON_EVENT, this);
}
}
COM: <s> sets the associated settlement for a person </s>
|
funcom_train/44891059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Module changeModule(IFile resource) {
Module module = (Module) this.getModule(resource);
File moduleFile = resource.getLocation().toFile();
Module newModule = this.getDefinitionOrError(moduleFile);
if (module == null) {
module = newModule;
module.setResource(resource);
} else
module.update(newModule);
this.updateMarkers(module);
this.triggerChange(new ChangeModuleEvent(this, module));
return module;
}
COM: <s> the given resource has changed </s>
|
funcom_train/36784661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyKeyTyped(KeyEvent tempEvent) {
KeyListener[] keyListenerArray = new KeyListener[keyListeners.size()];
keyListeners.toArray(keyListenerArray);
for(int i=0;i<keyListenerArray.length;i++){
keyListenerArray[i].keyTyped(tempEvent);
}
}
COM: <s> notification that a key has been typed whilst this component has focus </s>
|
funcom_train/17286784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getOpenMenuItem() {
if (openMenuItem == null) {
openMenuItem = new JMenuItem();
openMenuItem.setAccelerator(KeyStroke.getKeyStroke('o'));
openMenuItem.setText("Open");
openMenuItem.setMnemonic(KeyEvent.VK_O);
openMenuItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
open();
}});
}
return openMenuItem;
}
COM: <s> this method initializes open menu item </s>
|
funcom_train/28755286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDatecreated(java.util.Date newVal) {
if ((newVal != null && this.datecreated != null && (newVal.compareTo(this.datecreated) == 0)) ||
(newVal == null && this.datecreated == null && datecreated_is_initialized)) {
return;
}
this.datecreated = newVal;
datecreated_is_modified = true;
datecreated_is_initialized = true;
}
COM: <s> setter method for datecreated </s>
|
funcom_train/7371912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void join(String sep, String[] strings) {
if (strings == null) {
return;
}
for (int i = 0; i < strings.length; ++i) {
if (i != 0) {
ps.print(sep);
}
ps.print(strings[i]);
}
}
COM: <s> helper function to print a string array </s>
|
funcom_train/25936634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Value parseObject(BufferedInputStream bis) throws IOException, RDFParseException {
mark(bis);
char c = readChar(bis);
reset(bis);
if( c == '<' ) {
return parseURI(bis);
} else if( c == '_') {
return parseBNode(bis);
} else {
return parseLiteral(bis);
}
}
COM: <s> parses the the object sequence </s>
|
funcom_train/45246240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldGamaK2P() {
if (jNumberFloatFieldGamaK2P == null) {
jNumberFloatFieldGamaK2P = new JNumberFloatField();
jNumberFloatFieldGamaK2P.setLocation(new Point(345, 279));
jNumberFloatFieldGamaK2P.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldGamaK2P;
}
COM: <s> this method initializes j number float field gama k2 p </s>
|
funcom_train/16422969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTopPanel() {
if (topPanel == null) {
GridLayout gridLayout = new GridLayout();
gridLayout.setColumns(1); // Generated
topPanel = new JPanel();
topPanel.setLayout(gridLayout); // Generated
topPanel
.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); // Generated
topPanel.add(getTopBtnBar()); // Generated
}
return topPanel;
}
COM: <s> this method initializes top panel </s>
|
funcom_train/21954128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSearchTerm(String rootProperty, VariableBundle bundle) {
searchTerms = new Vector();
entryPanel = new JPanel();
entryPanel.setLayout(new BoxLayout(entryPanel,BoxLayout.Y_AXIS));
addSearchTermProperty(rootProperty, bundle, FIRST);
entryScrollPane.setViewportView(entryPanel);
entryPanel.revalidate();
}
COM: <s> this sets the currently depicted search term to the one defined by </s>
|
funcom_train/13768720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSheetIndex(String name) {
name = name.trim();
for (int i = 0 ; i < sheets.size() ; ++i) {
XSSFSheet sheet = sheets.get(i);
if (name.equalsIgnoreCase(sheet.getSheetName().trim())) {
return i;
}
}
return -1;
}
COM: <s> returns the index of the sheet by his name case insensitive match </s>
|
funcom_train/51786009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getResult() {
Object result=null;
int bestCount=0;
Iterator i=kCount.keySet().iterator();
while(i.hasNext()) {
Object key=i.next();
Integer count=(Integer)kCount.get(key);
if(count.intValue()==bestCount)
result=null;
else if(count.intValue()>bestCount) {
bestCount=count.intValue();
result=key;
}
}
if(result!=null)
getLogger().debug("score="+getScorePercent(result)+"%");
return result;
}
COM: <s> get the result of the vote </s>
|
funcom_train/34627226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractEntry copy() {
ReferenceEntry re = new ReferenceEntry(key, info);
re.startLine = startLine;
re.endLine = endLine;
re.author = author;
re.journal = journal;
re.year = year;
re.refFile = refFile;
re.fileName = fileName;
re.position = position;
return re;
}
COM: <s> returns a shallow copy of this reference </s>
|
funcom_train/23779585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResultAsString() {
if (_resultBuffers == null || _resultBuffers.size() == 0)
return "";
StringBuffer buf = new StringBuffer(BUFFER_SIZE);
int lastBuf = _resultBuffers.size();
for (int i = 0; i < lastBuf; i++) {
byte[] resBuf = (byte[]) _resultBuffers.get(i);
buf.append(new String(resBuf));
}
return buf.toString();
}
COM: <s> returns the full result buffer as string </s>
|
funcom_train/10598944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getAttribute(Map objectModel, Configuration conf, String module, String name, Object deflt) throws InputModuleException {
Object result = this.get(OP_GET, module, name, objectModel, conf);
if (result == null) result = deflt;
return result;
}
COM: <s> get a single attribute value from a module </s>
|
funcom_train/33639936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List buildEdges() {
ArrayList edges = new ArrayList();
for (int i = 1; i < size(); i++) {
Node prev = (Node)get(i-1);
Node curr = (Node)get(i);
Edge e = curr.getEdge(prev);
if (e != null) edges.add(e);
else return(null);
}
return(edges);
}
COM: <s> internal method for building the edge set of the walk </s>
|
funcom_train/15666898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(Properties properties) {
try {
cache = new org.jboss.cache.TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure(cache, "treecache.xml");
/*TransactionManagerLookup transactionManagerLookup = TransactionManagerLookupFactory
.getTransactionManagerLookup(properties);
if (transactionManagerLookup != null) {
cache
.setTransactionManagerLookup(new TransactionManagerLookupAdaptor(
transactionManagerLookup, properties));
transactionManager = transactionManagerLookup
.getTransactionManager(properties);
}*/
cache.start();
} catch (Exception e) {
throw new PersistenceException(e);
}
}
COM: <s> prepare the underlying jboss cache tree cache instance </s>
|
funcom_train/43665486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEditServiceNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GClass_editServiceName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GClass_editServiceName_feature", "_UI_GClass_type"),
XmdlgenPackage.Literals.GCLASS__EDIT_SERVICE_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the edit service name feature </s>
|
funcom_train/32112167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoreAnimation getCoreAnimation(int coreAnimationId) {
if((coreAnimationId < 0) || (coreAnimationId >= vectorCoreAnimation.size())) {
//TODO afegir exepcio
//CalError::setLastError(CalError::INVALID_HANDLE, __FILE__, __LINE__);
return null;
}
return vectorCoreAnimation.get(coreAnimationId);
}
COM: <s> provides access to a core animation </s>
|
funcom_train/51821658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFolder(int load) {
try {
JFileChooser jfc = new JFileChooser(getDefaultDir());
int jfcVal;
jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
if (load == 1) {
jfcVal = jfc.showOpenDialog(this);
} else {
jfcVal = jfc.showSaveDialog(this);
}
if (jfcVal == JFileChooser.CANCEL_OPTION) {
return null;
} else {
return jfc.getSelectedFile().getCanonicalPath();
}
} catch (Exception e) {
System.err.println(e);
}
return null;
}
COM: <s> loads a file dialog that only shows folders </s>
|
funcom_train/42707777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openFile() {
int response = opener.showOpenDialog(this);
if (response != JFileChooser.CANCEL_OPTION) {
File x = opener.getSelectedFile();
KlangProgressWindow prog = new KlangProgressWindow(this);
prog.openKlangFile(x, this, null);
if (!(prog.getErrMsg().equals(""))) {
JOptionPane.showMessageDialog(this, prog.getErrMsg(), KlangConstants.ERROR_TITLE, JOptionPane.ERROR_MESSAGE);
}
}
}
COM: <s> open a file for reading editing </s>
|
funcom_train/44154752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAttributes(Class target) {
Set<SecurityConfig> attributes = new HashSet<SecurityConfig>();
for (Annotation annotation : target.getAnnotations()) {
// check for RolesAllowed annotations
if (annotation instanceof RolesAllowed) {
RolesAllowed attr = (RolesAllowed) annotation;
for (String auth : attr.value()) {
attributes.add(new SecurityConfig(auth));
}
break;
}
}
return attributes;
}
COM: <s> get the code roles allowed code attributes for a given target class </s>
|
funcom_train/39870369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestPermission(UsbAccessory accessory, PendingIntent pi) {
try {
mService.requestAccessoryPermission(accessory, mContext.getPackageName(), pi);
} catch (RemoteException e) {
Log.e(TAG, "RemoteException in requestPermission", e);
}
}
COM: <s> requests temporary permission for the given package to access the accessory </s>
|
funcom_train/37508384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTextField getTextImagePattern() {
if (m_textImagePattern == null) {
m_textImagePattern = new JTextField();
m_textImagePattern.setPreferredSize(new Dimension(250,
m_textImagePattern.getPreferredSize().height));
m_textImagePattern.setEnabled(false);
m_textImagePattern.setEditable(false);
}
return m_textImagePattern;
}
COM: <s> returns the textfield for the image pattern file </s>
|
funcom_train/13439553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PTextItem getSelectedItem(){
TreePath parentPath=tree.getSelectionPath();
DefaultMutableTreeNode node;
if (parentPath==null) return null;
else node=(DefaultMutableTreeNode)parentPath.getLastPathComponent();
if (node != null) return (PTextItem)node.getUserObject();
return null;
}
COM: <s> returns the selected item or null if there is no one selected </s>
|
funcom_train/20891862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeXMLOutput(String outputFile, Document configDocument) throws IOException {
String file = outputFile;
XMLOutputter outputter = new XMLOutputter();
Format f = Format.getPrettyFormat();
f.setIndent(" ");
outputter.setFormat(Format.getPrettyFormat());
if (!file.endsWith(".xml")) {
file = file + ".xml";
}
BufferedWriter write = null;
try {
write = new BufferedWriter(new FileWriter(new File(file)));
outputter.output(configDocument, write);
} finally {
closeCloseable(write);
}
}
COM: <s> writes the config document to a configuration file </s>
|
funcom_train/7660427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContainsAll() {
LinkedList q = populatedQueue(SIZE);
LinkedList p = new LinkedList();
for (int i = 0; i < SIZE; ++i) {
assertTrue(q.containsAll(p));
assertFalse(p.containsAll(q));
p.add(new Integer(i));
}
assertTrue(p.containsAll(q));
}
COM: <s> contains all c is true when c contains a subset of elements </s>
|
funcom_train/1378071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decode(ServiceEncoding encoding) {
String servletPath = encoding.getServletPath();
if(servletPath.endsWith(MEDIA_PATH))
{
String encodingPath = encoding.getPathInfo();
encoding.setServletPath("/app");
encoding.setParameterValue("service", MediaViewService.SERVICE_NAME);
encoding.setParameterValue(MediaViewService.MEDIA_PATH, encodingPath);
}
}
COM: <s> decodes the friendly url path media to the media view service </s>
|
funcom_train/45599423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerRegularIncrementalScriptRenames() {
for (ExecutedScript renamedIndexedExecutedScript : renamedIndexedScripts.keySet()) {
registerRegularScriptRename(ScriptUpdateType.INDEXED_SCRIPT_RENAMED, renamedIndexedExecutedScript.getScript(), renamedIndexedScripts.get(renamedIndexedExecutedScript));
}
}
COM: <s> take all script renames that were registered using the method </s>
|
funcom_train/207611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String resolveIP(String ip) {
int startBracket, endBracket;
String goodIP, hostName;
startBracket = ip.indexOf('[');
endBracket = ip.indexOf(']');
if (startBracket == -1 || endBracket == -1)
return ip;
else {
goodIP = ip.substring(startBracket+1, endBracket);
try {
hostName = InetAddress.getByName(goodIP).getHostName();
return hostName;
}
catch (UnknownHostException e) {
return goodIP;
}
}
}
COM: <s> helper function used by constructor takes the dest field from the line </s>
|
funcom_train/40677752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean seek(long time, TimeUnit unit) {
return seek(1.0, Format.TIME, SeekFlags.FLUSH | SeekFlags.KEY_UNIT,
SeekType.SET, TimeUnit.NANOSECONDS.convert(time, unit),
SeekType.NONE, -1);
}
COM: <s> sets the current position in the media stream </s>
|
funcom_train/46458992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDrawingInImageSpace(boolean imagespace) {
drawingInImageSpace = imagespace;
if (imagespace) {
setAutoscaleX(false);
setAutoscaleY(false);
}
else {
setAutoscaleX(true);
setAutoscaleY(true);
}
firePropertyChange("imagespace", null, new Boolean(imagespace)); //$NON-NLS-1$
repaint();
}
COM: <s> sets the drawing space to imagespace or worldspace </s>
|
funcom_train/50586778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkForStopScenario(HTTPResponse serverResponse) {
try {
CSTProcedureManager.getInstance().run(
response,
serverResponse,
testcasecollectionnames);
}
catch (Exception e1) {
getMyPlayer().stopScenario();
e1.printStackTrace();
fail(e1.getMessage() );
}
//TODO comparator manger for client and server comparators
if (stateCompMng != null) {
//server Comps
try {
stateCompMng.evaluateTestResults();
}
catch (TestStateException e) {
getMyPlayer().stopScenario();
fail(e.toString());
e.printStackTrace();
}
}
}
COM: <s> run all specified testcases to this teststep </s>
|
funcom_train/35691116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPageCount() {
UIData uiData = getUIData();
int rows = uiData.getRows();
int pageCount;
if (rows > 0) {
pageCount = rows <= 0 ? 1 : uiData.getRowCount() / rows;
if (uiData.getRowCount() % rows > 0) {
pageCount++;
}
} else {
rows = 1;
pageCount = 1;
}
return pageCount;
}
COM: <s> p return the value of the code page count code property </s>
|
funcom_train/8437018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOpenCorpus() throws Exception {
System.out.println("openCorpus");
File file = new File("test.idx");
Corpus expResult = instance;
Corpus result = Corpus.openCorpus(file);
assertEquals(expResult.size(),result.size());
}
COM: <s> test of open corpus method of class nii </s>
|
funcom_train/20238104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeptideIdentification getIdentificationForType(String aType){
// Iterate over all the types of the RatioGroup.
for (int i = 0; i < iPeptideTypes.size(); i++) {
String s = iPeptideTypes.get(i);
if(s.equals(aType)){
// Return the Identification that matches the type parameter.
return iIdentifications.get(i);
}
}
return null;
}
COM: <s> returns the peptide identification for the given type </s>
|
funcom_train/32094131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SolutionStep getAlsXYWing(boolean onlyOne) {
steps.clear();
collectAllAlses();
collectAllRestrictedCommons(Options.getInstance().isAllowAlsOverlap());
SolutionStep step = getAlsXYWingInt(onlyOne);
if (!onlyOne && steps.size() > 0) {
Collections.sort(steps, alsComparator);
step = steps.get(0);
}
return step;
}
COM: <s> finds the next als xy wing </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.