__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/14520268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ICAAdminSessionLocal getCaAdminSession() {
if(caadminsession == null){
try{
ICAAdminSessionLocalHome caadminsessionhome = (ICAAdminSessionLocalHome)getLocator().getLocalHome(ICAAdminSessionLocalHome.COMP_NAME);
caadminsession = caadminsessionhome.create();
}catch(Exception e){
throw new EJBException(e);
}
}
return caadminsession;
} //getCaAdminSession
COM: <s> gets connection to ca admin session bean </s>
|
funcom_train/31658734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String urlEncode(String uri){
StringTokenizer st = new StringTokenizer(uri,":/?=&#",true);
uri = "";
while(st.hasMoreTokens()){
String token = st.nextToken();
if(token.equals(":") || token.equals("/") || token.equals("?") ||
token.equals("=") || token.equals("&") || token.equals("#")){
uri += token;
}else{
try{
uri += URLEncoder.encode(token,"UTF-8");
}catch(UnsupportedEncodingException exc){}
}
}
return uri;
}
COM: <s> encodes a uri using the standard mechanism for uris </s>
|
funcom_train/29715270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readLine(StringBuffer key, StringBuffer value, Reader stream) {
char c;
try {
//Read key until delimiter or end of file
while (true) {
c = (char) stream.read();
if (c == '%') {
return -1;
}
if (c == ':') {
break;
}
key.append(c);
}
//Read value until end of line
while (true) {
c = (char) stream.read();
if (c == '\n') {
break;
}
value.append(c);
}
} catch (IOException e) {
e.printStackTrace();
}
return 1;
}
COM: <s> reads a line from the language file and then splits it into </s>
|
funcom_train/33847245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAuxClasspath(Path src) {
boolean nonEmpty = false;
String[] elementList = src.list();
for (String anElementList : elementList) {
if (!anElementList.equals("")) {
nonEmpty = true;
break;
}
}
if (nonEmpty) {
if (auxClasspath == null) {
auxClasspath = src;
} else {
auxClasspath.append(src);
}
}
}
COM: <s> the auxclasspath to use </s>
|
funcom_train/5524640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String shortcut ()
{ if (CharKey.equals("none")) return "";
String s=CharKey.toUpperCase();
if (Alt) s=Global.name("shortcut.alt")+" "+s;
if (Control) s=Global.name("shortcut.control")+" "+s;
if (Shift) s=Global.name("shortcut.shift")+" "+s;
if (CommandType>0)
s=Keyboard.commandShortcut(CommandType)+" "+s;
return s;
}
COM: <s> compute a visible shortcut to append after the menu items like </s>
|
funcom_train/39456878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class safeGetClass(String name) throws ClassNotFoundException, NotSerializableException {
Class clazz = Class.forName(name, false, this.getClass().getClassLoader());
if (clazz.isPrimitive()) {
return clazz;
}
if (!Serializable.class.isAssignableFrom(clazz)) {
throw new NotSerializableException("Cannot unmarshal instance of class which does not implement java.io.Serializable: " + name);
}
return clazz;
}
COM: <s> prevents security problems by only loading classes that we should be </s>
|
funcom_train/2915604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fullBuild(final IPath projectPath) {
waitForAutoBuild();
checkAssertion("a workspace must be open", fIsOpen); //$NON-NLS-1$
try {
getProject(projectPath).build(IncrementalProjectBuilder.FULL_BUILD, null);
} catch (final CoreException e) {
handle(e);
}
fWasBuilt = true;
}
COM: <s> batch builds a project </s>
|
funcom_train/18033591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int searchAscending(final N aKey) {
final int tmpLength = length;
if (tmpLength != myDelegate.length) {
final Number[] tmpArray = new Number[tmpLength];
for (int i = INT_ZERO; i < tmpLength; i++) {
tmpArray[i] = this.get(i);
}
return Arrays.binarySearch(tmpArray, aKey);
} else {
return myDelegate.searchAscending(aKey);
}
}
COM: <s> asssumes you have first called </s>
|
funcom_train/21057846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsRef(T object) {
//go through all the elements of this ArrayList
for (T t : this) {
//if the current object refers to the same object as the given one, then return true without continuing
if (object==t) return true;
}
//if the object is not found
return false;
}
COM: <s> returns whether the given object is contained in the list or not </s>
|
funcom_train/46780368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BigInteger getBigIntRecordGroup(DatabaseHandle dh, long loc) {
byte[] groupBytes = dh.getRecordGroupBytes();
getBytes(dh, loc, groupBytes, 0, recordGroupByteLength);
BigInteger v = bigIntRecordGroup(groupBytes, 0);
dh.releaseBytes(groupBytes);
return v;
}
COM: <s> returns a record group as a big integer </s>
|
funcom_train/17529193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean areEqual(Set<Condition> cs1, Set<Condition> cs2) {
if (cs1 == null || cs2 == null) return false;
if (cs1.size()!= cs2.size()) return false;
for (Condition c1 : cs1) {
boolean flag = false;
for (Condition c2 : cs2) {
if (c1.equals(c2)) {
flag = true;
break;
}
}
if (!flag) return false;
}
return true;
}
COM: <s> check if two sets of conditions are equal </s>
|
funcom_train/2960748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void filterLTonVar(IntDomainVar vv0, IntDomainVar vv1) throws ContradictionException {
vv1.updateInf(vv0.getInf() - cste + 1, this, false);
vv1.updateSup(vv0.getSup() + cste - 1, this, false);
}
COM: <s> in case of a lt due to a modification on vv0 domain </s>
|
funcom_train/18479301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(Buffer buf) throws IOException {
byte[] image = consumeImage() ;
// Check if we've finished all the frames.
if (image == null) {
// We are done. Set EndOfMedia.
buf.setEOM(true);
buf.setOffset(0);
buf.setLength(0);
ended = true;
return;
}
buf.setData(image);
buf.setOffset(0);
buf.setLength(image.length) ;
buf.setFormat(format);
buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
}
COM: <s> this is called from the processor to read a frame worth </s>
|
funcom_train/18859957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramLink_target_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramLink_target_feature", "_UI_DiagramLink_type"),
VisualizerPackage.eINSTANCE.getDiagramLink_Target(),
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the target feature </s>
|
funcom_train/9279785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCreateTableStatement() {
return hasPrimaryKey()
? "create table t1 (id int primary key, a int, b int, c varchar(5000))"
: "create table t1 (id int, a int, b int, c varchar(5000))";
}
COM: <s> returns the string for creating the table </s>
|
funcom_train/23319961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int rowIndex, int columnIndex) {
Object val=null;
if(model == null || rowIndex>=model.getChallengers().length||rowIndex<0){
return val;
}
ChallengerData chl = model.getChallengers()[rowIndex];
switch(columnIndex){
case 0:
val = ""+chl.getNumber();
break;
case 1:
val = chl.getFirstName();
break;
case 2:
val = chl.getLastName();
break;
case 3:
val = chl.getCategory();
break;
case 4:
val = chl.getClub();
break;
case 5:
val = chl.getComment();
break;
}
return val;
}
COM: <s> returns the element contained at the specified index the hashmap is converted </s>
|
funcom_train/40729919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int start, int end) {
checkWidget();
for (int i = end; i >= start; i--) {
if (i < 0 || i > items.size() - 1) {
SWT.error(SWT.ERROR_INVALID_RANGE);
}
GridItem item = (GridItem) items.get(i);
item.dispose();
}
redraw();
}
COM: <s> removes the items from the receiver which are between the given </s>
|
funcom_train/16676964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setControlOverview() {
activeRobot.setTextForLocaleKey("StatusBar.gui.multipleRobots"); //$NON-NLS-1$
hint.setTextForLocaleKey("StatusBar.gui.operateMultipleRobots"); //$NON-NLS-1$
voltage.setText(""); //$NON-NLS-1$
inOutStatus.setText(""); //$NON-NLS-1$
connStatus.setText(""); //$NON-NLS-1$
battpic.setImage(null);
layout( );
}
COM: <s> sets the status bar for the case that the c </s>
|
funcom_train/3771732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncludesfile(String includesfile) {
if (includesfile != null && includesfile.length() > 0) {
File incl = project.resolveFile(includesfile);
if (!incl.exists()) {
log("Includesfile "+includesfile+" not found.",
Project.MSG_ERR);
} else {
readPatterns(incl, includeList);
}
}
}
COM: <s> sets the name of the file containing the includes patterns </s>
|
funcom_train/24234020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void flush() throws InterruptedException{
if(!active)return;
final long seqNo=sender.getCurrentSequenceNumber();
if(seqNo<0)throw new IllegalStateException();
while(!sender.isSentOut(seqNo)){
Thread.sleep(5);
}
if(seqNo>-1){
//wait until data has been sent out and acknowledged
while(active && !sender.haveAcknowledgementFor(seqNo)){
sender.waitForAck(seqNo);
}
}
//TODO need to check if we can pause the sender...
//sender.pause();
}
COM: <s> will block until the outstanding packets have really been sent out </s>
|
funcom_train/40613627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setNullRow() {
state = NULL_ROW;
current = table.getNullRow();
currentSearchRow = current;
if (nestedJoin != null) {
nestedJoin.visit(new TableFilterVisitor() {
public void accept(TableFilter f) {
f.setNullRow();
}
});
}
}
COM: <s> set the state of this and all nested tables to the null row </s>
|
funcom_train/23056765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuBar createMenuBar(BarProvider provider)
{
if ( logger.isDebugEnabled() )
{
logger.debug("entering createMenuBar(BarProvider)");
}
JMenuBar bar = new JMenuBar();
if ( logger.isDebugEnabled() )
{
logger.debug("exiting createMenuBar(BarProvider)");
}
return this.createMenuBar(provider, null);
}
COM: <s> create a new jmenu bar according to bar provider </s>
|
funcom_train/11751964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void next() {
if (this.objects != null && !this.objects.isEmpty()) {
int oldCurrent = this.currentRecord;
if (this.currentRecord == this.objects.size() - 1) {
this.currentRecord = 0;
}
else {
this.currentRecord++;
}
this.current = this.objects.get(this.currentRecord);
firePropertyChange(PROP_CURRENT_RECORD, new Integer(oldCurrent), new Integer(this.currentRecord));
}
}
COM: <s> scrolls through the abstract object list cycling back to the start once the </s>
|
funcom_train/43103889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numRows() {
int rtn=0;
try {
// go to the last record
results.last();
// if no records exist then the count is 0
if(results == null ) {
return 0;
}
// get the record number for the last row and store it
rtn = results.getRow();
// set the cursor at the top again
results.first();
} catch (SQLException e) {
e.printStackTrace();
}
// send back the number
return rtn;
}
COM: <s> finds the number of rows in results stored in the connection </s>
|
funcom_train/1421072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadBackgroundTexture(final MapModel mapModel, final boolean showBackground) {
if (showBackground && mapModel.getBackgroundFile() != null) {
builder.delete(0, builder.length());
builder.append(MAPS_FOLDER).append(mapModel.getMapCode()).append(FILE_SEPARATOR).append(IMAGES_FOLDER).append(mapModel.getBackgroundFile());
mAtlas1.insert(mBackgroundTexture = new Texture(builder.toString()));
}
}
COM: <s> load background texture in a separated atlas </s>
|
funcom_train/8847486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void savePropertyFile() {
try {
propFile.store(new FileOutputStream(new File(settingsPath+"1upmodrcon.properties")), "Property File for 1up ModRcon");
}
catch (Exception e) {
JOptionPane.showMessageDialog(parent, "Error saving property file, if you changed\n"
+ "settings then they have not been saved.", "Error", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> saves the properties file </s>
|
funcom_train/2903874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initNormal(String p){
if(p.compareTo("normal-highlight") == 0){
part = 34;
}
else if(p.compareTo("normal-grayout") == 0){
part = 35;
}
else if(p.compareTo("normal-pressed-highlight") == 0){
part = 36;
}
else if(p.compareTo("normal-pressed-grayout") == 0){
part = 37;
}
}
COM: <s> normal button texture </s>
|
funcom_train/39849200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _mouseClicked(MouseEvent e) {
TableColumnModel columnModel = table.getColumnModel();
int viewColumn = columnModel.getColumnIndexAtX(e.getX());
int column = table.convertColumnIndexToModel(viewColumn);
int clicks = e.getClickCount();
if(clicks >= 1 && column != -1) {
columnClicked(column, clicks);
}
}
COM: <s> when the mouse is clicked this selects the next comparator in </s>
|
funcom_train/46458842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFade(double fade) {
Double prev = new Double(this.fade);
this.fade = Math.min(Math.abs(fade), 1);
support.firePropertyChange("fade", prev, new Double(fade)); //$NON-NLS-1$
}
COM: <s> sets the fade </s>
|
funcom_train/25148461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MsxTask fetchTaskById(String id) throws Exception {
Item item = Item.bind(es, new ItemId(id));
if (item instanceof Task){
Task serverTask = (Task)item;
//convert serverTask to MsxTask
TaskConvertor convertor = new TaskConvertor(es);
return convertor.convertToTask(serverTask);
}
return null;
// Task serverTask = (Task)getItemById(id);
// //convert serverTask to MsxTask
// TaskConvertor convertor = new TaskConvertor(es);
// return convertor.convertToTask(serverTask);
}
COM: <s> retrieve msx task from exchange server </s>
|
funcom_train/3091004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawSelectedLevel(Graphics g) {
if (selectedLevel != -1) {
int x=model.getLevelCoord(selectedLevel+1);
int y=model.getNodeCoord(model.getLeaves().length);
g.setColor(model.getHiLiteColor());
g.fillRect(x,0,2*zoom,y);
}
}
COM: <s> draw a box to indicate which level has been hovered over </s>
|
funcom_train/36147685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Character nextCharacter() {
String str = readString();
if (str == null || "".equals(str)) {
return null;
}
char sep1 = StringUtils.nextCharacterSeparator(getBuffer().getDelimiter());
StringTokenizer stk = new StringTokenizer(str, sep1);
stk.next();
String value = stk.next();
return (Character) getObject(Character.class.getName(), value, sep1);
}
COM: <s> gets the next character object </s>
|
funcom_train/27720212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String user, String pass) {
try {
model.connect(user, pass);
}
catch (Exception e) {
String nuh = "connect!~connect@irc2msn";
view.send(nuh, "PRIVMSG #MSN :Error connecting to MSN: "+e.getMessage());
}
}
COM: <s> connect to the network with the given username and password </s>
|
funcom_train/25365715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPlaceenemyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RoomEvent_placeenemy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_placeenemy_feature", "_UI_RoomEvent_type"),
LeveleditorPackage.Literals.ROOM_EVENT__PLACEENEMY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the placeenemy feature </s>
|
funcom_train/24516554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CSTable getBracket(int idx) {
assert this.brackets != null :
"brackets is null while accessing " + BracketRequest.PREFIX + idx;
assert idx < this.brackets.length :
"index out of bounds while accessing " + BracketRequest.PREFIX + idx;
assert idx >= 0 :
"index out of bounds while accessing " + BracketRequest.PREFIX + idx;
return this.brackets[idx];
}
COM: <s> returns a bracket </s>
|
funcom_train/10906702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDFStructTreeRoot makeStructTreeRoot(PDFParentTree parentTree) {
PDFStructTreeRoot structTreeRoot = new PDFStructTreeRoot(parentTree);
getDocument().assignObjectNumber(structTreeRoot);
getDocument().addTrailerObject(structTreeRoot);
getDocument().getRoot().setStructTreeRoot(structTreeRoot);
return structTreeRoot;
}
COM: <s> creates and returns a struct tree root object </s>
|
funcom_train/9700499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeGenerator(IGeneratedClassBuilder builder) {
try {
builder.generatorInPlugin(getFirstElement("generator").getAttribute("inPlugin").getBooleanValue()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (DataConversionException e) {
logger.logWarning(e);
}
builder.generator(getFirstElement("generator").getTextTrim()); //$NON-NLS-1$
}
COM: <s> initialize the jetemplate in the model from the xml file </s>
|
funcom_train/46760289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RecordItemTypeModel getRecordItemType(final long recordItemTypeId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return ClinicalData.getRecordItemType(recordItemTypeId, chain, call);
}}; return (RecordItemTypeModel) call(method, call);
}
COM: <s> same transaction return the single record item type model for the primary key </s>
|
funcom_train/27837961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processSaveAs(String fileName) {
String result = umlvm.storeAsString();
if (fileName == null || "".equals(fileName)) {
Umlvm.trace.print(result);
return;
}
try {
FileWriter fw = new FileWriter(fileName);
BufferedWriter writer = new BufferedWriter(fw);
writer.write(result);
writer.close();
} catch (IOException ex) {
Umlvm.err.println("Error during storing repository file: " +
fileName + ":" + ex.toString());
}
}
COM: <s> write umlvm xml repository format to a file </s>
|
funcom_train/37740972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WfProcess container() throws RemoteException {
if (procCache == null) {
try {
procCache = procDir().lookupProcess
(uniqueKey.managerName(), uniqueKey.processKey());
} catch (InvalidKeyException e) {
throw (IllegalStateException)
(new IllegalStateException()).initCause(e);
} catch (RemoteException e) {
procDirCache = null;
throw e;
}
}
return procCache;
}
COM: <s> returns the code wf process code that this activity is a part </s>
|
funcom_train/33814822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConsumption(Consumption aConsumption) throws Exception {
if(aConsumption!=null)
{
if(consumptions!=null && consumptions.size()>0)
{
if(aConsumption.getTime().after(consumptions.get(consumptions.size()-1).getTime()))
consumptions.add(aConsumption);
else
throw new Exception("New consumption is not chronologically ordered"+
"after the existing consumptions");
}
else
{
consumptions=new ConsumptionStore();
consumptions.add(aConsumption);
}
}
}
COM: <s> adds the consumption passed as parameter to the users code consumption store code </s>
|
funcom_train/37233599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateObject(Session ses, Object obj, String id) throws ServiceException {
try {
ses.update(obj, id);
ses.flush();
ses.connection().commit();
} catch (Exception e) {
try {
ses.connection().rollback();
} catch (Exception ex) {
e.printStackTrace();
}
log.error("Error storing object :" + obj.getClass(), e);
throw new ServiceException(e);
}
}
COM: <s> update an object in the database </s>
|
funcom_train/22066032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumHttpRequestLogs() throws ServletException {
LogManager logManager = getLogManager();
if ( logManager == null )
throw new ServletException("LogManager not found!");
try {
return logManager.getNumHTTPRequestLogs();
} catch ( LoggingException e ) {
throw new ServletException(e.getMessage(), e);
} //end try
} //end getNumHttpRequestLogs
COM: <s> retrieves number of logged http requests </s>
|
funcom_train/50497299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeOldElements() {
if (historyMilliseconds > 0) {
boolean older = true; // Assume there are older elements
long threshold = System.currentTimeMillis() -
historyMilliseconds;
while (older && (heapSummaries.size() > 0)) {
HeapSummaryRecord record = getHeapSummary(0);
if (record.getRecordTimeMillis() < threshold) {
heapSummaries.remove(0);
} else {
older = false; // Bail
}
}
}
}
COM: <s> remove any elements in the list that are older than </s>
|
funcom_train/34628433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTreeControl(Composite parent) {
dirTree = new Tree(parent, SWT.SINGLE | SWT.BORDER);
dirTree.setToolTipText(TexlipsePlugin.getResourceString("projectWizardDirTreeTooltip"));
dirTree.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
recreateSubTree();
}
COM: <s> create a directory tree settings box </s>
|
funcom_train/28158649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawMultiline(final Point[] points) {
if (points.length > 0) {
Point prev = points[0];
Point cur;
for (int i = 1; i < points.length; i++) {
cur = points[i];
drawLine(prev, cur);
prev = cur;
}
}
}
COM: <s> draw a freeform line defined by an array of points </s>
|
funcom_train/50505487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(Element config){
setName(config.getAttributeValue("name"));
Element srcElem = config.getChild("src");
Element targetElem = config.getChild("target");
if(srcElem!=null){
partners[0] = new RelationshipPartner(this,srcElem);
partners[1] = new RelationshipPartner(this,targetElem);
}
}
COM: <s> loads the relationships from a jdom element into this relationship </s>
|
funcom_train/15608924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long length(){
/*
long length = 0 ;
// length will be equal to the
// sum of all the exon ranges
System.out.println("length "+ length);
*/
SplicedRange sr = (SplicedRange)r.get(r.size()-1);
long length = sr.getEnd()+1;
return length;
}
COM: <s> return the length of this sequence </s>
|
funcom_train/32803127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStateLocation(IPath stateLocation) {
// precondition check
if (stateLocation == null) {
throw new IllegalArgumentException("Parameter 'stateLocation' was null."); //$NON-NLS-1$
}
this.stateLocation = stateLocation;
// activate options if necessary
if (activateOptionsPending) {
activateOptionsPending = false;
setFile(getFile());
activateOptions();
}
}
COM: <s> sets the state location </s>
|
funcom_train/50088201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void trim(IAtom atom, Molecule molecule) {
List<IBond> bonds = molecule.getConnectedBondsList(atom);
for (int i = 0; i < bonds.size(); i++) {
molecule.removeElectronContainer((IBond)bonds.get(i));
}
// you are erased! Har, har, har..... >8-)
}
COM: <s> removes all bonds connected to the given atom leaving it with degree zero </s>
|
funcom_train/3740822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean cancelEvent(Event event, User who_cancels) throws Exception {
sess=HibernateUtil.currentSession();
try {
boolean retVal = eman.cancelEvent(event, who_cancels);
log.info("cancelEvent(event, who_cancels)): uniewaznienie eventu przekazanego jako obiekt Event");
HibernateUtil.closeSession();
return retVal;
} catch (Exception e) {
HibernateUtil.closeSession();
throw e;
}
}
COM: <s> cancels existing event </s>
|
funcom_train/3389971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int _current() {
if (buf != null) {
return UTF16.charAt(buf, 0, buf.length, bufPos);
} else {
int i = pos.getIndex();
return (i < text.length()) ? UTF16.charAt(text, i) : DONE;
}
}
COM: <s> returns the current 32 bit code point without parsing escapes parsing </s>
|
funcom_train/18514184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void replicateDirectory(String srcdir, String dstdir) {
new File(dstdir).mkdir();
File fDir = new File(java.net.URLDecoder.decode(srcdir));
File[] files = fDir.listFiles();
try {
for (int i = 0; i < files.length; i++) {
if (files[i].isFile()) {
File dstFile = new File(dstdir + FS + files[i].getName());
copy(files[i], dstFile);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> replicates content of the install directory into the user home </s>
|
funcom_train/4283981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsEnforceablePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Domain_isEnforceable_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Domain_isEnforceable_feature", "_UI_Domain_type"),
QVTBasePackage.Literals.DOMAIN__IS_ENFORCEABLE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is enforceable feature </s>
|
funcom_train/24262182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOntologyTermN2() {
try {
ArrayList<OntologyTerm> results
= curationService.filterOntologyTerms(demoUser,
"",
"fires");
DisplayableListSorter<OntologyTerm> sorter
= new DisplayableListSorter<OntologyTerm>();
sorter.sort(results);
assertEquals(1, results.size());
assertEquals("www.ontologyabc.edu/fireman",
results.get(0).getNameSpace());
}
catch(MacawException exception) {
log.logException(exception);
fail();
}
}
COM: <s> term unspecified description match </s>
|
funcom_train/8362821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startsWith(int firstChar, String matchingString) throws IOException {
if (matchingString == null || matchingString.length() == 0) {
return false;
}
return matchingString != null &&
matchingString.length() > 0 &&
matchingString.charAt(0) == firstChar &&
startsWith( matchingString.substring(1) );
}
COM: <s> checks if sequence consisting of specified first character and following </s>
|
funcom_train/16767917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendSOCreationFailed(RTMPConnection conn, String name, boolean persistent) {
SharedObjectMessage msg = new SharedObjectMessage(name, 0, persistent);
msg.addEvent(new SharedObjectEvent(ISharedObjectEvent.Type.CLIENT_STATUS, "error", SO_CREATION_FAILED));
conn.getChannel(3).write(msg);
}
COM: <s> create and send so message stating that a so could not be created </s>
|
funcom_train/46747030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocationRef(DisplayModel locationRef) {
if (Converter.isDifferent(this.locationRef, locationRef)) {
DisplayModel oldlocationRef= new DisplayModel(this);
oldlocationRef.copyAllFrom(this.locationRef);
this.locationRef.copyAllFrom(locationRef);
setModified("locationRef");
firePropertyChange(String.valueOf(APPOINTMENTINSTANCES_LOCATIONREFID), oldlocationRef, locationRef);
}
}
COM: <s> location of this appointment </s>
|
funcom_train/42765637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ITreeSelection getTreeSelection() {
IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
// Receiving selected elements and their paths from Project Explorer
IViewPart projectExplorer = activePage.findView(ID_PROJECT_EXPLORER);
ITreeSelection select = (ITreeSelection) projectExplorer.getSite().getWorkbenchWindow().getSelectionService().getSelection();
return select;
}
COM: <s> override this method and optional </s>
|
funcom_train/29806339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mkdirs() throws SmbException {
SmbFile parent;
try {
parent = new SmbFile( new URL( null, getParent(), Handler.SMB_HANDLER ));
} catch( IOException ioe ) {
return;
}
if( parent.exists() == false ) {
parent.mkdirs();
}
mkdir();
}
COM: <s> creates a directory with the path specified by this tt smb file tt </s>
|
funcom_train/8631819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRow() throws SQLException {
try {
debugCodeCall("getRow");
checkClosed();
int rowId = result.getRowId();
if (rowId >= result.getRowCount()) {
return 0;
}
return rowId + 1;
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> gets the current row number </s>
|
funcom_train/35488982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean recieveMessage(IPacket m1) {
IWirelessPacket m = (IWirelessPacket)m1;
IMessage msg = new Message(s.getMessageInitData());
s.assignMessage(mot, msg);
msg.setType(EMessageType.DATA);
msg.setDest(m.getDest());
/* ISendCallback action = m.getOnSendAction();
if (action != null) {
action.run(msg);
m.removeOnSendAction();
} */
msg.setData(m);
return sendMessage(msg);
}
COM: <s> message recieve wrapper </s>
|
funcom_train/38995454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String dumpLitList(ArrayList<ELPLiteral> ll, String sep) {
if (ll == null)
return null;
if (ll.size() < 1)
return null;
String ret = ll.get(0).toString();
for (int i = 1; i < ll.size(); i++) {
ret +=sep+ll.get(i).toString();
}
return ret;
}
COM: <s> internal helper function to dump a list of literals </s>
|
funcom_train/31625913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transition getPermissionManagerTransition(final RowSecuredDBObject obj) {
Transition trans = new Transition("permit", PermissionController.class, PermissionController.PROMPT_EDIT_PERMS);
trans.addParam(PermissionController.KEY_FIELD_VALUES, obj.getKey());
trans.addParam(PermissionController.OBJ_TYPE, obj.getClass().getName());
return trans;
}
COM: <s> retrieve the permission transition for the row secured dbobject </s>
|
funcom_train/3332054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getImagePath(IMarker marker) {
String iconPath = "icons/";//$NON-NLS-1$
int markerNumber = getMarkerNumber(marker);
if (markerNumber >= 0) {
return iconPath + "quickmark" + markerNumber + ".gif"; //$NON-NLS-1$//$NON-NLS-2$
}
return null;
}
COM: <s> returns the relative path for the image to be used for displaying an </s>
|
funcom_train/48351770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addNonAtomicBlocks(List<Integer> context, Set<Integer> nonAtomicBlockSet) {
ListIterator<Integer> it = context.listIterator(context.size());
while (it.hasPrevious()) {
it.previous(); // ignore count
Integer iid = it.previous();
// Do not mark it if we have previously marked it
if (allBlocks.contains(iid) && !vcNonAtomicBlocks.contains(iid) && !algoNonAtomicBlocks.contains(iid))
nonAtomicBlockSet.add(iid);
}
}
COM: <s> marks all the blocks in the given context as </s>
|
funcom_train/29419061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String debugExtractKInput() {
if (solved)
return TranslateKodkodToJava.convert(getSingleFormula(1), bitwidth, kAtoms, bounds, atom2name);
else
return TranslateKodkodToJava.convert(getSingleFormula(1), bitwidth, kAtoms, bounds.unmodifiableView(), null);
}
COM: <s> returns the kodkod input used to generate this solution returns if unknown </s>
|
funcom_train/11344626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getMissingHandlers() {
List list = new ArrayList();
for (int i = 0; i < m_requiredHandlers.size(); i++) {
RequiredHandler req = (RequiredHandler) m_requiredHandlers.get(i);
if (req.getReference() == null) {
list.add(req.getFullName());
}
}
return list;
}
COM: <s> computes the list of missing handlers </s>
|
funcom_train/43580260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getRadioPanel() {
if (radioPanel == null) {
radioPanel = new JPanel();
radioPanel.setLayout(null);
radioPanel.setBounds(new Rectangle(27, 31, 449, 65));
radioPanel.add(getProxyRadioButton(), null);
radioPanel.add(getNoProxyRadioButton(), null);
}
return radioPanel;
}
COM: <s> this method initializes radio panel </s>
|
funcom_train/46825347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Game (String gameKey, int minNumOfPlayers, int maxNumOfPlayers) {
this.gameKey = gameKey;
// Create new list of users and list of tables
userList = new UserList ();
tableList = new TableList ();
// Set min / max number of players
this.minNumOfPlayers = minNumOfPlayers;
this.maxNumOfPlayers = maxNumOfPlayers;
}
COM: <s> constructor to a game object </s>
|
funcom_train/50871688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateObject() {
if(getProperty()==null){
System.out.println("Checkbox:property must be set");
return false;
}
if(getDisplayText()==null){
System.out.println("Checkbox:displayText must be set");
return false;
}
if(!InputField.requiredBoolean(getDefaultValue())){
System.out.println("Checkbox:defaultValue must be true or false");
return false;
}
if(!InputField.optionalBoolean(getForce())){
System.out.println("Checkbox:defaultValue must be true or false or null");
return false;
}
return true;
}
COM: <s> used by check config to validate the configuration file </s>
|
funcom_train/18319419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void z1(StateMachineContext context) throws CommonException {
ThreadInfo ti = (ThreadInfo)context.getEventContext().getParameter(Params.Event.THREAD_INFO);
Position p = (Position)context.getEventContext().getParameter(Params.Event.POSITION);
SMThread thread = (SMThread)threads.get(ti);
thread.suspendedOnBreakpoint(p);
}
COM: <s> suspended on breakpoint </s>
|
funcom_train/32746671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFastGoalFor() {
int min = 999;
MatchEvent me;
Enumeration enum = goals_.elements();
while(enum.hasMoreElements()) {
me = (MatchEvent)enum.nextElement();
if(!me.getPlayer1().isPlayer(Player.OPPONENT)) {
min = me.getMin();
break;
}
}
return min;
}
COM: <s> the minute of the fastest goal for </s>
|
funcom_train/31304246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editCommand() {
try {
setBusy();
new RDescriptionView( getSession(), this, (Long)getTable().getSelectedItem()).runWindow( null );
setReady();
} catch (Exception e) {
showExceptionDialog( getDesc("error"),getDesc("modify_descview_err"),e, false );
}
}
COM: <s> execution of the modify command </s>
|
funcom_train/7427067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
XYArray ps = null;
try {
ps = (XYArray) super.clone();
ps.points = initPoints(ps.points, numPoints, points);
ps.numPoints = numPoints;
}
catch (final CloneNotSupportedException e) {
// wow, this is terrible.
}
return ps;
}
COM: <s> returns a clone of this xyarray ensuring a deep copy of coordinates is </s>
|
funcom_train/22034709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getMaximumSize() {
if (orientation == HORIZONTAL) {
return new Dimension(Integer.MAX_VALUE, 6);
}
else if (orientation == VERTICAL) {
return new Dimension(6, Integer.MAX_VALUE);
}
else {
return new Dimension(0, 0);
}
}
COM: <s> gets the dividers maximum size </s>
|
funcom_train/2957171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int staticInsert(final int ind, final E o) {
ensureStaticCapacity(nStaticObjects++);
System.arraycopy(staticObjects, ind, staticObjects, ind + 1, nStaticObjects - ind);
staticObjects[ind] = o;
return nStaticObjects - 1;
}
COM: <s> insert an object in the array of static object </s>
|
funcom_train/39864610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getString(int offset, int maxLength) {
int index = offset;
int lastIndex = index + maxLength;
while (index < lastIndex && (buffer[index] != 0)) {
index++;
}
return new String(buffer, offset, index - offset, Charsets.ISO_8859_1);
}
COM: <s> get a string from the buffer at the offset given </s>
|
funcom_train/39914087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLabel8() {
System.out.println("getLabel8");
Page1 instance = new Page1();
Label expResult = null;
Label result = instance.getLabel8();
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 get label8 method of class timesheetmanagement </s>
|
funcom_train/30009215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAuthor() {
System.out.println("addAuthor");
Author author = null;
Document instance = new Document();
int expResult = 0;
int result = instance.addAuthor(author);
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 add author method of class papyrus </s>
|
funcom_train/4106213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand() {
if (okCommand == null) {//GEN-END:|19-getter|0|19-preInit
// write pre-init user code here
okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|19-getter|1|19-postInit
// write post-init user code here
}//GEN-BEGIN:|19-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/9663034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GridDataModel getSubgridModel(int rowNumber, int columnNumber) throws IllegalArgumentException {
delegate.checkRowNumber(rowNumber, delegate.getTotalRowCount());
delegate.checkColumnNumber(columnNumber, delegate.getTotalColumnCount());
return associatedSubgrids.get(
new SubgridKey(delegate.getInternalRowIdentifier(rowNumber), columnNumber)
);
}
COM: <s> this method gets a subgrid model associated with the specified cell </s>
|
funcom_train/40769031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String binb2str(int[] bin) {
String str = "";
int mask = (1 << chrsz) - 1;
for (int i = 0; i < bin.length * 32; i += chrsz) {
str += (char) ((bin[i >> 5] >>> (32 - chrsz - i % 32)) & mask);
}
return str;
}
COM: <s> convert an array of big endian words to a string </s>
|
funcom_train/17471450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePool(AddressPoolEntity addressPoolEntity, String issuerServer){
System.out.println("Upldate local AddressPool due to change message received from: " + issuerServer + ", Address: " + addressPoolEntity);
getPool().put(addressPoolEntity.getAddress().getHostAddress(), addressPoolEntity);
}
COM: <s> use this method with caution </s>
|
funcom_train/22524161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Control createControl(final Composite parent) {
CCombo = new CCombo(parent, style);
CCombo.setVisibleItemCount(10);
CCombo.setEnabled(true);
CCombo.setItems(input.toArray(new String[0]));
CCombo.addDisposeListener(
new DisposeListener() {
public void widgetDisposed(DisposeEvent event) {
dispose();
}
});
CCombo.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
performSelectionChanged();
}
});
return CCombo;
}
COM: <s> creates the control </s>
|
funcom_train/13943175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Songs sample(int n) throws Exception {
// random sample
long[] sample = new long[n];
// copy songs
Songs temp = new Songs();
if (n < this.size()) {
RandomSampler.sample(n, this.size()-1, n, 0, sample, 0, null);
for (int i = 0; i < n; i++) {
temp.add(this.get((int) sample[i]));
}
} else {
temp.addAll(this);
}
return temp;
}
COM: <s> get random sample of n songs </s>
|
funcom_train/44881958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTags(AbstractJavaEntity metadata, Collection tagNames) {
List al = new ArrayList();
for (Iterator iter = tagNames.iterator(); iter.hasNext();) {
al.addAll(Arrays.asList(metadata.getTagsByName((String) iter.next())));
}
return al;
}
COM: <s> provide combined list of all the tags with given tag names </s>
|
funcom_train/14190756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CellView getNextSelectableViewAt(CellView current, double x, double y) {
CellView[] selectables = getJGraph().getGraphLayoutCache().getMapping(
getJGraph().getSelectionModel().getSelectables(), false);
return getNextViewAt(selectables, current, x, y);
}
COM: <s> note arguments are not expected to be scaled they are scaled in here </s>
|
funcom_train/3099146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serviceIRCTransaction(String from, String hostmask, String command, String destination,String params) {
if ( hostmask.startsWith(ircNick) )
return;
if ( command.equalsIgnoreCase("PRIVMSG") )
servicePublicMessage(from, hostmask, destination, params.trim());
}
COM: <s> process an irc transaction </s>
|
funcom_train/1908898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow() {
//add the key
JTextField keyComp = new JTextField("", JLabel.TRAILING);
JTextField valueComp = new JTextField("", JLabel.TRAILING);
componentKey.add(keyComp);
add(keyComp);
componentValue.add(valueComp);
add(valueComp);
//update the panel
layoutPanel();
}
COM: <s> adds an empty row to the list no text in row components </s>
|
funcom_train/25809236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Serializable disassemble(Object value) throws HibernateException {
// also safe for mutable objects
Object deepCopy = deepCopy(value);
if (!(deepCopy instanceof Serializable)) {
throw new SerializationException(
String.format("deepCopy of %s is not serializable", value), null);
}
return (Serializable) deepCopy;
}
COM: <s> disassembles the object in preparation for serialization </s>
|
funcom_train/14011908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderRedirect(RenderContext rc, BrowserRedirectCommand command) {
ServerMessage serverMessage = rc.getServerMessage();
serverMessage.addLibrary(BROWSER_COMMAND_SERVICE.getId());
Element redirectElement = serverMessage.appendPartDirective(ServerMessage.GROUP_ID_POSTUPDATE,
"EchoBrowserCommand.MessageProcessor", "redirect");
redirectElement.setAttribute("uri", command.getUri());
}
COM: <s> renders a code browser redirect command code </s>
|
funcom_train/12708001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClassJavaDoc() {
// Start of first javadoc
int p1 = this.m_source.indexOf("/**");
int p2 = this.m_source.indexOf("*/", p1);
// Have we found existing javadoc ?
if ((p1 >= 0) && (p2 >= 0)) {
// Yes, strip it
return m_source.substring(p1, p2 + 2);
}
return null;
}
COM: <s> get the class level java doc of the analyzed source code </s>
|
funcom_train/35627606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getChildByName(String uri, String name) {
for (int i = 0; i < nchildren; i++) {
Object e = children[i];
if ((e.getClass() != String.class)
&& ((Element) e).name.equals(name)
&& (uri == null || ((Element) e).uri.equals(uri))) { return (Element) e; }
}
return null;
}
COM: <s> return the first child having the given name and namespace </s>
|
funcom_train/8685172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement(String tag, AttributeList attrs) throws SAXParseException {
if (tag.equals("project")) {
new ProjectHandler(helperImpl, this).init(tag, attrs);
} else {
throw new SAXParseException("Config file is not of expected "
+ "XML type", helperImpl.locator);
}
}
COM: <s> handles the start of a project element </s>
|
funcom_train/13275694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modifySelectedFurniture() {
if (!Home.getFurnitureSubList(this.home.getSelectedItems()).isEmpty()) {
new HomeFurnitureController(this.home, this.preferences,
this.viewFactory, this.contentManager, this.undoSupport).displayView(getView());
}
}
COM: <s> controls the modification of selected furniture </s>
|
funcom_train/33598668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSendAudio() {
if (sendAudio == null) {//GEN-END:|57-getter|0|57-preInit
// write pre-init user code here
sendAudio = new Command("sendAudio", Command.OK, 0);//GEN-LINE:|57-getter|1|57-postInit
// write post-init user code here
}//GEN-BEGIN:|57-getter|2|
return sendAudio;
}
COM: <s> returns an initiliazed instance of send audio component </s>
|
funcom_train/29842943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllValuesForX(final Number x) {
if (x == null) {
throw new IllegalArgumentException("Null 'x' argument.");
}
final boolean savedState = this.propagateEvents;
this.propagateEvents = false;
for (int s = 0; s < this.data.size(); s++) {
final XYSeries series = (XYSeries) this.data.get(s);
series.remove(x);
}
this.propagateEvents = savedState;
this.xPoints.remove(x);
this.intervalDelegate.seriesRemoved();
fireDatasetChanged();
}
COM: <s> removes the items from all series for a given x value </s>
|
funcom_train/46663210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void progress(int diff) {
currentWork += diff;
int newStatusPercent;
if (allWork != 0)
newStatusPercent = 100 * currentWork / allWork;
else
newStatusPercent = 100;
if (newStatusPercent != statusPercent) {
statusPercent = newStatusPercent;
if (progressHandler != null)
progressHandler.onProgress(statusPercent);
}
}
COM: <s> increases the amount of work done in units </s>
|
funcom_train/32979328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getField(String str)
{ /* getField */
if(str==null)
return(null);
int idx= str.indexOf(keySeparator);
if(idx>=0)
return(str.substring(idx+1).trim());
else
return(str);
} /* getField */
COM: <s> get field helper routine for parsing header key </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.