__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/14056607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRenderableToLineCheckStyle(RElement renderable, HTMLElementImpl element, boolean usesAlignAttribute) {
if(this.addElsewhereIfPositioned( renderable, element, usesAlignAttribute, true, true)) {
return;
}
renderable.layout(this.availContentWidth, this.availContentHeight, this.sizeOnly);
this.addRenderableToLine(renderable);
}
COM: <s> checks property float and in some cases attribute align </s>
|
funcom_train/13390656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getTopLineValue() {
double topLineValue = mean + 3 * stdDev;
topLineValue = Math.max(topLineValue, max);
if(!Double.isNaN(highThreshold)) {
topLineValue = Math.max(topLineValue, highThreshold);
}
return topLineValue;
}
COM: <s> get the value for the top y axis </s>
|
funcom_train/18894704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
try {
Mp3Player player = getMp3Player();
if (player.getState() == Mp3Player.STOPPED) {
player.playFiles(getPlayList());
}
else if (player.getState() == Mp3Player.PAUSED) {
player.resumePlayback();
}
}
catch (Exception exception) {
ExceptionHandler.handleException(exception);
}
}
COM: <s> plays pauses or resumes the file depending on player state </s>
|
funcom_train/7891824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendLockResponse(ActiveLock lock) throws IOException {
CodedUrlHeader ltHeader = new CodedUrlHeader(
DavConstants.HEADER_LOCK_TOKEN, lock.getToken());
httpResponse.setHeader(ltHeader.getName(), ltHeader.getValue());
DavPropertySet propSet = new DavPropertySet();
propSet.add(new LockDiscovery(lock));
sendXmlResponse(propSet, SC_OK);
}
COM: <s> send response body for a lock request intended to create a new lock </s>
|
funcom_train/16886351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Link xml2Link(Element linkElement) {
Link link = BPELFactory.eINSTANCE.createLink();
link.setElement(linkElement);
// Save all the references to external namespaces
saveNamespacePrefix(link, linkElement);
Attr name = linkElement.getAttributeNode("name");
if (name != null && name.getSpecified())
link.setName(name.getValue());
xml2ExtensibleElement(link, linkElement);
return link;
}
COM: <s> converts an xml link element to a bpel link object </s>
|
funcom_train/48407016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSuccessorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WorkSequence_successor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WorkSequence_successor_feature", "_UI_WorkSequence_type"),
SpemxtcompletePackage.eINSTANCE.getWorkSequence_Successor(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the successor feature </s>
|
funcom_train/24178137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showSelected() {
if (this.getFigure().getBorder() == null) {
showSelected = true;
BoundsRefreshment.refreshBounds(this, this.getSize().width + 2, 47);
RoundedRectangleBorder border = new RoundedRectangleBorder(10, 10);
border.setWidth(2);
border.setColor(ColorConstants.orange);
this.getFigure().setBorder(border);
this.getFigure().repaint();
}
}
COM: <s> it will also show procedure highlighted if its linked to any handler </s>
|
funcom_train/35099995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertEquals( String message , float expected , float actual , float delta ) {
if ( Float.compare(expected, actual) == 0 )
return;
if ( !( Math.abs(expected - actual) <= delta ) )
failNotEquals(message, new Float(expected), new Float(actual));
}
COM: <s> asserts that two floats are equal concerning a positive delta </s>
|
funcom_train/48666940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateContext() {
if(context == null || (!context.isValid() && context.getAgentId() == null) ||
(context.isValid() && context.getRepresentation() != ResourceId.AGENT)) {
throw new IllegalArgumentException("The context " + context + " must represent an agent");
}
}
COM: <s> validates the context as providers only exists for agents </s>
|
funcom_train/49793863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String post(String url) {
// Prepare the request
Request request = new Request(Method.POST, url);
request.setReferrerRef("http://www.hackystat.org");
// Handle it using an HTTP client connector
Client client = new Client(Protocol.HTTP);
Response response = client.handle(request);
if (response.getStatus().isSuccess()) {
return Boolean.TRUE.toString();
}
else {
return response.getStatus().getDescription();
}
}
COM: <s> performs an http post of the passed url </s>
|
funcom_train/15914539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertRow( int row ) {
itemEditor.setItem( new Item( new Properties(), "",
new Arc("","",""),new Properties()) );
itemEditor.setRow( row );
itemEditor.setInsert( true );
itemEditor.setVisible( true );
}
COM: <s> insert new row in table i </s>
|
funcom_train/47677772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInboudEndpoit(BeanWrapperElement p_inboudEndpoit) {
this.inboundEndpoint = p_inboudEndpoit;
this.workflow = inboundEndpoint.getCurrentWorkflow();
if (inboundEndpoint.getCurrentWorkflow() != null) {
wfName = inboundEndpoint.getCurrentWorkflow().getName();
}
if (serviceName == null) {
serviceName = inboundEndpoint.getName();
}
}
COM: <s> the method set the inbound endpoint element </s>
|
funcom_train/50939996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getXsltInputStream(){
if (xsltName == null || plugin == null){
return null;
}
File transformFile = new File(plugin.getBaseDirectory(), xsltName);
InputStream xsltStream = null;
if (transformFile.exists()){
try {
xsltStream = new FileInputStream(transformFile);
} catch (Exception e){
}
} else {
ClassLoader loader = plugin.getClassLoader();
xsltStream = loader.getResourceAsStream(xsltName);
}
return xsltStream;
}
COM: <s> is the new from message action supported </s>
|
funcom_train/5865165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeItemFromSelection(Treeitem item) {
if (item.getTree() != this)
throw new UiException("Not a child: "+item);
if (item.isSelected()) {
if (!_multiple) {
clearSelection();
} else {
item.setSelectedDirectly(false);
_selItems.remove(item);
smartUpdateSelection();
if (fixSelected())
smartUpdate("z.selId", getSelectedId());
//No need to use response because such info is carried on tags
}
}
}
COM: <s> deselects the given item without deselecting other items </s>
|
funcom_train/8339355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAndRemoveChild() throws Exception {
ColumnInfo ci = new ColumnInfo("label");
assertEquals(0, renderer.getChildren().size());
renderer.addChild(ci, 0);
assertEquals(ci, renderer.getChildren().get(0));
renderer.removeChild(ci);
assertEquals(0, renderer.getChildren().size());
}
COM: <s> tests that children can be added to and removed from a result set </s>
|
funcom_train/272935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User login(final String login, final String password) {
User user = userRepository.findUserByLogin(login);
// compare the two passwords, if a user is found
if (user != null && password.equals(user.getPassword())) {
// if a user is found, the password is remove from the instance variable
user.setPassword("password not show for security reason");
} else {
user = null;
}
return user;
}
COM: <s> return the user corresponding to he login and password or null if any </s>
|
funcom_train/44852435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void preCheck(String inQuestion, String inRemark) {
//pre: Question must be set
Assert.assertTrue(AssertLevel.ERROR, this, "preCheck", !"".equals(inQuestion));
//pre: Remark must be set
Assert.assertTrue(AssertLevel.ERROR, this, "preCheck", !"".equals(inRemark));
}
COM: <s> asserts the existence of mandatory input </s>
|
funcom_train/43245007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStateFullName() {
System.out.println("getStateFullName");
StateObject instance = new StateObject();
String expResult = "";
String result = instance.getStateFullName();
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 state full name method of class org </s>
|
funcom_train/32151748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createVocabulary1Group() {
PaletteGroup paletteContainer = new PaletteGroup(
Messages.Vocabulary1Group_title);
paletteContainer.setId("createVocabulary1Group"); //$NON-NLS-1$
paletteContainer.add(createClass1CreationTool());
paletteContainer.add(createProperty2CreationTool());
paletteContainer.add(createOperation3CreationTool());
paletteContainer.add(createEvent4CreationTool());
paletteContainer.add(createGeneralization5CreationTool());
paletteContainer.add(createContainment6CreationTool());
paletteContainer.add(new PaletteSeparator());
paletteContainer.add(createDataType8CreationTool());
paletteContainer.add(createEnumeration9CreationTool());
return paletteContainer;
}
COM: <s> creates vocabulary palette tool group </s>
|
funcom_train/3056136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasicSessionUsage() throws Throwable {
prepare();
Session s = null;
Transaction txn = null;
try {
s = getSessionUnderTest();
txn = s.beginTransaction();
s.createQuery( "from Silly" ).list();
txn.commit();
}
catch( Throwable t ) {
if ( txn != null ) {
try {
txn.rollback();
}
catch( Throwable ignore ) {
}
}
}
finally {
if ( s != null && s.isOpen() ) {
try {
s.close();
}
catch( Throwable ignore ) {
}
}
}
done();
}
COM: <s> test that the basic session usage template works in all environment </s>
|
funcom_train/9381575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sendNiResponse(int notifId, int userResponse) {
try {
return mService.sendNiResponse(notifId, userResponse);
} catch (RemoteException e) {
Log.e(TAG, "RemoteException in sendNiResponse: ", e);
return false;
}
}
COM: <s> used by net initiated activity to report user response </s>
|
funcom_train/19153383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetByKeyFailureNotAvailableAfterRemove() {
IEntity fake = createTestObject(1);
prepareCreate(fake);
replay(factory);
container.create();
container.remove(fake);
try {
container.get(fake.getKey());
fail();
} catch (IllegalArgumentException expected) {
assertEquals("object with key " + fake.getKey()
+ " is not contained in this container", expected
.getMessage());
}
}
COM: <s> tests that after an object is removed an exception is thrown when </s>
|
funcom_train/6211950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modifyLookupAttributes( Entry[] attrSetTemplates, Entry[] attrSets ) throws UnexpectedException {
service.getJoinManager().modifyAttributes( attrSetTemplates, attrSets, true );
try {
service.attributesCheckpoint();
} catch (PersistentException e) {
throw new UnexpectedException( "Cannot modify attributes persistently.", e );
}
}
COM: <s> modifies the set of attributes associated with the services </s>
|
funcom_train/27809267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String unparse(Line in) {
if (in.orig != null) {
return in.orig;
}
else {
StringBuffer ret = new StringBuffer();
/* PENDING: This could be optimised out */
for (int i = 0; i < in.tokens.length; i++) {
int id = in.tokens[i];
if (id == INVALID_TOKEN_ID) {
ret.append(in.special[i]);
}
else {
ret.append(TOKENS[id]);
}
}
return ret.toString();
}
}
COM: <s> recombine a parsed line </s>
|
funcom_train/29849297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getNodeHeight(Node n) {
if (AttributeHelper.isHiddenGraphElement(n))
return 0;
DimensionAttribute dimAttr =
(DimensionAttribute) n.getAttribute(DIMENSIONSTR);
double result = 0.0;
if ((treeDirection == 90) || (treeDirection == 270)) {
result = dimAttr.getDimension().getWidth();
} else {
result = dimAttr.getDimension().getHeight();
}
return result;
}
COM: <s> return the height dimension of the given node n </s>
|
funcom_train/28352676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStopperSettings( final double minDuration, final double maxDuration, final double targetSatisfaction ) {
if ( minDuration != _minSolveTime ) {
_minSolveTime = minDuration;
}
if ( maxDuration != _maxSolveTime ) {
_maxSolveTime = maxDuration;
}
if ( targetSatisfaction != _targetSatisfaction ) {
_targetSatisfaction = targetSatisfaction;
}
_eventProxy.stopperChanged( this );
}
COM: <s> set the minimum solving time </s>
|
funcom_train/21995962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTypeForId(int mime_id) throws BusException {
String mime_type = (String)mime_type_map.get( new Integer(mime_id) );
if (mime_type == null)
throw new BusException("mime id " + mime_id + " not recognized");
return mime_type;
}
COM: <s> obtain a mime id string by mime id primitive int </s>
|
funcom_train/35704316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJUpdateButton() {
if (jUpdateButton == null) {
jUpdateButton = new JButton();
jUpdateButton.setText("Update");
jUpdateButton.setPreferredSize(new Dimension(74, 26));
jUpdateButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
updateData();
}
});
}
return jUpdateButton;
}
COM: <s> this method initializes j update button </s>
|
funcom_train/42850334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Symbol getSymbol(int i) {
if (i >= 0 && i < this.size()) {
return this.get(i);
}
else {
throw new ArrayIndexOutOfBoundsException("Unable to get the symbol at the index " + i
+ ", the string length " + this.size() + "!");
}
}
COM: <s> return symbol at the position specified </s>
|
funcom_train/28763305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPriority(java.lang.Integer value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_Priority, jj_Priority,kk_Priority, com.intersys.objects.Database.RET_PRIM, "Priority", dh);
return;
}
COM: <s> sets new value for code priority code </s>
|
funcom_train/25647301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeTransitions() {
/* NOTE: this does not realy remove transitions from this model, only notifies
* the transition that it is removed. If you want
*/
for (Iterator<Transition> it = this.getFunctionalModel().getTransitions(); it.hasNext();) {
Transition t = it.next();
t.onRemove();
}
}
COM: <s> this notifies transitions of this model that they are removed </s>
|
funcom_train/31188454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteDir (File f) {
File [] contents = f.listFiles();
for (int i = 0 ; i < contents.length; i++) {
if (!contents[i].delete()) {
System.out.println(" unable to delete " + contents[i]) ;
}
}
if (!f.delete()) {
System.out.println("Error deleting directory " + f);
}
}
COM: <s> recursive deletes the directory tree under file f </s>
|
funcom_train/19780624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String help(String command) throws IOException, FTPException {
String reply = control.sendCommand("HELP " + command);
String[] validCodes = { "211", "214" };
lastValidReply = control.validateReply(reply, validCodes);
return lastValidReply.getReplyText();
}
COM: <s> get the help text for the specified command </s>
|
funcom_train/20080150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActivePage(int page) {
if (page != activePage && page > 0 && page <= pages) {
LoadConfig config = getLoadConfig();
config.start = --page * pageSize;
config.limit = pageSize;
loader.load(config);
} else {
pageText.setText(String.valueOf((int) activePage));
}
}
COM: <s> sets the active page </s>
|
funcom_train/3907994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlayCompleted(Play play) {
DataElement completeUnitOfLearning = getCompleteUnitOfLearningDataElement();
// Ensure "complete-unit-of-learning" element exists
Element element = completeUnitOfLearning.createElement();
// Add it
addRef(play, element, LD_Core.WHEN_PLAY_COMPLETED, LD_Core.REF);
}
COM: <s> add a play reference for complete unit of learning when play completed </s>
|
funcom_train/10482742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() throws MessagingException {
// some mail servers mark retrieved messages for deletion
// automatically. This will reset the read flags before
// we go through normal cleanup.
if (props.getBooleanProperty(MAIL_RESET_QUIT, false)) {
// just send an RSET command first
sendCommand("RSET");
}
}
COM: <s> perform a reset on the mail server </s>
|
funcom_train/461141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHeader(String headerName) {
return getHeader(headerName, 0);
// if (headerName == null)
// return null;
// String lcHeaderName = headerName.toLowerCase();
//
// for (int i=0; i<headers.size(); i++) {
// if (lcHeaderName.equals(headers.get(i).lcname))
// return headers.get(i).name + ": " + headers.get(i).value;
// }
// return null;
}
COM: <s> get first header with name header name </s>
|
funcom_train/24121288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream out) throws IOException {
// first word: start
WMFConstants.writeLittleEndian(out, start);
// Second word: number of entries
WMFConstants.writeLittleEndian(out, (short)paletteEntries.length);
// variable length: The palette entries
for(int i=0; i<paletteEntries.length; i++) {
paletteEntries[i].write(out);
}
}
COM: <s> writes the palette object to a stream </s>
|
funcom_train/27899890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickButtonWithText(String buttonValueText) {
HtmlElement b = getButtonWithText(buttonValueText);
if (b != null) {
try {
b.click();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
else {
throw new RuntimeException("No button found with text: " + buttonValueText);
}
}
COM: <s> clicks the first button that contains the specified text as its label </s>
|
funcom_train/6322041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class Rotator implements RendezvousFunction {
/** Rotate the array **/
public void rendezvousFunction(Object[] objects) {
int lastIdx = objects.length - 1;
Object first = objects[0];
for (int i = 0; i < lastIdx; ++i) objects[i] = objects[i+1];
objects[lastIdx] = first;
}
}
COM: <s> the default rendezvous function </s>
|
funcom_train/46575574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getScrollableStyles(NamedNodeMap nnm, int def) {
int style = getControlStyles(nnm, def); // all Scrollables are controls
style |= getAttributeBool(nnm, "h_scroll", false) ? SWT.H_SCROLL : 0;
style |= getAttributeBool(nnm, "v_scroll", false) ? SWT.V_SCROLL : 0;
return style;
}
COM: <s> styles common to all scrollables </s>
|
funcom_train/8685810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void check() {
if (type == null) {
throw new BuildException(
"classname attribute must be set for provider element",
getLocation());
}
if (type.length() == 0) {
throw new BuildException(
"Invalid empty classname", getLocation());
}
}
COM: <s> check if the component has been configured correctly </s>
|
funcom_train/38788259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHostName() {
if(serverType.length() == 0 || serverHost.length() == 0 || port.length() == 0) return null;
if(serverType.equals(RDBSettings.SERVER_TYPE_MYSQL)){
this.hostName = "jdbc:mysql://" + serverHost + ":" + port + "/mysql";
}
return hostName;
}
COM: <s> this should called only from code rdbconnection code only </s>
|
funcom_train/1156614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StyledDocument reParse(StyledDocument doc) {
DefaultStyledDocument cache = new SequenceStyledDocument();
BufferedStyledDocumentBuilder builder = new BufferedStyledDocumentBuilder(cache);
try {
nonRecursiveReparse(doc.getDefaultRootElement(), doc, builder);
} catch (BadLocationException ex) {
ex.printStackTrace();
}
builder.commit();
return cache;
}
COM: <s> reparses the given document to uniformize </s>
|
funcom_train/12835962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnySuccessTrue() {
_support = new DispatcherSupport(DispatcherSupport.ANY_SUCCESS, 2, _mainDispatcher);
_support.failure(null);
assertNull(_mainResult);
_support.success(null);
assertNotNull(_mainResult);
assertEquals(new Boolean(true), _mainResult);
}
COM: <s> tests any success mode when first client succeeded </s>
|
funcom_train/31740549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenu createHelpMenu() {
JMenu help = GuiFactory.createMenu(resources, "help");
JMenuItem about = GuiFactory.createMenuItem(resources, "about");
about.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new AboutBox(AdminFrame.this).setVisible(true);
}
});
help.add(about);
return help;
}
COM: <s> create help menu </s>
|
funcom_train/47675484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRoot(MsgElement rootNode) {
// set the root node in the defaultTreeModel
super.setRoot(rootNode);
// and the local variable
root = rootNode;
//inform the view about changes
if (root != null) {
nodeChanged(root);
// getTree().setSelectionPath(new TreePath(rootNode.getPath()));
}
}
COM: <s> set the root element of the jtree </s>
|
funcom_train/5340988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createTreePanel(ResultPanel results) {
BrowseTree tree = ((BrowseResultPanel)results).getBrowseTree();
tree.setBrowseTreeListener(new BrowseTreeListener() {
public void show() {
_showBrowseTree = true;
removeAll();
addBoxes();
invalidate();
revalidate();
repaint();
}
public void selectionChanged() {
for (int i = 0; i < BOXES.length; i++) {
// for now...
BOXES[i].clearSelection();
}
}
});
return tree.getTree();
}
COM: <s> creates a new panel showing the directory structure of the remote host </s>
|
funcom_train/36048619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public int getBytes(int srcPos, byte[] dest, int destPos, int length) throws IOException {
if (_data.length <= srcPos || srcPos < 0)
throw new IOException("Out of range");
int count= length;
if (_data.length <= srcPos + length)
count= _data.length - srcPos;
System.arraycopy(_data, srcPos, dest, destPos, count);
return count;
}
COM: <s> copy up to length bytes into dest </s>
|
funcom_train/21474905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean existeTabela(String tabela, boolean caseSensitive) throws MigratoolException {
if (!caseSensitive) {
tabela = tabela.toUpperCase();
}
ResultSet tableNames = null;
try {
tableNames = getTablesResultSet(tabela);
while (tableNames.next()) {
if (tableNames.getString("TABLE_NAME").equals(tabela)) {
return true;
}
}
} catch (SQLException e) {
e.printStackTrace();
throw new MigratoolException(e);
}
return false;
}
COM: <s> verifica se uma determinada tabela existe </s>
|
funcom_train/28349185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSPValueAsString() {
if(Double.isNaN(_spVal)) return "NaN";
NumberFormat fieldFormat = null;
double val = getSPValue();
if (Math.abs(val) > 10000. || Math.abs(val) < 0.01)
fieldFormat = scientificFormat;
else
fieldFormat = floatFormat;
return fieldFormat.format(val);
//return _spVal;
}
COM: <s> get the setpoint pv value as a string representation </s>
|
funcom_train/37777238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeChildren() {
Collection col = getChildren();
if ( col != null && !col.isEmpty() ) {
int i = m_children.size();
for (Iterator itr = col.iterator(); itr.hasNext();) {
itr.next();
itr.remove();
}
return i != m_children.size();
} else
return false;
}
COM: <s> remove all children </s>
|
funcom_train/18381250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getLocationOnScreen() {
if(root instanceof JFrame)
return ((JFrame)root).getLocationOnScreen();
else if(root instanceof JApplet)
return ((JApplet)root).getLocationOnScreen();
else if(root instanceof JWindow)
return ((JWindow)root).getLocationOnScreen();
else if(root instanceof JDialog)
return ((JDialog)root).getLocationOnScreen();
return null;
}
COM: <s> gets the location of the wrapped component in the form of a point </s>
|
funcom_train/7284795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
if (running) {
LOG.error("DaapServerNIO is already running.");
return;
}
selector = Selector.open();
ssc.register(selector, SelectionKey.OP_ACCEPT);
process();
} catch (IOException err) {
LOG.error(err);
throw new RuntimeException(err);
} finally {
close();
}
}
COM: <s> the run loop </s>
|
funcom_train/18113387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
if (isInited)
return;
if (progressListeners == null)
progressListeners = new Vector();
/**
* I dunno if this construct is the correct way of doing it. But its needed
* to be done somehow. Another idea is to let FilterManager have a
* isEnabled method.
*
*/
if (filterManager != null) {
if (getStandardMailbox(MailAccount.INBOX) != null) {
getStandardMailbox(MailAccount.INBOX).addMessageListener(
filterManager);
}
}
isInited = true;
}
COM: <s> method to init the mailaccount </s>
|
funcom_train/11301375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test13() {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
long ticks = 11142L * 86400000L;
String formatted = df.format(new Date(ticks));
int millisecondStart = CachedDateFormat.findMillisecondStart(ticks, formatted, df);
assertEquals(CachedDateFormat.NO_MILLISECONDS, millisecondStart);
}
COM: <s> check pattern location for date </s>
|
funcom_train/15487603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void highlightText(ResultTreeNode matches) {
ResultTreeNode node;
highlighter.removeAllHighlights();
for (Enumeration e = matches.depthFirstEnumeration(); e.hasMoreElements() ;) {
try {
node = (ResultTreeNode)e.nextElement();
highlighter.addHighlight(node.getIndexStart(), node.getIndexEnd(), highlightPainter);
}
catch (Exception evt) { evt.printStackTrace(); }
}
}
COM: <s> highlight text highlights text with the matches informations stored in the result tree </s>
|
funcom_train/24642515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRepresentable(ProbabilityFormula formula){
if(!this.rPredicates.containsAll(formula.getRPredicates())) return false;
if(!this.sPredicates.containsAll(formula.getSPredicates())) return false;
if(!this.getConstants().containsAll(formula.getConstants())) return false;
return true;
}
COM: <s> checks whether the given probability formula can be represented by this signature </s>
|
funcom_train/50803228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector all() {
System.out.println("XMLRPC: house.all()");
try {
Vector v = new Vector();
ToXmlRpcValueVisitor visitor = new ToXmlRpcValueVisitor(true);
for (Iterator it = data.getAllHouses().iterator(); it.hasNext();) {
((House)it.next()).visit(visitor);
v.add(visitor.popResult());
}
return v;
} catch (RuntimeException e) {
e.printStackTrace();
throw e;
}
}
COM: <s> retrieve all houses </s>
|
funcom_train/29918200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopNonAdminCardWaitingThreads(){
signalStopNonAdmin();
while(getCardInsertionRunnable().isRunning() ||
getCardRemovalRunnable().isRunning() ){
try {
LocalLog.debug("Waiting for all threads to stop " + (getCardInsertionRunnable().isRunning()) + (getCardRemovalRunnable().isRunning()));
signalStopNonAdmin();
Thread.sleep(100);
} catch (InterruptedException e) {
}
}
LocalLog.debug("Waiting non admin threads stopped");
}
COM: <s> methods that waits for all card waiting threads to stop </s>
|
funcom_train/47704973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int startAllService(String databaseName, Map modules) {
String heartbeat_start = (String) modules.get("heartbeat_start");
StringBuffer context = HAModuleReader.shellHead(modules, this.server
.getIp(), "root", this.server.getRootpassword());
context.append(heartbeat_start + SystemConst.LINE_SEPERATOR);
HAModuleReader.shellTail(modules, context, "start_heartbeat"
+ this.server.getHostname());
return 0;
}
COM: <s> start the service of heartbeat </s>
|
funcom_train/39401039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonOK() {
if (jButtonOK == null) {
jButtonOK = new JButton();
jButtonOK.setPreferredSize(new Dimension(100,25));
jButtonOK.setText(parent.getI18N().translate(parent.getI18N().translate("Sluiten")));
jButtonOK.setMnemonic(KeyEvent.VK_S);
jButtonOK.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dispose();
}
});
}
return jButtonOK;
}
COM: <s> this method initializes j button ok </s>
|
funcom_train/20876536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JenrlConstraint jenrlConstraint(Lecture another) {
/*
* for (Enumeration e=iJenrlConstraints.elements();e.hasMoreElements();)
* { JenrlConstraint jenrl = (JenrlConstraint)e.nextElement(); if
* (jenrl.another(this).equals(another)) return jenrl; } return null;
*/
return iJenrlConstraintsHash.get(another);
}
COM: <s> all jenrl constraints of this lecture </s>
|
funcom_train/28635810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BandwidthResource getBandwidthResource(FcData fcData, int channelId) {
BandwidthResource bwResource = null;
if (fcData.bwResources.length > 0) {
while (channelId >= fcData.bwResources.length) {
channelId--;
}
bwResource = fcData.bwResources[channelId];
}
if (bwResource == null) {
return getParentBandwidthResource(fcData, channelId);
} else {
return bwResource;
}
}
COM: <s> search nodes including itself along the parent path for </s>
|
funcom_train/48031410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getObject(String key, NDbm2ObjectReader rdr) throws NDbmException {
try {
Blob data = readBlob(key);
if (data == null) {
rdr.nildata();
} else {
NDbmByteArrayInputStream bin = new NDbmByteArrayInputStream(data.getData());
NDbmDataInputStream din = new NDbmDataInputStream(bin);
readObject(din, rdr);
}
} catch (Exception E) {
throw new NDbmException(E);
}
}
COM: <s> reads an object from ndbm2 under given key recursable function </s>
|
funcom_train/18056855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public boolean addEdge(Edge e) {
//
// Node n1 = (Node) e.getSourceNode();
// Node n2 = (Node) e.getTargetNode();
// if (m_edges.contains(e)) {
// return false;
// }
// n1.addEdge(e);
// n2.addEdge(e);
//
// m_edges.add(e);
// fireEdgeAdded(e);
// return true;
// } //
COM: <s> add an edge to this graph </s>
|
funcom_train/29311887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegionList calculateAllNonCompRegions(Collection objects) {
synchronized (vertices) {
RegionList result = new RegionList();
result.add(new Region(new HashSet(), new HashSet()));
calculateRegions(result, new HashSet(0), vertices.size() - 1, vertices, false,
vertices.size() / 2, objects);
return result;
}
}
COM: <s> this method calculates all non complementary regions of this graph </s>
|
funcom_train/10547402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidAlgorithmName() throws SQLException {
setDatabaseProperty(BUILTIN_ALGO_PROP, "not-a-valid-name");
for (int i = 0; i < USERS.length; i++) {
try {
setDatabaseProperty(USER_PREFIX + USERS[i], "abcdef");
fail();
} catch (SQLException sqle) {
assertSQLState(NO_SUCH_ALGO, sqle);
}
}
}
COM: <s> derby 4483 test that we fail gracefully if an invalid algorithm name </s>
|
funcom_train/40296563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isAccessCookiePresent(HttpServletRequest request) {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
Cookie cookie = cookies[i];
if (cookie != null && cookie.getName().equals(ACCESS_TOKEN)) {
return true;
}
}
}
return false;
}
COM: <s> checks if the access token cookie is present with a non empty value </s>
|
funcom_train/41165646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoParagraphCheckList entity) {
EntityManagerHelper.log("saving CoParagraphCheckList 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 co paragraph check list </s>
|
funcom_train/13476969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(K key, V value) {
if (super.put(key, new CacheLine<K, V>(key, value)) == null
&& super.size() >= nbElementsMax)
clean(timeCleaningfactor);
//System.out.println("I put " + key);
//System.out.println(((Vector)value).size() + " " + ((Vector)value).elementAt(0).getClass());
}
COM: <s> maps the specified key to the specified value in this cache </s>
|
funcom_train/17679568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int createAlias(int index) {
if (mergedWith != null) {
index = mergedWith.createAlias(index);
selectExp.alias = mergedWith.selectExp.alias;
}
index = selectExp.createAlias(index);
if (exp != null) {
return exp.createAlias(index);
} else {
return index;
}
}
COM: <s> create an aliases for any tables we may have </s>
|
funcom_train/38328180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAssociation(Class clazz, Deftemplate template) throws TemplateAssociationException {
if (this.defclass.containsKey(clazz)) {
throw new TemplateAssociationException(clazz.getName() +
" has already been declared. Cannot add association");
} else {
Defclass dclass = (Defclass)this.templateToDefclass.get(template.getName());
this.defclass.put(clazz, dclass);
this.classToTemplate.put(clazz, template);
}
}
COM: <s> in situations where the domain model uses jaxb style objects </s>
|
funcom_train/20788425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addClass(String className, Vector<Point2D> template) {
int index = addClass(className);
Vector<Point2D> newPoints = new Vector<Point2D>();
GestureUtils.resample(template, getNbPoints(), newPoints);
GestureUtils.scaleToSquare(newPoints, getSizeScaleToSquare(), newPoints);
GestureUtils.translateToOrigin(newPoints, newPoints);
templates.set(index, newPoints);
}
COM: <s> adds a class and set the template for this class </s>
|
funcom_train/26279623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContact() {
try {
MetaProperty mp=(MetaProperty)get(This, ".contact", null, FROM_CACHE_ONLY);
return mp.getValue().getData().getInfo();
} catch(AccessControlException x) {
} catch(UnknownKeyException x) { }
return null;
}
COM: <s> convenience function contact is actually stored as a property </s>
|
funcom_train/3561474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanValues () {
int i, lengthArray;
lengthArray = flagValues.length;
for (i=0; i<lengthArray; i++)
flagValues[i] = false;
lengthArray = argumentValues.length;
for (i=0; i<lengthArray; i++)
argumentValues[i] = "";
}
COM: <s> turns all flags to false and all values to empty strings </s>
|
funcom_train/13775161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void symbolicName(String name) {
// String oldName = _name;
_name = name;
// try
// {
// constrainer().symbolicContext().renameVar(oldName,name,this);
// }
// catch(Exception e)
// {
// constrainer().out().println(e.getMessage());
// }
}
COM: <s> sets name and manages symbolic context for this object </s>
|
funcom_train/49822582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean text_from_file_2(Term file_name, Term text) {
Struct fileName = (Struct) file_name.getTerm();
try {
Struct goal = new Struct(alice.util.Tools.loadText(
alice.util.Tools.removeApices(((Struct) fileName).toString())));
return unify(text, goal);
} catch (Exception ex) {
//ex.printStackTrace();
return false;
}
}
COM: <s> reads a source text from a file </s>
|
funcom_train/29517742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int computeAllScores(double[] scores, int... t) {
if ( isAllelic() )
return ultraFastComputeAllelicPearsonScores(scores, t);
else if ( isGenotypic() )
return ultraFastComputeGenotypicPearsonScores(scores, t);
ScoreVisitor visitor = new ScoreVisitor(getScoreFunction(), scores);
return enumerateAllCompatibleTables(visitor, t);
}
COM: <s> compute the scores of all genotypic compatible tables using the instance score function </s>
|
funcom_train/18099730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateTokenStartPosition( String input, char[] chars, String delimiters ) {
while ( this.startPosition < chars.length ) {
char c = chars[ this.startPosition ];
if (delimiters.indexOf(c) == -1) {
this.hasMoreTokens = true;
return;
}
this.startPosition++;
}
this.hasMoreTokens = false;
}
COM: <s> updates the token start position </s>
|
funcom_train/37228904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartDateTime( String sDateTime ) {
TSElement e = new TSElement( iLevel + 1, this );
e.setName( "DR.1" );
e.setDateTime( sDateTime );
try {
setComponent( e, 1 );
} catch( MalformedFieldException mfe ) {
mfe.printStackTrace();
}
}
COM: <s> set the actual iso formatted start datetime string </s>
|
funcom_train/9767756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rm(String path) {
try {
sftpClient.rm(path);
} catch (java.io.IOException ex) {
JOptionPane.showMessageDialog(null,
"Error removing " + path + " : "
+ ex.getMessage(), "Error",
JOptionPane.ERROR_MESSAGE);
return;
}
refresh();
}
COM: <s> remove a file or directory from the remote computer </s>
|
funcom_train/37208462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object processScript(Element e, OculaPanel panel) throws EvalError {
Object targetObject = null;
if (e.getChild("script") == null) {
return null;
}
try {
targetObject = parser.parseScript(e)[0];
}
catch (EvalError ee) {
displayError(panel, "<html><body>" +
"Error evaluating script.<p>" +
"See error log for more details.</body></html>");
panel.revalidate();
log.error("Error evaluating the script: " + ee);
throw ee;
}
return targetObject;
}
COM: <s> processes a lt script gt element and returns the result of the script </s>
|
funcom_train/38532830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOkToClose() {
ListenerMember[] temp;
temp = (ListenerMember[])listListeners.toArray(new ListenerMember[listListeners.size()]);
for ( int x = 0; x < temp.length; x++ ) {
if ( temp[x].isOkToClose(this) == false ) {
return false;
}
}
return true;
}
COM: <s> returns true if it is ok to close the member </s>
|
funcom_train/47833097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateLocalInventory(final String slaUuid) {
for (IMonitor m : RuntimeMonitorEngine.getInstance().getInventory().lookupMonitor()) {
if (m.getName().contains(slaUuid)) {
slaMonitorMap.put(m.getName(), m.getValue());
}
}
}
COM: <s> update local inventory with sla monitor data </s>
|
funcom_train/1805377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listAllEntries() throws IOException, ServiceException {
TableFeed feed = service.getFeed(tablesFeedUrl, TableFeed.class);
for (TableEntry entry : feed.getEntries()) {
printAndCacheEntry(entry);
}
if (feed.getEntries().size() == 0) {
System.out.println("No entries yet!");
}
}
COM: <s> lists all tables in the spreadsheet </s>
|
funcom_train/16521923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String validate(String xml, String schema) throws TransformerConfigurationException, TransformerException, Exception {
String xmlURL = system_To_URL(xml);
if (xmlURL == null) {
throw new Exception("The xml file location is not valid: " + xml);
}
String schemaURL = system_To_URL(schema);
if (schemaURL == null) {
throw new Exception("The Schematron schema location is not valid: " + schema);
}
return validate(new StreamSource(xmlURL), new StreamSource(schemaURL));
}
COM: <s> p validate an xml instance document against a schematron schema </s>
|
funcom_train/24920290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteMIKEYPolicyParam(int type) {
log.trace("type=" + type);
for (Iterator<MIKEYPolicyParam> iter = param.iterator(); iter.hasNext();) {
MIKEYPolicyParam pp = iter.next();
if (pp.type == type) {
policy_param_length = policy_param_length - pp.value.length -2;
param.remove(param.indexOf(pp));
}
}
}
COM: <s> delete a mikey parameter from a specific type </s>
|
funcom_train/25099462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStartPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FeatureLink_start_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FeatureLink_start_feature", "_UI_FeatureLink_type"),
FeaturemodelingPackage.Literals.FEATURE_LINK__START,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the start feature </s>
|
funcom_train/8439350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdRefreshEnvelope() {
if (cmdRefreshEnvelope == null) {//GEN-END:|183-getter|0|183-preInit
// write pre-init user code here
cmdRefreshEnvelope = new Command("\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C", Command.ITEM, 2);//GEN-LINE:|183-getter|1|183-postInit
// write post-init user code here
}//GEN-BEGIN:|183-getter|2|
return cmdRefreshEnvelope;
}
COM: <s> returns an initiliazed instance of cmd refresh envelope component </s>
|
funcom_train/45228509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadSourceFilesForAllProjects() {
List<Project> projects = gradeBook.getProjects();
for (Project project : projects) {
try {
loadSourceFiles(project);
}
catch (Exception e) {
log.error("Error loading specific project [" + project + "]", e);
}
}
}
COM: <s> eagerly loads all source files for all projects known to the data manager </s>
|
funcom_train/2032682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateNormalisedDimensions() {
if (scaled && RESCALE_W_AND_H_TO_POWER_OF_TWO) {
normalW = 1.0f;
normalH = 1.0f;
return;
}
normalW = (float) originalW / (float) realW;
normalH = (float) originalH / (float) realH;
//if the image has been scaled down...
if (normalW > 1.0f)
normalW = 1.0f;
if (normalH > 1.0f)
normalH = 1.0f;
}
COM: <s> calculates the normalised dimensions </s>
|
funcom_train/27905287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cekTypeForEqComparison(Node e) {
//System.out.println("cek type "+ /*e.getValue()+*/" for equality comparion");
if (typeStack.top() != typeStack.second()) {
typeError(e, "type mismatched for equality comparison, boolean required");
}
}
COM: <s> method to check for equality comparison </s>
|
funcom_train/36635294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean authenticate() {
this.log.info("authenticating #0", identity.getUsername());
boolean auth = false;
String encPassord = Enc.enc(this.identity.getPassword());
User user = this.userDao.findByLoginAndPassword(this.identity
.getUsername(), encPassord);
if (user != null) {
auth = true;
loggedUser = user;
List<Role> roles = user.getRoles();
if (roles != null) {
for (Role role : roles) {
identity.addRole(role.name());
}
}
}
return auth;
}
COM: <s> authenticates user upon request parameters </s>
|
funcom_train/35648482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private N createParentNodeIfNeeded(N parentNode, boolean createContainer, String listProperty) {
N realParentNode = null;
if (createContainer==true) {
//TODO look up the label in the resource label ${listProperty}Node.
realParentNode = createFolder(listProperty);
addToNode(parentNode,realParentNode);
} else {
realParentNode = parentNode;
}
return realParentNode;
}
COM: <s> creates a new parent node if the parent has more than one child </s>
|
funcom_train/51177661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeCurrentEdit() {
Component comp = Globals.focusListener.getFocused();
if ((comp == source) || ((comp instanceof FieldEditor) && this.isAncestorOf(comp))) {
if (comp instanceof FieldEditor)
((FieldEditor)comp).clearAutoCompleteSuggestion();
storeFieldAction.actionPerformed(new ActionEvent(comp, 0, ""));
}
}
COM: <s> makes sure the current edit is stored </s>
|
funcom_train/2292084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserLastModified() {
String user = m_resource.getUserLastModified().toString();
try {
user = getCurrentOuRelativeName(CmsPrincipal.readPrincipalIncludingHistory(
getCms(),
m_resource.getUserLastModified()).getName());
} catch (Throwable e) {
LOG.error(e.getLocalizedMessage());
}
return user;
}
COM: <s> returns the name of the user who last modified the given resource </s>
|
funcom_train/15889193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int createDeviceFlags(boolean waitLock,boolean writeEndInd,boolean readTermChrSet){
int retValue = 0;
if(waitLock){retValue += 1;}
if(writeEndInd){retValue +=8;}
if(readTermChrSet){retValue +=128;}
return retValue;
}
COM: <s> method creates the appropriate device flags integer given the input params </s>
|
funcom_train/38540144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void intializeDomains(CspVariableFactory varFactory) {
for (int i=0; i<numSquares*numSquares; i++)
for (int j=0; j<numSquares*numSquares; j++)
{
cells[i][j] = varFactory.intVar("cell [" + i + ", " + j + "]", 1, numSquares*numSquares);
}
}
COM: <s> initialize the domain size of each cell </s>
|
funcom_train/2583805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals1481087() {
StandardCategoryItemLabelGenerator g1
= new StandardCategoryItemLabelGenerator("{0}",
new DecimalFormat("0.00"));
StandardCategoryToolTipGenerator g2
= new StandardCategoryToolTipGenerator("{0}",
new DecimalFormat("0.00"));
assertFalse(g1.equals(g2));
}
COM: <s> a test for bug 1481087 </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.