__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/37790806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disableSelf(NakedObject anObject) {
// disabling is permanent, the view will not be enabled anymore
LOG.debug("Disabling me: " + this);
setEnabled(false);
setStyle(null); // make sure, switching to Icon will work
switchViewStyle(ViewFactory.ViewStyle.ICON);
}
COM: <s> disable the view because the object has been destroyed or otherwise disabled </s>
|
funcom_train/43145034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Signal createGraph(String label, int color) {
GraphData graph = new GraphData();
graph.color = color;
graph.label = label;
graph.signal = new Signal();
graph.data = new double[(int )content.getWidth()];
graphs.put(label, graph);
setLabelBottomHeight((graphs.size() * Fonts.LINE_HEIGHT) + Fonts.LINE_SPACING);
return graph.signal;
}
COM: <s> adds a graph that will be drawn periodically and returns its signal </s>
|
funcom_train/20660289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllHosts(){
//TODO: be carefull if you remove something you have to stop it first.
Component [] list = jPanel1.getComponents();
for( int i = list.length-1; i>=0 ; i-- ){
((CommandComponent)list[i]).deleteThis_ActionPerformed();
}
}
COM: <s> cleanes the host list removing all hosts </s>
|
funcom_train/45773700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveMousetoCell_replaceText(String[] path, String replacement, int startIndex, int endIndex) {
XAccessibleContext child = getXAccessibleContext(path);
moveMouse_Click(child);
replaceCellTextHelper(child, startIndex, endIndex, replacement);
}
COM: <s> move mouse to accessibility object and replace text </s>
|
funcom_train/17596323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MoveDirection getNoisyMoveDirection(MoveDirection direction) {
int randomInt = getRandomInt(10);
if (randomInt == 0) {
return MoveDirection.getDirectionFromDegrees(direction.getStartDegrees() - 45.1);
} else if (randomInt == 1) {
return MoveDirection.getDirectionFromDegrees(direction.getStartDegrees() + 45.1);
} else {
return direction;
}
}
COM: <s> gets the move direction adjusted to a noise factor </s>
|
funcom_train/13995126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidStateBug() {
assertEquals( "invalid enable state of save action",
true, saveAction.isEnabled());
saveAction.actionPerformed(new ActionEvent(this, -1, ""));
awtSleep(2000);
assertEquals( "invalid enable state of save action after saving",
false, saveAction.isEnabled());
}
COM: <s> bug save action is not disabled after first succesful save </s>
|
funcom_train/3340089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processKeyEvent(KeyEvent ke_) {
if (_keyListeners != null) {
for (Enumeration<KeyListener> e = _keyListeners.elements();
e.hasMoreElements(); ) {
KeyListener kl = (KeyListener) e.nextElement();
if (ke_.getID() == AWTEvent.KEY_PRESSED)
kl.keyPressed(ke_);
else if (ke_.getID() == AWTEvent.KEY_TYPED)
kl.keyTyped(ke_);
if (ke_.isConsumed())
break;
}
}
}
COM: <s> invoke all the key listener callbacks that may have been registered </s>
|
funcom_train/34960568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int checkNoTokens(int whichTurn) {
int currentNoBlackToken = MoveUtil.findTokenList(this.currentBoardPosition, IBoardConstant.BLACK).size();
int currentNoWhiteToken = MoveUtil.findTokenList(this.currentBoardPosition, IBoardConstant.WHITE).size();
int result = 0;
// Standard (Very agressive mode!)
result = (currentNoBlackToken * TOKEN_COST) - (currentNoWhiteToken * TOKEN_COST);
return result;
}
COM: <s> first heuristic function aggressive mode </s>
|
funcom_train/41250400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseColumnSizeUpdateRequest(HttpServletRequest request) {
int tabId = Integer.parseInt(request.getParameter(TAB_ID_PREFIX));
/* update column sizes */
updateColumnSizes(tabId, Integer.parseInt(request.getParameter(
FIRST_COLUMN_SIZE_PREFIX).split("px")[0]), Integer
.parseInt(request.getParameter(SECOND_COLUMN_SIZE_PREFIX)
.split("px")[0]), Integer.parseInt(request
.getParameter(THIRD_COLUMN_SIZE_PREFIX).split("px")[0]));
}
COM: <s> parse the columns sizes from the request </s>
|
funcom_train/50940349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(int row ) {
if ( this.txns != null && !this.txns.isEmpty() ) {
try {
this.txns.remove(row);
fireTableRowsDeleted(row, row);
} catch (IndexOutOfBoundsException ie) {
Log.logException(ie);
}
}
}
COM: <s> removes the row at row from the model </s>
|
funcom_train/1416738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText (String text) {
try {
document.beginCompoundEdit ();
document.remove (0, document.getLength ());
document.insertString (0, text, null);
}
catch (BadLocationException bl) {
bl.printStackTrace ();
}
finally {
document.endCompoundEdit ();
}
}
COM: <s> sets the entire text of this text area </s>
|
funcom_train/40654528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clean() {
commands.clear();
try {
if (br != null) {
br.close();
br = null;
}
proc = null;
} catch (Exception ex) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> finalize reading by closing buffered reader </s>
|
funcom_train/18088401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean cmd(final int cmd, final CmdParam param) {
switch (cmd) {
// case MtkController.CMD_SET_DEVICE_NAME:
// setHoluxName(param.getString());
// break;
// case CMD_SET_LOG_DISTANCE_INTERVAL:
// setLogDistanceInterval(param.getInt());
// break;
// case CMD_SET_LOG_TIME_INTERVAL:
// setLogTimeInterval(param.getInt());
// break;
default:
return false;
//return super.cmd(cmd, param);
}
//return true;
}
COM: <s> handles commands with a parameter support for holux specific commands </s>
|
funcom_train/3703886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadQuery(ConfabulatorProfile.Query q, ActiveProperties p) {
p.put(q.getEntityName(),
q.getProperty(),
q.getInfoSpaceUrl(),
q.getXPath(),
ActiveProperties.SUBSCRIBE);
} // of method
COM: <s> load a single confabulator profile </s>
|
funcom_train/14297410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int row, int column) {
if (column == 0) {
return MetaApiFactory.getFactory().getModelHelper().getName(
super.getValueAt(row, column));
}
return super.getValueAt(row, column);
}
COM: <s> returns the value of the cell in row code row code and column </s>
|
funcom_train/16849976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldGenre() {
if (jTextFieldGenre == null) {
jTextFieldGenre = new JTextField();
jTextFieldGenre.setText(strGenre);
jTextFieldGenre.moveCaretPosition(0);
jTextFieldGenre.setBounds(new Rectangle(157, 113, 77, 18));
}
return jTextFieldGenre;
}
COM: <s> this method initializes j text field genre </s>
|
funcom_train/18107833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(String inputFilePath, String outputFilePath) throws ParseContentException{
// simply copy file into TXT_DIR
try{
FileUtil.copy(inputFilePath, outputFilePath);
}
catch(IOException e) {
log.error("Error occured in ASCIIParser ", e);
e.printStackTrace();
throw new ParseContentException(e);
}
}
COM: <s> coppies txt file into txt dir under unique name </s>
|
funcom_train/12557177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateUID() {
String value = key.toString();
int field = getUIDField();
if (countValues(field) == 0) {
addValue(field, 0, value, true);
} // don't change UID value, it can be set by user
}
COM: <s> update the uid field </s>
|
funcom_train/23868011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFlag(final Method method) {
try {
method.invoke(commandLineObject, true);
} catch (final IllegalAccessException exception) {
LOGGER.log(Level.WARNING, "Could not set flag:" + method.getName(), exception);
} catch (final InvocationTargetException exception) {
LOGGER.log(Level.WARNING, "Could not set flag:" + method.getName(), exception);
}
}
COM: <s> sets a flag by calling the supplied method </s>
|
funcom_train/23410462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addComputedOutputPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CompositeProcess_computedOutput_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CompositeProcess_computedOutput_feature", "_UI_CompositeProcess_type"),
ProcessPackage.Literals.COMPOSITE_PROCESS__COMPUTED_OUTPUT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the computed output feature </s>
|
funcom_train/25332433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAndSetParentStart() {
FeatureQuery instance = new FeatureQuery();
Integer expResult = new Integer(5);
Integer result = instance.getParentStart();
assertNull(result);
instance.setParentStart(expResult);
result = instance.getParentStart();
assertEquals(expResult, result);
}
COM: <s> test of get parent start method of class feature query </s>
|
funcom_train/12661590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IUserInfo getUserInfo() throws UserInfoException, PromptCancelledException {
final String username = System.getProperty("user.name");
final String password = "";
return new IUserInfo() {
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
};
}
COM: <s> returns an instance of </s>
|
funcom_train/35902422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doNextStep() {
synchronized (grid) {
boolean nextStepCarriedOut = false;
nearResources = capter();
if(heldResourceName != null){
// The agent carry a resource, can it put it ?
nextStepCarriedOut = tryToPut();
}else{
// The agent doesn't carry a resource, can it take one ?
nextStepCarriedOut = tryToTake();
}
if(!nextStepCarriedOut){
walk();
}
}
}
COM: <s> this method makes the agent try to put or to take a resource </s>
|
funcom_train/24234019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleRetransmit(Long seqNumber){
try {
//retransmit the packet and remove it from the list
byte[]data=sendBuffer.get(seqNumber);
if(data!=null){
retransmit.setPacketSequenceNumber(seqNumber);
retransmit.setSession(session);
retransmit.setDestinationID(session.getDestination().getSocketID());
retransmit.setData(data);
endpoint.doSend(retransmit);
statistics.incNumberOfRetransmittedDataPackets();
}
}catch (Exception e) {
logger.log(Level.WARNING,"",e);
}
}
COM: <s> re transmit an entry from the sender loss list </s>
|
funcom_train/33862823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String loadSqlScript(String sqlScriptFileName) throws IOException {
if (sqlScriptFileName == null || sqlScriptFileName.length() == 0)
throw new IllegalArgumentException("Invalid SQL script file name!");
BufferedReader in = new BufferedReader(
new FileReader(sqlScriptFileName));
StringBuilder buffer = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
if (isCommentLine(line))
continue;
buffer.append(line.trim());
}
in.close();
return buffer.toString();
}
COM: <s> load an sql script and eliminate comment lines </s>
|
funcom_train/46477810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGivesAccessToPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Domain_GivesAccessTo_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Domain_GivesAccessTo_feature", "_UI_Domain_type"),
SecurityContextPackage.Literals.DOMAIN__GIVES_ACCESS_TO,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the gives access to feature </s>
|
funcom_train/36968945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getParentSelector(AttributeSet attributeSet) {
if(attributeSet != null)
{
final Object o = attributeSet.getAttribute(StyleConstants.ResolveAttribute);
if(o != null)
{
final Style s = (Style)o;
return getNormalizedStyleName(s.getName())+" "+ getParentSelector(attributeSet.getResolveParent());
}
}
else
{
return "";
}
return "";
}
COM: <s> returns the parent css selector of the given code attribute set code </s>
|
funcom_train/44165686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element removePlayer(Element element) {
Game game = getFreeColClient().getGame();
Element playerElement = (Element)element
.getElementsByTagName(Player.getXMLElementTagName()).item(0);
Player player = new Player(game, playerElement);
getFreeColClient().getGame().removePlayer(player);
gui.refreshPlayersTable();
return null;
}
COM: <s> handles a remove player message </s>
|
funcom_train/5395814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConvertToAbsoluteClassPath() {
System.out.println("convertToAbsoluteClassPath");
String cp = "";
String expResult = "";
String result = ClassPathUtils.convertToAbsoluteClassPath(cp);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of convert to absolute class path method of class org </s>
|
funcom_train/13524251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testForceTotal() {
try{
Organization org = Unmarshaller.unmarshallOrgParam("test/staticParameters/StaticMathXML/exemple_org.xml","test/staticParameters/StaticMathXML/exemple_param.xml").getOrganization();
Relation r=org.getRelation("R1");
float forceTotal=StaticMath.forceTotal(org, r,false);
assertTrue(forceTotal==4);
}
catch(Exception e){
System.err.println("Binding error: "+e.getMessage());
assertTrue(false);
}
}
COM: <s> test the force total function </s>
|
funcom_train/51181104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void group(BibtexEntry[] entries, String[] uniquefiers, int from, int to, String separator) {
StringBuilder sb = new StringBuilder(uniquefiers[from]);
for (int i=from+1; i<=to; i++) {
sb.append(separator);
sb.append(uniquefiers[i]);
entries[i] = null;
}
uniquefiers[from] = sb.toString();
}
COM: <s> modify entry and uniqiefier arrays to facilitate a grouped presentation of uniqiefied entries </s>
|
funcom_train/25280026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("NewWSDLFileSOAP".equals(portName)) {
setNewWSDLFileSOAPEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/48816331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTimer() {
// extract the first event from scheduleMap
Long time = (Long) scheduleMap.firstKey();
String rebootJarName = (String) scheduleMap.get((Object)time);
scheduleMap.remove((Object)time);
// create new timer task
RebootTimerTask task = new RebootTimerTask(rebootJarName);
// set timer
timer.schedule(task,new Date(time.longValue()));
}
COM: <s> extract the first event of schedule map and set it to timer </s>
|
funcom_train/42977655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMessagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ConstraintDescription_message_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ConstraintDescription_message_feature", "_UI_ConstraintDescription_type"),
ConstraintPackage.Literals.CONSTRAINT_DESCRIPTION__MESSAGE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the message feature </s>
|
funcom_train/15770319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XML build_education_row( EducationVO education ){
XML table_row = new XML( "fo:table-row" );
/* bild cell contains dates period */
table_row.addElement( build_education_row_date_cell(education) );
table_row.addElement( build_education_row_description_cell(education) );
return table_row;
}
COM: <s> builds the row for education table </s>
|
funcom_train/14638223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setBounds(new java.awt.Rectangle(195,120,124,31));
jButton1.setText("Salva ed esci");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
titoloDAO.insert(getTOfromTXT());
dispose();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/5810641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetV2cConfig() throws UnknownHostException {
SnmpAgentConfig agentConfig = SnmpPeerFactory.getInstance().getAgentConfig(InetAddress.getByName("192.168.0.50"));
assertNotNull(agentConfig);
assertEquals(agentConfig.getVersion(), SnmpAgentConfig.VERSION2C);
assertEquals("specificv2c", agentConfig.getReadCommunity());
}
COM: <s> this tests for a specifically defined v2c agent config </s>
|
funcom_train/18351334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSelectedItems() {
int[] rows = table.getSelectedRows();
java.util.List list = new ArrayList();
for(int i=0; i<rows.length; i++) {
list.add(((SimpleCapTableModel)table.getModel()).
getCapCommonForRowIndex(rows[i]));
}
return list;
}
COM: <s> returns all the selected instances in the code table code </s>
|
funcom_train/21249911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String finalizePacket(String p) {
char[] c = new char[2];
c[0]=(char)((p.length()-2)/256);
c[1]=(char)((p.length()-2)%256);
return (String.copyValueOf(c)+p.substring(2));
}
COM: <s> this method finalized set correct length snmp packet </s>
|
funcom_train/50775287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (!(obj instanceof DebuggerBreakpoint))
return false;
DebuggerBreakpoint d = (DebuggerBreakpoint) obj;
if (d.file == this.file && d.line == this.line)
return true;
if (d.file == null || this.file == null)
return false;
if (d.file.equals(this.file) && d.line == this.line)
return true;
return false;
}
COM: <s> if the file and the line is equal the method </s>
|
funcom_train/11105680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleException(FacesContext context, Exception exception) {
if (context == null) {
exception.printStackTrace(System.out);
return;
}
ExceptionHandler handler = (ExceptionHandler)
context.getApplication().getVariableResolver().resolveVariable
(context, Constants.EXCEPTION_HANDLER);
handler.handleException(exception);
}
COM: <s> p handle the specified exception according to the strategy </s>
|
funcom_train/37829773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void list(final Player player) {
final StringBuilder sb = new StringBuilder();
sb.append("Listing signs:");
int i = 1;
while (i <= signcounter) {
final Sign sign = storage.get(Integer.valueOf(i));
if (sign != null) {
sb.append("\r\n");
sb.append(i);
sb.append(". ");
signToString(sb, sign);
}
i++;
}
sandbox.privateText(player, sb.toString());
}
COM: <s> lists all signs </s>
|
funcom_train/2024019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(Engine engine) {
Enumeration params;
String param;
clear();
params = engine.getParameters();
while (params.hasMoreElements()) {
param = params.nextElement().toString();
setParameter(param, engine.getParameter(param));
}
initialize();
}
COM: <s> sets all the parameters from the given engine and initializes the engine </s>
|
funcom_train/48939237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(String sqlSelect) {
sqlString = sqlSelect;
Context ctx;
try {
ctx = new InitialContext();
ds = (DataSource)ctx.lookup("java:comp/env/jdbc/rets");
} catch (NamingException e) {
// TODO Auto-generated catch block
cat.error(e);
}
}
COM: <s> intialize sql query engine </s>
|
funcom_train/18835277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Info getAuthnInfo(HttpServletRequest request,
HttpServletResponse response) {
Info authnInfo = null;
HttpSession session = request.getSession(false);
if (session != null) {
User user = (User)session.getAttribute(Constants.USER_KEY);
if (user != null) {
authnInfo = new AuthnAdapter.Info();
authnInfo.principalId = user.getUsername();
authnInfo.sessionIndex = "0";
}
}
return authnInfo;
}
COM: <s> gets the authentication info from the http session </s>
|
funcom_train/18007791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(Object o) {
if (o instanceof ListItem) {
ListItem item = (ListItem) o;
Chunk chunk = new Chunk((char)zn, symbol.font());
item.setListSymbol(chunk);
item.setIndentationLeft(symbolIndent);
item.setIndentationRight(0);
list.add(item);
} else if (o instanceof List) {
List nested = (List) o;
nested.setIndentationLeft(nested.indentationLeft() + symbolIndent);
first--;
return list.add(nested);
} else if (o instanceof String) {
return this.add(new ListItem((String) o));
}
return false;
}
COM: <s> adds an code object code to the code list code </s>
|
funcom_train/47946714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasUnknownAxis() {
return (getTimeAxis() == null) && (getZAxis() == null) && (getLatAxis() == null) && (getLonAxis() == null) && (getGeoXAxis() == null)
&& (getGeoYAxis() == null);
}
COM: <s> checks for unknown axis </s>
|
funcom_train/46716459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void search(String fullTextSearchString) throws Exception {
CellQuery query = new CellQuery(cellFeedUrl);
query.setFullTextQuery(fullTextSearchString);
CellFeed feed = service.query(query, CellFeed.class);
out.println("Results for [" + fullTextSearchString + "]");
for (CellEntry entry : feed.getEntries()) {
printCell(entry);
}
}
COM: <s> performs a full text search on cells </s>
|
funcom_train/17679872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initMainTableCols() {
mainTableCols = new JdbcColumn[]{col};
JdbcConverter converter = col.converter;
if (converter != null) {
oracleStyleLOB = converter.isOracleStyleLOB();
oracleStyleLOBNotNullString = converter.getOracleStyleLOBNotNullString();
} else {
oracleStyleLOB = false;
}
super.initMainTableCols();
}
COM: <s> init the main table cols field to all our main table columns </s>
|
funcom_train/14316919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitFor(int num) {
if(NUM_PLAYERS == 0) NUM_PLAYERS = myID + num;
erase();
add(new GLabel("Waiting for "+num+" more player(s)", 180, 216));
if(num == 0) {
add(new GLabel("Press ENTER to play!", 195, 228));
IGNORE = false;
} else {
IGNORE = true;
}
}
COM: <s> shows how many people the server is waiting for </s>
|
funcom_train/25701950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setPosition(double[] pos) {
position[0] = pos[0];
position[1] = pos[1];
position[2] = pos[2];
if (updateChildren) {
Entity child;
Iterator<Entity> itr = children.iterator();
while (itr.hasNext()) {
child = itr.next();
child.setPosition(pos);
}
}
}
COM: <s> set the current position of the entity </s>
|
funcom_train/44544380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTrimFilenameUnixPathsSrcNotEndsWithSlash() {
final String theSrcDir = "/Users/tester/src";
final String theFilePath = "/Users/tester/src/main/java/com/test/SomeTest.java";
validate(theSrcDir, theFilePath);
}
COM: <s> test trim filename with a unix style path and src dir </s>
|
funcom_train/22222633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(RectangleDouble _other) {
return _other.getMinX() >= this.minX &&
_other.getMaxX() <= this.maxX &&
_other.getMinY() >= this.minY &&
_other.getMaxY() <= this.maxY;
}
COM: <s> returns code true code if all points on the boundary of </s>
|
funcom_train/4962360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare (Object x1, Object x2) throws ClassCastException {
if( x1 == null )
throw new ClassCastException (" asked to compare with null");
//this will generate a ClassCastException if x1 is of the wrong
//type.
Comparable comparable = (Comparable)x1;
//This may throw exceptions depending on the implementation of x1.
return comparable.compareTo( x2 );
}
COM: <s> invokes the code compare to code method of code x1 code on </s>
|
funcom_train/29885402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage getImage(String imagefile, boolean useMask) {
BufferedImage image = (BufferedImage) this.imageBank.get(imagefile);
if (image == null) {
URL url = this.base.getURL(imagefile);
// System.out.println("just before load image in BaseLoader.java");
image = (useMask) ? ImageUtil.getImage(url, this.maskColor)
: ImageUtil.getImage(url);
this.imageBank.put(imagefile, image);
}
return image;
}
COM: <s> loads and returns an image from the file location </s>
|
funcom_train/50373577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyListeners(NotificationKind notificationKind,ServiceProxy serviceListener) {
synchronized(filterListeners) {
if(notificationKind.equals(NotificationKind.Added))
for(IFilterListener listener : filterListeners) listener.addedService(serviceListener);
else if(notificationKind.equals(NotificationKind.Deleted))
for(IFilterListener listener : filterListeners) listener.deletedService(serviceListener);
else if(notificationKind.equals(NotificationKind.Changed))
for(IFilterListener listener : filterListeners) listener.filterChanged();
}
}
COM: <s> notifies listeners when a filter event occurs </s>
|
funcom_train/45538479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installDisplayListeners() {
//Sanity check
deinstallDisplayListeners();
fDisplayKeyListener= new Listener() {
public void handleEvent(Event event) {
if (event.keyCode != SWT.ESC)
return;
if (!isBreadcrumbEvent(event))
return;
fTextViewer.getTextWidget().setFocus();
}
};
Display.getDefault().addFilter(SWT.KeyDown, fDisplayKeyListener);
}
COM: <s> installs all display listeners </s>
|
funcom_train/7350944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectTransformer getImplementation() throws NoImplementationException {
if (_transformerImplClass == null) {
throw new NoImplementationException(
"No Transformer implementation found.");
}
try {
return (ObjectTransformer) _transformerImplClass.newInstance();
} catch (InstantiationException e) {
throw new NoImplementationException(e.toString());
} catch (IllegalAccessException e) {
throw new NoImplementationException(e.toString());
}
}
COM: <s> get a implementation of an object transformer </s>
|
funcom_train/22520151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected StringField createTitleField(Composite composite, String title) {
final StringField result = new StringField(composite, SWT.NONE, title);
result.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
validateTitle(result);
}
});
result.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
return result;
}
COM: <s> creates the title field </s>
|
funcom_train/18745954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getLabelNr(Map<TypeLabel,Integer> labelNrMap, TypeLabel label) {
Integer result = labelNrMap.get(label);
if (result == null) {
labelNrMap.put(label, result = labelNrMap.size());
}
return result;
}
COM: <s> returns the number of a type label creating a fresh number </s>
|
funcom_train/7354933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public Font getFont() {
Font font = super.getFont();
if (font == null && browser != null) {
// Strive to return a non-null value, otherwise the html support
// will typically pick up the wrong font in certain situations.
font = browser.getFont();
}
return font;
}
COM: <s> gets the font of this component </s>
|
funcom_train/23825013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGraphLayoutEngine(GraphLayoutEngine layoutEngine) {
if(layoutEngine == null) {
throw new NullPointerException("GraphLayoutEngine must not be null");
}
Object oldValue = this.graphLayoutEngine;
this.graphLayoutEngine = layoutEngine;
// TODO: Layout graph
firePropertyChangeEvent(Controller.GRAPH_LAYOUT_ENGINE_PROPERTY, oldValue, this.graphLayoutEngine);
}
COM: <s> sets the code graph layout engine code which is used </s>
|
funcom_train/5183409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createActivities1Group() {
PaletteGroup paletteContainer = new PaletteGroup(Messages.Activities1Group_title);
paletteContainer.setId("createActivities1Group"); //$NON-NLS-1$
paletteContainer.setDescription(Messages.Activities1Group_desc);
paletteContainer.add(createActivity1CreationTool());
paletteContainer.add(createParameterSet2CreationTool());
paletteContainer.add(createParameter3CreationTool());
paletteContainer.add(createActivityParameterNode4CreationTool());
paletteContainer.add(createActivityPartition5CreationTool());
return paletteContainer;
}
COM: <s> creates activities palette tool group </s>
|
funcom_train/14399150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void printQueue() {
// System.out.println("ReliableInidcation queue >");
// for (int i = 0; i < this.iQueue.size(); i++) {
// ReliableIndication indication = this.iQueue.get(i);
// System.out.println(" Q[" + i + "]: " + indication.getSequenceNumber() +
// "@"
// + indication.getDiscardTime());
// }
// }
COM: <s> prints all reliable indications in the indication delivery queue </s>
|
funcom_train/32960667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean apply(GenMedical patient, Date startTime, Date endTime, RandomData rng ) {
boolean rslt = false;
List<LabTest> tests = new ArrayList<LabTest>( getScenarios().size());
for ( Scenario s : getScenarios()) {
tests.add(((LabTestScenario)s).generateTest(startTime, rng ));
}
patient.generateLabResult(startTime, getTitle(), tests);
return rslt;
}
COM: <s> apply a battery of tests </s>
|
funcom_train/27947363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean getBooleanFromString(String TorF) {
if (TorF.equalsIgnoreCase("T")) {
return true;
} else if (TorF.equalsIgnoreCase("F")) {
return false;
} else {
throw new IllegalArgumentException("Boolean string must be 'T' or 'F'");
}
}
COM: <s> returns true if passed t and f if passed false </s>
|
funcom_train/13260059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateProjection() {
projection.set( 0.0f );
projection.set( 0, 0, focalLength * aspect );
projection.set( 1, 1, focalLength );
projection.set( 2, 2, (far + near) / (far - near) );
projection.set( 3, 2, (2 * near * far) / (near - far) );
projection.set( 2, 3, 1.0f );
}
COM: <s> updates the projection matrix after modifying the screen size fov or </s>
|
funcom_train/39378850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSelectAndDeselect() {
MockRequest mockRequest = mockContext.getMockRequest();
mockRequest.setParameter(Tree.SELECT_TREE_NODE_PARAM, testIds);
assertSelectOrDeselect(tree, testIds, false);//test for selection
assertSelectOrDeselect(tree, testIds, true);//should reverse selection and deselect
}
COM: <s> test selected and deselect of nodes </s>
|
funcom_train/12709448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean supportsDocument(Document aDocument) {
NodeList theNodes = aDocument.getElementsByTagName(MODEL);
if (theNodes.getLength() != 1) {
return false;
}
Element theDocumentElement = (Element) theNodes.item(0);
return getVersion().equals(theDocumentElement.getAttribute(VERSION));
}
COM: <s> test if the persister supports a document version </s>
|
funcom_train/18805250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(Font font) {
// check argument...
if (font == null) {
throw new IllegalArgumentException("TextTitle.setFont(...): null font not permitted.");
}
// make the change...
if (!this.font.equals(font)) {
this.font = font;
notifyListeners(new TitleChangeEvent(this));
}
}
COM: <s> sets the font used to display the title string </s>
|
funcom_train/42395955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNumJugadores() {
System.out.println("setNumJugadores");
int numJugadores = 0;
Partida instance = new Partida();
instance.setNumJugadores(numJugadores);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set num jugadores method of class model </s>
|
funcom_train/2610275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installConnectionListeners(final Backend connection) {
if (connection != null) {
connection.addListener(StatusChangeListener.class, new StatusChangeListener() {
public void connectionChanged(boolean online) {
if(!online) unregisterInstanceFor(connection);
}
public void ownPresenceChanged(int status,String show) {}
public void exit() {
unregisterInstanceFor(connection);
}
});
}
}
COM: <s> configure a session setting some action listeners </s>
|
funcom_train/33609158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initSet(Collection<V> set) {
models.clear();
if(modelMap == null) {
modelMap = new HashMap<V, BooleanModel> ();
} else {
modelMap.clear();
}
BooleanModel bm;
for(V v : set){
bm = new BooleanModel(true);
modelMap.put(v, bm);
add(bm);
}
}
COM: <s> initializes this model to a particular set of elements </s>
|
funcom_train/3475197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
return "MouseEventRecordable[" + getSourceName () + ",ID=" + getID () + ",when=" +
getWhen () + ",modifiers=" + getModifiers () + "," + getDuration () + ",x=" + getX () +
",y=" + getY () + "]";
}
COM: <s> returns a string representation of the mouse event recordable </s>
|
funcom_train/22316593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteLO() throws Exception {
DicomWriter lWriter = this.newWriter();
DataSet lData = new DataSet();
LongString lLO1 = DataElements.newInstitutionName();
// TODO SHLOUD work
lLO1
.addValue("FFFFFFFFFFFFFFFGDSFGGDGGEZGEBDFSGMLKJHGFDSQPOIUYTREZADFGHJKLMLKJHGFDSZERMLKJHGFD//FGDFGEGGGSRGERGERGERGEGGDGDFGDFGGFGDSDFGERGERGEGGEGEGERGERGEGERGRGERGERGMLKJHGFDSMLKJHGFDSMKJHGFDSPOIUYTREZMLKJHGFDSPOIUYTREENDEND");
// lLO1.addValue("d/t");
// LongString lLO2 = DataElements.newInstitutionName();
// lLO2.addValue("d1234\r");
lData.addElement(lLO1);
// lData.addElement( lLO2 );
lWriter.write(lData);
}
COM: <s> test writing lo into streams </s>
|
funcom_train/44137952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addClickListener(MouseListener l) {
for(int i = 0;i < m_LineList.size();i++) {
OSMSlideBodyLine line = (OSMSlideBodyLine)m_LineList.elementAt(i);
line.addMouseListener(l);
}
addMouseListener(l);
}
COM: <s> registers click listener applied on osmslide body line sons too </s>
|
funcom_train/29919450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDifferences(Integer clientId, Integer statement_id) throws SQLException {
SqlStatement sqlStatement = new SqlStatement(clientId, null, statement_id, null, null, null,
null);
return sqlMap.queryForList("getTimeDifferences", sqlStatement);
}
COM: <s> return the differences between the two last time the sql statement was executed </s>
|
funcom_train/26133242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findIndex(final Object o) {
int hashValue = hf.hash(o) % table.length ;
int i = hashValue ;
while ((table[i] != null) && ! ((Pair)table[i]).getA().equals(o)){
i = (i + 1) % table.length ;
if (i == hashValue)
throw new HashTableFullException() ;
}
return i ;
}
COM: <s> find the index of a given key i </s>
|
funcom_train/989969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintPiece(Piece piece, int x, int y) {
if (DRAW_OPTIMIZE) {
int px = xPixel(x);
int py = yPixel(y + piece.getHeight() - 1);
int pwidth = xPixel(x+piece.getWidth()) - px;
int pheight = yPixel(y-1) - py;
repaint(px, py, pwidth, pheight);
}
else {
// Not-optimized -- rather than repaint
// just the piece rect, repaint the whole board.
repaint();
}
}
COM: <s> given a piece and a position for the piece generates </s>
|
funcom_train/33368331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int insert(String sql) throws SQLException {
stmt = con.createStatement();
say(sql);
stmt.executeUpdate(sql);
// danger! if someone else inserts something now, LAST_INSERT_ID() may
// not be what we want!
ResultSet rs = stmt.executeQuery("select LAST_INSERT_ID()");
if (rs.next()) return rs.getInt(1);
throw new SQLException("could not get id after insert");
}
COM: <s> inserts a new row in an sql table having specified values </s>
|
funcom_train/50747154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String findProcessAsXML(String processId) throws ServiceException, RemoteException {
Call call = getCall();
log.debug("Getting process description " + processId);
call.setOperationName("findProcessAsXML");
String result = (String) call.invoke(new Object[]{processId});
log.debug("Got process description for process " + processId);
return result;
}
COM: <s> returns the deployed xml description of a process </s>
|
funcom_train/13271553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPhotoAspectRatio(AspectRatio photoAspectRatio) {
if (this.photoAspectRatio != photoAspectRatio) {
AspectRatio oldPhotoAspectRatio = this.photoAspectRatio;
this.photoAspectRatio = photoAspectRatio;
this.propertyChangeSupport.firePropertyChange(Property.PHOTO_ASPECT_RATIO.name(),
oldPhotoAspectRatio, photoAspectRatio);
}
}
COM: <s> sets the preferred photo aspect ratio and notifies </s>
|
funcom_train/14461148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private short getheight() {
int row= bounds[Msodrawing.ROW];
int row1= bounds[Msodrawing.ROW1];
double rowOff= bounds[Msodrawing.ROWOFFSET]/256.0;
double rowOff1= bounds[Msodrawing.ROWOFFSET1]/256.0;
double y= getRowHeight(row)-getRowHeight(row)*rowOff;
for (int i= row+1; i < row1; i++) {
y+= getRowHeight(i);
}
if (row1>row)
y+= getRowHeight(row1)*rowOff1;
else
y= getRowHeight(row1)*(rowOff1-rowOff);
return (short) Math.round(y);
}
COM: <s> calculate height based upon row s row offsets and row heights </s>
|
funcom_train/22267832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaint() {
for (int i = 0; i < this.pixels.length; ++i) {
this.pixels[i] = 0;
}
for (int i = 0; i < this.lastPainted.length; ++i) {
for (int j = 0; j < this.lastPainted[i].length; ++j) {
this.lastPainted[i][j] = -1;
}
}
}
COM: <s> ensure that we repaint every pixel </s>
|
funcom_train/39321399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dot1ActionPerformed(java.awt.event.ActionEvent evt)
{/*_I*/System.out.println("TerpPaint.dot1ActionPerformed("+"evt="+evt+")");/*I_*/
// clearBrushes();
toolBrush.setBrushType(toolBrush.DOT1);
curBrush.setBackground(Color.lightGray);
curBrush = dot1;
curBrush.setBackground(propColor);
// dot1.setBackgrounc(propColor);
}
COM: <s> this method sets the dot size of a brush tool to 1 and </s>
|
funcom_train/33606697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvertInCircleOfRadius() {
System.out.println("invertInCircleOfRadius");
double r = 0.0;
R2 instance = new R2();
instance.invertInCircleOfRadius(r);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of invert in circle of radius method of class r2 </s>
|
funcom_train/51751950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnOk() {
if (btnOk == null) {
btnOk = new JButton();
btnOk.setText("Ok");
btnOk.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
project.addBox(getAbtractBoxPanel().getBox());
dispose();
}
});
}
return btnOk;
}
COM: <s> this method initializes btn ok </s>
|
funcom_train/20643901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPositionOfTo(BCNode children, int position) {
BCNode parent= getParent(children);
if (parent == null)
return;
ArrayList childrens= getChildrens(parent);
int pos= childrens.indexOf(children);
if (pos < 0)
return;
int dest= childrens.size();
if ((position >= 0) && (position <= childrens.size()))
dest= position;
if (dest > pos)
dest--;
childrens.add(dest, childrens.remove(pos));
}
COM: <s> in the vector of children move the specified node up or down </s>
|
funcom_train/23533871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeDocument(URI documentURI) {
Multiset<String> terms = documentsToTerms.remove(documentURI);
if (terms == null) return false;
for (String term : terms.elementSet()) {
Multiset<URI> docs = termsToDocuments.get(term);
docs.remove(documentURI);
if (docs.isEmpty()) {
termsToDocuments.remove(term);
}
}
return true;
}
COM: <s> removes the specified document if it exists from this document manager </s>
|
funcom_train/11252740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteNotExisting() {
try {
con.delete("cn=This does not exist" + "," + BASE);
fail("deletion should fail");
} catch (LDAPException e) {
assertTrue(e.getLDAPResultCode() == LDAPException.NO_SUCH_OBJECT);
}
}
COM: <s> try to delete a non existing entry </s>
|
funcom_train/23868061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderByColumn getOrderByColumn(final int ordinal) {
if (allowedOrderByColumns.length > 0 && ordinal < allowedOrderByColumns.length) {
return allowedOrderByColumns[ordinal];
}
throw new IllegalArgumentException("No OrderByColumn with ordinal:" + ordinal + ", exists!");
}
COM: <s> gets an order by column by its ordinal number </s>
|
funcom_train/36631717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object callScript(UIContext context, String packageName, String serviceName, String[] args) {
if (scriptingServices != null) {
try {
return scriptingServices.callService((context == null) ? null : context.getName(), packageName, serviceName, args);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
throw new RuntimeException("Javascript Service Factory is disabled.");
}
COM: <s> calls a scripting service </s>
|
funcom_train/3072339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document getLocalInstallDocument() throws NullPointerException{
if(this.sourceBase==null){
throw new NullPointerException("sourceBase is null");
}else if(this.installConfigFileName==null){
throw new NullPointerException("installConfigFileName is null");
}else{
File docFile= new File(this.installDir,this.installConfigFileName);
if(!docFile.exists()){
return null;
}
try{
Document doc=builder.parse(docFile);
return doc;
}catch(Exception e){
return null;
}
}
}
COM: <s> gets the locally install install </s>
|
funcom_train/2586961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Size2D calculateDimensions(final Graphics2D g2) {
final FontMetrics fm = g2.getFontMetrics(this.font);
final Rectangle2D bounds = TextUtilities.getTextBounds(this.text, g2,
fm);
final Size2D result = new Size2D(bounds.getWidth(), bounds.getHeight());
return result;
}
COM: <s> calculates the dimensions of the text fragment </s>
|
funcom_train/44601704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_inline_no_block_01() {
compileAndExecGivenStatementExpectRuntimeError(
"X.java",
"public class X{\n" +
" public void m() {\n" +
" //@ assume false;\n" +
" }\n" +
"}\n",
"new X().m()",
null,
JMLAssumeError.class);
}
COM: <s> is inline assertion translated with no block </s>
|
funcom_train/38484553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteHTMLCourse(UserVo actor, Integer htmlCourseId) throws EJBException {
try {
HTMLCourseEntityLocal htmlCourse = HomeInterfaceFinder.getHTMLCourseHome().findByPrimaryKey(htmlCourseId);
htmlCourse.setObjectState(com.avatal.Constants.DELETED);
} catch (FinderException e) {
logger.throwing(className, "deleteHTMLCourse",e);
throw new EJBException(e);
}
}
COM: <s> l scht einen htmlkurs </s>
|
funcom_train/10344722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPriority(int priority) {
this.priority = priority;
if (logger.isFinestEnabled()) {
logger.finest("Setting priority "+ priority + " to worker " + this.getWorkerID());
logger.finest(" The internal thread name is " + internalThread.getName());
}
this.internalThread.setPriority(priority);
}
COM: <s> the code set priority code method here </s>
|
funcom_train/9673427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SecurityKey search(SecurityLockPrivate lock){
SecurityKeyPrivate object=(SecurityKeyPrivate)dbSearch(net.sf.uninet.common.content.security.SecurityKeyPrivate.class,"bunchId == '"+lock.getLock().getBunchId()+"'");
if(object!=null){return object.getKey();}
return null;
}
COM: <s> search private key </s>
|
funcom_train/46162693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
resetSelectedTextStyle();
if (e.getSource() == keyTimer) {
// Check to see if we need to send a message w/ new text to the clients
checkSendChanges();
} else if (lastSyncedState != null) {
cell.sendSyncMessage(lastSyncedState);
}
}
COM: <s> this method is called when user is typing in the text box </s>
|
funcom_train/41675538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSwingAppI18nDirectoryPath() {
String domainPackageCode = domainConfig.getPackageCode();
String domainSwingAppI18nPackageCode = domainPackageCode
+ ".swing.app.i18n";
String domainSwingAppI18nPackageCodeWithSlash = textHandler
.replaceDotWithSlash(domainSwingAppI18nPackageCode);
String domainSwingAppI18nDirectoryPath = sourceDirectoryPath
+ SEPARATOR + domainSwingAppI18nPackageCodeWithSlash;
return domainSwingAppI18nDirectoryPath;
}
COM: <s> gets swing application i18n directory path </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.