__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/30196990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTestcreate() throws Exception {
System.out.println("testcreate");
/*
ActionMapping mapping = null;
ActionForm form = null;
HttpServletRequest request = null;
HttpServletResponse response = null;
InserisciCVMailAction instance = new InserisciCVMailAction();
ActionForward expResult = null;
ActionForward result = instance.testcreate(mapping, form, request, response);
assertEquals(expResult, result);
*/
}
COM: <s> test of testcreate method of class com </s>
|
funcom_train/22769352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isVisible() {
boolean result = true;
HeaderTreeNode parent = getParent();
if(parent != null) {
result = parent.isVisible();
if(result && parent.getLayerNr() == getLayerNr())
result = parent.isOpen();
}
return result;
}
COM: <s> returns whether this node is visible </s>
|
funcom_train/47274855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void testGetAllUsers() throws Exception {
vo.setUsername("test_disabled");
manager.create(vo);
UserVo enabledUser = new UserVo();
enabledUser.setUsername("test_enabled");
enabledUser.setEmail("foo");
enabledUser.setName("foo");
enabledUser.setPassword("foo");
enabledUser = manager.create(enabledUser);
manager.enable(enabledUser.getEnablementCode());
List<UserVo> users = manager.getAllUsers();
assertTrue(users != null && users.size() == 2);
}
COM: <s> test loading all users enabled and disabled </s>
|
funcom_train/31477549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void footer() throws IOException {
out.println("<hr noshade><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr>"+
"<td><a href=\"statistics\">Statistics</a></td>"+
"<td><div align=\"right\">Generated: "+Tools.getTimeAsString(" ")+"</div></td></tr></table>");
out.println(WebServer.getInstance().getFooter());
}
COM: <s> prints the footer </s>
|
funcom_train/16102745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getRbNoRealm() {
if (rbNoRealm == null) {
rbNoRealm = new JRadioButton();
rbNoRealm.setText(rb.getString("panel.panelSafeguard.realm.none")); //$NON-NLS-1$
rbNoRealm.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
selectedRealm = REALM_NONE;
showConfigurePanel();
}
});
}
return rbNoRealm;
}
COM: <s> this method initializes rb no realm </s>
|
funcom_train/46733584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFacilityAccountId(Long facilityAccountId) {
if (!(this.facilityAccountId.longValue() == facilityAccountId.longValue())) {
Long oldfacilityAccountId= 0L;
oldfacilityAccountId = this.facilityAccountId.longValue();
this.facilityAccountId = facilityAccountId.longValue();
setModified("facilityAccountId");
firePropertyChange(String.valueOf(CHARGEITEMLOGS_FACILITYACCOUNTID), oldfacilityAccountId, facilityAccountId);
}
}
COM: <s> default account the charge item will post to </s>
|
funcom_train/38998751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int checkdcmp(double input) {
if (input == 0.0) {
return 700;
} else if (input >= 1.0 && input <= 10.0) {
return 800;
} else if (input > 10.0 && input < 100.0) {
return 900;
} else if (input < 0) {
return 2;
} else if (input != 100) {
return 1000;
}
return 2000;
}
COM: <s> checks all dcmp opcodes </s>
|
funcom_train/5865404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(String name) throws InterruptedException {
if ("popup".equals(name)) doPopup();
else if ("overlapped".equals(name)) doOverlapped();
else if ("embedded".equals(name)) doEmbedded();
else if ("modal".equals(name))
Events.postEvent(Events.ON_MODAL, this, null);
else if ("highlighted".equals(name)) doHighlighted();
else throw new WrongValueException("Uknown mode: "+name);
}
COM: <s> sets the mode to overlapped popup modal embedded or highlighted </s>
|
funcom_train/32913218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMessage(String msg) {
this.labelStatus.setText(msg);
if (msg != null && msg.trim().length()>0 && messageTimeDisplayMs != 0) {
Timer timer = new Timer(messageTimeDisplayMs, new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
setMessage(null);
}
});
timer.setRepeats(false);
timer.start();
}
}
COM: <s> set the status bar text message </s>
|
funcom_train/20898162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringBrief() {
StringBuffer sbuf = new StringBuffer();
sbuf.append("Query ID: ").append(queryProtID)
.append(" Query Len: ").append(queryLength)
.append(" Hit ID: ").append(hitProtID)
.append(" Hit Len: ").append(hitLength);
return sbuf.toString();
}
COM: <s> the code to string brief code method returns a brief textual </s>
|
funcom_train/3785403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final synchronized public void getNghInt3x3(int x, int y)
{ /* getNghInt3x3 */
yw= y*width; /* Prep it here for speedup */
ywMw= yw-width;
ywPw= yw+width;
getNghInt(x, y);
} /* getNghInt3x3 */
COM: <s> get ngh int3x3 get 3x3 32 bit neighborhood at x y </s>
|
funcom_train/2306452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkSambaGroupPresent(String groupName) throws Exception {
Logging.loggerRef.info("METHOD CALLED ---- checkSambaGroupPresent");
Logging.loggerRef.info("PARAMETRES ---- User name :"+groupName);
boolean present = false;
try {
groupName = groupName.trim();
if (getAllGroups().containsKey(groupName)) {
present = true;
return present;
}
} catch (Exception e) {
Logging.loggerRef.info("ERROR while checking group present or not."+e);
throw e;
}
return present;
}
COM: <s> function will check group present in samba database </s>
|
funcom_train/18744491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int disposeRecord(int recordNr) {
// System.out.printf("Disposing record %d (next free record %d) of
// %s%n", recordNr, freeRecordNr, this.hashCode());
assert recordNr > 0;
int parentIx = setParentIx(recordNr, this.freeRecordNr);
this.freeRecordNr = recordNr;
return parentIx;
}
COM: <s> disposes the record with a given positive record number adjust the </s>
|
funcom_train/22782386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Image o1, Image o2) {
if (o1 == null && o2 == null) {
return 0;
}
if (o1 == null) {
return -1;
}
if (o2 == null) {
return 1;
}
// FIXME cleiter we don't have any id's anymore
// return o1.getId().compareTo(o2.getId());
return 0;
}
COM: <s> the compare method of the id comparator distinguishes between images by </s>
|
funcom_train/23793960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LookupSwitch (Operand value, Operand unknown1, Operand unknown2, BranchOperand defaultTarget, BranchProfileOperand defaultBranchProfile, int numVarOps) {
super (value, unknown1, unknown2, defaultTarget, defaultBranchProfile, numVarOps);
}
COM: <s> constructor for lookup switch </s>
|
funcom_train/36459918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(LocalStreamListener listener) {
if (started) {
if (listener != null) {
listener.removeLocalAudio(cloneEffect);
}
processor.stop();
try {
sendStream.stop();
} catch (IOException e) {
e.printStackTrace();
}
dataSource.disconnect();
started = false;
}
}
COM: <s> stops the audio device </s>
|
funcom_train/39538752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component apply(Component stamp, ComponentAdapter adapter) {
// stamp = resetDefaultTableCellRendererHighlighter.highlight(stamp, adapter);
for (Iterator<Highlighter> iter = highlighters.iterator(); iter.hasNext();) {
stamp = iter.next().highlight(stamp, adapter);
}
return stamp;
}
COM: <s> applies all the highlighters to the components </s>
|
funcom_train/11012642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInt() {
// reading 4 byte data from a 5 byte buffer
byte[] testdata = {
(byte) 0x01,
(byte) 0xFF,
(byte) 0xFF,
(byte) 0xFF,
(byte) 0x02,
};
assertEquals(0xFFFFFF01, LittleEndian.getInt(testdata));
assertEquals(0x02FFFFFF, LittleEndian.getInt(testdata, 1));
}
COM: <s> test the get int method </s>
|
funcom_train/39915722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLabel21() {
System.out.println("getLabel21");
Page1 instance = new Page1();
Label expResult = null;
Label result = instance.getLabel21();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get label21 method of class timesheetmanagement </s>
|
funcom_train/38519676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String dump() {
StringBuffer sb = new StringBuffer();
Enumeration elements = elements();
while( elements.hasMoreElements() ) {
String one = ((DBObject)elements.nextElement()).toLDIF();
String head = lengthField.format( one.length() + 1 );
sb.append( head );
sb.append( "\n" );
sb.append( one );
sb.append( "\n" );
}
return sb.toString();
}
COM: <s> dump all the dbobjects making part of this dbset out into a string </s>
|
funcom_train/40496598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Direction computeDirection(Point p1, Connector c2) {
Direction[] d2 = c2.getDirections();
Direction bestDirections = d2[0];
// Calculate the best points with less distance.
double best = Double.MAX_VALUE;
for (int j = 0; j < d2.length; j++) {
double actual = p1.distance(c2.getConnectionPoint(d2[j]));
if( actual < best ){
best = actual;
bestDirections= d2[j];
}
}
return bestDirections;
}
COM: <s> this method capture the best place to a point link with a connector </s>
|
funcom_train/43540132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logEntry(String methodName, String... params) {
if (PlatformActivator.isOptionEnabled(DEBUG_OPTION_ENTRY_EXIT)) {
List<StackTraceElement> callStack = getCallStackBefore("logEntry"); //$NON-NLS-1$
logEntry(methodName, callStack, params);
}
}
COM: <s> log entry log a statement that indicates a method entry has occurred </s>
|
funcom_train/19578231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
branchNextMove = false;
moveChainCount = 1;
treeRoot = new ChainLink(0, null);
currentLink = treeRoot;
branchTop = new BranchLink(CM_MAIN_BRANCH_NUMBER, ChessTree.messages.getString("defBranchName"));
branchModel = new DefaultTreeModel(branchTop);
branchCurrent = branchTop;
branchMarked = null;
branchChainMap = new HashMap();
branchChainMap.put(branchTop.getKey(), branchTop);
}
COM: <s> initialize our variables </s>
|
funcom_train/44657029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateErrors() {
boolean oldErrors = hasErrors;
hasErrors = false;
if (validationResults.getHasErrors()) {
hasErrors = true;
}
else {
Iterator childIter = children.iterator();
while (childIter.hasNext()) {
ValidationResultsModel childModel = (ValidationResultsModel) childIter.next();
if (childModel.getHasErrors()) {
hasErrors = true;
break;
}
}
}
firePropertyChange(HAS_ERRORS_PROPERTY, oldErrors, hasErrors);
}
COM: <s> revaluate the has errors property and fire an event if things have </s>
|
funcom_train/50892119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addGraphicsCentered(String[] graphics, char color) {
int line = (NUMBER_OF_LINES - graphics.length) / 2;
int column = (NUMBER_OF_COLUMNS - graphics[0].length()) / 2;
addGraphics(line, column, graphics, color);
}
COM: <s> paints a single colored text graphics object centered into the text view </s>
|
funcom_train/25099347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExecutionRatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Node_executionRate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Node_executionRate_feature", "_UI_Node_type"),
HardwaremodelingPackage.Literals.NODE__EXECUTION_RATE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the execution rate feature </s>
|
funcom_train/48959616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override protected void onAddProjectMember(DefaultProject project, TrackerUser user, boolean asAdministrator) {
if (user != null) {
user.addRole(securityDAO.findAuthority(ROLE_DEVELOPER));
if (asAdministrator) {
user.addRole(securityDAO.findAuthority(ROLE_PROJECT_MANAGER));
}
dao.update(user);
}
}
COM: <s> ensures that the user has the rights to later perform operations </s>
|
funcom_train/12155884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ActionListener getActionListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
if (logger.isDebugEnabled()) {
logger.debug("Entering actionPerformed(" + actionEvent + ").");
}
pane.setValue(okOption);
if (logger.isDebugEnabled()) {
logger.debug("Exiting actionPerformed(" + actionEvent + ").");
}
}
};
}
COM: <s> the listener returned by this method is used by all the controls </s>
|
funcom_train/7518286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(ParametrosFiltro entity) {
EntityManagerHelper.log("saving ParametrosFiltro 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 parametros filtro entity </s>
|
funcom_train/69692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ResultSet doExecuteQuery(Connection con) throws SQLException {
Statement stmt = con.createStatement();
String query = this.getQueryString();
if (Logger.isDebugEnabled()) {
Logger.debug("executeQuery() - Statement to be executed: " + query);
}
results = stmt.executeQuery(query);
return results;
}
COM: <s> execute the query and return the results </s>
|
funcom_train/4969942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Universe createBaseUniverse() throws Exception {
LOGGER.info("Creating universe of size " + configuration.getSizeX()
+ "x" + configuration.getSizeY() + " containing "
+ configuration.getSectorCount() + " sectors");
// create Universe object
Universe universe = new Universe(configuration.getSizeX(),
configuration.getSizeY());
// return the new universe
return universe;
}
COM: <s> creates a new universe with some basic initial values size etc </s>
|
funcom_train/8662585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIload(int n) {
if (n < 4)
addOpcode(26 + n); // iload_<n>
else if (n < 0x100) {
addOpcode(ILOAD); // iload
add(n);
}
else {
addOpcode(WIDE);
addOpcode(ILOAD);
addIndex(n);
}
}
COM: <s> appends iload or wide iload lt n gt </s>
|
funcom_train/20367914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isThreatenedSquare(Point p, PieceColor color) {
// check whether any enemy piece can move to the square
for (int x = 0; x < 8; x++)
for (int y = 0; y < 8; y++) {
ChessPiece piece = get(x, y).getContents();
if (piece != null && piece.getColor() == color)
if (piece.getValidMoves(false).contains(p))
return true;
}
return false; // no "color" piece threatened the square
}
COM: <s> determines whether the square at the given location is threatened by the </s>
|
funcom_train/4832043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pause(){
SoundPool soundPool = new SoundPool(2, AudioManager.STREAM_MUSIC, 0);
//loads sound resource
// int soundID = soundPool.load(context, resId, priority);
//plays a sound - the soundId is returned from load
// soundPool.play(soundID, leftVolume, rightVolume, priority, loop, rate);
}
COM: <s> this method should pause the </s>
|
funcom_train/26275136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BuildLogger createLogger() {
BuildLogger logger = new DefaultLogger(); /* FIXME CommonsLoggingListener(); */
logger.setMessageOutputLevel(msgOutputLevel);
logger.setOutputPrintStream(out);
logger.setErrorPrintStream(err);
logger.setEmacsMode(emacsMode);
return logger;
}
COM: <s> creates the default build logger for sending build events to the ant </s>
|
funcom_train/45539869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refresh() {
IJSCElement input= getInput();
if (input == null) {
StringBuffer buffer= new StringBuffer(""); //$NON-NLS-1$
HTMLPrinter.insertPageProlog(buffer, 0, null, fBackgroundColorRGB, fgStyleSheet);
doSetInput(buffer.toString());
} else {
doSetInput(computeInput(input));
}
}
COM: <s> refreshes the view </s>
|
funcom_train/41686761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDomain(ATerm p, ATermAppl c, DependencySet ds) {
status |= RBOX_CHANGED;
Role r = rbox.getDefinedRole( p );
// TODO Need to do something with the dependency set.
r.addDomain( c, ds );
if( log.isDebugEnabled() )
log.debug( "domain " + p + " " + c + " (" + r.getDomain() + ")" );
}
COM: <s> for internal use with tracing </s>
|
funcom_train/4957310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_toArray() {
Object[] intObjArray = new Integer[] {
new Integer(0), new Integer(1), new Integer(2), new Integer(3)};
TestSupport.assertThat(Arrays.equals(defaultList().toArray(), intObjArray),
"toArray() did not return the expected Integer[] array");
}
COM: <s> tests to array </s>
|
funcom_train/32979218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPluginHashState(String pluginName, String varName, int defValue)
{ /* getPluginState */
Object obj= getPluginHashState(pluginName, varName);
if(obj==null || !(obj instanceof Integer))
return(defValue);
int value= ((Integer)obj).intValue();
return(value);
} /* getPluginHashState */
COM: <s> get plugin hash state get int state value from maeplugin hash state storage </s>
|
funcom_train/36534470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addBus(String registration, String mapName) {
try {
// int mapID = mdb.getMapID(mapName);
String insertStatement = "INSERT INTO bus(Registration) VALUES (?);";
PreparedStatement pstmt = con.prepareStatement(insertStatement);
pstmt.setString(1, registration);
// pstmt.setInt(2, mapID);
int result = pstmt.executeUpdate();
pstmt.close();
} catch (SQLException sqle) {
System.out.println("addBus " + sqle);
return false;
}
return true;
}
COM: <s> adds a bus to the database and associates it with a particular map </s>
|
funcom_train/47891790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IFile findFile(String filePath) {
Map<String, IResource> sourceDirectories = findSourceDirectories(project);
String root = codeBase.findRootDirectoryOfFile(filePath);
IResource res = sourceDirectories.get(root);
if(res != null) {
String f = res.getProjectRelativePath().toString() + filePath;
return project.getProject().getFile(f);
} else {
return project.getProject().getFile(filePath);
}
}
COM: <s> attempt to find the source file within the eclipse project tree that </s>
|
funcom_train/25597827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getSourceAnchorShapeRotation () {
if (controlPoints.size () <= 1)
return 0.0;
Point point1 = controlPoints.get (0);
Point point2 = controlPoints.get (1);
return Math.atan2 (point2.y - point1.y, point2.x - point1.x);
}
COM: <s> returns the rotation of the source anchor shape </s>
|
funcom_train/16564393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove() {
if (count == 0)
return null;
Object element = data[1];
/* swap the last element into the first */
data[1] = data[count];
value[1] = value[count];
/* let the GC clean up */
data[count] = null;
value[count] = 0L;
count--;
bubbleDown(1);
return element;
}
COM: <s> remove is a function to remove the element in the queue with the </s>
|
funcom_train/42302623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMessage(String message) {
this.messages.add(message);
int size = this.messages.size();
if (size > LINES) {
txa_messages.setText("");
for (int i = (size - LINES); i < this.messages.size(); i++) {
txa_messages.setText(txa_messages.getText()
+ ConfigurationConstGraphics.NEWLINE + "\n"
+ messages.get(i));
}
} else {
txa_messages.setText(txa_messages.getText()
+ ConfigurationConstGraphics.NEWLINE + "\n" + message);
}
revalidate();
repaint();
}
COM: <s> appends the message to the previously present text </s>
|
funcom_train/35838688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getNodePositions(PCSession session, String sViewID) throws SQLException {
//
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// Vector vtNodePos = DBViewNode.getNodePositions(dbcon, sViewID, session.getUserID());
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return null;
}
COM: <s> returns all the nodepositions in this view </s>
|
funcom_train/12776474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSideEffectsForUnification(HashSet<PointsToSetVariable> s, int rep) {
PointsToSetVariable pRef = pointsToMap.getPointsToSet(rep);
for (Iterator<PointsToSetVariable> it = s.iterator(); it.hasNext();) {
PointsToSetVariable p = it.next();
updateSideEffects(p, pRef);
}
}
COM: <s> update side effect after unification </s>
|
funcom_train/18368019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getMatchingList(IBetOwner a, List bets) {
List mybets = new ArrayList();
if(bets != null)
for(Iterator i = bets.iterator(); i.hasNext();) {
Bet b = (Bet)i.next();
if(b.getOwner() != null && b.getOwner().equals(a))
mybets.add(b);
}
return mybets;
}
COM: <s> get all the bets belonging to this owner in this list </s>
|
funcom_train/49790315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOuterExit() throws Exception {
IFile sitemap = beginAtSitemapThenPage("Unrelated Outer Page", "To Enter the Outer Scope");
assertNoProblem();
gotoSitemapThenPage(sitemap, "Unrelated Outer Page");
assertNoProblem();
// now try and exit; we are redirected
gotoSitemapThenPage(sitemap, "Home", "To Exit the Outer Scope");
assertNoProblem();
// but now we have visited, we can continue
gotoSitemapThenPage(sitemap, "Home");
assertNoProblem();
}
COM: <s> if we access a page in the outer scope we have to </s>
|
funcom_train/8222511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFuzzParameter(int index, Parameter parameter, FuzzSource fuzzSource, int priority) {
_logger.info("Adding a parameter at index " + index);
_fuzzParameters.add(index, parameter);
_fuzzSources.add(index, fuzzSource);
_parameterPriorities.add(index, new Integer(priority));
fireFuzzParameterAdded(index);
resetFuzzer();
}
COM: <s> adds the fuzz parameter </s>
|
funcom_train/43186038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void setProtocolPrefixList(Vector list) {
if (pm != null && mSetProtocolPrefixList != null) {
Object [] params = new Object[1];
params[0] = list.clone();
runMethod(mSetProtocolPrefixList, params);
protoPrefixList = getProtocolPrefixList();
} else
protoPrefixList = (Vector)list.clone();
}
COM: <s> set the protocol package prefix list </s>
|
funcom_train/25751555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLocationDestroyed(int loc) {
if (loc > entity.locations() || loc < 0) {
return false;
}
/*boolean blownOff = entity.isLocationBlownOff(loc);
entity.setLocationBlownOff(loc, false);
boolean isDestroyed = entity.isLocationBad(loc);
entity.setLocationBlownOff(loc, blownOff);
return isDestroyed;
*/
return entity.isLocationTrulyDestroyed(loc);
}
COM: <s> is the given location on the entity destroyed </s>
|
funcom_train/278639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isComplete() {
boolean complete = true;
if (databaseTitle == null || databaseTitle.length() == 0) {
complete = false;
}
if (tableFields.size() == 0) {
complete = false;
}
if (csvPath == null || csvPath.length() == 0) {
complete = false;
}
if (databasePath == null || databasePath.length() == 0) {
complete = false;
}
return complete;
}
COM: <s> validates all the information necessary to do an </s>
|
funcom_train/44876153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPackageNames() {
ContentDescription cd1 = new ContentDescription("foo/bar/my.properties", sessionCache);
assertEquals("Wrong package name", "foo.bar", cd1.getPackageName());
cd1 = new ContentDescription("some.properties", sessionCache);
assertEquals("Wrong package name", "" , cd1.getPackageName());
}
COM: <s> test that verifies that package names are calculated correctly </s>
|
funcom_train/23271261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCategoryAxisUpperMargin(double margin) {
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
if (plot != null) {
double old = plot.getDomainAxis().getUpperMargin();
plot.getDomainAxis().setUpperMargin(margin);
firePropertyChange("categoryAxisUpperMargin", old, margin);
}
}
COM: <s> sets the upper margin for the category axis and fires a </s>
|
funcom_train/35793611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushSymbolTable(SymbolTable st){
pushScope();
Map m = st.collapse();
Iterator i = m.keySet().iterator();
while(i.hasNext()){
String ident = (String) i.next();
KVariable kv = (KVariable) m.get(ident);
declareNew(kv);
assignTo(kv,KUnknownValue.get());
}
}
COM: <s> takes a symbol table and pushes all the variables in it as new </s>
|
funcom_train/41721634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setSolutionConstruction(ExpresserModel solutionConstruction) {
List<TiedNumberExpression<IntegerValue>> vars = solutionConstruction.getUnlockedNumbers();
if (vars == null || vars.size() == 0) {
throw new IllegalArgumentException("The solution should have at least one free (task) variable");
}
this.solutionConstruction = solutionConstruction.createCopyAndReplaceUnlockedTiedNumbersWithNewOnes();
}
COM: <s> sets the solution and the variables that can be modified </s>
|
funcom_train/34340167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSalirsinenviar() {
if (salirsinenviar == null) {//GEN-END:|25-getter|0|25-preInit
// write pre-init user code here
salirsinenviar = new Command("retroceder", Command.BACK, 0);//GEN-LINE:|25-getter|1|25-postInit
// write post-init user code here
}//GEN-BEGIN:|25-getter|2|
return salirsinenviar;
}
COM: <s> returns an initiliazed instance of salirsinenviar component </s>
|
funcom_train/21969104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeColor(Color color){
int index = indexOf(color);
if ( index != -1 ){
synchronized (this){
-- _currIndex;
for ( int i = index ; i < _currIndex ; i++){
_rHist[i] = _rHist[i + 1];
_gHist[i] = _gHist[i + 1];
_bHist[i] = _bHist[i + 1];
}
}
}
}
COM: <s> removes a color from the register </s>
|
funcom_train/27718166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateLayout(Rectangle innerArea) {
getColumns().validate(innerArea.x, innerArea.width);
getRows().validate(innerArea.y, innerArea.height);
// Indicate that the size of the cells are known for the container's
// current size
// setValid(true);
// oldWidth = innerArea.width;
// oldHeight = innerArea.height;
}
COM: <s> calculates the sizes of the rows and columns based on the absolute and </s>
|
funcom_train/39881021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder sb =
new StringBuilder("LDAPCertStoreParameters: [\n serverName: ");
sb.append(getServerName());
sb.append("\n port: ");
sb.append(getPort());
sb.append("\n]");
return sb.toString();
}
COM: <s> returns the string representation of this </s>
|
funcom_train/13629448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TreeObject getSelectedTreeObject(TreeViewer viewer) {
ISelection selection = viewer.getSelection();
if (!selection.isEmpty()) {
if (selection instanceof IStructuredSelection) {
Object object = ((IStructuredSelection) selection).getFirstElement();
if (object instanceof TreeObject) {
return (TreeObject) object;
}
}
}
return null;
}
COM: <s> returns the selected element in the tree viewer </s>
|
funcom_train/48045376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeriodFields withZeroesRemoved() {
if (isZero()) {
return ZERO;
}
TreeMap<PeriodUnit, PeriodField> copy = clonedMap();
for (Iterator<PeriodField> it = copy.values().iterator(); it.hasNext(); ) {
if (it.next().isZero()) {
it.remove();
}
}
return create(copy);
}
COM: <s> returns a copy of this period with all zero amounts removed </s>
|
funcom_train/13314440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(IsDef n, A argu) {
n.nodeToken.accept(this, argu);
n.nodeToken1.accept(this, argu);
n.scalarTypeNameCommalist.accept(this, argu);
n.nodeOptional.accept(this, argu);
n.derivedPossrepDeflist.accept(this, argu);
n.nodeToken2.accept(this, argu);
}
COM: <s> node token is </s>
|
funcom_train/7390298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Composite getButtonBoxControl(Composite parent) {
if (buttonBox == null) {
buttonBox = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
buttonBox.setLayout(layout);
createButtons(buttonBox);
buttonBox.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent event) {
addButton = null;
duplicateButton = null;
removeButton = null;
upButton = null;
downButton = null;
buttonBox = null;
}
});
} else {
checkParent(buttonBox, parent);
}
selectionChanged();
return buttonBox;
}
COM: <s> returns this field editors button box containing the add remove up </s>
|
funcom_train/19543538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeMap(Map<String, String> map, HierarchicalStreamWriter aWriter) {
for (String key : map.keySet()) {
String value = map.get(key);
if (value != null && (value = value.trim()).length() > 0) {
aWriter.startNode(key);
aWriter.setValue(value);
aWriter.endNode();
}
}
}
COM: <s> write the values in a map as actual nodes in an object </s>
|
funcom_train/41704261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getDouble(String attribute) {
try {
if (rs != null) {
return rs.getDouble(attribute);
} else {
throw new NullPointerException();
}
} catch (Exception ex) {
System.out.println("DB.getDouble() ran into an error " + ex.getMessage());
ex.printStackTrace();
}
throw new NullPointerException();
}
COM: <s> returns the double data under the stated column name </s>
|
funcom_train/29538433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonAskDouble() {
if (jButtonAskDouble == null) {
jButtonAskDouble = new JButton();
jButtonAskDouble.setIcon(askDouble);
jButtonAskDouble.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
toolbarHandler.buttonPressed(Button.AskDoubles);
}
});
}
return jButtonAskDouble;
}
COM: <s> this method initializes j button auto doubles </s>
|
funcom_train/18149459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocalRemoteControlStateCode(CE localRemoteControlStateCode) {
if(localRemoteControlStateCode instanceof org.hl7.hibernate.ClonableCollection)
localRemoteControlStateCode = ((org.hl7.hibernate.ClonableCollection<CE>) localRemoteControlStateCode).cloneHibernateCollectionIfNecessary();
_localRemoteControlStateCode = localRemoteControlStateCode;
}
COM: <s> sets the property local remote control state code </s>
|
funcom_train/47120562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String newPost(Post post, boolean publish) throws MwaConnectionException {
Object[] params = new Object[]{mwaConnectionConfig.getBlogid(), mwaConnectionConfig.getUsername(),
mwaConnectionConfig.getPassword(), post.getAttributeMap(), Boolean.valueOf(publish)};
return (String) execute("metaWeblog.newPost", params);
}
COM: <s> make a new post </s>
|
funcom_train/31225366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidChannel(String name) {
if (defaultChannel.equals(name) ||
(systemChannels != null && systemChannels.containsKey(name)) ||
(userChannels != null && userChannels.containsKey(name)) ||
name.length() > 12 || !name.matches("[\\w_-]+?")) {
return false;
}
return true;
}
COM: <s> checks to see if the channel can be created </s>
|
funcom_train/10497568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mark findMarkBefore(long time) throws NoSuchElementException {
if (LOG.isTraceEnabled()) {
LOG.trace("findMarkBefore(" + time + ")");
}
Mark last = marks.getFirst();
for (Mark m: marks) {
if (m.getTime() > time) {
break;
}
last = m;
}
if (LOG.isTraceEnabled()) {
LOG.trace("return " + last );
}
return last;
}
COM: <s> find the last mark in the skip list before time </s>
|
funcom_train/32947842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMonth( int value ) throws PropertyVetoException {
if ( value >= target.getMinimum( Calendar.MONTH ) && value <= target.getMaximum( Calendar.MONTH ) ) {
target.set( year, value, day, hour, minute, 0 );
month = value;
} else {
throw new PropertyVetoException( "cannot set month", new PropertyChangeEvent(
this, "target change", new Integer( month ), new Integer( value )
) );
}
}
COM: <s> sets the month </s>
|
funcom_train/35714368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void uninstall() {
Shell shell= fShell;
fShell= null;
if (Helper2.okToUse(shell))
shell.removeControlListener(this);
Control w= fViewer.getTextWidget();
if (Helper2.okToUse(w)) {
w.removeMouseListener(this);
w.removeFocusListener(this);
/*
* 1GGYYWK: ITPJUI:ALL - Dismissing editor with code assist up causes lots of Internal Errors
*/
w.removeDisposeListener(this);
}
fViewer.removeViewportListener(this);
}
COM: <s> uninstalls this closer from the viewers text widget </s>
|
funcom_train/44824852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String include (String exprName) throws QueryException {
QueryExpression qe = getQueryExprByName (exprName);
if (qe == null) {
QueryException qX = new QueryException ("Invalid query expression referenced: " + exprName);
setLastException (qX);
throw qX;
} else {
return include (qe);
}
}
COM: <s> include the query expression named expr name at this position in </s>
|
funcom_train/40007387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCourseService() {
System.out.println("getCourseService");
CourseService expResult = null;
CourseService result = ServiceFactory.getCourseService();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get course service method of class service factory </s>
|
funcom_train/35682346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void oneTimeSetUp() throws Exception {
_log.info("oneTimeSetup");
PoolingEngineConfig config = getPoolingEngineConfig();
_endpointName = config.getHostEndpoints().get(0).getName();
EngineHandler serverHandler = new EngineHandler(config);
serverHandler.init();
}
COM: <s> use with jmeter to setup engine only once for a metering session </s>
|
funcom_train/3640654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String checkPort(String port) {
try {
long p = Long.parseLong(port);
if ( p < 1024L ) {
return "Privileged (< 1024) ports are not allowed";
}
if ( p > 65535L ) {
return "Port number is too high (" + port + ")";
}
} catch ( Throwable t ) {
return "Bad port '" + port + "': not a number";
}
return "";
}
COM: <s> check if the port value is good enough </s>
|
funcom_train/26313542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEditable(boolean editable) {
// Update the correct control.
switch (option.getType()) {
case IOption.BOOLEAN:
checkbox.setEnabled(editable);
break;
case IOption.CHOICE:
choice.setEnabled(editable);
break;
default:
textField.setEnabled(editable);
break;
}
}
COM: <s> update the option component so that it is editable or view only </s>
|
funcom_train/3370807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAccessibleName() {
if (accessibleName != null) {
return accessibleName;
}
String cp = (String)getClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY);
if (cp != null) {
return cp;
}
int index = getSelectedIndex();
if (index >= 0) {
return pages.get(index).getAccessibleName();
}
return super.getAccessibleName();
}
COM: <s> returns the accessible name of this object or </s>
|
funcom_train/880641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBaseDNPropertyDescriptorGen(Object object) {
itemPropertyDescriptors.add
(new LDAPItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LDAPDirectory_baseDN_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_LDAPDirectory_baseDN_feature", "_UI_LDAPDirectory_type"),
LdapPackage.eINSTANCE.getLDAPDirectory_BaseDN(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the base dn feature </s>
|
funcom_train/32378842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getParamValueAsLong(String paramName) throws ParameterException{
Parameter param = getParameter(paramName);
if (param == null )
throw new ParameterException("Parameter not available", ClientConnectorConstants.PARAMETERS_NOT_AVAILABLE);
if (param.getType()!= Parameter.TYPE_LONG)
throw new ParameterException("Parameter type is not matching", ClientConnectorConstants.PARAMETERS_TYPE_NOT_MATCHING);
else
return ((Long)param.getValue()).longValue();
}
COM: <s> returns values of a parameter as primitive long </s>
|
funcom_train/43282512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IImageRegistry getImageRegistry() {
final Configuration configuration = ((Configuration) this);
if (imageRegistry == null) {
// get the resource loader
AbstractResourceLoader loader = configuration.getEditor()
.getResourceLoader().getImplementation();
String iconsFolder = getIconsFolder(((Configuration) this));
imageRegistry = new ImportingImageRegistry(loader, iconsFolder,
new JFaceImageRegistryAdapter(), Display.getDefault(),
(Configuration) this);
}
return imageRegistry;
}
COM: <s> get the image registry </s>
|
funcom_train/24118339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doShow2Weeks(Event event) throws InterruptedException {
this.cal.setMold("default");
btn_Show1Day.setStyle(btnOriginColor);
btn_Show5Days.setStyle(btnOriginColor);
btn_ShowWeek.setStyle(btnOriginColor);
btn_Show2Weeks.setStyle(btnPressedColor);
btn_ShowMonth.setStyle(btnOriginColor);
this.cal.setFirstDayOfWeek("monday");
this.cal.setDays(14);
try {
synchronizeModel();
} catch (ParseException e) {
e.printStackTrace();
}
}
COM: <s> changes the view for 2 weeks view </s>
|
funcom_train/2272707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare(Document doc) {
document = doc;
ut = new UsernameToken(wssConfig.isPrecisionInMilliSeconds(), doc,
passwordType);
ut.setName(user);
ut.setPassword(password);
String utId = "UsernameToken-" + ut.hashCode();
ut.setID(utId);
if (nonce) {
ut.addNonce(doc);
}
if (created) {
ut.addCreated(wssConfig.isPrecisionInMilliSeconds(), doc);
}
}
COM: <s> creates a username token </s>
|
funcom_train/20138911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tab getTab(ControlWindow theWindow, String theName) {
for (int i = 0; i < theWindow.tabs().size(); i++) {
if (((Tab) theWindow.tabs().get(i)).name().equals(theName)) {
return (Tab) theWindow.tabs().get(i);
}
}
Tab myTab = theWindow.add(new Tab(this, theWindow, theName));
return myTab;
}
COM: <s> get a tab by name from a specific controlwindow </s>
|
funcom_train/42959260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Note getEntity() {
try {
return (Note) em.createQuery("SELECT e FROM Note e where e.id = :id").setParameter("id", id).getSingleResult();
} catch (NoResultException ex) {
throw new WebApplicationException(new Throwable("Resource for " + uriInfo.getAbsolutePath() + " does not exist."), 404);
}
}
COM: <s> returns an instance of note identified by id </s>
|
funcom_train/27945526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean startFailed (IOException ex) {
Executor e = (Executor)choose (getExecutor (entry), Executor.class, ex);
if (e == null) {
return false;
} else {
try {
setExecutor (entry, e);
return true;
} catch (IOException exc) {
return false;
}
}
}
COM: <s> called when invocation of the executor fails </s>
|
funcom_train/8686678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTargetFinished(Target target, Throwable exception) {
BuildEvent event = new BuildEvent(target);
event.setException(exception);
Iterator iter = listeners.iterator();
while (iter.hasNext()) {
BuildListener listener = (BuildListener) iter.next();
listener.targetFinished(event);
}
}
COM: <s> send a quot target finished quot event to the build listeners </s>
|
funcom_train/17465117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setProject(File selectedFile) {
if (selectedFile.isDirectory()){
if (p == null){
p = new Project(selectedFile.getAbsolutePath());
}
else{
p.setProjectRoot(selectedFile.getAbsolutePath());
jtpt.removeAll();
}
}
else{
jtpt.addFileTab(selectedFile);
if (!selectedFile.exists()){
try {
selectedFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
COM: <s> action method for jfile chooser selection </s>
|
funcom_train/2877988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean onChildTerminated(TerminationRecord status, Prim comp) {
try {
sfRemoveChild(comp);
} catch (Exception e) {
if (sfLog().isErrorEnabled()) {
sfLog().error(sfCompleteNameSafe() + " - error handling child termination ", e);
}
}
return false;
}
COM: <s> if normal termination parallel behaviour is to terminate </s>
|
funcom_train/21500601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCurrentWorldRegion() {
MuMap newRegion = MuWorld.getInstance().getRegion(getM());
if (!newRegion.equals(_region)) {
if (_region != null) {
_region.removeVisibleObject(this);
}
newRegion.addVisibleObject(this);
_region = newRegion;
}
}
COM: <s> update maps after it changes </s>
|
funcom_train/39865761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int read() throws IOException {
if (offset == buffer.length) {
throw new ASN1Exception("Unexpected end of encoding");
}
if (in == null) {
return buffer[offset++] & 0xFF;
} else {
int octet = in.read();
if (octet == -1) {
throw new ASN1Exception("Unexpected end of encoding");
}
buffer[offset++] = (byte) octet;
return octet;
}
}
COM: <s> reads the next encoded byte from the encoded input stream </s>
|
funcom_train/19725824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void widgetSelected(SelectionEvent e) {
if(e.widget == cbAll){
if(((Button)e.widget).getSelection() == true)
selectAll();
else
selectNone();
}else if(e.widget == cbNone){
if(((Button)e.widget).getSelection() == true)
selectNone();
else
selectAll();
}else if(getViewLevel()==NONE){
cbNone.setSelection(true);
}else if(getViewLevel()==ALL){
cbAll.setSelection(true);
}else{
cbNone.setSelection(false);
cbAll.setSelection(false);
}
notifyViewLevelListeners();
}
COM: <s> change the view level and notify all the listeners </s>
|
funcom_train/9437523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateIndex() {
String oldStr = "create index message_" + MessageColumns.TIMESTAMP
+ " on " + Message.TABLE_NAME + " (" + MessageColumns.TIMESTAMP + ");";
String newStr = EmailProvider.createIndex(Message.TABLE_NAME, MessageColumns.TIMESTAMP);
assertEquals(newStr, oldStr);
}
COM: <s> test for email provider </s>
|
funcom_train/24060597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Secrets ( Utf8String userid, Utf8String password, Utf8String notes ) {
// must create an empty instance before processing the String
this();
// validate the arguments before creating the fields
validateUserid( userid.getValue() ); // throws IAE
validatePassword( password.getValue() ); // throws IAE
this.userIdentity = userid;
this.password = password;
this.notes = notes;
// finally, build the content of this instance from the components
buildContent();
}
COM: <s> fast path secrets constructor used internally but also by </s>
|
funcom_train/18671146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table getTable(String tableName) {
if (tableName == null) {
return null;
}
Iterator iter = schemaComponents.iterator();
while (iter.hasNext()) {
Object o = iter.next();
if (o instanceof Table) {
Table tbl = (Table) o;
if (tableName.equals(tbl.getName())) {
return tbl;
}
}
}
return null;
}
COM: <s> returns the table with a name of code table name code </s>
|
funcom_train/512936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAllDataInAllUsedTables(EntityManager em) {
log.debug("deleteAllDataInAllUsedTables");
EntityTransaction tx = em.getTransaction();
tx.begin();
List<String> oneDeleteAllStatement = this.getOneDeleteAllStatement();
for (String currentdelete : oneDeleteAllStatement) {
log.debug("currentDelete=" + currentdelete);
Query query = em.createQuery(currentdelete);
query.executeUpdate();
}
tx.commit();
}
COM: <s> deteltes all data in all used tables </s>
|
funcom_train/36206080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuItem createProcessingMenu() {
MenuItem processingMenu = new MenuItem("menuProcessing");
processingMenu.addItem("menuItemSchedule", "/ScheduleSearch.faces?event=SEARCH");
processingMenu.addItem("menuItemHarvestMonitoring", "/HarvestMonitoringSearch.faces?event=SEARCH");
processingMenu.addItem("menuItemProcessingResult", "/ProcessingResultSearch.faces?event=SEARCH");
processingMenu.addItem("menuItemScheduleManagerAgent", "/ScheduleManagerAgent.faces");
return processingMenu;
}
COM: <s> create and configure the schedule menu </s>
|
funcom_train/27947894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLevels(double levels[], int nl) {
int i;
if( levels == null || nl <= 0 )
return;
detachCurves();
curves = null;
autoLevels = false;
this.levels = new double[nl];
System.arraycopy(levels,0,this.levels,0,nl);
labels = new TextLine[nl];
for(i=0; i<labels.length; i++) {
labels[i] = new TextLine( String.valueOf( (float)levels[i] ) );
}
}
COM: <s> manually set the contour levels </s>
|
funcom_train/7659552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getCharIndex(char ch){
int index = INDEX_EUROPEAN;
for (int i=0; i < MAX_INDEX; i++){
int j = i * 2;
if (scriptsRanges[j] <= ch && ch <= scriptsRanges[j+1]){
return i;
}
}
return index;
}
COM: <s> returns the index of the script of the specified char </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.