__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/4689035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFileAlreadyExists() throws Exception {
openCXFendpointWizard();
Util.waitForWindowToAppear(bot, NEW_CXF_ENDPOINT_WINDOW,
TestConstants.TIMEOUT_FOR_REFRESHING);
bot.text().setText(PROJECT_NAME);
try {
Util.waitForButtonToEnable(bot.button(TestConstants.BUTTON_NEXT),
TestConstants.TIMEOUT_FOR_ENABLE);
fail("Already Existed Project name and file name, but wizard can continue.");
} catch (InterruptedException ie) {
bot.button(TestConstants.BUTTON_CANCEL).click();
}
}
COM: <s> trying to create cxf endpoint with existing file name </s>
|
funcom_train/7518262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Passaporte update(Passaporte entity) {
EntityManagerHelper.log("updating Passaporte instance", Level.INFO,
null);
try {
Passaporte 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 passaporte entity and return it or a copy of </s>
|
funcom_train/3815272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump() {
System.out.println("Denominator= " + denominator);
System.out.println("Numerators= ");
for (int i = 0; i < numerator.length; i++) {
System.out.println("[" + i + "]= " + numerator[i]);
}
}
COM: <s> dump info about this buffer </s>
|
funcom_train/32341113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream output) throws IOException {
try {
OutputStreamWriter o = new OutputStreamWriter(output, "UTF8");
BufferedWriter buf = new BufferedWriter(o, 4096);
writeNode(buf, node);
buf.flush();
}
catch ( Exception e ) {
e.printStackTrace(System.err);
}
}
COM: <s> write writes the node to the output stream as text </s>
|
funcom_train/51782505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dragSegment(int index, double xcoord, double ycoord) {
if (isSegmentHorizontal(index)) {
dragHorizontalSegment(index, ycoord);
} else {
dragVerticalSegment(index, xcoord);
}
meltinNextToOuterPoints();
restoreConnectionToNode();
truncateSegmentToNode(index);
}
COM: <s> top level method which is called when the user drags a whole rectilinear </s>
|
funcom_train/7616332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VolatileImage createVolatileImage(int width, int height) {
toolkit.lockAWT();
try {
if (!isDisplayable()) {
return null;
}
GraphicsConfiguration gc = getGraphicsConfiguration();
if (gc == null) {
return null;
}
VolatileImage image = gc.createCompatibleVolatileImage(width, height);
fillImageBackground(image, width, height);
return image;
} finally {
toolkit.unlockAWT();
}
}
COM: <s> creates a volatile off screen drawable image which is used for double </s>
|
funcom_train/43097993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addActualArgument(Object handle, Object argument) {
if (handle instanceof MAction && argument instanceof MArgument) {
((MAction) handle).addActualArgument((MArgument) argument);
return;
}
throw new IllegalArgumentException("handle: " + handle
+ " or argument: " + argument);
}
COM: <s> adds an actual argument to an action </s>
|
funcom_train/18112102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSubjectOfRecordPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Person_SubjectOfRecord_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Person_SubjectOfRecord_feature", "_UI_Person_type"),
BioDBPackage.Literals.PERSON__SUBJECT_OF_RECORD,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the subject of record feature </s>
|
funcom_train/7426848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseExited(final PInputEvent aEvent) {
if (cursorPushed) {
final PPickPath focus = aEvent.getInputManager().getMouseFocus();
if (focus == null || focus.getPickedNode() != PBoundsHandle.this) {
aEvent.popCursor();
cursorPushed = false;
}
}
}
COM: <s> when mouse leaves pop cursor from stack </s>
|
funcom_train/22278705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTypingAttribute(String key,Object value) {
Hashtable tmp = new Hashtable();
Enumeration keys;
String k;
tmp.put(key,value);
tmp = TextView.attributesByRemovingStaticAttributes(tmp);
keys = tmp.keys();
while(keys.hasMoreElements()){
k = (String)keys.nextElement();
_typingAttributes.put(k,tmp.get(k));
}
}
COM: <s> add an attribute into typing attributes </s>
|
funcom_train/50155874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
Date dateOne;
Date dateTwo;
try {
dateOne = ((HistoryEntry) o1).getDate();
dateTwo = ((HistoryEntry) o2).getDate();
} catch (Exception e) {
prtlnErr("Error: unable to find last modified date: " + e.getMessage());
return 0;
}
return dateTwo.compareTo (dateOne);
}
COM: <s> provide comparison for sorting sugest a url records by last modified property </s>
|
funcom_train/12566458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String read() {
String theContent = "";
try {
if (_clob != null) {
theContent = _clob.getSubString(1, (int) _clob.length());
}
} catch (SQLException se) {
theContent = "Cannot get content: " + se.getMessage();
}
return theContent;
}
COM: <s> read the clob as a string </s>
|
funcom_train/43013410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if (EDIT.equals(e.getActionCommand())) {
//The user has clicked the cell, so
//bring up the dialog.
colorButton.setForeground(currentColor);
colorChooser.setColor(currentColor);
ETRC.setFont(dialog);
dialog.setVisible(true);
//Make the renderer reappear.
fireEditingStopped();
} else { //User pressed dialog's "OK" button.
currentColor = colorChooser.getColor();
}
}
COM: <s> handles events from the editor button and from </s>
|
funcom_train/44848788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showNotification(String inMessage, int inNotificationType) {
Map<String, Object> lProperties = new HashMap<String, Object>();
lProperties.put(Constants.EVENT_PROPERTY_NOTIFICATION_MSG, inMessage);
lProperties.put(Constants.EVENT_PROPERTY_NOTIFICATION_TYPE, inNotificationType);
Event lEvent = new Event(Constants.EVENT_TOPIC_NOTIFICATION, lProperties);
eventAdmin.sendEvent(lEvent);
}
COM: <s> use osgi event service to display a notification message </s>
|
funcom_train/44220505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unregisterListener() {
int count = this.get_comp().getComponentCount();
if (count == 2) {
JButton button = (JButton) this.get_comp().getComponent(1);
button.removeActionListener(this);
}
if (this.archiveID != null) {
this.archiveID.getDocument().removeDocumentListener(this);
}
}
COM: <s> check if the load archive button exists or not </s>
|
funcom_train/3111909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void useCurrentObject() {
if (currentObjectHeld instanceof Weapon) {
ViewPickHandler pickHandler = engine.getNavigatorBehavior()
.getNavigator().getPickHandler();
pickHandler.setShapeSegment2ndPointOffset(new Vector3d(0, 0,
-((Weapon) currentObjectHeld).getRange()), true);
engine.getScriptHandler().doShootCollision(pickHandler.pickAll());
}
}
COM: <s> uses the currently held object </s>
|
funcom_train/15407380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() {
Iterator<DeployBeanProperty> it = descriptor.propertiesAll();
while (it.hasNext()) {
DeployBeanProperty prop = it.next();
if (prop instanceof DeployBeanPropertyAssocOne<?>) {
readAssocOne((DeployBeanPropertyAssocOne<?>) prop);
}
}
}
COM: <s> parse the annotation </s>
|
funcom_train/43269910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRankName(String rankName) {
// Error handiling to match database schema
if ((rankName != null) && (rankName.length() > 20)) {
rankName = rankName.substring(0, 20);
log.warn("Truncating rankName to 20 characters");
}
this.rankName = rankName;
}
COM: <s> sets the rank name attribute of the concept object </s>
|
funcom_train/1295084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Link xml2Link(Element linkElement) {
Link link = /*BPELFactory*/ModelFactory.eINSTANCE.createLink();
link.setElement(linkElement);
// Save all the references to external namespaces
saveNamespacePrefix(link, linkElement);
Attr name = linkElement.getAttributeNode("name");
if (name != null && name.getSpecified())
link.setName(name.getValue());
xml2ExtensibleElement(link,linkElement);
return link;
}
COM: <s> converts an xml link element to a bpel link object </s>
|
funcom_train/37865397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() {
try {
if (channel.isOpen())
channel.close();
channel = null;
} catch (Exception e) {
message("Failed to close lock file", e);
}
LOG.info("Deleting lock file: " + lockFile.getAbsolutePath());
lockFile.delete();
}
COM: <s> release the lock </s>
|
funcom_train/3417043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readString(boolean unshared) throws IOException {
String str;
byte tc = bin.readByte();
switch (tc) {
case TC_STRING:
str = bin.readUTF();
break;
case TC_LONGSTRING:
str = bin.readLongUTF();
break;
default:
throw new StreamCorruptedException(
String.format("invalid type code: %02X", tc));
}
passHandle = handles.assign(unshared ? unsharedMarker : str);
handles.finish(passHandle);
return str;
}
COM: <s> reads in and returns new string </s>
|
funcom_train/7669730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int activeGroupCount() {
int count = 0;
// Lock this subpart of the tree as we walk
synchronized (this.childrenGroupsLock) {
for (int i = 0; i < numGroups; i++) {
// One for this group & the subgroups
count += 1 + this.childrenGroups[i].activeGroupCount();
}
}
return count;
}
COM: <s> returns the number of thread groups which are children of the receiver </s>
|
funcom_train/13221324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleRead() throws IOException {
lastMessage = (new Date()).getTime();
parser.handleMessage();
// System.out.println("pinging last message " + socket.getPort());
// for very long reads, reset the message timer
lastMessage = (new Date()).getTime();
}
COM: <s> called when this socket has bytes to read </s>
|
funcom_train/40445700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown(ClusterInfo clusterInfo) {
CacheFactory.log("Shutting down all services : " + clusterInfo, CacheFactory.LOG_INFO);
visitAllServices(clusterInfo, new ServiceShutdownVisitor());
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// ignored
}
CacheFactory.log("Shut down all services : " + clusterInfo, CacheFactory.LOG_INFO);
}
COM: <s> shutdown all the servers in the specified cluster properties file </s>
|
funcom_train/41343667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearTables() throws SQLException {
String sql = "TRUNCATE TABLE hh_vertex CASCADE;"
+ "TRUNCATE TABLE hh_vertex_lvl CASCADE;" + "TRUNCATE TABLE hh_edge CASCADE;"
+ "TRUNCATE TABLE hh_graph_properties CASCADE;"
+ "TRUNCATE TABLE hh_distance_table_row CASCADE;"
+ "TRUNCATE TABLE hh_lvl_stats CASCADE;";
conn.createStatement().executeUpdate(sql);
}
COM: <s> truncates all tables of the highway hierarchies db schema </s>
|
funcom_train/367032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(ItemRegistry registry, String itemClass, Entity entity) {
if ( entity != null && !(entity instanceof Edge) ) {
throw new IllegalArgumentException("EdgeItem can only represent an Entity of type Edge.");
}
super.init(registry, itemClass, entity);
Edge edge = (Edge)entity;
Node n1 = edge.getFirstNode();
Node n2 = edge.getSecondNode();
NodeItem item1 = getItem(n1);
setFirstNode(item1);
NodeItem item2 = getItem(n2);
setSecondNode(item2);
} //
COM: <s> initialize this edge item binding it to the </s>
|
funcom_train/8513869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XYSeries toXYSeries() {
XYSeries xySeries = new XYSeries(getTitle());
int length = getItemCount();
for (int k = 0; k < length; k++) {
xySeries.add(k + 1, getMinimumValue(k));
xySeries.add(k + 1, getMaximumValue(k));
}
return xySeries;
}
COM: <s> transforms the range category series to an xy series </s>
|
funcom_train/42406743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String whyCannotBeCastedTo(CompilerEnvironment env, DataType d) throws IOException, CompilerError {
if (d.isReference()) return "cannot cast to reference type";
return isSubtypeOf(env, d)
|| d.isSubtypeOf(env, this)? null: "no primitive casting conversion applicable";
}
COM: <s> casting compatibility 5 </s>
|
funcom_train/18519178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeProtocol() {
if (conn != null && conn.isConnected()) {
Presence presence = new Presence(Presence.Type.UNSUBSCRIBE);
presence.setStatus("disconecting");
presence.setMode(Presence.Mode.AWAY);
conn.sendPacket(presence);
// conn.disconnect(presence);
}
conn = null;
}
COM: <s> performs protocol specific closing tasks </s>
|
funcom_train/33991323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean AddProcessInfo(int HANDLE, String WindowTitle, Image Icon, Image FormCaption) {
ExtraSwitchProcessInfo NewProcessInfo = new ExtraSwitchProcessInfo();
if (Icon == null) {
Icon = FormCaption;
}
NewProcessInfo.setHANDLE(HANDLE);
NewProcessInfo.setWindowTitle(WindowTitle);
NewProcessInfo.setIcon(Icon);
NewProcessInfo.setFromCaption(FormCaption);
return ProsessInfos.add(NewProcessInfo);
}
COM: <s> this method used for add process info </s>
|
funcom_train/25191782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Message waitForMessage (long duration) {
if (message == null) {
long endTime = System.currentTimeMillis() + duration;
synchronized (lock) {
while (message == null && System.currentTimeMillis() < endTime) {
try {
lock.wait (duration);
} catch (InterruptedException e) {
}
}
}
}
if (message != null) {
agent.removeMessage (message);
}
return message;
}
COM: <s> wait for message wait for a message to be received by the agent </s>
|
funcom_train/25049054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Category getCurrentItem() {
Collection<Object> selectedNodes = classesTree.getTreeState().getSelectedNodes();
if(selectedNodes.isEmpty()) {
return null;
}
DynamicTreeNode<Category> treeNode = (DynamicTreeNode<Category>) selectedNodes.iterator().next();
return treeNode.getItem();
}
COM: <s> returns currently selected item </s>
|
funcom_train/11678582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pause() throws AxisFault {
if (state != BaseConstants.STARTED) return;
try {
ioReactor.pause();
state = BaseConstants.PAUSED;
log.info("Listener paused");
} catch (IOException e) {
handleException("Error pausing IOReactor", e);
}
}
COM: <s> pause the listener stops accepting new connections but continues processing existing </s>
|
funcom_train/17201720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T remove(int index) {
/* bounds check */
if (index < 0 || index >= size()) {
throw new IndexOutOfBoundsException();
}
Element<T> cursor = head;
for (int i = 0; i < index; i++) {
cursor = cursor.next;
}
removeInternal(cursor);
return cursor.entry;
}
COM: <s> remove the nth element of the list </s>
|
funcom_train/42114886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ESValue sort(ESValue compareFn) throws EcmaScriptException {
if ((compareFn != null) && (!(compareFn instanceof FunctionPrototype))) {
throw new EcmaScriptException("Compare function not a function: "
+ compareFn);
}
Comparer c = null;
if (compareFn != null)
c = new FunctionComparer((FunctionPrototype) compareFn);
else
c = new DefaultComparer();
sort(0, theArray.size() - 1, c);
return this;
}
COM: <s> sort the array with a specified compare routine </s>
|
funcom_train/3596487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Rectangle measureString(Graphics g, String s) {
FontMetrics metrics = g.getFontMetrics();
Rectangle2D bounds = metrics.getStringBounds(s,g);
return new Rectangle(0,0,(int)bounds.getWidth(),metrics.getHeight());
}
COM: <s> p returns the bounding rectangle for the specified string if it is </s>
|
funcom_train/1960231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConvert() {
assertEquals(ipn1.convert().toString(), "10.10.10.10");
assertEquals(ipn2.convert().toString(), "10.10.10.0");
assertEquals(ipn3.convert().toString(), "10.10.10.12");
}
COM: <s> tests if the netmask applied to an ipaddress works as expected </s>
|
funcom_train/46626870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void returnsXML(Type type) throws SAXException {
AttributesImpl atts = new AttributesImpl();
atts.addAttribute(xmlns, localName, "dimension", "String", type.dimension());
cm.startElement(xmlns, localName, "returns", atts);
// generate "(classref|interfaceref|primitive)" sub-element
createTypeRef(type);
cm.endElement(xmlns, localName, "returns");
}
COM: <s> generates doc for element returns </s>
|
funcom_train/12178409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCanOptimizeStyleWhenRowAndColSpanAreZeroOrOne() {
checkCanOptimizeWithParticularAttributeValues(ROWSPAN, "1", "10", CELL);
checkCanOptimizeWithParticularAttributeValues(COLSPAN, "1", "10", CELL);
}
COM: <s> verifies that tables can be optimized away when the optimization level </s>
|
funcom_train/10866847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int stemPrefix(char s[], int len) {
for (int i = 0; i < prefixes.length; i++)
if (startsWithCheckLength(s, len, prefixes[i]))
return deleteN(s, 0, len, prefixes[i].length);
return len;
}
COM: <s> stem a prefix off an arabic word </s>
|
funcom_train/15957523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getResult0(final String line) {
StringTokenizer st = new StringTokenizer(line);
final int size = st.countTokens();
for (int i = 0; i < size; i++) {
String r = st.nextToken();
if (i == 1)
return Integer.parseInt(r);
}
return 42;
}
COM: <s> returns the result of a round for the first team from the passed </s>
|
funcom_train/38859914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processFieldType(Element el,Messager msg) {
StringBuffer classNameBuffer = new StringBuffer( el.getEnclosingElement().toString() );
String className = classNameBuffer.substring(classNameBuffer.lastIndexOf(".")+1).toString();
List<Element> fieldList = fiClassFields.get(className);
if(fieldList != null)
fieldList.add(el);
}
COM: <s> process the fields loid field </s>
|
funcom_train/20238993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdNovoCadGR() {
if (cmdNovoCadGR == null) {//GEN-END:|96-getter|0|96-preInit
// write pre-init user code here
cmdNovoCadGR = new Command("Novo", Command.OK, 0);//GEN-LINE:|96-getter|1|96-postInit
// write post-init user code here
}//GEN-BEGIN:|96-getter|2|
return cmdNovoCadGR;
}
COM: <s> returns an initiliazed instance of cmd novo cad gr component </s>
|
funcom_train/44779002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File file) {
if ((myExtensions == null) || (myExtensions.size() == 0)) {
return true;
}
if (file != null) {
if (file.isDirectory()) {
return true;
}
String extension = getExtension(file);
if ((extension != null) && (myExtensions.contains(extension))) {
return true;
}
}
return false;
}
COM: <s> return whether file accepted </s>
|
funcom_train/374635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCache() {
cache =
Collections.synchronizedMap(new HashMap<Long, String>(cacheCapacity,
cacheLoadFactor));
timeoutQueue =
new PriorityQueue<AbstractResolver.TimeoutEntry>(cacheCapacity,
new Comparator<AbstractResolver.TimeoutEntry>() {
public int compare(AbstractResolver.TimeoutEntry o1,
AbstractResolver.TimeoutEntry o2) {
return (int) (o1.timeout - o2.timeout);
}
});
}
COM: <s> creates the cache </s>
|
funcom_train/11942494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDataset() {
if (this.getDatasetType() == BIT_REGISTER_SET) {
updateBitDataset();
} else if (this.getDatasetType() == BYTE_REGISTER_SET) {
updateByteDataset();
} else {
logger.warn("could not update dataset unknown type ID " + this.getDatasetType());
}
}
COM: <s> this is the public method for updating a dataset </s>
|
funcom_train/43245058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheckConnectionSettings() throws Exception {
System.out.println("checkConnectionSettings");
ConnectionManager instance = new ConnectionManager();
instance.checkConnectionSettings();
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of check connection settings method of class org </s>
|
funcom_train/29935422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GameServer (int port) {
this.port = port;
players = new Player [TOTAL_PLAYERS];
for (int i = 0 ; i < 4 ; ++i)
players[i] = new Player ("Empty", playerIcons[i]);
clients.put (0, new GameMonitor ());
}
COM: <s> creates a game server that listens on the specified port </s>
|
funcom_train/13867835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String substringData(final int offset, final int count) {
try {
return XMLParserImpl.substringData(this.getJsObject(), offset, count);
} catch (JavaScriptException e) {
throw new DOMNodeException(DOMException.INVALID_ACCESS_ERR, e, this);
}
}
COM: <s> this function delegates to the native method code substring data code </s>
|
funcom_train/2369561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTrump(final Player player, final Card.COLOR trumpColor) {
synchronized (this.game) {
if (this.game.getState() == GameState.GIVER_TELLS_TRUMP) {
this.game.setTrumpColor(trumpColor);
this.game.setState(GameState.GUESS);
this.gameEventQueue.enqueue(GameEvent.createTrump(player,
trumpColor));
}
}
}
COM: <s> sets the color to be trump </s>
|
funcom_train/32979835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String cacheRead(String fullFilePath)
{ /* cacheRead */
try
{
String cacheFile= createCacheFileName(fullFilePath),
sR= readFileFromDisk(cacheFile);
if(sR!=null && sR.length()==0)
return(null);
return(sR);
}
catch (Exception e)
{
return(null);
}
} /* cacheRead */
COM: <s> cache read read data file from cache file it it exists </s>
|
funcom_train/1482792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void seekChild(int level) throws IOException {
skipStream[level].seek(lastChildPointer);
numSkipped[level] = numSkipped[level + 1] - skipInterval[level + 1];
skipDoc[level] = lastDoc;
if (level > 0) {
childPointer[level] = skipStream[level].readVLong() + skipPointer[level - 1];
}
}
COM: <s> seeks the skip entry on the given level </s>
|
funcom_train/23867743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMedian() {
final double[] sortedValues = data.clone();
Arrays.sort(sortedValues);
if (data.length % 2 == 0) {
return (sortedValues[data.length / 2 - 1] + sortedValues[data.length / 2]) / 2;
}
return sortedValues[data.length / 2];
}
COM: <s> gets the median value of the data </s>
|
funcom_train/5063953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(BasicType n, Object _cd) {
String temp = new String();
if (n.f0.present()) {
NodeChoice nc = (NodeChoice) n.f0.node;
switch (nc.which) {
case 0:
temp += "unsigned ";
break;
case 1:
temp += "";
break;
default:
temp += "ERROR for modifier";
}
}
// n.f0.accept(this, _cd);
temp += ((NodeToken) n.f1.choice).tokenImage;
return temp;
}
COM: <s> f0 unsigned signed f1 int bool char </s>
|
funcom_train/19454727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStack(String stack) {
/* Get the old property value for fire property change event. */
String oldValue = fieldStack;
/* Set the stack property (attribute) to the new value. */
fieldStack = stack;
/* Fire (signal/notify) the stack property change event. */
firePropertyChange("stack", oldValue, stack);
return;
}
COM: <s> sets the stack property value for </s>
|
funcom_train/24943420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Physical makePhysicalComponent() {
int pDepth = 0;
net.sf.openforge.forge.api.pin.Buffer b = getPin().getApiPin();
if (b != null) {
pDepth = b.getInputPipelineDepth();
}
phys = new Physical(getPin().getWidth(), pDepth); // TBD CRSS -- no
// piplined depth
return phys;
}
COM: <s> makes the physical implementation of this in pin buf and connects it to </s>
|
funcom_train/36770136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean editProductName(Name oldName, Name newName) {
if (!Model.productFacade().hasProduct(oldName) ||
!newName.toString().isEmpty() ||
Model.productFacade().hasProduct(newName)) {
return false;
}
History.getInstance().add(new EditProductNameCommand(oldName, newName));
return true;
}
COM: <s> changes a product name </s>
|
funcom_train/986584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem1() {
if (stringItem1 == null) {//GEN-END:|57-getter|0|57-preInit
// write pre-init user code here
stringItem1 = new StringItem("Coca Cola:", "valor 1200");//GEN-LINE:|57-getter|1|57-postInit
// write post-init user code here
}//GEN-BEGIN:|57-getter|2|
return stringItem1;
}
COM: <s> returns an initiliazed instance of string item1 component </s>
|
funcom_train/8196743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRange(Range range) {
if (range == null) {
throw new IllegalArgumentException("Null 'range' argument.");
}
if (!(range.getLength() > 0.0)) {
throw new IllegalArgumentException(
"Range length must be positive.");
}
this.range = range;
notifyListeners(new PlotChangeEvent(this));
}
COM: <s> sets the range for the dial and sends a </s>
|
funcom_train/51572893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUsesModificationDate() throws Exception {
LocalFileSet spec = new LocalFileSet(baseFile);
FingerprintData testFp = new FingerprintData(spec);
assertFalse(testFp.usesModificationDate());
testFp.setUsesModificationDate(true);
assertTrue(testFp.usesModificationDate());
}
COM: <s> tests uses modification date </s>
|
funcom_train/50911194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Axis2 ax, RealRange range) {
if (range == null)
return;
if (ax.equals(Axis2.X)) {
if (xrange == null) {
xrange = new RealRange();
}
xrange = xrange.plus(range);
}
if (ax.equals(Axis2.Y)) {
if (yrange == null) {
yrange = new RealRange();
}
yrange = yrange.plus(range);
}
}
COM: <s> merge range for given axis </s>
|
funcom_train/46999425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resizeAnnotations(double widthFactor, double heightFactor) {
for (int i = 0; i < lines.size(); i++) {
Line2D.Float line = (Line2D.Float) lines.get(i);
Line2D.Float scaledLine = new Line2D.Float(
(float) (line.x1 * widthFactor),
(float) (line.y1 * heightFactor),
(float) (line.x2 * widthFactor),
(float) (line.y2 * heightFactor));
lines.set(i, scaledLine);
}
}
COM: <s> resizes the annotations by scaling factors </s>
|
funcom_train/16984826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Parameter getMacKeyParameter() {
if (sessionType == null) {
throw new IllegalArgumentException("Session Type must be defined before getting or setting MAC Key");
}
if (sessionType.equals(SessionType.no_encryption)) {
return Parameter.mac_key;
} else {
return Parameter.enc_mac_key;
}
}
COM: <s> get the mac key parameter determined by the session type </s>
|
funcom_train/26626693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (running) {
stopRunning();
}
if (downloadMonitor != null) {
downloadMonitor.stop();
}
if (publishMonitor != null) {
publishMonitor.stop();
}
if (unpublishMonitor != null) {
unpublishMonitor.stop();
}
started = false;
}
COM: <s> stop the component </s>
|
funcom_train/51821667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEgoLevelStat(String[] s) {
if (s.length != egoData.size()) {
// TODO throw exception
return;
}
for (int i = 0; i < s.length; i++) {
String[] oldAr = (String[])egoData.get(i);
String[] newAr = ArrayTools.appendToArray(oldAr, s[i]);
egoData.set(i, newAr);
}
}
COM: <s> adds a new set of data at the ego level </s>
|
funcom_train/7798242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(char[] cbuf, int off, int len) {
if (input == null) {
throw new IllegalStateException("The char array reader was closed.");
}
int result = len;
if (len + position >= input.length) {
len = input.length - position;
result = len;
}
if (result <= 0) {
return -1;
}
System.arraycopy(input, position, cbuf, off, len);
position += len;
return result;
}
COM: <s> read characters into a portion of an array </s>
|
funcom_train/42363210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
Status = new JLabel();
Status.setText("Status: OK!");
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(Canvas, java.awt.BorderLayout.CENTER);
jContentPane.add(Status, java.awt.BorderLayout.SOUTH);
}
return jContentPane;
}
COM: <s> returns content pane </s>
|
funcom_train/44478421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getCopyDirectory(File parentDirectory, File file, Map<String, File> mDir) {
String dirName = file.getParentFile().getName();
File directory = null;
synchronized(mDir){
directory = mDir.get(dirName);
if(directory == null){
directory = new File(parentDirectory, dirName);
if(directory.mkdir())
mDir.put(dirName, directory);
else
directory = null;
}
}
return directory;
}
COM: <s> looks for the matching copy directory or creates one </s>
|
funcom_train/2950219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newShape() {
if (shape == null) {
shape = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
}
else {
shape.reset();
}
//if (x.length == 0) return;
shape.moveTo((float) x[0], (float) y[0]);
for (int i = 1; i < x.length; i++) {
shape.lineTo((float) x[i], (float) y[i]);
}
if (closed) {
shape.closePath();
}
}
COM: <s> constructs a new polyline shape </s>
|
funcom_train/50376920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nameValid(String name) {
String check = WorkflowUtils.isAllowedAsVariableName(name);
if (check != null) {
return "Unable to change variable name: " + check;
}
if (getDiagram() == null || name.equals(getName())
|| getDiagram().isUniqueVariableName(name)) {
return null;
}
return "A variable with this name already exists.";
}
COM: <s> check whether the variables name can be set to the given value </s>
|
funcom_train/22236766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseBRecords() throws IOException {
// store ach record as we parse it. Don't know how many in total we
// / need to read before we start.
LinkedList records = new LinkedList();
for (int i = 0; i < header.numColumns; i++)
parseBRecordProfile(records);
typeBRecords = new DEMTypeBRecord[records.size()];
records.toArray(typeBRecords);
}
COM: <s> parse all the b records </s>
|
funcom_train/45121618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSubtitlePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbstractContentPanel_subtitle_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AbstractContentPanel_subtitle_feature", "_UI_AbstractContentPanel_type"),
DictionaryPackage.Literals.ABSTRACT_CONTENT_PANEL__SUBTITLE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_HeaderFooterPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the subtitle feature </s>
|
funcom_train/46217961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(JRadioButtonMenuItem menuButton) {
frameRadioButtonMenuItemGroup.remove(menuButton);
this.compositeMenu.remove(menuButton);
// cannot simply remove the radio menu button, as need to renumber the
// keyboard shortcut keys as well. Hence, a call to refreshMenu is in order...
refreshMenu(); // refresh the mnemonics associated with the other items
}
COM: <s> removes the specified radio menu button from the menu </s>
|
funcom_train/10390093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object peek(String stackName) {
Object result = null;
ArrayStack<Object> namedStack = stacksByName.get(stackName);
if (namedStack == null ) {
if (log.isDebugEnabled()) {
log.debug("Stack '" + stackName + "' is empty");
}
throw new EmptyStackException();
} else {
result = namedStack.peek();
}
return result;
}
COM: <s> p gets the top object from the stack with the given name </s>
|
funcom_train/5872812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modifyOccurEvent(OccurEvent event) {
if (event == null) return;
if (_mdyEvtList == null)
_mdyEvtList = new LinkedList();
_mdyEvtList.add(event);
if (getAttribute(ATTR_ON_MODIFY_EVENT_RESPONSE) == null) {
setAttribute(ATTR_ON_MODIFY_EVENT_RESPONSE, Boolean.TRUE);
Events.postEvent(-20000, "onModifyEventResponse", this, null);
}
}
COM: <s> modify an occur event in bandinfo </s>
|
funcom_train/19748300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDefinitionsNames(Set definitions) {
Set result = new HashSet();
Iterator i = definitions.iterator();
while (i.hasNext()) {
HeritableComponentDefinition definition =
(HeritableComponentDefinition) i.next();
result.add(definition.getName());
}
return new ArrayList(result);
}
COM: <s> returns a list of names of definitions contained in a given set </s>
|
funcom_train/22551432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeFolder() {
try {
_folder.open(this);
saveInfoMapInIncomplete();
} catch (IOException ioe) {
// problem opening files cannot recover.
if (LOG.isDebugEnabled())
LOG.debug("unrecoverable error", ioe);
state.set(TorrentState.DISK_PROBLEM);
return;
}
// if we happen to have the complete torrent in the incomplete folder
// move it to the complete folder.
if (_folder.isComplete())
completeTorrentDownload();
else if (_folder.isVerifying())
state.set(TorrentState.VERIFYING);
}
COM: <s> initializes the verifying folder </s>
|
funcom_train/39276167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initParsing() throws IOException {
// Resets parsing info
parsing = true;
lastException = null;
reader.seek(0);
// Initializes analyzers
if (analyzers != null && analyzers.length > 0) {
for (int i = 0; i < analyzers.length; i++) {
analyzers[i].initAnalyze(this);
}
}
fireStartParsing();
}
COM: <s> makes the intialization before parsing </s>
|
funcom_train/45692195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumberOfSongEventsOriginalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Song_numberOfSongEventsOriginal_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Song_numberOfSongEventsOriginal_feature", "_UI_Song_type"),
EsxPackage.Literals.SONG__NUMBER_OF_SONG_EVENTS_ORIGINAL,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the number of song events original feature </s>
|
funcom_train/33607290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDesiredRange(double min, double max) {
if (min == max)
throw new IllegalArgumentException("Range must be nonempty");
minimum = Math.min(min, max);
maximum = Math.max(min, max);
try {
computeTransformation();
} catch (IllegalStateException ex) {
this.windowBounds = null;
}
}
COM: <s> set desired range of values </s>
|
funcom_train/32089515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String decrypt(byte[] code) {
BigInteger encrypted = new BigInteger(code);
BigInteger decrypted = encrypted.modPow(privateKey, modulus);
String res = "";
try {
res = new String(decrypted.toByteArray(), "UTF8");
} catch (UnsupportedEncodingException e) {
logger.fatal("utf8", e);
}
return res;
}
COM: <s> with private key </s>
|
funcom_train/37023839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class getArgumentTypeIfAllEqual(Set members, int argumentPos) {
Class returnType = null;
Iterator iter = members.iterator();
while (iter.hasNext()) {
Class type = Reflector.getParameterTypes((Member) iter.next())[argumentPos];
if (returnType == null) {
returnType = type;
} else if (returnType != type) {
return null;
}
}
return returnType;
}
COM: <s> return the argument type at the given position if its the same </s>
|
funcom_train/18789517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMainUrl(URL mainUrl) {
if (((this.mainUrl != null) && !this.mainUrl.equals(mainUrl)) ||
((this.mainUrl == null) && (mainUrl != null))) {
this.mainUrl = mainUrl;
setModified(true);
}
}
COM: <s> sets the new value of the simple property main url </s>
|
funcom_train/25289967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDistanceGain(Point2f[] attenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("PointSound3"));
((PointSoundRetained)this.retained).setDistanceGain(attenuation);
}
COM: <s> sets this sounds distance gain attenuation where gain scale factor </s>
|
funcom_train/10345512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(String offset) {
StringBuffer buf = new StringBuffer(offset
+ "CertificateIssuerExtension [" + getOID() + "] {");
if (isCritical()) {
buf.append(" (CRITICAL)\n");
} else {
buf.append(" (NOT CRITICAL)\n");
}
buf.append(offset + " IssuerName : " + this.certIssuer + "\n");
buf.append(offset + "}\n");
return buf.toString();
}
COM: <s> generates a human readable representation of the object </s>
|
funcom_train/11533018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void mapProperties(Object target, Object src) {
try {
BeanUtils.copyProperties(target, src);
} catch (IllegalAccessException e) {
getLog().log(Level.FINEST, e.toString());
//this is wanted
} catch (InvocationTargetException e) {
getLog().log(Level.FINEST, e.toString());
//this is wanted
}
}
COM: <s> helper to map the properties wherever possible </s>
|
funcom_train/4530083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean inHostsList(DatanodeID node) {
Set<String> hostsList = hostsReader.getHosts();
return (hostsList.isEmpty() ||
hostsList.contains(node.getName()) ||
hostsList.contains(node.getHost()) ||
((node instanceof DatanodeInfo) &&
hostsList.contains(((DatanodeInfo)node).getHostName())));
}
COM: <s> keeps track of which datanodes are allowed to connect to the namenode </s>
|
funcom_train/32749069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void synchronize(IComposite comp, AcceleratorNode node) {
Iterator iterComp = comp.globalIterator();
while (iterComp.hasNext()) {
IElement elem = (IElement)iterComp.next();
if ((hasSynchronizerFor(elem)) && (propertyAccessor.hasAccessorFor(node)))
addSynchronizedElementMappedTo(elem, node);
addElementMappedTo(elem, node);
}
}
COM: <s> p creates a synchronization association between the specified composite </s>
|
funcom_train/32370788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double stdev() {
double meanVal = mean();
// System.out.println("mean: " + meanVal);
double sumSq = 0;
for (double value : values) {
// System.out.println("value: " + value);
sumSq += Math.pow(value - meanVal, 2);
}
return Math.sqrt(sumSq / (n() - 1));
}
COM: <s> the sample standard deviation of the data in the array list </s>
|
funcom_train/28296463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getIsActive() {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - getIsActive");
System.out.println(" ::--> " + mIsActive);
System.out.println(" :: SeqActivity --> END - getIsActive");
}
return mIsActive;
}
COM: <s> retrieve this activitys is active status </s>
|
funcom_train/44823516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceRef getServiceRefByRole (String roleName) {
for (int i=0; serviceRefs != null && i < serviceRefs.length; i++) {
if (roleName.equals(serviceRefs[i].getRoleName())) {
return serviceRefs[i];
}
}
return null;
}
COM: <s> get a service ref by its name </s>
|
funcom_train/9504764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setText("Start");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
CdnParameters cdnParameters = new CdnParameters();
cdnParameters.getParameters();
}
});
}
return jButton2;
}
COM: <s> this method initializes j button2 </s>
|
funcom_train/46696111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAlgorithmName() {
System.out.println("getAlgorithmName");
BasicIODescriptor instance = new BasicIODescriptor();
String expResult = "Name";
instance.setAlgorithmName(expResult);
String result = instance.getAlgorithmName();
assertEquals(expResult, result);
}
COM: <s> test of get algorithm name method of class basic iodescriptor </s>
|
funcom_train/19456015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date readDate() throws IOException {
byte[] data = readBytes(TIMEREC_LENGTH);
if (Arrays.equals(TIMEREC_NULL, data)) return null;
int year = data[TIMEREC_YEAR]+1900;
if (year < 1940) year+= 100;
GregorianCalendar gc = new GregorianCalendar(year, data[TIMEREC_MONTH]-1, data[TIMEREC_DAY],
data[TIMEREC_HOUR], data[TIMEREC_MINUTE], data[TIMEREC_SECOND]);
return gc.getTime();
}
COM: <s> read the time rec into a java date object </s>
|
funcom_train/2288596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertDigestEncoding(String value) {
byte[] data = new byte[value.length() / 2];
for (int i = 0; i < data.length; i++) {
data[i] = (byte)(Integer.parseInt(value.substring(i * 2, i * 2 + 2), 16) - 128);
}
return new String(Base64.encodeBase64(data));
}
COM: <s> converts a given digest to base64 encoding </s>
|
funcom_train/34504902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void navigateTop() {
try {
if (backwardStack.size()==0 ||
!backwardStack.peek().equals(helpEditor.getPage())) {
backwardStack.push(helpEditor.getPage());
navigationCallback.navigateBackwardStateChanged(true);
}
helpEditor.setPage(topUrl);
forwardStack.clear();
navigationCallback.navigateForwardStateChanged(false);
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> go back to where the user started from </s>
|
funcom_train/7638337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFolderName(ResourceFolderType folder) {
StringBuilder result = new StringBuilder(folder.getName());
for (ResourceQualifier qualifier : mQualifiers) {
if (qualifier != null) {
result.append(QUALIFIER_SEP);
result.append(qualifier.toString());
}
}
return result.toString();
}
COM: <s> returns the name of a folder with the configuration </s>
|
funcom_train/40222466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateConstants(CardImages cards) {
// can only calculate with card images on hand.
if (cards == null) return;
this.cards = cards;
cardWidth = cards.getWidth();
cardHeight = cards.getHeight();
cardOverlap = cards.getOverlap();
space = (cardWidth % 2);
halfCardWidth = cardWidth / 2;
numRows = ((Pyramid)getModelElement()).countRows();
calculated = true;
}
COM: <s> calculates constants that need the card images </s>
|
funcom_train/1571223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Exception rollback() {
if (this.adChannel == null) {/* not considered an error, nothing happened */
log.warn("called rollback w/o an open channel");
return null;
}
Exception error = this.adChannel.rollback();
this.releaseChannel();
return error;
}
COM: <s> rolls back a database transaction </s>
|
funcom_train/20871219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object format(Object target, Class type, int mode) {
if (mode == OBJECT_TO_STRING) {
return format(target);
} else if (mode == STRING_TO_OBJECT) {
return unformat((String) target);
} else {
throw new FormattingException("Invalid mode: " + String.valueOf(mode));
}
}
COM: <s> returns an object that is the result of formatting the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.