__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/51812043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(java.io.ObjectOutputStream out) throws IOException {
out.writeObject(arguments);
MethodSerializer serializer = new MethodSerializer();
serializer.serialize(out, method);
out.writeObject(channel);
out.writeObject(originalArguments);
serializer.serialize(out, originalMethod);
out.writeObject(originalChannel);
}
COM: <s> special serialization methods since this class contains </s>
|
funcom_train/4506316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateAgent(AgentSession session, Offer offer) {
Workgroup workgroup = offer.getRequest().getWorkgroup();
return session != null && session.isAvailableToChat() &&
session.getCurrentChats(workgroup) < session.getMaxChats(workgroup) && !offer.isRejector(session) &&
!session.isWaitingOfferAnswer();
}
COM: <s> returns true if the agent session may receive an offer </s>
|
funcom_train/25326471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(int secondsToWait) throws InterruptedException {
executorPool.shutdown();
try {
if (executorPool.awaitTermination(secondsToWait, TimeUnit.SECONDS)) {
logger.debug("Analyzer Executor Pool has been shutdown gracefully");
} else {
logger.debug("Analyzer Executor Pool could not be shutdown gracefully");
}
} catch (InterruptedException e) {
logger.warn("Thread running " + this.getClass().toString()
+ " was interrupted.");
Thread.currentThread().interrupt();
}
}
COM: <s> asks very politely to shutdown the pool of analyzer threads and waits the </s>
|
funcom_train/9758378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSelectionString() {
/*
* 1GF86V3: ITPUI:WINNT - Internal errors using Find/Replace Dialog
* Now uses TextUtilities rather than focusing on '\n'
*/
String selection= fTarget.getSelectionText();
if (selection != null && selection.length() > 0) {
int[] info= TextUtilities.indexOf(TextUtilities.DELIMITERS, selection, 0);
if (info[0] > 0)
return selection.substring(0, info[0]);
else if (info[0] == -1)
return selection;
}
return null;
}
COM: <s> returns the actual selection of the find replace target </s>
|
funcom_train/47751039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeIp() {
for (int i = 0; i < Service.getIpv4Nb(); i++) {
ipv4Text[i].setText(ipTemplate);
ipv4[i] = ipTemplate;
}
for (int i = 0; i < Service.getIpv6Nb(); i++) {
ipv6Text[i].setText("");
ipv6[i] = "";
}
}
COM: <s> fill ipv4 text box with empty string </s>
|
funcom_train/10801992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SequenceMetaData getSequenceMetaData(String name, ClassLoader envLoader, boolean mustExist) {
if (_locking) {
synchronized (this) {
return getSequenceMetaDataInternal(name, envLoader, mustExist);
}
} else {
return getSequenceMetaDataInternal(name, envLoader, mustExist);
}
}
COM: <s> return sequence metadata for the given name and classloader </s>
|
funcom_train/17624304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBorder(Brick brick) {
Point pos = this.getPosition(brick);
if ((pos.x == Layout.CORNER - 1)
|| (pos.x == Layout.CORNER + Layout.FIELD)
|| (pos.y == Layout.CORNER - 1)
|| (pos.y == Layout.CORNER + Layout.FIELD)) {
return true;
}
return false;
}
COM: <s> method returns true if brick is a border brick </s>
|
funcom_train/24050395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void node(Collection segStrings, int[] numInteriorIntersections) {
IntersectionAdder si = new IntersectionAdder(li);
MCIndexNoder noder = new MCIndexNoder();
noder.setSegmentIntersector(si);
noder.computeNodes(segStrings);
nodedSegStrings = noder.getNodedSubstrings();
numInteriorIntersections[0] = si.numInteriorIntersections;
// System.out.println("# intersection tests: " + si.numTests);
}
COM: <s> node the input segment strings once and create the split edges between </s>
|
funcom_train/51206161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateRecord(JExceptionHandler handler, JField[] data) throws JException {
try {
for(int i=0; i < data.length; i++) {
JField field = data[i];
field.validate(handler);
}
}
catch(Exception err) {
throw new JException(this, "validateRecord", err);
}
}
COM: <s> controleren van gegevens adhv veldbeschrijving </s>
|
funcom_train/23992032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StrBuilder appendWithSeparators(Object[] array, String separator) {
if (array != null && array.length > 0) {
separator = ObjectUtils.toString(separator);
append(array[0]);
for (int i = 1; i < array.length; i++) {
append(separator);
append(array[i]);
}
}
return this;
}
COM: <s> appends an array placing separators between each value but </s>
|
funcom_train/10513416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerKnownDTDs(DescriptorHandler handler) {
// register all the known DTDs
handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL51_EJB11_DTD_LOCATION);
handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL60_EJB11_DTD_LOCATION);
handler.registerDTD(PUBLICID_EJB11, ejb11DTD);
handler.registerDTD(PUBLICID_EJB20, DEFAULT_WL60_EJB20_DTD_LOCATION);
}
COM: <s> register the dtds </s>
|
funcom_train/37004794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetInputFields() {
surnameField.setText("");
firstNameField.setText("");
addressField.setText("");
zipField.setText("");
cityField.setText("");
birthdayField.setText("");
// enableSave(false);
enableEditDelete(false);
}
COM: <s> this method resets all input fields </s>
|
funcom_train/1570683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object parse(byte[] _buf) {
if (_buf == null)
return null;
// TODO: check prefix for encoding
try {
return this.parse(new String(_buf, "utf8"));
}
catch (UnsupportedEncodingException e) {
this.log.error("failed to transform byte array to UTF-8", e);
return null;
}
}
COM: <s> parses the given byte array as a property list </s>
|
funcom_train/23641271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector getChildHosts() {
mLog.debug("Getting all child hosts");
Vector list = new Vector();
try {
list = FileUtils.getLineEntries(HP_NODE_REGISTRY);
} catch (Exception ex) {
mLog.error("Exception: " + ex.getMessage() + ", cause: " + ex.getCause());
}
return list;
}
COM: <s> reads all the hosts that are registered to it </s>
|
funcom_train/49093557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertText(int atomicID, int line1, int col1, String text, AxedPointer cp) {
assert atomicID != 0;
AxedEvent e = eventPool.newEvent(atomicID, AxedEvent.INSERT_TEXT);
e.getInsertText().issue(AxedEvent.INSERT_TEXT, line1, col1, text);
listeners.fireEvent(e);
if (cp != null) {
cp.set(e.getInsertText().iv.p2);
}
eventPool.releaseEvent(e);
}
COM: <s> inserts the text into the document </s>
|
funcom_train/46577299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void view(Node node) {
if (node instanceof ActionNode) {
ActionNode actionNode = (ActionNode) node;
view(actionNode.action);
content.set(Collections.singleton(actionNode), null);
}
if (node instanceof ProjectNode) {
ProjectNode projectNode = (ProjectNode) node;
view(projectNode.project);
content.set(Collections.singleton(projectNode), null);
}
}
COM: <s> view an action node </s>
|
funcom_train/35837466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scaleToFit() {
oAerialViewPane.setZoom(1.0);
oAerialViewPane.scale();
Dimension panesize = oAerialViewPane.calculateSize();
Dimension viewsize = oAerialPanel.getSize();
double xscale = CoreUtilities.divide(viewsize.width-15, panesize.width);
double yscale = CoreUtilities.divide(viewsize.height-15, panesize.height);
double scale = xscale;
if (yscale < xscale)
scale = yscale;
if (scale > 1.0)
scale = 1.0;
oAerialViewPane.setZoom(scale);
oAerialViewPane.scale();
}
COM: <s> scale the aerial map to fit the dialog size </s>
|
funcom_train/7746152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadObjectProperties(IDomainObject object, ResultSet resultSet) throws Exception {
for (Iterator iter = this.mappingData.getProperties().iterator(); iter.hasNext();) {
XMLPropertyMappingData propertyMappingData = (XMLPropertyMappingData) iter.next();
Object propertyValue = resultSet.getObject(propertyMappingData.getColumn());
OgnlUtils.setPropertyValue(object, propertyMappingData.getName(), propertyValue);
}
}
COM: <s> this method loads the object properties </s>
|
funcom_train/1110751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects(JGraph graph, Rectangle2D rect) {
if (isLeaf() || GraphConstants.isGroupOpaque(getAllAttributes())) {
Rectangle2D bounds = getBounds();
if (bounds != null)
return bounds.intersects(rect);
} else { // Check If Children Intersect
Iterator it = childViews.iterator();
while (it.hasNext())
if (((CellView) it.next()).intersects(graph, rect))
return true;
}
return false;
}
COM: <s> returns true if the view intersects the given rectangle </s>
|
funcom_train/19312844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractBorderColor getBorderColor() {
if (! (value() instanceof PropertyCollection)) {
return null;
}
final PropertyCollection collection = (PropertyCollection) value();
final Property property = collection.findProperty(
FoProperty.BORDER_COLOR);
if (property instanceof AbstractBorderColor) {
return (AbstractBorderColor) property;
}
return null;
}
COM: <s> returns the border color component of this compound property </s>
|
funcom_train/4531143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof FieldTypeInfo))
return false;
FieldTypeInfo fti = (FieldTypeInfo) o;
// first check if fieldID matches
if (!this.fieldID.equals(fti.fieldID)) {
return false;
}
// now see if typeID matches
return (this.typeID.equals(fti.typeID));
}
COM: <s> two field type infos are equal if ach of their fields matches </s>
|
funcom_train/28115824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getXATopicConnectionFactory() {
String result = null;
ConnectionFactories factories =
ConfigurationManager.getConnector().getConnectionFactories();
if (factories.getXATopicConnectionFactoryCount() > 0) {
result = factories.getXATopicConnectionFactory(0).getName();
}
return result;
}
COM: <s> returns the name of the xatopic connection factory bound in jndi </s>
|
funcom_train/12847463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJulDay(double newJD) {
this.jd=newJD;
deltatIsValid=false;
IDate dt=swe_revjul(newJD,this.calType);
this.year=dt.year;
this.month=dt.month;
this.day=dt.day;
this.hour=dt.hour;
}
COM: <s> sets the new julian day for this object </s>
|
funcom_train/28662415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String removeChar(final String s, final char c) {
String r = ""; //$NON-NLS-1$
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) != c) {
r += s.charAt(i);
}
}
return r;
}
COM: <s> removes a specific cahracter from a string </s>
|
funcom_train/35946892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextClearBit(int fromIndex) {
int offset = fromIndex >> 6;
long mask = 1L << fromIndex;
while (offset < _length) {
long h = bits[offset];
do {
if ((h & mask) == 0) {
return fromIndex;
}
mask <<= 1;
fromIndex++;
} while (mask != 0);
mask = 1;
offset++;
}
return fromIndex;
}
COM: <s> returns the index of the next </s>
|
funcom_train/50499264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Returncode userWantsToStart() {
// start next dialog, the user login
// 1. start display
JDictProperties.getCoverFrame().setContent( GECover.PANEL_LOGIN );
// 2. start work
JDictProperties.getCurrentUser().scanFirst(); // returncode???
return new Returncode( Returncode.ACTION_OK );
}
COM: <s> the user pressed the ok button so remove title picture </s>
|
funcom_train/2697436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextAttribute getTextAttribute(String attributeName) {
TextAttributeDescriptor attributeDescriptor =
(TextAttributeDescriptor) textAttributeTable.get(attributeName);
if (attributeDescriptor == null) {
attributeDescriptor = loadAttribute(attributeName);
textAttributeTable.put(attributeName, attributeDescriptor);
}
return attributeDescriptor.createTextAttribute(fColorManager);
}
COM: <s> returns text attribute object associated with attribute name name </s>
|
funcom_train/3991505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVolume(int volume){
this.volume = volume;
if((sourceDataLine != null) && !mute) {
FloatControl volumeCtrl = (FloatControl)sourceDataLine.getControl(FloatControl.Type.MASTER_GAIN);
float GainDb = (float)(20.d * Math.log(volume == 0 ? Double.MIN_VALUE: ((double)volume / 100.d)) / Math.log(10));
volumeCtrl.setValue(GainDb);
}
}
COM: <s> sets the volume of the audio stream </s>
|
funcom_train/8343385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initThisComponent(final JTree theTree) {
scrollPane = new JScrollPane(theTree);
scrollPane
.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane
.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
setLayout(new GridLayout());
add(scrollPane);
// This keeps the edge of the tree from being right up against the edge
// of the viewport for readability.
theTree.setBorder(BorderFactory.createEmptyBorder(TOP_MARGIN,
LEFT_MARGIN, BOTTOM_MARGIN, RIGHT_MARGIN));
}
COM: <s> initializes this component by adding the tree to the scrollpane adding </s>
|
funcom_train/10238059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButtonAccept() {
if (jRadioButtonAccept == null) {
jRadioButtonAccept = new JRadioButton();
jRadioButtonAccept.setBounds(new Rectangle(28, 256, 19, 16));
jRadioButtonAccept.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
enableNextButton(true);
}
});
}
return jRadioButtonAccept;
}
COM: <s> this method initializes j radio button accept </s>
|
funcom_train/10862721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLiterals() {
Iterator<String> paramNames = params.getParameterNamesIterator();
while (paramNames.hasNext()) {
String pname = paramNames.next();
if (!pname.startsWith(LITERALS_PREFIX)) continue;
String name = pname.substring(LITERALS_PREFIX.length());
addField(name, null, params.getParams(pname));
}
}
COM: <s> add in the literals to the document using the </s>
|
funcom_train/22379910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JFrame createFrame() {
JFrame retFrame = new JFrame("Concept Tree: (" + path + ")");
retFrame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
frame.dispose();
if (--ttCount == 0) {
System.exit(0);
}
}
});
return retFrame;
}
COM: <s> creates the jframe that will contain everything </s>
|
funcom_train/3429026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildKeyIndex(String name, DOM dom) {
if (_keyIndexes == null) _keyIndexes = new Hashtable();
KeyIndex index = (KeyIndex)_keyIndexes.get(name);
if (index == null) {
_keyIndexes.put(name, index = new KeyIndex(_indexSize));
}
index.setDom(dom, dom.getDocument());
}
COM: <s> create an empty key index in the dom case </s>
|
funcom_train/17788458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLength(int row, int elementInRow) {
if ((v == 0) || (v == 2)) {
return getIntLength(row,elementInRow);
} else if ((v == 1) || (v == 3)) {
return getLongLength(row,elementInRow);
} else {
assert(true);
}
return -1;
}
COM: <s> returns the j th length in row i of the array </s>
|
funcom_train/40874287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMaybeLink(Element e) {
// Get the objects references
String s1 = ((Element) e.getChildren().get(0))
.getAttributeValue(XMLObjectName.REFERENCE);
String s2 = ((Element) e.getChildren().get(1))
.getAttributeValue(XMLObjectName.REFERENCE);
// Get the objects with the references
MDObject o1 = (MDObject) classList.get(s1);
MDObject o2 = (MDObject) classList.get(s2);
// Add maybe link
MaybeLink link = o1.addMaybeLink(o2);
maybelinkList.put(new Tuple(o1, o2), link);
}
COM: <s> parse all elements and attributes of the maybe link and </s>
|
funcom_train/11005346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getData() {
if (isCompressed()) {
InputStream compressedStream = new ByteArrayInputStream(_data, 4, _data.length);
return new InflaterInputStream(compressedStream);
} else {
return new ByteArrayInputStream(_data, 0, _data.length);
}
}
COM: <s> opens an input stream which will decompress the data on the fly </s>
|
funcom_train/14352927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object arg0) {
if (!(arg0 instanceof SIReference))
return this.getClass().getName().compareTo(arg0.getClass().getName());
else {
long i = m_uniqueID - ((SIReference)arg0).m_uniqueID;
if (i<0) return -1;
if (i==0) return 0;
return 1;
}
}
COM: <s> compares on the basis of the underlying representation </s>
|
funcom_train/24120809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream out) throws IOException {
int size = this.getSize();
WMFConstants.writeLittleEndian(out, size);
WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_SETTEXTCOLOR);
out.write(this.color.getRed());
out.write(this.color.getGreen());
out.write(this.color.getBlue());
out.write(0);
}
COM: <s> writes the content of the record to a stream </s>
|
funcom_train/42009657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWrapY(boolean wrap) {
_wrapY = wrap;
if (wrap) {
if (_yRangeGiven) {
_yBottom = _ylowgiven;
_yTop = _yhighgiven;
}
else {
if (_yBottom > _yTop) {
// have nothing to go on.
setYRange(0, 0);
} else {
setYRange(_yBottom, _yTop);
}
}
_wrapYLow = _ylowgiven;
_wrapYHigh = _yhighgiven;
}
else {
// should be done in subclass
}
}
COM: <s> specify whether the x axis is wrapped </s>
|
funcom_train/26024641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configureEdge(GraphCell edge) {
AttributeMap attributes = edge.getAttributes();
if (defaultEdgeFont != null)
GraphConstants.setFont(attributes, defaultEdgeFont);
if (defaultEndDecoration != GraphConstants.ARROW_NONE)
GraphConstants.setLineEnd(attributes, defaultEndDecoration);
if (defaultBeginDecoration != GraphConstants.ARROW_NONE)
GraphConstants.setLineBegin(attributes, defaultBeginDecoration);
if (edge instanceof MutableTreeNode)
addPorts((MutableTreeNode) edge, defaultPortLocations);
}
COM: <s> hook for subclassers to configure the specified edge </s>
|
funcom_train/13993574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object value) {
checkType(value);
if (((value == null) && (this.value != null))
|| ((value != null) && (!value.equals(this.value)))) {
this.value = value;
valueObject.fireValueObjectChange(property.getName());
}
}
COM: <s> sets new value and removes the currently registered exceptions </s>
|
funcom_train/31128243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte setDefaultProgram(String name) throws IOException {
byte[] request = {SYSTEM_COMMAND_REPLY, NXJ_SET_DEFAULT_PROGRAM};
byte[] encName = null;
try {
encName = AsciizCodec.encode(name);
} catch (UnsupportedEncodingException e) {
return -1;
}
request = appendBytes(request, encName);
byte [] reply = nxtComm.sendRequest(request, 3);
return reply[2];
}
COM: <s> le jos specific command to set the default program </s>
|
funcom_train/23778786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSourceFolder(IFolder argFolder) throws EslinkModelException {
if (argFolder == null)
return; // nothing to add, really
// check if folder is there
IEslinkSourceFolder sf = _findSourceFolder(argFolder);
if (sf == null) return; // folder is not a source folder
// remove folder from list
_sourceFolders.remove(sf);
_buildChildren();
refresh();
}
COM: <s> unmark the source folder status for a given folder in this project </s>
|
funcom_train/46262831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public GLVector3D add(GLVector3D v1, GLVector3D v2, GLVector3D target) {
if (target == null) {
target = new GLVector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z);
} else {
target.set(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
}
return target;
}
COM: <s> add two vectors into a target vector </s>
|
funcom_train/29400949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void compileCode(Method action) {
for (Statement statement : action.getStatements()) {
statement.apply(this);
action.addFlows(statement.getAtoms());
}
// further procession of the Flows generated
for (Flow flow : action.getFlows()) {
flow.apply(this);
}
}
COM: <s> generates flow atoms for every statement in a method </s>
|
funcom_train/3345450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readCluster(long cluster, byte[] dst, int dstOffset) throws IOException {
final int clusterSize = getClusterSize();
final long clusterOffset = cluster * clusterSize;
log.debug("readCluster(" + cluster + ") " + (readClusterCount++));
api.read(clusterOffset, ByteBuffer.wrap(dst, dstOffset, clusterSize));
}
COM: <s> read a single cluster </s>
|
funcom_train/32303553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSafe(HMethod hm) {
if (safetyCache.containsKey(hm))
return ((Boolean) safetyCache.get(hm)).booleanValue();
safetyCache.put(hm, new Boolean(true));// deals with cycles.
boolean isSafe = _isSafe_(hm); // split to make caching more readable.
safetyCache.put(hm, new Boolean(isSafe));
return isSafe;
}
COM: <s> determine if this method is safe will never need initializers </s>
|
funcom_train/39102245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataViewer createViewer(Viewable model) {
if (model == null) {
throw new IllegalArgumentException("model may not be null");
}
if (!(model instanceof ArrayModel)) {
throw new IllegalArgumentException("model must be of type ArrayModel but have: " + model.getClass().getName());
}
return new ArrayEditor((ArrayModel) model, elementCreator, maxConcurrentElements);
}
COM: <s> creates a new instance of type array editor </s>
|
funcom_train/13533296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsElement(String name) {
if (isReadOnly && cachesInitialized) {
return eaMap.containsKey(name);
}
Iterator it = elements.iterator();
while (it.hasNext()) {
ExtendedAttribute ea = (ExtendedAttribute) it.next();
if (ea.getName().equals(name)) {
return true;
}
}
return false;
}
COM: <s> returns true if there is at least one extended attribute with such name </s>
|
funcom_train/9878932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMenuChanged(IDisplayMenu menu) {
this.isDrawBorders = menu.isDrawingBorder();
this.isAntiAliasing = menu.isAntiAliasing();
this.labelIndex = menu.getLabelIndex();
setElementSize(menu.getElementSize());
updateSize();
}
COM: <s> updates some attributies when the display menu is changed </s>
|
funcom_train/32307985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Temp argSecondReg(Object inv, int arg_idx) {
assert argWhereInternal(inv, arg_idx) == REGISTER;
CallInfo ci = (CallInfo)inv2info.get(inv);
assert ci.getArg2Word(arg_idx) + 1 < ci.getArg2Word(arg_idx + 1);
return idx2ArgReg(ci.getArg2Word(arg_idx) + 1);
}
COM: <s> return the second argument register for a two word temporary </s>
|
funcom_train/51783255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDrawUnspecifiedWithTwoArrow() {
relation.setNavigableToElement1(true);
relation.setNavigableToElement2(true);
try {
mockDrawingContext.expects(atLeastOnce()).method("drawLine");
prototype.draw((DrawingContext) mockDrawingContext.proxy());
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> tests the draw method with two arrows </s>
|
funcom_train/20617700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAvatar(String macAddress, String filename) {
Connection con = db.iDisplayClientConnenction();
try {
File file = new File(filename);
FileInputStream fis = new FileInputStream(file);
PreparedStatement ps = con
.prepareStatement("UPDATE idisplayclientprofiles SET avatar = ? "
+ "WHERE macaddress = '" + macAddress + "'");
ps.setBinaryStream(1, fis, (int) file.length());
ps.executeUpdate();
ps.close();
fis.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> adds a new user avatar to the database </s>
|
funcom_train/41656516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commandAction(Command c, Displayable d) {
if (c == exit) {
try {
destroyApp(true);
} catch (MIDletStateChangeException e) {
e.printStackTrace();
}
notifyDestroyed();
}
if (c == about) {
alTest = new Alert("About",
"This ingenious program was made by Yuval & Yagel Kohavi",
null, AlertType.INFO);
display.setCurrent(alTest, form);
}
}
COM: <s> react to user commands </s>
|
funcom_train/44595927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int retrieveRightBracketPosition(int start, int end) {
this.scanner.resetTo(start, end);
try {
int token;
int balance = 0;
while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
switch(token) {
case TerminalTokens.TokenNameLBRACKET :
balance++;
break;
case TerminalTokens.TokenNameRBRACKET :
balance--;
if (balance == 0) return this.scanner.currentPosition - 1;
break;
}
}
} catch(InvalidInputException e) {
// ignore
}
return -1;
}
COM: <s> this method is used to retrieve the position of the right bracket </s>
|
funcom_train/50864982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update() {
// Update all unit windows.
Iterator<UnitWindow> i1 = unitWindows.iterator();
try {
while (i1.hasNext()) {
i1.next().update();
}
}
catch (ConcurrentModificationException e) {
// Concurrent modifications exceptions may occur as
// unit windows are opened.
}
// Update all tool windows.
Iterator<ToolWindow> i2 = toolWindows.iterator();
try {
while (i2.hasNext()) {
i2.next().update();
}
}
catch (ConcurrentModificationException e) {
// Concurrent modifications exceptions may occur as
// unit windows are opened.
}
}
COM: <s> update the desktop and all of its windows </s>
|
funcom_train/20630287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char[] ch, int start, int length) throws SAXException {
currentStr = new String(ch, start, length);
Categories.dataXml().debug("char: " + currentStr);
tempBuffer.append(currentStr);
valueBuffer.append(currentStr);
}
COM: <s> used by the sax parser to read the xml file </s>
|
funcom_train/15742093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateStatusLine(IEditorPart editorPart, boolean editable) {
Object adapter = editorPart.getAdapter(IEditorStatusLine.class);
if (adapter != null) {
IEditorStatusLine statusLine = (IEditorStatusLine) adapter;
statusLine.setMessage(false, editable ? "" : "Not editable", null);
}
}
COM: <s> needs ui thread </s>
|
funcom_train/1675548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verifyCursors() {
if (cursorSet != null) {
Iterator<CursorImpl> iter = cursorSet.iterator();
while (iter.hasNext()) {
CursorImpl cursor = iter.next();
if (getCursorBINToBeRemoved(cursor) != this) {
BIN cBin = getCursorBIN(cursor);
assert cBin == this;
}
}
}
}
COM: <s> for each cursor in this bins cursor set ensure that the cursor is </s>
|
funcom_train/9159610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
LongLinkedListNode node = head.next;
StringBuffer buf = new StringBuffer();
while (node != head) {
buf.append(node.toString()).append(", ");
node = node.next;
}
return buf.toString();
}
COM: <s> returns a string representation of the linked list with a comma </s>
|
funcom_train/48855589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addReference(DocumentVersion docVersion) {
OpenDocumentRecord docRec = null;
Iterator itr = this.openDocuments.iterator();
while (itr.hasNext()) {
docRec = (OpenDocumentRecord) itr.next();
if (docRec.document.getVersion().equals(docVersion)) {
SimpleLogger.logInfo("Adding reference to open documment "
+ docVersion.toString());
docRec.addRef();
break;
}
}
}
COM: <s> add a reference to an open document </s>
|
funcom_train/45317868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override protected void startup() {
try {
show(new ToolbarView(this));
} catch (InstantiationException ex) {
Logger.getLogger(MainApplication.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
Logger.getLogger(MainApplication.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> at startup create and show the main frame of the application </s>
|
funcom_train/8022312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printCells() {
for (CellEntry entry : this.entries) {
Cell cell = entry.getCell();
System.out.format("(%s, %s) %s%n", cell.getRow(), cell.getCol(), cell.getValue());
}
}
COM: <s> debugging method that prints out the contents of the entire spreadsheet </s>
|
funcom_train/22279674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int mapIdentifier(ClassTable table, int row) {
int id;
if (idCount >= rowForId.length) {
rowForId = growIntArray(rowForId);
tableForId = growTableArray(tableForId);
}
id = idCount;
rowForId[id] = row;
tableForId[id] = table;
idCount++;
return id;
}
COM: <s> primitive method for mapping a class table and row to a new object </s>
|
funcom_train/10584268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPath(Document document, String path) throws TransactionException {
Validate.notNull(path);
Validate.notNull(document);
String key = getKey(document.getUUID(), document.getLanguage());
doc2path().put(key, path);
save();
}
COM: <s> sets the path for a document </s>
|
funcom_train/36931014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CCVector2f transform(final CCVector2f theSource, CCVector2f theTarget) {
if (theTarget == null) {
theTarget = new CCVector2f();
}
theTarget.x = m00 * theSource.x + m01 * theSource.y + m02;
theTarget.y = m10 * theSource.x + m11 * theSource.y + m12;
return theTarget;
}
COM: <s> multiplies the given source vector against this matrix </s>
|
funcom_train/11123969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Header getLastHeader(String name) {
// start at the end of the list and work backwards
for (int i = headers.size() - 1; i >= 0; i--) {
Header header = headers.get(i);
if (header.getName().equalsIgnoreCase(name)) {
return header;
}
}
return null;
}
COM: <s> gets the last header with the given name </s>
|
funcom_train/37433134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
StringBuffer sb = new StringBuffer();
for(Iterator i= addresses.iterator();i.hasNext();){
sb.append(i.next());
if (i.hasNext()){
sb.append(',');
}
}
return sb.toString();
}
COM: <s> returns a string represenation of this instance </s>
|
funcom_train/37797024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tempFile(int testId, String result, String file) {
for (Iterator i = reporters.iterator(); i.hasNext(); ) {
IReporter r = (IReporter)i.next();
r.tempFile(testId, result, file);
}
}
COM: <s> called when a test has failed and a temporary file is left </s>
|
funcom_train/40941551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadDocument(Object xmlConfig) {
verifyConfiguration();
if (xmlConfig == null)
throw new PersistenceConfigurationException(
"Invalid linp xmlConfig");
try {
buildConfiguration(XmlUtil.buildDocument(xmlConfig).getLinp());
} catch (PersistenceConfigurationException ex) {
throw ex;
} catch (Exception ex) {
throw new PersistenceConfigurationException(ex);
}
}
COM: <s> loads the configuration document </s>
|
funcom_train/36635468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selfChangePassword() {
log.debug("changing user's password");
if (newPassword != null && confirmNewPassword != null
&& newPassword.equals(confirmNewPassword)) {
// encode and set on user
String encPasswd = Enc.enc(newPassword);
user.setPassword(encPasswd);
addMessage(Messages.getMessage("message.password_saved"));
userDao.update(user);
} else {
addErrorMessage(Messages
.getMessage("message.passwords_donot_match"));
}
}
COM: <s> only user may change his password </s>
|
funcom_train/17409945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printPCB() {
//System.out.println(jobQueue.toString());
for (PCB_block v : jobQueue) {
System.out.println("JobID: " + v.getJobID() + "\tJobPriority: " +
v.getJobPriority() + "\tJobSize: " + v.getJobSize());
}
}
COM: <s> prints the contents of the pcb </s>
|
funcom_train/43219997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IPluginFile getPreviousFileByType() {
if(fFiles == null) {
createFileIterator();
}
if(fFiles != null && fCounter > 0) {
IPluginFile pluginFile = (fFiles[--fCounter]).getPluginFile();
currentFile = pluginFile;
return pluginFile;
}
return null;
}
COM: <s> retrieves the previous file in the directory supported by the viewer </s>
|
funcom_train/35528461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadSinogram(final CTScanner ctscanner) {
final SwingWorker worker = new SwingWorker() {
public Object construct() {
mBufferedImage = ctscanner.CreateSinogram(null);
return mBufferedImage;
}
//Runs on the event-dispatching thread.
public void finished() {
setPixelData();
PerformWindowing();
repaint();
}
};
worker.start();
}
COM: <s> loads a sinogram image into the panel </s>
|
funcom_train/14300522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String validate_value(String value) {
StringBuffer str = new StringBuffer(value);
for (int i=0; i < str.length(); i++) {
if (str.charAt(i) == ' ')
str.setCharAt(i, '_');
}
return str.toString();
}
COM: <s> check whether a string is a valid name </s>
|
funcom_train/24152993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShowWeeks() {
System.out.println("showWeeks");
CalendarPanel calendar = new CalendarPanel();
calendar.setShowWeeks(true);
assertTrue("showWeeks must be true.", calendar.getShowWeeks());
calendar.setShowWeeks(false);
assertFalse("showWeeks must be false.", calendar.getShowWeeks());
}
COM: <s> test of the property show weeks of class com </s>
|
funcom_train/5268706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void swap(int a, int b) {
int unit = board[0].length;
MemoryTile temp = board[a / unit][a % unit];
board[a / unit][a % unit] = board[b / unit][b % unit];
board[b / unit][b % unit] = temp;
}
COM: <s> swap the position of tiles a and b </s>
|
funcom_train/9565872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PdfDictionary getSignatureDictionary(String name) {
getSignatureNames();
name = getTranslatedFieldName(name);
if (!sigNamesMap.containsKey(name))
return null;
Item item = (Item) fields.get(name);
PdfDictionary merged = item.getMerged(0);
return merged.getAsDict(PdfName.V);
}
COM: <s> gets the signature dictionary the one keyed by v </s>
|
funcom_train/16788106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String shorten(String s, int targetLength) {
String middle = "...";
int l = s.length();
// nothing to do
if (l <= targetLength)
return s;
// check minimum length
if (targetLength < 5)
return s;
int end = targetLength / 2;
if (targetLength < 7)
end -= 1;
int rest = targetLength - end - middle.length();
return s.substring(0, end) + middle + right(s, rest);
}
COM: <s> shorten the given text to max length target length </s>
|
funcom_train/44317856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadXML(IFile file) throws Exception {
_ids = new HashMap();
_file = file;
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputStream is = file.getContents();
Document doc = db.parse(is);
parseRoot(doc.getDocumentElement());
// free things up.
is.close();
} catch (Exception e) {
throw(e);
} // catch
} // void loadXML()
COM: <s> loads the data map from the given file </s>
|
funcom_train/32057738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGraphpad() {
System.out.println("testSetGraphpad");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
newDoc.setGraphpad(pad);
assertEquals("setGraphpad failed", newDoc.getGraphpad(), pad);
}
COM: <s> test of set graphpad method of class gpdocument </s>
|
funcom_train/9138820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities getCapabilities() {
Capabilities currentCapabilities = super.getCapabilities(); // returns the object from weka.classifiers.Classifier
// Set the attributes that our clusterer can handle
currentCapabilities.enable(Capabilities.Capability.NOMINAL_ATTRIBUTES);
currentCapabilities.enable(Capabilities.Capability.NUMERIC_ATTRIBUTES);
currentCapabilities.enable(Capabilities.Capability.DATE_ATTRIBUTES);
currentCapabilities.enable(Capabilities.Capability.MISSING_VALUES);
return currentCapabilities;
}
COM: <s> obtain the capabilities in terms of data attributes that this clusterer can handle </s>
|
funcom_train/34900956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateMenuForStatus(Status status) {
// hide the New and Delete buttons
showProjectButtons(false);
// enable the edit button if the step is not pending or running.
boolean editable = !(status.pending() || status.running() || status.gui_needs_results() || status.in_transition());
enableEdit(editable);
}
COM: <s> hides the new and delete buttons </s>
|
funcom_train/46744783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFacilityLocationRef(DisplayModel facilityLocationRef) {
if (Converter.isDifferent(this.facilityLocationRef, facilityLocationRef)) {
DisplayModel oldfacilityLocationRef= new DisplayModel(this);
oldfacilityLocationRef.copyAllFrom(this.facilityLocationRef);
this.facilityLocationRef.copyAllFrom(facilityLocationRef);
setModified("facilityLocationRef");
firePropertyChange(String.valueOf(VISITS_FACILITYLOCATIONREFID), oldfacilityLocationRef, facilityLocationRef);
}
}
COM: <s> facility location for this visit </s>
|
funcom_train/24097840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OvalVariableComponentObject createObjectComponent() {
Element e = new Element("object_component", getElement().getNamespace());
OvalVariableComponentObject ret = getParentDocument().getObjectVariableComponentWrapper();
ret.setElement(e);
ret.setRoot(getRoot());
return ret;
}
COM: <s> create an object component suitable for adding to this variable as a child </s>
|
funcom_train/15410873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(DmlHandler request, Object bean, boolean withId) throws SQLException {
if (withId) {
id.dmlBind(request, false, bean);
}
if (shadowFKey != null){
shadowFKey.dmlBind(request, false, bean);
}
if (discriminator != null){
discriminator.dmlBind(request, false, bean);
}
all.dmlBind(request, false, bean);
}
COM: <s> bind the request based on whether the id value s are null </s>
|
funcom_train/22447853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTest( String testName, boolean todo ){
// declares the change to the model
this.setChanged();
// begins the model change
for( int i=0; i<testSelected.length; i++)
// select test based on it's name
if( TEST_NAMES[i].equalsIgnoreCase(testName) )
// made the change in the model
this.testSelected[i] = todo;
// notify the change to observer(s)
this.notifyObservers();
}
COM: <s> says what to do with a test specified by its name given </s>
|
funcom_train/16177225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMatrix(DenseDoubleMatrix2D m) {
int rows = m.rows();
int cols = m.columns();
matrix = new BitMatrix2D(rows, cols);
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
matrix.set(i, j, (byte)m.getQuick(i, j));
}
}
}
COM: <s> copies the matrix elements from the specified dense double matrix2 d </s>
|
funcom_train/46219845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanUp(PortletSession session) {
Enumeration<String> attributeNames = session.getAttributeNames();
while (attributeNames.hasMoreElements()) {
String name = attributeNames.nextElement();
if (name.startsWith(SESSION_ATTRIB_KEY_PREFIX)) {
session.removeAttribute(name);
}
}
}
COM: <s> this will remove all webbis specific data from the session i </s>
|
funcom_train/48390094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addEventChangedHandler(com.smartgwt.client.widgets.calendar.events.EventChangedHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.calendar.events.CalendarEventChangedEvent.getType()) == 0) setupEventChangedEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.calendar.events.CalendarEventChangedEvent.getType());
}
COM: <s> add a event changed handler </s>
|
funcom_train/17944657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeOutRTF(StyledDocument doc) throws IOException, BadLocationException {
File whatFile = getFileFromChooser( ".",
JFileChooser.SAVE_DIALOG,
MutableFilter.EXT_RTF,
translatrix.getTranslationString("FiletypeRTF"));
if(whatFile != null) {
FileOutputStream fos = new FileOutputStream(whatFile);
RTFEditorKit rtfKit = new RTFEditorKit();
rtfKit.write(fos, doc, 0, doc.getLength());
fos.flush();
fos.close();
refreshOnUpdate();
}
}
COM: <s> method for saving text as an rtf document </s>
|
funcom_train/4363717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PrintStream findStream() {
Stack stack = (Stack)logs.get();
if (stack != null && !stack.isEmpty()) {
CaptureLog log = (CaptureLog)stack.peek();
if (log != null) {
PrintStream ps = log.getStream();
if (ps != null) {
return ps;
}
}
}
return out;
}
COM: <s> find print stream to which the output must be written to </s>
|
funcom_train/37858365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connectToDatabase() {
try {
connect();
} catch (Exception cnf) {
if (startGUI && frame != null)
frame.setStatus("Connection to database failed; message: "
+ cnf.getMessage());
else
System.err.println("Connection to database failed; message: "
+ cnf.getMessage());
cnf.printStackTrace();
System.exit(1);
}
}
COM: <s> reusable method for connecting to database </s>
|
funcom_train/18789216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAdministrator(User administrator) {
if (((this.administrator != null) && !this.administrator.equals(administrator)) ||
((this.administrator == null) && (administrator != null))) {
this.administrator = administrator;
administratorHandle = (administrator != null ? administrator.getId() : null);
setModified(true);
}
}
COM: <s> sets the new value of the simple property administrator </s>
|
funcom_train/12245526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPhoString(String text, boolean male) {
try {
String tmpPhoFile = Emofilt._config.getString("tmpDir")
+ Emofilt._config.getString("tmpPhoFile");
genPhoFile(text, tmpPhoFile, male);
return FileUtil.getFileText(new File(tmpPhoFile));
} catch (Exception e) {
Util.reportError(e, _logger);
return null;
}
}
COM: <s> generate a pho text for some input </s>
|
funcom_train/48936513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printRetsReplyHeader(ServletOutputStream os) throws IOException {
os.println("<?xml version=\"1.0\" standalone=\"no\"?>");
// TODO: specify the correct DTD for the RETS version
os.println("<!DOCTYPE RETS SYSTEM \"RETS-20021015.dtd\">");
}
COM: <s> print the rets reply header to the specified servlet output stream </s>
|
funcom_train/15625871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLightSource(@NotNull final MapSquare<G, A, R> mapSquare) {
notifyBeginChange();
try {
if (!lightSources.remove(mapSquare)) {
assert false;
}
if (lightSources.isEmpty()) {
lightSources = Collections.emptyList();
}
} finally {
notifyEndChange();
}
}
COM: <s> removes a light emitting game object that affects this map square </s>
|
funcom_train/51783207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetUnlimited() {
multiplicity = Multiplicity.getUnboundedInstance(3);
assertEquals(3, multiplicity.getLowerBound());
assertTrue(multiplicity.noUpperLimit());
assertEquals("3..*", multiplicity.toString());
// Special case 0..* is printed as *
multiplicity = Multiplicity.getUnboundedInstance(0);
assertEquals("*", multiplicity.toString());
}
COM: <s> tests the unlimited functionality </s>
|
funcom_train/38999276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
if (mainClassName == null) {
return;
}
startFromXMLEntries();
startingFunctions.addAll(ExamineList.getInstanceOf().getAllEntries());
MCMarkPhase.getInstanceOf().execute();
MCRemovalPhase.getIntanceOf().execute();
}
COM: <s> hope you have already mentioned few starting points </s>
|
funcom_train/3091707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb;
sb = new StringBuffer();
sb.append(new String("Id : "));
sb.append(id);
sb.append(new String("\nTopic : "));
sb.append(topic);
sb.append(new String("Maximum Age : "));
sb.append(maximum_age);
sb.append(new String("\nAge : "));
sb.append(age);
sb.append(new String("\nActive Status : "));
sb.append(active_status);
sb.append(new String("\n"));
return (sb.toString());
}
COM: <s> returns the details of the code author code as a code string code </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.