__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/5403629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt( int row, int column ) {
switch( column ) {
case 0:
return ((Issue)vecTableData.elementAt( row )).getNumber();
case 1:
return ((Issue)vecTableData.elementAt( row )).getTitle();
default:
System.err.println( getClass() + ".getValueAt() :: Invalid column number: " + column );
return null;
}
}
COM: <s> returns the value at the specified row column </s>
|
funcom_train/51610296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String executeBlock(String block) {
Vector<SimpleScriptParser.ScriptLine> lines;
try {
lines = (new SimpleScriptParser(new StringReader(block))).parse();
String s = ""; //Script: " + Integer.toString(lines.size()) + " lines";
for(int i=0; i<lines.size();i++)
s = s + executeLine(lines.get(i));
return s;
} catch(ParseException e) {
return e.getMessage();
} catch(Error e) {
return e.getMessage();
}
}
COM: <s> executes the block of the scripting language </s>
|
funcom_train/47506612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Property readProperty(Cursor pCursor) {
Property p = new Property();
p.setId(pCursor.getInt(pCursor.getColumnIndex(PropertyDb.FIELD_ID)));
p.setKey(pCursor.getString(pCursor.getColumnIndex(PropertyDb.FIELD_KEY)));
p.setValue(pCursor.getString(pCursor.getColumnIndex(PropertyDb.FIELD_VALUE)));
return p;
}
COM: <s> initialize a property from the database data </s>
|
funcom_train/24532570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String isCorrectObject(Object value) {
if (value == null)
if (!fIsCharacterClass)
return PropertysheetMessages.null_invalid_WARN_; // null is invalid for primitives
else
return null;
else if (fDataType.isInstance(value))
return null;
else
// TODO: Give a more descriptive error message when we're allowed to drop for NLS
// Not a valid instance of Character class
return JavaMessages.CellEditor_CharJava_InvalidMsg_ERROR_;
}
COM: <s> implement this method to verify if this is a good </s>
|
funcom_train/5474987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton3() {
if (jButton3 == null) {
jButton3 = new JButton();
jButton3.setText("Cancelar");
jButton3.setMnemonic(java.awt.event.KeyEvent.VK_A);
jButton3.setIcon(new ImageIcon(getClass().getResource("images/End24.gif")));
jButton3.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12));
jButton3.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
windowEventFrame(e);
}
});
}
return jButton3;
}
COM: <s> this method initializes j button3 </s>
|
funcom_train/37590257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void _addValue(T value) {
_data.add(value);
_tableModel.fireTableRowsInserted(_data.size()-1, _data.size()-1);
_table.getSelectionModel().setSelectionInterval(_data.size()-1,_data.size()-1);
notifyChangeListeners();
resizeTable();
}
COM: <s> add the value to the table update and resize it </s>
|
funcom_train/21890479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertPolygonToGraph(String aPolygon, String aGraph, boolean debug) {
FPolygon p = createPolygon(aPolygon);
Graph g = convertToGraph(p);
if (debug) {
//Display the polygon and the graph to see what's happened.
PolygonViewer.showPolygonViewer(p, g);
}
assertEquals(aGraph, g.toString());
}
COM: <s> checks that the polygon converts into the specified graph </s>
|
funcom_train/44665345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createNewReview(ReviewForm review){
String result = Consts.FORWARD_FILE_LIST;
try{
getReviewAccess().createReview(review);
PeerReview peerReview = createReviewFromForm(review);
getNotificationClient().notifyOfNewReview(peerReview,null);
}catch (NotificationException e){
logger.error("Error sending notification of new review.",e);
}
return result;
}
COM: <s> create a new review and send notification that the review was </s>
|
funcom_train/37422682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User findUserById(long pId)throws ClassNotFoundException, SQLException{
String tSql="select * from user where id_user="+Long.toString(pId);
Vector tVect = findUserByQuery(tSql);
if (tVect.size() > 0)
return (User) tVect.firstElement();
else
return null;
}
COM: <s> finds a user in the database </s>
|
funcom_train/50465058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Rectangle getOwnerRect() {
if (owner instanceof JWindow) {
return ((JWindow) owner).getRootPane().getBounds();
} else if (owner instanceof JFrame) {
return ((JFrame) owner).getRootPane().getBounds();
} else {
return null;
}
}
COM: <s> get the rectangle dimensions of the owners content area </s>
|
funcom_train/44497231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSequence idiv(ResultSequence arg) throws DynamicError {
XSDouble val = (XSDouble) get_single_type(arg, XSDouble.class);
if(val.zero())
throw DynamicError.div_zero(null);
return ResultSequenceFactory.create_new(new XSInteger((int) (double_value() / val.double_value()) ));
}
COM: <s> mathematical integer division operator between this xsdouble and the supplied result sequence </s>
|
funcom_train/16944103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCalendario() {
GridLayout gridLayout1 = new GridLayout();
gridLayout1.makeColumnsEqualWidth = true;
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.CENTER;
gridData.horizontalSpan = 2;
gridData.grabExcessHorizontalSpace = true;
gridData.verticalAlignment = GridData.CENTER;
calendario = new DateTime(composite, 1024 | 2048);
calendario.setLayoutData(gridData);
calendario.setLayout(gridLayout1);
}
COM: <s> this method initializes calendario </s>
|
funcom_train/39406178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OSSpinner getJTextFieldIOD() {
if (OSSpinnerIOD == null) {
OSSpinnerIOD = new OSSpinner(0,0,60,0.1,1,false);
OSSpinnerIOD.setEnabled(false);
OSSpinnerIOD.setToolTipText(getMainFrame().getI18N().translate("Oogdruk"));
OSSpinnerIOD.addFocusListener(new FocusStyle());
OSSpinnerIOD.setBorder(new LineBorder(this.defaultLineColor, 1));
OSSpinnerIOD.addFocusListener(ApplicationConstants.REFRACTION_STYLE_IOD);
OSSpinnerIOD.addKeyListener(ApplicationConstants.REFRACTION_STYLE_IOD);
}
return OSSpinnerIOD;
}
COM: <s> this method initializes osspinner iod </s>
|
funcom_train/3412926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int result = 0;
result = (supportsAlpha ? 2 : 3) +
(isAlphaPremultiplied ? 4 : 5) +
pixel_bits * 6 +
transparency * 7 +
numComponents * 8;
if (nBits != null) {
for (int i = 0; i < numComponents; i++) {
result = result + nBits[i] * (i + 9);
}
}
return result;
}
COM: <s> returns the hash code for this color model </s>
|
funcom_train/49455993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCommenter(Db db, int modifier) throws Exception {
_logger.debug("RaciVulnerability - addCommenter");
rdb = new RaciDb();
rdb.setDb(db);
RACI raci = rdb.getRaci(modifier, getRaciObjectId());
if (raci == null) {
raci = new RACI();
raci.setC(true);
raci.setUserId(modifier);
raci.setRaciObjectId(getRaciObjectId());
rdb.addRaci(raci, modifier);
} else {
raci.setC(true);
rdb.updateRaci(raci, modifier, null);
}
}
COM: <s> add the persons who have made comments as c in the vulnerability </s>
|
funcom_train/8165759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OutputStream getOutputStream(String path) throws IOException {
int dirLength = path.lastIndexOf("/");
// Create directories
if(dirLength != -1) {
File directory = new File(path.substring(0, dirLength));
directory.mkdirs();
}
// Create file
File file = new File(path);
file.createNewFile(); // Create new file
return new FileOutputStream(path);
}
COM: <s> convert requested output file path into output stream </s>
|
funcom_train/2883070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void bindNameAndClassname(Prim prim) throws SmartFrogResolutionException, RemoteException {
assert prim != null : "no prim parameter";
name = prim.sfResolve(nameRef, name, true);
className = prim.sfResolve(classNameRef, className, true);
}
COM: <s> bind the name and classname parameters </s>
|
funcom_train/45077165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidUser(byte[] moniker) {
UserData aUser = new UserData();
aUser.userSD = new SessionData();
aUser.userSD.moniker = moniker;
aUser = lookupUser(aUser, null, USE_MONIKER);
if (debug) System.out.println("TransUserList: isValidUser: "+ aUser);
if (aUser != null) return true;
else return false;
}
COM: <s> check to see if this moniker represents a user in the user list </s>
|
funcom_train/29391684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean putTask(ScheduleTask task) {
String taskId = task.task.getJobName();
if ( scheduledTasks.containsKey(taskId) ) {
ScheduleTask existingTask = scheduledTasks.get(taskId);
if ( null != existingTask ) existingTask.refresh(task);
return false;
} else {
scheduledTasks.put(taskId, task);
try {
task.schedule();
} catch (Exception ex) {
SchedulerLog.l.fatal(ex);
}
return true;
}
}
COM: <s> a task is added to the timer </s>
|
funcom_train/12551065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unhighlightNode(char c) {
//Get the node's index
int my_index = translateCharIndex(c);
//If the node isn't activated, we shouldn't change it.
if(!my_nodeset[my_index].isActivated()) return;
//Toggle the node's highlighting
my_nodeset[my_index].setUnhighlighted();
}
COM: <s> function unhighlight node </s>
|
funcom_train/9877754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSelectionText() {
infoText = "<html><body><font size = 5><b><u><center>Locus Selection List</center></u></b></font>";
infoText += "<center>Use <b>shift-left-click</b> on a locus arrow to add to the list.<br>";
infoText += "Number of Loci in the List: <b>"+this.model.getRowCount()+"</b></center></body></html>";
infoPane.setText(infoText);
infoPane.setCaretPosition(0);
}
COM: <s> updates the information text to reflect list changes row count </s>
|
funcom_train/9364599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearCache(boolean includeDiskFiles) {
// Note: this really needs to be a static method as it clears cache for all
// WebView. But we need mWebViewCore to send message to WebCore thread, so
// we can't make this static.
mWebViewCore.sendMessage(EventHub.CLEAR_CACHE,
includeDiskFiles ? 1 : 0, 0);
}
COM: <s> clear the resource cache </s>
|
funcom_train/31357430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readLine() throws Exception {
// Variables
String line = "";
if (isAlive() == true) {
try {
String s = fromEngine.readLine();
// System.out.println("fromEngine.readLine(): " + s);
return s;
// read a line from the engine and return it
// return fromEngine.readLine();
} catch (Exception e) {
throw new EngineIOException("Read from engine failed");
}
} else {
throw new EngineFailureException(cme);
}
} // readLine()
COM: <s> reads a line from the engine </s>
|
funcom_train/36534418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSegmentNum(int segmentID) {
int segmentNum = 0;
try {
String selectStatement = "SELECT SegmentNum FROM roadsegment WHERE SegmentID=?;";
PreparedStatement pstmt = con.prepareStatement(selectStatement);
pstmt.setInt(1, segmentID);
ResultSet result = pstmt.executeQuery();
while (result.next()) {
segmentNum = result.getInt(1);
}
result.close();
pstmt.close();
} catch(SQLException sqle) {
System.out.println(sqle);
}
return segmentNum;
}
COM: <s> gets the number of a segment given its database assigned id </s>
|
funcom_train/40853443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reader getReader() {
Reader f;
// Normal case: real file to parse
if (isFile) {
try {
f = new FileReader(file);
} catch (IOException e) {
errors.add(new ConstraintsError(
filename, 0, "Can't open \"" + filename + "\"."
));
return null;
}
}
// Test case: reading through a file
else {
f = new StringReader(file);
}
return f;
}
COM: <s> returns the reader to read through while parsing </s>
|
funcom_train/31740676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
threadPool = this;
db = Database.getDatabase();
threadList = new LinkedList();
closed = false;
for (int i = 0; i < numThreads; i++) {
new WorkerThread().start();
}
futureTasks = new TreeMap();
futureTaskThread = new FutureTaskThread(futureTasks);
futureTaskThread.start();
}
COM: <s> initialize the thread pool </s>
|
funcom_train/7311001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Site getSite() {
Definition owner = getOwner();
if (owner == null) {
return null;
} else if (owner == this) {
throw new IllegalStateException("Circular definition: " + getName() + " owns itself");
} else {
return owner.getSite();
}
}
COM: <s> returns the site containing this definition </s>
|
funcom_train/33296771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasMessages() {
assertTrue(this.notification.hasMessages(Message.Type.ERROR));
assertTrue(this.notification.hasMessages(Message.Type.WARNING));
assertTrue(this.notification.hasMessages(Message.Type.INFO));
assertTrue(this.notification.hasMessages());
}
COM: <s> test of has messages method of class net </s>
|
funcom_train/32824883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleClass(IResourceDelta delta, IResource resource) {
// If this is a library class, it will be handled elsewhere
if (!isLibraryResource(libraryPaths, resource)) {
// Collect up the changes so they
// can be submitted all at once
switch (delta.getKind()) {
case IResourceDelta.ADDED:
case IResourceDelta.CHANGED:
addedOrChangedClasses.add(resource);
break;
case IResourceDelta.REMOVED:
removedClasses.add(resource);
break;
}
}
}
COM: <s> handle a change in a class </s>
|
funcom_train/18273528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(ActionMapping mapping, HttpServletRequest request) {
try {
super.reset(mapping, request);
UserService userService = new UserServiceImpl();
request.setAttribute(WebKeys.USER_LIST, userService.getUsers());
addBtn = null;
} catch (ServiceException e) {
logger.error(e);
}
}
COM: <s> resets form and sets user list into the request </s>
|
funcom_train/18727866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAmp(final int amp) {
this.groupAmp = amp;
if (amp == 0) {
return;
}
final Integer amplitude = amp;
for (JaxoObject ob : getObjectList()) {
JaxoObjectUtils.setParameter(ob, "amp", Integer.TYPE, amplitude, false);
}
}
COM: <s> sets the group amp property of this group object </s>
|
funcom_train/36230764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getArea() {
double area = 0.0;
for (int i = 0; i < getNumInnerPoly(); i++) {
BasePolygon p = getInnerPoly(i);
double tarea = p.getArea() * (p.isHole() ? -1.0 : 1.0);
area += tarea;
}
return area;
}
COM: <s> return the area of the polygon in square units </s>
|
funcom_train/18896484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLexicalForm() {
// Create the default format string
String formatString = "'---'dd";
if (hasTimeZone) {
formatString += "'Z'";
}
// Create a formatter to parse the date
SimpleDateFormat formatter = new SimpleDateFormat(formatString);
// Apply the formatting
return formatter.format(day.getTime());
}
COM: <s> convert the g day representation to a lexical string as defined by xsd </s>
|
funcom_train/2878216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int appendPath(String ref) {
if (!(containsKey(PATH)) || (get(PATH) == null)) {
put(PATH, new StringBuffer(ref));
} else {
((StringBuffer) get(PATH)).append(ref);
}
return ((StringBuffer) get(PATH)).length();
}
COM: <s> appends the path information </s>
|
funcom_train/3170842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSwitchedOffBy(RegionDelta delta) {
return (match(delta.before())) && (!(match(delta.after())));
/*
udanax-top.st:66203:Filter methodsFor: 'filtering'!
{BooleanVar} isSwitchedOffBy: delta {RegionDelta}
"Whether the change switches the state of the filter from on to off. (I.E. Whether the old region was inside the filter and the new region outside.)"
^(self match: delta before) and: [(self match: delta after) not]!
*/
}
COM: <s> whether the change switches the state of the filter from on to off </s>
|
funcom_train/10500092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sort(List/*<ResourceWithFlags>*/ l) {
Collections.sort(l, new Comparator/*<ResourceWithFlags>*/() {
public int compare(Object o1, Object o2) {
ResourceWithFlags r1 = (ResourceWithFlags) o1;
ResourceWithFlags r2 = (ResourceWithFlags) o2;
return r1.getName().compareTo(r2.getName());
}
});
}
COM: <s> sorts the list of resources to add </s>
|
funcom_train/3373330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected View getView() {
if (!validateIfNecessary()) {
return null;
}
Object lock = lock();
try {
View rootView = getRootView();
Element e = getElement();
int start = e.getStartOffset();
if (rootView != null) {
return getView(rootView, e, start);
}
return null;
} finally {
unlock(lock);
}
}
COM: <s> returns the view corresponding to this element info or null </s>
|
funcom_train/21437377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ResidueType createYCleavage() {
ResidueType ret = new ResidueType();
ret.name = "#ycleavage";
ret.description = "Y Cleavage";
ret.superclass = "cleavage";
ret.composition = "H2O";
ret.can_redend = false;
ret.can_parent = true;
ret.updateMolecule();
return ret;
}
COM: <s> create a y cleavage type </s>
|
funcom_train/41563127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFundamental() {
return type.isPrimitive()
|| String.class.isAssignableFrom(type)
|| Date.class.isAssignableFrom(type)
|| Integer.class.isAssignableFrom(type)
|| Long.class.isAssignableFrom(type)
|| BigInteger.class.isAssignableFrom(type)
|| BigDecimal.class.isAssignableFrom(type)
|| Byte.class.isAssignableFrom(type)
|| Short.class.isAssignableFrom(type)
|| Character.class.isAssignableFrom(type)
|| Double.class.isAssignableFrom(type)
|| Float.class.isAssignableFrom(type)
;
}
COM: <s> informs if the instrospected type is fundamental </s>
|
funcom_train/50296987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void associateConnection(Object connection) throws ResourceException {
if (!connectionSharing)
disassociateConnections();
try {
((AbstractConnection) connection).setManagedConnection(this);
connectionHandles.add(connection);
} catch (ClassCastException cce) {
throw new FBResourceException(
"invalid connection supplied to associateConnection.", cce);
}
}
COM: <s> used by the container to change the association of an application level </s>
|
funcom_train/15627213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxUndoStates(final int maxUndoStates) {
this.maxUndoStates = maxUndoStates;
if (maxUndoStates > 0) {
for (final UndoModel<G, A, R> undoModel : undoModels.values()) {
undoModel.trimToSize(maxUndoStates);
}
}
}
COM: <s> sets the maximum number of undo states saved for each map </s>
|
funcom_train/3292628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getHostName( String hostname ) {
// if hostname == ipaddress, try to get a hostname for it
// ------------------------------------------------------
String hn = null;
if( hostname != null && !hostname.equals("")) {
try {
hn = InetAddress.getByName( hostname ).getHostName();
} catch( UnknownHostException e ) {
hn = hostname;
}
} else {
hn = hostname;
}
return hn;
}
COM: <s> determine the host name of a passed ip address or host name </s>
|
funcom_train/31296619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean raise() {
for (int index = 0; index < activeState.length; index++) {
activeState[index]++;
if (activeState[index] >= terminals.length) {
// rollover, reset actual value to 0
activeState[index] = 0;
if (index == activeState.length - 1) {
// uh oh overflow
overflow = true;
}
} else {
// no rollover, break ;
break;
}
}
return !overflow;
}
COM: <s> permutate one further </s>
|
funcom_train/17788319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
for (int l = 0; l < states.length; l++) {
for (int r = 0; r < states[l].length; r++){
for (int c = 0; c < states[l][r].length; c++) {
states[l][r][c] = (int) 0;
tagTree[l][r][c] = (int) 0;
}
}
}
}
COM: <s> sets the code state code and code tag tree code internal </s>
|
funcom_train/1385507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JXTable getTblDDT() {
if (tblDDT == null) {
try {
modelloDdtCarico = new DdtCaricoModel();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
tblDDT = new JXTable(modelloDdtCarico);
DBManager.getIstance().addDBStateChange(modelloDdtCarico);
TableColumn col = tblDDT.getColumnModel().getColumn(0);
col.setMinWidth(0);
col.setMaxWidth(0);
col.setPreferredWidth(0);
}
return tblDDT;
}
COM: <s> this method initializes tbl ddt </s>
|
funcom_train/17492009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassInfo lookupClass(String cname) throws ClassNotFoundException {
if (classPool.contains(cname)) { return classPool.get(cname); }
try {
return new JavaClassInfo(context.lookupClass(cname, null));
} catch (TreeCompiler.PseudoError e) {
return e.getClassInfo();
}
}
COM: <s> loads the class info that match the given name in the source file </s>
|
funcom_train/27714396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getPrevSiblingElement(int nodeIndex) {
int siblingIndex = fDeferredDocumentImpl.getPrevSibling(nodeIndex, false);
while (siblingIndex != -1) {
if (fDeferredDocumentImpl.getNodeType(siblingIndex, false) == Node.ELEMENT_NODE) {
return siblingIndex;
}
siblingIndex = fDeferredDocumentImpl.getPrevSibling(siblingIndex, false);
}
return -1;
}
COM: <s> returns the previous sibling element of the specified node </s>
|
funcom_train/5593845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVersion() {
System.out.println("testVersion");
sender.version();
assertEquals("VERSION", bufferToString());
sender.version("*.chatservs.com");
assertEquals("VERSION *.chatservs.com", bufferToString());
}
COM: <s> test of version method of class net </s>
|
funcom_train/27806119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void MakePapersPanel() {
papersPanel = new JPanel();
papersPanelScroll = new JScrollPane(papersPanel);
papersPanelScroll
.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
papersPanelScroll
.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
// papersPanelScroll.setBackground(new Color(20,20,20));
papersPanelScroll.setPreferredSize(new Dimension(800, 100));
MakePapersButtons();
// this.papersPanelScroll.add(this.papersPanel);
// this.papersPanelScroll.setVisible(true);
}
COM: <s> creates a panel to shown all papers </s>
|
funcom_train/48664269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getVarName(String id, int index) {
// is it a valid identifier and not a java keyword?
if (id == null ||
!identifierPattern.matcher(id).matches() ||
javaKeywordsPattern.matcher(id).matches()) {
id = "r" + index;
}
return id;
}
COM: <s> there will be one variable for each resource of the function </s>
|
funcom_train/22127063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void advanceWorkflow() throws ZKWorkflowRuntimeException {
/*
* if we're inactive, we can't advance the workflow. Send an exception so we're
* forced to deactivate our children.
*/
if (wAction == null) {
throw new ZKWorkflowRuntimeException("inactive trigger can't advance a workflow");
}
/*
* send wAction as a payload of an onAction event to the workflow
*/
Events.postEvent("onAction", workflowComponent, wAction);
/*
* deactivate
*/
deactivate();
}
COM: <s> the trigger component must explicitly invoke this method when the user event is </s>
|
funcom_train/24257430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(ByteBuffer data) {
for (int i = 0; i < offsets.length; i++) {
if (isLongFormat()) {
offsets[i] = data.getInt();
} else {
offsets[i] = 2 * ( 0xFFFF & (int) data.getShort());
}
}
}
COM: <s> initialize this structure from a byte buffer </s>
|
funcom_train/11104079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBindingType(String bindingType) {
if (bindingType != null
&& (bindingType.equals(BINDING_TYPE_METHOD)
|| bindingType.equals(BINDING_TYPE_VALUE)
|| bindingType.equals(BINDING_TYPE_EARLY)
|| bindingType.equals(BINDING_TYPE_NONE))) {
this.bindingType = bindingType;
} else {
this.bindingType = null;
}
}
COM: <s> p sets a string that indicates the binding type for the attribute </s>
|
funcom_train/18325662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSupplierRolePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Association_supplierRole_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Association_supplierRole_feature", "_UI_Association_type"),
CoremodelPackage.Literals.ASSOCIATION__SUPPLIER_ROLE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the supplier role feature </s>
|
funcom_train/29267087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasicSelect() {
Table table = getBasicTable();
SelectStatement selectStatement = table.getSelectStatement();
SQLGenerator generator = getSQLGenerator();
generator.setLineTerminator("\n");
String s = generator.getQuery(selectStatement);
assertEquals("SELECT MyIndex, MyName, MyDate FROM MySchema.MyTable", s);
}
COM: <s> p basic test for creating a code select code statement </s>
|
funcom_train/51646636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node nodeByLine(final int line) throws BadLocationException {
/*
* Works for any binary search tree.
*/
int remaining= line;
int offset= 0;
Node node= fRoot;
while (true) {
if (node == null)
fail(line);
if (remaining == node.line)
break;
if (remaining < node.line) {
node= node.left;
} else {
remaining -= node.line + 1;
offset += node.offset + node.length;
node= node.right;
}
}
return node;
}
COM: <s> returns the node line with the given line number </s>
|
funcom_train/17900610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ComponentPanel getPanelCacheObject(Component component) {
if (componentPanels == null || componentPanels.size() == 0) {
return null;
}
for (int i = 0, k = componentPanels.size(); i < k; i++) {
ComponentPanel object = componentPanels.get(i);
if (object.getComponent() == component) {
return object;
}
}
return null;
}
COM: <s> returns the cache object containing the specified </s>
|
funcom_train/50759247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endBatch() {
runTimer.stop();
if (metrics) {
runTimer.show(getRunTitle() + " run");
threadTimer.show(getRunTitle() + " thread");
getAudioPlayer().showMetrics();
long totalMemory = Runtime.getRuntime().totalMemory();
LOGGER.info
("Memory Use : "
+ (totalMemory - Runtime.getRuntime().freeMemory()) / 1024
+ "k of " + totalMemory / 1024 + "k");
}
}
COM: <s> ends a batch of utterances </s>
|
funcom_train/5232479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertTextAtCaret(String prefix){
if(textField!=null && textField.getText()!=null){
StringBuilder sb = new StringBuilder(textField.getText());
if(textField.getSelectedText() != null){
sb.replace(textField.getSelectionStart(), textField.getSelectionEnd(), prefix);
}else{
int position = textField.getCaretPosition();
sb.insert(position, prefix);
}
textField.setText(sb.toString());
}
}
COM: <s> insertion of the prefix string at the caret position </s>
|
funcom_train/4178951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyTestSuiteElement(final TestSuite suite) {
Validate.notNull(suite, "The test suite cannot be null.");
Xpp3Dom element = suites.get(suite.hashCode());
if (element == null) {
element = new Xpp3Dom("testsuite");
suites.put(suite.hashCode(), element);
}
writeAttributes(element, suite);
writeOutput(element, suite);
}
COM: <s> creates or updates the xml element for the specified </s>
|
funcom_train/27754827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void install(BaseEditor baseEditor, IFoldingReciever reciever) {
fBaseEditor = baseEditor;
fReciever = reciever;
fBaseEditor.addRegionHandler(fHandler,
fBaseEditor.getParserFactory().getHRCParser().getRegion("def:EmbeddedTag"));
fBaseEditor.addEditorListener(fHandler);
}
COM: <s> installs this builder over specified base editor </s>
|
funcom_train/25492800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RoadEdge getOutEdge(RoadNode node) {
RoadEdge edge = null;
Iterator<RoadEdge> it = outEdges.iterator();
while (it.hasNext()) {
RoadEdge temp = it.next();
if ((temp.nodeA==this && temp.nodeB==node) || (temp.nodeB==this && temp.nodeA==node)) {
edge = temp;
break;
}
}
return edge;
}
COM: <s> returns the outgoing road which starts here and ends at the specified intersection </s>
|
funcom_train/34420971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processWorkItemRequest(String aWorkItemID) {
setContentType();
try {
ItemCollection workItem = simpleWorkflowManager
.getWorkItem(aWorkItemID);
if (workItem != null) {
if ("html".equals(sFormat))
printWorkItemHTML(workItem);
else if ("xml".equals(sFormat))
printWorkItemXML(workItem);
else
printWorkItemText(workItem);
} else {
// workitem not found
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
}
} catch (Exception e) {
out.println("ERROR:");
e.printStackTrace(out);
}
}
COM: <s> this method posts a work item reqeust the method print the output depending </s>
|
funcom_train/49651105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getReceivedString() {
if (receivedString == null) {//GEN-END:|69-getter|0|69-preInit
// write pre-init user code here
receivedString = new StringItem("", "cos", Item.PLAIN);//GEN-LINE:|69-getter|1|69-postInit
// write post-init user code here
}//GEN-BEGIN:|69-getter|2|
return receivedString;
}
COM: <s> returns an initiliazed instance of received string component </s>
|
funcom_train/39879126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAltitude(double defaultValue) {
double altitude = getAttributeDouble(TAG_GPS_ALTITUDE, -1);
int ref = getAttributeInt(TAG_GPS_ALTITUDE_REF, -1);
if (altitude >= 0 && ref >= 0) {
return (double) (altitude * ((ref == 1) ? -1 : 1));
} else {
return defaultValue;
}
}
COM: <s> return the altitude in meters </s>
|
funcom_train/25753812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(DitaBosMember bosMember) throws BosException {
try {
if (rewriteLocalUris(bosMember)) {
// Do whatever needs to be done to react to pointer
// rewriting, such as updating content within a CMS
// or writing new files
}
} catch (AddressingException e) {
throw new BosException("Addressing exception rewriting URIs: " + e.getMessage(), e);
}
}
COM: <s> handles dita bos members in order to do pointer rewriting </s>
|
funcom_train/18376191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importClass(String className) {
int pos = className.lastIndexOf('.');
String simpleName = className.substring(pos + 1);
try {
Class result = getClass(className);
importClass(simpleName, result);
} catch (Exception e) {};
}
COM: <s> method import class </s>
|
funcom_train/10179701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doRedirect(String url) throws JspException {
HttpServletResponse response =
(HttpServletResponse) pageContext.getResponse();
try {
response.sendRedirect(url);
} catch (IOException e) {
TagUtils.getInstance().saveException(pageContext, e);
throw new JspException(e.getMessage());
}
}
COM: <s> redirect to the given url converting exceptions to jsp exception </s>
|
funcom_train/41165916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(ToExercise2Group entity) {
EntityManagerHelper.log("saving ToExercise2Group instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved to exercise2 group entity </s>
|
funcom_train/36737178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SqlLib getLib(String resource) throws SqlLibraryRuntimeException {
SqlLib lib = null;
if(libraries.containsKey(resource)) {
lib = (SqlLib)libraries.get(resource);
}
else {
Reader reader = ReaderUtils.returnReaderFromResource(resource);
if(reader != null) {
lib = getLib(resource, reader);
libraries.put(resource, lib);
}
if(lib==null) {
throw new SqlLibraryRuntimeException("Submitted resource "+resource+" did not create a valid library");
}
}
return lib;
}
COM: <s> returns an already instanciated library from the libraries map for </s>
|
funcom_train/4530096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o == null) {
return false;
}
if (this == o) {
return true;
}
if (!(o instanceof FileStatus)) {
return false;
}
FileStatus other = (FileStatus)o;
return this.getPath().equals(other.getPath());
}
COM: <s> compare if this object is equal to another object </s>
|
funcom_train/28974389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("PUGSoap".equals(portName)) {
setPUGSoapEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/1165211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status destroyFavorite(long id) throws WeiboException {
// return new Status(http.post(getBaseURL() + "favorites/destroy/" + id + ".xml", true), this);
return new Status(http.post(getBaseURL() + "favorites/destroy/" + id + ".json", true));
}
COM: <s> un favorites the status specified in the id parameter as the authenticating user </s>
|
funcom_train/40943946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface Container {
/**
* Registers a new action handler for this container
*
* @param actionHandler
* the new handler to be added.
*/
public void addActionHandler(Action.Handler actionHandler);
/**
* Removes a previously registered action handler for the contents of
* this container.
*
* @param actionHandler
* the handler to be removed.
*/
public void removeActionHandler(Action.Handler actionHandler);
}
COM: <s> interface implemented by all components where actions can be registered </s>
|
funcom_train/51717535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String B_F_ASCII() {
if (libelle) {
return "classique : 0x30 0x31=>01";
}
String result = "";
for (int i = Offset; i < Offset + taille; i++) {
if (buffer[i] < 32) {
result = result + ".";
} else {
result = result + (char) buffer[i];
}
}
return result;
}
COM: <s> return string value of the buffer byte </s>
|
funcom_train/16451270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadTranslations(Element translationsElement) {
List translationElements = translationsElement.getChildren("translation");
//iterate over all the translations
Iterator i = translationElements.iterator();
while(i.hasNext()) {
Element translationElement = (Element)i.next();
String translation = translationElement.getAttributeValue("name");
//add the loaded translation
bibleStudy.addTranslation(translation);
}
}
COM: <s> this function loads all the saved translations from the textfile </s>
|
funcom_train/48184926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printLfAlts() {
for (List<Alt> altSet : edgeFactory.lfAlts) {
for (Alt alt : altSet) {
out.print("alt[" + alt.altSet + "." + alt.numInSet + "]: ");
out.println(Edge.toString(alt.bitset));
}
}
out.flush();
}
COM: <s> prints the lf alternatives </s>
|
funcom_train/37740174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNewValueShort () {
if (getNewValue() == null) {
return null;
}
if (getNewValue().length() <= 30) {
return getNewValue();
} else {
return getNewValue().substring(0, 27) + "...";
}
}
COM: <s> get the start of the new value </s>
|
funcom_train/1029140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug24360() throws Exception {
if (!versionMeetsMinimum(5, 0)) {
return;
}
Connection c = null;
Properties props = new Properties();
props.setProperty("useServerPrepStmts", "true");
try {
c = getConnectionWithProps(props);
this.pstmt = c.prepareStatement("SHOW PROCESSLIST");
this.pstmt.setFetchSize(5);
this.pstmt.execute();
} finally {
closeMemberJDBCResources();
if (c != null) {
c.close();
}
}
}
COM: <s> tests fix for bug 24360 </s>
|
funcom_train/5897710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(String type) {
if (!isValid(type))
throw new UiException("Type must be one of the following: " +
"pie, line, bar, column, stackbar, stackcolumn");
if (!Objects.equals(_type, type)) {
_type = type;
invalidate(); // Always redraw
}
}
COM: <s> sets the type of chart </s>
|
funcom_train/44882794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void afterPhase(PhaseEvent arg0) {
// after the view is restored we can trigger an aquire resource in all
// connected datamodels
PhaseModelHolder modelHolder = (PhaseModelHolder) FacesUtils
.getManagedBean("phaseModelHolder");
Iterator it = modelHolder.getPhaseModelMap().keySet().iterator();
while (it.hasNext()) {
IPhaseDataModel element = (IPhaseDataModel) it.next();
element.aquireResources();
}
}
COM: <s> we use the after restore view phase in our example to signal the </s>
|
funcom_train/3613092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRowCount() {
int result = 0;
final Iterator it = columns.iterator();
while (it.hasNext()) {
final Column column = (Column) it.next();
if (column.getRows() > result) {
result = column.getRows();
}
}
return result;
}
COM: <s> returns the number of data rows in the table </s>
|
funcom_train/5021782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshWidgets() {
if (hasChanges()) {
Display display = ViewUtil.getDisplay();
display.asyncExec(new Runnable() {
public void run() {
for (XProcessWidget xProcessWidget : getPropertyFieldValues()) {
xProcessWidget.refresh();
}
}
});
}
}
COM: <s> refresh all xprocess widgets </s>
|
funcom_train/22048550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVersionStr() {
String tTemp = "";
tTemp = "" + (iVersionNumber / 10000000) + ".";
tTemp = tTemp + ( (iVersionNumber % 10000000) / 100000) + ".";
tTemp = tTemp + ( (iVersionNumber % 100000) / 1000) + ".";
tTemp = tTemp + (iVersionNumber % 1000);
return tTemp;
}
COM: <s> returns the version number as a string </s>
|
funcom_train/2488619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoad() {
String propertiesFileString = "key1=value1\r\nkey2=value2\r\n";
ByteArrayInputStream bais = new ByteArrayInputStream(
propertiesFileString.getBytes());
testObject.load(bais);
assertEquals("Not the correct value", "value1", testObject.getProperty("key1"));
assertEquals("Not the correct value", "value2", testObject.getProperty("key2"));
}
COM: <s> test to load from an code input stream code </s>
|
funcom_train/16707300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyObject( Object connList ) throws Exception {
CosignConnectionList cosignConnectionList = (CosignConnectionList)connList;
if ( log.isInfoEnabled() ) {
log.info( "[" + cosignConnectionList.getCosignConListId() + "]: destroying cosign connection list" );
}
cosignConnectionList.close();
}
COM: <s> this method closes all the cosign connections associated with </s>
|
funcom_train/40399829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getServerStatus() throws ServerCommunicationException {
Socket socket = new Socket();
InetSocketAddress endPoint =
new InetSocketAddress( getRemoteIp(), getRemotePort() );
if ( endPoint.isUnresolved() ) {
throw new ServerCommunicationException( "Unable to resolve: "
+ getRemoteIp() );
}
try {
socket.connect( endPoint, 5000 );
} catch ( IOException e ) {
throw new ServerCommunicationException( e );
} finally {
try {
socket.close();
} catch ( IOException ioe ) {
// Whatever.
}
}
return null;
}
COM: <s> returns the server status from the server </s>
|
funcom_train/18550458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProjectTO getProjectObject(ProjectTO pto, boolean isLazyLoad) throws BusinessException{
ProjectTO response = null;
try {
response = (ProjectTO)dao.getProjectById(pto, isLazyLoad);
} catch (DataAccessException e) {
throw new BusinessException(e);
}
return response;
}
COM: <s> get a specific project object from data base </s>
|
funcom_train/44477782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getObject(Model g) {
if (this.subUri != null)
return g.createURI(this.subUri);
if (this.valueLang != null)
return g.createLanguageTagLiteral(this.value, this.valueLang);
if (this.valueTypeUri != null)
return g.createDatatypeLiteral(this.value, this.valueTypeUri);
return g.createPlainLiteral(this.value);
}
COM: <s> returns rdf object in given graph </s>
|
funcom_train/3025234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getTreeCellRendererComponent(JTree p0, Object p1, boolean p2, boolean p3, boolean p4, int p5, boolean p6) {
return delegate.getTreeCellRendererComponent(p0, p1, p2, p3, p4, p5, p6);
}
COM: <s> gets the tree cell renderer component attribute of the </s>
|
funcom_train/33588767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextField_POLineRef() {
if (jTextField_POLineRef == null) {
jTextField_POLineRef = new JTextField();
jTextField_POLineRef.setColumns(35);
jTextField_POLineRef.setBounds(100, 120, 439, 19);
}
return jTextField_POLineRef;
}
COM: <s> this method initializes j text field5 </s>
|
funcom_train/26464573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int valueToMarkerPosition(double value) {
int v;
if (getOrientation() == HORIZONTAL) {
v = getWidth();
} else {
v = getHeight();
}
int w = (int) ((v - getMarkerLength()) * (value - getScaleStart()) / (getScaleEnd() - getScaleStart()));
if (w < 0) {
return 0;
}
if (w > v - getMarkerLength()) {
return v - getMarkerLength();
}
return w;
}
COM: <s> converts a value to a marker position </s>
|
funcom_train/41187593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimpleXHtmlPDFWin createShellWin() {
try {
createTmpDirectory();
} catch(Exception e) {
e.printStackTrace();
}
setAdobePath();
shell.setSize(510, 210);
shell.setLocation(180, 250);
final GridLayout layout = new GridLayout();
layout.numColumns = 2;
shell.setLayout(layout);
this.addWidgets();
shell.setText("Quick Convert HTML to PDF Tool");
shell.open();
return this;
}
COM: <s> implementation routine create shell win </s>
|
funcom_train/35353370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InvocationInterceptor getInvocationInterceptor(StoredProcedure proc) {
InvocationInterceptor interceptor = (InvocationInterceptor) CacheManager.getClassFromCache(proc.invocationInterceptor());
if (interceptor == null) {
try {
interceptor = (InvocationInterceptor) proc.invocationInterceptor().newInstance();
CacheManager.putClassToCache(interceptor);
} catch (Exception e) {
throw new StoredProcedureInvocationException("Exception obtaining interceptor for stored procedure", e);
}
}
return interceptor;
}
COM: <s> obtains defined invocation interceptor </s>
|
funcom_train/50872840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetElements() {
OMApplication application = new OMApplication();
application.addElement(new OMInteger("1"));
application.addElement(new OMSymbol("a","b"));
assertTrue(application.getElements().size() == 2);
}
COM: <s> test of get elements method of class omapplication </s>
|
funcom_train/24532734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyAttributeSettings(EObject target, EStructuralFeature feature, List values) {
if (!isDead()) {
CompoundCommand buildUp = null;
if (applyRules)
buildUp = propertyAdds(target, feature, values, buildUp);
if (buildUp == null)
super.applyAttributeSettings(target, feature, values);
else {
buildUp.append(internalApplyAttributeSettings(target, feature, values));
internalAppend(buildUp);
}
}
}
COM: <s> add values to end of feature </s>
|
funcom_train/25828368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void storeMemories(List<PerceptionEvent> perceptionEvents) {
if (this.agentMemory != null) {// if an agentMemory is set
List<AtomicEvent> atomicEvents = new ArrayList<AtomicEvent>(
this.internalEvents);
atomicEvents.addAll(perceptionEvents);
this.agentMemory.storeMemories(atomicEvents, this.currentSimulationStep);
}
} // storeMemories
COM: <s> store the perception events in the memory if exists </s>
|
funcom_train/2615804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean between(Date date, Date start, Date end) {
boolean result = false;
if (((date.after(start) || date.equals(start))) && ((date.before(end) || date.equals(end))) && (!end.before(start))) {
result = true;
}
return result;
}
COM: <s> method that checks if a date is between bounds included other two date </s>
|
funcom_train/8553390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(Size constraint) {
min = constraint.min();
max = constraint.max();
if (min < 0) throw new ValidationException("Min cannot be negative");
if (max < 0) throw new ValidationException("Max cannot be negative");
if (max < min) throw new ValidationException("Max cannot be less than Min");
}
COM: <s> configure the constraint validator based on the elements </s>
|
funcom_train/34339591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getArt1() {
if (art1 == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
art1 = new TextField("Art1", null, 5, TextField.NUMERIC);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return art1;
}
COM: <s> returns an initiliazed instance of art1 component </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.