__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/4868499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void placeFirstTile(GameTile startingTile) {
if ( startingTile==null ) {
throw new IllegalArgumentException("The starting GameTile can not be null!");
}
// always place a slot in the middle of the grid.
addSlot( new Slot(new Rectangle(this.maxWidth/2, this.maxHeight/2, this.gameTileWidth, this.gameTileHeight)) );
place(startingTile, getCenterLocation() );
}
COM: <s> start the by placing the first tile </s>
|
funcom_train/28927464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTicket166() throws CoreException {
File baseDir = new File(getRepository().getBaseURI().toFileString());
getRepository().save(null);
assertTrue(baseDir.isDirectory());
assertEquals(0, baseDir.list().length);
assertNull(getRepository().findNamedElement("foo::Bar", Literals.CLASS, null));
getRepository().save(null);
assertEquals(0, baseDir.list().length);
}
COM: <s> searching for named elements would create spurious empty resources </s>
|
funcom_train/37016343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection getTitle(Resource base) {
Vector l_titlevector = new Vector();
if (base == null) {
return l_titlevector;
}
try {
Statement s = base.getProperty(DC.title);
Collection c = getLangStrings4Statement(s, base.getModel());
l_titlevector.addAll(c);
} catch (RDFException e) {
e.printStackTrace();
}
return l_titlevector;
}
COM: <s> gets the titles </s>
|
funcom_train/34608875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(PrintWriter pw, Mail m) throws IOException, MessageException {
List<String> contents = m.getMimeMessage().getMailMessageContent(
new FileInputStream(m.getPath()));
for (int i = 0; i < contents.size(); i++) {
pw.println(contents.get(i).toString());
pw.flush();
}
}
COM: <s> the pop3 server sends the entire message </s>
|
funcom_train/44286599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateSecurity(TransactionXML transaction, Entity entity) {
this.securityPublic = entity.securityPublic;
this.noReplication = entity.noReplication;
update(transaction, this.securityMembers, entity.securityMembers);
update(transaction, this.securityTeamMembers,
entity.securityTeamMembers);
update(transaction, this.securityRoleMembers,
entity.securityRoleMembers);
}
COM: <s> update method security setup </s>
|
funcom_train/32211694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertTimeToString(long time) {
String timeString = "" + time;
while (timeString.length() < 4) {
timeString = "0" + timeString;
}
timeString = timeString.substring(0, timeString.length() - 3) + "."
+ timeString.substring(timeString.length() - 3);
return timeString;
}
COM: <s> converts a timestamp as long value to a string </s>
|
funcom_train/3596093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NObservation getObservationWithName(String obsname) {
NObservation returnval = null;
List obs = getObservations();
Iterator obs_it = obs.iterator();
while (obs_it.hasNext()) {
NObservation next = (NObservation) obs_it.next();
if (obsname.equalsIgnoreCase(next.getShortName()) == true) {
returnval = next;
break;
}
}
if (returnval==null) {
System.err.println("Observation named " + obsname + " not found");
}
return returnval;
}
COM: <s> returns the named observation or null if it doesnt exist </s>
|
funcom_train/43644372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int readHeader( byte[] data, int offset ) {
EscherRecordHeader header = EscherRecordHeader.readHeader(data, offset);
short _options = header.getOptions();
_version = (short) (_options & 0x0F);
_instance = (short) (_options >> 4);
_recordId = header.getRecordId();
return header.getRemainingBytes();
}
COM: <s> reads the 8 byte header information and populates the code options code </s>
|
funcom_train/19844898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropCollaboratingOrganizationTable() {
try {
String sqlCmd = "DROP TABLE tbl_COLLABORATING_ORGANIZATION";
stmt = conn.createStatement();
stmt.execute(sqlCmd);
stmt.close();
}
catch (Exception e) {
logger.log(Level.SEVERE, e.toString());
}
}
COM: <s> drops the tbl collaborating organization table </s>
|
funcom_train/39803999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageString(String imageString) {
log.fine("setting image string to: " + imageString);
String old = this.getImageString();
this.imageString = imageString;
loadImage();
setDirty(true);
firePropertyChange("imageString",old,imageString);
}
COM: <s> used by the persistence mechanism </s>
|
funcom_train/22184750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialiseViewer(SetTableModel model) {
// Listen to GraphHandlerEvents
GraphHandler.getInstance().getListenerHandler().addListener(this);
//Create and set up the content pane.
JComponent newContentPane = buildTable(model);
newContentPane.setOpaque(true); //content panes must be opaque
this.setContentPane(newContentPane);
//Display this frame
this.pack();
this.setVisible(true);
}
COM: <s> initialises the viewer </s>
|
funcom_train/18228914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doInitialize(ByteBuffer sub) throws Exception {
len = sub.getInt();;
contentOffset = sub.position();
if (len == -1) {
uri = getString(sub);
} else {
sub.position(contentOffset+len);
}
int base = sub.getInt ();
lastModified = -10 - base;
}
COM: <s> a method called to finish the initialization in the subclasses </s>
|
funcom_train/18319806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showPage(Control id) {
if (id == outline) {
showOutlineAction.setChecked(true);
showOverviewAction.setChecked(false);
pageBook.showPage(outline);
if (thumbnail != null) {
thumbnail.setVisible(false);
}
} else if (id == overview) {
showOutlineAction.setChecked(false);
showOverviewAction.setChecked(true);
pageBook.showPage(overview);
if (thumbnail != null) {
thumbnail.setVisible(true);
}
}
}
COM: <s> shows the spcified page </s>
|
funcom_train/23297226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean findHeader(PushbackReader reader) throws IOException {
if (!skipWhiteSpaces(reader)) {
return false; // EOF
}
FormattedInput fiReader = new FormattedInput(reader);
String header = fiReader.readWord();
if (header.toUpperCase().startsWith("#NEXUS")) {
if (skipWhiteSpaces(reader)) {
// Is the next thing a BLOCK or COMMENT?
int c = skipComments(reader);
reader.unread(c);
}
return true;
} else {
return false;
}
}
COM: <s> find the nexus header nexus and move to next line </s>
|
funcom_train/1060498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyToStatusLine(IStatus status) {
String message= status.getMessage();
if (message.length() == 0) message= null;
switch (status.getSeverity()) {
case IStatus.OK:
saveDataToModel();
setErrorMessage(null);
setMessage(message);
break;
case IStatus.WARNING:
setErrorMessage(null);
setMessage(message, WizardPage.WARNING);
break;
case IStatus.INFO:
setErrorMessage(null);
setMessage(message, WizardPage.INFORMATION);
break;
default:
setErrorMessage(message);
setMessage(null);
break;
}
}
COM: <s> applies the status to the status line of a dialog page </s>
|
funcom_train/48705040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(BstEntry context) {
if (stack.size() < 1) {
throw new VMException("Not enough operands on stack for operation empty$");
}
Object o1 = stack.pop();
if (o1 == null) {
stack.push(VM.TRUE);
return;
}
if (!(o1 instanceof String)) {
throw new VMException("Operand does not match function empty$");
}
String s = (String) o1;
stack.push(s.trim().equals("") ? VM.TRUE : VM.FALSE);
}
COM: <s> pops the top literal and pushes the integer 1 if its a missing </s>
|
funcom_train/24553292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getPropertyValue(EditPart ep, IPropertyDescriptor property) {
// retrieve the property's value from the model
Object value = null;
IPropertySource ps = (IPropertySource) ep.getAdapter(IPropertySource.class);
if (PropertySourceAdapter.isPropertySet(ps, property)) {
value = PropertySourceAdapter.getPropertyValue(ps, property);
if (value != null) {
if (value instanceof IPropertySource)
value = ((IPropertySource) value).getEditableValue();
}
}
return value;
}
COM: <s> get the current string value of the property </s>
|
funcom_train/27976652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentPoints (int skillPoints, boolean cclassSkill) {
// Should we just do nothing instead of throwing an exception?
if (! checkMaximumRanks (skillPoints, cclassSkill)) {
throw new RuntimeException ("Maximum skill rank exceeded.");
}
if (cclassSkill) {
this.cclassPoints = skillPoints;
} else {
this.xclassPoints = skillPoints;
}
notifyListeners (null);
rankModifier.setValue (getCurrentRanks ());
}
COM: <s> change the current points allocated to this skill </s>
|
funcom_train/17994151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateUser(Binder zone, String loginName, Map mods) throws NoUserByTheNameException {
User profile = getProfileDao().findUserByName(loginName, zone.getName());
ProfileCoreProcessor processor = (ProfileCoreProcessor) getProcessorManager().getProcessor(
profile.getParentBinder(), ProfileCoreProcessor.PROCESSOR_KEY);
processor.syncEntry(profile, new MapInputData(StringCheckUtil.check(mods)), null);
}
COM: <s> update a user with attributes specified in the map </s>
|
funcom_train/44167426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void attemptGiftToSettlement(Unit unit, Settlement settlement) {
Goods goods = gui.showSimpleChoiceDialog(unit.getTile(),
"gift.text", "cancel", unit.getGoodsList());
if (goods != null) {
askServer().deliverGiftToSettlement(unit, settlement, goods);
}
}
COM: <s> user interaction for delivering a gift to the natives </s>
|
funcom_train/18726240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openOrImport(final String[] inputFileNames) {
if (inputFileNames == null) {
return;
}
for (String inputFileName : inputFileNames) {
JaxoLog.info(JaxoLanguage.message("Reading_file__0", inputFileName));
canvasPanel.openOrImport(inputFileName);
}
}
COM: <s> open given file names reusing an current unused tab </s>
|
funcom_train/26347105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Packet createPlayerDonePacket(int playerId) {
Object[] data = new Object[2];
data[0] = new Integer(playerId);
data[1] = Boolean.valueOf(getPlayer(playerId).isDone());
return new Packet(Packet.COMMAND_PLAYER_READY, data);
}
COM: <s> creates a packet containing the player ready status </s>
|
funcom_train/16796986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean runCommand(String cmd, String hexColor, double lineWidth) {
if (hexColor==null && lineWidth==1.0 && (IJ.altKeyDown()&&!Interpreter.isBatchMode()))
addRoi(true);
else {
Color color = hexColor!=null?Colors.decode(hexColor, Color.cyan):null;
addRoi(null, false, color, (int)Math.round(lineWidth));
}
return true;
}
COM: <s> adds the current selection to the roi manager using the </s>
|
funcom_train/6343410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCacheListener(ICacheListener listener) throws IOException {
for (Enumeration en=cacheListenersMap.keys(); en.hasMoreElements();) {
String cacheName = (String)en.nextElement();
addCacheListener(cacheName, listener);
if (debug) {
p("adding listener for cache " + cacheName);
}
}
return;
}
COM: <s> subscribes to all remote caches </s>
|
funcom_train/3491760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(T obj) {
int index = insertionIndex(obj);
if (index < 0) {
return false; // already present in set, nothing to add
}
Object old = _set[index];
_set[index] = obj;
postInsertHook(old == null);
return true; // yes, we added something
}
COM: <s> inserts a value into the set </s>
|
funcom_train/36820520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXML(String xml) {
checkHasRootElementEnd();
int idx = xml.indexOf(lastElem);
if (idx != -1 ) {
this.xml.setText(xml.substring(0, idx));
} else {
throw new RuntimeException("Invalid root element end");
}
}
COM: <s> set xml to be saved using this method </s>
|
funcom_train/45505489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged( javax.swing.event.ChangeEvent e ) {
Object s = e.getSource();
if( s instanceof JSlider ) {
JSlider source = (JSlider)e.getSource();
if( !source.getValueIsAdjusting() ) {
CoordinateTools.setZoomFactor( source.getValue() * 0.01 );
setZoomFactor( source.getValue() * 0.01 );
repaint();
}
}
}
COM: <s> handles swing events sent to the floor </s>
|
funcom_train/8691076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reader chain(Reader reader) {
return new BaseFilterReader(reader) {
/**
* @return the next non delete character
*/
public int read()
throws IOException {
while (true) {
int c = in.read();
if (c == -1) {
return c;
}
if (!(isDeleteCharacter((char) c))) {
return c;
}
}
}
};
}
COM: <s> factory method to provide a reader that removes </s>
|
funcom_train/28634171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotifierListener(NotifierListener<N, E> listener) {
if (listener == null) {
throw new NullPointerException("listener");
}
WeakReference<NotifierListener<N, E>> weakListenerReference = new WeakReference<NotifierListener<N, E>>(listener);
this.listeners.add(weakListenerReference);
}
COM: <s> adds a listener to this object </s>
|
funcom_train/23057920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJobAddedOKjButton() {
if (JobAddedOKjButton == null) {
JobAddedOKjButton = new JButton();
JobAddedOKjButton.setText("Okay");
JobAddedOKjButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
getJobAddedjDialog().setVisible(false);
getAddNewEventjDialog().setVisible(false);
}
}
);
}
return JobAddedOKjButton;
}
COM: <s> this method initializes job added okj button </s>
|
funcom_train/25365782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Act_actName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Act_actName_feature", "_UI_Act_type"),
LeveleditorPackage.Literals.ACT__ACT_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the act name feature </s>
|
funcom_train/13995014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testForInvalidChar(char invalidChar) {
try {
uri.setQueryAttribute(invalidChar + KEYS[0], VALUES[0]);
fail("no exception thrown with " + invalidChar + " in key");
} catch (IllegalArgumentException e) { }
try {
uri.setQueryAttribute(KEYS[0], invalidChar + VALUES[0]);
fail("no exception thrown with " + invalidChar + " in value");
} catch (IllegalArgumentException e) { }
}
COM: <s> tests that code invalid char code cannot be used in </s>
|
funcom_train/23235831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findItem(String slotName, String itemName) {
for (RPObject item : User.get().getSlot(slotName)) {
System.out.println(" item "+item.get("name")+" item name "+itemName);
if (item.get("name").equals(itemName)) {
int itemID = item.getID().getObjectID();
return itemID;
}
}
return -1;
}
COM: <s> returns the objectid for the named item </s>
|
funcom_train/43096244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoAction(int origStep) {
super.undoAction(origStep);
if (getStep() >= 1) {
removePanel(origStep);
}
if (origStep == 1) {
Object oper = getModelElement();
if (addedCreateStereotype) {
Model.getCoreHelper().removeStereotype(oper, createStereotype);
}
}
}
COM: <s> there is a possibility that the next step forward takes another path in </s>
|
funcom_train/5891666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object coerceToBean(Object val, Component comp, BindContext ctx) {
final String format = (String) ctx.getConverterArg("format");
if(format==null) throw new NullPointerException("format attribute not found");
final String date = (String) val;
try {
return date == null ? null : new SimpleDateFormat(format).parse(date);
} catch (ParseException e) {
throw UiException.Aide.wrap(e);
}
}
COM: <s> convert string to date </s>
|
funcom_train/20296467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void innerSendMoveToOpp(String moveMsg) throws IOException, ClassNotFoundException {
theClient.logger.print_info("Sending move to opponent: " + moveMsg);
opponentSocket.setSoTimeout(ClientServerProtocol.timeout);
clientToOpponent.writeObject(moveMsg);
clientToOpponent.flush();
//now get the response to be sure the opponent is connected
String response = (String)opponentIn.readObject();
opponentSocket.setSoTimeout(moveTime*1000);
}
COM: <s> auxillary send to opponent move </s>
|
funcom_train/48473906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXml(Collection<?> root, String rootName, String encoding) {
try {
CollectionWrapper wrapper = new CollectionWrapper();
wrapper.collection = root;
JAXBElement<CollectionWrapper> wrapperElement = new JAXBElement<CollectionWrapper>(new QName(rootName),
CollectionWrapper.class, wrapper);
StringWriter writer = new StringWriter();
createMarshaller(encoding).marshal(wrapperElement, writer);
return writer.toString();
} catch (JAXBException e) {
throw ExceptionUtils.unchecked(e);
}
}
COM: <s> java object xml with encoding root element collection </s>
|
funcom_train/11523709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderSpacerCell(FacesContext facesContext, ResponseWriter writer, UIComponent component) throws IOException {
UIComponent spacer = getNewspaperTableSpacer(component);
if(spacer == null) return;
writer.startElement(HTML.TD_ELEM, component);
RendererUtils.renderChild(facesContext, spacer);
writer.endElement(HTML.TD_ELEM);
}
COM: <s> renders a spacer between adjacent newspaper columns </s>
|
funcom_train/4233189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void postTime(double time) {
if (time < this.time) {
clearData();
}
super.postTime(time);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
if (xyMode) {
postDataXY(channelMap, cachedChannelMap);
} else if (channelMap != null) {
postDataTimeSeries(channelMap);
channelMap = null;
}
setTimeAxis();
}
});
}
COM: <s> posts a new time </s>
|
funcom_train/22166997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BitSequence concat(BitSequence sequence) {
BitSequence result = new BitSequence(this.getBitLength()
+ sequence.getBitLength());
System.arraycopy(this.value, 0, result.value, 0, this.getBitLength());
System.arraycopy(sequence.value, 0, result.value, this.getBitLength(),
sequence.getBitLength());
return result;
}
COM: <s> concatenates the specified code bit sequence code to the end of this </s>
|
funcom_train/23980008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrefix(int i) {
if (i < 0 || i >= startIndex.length) return null;
int s = i > 0 ? endIndex[i - 1] :
(pattern.lastIndexOf(File.separator) + 1);
int e = startIndex[i];
return s <= e ? pattern.substring(s, e) : null;
}
COM: <s> gets the patterns text string before the given numerical block </s>
|
funcom_train/5859254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void depthFirstWsTraverse(WorkSpace ws, FSObject from) {
this.elements.addElement(from);
if (from instanceof FSDir) {
Enumeration iterator = ((FSDir) from).getFSObjects().elements();
while (iterator.hasMoreElements()) {
FSObject fsdirentry = (FSObject) iterator.nextElement();
this.depthFirstWsTraverse(ws, fsdirentry);
}
}
}
COM: <s> traverses the work space given in parameter in a depth first way </s>
|
funcom_train/3655203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getBaseUri() {
MimeContainer currentAncestor = getContainer();
while (null != currentAncestor) {
if (container.hasContentLocation()) {
container.normalizeContentLocation();
return container.getContentLocation();
} else {
currentAncestor = currentAncestor.getContainer();
}
}
return "thismessage:/";
}
COM: <s> gets the base uri for any relative content locations the nearest </s>
|
funcom_train/2870994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TagTestContext getTagTestContext(TagInfo tagInfo) {
TagTestContext ctx = (TagTestContext)tagTestContexts.get(tagInfo.getName());
if (ctx == null) {
ctx = new TagTestContext(tagInfo.getName());
ctx.setTagInfo(tagInfo);
add(ctx);
}
return ctx;
}
COM: <s> gets the tag test context for the named tag creating one if necessary </s>
|
funcom_train/19250689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void view() {
logger.info("Viewing hidden information.");
state.setVisible(true);
dataPanel.populateSmallCharacter( getSmallCharacter());
dataPanel.populateBigCharacter( getBigCharacter());
Map dataMap = decoratedDataProvider.getCurrentData();
String meaning = (String)dataMap.get("MEANING");
dataPanel.populateMeaning( meaning);
updateAction();
}
COM: <s> display the hidden characters or hidden meaning </s>
|
funcom_train/16482458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onImportCards() {
// Open the import cards panel if there is no review in progress.
if (data.getStream().getCurrentCardID() == -1) {
// Deselect any selected cards.
if (displayPanel.getSelectedCardID() != -1) {
displayPanel.onClick(0, 0);
}
new ImportCardsDialog(this);
redrawDisplayPanel();
summaryPanel.updateSummary();
}
}
COM: <s> called when the user requests to import cards to the card set </s>
|
funcom_train/10267007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSchemaString() {
if (null != _xsd4YAWLBuilder) {
XSDSchema schema = _xsd4YAWLBuilder.getOriginalSchema();
if (null != schema) {
String schemaStr = XSDUtil.convertToString(schema);
schemaStr = schemaStr.substring(schemaStr.indexOf('\n'));
return schemaStr;
}
}
return "";
}
COM: <s> returns a string representation of the primary schema set into this object </s>
|
funcom_train/23272441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printTable() {
try {
MessageFormat headerFormat = new MessageFormat(language.translate("IQDA Data Anonymization Tool"));
MessageFormat footerFormat = new MessageFormat("{0}");
tblNameMapping.print(JTable.PrintMode.FIT_WIDTH, headerFormat, footerFormat);
} catch (PrinterException error) {
ErrorLog.instance().addEntry(error);
}
}
COM: <s> prints the table </s>
|
funcom_train/21301772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() {
String datasetName = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("datasetName");
Envision2.getCurrentDatasetHolderInstance().remove(datasetName);
Envision2.getCurrentMenuInstance().setSyncMenu(true);
}
COM: <s> the method that is used to remove one dataset </s>
|
funcom_train/12171163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MCSAttributes getParentAttributes(VolantisProtocol protocol) {
MCSAttributes parentAttributes = null;
Stack stack = getWidgetDefaultModule(protocol).getInnerAttributesStack();
if (stack.size() >= 2) {
parentAttributes = (MCSAttributes) stack.get(stack.size() - 2);
}
return parentAttributes;
}
COM: <s> returns attributes of the parent widget being currently rendered </s>
|
funcom_train/16651622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeEmptyRelation() {
int count = 0;
while (count < publicationEntity.getRelations().size()) {
if ("".equals(publicationEntity.getRelations().get(count).getIdentifierValue())
|| publicationEntity.getRelations().get(count).getIdentifierValue() == null) {
publicationEntity.getRelations().remove(count);
count = 0;
}
count++;
}
}
COM: <s> deletes all empty relations from the publication entity </s>
|
funcom_train/37557147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPolygon(int[] pointArray) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
int nullBrush = OS.GetStockObject(OS.NULL_BRUSH);
int oldBrush = OS.SelectObject(handle, nullBrush);
OS.Polygon(handle, pointArray, pointArray.length / 2);
OS.SelectObject(handle, oldBrush);
}
COM: <s> draws the closed polygon which is defined by the specified array </s>
|
funcom_train/49836917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int createAccount(String name, String faction, String nick, String password) {
if(DEBUG) System.out.println("Chat.createAccount(\"" + name + "\", \"" + faction + "\", \"" + nick + "\", \"" + password + "\")");
return PersistentPlayer.createPersistentPlayer(name, faction, nick, password);
}
COM: <s> create an account into the persistent system </s>
|
funcom_train/44589774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int resolveLevelForTypeOrEnclosingTypes(char[] simpleNamePattern, char[] qualificationPattern, TypeBinding binding) {
if (binding == null) return INACCURATE_MATCH;
if (binding instanceof ReferenceBinding) {
ReferenceBinding type = (ReferenceBinding) binding;
while (type != null) {
int level = resolveLevelForType(type);
if (level != IMPOSSIBLE_MATCH) return level;
type = type.enclosingType();
}
}
return IMPOSSIBLE_MATCH;
}
COM: <s> returns whether the given type binding or one of its enclosing types </s>
|
funcom_train/2905258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getPathBounds(JTree tree, TreePath path) {
if(tree != null && treeState != null) {
Insets i = tree.getInsets();
Rectangle bounds = treeState.getBounds(path, null);
if(bounds != null && i != null) {
bounds.x += i.left;
bounds.y += i.top;
}
return bounds;
}
return null;
}
COM: <s> returns the rectangle enclosing the label portion that the </s>
|
funcom_train/4925181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExceptionAlreadyExists() {
// Change to a unique exception
Change<WoofExceptionModel> change = this.operations.refactorException(
this.exception, IOException.class.getName());
// Validate no change (as exception is already handled)
this.assertChange(change, this.exception, "Refactor Exception", false,
"Exception " + IOException.class.getName()
+ " is already handled");
}
COM: <s> ensure not able to refactor to an existing </s>
|
funcom_train/870600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printMessages() {
NodeList nodes = document.getDocumentElement().getChildNodes();
for (int i=0; i<nodes.getLength(); i++) {
Element e = (Element) nodes.item(i);
System.out.println(
e.getAttribute("namespaceURI") + ": "
+ e.getAttribute("lName") + ": "
+ e.getAttribute("type") + ": "
+ e.getAttribute("message")
);
}
}
COM: <s> print the errors and warnings to system out </s>
|
funcom_train/1602512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean categoryExists(int id) {
boolean cExists = false;
try {
Class.forName("org.sqlite.JDBC");
conn = DriverManager.getConnection("jdbc:sqlite:"+ databaseName);
prep = conn.prepareStatement("select * from CATEGORY where id = ?;");
prep.setInt(1, id);
rs = prep.executeQuery();
cExists = rs.next();
conn.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return cExists;
}
COM: <s> function to check if category exists in the database </s>
|
funcom_train/3411019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayMessage(String caption, String text, MessageType messageType) {
if (caption == null && text == null) {
throw new NullPointerException("displaying the message with both caption and text being null");
}
TrayIconPeer peer = this.peer;
if (peer != null) {
peer.displayMessage(caption, text, messageType.toString());
}
}
COM: <s> displays a popup message near the tray icon </s>
|
funcom_train/33408498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonvoraz() {
if (jButtonvoraz == null) {
jButtonvoraz = new JButton();
jButtonvoraz.setBounds(new Rectangle(258, 76, 82, 26));
jButtonvoraz.setText("Voraz");
jButtonvoraz.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("Boton voraz apretado");
application.estrategia(3);
}
});
}
return jButtonvoraz;
}
COM: <s> this method initializes j buttonvoraz </s>
|
funcom_train/20537869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveSettings() {
IDialogSettings settings = getDialogSettings();
if (settings != null) {
settings.put(TO_FILE_SETTING, getDestinationFile().getAbsolutePath());
if (supportsPhotos()) {
settings.put(INCLUDE_PHOTOS_SETTING, photosCheckBox.getSelection());
}
}
}
COM: <s> saves the pages settings </s>
|
funcom_train/22047683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SetDate(int iHours, int iDays, int iMonths, int iYear) {
lDate = (long)(iHours + ((iDays - 1) * iHoursToDay) +
((iMonths - 1) * GetHoursInMonth()) +
((iYear - iYearOfStart) * GetHoursInYear()));
}
COM: <s> setting the date routines </s>
|
funcom_train/33729951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getZoneIndex(int x, int y){
int numOfItemsThisLevel = 0;
if(moLastItem == null){
//we are at the root
numOfItemsThisLevel = moGraphicModel.getLayer(0).size();
}
else{
//check the leaf level
numOfItemsThisLevel = moLastItem.getChildCount();
}
float zoneIndex = getWeightedZoneN(x, y, mdStartAngle,
numOfItemsThisLevel, null, 0);
return zoneIndex;
}
COM: <s> get the zone index for the current x and y position </s>
|
funcom_train/13557876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int sendAnyInstruction(byte ins, boolean useSM) throws CardServiceException {
CommandAPDU capdu = new CommandAPDU(ISO7816.CLA_ISO7816, ins,
(byte) 0x00, (byte) 0x00);
if (useSM) {
capdu = getWrapper().wrap(capdu);
}
ResponseAPDU rapdu = transmit(capdu);
if (useSM) {
rapdu = getWrapper().unwrap(rapdu, rapdu.getBytes().length);
}
return rapdu.getSW();
}
COM: <s> send instruction ins with p1 0 and p2 0 </s>
|
funcom_train/17788996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBit(long numBit) throws WarningException{
if((numBit >= 0) && (numBit < numBits)){
int byteIndex = (int) (numBit/8);
byte originalByte = bitBuffer[byteIndex];
byte mask = 1;
mask = (byte) (mask << (7 - (numBit % 8)));
return((mask & originalByte) != 0 ? true: false);
}else{
throw new WarningException("Bit number must be between 0 and number of bits of bitstream.");
}
}
COM: <s> return the bit value indicated </s>
|
funcom_train/25564192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintHorizontal(GraphRegion rgn, int y, int height, double max, double min){
if(fill)rgn.gr.fillRect(rgn.x, y, rgn.width, height+1);
else rgn.gr.drawRect(rgn.x, y, rgn.width, 0);
}
COM: <s> color is already set to rgn </s>
|
funcom_train/32779295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reload(){
// alte zoom- und speed- Werte speichern
Hashtable<String, ZoomEntry> zoom = model.getModelGrafic().getZoomProperty();
double speed = getSimulationSpeed();
// Animation neu laden
try {
fileReset();
} catch (Exception e1) {
setStatusMessage(e1.getMessage());
e1.printStackTrace(ViewerPanel.getLogWriter());
ViewerPanel.getLogWriter().close();
e1.printStackTrace();
}
// alte zoom- und speed- Werte setzen
setSimulationSpeed(speed);
model.getModelGrafic().setZoomProperty(zoom);
this.lastCall();
}
COM: <s> used when start button is pressed </s>
|
funcom_train/17828844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadReadlineHistory(File homedir) {
File history = new File(homedir, "readline_history");
if (history.exists()) {
try {
console.readHistory(history.toString());
}
catch (Throwable e) {
System.err.println("WARNING: Failed to process readline" +
"history: " + e.getMessage());
}
}
}
COM: <s> attempts to load the readline history file </s>
|
funcom_train/17492693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isInnerClass(Class c1, Class c2) {
Class c = c1.getDeclaringClass();
if (c == null) {
try {
Field f = c1.getField("declaring$Class$Reference$0");
c = (Class)f.get(null);
} catch (Exception e) {
}
}
c1 = c;
while (c != null) {
if (c == c2) {
return true;
}
c = c.getDeclaringClass();
if (c == null) {
try {
Field f = c1.getField("declaring$Class$Reference$0");
c = (Class)f.get(null);
} catch (Exception e) {
}
}
c1 = c;
}
return false;
}
COM: <s> is c1 an inner class of c2 </s>
|
funcom_train/2309386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSelectedState() {
if (getSelectedState() != null) {
Network memory = getPandora().memory().newMemory();
Vertex language = memory.createVertex(Language.class);
Vertex stateMachine = memory.createVertex(getSelectedState());
stateMachine.unpinDescendants();
for (Relationship relationship : language.getRelationships(Primitive.STATE)) {
if (relationship.getTarget().equals(stateMachine)) {
language.internalRemoveRelationship(relationship);
memory.removeRelationship(relationship);
break;
}
}
memory.save();
setSelectedState(null);
setStateCode("");
}
}
COM: <s> remove the selected state from the language state machines </s>
|
funcom_train/35220202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void exportVisible() {
Collection<Event> events = new ArrayList<Event>();
for(Calendar cal : Cal.getLogic().getCalendarManager().getAllCalendars()) {
if(isActive(cal)) {
events.addAll(cal.getEvents());
}
}
export("Export Visible", events);
}
COM: <s> exports all of the events in the currently active visible calendar </s>
|
funcom_train/26035686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node getPropNode( Node subject, Node predicate ) {
ClosableIterator<Triple> it = graph.find( subject, predicate, Node.ANY, newComplete() );
Node result = it.hasNext() ? it.next().getObject() : null;
it.close();
return result;
}
COM: <s> answer the single node n such that subject predicate n is in the </s>
|
funcom_train/12193974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedReader getStreamReader() {
InputStream in = MatchParser.class.getResourceAsStream(
MAGIC_FILE_RESOURCE);
if (in == null) {
throw new IllegalStateException(
"Unable to load magic file: " + MAGIC_FILE_RESOURCE);
}
return new BufferedReader(new InputStreamReader(in));
}
COM: <s> tries to read the magic </s>
|
funcom_train/48169129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
super.paintComponent(g);
if(upperPanel!=null && lowerPanel!=null
&& upperPanel.getGraphics()!=null && lowerPanel.getGraphics()!=null){
upperPanel.paintComponent(upperPanel.getGraphics());
lowerPanel.paintComponent(lowerPanel.getGraphics());
}
}
COM: <s> paint method for confidence canvas </s>
|
funcom_train/37461866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BlastJobEntity submitJob( UniprotAc uniprotAc) throws BlastServiceException {
if ( uniprotAc == null ) {
throw new IllegalArgumentException( "uniprot ac must not be null!" );
}
if ( uniprotAc.getAcNr() == null ) {
throw new IllegalArgumentException( "UniprotAc.getAcNr() must not be null!" );
}
return submitJob( new BlastInput( uniprotAc ) );
}
COM: <s> return blast job entity can be null </s>
|
funcom_train/33717560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onWindowResized(int width, int height) {
/*
if (label2.getText().equals("")) {
label2.setText(".");
}
int diff = Window.getClientHeight() - DOM.getAbsoluteTop(bottom) - voffset;
axedArea.setHeight(axedArea.getHeight() + diff - 2);
vPosBar.setHeight(axedArea, axedArea.getHeight() - voffset);*/
hPosBar.resized();
}
COM: <s> called when window resized </s>
|
funcom_train/49789473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHandlerGeneratedUserParameter() throws Exception {
root = loadAndInfer(UserRoles.class);
Session session = assertHasSession(root, "target session");
LoginHandler handler = assertHasLoginHandler(session, "role-based login handler for target session");
Role user = assertHasRole(root, "User");
assertGenerated(user);
// a ActivityParameter wire: [guest] --> [handler]
Parameter param = assertHasParameter(session, user, handler);
assertGenerated(param);
}
COM: <s> the login handler type user should have an incoming </s>
|
funcom_train/48337760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean openInputStream(InputStream in) {
try {
synchronized (lock) {
inputStream = AudioSystem.getAudioInputStream(in);
}
} catch (IOException x) {
SystemUtilities.debug("Cannot read " + sourceName
+ "; skipping");
SystemUtilities.debug(x);
next(true);
return false;
} catch (UnsupportedAudioFileException x) {
SystemUtilities.debug(sourceName + " has unsupported "
+ "audio file format; skipping");
SystemUtilities.debug(x);
next(true);
return false;
}
return true;
}
COM: <s> opens an audio input stream and handles all exceptions </s>
|
funcom_train/22545150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(SearchResult line) {
Assert.that(line!=null,"Attempting to add null line");
Integer key=new Integer(line.getSize());
List<SearchResult> lines = map.get(key);
if (lines==null) {
lines=new LinkedList<SearchResult>();
map.put(key, lines);
}
lines.add(line);
}
COM: <s> adds line to this </s>
|
funcom_train/2806237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map finalizeOrderEntryMethodType(String paymentMthodType) {
Map result;
this.cart.clearPaymentMethodTypeIds();
this.cart.clearPaymentMethodIds();
if (paymentMthodType != null && paymentMthodType.equals("offline")) {
this.cart.addPaymentMethodTypeId("EXT_OFFLINE");
}
result = ServiceUtil.returnSuccess();
return result;
}
COM: <s> indicates whether the payment should be made offline or </s>
|
funcom_train/14116657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDOMPath(final String name, final String latestRevision, final String binaryStatus) {
currentPath = document.createElement(CacheConfiguration.PATH);
currentPath.setAttribute(CacheConfiguration.NAME, name);
currentPath.setAttribute(CacheConfiguration.LATEST_REVISION, latestRevision);
currentPath.setAttribute(CacheConfiguration.BINARY_STATUS, binaryStatus);
cache.appendChild(currentPath);
}
COM: <s> adds a path in the dom </s>
|
funcom_train/46766023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ViewPatientAppointmentModel getViewPatientAppointment(final long viewPatientAppointmentId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SchedulingData.getViewPatientAppointment(viewPatientAppointmentId, chain, call);
}}; return (ViewPatientAppointmentModel) call(method, call);
}
COM: <s> same transaction return the single view patient appointment model for the primary key </s>
|
funcom_train/48406440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsOrderedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_List_isOrdered_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_List_isOrdered_feature", "_UI_List_type"),
SpemxtcompletePackage.eINSTANCE.getList_IsOrdered(),
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is ordered feature </s>
|
funcom_train/18191177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Packet sendMessage(Message msg, Edge edge, Node sender, Node target, double intensity) {
if(Global.isAsynchronousMode){
return asynchronousSending(msg, edge, sender, target, intensity);
}
else{
return synchronousSending(msg, edge, sender, target, intensity);
}
}
COM: <s> starts the send process to deliver a message to a target node </s>
|
funcom_train/37019628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void treatMediaFileSelection(Object obj, int mediaType) {
if (obj instanceof String && (String)obj==NONE ) {
theDveMMedia.removeMedia(mediaType);
if ( mediaType==DveMMedia.TEXT ){
theDveMMedia.setMediaText(theContentTextArea.getText());
}
}else if (obj != null && obj instanceof FileContainer ) {
theDveMMedia.setMedia((FileContainer)obj);
}
}
COM: <s> treats the selection of the media files </s>
|
funcom_train/19338566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getVisibleItemsOfCategory (Category c) {
ArrayList filteredItems = getItemsOfCategory (c);
ArrayList visibleItems = new ArrayList ();
for (int i = 0; i < filteredItems.size(); i++) {
Item currentItem = (Item) filteredItems.get (i);
if (currentItem.isVisible())
visibleItems.add (currentItem);
}
return visibleItems;
}
COM: <s> creates an array list of the visible items </s>
|
funcom_train/16268921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object replaceCallWithBeanResult(Invocation invocation) throws Throwable {
logger.debug("MockAspect::replaceCallWithBeanResult");
MethodInvocation mi = (MethodInvocation) invocation;
Class returnType = mi.getActualMethod().getReturnType();
Class beanclass = Class.forName(returnType.getName() + "Bean");
return beanclass.newInstance();
}
COM: <s> instantiate the bean implementation for the ejb </s>
|
funcom_train/51120188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class RepaintRequestEvent extends EventObject {
/**
* Serial generated by eclipse.
*/
private static final long serialVersionUID = 3256725095530442805L;
/** Construct new event.
* @param source The paintable needing repaint
*/
public RepaintRequestEvent(Paintable source) {
super(source);
}
/** Get the paintable needing repainting.
* @return Paintable for which the paint() method will return
* dissimilar UIDL from the previous call of the method.
*/
public Paintable getPaintable() {
return (Paintable) getSource();
}
}
COM: <s> repaint request event is thrown when the paintable needs to be repainted </s>
|
funcom_train/12573680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMappingsSashForm() {
mappingsSashForm = new SashForm(modelsRightPartSashForm, SWT.NONE);
mappingsSashForm.setOrientation(org.eclipse.swt.SWT.VERTICAL);
createMappingsTreeComposite();
createMappingRuleComposite();
mappingsSashForm.setWeights(new int[] {1,2});
}
COM: <s> this method initializes mappings sash form </s>
|
funcom_train/13993638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTransactionalRead() throws Exception {
if (pm.currentTransaction().isActive()) {
pm.currentTransaction().rollback();
}
try {
pm.newQuery(MockPersistentIdentifiable.class).execute();
fail("transaction is not active, but no exception was thrown");
} catch (JDOUserException expected) {
}
}
COM: <s> tests that read operations must be executed in transactions </s>
|
funcom_train/7621393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCursorCapsMode(int reqModes) {
if (mDummyMode) return 0;
final Editable content = getEditable();
if (content == null) return 0;
int a = Selection.getSelectionStart(content);
int b = Selection.getSelectionEnd(content);
if (a > b) {
int tmp = a;
a = b;
b = tmp;
}
return TextUtils.getCapsMode(content, a, reqModes);
}
COM: <s> the default implementation uses text utils </s>
|
funcom_train/22278559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InternalWindow createMenuWindow() {
InternalWindow window;
window = new InternalWindow(InternalWindow.BLANK_TYPE, 0, 0, 0, 0);
window.setLayer(InternalWindow.IGNORE_WINDOW_CLIPVIEW_LAYER+11);
window.setCanBecomeMain(false);
window.contentView().setTransparent(true);
window.setScrollsToVisible(true);
return window;
}
COM: <s> creates the internal window that is used by this menu view for </s>
|
funcom_train/19338074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetItem () {
DataBase db = new DataBase ();
Category c = new Category ("test");
Item i = new Item (c);
db.addCategory (c);
db.addItem (i);
// the first item should be equal to the inserted item
Assert.assertTrue (i.equals (db.getItem (0)));
}
COM: <s> this test checks if the get item method works </s>
|
funcom_train/50156640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element getStaticSimpleValue() {
Element valueDiv = df.createElement("div")
.addAttribute("class", "static-value");
Element valueElement = valueDiv.addElement ("bean__write")
.addAttribute ("name", formBeanName)
.addAttribute ("property", "valueOf(" + xpath + ")")
.addAttribute ("filter", "false");
return valueDiv;
}
COM: <s> gets the text input attribute of the dcs view record renderer object </s>
|
funcom_train/44994327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean notTopicFormat(Attributes attrs, String valueOfHref) {
String hrefValue = valueOfHref;
String formatValue = attrs.getValue(Constants.ATTRIBUTE_NAME_FORMAT);
String extOfHref = getExtName(valueOfHref);
if (notLocalURL(hrefValue)) {
return true;
} else {
if (formatValue == null && extOfHref != null
&& !extOfHref.equalsIgnoreCase("DITA")
&& !extOfHref.equalsIgnoreCase("XML")) {
return true;
}
}
return false;
}
COM: <s> check whether it is a topic format </s>
|
funcom_train/40166115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestMove() {
try {
send(Message.OK);
// awaken reader thread so it waits for data from socket
synchronized (lock) {
lock.notify();
}
} catch (IOException ex) {
Logger.getLogger(CameraController.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> sends a signal to the camera that a move should be captured </s>
|
funcom_train/121546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAll(Object o) {
LogoList copy = duplicate();
this.clean();
while (!copy.empty()) {
if (copy.first() != o)
fput(copy.first());
copy.butFirstF();
}
copy = duplicate();
clean();
while (!copy.empty()) {
fput(copy.first());
copy.butFirstF();
}
}
COM: <s> fast removal of any occurances of o </s>
|
funcom_train/27780014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read() throws java.io.IOException {
int ch = gimme();
pos_bit += 8;
if (shift() == 0) {
return ch;
}
ch = ch | ((buff[ENSURE()] & 0xff) << (8 - (pos_bit & 0x7)));
// System.err.println(" -- read:"+Integer.toBinaryString(ch&0xff));
return ch & 0xff;
}
COM: <s> read the next byte of data from the input stream </s>
|
funcom_train/18105083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnsignedSecurityDomain(String domain) {
MIDletSuite midletSuite = Scheduler.getScheduler().getMIDletSuite();
// if a MIDlet suite is not scheduled, assume the JAM is calling.
if (midletSuite != null) {
midletSuite.checkIfPermissionAllowed(Permissions.MIDP);
}
unsignedSecurityDomain = domain;
}
COM: <s> sets security domain for unsigned suites </s>
|
funcom_train/6460442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDescriptorFields (XmlDescriptor new_desc, Vector fields) {
for (int i = 0; i < fields.size(); i++) {
JField jf = (JField)fields.elementAt(i);
if (!jf._noMarshal) {
if (jf.isXmlAttribute())
new_desc.addAttribute (jf);
else
new_desc.addElement (jf);
} else {
//System.out.println ("not adding unmarshal field.." + jf.getJavaName ());
}
}
}
COM: <s> add a vector of jfields to an xml descriptor </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.