__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45209802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCursor (int player, int x, int y, int z) {
assert precondition ((player >= 0 && player <= numPlayers),
"player must be between 0 and "+numPlayers);
xc[player] = x; yc[player] = y; zc[player] = z;
}
COM: <s> set cursor position for a certain player without checking for over and </s>
|
funcom_train/23998754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescription() throws MetaDataErrorException {
if (cache[InfoConstants.IMAGE_DESCRIPTION] == null) {
/* no caching */
String result = getMetaDataReader().getData(
InfoConstants.IMAGE_DESCRIPTION);
if (result == null || result.isEmpty()) {
result = NO_DATA;
}
/* cache data */
cache[InfoConstants.IMAGE_DESCRIPTION] = result;
return result;
} else {
/* caching */
return (String) cache[InfoConstants.IMAGE_DESCRIPTION];
}
}
COM: <s> gets the image description of this picture data are cached </s>
|
funcom_train/25785985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Logger getLogger() {
Logger result = null;
Context context = getContext();
if (context == null) {
context = Context.getCurrent();
}
if (context != null) {
result = context.getLogger();
}
if (result == null) {
result = Engine.getLogger(this, "org.restlet.client");
}
return result;
}
COM: <s> returns the contexts logger </s>
|
funcom_train/16910450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkKnowledgeName(final String name, final KnowledgeGroup group) {
if (group.getTitle().equals(name)) {
return false;
}
for (Knowledge k : group.getKnowledges()) {
if (name.equals(k.getName())) {
return false;
}
}
for (KnowledgeGroup kg : group.getChildren()) {
if (!this.checkKnowledgeName(name, kg)) {
return false;
}
}
return true;
}
COM: <s> checks wether this name is permitted i </s>
|
funcom_train/5861580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeFilter(String ext, Filter filter, int flags) {
if (ext == null || filter == null)
return false;
ext = ext.toLowerCase();
boolean removed = false;
if (flags == 0 || (flags & FILTER_REQUEST) != 0)
removed = rmFilter(_reqfilters, ext, filter);
if ((flags & FILTER_INCLUDE) != 0)
removed = rmFilter(_incfilters, ext, filter) || removed;
return removed;
}
COM: <s> removes the filter </s>
|
funcom_train/41441023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MBeanInfo getMBeanInfo( ObjectName oname ){
/* Example:
//Get the MBeanInfo for the Tomcat MBean
ObjectName name = new ObjectName( "jboss.web:service=WebServer" );
*/
MBeanInfo info = null;
try{
info = rmiserver.getMBeanInfo( oname );
} catch( Exception e){
e.printStackTrace();
}
return info;
}
COM: <s> get the metadata for the mbean </s>
|
funcom_train/11648019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V remove(K key) throws CacheException {
if (log.isTraceEnabled()) {
log.trace("Removing object from cache [" + cache.getName() + "] for key [" + key + "]");
}
try {
V previous = get(key);
cache.remove(key);
return previous;
} catch (Throwable t) {
throw new CacheException(t);
}
}
COM: <s> removes the element which matches the key </s>
|
funcom_train/5692638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBasicTypeAsString() {
if (this.type != null) {
String strType = findBasicType(this.type);
if (strType == null) {
strType = this.type;
}
return strType;
}
return "xs:string"; // Always default to xs:string if no type can be determined.
}
COM: <s> returns the basic type </s>
|
funcom_train/27663172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void filter(BufferedImageOp op) {
if (image != null) {
BufferedImage filteredImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_RGB);
op.filter(image, filteredImage);
image = filteredImage;
repaint();
}
}
COM: <s> this routine used to apply the filter to the image box </s>
|
funcom_train/16558251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findNNearest(int numberOfNearest, Point2D point) {
List solution = null;
spatialindex.spatialindex.Point sptPoint = new
spatialindex.spatialindex.Point(new double[]{point.getX(), point.getY()});
RTreeVisitor visitor = new RTreeVisitor();
rtree.nearestNeighborQuery(numberOfNearest, sptPoint,visitor);
solution = visitor.getSolution();
return solution;
}
COM: <s> looks for the n indexes nearest to the specified point </s>
|
funcom_train/18895824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeToBlock(Block b, int offset) {
b.putLong(offset + IDX_HEAD, head);
b.putLong(offset + IDX_TAIL, tail);
b.putLong(offset + IDX_NEXT_ITEM, nextItem);
b.putLong(offset + IDX_NR_VALID_ITEMS, nrValidItems);
}
COM: <s> writes the details of the current phase into a block </s>
|
funcom_train/12619108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expr equalizeRanges(int width, int from1, int from2){
Expr res = ef.And();
for(int i = 0; i < width; i++){
res.add(impl(ef.Lit(from1+i), ef.Lit(from2+i)));
res.add(impl(ef.Lit(from2+i), ef.Lit(from1+i)));
}
return res;
}
COM: <s> a b a1 b1 b1 a1 a2 b2 b2 a2 </s>
|
funcom_train/28686200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short readWord(RealModeAddress address) throws MemoryException {
// read low word
byte low = readByte(address);
// read high word
RealModeAddress nextAddress = new RealModeAddress(
address.getSegment(), (short)(address.getOffset() + 1));
byte high = readByte(nextAddress);
return (short)((Unsigned.unsignedByte(high) << 8) |
Unsigned.unsignedByte(low));
}
COM: <s> reads a single word from the specified address </s>
|
funcom_train/40555011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String user, String uri, String lisedRepresentation) {
if (isDisabled()) {
return;
}
try {
UriCache uriCache = getCache(user);
uriCache.putInGroup(uri, user, lisedRepresentation);
}
catch (Exception e) {
this.server.getLogger().warning(
"Error during LiSeD front-side cache add: " + StackTrace.toString(e));
}
}
COM: <s> adds a user lhsd pair to this front side cache </s>
|
funcom_train/16628024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLength(int length) throws BadOperationException,BadLocationException {
if (_type!=DocumentEvent.EventType.REMOVE) {
throw new BadOperationException("setLength only applies to eventtype 'REMOVE'");
}
if ((_offset+length)>_document.getLength()) {
throw new BadLocationException("Offset+length out of range for this change/docment combination",_offset);
}
_length=length;
}
COM: <s> sets the length of the change in the document </s>
|
funcom_train/8035007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int findIndexOfParentNode(int index) {
if ((index >= 0) && (index < graphicNodes.size())
&& (graphicNodes.get(index) != null)) {
if (index != 0) {
if (index % 2 == 0) {
return (index - 2) / 2;
} else {
return (index - 1) / 2;
}
}
}
return -1;
}
COM: <s> finds the index of the parent graphic node of the node indicated with </s>
|
funcom_train/13271936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNameStyle(TextStyle nameStyle) {
if (nameStyle != this.nameStyle) {
TextStyle oldNameStyle = this.nameStyle;
this.nameStyle = nameStyle;
this.propertyChangeSupport.firePropertyChange(Property.NAME_STYLE.name(), oldNameStyle, nameStyle);
}
}
COM: <s> sets the text style used to display piece name </s>
|
funcom_train/37611493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuilder result = new StringBuilder();
result.append("TestStatisticsMap = {");
new ForEach() {
public void next(Test test, StatisticsSet statisticsSet) {
result.append("(");
result.append(test);
result.append(", ");
result.append(statisticsSet);
result.append(")");
}
}
.iterate();
result.append("}");
return result.toString();
}
COM: <s> return a code string code representation of this </s>
|
funcom_train/29778840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Paint getItemPaint(final int serie, final int column) {
double wl = lowWl + (column + 0.5d) * (highWl - lowWl) / intervals;
double rgb[] = ColorUtils.wlToRgb(wl);
Paint color = new Color((float) rgb[0], (float) rgb[1],
(float) rgb[2]);
return color;
}
COM: <s> returns the color of the item located at the given row and column </s>
|
funcom_train/23234119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean tell(Player player, String text) {
// If we are no attending a player attend, this one.
if (engine.getCurrentState() == ConversationStates.IDLE) {
logger.debug("Attending player " + player.getName());
attending = player;
}
if (getRidOfPlayerIfAlreadySpeaking(player, text)) {
return true;
}
lastMessageTurn = MidhedavaPRuleProcessor.get().getTurn();
return engine.step(player, text);
}
COM: <s> this function evolves the fsm </s>
|
funcom_train/31406460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCreateParameters(PreparedStatement stmt) throws SQLException {
setInt(stmt, 1, _row);
setInt(stmt, 2, _column);
stmt.setString(3, _abbreviation);
stmt.setString(4, _name);
stmt.setString(5, _type);
}
COM: <s> set parameters on the create statement </s>
|
funcom_train/30216455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCountryByName() {
System.out.println("getCountryByName");
String key = "AUSTRALIA";
CountryController instance = new CountryController();
Country expResult = new Country();
expResult.setCountryCode("AU");
expResult.setCountryName("AUSTRALIA");
Country result = instance.getCountryByName(key);
assertEquals(expResult, result);
}
COM: <s> test of get country by name method of class org </s>
|
funcom_train/7617550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlpha(int alpha) {
alpha += alpha >> 7; // make it 0..256
int baseAlpha = mState.mBaseColor >>> 24;
int useAlpha = baseAlpha * alpha >> 8;
mState.mUseColor = (mState.mBaseColor << 8 >>> 8) | (useAlpha << 24);
}
COM: <s> sets the colors alpha value </s>
|
funcom_train/51751976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem() {
if (jMenuItem == null) {
jMenuItem = new JMenuItem();
jMenuItem.setText("New Speaker");
jMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getSpeakersTableModel().getSpeakers().add(new Speaker());
}
});
}
return jMenuItem;
}
COM: <s> this method initializes j menu item </s>
|
funcom_train/35713023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer identified(Element element) {
List<String> criterion = getFullCriterion(element);
/**
* Exit returning false if no criterion exists for the particular
* element
*/
if (criterion == null) {
logger.debug("Exiting identified method because no valid xpath expressions exist for the criteria list");
return 0;
}
/**
* Find similar elements
*/
Integer count = elementService.count(criterion);
if (count > 0) {
logger.debug(
"Element is identical to other elements [count: {}] according to identification rules ",
count);
return count;
}
return 0;
}
COM: <s> determine if there are similar elements </s>
|
funcom_train/6199737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Session getSession() {
HibernateThreadLocal localValue =
m_threadLocal.get();
if(localValue == null) {
throw new IllegalStateException(
"You are not currently inside a Hibernate transaction.");
}
if(localValue.m_session == null) {
localValue.m_session = getSessionFactory().openSession();
localValue.m_transaction = localValue.m_session.beginTransaction();
}
return localValue.m_session;
}
COM: <s> returns the current session </s>
|
funcom_train/46055794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void oldConsume(List result) {
for (; ;) {
if (printoldline > oldInfo.maxLine)
break; /* end of file */
printnewline = oldInfo.other[printoldline];
if (printnewline < 0)
showDelete(result);
else if (blocklen[printoldline] < 0)
skipOld();
else
showMove(result);
}
}
COM: <s> oldconsume part of printout </s>
|
funcom_train/51571876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void excludeGlob(String glob) {
String toExclude = stripQuotes(replaceTokens(glob));
if (containsGlobChar(toExclude)) {
currentNamespace.getCurrentFileSet().exclude(new FileGlob(toExclude));
} else {
excludeFile(toExclude);
}
log.log(Level.FINER, "exclude glob " + toExclude);
}
COM: <s> exclude a glob in the current file set </s>
|
funcom_train/3907069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveDocument() {
if(_file != null && _isDirty) {
try {
// Ensure parent folder exists
_file.getParentFile().mkdirs();
// Write
Writer out = new FileWriter(_file);
out.write(_textPane.getText());
out.flush();
out.close();
}
catch(IOException ex) {
ex.printStackTrace();
return false;
}
}
_saveHandler.setEnabled(false);
_isDirty = false;
return true;
}
COM: <s> save the document to file </s>
|
funcom_train/18721825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescriptionCreatorAgentFamilyName() {
String xPath = OFFSET + "DescriptionMetadata/Creator/Agent/Name/FamilyName";
//System.out.println(mpeg7.toString());
descriptionCreatorAgentFamilyName = readXmlValue(xPath, descriptionCreatorAgentFamilyName);
if (descriptionCreatorAgentFamilyName == null) {
descriptionCreatorAgentFamilyName = "";
}
return descriptionCreatorAgentFamilyName;
}
COM: <s> who has created this description </s>
|
funcom_train/44842877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markAxioms() {
if (_useDependencyInferencer) {
ThreadLog.trace("adding dependencies for axioms");
try {
String query =
"INSERT INTO " + DEPEND_TABLE +
" SELECT id";
for (int i = 1; i <= maxTemplateCountsPerRule; i++) {
query += ", 0";
}
query += " FROM " + ALL_NEW_TRIPLES_TABLE;
_sail._rdbms.executeUpdate(query);
}
catch (SQLException e) {
e.printStackTrace();
}
ThreadLog.trace("dependencies for axioms added");
}
}
COM: <s> invoked to mark the currently added statements as axioms </s>
|
funcom_train/48067565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int addToken(int tokenID, String tokenValue, String tokenName) throws ParserException {
Node current = root;
for (int i = 0; i < tokenValue.length(); i++) {
String value = "" + tokenValue.charAt(i);
Node subnode = (Node) current.locate(value);
if (subnode == null) { // There is no this value yet.
subnode = new Node(value);
current.add(subnode);
}
current = subnode;
}
current.token = tokenID;
registerToken(tokenID, tokenName);
return current.token;
}
COM: <s> registers new token under specified name </s>
|
funcom_train/12832032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCopyAndPaste() {
clipboard = new Clipboard(getSite().getShell().getDisplay());
IAction copyAction = new Action() {
public void run() {
setClipboardData();
}
};
getViewSite().getActionBars().setGlobalActionHandler("copy", copyAction);
}
COM: <s> inits the copy and paste functionality of the xml digital signature view </s>
|
funcom_train/18746912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RuleGraph getCoRootGraph() {
// find the first parent that has a rule
Level4 parent = this.parent;
while (parent != null && !parent.isRule) {
parent = parent.parent;
}
return parent == null ? null
: getIntersection(parent.rhs, this.rhs);
}
COM: <s> returns the intersection of the parent rhs and this rhs </s>
|
funcom_train/40694557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendMessage(String msg, int priority, boolean sticky) {
try {
growl.sendNotification(new GrowlNotification(APP_NAME,
APP_NAME,
msg,
APP_NAME,
sticky,
priority));
} catch(GrowlException e) {
e.printStackTrace();
}
}
COM: <s> send a message to growl jgrowl </s>
|
funcom_train/33859933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getLogicConnectorReductionTextField() {
if (logicConnectorReductionTextField == null) {
logicConnectorReductionTextField = new JTextField();
logicConnectorReductionTextField.setBackground(new Color(255, 255, 102));
logicConnectorReductionTextField.setHorizontalAlignment(JTextField.LEFT);
logicConnectorReductionTextField.setFont(new Font("Serif", Font.BOLD, 14));
logicConnectorReductionTextField.setText("");
logicConnectorReductionTextField.setEditable(true);
}
return logicConnectorReductionTextField;
}
COM: <s> this method initializes logci connector reduction text field </s>
|
funcom_train/26016124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
try {
if (mySock != null)
mySock.close();
if (sipStack.isLoggingEnabled())
sipStack.getStackLogger().logDebug("Closing message Channel " + this);
} catch (IOException ex) {
if (sipStack.isLoggingEnabled())
sipStack.getStackLogger().logDebug("Error closing socket " + ex);
}
}
COM: <s> close the message channel </s>
|
funcom_train/16906177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SocketFactory getSocketFactory() {
SSLContext context;
trustManagers = new TrustManager[]{new TrustingX509TrustManager()};
try {
context = SSLContext.getInstance("SSL");
context.init(null, trustManagers, new SecureRandom());
} catch (GeneralSecurityException gse) {
throw new IllegalStateException(gse.getMessage());
}
return (context.getSocketFactory());
}
COM: <s> get a socket factory that trusts all certificates </s>
|
funcom_train/50897913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getFile(int number) {
UploadedFile file = null;
Enumeration fileenum = files.elements();
try {
for (int f=0; f<getFileCount(); f++)
file = (UploadedFile) fileenum.nextElement();
return file.getFile(); // may be null
}
catch (Exception e) {
return null;
}
} // getFile
COM: <s> returns a file object for the specified uploaded file </s>
|
funcom_train/13596931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnRemovePhoneme() {
if (btnRemovePhoneme == null) {
btnRemovePhoneme = new JButton();
btnRemovePhoneme.setText(Messages
.getString("GeneralUI.ButtonRemove")); // Generated
// //$NON-NLS-1$
btnRemovePhoneme
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
removePhoneme();
}
});
}
return btnRemovePhoneme;
}
COM: <s> this method initializes btn remove phoneme </s>
|
funcom_train/25421618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ManagedConnection findByJdbcConnection(Connection con) {
ManagedConnection mc, mcFound = null;
if (con != null) {
Iterator<ManagedConnection> it = _hmConnections.values().iterator();
while (it.hasNext()) {
mc = it.next();
if (mc.isJdbcConnection(con)) {
mcFound = mc;
break;
}
}
}
return mcFound;
}
COM: <s> finds the managed connection associated with a jdbc connection </s>
|
funcom_train/1939710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateBlockedComponent(JComponent component, boolean blocked) {
if (component instanceof JTextComponent) {
// update editable state on text components
JTextComponent textComponent = (JTextComponent) component;
textComponent.setEditable(!blocked);
} else if (component instanceof JScrollPane) {
// update viewport on scroll pane
JScrollPane scrollPane = (JScrollPane) component;
scrollPane.getViewport().setEnabled(!blocked);
} else {
component.setEnabled(!blocked);
}
}
COM: <s> updates the blocking state of the given component </s>
|
funcom_train/20287879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlSelect getHtmlSelect() {
HtmlSelect listSelect = new HtmlSelect();
if (emptyHtmlSelectRecord != null) {
listSelect.addItem(-1, emptyHtmlSelectRecord);
}
for (ClassifiedCategory thisClassifiedCategory : this) {
listSelect.addItem(
thisClassifiedCategory.getId(),
thisClassifiedCategory.getItemName());
}
return listSelect;
}
COM: <s> gets the html select attribute of the classified category list object </s>
|
funcom_train/48406324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addChildrenPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ContainerUseRelationship_children_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ContainerUseRelationship_children_feature", "_UI_ContainerUseRelationship_type"),
SpemxtcompletePackage.eINSTANCE.getContainerUseRelationship_Children(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the children feature </s>
|
funcom_train/25326994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
g.drawImage(image, 0, 0, this);
g.drawString("BirDy 0.2.0", 10 ,g.getClipBounds().height - 10);
// If we wait in splash() method, stop waiting now.
if (!paintCalled) {
paintCalled = true;
synchronized (this) {
notifyAll();
}
}
}
COM: <s> draw the splash screen and notify </s>
|
funcom_train/25421951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeIO(InputStream source, String charset, Writer destination)
throws IOException {
InputStreamReader isr = null;
try {
isr = new InputStreamReader(source,charset);
this.executeIO(isr,destination);
} finally {
// TODO: watch for any negative effects
try {if (isr != null) isr.close();} catch (Exception ef) {}
}
}
COM: <s> executes stream to character i o </s>
|
funcom_train/17329858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String writeContent(byte[] content) throws IOException {
OutputStream output = null;
try {
// Generates the content file name
final String uniqueName = generateUniqueName();
// Streams.
output = fileStorageProvider.create(uniqueName);
// Writes content as bytes.
output.write(content);
return uniqueName;
} finally {
if (output != null) {
output.close();
}
}
}
COM: <s> writes the file content </s>
|
funcom_train/5601624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validate(Autotest autoTest) throws DriverException {
autoTest.assertTargetDirNotEmpty();
if (autoTest.getVerifier() != null) {
System.out.println("verifying installation - this can take a while ...");
autoTest.getVerifier().verify();
System.out.println("... installation ok.\n");
}
}
COM: <s> perform validations after the test was run </s>
|
funcom_train/8287978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean userExists(String userName){
if (!"NONE".equals(userName)){
DAOUser daoUser = new DAOUser();
User user = daoUser.getUser(userName);
if (user==null){
return false;
} else {
return true;
}
} else {
return true;
}
}
COM: <s> return true if exist a user </s>
|
funcom_train/3811198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getPackageDirectory(File pBaseDir, String pPackageName) {
if (pPackageName != null) {
for (StringTokenizer st = new StringTokenizer(pPackageName, ".");
st.hasMoreTokens(); ) {
String dir = st.nextToken();
pBaseDir = new File(pBaseDir, dir);
}
}
return pBaseDir;
}
COM: <s> p given a package name and a base directory returns the package </s>
|
funcom_train/9230976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncrement(final long increment) {
if (increment == 0) {
throw new IllegalArgumentException("Increment cannot be zero");
}
if (this.increment == increment) {
return;
}
if ((this.increment > 0 && this.increment > increment) || (this.increment < 0 && this.increment < increment)) {
throw new IllegalArgumentException("New increment must be same sign and greater absolute value then the old one");
}
this.increment = increment;
}
COM: <s> sets the new increment </s>
|
funcom_train/42944306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection c) {
if ((c != null) && (c.size() > 0)) {
for (Iterator i = c.iterator(); i.hasNext();) {
this.add(i.next());
}
return true;
}
else {
return false;
}
}
COM: <s> adds all of the elements in the specified collection into this set </s>
|
funcom_train/9101158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SearchCriteria buildSRUSearchCriteria(HttpServletRequest request, long token, String operation) {
SearchCriteria criteria = buildCQLSRWSearchCriteria(request, token, operation, null);
String cqlQuery = buildCQLFromQuery(criteria.getQueryArray(), criteria.getKeywordConstraint());
criteria.setCQLQuery(cqlQuery);
return criteria;
}
COM: <s> build search criteria for sru version the token is sent separately to </s>
|
funcom_train/19598697 | /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 (visibleTweening)
{
component.setSize(horizontalTweening ? dimension.width * frameIndex / frameCount : dimension.width, verticalTweening ? dimension.height * frameIndex / frameCount : dimension.height);
if (frameIndex == frameCount)
{
timer.stop();
}
else
{
frameIndex++;
}
}
else
{
component.setSize(horizontalTweening ? dimension.width * frameIndex / frameCount : dimension.width, verticalTweening ? dimension.height * frameIndex / frameCount : dimension.height);
if (frameIndex == 0)
{
component.setVisible(false);
timer.stop();
}
else
{
frameIndex--;
}
}
}
COM: <s> invoked when an action occurs </s>
|
funcom_train/8399928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double optDouble(String key, double defaultValue) {
Object o = opt(key);
if (o != null) {
if (o instanceof Number) {
return ((Number)o).doubleValue();
}
try {
return Double.valueOf((String) o).doubleValue();
}
catch (Exception e) {
return defaultValue;
}
}
return defaultValue;
}
COM: <s> get an optional double associated with a key or the </s>
|
funcom_train/5399653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test011Ok() {
form = getForm("form_equality_006");
values.put("field_001_1", "a");
values.put("field_001_2", "b");
values.put("field_002_1", "a");
values.put("field_002_2", "b");
assertTrue(validateForm(values));
printValues();
}
COM: <s> field 001 1 non empty string </s>
|
funcom_train/25199080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testNoName(String names, int pos) throws Exception {
try {
p.push(new TString(names, null));
p.push(new TInteger(pos, null));
p.push(new TString("{l}", null));
makeFormatter().execute(p, null, null);
assertTrue(false);
} catch (ExBibException e) {
assertTrue(true);
}
}
COM: <s> test a no name </s>
|
funcom_train/44937388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropType(Integer type) {
Iterator<Cell> nodes = getNodes().iterator();
while (nodes.hasNext()) {
Cell cell = nodes.next();
try {
WebObject obj = cell.getWebObject();
if (type.equals(obj.getObjectClassId())) {
nodes.remove();
}
} catch (DataAccessException e) {
// TODO: handle exception
}
}
}
COM: <s> removes all cells with given type </s>
|
funcom_train/35683275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void lazyInit() throws XmlDocumentHelperException {
if (mDocumentBuilder == null) {
try {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
mDocumentBuilder = factory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw new XmlDocumentHelperException(e);
}
}
}
COM: <s> on first call this creates an instance of the xml parser </s>
|
funcom_train/2624713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paint(final PPaintContext paintContext) {
super.paint(paintContext);
paintContext.pushClip(getBoundsReference());
paintContext.pushTransform(viewTransform);
paintCameraView(paintContext);
paintDebugInfo(paintContext);
paintContext.popTransform(viewTransform);
paintContext.popClip(getBoundsReference());
}
COM: <s> paint this camera and then paint this cameras view through its view </s>
|
funcom_train/51297238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkGoodsItem(GoodsItem item) {
if (item == null)
throw new NullPointerException("Null value in item");
boolean valid = true;
String mes = LanguageClass.getValue("var.error.no_specs");
if (item.getSku() == null) {
mes += "\n" + LanguageClass.getValue("general.name");
valid = false;
}
if (item.getCount() == 0) {
mes += "\n" + LanguageClass.getValue("general.quantity");
valid = false;
}
if (!valid) {
throw new IllegalArgumentException(mes);
}
}
COM: <s> check for 0 and empty value </s>
|
funcom_train/18854968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean milestoneExists(String id) throws HibernateException {
int count = queryCountValue(" select count(*) from net.sf.jagzilla.hibernate.Milestone m where m.id.value='"+id+"'");
log.debug("count milestone: "+id+" = "+count);
return count>=1;
}
COM: <s> tells if the given milestone exists </s>
|
funcom_train/29834749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point getFirstVisibleTiles() {
int secureoffset = (int) (tileSize * 0.05); // load the tile before it is visible
int firstVisibleTileX = (int) (viewport.getViewRect().x / (tileSize * scale + secureoffset));
int firstVisibleTileY = (int) (viewport.getViewRect().y / (tileSize * scale + secureoffset));
return new Point(firstVisibleTileX, firstVisibleTileY);
}
COM: <s> gets the first visible tiles </s>
|
funcom_train/50445281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreation() {
assertTrue(pic.validate());
assertSame(fileName, pic.getFileName());
assertSame(ba, pic.getMediaContent());
assertSame(null, pic.getDescription());
assertSame(null, pic.getCaption());
assertEquals(4096, pic.getSizeInByte());
}
COM: <s> code test creation code tests if the created </s>
|
funcom_train/8157584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenu addMenu(Class aResourceBundleClass, String aPrefix) {
Precondition.argumentNotNull("aResourceBundleClass",
aResourceBundleClass);
Precondition.argumentStringNotEmpty("aPrefix", aPrefix);
JMenu menu = new RscMenu(RscBundle.getBundle(aResourceBundleClass),
aPrefix);
menuBar.add(menu);
return menu;
}
COM: <s> adds a new menu to the menu bar </s>
|
funcom_train/28348425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void addAppsToGroup(final File[] files, final AppGroup group) {
List apps = new ArrayList();
for ( int index = 0 ; index < files.length ; index++ ) {
final File file = files[index];
final String path = file.getAbsolutePath();
App app;
if ( _apps.containsKey(path) ) {
app = getApp(path);
}
else {
app = new App(file);
addApp(app);
}
apps.add(app);
}
group.addApps(apps);
}
COM: <s> add applications to a specific group </s>
|
funcom_train/29614994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String submitAction() {
this.logger.debug("submitAction is invoked");
try {
//get UserService using IServiceLocator
this.serviceLocator.getUserService().sendRegistrationEmail(this.emailAddress, this.firstName + " " + this.lastName, this.toString(), MESSAGE_SUBJECT, content);
} catch (Exception e) {
String msg = "Could not send email: internal error.";
FacesUtils.addErrorMessage(msg);
return NavigationResults.FAILURE;
}
FacesUtils.addInfoMessage(RESPONSE_MESSAGE);
return NavigationResults.SUCCESS;
}
COM: <s> backing bean action to submit the message </s>
|
funcom_train/889095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* private void collectStatements(Set importStatements) {
if (null != innerClasses) {
Iterator it = innerClasses.iterator();
while (it.hasNext()) {
ClassFile cf = (ClassFile)it.next();
importStatements.addAll(cf.importStatements);
cf.collectStatements(importStatements);
}
}
}
COM: <s> recursively collection import statements from inner classes </s>
|
funcom_train/9819069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer(getFullName());
if (this instanceof SubCell)
result.append(" (dynamic subcell of ").append(getParent()).append(")");
else
result.append(" (").append(getClass()).append(")");
return result.toString();
}
COM: <s> provides a string representation for debug </s>
|
funcom_train/20678308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdownDataSources() {
try {
Iterator it = dataSourcesMap.keySet().iterator();
while (it.hasNext()) {
String name = (String) it.next();
PooledDataSource dataSource = (PooledDataSource) dataSourcesMap
.get(name);
dataSource.hardReset();
dataSource.close();
}
} catch (Exception e) {
log.error("*** Error destroying data sources: " + e.toString());
}
dataSourcesMap.clear();
}
COM: <s> kills all database sources and connection pool </s>
|
funcom_train/2902888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JXMessage init(){
midX = JXScreenManager.getMidScreenWidth();
midY = JXScreenManager.getMidScreenHeight();
LinuxTask task = (LinuxTask)LinuxSupportedTask.getTaskDescription(LinuxSupportedTask.UPDATE_CONTROL);
task.setController(this);
JXRequest[] req = new JXRequest[1];
req[0] = new JXRequest(LinuxSupportedTask.LINUX_ID, task);
makeRequest(req);
return null;
}
COM: <s> initialize the module </s>
|
funcom_train/777548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStackTraceAndErrMsg() {
Throwable t = new Throwable();
String st = ThrowableUtil.stackTrace( t );
final String FOO = "foo";
String em = ThrowableUtil.errMsg( FOO, t );
assertEquals( FOO + '\n' + st, em );
}
COM: <s> test getting stack trace as text and creating error message </s>
|
funcom_train/18242421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editableCollectionSequenceChanged(IEditableCollection pCollection, ISequenceFacade pSequence, int pWhat) {
//System.out.println("I know some sequence modification has taken place.");
if (pWhat != IEditableCollection.CHANGE_MODIFIED_ASSEMBLY) {
this.rebuildSequencesBorder(pCollection);
}
}
COM: <s> code ieditable collection listener code method called when </s>
|
funcom_train/8685617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bindToComponent(ProjectComponent component) {
project = component.getProject();
addBeans(project.getProperties());
addBeans(project.getUserProperties());
addBeans(project.getTargets());
addBeans(project.getReferences());
addBean("project", project);
addBean("self", component);
}
COM: <s> bind the runner to a project component </s>
|
funcom_train/9938511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(PApplet pApplet) {
try {
Graphics screen = pApplet.getGraphics();
if (screen != null) {
paint(screen);
}
Toolkit.getDefaultToolkit().sync();
} catch (Exception e) {
e.printStackTrace();
} finally {
if (pApplet.g != null) {
pApplet.g.dispose();
}
}
}
COM: <s> paint the set of managed layers to the screen </s>
|
funcom_train/5022059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCreated(boolean created) {
if (!this.created) {
Shell shell = composite.getShell();
shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
for (IXProcessElement xProcessElement : children) {
xProcessElement.initialize(editorContext, composite);
}
shell.setCursor(null);
}
this.created = created;
}
COM: <s> if set as true and the components on the tab have not </s>
|
funcom_train/40312041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCatalogName_InvalidColumn3() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getCatalogName(10);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getCatalogName method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get catalog name with column index larger than the number of column </s>
|
funcom_train/43568685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel getPanelHeader() {
if (panelHeader == null) {
panelHeader = new JPanel();
panelStandard = new JPanel();
panelSpecial = new JPanel();
panelHeader.setLayout(new BoxLayout(panelHeader, BoxLayout.LINE_AXIS));
panelStandard.setLayout(new BoxLayout(panelStandard, BoxLayout.LINE_AXIS));
panelSpecial.setLayout(new BoxLayout(panelSpecial, BoxLayout.LINE_AXIS));
panelHeader.add(panelStandard);
panelHeader.add(panelSpecial);
}
return panelHeader;
}
COM: <s> this method initializes the header aka toolbar </s>
|
funcom_train/39973855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Vec3D p) {
boolean found = false;
PointOctree leaf = getLeafForPoint(p);
if (leaf != null) {
if (leaf.points.remove(p)) {
found = true;
if (isAutoReducing && leaf.points.size() == 0) {
leaf.reduceBranch();
}
}
}
return found;
}
COM: <s> removes a point from the tree and optionally tries to release memory by </s>
|
funcom_train/46747822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisitId(Long visitId) {
if (!(this.visitId.longValue() == visitId.longValue())) {
Long oldvisitId= 0L;
oldvisitId = this.visitId.longValue();
this.visitId = visitId.longValue();
setModified("visitId");
firePropertyChange(String.valueOf(MESSAGES_VISITID), oldvisitId, visitId);
}
}
COM: <s> message for this visit </s>
|
funcom_train/14166063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calcNrOfLines(){
int numLines = 0;
for (int i=0; i<topo.getVertices().size();i++){
for (int j=i+1; j<topo.getVertices().size();j++){
if(topo.getAdjacTable()[i][j])
numLines = numLines +1;
}
}
return numLines;
}
COM: <s> calculates the number of needed lines from the adjacency </s>
|
funcom_train/39000842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPools() {
Iterator iterator = poolIds.iterator();
int poolId = -1;
ControllerBase base = null;
while (iterator.hasNext()) {
poolId = (Integer) iterator.next();
//each map cannot be greater than maxSize as well as
//all maps together cannot be greater than maxSize.
base = new ControllerBase(maxSize);
pools.put(poolId, base);
}
}
COM: <s> it takes vector of pool id integers and create pool </s>
|
funcom_train/45330038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPID() {
if( pid != 0 ){
return pid;
}
File file = new File(pidFile);
if( file.exists()) {
try {
BufferedReader in = new BufferedReader(new FileReader(file));
String line = in.readLine();
if(line != null){
pid = Integer.parseInt(line);
}
return pid;
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return 0;
}
COM: <s> get the process id </s>
|
funcom_train/27866621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadParameters() {
toMshUrl = txtToMshUrl.getText();
cpaID = txtCpaID.getText();
conversationID = txtConversationID.getText();
service = txtService.getText();
action = txtAction.getText();
retryInterval = txtRetryInterval.getText();
numRetry = txtNumRetry.getText();
unregister = chkUnregister.isSelected();
}
COM: <s> loads the user input parameter into internal variables </s>
|
funcom_train/8064341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unicode(char c) {
this.add("\\u");
int n = c;
for (int i = 0; i < 4; ++i) {
int digit = (n & 0xf000) >> 12;
this.add(com.cozilyworks.cocoz.tools.opensymphony.support.json.JSONWriter.hex[digit]);
n <<= 4;
}
}
COM: <s> represent as unicode </s>
|
funcom_train/7418725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void activateStencilSetExtensions() {
ArrayList<String> extensions = new ArrayList<String>();
for(String ssextension : stencilSetExtensions) {
if(ssextension.equals("http://oryx-editor.org/stencilsets/extensions/bpmn1.1basicsubset#")) {
extensions.add("http://oryx-editor.org/stencilsets/extensions/bpmn2.0basicsubset#");
}
// TODO: What happens with extensions that are currently not present in BPMN 2.0?
}
diagram.setSsextensions(extensions);
}
COM: <s> adds the correct stencilset extensions </s>
|
funcom_train/2628457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddGUI_GUIType() {
System.out.println("addGUI");
GUIType dGUI = new GUIType();
GUIStructureWrapper instance = new GUIStructureWrapper(new GUIStructure());
instance.dGUIStructure.setGUI(new ArrayList());
instance.addGUI(dGUI);
assert(instance.dGUIStructure.getGUI().contains(dGUI));
}
COM: <s> test of add gui method of class guistructure wrapper </s>
|
funcom_train/14215677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getOrderProductIds() {
Set productIds = new HashSet();
for (Iterator iter = getOrderItems().iterator(); iter.hasNext(); ) {
productIds.add(((GenericValue) iter.next()).getString("productId"));
}
return productIds;
}
COM: <s> get a set of product ids in the order </s>
|
funcom_train/50373669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MouseEvent getMouseEvent(MouseEvent e, int id, int x, int y) {
return new MouseEvent(e.getComponent(),id,e.getWhen(),
e.getModifiers(),x,y,e.getClickCount(),false);
}
COM: <s> helper method used for generating mouse events to send to scene nodes </s>
|
funcom_train/3720837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActor(Actor actor) throws java.beans.PropertyVetoException {
Actor oldActor = this.actor;
vetoableChangeSupport.fireVetoableChange("actor", oldActor, actor);
this.actor = actor;
propertyChangeSupport.firePropertyChange("actor", oldActor, actor);
}
COM: <s> setter for property actor </s>
|
funcom_train/13503921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getTempUploadDir() throws Exception {
if (m_tempUploadDir == null) {
try {
m_tempUploadDir = getServer().getUploadDir();
} catch (InitializationException e) {
throw new Exception("Unable to get server: " + e.getMessage(), e);
}
}
return m_tempUploadDir;
}
COM: <s> get the location for storing temporary uploaded files not for general temporary files </s>
|
funcom_train/12188889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTwoArguments() throws ExpressionException {
final Function function = new SubstringFunction();
Value result = function.invoke(expressionContextMock,
new Value[]{factory.createStringValue("123456"), factory.createIntValue(3)});
assertTrue(result instanceof StringValue);
assertEquals("3456", ((StringValue) result).asJavaString());
}
COM: <s> tests if function works with two arguments </s>
|
funcom_train/18882988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getUI2(int id) {
Property p = (Property) properties.get(new Integer(id));
try {
int offset = p.getOffset();
stream.seek(offset);
return stream.readUnsignedShortLE();
}
catch (IOException e) {
e.printStackTrace();
}
return -1;
}
COM: <s> gets the ui2 attribute of the property set object </s>
|
funcom_train/21407027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleSelectCommand(Displayable d){
//controller.onViewClosed(this, rptQtnsDataList, true);
currentQuestionIndex = ((List)screen).getSelectedIndex();
controller.execute(this, CommandAction.EDIT, rptQtnsDataList.getRepeatQtnsData(currentQuestionIndex));
//getEpihandyController().showRepeatQtnsRow(rptQtnsDataList.getRepeatQtnsData(((List)d).getSelectedIndex()));
}
COM: <s> processes the list select command event </s>
|
funcom_train/37653633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushOnStack(int type, DataFlowNode node) {
StackObject obj = new StackObject(type, node);
if (type == NodeType.RETURN_STATEMENT || type == NodeType.BREAK_STATEMENT
|| type == NodeType.CONTINUE_STATEMENT || type == NodeType.THROW_STATEMENT) {
// ugly solution - stores the type information in two ways
continueBreakReturnStack.push(obj);
} else {
braceStack.push(obj);
}
node.setType(type);
}
COM: <s> the brace stack contains all nodes which are important to link the data </s>
|
funcom_train/7511074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelSettingsCurrent() {
if (jPanelSettingsCurrent == null) {
jPanelSettingsCurrent = new JPanel();
jPanelSettingsCurrent.setLayout(new GridBagLayout());
jPanelSettingsCurrent.setName("settingsCurrent");
jPanelSettingsCurrent.add(getJPanelSourceMode(), AppHelper.getJBCBorderPanel(0, true));
}
return jPanelSettingsCurrent;
}
COM: <s> this method initializes j panel settings current </s>
|
funcom_train/3598125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLeftAligned() {
List results=null;
try {
results = engine.search(nom, "($p phase)($w word):$p[[$w");
results.remove(0); // remove list of vars
Collections.sort(results, new SearchResultIDComparator());
assertTrue(results.size()==1);
NOMElement r1 = (NOMElement)((List)results.get(0)).get(0);
NOMElement r2 = (NOMElement)((List)results.get(0)).get(1);
assertTrue(r1.getID().equals("p_4"));
assertTrue(r2.getID().equals("w_6"));
} catch (Throwable ex) {
ex.printStackTrace();
fail("Left alignment test failed! " + results.size());
}
}
COM: <s> left alignment between phases and words should be one match </s>
|
funcom_train/27787524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void syncIDQuotes() {
// Only allow one copy of the sync module to be displayed
synchronized(this) {
if(!wakeIfPresent(syncIDQuoteModuleFrame)) {
IDQuoteSyncModule module = new IDQuoteSyncModule(desktop);
syncIDQuoteModuleFrame = desktopManager.newFrame(module, true, true, false);
}
}
}
COM: <s> displays the intra day quote quote sync module that allows the user </s>
|
funcom_train/44697526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRole() {
String baseURI = this.getTxgSource().getTargetNamespace();
if (!baseURI.endsWith("/"))
return baseURI+"/role/"+this.getName();
else
return baseURI+"role/"+this.getName();
}
COM: <s> generates a role uri attribute for the schema </s>
|
funcom_train/11643785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitialize() throws Exception {
TestCallable call = new TestCallable();
CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>(
call);
assertEquals("Wrong result", RESULT, init.initialize());
assertEquals("Wrong number of invocations", 1, call.callCount);
}
COM: <s> tests the implementation of initialize </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.