__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/25146507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkbookDbSession newDbSession(WorkbookId workbookKey) throws StorageException, NotFoundException {
WorkbookDbSession wkdata;
try {
ExtendedDataSource extDataSource = getDataSource(workbookKey);
wkdata = new WorkbookDbSession(workbookKey, extDataSource.getDdl(), extDataSource.getSchema(),
connectionWrapperFactory.newInstance(extDataSource.getDataSource()));
} catch (SQLException e) {
throw new StorageException(e);
}
return wkdata;
}
COM: <s> create a new session to the corresponding database </s>
|
funcom_train/8672784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNamespace(String prefix, String uri) throws JaxenException {
try {
super.addNamespace(prefix, uri);
} catch (JaxenException e) {
// the intention here is to prevent us caching a namespace, if the
// underlying implementation does not accept it
throw e;
}
namespaces.put(prefix, uri);
}
COM: <s> this override captures any added namespaces as the jaxen base xpath class nor </s>
|
funcom_train/46680424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTierAt(AbstractTier tier, int pos) throws JexmaraldaException {
if (lookupID(tier.getID())!=-1){throw new JexmaraldaException(6, new String("ID " + tier.getID() + " already exists in this transcription."));}
this.insertElementAt(tier, pos);
updatePositions();
}
COM: <s> inserts the given tier at the given position </s>
|
funcom_train/36548388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IType getTypeOfAnnotation(IAnnotation anno, IType relative_type) throws JavaModelException {
IJavaProject project = anno.getJavaProject();
Pair<String,String> name = getQualifiedAnnoType(anno, relative_type);
IType anno_type = project.findType(name.fst(), name.snd());
return anno_type;
}
COM: <s> find the type of the given annotation </s>
|
funcom_train/28750572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProject(String newVal) {
if ((newVal != null && this.project != null && (newVal.compareTo(this.project) == 0)) ||
(newVal == null && this.project == null && project_is_initialized)) {
return;
}
this.project = newVal;
project_is_modified = true;
project_is_initialized = true;
}
COM: <s> setter method for project </s>
|
funcom_train/28367008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getIconImage() {
try {
final BeanInfo beanInfo = Introspector.getBeanInfo( getPrototypeClass() );
final Image image = beanInfo.getIcon( BeanInfo.ICON_COLOR_16x16 );
return image != null ? image : makeImage();
}
catch ( IntrospectionException exception ) {
return makeImage();
}
}
COM: <s> get an image representation for the view </s>
|
funcom_train/29612809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean loginAction(boolean login) {
UserInfoBean userInfoBean = null;
// if login action true open dialog and wait for return
Shell activeShell = new Shell();
if (login) {
getCRCNavigatorProperties();
LoginDialog loginDialog = new LoginDialog(activeShell);
userInfoBean = loginDialog.open();
}
// userInfoBean null means user pressed cancel- logout and close pages
if (userInfoBean == null) {
log.debug( " Login cancel");
return false;
} else {
// login successful
log.debug("Login Successful");
return true;
}
}
COM: <s> this method populates controls on login logout using user info bean </s>
|
funcom_train/50846536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTypeMap() throws Exception {
if(!getBooleanProperty("test.typemap", true)) {
return;
}
Map<String, Class<?>> map = null;
Connection conn = newConnection();
try {
conn.setTypeMap(map);
} catch (Throwable t) {
assertTrue(t instanceof java.sql.SQLFeatureNotSupportedException);
}
}
COM: <s> test of set type map method of interface java </s>
|
funcom_train/8981479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getJJMenuBar() {
if (jJMenuBar == null) {
jJMenuBar = new JMenuBar();
jJMenuBar.add(getJMenuRepositorio());
jJMenuBar.add(getJMenuXML());
jJMenuBar.add(getJMenuAbout());
jJMenuBar.add(getJMenuSair());
}
return jJMenuBar;
}
COM: <s> this method initializes j jmenu bar </s>
|
funcom_train/24162682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createLogEntry(String entryText) {
SimpleDateFormat sdf = new SimpleDateFormat(ENTRY_STAMP_FORMAT);
String entry = ENTRY_PREFIX + sdf.format(Calendar.getInstance().getTime()) + ENTRY_SUFFIX;
entry += entryText;
entry += ENTRY_TERMINATOR;
return entry;
}
COM: <s> create a log entry string including the time stamp </s>
|
funcom_train/32791247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleRelGreaterEqual(String codeSrcExp, List<String> args, StringBuffer rule, StringBuffer spec) {
assert(args.size() == 1) : "Relational expression >= needs exactly one argument";
codeAgent.setArgument("add_exp_1", codeSrcExp);
codeAgent.setArgument("add_exp_2", args.get(0));
rule.append("relational_expression_tail");
spec.append("gteq");
}
COM: <s> parameterizes the code agent for a relational greater equal operation </s>
|
funcom_train/7351270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void testSerializeSkaringaXml() {
try {
for (int i = 0; i < getLoopCount(); ++i) {
FileOutputStream ostream = new FileOutputStream(getTestId() + i);
_trans.serialize(_testObj, new StreamResult(ostream));
ostream.close();
}
}
catch (Exception e) {
setError(true);
Log.error(e);
}
}
COM: <s> test serialization with skaringa </s>
|
funcom_train/14213562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object decrypt(String keyName, String str) throws EntityCryptoException {
try {
return UtilObject.getObject(DesCrypt.decrypt(this.getKey(keyName), StringUtil.fromHexString(str)));
} catch (GeneralException e) {
throw new EntityCryptoException(e);
}
}
COM: <s> decrypts a hex encoded byte array into a string </s>
|
funcom_train/22278393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encode(Encoder encoder) throws CodingException {
super.encode(encoder);
encoder.encodeObject(IMAGE_KEY, image);
encoder.encodeObject(DATA_KEY, (Codable)data);
encoder.encodeString(DATATYPE_KEY, dataType);
encoder.encodeBoolean(ENABLED_KEY, enabled);
if (border instanceof EmptyBorder)
encoder.encodeObject(BORDER_KEY, null);
else
encoder.encodeObject(BORDER_KEY, border);
}
COM: <s> encodes the drag well instance </s>
|
funcom_train/41164650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoMetacognitiveVariable entity) {
EntityManagerHelper.log("saving CoMetacognitiveVariable 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 metacognitive variable </s>
|
funcom_train/9827994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void informBuildListeners() {
if ( _buildListeners == null ) {
return;
}
for ( Iterator itr = _buildListeners.iterator(); itr.hasNext(); ) {
//try {
((BuildListener)itr.next()).dtbDesignBuilt(_design);
//} catch ( ConcurrentModificationException cme ) {}
}
} // end method informBuildListeners
COM: <s> tells all registered build listeners that the cell was built </s>
|
funcom_train/25180659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseXMLFile(File xmlFile) throws IdealizeInputException{
JAXBContext ctx;
Unmarshaller um;
try {
ctx = JAXBContext.newInstance(new Class[] {Configuration.class});
um = ctx.createUnmarshaller();
config = (Configuration) um.unmarshal(xmlFile);
} catch (Exception e) {
config = null;
throw new IdealizeInputException(String.format("RulesProcessor.parseXMLFile: Invalid xml file: %1$s", e.toString(), e));
}
}
COM: <s> parse the xml file to appropriate xml objects </s>
|
funcom_train/18321542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateCompleteness(StateMachine sm) {
if (sm.getTop() == null) {
throw new IllegalArgumentException("State machine "+sm.getName()+
" doesn't have top state");
}
setSm(sm);
try {
sm.getTop().accept(this);
} catch (VisitorException e) {
e.printStackTrace();
}
}
COM: <s> checks completenes of transitions for set that is code state code joined </s>
|
funcom_train/23335600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean handleItemCode(ADLItem item, String type) {
Object[] params = new Object[1];
params[0] = this.selectedItem;
Object retval = this.callRoutine(this.selectedItem.getName() + "_"
+ type, params);
if (retval != null) {
try {
return (Boolean) retval;
} catch (ClassCastException e) {
return false;
}
}
return false;
}
COM: <s> calls a script function on item use </s>
|
funcom_train/50253269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Token getToken(long tokenId) {
try {
Token token = (Token) session.get(Token.class, new Long(tokenId));
return token;
} catch (Exception e) {
log.error(e);
jbpmSession.handleException();
throw new JbpmException("couldn't get token '" + tokenId + "'", e);
}
}
COM: <s> gets a token from the database by the identifier </s>
|
funcom_train/50741623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
//
// Create our new copy
//
Blog clone = new Blog();
clone.setTitle(this.getTitle());
if (this.getURL() != null) {
try {
clone.setURL(new URL(this.getURL().toString()));
} catch(MalformedURLException e) {
throw new CloneNotSupportedException("MalformedURLException thrown: "+e.getMessage());
}
}
//
// Get Posts
//
clone.setPosts(this.clonePosts());
return clone;
}
COM: <s> performs a deep copy of this </s>
|
funcom_train/27973390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyReleased(KeyEvent e) {
keywords = keywordsBox.getText();
// notify all listeners
ActionEvent ae = new ActionEvent(this, e.getID(), Character.toString(e.getKeyChar()), e.getWhen(), e.getModifiers());
for (Enumeration en = listeners.elements(); en.hasMoreElements(); )
((ActionListener) en.nextElement()).actionPerformed(ae);
}
COM: <s> listen to the text box </s>
|
funcom_train/16706720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookupDoc(String docName) {
try {
IndexSearcher is = new IndexSearcher(new SimpleFSDirectory(
new File(indexpath)));
Term t = new Term(docNamesField, docName);
Query q = new TermQuery(t);
TopDocs h = is.search(q, 10);
if (h.totalHits > 0) {
return h.scoreDocs[0].doc;
} else {
return INDEX_UNKNOWN;
}
} catch (IOException e) {
e.printStackTrace();
}
return INDEX_UNKNOWN;
}
COM: <s> get the document index of the document with string id doc name </s>
|
funcom_train/29672481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayStack getEntryTimes(ThreadReference thread) {
if (entryTimes == null) {
entryTimes = new HashMap<ThreadReference, ArrayStack>();
}
if (entryTimes.get(thread) == null) {
ArrayStack entryStack = new ArrayStack();
entryTimes.put(thread, entryStack);
return entryStack;
} else {
return entryTimes.get(thread);
}
}
COM: <s> get the method entry stack </s>
|
funcom_train/5166680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute_boolean(ProgramChromosome c, int n, Object[] args) {
// Repeatedly execute the child.
// -----------------------------
// loop{
//
// }
//for (int i = 0; i < m_count; i++) {
//if(!test)
// //c.execute_void(n, 0, args);
//}
return false;
}
COM: <s> executes the loop until function for a void argument </s>
|
funcom_train/16392033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColor( Color color ) {
ActionListener listener;
int count = listeners.size(), i;
this.color = color;
for( i = 0; i < count; i++ ) {
listener = (ActionListener) listeners.get( i );
listener.actionPerformed( new ActionEvent( this, 0, "Color Changed" ));
}
}
COM: <s> changes the color object encapsulated by jcolor </s>
|
funcom_train/37221294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasOpposite(Place place, Corridor corridor) {
if (!(graph().connected(place, corridor))) {
throw new IllegalArgumentException(
"Place is not connected with corridor");
}
Iterator it = graph().edges(corridor);
while (it.hasNext()) {
PlaceConnector pcTemp = (PlaceConnector) it.next();
if (pcTemp.opposite(corridor) != place) {
return true;
}
}
return false;
}
COM: <s> returns true if the corridor has an opposite room </s>
|
funcom_train/31119659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOpponent(Vector v) {
for (int a = 0; a < v.size(); a++) {
Gladator g = (Gladator) v.elementAt(a);
if (g.getStatus() != ACTIVE) {
v.removeElement(g);
a--;
}
if (v.size() == 0) {
opponent = null;
return;
}
}
setOpponent((Gladator) v.elementAt((int) (Math.random() * v.size())));
}
COM: <s> sets the opponent attribute of the gladator object </s>
|
funcom_train/38389617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveLayoutState(IMemento memento) {
if (memento != null) {
memento.putInteger(TAG_LAYOUT, getLayoutAsInt());
} else {
//if memento is null save in preference store
IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
store.setValue(TAG_LAYOUT, getLayoutAsInt());
}
}
COM: <s> saves the current layout state </s>
|
funcom_train/24039218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toDBString() {
return "" + c.get(Calendar.YEAR) + "-"
+ (c.get(Calendar.MONTH) < 9 ? "0" : "") + (c.get(Calendar.MONTH)+1) + "-"
+ (c.get(Calendar.DAY_OF_MONTH) < 10 ? "0" : "") + c.get(Calendar.DAY_OF_MONTH);
}
COM: <s> return the date in db format </s>
|
funcom_train/39787878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPrimaryConstructor() {
WindowPane windowPane = new WindowPane("Hello", TestConstants.EXTENT_500_PX, TestConstants.EXTENT_200_PX);
assertEquals(TestConstants.EXTENT_500_PX, windowPane.getWidth());
assertEquals(TestConstants.EXTENT_200_PX, windowPane.getHeight());
assertEquals("Hello", windowPane.getTitle());
}
COM: <s> test primary constructor </s>
|
funcom_train/46682146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInstance(int index, Object ... list){
int size = dataset.size();
if(index>size){
//System.out.println("** Inserting entry "+ list[0]+" "+list[1]+" "+list[2]+" "+list[3]+" "+list[4]+" "+list[5]);
if(isNominalDataset())
stringFilter();
dataset.add(newInstance(list));
}
}
COM: <s> incrementally add a new instance to the dataset </s>
|
funcom_train/24351879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkEmail() throws Exception {
Pattern p = Pattern.compile("\\w+(\\.\\w+)*@\\w+\\.\\w+(\\.\\w+)*");
Matcher m = p.matcher(this.email);
boolean b = m.matches();
if (!b)
throw new Exception("There seems to be an error with the email address you provided.<BR>" +
"Please double-check your typing and make sure that you type a valid email address.<BR>" +
"This is important since your password will be sent to that email address. 04");
}
COM: <s> basic email validator </s>
|
funcom_train/6439762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean confirmSaveFile(String filename) {
int result = JOptionPane.showConfirmDialog(browser,
MessageFormat.format(s_SAVEFILE_MSG, new String[]{filename}),
s_SAVEFILE_TITLE,
JOptionPane.YES_NO_OPTION);
return result == JOptionPane.OK_OPTION;
}
COM: <s> method confirm save file </s>
|
funcom_train/2956519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decreaseMatchingSize(int j) {
this.matchingSize.add(-1);
this.flow.set(j, this.flow.get(j) - 1);
// We must check if this is still possible ...
int delta = this.getMinFlow(j) - flow.get(j);
if (delta > 0) {
this.compatibleSupport.set(false);
}
}
COM: <s> updates the matching size when the matching is rebuilt </s>
|
funcom_train/29313464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMGF(double t){
double sum = 0, x, w;
if (type == DISCRETE) w = 1; else w = domain.getWidth();
for (int i = 0; i < domain.getSize(); i++){
x = domain.getValue(i);
sum = sum + Math.exp(t * x) * getDensity(x) * w;
}
return sum;
}
COM: <s> this method computes a default approximation to the moment generating function </s>
|
funcom_train/5374187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWidth (int width) {
checkWidget();
if ((style & SWT.SEPARATOR) == 0) return;
if (width < 0) return;
seperatorWidth = width;
/*
int hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
info.cx = (short) width;
OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO, id, info);
*/
parent.layoutItems ();
}
COM: <s> sets the width of the receiver for code separator code tool items </s>
|
funcom_train/9869749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int deleteByWhere(String where) throws SQLException {
Connection c = null;
PreparedStatement ps = null;
try {
c = getConnection();
String delByWhereSQL = "DELETE FROM GAMESESSION " + where;
ps = c.prepareStatement(delByWhereSQL);
return ps.executeUpdate();
} finally {
getManager().close(ps);
freeConnection(c);
}
}
COM: <s> deletes rows from the gamesession table using a where clause </s>
|
funcom_train/24116033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRegisteredPeer(int id, XulPeerInfo factory, String name)
{
if ( _peerComponent.containsKey(id)) {
T.debug("Native component tag "+id+" previous registered for \"<"
+ name + "\"> overloaded");
_peerComponent.remove(id);
}
_peerComponent.put(id, factory);
}
COM: <s> add defintion of peer object for a def object </s>
|
funcom_train/3701550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInfoSpacePath(String newPath) {
//// 0. Error checking - see if it is a path.
if (newPath.startsWith("/") == false) {
throw new IllegalArgumentException("Can't parse: " + newPath);
}
//// 1. Set.
strPath = newPath;
} // of method
COM: <s> set the path to the infospace ex </s>
|
funcom_train/10211750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
BaseTypePrimitiveVector v = (BaseTypePrimitiveVector)super.clone();
if (vals != null) {
v.vals = new BaseType[vals.length];
System.arraycopy(vals, 0, v.vals, 0, vals.length);
}
return v;
}
COM: <s> returns a clone of this code base type primitive vector code </s>
|
funcom_train/17493803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void packageClosing(PackageEvent ev) {
try {
String packageName = ev.getPackage().getProject().getName();
System.out.println("Project " + packageName + " closed.");
} catch (ExtensionException e) {
System.out.println("Project closed by BlueJ");
}
}
COM: <s> the package is closing </s>
|
funcom_train/24350741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void selectAll(boolean value) {
boolean change = false;
if (checkBoxes != null) {
for (int i = 0; i < size; i++)
if (checkBoxes[i].getSelection() != value) {
change = true;
checkBoxes[i].setSelection(value);
}
if (change) valueChanged(!value, value);
}
}
COM: <s> selects or unselects all of the check boxes </s>
|
funcom_train/3026808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkin(Runtime factory, String file) throws IOException {
// Create the executable
String[] args = new String[3];
args[0] = exeFile;
args[1] = "CHECKIN";
args[2] = getFilename(file);
Process proc = factory.exec(args);
try {
proc.waitFor();
} catch (InterruptedException ie) {
}
}
COM: <s> check in the file </s>
|
funcom_train/10666416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testAddSM() {
try {
final InitialContext ctx = createCtx(true);
ctx.addToEnvironment("java.naming.rmi.security.manager",
"some value");
} catch (final Exception e) {
e.printStackTrace();
return failed(e.getMessage());
}
return passed();
}
COM: <s> create initial context with environment containing the property </s>
|
funcom_train/44626432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testMatchField3a() {
addMockFile("$A/A.jml","public class A { /*@ int k; */}");
helpTCF("A.java","public class A{}",
"/$A/A.jml:1: A declaration within a JML annotation must be either ghost or model", 26);
}
COM: <s> missing a ghost or model modifier </s>
|
funcom_train/46944837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButtonPersonType() {
if (jRadioButtonPersonType == null) {
jRadioButtonPersonType = new JRadioButton();
jRadioButtonPersonType
.setHorizontalAlignment(SwingConstants.LEADING);
jRadioButtonPersonType
.setHorizontalTextPosition(SwingConstants.TRAILING);
jRadioButtonPersonType.setSelected(true);
jRadioButtonPersonType.setText("Person Type");
}
return jRadioButtonPersonType;
}
COM: <s> this method initializes j radio button person type </s>
|
funcom_train/21263728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Proyectos entity) {
EntityManagerHelper.log("saving Proyectos 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 proyectos entity </s>
|
funcom_train/47827697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityInfo getUsageScenarioInfoByName(final String scenarioName) {
for (EntityInfo scenarioInfo : getAllUsageScenarioInfos()) {
if (scenarioInfo.getName().equals(scenarioName)) {
return scenarioInfo;
}
}
assert false : "Usage scenario with name \"" + scenarioName + "\" not found!";
return null;
}
COM: <s> retrieves a usage scenario by name </s>
|
funcom_train/35716922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void releaseWidgetToken(int type) {
if (fListeners[CONTEXT_SELECTOR] == null && fListeners[PROPOSAL_SELECTOR] == null) {
IWidgetTokenOwner owner= null;
if (fContentAssistSubjectControl instanceof IWidgetTokenOwner)
owner= (IWidgetTokenOwner) fContentAssistSubjectControl;
else if (fViewer instanceof IWidgetTokenOwner)
owner= (IWidgetTokenOwner) fViewer;
if (owner != null)
owner.releaseWidgetToken(this);
}
}
COM: <s> releases the previously acquired widget token if the token is no longer necessary </s>
|
funcom_train/13210902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getMessagePart(int index, String msg) {
if (msg!=null) {
StringTokenizer st=new StringTokenizer(msg, ConstantValue.NETWORK_SEPARATE);
int i=0;
while (st.hasMoreTokens()) {
String part=st.nextToken();
if (i==index) return part;
i++;
}
}
return null;
}
COM: <s> returns the given part of the message </s>
|
funcom_train/46144435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUpdateable(BookingResponse bookingResponse) {
boolean value = false;
if (bookingResponse.getAntalOmbok() != null && bookingResponse.getMaxAntalOmbok() != null) {
if (forTest) {
value = true;
} else if (!forTest) {
value = bookingResponse.getAntalOmbok() <= bookingResponse.getMaxAntalOmbok();
}
}
return value;
}
COM: <s> this determines whether the patient can reschedule for a new appointment or not </s>
|
funcom_train/38178054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRect(int x, int y, int width, int height, J2DAColor color, boolean blended) {
Graphics2D g = ((J2DBuffer)gamePanel).getGraphicsContext();
g.setStroke(stroke);
g.setColor(color.toAWTColor());
g.fillRect(x,y,width,height);
}
COM: <s> draws a filled rectangle </s>
|
funcom_train/24539631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EReference getItemsFeature() {
if (sf_items == null && itemsName != null) {
try {
URI uri = URI.createURI(itemsName);
sf_items = JavaInstantiation.getReference(EMFEditDomainHelper.getResourceSet(getBeanProxyDomain().getEditDomain()), uri);
} catch (IllegalArgumentException e) {
JavaVEPlugin.log(e, Level.WARNING);
}
itemsName = null;
}
return sf_items;
}
COM: <s> get the items feature </s>
|
funcom_train/44468480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List doPostViewExtensions(BlogRunData data, List posts) {
ArrayList l = new ArrayList(posts.size());
for(Iterator i = posts.iterator(); i.hasNext();) {
Post p = (Post)i.next();
l.add(doPostViewExtensions(data, p));
}
return l;
}
COM: <s> apply do post view extensions to a whole list of posts </s>
|
funcom_train/4514540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addButtonGroup(String buttonGroupName, int groupIndex) {
this.groupTitles.add(groupIndex, buttonGroupName);
List<AbstractCommandButton> list = new ArrayList<AbstractCommandButton>();
this.buttons.add(groupIndex, list);
this.fireStateChanged();
}
COM: <s> adds a new button group at the specified index </s>
|
funcom_train/24134344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void runXSLProcessor(String args[]) {
// try {
// XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
// processor.process(
// new XSLTInputSource(args[0]),
// new XSLTInputSource(args[1]),
// new XSLTResultTarget(new FileOutputStream(args[2])));
// System.out.println("Transform complete.");
// }
// catch (Exception e) {
// e.printStackTrace();
// }
// }
COM: <s> runs xml file through xsl transform writes output to file </s>
|
funcom_train/49268414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ObjectMapper chooseObjectMapper(Class<?> sourceType, Class<?> targetType) {
if (simpleObjectMapper.isMappingSupported(sourceType, targetType)) {
return simpleObjectMapper;
} else if (useDozer) {
return dozerObjectMapper;
} else {
String message = "Unsupported mapping and not using Dozer: " + sourceType + " to " + targetType;
LOGGER.error(message);
throw new UnsupportedObjectMappingException(message);
}
}
COM: <s> chooses the appropriate code object mapper code solution to use </s>
|
funcom_train/3787855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String cvtSpotToSpotRecordStr(DbSpot r)
{ /* cvtSpotToSpotRecordStr */
StringBuffer sBuf= new StringBuffer(5000);
cvtSpotToSpotRecordStr(sBuf, r);
String sR= new String(sBuf);
return(sR);
} /*cvtSpotToSpotRecordStr */
COM: <s> cvt spot to spot record str convert spot statistics to string </s>
|
funcom_train/26599380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(int position) throws DException {
if (position >= cluster.getActiveRecordCount())
throw new DException("DSE2043", new Object[] {new Integer(position),
new Integer(cluster.getActiveRecordCount())});
if (position == 0)
return null;
return getElement(position).getValue();
}
COM: <s> returns table key of element at given position </s>
|
funcom_train/21021636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkMenuOptionPermissions(GWTDocument doc, GWTFolder folder) {
copyOption = true;
if ( (doc.getPermissions() & GWTPermission.WRITE) == GWTPermission.WRITE) {
if ( (folder.getPermissions() & GWTPermission.WRITE) == GWTPermission.WRITE) {
deleteOption = true;
renameOption = true;
moveOption = true;
} else {
deleteOption = false;
renameOption = false;
moveOption = false;
}
} else {
deleteOption = false;
renameOption = false;
moveOption = false;
}
}
COM: <s> checks permissions associated to document and menu options enabled actions </s>
|
funcom_train/50875276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int DBErrorConvert(int error) {
switch (error) {
case -895:return DAOErrorHandler.CHECK_CONSTRAINT_FAILED;
case -500:return DAOErrorHandler.PARENT_KEY_NOT_FOUND;
case -400:return DAOErrorHandler.UNIQUE_CONSTRAINT_FAILED;
}
return DAOErrorHandler.UNKNOWN_ERROR_CODE;
}
COM: <s> it will resolve problem of incompatibility of the error coded returned </s>
|
funcom_train/1238143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParameterMode getParameterMode(String operationName, int n) {
MetaInfo value = (MetaInfo) table.get(operationName);
if ((value == null) || (value.modes == null)
|| (value.modes.length <= n + 1)) {
return null;
}
return value.modes[n + 1];
}
COM: <s> used to return the mode of the n th parameter of the specified </s>
|
funcom_train/10211844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int elementCount(boolean leaves) {
if (!leaves)
return varTemplate.size();
else {
int count = 0;
for (Enumeration e = varTemplate.elements() ; e.hasMoreElements() ;) {
BaseType bt = (BaseType)e.nextElement();
count += bt.elementCount(leaves);
}
return count;
}
}
COM: <s> returns the number of variables contained in this object </s>
|
funcom_train/49790562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPoint() throws Exception {
beginAtSitemapThenPage("Home");
{
String target = getLabelIDForText("select address");
assertLabeledFieldEquals(target, "");
setLabeledFormElementField(target, "Wellington, New Zealand");
}
assertNoProblem();
// the map point has been created
if (!doCheckPoints()) return;
IElement point = assertHasMapPoint("target map point");
// TODO how to check that this point is at the right address?
assertNotNull(point);
}
COM: <s> if we create an address it will automatically </s>
|
funcom_train/1797272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScope(String scope) {
// check if setting to existing value
if (this.scope == null ? scope != null : !this.scope.equals(scope)) {
// set to new value for customer parameter
this.scope = scope;
setStringCustomParameter("scope", scope);
}
}
COM: <s> sets the scope </s>
|
funcom_train/46759973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final ApplicationControlPrefModel pref, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
// update the medication display if needed
long prefId = SecurityData.store(pref, chain, call);
chain.execute();
return prefId;
} catch (Exception ex) {
Log.exception(ex);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> adds the ref model to the database if reference </s>
|
funcom_train/7623785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long insert(String table, String nullColumnHack, ContentValues values) {
try {
return insertWithOnConflict(table, nullColumnHack, values, null);
} catch (SQLException e) {
Log.e(TAG, "Error inserting " + values, e);
return -1;
}
}
COM: <s> convenience method for inserting a row into the database </s>
|
funcom_train/40553215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node search(Session session, Row row) throws HsqlException {
Object[] d = row.getData();
Node x = getRoot(session);
while (x != null) {
int c = compareRowForInsert(session, row, x.getRow());
if (c == 0) {
return x;
} else if (c < 0) {
x = x.getLeft();
} else {
x = x.getRight();
}
}
return null;
}
COM: <s> find a node with matching data </s>
|
funcom_train/11010315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PackagePart getPart(PackageRelationship partRel) {
PackagePart retPart = null;
ensureRelationships();
for (PackageRelationship rel : relationships) {
if (rel.getRelationshipType().equals(partRel.getRelationshipType())) {
try {
retPart = getPart(PackagingURIHelper.createPartName(rel
.getTargetURI()));
} catch (InvalidFormatException e) {
continue;
}
break;
}
}
return retPart;
}
COM: <s> get the target part from the specified relationship </s>
|
funcom_train/4900619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMiniMapVisible(boolean miniMapVisible) {
boolean old = this.isMiniMapVisible();
this.miniMapVisible = miniMapVisible;
miniMap.setVisible(miniMapVisible);
firePropertyChange("miniMapVisible",old,this.isMiniMapVisible());
}
COM: <s> sets if the mini map should be visible </s>
|
funcom_train/18827369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Map attributes) throws InvalidKeyException {
if (wired != null) {
throw new IllegalStateException();
}
Direction flow = (Direction) attributes.get(DIRECTION);
if (flow == null) {
flow = Direction.FORWARD;
attributes.put(DIRECTION, flow);
}
initDelegate(attributes);
wired = flow;
}
COM: <s> initialises the stage for operation with specific characteristics </s>
|
funcom_train/43098370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object setBody(Object handle, String body) {
String language;
if (!(handle instanceof MExpression)) {
throw new IllegalArgumentException("handle: " + handle);
}
language = ((MExpression) handle).getLanguage();
return newExpression(handle, body, language);
}
COM: <s> todo this operation is fooling the user </s>
|
funcom_train/17296502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void traceLinks(Graphics2D g2, PyramideNode node, float x, float y) {
switch (pyramide2D.getLinkShape()) {
case TRIANGULAR_LINKS:
traceTriangularLinks(g2, node, x, y);
break;
case TRAPEZOIDAL_LINKS:
traceTrapezoidalLinks(g2, node, x, y);
break;
default:
traceTriangularLinks(g2, node, x, y);
}
}
COM: <s> trace links between a node and its children </s>
|
funcom_train/10985952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHtml() throws Exception {
HtmlElement html = page.getDocumentElement();
assertEquals("html", html.getTagName());
assertEquals("http://www.w3.org/1999/xhtml", html.getAttributeValue("xmlns"));
// TODO: verify the "lang" attribute
// TODO: verify the "xml:lang" attribute
}
COM: <s> p verify the presence and contents of an html element </s>
|
funcom_train/31878124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void acknowledge(AddressInterface iface, Message mess) {
Header oldHead = mess.getHeader();
Address sender = oldHead.getSourceAddress();
int seqNum = oldHead.getSequenceNumber();
// TODO: Support for ACK PIGGYBACKING
Header head =
new DefaultHeader(
iface.getAddress(),
sender,
getSeqCounter(),
false,
// Reliable
new int[] { seqNum });
Message toSend = new DefaultMessage(head, new Vector());
MBusLogger.log(
MBusLogger.LVL2_DEBUG,
"Send ACK for "
+ seqNum
+ " to "
+ toSend.getHeader().getDestinationAddress());
send(toSend);
}
COM: <s> acknowledge the receipt of an reliabe message </s>
|
funcom_train/11344347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean throwsUnsupportedOperationException() {
for (int i = 0; i < m_method.getExceptionTypes().length; i++) {
if (m_method.getExceptionTypes()[i].getName().equals(UnsupportedOperationException.class.getName())) {
return true;
}
}
return false;
}
COM: <s> check if the method can throw unsupported operation exception </s>
|
funcom_train/42642896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ITermPart_expression_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ITermPart_expression_feature", "_UI_ITermPart_type"),
DigitalHPSPackage.Literals.ITERM_PART__EXPRESSION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the expression feature </s>
|
funcom_train/11317321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BoshRequest getNextRequest() {
if (requestsWindow.isEmpty()) {
return null;
}
if (currentProcessingRequest == null || currentProcessingRequest < requestsWindow.firstKey()) {
currentProcessingRequest = requestsWindow.firstKey();
}
if (currentProcessingRequest > highestReadRid) {
return null;
} else {
currentProcessingRequest++;
return requestsWindow.get(currentProcessingRequest - 1);
}
}
COM: <s> returns the next bosh body to process </s>
|
funcom_train/47704341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveTempResults(Test test) {
this.onMessage("*********save temp results...");
List<String> caseFileList = test.getCaseFileList();
for (int i = 0; i < caseFileList.size(); i++) {
String caseFile = (String) caseFileList.get(i);
saveTempResults(caseFile);
}
}
COM: <s> save the temporary result </s>
|
funcom_train/35973320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkIntersection(){
//If player reach the club
if((playerShape.intersects(670,90,130,40))){
gameStopped = true;
guii.updateScore(scoreinfo[0],scoreinfo[1],scoreinfo[2],scoreinfo[3]);
guii.nextLevel(this);
setVisible(false);
}
}
COM: <s> this checks if the player intersects with an item and does an action </s>
|
funcom_train/44156800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Reader createFilteredReader(Reader fileReader, boolean isPropertiesFile) {
// support ${token}
Reader reader = new InterpolationFilterReader(fileReader,
m_filterProperties, "${", "}");
// support @token@
reader = new InterpolationFilterReader(reader,
m_filterProperties, "@", "@");
reader = new InterpolationFilterReader(reader,
new ReflectionProperties(
getProject(), isPropertiesFile), "${", "}");
return reader;
}
COM: <s> create a filtering file reader on top of a normal reader </s>
|
funcom_train/16392484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
Iterator iterator = traverse(getFirstVertex()).iterator();
StringBuffer out = new StringBuffer();
String arrow = "->";
while( iterator.hasNext()) {
out.append( iterator.next().toString() );
if( iterator.hasNext()) {
out.append( arrow );
}
}
return out.toString();
}
COM: <s> returns a string representation of the path </s>
|
funcom_train/25647903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeRtf(KendoProject project, KendoModel model, File targetFile) {
JFrame parent = MainApplication.getMainWindow();
Composer composer = new Composer(parent, project, model, targetFile);
Thread composerThread = new Thread(composer);
composerThread.start();
}
COM: <s> export to rtf format </s>
|
funcom_train/16849346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DuplicateData loadDuplicates(ResultSet rs) throws SQLException {
DuplicateData d = new DuplicateData();
d.setQuakeID(rs.getLong(1));
d.setCatalogID(rs.getInt(2));
d.setMacro(toBoolean(rs.getInt(3)));
d.setInfo(toBoolean(rs.getInt(4)));
return d;
}
COM: <s> loads a duplicate data object with its data </s>
|
funcom_train/3891458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setPanelEnabled(boolean enabled) {
_textHREF.setEnabled(!enabled);
_textURI.setEnabled(enabled);
_comboDataType.setEnabled(enabled);
_textInitialValue.setEnabled(enabled);
_mdButton.setEnabled(enabled);
getRestrictionTypeEditorPanel().setPanelEnabled(enabled);
}
COM: <s> set the main panel enabled </s>
|
funcom_train/20842366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HTTPRequestHandler unregister(String path) {
URI registerURI = new URI(path, base);
HTTPRequestHandler handler = (HTTPRequestHandler) handlers.remove(registerURI);
if (UNREGISTER_SHUTDOWN && handlers.isEmpty()) {
try {
TCPServer.close(ipAddress, port);
} catch (IOException e) {
Log.error("Cannot shutdown TCP server after all registrations removed. " + e.getMessage());
}
}
return handler;
}
COM: <s> removes registration of a relative http path for a </s>
|
funcom_train/45801614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TopicType getSuperType() {
String query = "xtm:superclass-subclass(%topic% : xtm:subclass, $SUP : xtm:superclass)?";
Map<String,TopicIF> params = Collections.singletonMap("topic", getTopicIF());
QueryMapper<TopicType> qm = getTopicMap().newQueryMapper(TopicType.class);
return qm.queryForObject(query, params);
}
COM: <s> returns the supertype of this type or null if there is none </s>
|
funcom_train/39966069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean implementsInterface(Class<?> cl, Class<?> iface) {
if (cl == null)
return false;
Class<?>[] clInterfaces = cl.getInterfaces();
for (int j = 0; j < clInterfaces.length; j++) {
if (iface.isAssignableFrom(clInterfaces[j]))
return true;
}
return implementsInterface(cl.getSuperclass(), iface);
}
COM: <s> tests if a class or its superclasses implements a given interface </s>
|
funcom_train/2928059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(OutputElementDesc desc) {
if (name2OutputElementDesc.containsKey(desc.ElementName())) {
throw new IllegalArgumentException("ElementDesc with name " + desc.ElementName() + "already exist! XMLSpec inconsitent!");
}
name2OutputElementDesc.put(desc.ElementName(), desc);
classname2OutputElementDesc.put(desc.ClassName(), desc);
}
COM: <s> stores an output element desc in the output elment resolver </s>
|
funcom_train/14100214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean epsilonEquals(GMatrix m1, float epsilon) {
if(m1.nRow != nRow)
return false;
if(m1.nCol != nCol)
return false;
for (int i = 0; i < nRow; i++)
for (int j = 0; j < nCol; j++)
if (
epsilon < Math.abs(elementData[i*nCol + j]-m1.elementData[i*nCol + j])
)
return false;
return true;
}
COM: <s> returns true if the l infinite distance between this matrix and </s>
|
funcom_train/36018140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(String[] args) {
try {
Command command = (Command) context.getBean(args[0], Command.class);
command.execute(args);
} catch (NoSuchBeanDefinitionException e) {
logger.error("Command '{}' doesn't exist", args[0]);
} catch (BeanCreationException e) {
logger.error(e.getRootCause().getMessage());
}
}
COM: <s> execute the command by loading it with arguments </s>
|
funcom_train/4299755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWebRoot(String root) {
checkRunning(false);
root = (new File(root)).getAbsolutePath();
printWithThread("setWebRoot(" + root + ")");
if (serverProtocol != ServerConstants.SC_PROTOCOL_HTTP) {
return;
}
serverProperties.setProperty(ServerConstants.SC_KEY_WEB_ROOT, root);
}
COM: <s> sets the path of the root directory from which web content is served </s>
|
funcom_train/48045634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DateTimeFormatSymbols withZeroDigit(char zeroDigit) {
if (zeroDigit == this.zeroDigit) {
return this;
}
return new DateTimeFormatSymbols(locale, zeroDigit, positiveSign, negativeSign, decimalSeparator, firstDayOfWeek, minDaysInFirstWeek);
}
COM: <s> returns a copy of the info with a new character that represents zero </s>
|
funcom_train/3946017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVersionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ManifestType_version_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ManifestType_version_feature", "_UI_ManifestType_type"),
ImscpRootv1p1p2Package.eINSTANCE.getManifestType_Version(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the version feature </s>
|
funcom_train/9104609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BoxLayout(getJContentPane(), BoxLayout.X_AXIS));
jContentPane.add(getJInternalFrame(), null);
jContentPane.add(getJInternalFrame1(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/13675392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Message getMessage(int num) throws JwmaException {
try {
return m_Folder.getMessage(num);
} catch (MessagingException mex) {
//log
log.error(
JwmaKernel.getReference().getLogMessage("jwma.folder.getmessage.failed"),
mex
);
//exception
throw new JwmaException("jwma.folder.getmessage.failed", true);
}
}//getMessage
COM: <s> returns the message with the given number from the </s>
|
funcom_train/28749654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrderedfor(String newVal) {
if ((newVal != null && this.orderedfor != null && (newVal.compareTo(this.orderedfor) == 0)) ||
(newVal == null && this.orderedfor == null && orderedfor_is_initialized)) {
return;
}
this.orderedfor = newVal;
orderedfor_is_modified = true;
orderedfor_is_initialized = true;
}
COM: <s> setter method for orderedfor </s>
|
funcom_train/47109887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
long start = System.currentTimeMillis();
logger.info("Executing datasetup");
logger.info("Performing cleanup");
runCleanup();
logger.info("Performing import");
runImport();
long duration = System.currentTimeMillis() - start;
logger.info("Datasetup successfully in '" + duration + "' ms");
}
COM: <s> loops through all registered stages and imports the data </s>
|
funcom_train/40492337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWidth(String width) {
super.setWidth(width);
// note that you CANNOT call panel.setWidth("100%") until parent's width
// has been explicitly set, b/c until then parent's width is
// unconstrained
// and setting panel's width to 100% will flow parent to 100% of browser
// (i.e. can't do this in constructor)
//captionHP.setWidth("300px");
panel.setWidth(width);
}
COM: <s> override so that interior panel reflows to match parents new width </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.