__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50152101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int nextLogKey() throws SQLException {
PreparedStatement stmt = JdbcDB.getConnection().prepareStatement("SELECT MAX(id) FROM tasklog");
ResultSet r = stmt.executeQuery();
int maxKey = 0;
if (r.next())
maxKey = r.getInt(1);
r.close();
stmt.close();
return ++maxKey;
}
COM: <s> get the next log key </s>
|
funcom_train/22552909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWrongProtocolHost() {
CATCHER.endpoint = new ExtendedEndpoint("www.yahoo.com", 80);
RouterService.connect();
sleep();
assertEquals("unexpected successful connect", 0, CATCHER.connectSuccess);
assertGreaterThan("should have received failures", 0, CATCHER.connectFailures);
//assertEquals("should have received failure", 1, CATCHER.connectFailures);
}
COM: <s> test to make sure tests does not succeed with a host reporting </s>
|
funcom_train/23617174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setInitialCostValues() {
double fac = 0.55; // this setting is made so that an octave shift of
// 3 is only just selected
for(int i=0; i< co.length; i++) {
co[i].setName(Integer.toString((int)VAL[i]));
co[i].setValue(1.0 - Math.abs((i-EX)/(EX*1.0))*(1-fac));
}
}
COM: <s> the cost on the ends will be 0 </s>
|
funcom_train/42464362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendUrl(String url) {
if (url != null && url.length() > 0) {
StringItem urlItem = new StringItem(null, url + "\n", StringItem.HYPERLINK);
urlItem.setDefaultCommand(Commands.getUrlCommand());
urlItem.setItemCommandListener(BlyncClient.getMIDlet());
append(urlItem);
}
}
COM: <s> append a clickable url </s>
|
funcom_train/29710343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSystem(int system, int loc) {
for (int i = 0; i < getNumberOfCriticals(loc); i++) {
CriticalSlot ccs = getCritical(loc, i);
if (ccs != null && ccs.getType() == CriticalSlot.TYPE_SYSTEM
&& ccs.getIndex() == system) {
return true;
}
}
return false;
}
COM: <s> returns true if the the location has a system of the type </s>
|
funcom_train/1568639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(GLAutoDrawable gLDrawable) {
GL gl = gLDrawable.getGL();
gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
gl.glShadeModel(GL.GL_SMOOTH); // try setting this to GL_FLAT and see what happens.
}
COM: <s> called by the drawable immediately after the open gl context is </s>
|
funcom_train/13196482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearBoard() {
for (int i = 0; i < DCConstants.BOARDS; i++) {
for (int j = 0; j < DCConstants.FILES; j++) {
for (int k = 0; k < DCConstants.RANKS; k++) {
board[i][j][k] = null;
}
}
}
}
COM: <s> removes all the pieces from the board </s>
|
funcom_train/8077373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String result = "RegressionSplitEvaluator: ";
if (m_Classifier == null) {
return result + "<null> classifier";
}
return result + m_Classifier.getClass().getName() + " "
+ m_ClassifierOptions + "(version " + m_ClassifierVersion + ")";
}
COM: <s> returns a text description of the split evaluator </s>
|
funcom_train/43421654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getContentValues() {
Vector contentValues = new Vector();
contentValues.add(Translator.getTranslation("TASK_PRIORITY_0"));
contentValues.add(Translator.getTranslation("TASK_PRIORITY_1"));
contentValues.add(Translator.getTranslation("TASK_PRIORITY_2"));
return contentValues;
}
COM: <s> returns all available content values of priority filter </s>
|
funcom_train/8971873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User validateUser (String email, String password) {
for (User user : this.users) {
if (user.getEmail().equals(email) && user.getPassword().equals(password)) {
return user;
}
}
// If no users exist with given email and password, return null
return null;
}
COM: <s> goes through the user list and returns the user with the same email </s>
|
funcom_train/48261159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDelete() throws Exception {
System.out.println("delete");
String branchName = "";
BranchDAO instance = new BranchDAO();
instance.delete(branchName);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of delete method of class branch dao </s>
|
funcom_train/51099107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataNodeDefaults getDataNodePreferences() {
DataNode node = getCurrentDataNode();
if (node == null) {
throw new CayenneRuntimeException("No DataNode selected");
}
return (DataNodeDefaults) getPreferenceDomainForDataDomain().getDetail(
node.getName(),
DataNodeDefaults.class,
true);
}
COM: <s> returns preferences object for the current data map throwing an exception if no </s>
|
funcom_train/49199892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUrlPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExternalLink_url_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExternalLink_url_feature", "_UI_ExternalLink_type"),
ExhibitionPackage.Literals.EXTERNAL_LINK__URL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the url feature </s>
|
funcom_train/28755005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFactor(Long newVal) {
if ((newVal != null && this.factor != null && (newVal.compareTo(this.factor) == 0)) ||
(newVal == null && this.factor == null && factor_is_initialized)) {
return;
}
this.factor = newVal;
factor_is_modified = true;
factor_is_initialized = true;
}
COM: <s> setter method for factor </s>
|
funcom_train/3391475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeDeprecated(MethodDoc method) {
String output = ((TagletOutputImpl)
(new DeprecatedTaglet()).getTagletOutput(method,
writer.getTagletWriterInstance(false))).toString();
if (output != null && output.trim().length() > 0) {
writer.print(output);
}
}
COM: <s> write the deprecated output for the given method </s>
|
funcom_train/42904250 | /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 ("UVManagerSOAP".equals(portName)) {
setUVManagerSOAPEndpointAddress(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/22238398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer resolveAuthority(LSIDAuthority authority) {
final LSIDAuthority auth = authority;
final Integer reqID = getNextRequestID();
pool.addJob(new Runnable() {
public void run() {
try {
if (auth.isResolved())
listener.resolveAuthorityComplete(reqID,auth);
else {
LSIDAuthority result = LSIDResolver.resolveAuthority(auth);
listener.resolveAuthorityComplete(reqID,result);
}
} catch (LSIDException e) {
listener.requestFailed(reqID,e);
}
}
});
return reqID;
}
COM: <s> resolve the given authority against the host mappings table </s>
|
funcom_train/24361074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeoSegmentInterface createSegment(GeoPointInterface startPoint, GeoPointInterface endPoint){
GeoSegmentInterface segment;
AlgoJoinPointsSegment algoSegment = new AlgoJoinPointsSegment(cons, (GeoPoint) startPoint, (GeoPoint) endPoint, this);
cons.removeFromConstructionList(algoSegment);
segment = algoSegment.getSegment();
// refresh color to ensure segments have same color as polygon:
segment.setObjColor(getObjectColor());
return segment;
}
COM: <s> return a segment joining start point and end point </s>
|
funcom_train/34889998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseData(final String data) throws Exception {
Vector<String> splitData = splitCoords(data);
if (splitData.size() != 2){
throw new Exception();
}
// set latitude first, then longitude
this.labelY = parseCoord(splitData.get(0));
this.labelX = parseCoord(splitData.get(1));
}
COM: <s> parses all the given coordinate data for this object </s>
|
funcom_train/11322344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getControlSizeEst() {
int size = 0;
if (getTag() != null && hasAttributes()) {
//length of the markup -> </> == 3
//1 * tag.length()
size += 3 + getTag().length();
//using 20 as an estimate
size += 20 * getAttributes().size();
}
return size;
}
COM: <s> return the estimated rendered control size in characters </s>
|
funcom_train/31801560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFullCoverage() {
TestResult result = getTestResult(FullCoverage.class);
// Four methods not covered, the switch probes do not report
// an failure, because, they are not hit at all.
assertEquals(0, result.failureCount());
assertEquals(0, result.errorCount());
}
COM: <s> test full coverage </s>
|
funcom_train/12946090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean verifyPaymentAllocateSum(MPaymentAllocate[] pAllocs) {
BigDecimal sumPaymentAllocates = Env.ZERO;
if (pAllocs.length > 0) {
for (MPaymentAllocate pAlloc : pAllocs)
sumPaymentAllocates = sumPaymentAllocates.add(pAlloc.getAmount());
if (getPayAmt().compareTo(sumPaymentAllocates) != 0)
return false;
}
return true;
}
COM: <s> verify payment allocate sum must be equal to the payment amount </s>
|
funcom_train/50062366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean open() throws HL7IOException {
new Thread(this).start();
while (true) {
try {
Thread.sleep(60 * 1000);
// this.logTrace("awakened.");
} catch (InterruptedException ex) {
HL7Server.logger.debug("InterruptedException caught.", ex);
} // try - catch
} // while
} // open
COM: <s> opens the server for operation by starting the service thread </s>
|
funcom_train/36596491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextureCoords(TexCoords coords, int unit) {
if (isLive())
DisplaySystem.checkForRenderThread();
while (unit >= texBuf.size()) {
texBuf.add(null);
}
texBuf.set(unit, coords);
if (vboInfo != null) {
vboInfo.resizeTextureIds(texBuf.size());
}
checkTextureCoordinates();
}
COM: <s> code set texture buffer code sets this geometrys textures at the </s>
|
funcom_train/48910221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfNumVale() {
if (txfNumVale == null) {
txfNumVale = new JTextField();
txfNumVale.setBounds(new Rectangle(80, 55, 130, 20));
txfNumVale.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent e) {
if(e.getKeyCode()==KeyEvent.VK_ENTER)
txfPlaca.grabFocus();
}
});
}
return txfNumVale;
}
COM: <s> this method initializes txf num vale </s>
|
funcom_train/37747150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getAttrMap(int uriIndex) {
if (uriIndex == Namespaces.DefAttrNSIndex)
return Collections.unmodifiableMap(foAttrMap);
if (nSpaceAttrMaps != null) {
if (uriIndex >= nSpaceAttrMaps.size()) return null;
return Collections.unmodifiableMap
((Map)(nSpaceAttrMaps.get(uriIndex)));
} else {
return null;
}
}
COM: <s> get an unmodifiable tt map tt of the attribute values for a </s>
|
funcom_train/4124351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isShowingSubPanel() {
Component[] components = getComponents();
for (Component c : components) {
if (c instanceof ToolBoxFrame) {
continue;
}
if (c instanceof JInternalFrame) {
return true;
} else if (c instanceof JInternalFrame.JDesktopIcon) {
return true;
}
}
return false;
}
COM: <s> checks if this code canvas code displaying another panel </s>
|
funcom_train/14463516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDom(InputSource in){
SAXBuilder build = new SAXBuilder();
try{
dom = build.build(in);
}catch(JDOMException e){Logger.logErr("JDOM Exception: " + e);
}catch(IOException e){Logger.logErr("IOException creating JDOM document: " + e);}
}
COM: <s> create dom document from an input source object </s>
|
funcom_train/8022168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdCategory() {
System.out.println("updCategory");
Category category = null;
boolean expResult = true;
boolean result = CategoryManager.updCategory(category);
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 upd category method of class vgrabber </s>
|
funcom_train/18320541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void eraseSourceFeedback(Request request) {
if (LabelMoveRequest.REQ_MOVE_OFFSET.equals(request.getType())) {
eraseMoveOffsetFeedback((LabelMoveRequest) request);
} else if (LabelMoveRequest.REQ_MOVE_ORIGIN.equals(request.getType())) {
eraseMoveOriginFeedback((LabelMoveRequest) request);
}
}
COM: <s> erases feedback when appropriate </s>
|
funcom_train/22093083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Message waitMessage() {
Message msg = null;
try {
synchronized (_vFifo) {
while (_vFifo.isEmpty()) {
_log.fine( "Waiting for message" );
_vFifo.wait();
}
msg = (Message) _vFifo.firstElement();
}
}
catch (InterruptedException e) {
}
return msg;
}
COM: <s> get a message from the fifo waiting if its empty </s>
|
funcom_train/24089476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hashPassword(String password) throws NoSuchAlgorithmException {
// Instantiate an MD5 digest object
MessageDigest md = null;
md = MessageDigest.getInstance("MD5");
// Get the password bytes for hashing
byte[] passwordBytes = password.getBytes();
//Get the byte[] hash from the digest algorithm
byte[] hash = md.digest(passwordBytes);
// Encode bytes as Base16(hex) String
this.password = Util.encodeBase16(hash);
}
COM: <s> this method takes the natural string password as entered by the user </s>
|
funcom_train/7817265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HttpURLConnection getConnection() throws IOException {
URL url = new URL(this.url.toString());
if (!url.getProtocol().startsWith("http")) {
throw new IOException("Unsupported scheme:" + url.getProtocol());
}
return ((HttpURLConnection) url.openConnection());
}
COM: <s> opens a new http connection for the url associated with this object </s>
|
funcom_train/2524949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDisplayAddress(Address a) {
String pers = null;
String addr = null;
if (a instanceof InternetAddress &&
((pers = ((InternetAddress)a).getPersonal()) != null)) {
addr = pers + " "+"<"+((InternetAddress)a).getAddress()+">";
} else
addr = a.toString();
return addr;
}
COM: <s> utility method which returns a string suitable for msg header display </s>
|
funcom_train/48878782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String process(HttpServletRequest request, HttpServletResponse response) throws Exception {
// Just log someone out for now!
HttpSession session = request.getSession(true);
session.setAttribute("loggedIn", null);
// Clear out any other BO's that were used
session.setAttribute("customerID", null);
session.setAttribute("customerName", null);
return "index.jsp";
}//process
COM: <s> process the logout request </s>
|
funcom_train/21175300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeUserRole (String user, Course course, Role role) {
StringBuffer sql = new StringBuffer (512);
sql.append ("delete from UserRoles where UserName = '");
sql.append (user);
sql.append ("' and RoleName = '");
sql.append (role.name());
sql.append ("' and CourseID = ");
sql.append (course.getId());
updateQuery(sql.toString());
return true;
}
COM: <s> removes the specifed role for the given user in the specified course </s>
|
funcom_train/34608928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isExist(String domain) {
String domains[] = getDomains();
if (domains == null) {
return false;
} else {
for (int i = 0; i < domains.length; i++) {
if (domains[i].equals(domain)) {
return true;
}
}
return false;
}
}
COM: <s> check domain exist or not </s>
|
funcom_train/5380862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IMenuManager getWrapper(IMenuManager mgr) {
if (mapMenuToWrapper == null) {
mapMenuToWrapper = new HashMap(4);
}
SubMenuManager wrapper = (SubMenuManager) mapMenuToWrapper.get(mgr);
if (wrapper == null) {
wrapper = wrapMenu(mgr);
mapMenuToWrapper.put(mgr, wrapper);
}
return wrapper;
}
COM: <s> returns the menu wrapper for a menu manager </s>
|
funcom_train/3329817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName(boolean ignoreRef) {
if (ignoreRef == false && _groupRef !=null ) {
String localName = _groupRef;
//-- check for namespace prefix
int idx = localName.indexOf(':');
if (idx > 0) {
localName = localName.substring(idx+1);
}
return localName;
}
return super.getName();
} //-- getName
COM: <s> returns the name of this model group definition </s>
|
funcom_train/10792273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recordTableAlias(Table table, Object key, Integer alias) {
if (_aliases == null)
_aliases = new HashMap();
_aliases.put(key, alias);
String tableString = _dict.getFullName(table, false) + " "
+ toAlias(alias.intValue());
if (_tables == null)
_tables = new TreeMap();
_tables.put(alias, tableString);
}
COM: <s> record the mapping of the given key to the given alias </s>
|
funcom_train/42714717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GISGrid clone() {
GISGrid copy = new GISGrid(this.getWestEdge(), this.getNorthEdge(),
this.getEWResolution(), this.getNSResolution(),
this.getNumberRows(), this.getNumberColumns());
copy.noData = new BooleanGrid(this.noData);
return copy;
}
COM: <s> create a copy of this instance </s>
|
funcom_train/36603580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveCache(File file) {
// TODO components
FileOutputStream fos = null;
try {
fos = new FileOutputStream(file);
} catch (FileNotFoundException ex) {
Logger.getLogger(Repository.class.getName()).log(Level.SEVERE, null, ex);
}
saveCache(fos);
System.out.println("\nSaved repository cache to " + file);
}
COM: <s> save the cache state to the file </s>
|
funcom_train/32057883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsEnableTooltips() {
System.out.println("testIsEnableTooltips");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
assertTrue("isEnableToolTips", newDoc.isEnableTooltips() == false);
}
COM: <s> test of is enable tooltips method of class gpdocument </s>
|
funcom_train/19402560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long hash( final CharSequence s, final int l, final int k ) {
final int[] w = weight[ k ];
long h = init[ k ];
int i = l;
while( i-- != 0 ) h ^= ( h << 5 ) + s.charAt( i ) * w[ i % NUMBER_OF_WEIGHTS ] + ( h >>> 2 );
return ( h & 0x7FFFFFFFFFFFFFFFL ) % m;
}
COM: <s> hashes the given sequence with the given hash function </s>
|
funcom_train/39949512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFriendlyName(boolean alwaysAsk) throws IOException {
if(alwaysAsk==true)//TODO add buffer!!!!!!!!!!!!
{
try {
Thread.sleep(DiscoveryAgent.getInstance().getSimulatedFriendlyNameDelay());
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return this._friendlyName;
}
COM: <s> returns the name of this device </s>
|
funcom_train/3816221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFromObject(Object data) {
// cancel pending edits
getTable().cancelEditing();
Property[] properties = model.getProperties();
for (int i = 0, c = properties.length; i < c; i++) {
properties[i].readFromObject(data);
}
repaint();
}
COM: <s> initializes the property sheet from the given object </s>
|
funcom_train/22033003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
double[] data = new double[2];
data[0] = Double.parseDouble(dataLow.getText());
data[1] = Double.parseDouble(dataHi.getText());
// System.out.println("actionPerformed " + data[0] + " " + data[1]);
updateScalarMap(data);
}
COM: <s> handle jtext field changes </s>
|
funcom_train/41299588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getUpPanel() {
if (upPanel == null) {
BorderLayout borderLayout1 = new BorderLayout();
borderLayout1.setHgap(4);
upPanel = new JPanel();
upPanel.setLayout(borderLayout1);
upPanel.setName("upPanel");
upPanel.add(getLeftPanel(), BorderLayout.WEST);
upPanel.add(getRigthPanel(), BorderLayout.CENTER);
}
return upPanel;
}
COM: <s> this method initializes up panel </s>
|
funcom_train/31160212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getVersionNumber(String version) {
// get the first occurrence of the '.' character
int firstDotOccurrence = version.indexOf('.');
// get the main version number: in Java 1.3.0, this number is 1
String versionNumber = version.substring(0, firstDotOccurrence);
return Integer.parseInt(versionNumber);
}
COM: <s> get the version number of the j2 se this program is running on </s>
|
funcom_train/14141285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareBoolean( Boolean b1, Boolean b2 ) {
int comparison;
if( null == b1 ) {
if( null == b2 ) {
comparison = 0;
}
else {
comparison = -1;
}
}
else if( null == b2 ) {
comparison = 1;
}
else if( b1.equals( b2 ) ) {
comparison = 0;
}
else if( b1.booleanValue() == false ) {
comparison = 1;
}
else {
comparison = -1;
}
return comparison;
}
COM: <s> compares the two given booleans </s>
|
funcom_train/48470134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
HorizontalPanel horizontalPanel = new HorizontalPanel();
final AutomaticReplayGame gameAutomation = new AutomaticReplayGame(
new ShiftingFrame(12, 8),
horizontalPanel);
new Timer() {
public void run() {
gameAutomation.start();
}
}.schedule(1000);
RootPanel.get().add(horizontalPanel);
RootPanel.get().add(new Button("hallo"));
HorizontalPanel classicGamePanel = new HorizontalPanel();
new ClassicPuzzleGame(new ShiftingFrame(4,4), classicGamePanel);
RootPanel.get().add(classicGamePanel);
}
COM: <s> this is the entry point method </s>
|
funcom_train/8410500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StrBuilder reverse() {
if (size == 0) {
return this;
}
int half = size / 2;
char[] buf = buffer;
for (int leftIdx = 0, rightIdx = size - 1; leftIdx < half; leftIdx++,rightIdx--) {
char swap = buf[leftIdx];
buf[leftIdx] = buf[rightIdx];
buf[rightIdx] = swap;
}
return this;
}
COM: <s> reverses the string builder placing each character in the opposite index </s>
|
funcom_train/2730350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IMessage deserializeMessage(InputStream is) {
try {
ObjectInputStream ois = new ObjectInputStream(is);
Object result = ois.readObject();
if (result instanceof IMessage)
return (IMessage) result;
else
Logger.logError(null, "Deserialized object is NOT a message!");
} catch (IOException e) {
Logger.logError(e, "IOException while deserializing message.");
} catch (ClassNotFoundException e) {
Logger.logError(e,
"Received unknown message [tried to deserialize].");
}
return null;
}
COM: <s> deserializes a message based on a simple input stream </s>
|
funcom_train/48493700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawShape(Graphics2D g, DataObject_SpaceAgents.ShapeInfo shape, boolean border) {
Shape s = null;
switch (shape.type) {
case 0:
float r = shape.hx;
s = new Ellipse2D.Float(-r, -r, 2 * r, 2 * r);
break;
case 1:
float hx = shape.hx;
float hy = shape.hy;
s = new Rectangle2D.Float(-hx, -hy, 2 * hx, 2 * hy);
}
if (s == null)
return;
g.fill(s);
if (border) {
g.setColor(Color.black);
g.draw(s);
}
}
COM: <s> draws a specific shape </s>
|
funcom_train/25332006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClearAllMappings() {
DAVariation instance = new DAVariation();
assertTrue(instance.getLoadedMappings().isEmpty());
instance.addMapping(new VariationMapping());
assertFalse(instance.getLoadedMappings().isEmpty());
instance.clearAllMappings();
assertTrue(instance.getLoadedMappings().isEmpty());
}
COM: <s> test of clear all mappings method of class davariation </s>
|
funcom_train/9367056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assignContactFromEmail(String emailAddress, boolean lazyLookup) {
mContactEmail = emailAddress;
if (!lazyLookup) {
mQueryHandler.startQuery(TOKEN_EMAIL_LOOKUP, null,
Uri.withAppendedPath(Email.CONTENT_LOOKUP_URI, Uri.encode(mContactEmail)),
EMAIL_LOOKUP_PROJECTION, null, null, null);
} else {
mContactUri = null;
onContactUriChanged();
}
}
COM: <s> assign a contact based on an email address </s>
|
funcom_train/10984153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setURI(URI uri) {
setScheme(uri.getScheme());
setUserInfo(uri.getRawUserInfo());
setHost(uri.getHost());
setPort(uri.getPort());
setPath(uri.getRawPath());
setQuery(uri.getRawQuery());
setFragment(uri.getRawFragment());
}
COM: <s> set the value of the code mutable uri code </s>
|
funcom_train/22467810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verifyConfiguration() throws DuineConfigurationException {
if (log.isDebugEnabled()) {
log.debug("Verifying configuration of predictor " + this.getName());
}
if (name == null || name.length() == 0) {
throw new DuineConfigurationException("No name specified for predictor " + this.getClass().getName());
}
if (predictorHandler != null) {
predictorHandler.verifyConfiguration();
}
}
COM: <s> predictors should throw an exception when there ids a configuration </s>
|
funcom_train/4653449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setOpen(boolean open, boolean animate) {
if (mState == State.READY && isOpen() ^ open) {
mIsShrinking = !open;
if (animate) {
mState = State.ABOUT_TO_ANIMATE;
if (!mIsShrinking) {
// this could make flicker so we test mState in dispatchDraw()
// to see if is equal to ABOUT_TO_ANIMATE
mContent.setVisibility(VISIBLE);
}
post(startAnimation);
} else {
mContent.setVisibility(open? VISIBLE : GONE);
postProcess();
}
return true;
}
return false;
}
COM: <s> set the opened state of panel </s>
|
funcom_train/37409410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNumber(String number) {
checkChanged(this.number, number);
this.number = number;
String s[]=number.split(".");
this.numberArray=new int[s.length];
int i;
for(i=0; i<s.length; i++) {
numberArray[i]=Integer.parseInt(s[i]);
}
}
COM: <s> set number set the lom element reference number </s>
|
funcom_train/26570374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tile getTile(int column, int row) {
if (column < 0 || column >= tiles.length) {
throw new IllegalArgumentException("Column: " + column);
}
if (row < 0 || row >= tiles[column].length) {
throw new IllegalArgumentException("Row: " + row);
}
return tiles[column][row];
}
COM: <s> returns the tile which is present </s>
|
funcom_train/50370270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DomainsDocument getEntriesAsSingleDoc(List<String> obj) {
DomainsDocument gd = DomainsDocument.Factory.newInstance();
DomainsT gt = gd.addNewDomains();
int i = 0;
for (String s : obj) {
// Aggregate all info to one feed
try {
DomainsDocument gridDoc = DomainsDocument.Factory.parse(s);
gt.addNewAdminDomain();
gt.setAdminDomainArray(i, gridDoc.getDomains()
.getAdminDomainArray(0));
i++;
} catch (Exception e) {
e.printStackTrace();
}
}
return gd;
}
COM: <s> list all info as single glue document with multiple admin domains </s>
|
funcom_train/39881158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(java.io.ObjectOutputStream out) throws IOException {
ObjectOutputStream.PutField fields = out.putFields();
fields.put("perms", new Hashtable(klasses));
fields.put("allPermission", allEnabled ? klasses
.get(AllPermission.class) : null);
out.writeFields();
}
COM: <s> outputs fields via default mechanism </s>
|
funcom_train/31135604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean replace(Object oldObj, Object newObj)
{
if (nest != null)
{
return nest.replace(oldObj, newObj);
}
else
{
int sz = elements.size();
for (int i = 0; i < sz; i++)
{
if (elements.elementAt(i) == oldObj)
{
elements.setElementAt(newObj, i);
return true;
}
}
}
return false;
}
COM: <s> replace an object within the composite </s>
|
funcom_train/49049310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare (Object inObject1, Object inObject2) throws ClassCastException {
int index1 = searchTypes (inObject1);
int index2 = searchTypes (inObject2);
if (index1 < index2)
return -1;
else if (index1 == index2)
return 0;
else
return 1;
} // end compare().
COM: <s> compares its two arguments for order </s>
|
funcom_train/13261699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyGraphics(String gi, int jobId, double time) {
if (gi == "addQ") {
for (Notifier element : n) {
element.enterQueue(jobId, time);
}
} else if (gi == "lostJob") {
for (Notifier element : n) {
element.jobLost(jobId, time);
}
} else if (gi == "animate") {
for (Notifier element : n) {
element.updateQueue(jobId, time);
}
}
}
COM: <s> notify the changes to the user interface </s>
|
funcom_train/11752065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runNamedQuery() {
if (this.currentServer == null) return;
if (this.namedQueryCombo.indexOf(this.namedQueryCombo.getText()) != -1) {
ObjectContext context = getObjectContext(this.currentServer);
NamedQuery select = new NamedQuery(this.namedQueryCombo.getText());
if (context != null) {
Object matches = context.performQuery(select);
displayInEditor(context, this.currentServer, matches);
}
}
}
COM: <s> run the named query that has been chosen </s>
|
funcom_train/31955788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(" Unhandled/Undefined/Unknown Type\n");
try {
sb.append(" XTENSION="
+ myHeader.getStringValue("XTENSION").trim() + "\n");
} catch (FitsException e) {
sb.append(" Cannot get XTENSION keyword\n");
}
sb.append(" Size:" + myData.getSize());
return sb.toString();
}
COM: <s> print out some information about this hdu </s>
|
funcom_train/13771839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMethods(CompiledOpenClass dependency) {
for (IOpenMethod depMethod : dependency.getOpenClass().getMethods()) {
// filter constructor and getOpenClass methods of dependency modules
//
if (!(depMethod instanceof OpenConstructor) && !(depMethod instanceof GetOpenClass)) {
addMethod(depMethod);
}
}
}
COM: <s> add methods form dependent modules to current one </s>
|
funcom_train/31293204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Prompt createPrompt() throws ParserConfigurationException {
final VoiceXmlDocument document = new VoiceXmlDocument();
final Vxml vxml = document.getVxml();
vxml.setXmlLang(Locale.US);
final Form form = vxml.appendChild(Form.class);
final Block block = form.appendChild(Block.class);
final Prompt prompt = block.appendChild(Prompt.class);
return prompt;
}
COM: <s> creates an empty prompt </s>
|
funcom_train/45501850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recordingProgress() {
recordingDone++;
int progress = Math.max( 0, Math.min( (int) Math.round( ((double) recordingDone / recordingCount) * 100 ), 99 ) );
//AlgorithmTask.getInstance().setProgress( progress, "Erzeuge Individuen-Bewegungen...", "Recording-Schritt " + recordingDone + " von " + recordingCount + " abgearbeitet." );
}
COM: <s> p this method increases the number of individuals that are created and </s>
|
funcom_train/4762952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox setUpResolutionChooser() {
String[] res = getResolutions(modes);
JComboBox resolutionBox = new JComboBox(res);
resolutionBox.setSelectedItem(source.getWidth() + " x "
+ source.getHeight());
resolutionBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateDisplayChoices();
}
});
return resolutionBox;
}
COM: <s> code set up chooser code retrieves all available display modes and </s>
|
funcom_train/3876861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
initComponents();
}
});
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("Error: " + ex.getLocalizedMessage());
}
}
COM: <s> initializes the applet code group main frame code through call to initialize all </s>
|
funcom_train/25304990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VirtualHost attachToComponent(Component component) {
VirtualHost result = null;
if (getBaseRef() != null) {
// Create the virtual host
result = getVirtualHost(component);
// Attach the application to the virtual host
attachToHost(result);
// Adds the necessary server connectors
addConnectors(component);
} else {
getLogger()
.warning(
"The WADL application has no base reference defined. Unable to guess the virtual host.");
}
return result;
}
COM: <s> attaches the application to the given component if the application has a </s>
|
funcom_train/5723707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String removeCompleteUniversityTree() throws LectureException {
try {
universityService.removeCompleteUniversityTree(universityInfo.getId());
setBean("universityInfo", null);
setBean("departmentInfo", null);
setBean("instituteInfo", null);
setBean("courseTypeInfo", null);
setBean("courseInfo", null);
addMessage(i18n("message_university_removed"));
return Constants.UNIVERSITIES_ADMIN_PAGE;
} catch (Exception e) {
e.printStackTrace();
addError(i18n("message_university_cannot_be_removed"));
return Constants.UNIVERSITIES_ADMIN_PAGE;
}
}
COM: <s> delete complete university tree including all belonging departments institutes course types and courses </s>
|
funcom_train/4599602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Object o) {
//first, retrive the number passed
Integer i = (Integer)o;
int num = i.intValue();
//second, check it in the set
int l=0, h=ranges.size()-1, m=0;
while (l <= h) {
m = (l+h)>>1;
Range r = ranges.elementAt(m);
if (num >= r.from && num <= r.to)
return true;
if (num < r.from)
h = m-1;
else l = m+1;
}
return false;
}
COM: <s> check for an integer or character to exist in the set </s>
|
funcom_train/952703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
super.init();
this.controlPanel = new AgentAuthenticationAgentControlPanel(this);
this.controlPanel.init();
try {
this.database = new AgentDatabase(this.agentDatabaseFile);
this.revocationList = new AgentRevocationList();
} catch (Exception e) {
System.err.println("AgentAuthenticationAgent: Error - couldn't create agent database");
System.err.println(e.toString());
}
}
COM: <s> initializes this agent </s>
|
funcom_train/50091737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testBug1778479DefaultLabel() {
IPseudoAtom atom = (IPseudoAtom)newChemObject();
Assert.assertNotNull("Test for PseudoAtom's default label", atom.getLabel());
Assert.assertEquals("Test for PseudoAtom's default label", "*", atom.getLabel());
}
COM: <s> test for bug 1778479 mdlwriter writes empty pseudo atom label string </s>
|
funcom_train/34138301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchToAppChooserView() {
if (appChooserView != null) {
setContentView(appChooserView);
appChooserView.requestFocus();
appChooserView.resetListState();
appChooserView.speakCurrentApp(false);
switch (activeMode) {
case MENU_EDIT_MODE:
break;
case APPLAUNCHER_VIEW:
break;
case MAIN_VIEW:
activeMode = APPLAUNCHER_VIEW;
break;
}
}
}
COM: <s> brings up the app </s>
|
funcom_train/5774383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getInName() {
if (inName == null) {
inName = new JTextField();
inName.setBounds(new java.awt.Rectangle(181,40,220,25));
inName.setEditable(false);
}
return inName;
}
COM: <s> this method initializes in name </s>
|
funcom_train/6289340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttachmentToForm(SendMail sendmail) {
// the name of the attachment
StringItem siFileNameAttached = new
StringItem(Lang.get(Lang.SM_ATTACHMENT), getHeader().getName() + "\n");
sendmail.append(siFileNameAttached);
// the size of the attachment
sendmail.append(siSize);
updateSize();
}
COM: <s> displays this body part in the sendmail form </s>
|
funcom_train/31873183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void step() {
storeResults(this.pSearch.hunt());
if (GridExecutionEngine.DEBUG) {
System.out.println("[ Rewards ] Cell "
+this.id+" ate $"+this.meal+ " at iteration "+this.iteration);
if (this instanceof CellRandom)
System.out.println("[ Rewards ] Cell "
+this.id+" has "+((CellRandom)this).provision+" provisions");
}
if (this instanceof CellRandom) ((CellRandom)this).starve();
this.meal = 0;
this.iteration++;
}
COM: <s> try to get food by running its programs </s>
|
funcom_train/38628870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains (final Object obj) {
boolean result = false;
if (obj != null) {
for (int i = 0; i < size; ++i) {
if (elements[i] != null) {
if (elements[i].equals(obj)) {
result = true;
break;
} // if
} // if
} // for
} // if
return result;
} // contains()
COM: <s> returns whether the buffer contains the specified element </s>
|
funcom_train/37830961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillBySource(RPAction action) {
if (action.has(EquipActionConsts.BASE_OBJECT)) {
fillBySlotSource(action);
} else if (action.has(EquipActionConsts.BASE_ITEM)) {
fillByGroundSource(action);
} else {
// TODO: zone, (objectid, slot)*, itemid
logger.warn("Source identification missing in " + action);
}
}
COM: <s> handles an item identifcation for a source </s>
|
funcom_train/16889034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
super.init(site, editorInput);
setPartName(editorInput.getName());
if (!(editorInput instanceof IFileEditorInput)) {
throw new PartInitException("Invalid Input: Must be IFileEditorInput"); //$NON-NLS-1$
}
createModel();
}
COM: <s> the implementation of this method checks that the input is an </s>
|
funcom_train/2325581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fft3() {
if (content instanceof DenseLargeFloatMatrix3D) {
if (this.isNoView == true) {
((DenseLargeFloatMatrix3D) content).fft3();
} else {
DenseLargeFloatMatrix3D copy = (DenseLargeFloatMatrix3D) copy();
copy.fft3();
assign(copy);
}
} else {
throw new IllegalArgumentException("This method is not supported");
}
}
COM: <s> computes the 3 d discrete fourier transform dft of this matrix </s>
|
funcom_train/4876646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node createProfileNode(final Document profilesDocument, final String profileName) {
assert profilesDocument != null : "profilesDocument is null";
assert profileName != null : "profileName is null";
Element profileElement = profilesDocument.createElement(PROFILE_TAG);
profileElement = updateProfileElement(profilesDocument, profileName, profileElement);
return profileElement;
}
COM: <s> creates a profile </s>
|
funcom_train/5347699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runCharTest(char[] illegalChars) {
String test = "test";
String correctResult = "test_";
for(int i=0; i<illegalChars.length; i++) {
String curTest = CommonUtils.convertFileName(test + illegalChars[i]);
assertEquals("illegal char: "+illegalChars[i]+ " not replaced correctly",
correctResult, curTest);
}
}
COM: <s> helper method for testing illegal character conversion method </s>
|
funcom_train/2344592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ExtractConfigTableEditor(){
//edit data in the tabel bei selection
FeatureConfigurationtable.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
itemnew = (TableItem)e.item;
if (itemnew.getText().length() == 0) {
ExtractConfigurationbutton.setEnabled(false);
return;}
else {ExtractConfigurationbutton.setEnabled(true);
SelectedItemName = itemnew.getText();
}
System.out.println("text:" +itemnew.getText());
}
});
}
COM: <s> initializes the listener for a selection in the table </s>
|
funcom_train/32870444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String isConnectedString = "(isNotConnected)";
if (isConnected) isConnectedString = "(isConnected)";
StringBuffer result = new StringBuffer();
result.append(" Join Point Manager (" + System.identityHashCode(this) + "State " + isConnectedString + ": \n");
result.append(req2listener.toString());
return result.toString();
}
COM: <s> return the state of the join point manager </s>
|
funcom_train/42715211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRecordAttributes() {
if(service_records == null)
return;
int set[] = {0x000, Globals.SERVER_CONNECTIONS_ATTRIBUTE_ID};
Enumeration devenum = service_records.elements();
while(devenum.hasMoreElements()) {
ServiceRecord dev = (ServiceRecord)devenum.nextElement();
try {
dev.populateRecord(set);
} catch(Exception e) {
e.printStackTrace();
}
}
}
COM: <s> update record attributes </s>
|
funcom_train/22232359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BoundingLeaf getApplicationBoundingLeaf() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_APPLICATION_BOUNDS_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Clip3"));
return ((ClipRetained)this.retained).getApplicationBoundingLeaf();
}
COM: <s> retrieves the clip nodes application bounding leaf </s>
|
funcom_train/35841618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExtensionPointVisible(boolean isVisible) {
if (epVec.isVisible() && (!isVisible)) {
setExtensionPointVisibleInternal(false);
} else if ((!epVec.isVisible()) && isVisible) {
setExtensionPointVisibleInternal(true);
}
/* Move the stereotype out of the way: */
updateStereotypeText();
}
COM: <s> set the visibility of the extension point compartment </s>
|
funcom_train/42180245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsWallEndAt(float x, float y, float margin) {
float [][] wallPoints = getPoints();
Line2D endLine = new Line2D.Float(wallPoints [1][0], wallPoints [1][1], wallPoints [2][0], wallPoints [2][1]);
return containsShapeAtWithMargin(endLine, x, y, margin);
}
COM: <s> returns code true code if this wall end line contains </s>
|
funcom_train/11725204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveFirstSibling() throws RepositoryException {
firstSiblingNode.remove();
// check if the node has been properly removed
try {
Node secondSibling = testRootNode.getNode(nodeName1);
// implementation specific:
assertTrue("", removeItem.isSame(secondSibling));
} catch (PathNotFoundException e) {
fail("Second sibling must still be available.");
}
}
COM: <s> transiently removes the first sns node using </s>
|
funcom_train/32869583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor createImageDescriptor(String path) {
URL url = getBundle().getEntry("/");
ImageDescriptor descriptor = null;
try {
descriptor = ImageDescriptor.createFromURL(new URL(url, path));
} catch (MalformedURLException e) {
descriptor = ImageDescriptor.getMissingImageDescriptor();
}
return descriptor;
}
COM: <s> create an image descriptor </s>
|
funcom_train/21435990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
this.setId(0);
this.setDbId(0);
this.setName(null);
this.setElement(null);
this.setIsotope(null);
this.setCharge(null);
this.setConnections(new ArrayList<AtomConnection>());
}
COM: <s> initialize the atom properties </s>
|
funcom_train/25331426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSOAccession() {
VariationType instance = new VariationType();
assertNull(instance.getSOAccession());
instance.setSOAccession(bob);
assertTrue(instance.getSOAccession().equals(bob));
assertFalse(instance.getSOAccession().equals(bill));
}
COM: <s> test of get soaccession method of class variation type </s>
|
funcom_train/785906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tuple getTuple(int row) {
if ( m_table.isValidRow(row) ) {
ensureTupleArray();
if ( m_tuples[row] == null ) {
return (m_tuples[row] = newTuple(row));
} else {
return m_tuples[row];
}
} else {
// TODO: return null instead?
throw new IllegalArgumentException("Invalid row index: "+row);
}
}
COM: <s> get a tuple corresponding to the given row index </s>
|
funcom_train/8582994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNearestMarker(int x, int y) {
List<MapNode> marks = map.getMarkers();
float lat = getTransformer().lat(y);
float lon = getTransformer().lon(x);
MapNode mark = new Position(lat, lon).selectNearest(marks, null);
if (mark != null)
marks.remove(mark);
map.fireMapDataEvent(new MapEvent(map,
MapEvent.Type.MAP_MODIFIED));
fireMapViewEvent(new MapViewEvent(this,
MapViewEvent.Type.TMP_NODES_REMOVED));
}
COM: <s> removes the mark which is the nearest with respect to the given view </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.