__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/35443359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initUI() {
setLayout(new BorderLayout());
this.gui = createUI();
if (this.gui!=null) {
this.add(this.gui);
} else {
this.add(new JLabel(this.getName())); // default: label with name
}
}
COM: <s> initializes the user interface </s>
|
funcom_train/36989107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponent(String componentType, Class componentClass) {
if (!UIComponent.class.isAssignableFrom(componentClass)) {
String msg =
"The class <"
+ componentClass.getName()
+ " specified for component type <"
+ componentType
+ "> is not a javax.faces.component.UIComponent !";
log.error(msg);
throw new InternalServerException(msg);
}
componentClazzByType.put(componentType, componentClass);
}
COM: <s> registers a component type with the factory </s>
|
funcom_train/32614762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeResultToBus() {
OutSMEntry resultEntry = new OutSMEntry();
resultEntry.operationID = mOutEntry.operationID;
resultEntry.clientInfo = mOutEntry.clientInfo;
resultEntry.writeMgmtDataResult = false;
resultEntry.securityData = null;
try {
Controller.systemBus.write(resultEntry, null, Lease.FOREVER);
} catch (Exception e) {
log.error(
"LindaReadWithSpaceThread: Could not wrrite to Systen BUS ", e);
}
}
COM: <s> writes entries to the system bus </s>
|
funcom_train/25774141 | /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();
sb.append('(');
for(GameObjectInterface f:getFluents()){
sb.append(f.getKIFForm());
if(sb.charAt(sb.length()-1) != ')') {
sb.append(' ');
}
}
if(sb.charAt(sb.length()-1) == ' ') {
sb.deleteCharAt(sb.length()-1);
}
sb.append(')');
return sb.toString();
}
COM: <s> returns the list of fluents as a string in infix kif notation </s>
|
funcom_train/36164926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractNode getRootNode() {
CompilerNode node = new CompilerNode(Children.LEAF);
node.setDescriptor(this);
node.setDisplayName(this.getName());
node.setShortDescription("Action");
node.setIconBaseWithExtension("org/sodbeans/resources/methodicon.png");
return node;
}
COM: <s> returns a node object that represents the static representation of the </s>
|
funcom_train/31084649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requireFOURCC (String value) throws IOException, RIFFFormatException {
String valueRead = readFOURCC ();
if (!valueRead.equals (value)) {
throw new RIFFFormatException
("Expected " + value + " in " + _chunkID + " chunk. Got " +
valueRead + ".");
}
}
COM: <s> read four bytes from input as a fourcc and check against value </s>
|
funcom_train/3417413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Entry getEntryAfterMiss(ThreadLocal key, int i, Entry e) {
Entry[] tab = table;
int len = tab.length;
while (e != null) {
ThreadLocal k = e.get();
if (k == key)
return e;
if (k == null)
expungeStaleEntry(i);
else
i = nextIndex(i, len);
e = tab[i];
}
return null;
}
COM: <s> version of get entry method for use when key is not found in </s>
|
funcom_train/4716985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startListActivity(List<String> list, String type)
{
Intent gameListView = new Intent(RootMenuScreen.this, GameListScreen.class);
Bundle b = new Bundle();
b.putStringArray(Strings.gameList, (String[])list.toArray(new String[0]));
b.putString(Strings.listType, type);
gameListView.putExtras(b);
startActivityForResult(gameListView, RequestCodes.gameListScreenRequestCode);
}
COM: <s> starts list activity to display list of games </s>
|
funcom_train/21871387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton9() {
if (jButton9 == null) {
jButton9 = new JButton();
jButton9.setText("Paso turno");
jButton9.setPreferredSize(new java.awt.Dimension(150,30));
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
p.siguiente();
cambiar();
System.out.println("Turno pasado"); // TODO Auto-generated Event stub actionPerformed()
}
});
}
return jButton9;
}
COM: <s> this method initializes j button9 </s>
|
funcom_train/25772344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getScreenCommand() {
if (screenCommand == null) {//GEN-END:|49-getter|0|49-preInit
// write pre-init user code here
screenCommand = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|49-getter|1|49-postInit
// write post-init user code here
}//GEN-BEGIN:|49-getter|2|
return screenCommand;
}
COM: <s> returns an initiliazed instance of screen command component </s>
|
funcom_train/17335845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrerequisiteDTO addPrerequisite() {
List<PrerequisiteDTO> prerequisites = getPrerequisites();
// Retrieves the higher code.
int max = 0;
for (final PrerequisiteDTO prerequisite : prerequisites) {
max = prerequisite.getCode() > max ? prerequisite.getCode()
: max;
}
// Creates the new objective.
final PrerequisiteDTO newPrerequisite = new PrerequisiteDTO();
newPrerequisite.setCode(max + 1);
newPrerequisite.setParentLogFrame(this);
// Adds it to the local list.
prerequisites.add(newPrerequisite);
return newPrerequisite;
}
COM: <s> adds a new prerequisite to this log frame </s>
|
funcom_train/34570389 | /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("\n");
sb.append(header.toString());
for (DataSource ds : dataSources) {
sb.append("\n\t");
sb.append(ds.toString());
}
for (Archive archive : archives) {
sb.append("\n\t");
sb.append(archive.toString());
}
return sb.toString();
}
COM: <s> returns a summary the contents of this database </s>
|
funcom_train/45643373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newTableItem(String[] segments, int index) {
TableItem item = new TableItem(selectionTable, index);
// name
item.setText(0, segments[0]);
// given name
item.setText(1, segments[1]);
// principal
item.setText(2, segments[2]);
// type
item.setText(3, segments[3]);
// creation date
item.setText(4, segments[4]);
// uid
item.setText(5, segments[5]);
// comment
item.setText(6, segments[6]);
}
COM: <s> creates a new table item with the given segments </s>
|
funcom_train/45535781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bindVariables(BlockScope scope) {
for (int i = 0, length = size; i < length; i++) {
VarDef[] variables = elementData[i]._VarDefList.elementData;
for (int j = 0, l = elementData[i]._VarDefList.size; j < l; j++) {
variables[j].resolve(scope);
}
}
}
COM: <s> bind and add arguments binding into the scope of the method </s>
|
funcom_train/19338088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testItem () {
Category c = new Category ("CD");
c.addProperty(new StringProperty("artist"));
c.addProperty(new StringProperty("title"));
Item i = new Item (c);
i.setValue(0, "Nirvana");
i.setValue(1, "Nevermind");
Assert.assertEquals(i.getValue(0).toString (), "Nirvana");
Assert.assertEquals(i.getValue(1).toString (), "Nevermind");
Assert.assertEquals(i.getCategory(), c);
}
COM: <s> this test checks wether the item are in the right position </s>
|
funcom_train/43902505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tearDown() {
if (org.geotools.test.TestData.isBaseJavaPlatform()) {
// Disabled in J2SE 1.4 build because of a bug.
// TODO: Remove when we will be target J2SE 1.4 or 1.5.
return;
}
assertNotNull(extra);
ReferencingFactoryFinder.removeAuthorityFactory(extra);
extra = null;
}
COM: <s> removes the extra factory from the set of authority factories </s>
|
funcom_train/39172862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnnotation(Annotation annot) {
features = new ArrayList<String>();
values = new ArrayList<String>();
for(Object key : annot.getFeatures().keySet()) {
features.add(key.toString());
values.add(annot.getFeatures().get(key).toString());
}
super.fireTableDataChanged();
}
COM: <s> sets the annotation whoes features need to be shown </s>
|
funcom_train/10695298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDefineClassStringByteBufferCodeSource() {
SecureClassLoader ldr = new SecureClassLoader();
ByteBuffer bbuf = ByteBuffer.wrap(klassData);
Class klass = ldr.defineClass(null, bbuf, null);
assertEquals(klass.getName(), klassName);
}
COM: <s> tests define class string byte buffer code source </s>
|
funcom_train/37062863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDateFormatted() {
StringBuffer buf = new StringBuffer(8);
buf.append( formatInt(getDay()) ).append( "." ).append( formatInt(getMonth()) ).append( "." ).append( getYear() );
return buf.toString();
}
COM: <s> get the date in format dd </s>
|
funcom_train/49128175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putSorted(Image image) {
try {
saveImageSorted.clearParameters();
saveImageSorted.setString(1, image.getFilename());
saveImageSorted.setString(2, image.getHash());
saveImageSorted.executeUpdate();
} catch (SQLException e) {
logger.warn("Query failed", e);
}
}
COM: <s> puts images md5 hash in the database to indicate that it is in </s>
|
funcom_train/6343748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doConfigure(Properties properties) {
// store props for use by non configured caches
ccMgr.props = properties;
// set default value list
setDefaultAuxValues( properties );
// set default attr
setDefaultCompositeCacheAttributes(properties);
// set up ssytem caches to be used by non system caches
// need to make sure there is no circuarity of reference
parseSystemRegions( properties );
// setup preconfigured caches
parseRegions( properties );
} // end doConfigure
COM: <s> configure cache for properties object </s>
|
funcom_train/50864558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUnit(Unit unit) {
if (!units.contains(unit)) {
units.add(unit);
Iterator<Unit> i = unit.getInventory().getContainedUnits().iterator();
while (i.hasNext()) {
addUnit(i.next());
}
// Fire unit manager event.
fireUnitManagerUpdate(UnitManagerEvent.ADD_UNIT, unit);
}
}
COM: <s> adds a unit to the unit manager if it doesnt already have it </s>
|
funcom_train/4008836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String orderCart() throws Exception {
beginTransaction() ;
try {
boolean ok = bean.orderCart() ;
commitTransaction() ;
if(ok){
setFeedback("OrderOK") ;
return "feedback" ;
}
else{
setFeedback("Money") ;
return "feedback" ;
}
}
catch (Exception e) {
rollbackTransaction() ;
setFeedback("Unknown") ;
return "feedback" ;
}
}
COM: <s> transform the current cart into a new order </s>
|
funcom_train/36994533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final MetaData metaData) {
if (metaData == null) {
throw new IllegalArgumentException("Cannot add null MetaData.");
}
else if (metaData.getOwner() == null) {
throw new IllegalArgumentException("Supplied MetaData is not valid.");
}
getMetaData().put(metaData.getOwner(), metaData);
}
COM: <s> adds a single code meta data code instance to the manager </s>
|
funcom_train/15530069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int sendData(byte[] buffer) throws Exception{
if (connectionID == 0){
throw new Exception("Not connected to a server.");
}
//network.sendData(fileId, buffer);
int buffLen = remoteServer.sendData(connectionID, buffer);
//System.out.println("response: wrote " + buffLen + " bytes of data to the remote file.");
return buffLen;
}
COM: <s> send a chunk of data to the desired remote file </s>
|
funcom_train/3429667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transforms getTransforms() throws XMLSecurityException {
try {
Element transformsElem =
XMLUtils.selectDsNode(this._constructionElement,
Constants
._TAG_TRANSFORMS, 0);
if (transformsElem != null) {
return new Transforms(transformsElem, this._baseURI);
}
return null;
} catch (XMLSignatureException ex) {
throw new XMLSecurityException("empty", ex);
}
}
COM: <s> method get transforms </s>
|
funcom_train/49869524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Reaction r) throws CloudReactionsException {
if (this.storage.containsKey(r.getName())) {
throw new CloudReactionsException("population already contains reaction" + r.toArray());
}
else {
this.storage.put(r.getName(), r);
}
}
COM: <s> adds the new reaction into the storage </s>
|
funcom_train/22783079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beanPropertyChanged(BeanChangeEvent<Image> event) {
// check source
Image img = event.getSource();
if (img != image) {
img.removeListener(this);
return;
}
// update image if there was a change
if (event.getProperty() == BeanProperty.IMAGE_THUMBNAIL) {
updateImage();
}
if (event.getProperty() == BeanProperty.IMAGE_ROTATION) {
updateImage();
}
}
COM: <s> repaints on thumbnail changes </s>
|
funcom_train/9439491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findTokenEnd(CharSequence text, int cursor) {
int i = cursor;
int len = text.length();
char c;
while (i < len) {
if ((c = text.charAt(i)) == ',' || c == ';') {
return i;
} else {
i++;
}
}
return len;
}
COM: <s> returns the end of the token minus trailing punctuation </s>
|
funcom_train/1907686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void name(final String join, final String... values) {
final StringBuilder builder = new StringBuilder("instance:");
boolean first = true;
for(final String value: values) {
if(first) {
first = false;
} else {
builder.append(join);
}
builder.append(value);
}
name = builder.toString();
}
COM: <s> instance function with signature </s>
|
funcom_train/1175044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeImage() {
// Write generated image to a file
try {
// Save as JPEG
File file = new File("Images/" + name + "INS" + System.currentTimeMillis() + ".jpg");
ImageIO.write(bufferedImage, "jpg", file);
} catch (IOException e) {
}
}
COM: <s> the method that writes the image to a file </s>
|
funcom_train/48148086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void textAreaPeformAction() {
try {
curFloat = Double.parseDouble(valueText.getText());
if (curFloat < minFloat) {
setFloatMinimum(curFloat);
}
else if (curFloat > maxFloat) {
setFloatMaximum(curFloat);
}
enterTyped = true;
setFloatValue(curFloat);
observable.notifyObservers();
enterTyped = false;
} catch (Exception e) {
e.printStackTrace();
valueText.selectAll();
}
}
COM: <s> do what needed after the text area hit a return </s>
|
funcom_train/41489229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadUserByUsername() {
logger.info("loadUserByUsername");
System.out.println(new File(".").getAbsolutePath());
String username = "marka";
UserSecurityService service = (UserSecurityService) getBean("userSecurityService");
UserDetails userDetails = service.loadUserByUsername(username);
assertNotNull(userDetails);
}
COM: <s> test of load user by username method of class user security service </s>
|
funcom_train/49247219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TaskProcessor create(BackgroundTask task) {
if (task.getActivityType().equals("shutdown")) {
return new ShutdownTask();
} else if (task.getActivityType().equals("flagrsp")) {
return new ImportFlag();
} else if (task.getActivityType().equals("channelmember")) {
return new ImportChannelMemberWatch();
} else if (task.getActivityType().equals("census")) {
return new ImportCensus();
}
return null;
}
COM: <s> creates a task processor for the specified task </s>
|
funcom_train/45541608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sessionEnded() {
if (!isEnabled())
return;
IStatus status;
try {
IJSCCompletionProposalComputer computer= getComputer(false);
if (computer == null) // not active yet
return;
PerformanceStats stats= startMeter(SESSION_ENDED, computer);
computer.sessionEnded();
stopMeter(stats, SESSION_ENDED);
return;
} catch (InvalidRegistryObjectException x) {
status= createExceptionStatus(x);
} catch (CoreException x) {
status= createExceptionStatus(x);
} catch (RuntimeException x) {
status= createExceptionStatus(x);
}
fRegistry.informUser(this, status);
}
COM: <s> notifies the described extension of a proposal computation session end </s>
|
funcom_train/13304695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStartDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NegotiationProtocol_startDate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NegotiationProtocol_startDate_feature", "_UI_NegotiationProtocol_type"),
NegotiationPackage.Literals.NEGOTIATION_PROTOCOL__START_DATE,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the start date feature </s>
|
funcom_train/3561494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getArgumentHelpText (String argName, String paramName) {
int pos;
pos = getFlagPos(argName);
if (pos >= 0) {
try {
return getArgumentHelpText(pos, paramName);
}
catch (IndexOutOfBoundsException e) {
System.out.println("Not fatal: argument not correctly defined");
}
}
return "";
}
COM: <s> returns the help text of an argument whose name is specified </s>
|
funcom_train/3596597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanupCorpus() {
cleaning_up=true;
boolean ls = lazy_loading;
lazy_loading=false;
// first check the load and resolve pointers and nite children
if (rootlist != null) {
Iterator rootit = new ArrayList(rootlist).iterator();
while (rootit.hasNext()) {
NOMWriteElement rel = (NOMWriteElement) rootit.next();
resolveTree(rel, rel.getColour());
}
}
// propagate timings
propagateTimes();
//force_propagate_time=false;
// It is wrong to clear changes here now that files can be
//loaded at any time! clearChanges();
cleaning_up=false;
lazy_loading=ls;
}
COM: <s> generally called after loading data this method resolves </s>
|
funcom_train/51623818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DecorationResult getResult(Object element, Object adaptedElement, IDecorationContext context) {
// We do not support decoration of null
if (element == null) {
return null;
}
DecorationResult decoration = internalGetResult(element, context);
if (decoration == null) {
queueForDecoration(element, adaptedElement, false, null, context);
return null;
}
return decoration;
}
COM: <s> return the decoration result for element </s>
|
funcom_train/31958849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getJpegImage(OutputStream os) throws RemoteException{
// Get image of this chart
Image img = getImage();
// Use JpegEncoder to convert to jpeg image and store it into
// the parameter OutputStream
//JpegEncoder jpgE = new JpegEncoder(img, QUALITY, os);
// compress to jpeg image
//jpgE.Compress();
}
COM: <s> stores this charts image as a jpeg image in the passed output stream </s>
|
funcom_train/5403328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void eventSave() {
if( intCurrent.intValue() == 0 ) {
QuicklistItem con = dbComics.createCondition( txtName.getText() );
add( con );
} else {
QuicklistItem qli = (QuicklistItem)lstQuicklist.getSelectedValue();
qli.setName( txtName.getText() );
dbComics.updateCondition( qli );
refresh();
}
}
COM: <s> the event handler for the save button </s>
|
funcom_train/10344336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBooleanProperty(String key,boolean defaultValue) {
String v = getProperty(key);
if (v==null)
return defaultValue;
else
return (v!=null && ( v.equalsIgnoreCase("true") || v.equalsIgnoreCase("Y") || v.equalsIgnoreCase("yes")) );
}
COM: <s> get a boolean property use the default if not present </s>
|
funcom_train/51576044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRule() {
final int item = ruleList.getSelectedIndex();
if (ruleList.getSelectedItem() == null || ruleWord.getText().equals("")) {
return;
}
changeRule(item, ruleOption.getSelectedItem(), ruleWord.getText());
refreshRules();
ruleList.select(item);
}
COM: <s> modify an existing rule </s>
|
funcom_train/43245286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetECOneState() {
System.out.println("setECOneState");
String eCOneState = "";
EmergencyContactDG3Object instance = new EmergencyContactDG3Object();
instance.setECOneState(eCOneState);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set econe state method of class org </s>
|
funcom_train/15623196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection getAllSubConcepts() throws M4Exception {
Vector open = new Vector();
HashSet closed = new HashSet();
open.add(this);
while (!open.isEmpty()) {
Concept next = (Concept) open.firstElement();
if (next != null) {
Iterator it = next.getSubConcepts().iterator();
while (it.hasNext()) {
Concept sub = (Concept) it.next();
if (!open.contains(sub) && !closed.contains(sub)) {
open.add(sub);
}
}
open.remove(next);
closed.add(next);
}
}
return closed;
}
COM: <s> private helper method of add super concept concept </s>
|
funcom_train/41837979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeTabbedPaneKeyboardBinding(JTabbedPane tabPane) {
try {
Method uninstallKeyboardActions = BasicTabbedPaneUI.class.getDeclaredMethod("uninstallKeyboardActions",
new Class[] { });
uninstallKeyboardActions.setAccessible(true);
uninstallKeyboardActions.invoke(tabPane.getUI());
}
catch (Exception e) {
e.printStackTrace(System.err);
}
}
COM: <s> removes keyboard bindings from a jtabbed pane component </s>
|
funcom_train/46117382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double pnorm(double z) {
double t, pd;
t = 1 / (1 + 0.2316419 * z);
pd = 1 - 0.3989423
* Math.exp(-z * z / 2)
* ((((1.330274429 * t - 1.821255978) * t + 1.781477937) * t - 0.356563782) * t + 0.319381530)
* t;
/* see Gradsteyn & Rhyzik, 26.2.17 p932 */
return (pd);
}
COM: <s> returns the area under a normal distribution from inf to z standard deviations </s>
|
funcom_train/41163208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoScoreQuestion entity) {
EntityManagerHelper.log("saving CoScoreQuestion 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 score question entity </s>
|
funcom_train/1448402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String deleteCategory() {
logger.info("In deleteCategory method.".intern());
try {
// Deletes all category for where categoryId, mainParentId,
// parentCategoryId matches for given id.
if (categoryId != null) {
LocationCategoriesServiceDelegator.delete(categoryId);
}
} catch (HibernateException e) {
addActionError(AdminConstants.ERROR_IN_DELETING_THE_RECORD);
logger.error(AdminConstants.ERROR_IN_DELETING_THE_RECORD
+ e.getMessage());
return INPUT;
}
return SUCCESS;
}
COM: <s> user is confirm to delete the categories and all its subcategories </s>
|
funcom_train/43567760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPanelMisc() {
if (panelMisc == null) {
panelMisc = new JPanel();
java.awt.GridLayout gridLayout2 = new GridLayout();
panelMisc.setLayout(gridLayout2);
panelMisc.setSize(114, 132);
panelMisc.setName("Miscellaneous");
gridLayout2.setRows(1);
panelMisc.add(getChkCheckOnStart(), null);
}
return panelMisc;
}
COM: <s> this method initializes panel misc </s>
|
funcom_train/35744245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
MimeMediaType writeType = WireFormatMessageFactory.DEFAULT_WIRE_MIME;
s.writeUTF(writeType.toString());
// XXX bondolo 20040307 Should do something with encoding here.
WireFormatMessage serialed = WireFormatMessageFactory.toWire(this, writeType, null);
serialed.sendToStream(s);
}
COM: <s> write this object out for java serialization </s>
|
funcom_train/8103737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasTranslation(TLang trans_lang[]) {
if(null == translation)
return false;
TTranslationEntry[] trans_entries = translation.getTranslationEntry();
for(TTranslationEntry entry: trans_entries) {
for(TLang lang : trans_lang) {
if(lang == entry.getLang())
return true;
}
}
return false;
}
COM: <s> checks whether the article page title has at least one translatio </s>
|
funcom_train/44890133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Function getFunction(String name){
for (Iterator iter = this.getNestedDefinitions().iterator(); iter.hasNext();) {
Definition each = (Definition) iter.next();
if (each.isFunction() && each.getName().equals(name))
return (Function) each;
}
return null;
}
COM: <s> answer the top level function in the module with the given name </s>
|
funcom_train/12925076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefineTextField setIndent(final Integer aNumber) {
if ((aNumber != null) && ((aNumber < 0) || (aNumber > MAX_SPACE))) {
throw new IllegalArgumentRangeException(0, MAX_SPACE, aNumber);
}
indent = aNumber;
return this;
}
COM: <s> returns the indentation of the first line of text in twips </s>
|
funcom_train/49790307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNavigationToDisclaimer() throws Exception {
IFile sitemap = beginAtSitemapThenPage("List of Pages");
// there should be a button here
assertButtonPresentWithText("page 3");
clickButtonWithText("page 3");
// we are now on the disclaimer
assertTitleEquals("Disclaimer Page");
// but if we go back, we can carry on
gotoSitemapThenPage(sitemap, "List of Pages");
clickButtonWithText("page 3");
assertTitleEquals("Page 3");
}
COM: <s> we still have to view the disclaimer even if we click </s>
|
funcom_train/29714160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resolveCrewDamage() {
boolean anyRolls = false;
for (Enumeration i = game.getEntities(); i.hasMoreElements();) {
final Entity e = (Entity)i.nextElement();
if (resolveCrewDamage(e, anyRolls)) {
anyRolls = true;
}
}
if (anyRolls) {
addNewLines();
}
}
COM: <s> this checks if the mech pilot goes unconscious from the damage he has </s>
|
funcom_train/23173585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getHRMFile () {
String hrmFile = tfHRMFile.getText ().trim ();
if (hrmFile.length () == 0) {
context.showMessageDialog (this, JOptionPane.ERROR_MESSAGE,
"common.error", "st.dlg.exercise.error.no_hrm_file");
return null;
}
return hrmFile;
}
COM: <s> returns the hrm filename specified in the textfield or displays an error </s>
|
funcom_train/44286658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean Loop_on_classes(FactoryWriterXML xml, TransactionXML transaction, List listReference,ClassItem item) {
for(ClassDefinition reference: (java.util.List<ClassDefinition>)transaction.getList("classdefinition")) {
if(!Import_class(xml, transaction, listReference,item,reference)) return false;
}
return true;
}
COM: <s> class definition loop on classes </s>
|
funcom_train/37654460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node getFirstParentBlock(Node node) {
Node parentNode = node.jjtGetParent();
Node lastNode = node;
while (parentNode != null && !BLOCK_PARENTS.contains(parentNode.getClass())) {
lastNode = parentNode;
parentNode = parentNode.jjtGetParent();
}
if (parentNode instanceof ASTIfStatement) {
parentNode = lastNode;
} else if (parentNode instanceof ASTSwitchStatement) {
parentNode = getSwitchParent(parentNode, lastNode);
}
return parentNode;
}
COM: <s> get the first parent </s>
|
funcom_train/37823309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hitNode(VisualNode except, Point point) {
// check all other elements
for (VisualGraphElement element : elements) {
// checking for nodes only
if (element instanceof VisualNode) {
// if nodes are equal, return false
if (except == null || !except.equals(element)) {
// check boundaries of current other node
if (element.hitBoundaries(point)) {
// other node boundaries have been hit
return true;
}
}
}
}
// nothing else been hit
return false;
}
COM: <s> check if the boundaries of any node have been hit </s>
|
funcom_train/22431915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDesktopPane getJContentPane() {
if (jContentPane == null) {
labelLogin = new JLabel();
labelLogin.setText(MessageText.getString("host.gui.Login.ticket"));
labelLogin.setBounds(25, 25, 250, 25);
jContentPane = new JDesktopPane();
jContentPane.add(labelLogin, null);
jContentPane.add(getButtonOK(), null);
jContentPane.add(getTextFieldTicket(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/7531750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (!openSocket())
return;
try {
mReader = new ConnectionReader(mSocket.getInputStream());
mWriter = new ConnectionWriter(mSocket.getOutputStream());
} catch (IOException e) {
mConn.setStatus(Connection.STATUS_ERROR);
mConnMgr.connectingFinished(mConn, null);
return;
}
pgrid.GUID guid;
if ((guid = handshakePGrid()) == null)
return;
mConn.setStatus(Connection.STATUS_CONNECTED);
mConnMgr.connectingFinished(mConn, guid);
}
COM: <s> starts the worker </s>
|
funcom_train/8347930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public El setPadding(Padding padding) {
if (padding != null) {
setStyleAttribute("paddingLeft", padding.left + "px");
setStyleAttribute("paddingTop", padding.top + "px");
setStyleAttribute("paddingRight", padding.right + "px");
setStyleAttribute("paddingBottom", padding.bottom + "px");
}
return this;
}
COM: <s> sets the elementss padding </s>
|
funcom_train/46654606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showQuestionsVoted() {
// Questions voted
if (alias.equalsIgnoreCase(Global.currentUser.getAlias())) {
noElementString = Global.constantsTest.noQuestionsVotedByMe();
} else {
noElementString = Global.constantsTest
.noQuestionsVotedByUser(alias);
}
searchOptions = new SearchOptions();
searchOptions.setVoter(alias);
content.add(new QuestionsPaging(searchOptions, noElementString));
}
COM: <s> show questions voted </s>
|
funcom_train/47314488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getCameraPanel() {
if (cameraPanel == null) {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
cameraPanel = new JPanel();
cameraPanel.setLayout(new GridBagLayout());
cameraPanel.add(getImagePanel(), gridBagConstraints);
// cameraPanel.add(jLabel, gridBagConstraints);
}
return cameraPanel;
}
COM: <s> this method initializes camera panel </s>
|
funcom_train/46755814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearRows() throws Exception {
ModifyTableAction action = new ModifyTableAction(getTableResults.getTableContext());
if (tableModel != null) {
action.setNewTableColumnsAndContents(tableModel);
} else {
action.setClearContents(true);
}
getTableResults.getMediator().receive(ISEvent.EXECUTEMODIFYTABLEACTION, action);
}
COM: <s> clear table of rows </s>
|
funcom_train/50179753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAbstract(String abstractString) {
abstractSet = true;
if ("true".equalsIgnoreCase(abstractString) || "yes".equalsIgnoreCase(abstractString)) {
abstractElements = 1;
} else if (abstractString == null || "any".equalsIgnoreCase(abstractString)) {
abstractElements = -1;
} else {
abstractElements = 0;
}
}
COM: <s> p configure this configuration to match only elements that are abstract not abstract </s>
|
funcom_train/39911041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRegular_hour() {
System.out.println("setRegular_hour");
int regular_hour = 0;
Timesheet_hour instance = new Timesheet_hour();
instance.setRegular_hour(regular_hour);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set regular hour method of class buissness </s>
|
funcom_train/1165358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserWapper getListMembers(String uid, String listId, boolean auth) throws WeiboException {
StringBuilder sb = new StringBuilder();
sb.append(getBaseURL()).append(uid).append("/").append(listId).append("/members.xml").append("?source=").append(CONSUMER_KEY);
String httpMethod = "GET";
String url = sb.toString();
//
return User.constructWapperUsers(http.httpRequest(url, null, auth, httpMethod), this);
}
COM: <s> obtain list object member list </s>
|
funcom_train/45279468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCheck(boolean white) {
boolean result = false;
List<Square> controlledSquares = getControlledSquares(!white);
Square kingPos = findKing(white);
Iterator<Square> i = controlledSquares.iterator();
while (i.hasNext() && !result) {
Square c = (Square) i.next();
result = c.equals(kingPos);
}
return result;
}
COM: <s> is the white king code white code equals code true code check </s>
|
funcom_train/3423250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkDuplicateValues() {
// is this value as a group duplicated?
if (contains()) {
String code = "DuplicateUnique";
String value = toString(fLocalValues);
String ename = fIdentityConstraint.getElementName();
reportSchemaError(code, new Object[] { value, ename });
}
} // duplicateValue(Hashtable)
COM: <s> called when a duplicate value is added </s>
|
funcom_train/40673475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeConverter getAttributeConverter(Class type) {
AttributeConverter converter = (AttributeConverter) convertersByType.get(type);
if (converter != null) {
return converter;
} else if (parent != null) {
return parent.getAttributeConverter(type);
}
throw new IllegalStateException(
"Unable to find an attribute converter for type " + type.getName());
}
COM: <s> finds the most recent converter in the schema chain that can convert the </s>
|
funcom_train/22358072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scheme addScheme(Scheme scheme) {
if (scheme == null)
throw new NullPointerException();
if (schemes == null) {
schemes = CollectionFactory.<ID, Scheme> createSyncOrderedMap(4);
// enforce the creation of a new collection view
// AG: Since we just create if the scheme map is non-null not necessary
// this.schemeCollection = null;
}
schemes.put(scheme.getID(), scheme);
return scheme;
}
COM: <s> adds a scheme to this region </s>
|
funcom_train/15487426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommonAST updateRegExTree() {
StringReader sr = new StringReader("("+this.getRegularExpression()+")");
ExpressionLexer lexer = new ExpressionLexer(sr);
ExpressionParser parser = new ExpressionParser(lexer);
CommonAST newTree = null;
try {
parser.regular_expression();
newTree = (CommonAST)parser.getAST();
} catch (Exception e) {
System.out.println("Error building tree from RegEx: "+e);
}
if (newTree != null)
this.regExTree = newTree;
return regExTree;
}
COM: <s> this method creates the reg ex tree from the grammar </s>
|
funcom_train/19645747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Pawn findPawn(Point location) {
ListIterator<Pawn> itr = m_gameBoard.listIterator();
while (itr.hasNext()) {
Pawn p = itr.next();
if (p.getLocation().x == location.x && p.getLocation().y == location.y) {
return p;
}
}
return null;
}
COM: <s> finds a pawn at a specified location </s>
|
funcom_train/36232664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processRecursively(TranscodeRequest request, ServletConfig config) throws ProcessorException {
if (parentElement != null) parentElement.processRecursively(request, config);
log.info("Processing Recursively'" + request.getPid() + "' with " + this.getClass());
processThis(request, config);
}
COM: <s> carry out the chain of processing elements which ends </s>
|
funcom_train/31907485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value getDefaultFontFamily() {
// No cache needed since the default font family is asked only
// one time on the root element (only if it does not have its
// own font-family).
SVGOMDocument doc = (SVGOMDocument)document;
String str = userAgent.getDefaultFontFamily();
return doc.getCSSEngine().parsePropertyValue
(SVGConstants.CSS_FONT_FAMILY_PROPERTY, str);
}
COM: <s> returns the value corresponding to the default font </s>
|
funcom_train/29537687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void targetStarted(BuildEvent event) {
//CView.LogConsoleMessage("Got to targetStarted method in class ConsoleBuildLogger");
if (Project.MSG_INFO <= msgOutputLevel && !event.getTarget().getName().equals("")) {
String msg = StringUtils.LINE_SEP + event.getTarget().getName() + ":";
log(msg);
}
}
COM: <s> logs a message to say that the target has started if this </s>
|
funcom_train/2023147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addJoin(String leftCol, String rightCol) {
String join;
join = getLeftTable() + "." + leftCol
+ " = "
+ getRightTable() + "." + rightCol;
((DefaultListModel) jListJoins.getModel()).addElement(join);
}
COM: <s> adds the given join to the list </s>
|
funcom_train/31677843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printOut(final String s) {
try {
int length = jOutputDoc.getLength();
if (length > maxDocSize) {
jOutputDoc.remove(0, length - maxDocSize);
length = jOutputDoc.getLength();
}
jOutputDoc.insertString(length, s, outputAtr);
jOutputPane.setCaretPosition(jOutputDoc.getLength());
} catch (final BadLocationException ble) {
System.out.println("Couldn't write to Output Pane");
}
}
COM: <s> print text to output pane </s>
|
funcom_train/37076229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showMessage(int type, String message) {
switch (type) {
case JOptionPane.ERROR_MESSAGE:
logger.error(message);
showMessageWindow(type,message,"Editor error");
break;
case JOptionPane.WARNING_MESSAGE:
logger.warn(message);
showMessageWindow(type,message,"Editor warning");
break;
default:
logger.error(message);
}
}
COM: <s> display a message </s>
|
funcom_train/38552215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == null || !(obj instanceof SystemCode)) {
return false;
} else {
return (this.getType().equals(((SystemCode)obj).getType()) &&
this.getMessage().equals(((SystemCode)obj).getMessage()));
}
}
COM: <s> returns true if this other system code is equivalent </s>
|
funcom_train/18569837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToStringWithPrimitiveMethod() {
returnType = int.class;
signature = new Signature(returnType, classType, methodName, argTypes);
assertEquals("int org.virtualmock.call.Signature.myMethod(java.lang.String, java.lang.Integer)",
signature.toString());
}
COM: <s> test the to string method with a primitive method </s>
|
funcom_train/31562423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SELECT(Program program, MaverickString result, Key key) throws MaverickException {
if (type == TYPE_MV_FILE) {
((File)data).SELECT(program, result, key);
} else {
super.SELECT(program, result, key);
}
}
COM: <s> returns a select list from the current string </s>
|
funcom_train/38829184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doZoom(Transform3D t3d, double zoomScale) {
if (zoomScale <= 0) return;
// Create a transform representing the uniform scale.
this.transformX.set(zoomScale);
// Zoom to the new scale.
if (this.invert) {
t3d.mul(t3d, this.transformX);
} else {
t3d.mul(this.transformX, t3d);
}
}
COM: <s> method that modifies the input transform by applying the specified scale factor </s>
|
funcom_train/49462966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(InputStream i) throws Exception {
_logger.info("Parsing MS advisories");
//parse_init(imp);
parse(new XMLInputSource(null, null, null, i, null));
// imp.vendorProductVersion();
// SP
//_logger.info("Adding fixed in SP information");
//imp.addFixedInSp();
}
COM: <s> parse the input data into a set of rss items </s>
|
funcom_train/243461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsAll(ArrayList<Card> cards) {
ArrayList<Card> myCards = getCards();
if( cards.size() > myCards.size() ) {
return false;
}
for( Card card : cards ) {
if( !myCards.contains(card) ) {
return false;
}
}
return true;
}
COM: <s> does this hand contain all these cards </s>
|
funcom_train/3515277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void missedTest(SMTPTest test) {
NDC.push(m_target);
NDC.push(Long.toString(test.getSentTime()));
m_smtpTestDao.markTestAsLate(test);
setTimer();
m_logger.warn("missed " + test.getSentTime() + " missing for " +
(System.currentTimeMillis() - test.getSentTime()));
NDC.pop();
NDC.pop();
}
COM: <s> processes a timeout for a missed test from smtptest missed </s>
|
funcom_train/23012094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dropTables(Statement stmt){
final String[] dropList = {
TABLE_LIST,
TABLE_META,
TABLE_BLOB,
TABLE_SERV,
TABLE_USER,
TABLE_COUNTER
};
for (int i = 0; i < dropList.length; i++) {
try{
stmt.executeUpdate("DROP TABLE "+dropList[i]);
}catch(SQLException e){
}
}
}
COM: <s> deletes all of the database tables </s>
|
funcom_train/17893690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int strlen(String str, int bytes) {
if (str == null) {
return 0;
}
int len = 0;
try {
len = str.getBytes(CHARSET).length;
} catch (UnsupportedEncodingException e) {
// TODO exception handling
e.printStackTrace();
}
int maxlen = (int)Math.pow(2, bytes*8)-1;
if (len > maxlen) {
len = maxlen;
}
return len;
}
COM: <s> calculate length of a given string </s>
|
funcom_train/2885280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateFile(File rpmFile) throws FileNotFoundException {
if (!rpmFile.exists()) {
throw new FileNotFoundException("No such file " + rpmFile);
}
if (!rpmFile.isFile()) {
throw new FileNotFoundException("Not an RPM file " + rpmFile);
}
checkHasRpmExtension(rpmFile);
}
COM: <s> check that an rpm file exists </s>
|
funcom_train/49427179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnabled(boolean enabled) {
if(this.locallyEnabled != enabled) {
this.locallyEnabled = enabled;
firePropertyChange("locallyEnabled", !enabled, enabled);
recursivelyEnabledChanged(getGUI(),
(parent != null) ? parent.enabled : true);
}
}
COM: <s> sets the local enabled state of that widget </s>
|
funcom_train/24049611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareDirection(EdgeEnd e) {
if (dx == e.dx && dy == e.dy)
return 0;
// if the rays are in different quadrants, determining the ordering is
// trivial
if (quadrant > e.quadrant)
return 1;
if (quadrant < e.quadrant)
return -1;
// vectors are in the same quadrant - check relative orientation of
// direction vectors
// this is > e if it is CCW of e
return CGAlgorithms.computeOrientation(e.p0, e.p1, p1);
}
COM: <s> implements the total order relation </s>
|
funcom_train/1479550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetWalkingQueue(Player p) {
if (p == null || p.walkingQueueX == null || p.walkingQueueY == null) {
return;
}
p.walkingQueueX[0] = p.currentX;
p.walkingQueueY[0] = p.currentY;
p.walkingQueue[0] = -1;
p.wQueueReadPtr = p.wQueueWritePtr = 1;
}
COM: <s> stop the players movement on the next available square </s>
|
funcom_train/25290223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SceneGraphPath getTriggeringPath() {
if (behav == null) {
throw new IllegalStateException(Ding3dI18N.getString("WakeupOnCollisionMovement5"));
}
synchronized (behav) {
if (!behav.inCallback) {
throw new IllegalStateException
(Ding3dI18N.getString("WakeupOnCollisionMovement5"));
}
}
return (collidingPath != null ?
new SceneGraphPath(collidingPath): null);
}
COM: <s> retrieves the path describing the object causing the collision </s>
|
funcom_train/29580342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String extractPolicy(String s) throws Exception {
int index = s.indexOf("<X.509_PMI_RBAC_Policy");
int lastIndex = s.indexOf("</X.509_PMI_RBAC_Policy>");
if (index == -1) throw new Exception();
String policy = s.substring(index, lastIndex+24);
return policy;
}
COM: <s> extracts the policy from a signed file and returns it as a string </s>
|
funcom_train/26563093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File dir, String name) {
boolean retval = false;
REMatch match = _regexp.getMatch(name);
if (match != null) {
String back = null;
int numStart = match.getStartIndex(1);
int numEnd = match.getEndIndex(1);
back = name.substring(numStart, numEnd);
retval = name.equals(back);
}
return retval;
}
COM: <s> should the specified file be included in the list </s>
|
funcom_train/38830482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateAlphabet() {
// Fill arities
boolean haveZero;
do {
haveZero = false;
for (int i=0;i<numSymbols;++i) {
arities[i]=rg.nextInt(maxArity+1);
if (arities[i]==0) haveZero=true;
}
} while (!haveZero);
// Symbols
for (int i=0;i<numSymbols;++i) {
symbols[i] = new StdNamedRankedSymbol<Integer>(i,arities[i]);
}
langGen=true;
}
COM: <s> re generates the current alphabet </s>
|
funcom_train/35680182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJvmquery() throws Exception {
CixsJaxwsService service = Samples.getJvmquery();
initJaxwsService(service);
_generator.setProxyTargetType(ProxyTargetType.POJO.toString());
_generator.setPojoTargetParameters(Samples.getJvmqueryPojoParameters());
_generator.execute();
check(service.getName());
}
COM: <s> test a straight generation with pojo target </s>
|
funcom_train/48196283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawTo(Graphics g) {
AffineTransform spriteTransform = new AffineTransform();
if(flipped) {
spriteTransform.scale(-1, 1);
spriteTransform.translate(-width, 0);
spriteTransform.translate(-(x-centerX), y-centerY);
}
else {
spriteTransform.scale(1, 1);
spriteTransform.translate(x-centerX, y-centerY);
}
Graphics2D g2d = (Graphics2D)g;
g2d.drawImage(image, spriteTransform, null);
}
COM: <s> draw the sprite on the given graphics context </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.