__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/17529171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCausalityEvent(Event e) {
this.ica.put(e, new HashSet<BPNode>());
this.ca.put(e, new HashSet<BPNode>());
Collection<Condition> cs = e.getPreConditions();
for (Condition c : cs) this.ica.get(e).addAll(this.ica.get(c));
this.ica.get(e).addAll(cs);
for (BPNode n : this.ica.get(e)) {
this.ca.get(n).add(e);
}
}
COM: <s> update causality relation based on an event </s>
|
funcom_train/47675409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPanel() {
// init if null
if (this.panel == null) {
// create
this.panel = new JPanel(new BorderLayout());
// add the combobox
this.panel.add(BorderLayout.EAST, getComboBox());
// add the textfield
this.panel.add(BorderLayout.CENTER, getTextField());
}
return this.panel;
}
COM: <s> get the panel </s>
|
funcom_train/14517569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRevokationCodeFromUserData(UserDataVO userData) {
String retval = null;
if(userData != null && userData.getExtendedinformation() != null
&& userData.getExtendedinformation().getRevocationCodeIdentifier() != null){
retval = userData.getExtendedinformation().getRevocationCodeIdentifier();
}
if(retval == null){
resultMajor = XKMSConstants.RESULTMAJOR_SENDER;
resultMinor = XKMSConstants.RESULTMINOR_NOAUTHENTICATION;
}
return retval;
}
COM: <s> method that returns the revokation code identifier in the extended information </s>
|
funcom_train/3810211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NumberFormat getNumberFormat(String pPattern) {
Locale locale = getLocale();
if (locale == null) {
return new DecimalFormat(pPattern);
} else {
NumberFormat format = NumberFormat.getNumberInstance(locale);
((DecimalFormat) format).applyLocalizedPattern(pPattern);
return format;
}
}
COM: <s> p returns an instance of number format with the given format pattern </s>
|
funcom_train/5395492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEncodeInt() {
System.out.println("encodeInt");
int value = 0;
byte[] expResult = null;
byte[] result = DecodeEncodePrimitives.encodeInt(value);
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 encode int method of class org </s>
|
funcom_train/35320049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccessibleRowDescription(int r, Accessible a) {
if (r < 0 || r >= getAccessibleRowCount()) {
throw new IllegalArgumentException(Integer.toString(r));
}
if (rowDescription == null) {
int numRows = getAccessibleRowCount();
rowDescription = new Accessible[numRows];
}
rowDescription[r] = a;
}
COM: <s> sets the description text of the specified row of the table </s>
|
funcom_train/4233143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getChannelDisplay(String channelName) {
String seriesName = channelName;
Channel channel = rbnbController.getChannel(channelName);
if (channel != null) {
String unit = channel.getUnit();
if (unit != null) {
seriesName += " (" + unit + ")";
}
}
return seriesName;
}
COM: <s> get the string for this channel to display in the ui </s>
|
funcom_train/46459105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartFrameNumber(int n) {
if (n == startFrameNumber) return;
n = Math.max(0, n);
startFrameNumber = Math.min(endFrameNumber, n);
firePropertyChange("startframe", null, new Integer(startFrameNumber)); //$NON-NLS-1$
}
COM: <s> sets the start frame number </s>
|
funcom_train/36117367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addNewNode(NodeBean newNode) {
synchronized (nodeList) {
Iterator<NodeBean> iter = nodeList.iterator();
NodeBean nodeInList;
while (iter.hasNext()) {
nodeInList = iter.next();
if (nodeInList.equals(newNode)) {
log.error("node with id " + newNode.getNode_id()
+ " is already exist!");
return false;
}
}
nodeList.add(newNode);
return true;
}
}
COM: <s> add new node into node list called when received nodestart message </s>
|
funcom_train/16391793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnText(Object element, int columnIndex) {
Transition trans = (Transition) element;
switch (columnIndex) {
case 0:
return trans.getFrom();
case 1:
return trans.getTransition();
case 2:
return trans.getTo();
case 3:
return trans.getCondition();
}
return null;
}
COM: <s> returns the column text </s>
|
funcom_train/16751012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(K key1, L key2) {
Map<L, Integer> keyStore;
if (storage.containsKey(key1)) {
keyStore = storage.get(key1);
} else {
keyStore = new HashMap<L, Integer>();
storage.put(key1, keyStore);
}
int count = 1;
if (keyStore.containsKey(key2)) {
count = keyStore.get(key2) + 1;
}
keyStore.put(key2, count);
}
COM: <s> add the tag key1 key2 to the multi val map </s>
|
funcom_train/14585193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void incrementFumbles(String player) {
// adjustPlayerStat(player, false, false, 0, touchdown, false);
int i = getPlayersIdx(player);
if (i != -1) {
players[getPlayersIdx(player)].incrementFumbles();
} else {
System.out.println("Player " + player + " not found");
}
}
COM: <s> increases the fumbles for the given player by one </s>
|
funcom_train/32741611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldDefinition makeFieldOfType(String name, String type) {
if (type.startsWith("ptr ")) {
return makeFieldDefinition(name, type);
}
return new FieldDefinitionImpl(name.replaceAll("__", "->"), type.replaceAll("__", "->"));
}
COM: <s> makes a field definition with the elementary type </s>
|
funcom_train/20073507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void recomputeSize() {
long newSize = stsd.size() + stts.size() + stsz.size() + stsc.size() + stco.size();
if (ctts != null) {
newSize += ctts.size();
}
if (stss != null) {
newSize += stss.size();
}
setSize(ATOM_HEADER_SIZE + newSize);
}
COM: <s> compute the size for the stbl container atom </s>
|
funcom_train/31036176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectIdentifier append(int[] roid) {
if (roid.length == 0)
return this;
int[] oid = new int[arcs.length + roid.length];
System.arraycopy(arcs, 0, oid, 0, arcs.length);
System.arraycopy(roid, 0, oid, arcs.length, roid.length);
return new ObjectIdentifier(oid);
}
COM: <s> concatenates the specified arc array to the end of this </s>
|
funcom_train/28297940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setActiveOrder(int iOrder) {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - setActiveOrder");
System.out.println(" ::--> " + iOrder);
}
mActiveOrder = iOrder;
if (_Debug) {
System.out.println(" :: SeqActivity --> END - setActiveOrder");
}
}
COM: <s> sets the order of this activity in relation to its active siblings </s>
|
funcom_train/40459465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button iconWithCaptionButton() {
Image icon = WidgetImages.Instance.get().icon_Printer().createImage();
return new Button("Icon button", icon, new ClickHandler() {
public void onClick(ClickEvent event) {
showMessage("Icon button was clicked");
}
});
}
COM: <s> creates a button showing both a caption and an icon </s>
|
funcom_train/42068224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addManufacturerPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkSampler_manufacturer_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkSampler_manufacturer_feature", "_UI_ChunkSampler_type"),
WavPackage.Literals.CHUNK_SAMPLER__MANUFACTURER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the manufacturer feature </s>
|
funcom_train/28348223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connectMons(Channel p_chan) {
Vector chanVec;
try {
chanVec = getChannelVec(p_chan);
for (int i = 0; i < chanVec.size(); i++) {
mons.add(p_chan.addMonitorValue((InputPVTableCell) chanVec
.elementAt(i), Monitor.VALUE));
}
chanVec.removeAllElements();
} catch (ConnectionException e) {
System.out.println("Connection Exception");
} catch (MonitorException e) {
System.out.println("Monitor Exception");
}
}
COM: <s> internal method to connect the monitors </s>
|
funcom_train/37115671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(int index, double value) {
checkAddModifiable();
checkIndex(index);
ensureCapacity(size + 1);
System.arraycopy(data, index, data, index + 1, size - index);
data[index] = value;
size++;
return true;
}
COM: <s> adds a primitive value to this collection </s>
|
funcom_train/9126130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void connect() throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {
Class.forName("com.mysql.jdbc.Driver").newInstance();
dogeDBConnection=DriverManager.getConnection("jdbc:mysql://"+host+"/DoGe",username,password);
}
COM: <s> connects to database </s>
|
funcom_train/37004710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInsertField(JPanel panel, JLabel label, JComponent comp) {
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.gridx = 0;
panel.add(label, constraints);
constraints.gridx = 1;
panel.add(comp, constraints);
constraints.gridy++;
}
COM: <s> this method adds an component to the panel </s>
|
funcom_train/35165304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnected(boolean graceful) {
logger.info("Session " + sessionName + " has logged out. graceful=" + graceful);
// Channel ch = AppContext.getChannelManager().getChannel(TestDarkstarAppListener.PLAYER_LOCATIONS_CHANNEL);
// ch.send(this.getSession(), encodeString("PN=" + sessionName + ",DISCONNECTED"));
}
COM: <s> if the client is disconnected this gets called </s>
|
funcom_train/1007347 | /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 instanceof AffineTransform)) {
return false;
}
AffineTransform a = (AffineTransform)obj;
return ((m00 == a.m00) && (m01 == a.m01) && (m02 == a.m02) &&
(m10 == a.m10) && (m11 == a.m11) && (m12 == a.m12));
}
COM: <s> returns code true code if this code affine transform code </s>
|
funcom_train/21847427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean insideMethod(JTextComponent textComp, int startPos) {
try {
int level = 0;
BaseDocument doc = (BaseDocument) textComp.getDocument();
for (int i = startPos - 1; i > 0; i--) {
char ch = doc.getChars(i, 1)[0];
if (ch == ';')
return false;
if (ch == ')')
level++;
if (ch == '(') {
if (level == 0) {
return true;
} else {
level--;
}
}
}
return false;
} catch (BadLocationException e) {
return false;
}
}
COM: <s> checks whether caret is inside method </s>
|
funcom_train/46261617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
/* Establish Focus and starting position for text display */
canvas.requestFocus();
startingPosition = e.getPoint();
Graphics iBGraphics = canvas.getImageBufferGraphics();
iBGraphics.setFont(font);
text = new StringBuffer();
mytext = new TextObject(startingPosition,canvas.penColor, font);
IDrawingObjectLink mytextLink=new IDrawingObjectLink(mytext);
canvas.push(mytextLink);
}
COM: <s> start a new text object at the point supplied in e </s>
|
funcom_train/19066681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void userPass(String usr, char[] pass) throws IOException, POP3Exception {
POP3Response response;
mutex.lock();
sendCommand("USER", new String[] { usr });
try {
response = readSingleLineResponse();
if (response.isOK()) {
sendCommand("PASS", new String[] { new String(pass) });
response = readSingleLineResponse();
}
}
finally {
mutex.release();
}
if (!response.isOK()) {
throw new POP3Exception(response);
}
state = TRANSACTION;
}
COM: <s> authenticates a user with the simple user pass commands </s>
|
funcom_train/45936286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printEnclosingClass() {
ClassDoc outerClass = classDoc.containingClass();
if (outerClass != null) {
if (outerClass.isInterface())
println(open("dt") + Heading.ENCLOSING_INTERFACE + close("dt"));
else
println(open("dt") + Heading.ENCLOSING_CLASS + close("dt"));
println(open("dd") + linkToClass(outerClass)
+ typeParameters(outerClass) + close("dd"));
}
}
COM: <s> print enclosing class section in class heading </s>
|
funcom_train/21772754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testForMrXFinished() {
if (this.mrxCalls.isCallCycleFinished()) {
this.log.log(Level.FINE, "Done with Mr X");
this.agentAgi.setRecordList(this.recordList);
for (CallerListener listener : this.listeners) {
listener.mrxCallsFinished();
}
} else {
this.makeNextMrXCall();
}
}
COM: <s> are all mr x calls finished set records and call agents </s>
|
funcom_train/23010946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBounds(int x, int y, int w, int h) {
beginUpdate();
setColumnWidth(0, w - colWidth1 - colWidth2 - 24);
setColumnWidth(1, colWidth1);
setColumnWidth(2, colWidth2);
super.setBounds(x, y, w, h);
endUpdate();
}
COM: <s> set bounds of the component </s>
|
funcom_train/28262408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyReleased(KeyEvent keyEvent) {
// Pass keyPress on to keyboard to generate scancode from it
logger.log(Level.INFO, displayInfo(keyEvent, "KEY RELEASED: "));
if (emu != null) {
emu.notifyKeyboard(keyEvent, KEY_RELEASED);
}
}
COM: <s> implement the key listener method key released handles key release events </s>
|
funcom_train/48524547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void routeMyMsg(Id id) {
System.out.println(this+" sending to "+id+" at "+endpoint.getEnvironment().getTimeSource().currentTimeMillis());
Message msg = new MyMsg(endpoint.getId(), id);
endpoint.route(id, msg, null);
}
COM: <s> called to route a message to the id </s>
|
funcom_train/3361214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTableName(int columnIndex, String tableName) throws SQLException {
checkColRange(columnIndex);
if (tableName != null) {
colInfo[columnIndex].tableName = new String(tableName);
} else {
colInfo[columnIndex].tableName = new String("");
}
}
COM: <s> sets the name of the table from which the designated column </s>
|
funcom_train/45916411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void map() {
for (int i = 0; i < rgb.length; i++) {
rgb[i] = 0xFF000000 | (data[i * 3] & 0xFF) << 18
| (data[i * 3 + 1] & 0xFF) << 10
| (data[i * 3 + 2] & 0xFF) << 2;
}
}
COM: <s> convert the byte data to rgb ints </s>
|
funcom_train/35117296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
Guard.checkStateNotNull(root, "record store not opened");
root.close();
try {
store.closeRecordStore();
} catch (RecordStoreException e) {
throw new IOException(e.getMessage());
}
root = null;
}
COM: <s> close file system </s>
|
funcom_train/49435712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assignHostName() {
// put this outside of the runnable so multiple attempts aren't done.
_hasResolvedAddress = true;
LionShareGUIMediator.getInstance().schedule(new Runnable() {
public void run() {
try {
_host = InetAddress.getByName(_host).getHostName();
ConnectionDataLine._hostChanged = true;
} catch (UnknownHostException e) {
_hasResolvedAddress = false;
}
}
});
}
COM: <s> helper method that launches a separate thread to look up the host name </s>
|
funcom_train/19660836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getStaticValue(String className, String methodName) {
try {
Class< ? > clazz = Class.forName(className);
Method method = clazz.getMethod(methodName);
return method.invoke(null).toString();
} catch (Exception e) {
throw new RuntimeException("Can not read value " + className + "." + methodName + "()", e);
}
}
COM: <s> reads the value from a static method of a class using reflection </s>
|
funcom_train/28746963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllMaterialInfos() throws SimsException {
Collection infos = null;
try {
infos = sampleSession.getAllMaterialInfos();
}
catch (RemoteException rex) {
errMsg += ErrMsgConstants.REMOTE_EX;
//Handle the RemoteException.
ExceptionUtil.handleRemoteException(errMsg, rex);
}
return infos;
}
COM: <s> this methods look at material table and return all material info objects </s>
|
funcom_train/34009490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
RTVector location = new RTVector(3.0f, 4.0f, -5.0f);
RTVector look_at = new RTVector(0.0f, 5.0f, -10.0f);
RTVector sky = new RTVector(0.0f, 0.0f, 1.0f);
camera = new RTCamera(location, sky, look_at);
}
COM: <s> the set up for test case to initialize data </s>
|
funcom_train/44496478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertLinkPresentInTable(final String linkText, final String tablePosition, final String tableRow, final String tableColumn, int assertLevel) {
final String msg = "Could not file the link " + linkText;
assertLinkPresentInTable(msg, linkText, tablePosition, tableRow, tableColumn, assertLevel);
}
COM: <s> checks that a link with given text is present in the specified table </s>
|
funcom_train/40324486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFile(String filepath, RDFFormat format) {
try {
RepositoryConnection con = theRepository.getConnection();
try {
con.add(new File(filepath), "", format);
} finally {
con.close();
}
} catch (Exception ex) {
log.log(Level.WARNING, "Error while connecting to local repository.", ex);
}
}
COM: <s> import rdf data from a file </s>
|
funcom_train/50331426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure() {
// connect to a packetizing traffic controller
XNetTrafficController packets = new XNetPacketizer(new HornbyEliteCommandStation());
packets.connectPort(this);
// start operation
// packets.startThreads();
adaptermemo.setXNetTrafficController(packets);
new EliteXNetInitilizationManager(adaptermemo);
jmri.jmrix.lenz.ActiveFlag.setActive();
}
COM: <s> set up all of the other objects to operate with the hornby </s>
|
funcom_train/37122130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void focusText (String focustext) {
clearLineColors ();
if (focustext != null){
String buf = getContents().toUpperCase();
int pos = buf.indexOf(focustext.toUpperCase());
if (pos > -1) {
String sub = buf.substring(0, pos);
int caretLine = 1 + allIndexOf (sub, '\n');
gotoLine (caretLine);
}
}
}
COM: <s> look for text in buffer and move focus to that text </s>
|
funcom_train/17529015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkEdge(Collection<V> ss, Collection<V> ts) {
Collection<E> es = this.getEdgesWithSourcesAndTargets(ss, ts);
if (es.size()>0) {
Iterator<E> i = es.iterator();
while (i.hasNext()) {
E e = i.next();
if (e.getSourceVertices().size()==ss.size() && e.getTargetVertices().size()==ts.size())
return false;
}
}
return true;
}
COM: <s> check if edge with collection of vertices exists in the graph </s>
|
funcom_train/31156981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double minimumPathCostEstimate(Node node) {
double min = Double.MAX_VALUE;
for (Iterator i = goals.iterator(); i.hasNext(); ) {
double cost = node.getPathCostEstimate((Node)i.next());
if (cost < min) {
min = cost;
}
}
return min;
}
COM: <s> estimation of minimal costs of traveling node to one of the goals </s>
|
funcom_train/4836990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendDetail(StringBuilder buffer, String fieldName, long[] array) {
buffer.append(arrayStart);
for (int i = 0; i < array.length; i++) {
if (i > 0) {
buffer.append(arraySeparator);
}
appendDetail(buffer, fieldName, array[i]);
}
buffer.append(arrayEnd);
}
COM: <s> p append to the code to string code the detail of a </s>
|
funcom_train/16604757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void movePoint(int mx, int my) {
if (!isEnabled()) {
return;
}
if (selected == null) {
return;
}
if (list.indexOf(selected) == 0) {
return;
}
if (list.indexOf(selected) == list.size()-1) {
return;
}
float newPos = (mx - 10) / (float) width;
newPos = Math.min(1, newPos);
newPos = Math.max(0, newPos);
selected.pos = newPos;
sortPoints();
fireUpdate();
}
COM: <s> move the current point to the specified mouse location </s>
|
funcom_train/6457326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getCookieString() {
// first 3 'letters' represent the version number, hence we can
// change the encryption and still remain backward compatible with
// older cookies
return toNumbers(rot13(mMagicNumberCookie + '_' + Integer.toString(mLogin.length()) + '_' + mLogin + mPassword));
}
COM: <s> gets the cookie string attribute of the user object </s>
|
funcom_train/3389382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
vset = right.checkValue(env, ctx, vset, exp);
if (!right.type.isType(TC_ARRAY)) {
env.error(where, "invalid.length", right.type);
}
return vset;
}
COM: <s> select the type of the expression </s>
|
funcom_train/28751674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChargemodifier(Long newVal) {
if ((newVal != null && this.chargemodifier != null && (newVal.compareTo(this.chargemodifier) == 0)) ||
(newVal == null && this.chargemodifier == null && chargemodifier_is_initialized)) {
return;
}
this.chargemodifier = newVal;
chargemodifier_is_modified = true;
chargemodifier_is_initialized = true;
}
COM: <s> setter method for chargemodifier </s>
|
funcom_train/10912414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBorderAndPaddingWidthStart() {
int margin = 0;
BorderProps bps = (BorderProps) getTrait(Trait.BORDER_START);
if (bps != null) {
margin = bps.width;
}
Integer padWidth = (Integer) getTrait(Trait.PADDING_START);
if (padWidth != null) {
margin += padWidth;
}
return margin;
}
COM: <s> return the sum of region border and padding start </s>
|
funcom_train/48422758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showGraphData(List<Vertex> vertices, List<Edge> edges) {
tblVertices.setRowData(vertices);
tpaneRightBottom.setTitleAt(0, UIHandler.getText("content.tab.vertex") + "(" + vertices.size() + ")");
tblEdges.setRowData(edges);
tpaneRightBottom.setTitleAt(1, UIHandler.getText("content.tab.edge") + "(" + edges.size() + ")");
}
COM: <s> shows the graph data with vertices and edges </s>
|
funcom_train/51412469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExceptionTypeAsString() {
switch(getExceptionType()) {
case TYPE_ERROR: return Lang.getLang().getString(LangItems.GENERAL_ERROR);
case TYPE_ALERT: return Lang.getLang().getString(LangItems.GENERAL_ALERT);
case TYPE_INFORMATION: return Lang.getLang().getString(LangItems.GENERAL_INFORMATION);
case TYPE_WARNING: return Lang.getLang().getString(LangItems.GENERAL_WARNING);
default: return Lang.getLang().getString(LangItems.GENERAL_ERROR);
}
}
COM: <s> returns the exception type as a descriptive string </s>
|
funcom_train/28351957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFontForAll(Font fnt) {
messageTextLocal.setFont(fnt);
fontSize_PrefPanel_Spinner.setValue(new Integer(fnt.getSize()));
cavParamsPanel.setFont(fnt);
cavStoredEnergyPanel.setFont(fnt);
update_ViewValuesPanel_Button.setFont(fnt);
export_ViewValuesPanel_Button.setFont(fnt);
selectAll_ViewValuesPanel_Button.setFont(fnt);
unSelectAll_ViewValuesPanel_Button.setFont(fnt);
globalFont = fnt;
}
COM: <s> sets the font for all gui elements of the cav field document object </s>
|
funcom_train/31404690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection values() {
if (values==null) {
values = new AbstractCollection() {
public Iterator iterator() {
return getHashIterator(VALUES);
}
public int size() {
return count;
}
public boolean contains(Object o) {
return containsValue(o);
}
public void clear() {
HashMap.this.clear();
}
};
}
return values;
}
COM: <s> returns a collection view of the values contained in this map </s>
|
funcom_train/33480323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdStart() {
if (cmdStart == null) {//GEN-END:|69-getter|0|69-preInit
// write pre-init user code here
cmdStart = new Command("Start", Command.ITEM, 21);//GEN-LINE:|69-getter|1|69-postInit
// write post-init user code here
}//GEN-BEGIN:|69-getter|2|
return cmdStart;
}
COM: <s> returns an initiliazed instance of cmd start component </s>
|
funcom_train/3582563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coordinates midpoint(Coordinates o) {
double midX = (this.getX() + o.getX()) / 2.0;
double midY = (this.getY() + o.getY()) / 2.0;
Coordinates midpoint = new Coordinates(midX, midY);
return midpoint;
}
COM: <s> computes the midpoint between the two coordinates </s>
|
funcom_train/35073607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addValidationMode(BasicXmlDocument document) {
if(this.validationMode != null) {
Element validation_mode_el = document.createElement(AuthNetField.ELEMENT_VALIDATION_MODE.getFieldName());
validation_mode_el.appendChild(document.getDocument().createTextNode(this.validationMode.getValue()));
document.getDocumentElement().appendChild(validation_mode_el);
}
}
COM: <s> set the validation mode on the request </s>
|
funcom_train/39545690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stripFirst() {
String s = (String)strings.get(0);
if (s.charAt(s.length() - 1) != ' ')
return;
length--;
if (s.length() == 1) {
attributes.remove(0);
strings.remove(0);
count--;
return;
}
strings.set(0, s.substring(1));
}
COM: <s> strips the last string character </s>
|
funcom_train/32730731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAdhocPreparedStatement(String key, String sql, List columnSpecs) {
OtherPreparedStatement us = new OtherPreparedStatement(key, columnSpecs, sql);
i_otherPreparedStatements.add(us);
if (!setupComplete || i_jrfConnection == null) {
return;
}
this.getJRFConnection().getPreparedStatementList().addAdHocStatement(us.key, us.sql, us.columnSpecs);
}
COM: <s> adds a prepared sql completely adhoc statement </s>
|
funcom_train/20246346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleButtonClick(Button button, int statusCode) {
// TODO merge DialogExtension & Dialog
if (dialog instanceof DialogExtension) {
((DialogExtension) dialog).buttonPressed(statusCode, button, this);
} else {
if (statusCode == OK) {
okay();
} else if (statusCode == CANCEL) {
cancel();
}
}
}
COM: <s> generic handler for all button clicks </s>
|
funcom_train/12640889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPreemptiveProxyAuthentication(MessageHeader requests) {
AuthenticationInfo pauth
= AuthenticationInfo.getProxyAuth(http.getProxyHostUsed(),
http.getProxyPortUsed());
if (pauth != null && pauth.supportsPreemptiveAuthorization()) {
// Sets "Proxy-authorization"
requests.setIfNotSet(pauth.getHeaderName(),
pauth.getHeaderValue(url,method));
currentProxyCredentials = pauth;
}
}
COM: <s> sets pre emptive proxy authentication in header </s>
|
funcom_train/50313903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getSelection () {
checkWidget ();
if((style&SWT.CHECK) != 0)
return Fox.FXCheckButton_getCheck(handle) != 0;
else if((style&SWT.RADIO) != 0)
return Fox.FXRadioButton_getCheck(handle) != 0;
else if((style&SWT.TOGGLE) != 0)
return Fox.FXToggleButton_getState(handle);
else
return false;
}
COM: <s> returns code true code if the receiver is selected </s>
|
funcom_train/25365783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGotoActPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Act_gotoAct_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Act_gotoAct_feature", "_UI_Act_type"),
LeveleditorPackage.Literals.ACT__GOTO_ACT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the goto act feature </s>
|
funcom_train/22543081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleRead() throws IOException {
while(isRunning()) {
DHTMessage message = null;
try {
message = readMessage();
} catch (MessageFormatException err) {
LOG.error("Message Format Exception: ", err);
continue;
}
if (message == null) {
break;
}
handleMessage(message);
}
// We're always interested in reading!
interestRead(true);
}
COM: <s> reads all available message from network and processes them </s>
|
funcom_train/12556960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStringArraySize(Object listHandle, int field) {
initialize();
try {
return getFieldDescriptor(((List)listHandle).type, field)
.getStringArraySize();
} catch (NullPointerException npe) {
// debug.exception(Debug.LIGHT, npe);
return 0;
}
}
COM: <s> checks if size of the string array </s>
|
funcom_train/4233304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension preferredLayoutSize(Container container) {
int componentCount = container.getComponentCount();
if (componentCount == 0) {
return new Dimension(0, 0);
}
Dimension dimension = container.getComponent(0).getPreferredSize();
return new Dimension(componentCount*dimension.width, dimension.height);
}
COM: <s> gets the preferred layout size based on the preferred size of the first </s>
|
funcom_train/34708783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet transform(ResultSet results) {
ResultSet rS = new ResultSet();
Iterator<Result> i = results.iterator();
while (i.hasNext()) {
Result r = (Result) i.next();
ResultSet riS = sO.searchIndividuals(r, false);
if (riS != null) {
Iterator<Result> ii = riS.iterator();
while (ii.hasNext())
rS.add((Result) ii.next());
}
}
return rS;
}
COM: <s> returns all found results of result onto type from jena repository or null </s>
|
funcom_train/51168448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocaleString(String v) {
if(v!=null){
String language = "";
String country = "";
String variant = "";
int idx = v.indexOf("_");
if(idx == -1){
language = v;
}else{
language = v.substring(0,idx);
v = v.substring(idx+1,v.length());
idx = v.indexOf("_");
if(idx == -1){
country = v;
}else{
country = v.substring(0,idx);
variant = v.substring(idx+1,v.length());
}
}
locale = new Locale(language,country,variant);
}
}
COM: <s> set the value of locale string </s>
|
funcom_train/21653130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeGlobalItem(int id, int x, int y, int height) {
if (id < 0 || id >= maxListedItems) {
return;
}
for (Player p : engine.getPlayers()) {
if (p == null) {
continue;
}
frames.removeGroundItem(p, id, x, y, height);
}
}
COM: <s> removes an item for everyone within distance </s>
|
funcom_train/6270347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTopicSource(String s) {
System.out.println("Setting Topic Source "+isBootIssue+" "+issueName);
if (isBootIssue) // we need the occurrenceBody for this issue
// note issue <topic> id is the same as the issue <topicMap> id
adaptor.getOccurrenceBody(this.issueName, this.issueName);
isBootIssue = false;
}
COM: <s> server sends this when we set selected topic </s>
|
funcom_train/13445730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateNodeSizes(boolean updateAll) {
log.fine("start");
int aY, counter, maxCounter;
TreeStateNode node;
updateNodeSizes = false;
for(aY = counter = 0, maxCounter = visibleNodes.size();
counter < maxCounter; counter++) {
node = (TreeStateNode)visibleNodes.elementAt(counter);
node.setYOrigin(aY);
if(updateAll || !node.hasValidSize())
node.updatePreferredSize(counter);
aY += node.getPreferredHeight();
}
}
COM: <s> resets the y origin of all the visible nodes as well as messaging </s>
|
funcom_train/23869968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveDesign(String outputFileName){
if(outputFileName.toLowerCase().endsWith("ncd")){
String xdlFileName = outputFileName+"temp.xdl";
design.saveXDLFile(xdlFileName, true);
FileConverter.convertXDL2NCD(xdlFileName, outputFileName);
// Delete the temporary XDL file, if needed
//FileTools.deleteFile(xdlFileName);
}
else{
design.saveXDLFile(outputFileName, true);
}
}
COM: <s> saves the design to a file </s>
|
funcom_train/26411494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMetricDescription(String id) {
if (!formTagMap.keySet().contains(id)) {
category.warn("User requested description for invalid metric: " + id);
throw new IllegalArgumentException("Invalid metric name: " + id);
}
return ((SourceMetric)metricMap.get(id)).getDescription();
}
COM: <s> retreive the metric description for the given metric id </s>
|
funcom_train/9349905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int fromGround(Game g, Position p) {
int multilplier = 1;
if(g.getTile(p).getTypeString().equals("forest") ||
g.getTile(p).getTypeString().equals("hill")) {
multilplier = 2;
}
if(!(g.getTile(p).getCityList().isEmpty())) {
multilplier = 3;
}
return multilplier;
}
COM: <s> returns the strength multiplier given by the tile at position p </s>
|
funcom_train/927853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultCategoryDataset createOTDDataset() {
DefaultCategoryDataset dcd = new DefaultCategoryDataset();
Iterator iter = display.getGraph().getNodeSequence();
while (iter.hasNext()) {
ASDNNode n = (ASDNNode)iter.next();
double value = NumberUtil.getDoubleAttribute(n, "otd");
String row = n.getString("label");
dcd.addValue(value, ASDNResources.getString("ge.cs.otd.series"), row);
}
return dcd;
}
COM: <s> creates a dataset of nodes otd attribute </s>
|
funcom_train/25827988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int b) throws IOException {
littlebuf[0] = (byte) b;
String s = new String(littlebuf, 0, 1);
StyleConstants.setForeground(attributes, color);
try {
doc.insertString(doc.getLength(), s, attributes);
// this.scrollToBottom();
} catch (BadLocationException ex) {
}
}
COM: <s> writes the specified int to this output stream </s>
|
funcom_train/22526443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillContextMenu(IMenuManager manager) {
IMenuManager newMenu = new MenuManager(Messages.PlaysComposite_4, "new"); //$NON-NLS-1$
manager.add(newMenu);
newMenu.add(fActionNewPlay);
newMenu.add(fActionNewAct);
}
COM: <s> fill the right click menu for the table </s>
|
funcom_train/23840448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MODScanner skip(Pattern pattern) {
ensureOpen();
if (pattern == null)
throw new NullPointerException();
clearCaches();
// Search for the pattern
while (true) {
String token = matchPatternInBuffer(pattern);
if (token != null) {
matchValid = true;
position = matcher.end();
return this;
}
if (needInput)
readInput();
else
throw new NoSuchElementException();
}
}
COM: <s> skips input that matches the specified pattern ignoring delimiters </s>
|
funcom_train/34084261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUpdate(DocumentEvent e) {
if ((jTextField1.getText().equals(null) == true) ||
(jTextField1.getText().length() == 0)) {
jButton1.setText(PluginServices.getText(this,"search_button"));
jButton1.setName("search");
}
else {
jButton1.setText(PluginServices.getText(this,"open_button"));
jButton1.setName("open");
}
}
COM: <s> processes the removal of text in the textbox j text box1 </s>
|
funcom_train/21612695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testModelAssignmentInInvocation() throws InterpreterException {
String termAssignment = "Print(l = List(1,2), l);";
Value result = interpreter.process(termAssignment);
System.out.println("Result: " + result);
checkResult("[1,2][1,2]", result);
}
COM: <s> test the model assigment capabilities inside invocations </s>
|
funcom_train/42225343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createStartingFleet() {
FleetNode fleetNode = FleetNode.createFleetNode(gameManager.playerRace, starManager.currentStarNode);
fleetList.add(fleetNode); // add the fleet to the global list of fleetList
addToOrbitingList(fleetNode, starManager.currentStarNode);
gameManager.rootNode.addChild(fleetNode);
currentFleetNode = fleetNode;
}
COM: <s> create the starting fleet for the player race </s>
|
funcom_train/45761365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkMathDocument(){
XComponent xDoc = null;
try{
xDoc = m_SOF.createMathDoc("MathTest");
} catch (com.sun.star.uno.Exception e){
failed("Could not create a math document: " +e.toString());
}
checkListener(xDoc);
closeDoc(xDoc);
}
COM: <s> creates a math document and check the code xmouse click handler code and </s>
|
funcom_train/36557488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3f getPosition() {
ModelInstance body = getModelInstance();
// Debugging / Diagnostic information
// Logger.getLogger(avatarController.class.getName()).log(Level.INFO,
// "Bodyt "+body.getTransform().getWorldMatrix(false));
if (body != null)
return body.getTransform().getWorldMatrix().getTranslation();
return null;
}
COM: <s> override to return the characters current position </s>
|
funcom_train/17426533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reportError(String msg, Exception ex, int code) {
if (msg != null) {
super.reportError(Level.SEVERE.getName() + ": " + msg, ex, code);
} else {
super.reportError(null, ex, code);
}
}
COM: <s> protected convenience method to report an error to this handlers </s>
|
funcom_train/51812408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExpandsSystemProperties() throws Exception {
createFile("Hello World");
FileResource resource = new FileResource("${java.io.tmpdir}/" + getName() + "/foo.txt");
assertTrue("Not expanding resource names " + resource, resource.exists());
}
COM: <s> test that ensures that system properties are used to expand em ant em </s>
|
funcom_train/3374223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAttribute(Object key) {
int n = keys.size();
for (int i = 0; i < n; i++) {
if (keys.elementAt(i).equals(key)) {
keys.removeElementAt(i);
data.removeElementAt(i);
return;
}
}
}
COM: <s> removes the given name from the set </s>
|
funcom_train/10498967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long getPeerEpoch(){
if(self.getLearnerType() == LearnerType.PARTICIPANT)
try {
return self.getCurrentEpoch();
} catch(IOException e) {
RuntimeException re = new RuntimeException(e.getMessage());
re.setStackTrace(e.getStackTrace());
throw re;
}
else return Long.MIN_VALUE;
}
COM: <s> returns the initial vote value of the peer epoch </s>
|
funcom_train/9867769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Topic createTopic() throws TMAPIException {
final Locator iid = resolve("a-topic");
System.out.println("Creating a topic with the item identifier '" + iid.getReference() + "'");
Topic topic = _topicMap.createTopicByItemIdentifier(iid);
System.out.println("Created the topic");
return topic;
}
COM: <s> creates a topic with the item identifier a topic </s>
|
funcom_train/23943661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNotificationContact(AdvanceNotificationGroupType type, String group, String contact) {
Map<String, Collection<String>> groups = notificationGroups.get(type);
if (groups == null) {
groups = Maps.newHashMap();
notificationGroups.put(type, groups);
}
Collection<String> contacts = groups.get(group);
if (contacts == null) {
contacts = Sets.newHashSet();
groups.put(group, contacts);
}
contacts.add(contact);
}
COM: <s> add a contact to the given notification type and group </s>
|
funcom_train/2587289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackTrace(final PrintStream s) {
super.printStackTrace(s);
if (this.parent != null) {
s.print("ParentException:");
this.parent.printStackTrace(s);
}
else {
s.println("ParentException: <null>");
}
}
COM: <s> prints the stack trace </s>
|
funcom_train/19609717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean hasOrganization(String orgId) {
String methodName = ".hasOrganizations(): ";
connect();
String id = Id.build(orgId);
Boolean found = (get(id) != null);
Log.enter(className + methodName + found.toString());
return found;
}
COM: <s> checks database to see if organization with id already exists </s>
|
funcom_train/50440175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIndexSatConstant(String idx){
// Method attributes
StringTokenizer token=new StringTokenizer(idx,",");
try {
// Populates the Saturation constant indexes
int loop=0;
while (token.hasMoreTokens()){
m_intIdxK[loop]=Integer.parseInt(token.nextToken());
loop++;
}
}
catch (Exception error){
error.printStackTrace();
}
}
COM: <s> set index sat constant sets the saturation constant index array </s>
|
funcom_train/25529286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List generateText(int iMeanSize) {
// Sample text size
int iTextSize = (int)(gr.demokritos.iit.jinsect.algorithms.statistics.statisticalCalculation.getPoissonNumber(iMeanSize));
Vector vRes = new Vector(iTextSize);
while (iTextSize-- > 0) {
vRes.add(generateNextTerm());
}
return vRes;
}
COM: <s> generates a text i </s>
|
funcom_train/3946094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdentifierrefPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ItemType_identifierref_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ItemType_identifierref_feature", "_UI_ItemType_type"),
ImscpRootv1p1p2Package.eINSTANCE.getItemType_Identifierref(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the identifierref feature </s>
|
funcom_train/25437726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getContainsFileRow(String filePath) {
for (int i = 0; i < this.getRowCount(); i++) {
if (((String) fileListMap.get(i)[1]).compareTo(filePath) == 0) {
return i;
}
}
return -1;
}
COM: <s> returns a negative integer or others </s>
|
funcom_train/27747234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeItem getParentItem () {
checkWidget();
int data = OS.g_list_nth_data (handle, 0);
GtkCTreeRow row = new GtkCTreeRow ();
OS.memmove (row, data, GtkCTreeRow.sizeof);
if (row.parent == 0) return null;
int ctree = parent.handle;
int index = OS.gtk_ctree_node_get_row_data (ctree, row.parent) - 1;
return parent.items [index];
}
COM: <s> returns the receivers parent item which must be a </s>
|
funcom_train/43245453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTmpPhoneNumber() {
System.out.println("setTmpPhoneNumber");
String tmpPhoneNumber = "";
PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object();
instance.setTmpPhoneNumber(tmpPhoneNumber);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set tmp phone number method of class org </s>
|
funcom_train/8082939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateClusterer(Instance newInstance) throws Exception {
m_numberOfClustersDetermined = false;
if (m_cobwebTree == null) {
m_cobwebTree = new CNode(newInstance.numAttributes(), newInstance);
} else {
m_cobwebTree.addInstance(newInstance);
}
}
COM: <s> adds an instance to the clusterer </s>
|
funcom_train/26268313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isHeaderEnabled(String headerName) throws CCPPException {
if(!myMap.containsKey(headerName)) {
throw new CCPPException("Header name not in map");
} else {
HeaderTemplateEntry mapEntry = (HeaderTemplateEntry)myMap.get(headerName);
return mapEntry.isEnabled();
}
}
COM: <s> gets the enabled status of a header </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.