__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/21616519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDB() throws SQLException {
String query = "UPDATE "+TABLE+" SET "+RATE+"="+rate+" WHERE "+ID+"="+id+" LIMIT 1";
try {
doUpdate(query);
} catch (SQLException e) {
Logger.getInstance().addSQLQueryError("Could not update order", query, 2);
throw e;
}
}
COM: <s> update the trail rate in the database </s>
|
funcom_train/34672691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setHashValue(int indx, String s) {
hashParts[indx]=0;
for(int i=s.length() ; i>0 ; hashParts[indx]+=s.charAt(--i));
hashValue=0;
for(int i=0 ; i<hashParts.length ; hashValue+=hashParts[i++]);
}
COM: <s> set update the hash value that hash code will return </s>
|
funcom_train/3859889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSimple() {
assertEquals(0, testModel.getModules().size());
testLoad.init(testModel, "A:B:C:D", ":");
testLoad.perform();
assertEquals(4, testModel.getModules().size());
Module module = testModel.lookupModule("A");
assertNotNull(module);
assertEquals("A", Location.from(module).getLocation());
}
COM: <s> the load action should create as many modules as different path entries exist </s>
|
funcom_train/2034810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshSettings() {
title.setText(model.getLabel());
title.setForegroundColor(clrSettings.getColorFor(ColorSettings.NODE_CAPTION_FONT_COLOR));
metatext.setForegroundColor(clrSettings.getColorFor(ColorSettings.NODE_METATEXT_FONT_COLOR));
titleRect.setBackgroundColor(getTitleColor());
titleRect.add(title);
//Darstellendes Rechteck wird konstruiert
setBackgroundColor(clrSettings.getColorFor(ColorSettings.NODE_BG_COLOR));
setBorder(createNodeBorder());
}
COM: <s> refreshes and repaints all information given by the settings and the model </s>
|
funcom_train/26225498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String fileName, String prefix) throws IOException {
Properties outputProperties = new Properties();
PrintStream printStream = new PrintStream( new FileOutputStream(
new File(fileName) ) );
PropertyUtilities.filter(_localProperties, outputProperties, prefix);
outputProperties.store(printStream, "Your properties");
printStream.close();
}
COM: <s> writes all the properties being managed by this property manager to the </s>
|
funcom_train/14093279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEvaluateMatchesString7() {
String leftside = "ADAD";
String rightside = "A[BC]";
int operation = Operator.Operation.MATCH;
boolean ignoreCase = false;
boolean expectedReturn = false;
boolean actualReturn = Operator.evaluate(leftside, rightside, operation,
ignoreCase);
assertEquals("return value", expectedReturn, actualReturn);
}
COM: <s> test match with re false </s>
|
funcom_train/51575738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveRules() {
// Add your handling code here:
// We'll write out all the rules and clean up our frame
if (DEBUG) {
System.err.println("TriggerGUI.saveRules() Setting saveRules to true.");
}
originalRules = mainRules;
this.setVisible(false);
approvedRules = true;
}
COM: <s> sets the original rules to the main rules indicates rules have been approved </s>
|
funcom_train/20154653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InetAddress getLocalNetworkInterface() throws UnknownHostException {
if (isConnected()) {
InetAddress address = socket.getInetAddress();
return address;
} else if (this.localAddress != null) {
return localAddress;
} else if (this.localHost != null) {
localAddress = InetAddress.getByName(localHost);
return localAddress;
} else {
return null;
}
}
COM: <s> returns the address for the network interface bound to the socket on the </s>
|
funcom_train/24537123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void layout(IFigure parent) {
Iterator children = parent.getChildren().iterator();
IFigure f;
Rectangle bounds = new Rectangle(0,0,0,parent.getBounds().height);
while (children.hasNext()) {
f = (IFigure)children.next();
Integer widthI = (Integer) getConstraint(f);
if (widthI == null) continue;
int width = widthI.intValue();
bounds.width = bounds.width + width;
f.setBounds(bounds.getCopy());
bounds.x = bounds.x + width;
}
}
COM: <s> implements the algorithm to layout the components of the given container figure </s>
|
funcom_train/28346739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeEditContext(EditContext editContext) {
Collection tableGroups = editContext.getTableGroups();
Iterator groupIter = tableGroups.iterator();
while ( groupIter.hasNext() ) {
String tableGroup = (String)groupIter.next();
writeTableGroup(editContext, tableGroup);
}
}
COM: <s> write all table groups to xml </s>
|
funcom_train/18972004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String trimSessionId(String id) {
String key_decoded = java.net.URLDecoder.decode(id);
if (key_decoded.startsWith("\"") && key_decoded.endsWith("\"")) {
key_decoded = key_decoded.substring(1, key_decoded.length() - 1);
}
return key_decoded;
}
COM: <s> urldecodes and trims any off the session id </s>
|
funcom_train/9276481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPoolable() throws SQLException {
assertFalse("Statement cannot be poolable by default",
stmt.isPoolable());
stmt.setPoolable(true);
assertTrue("Statement must be poolable", stmt.isPoolable());
stmt.setPoolable(false);
assertFalse("Statement cannot be poolable", stmt.isPoolable());
}
COM: <s> tests is poolable set poolable and the default poolability </s>
|
funcom_train/40756132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void formatNumbers(DatasetType type) {
try {
NumberFormat format = NumberFormat.getNumberInstance();
format.setMinimumFractionDigits(7);
int init = model.getFixColumns();
for (int i = init; i < table.getColumnCount(); i++) {
table.getColumnModel().getColumn(i).setCellRenderer(new NumberRenderer(format));
}
} catch (Exception e) {
}
}
COM: <s> formating of the numbers in the table depening on the data set type </s>
|
funcom_train/21405431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long newPhoto(long idRoute) {
DataBasePoints dbp = new DataBasePoints(ctx);
dbp.open();
Punt p = dbp.getLastPoint(idRoute);
dbp.close();
DataBasePhotos db = new DataBasePhotos(ctx);
db.open();
long idPhoto = db.insertPhoto(idRoute, p.getLat(), p.getLon(), p
.getAltitude());
File photo = getPhotoPath(idPhoto);
db.insertPath(idPhoto, photo.getAbsolutePath());
db.close();
return idPhoto;
}
COM: <s> creates a new photo associates it with the last point and prepares the </s>
|
funcom_train/2289407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTimeStart(long timeStart) {
checkFrozen();
if (timeStart < 0) {
throw new CmsIllegalArgumentException(Messages.get().container(
Messages.ERR_LOGIN_MESSAGE_BAD_TIME_1,
new Long(timeStart)));
}
if (timeStart == 0) {
timeStart = DEFAULT_TIME_START;
}
m_timeStart = timeStart;
}
COM: <s> sets the time when to start displaying this message </s>
|
funcom_train/48181082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getGetter() {
final CharSequence name = getName();
if (element.getModifiers().contains(Modifier.PUBLIC)) {
throw new UnsupportedOperationException();
} else {
return String.format("%s.put%s(\"%s\", %s.get%S%s());",
PREFERENCES_NAME, type(), id(), OBJECT_NAME, name
.charAt(0), name.subSequence(1, name.length()));
}
}
COM: <s> todo move to template </s>
|
funcom_train/9139604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int append(BitOut bos, int last, int runShift) throws IOException {
int current = runShift - 1;
for(int i = 0; i < termDf; i++){
final int docid = postingSource.readGamma() + current;
bos.writeGamma(docid - last);
bos.writeUnary(postingSource.readGamma());
current = last = docid;
}
try{
postingSource.align();
}catch(Exception e){
// last posting
}
return last;
}
COM: <s> writes the document data of this posting to a </s>
|
funcom_train/37406147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProtocolUser getLastSeenIP() {
ProtocolUser protocolUser = null;
Calendar date = null;
for (ProtocolUser user : protocolUsers)
if (date == null
|| (user.getLastSeen() != null && date.compareTo(user
.getLastSeen()) < 0)) {
protocolUser = user;
date = user.getLastSeen();
} else
protocolUser = user;
return protocolUser;
}
COM: <s> returns protocol user whose ip is known and seen most recently </s>
|
funcom_train/13712577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight){
processingGraphics.drawRoundRect(x, y, width, height, arcWidth, arcHeight);
svgGraphics.drawRoundRect(x, y, width, height, arcWidth, arcHeight);
}
COM: <s> draws an outlined round cornered rectangle using this graphics </s>
|
funcom_train/26278451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printBuffer() {
StringBuffer sb = new StringBuffer(m_intBucketCount * 2 );
for ( int intIndex = 0 ; intIndex<m_intBucketCount ; intIndex ++ ) {
sb.append(m_arrBuckets[intIndex]).append(' ');
}
System.out.println(sb);
System.out.println(m_intStartIndex);
}
COM: <s> print out the buffer for debugging </s>
|
funcom_train/35243558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(JSONString key, JSONValue value) {
if (key == null || key.isNull() == true || value == null) {
throw new NullPointerException("Parameter must not be null");
}
setNullity(false);
this.data.put(key, value);
}
COM: <s> add an entry inside the object </s>
|
funcom_train/10387804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() {
if (compressionStream != null) {
try {
if (log.isDebugEnabled()) {
log.debug("Flushing the compression stream!");
}
compressionStream.flush();
} catch (IOException e) {
if (log.isDebugEnabled()) {
log.debug("Ignored exception while flushing gzip filter", e);
}
}
}
}
COM: <s> added to allow flushing to happen for the gziped outputstream </s>
|
funcom_train/40312319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSchemaName_InvalidColumn2() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getSchemaName(0);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getSchemaName method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get schema name with column index equals to 0 </s>
|
funcom_train/22305788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isFactoryMethod(Method javaMethod) {
return isStatic(javaMethod.getModifiers())
&& isPublic(javaMethod.getModifiers())
&& javaMethod.getAnnotation(Factory.class) != null
&& javaMethod.getReturnType().isAssignableFrom(Matcher.class);
}
COM: <s> determine whether a particular method is classified as a matcher factory method </s>
|
funcom_train/13958710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String _urlWithRequestHandlerKey(String requestHandlerKey, String requestHandlerPath, String queryString, boolean secure) {
String url = super._urlWithRequestHandlerKey(requestHandlerKey, requestHandlerPath, queryString, secure);
if (!ERXApplication.isWO54()) {
url = ERXApplication.erxApplication()._rewriteURL(url);
}
return url;
}
COM: <s> overridden to support rewritten urls via </s>
|
funcom_train/1060142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEndAnglePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Ellipse_endAngle_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Ellipse_endAngle_feature", "_UI_Ellipse_type"),
Di2Package.Literals.ELLIPSE__END_ANGLE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the end angle feature </s>
|
funcom_train/42877091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveITunesDB(ITunesDB db) throws IOException {
logger.entering("de.axelwernicke.mypod.ipod.IPod", "saveITunesDB");
boolean result = false;
setITunesDB(db);
result = saveITunesDB();
logger.exiting("de.axelwernicke.mypod.ipod.IPod", "saveITunesDB");
return result;
}
COM: <s> saves the i tunes database on i pod </s>
|
funcom_train/1170810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAttachee(Card c) {
CardList list = AllZoneUtil.getCardsInPlay();
for (int i = 0; i < list.size(); i++) {
CardList check = new CardList(list.getCard(i).getAttachedCards());
if (check.contains(c)) return true;
}
return false;
}//isAttached(Card c)
COM: <s> p is attachee </s>
|
funcom_train/28489815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void increment(String name) {
ProgressLogger.getInstance().debug("enter increment");
Map counters = scopes.get(itemNames.peek());
if (counters == null)
return;
if (counters.containsKey(name)) {
int count = (Integer) counters.get(name);
counters.put(name, count + 1); // increment by 1
} else
// if event occurs for the first time
counters.put(name, 1); // instantialte counter to 1
ProgressLogger.getInstance().debug("exit increment");
}
COM: <s> increment counter name </s>
|
funcom_train/13551623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setP4_(int value) {
if ((portDir & 0x10)!=0) { // output port ?
if (((portDataOut & value)^value)!=0) remember|=0x10;
}
if (value!=0) portDataOut|=value;
else portDataOut&=~0x10;
}
COM: <s> set the value of output port 4 by internal operation </s>
|
funcom_train/48909405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfStock() {
if (txfStock == null) {
txfStock = new JTextField();
txfStock.setBounds(new Rectangle(103, 120, 151, 22));
txfStock.addKeyListener(new KeyAdapter(){
public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==KeyEvent.VK_ENTER)
txfSaldoInicial.grabFocus();
}
});
}
return txfStock;
}
COM: <s> this method initializes txf stock </s>
|
funcom_train/1733790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean testKeyworkFrequency(int documentID, int keywordID) throws DatabaseException{
String sql="select * from article_pattern where article_id=? and keyword_id=?";
boolean result=false;
try{
PreparedStatement ps=this.aConn.prepareStatement(sql);
ps.setInt(1, documentID);
ps.setInt(2, keywordID);
ResultSet rs=ps.executeQuery();
if(rs.next()){
result=true;
}
ps.close();
}catch(SQLException e){
throw new DatabaseException(e.toString());
}
return result;
}
COM: <s> to test if the document id an keyword id have been in db </s>
|
funcom_train/14353140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ReportService".equals(portName)) {
setReportServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/25577037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean quit() {
while (!this.openProjects.isEmpty()) {
if (!closeActiveProject()) {
// user aborted the closing process
return false;
}
}
// user saved successfuly or did not want to save
storeWindowSettings();
// shut down local server
if (NetworkClient.getLocalServer() != null) {
try {
NetworkClient.getLocalServer().shutdown();
} catch (RemoteException ex) {
// terminate the application and server thread the hard way
System.exit(0);
}
}
// close application
dispose();
return true;
}
COM: <s> realizes the code exit code option in the menu bar first asking for </s>
|
funcom_train/48127333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClaseDestinoPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Relacion_claseDestino_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Relacion_claseDestino_feature", "_UI_Relacion_type"),
DiagramaClasesPackage.Literals.RELACION__CLASE_DESTINO,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the clase destino feature </s>
|
funcom_train/32057562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTransferData() {
System.out.println("testGetTransferData");
// Add your test code below by replacing the default call to fail.
BasicTransferable x = new BasicTransferable();
DataFlavor f = new DataFlavor();
Object o = new Object();
try { o = x.getTransferData(f); }
catch (Throwable UnsupportedFlavorException) { }
}
COM: <s> test of get transfer data method of class basic transferable </s>
|
funcom_train/33282254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTMLCollection jsxGet_children() {
final HtmlElement node = getDomNodeOrDie();
final HTMLCollection collection = new HTMLCollection(node, false, "HTMLElement.children") {
protected List<Object> computeElements() {
return new ArrayList<Object>(node.getChildNodes());
}
};
return collection;
}
COM: <s> gets the children of the current node </s>
|
funcom_train/46764539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getMessageArea() {
if (messageArea == null) {
messageArea = new JTextArea(conversation.getTransscript());
changeProperty("bgcolor",visualProperties.getProperty("bgcolor"));
changeProperty("fgcolor",visualProperties.getProperty("fgcolor"));
changeProperty("size",visualProperties.getProperty("size"));
messageArea.setEditable(false);
}
return messageArea;
}
COM: <s> this method initializes message area </s>
|
funcom_train/3176923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() {
// safety
if (instance==null)
return;
// gather the values
for (int p=0; p<properties.size(); p++)
ReflectHelper.setValue(properties.get(p), getValue(components.get(properties.get(p).getName())));
// done
}
COM: <s> updates the instance with current values </s>
|
funcom_train/5009382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String at(int i) {
if (i < 0 || i >= id.size()) return null;
int j = ((Integer)id.elementAt(i)).intValue();
/* due to the index shift NA (INT_MIN) will turn into INT_MAX if base is 1 */
return (j < 0 || j > 2147483640) ? null : ((String)val.elementAt(j));
}
COM: <s> returns name for a specific id </s>
|
funcom_train/50022568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showPopup(MouseEvent e) {
if (e.isPopupTrigger()) {
JComponent c = (JComponent) e.getSource();
JPopupMenu p = (JPopupMenu) popupMap.get(e.getSource());
if (p != null) {
c.requestFocus();
p.show(c, e.getX(), e.getY());
e.consume();
}
}
}
COM: <s> shows popup for a given event </s>
|
funcom_train/34427954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long generateCachePeriod(long min, long max) {
assert min < max : "Provided min must stricly inferior to max";
double ratio = ((double) max - (double) min) * Math.random();
long res = Math.round((double) min + ratio);
Log.getInstance(this).enter("Generated period between " + min + " and " + max + ": " + res);
return res;
}
COM: <s> randomly generates a cached period between provided min and max </s>
|
funcom_train/21606273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getBeanClass() throws IllegalStateException {
Object beanClassObject = this.beanClass;
if (beanClassObject == null) {
throw new IllegalStateException("No bean class specified on bean definition");
}
if (!(beanClassObject instanceof Class)) {
throw new IllegalStateException(
"Bean class name [" + beanClassObject + "] has not been resolved into an actual Class");
}
return (Class) beanClassObject;
}
COM: <s> return the class of the wrapped bean if already resolved </s>
|
funcom_train/45622909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOutputResxPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VjsResGenType_outputResx_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VjsResGenType_outputResx_feature", "_UI_VjsResGenType_type"),
MSBPackage.eINSTANCE.getVjsResGenType_OutputResx(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the output resx feature </s>
|
funcom_train/32207042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fire(Weapon.type type, float initial_x, float initial_y){
LinkedList<Weapon> weaponList = arsenal.get(type);
if(weaponList != null){
if(weaponList.size() > 0)
weaponList.removeFirst().launch(initial_x, initial_y);
}
}
COM: <s> launches a weapon from the weapon list corresponding to the given </s>
|
funcom_train/39381840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearErrors() {
setError(null);
List fields = ContainerUtils.getInputFields(this);
Field field = null;
for (int i = 0, size = fields.size(); i < size; i++) {
field = (Field) fields.get(i);
field.setError(null);
}
}
COM: <s> clear any form or field errors by setting them to null </s>
|
funcom_train/12303651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trackerTorrentFileChanged(TorrentFileEvent event) {
stopScreenTimer();
manager.stopTorrentProcess();
Runnable runner = new Runnable(){
public void run() {
stopScreenTimer();
start.setEnabled(false);
stop.setEnabled(false);
progress.setIndeterminate(false);
progress.setStringPainted(false);
messages.setText("UPDATED FILE - The torrent file on the server has been updated !! \n RESTARTING....");
messages.repaint();
manager.reset();
//Start the process again.
startTorrentManager();
}
};
SwingUtilities.invokeLater(runner);
}
COM: <s> this method gets invoked when the code client torrent manager code finds out </s>
|
funcom_train/31651206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPropertyValue(String name) throws Exception{
Property property = getProperty(name);
Value value = property.getValue( );
XMLResource r = value.getXMLResource();
String text = null;
Node node = r.getContentAsDOM( );
text = XMLTools.getNodeText(node);
return text;
}
COM: <s> gets the simple type value of a property as a string </s>
|
funcom_train/3596603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean processAnnotationEnded() {
boolean result = super.processAnnotationEnded();
if (result && currentEmotion != null) {
timeline.showAnnotation(currentStart,
Document.getInstance().getClock().getSystemTime(),
currentEmotion);
}
currentStart = Double.NaN;
currentEmotion = null;
return result;
}
COM: <s> p calls the superclass method </s>
|
funcom_train/35078985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newFormatCommand(Document doc, String fontName, Integer fontSize, Boolean bold, Boolean italic, Boolean underlined, Color color) {
Command cmd = new FormatCommand(doc, fontName, fontSize, bold, italic, underlined, color);
if(cmd.execute() && cmd.canUndo()) {
addToCommandList(cmd);
}
}
COM: <s> create a new format command and execute it </s>
|
funcom_train/19573339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object mock(Class clazz, String id) {
if( clazz.isInterface() ) {
return getProxyFactory().createInterfaceProxy(clazz, id);
} else {
return getProxyFactory().createObjectMockProxy(clazz, new Class[]{}, new Object[]{}, id);
}
}
COM: <s> creates a mock for the selected class with the specified id </s>
|
funcom_train/45622599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInitialTargetsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProjectType_initialTargets_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProjectType_initialTargets_feature", "_UI_ProjectType_type"),
MSBPackage.eINSTANCE.getProjectType_InitialTargets(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the initial targets feature </s>
|
funcom_train/3371907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Integer getObjectForLayer(int layer) {
Integer layerObj;
switch(layer) {
case 0:
layerObj = DEFAULT_LAYER;
break;
case 100:
layerObj = PALETTE_LAYER;
break;
case 200:
layerObj = MODAL_LAYER;
break;
case 300:
layerObj = POPUP_LAYER;
break;
case 400:
layerObj = DRAG_LAYER;
break;
default:
layerObj = new Integer(layer);
}
return layerObj;
}
COM: <s> returns the integer object associated with a specified layer </s>
|
funcom_train/50154994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataSource(DataSourceConfiguration dataSource) {
synchronized (dataSources) {
ArrayList old = new ArrayList(dataSources);
dataSources.add(dataSource);
dataSource.addPropertyChangeListener(this);
getPropertyChangeSupport().firePropertyChange("dataSources", old,
dataSources);
}
}
COM: <s> method add data source </s>
|
funcom_train/14170558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FileEntry findFileInFileList(File path) {
FileEntry ret = null;
DirectoryEntry parent = findParentDirInFileList(path);
if (parent != null) {
String absolutePath = path.getAbsolutePath();
String fileName = absolutePath.substring(absolutePath
.lastIndexOf(File.separatorChar));
for (FileEntry f : parent.getFiles()) {
if (fileName.equals(f.getName())) {
ret = f;
break;
}
}
}
return ret;
}
COM: <s> finds a file entry in the current file list that corresponds to given </s>
|
funcom_train/45611289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private int getPort() {
// long port_long = getLongVariable("port");
// if (port_long < 0 || port_long > 65535)
// throw new RuntimeException("Port not in range: " + port_long);
// int port = (int) port_long;
// return port;
// }
COM: <s> get the port variable from the instance </s>
|
funcom_train/2302037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtendedFSATransition copy(State from, State to) {
Automaton automaton = from.getAutomaton();
Set condClone = getConditionsClone(automaton);
Set assClone = getAssignmentsClone(automaton);
return new ExtendedFSATransition(from, to, getLabel(), condClone, assClone);
}
COM: <s> returns a copy of the transition </s>
|
funcom_train/3413673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigInteger setBit(int n) {
if (n<0)
throw new ArithmeticException("Negative bit address");
int intNum = n >>> 5;
int[] result = new int[Math.max(intLength(), intNum+2)];
for (int i=0; i<result.length; i++)
result[result.length-i-1] = getInt(i);
result[result.length-intNum-1] |= (1 << (n & 31));
return valueOf(result);
}
COM: <s> returns a big integer whose value is equivalent to this big integer </s>
|
funcom_train/27675574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reader getReader() {
try {
return new InputStreamReader( getInputStream(), "UTF8" );
} catch ( UnsupportedEncodingException ex ) {
throw(
Alerts.compile(
"Problem opening source for reading",
"Unsupported encoding"
).
culprit( "source", getOrigin() ).
culprit( "reason", ex.getMessage() ).
mishap()
);
}
}
COM: <s> returns a reader to read characters from this source </s>
|
funcom_train/7599868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getAllEquivalentClasses(ATermAppl c) {
c = ATermUtils.normalize( c );
if(!isClass(c)) {
if( PelletOptions.SILENT_UNDEFINED_ENTITY_HANDLING )
return Collections.EMPTY_SET;
else
throw new UnsupportedFeatureException(c + " is not a class!");
}
classify();
if( !taxonomy.contains( c ) )
builder.classify( c );
return taxonomy.getAllEquivalents( c );
}
COM: <s> returns all the classes that are equivalent to class c including c itself </s>
|
funcom_train/46459257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setHTMLData(String[][] data) {
if (data == null) return;
htmlData.clear();
for (int i = 0; i < data.length; i++) {
HTML html = new HTML(data[i][0], data[i][1]);
htmlData.add(html);
}
}
COM: <s> sets the html data </s>
|
funcom_train/17800992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createSQLStatement (ISQLBuilder builder) {
StringBuffer sb = new StringBuffer();
sb.append(builder.getCommand());
sb.append(" ");
sb.append(builder.getTable());
sb.append(" ");
sb.append(builder.getWhat());
sb.append(" ");
sb.append(builder.getCriteria());
sb.append(" ");
sb.append(builder.getAppendix());
return sb.toString().trim();
}
COM: <s> uses the given builder to produce an sql string </s>
|
funcom_train/42475804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reactionsDelete(List reactions, HttpServletRequest request) {
assert reactions != null : "Parameter 'reactions' must not be null.";
assert request != null : "Parameter 'request' must not be null.";
final int index = Integer.parseInt(request.getParameter("index"));
if (index >= reactions.size()) return; // if the user deletes a reaction which is not stored yet
reactions.remove(Integer.parseInt(request.getParameter("index")));
}
COM: <s> deletes a reaction from the list of reactions </s>
|
funcom_train/12127555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintFrom(PBounds localBounds, PNode childOrThis) {
if (childOrThis != this) {
localToParent(localBounds);
}
notifyCameras(localBounds);
if (getParent() != null) {
getParent().repaintFrom(localBounds, childOrThis);
}
}
COM: <s> override repaints and forward them to the cameras that are viewing this </s>
|
funcom_train/11723085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(String resource, String token, String etag) {
log.debug("matches: Trying to match token="+token+", etag="+etag);
for (IfList il : this) {
if (il.match(token, etag)) {
log.debug("matches: Found match with " + il);
return true;
}
}
// invariant: no match found
return false;
}
COM: <s> matches a list of </s>
|
funcom_train/29397123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getFilePointer(long RVA) {
for (int i = 0; i < headers.length; i++) {
if (headers[i].VirtualAddress <= RVA && (headers[i].VirtualAddress + headers[i].SizeOfRawData) > RVA) {
return ((RVA - headers[i].VirtualAddress) + headers[i].PointerToRawData);
}
}
return -1L;
}
COM: <s> returns the file pointer equivalent of the given rva </s>
|
funcom_train/18757248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractKey(String line) {
int len = line.length();
StringBuffer key = new StringBuffer();
for (int i = 0; i < len; i++) {
char c = line.charAt(i);
//whitespace, colon, or equals characters represent key separators
if (Character.isWhitespace(c) || c == ':' || c == '=')
break;
key.append(c);
}
return key.toString();
}
COM: <s> extracts and returns the property key from the given property file line </s>
|
funcom_train/23234575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePlayersMonsters() {
for (Creature creature : spawnedCreatures) {
MidhedavaRPZone monsterZone = creature.getZone();
try {
MidhedavaPRuleProcessor.get().removeNPC(creature);
monsterZone.getNPCList().remove(creature);
if (monsterZone.has(creature.getID())) {
monsterZone.remove(creature);
}
} catch (RPObjectNotFoundException e) {
// don't log errors here because the player may have killed a few of the monsters
logger.debug(e, e);
}
}
}
COM: <s> remove the critters that the player was supposed to kill </s>
|
funcom_train/3454867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
try {
FlowConnection otherfc = (FlowConnection) o;
return (this.getBeginComponent().equals(otherfc.getBeginComponent()) &&
this.getEndComponent().equals(otherfc.getEndComponent()));
} catch(ClassCastException e) {
return false;
}
}
COM: <s> used to identify sibblings when analysing the project </s>
|
funcom_train/18741961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLabelText(String name) {
StringBuilder result = new StringBuilder();
if (this.editorMap.containsKey(name)) {
result.append(this.editorMap.get(name).getTitle());
} else {
result.append(getResource(name).getLastName());
}
decorateLabelText(name, result);
return result.toString();
}
COM: <s> callback method to construct the string description for a </s>
|
funcom_train/21435810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseFormula(String formula) throws ResourcesDbException {
//*** empty composition map: ***
if(this.getCompositionMap() != null) {
this.getCompositionMap().clear();
}
//*** get elements and counts from formula: ***
this.addFormula(formula);
}
COM: <s> set the composition using a chemical formula </s>
|
funcom_train/15867446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RolePlayer removeRole(String roleId, String grId) throws MoiseConsistencyException {
GroupInstance gi = oe.findGroup(grId);
if (gi == null)
throw new MoiseConsistencyException("the group "+grId+" does not exists.");
return removeRole(roleId, gi);
}
COM: <s> removes a role from an agent </s>
|
funcom_train/13261366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calcVar() {
double[] C;
double[] tempBatch = new double[numBatch];
K = numBatch / 4;
C = calcConstants(K, polyOrder);
C1 = C[0];
C2 = (int) C[1];
System.arraycopy(batchMean, 0, tempBatch, 0, numBatch);
extVar = calcVar(tempBatch, 0, batch, K, polyOrder);
}
COM: <s> updates the variance </s>
|
funcom_train/41384544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel4() {
if (jPanel4 == null) {
jPanel4 = new JPanel();
jPanel4.setLayout(new BorderLayout());
jPanel4.setBackground(new Color(10, 16, 40));
jPanel4.setPreferredSize(new Dimension(0, 40));
jPanel4.setVisible(false);
jPanel4.add(getJPanel121(), BorderLayout.CENTER);
jPanel4.add(getJPanel31(), BorderLayout.EAST);
}
return jPanel4;
}
COM: <s> this method initializes j panel4 </s>
|
funcom_train/22008383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processAck(RequestEvent requestEvent) {
// _logger.info("Got a ACK event");
// ServerTransaction stx = requestEvent.getServerTransaction();
// Dialog dialog = stx.getDialog();
// SipSession session = SipSession.getSession(dialog.getDialogId());
}
COM: <s> process the ack request </s>
|
funcom_train/32055648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPopupMenu(Component c, Point p) {
Container parent = this;
do {
parent = parent.getParent();
} while (parent != null && !(parent instanceof GPGraphpad));
GPGraphpad pad = (GPGraphpad) parent;
if (pad != null) {
JPopupMenu pop = pad.getBarFactory().createLibraryPopupMenu();
pop.show(c, p.x, p.y);
}
}
COM: <s> show the popup menu </s>
|
funcom_train/18192139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void launchCar() {
Car c =
new Car(x, y, direction, speed, brakingDistance, haltingDistance,
safeDistance, launchedCars, firstIntersection, this);
firstIntersection.addApproachingCar(c);
SimControl.addCar(c);
launchedCars.add(c);
numberOfCarsLaunched++;
}
COM: <s> launches a car into the road network </s>
|
funcom_train/21648394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computePrices() {
Iterator<CartProductBean> ite = products.values().iterator();
productsPrice = 0;
shippingPrice = 0;
while (ite.hasNext()) {
CartProductBean cur = ite.next();
productsPrice += cur.product.getEuroPrice() * cur.getQuantity();
}
// shipping costs 30euros, and is free from 300euros
if (productsPrice >= 300)
shippingPrice = 0;
else
shippingPrice = 30;
}
COM: <s> computes the new prices for this cart products prices and shipping </s>
|
funcom_train/41435034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void suspendIfAssoaciatedWithThread() throws SystemException {
// if there is a tx associated with this thread and it is this one
// then suspend it to dissociate the thread (dumb feature?!?! of jboss ts)
final SleeTransaction currentThreadTransaction = transactionManager
.getSleeTransaction();
if (currentThreadTransaction != null
&& currentThreadTransaction.equals(this)) {
// lets use the real tx manager directly, to avoid any other procedures
transactionManager.getRealTransactionManager().suspend();
}
}
COM: <s> some operations require that the transaction be suspended </s>
|
funcom_train/802806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMzRangeStartPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SpectrumInstrumentType_mzRangeStart_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SpectrumInstrumentType_mzRangeStart_feature", "_UI_SpectrumInstrumentType_type"),
MzdataPackage.Literals.SPECTRUM_INSTRUMENT_TYPE__MZ_RANGE_START,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the mz range start feature </s>
|
funcom_train/3607689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws IOException {
IOException exception = null;
for (int i = 0, end = writers_.length; i < end; ++i) {
try {
writers_[i].flush();
}
catch (IOException e) {
exception = e;
}
}
if (exception != null) {
throw exception;
}
}
COM: <s> flush the stream </s>
|
funcom_train/8679306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XPathExpression compile(String expr) throws XPathExpressionException {
if (expr == null) {
throw new NullPointerException("expr");
}
try {
return createExpressionInternal(expr);
} catch (net.sf.saxon.trans.XPathException e) {
throw new XPathExpressionException(e);
}
}
COM: <s> compile an xpath 2 </s>
|
funcom_train/22232847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bounds getTriggeringBounds() {
if (behav == null) {
throw new IllegalStateException(J3dI18N.getString("WakeupOnCollisionMovement6"));
}
synchronized (behav) {
if (!behav.inCallback) {
throw new IllegalStateException
(J3dI18N.getString("WakeupOnCollisionMovement6"));
}
}
return (collidingBounds != null ?
(Bounds)(collidingBounds.clone()): null);
}
COM: <s> retrieves the bounds object that caused the collision </s>
|
funcom_train/33850601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInstruction(InstructionHandle handle) throws CFGBuilderException {
int position = handle.getPosition();
if (usedInstructionSet.get(position))
throw new CFGBuilderException("Instruction " + handle + " visited in multiple subroutines");
instructionSet.set(position);
usedInstructionSet.set(position);
}
COM: <s> add an instruction to the subroutine </s>
|
funcom_train/40001570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectLoader() {
materials = new HashMap();
vertices = new ArrayList();
parsers = new HashMap();
parsers.put("obj", new ObjLineParser());
parsers.put("mtl", new MtlLineParser());
currentMaterial = null;
setLights(new ArrayList(), 1);
}
COM: <s> creates a new object loader </s>
|
funcom_train/31687989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mandatoryContains(double x, double y) {
Rectangle2D.Float rect = new Rectangle2D.Float(this.getX()+3, this.getY()+30, this.m_isMandatory.getWidth(), 15);
return rect.contains(new Double(x).intValue(), new Double(y).intValue());
}
COM: <s> checks if the mandatory checkbox contains a given co ordinate </s>
|
funcom_train/31042049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean visible) {
super.setVisible(visible);
if (!getVisible()) {
Composite parent = getParent();
while (parent != null && !parent.isVisible()) {
parent = parent.getParent();
}
if (parent != null)
parent.setFocus();
}
}
COM: <s> sets the label limit </s>
|
funcom_train/21336494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Roll d6(int nDice) {
if (0 >= nDice) {
throw new IllegalArgumentException
("Must ask for a positive number of rolls, not " + nDice);
}
// Use the Roll object to record the rolls.
MMRoll roll = new MMRoll (this, 6, 1);
for (int i = 1; i < nDice; i++) {
roll.addRoll (this);
}
return roll;
}
COM: <s> simulates six sided die rolls </s>
|
funcom_train/8088546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
Sequence seq2 = (Sequence) obj;
FastVector seq2Elements = seq2.getElements();
for (int i = 0; i < m_Elements.size(); i++) {
Element thisElement = (Element) m_Elements.elementAt(i);
Element seq2Element = (Element) seq2Elements.elementAt(i);
if (!thisElement.equals(seq2Element)) {
return false;
}
}
return true;
}
COM: <s> checks if two sequences are equal </s>
|
funcom_train/40762694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(Exception e) {
String pluginName = super.getBundle().getSymbolicName();
IStatus status = new Status(IStatus.ERROR, pluginName, 0, e.getMessage(), e);
plugin.getLog().log(status);
}
COM: <s> logs out the exception or error message for eclipse sensor plug in </s>
|
funcom_train/37790543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue() {
Logical logical = getLogical();
Value value = getValueField();
NakedObject nakedObject = (NakedObject)getParentObject();
JCheckBox box = (JCheckBox)getComponent();
boolean oldValue = logical.isSet();
boolean newValue = box.isSelected();
if (oldValue != newValue) {
if (newValue) {
value.set(nakedObject, Logical.TRUE);
} else {
value.set(nakedObject, Logical.FALSE);
}
}
}
COM: <s> this method is called if the user changes the value of the checkbox </s>
|
funcom_train/25467349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeyName(final String keyName) {
if (keyName == null) throw new IllegalArgumentException("keyName can't be null");
if (keyName.equals("") == false && keyName.trim().length() == 0) throw new IllegalArgumentException("keyName can't be blank");
this.keyName = keyName;
}
COM: <s> sets key name </s>
|
funcom_train/47833514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Predicate getPredicate(int i) {
Predicate pred = null;
if (i < (body.size() + head.size())) {
if (i < body.size())
pred = body.get(i);
else
pred = head.get(i - body.size());
}
return pred;
}
COM: <s> returns the i th predicate of the template </s>
|
funcom_train/26289915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullPath () {
if (getParent() != null) {
Page page = getParent();
String path = "";
while (page != null) {
path = page.getPath() + "/" + path;
page = page.getParent();
}
return path + getPath();
} else
return getPath();
}
COM: <s> get full path of the page </s>
|
funcom_train/26312224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point getHexLocation(int x, int y) {
return new Point(x * (int) (HEX_WC * scale), y * (int) (HEX_H * scale)
+ ((x & 1) == 1 ? (int) (HEX_H / 2 * scale) : 0));
}
COM: <s> returns the absolute position of the upper left hand corner of the hex </s>
|
funcom_train/12306654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isEnabled(IToc toc) {
boolean tocEnabled = HelpBasePlugin.getActivitySupport().isEnabled(
toc.getHref())
&& !UAContentFilter.isFiltered(toc, HelpEvaluationContext
.getContext());
if (!tocEnabled)
return false;
ITopic[] topics = toc.getTopics();
for (int i = 0; i < topics.length; i++) {
if (EnabledTopicUtils.isEnabled(topics[i])) {
return true;
}
}
return false;
}
COM: <s> check if given toc is visible and non empty </s>
|
funcom_train/20827277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printCoverageTable() {
printTableHeader("loc", "nloc", "statements", "coverage");
printDetail(info, true);
for (Info child : info.getChildInfosSortedByCoverage()) {
printDetail(child, false);
}
printTableFooter();
}
COM: <s> prints a table with the code coverage information </s>
|
funcom_train/9363287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getOrigins(ValueCallback<Set> callback) {
if (callback != null) {
if (WebViewCore.THREAD_NAME.equals(Thread.currentThread().getName())) {
getOriginsImpl();
Set origins = new HashSet(mOrigins);
callback.onReceiveValue(origins);
} else {
postMessage(Message.obtain(null, GET_ORIGINS, callback));
}
}
}
COM: <s> gets the set of origins for which geolocation permissions are stored </s>
|
funcom_train/33265041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h) {
if ( ( ( flags & (WIDTH|HEIGHT|FRAMEBITS|ALLBITS) ) != 0 ) &&
( img != disabledForeground ) ) {
if ( !stretched && !tiled ) {
fgWidth = w;
fgHeight = h;
}
}
return ( super.imageUpdate( img, flags, x, y, w, h ) );
}
COM: <s> repaints the component when the image has changed </s>
|
funcom_train/9879157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onDegreeSelection() {
Frame frame = JOptionPane.getFrameForComponent(getContentComponent());
RelNetSelectionDlg dialog = new RelNetSelectionDlg(frame, RelNetSelectionDlg.DEGREE_TYPE);
if (dialog.showModal() == JOptionPane.OK_OPTION) {
selectByDegree(dialog.getCondition(), dialog.getMinDegree(), dialog.getMaxDegree());
}
}
COM: <s> selects nodes with the user defined degrees </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.